@particle-network/ui-react 0.3.0-beta.11 → 0.3.0-beta.13
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.
|
@@ -4,7 +4,7 @@ import { cn } from "@heroui/theme";
|
|
|
4
4
|
import { colorToClassName } from "@particle-network/ui-shared";
|
|
5
5
|
import { Square } from "../layout/index.js";
|
|
6
6
|
import { SpinnerIcon } from "./SpinnerIcon.js";
|
|
7
|
-
const UXSpinner = ({ size = 18, color = 'primary', duration =
|
|
7
|
+
const UXSpinner = ({ size = 18, color = 'primary', duration = 500, className, style, ...restProps })=>{
|
|
8
8
|
const [currentIndex, setCurrentIndex] = useState(0);
|
|
9
9
|
const animationRef = useRef(null);
|
|
10
10
|
const iconClassName = 'currentColor' === color ? void 0 : colorToClassName[color];
|
|
@@ -5,11 +5,15 @@ import CircleCloseIcon from "@particle-network/icons/web/CircleCloseIcon";
|
|
|
5
5
|
import CloseIcon from "@particle-network/icons/web/CloseIcon";
|
|
6
6
|
import { UXSpinner } from "../UXSpinner/index.js";
|
|
7
7
|
const UXToastProvider = ()=>/*#__PURE__*/ jsx(ToastProvider, {
|
|
8
|
+
disableAnimation: true,
|
|
8
9
|
placement: "top-center",
|
|
9
|
-
maxVisibleToasts:
|
|
10
|
+
maxVisibleToasts: 4,
|
|
10
11
|
toastOffset: 40,
|
|
11
12
|
toastProps: {
|
|
12
|
-
timeout:
|
|
13
|
+
timeout: 3000
|
|
14
|
+
},
|
|
15
|
+
regionProps: {
|
|
16
|
+
className: 'items-center'
|
|
13
17
|
}
|
|
14
18
|
});
|
|
15
19
|
const getIcon = (type)=>{
|
|
@@ -29,7 +33,7 @@ const show = (props)=>{
|
|
|
29
33
|
return addToast({
|
|
30
34
|
classNames: {
|
|
31
35
|
base: [
|
|
32
|
-
'bg-tertiary rounded-xl px-3.5 py-3 shadow-none !w-fit max-w-[350px]',
|
|
36
|
+
'bg-tertiary rounded-xl px-3.5 py-3 shadow-none border-none !w-fit max-w-[350px]',
|
|
33
37
|
!hideCloseButton && 'pr-12',
|
|
34
38
|
'flat' === variant && 'success' === type && 'bg-[#0E3728]',
|
|
35
39
|
'flat' === variant && 'error' === type && 'bg-[#501D1D]'
|
|
@@ -63,7 +67,7 @@ const show = (props)=>{
|
|
|
63
67
|
loadingComponent: /*#__PURE__*/ jsx(UXSpinner, {
|
|
64
68
|
size: 18
|
|
65
69
|
}),
|
|
66
|
-
timeout: 'loading' === type ? 1 / 0 :
|
|
70
|
+
timeout: 'loading' === type ? 1 / 0 : 3000,
|
|
67
71
|
...toastProps
|
|
68
72
|
});
|
|
69
73
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-network/ui-react",
|
|
3
|
-
"version": "0.3.0-beta.
|
|
3
|
+
"version": "0.3.0-beta.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@types/react": "^19.1.10",
|
|
40
40
|
"react": "^19.1.0",
|
|
41
41
|
"typescript": "^5.8.3",
|
|
42
|
-
"@particle-network/
|
|
43
|
-
"@particle-network/
|
|
42
|
+
"@particle-network/lintstaged-config": "0.1.0",
|
|
43
|
+
"@particle-network/eslint-config": "0.3.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": ">=16.9.0",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"ahooks": "^3.9.4",
|
|
51
|
-
"@particle-network/
|
|
52
|
-
"@particle-network/
|
|
51
|
+
"@particle-network/icons": "0.3.0-beta.6",
|
|
52
|
+
"@particle-network/ui-shared": "0.2.0-beta.3"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "rslib build",
|