x-ui-design 0.1.83 → 0.1.86
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,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { ButtonProps } from '
|
|
2
|
+
import { ButtonProps } from '@/types/button';
|
|
3
3
|
import './style.css';
|
|
4
4
|
declare const ButtonComponent: ({ type, variant, color, shape, size, htmlType, className, rootClassName, classNames: customClassNames, styles, prefixCls, icon, iconPosition, loading, disabled, ghost, danger, block, children, href, ...restProps }: ButtonProps) => ReactElement;
|
|
5
5
|
export default ButtonComponent;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { CSSProperties, ReactNode, MouseEventHandler, MouseEvent, ReactEventHandler, Key, FC, ComponentClass, FormEvent, ReactElement, FocusEvent, KeyboardEvent, FocusEventHandler, KeyboardEventHandler
|
|
2
|
+
import { CSSProperties, ReactNode, MouseEventHandler, MouseEvent, ReactEventHandler, Key, FC, ComponentClass, FormEvent, ReactElement, FocusEvent, KeyboardEvent, FocusEventHandler, KeyboardEventHandler } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import { ButtonProps } from '@/types/button';
|
|
4
5
|
|
|
5
6
|
type RuleType = any;
|
|
6
7
|
type RuleTypes = RuleType | RuleType[];
|
|
7
|
-
type SizeType
|
|
8
|
+
type SizeType = 'small' | 'middle' | 'large';
|
|
8
9
|
interface DefaultProps {
|
|
9
10
|
prefixCls?: string;
|
|
10
11
|
className?: string;
|
|
@@ -99,7 +100,7 @@ type FormProps = DefaultProps & {
|
|
|
99
100
|
name?: string;
|
|
100
101
|
layout?: FormLayoutTypes;
|
|
101
102
|
form?: FormInstance;
|
|
102
|
-
size?: SizeType
|
|
103
|
+
size?: SizeType;
|
|
103
104
|
initialValues?: Record<string, RuleTypes>;
|
|
104
105
|
children?: ReactNode;
|
|
105
106
|
component?: false | string | FC<ReactNode> | ComponentClass<ReactNode>;
|
|
@@ -194,7 +195,7 @@ type TDatePickerProps = DefaultProps & {
|
|
|
194
195
|
}) => boolean;
|
|
195
196
|
suffixIcon?: ReactNode;
|
|
196
197
|
prefix?: ReactNode;
|
|
197
|
-
size?: SizeType
|
|
198
|
+
size?: SizeType;
|
|
198
199
|
format?: FormatType<RuleType> | FormatType<RuleType>[] | {
|
|
199
200
|
format: string;
|
|
200
201
|
type?: 'mask';
|
|
@@ -308,7 +309,7 @@ declare const Textarea: react.ForwardRefExoticComponent<Omit<react.TextareaHTMLA
|
|
|
308
309
|
count?: react.CSSProperties;
|
|
309
310
|
};
|
|
310
311
|
bordered?: boolean;
|
|
311
|
-
size?: SizeType
|
|
312
|
+
size?: SizeType;
|
|
312
313
|
status?: "success" | "error";
|
|
313
314
|
rootClassName?: string;
|
|
314
315
|
variant?: "outlined" | "borderless" | "filled" | "underlined";
|
|
@@ -319,7 +320,7 @@ declare const Textarea: react.ForwardRefExoticComponent<Omit<react.TextareaHTMLA
|
|
|
319
320
|
declare const InputComponent: react.ForwardRefExoticComponent<Omit<react.InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> & DefaultProps & {
|
|
320
321
|
addonBefore?: react.ReactNode;
|
|
321
322
|
addonAfter?: react.ReactNode;
|
|
322
|
-
size?: SizeType
|
|
323
|
+
size?: SizeType;
|
|
323
324
|
prefix?: react.ReactNode;
|
|
324
325
|
suffix?: react.ReactNode;
|
|
325
326
|
disabled?: boolean;
|
|
@@ -344,7 +345,7 @@ interface RadioGroupProps {
|
|
|
344
345
|
defaultValue?: RuleType;
|
|
345
346
|
value?: RuleType;
|
|
346
347
|
onChange?: (e: SyntheticBaseEvent) => void;
|
|
347
|
-
size?: SizeType
|
|
348
|
+
size?: SizeType;
|
|
348
349
|
disabled?: boolean;
|
|
349
350
|
onMouseEnter?: MouseEventHandler<HTMLDivElement>;
|
|
350
351
|
onMouseLeave?: MouseEventHandler<HTMLDivElement>;
|
|
@@ -392,7 +393,7 @@ type RadioProps = DefaultProps & {
|
|
|
392
393
|
};
|
|
393
394
|
type RadioButtonProps = RadioProps & {
|
|
394
395
|
children?: ReactNode;
|
|
395
|
-
size?: SizeType
|
|
396
|
+
size?: SizeType;
|
|
396
397
|
};
|
|
397
398
|
|
|
398
399
|
declare const Radio: react.ForwardRefExoticComponent<DefaultProps & {
|
|
@@ -552,48 +553,6 @@ type EmptyContentProps = DefaultProps & {
|
|
|
552
553
|
|
|
553
554
|
declare const EmptyContent: ({ icon, style, className, title, description, prefixCls }: EmptyContentProps) => react_jsx_runtime.JSX.Element;
|
|
554
555
|
|
|
555
|
-
declare const ButtonTypes: readonly ["default", "primary", "dashed", "link", "text", "ghost"];
|
|
556
|
-
declare const ButtonShapes: readonly ["default", "circle", "round"];
|
|
557
|
-
declare const ButtonVariantTypes: readonly ["outlined", "dashed", "solid", "filled", "text", "link"];
|
|
558
|
-
declare const ButtonColorTypes: readonly ["default", "primary", "danger", "blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
|
|
559
|
-
type ButtonType = (typeof ButtonTypes)[number];
|
|
560
|
-
type ButtonShape = (typeof ButtonShapes)[number];
|
|
561
|
-
type ButtonVariantType = (typeof ButtonVariantTypes)[number];
|
|
562
|
-
type ButtonColorType = (typeof ButtonColorTypes)[number];
|
|
563
|
-
type SizeType = 'small' | 'middle' | 'large' | undefined;
|
|
564
|
-
type ButtonHTMLType = 'button' | 'submit' | 'reset';
|
|
565
|
-
interface BaseButtonProps {
|
|
566
|
-
type?: ButtonType;
|
|
567
|
-
color?: ButtonColorType;
|
|
568
|
-
variant?: ButtonVariantType;
|
|
569
|
-
icon?: ReactNode;
|
|
570
|
-
iconPosition?: 'start' | 'end';
|
|
571
|
-
shape?: ButtonShape;
|
|
572
|
-
size?: SizeType;
|
|
573
|
-
disabled?: boolean;
|
|
574
|
-
loading?: boolean | {
|
|
575
|
-
delay?: number;
|
|
576
|
-
icon?: ReactNode;
|
|
577
|
-
};
|
|
578
|
-
prefixCls?: string;
|
|
579
|
-
className?: string;
|
|
580
|
-
rootClassName?: string;
|
|
581
|
-
ghost?: boolean;
|
|
582
|
-
danger?: boolean;
|
|
583
|
-
block?: boolean;
|
|
584
|
-
children?: ReactNode;
|
|
585
|
-
classNames?: {
|
|
586
|
-
icon?: string;
|
|
587
|
-
};
|
|
588
|
-
styles?: {
|
|
589
|
-
icon?: CSSProperties;
|
|
590
|
-
};
|
|
591
|
-
}
|
|
592
|
-
interface ButtonProps extends BaseButtonProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'type'> {
|
|
593
|
-
href?: string;
|
|
594
|
-
htmlType?: ButtonHTMLType;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
556
|
declare const ButtonComponent: ({ type, variant, color, shape, size, htmlType, className, rootClassName, classNames: customClassNames, styles, prefixCls, icon, iconPosition, loading, disabled, ghost, danger, block, children, href, ...restProps }: ButtonProps) => ReactElement;
|
|
598
557
|
|
|
599
558
|
interface RcFile extends File {
|