@particle-network/ui-react 0.5.1-beta.5 → 0.5.1-beta.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.
- package/dist/components/ProgressWrapper/index.d.ts +2 -2
- package/dist/components/UXButton/button.js +1 -1
- package/dist/components/UXInput/index.d.ts +4 -4
- package/dist/components/UXInput/input.extend.d.ts +4 -4
- package/dist/components/UXSpinner/spinner.d.ts +1 -5
- package/dist/components/UXSpinner/spinner.js +2 -3
- package/dist/components/UXSwitch/index.d.ts +2 -2
- package/dist/components/UXSwitch/switch.extend.d.ts +2 -2
- package/dist/components/UXTable/index.d.ts +2 -2
- package/dist/components/UXTable/table.extend.d.ts +2 -2
- package/dist/components/layout/Box/box-theme.d.ts +1808 -0
- package/dist/components/layout/Box/box-theme.js +328 -0
- package/dist/components/layout/Box/box.d.ts +14 -0
- package/dist/components/layout/Box/box.js +90 -0
- package/dist/components/layout/Circle.js +2 -3
- package/dist/components/layout/Flex.d.ts +3 -27
- package/dist/components/layout/Flex.js +6 -19
- package/dist/components/layout/HStack.d.ts +1 -1
- package/dist/components/layout/Square.js +5 -3
- package/dist/components/layout/VStack.d.ts +1 -1
- package/dist/components/layout/VStack.js +2 -2
- package/dist/components/layout/index.d.ts +1 -0
- package/dist/components/layout/index.js +1 -0
- package/dist/components/typography/Text.js +21 -6
- package/dist/components/typography/Text.type.d.ts +3 -26
- package/dist/components/typography/Text.type.js +0 -46
- package/dist/components/typography/text-theme.d.ts +178 -0
- package/dist/components/typography/text-theme.js +79 -0
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type HexColor, type
|
|
2
|
+
import { type HexColor, type UXComponentColor, type UXRadius } from '@particle-network/ui-shared';
|
|
3
3
|
export interface ProgressWrapperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/**
|
|
5
5
|
* 进度 (%)
|
|
@@ -24,7 +24,7 @@ export interface ProgressWrapperProps extends React.HTMLAttributes<HTMLDivElemen
|
|
|
24
24
|
/**
|
|
25
25
|
* 进度条颜色
|
|
26
26
|
*/
|
|
27
|
-
color?:
|
|
27
|
+
color?: UXComponentColor | 'transparent' | HexColor;
|
|
28
28
|
/**
|
|
29
29
|
* 进度条 SVG 样式
|
|
30
30
|
*/
|
|
@@ -5,7 +5,7 @@ import { UXSpinner } from "../UXSpinner/index.js";
|
|
|
5
5
|
import { useButton } from "./use-button.js";
|
|
6
6
|
const Button = forwardRef((props, ref)=>{
|
|
7
7
|
const { Component, domRef, children, spinnerSize, spinner = /*#__PURE__*/ jsx(UXSpinner, {
|
|
8
|
-
color: "
|
|
8
|
+
color: "current",
|
|
9
9
|
size: spinnerSize
|
|
10
10
|
}), spinnerPlacement, startContent, endContent, isLoading, disableRipple, getButtonProps, getRippleProps, isIconOnly } = useButton({
|
|
11
11
|
...props,
|
|
@@ -7,9 +7,9 @@ export declare const UXInput: React.ForwardRefExoticComponent<(Omit<Omit<import(
|
|
|
7
7
|
variant?: "flat" | "bordered" | undefined;
|
|
8
8
|
textAlign?: "center" | "left" | "right" | undefined;
|
|
9
9
|
isColorText?: boolean | undefined;
|
|
10
|
-
color?: "
|
|
10
|
+
color?: "secondary" | "primary" | "success" | "warning" | "danger" | "bullish" | "bearish" | "default" | undefined;
|
|
11
11
|
size?: "sm" | "md" | "lg" | undefined;
|
|
12
|
-
radius?: "
|
|
12
|
+
radius?: "full" | "sm" | "md" | "lg" | "none" | undefined;
|
|
13
13
|
labelPlacement?: "inside" | undefined;
|
|
14
14
|
fullWidth?: boolean | undefined;
|
|
15
15
|
isClearable?: boolean | undefined;
|
|
@@ -23,9 +23,9 @@ export declare const UXInput: React.ForwardRefExoticComponent<(Omit<Omit<import(
|
|
|
23
23
|
variant?: "flat" | "bordered" | undefined;
|
|
24
24
|
textAlign?: "center" | "left" | "right" | undefined;
|
|
25
25
|
isColorText?: boolean | undefined;
|
|
26
|
-
color?: "
|
|
26
|
+
color?: "secondary" | "primary" | "success" | "warning" | "danger" | "bullish" | "bearish" | "default" | undefined;
|
|
27
27
|
size?: "sm" | "md" | "lg" | undefined;
|
|
28
|
-
radius?: "
|
|
28
|
+
radius?: "full" | "sm" | "md" | "lg" | "none" | undefined;
|
|
29
29
|
labelPlacement?: "inside" | undefined;
|
|
30
30
|
fullWidth?: boolean | undefined;
|
|
31
31
|
isClearable?: boolean | undefined;
|
|
@@ -4,9 +4,9 @@ declare const ExtendedInput: import("react").ForwardRefExoticComponent<(Omit<imp
|
|
|
4
4
|
variant?: "flat" | "bordered" | undefined;
|
|
5
5
|
textAlign?: "center" | "left" | "right" | undefined;
|
|
6
6
|
isColorText?: boolean | undefined;
|
|
7
|
-
color?: "
|
|
7
|
+
color?: "secondary" | "primary" | "success" | "warning" | "danger" | "bullish" | "bearish" | "default" | undefined;
|
|
8
8
|
size?: "sm" | "md" | "lg" | undefined;
|
|
9
|
-
radius?: "
|
|
9
|
+
radius?: "full" | "sm" | "md" | "lg" | "none" | undefined;
|
|
10
10
|
labelPlacement?: "inside" | undefined;
|
|
11
11
|
fullWidth?: boolean | undefined;
|
|
12
12
|
isClearable?: boolean | undefined;
|
|
@@ -20,9 +20,9 @@ declare const ExtendedInput: import("react").ForwardRefExoticComponent<(Omit<imp
|
|
|
20
20
|
variant?: "flat" | "bordered" | undefined;
|
|
21
21
|
textAlign?: "center" | "left" | "right" | undefined;
|
|
22
22
|
isColorText?: boolean | undefined;
|
|
23
|
-
color?: "
|
|
23
|
+
color?: "secondary" | "primary" | "success" | "warning" | "danger" | "bullish" | "bearish" | "default" | undefined;
|
|
24
24
|
size?: "sm" | "md" | "lg" | undefined;
|
|
25
|
-
radius?: "
|
|
25
|
+
radius?: "full" | "sm" | "md" | "lg" | "none" | undefined;
|
|
26
26
|
labelPlacement?: "inside" | undefined;
|
|
27
27
|
fullWidth?: boolean | undefined;
|
|
28
28
|
isClearable?: boolean | undefined;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type UXForegroundColor } from '@particle-network/ui-shared';
|
|
3
2
|
import { type SquareProps } from '../layout';
|
|
4
3
|
export interface UXSpinnerProps extends SquareProps {
|
|
5
|
-
/**
|
|
6
|
-
* 颜色
|
|
7
|
-
*/
|
|
8
|
-
color?: UXForegroundColor | 'currentColor';
|
|
9
4
|
/**
|
|
10
5
|
* 动画持续时间(毫秒)
|
|
11
6
|
* @default 400
|
|
12
7
|
*/
|
|
13
8
|
duration?: number;
|
|
9
|
+
iconClassName?: string;
|
|
14
10
|
}
|
|
15
11
|
export declare const UXSpinner: React.FC<UXSpinnerProps>;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useState } from "react";
|
|
3
3
|
import { cn } from "@heroui/theme";
|
|
4
|
-
import { colorToClassName } from "@particle-network/ui-shared";
|
|
5
4
|
import { Square } from "../layout/index.js";
|
|
6
5
|
import { SpinnerIcon } from "./SpinnerIcon.js";
|
|
7
|
-
const UXSpinner = ({ size = 18,
|
|
6
|
+
const UXSpinner = ({ size = 18, duration = 400, className, iconClassName, style, ...restProps })=>{
|
|
8
7
|
const [currentIndex, setCurrentIndex] = useState(0);
|
|
9
8
|
const animationRef = useRef(null);
|
|
10
|
-
const iconClassName = 'currentColor' === color ? void 0 : colorToClassName[color];
|
|
11
9
|
useEffect(()=>{
|
|
12
10
|
const stepDuration = duration / 12;
|
|
13
11
|
const animate = ()=>{
|
|
@@ -23,6 +21,7 @@ const UXSpinner = ({ size = 18, color = 'primary', duration = 400, className, st
|
|
|
23
21
|
]);
|
|
24
22
|
return /*#__PURE__*/ jsx(Square, {
|
|
25
23
|
size: size,
|
|
24
|
+
color: "primary",
|
|
26
25
|
className: cn('inline-flex', className),
|
|
27
26
|
style: style,
|
|
28
27
|
...restProps,
|
|
@@ -4,14 +4,14 @@ export type UXSwitchProps = React.ComponentPropsWithRef<typeof ExtendedSwitch>;
|
|
|
4
4
|
export declare const UXSwitch: React.ForwardRefExoticComponent<(Omit<Omit<import("@heroui/system-rsc").OmitCommonProps<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, keyof import("@heroui/switch").SwitchProps> & import("@heroui/switch").SwitchProps & {
|
|
5
5
|
as?: import("@heroui/system-rsc").As<any> | undefined;
|
|
6
6
|
} & {
|
|
7
|
-
color?: "
|
|
7
|
+
color?: "primary" | "success" | "warning" | "danger" | "bullish" | "bearish" | "contrast" | undefined;
|
|
8
8
|
size?: "sm" | "md" | "lg" | undefined;
|
|
9
9
|
isDisabled?: boolean | undefined;
|
|
10
10
|
disableAnimation?: boolean | undefined;
|
|
11
11
|
}, "ref"> & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<import("@heroui/system-rsc").OmitCommonProps<Omit<Omit<any, "ref">, never>, keyof import("@heroui/switch").SwitchProps> & import("@heroui/switch").SwitchProps & {
|
|
12
12
|
as?: import("@heroui/system-rsc").As<any> | undefined;
|
|
13
13
|
} & {
|
|
14
|
-
color?: "
|
|
14
|
+
color?: "primary" | "success" | "warning" | "danger" | "bullish" | "bearish" | "contrast" | undefined;
|
|
15
15
|
size?: "sm" | "md" | "lg" | undefined;
|
|
16
16
|
isDisabled?: boolean | undefined;
|
|
17
17
|
disableAnimation?: boolean | undefined;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
declare const ExtendedSwitch: import("react").ForwardRefExoticComponent<(Omit<import("@heroui/system-rsc").OmitCommonProps<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, keyof import("@heroui/switch").SwitchProps> & import("@heroui/switch").SwitchProps & {
|
|
2
2
|
as?: import("@heroui/system-rsc").As<any> | undefined;
|
|
3
3
|
} & {
|
|
4
|
-
color?: "
|
|
4
|
+
color?: "primary" | "success" | "warning" | "danger" | "bullish" | "bearish" | "contrast" | undefined;
|
|
5
5
|
size?: "sm" | "md" | "lg" | undefined;
|
|
6
6
|
isDisabled?: boolean | undefined;
|
|
7
7
|
disableAnimation?: boolean | undefined;
|
|
8
8
|
}, "ref"> | Omit<import("@heroui/system-rsc").OmitCommonProps<Omit<Omit<any, "ref">, never>, keyof import("@heroui/switch").SwitchProps> & import("@heroui/switch").SwitchProps & {
|
|
9
9
|
as?: import("@heroui/system-rsc").As<any> | undefined;
|
|
10
10
|
} & {
|
|
11
|
-
color?: "
|
|
11
|
+
color?: "primary" | "success" | "warning" | "danger" | "bullish" | "bearish" | "contrast" | undefined;
|
|
12
12
|
size?: "sm" | "md" | "lg" | undefined;
|
|
13
13
|
isDisabled?: boolean | undefined;
|
|
14
14
|
disableAnimation?: boolean | undefined;
|
|
@@ -16,7 +16,7 @@ export declare const UXTable: import("@heroui/system-rsc").InternalForwardRefRen
|
|
|
16
16
|
isSelectable?: boolean | undefined;
|
|
17
17
|
isMultiSelectable?: boolean | undefined;
|
|
18
18
|
fullWidth?: boolean | undefined;
|
|
19
|
-
align?: "
|
|
19
|
+
align?: "center" | "start" | "end" | undefined;
|
|
20
20
|
}, "ref"> | Omit<import("@heroui/system-rsc").OmitCommonProps<Omit<Omit<any, "ref">, never>, keyof import("@heroui/table").TableProps<object>> & import("@heroui/table").TableProps<object> & {
|
|
21
21
|
as?: import("@heroui/system-rsc").As<any> | undefined;
|
|
22
22
|
} & {
|
|
@@ -32,6 +32,6 @@ export declare const UXTable: import("@heroui/system-rsc").InternalForwardRefRen
|
|
|
32
32
|
isSelectable?: boolean | undefined;
|
|
33
33
|
isMultiSelectable?: boolean | undefined;
|
|
34
34
|
fullWidth?: boolean | undefined;
|
|
35
|
-
align?: "
|
|
35
|
+
align?: "center" | "start" | "end" | undefined;
|
|
36
36
|
}, "ref">) & React.RefAttributes<HTMLElement>, never>;
|
|
37
37
|
export { TableBody as UXTableBody, TableCell as UXTableCell, TableColumn as UXTableColumn, TableHeader as UXTableHeader, TableRow as UXTableRow, } from '@heroui/table';
|
|
@@ -13,7 +13,7 @@ declare const ExtendedTable: import("react").ForwardRefExoticComponent<(Omit<imp
|
|
|
13
13
|
isSelectable?: boolean | undefined;
|
|
14
14
|
isMultiSelectable?: boolean | undefined;
|
|
15
15
|
fullWidth?: boolean | undefined;
|
|
16
|
-
align?: "
|
|
16
|
+
align?: "center" | "start" | "end" | undefined;
|
|
17
17
|
}, "ref"> | Omit<import("@heroui/system-rsc").OmitCommonProps<Omit<Omit<any, "ref">, never>, keyof import("@heroui/table").TableProps<object>> & import("@heroui/table").TableProps<object> & {
|
|
18
18
|
as?: import("@heroui/system-rsc").As<any> | undefined;
|
|
19
19
|
} & {
|
|
@@ -29,6 +29,6 @@ declare const ExtendedTable: import("react").ForwardRefExoticComponent<(Omit<imp
|
|
|
29
29
|
isSelectable?: boolean | undefined;
|
|
30
30
|
isMultiSelectable?: boolean | undefined;
|
|
31
31
|
fullWidth?: boolean | undefined;
|
|
32
|
-
align?: "
|
|
32
|
+
align?: "center" | "start" | "end" | undefined;
|
|
33
33
|
}, "ref">) & import("react").RefAttributes<HTMLElement>>;
|
|
34
34
|
export default ExtendedTable;
|