x-ui-design 0.2.66 → 0.2.67
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 +16 -15
- package/dist/index.d.ts +17 -16
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/lib/index.ts +1 -0
- package/package.json +1 -1
- package/src/app/page.tsx +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './styles/global.css';
|
|
2
2
|
declare const Button: import("react").ComponentType<import("@/types/button").ButtonProps>;
|
|
3
|
-
declare const Checkbox: import("react").ComponentType<import("
|
|
3
|
+
declare const Checkbox: import("react").ComponentType<import("@/types").DefaultProps & {
|
|
4
4
|
disabled?: boolean;
|
|
5
|
-
onChange?: (e: import("react").MouseEvent<HTMLInputElement> & import("
|
|
5
|
+
onChange?: (e: import("react").MouseEvent<HTMLInputElement> & import("@/types").TargetProps) => void;
|
|
6
6
|
onClick?: import("react").MouseEventHandler<HTMLElement>;
|
|
7
7
|
onMouseEnter?: import("react").MouseEventHandler<HTMLElement>;
|
|
8
8
|
onMouseLeave?: import("react").MouseEventHandler<HTMLElement>;
|
|
@@ -27,10 +27,10 @@ declare const RangePicker: import("react").ComponentType<import("./types/datepic
|
|
|
27
27
|
declare const TimePicker: import("react").ComponentType<import("./types/datepicker").TimePickerProps>;
|
|
28
28
|
declare const Form: import("react").ComponentType<import("@/types/form").FormProps>;
|
|
29
29
|
declare const FormItem: import("react").ComponentType<import("@/types/form").FormItemProps>;
|
|
30
|
-
declare const Input: import("react").ComponentType<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> & import("
|
|
30
|
+
declare const Input: import("react").ComponentType<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> & import("@/types").DefaultProps & {
|
|
31
31
|
addonBefore?: import("react").ReactNode;
|
|
32
32
|
addonAfter?: import("react").ReactNode;
|
|
33
|
-
size?: import("
|
|
33
|
+
size?: import("@/types").SizeType;
|
|
34
34
|
prefix?: import("react").ReactNode;
|
|
35
35
|
suffix?: import("react").ReactNode;
|
|
36
36
|
disabled?: boolean;
|
|
@@ -38,7 +38,7 @@ declare const Input: import("react").ComponentType<Omit<import("react").InputHTM
|
|
|
38
38
|
error?: boolean;
|
|
39
39
|
bordered?: boolean;
|
|
40
40
|
iconRender?: (visible: boolean) => import("react").ReactElement;
|
|
41
|
-
onChange?: (event: import("
|
|
41
|
+
onChange?: (event: import("@/types").SyntheticBaseEvent) => void;
|
|
42
42
|
onClick?: import("react").MouseEventHandler<HTMLElement>;
|
|
43
43
|
onMouseEnter?: import("react").MouseEventHandler<HTMLElement>;
|
|
44
44
|
onMouseLeave?: import("react").MouseEventHandler<HTMLElement>;
|
|
@@ -47,7 +47,7 @@ declare const Input: import("react").ComponentType<Omit<import("react").InputHTM
|
|
|
47
47
|
onPressEnter?: (event: import("react").KeyboardEvent<HTMLInputElement>) => void;
|
|
48
48
|
feedbackIcons?: boolean;
|
|
49
49
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
50
|
-
declare const Textarea: import("react").ComponentType<Omit<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, "onResize"> & import("
|
|
50
|
+
declare const Textarea: import("react").ComponentType<Omit<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, "onResize"> & import("@/types").DefaultProps & {
|
|
51
51
|
value?: string;
|
|
52
52
|
className?: string;
|
|
53
53
|
style?: import("react").CSSProperties;
|
|
@@ -65,19 +65,19 @@ declare const Textarea: import("react").ComponentType<Omit<import("react").Texta
|
|
|
65
65
|
count?: import("react").CSSProperties;
|
|
66
66
|
};
|
|
67
67
|
bordered?: boolean;
|
|
68
|
-
size?: import("
|
|
68
|
+
size?: import("@/types").SizeType;
|
|
69
69
|
status?: "success" | "error";
|
|
70
70
|
rootClassName?: string;
|
|
71
71
|
variant?: "outlined" | "borderless" | "filled" | "underlined";
|
|
72
72
|
error?: boolean;
|
|
73
73
|
allowClear?: boolean;
|
|
74
74
|
} & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
75
|
-
declare const Radio: import("react").ComponentType<import("
|
|
75
|
+
declare const Radio: import("react").ComponentType<import("@/types").DefaultProps & {
|
|
76
76
|
defaultChecked?: boolean;
|
|
77
77
|
checked?: boolean;
|
|
78
78
|
disabled?: boolean;
|
|
79
79
|
title?: string;
|
|
80
|
-
onChange?: (e: import("
|
|
80
|
+
onChange?: (e: import("@/types").SyntheticBaseEvent) => void;
|
|
81
81
|
onClick?: import("react").MouseEventHandler<HTMLElement>;
|
|
82
82
|
onMouseEnter?: import("react").MouseEventHandler<HTMLElement>;
|
|
83
83
|
onMouseLeave?: import("react").MouseEventHandler<HTMLElement>;
|
|
@@ -85,7 +85,7 @@ declare const Radio: import("react").ComponentType<import("./types").DefaultProp
|
|
|
85
85
|
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement>;
|
|
86
86
|
onFocus?: import("react").FocusEventHandler<HTMLInputElement>;
|
|
87
87
|
onBlur?: import("react").FocusEventHandler<HTMLInputElement>;
|
|
88
|
-
value?: import("
|
|
88
|
+
value?: import("@/types").RuleType;
|
|
89
89
|
tabIndex?: number;
|
|
90
90
|
name?: string;
|
|
91
91
|
children?: import("react").ReactNode;
|
|
@@ -99,12 +99,12 @@ declare const Radio: import("react").ComponentType<import("./types").DefaultProp
|
|
|
99
99
|
} & import("react").RefAttributes<HTMLLabelElement>>;
|
|
100
100
|
declare const RadioButton: import("react").ComponentType<import("./types/radio").RadioButtonProps>;
|
|
101
101
|
declare const RadioGroup: import("react").ComponentType<import("./types/radio").RadioGroupProps>;
|
|
102
|
-
declare const Select: import("react").ComponentType<import("
|
|
102
|
+
declare const Select: import("react").ComponentType<import("@/types").DefaultProps & {
|
|
103
103
|
id?: string;
|
|
104
104
|
searchValue?: string;
|
|
105
105
|
onSearch?: (value: string) => void;
|
|
106
106
|
autoClearSearchValue?: boolean;
|
|
107
|
-
onSelect?: (value: import("
|
|
107
|
+
onSelect?: (value: import("@/types").RuleTypes, option?: import("./types/select").OptionType) => void;
|
|
108
108
|
onDeselect?: (value: string, option?: import("./types/select").OptionType) => void;
|
|
109
109
|
filterOption?: boolean | ((input: string, option: import("./types/select").OptionType) => boolean);
|
|
110
110
|
optionFilterProp?: string;
|
|
@@ -114,10 +114,10 @@ declare const Select: import("react").ComponentType<import("./types").DefaultPro
|
|
|
114
114
|
listHeight?: number;
|
|
115
115
|
menuItemSelectedIcon?: import("react").ReactNode;
|
|
116
116
|
mode?: "default" | "multiple" | "tags";
|
|
117
|
-
value?: import("
|
|
118
|
-
defaultValue?: import("
|
|
117
|
+
value?: import("@/types").RuleTypes;
|
|
118
|
+
defaultValue?: import("@/types").RuleTypes;
|
|
119
119
|
maxCount?: number;
|
|
120
|
-
onChange?: (e: import("
|
|
120
|
+
onChange?: (e: import("@/types").RuleTypes, option?: import("./types/select").OptionType) => void;
|
|
121
121
|
disabled?: boolean;
|
|
122
122
|
loading?: boolean;
|
|
123
123
|
placeholder?: string;
|
|
@@ -155,6 +155,7 @@ export { Button, Checkbox, Empty, DatePicker, RangePicker, TimePicker, Form, For
|
|
|
155
155
|
export { ClearIcon, ArrowIcon, LoadingIcon, CheckIcon, SearchIcon, CalendarIcon, SuccessIcon, ErrorIcon, DateDistanceIcon, TimeIcon, StampleIcon, TrashIcon, SpinerIcon, } from '@/components/Icons';
|
|
156
156
|
export { useForm } from '@/hooks/useForm';
|
|
157
157
|
export { useWatch } from '@/hooks/useWatch';
|
|
158
|
+
export type { RuleTypes } from '@/types';
|
|
158
159
|
export type { FormInstance } from '@/types/form';
|
|
159
160
|
export type { ButtonProps } from '@/types/button';
|
|
160
161
|
export { clsx, createArray, parseValue } from '@/helpers';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import * as react from 'react';
|
|
|
2
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 from '@/types';
|
|
6
|
+
export { RuleTypes } from '@/types';
|
|
5
7
|
import * as __types_button from '@/types/button';
|
|
6
8
|
export { ButtonProps } from '@/types/button';
|
|
7
9
|
export { ArrowIcon, CalendarIcon, CheckIcon, ClearIcon, DateDistanceIcon, ErrorIcon, LoadingIcon, SearchIcon, SpinerIcon, StampleIcon, SuccessIcon, TimeIcon, TrashIcon } from '@/components/Icons';
|
|
@@ -10,7 +12,6 @@ export { useWatch } from '@/hooks/useWatch';
|
|
|
10
12
|
export { clsx, createArray, parseValue } from '@/helpers';
|
|
11
13
|
|
|
12
14
|
type RuleType = any;
|
|
13
|
-
type RuleTypes = RuleType | RuleType[];
|
|
14
15
|
type SizeType = 'small' | 'middle' | 'large';
|
|
15
16
|
interface DefaultProps {
|
|
16
17
|
prefixCls?: string;
|
|
@@ -354,9 +355,9 @@ type EmptyContentProps = DefaultProps & {
|
|
|
354
355
|
};
|
|
355
356
|
|
|
356
357
|
declare const Button: react.ComponentType<__types_button.ButtonProps>;
|
|
357
|
-
declare const Checkbox: react.ComponentType<DefaultProps & {
|
|
358
|
+
declare const Checkbox: react.ComponentType<__types.DefaultProps & {
|
|
358
359
|
disabled?: boolean;
|
|
359
|
-
onChange?: (e: react.MouseEvent<HTMLInputElement> & TargetProps) => void;
|
|
360
|
+
onChange?: (e: react.MouseEvent<HTMLInputElement> & __types.TargetProps) => void;
|
|
360
361
|
onClick?: react.MouseEventHandler<HTMLElement>;
|
|
361
362
|
onMouseEnter?: react.MouseEventHandler<HTMLElement>;
|
|
362
363
|
onMouseLeave?: react.MouseEventHandler<HTMLElement>;
|
|
@@ -381,10 +382,10 @@ declare const RangePicker: react.ComponentType<TRangePickerProps>;
|
|
|
381
382
|
declare const TimePicker: react.ComponentType<TimePickerProps>;
|
|
382
383
|
declare const Form: react.ComponentType<__types_form.FormProps>;
|
|
383
384
|
declare const FormItem: react.ComponentType<__types_form.FormItemProps>;
|
|
384
|
-
declare const Input: react.ComponentType<Omit<react.InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> & DefaultProps & {
|
|
385
|
+
declare const Input: react.ComponentType<Omit<react.InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> & __types.DefaultProps & {
|
|
385
386
|
addonBefore?: react.ReactNode;
|
|
386
387
|
addonAfter?: react.ReactNode;
|
|
387
|
-
size?: SizeType;
|
|
388
|
+
size?: __types.SizeType;
|
|
388
389
|
prefix?: react.ReactNode;
|
|
389
390
|
suffix?: react.ReactNode;
|
|
390
391
|
disabled?: boolean;
|
|
@@ -392,7 +393,7 @@ declare const Input: react.ComponentType<Omit<react.InputHTMLAttributes<HTMLInpu
|
|
|
392
393
|
error?: boolean;
|
|
393
394
|
bordered?: boolean;
|
|
394
395
|
iconRender?: (visible: boolean) => react.ReactElement;
|
|
395
|
-
onChange?: (event: SyntheticBaseEvent) => void;
|
|
396
|
+
onChange?: (event: __types.SyntheticBaseEvent) => void;
|
|
396
397
|
onClick?: react.MouseEventHandler<HTMLElement>;
|
|
397
398
|
onMouseEnter?: react.MouseEventHandler<HTMLElement>;
|
|
398
399
|
onMouseLeave?: react.MouseEventHandler<HTMLElement>;
|
|
@@ -401,7 +402,7 @@ declare const Input: react.ComponentType<Omit<react.InputHTMLAttributes<HTMLInpu
|
|
|
401
402
|
onPressEnter?: (event: react.KeyboardEvent<HTMLInputElement>) => void;
|
|
402
403
|
feedbackIcons?: boolean;
|
|
403
404
|
} & react.RefAttributes<HTMLInputElement>>;
|
|
404
|
-
declare const Textarea: react.ComponentType<Omit<react.TextareaHTMLAttributes<HTMLTextAreaElement>, "onResize"> & DefaultProps & {
|
|
405
|
+
declare const Textarea: react.ComponentType<Omit<react.TextareaHTMLAttributes<HTMLTextAreaElement>, "onResize"> & __types.DefaultProps & {
|
|
405
406
|
value?: string;
|
|
406
407
|
className?: string;
|
|
407
408
|
style?: react.CSSProperties;
|
|
@@ -419,19 +420,19 @@ declare const Textarea: react.ComponentType<Omit<react.TextareaHTMLAttributes<HT
|
|
|
419
420
|
count?: react.CSSProperties;
|
|
420
421
|
};
|
|
421
422
|
bordered?: boolean;
|
|
422
|
-
size?: SizeType;
|
|
423
|
+
size?: __types.SizeType;
|
|
423
424
|
status?: "success" | "error";
|
|
424
425
|
rootClassName?: string;
|
|
425
426
|
variant?: "outlined" | "borderless" | "filled" | "underlined";
|
|
426
427
|
error?: boolean;
|
|
427
428
|
allowClear?: boolean;
|
|
428
429
|
} & react.RefAttributes<HTMLTextAreaElement>>;
|
|
429
|
-
declare const Radio: react.ComponentType<DefaultProps & {
|
|
430
|
+
declare const Radio: react.ComponentType<__types.DefaultProps & {
|
|
430
431
|
defaultChecked?: boolean;
|
|
431
432
|
checked?: boolean;
|
|
432
433
|
disabled?: boolean;
|
|
433
434
|
title?: string;
|
|
434
|
-
onChange?: (e: SyntheticBaseEvent) => void;
|
|
435
|
+
onChange?: (e: __types.SyntheticBaseEvent) => void;
|
|
435
436
|
onClick?: react.MouseEventHandler<HTMLElement>;
|
|
436
437
|
onMouseEnter?: react.MouseEventHandler<HTMLElement>;
|
|
437
438
|
onMouseLeave?: react.MouseEventHandler<HTMLElement>;
|
|
@@ -439,7 +440,7 @@ declare const Radio: react.ComponentType<DefaultProps & {
|
|
|
439
440
|
onKeyDown?: react.KeyboardEventHandler<HTMLElement>;
|
|
440
441
|
onFocus?: react.FocusEventHandler<HTMLInputElement>;
|
|
441
442
|
onBlur?: react.FocusEventHandler<HTMLInputElement>;
|
|
442
|
-
value?: RuleType;
|
|
443
|
+
value?: __types.RuleType;
|
|
443
444
|
tabIndex?: number;
|
|
444
445
|
name?: string;
|
|
445
446
|
children?: react.ReactNode;
|
|
@@ -453,12 +454,12 @@ declare const Radio: react.ComponentType<DefaultProps & {
|
|
|
453
454
|
} & react.RefAttributes<HTMLLabelElement>>;
|
|
454
455
|
declare const RadioButton: react.ComponentType<RadioButtonProps>;
|
|
455
456
|
declare const RadioGroup: react.ComponentType<RadioGroupProps>;
|
|
456
|
-
declare const Select: react.ComponentType<DefaultProps & {
|
|
457
|
+
declare const Select: react.ComponentType<__types.DefaultProps & {
|
|
457
458
|
id?: string;
|
|
458
459
|
searchValue?: string;
|
|
459
460
|
onSearch?: (value: string) => void;
|
|
460
461
|
autoClearSearchValue?: boolean;
|
|
461
|
-
onSelect?: (value: RuleTypes, option?: OptionType) => void;
|
|
462
|
+
onSelect?: (value: __types.RuleTypes, option?: OptionType) => void;
|
|
462
463
|
onDeselect?: (value: string, option?: OptionType) => void;
|
|
463
464
|
filterOption?: boolean | ((input: string, option: OptionType) => boolean);
|
|
464
465
|
optionFilterProp?: string;
|
|
@@ -468,10 +469,10 @@ declare const Select: react.ComponentType<DefaultProps & {
|
|
|
468
469
|
listHeight?: number;
|
|
469
470
|
menuItemSelectedIcon?: react.ReactNode;
|
|
470
471
|
mode?: "default" | "multiple" | "tags";
|
|
471
|
-
value?: RuleTypes;
|
|
472
|
-
defaultValue?: RuleTypes;
|
|
472
|
+
value?: __types.RuleTypes;
|
|
473
|
+
defaultValue?: __types.RuleTypes;
|
|
473
474
|
maxCount?: number;
|
|
474
|
-
onChange?: (e: RuleTypes, option?: OptionType) => void;
|
|
475
|
+
onChange?: (e: __types.RuleTypes, option?: OptionType) => void;
|
|
475
476
|
disabled?: boolean;
|
|
476
477
|
loading?: boolean;
|
|
477
478
|
placeholder?: string;
|