@particle-network/ui-react 0.3.0-beta.11 → 0.3.0-beta.12

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.
@@ -8,7 +8,7 @@ export interface UXSpinnerProps extends SquareProps {
8
8
  color?: UXForegroundColor | 'currentColor';
9
9
  /**
10
10
  * 动画持续时间(毫秒)
11
- * @default 1000
11
+ * @default 500
12
12
  */
13
13
  duration?: number;
14
14
  }
@@ -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 = 1000, className, style, ...restProps })=>{
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,12 @@ 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: 5,
10
+ maxVisibleToasts: 4,
10
11
  toastOffset: 40,
11
12
  toastProps: {
12
- timeout: 4000
13
+ timeout: 3000
13
14
  }
14
15
  });
15
16
  const getIcon = (type)=>{
@@ -29,7 +30,7 @@ const show = (props)=>{
29
30
  return addToast({
30
31
  classNames: {
31
32
  base: [
32
- 'bg-tertiary rounded-xl px-3.5 py-3 shadow-none !w-fit max-w-[350px]',
33
+ 'bg-tertiary rounded-xl px-3.5 py-3 shadow-none border-none !w-fit max-w-[350px]',
33
34
  !hideCloseButton && 'pr-12',
34
35
  'flat' === variant && 'success' === type && 'bg-[#0E3728]',
35
36
  'flat' === variant && 'error' === type && 'bg-[#501D1D]'
@@ -63,7 +64,7 @@ const show = (props)=>{
63
64
  loadingComponent: /*#__PURE__*/ jsx(UXSpinner, {
64
65
  size: 18
65
66
  }),
66
- timeout: 'loading' === type ? 1 / 0 : 4000,
67
+ timeout: 'loading' === type ? 1 / 0 : 3000,
67
68
  ...toastProps
68
69
  });
69
70
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-react",
3
- "version": "0.3.0-beta.11",
3
+ "version": "0.3.0-beta.12",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {