@ioca/react 1.3.84 → 1.3.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.
- package/lib/cjs/components/image/image.js +4 -3
- package/lib/cjs/components/image/image.js.map +1 -1
- package/lib/cjs/components/input/number.js +3 -2
- package/lib/cjs/components/input/number.js.map +1 -1
- package/lib/cjs/components/pagination/page.js +4 -4
- package/lib/cjs/components/pagination/page.js.map +1 -1
- package/lib/cjs/components/pagination/pagination.js +4 -4
- package/lib/cjs/components/pagination/pagination.js.map +1 -1
- package/lib/cjs/components/tabs/tabs.js +5 -5
- package/lib/cjs/components/tabs/tabs.js.map +1 -1
- package/lib/cjs/components/upload/upload.js +5 -2
- package/lib/cjs/components/upload/upload.js.map +1 -1
- package/lib/css/index.css +1 -1
- package/lib/css/index.css.map +1 -1
- package/lib/es/components/image/image.js +4 -3
- package/lib/es/components/image/image.js.map +1 -1
- package/lib/es/components/input/number.js +3 -2
- package/lib/es/components/input/number.js.map +1 -1
- package/lib/es/components/pagination/page.js +4 -4
- package/lib/es/components/pagination/page.js.map +1 -1
- package/lib/es/components/pagination/pagination.js +4 -4
- package/lib/es/components/pagination/pagination.js.map +1 -1
- package/lib/es/components/tabs/tabs.js +5 -5
- package/lib/es/components/tabs/tabs.js.map +1 -1
- package/lib/es/components/upload/upload.js +7 -4
- package/lib/es/components/upload/upload.js.map +1 -1
- package/lib/index.js +26 -21
- package/lib/types/components/image/type.d.ts +2 -2
- package/lib/types/components/tabs/type.d.ts +7 -8
- package/lib/types/components/upload/type.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ForwardRefExoticComponent, ReactNode, RefObject, CSSProperties, Ref } from 'react';
|
|
2
2
|
import Item from './item.js';
|
|
3
3
|
|
|
4
|
-
type TTabKey = string | number;
|
|
5
4
|
interface ITabItem {
|
|
6
|
-
key?:
|
|
5
|
+
key?: string;
|
|
7
6
|
props?: any;
|
|
8
7
|
title?: ReactNode;
|
|
9
8
|
content?: ReactNode;
|
|
@@ -14,8 +13,8 @@ interface ITabItem {
|
|
|
14
13
|
}
|
|
15
14
|
interface ITabs {
|
|
16
15
|
ref?: RefObject<RefTabs | null>;
|
|
17
|
-
active?:
|
|
18
|
-
tabs?: ITabItem[] |
|
|
16
|
+
active?: string;
|
|
17
|
+
tabs?: ITabItem[] | string[];
|
|
19
18
|
type?: "default" | "line" | "pane";
|
|
20
19
|
prepend?: ReactNode;
|
|
21
20
|
append?: ReactNode;
|
|
@@ -29,11 +28,11 @@ interface ITabs {
|
|
|
29
28
|
children?: ReactNode;
|
|
30
29
|
style?: CSSProperties;
|
|
31
30
|
renderMore?: (moreTabs: ITabItem[]) => ReactNode;
|
|
32
|
-
onTabChange?: (to?:
|
|
31
|
+
onTabChange?: (to?: string, from?: string) => void;
|
|
33
32
|
}
|
|
34
33
|
interface RefTabs {
|
|
35
|
-
open: (key:
|
|
36
|
-
close: (key:
|
|
34
|
+
open: (key: string) => void;
|
|
35
|
+
close: (key: string) => void;
|
|
37
36
|
add: (tab: ITabItem, position?: number) => void;
|
|
38
37
|
navs: Ref<HTMLDivElement>;
|
|
39
38
|
}
|
|
@@ -41,4 +40,4 @@ interface CompositionTabs extends ForwardRefExoticComponent<ITabs> {
|
|
|
41
40
|
Item: typeof Item;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
export type { CompositionTabs, ITabItem, ITabs, RefTabs
|
|
43
|
+
export type { CompositionTabs, ITabItem, ITabs, RefTabs };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InputHTMLAttributes, RefObject, ReactNode, ChangeEvent } from 'react';
|
|
2
2
|
import { BaseInput } from '../../type/index.js';
|
|
3
|
+
import { IButton } from '../button/type.js';
|
|
3
4
|
|
|
4
5
|
interface IUpload extends Omit<BaseInput, "ref">, Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange"> {
|
|
5
6
|
ref?: RefObject<RefUpload | null>;
|
|
@@ -13,7 +14,7 @@ interface IUpload extends Omit<BaseInput, "ref">, Omit<InputHTMLAttributes<HTMLI
|
|
|
13
14
|
mode?: "default" | "card";
|
|
14
15
|
droppable?: boolean;
|
|
15
16
|
cardSize?: string;
|
|
16
|
-
|
|
17
|
+
defaultButtonProps?: IButton;
|
|
17
18
|
shouldUpload?: (file: IFile) => boolean;
|
|
18
19
|
uploader?: (file: IFile) => Promise<IFile>;
|
|
19
20
|
renderItem?: (file: IFile, i: number) => ReactNode;
|