@particle-network/ui-react 0.5.1-beta.16 → 0.5.1-beta.17
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.
|
@@ -34,18 +34,24 @@ const getIcon = (type)=>{
|
|
|
34
34
|
};
|
|
35
35
|
const show = (props)=>{
|
|
36
36
|
const { type = 'info', hideCloseButton, icon, variant, classNames, title, description, ...toastProps } = props ?? {};
|
|
37
|
-
const { base, description: descriptionClassName, icon: iconClassName, loadingComponent, content, closeButton, ...restClassNames } = classNames ?? {};
|
|
37
|
+
const { base, title: titleClassName, description: descriptionClassName, icon: iconClassName, loadingComponent, content, closeButton, ...restClassNames } = classNames ?? {};
|
|
38
38
|
return addToast({
|
|
39
39
|
classNames: {
|
|
40
40
|
base: [
|
|
41
|
-
'bg-cursor rounded-xl px-3.5
|
|
41
|
+
'dark:bg-cursor bg-white rounded-xl px-3.5 shadow-none min-h-11 border-none !w-fit max-w-[90vw] md:max-w-[400px] m-0',
|
|
42
42
|
!hideCloseButton && 'pr-12',
|
|
43
43
|
'flat' === variant && 'success' === type && 'bg-[#0E3728]',
|
|
44
44
|
'flat' === variant && 'error' === type && 'bg-[#501D1D]',
|
|
45
45
|
base
|
|
46
46
|
],
|
|
47
|
+
title: [
|
|
48
|
+
'text-cursor-foreground text-xs font-medium leading-4 !whitespace-normal me-0 pt-xs line-clamp-2',
|
|
49
|
+
hasLongWord(title) && 'break-all',
|
|
50
|
+
'flat' === variant && 'text-white',
|
|
51
|
+
titleClassName
|
|
52
|
+
],
|
|
47
53
|
description: [
|
|
48
|
-
'text-
|
|
54
|
+
'text-secondary !text-body3 me-0 leading-4',
|
|
49
55
|
'flat' === variant && 'text-white',
|
|
50
56
|
hasLongWord(description) && 'break-all',
|
|
51
57
|
descriptionClassName
|
|
@@ -90,22 +96,22 @@ const show = (props)=>{
|
|
|
90
96
|
const toast = {
|
|
91
97
|
info: (message, props)=>show({
|
|
92
98
|
type: 'info',
|
|
93
|
-
|
|
99
|
+
title: message,
|
|
94
100
|
...props
|
|
95
101
|
}),
|
|
96
102
|
success: (message, props)=>show({
|
|
97
103
|
type: 'success',
|
|
98
|
-
|
|
104
|
+
title: message,
|
|
99
105
|
...props
|
|
100
106
|
}),
|
|
101
107
|
error: (message, props)=>show({
|
|
102
108
|
type: 'error',
|
|
103
|
-
|
|
109
|
+
title: message,
|
|
104
110
|
...props
|
|
105
111
|
}),
|
|
106
112
|
loading: (message, props)=>show({
|
|
107
113
|
type: 'loading',
|
|
108
|
-
|
|
114
|
+
title: message,
|
|
109
115
|
...props
|
|
110
116
|
}),
|
|
111
117
|
show,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-network/ui-react",
|
|
3
|
-
"version": "0.5.1-beta.
|
|
3
|
+
"version": "0.5.1-beta.17",
|
|
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.0",
|
|
41
|
-
"@particle-network/
|
|
42
|
-
"@particle-network/
|
|
41
|
+
"@particle-network/lintstaged-config": "0.1.0",
|
|
42
|
+
"@particle-network/eslint-config": "0.3.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.9.0",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"react-aria-components": "^1.14.0",
|
|
53
53
|
"values.js": "^2.1.1",
|
|
54
54
|
"zustand": "^5.0.8",
|
|
55
|
-
"@particle-network/
|
|
56
|
-
"@particle-network/
|
|
55
|
+
"@particle-network/ui-shared": "0.4.1-beta.5",
|
|
56
|
+
"@particle-network/icons": "0.5.1-beta.6"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "rslib build",
|