@nutui/nutui-react 1.2.3-beta.0 → 1.2.3-beta.1
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 +2 -2
- package/dist/esm/Empty.js +2 -2
- package/dist/esm/Picker.js +4 -4
- package/dist/esm/Popover.js +19 -35
- package/dist/esm/Popup.js +54 -30
- 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 +648 -313
- 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/actionsheet/demo.d.ts +0 -1
- 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/demo.d.ts +0 -1
- package/dist/types/address/existRender.d.ts +1 -1
- package/dist/types/address/type.d.ts +40 -0
- package/dist/types/animatingnumbers/demo.d.ts +0 -1
- package/dist/types/avatar/demo.d.ts +0 -1
- package/dist/types/backtop/demo.d.ts +0 -1
- package/dist/types/badge/badge.d.ts +2 -1
- package/dist/types/badge/demo.d.ts +0 -1
- package/dist/types/barrage/demo.d.ts +0 -1
- package/dist/types/button/demo.d.ts +0 -1
- package/dist/types/calendar/demo.d.ts +0 -1
- package/dist/types/card/card.d.ts +4 -4
- package/dist/types/card/demo.d.ts +0 -1
- package/dist/types/cell/demo.d.ts +0 -1
- package/dist/types/cellgroup/cellgroup.d.ts +1 -0
- package/dist/types/checkbox/demo.d.ts +0 -1
- package/dist/types/circleprogress/demo.d.ts +0 -1
- package/dist/types/col/col.d.ts +4 -1
- package/dist/types/collapse/collapse.d.ts +2 -1
- package/dist/types/collapse/demo.d.ts +0 -1
- package/dist/types/configprovider/demo.d.ts +0 -1
- package/dist/types/countdown/demo.d.ts +0 -1
- package/dist/types/datepicker/demo.d.ts +0 -1
- package/dist/types/dialog/Mask.d.ts +0 -1
- package/dist/types/dialog/demo.d.ts +0 -1
- package/dist/types/divider/demo.d.ts +0 -1
- package/dist/types/drag/demo.d.ts +0 -1
- package/dist/types/elevator/demo.d.ts +0 -1
- package/dist/types/empty/demo.d.ts +0 -1
- package/dist/types/fixednav/demo.d.ts +0 -1
- package/dist/types/fixednav/fixednav.d.ts +5 -5
- package/dist/types/icon/demo.d.ts +0 -1
- package/dist/types/indicator/demo.d.ts +0 -1
- package/dist/types/infiniteloading/demo.d.ts +0 -1
- package/dist/types/input/demo.d.ts +0 -1
- package/dist/types/input/input.d.ts +3 -3
- package/dist/types/inputnumber/demo.d.ts +0 -1
- package/dist/types/layout/__tests__/layout.spec.d.ts +1 -0
- package/dist/types/layout/demo.d.ts +0 -1
- package/dist/types/navbar/demo.d.ts +0 -1
- package/dist/types/navbar/navbar.d.ts +1 -0
- package/dist/types/noticebar/demo.d.ts +0 -1
- package/dist/types/notify/demo.d.ts +0 -1
- package/dist/types/numberkeyboard/demo.d.ts +0 -1
- package/dist/types/nutui.react.d.ts +5 -1
- package/dist/types/overlay/demo.d.ts +0 -1
- package/dist/types/pagination/demo.d.ts +0 -1
- package/dist/types/picker/__tests__/picker.spec.d.ts +1 -0
- package/dist/types/picker/demo.d.ts +0 -1
- package/dist/types/popover/Trigger.d.ts +2 -4
- package/dist/types/popover/demo.d.ts +0 -1
- package/dist/types/popover/popover.d.ts +1 -0
- package/dist/types/popup/__tests__/popup.spec.d.ts +1 -0
- package/dist/types/popup/demo.d.ts +0 -1
- package/dist/types/popup/popup.d.ts +2 -0
- package/dist/types/price/demo.d.ts +0 -1
- package/dist/types/progress/demo.d.ts +0 -1
- package/dist/types/radio/demo.d.ts +0 -1
- package/dist/types/range/demo.d.ts +0 -1
- package/dist/types/rate/demo.d.ts +0 -1
- package/dist/types/row/row.d.ts +4 -1
- package/dist/types/searchbar/demo.d.ts +0 -1
- package/dist/types/shortpassword/demo.d.ts +0 -1
- package/dist/types/sidenavbar/__test__/sidenavbar.spec.d.ts +1 -0
- package/dist/types/sidenavbar/demo.d.ts +2 -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/signature/demo.d.ts +0 -1
- package/dist/types/skeleton/demo.d.ts +0 -1
- package/dist/types/skeleton/skeleton.d.ts +1 -0
- package/dist/types/steps/demo.d.ts +0 -1
- 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/demo.d.ts +0 -1
- package/dist/types/swiper/swiper.d.ts +1 -0
- package/dist/types/switch/demo.d.ts +0 -1
- package/dist/types/tabbar/demo.d.ts +0 -1
- 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 +2 -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/demo.d.ts +0 -1
- package/dist/types/tabs/tabs.d.ts +1 -0
- package/dist/types/tag/demo.d.ts +0 -1
- package/dist/types/tag/tag.d.ts +2 -1
- package/dist/types/textarea/demo.d.ts +0 -1
- package/dist/types/timedetail/demo.d.ts +0 -1
- package/dist/types/timepannel/demo.d.ts +0 -1
- package/dist/types/timeselect/demo.d.ts +0 -1
- package/dist/types/toast/demo.d.ts +0 -1
- package/dist/types/uploader/demo.d.ts +0 -1
- package/dist/types/video/demo.d.ts +0 -1
- package/dist/types/virtuallist/demo.d.ts +0 -1
- package/package.json +3 -3
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/demo.d.ts
CHANGED
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>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nutui/nutui-react",
|
|
3
|
-
"version": "1.2.3-beta.
|
|
3
|
+
"version": "1.2.3-beta.1",
|
|
4
4
|
"style": "dist/style.css",
|
|
5
5
|
"main": "dist/nutui.react.umd.js",
|
|
6
6
|
"module": "dist/esm/nutui-react.es.js",
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
"@types/jest": "^27.4.1",
|
|
96
96
|
"@types/loadable__component": "^5.13.3",
|
|
97
97
|
"@types/node": "^15.3.1",
|
|
98
|
-
"@types/react": "^
|
|
99
|
-
"@types/react-dom": "^
|
|
98
|
+
"@types/react": "^18.0.17",
|
|
99
|
+
"@types/react-dom": "^18.0.6",
|
|
100
100
|
"@types/react-router-dom": "^5.1.7",
|
|
101
101
|
"@types/react-syntax-highlighter": "^13.5.2",
|
|
102
102
|
"@types/react-test-renderer": "^18.0.0",
|