@nutui/nutui-react 1.2.2 → 1.2.3-beta.2
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/Address.js +76 -28
- package/dist/esm/Badge.js +4 -4
- package/dist/esm/Col.js +6 -2
- package/dist/esm/Collapse.js +1 -0
- package/dist/esm/CollapseItem.js +15 -14
- package/dist/esm/Empty.js +2 -2
- package/dist/esm/FixedNav.js +3 -3
- package/dist/esm/Picker.js +4 -4
- package/dist/esm/Popover.js +19 -35
- package/dist/esm/Popup.js +54 -30
- package/dist/esm/Radio.js +24 -4
- package/dist/esm/Row.js +9 -3
- package/dist/esm/SideNavBar/style/index.js +2 -0
- package/dist/esm/SideNavBar.js +65 -0
- package/dist/esm/SideNavBarItem/style/index.js +2 -0
- package/dist/esm/SideNavBarItem.js +32 -0
- package/dist/esm/SubSideNavBar/style/index.js +2 -0
- package/dist/esm/SubSideNavBar.js +94 -0
- package/dist/esm/Swiper.js +36 -11
- package/dist/esm/SwiperItem.js +1 -15
- package/dist/esm/Table/style/index.js +2 -0
- package/dist/esm/Table.js +154 -0
- package/dist/esm/nutui-react.es.js +4 -0
- package/dist/esm/offsetContext-0e3d04b3.js +19 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/nutui.react.es.js +1254 -683
- package/dist/nutui.react.umd.js +15 -15
- package/dist/packages/address/address.scss +9 -2
- package/dist/packages/sidenavbar/sidenavbar.scss +69 -0
- package/dist/packages/sidenavbaritem/sidenavbaritem.scss +8 -0
- package/dist/packages/subsidenavbar/subsidenavbar.scss +23 -0
- package/dist/packages/swiper/swiper.scss +3 -0
- package/dist/packages/table/table.scss +81 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +4 -0
- package/dist/styles/variables.scss +12 -3
- package/dist/types/address/__test__/address.spec.d.ts +1 -0
- package/dist/types/address/address.d.ts +4 -27
- package/dist/types/address/customRender.d.ts +3 -7
- package/dist/types/address/existRender.d.ts +1 -1
- package/dist/types/address/type.d.ts +40 -0
- package/dist/types/badge/badge.d.ts +2 -1
- package/dist/types/card/card.d.ts +4 -4
- package/dist/types/cellgroup/cellgroup.d.ts +1 -0
- package/dist/types/col/col.d.ts +4 -1
- package/dist/types/collapse/collapse.d.ts +2 -1
- package/dist/types/fixednav/__tests__/fixednav.spec.d.ts +1 -0
- package/dist/types/fixednav/fixednav.d.ts +5 -5
- package/dist/types/input/input.d.ts +3 -3
- package/dist/types/layout/__tests__/layout.spec.d.ts +1 -0
- package/dist/types/navbar/navbar.d.ts +1 -0
- package/dist/types/nutui.react.d.ts +5 -1
- package/dist/types/picker/__tests__/picker.spec.d.ts +1 -0
- package/dist/types/popover/Trigger.d.ts +2 -4
- package/dist/types/popover/popover.d.ts +1 -0
- package/dist/types/popup/__tests__/popup.spec.d.ts +1 -0
- package/dist/types/popup/popup.d.ts +2 -0
- package/dist/types/row/row.d.ts +4 -1
- package/dist/types/sidenavbar/__test__/sidenavbar.spec.d.ts +1 -0
- package/dist/types/sidenavbar/demo.d.ts +3 -0
- package/dist/types/sidenavbar/index.d.ts +2 -0
- package/dist/types/sidenavbar/offsetContext.d.ts +2 -0
- package/dist/types/sidenavbar/sidenavbar.d.ts +3 -0
- package/dist/types/sidenavbar/type.d.ts +34 -0
- package/dist/types/sidenavbar/utils.d.ts +3 -0
- package/dist/types/sidenavbaritem/__test__/sidenavbaritem.spec.d.ts +1 -0
- package/dist/types/sidenavbaritem/index.d.ts +2 -0
- package/dist/types/sidenavbaritem/sidenavbaritem.d.ts +3 -0
- package/dist/types/skeleton/skeleton.d.ts +1 -0
- package/dist/types/subsidenavbar/__test__/subsidenavbar.spec.d.ts +1 -0
- package/dist/types/subsidenavbar/index.d.ts +2 -0
- package/dist/types/subsidenavbar/subsidenavbar.d.ts +3 -0
- package/dist/types/swiper/__tests__/swiper.spec.d.ts +1 -0
- package/dist/types/swiper/swiper.d.ts +1 -0
- package/dist/types/tabbar/tabbar.d.ts +1 -0
- package/dist/types/table/__test__/table.spec.d.ts +1 -0
- package/dist/types/table/demo.d.ts +3 -0
- package/dist/types/table/index.d.ts +2 -0
- package/dist/types/table/table.d.ts +3 -0
- package/dist/types/table/types.d.ts +19 -0
- package/dist/types/tabpane/tabpane.d.ts +2 -1
- package/dist/types/tabs/tabs.d.ts +1 -0
- package/dist/types/tag/tag.d.ts +2 -1
- package/dist/types/timeselect/__test__/timeselect.spec.d.ts +1 -0
- package/package.json +8 -8
package/dist/style.es.js
CHANGED
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
@import '../../packages/tabs/tabs.scss';
|
|
20
20
|
@import '../../packages/tabpane/tabpane.scss';
|
|
21
21
|
@import '../../packages/indicator/indicator.scss';
|
|
22
|
+
@import '../../packages/sidenavbar/sidenavbar.scss';
|
|
23
|
+
@import '../../packages/subsidenavbar/subsidenavbar.scss';
|
|
24
|
+
@import '../../packages/sidenavbaritem/sidenavbaritem.scss';
|
|
22
25
|
@import '../../packages/range/range.scss';
|
|
23
26
|
@import '../../packages/calendar/calendar.scss';
|
|
24
27
|
@import '../../packages/checkbox/checkbox.scss';
|
|
@@ -63,6 +66,7 @@
|
|
|
63
66
|
@import '../../packages/animatingnumbers/animatingnumbers.scss';
|
|
64
67
|
@import '../../packages/empty/empty.scss';
|
|
65
68
|
@import '../../packages/virtuallist/virtuallist.scss';
|
|
69
|
+
@import '../../packages/table/table.scss';
|
|
66
70
|
@import '../../packages/video/video.scss';
|
|
67
71
|
@import '../../packages/progress/progress.scss';
|
|
68
72
|
@import '../../packages/address/address.scss';
|
|
@@ -69,7 +69,7 @@ $button-primary-background-color: linear-gradient(
|
|
|
69
69
|
$primary-color-end 100%
|
|
70
70
|
);
|
|
71
71
|
$button-info-color: $white;
|
|
72
|
-
$button-info-border-color:
|
|
72
|
+
$button-info-border-color: #496af2;
|
|
73
73
|
$button-info-background-color: linear-gradient(
|
|
74
74
|
315deg,
|
|
75
75
|
rgba(73, 143, 242, 1) 0%,
|
|
@@ -495,6 +495,16 @@ $divider-vertical-top: 2px !default;
|
|
|
495
495
|
$divider-vertical-border-left: rgba(0, 0, 0, 0.06) !default;
|
|
496
496
|
$divider-vertical-margin: 0 8px !default;
|
|
497
497
|
|
|
498
|
+
|
|
499
|
+
// swiper
|
|
500
|
+
$swiper-pagination-item-background-color: #ddd !default;
|
|
501
|
+
|
|
502
|
+
// Table
|
|
503
|
+
$table-border-color: #ececec !default;
|
|
504
|
+
$table-cols-padding: 10px !default;
|
|
505
|
+
$table-tr-even-bg-color: #f3f3f3 !default;
|
|
506
|
+
$table-tr-odd-bg-color: $white !default;
|
|
507
|
+
|
|
498
508
|
//numberkeyboard
|
|
499
509
|
$numberkeyboard-width: 100% !default;
|
|
500
510
|
$numberkeyboard-padding: 0 0 22px 0 !default;
|
|
@@ -518,6 +528,7 @@ $numberkeyboard-key-finish-font-size: 16px !default;
|
|
|
518
528
|
$numberkeyboard-key-finish-font-size-color: #fff !default;
|
|
519
529
|
$numberkeyboard-key-finish-background-color: #1989fa !default;
|
|
520
530
|
$numberkeyboard-key-activeFinsh-background-color: #0570db !default;
|
|
531
|
+
|
|
521
532
|
// elevator
|
|
522
533
|
$elevator-list-item-highcolor: $primary-color !default;
|
|
523
534
|
$elevator-list-item-font-size: 12px !default;
|
|
@@ -585,7 +596,6 @@ $row-content-height: 50px !default;
|
|
|
585
596
|
$row-content-line-height: 40px !default;
|
|
586
597
|
$col-default-margin-bottom: 15px !default;
|
|
587
598
|
|
|
588
|
-
|
|
589
599
|
// searchbar
|
|
590
600
|
$searchbar-background: $white !default;
|
|
591
601
|
$searchbar-right-out-color: $black !default;
|
|
@@ -622,4 +632,3 @@ $countup-lr-margin: 1px !default;
|
|
|
622
632
|
$countup-bgcolor: #031f63 !default;
|
|
623
633
|
$countup-color: #ffffff !default;
|
|
624
634
|
$countup-width: 24px !default;
|
|
625
|
-
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,33 +1,10 @@
|
|
|
1
1
|
import React, { FunctionComponent, CSSProperties } from 'react';
|
|
2
|
-
|
|
3
|
-
name?: string;
|
|
4
|
-
[key: string]: any;
|
|
5
|
-
}
|
|
6
|
-
export interface NextListObj {
|
|
7
|
-
next: string;
|
|
8
|
-
value: string | RegionData;
|
|
9
|
-
custom: string;
|
|
10
|
-
selectedRegion: {};
|
|
11
|
-
}
|
|
12
|
-
export interface AddressList {
|
|
13
|
-
id?: string | number;
|
|
14
|
-
provinceName: string;
|
|
15
|
-
cityName: string;
|
|
16
|
-
countyName: string;
|
|
17
|
-
townName: string;
|
|
18
|
-
addressDetail: string;
|
|
19
|
-
selectedAddress: boolean;
|
|
20
|
-
name?: string;
|
|
21
|
-
phone?: string;
|
|
22
|
-
}
|
|
23
|
-
export interface CloseRes {
|
|
24
|
-
data: {};
|
|
25
|
-
type: string;
|
|
26
|
-
}
|
|
2
|
+
import { RegionData, ChangeCallBack, CloseCallBack, AddressList } from './type';
|
|
27
3
|
export interface AddressProps {
|
|
28
4
|
className?: string;
|
|
29
5
|
style?: CSSProperties;
|
|
30
6
|
modelValue: boolean;
|
|
7
|
+
modelSelect: (string | number)[];
|
|
31
8
|
type: string;
|
|
32
9
|
customAddressTitle: string;
|
|
33
10
|
province: RegionData[];
|
|
@@ -44,14 +21,14 @@ export interface AddressProps {
|
|
|
44
21
|
closeBtnIcon: string;
|
|
45
22
|
backBtnIcon: string;
|
|
46
23
|
onSelected?: (prevExistAdd: AddressList, item: AddressList, copyExistAdd: AddressList[]) => void;
|
|
47
|
-
onClose?: (cal:
|
|
24
|
+
onClose?: (cal: CloseCallBack) => void;
|
|
48
25
|
closeMask?: (cal: {
|
|
49
26
|
closeWay: string;
|
|
50
27
|
}) => void;
|
|
51
28
|
switchModule?: (cal: {
|
|
52
29
|
type: string;
|
|
53
30
|
}) => void;
|
|
54
|
-
onChange?: (cal:
|
|
31
|
+
onChange?: (cal: ChangeCallBack) => void;
|
|
55
32
|
onTabChecked?: (cal: string) => void;
|
|
56
33
|
}
|
|
57
34
|
export declare const Address: FunctionComponent<Partial<AddressProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>>;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
-
import { RegionData } from './
|
|
2
|
+
import { RegionData, NextListObj } from './type';
|
|
3
3
|
export interface AddressProps {
|
|
4
|
+
modelValue: (string | number)[];
|
|
4
5
|
type: string;
|
|
5
6
|
province: RegionData[];
|
|
6
7
|
city: RegionData[];
|
|
7
8
|
country: RegionData[];
|
|
8
9
|
town: RegionData[];
|
|
9
10
|
height: string | number;
|
|
10
|
-
onNextArea?: (cal:
|
|
11
|
-
next: string;
|
|
12
|
-
value: string | RegionData;
|
|
13
|
-
custom: string;
|
|
14
|
-
selectedRegion: {};
|
|
15
|
-
}) => void;
|
|
11
|
+
onNextArea?: (cal: NextListObj) => void;
|
|
16
12
|
onTabClick?: (type: string) => void;
|
|
17
13
|
onClose?: () => void;
|
|
18
14
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface RegionData {
|
|
2
|
+
name?: string;
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}
|
|
5
|
+
export interface ChangeCallBack {
|
|
6
|
+
next: string;
|
|
7
|
+
value: string | RegionData;
|
|
8
|
+
custom: string;
|
|
9
|
+
}
|
|
10
|
+
export interface CloseCallBackData extends SelectedRegionObj {
|
|
11
|
+
addressIdStr: string;
|
|
12
|
+
addressStr: string;
|
|
13
|
+
}
|
|
14
|
+
export interface CloseCallBack {
|
|
15
|
+
data: CloseCallBackData | AddressList;
|
|
16
|
+
type: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AddressList {
|
|
19
|
+
id?: string | number;
|
|
20
|
+
provinceName: string;
|
|
21
|
+
cityName: string;
|
|
22
|
+
countyName: string;
|
|
23
|
+
townName: string;
|
|
24
|
+
addressDetail: string;
|
|
25
|
+
selectedAddress: boolean;
|
|
26
|
+
name?: string;
|
|
27
|
+
phone?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface NextListObj {
|
|
30
|
+
next: string;
|
|
31
|
+
value: string | RegionData;
|
|
32
|
+
custom: string;
|
|
33
|
+
selectedRegion?: SelectedRegionObj;
|
|
34
|
+
}
|
|
35
|
+
export interface SelectedRegionObj {
|
|
36
|
+
province: RegionData;
|
|
37
|
+
city: RegionData;
|
|
38
|
+
country: RegionData;
|
|
39
|
+
town: RegionData;
|
|
40
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
1
|
+
import { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
export interface BadgeProps {
|
|
3
3
|
value: any;
|
|
4
4
|
dot: boolean;
|
|
@@ -8,6 +8,7 @@ export interface BadgeProps {
|
|
|
8
8
|
zIndex: string;
|
|
9
9
|
color: string;
|
|
10
10
|
icons: any;
|
|
11
|
+
children?: ReactNode;
|
|
11
12
|
}
|
|
12
13
|
export declare type BadgeType = 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
13
14
|
export declare const Badge: FunctionComponent<Partial<BadgeProps>>;
|
|
@@ -9,9 +9,9 @@ export interface CardProps {
|
|
|
9
9
|
shopName: string;
|
|
10
10
|
className: string;
|
|
11
11
|
style: React.CSSProperties;
|
|
12
|
-
prolistTpl: React.
|
|
13
|
-
shopTagTpl: React.
|
|
14
|
-
originTpl: React.
|
|
15
|
-
footerTpl: React.
|
|
12
|
+
prolistTpl: React.ReactNode;
|
|
13
|
+
shopTagTpl: React.ReactNode;
|
|
14
|
+
originTpl: React.ReactNode;
|
|
15
|
+
footerTpl: React.ReactNode;
|
|
16
16
|
}
|
|
17
17
|
export declare const Card: FunctionComponent<Partial<CardProps> & React.HTMLAttributes<HTMLDivElement>>;
|
package/dist/types/col/col.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
declare type EventType = 'row' | 'col';
|
|
2
3
|
export interface ColProps {
|
|
3
4
|
span: string | number;
|
|
4
5
|
offset: string | number;
|
|
5
6
|
gutter: string | number;
|
|
7
|
+
onClick: (e: any, type: EventType) => void;
|
|
6
8
|
}
|
|
7
|
-
export declare const Col: FunctionComponent<Partial<ColProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
9
|
+
export declare const Col: FunctionComponent<Partial<ColProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
10
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
2
|
export interface CollapseProps {
|
|
3
3
|
activeName: Array<number | string> | number | string;
|
|
4
4
|
accordion: boolean;
|
|
@@ -7,5 +7,6 @@ export interface CollapseProps {
|
|
|
7
7
|
iconColor: string;
|
|
8
8
|
rotate: number;
|
|
9
9
|
change: (isOpen: boolean, name: string) => void;
|
|
10
|
+
children?: React.ReactNode;
|
|
10
11
|
}
|
|
11
12
|
export declare const Collapse: FunctionComponent<Partial<CollapseProps>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { FunctionComponent
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
2
|
declare type Direction = 'right' | 'left';
|
|
3
3
|
declare type Position = {
|
|
4
4
|
top?: string;
|
|
@@ -8,15 +8,15 @@ export interface FixedNavProps {
|
|
|
8
8
|
fixednavClass: string;
|
|
9
9
|
visible: boolean;
|
|
10
10
|
overlay: boolean;
|
|
11
|
-
navList: Array<
|
|
11
|
+
navList: Array<any>;
|
|
12
12
|
activeText: string;
|
|
13
13
|
unActiveText: string;
|
|
14
14
|
position: Position;
|
|
15
15
|
type: Direction;
|
|
16
16
|
onChange: (v: any) => void;
|
|
17
|
-
onSelected:
|
|
18
|
-
slotList:
|
|
19
|
-
slotBtn:
|
|
17
|
+
onSelected: (item: any, e: any) => void;
|
|
18
|
+
slotList: React.ReactNode;
|
|
19
|
+
slotBtn: React.ReactNode;
|
|
20
20
|
}
|
|
21
21
|
export declare const FixedNav: FunctionComponent<Partial<FixedNavProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
22
22
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { CSSProperties, FunctionComponent,
|
|
1
|
+
import React, { CSSProperties, FunctionComponent, HTMLInputTypeAttribute } from 'react';
|
|
2
2
|
export declare type InputAlignType = 'left' | 'center' | 'right';
|
|
3
3
|
export declare type InputFormatTrigger = 'onChange' | 'onBlur';
|
|
4
4
|
export declare type InputType = HTMLInputTypeAttribute;
|
|
@@ -41,8 +41,8 @@ export interface InputProps {
|
|
|
41
41
|
autofocus: boolean;
|
|
42
42
|
style?: CSSProperties;
|
|
43
43
|
className?: string;
|
|
44
|
-
slotButton?:
|
|
45
|
-
slotInput?:
|
|
44
|
+
slotButton?: React.ReactNode;
|
|
45
|
+
slotInput?: React.ReactNode;
|
|
46
46
|
formatter: (value: string) => void;
|
|
47
47
|
change?: (value: any, event: Event) => void;
|
|
48
48
|
blur?: (value: any, event: Event) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -16,5 +16,6 @@ export interface NavBarProps {
|
|
|
16
16
|
onClickIcon: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
17
17
|
onClickBack: (e: React.MouseEvent<HTMLElement>) => void;
|
|
18
18
|
onClickRight: (e: React.MouseEvent<HTMLDivElement>) => void;
|
|
19
|
+
children?: React.ReactNode;
|
|
19
20
|
}
|
|
20
21
|
export declare const NavBar: FunctionComponent<Partial<NavBarProps>>;
|
|
@@ -18,6 +18,9 @@ import Pagination from './pagination';
|
|
|
18
18
|
import Tabs from './tabs';
|
|
19
19
|
import TabPane from './tabpane';
|
|
20
20
|
import Indicator from './indicator';
|
|
21
|
+
import SideNavBar from './sidenavbar';
|
|
22
|
+
import SubSideNavBar from './subsidenavbar';
|
|
23
|
+
import SideNavBarItem from './sidenavbaritem';
|
|
21
24
|
import Range from './range';
|
|
22
25
|
import Calendar from './calendar';
|
|
23
26
|
import Checkbox from './checkbox';
|
|
@@ -62,6 +65,7 @@ import CollapseItem from './collapseitem';
|
|
|
62
65
|
import AnimatingNumbers from './animatingnumbers';
|
|
63
66
|
import Empty from './empty';
|
|
64
67
|
import VirtualList from './virtuallist';
|
|
68
|
+
import Table from './table';
|
|
65
69
|
import Video from './video';
|
|
66
70
|
import Progress from './progress';
|
|
67
71
|
import Address from './address';
|
|
@@ -71,4 +75,4 @@ import Card from './card';
|
|
|
71
75
|
import TimePannel from './timepannel';
|
|
72
76
|
import TimeDetail from './timedetail';
|
|
73
77
|
import TimeSelect from './timeselect';
|
|
74
|
-
export { Button, Cell, CellGroup, Icon, Overlay, Popup, ConfigProvider, Layout, Col, Row, Divider, NavBar, FixedNav, Tabbar, TabbarItem, Elevator, Pagination, Tabs, TabPane, Indicator, Range, Calendar, Checkbox, CheckboxGroup, DatePicker, InputNumber, Input, Radio, RadioGroup, Rate, CalendarItem, Picker, ShortPassword, TextArea, Uploader, SearchBar, NumberKeyboard, ActionSheet, BackTop, Drag, Dialog, Infiniteloading, Notify, Switch, Toast, CircleProgress, NoticeBar, Steps, Step, Swiper, SwiperItem, Avatar, AvatarGroup, Price, Badge, Tag, Popover, Skeleton, CountDown, Collapse, CollapseItem, AnimatingNumbers, Empty, VirtualList, Video, Progress, Address, Barrage, Signature, Card, TimePannel, TimeDetail, TimeSelect };
|
|
78
|
+
export { Button, Cell, CellGroup, Icon, Overlay, Popup, ConfigProvider, Layout, Col, Row, Divider, NavBar, FixedNav, Tabbar, TabbarItem, Elevator, Pagination, Tabs, TabPane, Indicator, SideNavBar, SubSideNavBar, SideNavBarItem, Range, Calendar, Checkbox, CheckboxGroup, DatePicker, InputNumber, Input, Radio, RadioGroup, Rate, CalendarItem, Picker, ShortPassword, TextArea, Uploader, SearchBar, NumberKeyboard, ActionSheet, BackTop, Drag, Dialog, Infiniteloading, Notify, Switch, Toast, CircleProgress, NoticeBar, Steps, Step, Swiper, SwiperItem, Avatar, AvatarGroup, Price, Badge, Tag, Popover, Skeleton, CountDown, Collapse, CollapseItem, AnimatingNumbers, Empty, VirtualList, Table, Video, Progress, Address, Barrage, Signature, Card, TimePannel, TimeDetail, TimeSelect };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface TriggerProps {
|
|
3
3
|
className?: string | undefined;
|
|
4
|
+
children?: React.ReactNode;
|
|
4
5
|
forwardedRef: React.RefObject<HTMLElement>;
|
|
5
6
|
}
|
|
6
|
-
interface TriggerState {
|
|
7
|
-
}
|
|
8
7
|
/**
|
|
9
8
|
* 过滤ref
|
|
10
9
|
*/
|
|
@@ -13,8 +12,7 @@ export declare function fillRef<T>(ref: React.Ref<T>, node: T): void;
|
|
|
13
12
|
* 将ref合并到一个ref函数中以支持ref传递
|
|
14
13
|
*/
|
|
15
14
|
export declare function composeRef<T>(...refs: React.Ref<T>[]): React.Ref<T>;
|
|
16
|
-
export default class Trigger extends React.Component<TriggerProps,
|
|
17
|
-
constructor(props: any);
|
|
15
|
+
export default class Trigger extends React.Component<TriggerProps, unknown> {
|
|
18
16
|
fireEvents(type: string, e: Event): void;
|
|
19
17
|
render(): JSX.Element;
|
|
20
18
|
}
|
|
@@ -7,6 +7,7 @@ export interface PopoverProps {
|
|
|
7
7
|
className: string;
|
|
8
8
|
style?: CSSProperties;
|
|
9
9
|
onClick: (e: MouseEvent) => void;
|
|
10
|
+
children?: React.ReactNode;
|
|
10
11
|
}
|
|
11
12
|
export declare function findDOMNode<T = HTMLElement>(node: React.ReactInstance | HTMLElement): T;
|
|
12
13
|
export declare type PopoverType = 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { FunctionComponent, MouseEvent } from 'react';
|
|
2
2
|
import { OverlayProps } from '../overlay/overlay';
|
|
3
|
+
declare type Teleport = HTMLElement | (() => HTMLElement) | null;
|
|
3
4
|
interface PopupProps extends OverlayProps {
|
|
4
5
|
position: string;
|
|
5
6
|
transition: string;
|
|
@@ -9,6 +10,7 @@ interface PopupProps extends OverlayProps {
|
|
|
9
10
|
closeIconPosition: string;
|
|
10
11
|
closeIcon: string;
|
|
11
12
|
destroyOnClose: boolean;
|
|
13
|
+
teleport: Teleport;
|
|
12
14
|
overlay: boolean;
|
|
13
15
|
round: boolean;
|
|
14
16
|
onOpen: () => void;
|
package/dist/types/row/row.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
declare type EventType = 'row' | 'col';
|
|
2
3
|
export interface RowProps {
|
|
3
4
|
type: string;
|
|
4
5
|
justify: string;
|
|
5
6
|
align: string;
|
|
6
7
|
wrap: string;
|
|
7
8
|
gutter: string | number;
|
|
9
|
+
onClick: (e: any, type: EventType) => void;
|
|
8
10
|
}
|
|
9
|
-
export declare const Row: FunctionComponent<Partial<RowProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
11
|
+
export declare const Row: FunctionComponent<Partial<RowProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type NavBarProps = {
|
|
3
|
+
showhead?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export interface SideNavBarProps extends React.HTMLAttributes<HTMLDivElement>, NavBarProps {
|
|
6
|
+
title: string;
|
|
7
|
+
visible: boolean;
|
|
8
|
+
width?: string;
|
|
9
|
+
offset?: number;
|
|
10
|
+
position?: 'left' | 'right';
|
|
11
|
+
handleClose: () => void;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare type SideNavBarItemProps = {
|
|
15
|
+
title: string;
|
|
16
|
+
ikey: string | number;
|
|
17
|
+
click?: ({ title, ikey }: {
|
|
18
|
+
title: string;
|
|
19
|
+
ikey: string | number;
|
|
20
|
+
}) => void;
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
};
|
|
23
|
+
export declare type SubNavBarProps = {
|
|
24
|
+
title: string;
|
|
25
|
+
ikey: string | number;
|
|
26
|
+
open?: boolean;
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
titleClick?: ({ title, ikey, isShow, }: {
|
|
29
|
+
title: string;
|
|
30
|
+
ikey: string | number;
|
|
31
|
+
isShow: boolean;
|
|
32
|
+
}) => void;
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TableProps {
|
|
3
|
+
className: string;
|
|
4
|
+
style: React.CSSProperties;
|
|
5
|
+
columns: Array<TableColumnProps>;
|
|
6
|
+
data: Array<any>;
|
|
7
|
+
bordered: boolean;
|
|
8
|
+
summary?: React.ReactNode;
|
|
9
|
+
striped?: boolean;
|
|
10
|
+
noData?: React.ReactNode;
|
|
11
|
+
onSorter?: (item: TableColumnProps, data: Array<any>) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface TableColumnProps {
|
|
14
|
+
key: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
align?: string;
|
|
17
|
+
sorter?: ((a: any, b: any) => number) | boolean | string;
|
|
18
|
+
render?: (rowData?: any, rowIndex?: number) => string | React.ReactNode;
|
|
19
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
2
|
export interface TabPaneProps {
|
|
3
3
|
title: string | number;
|
|
4
4
|
paneKey: string | number;
|
|
5
5
|
activeKey: string | number;
|
|
6
6
|
disabled: boolean;
|
|
7
7
|
autoHeightClassName: string;
|
|
8
|
+
children?: React.ReactNode;
|
|
8
9
|
}
|
|
9
10
|
export declare const TabPane: FunctionComponent<Partial<TabPaneProps>>;
|
package/dist/types/tag/tag.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
2
|
export interface TagProps {
|
|
3
3
|
type: TagType;
|
|
4
4
|
color: string;
|
|
@@ -10,6 +10,7 @@ export interface TagProps {
|
|
|
10
10
|
prefixCls: string;
|
|
11
11
|
onClick: (e: MouseEvent) => void;
|
|
12
12
|
onClose: (e?: any) => void;
|
|
13
|
+
children?: React.ReactNode;
|
|
13
14
|
}
|
|
14
15
|
export declare type TagType = 'default' | 'primary' | 'success' | 'warning' | 'danger';
|
|
15
16
|
export declare const Tag: FunctionComponent<Partial<TagProps>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|