@nutui/nutui-react 1.1.3-beta.1 → 1.1.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/CountDown/style/index.js +2 -0
- package/dist/esm/CountDown.js +217 -0
- package/dist/esm/Dialog.js +18 -10
- package/dist/esm/nutui-react.es.js +1 -0
- package/dist/nutui.react.es.js +363 -150
- package/dist/nutui.react.umd.js +17 -17
- package/dist/packages/countdown/countdown.scss +3 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +1 -0
- package/dist/types/button/__test__/button.spec.d.ts +1 -0
- package/dist/types/countdown/countdown.d.ts +15 -0
- package/dist/types/countdown/index.d.ts +2 -0
- package/dist/types/dialog/DialogWrap.d.ts +2 -2
- package/dist/types/dialog/DialogWrapper.d.ts +3 -0
- package/dist/types/dialog/config.d.ts +1 -1
- package/dist/types/nutui.react.d.ts +2 -1
- package/package.json +11 -2
package/dist/style.es.js
CHANGED
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
@import '../../packages/tag/tag.scss';
|
|
53
53
|
@import '../../packages/popover/popover.scss';
|
|
54
54
|
@import '../../packages/skeleton/skeleton.scss';
|
|
55
|
+
@import '../../packages/countdown/countdown.scss';
|
|
55
56
|
@import '../../packages/collapse/collapse.scss';
|
|
56
57
|
@import '../../packages/collapseitem/collapseitem.scss';
|
|
57
58
|
@import '../../packages/animatingnumbers/animatingnumbers.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { FunctionComponent, CSSProperties } from 'react';
|
|
2
|
+
export interface CountDownProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: CSSProperties;
|
|
5
|
+
paused: boolean;
|
|
6
|
+
showDays: boolean;
|
|
7
|
+
showPlainText: boolean;
|
|
8
|
+
startTime: number | string;
|
|
9
|
+
endTime: number | string;
|
|
10
|
+
onEnd: () => void;
|
|
11
|
+
onPaused: (restTime: number) => void;
|
|
12
|
+
onRestart: (restTime: number) => void;
|
|
13
|
+
onUpdate: (restTime: any) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const CountDown: FunctionComponent<Partial<CountDownProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -4,8 +4,8 @@ interface DialogWrapProps {
|
|
|
4
4
|
mask?: boolean;
|
|
5
5
|
lockScroll?: boolean;
|
|
6
6
|
closeOnClickOverlay?: boolean;
|
|
7
|
-
onCancel?:
|
|
8
|
-
onClosed?:
|
|
7
|
+
onCancel?: () => void;
|
|
8
|
+
onClosed?: () => void;
|
|
9
9
|
}
|
|
10
10
|
export declare const DialogWrap: FunctionComponent<Partial<DialogWrapProps> & HTMLAttributes<HTMLDivElement>>;
|
|
11
11
|
export {};
|
|
@@ -3,6 +3,9 @@ interface DialogWrapperProps {
|
|
|
3
3
|
visible?: boolean;
|
|
4
4
|
title?: ReactNode;
|
|
5
5
|
footer?: ReactNode;
|
|
6
|
+
lockScroll?: boolean;
|
|
7
|
+
onCancel?: () => void;
|
|
8
|
+
onClosed?: () => void;
|
|
6
9
|
}
|
|
7
10
|
export declare const DialogWrapper: FunctionComponent<Partial<DialogWrapperProps> & HTMLAttributes<HTMLDivElement>>;
|
|
8
11
|
export {};
|
|
@@ -22,7 +22,7 @@ export interface DialogProps {
|
|
|
22
22
|
textAlign?: any;
|
|
23
23
|
footerDirection?: string;
|
|
24
24
|
lockScroll?: boolean;
|
|
25
|
-
onClosed?:
|
|
25
|
+
onClosed?: () => void;
|
|
26
26
|
onOk?: (e?: MouseEvent) => Promise<any> | void;
|
|
27
27
|
onCancel?: () => void;
|
|
28
28
|
onConfirm?: (e?: MouseEvent) => Promise<any> | void;
|
|
@@ -51,6 +51,7 @@ import Badge from './badge';
|
|
|
51
51
|
import Tag from './tag';
|
|
52
52
|
import Popover from './popover';
|
|
53
53
|
import Skeleton from './skeleton';
|
|
54
|
+
import CountDown from './countdown';
|
|
54
55
|
import Collapse from './collapse';
|
|
55
56
|
import CollapseItem from './collapseitem';
|
|
56
57
|
import AnimatingNumbers from './animatingnumbers';
|
|
@@ -58,4 +59,4 @@ import Address from './address';
|
|
|
58
59
|
import Barrage from './barrage';
|
|
59
60
|
import Signature from './signature';
|
|
60
61
|
import Card from './card';
|
|
61
|
-
export { Button, Cell, CellGroup, Icon, Overlay, Popup, Layout, Col, Row, Divider, NavBar, FixedNav, Tabbar, TabbarItem, Elevator, Pagination, Tabs, TabPane, Range, Calendar, Checkbox, CheckboxGroup, DatePicker, InputNumber, Input, Radio, RadioGroup, Rate, CalendarItem, Picker, ShortPassword, TextArea, Uploader, ActionSheet, BackTop, Drag, Dialog, Infiniteloading, Notify, Switch, Toast, CircleProgress, NoticeBar, Steps, Step, Swiper, SwiperItem, Avatar, Price, Badge, Tag, Popover, Skeleton, Collapse, CollapseItem, AnimatingNumbers, Address, Barrage, Signature, Card };
|
|
62
|
+
export { Button, Cell, CellGroup, Icon, Overlay, Popup, Layout, Col, Row, Divider, NavBar, FixedNav, Tabbar, TabbarItem, Elevator, Pagination, Tabs, TabPane, Range, Calendar, Checkbox, CheckboxGroup, DatePicker, InputNumber, Input, Radio, RadioGroup, Rate, CalendarItem, Picker, ShortPassword, TextArea, Uploader, ActionSheet, BackTop, Drag, Dialog, Infiniteloading, Notify, Switch, Toast, CircleProgress, NoticeBar, Steps, Step, Swiper, SwiperItem, Avatar, Price, Badge, Tag, Popover, Skeleton, CountDown, Collapse, CollapseItem, AnimatingNumbers, Address, Barrage, Signature, Card };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nutui/nutui-react",
|
|
3
|
-
"version": "1.1.3-beta.
|
|
3
|
+
"version": "1.1.3-beta.2",
|
|
4
4
|
"style": "dist/style.css",
|
|
5
5
|
"main": "dist/nutui.react.umd.js",
|
|
6
6
|
"module": "dist/esm/nutui-react.es.js",
|
|
@@ -54,7 +54,8 @@
|
|
|
54
54
|
"lint": "eslint .",
|
|
55
55
|
"lint:fix": "eslint --fix .",
|
|
56
56
|
"publish:beta": "npm publish --tag beta",
|
|
57
|
-
"prepare": "husky install"
|
|
57
|
+
"prepare": "husky install",
|
|
58
|
+
"test": "jest"
|
|
58
59
|
},
|
|
59
60
|
"lint-staged": {
|
|
60
61
|
"*.md": "prettier --write",
|
|
@@ -84,12 +85,16 @@
|
|
|
84
85
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
85
86
|
"@rollup/plugin-node-resolve": "^13.1.1",
|
|
86
87
|
"@rollup/plugin-typescript": "^8.3.0",
|
|
88
|
+
"@testing-library/jest-dom": "^5.16.3",
|
|
89
|
+
"@testing-library/react": "^12.1.5",
|
|
90
|
+
"@types/jest": "^27.4.1",
|
|
87
91
|
"@types/loadable__component": "^5.13.3",
|
|
88
92
|
"@types/node": "^15.3.1",
|
|
89
93
|
"@types/react": "^17.0.0",
|
|
90
94
|
"@types/react-dom": "^17.0.0",
|
|
91
95
|
"@types/react-router-dom": "^5.1.7",
|
|
92
96
|
"@types/react-syntax-highlighter": "^13.5.2",
|
|
97
|
+
"@types/react-test-renderer": "^18.0.0",
|
|
93
98
|
"@types/react-transition-group": "^4.4.4",
|
|
94
99
|
"@typescript-eslint/eslint-plugin": "^4.24.0",
|
|
95
100
|
"@typescript-eslint/parser": "^4.24.0",
|
|
@@ -112,6 +117,7 @@
|
|
|
112
117
|
"glob": "^7.2.0",
|
|
113
118
|
"husky": "^6.0.0",
|
|
114
119
|
"inquirer": "^8.0.0",
|
|
120
|
+
"jest": "^27.5.1",
|
|
115
121
|
"lint-staged": "^11.0.0",
|
|
116
122
|
"lzutf8": "^0.6.0",
|
|
117
123
|
"map-stream": "0.0.7",
|
|
@@ -123,10 +129,13 @@
|
|
|
123
129
|
"react-dom": "^17.0.0",
|
|
124
130
|
"react-markdown": "^7.1.2",
|
|
125
131
|
"react-syntax-highlighter": "^15.4.5",
|
|
132
|
+
"react-test-renderer": "^17.0.2",
|
|
126
133
|
"remark-directive": "^2.0.1",
|
|
127
134
|
"remark-gfm": "^3.0.1",
|
|
128
135
|
"sass": "^1.45.0",
|
|
129
136
|
"shelljs": "^0.8.4",
|
|
137
|
+
"ts-jest": "^27.1.4",
|
|
138
|
+
"ts-node": "^10.7.0",
|
|
130
139
|
"typescript": "^4.1.2",
|
|
131
140
|
"unist-util-visit": "^4.1.0",
|
|
132
141
|
"vinyl-fs": "^3.0.3",
|