@particle-network/ui-react 0.0.5 → 0.0.7

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,11 +1,11 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Ripple } from "@heroui/ripple";
3
- import { Spinner } from "@heroui/spinner";
4
3
  import { forwardRef } from "@heroui/system";
4
+ import { UXSpinner } from "../UXSpinner/index.js";
5
5
  import { useButton } from "./use-button.js";
6
6
  const Button = forwardRef((props, ref)=>{
7
- const { Component, domRef, children, spinnerSize, spinner = /*#__PURE__*/ jsx(Spinner, {
8
- color: "current",
7
+ const { Component, domRef, children, spinnerSize, spinner = /*#__PURE__*/ jsx(UXSpinner, {
8
+ color: "currentColor",
9
9
  size: spinnerSize
10
10
  }), spinnerPlacement, startContent, endContent, isLoading, disableRipple, getButtonProps, getRippleProps, isIconOnly } = useButton({
11
11
  ...props,
@@ -55,7 +55,7 @@ export declare function useButton(props: UseButtonProps): {
55
55
  endContent: import("react").DetailedReactHTMLElement<import("react").HTMLAttributes<HTMLElement>, HTMLElement> | null;
56
56
  isLoading: boolean;
57
57
  spinnerPlacement: "start" | "end";
58
- spinnerSize: "sm" | "md" | "lg" | undefined;
58
+ spinnerSize: number;
59
59
  disableRipple: boolean;
60
60
  getButtonProps: PropGetter;
61
61
  getRippleProps: () => RippleProps;
@@ -101,9 +101,9 @@ function useButton(props) {
101
101
  const endContent = getIconClone(endContentProp);
102
102
  const spinnerSize = useMemo(()=>{
103
103
  const buttonSpinnerSizeMap = {
104
- sm: 'sm',
105
- md: 'sm',
106
- lg: 'md'
104
+ sm: 14,
105
+ md: 18,
106
+ lg: 24
107
107
  };
108
108
  return buttonSpinnerSizeMap[size];
109
109
  }, [
@@ -283,9 +283,9 @@ declare const ExtendedChip: import("react").ForwardRefExoticComponent<Omit<{
283
283
  size?: "sm" | "md" | "lg" | undefined;
284
284
  radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
285
285
  variant?: "flat" | "solid" | "light" | "dot" | "bordered" | "faded" | "shadow" | undefined;
286
+ key?: import("react").Key | null | undefined;
286
287
  isDisabled?: boolean | undefined;
287
288
  as?: import("@heroui/system-rsc").As<any> | undefined;
288
- key?: import("react").Key | null | undefined;
289
289
  startContent?: import("react").ReactNode;
290
290
  endContent?: import("react").ReactNode;
291
291
  onClose?: ((e: import("@react-types/shared").PressEvent) => void) | undefined;
@@ -286,9 +286,9 @@ declare const UXChip: React.ForwardRefExoticComponent<Omit<Omit<{
286
286
  size?: "sm" | "md" | "lg" | undefined;
287
287
  radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
288
288
  variant?: "flat" | "solid" | "light" | "dot" | "bordered" | "faded" | "shadow" | undefined;
289
+ key?: React.Key | null | undefined;
289
290
  isDisabled?: boolean | undefined;
290
291
  as?: import("@heroui/system-rsc").As<any> | undefined;
291
- key?: React.Key | null | undefined;
292
292
  startContent?: React.ReactNode;
293
293
  endContent?: React.ReactNode;
294
294
  onClose?: ((e: import("@react-types/shared").PressEvent) => void) | undefined;
@@ -279,8 +279,8 @@ declare const ExtendedDivider: import("react").ForwardRefExoticComponent<Omit<{
279
279
  onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLHRElement> | undefined;
280
280
  onTransitionStart?: import("react").TransitionEventHandler<HTMLHRElement> | undefined;
281
281
  onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLHRElement> | undefined;
282
- as?: import("@heroui/system-rsc").As<any> | undefined;
283
- key?: import("react").Key | null | undefined;
284
282
  orientation?: "vertical" | "horizontal" | undefined;
283
+ key?: import("react").Key | null | undefined;
284
+ as?: import("@heroui/system-rsc").As<any> | undefined;
285
285
  }, "ref"> & import("react").RefAttributes<import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>>>;
286
286
  export default ExtendedDivider;
@@ -295,6 +295,11 @@ declare const UXInput: React.ForwardRefExoticComponent<Omit<Omit<{
295
295
  multiple?: boolean | undefined;
296
296
  disabled?: boolean | undefined;
297
297
  variant?: "flat" | "bordered" | "faded" | "underlined" | undefined;
298
+ max?: string | number | undefined;
299
+ min?: string | number | undefined;
300
+ name?: string | undefined;
301
+ type?: string | undefined;
302
+ key?: React.Key | null | undefined;
298
303
  labelPlacement?: "inside" | "outside" | "outside-left" | "outside-top" | undefined;
299
304
  label?: React.ReactNode;
300
305
  isInvalid?: boolean | undefined;
@@ -302,15 +307,12 @@ declare const UXInput: React.ForwardRefExoticComponent<Omit<Omit<{
302
307
  isDisabled?: boolean | undefined;
303
308
  pattern?: string | undefined;
304
309
  as?: import("@heroui/system-rsc").As<any> | undefined;
305
- key?: React.Key | null | undefined;
306
310
  onFocusChange?: ((isFocused: boolean) => void) | undefined;
307
- type?: string | undefined;
308
311
  formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
309
312
  formEncType?: string | undefined;
310
313
  formMethod?: string | undefined;
311
314
  formNoValidate?: boolean | undefined;
312
315
  formTarget?: string | undefined;
313
- name?: string | undefined;
314
316
  excludeFromTabOrder?: boolean | undefined;
315
317
  startContent?: React.ReactNode;
316
318
  endContent?: React.ReactNode;
@@ -324,8 +326,6 @@ declare const UXInput: React.ForwardRefExoticComponent<Omit<Omit<{
324
326
  checked?: boolean | undefined;
325
327
  src?: string | undefined;
326
328
  classNames?: import("@heroui/theme").SlotsToClasses<"label" | "inputWrapper" | "base" | "input" | "description" | "errorMessage" | "mainWrapper" | "innerWrapper" | "clearButton" | "helperWrapper"> | undefined;
327
- max?: string | number | undefined;
328
- min?: string | number | undefined;
329
329
  placeholder?: string | undefined;
330
330
  readOnly?: boolean | undefined;
331
331
  required?: boolean | undefined;
@@ -292,6 +292,11 @@ declare const ExtendedInput: import("react").ForwardRefExoticComponent<Omit<{
292
292
  multiple?: boolean | undefined;
293
293
  disabled?: boolean | undefined;
294
294
  variant?: "flat" | "bordered" | "faded" | "underlined" | undefined;
295
+ max?: string | number | undefined;
296
+ min?: string | number | undefined;
297
+ name?: string | undefined;
298
+ type?: string | undefined;
299
+ key?: import("react").Key | null | undefined;
295
300
  labelPlacement?: "inside" | "outside" | "outside-left" | "outside-top" | undefined;
296
301
  label?: import("react").ReactNode;
297
302
  isInvalid?: boolean | undefined;
@@ -299,15 +304,12 @@ declare const ExtendedInput: import("react").ForwardRefExoticComponent<Omit<{
299
304
  isDisabled?: boolean | undefined;
300
305
  pattern?: string | undefined;
301
306
  as?: import("@heroui/system-rsc").As<any> | undefined;
302
- key?: import("react").Key | null | undefined;
303
307
  onFocusChange?: ((isFocused: boolean) => void) | undefined;
304
- type?: string | undefined;
305
308
  formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
306
309
  formEncType?: string | undefined;
307
310
  formMethod?: string | undefined;
308
311
  formNoValidate?: boolean | undefined;
309
312
  formTarget?: string | undefined;
310
- name?: string | undefined;
311
313
  excludeFromTabOrder?: boolean | undefined;
312
314
  startContent?: import("react").ReactNode;
313
315
  endContent?: import("react").ReactNode;
@@ -321,8 +323,6 @@ declare const ExtendedInput: import("react").ForwardRefExoticComponent<Omit<{
321
323
  checked?: boolean | undefined;
322
324
  src?: string | undefined;
323
325
  classNames?: import("@heroui/theme").SlotsToClasses<"label" | "inputWrapper" | "base" | "input" | "description" | "errorMessage" | "mainWrapper" | "innerWrapper" | "clearButton" | "helperWrapper"> | undefined;
324
- max?: string | number | undefined;
325
- min?: string | number | undefined;
326
326
  placeholder?: string | undefined;
327
327
  readOnly?: boolean | undefined;
328
328
  required?: boolean | undefined;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface SpinnerIconProps extends React.SVGProps<SVGSVGElement> {
3
+ currentIndex: number;
4
+ }
5
+ export declare const SpinnerIcon: React.FC<SpinnerIconProps>;
6
+ export {};
@@ -0,0 +1,36 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import "react";
3
+ import { pathsData } from "./pathData.js";
4
+ const SpinnerIcon = ({ currentIndex, ...props })=>{
5
+ const opacityValues = [
6
+ 1,
7
+ 0.9,
8
+ 0.85,
9
+ 0.8,
10
+ 0.75,
11
+ 0.7,
12
+ 0.65,
13
+ 0.6,
14
+ 0.5,
15
+ 0.4,
16
+ 0.3,
17
+ 0.2
18
+ ];
19
+ const getOpacity = (index)=>{
20
+ const distance = (currentIndex - index + 12) % 12;
21
+ return opacityValues[distance];
22
+ };
23
+ return /*#__PURE__*/ jsx("svg", {
24
+ width: 18,
25
+ height: 18,
26
+ viewBox: "0 0 18 18",
27
+ fill: "none",
28
+ ...props,
29
+ children: pathsData.map((pathInfo, index)=>/*#__PURE__*/ jsx("path", {
30
+ d: pathInfo.d,
31
+ fill: "currentColor",
32
+ opacity: getOpacity(index)
33
+ }, index))
34
+ });
35
+ };
36
+ export { SpinnerIcon };
@@ -0,0 +1 @@
1
+ export * from './spinner';
@@ -0,0 +1 @@
1
+ export * from "./spinner.js";
@@ -0,0 +1,4 @@
1
+ export declare const pathsData: {
2
+ d: string;
3
+ opacity: number;
4
+ }[];
@@ -0,0 +1,51 @@
1
+ const pathsData = [
2
+ {
3
+ d: 'M9.00027 1.08008C9.19123 1.08008 9.37436 1.15594 9.50939 1.29096C9.64442 1.42599 9.72027 1.60912 9.72027 1.80008V3.96008C9.72027 4.15103 9.64442 4.33417 9.50939 4.46919C9.37436 4.60422 9.19123 4.68008 9.00027 4.68008C8.80932 4.68008 8.62618 4.60422 8.49116 4.46919C8.35613 4.33417 8.28027 4.15103 8.28027 3.96008V1.80008C8.28027 1.60912 8.35613 1.42599 8.49116 1.29096C8.62618 1.15594 8.80932 1.08008 9.00027 1.08008Z',
4
+ opacity: 1
5
+ },
6
+ {
7
+ d: 'M12.9593 2.14138C13.1246 2.23686 13.2453 2.39412 13.2947 2.57857C13.3441 2.76301 13.3183 2.95953 13.2228 3.1249L12.1428 4.99582C12.0959 5.07837 12.0331 5.15081 11.958 5.20899C11.883 5.26717 11.7972 5.30993 11.7055 5.3348C11.6139 5.35968 11.5182 5.36619 11.4241 5.35395C11.3299 5.34171 11.2391 5.31097 11.1569 5.26349C11.0746 5.21601 11.0026 5.15274 10.9449 5.07731C10.8873 5.00188 10.8451 4.91579 10.8208 4.82399C10.7965 4.73219 10.7906 4.6365 10.8035 4.54242C10.8164 4.44834 10.8477 4.35774 10.8957 4.27582L11.9757 2.4049C12.0712 2.23954 12.2285 2.11887 12.4129 2.06945C12.5974 2.02004 12.7939 2.04591 12.9593 2.14138Z',
8
+ opacity: 0.9
9
+ },
10
+ {
11
+ d: 'M15.8587 5.03967C15.9542 5.20504 15.9801 5.40156 15.9307 5.586C15.8813 5.77045 15.7606 5.92771 15.5952 6.02319L13.7243 7.10319C13.559 7.19716 13.3633 7.22194 13.1798 7.17213C12.9963 7.12231 12.84 7.00194 12.7449 6.83729C12.6498 6.67263 12.6238 6.47706 12.6724 6.29325C12.721 6.10943 12.8403 5.9523 13.0043 5.85615L14.8752 4.77615C15.0406 4.68067 15.2371 4.6548 15.4216 4.70422C15.606 4.75364 15.7633 4.8743 15.8587 5.03967Z',
12
+ opacity: 0.85
13
+ },
14
+ {
15
+ d: 'M16.9203 8.9993C16.9203 9.09385 16.9017 9.18747 16.8655 9.27483C16.8293 9.36218 16.7763 9.44156 16.7094 9.50841C16.6426 9.57527 16.5632 9.62831 16.4758 9.66449C16.3885 9.70067 16.2949 9.7193 16.2003 9.7193H14.0403C13.8494 9.7193 13.6662 9.64344 13.5312 9.50841C13.3962 9.37339 13.3203 9.19025 13.3203 8.9993C13.3203 8.80834 13.3962 8.62521 13.5312 8.49018C13.6662 8.35515 13.8494 8.2793 14.0403 8.2793H16.2003C16.2949 8.2793 16.3885 8.29792 16.4758 8.3341C16.5632 8.37029 16.6426 8.42332 16.7094 8.49018C16.7763 8.55704 16.8293 8.63641 16.8655 8.72376C16.9017 8.81112 16.9203 8.90474 16.9203 8.9993Z',
16
+ opacity: 0.8
17
+ },
18
+ {
19
+ d: 'M15.8592 12.9612C15.7637 13.1266 15.6065 13.2472 15.422 13.2967C15.2376 13.3461 15.041 13.3202 14.8757 13.2247L13.0048 12.1447C12.9222 12.0978 12.8498 12.035 12.7916 11.96C12.7334 11.8849 12.6907 11.7991 12.6658 11.7075C12.6409 11.6158 12.6344 11.5202 12.6466 11.426C12.6589 11.3319 12.6896 11.2411 12.7371 11.1588C12.7846 11.0766 12.8478 11.0046 12.9233 10.9469C12.9987 10.8892 13.0848 10.847 13.1766 10.8227C13.2684 10.7985 13.3641 10.7926 13.4582 10.8055C13.5522 10.8183 13.6428 10.8497 13.7248 10.8977L15.5957 11.9777C15.761 12.0732 15.8817 12.2304 15.9311 12.4149C15.9805 12.5993 15.9547 12.7958 15.8592 12.9612Z',
20
+ opacity: 0.75
21
+ },
22
+ {
23
+ d: 'M12.9603 15.8587C12.795 15.9542 12.5985 15.9801 12.414 15.9307C12.2296 15.8813 12.0723 15.7606 11.9768 15.5952L10.8968 13.7243C10.8029 13.559 10.7781 13.3633 10.8279 13.1798C10.8777 12.9963 10.9981 12.84 11.1627 12.7449C11.3274 12.6498 11.523 12.6238 11.7068 12.6724C11.8906 12.721 12.0477 12.8403 12.1439 13.0043L13.2239 14.8752C13.3193 15.0406 13.3452 15.2371 13.2958 15.4216C13.2464 15.606 13.1257 15.7633 12.9603 15.8587Z',
24
+ opacity: 0.7
25
+ },
26
+ {
27
+ d: 'M9.00027 16.9203C8.90572 16.9203 8.8121 16.9017 8.72474 16.8655C8.63739 16.8293 8.55801 16.7763 8.49116 16.7094C8.4243 16.6426 8.37126 16.5632 8.33508 16.4758C8.2989 16.3885 8.28027 16.2949 8.28027 16.2003V14.0403C8.28027 13.8494 8.35613 13.6662 8.49116 13.5312C8.62618 13.3962 8.80932 13.3203 9.00027 13.3203C9.19123 13.3203 9.37436 13.3962 9.50939 13.5312C9.64442 13.6662 9.72027 13.8494 9.72027 14.0403V16.2003C9.72027 16.2949 9.70165 16.3885 9.66547 16.4758C9.62928 16.5632 9.57625 16.6426 9.50939 16.7094C9.44253 16.7763 9.36316 16.8293 9.27581 16.8655C9.18845 16.9017 9.09483 16.9203 9.00027 16.9203Z',
28
+ opacity: 0.65
29
+ },
30
+ {
31
+ d: 'M5.03967 15.8592C4.8743 15.7637 4.75364 15.6065 4.70422 15.422C4.6548 15.2376 4.68067 15.041 4.77615 14.8757L5.85615 13.0048C5.90308 12.9222 5.96587 12.8498 6.04092 12.7916C6.11596 12.7334 6.20177 12.6907 6.29341 12.6658C6.38505 12.6409 6.4807 12.6344 6.57486 12.6466C6.66902 12.6589 6.75983 12.6896 6.84206 12.7371C6.9243 12.7846 6.99632 12.8478 7.054 12.9233C7.11168 12.9987 7.15387 13.0848 7.17814 13.1766C7.20241 13.2684 7.20828 13.3641 7.19542 13.4582C7.18256 13.5522 7.15121 13.6428 7.10319 13.7248L6.02319 15.5957C5.92771 15.761 5.77045 15.8817 5.586 15.9311C5.40156 15.9805 5.20504 15.9547 5.03967 15.8592Z',
32
+ opacity: 0.6
33
+ },
34
+ {
35
+ d: 'M2.14041 12.9584C2.04493 12.793 2.01906 12.5965 2.06848 12.4121C2.1179 12.2276 2.23856 12.0704 2.40393 11.9749L4.27485 10.8949C4.44013 10.8009 4.63587 10.7761 4.81936 10.8259C5.00284 10.8758 5.15918 10.9961 5.25424 11.1608C5.34931 11.3254 5.37539 11.521 5.32679 11.7048C5.2782 11.8886 5.15887 12.0458 4.99485 12.1419L3.12393 13.2219C2.95856 13.3174 2.76203 13.3433 2.57759 13.2938C2.39315 13.2444 2.23589 13.1238 2.14041 12.9584Z',
36
+ opacity: 0.5
37
+ },
38
+ {
39
+ d: 'M1.08017 8.9993C1.08017 8.80834 1.15603 8.62521 1.29105 8.49018C1.42608 8.35515 1.60921 8.2793 1.80017 8.2793H3.96017C4.15113 8.2793 4.33426 8.35515 4.46929 8.49018C4.60431 8.62521 4.68017 8.80834 4.68017 8.9993C4.68017 9.19025 4.60431 9.37339 4.46929 9.50841C4.33426 9.64344 4.15113 9.7193 3.96017 9.7193H1.80017C1.60921 9.7193 1.42608 9.64344 1.29105 9.50841C1.15603 9.37339 1.08017 9.19025 1.08017 8.9993Z',
40
+ opacity: 0.4
41
+ },
42
+ {
43
+ d: 'M2.14041 5.03967C2.23589 4.8743 2.39315 4.75364 2.57759 4.70422C2.76203 4.6548 2.95856 4.68067 3.12393 4.77615L4.99485 5.85615C5.07739 5.90308 5.14984 5.96587 5.20801 6.04092C5.26619 6.11596 5.30895 6.20177 5.33383 6.29341C5.35871 6.38505 5.36521 6.4807 5.35298 6.57486C5.34074 6.66902 5.30999 6.75983 5.26252 6.84206C5.21504 6.9243 5.15176 6.99632 5.07633 7.054C5.00091 7.11168 4.91481 7.15387 4.82301 7.17814C4.73122 7.20241 4.63552 7.20828 4.54144 7.19542C4.44736 7.18256 4.35676 7.15121 4.27485 7.10319L2.40393 6.02319C2.23856 5.92771 2.1179 5.77045 2.06848 5.586C2.01906 5.40156 2.04493 5.20504 2.14041 5.03967Z',
44
+ opacity: 0.3
45
+ },
46
+ {
47
+ d: 'M5.03967 2.14138C5.20504 2.04591 5.40156 2.02004 5.586 2.06945C5.77045 2.11887 5.92771 2.23954 6.02319 2.4049L7.10319 4.27582C7.19716 4.4411 7.22194 4.63685 7.17213 4.82033C7.12231 5.00382 7.00194 5.16015 6.83729 5.25522C6.67263 5.35029 6.47706 5.37637 6.29325 5.32777C6.10943 5.27917 5.9523 5.15984 5.85615 4.99582L4.77615 3.1249C4.68067 2.95953 4.6548 2.76301 4.70422 2.57857C4.75364 2.39412 4.8743 2.23686 5.03967 2.14138Z',
48
+ opacity: 0.2
49
+ }
50
+ ];
51
+ export { pathsData };
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { type UXForegroundColor } from '@particle-network/ui-shared';
3
+ import { type SquareProps } from '../layout/Square';
4
+ export interface UXSpinnerProps extends SquareProps {
5
+ /**
6
+ * 颜色
7
+ */
8
+ color?: UXForegroundColor | 'currentColor';
9
+ /**
10
+ * 动画持续时间(毫秒)
11
+ * @default 1000
12
+ */
13
+ duration?: number;
14
+ }
15
+ export declare const UXSpinner: React.FC<UXSpinnerProps>;
@@ -0,0 +1,39 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from "react";
3
+ import { cn } from "@heroui/theme";
4
+ import { getHexColorFromCSSVariable } from "@particle-network/ui-shared";
5
+ import Square from "../layout/Square.js";
6
+ import { SpinnerIcon } from "./SpinnerIcon.js";
7
+ const UXSpinner = ({ size = 18, color = 'primary', duration = 1000, className, style, ...restProps })=>{
8
+ const [currentIndex, setCurrentIndex] = useState(0);
9
+ const animationRef = useRef(null);
10
+ const actualColor = 'currentColor' === color ? 'currentColor' : getHexColorFromCSSVariable(color);
11
+ useEffect(()=>{
12
+ const stepDuration = duration / 12;
13
+ const animate = ()=>{
14
+ setCurrentIndex((prevIndex)=>(prevIndex + 1) % 12);
15
+ animationRef.current = setTimeout(animate, stepDuration);
16
+ };
17
+ animationRef.current = setTimeout(animate, stepDuration);
18
+ return ()=>{
19
+ if (animationRef.current) clearTimeout(animationRef.current);
20
+ };
21
+ }, [
22
+ duration
23
+ ]);
24
+ return /*#__PURE__*/ jsx(Square, {
25
+ size: size,
26
+ className: cn('inline-flex', className),
27
+ style: style,
28
+ ...restProps,
29
+ children: /*#__PURE__*/ jsx(SpinnerIcon, {
30
+ width: size,
31
+ height: size,
32
+ style: {
33
+ color: actualColor
34
+ },
35
+ currentIndex: currentIndex
36
+ })
37
+ });
38
+ };
39
+ export { UXSpinner };
@@ -292,20 +292,22 @@ declare const UXSwitch: React.ForwardRefExoticComponent<Omit<Omit<{
292
292
  height?: string | number | undefined;
293
293
  multiple?: boolean | undefined;
294
294
  disabled?: boolean | undefined;
295
+ max?: string | number | undefined;
296
+ min?: string | number | undefined;
297
+ name?: string | undefined;
298
+ type?: React.HTMLInputTypeAttribute | undefined;
299
+ key?: React.Key | null | undefined;
295
300
  disableAnimation?: boolean | undefined;
296
301
  isDisabled?: boolean | undefined;
297
302
  isSelected?: boolean | undefined;
298
303
  pattern?: string | undefined;
299
304
  as?: import("@heroui/system-rsc").As<any> | undefined;
300
- key?: React.Key | null | undefined;
301
305
  onFocusChange?: ((isFocused: boolean) => void) | undefined;
302
- type?: React.HTMLInputTypeAttribute | undefined;
303
306
  formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
304
307
  formEncType?: string | undefined;
305
308
  formMethod?: string | undefined;
306
309
  formNoValidate?: boolean | undefined;
307
310
  formTarget?: string | undefined;
308
- name?: string | undefined;
309
311
  excludeFromTabOrder?: boolean | undefined;
310
312
  startContent?: React.ReactNode;
311
313
  endContent?: React.ReactNode;
@@ -318,8 +320,6 @@ declare const UXSwitch: React.ForwardRefExoticComponent<Omit<Omit<{
318
320
  checked?: boolean | undefined;
319
321
  src?: string | undefined;
320
322
  classNames?: import("@heroui/theme").SlotsToClasses<"label" | "base" | "startContent" | "endContent" | "wrapper" | "hiddenInput" | "thumb" | "thumbIcon"> | undefined;
321
- max?: string | number | undefined;
322
- min?: string | number | undefined;
323
323
  placeholder?: string | undefined;
324
324
  readOnly?: boolean | undefined;
325
325
  required?: boolean | undefined;
@@ -289,20 +289,22 @@ declare const ExtendedSwitch: import("react").ForwardRefExoticComponent<Omit<{
289
289
  height?: string | number | undefined;
290
290
  multiple?: boolean | undefined;
291
291
  disabled?: boolean | undefined;
292
+ max?: string | number | undefined;
293
+ min?: string | number | undefined;
294
+ name?: string | undefined;
295
+ type?: import("react").HTMLInputTypeAttribute | undefined;
296
+ key?: import("react").Key | null | undefined;
292
297
  disableAnimation?: boolean | undefined;
293
298
  isDisabled?: boolean | undefined;
294
299
  isSelected?: boolean | undefined;
295
300
  pattern?: string | undefined;
296
301
  as?: import("@heroui/system-rsc").As<any> | undefined;
297
- key?: import("react").Key | null | undefined;
298
302
  onFocusChange?: ((isFocused: boolean) => void) | undefined;
299
- type?: import("react").HTMLInputTypeAttribute | undefined;
300
303
  formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
301
304
  formEncType?: string | undefined;
302
305
  formMethod?: string | undefined;
303
306
  formNoValidate?: boolean | undefined;
304
307
  formTarget?: string | undefined;
305
- name?: string | undefined;
306
308
  excludeFromTabOrder?: boolean | undefined;
307
309
  startContent?: import("react").ReactNode;
308
310
  endContent?: import("react").ReactNode;
@@ -315,8 +317,6 @@ declare const ExtendedSwitch: import("react").ForwardRefExoticComponent<Omit<{
315
317
  checked?: boolean | undefined;
316
318
  src?: string | undefined;
317
319
  classNames?: import("@heroui/theme").SlotsToClasses<"label" | "base" | "startContent" | "endContent" | "wrapper" | "hiddenInput" | "thumb" | "thumbIcon"> | undefined;
318
- max?: string | number | undefined;
319
- min?: string | number | undefined;
320
320
  placeholder?: string | undefined;
321
321
  readOnly?: boolean | undefined;
322
322
  required?: boolean | undefined;
@@ -282,17 +282,17 @@ declare const ExtendedTooltip: import("react").ForwardRefExoticComponent<Omit<{
282
282
  onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
283
283
  size?: "sm" | "md" | "lg" | undefined;
284
284
  radius?: "sm" | "md" | "lg" | "none" | "full" | undefined;
285
+ offset?: number | undefined;
286
+ key?: import("react").Key | null | undefined;
285
287
  disableAnimation?: boolean | undefined;
286
288
  isDisabled?: boolean | undefined;
287
289
  shadow?: "sm" | "md" | "lg" | "none" | undefined;
288
290
  as?: import("@heroui/system-rsc").As<any> | undefined;
289
- key?: import("react").Key | null | undefined;
290
291
  onClose?: ((() => void) & (() => void)) | undefined;
291
292
  classNames?: import("@heroui/theme").SlotsToClasses<"content" | "base" | "arrow"> | undefined;
292
293
  placement?: import("@heroui/aria-utils").OverlayPlacement | undefined;
293
294
  isOpen?: boolean | undefined;
294
295
  containerPadding?: number | undefined;
295
- offset?: number | undefined;
296
296
  crossOffset?: number | undefined;
297
297
  shouldFlip?: boolean | undefined;
298
298
  isKeyboardDismissDisabled?: boolean | undefined;
@@ -36,6 +36,7 @@ export { default as UXRadio } from './UXRadio';
36
36
  export * from './UXRadio';
37
37
  export { default as UXSelect } from './UXSelect';
38
38
  export * from './UXSelect';
39
+ export * from './UXSpinner';
39
40
  export type { UXSwitchProps } from './UXSwitch';
40
41
  export { default as UXSwitch } from './UXSwitch';
41
42
  export { default as UXTabs } from './UXTabs';
@@ -27,5 +27,6 @@ export * from "./UXNumberInput/index.js";
27
27
  export * from "./UXPopover/index.js";
28
28
  export * from "./UXRadio/index.js";
29
29
  export * from "./UXSelect/index.js";
30
+ export * from "./UXSpinner/index.js";
30
31
  export * from "./UXTabs/index.js";
31
32
  export { Center, Circle, Flex, HStack, ProgressWrapper, Square, Text, UXCheckbox, UXChip, UXDivider, UXHint, UXInput, UXModal, UXNumberInput, UXPopover, UXRadio, UXSelect, UXSwitch, UXTabs, UXTooltip, VStack };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-network/ui-react",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -14,30 +14,30 @@
14
14
  "dist",
15
15
  "tailwind-preset.js"
16
16
  ],
17
- "scripts": {
18
- "build": "rslib build",
19
- "dev": "rslib build --watch",
20
- "type-check": "npx tsc --noEmit -p ./tsconfig.json",
21
- "lint": "eslint . --no-error-on-unmatched-pattern --quiet",
22
- "lint:fix": "eslint . --fix --no-error-on-unmatched-pattern --quiet",
23
- "clean": "rm -rf .turbo node_modules dist"
24
- },
25
17
  "devDependencies": {
26
18
  "@heroui/react": "^2.8.2",
27
- "@particle-network/eslint-config": "*",
28
19
  "@rsbuild/plugin-react": "^1.3.5",
29
20
  "@rslib/core": "^0.12.3",
30
- "@types/react": "^19.0.0",
31
- "react": "^19.0.0",
32
- "typescript": "^5.8.3"
21
+ "@types/react": "^19.1.10",
22
+ "react": "^19.1.0",
23
+ "typescript": "^5.8.3",
24
+ "@particle-network/eslint-config": "0.0.4"
33
25
  },
34
26
  "peerDependencies": {
35
27
  "react": ">=16.9.0",
36
28
  "react-dom": ">=16.9.0"
37
29
  },
38
30
  "dependencies": {
39
- "@particle-network/icons": "*",
40
- "@particle-network/ui-shared": "*",
41
- "ahooks": "^3.9.4"
31
+ "ahooks": "^3.9.4",
32
+ "@particle-network/icons": "0.0.15",
33
+ "@particle-network/ui-shared": "0.0.7"
34
+ },
35
+ "scripts": {
36
+ "build": "rslib build",
37
+ "dev": "rslib build --watch",
38
+ "type-check": "npx tsc --noEmit -p ./tsconfig.json",
39
+ "lint": "eslint . --no-error-on-unmatched-pattern --quiet",
40
+ "lint:fix": "eslint . --fix --no-error-on-unmatched-pattern --quiet",
41
+ "clean": "rm -rf .turbo node_modules dist"
42
42
  }
43
- }
43
+ }