x-ui-design 0.2.63 → 0.2.64
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/esm/types/index.d.ts +2 -1
- package/dist/index.d.ts +10 -50
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/lib/index.ts +2 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './styles/global.css';
|
|
2
|
-
declare const Button: import("react").ComponentType<import("
|
|
2
|
+
declare const Button: import("react").ComponentType<import("@/types/button").ButtonProps>;
|
|
3
3
|
declare const Checkbox: import("react").ComponentType<import("./types").DefaultProps & {
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
onChange?: (e: import("react").MouseEvent<HTMLInputElement> & import("./types").TargetProps) => void;
|
|
@@ -156,3 +156,4 @@ export { ClearIcon, ArrowIcon, LoadingIcon, CheckIcon, SearchIcon, CalendarIcon,
|
|
|
156
156
|
export { useForm } from '@/hooks/useForm';
|
|
157
157
|
export { useWatch } from '@/hooks/useWatch';
|
|
158
158
|
export type { FormInstance } from '@/types/form';
|
|
159
|
+
export type { ButtonProps } from '@/types/button';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { CSSProperties, ReactNode, MouseEventHandler, MouseEvent, ReactEventHandler, Key, FocusEventHandler, KeyboardEventHandler, FocusEvent
|
|
2
|
+
import { CSSProperties, ReactNode, MouseEventHandler, MouseEvent, ReactEventHandler, Key, FocusEventHandler, KeyboardEventHandler, FocusEvent } from 'react';
|
|
3
3
|
import * as __types_form from '@/types/form';
|
|
4
4
|
export { FormInstance } from '@/types/form';
|
|
5
|
+
import * as __types_button from '@/types/button';
|
|
6
|
+
export { ButtonProps } from '@/types/button';
|
|
5
7
|
export { ArrowIcon, CalendarIcon, CheckIcon, ClearIcon, DateDistanceIcon, ErrorIcon, LoadingIcon, SearchIcon, SpinerIcon, StampleIcon, SuccessIcon, TimeIcon, TrashIcon } from '@/components/Icons';
|
|
6
8
|
export { useForm } from '@/hooks/useForm';
|
|
7
9
|
export { useWatch } from '@/hooks/useWatch';
|
|
8
10
|
|
|
9
11
|
type RuleType = any;
|
|
10
12
|
type RuleTypes = RuleType | RuleType[];
|
|
11
|
-
type SizeType
|
|
13
|
+
type SizeType = 'small' | 'middle' | 'large';
|
|
12
14
|
interface DefaultProps {
|
|
13
15
|
prefixCls?: string;
|
|
14
16
|
className?: string;
|
|
@@ -125,7 +127,7 @@ interface RadioGroupProps {
|
|
|
125
127
|
defaultValue?: RuleType;
|
|
126
128
|
value?: RuleType;
|
|
127
129
|
onChange?: (e: SyntheticBaseEvent) => void;
|
|
128
|
-
size?: SizeType
|
|
130
|
+
size?: SizeType;
|
|
129
131
|
disabled?: boolean;
|
|
130
132
|
onMouseEnter?: MouseEventHandler<HTMLDivElement>;
|
|
131
133
|
onMouseLeave?: MouseEventHandler<HTMLDivElement>;
|
|
@@ -173,7 +175,7 @@ type RadioProps = DefaultProps & {
|
|
|
173
175
|
};
|
|
174
176
|
type RadioButtonProps = RadioProps & {
|
|
175
177
|
children?: ReactNode;
|
|
176
|
-
size?: SizeType
|
|
178
|
+
size?: SizeType;
|
|
177
179
|
};
|
|
178
180
|
|
|
179
181
|
interface BaseInfo {
|
|
@@ -202,7 +204,7 @@ type TDatePickerProps = DefaultProps & {
|
|
|
202
204
|
}) => boolean;
|
|
203
205
|
suffixIcon?: ReactNode;
|
|
204
206
|
prefix?: ReactNode;
|
|
205
|
-
size?: SizeType
|
|
207
|
+
size?: SizeType;
|
|
206
208
|
format?: FormatType<RuleType> | FormatType<RuleType>[] | {
|
|
207
209
|
format: string;
|
|
208
210
|
type?: 'mask';
|
|
@@ -350,49 +352,7 @@ type EmptyContentProps = DefaultProps & {
|
|
|
350
352
|
icon?: ReactNode;
|
|
351
353
|
};
|
|
352
354
|
|
|
353
|
-
declare const
|
|
354
|
-
declare const ButtonShapes: readonly ["default", "circle", "round"];
|
|
355
|
-
declare const ButtonVariantTypes: readonly ["outlined", "dashed", "solid", "filled", "text", "link"];
|
|
356
|
-
declare const ButtonColorTypes: readonly ["default", "primary", "danger", "blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
|
|
357
|
-
type ButtonType = (typeof ButtonTypes)[number];
|
|
358
|
-
type ButtonShape = (typeof ButtonShapes)[number];
|
|
359
|
-
type ButtonVariantType = (typeof ButtonVariantTypes)[number];
|
|
360
|
-
type ButtonColorType = (typeof ButtonColorTypes)[number];
|
|
361
|
-
type SizeType = 'small' | 'middle' | 'large' | undefined;
|
|
362
|
-
type ButtonHTMLType = 'button' | 'submit' | 'reset';
|
|
363
|
-
interface BaseButtonProps {
|
|
364
|
-
type?: ButtonType;
|
|
365
|
-
color?: ButtonColorType;
|
|
366
|
-
variant?: ButtonVariantType;
|
|
367
|
-
icon?: ReactNode;
|
|
368
|
-
iconPosition?: 'start' | 'end';
|
|
369
|
-
shape?: ButtonShape;
|
|
370
|
-
size?: SizeType;
|
|
371
|
-
disabled?: boolean;
|
|
372
|
-
loading?: boolean | {
|
|
373
|
-
delay?: number;
|
|
374
|
-
icon?: ReactNode;
|
|
375
|
-
};
|
|
376
|
-
prefixCls?: string;
|
|
377
|
-
className?: string;
|
|
378
|
-
rootClassName?: string;
|
|
379
|
-
ghost?: boolean;
|
|
380
|
-
danger?: boolean;
|
|
381
|
-
block?: boolean;
|
|
382
|
-
children?: ReactNode;
|
|
383
|
-
classNames?: {
|
|
384
|
-
icon?: string;
|
|
385
|
-
};
|
|
386
|
-
styles?: {
|
|
387
|
-
icon?: CSSProperties;
|
|
388
|
-
};
|
|
389
|
-
}
|
|
390
|
-
interface ButtonProps extends BaseButtonProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'type'> {
|
|
391
|
-
href?: string;
|
|
392
|
-
htmlType?: ButtonHTMLType;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
declare const Button: react.ComponentType<ButtonProps>;
|
|
355
|
+
declare const Button: react.ComponentType<__types_button.ButtonProps>;
|
|
396
356
|
declare const Checkbox: react.ComponentType<DefaultProps & {
|
|
397
357
|
disabled?: boolean;
|
|
398
358
|
onChange?: (e: react.MouseEvent<HTMLInputElement> & TargetProps) => void;
|
|
@@ -423,7 +383,7 @@ declare const FormItem: react.ComponentType<__types_form.FormItemProps>;
|
|
|
423
383
|
declare const Input: react.ComponentType<Omit<react.InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> & DefaultProps & {
|
|
424
384
|
addonBefore?: react.ReactNode;
|
|
425
385
|
addonAfter?: react.ReactNode;
|
|
426
|
-
size?: SizeType
|
|
386
|
+
size?: SizeType;
|
|
427
387
|
prefix?: react.ReactNode;
|
|
428
388
|
suffix?: react.ReactNode;
|
|
429
389
|
disabled?: boolean;
|
|
@@ -458,7 +418,7 @@ declare const Textarea: react.ComponentType<Omit<react.TextareaHTMLAttributes<HT
|
|
|
458
418
|
count?: react.CSSProperties;
|
|
459
419
|
};
|
|
460
420
|
bordered?: boolean;
|
|
461
|
-
size?: SizeType
|
|
421
|
+
size?: SizeType;
|
|
462
422
|
status?: "success" | "error";
|
|
463
423
|
rootClassName?: string;
|
|
464
424
|
variant?: "outlined" | "borderless" | "filled" | "underlined";
|