@nutui/nutui-react 1.1.4-beta.1 → 1.1.4-beta.4
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/Avatar/style/index.js +1 -1
- package/dist/esm/Avatar.js +97 -20
- package/dist/esm/AvatarContext-7153ad2b.js +3 -0
- package/dist/esm/AvatarGroup/style/index.js +2 -0
- package/dist/esm/AvatarGroup.js +50 -0
- package/dist/esm/BackTop.js +16 -12
- package/dist/esm/Barrage.js +0 -1
- package/dist/esm/CircleProgress.js +93 -56
- package/dist/esm/Skeleton.js +20 -12
- package/dist/esm/Step.js +14 -3
- package/dist/esm/Steps.js +4 -1
- package/dist/esm/Swiper.js +2 -1
- package/dist/esm/TabbarItem.js +9 -0
- package/dist/esm/Uploader/style/index.js +2 -1
- package/dist/esm/Uploader.js +84 -18
- package/dist/esm/nutui-react.es.js +1 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.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 +472 -250
- package/dist/nutui.react.umd.js +12 -12
- package/dist/packages/avatar/avatar.scss +16 -6
- package/dist/packages/avatargroup/avatargroup.scss +14 -0
- package/dist/packages/circleprogress/circleprogress.scss +12 -53
- package/dist/packages/configprovider/configprovider.scss +0 -2
- package/dist/packages/skeleton/skeleton.scss +1 -3
- package/dist/packages/step/step.scss +29 -29
- package/dist/packages/uploader/uploader.scss +97 -14
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +1 -0
- package/dist/styles/variables.scss +36 -4
- package/dist/types/avatar/__tests__/avatar.spec.d.ts +1 -0
- package/dist/types/avatar/avatar.d.ts +6 -3
- package/dist/types/avatargroup/AvatarContext.d.ts +2 -0
- package/dist/types/avatargroup/__tests__/avatargroup.spec.d.ts +1 -0
- package/dist/types/avatargroup/avatargroup.d.ts +14 -0
- package/dist/types/avatargroup/index.d.ts +2 -0
- package/dist/types/barrage/__tests__/barrage.spec.d.ts +1 -0
- package/dist/types/button/button.d.ts +2 -2
- package/dist/types/checkbox/__test__/checkbox.spec.d.ts +1 -0
- package/dist/types/circleprogress/__tests__/circleprogress.spec.d.ts +1 -0
- package/dist/types/circleprogress/circleprogress.d.ts +11 -5
- package/dist/types/icon/__test__/icon.spec.d.ts +1 -0
- package/dist/types/infiniteloading/__tests__/infiniteloading.spec.d.ts +1 -0
- package/dist/types/inputnumber/__tests__/inputnumber.spec.d.ts +1 -0
- package/dist/types/nutui.react.d.ts +2 -1
- package/dist/types/overlay/__tests__/overlay.spec.d.ts +1 -0
- package/dist/types/skeleton/__test__/skeleton.spec.d.ts +1 -0
- package/dist/types/skeleton/skeleton.d.ts +2 -2
- package/dist/types/step/step.d.ts +1 -0
- package/dist/types/steps/__tests__/steps.spec.d.ts +1 -0
- package/dist/types/steps/steps.d.ts +1 -0
- package/dist/types/tabbaritem/tabbaritem.d.ts +1 -0
- package/dist/types/uploader/__tests__/uploader.spec.d.ts +1 -0
- package/dist/types/uploader/uploader.d.ts +9 -1
- package/package.json +6 -3
- package/dist/styles/variables-jdw.scss +0 -376
package/dist/style.es.js
CHANGED
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
@import '../../packages/swiper/swiper.scss';
|
|
48
48
|
@import '../../packages/swiperitem/swiperitem.scss';
|
|
49
49
|
@import '../../packages/avatar/avatar.scss';
|
|
50
|
+
@import '../../packages/avatargroup/avatargroup.scss';
|
|
50
51
|
@import '../../packages/price/price.scss';
|
|
51
52
|
@import '../../packages/badge/badge.scss';
|
|
52
53
|
@import '../../packages/tag/tag.scss';
|
|
@@ -117,9 +117,9 @@ $icon-line-height: 20px;
|
|
|
117
117
|
|
|
118
118
|
// uploader
|
|
119
119
|
|
|
120
|
-
$uploader-width: 100px;
|
|
121
|
-
$uploader-height: 100px;
|
|
122
|
-
$uploader-background: #f7f8fa;
|
|
120
|
+
$uploader-picture-width: 100px !default;
|
|
121
|
+
$uploader-picture-height: 100px !default;
|
|
122
|
+
$uploader-background: #f7f8fa !default;
|
|
123
123
|
|
|
124
124
|
//input
|
|
125
125
|
$input-border-bottom: #eaf0fb;
|
|
@@ -252,7 +252,33 @@ $rang-bar-bg-color: linear-gradient(135deg, $primary-color 0%, $primary-color-en
|
|
|
252
252
|
$address-region-tab-line: linear-gradient(90deg, $primary-color 0%, $primary-color-end 100%);
|
|
253
253
|
|
|
254
254
|
//steps
|
|
255
|
-
$
|
|
255
|
+
$steps-base-icon-width: 25px !default;
|
|
256
|
+
$steps-base-icon-height: 25px !default;
|
|
257
|
+
$steps-base-icon-line-height: 25px !default;
|
|
258
|
+
$steps-base-icon-font-size: 13px !default;
|
|
259
|
+
$steps-base-title-font-size: 14px !default;
|
|
260
|
+
$steps-base-line-color: #909ca4 !default;
|
|
261
|
+
$steps-base-title-color: #909ca4 !default;
|
|
262
|
+
$steps-base-title-margin-bottom: 10px !default;
|
|
263
|
+
$steps-base-content-font-size: 14px !default;
|
|
264
|
+
$steps-base-content-color: #666 !default;
|
|
265
|
+
|
|
266
|
+
$steps-wait-icon-bg-color: #959fb1 !default;
|
|
267
|
+
$steps-wait-icon-color: $white !default;
|
|
268
|
+
$steps-wait-head-color: #909ca4 !default;
|
|
269
|
+
$steps-wait-head-border-color: #909ca4 !default;
|
|
270
|
+
$steps-wait-content-color: #909ca4 !default;
|
|
271
|
+
|
|
272
|
+
$steps-finish-head-color: $primary-color !default;
|
|
273
|
+
$steps-finish-head-border-color: $primary-color !default;
|
|
274
|
+
$steps-finish-title-color: $primary-color !default;
|
|
275
|
+
$steps-finish-line-background: $primary-color !default;
|
|
276
|
+
$steps-finish-icon-text-color: $white !default;
|
|
277
|
+
|
|
278
|
+
$steps-process-head-color: $white !default;
|
|
279
|
+
$steps-process-head-border-color: $primary-color !default;
|
|
280
|
+
$steps-process-title-color: $primary-color !default;
|
|
281
|
+
$steps-process-icon-text-color: $primary-color !default;
|
|
256
282
|
|
|
257
283
|
// dialog
|
|
258
284
|
$dialog-width: 296px;
|
|
@@ -374,3 +400,9 @@ $tabs-vertical-tab-line-color: linear-gradient(
|
|
|
374
400
|
$tabs-vertical-titles-item-height: 40px !default;
|
|
375
401
|
$tabs-vertical-titles-item-active-line-height: 14px !default;
|
|
376
402
|
$tabs-vertical-titles-width: 100px !default;
|
|
403
|
+
|
|
404
|
+
// circleProgress
|
|
405
|
+
$circleprogress-primary-color: $primary-color !default;
|
|
406
|
+
$circleprogress-path-color: #e5e9f2 !default;
|
|
407
|
+
$circleprogress-text-color: #000000 !default;
|
|
408
|
+
$circleprogress-text-size: $font-size-3 !default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
export interface AvatarProps {
|
|
3
|
-
size:
|
|
3
|
+
size: string;
|
|
4
4
|
icon: string;
|
|
5
5
|
shape: AvatarShape;
|
|
6
6
|
bgColor: string;
|
|
7
|
+
color: string;
|
|
7
8
|
prefixCls: string;
|
|
8
|
-
|
|
9
|
+
url: string;
|
|
9
10
|
className: string;
|
|
11
|
+
alt: string;
|
|
10
12
|
style: React.CSSProperties;
|
|
13
|
+
activeAvatar: (e: MouseEvent) => void;
|
|
14
|
+
onError: (e: any) => void;
|
|
11
15
|
}
|
|
12
|
-
export declare type AvatarSize = 'large' | 'normal' | 'small';
|
|
13
16
|
export declare type AvatarShape = 'round' | 'square';
|
|
14
17
|
export declare const Avatar: FunctionComponent<Partial<AvatarProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
export interface AvatarGroupProps {
|
|
3
|
+
maxContent: string;
|
|
4
|
+
maxCount: string | number;
|
|
5
|
+
maxBgColor: string;
|
|
6
|
+
maxColor: string;
|
|
7
|
+
size: string;
|
|
8
|
+
shape: string;
|
|
9
|
+
span: string;
|
|
10
|
+
zIndex: string;
|
|
11
|
+
className: string;
|
|
12
|
+
style: React.CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
export declare const AvatarGroup: FunctionComponent<Partial<AvatarGroupProps> & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
2
|
export interface ButtonProps {
|
|
3
3
|
className: string;
|
|
4
4
|
color: string;
|
|
@@ -6,7 +6,7 @@ export interface ButtonProps {
|
|
|
6
6
|
plain: boolean;
|
|
7
7
|
loading: boolean;
|
|
8
8
|
disabled: boolean;
|
|
9
|
-
style:
|
|
9
|
+
style: React.CSSProperties;
|
|
10
10
|
type: ButtonType;
|
|
11
11
|
size: ButtonSize;
|
|
12
12
|
block: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
export interface IColor {
|
|
3
|
+
[key: string]: string;
|
|
4
|
+
}
|
|
2
5
|
export interface CircleProgressProps {
|
|
3
|
-
strokeInnerWidth: string | number;
|
|
4
6
|
progress: string | number;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
strokeWidth?: string | number;
|
|
8
|
+
radius?: number | string;
|
|
9
|
+
strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit' | undefined;
|
|
10
|
+
circleColor?: object | string;
|
|
11
|
+
pathColor?: string;
|
|
12
|
+
clockwise?: boolean;
|
|
13
|
+
className?: string;
|
|
8
14
|
}
|
|
9
|
-
export declare const CircleProgress: FunctionComponent<
|
|
15
|
+
export declare const CircleProgress: FunctionComponent<CircleProgressProps & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -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';
|
|
@@ -46,6 +46,7 @@ import Step from './step';
|
|
|
46
46
|
import Swiper from './swiper';
|
|
47
47
|
import SwiperItem from './swiperitem';
|
|
48
48
|
import Avatar from './avatar';
|
|
49
|
+
import AvatarGroup from './avatargroup';
|
|
49
50
|
import Price from './price';
|
|
50
51
|
import Badge from './badge';
|
|
51
52
|
import Tag from './tag';
|
|
@@ -60,4 +61,4 @@ import Address from './address';
|
|
|
60
61
|
import Barrage from './barrage';
|
|
61
62
|
import Signature from './signature';
|
|
62
63
|
import Card from './card';
|
|
63
|
-
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, ConfigProvider, Address, Barrage, Signature, Card };
|
|
64
|
+
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, AvatarGroup, Price, Badge, Tag, Popover, Skeleton, CountDown, Collapse, CollapseItem, AnimatingNumbers, ConfigProvider, Address, Barrage, Signature, Card };
|
|
@@ -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';
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UploadOptions } from './upload';
|
|
3
|
+
export declare type FileType<T> = {
|
|
4
|
+
[key: string]: T;
|
|
5
|
+
};
|
|
6
|
+
export declare type FileItemStatus = 'ready' | 'uploading' | 'success' | 'error' | 'removed';
|
|
3
7
|
export interface UploaderProps {
|
|
4
8
|
url: string;
|
|
5
9
|
maximum: string | number;
|
|
6
10
|
maximize: number;
|
|
11
|
+
defaultFileList: FileType<string>[];
|
|
12
|
+
listType: string;
|
|
7
13
|
uploadIcon: string;
|
|
14
|
+
uploadIconSize: string | number;
|
|
8
15
|
name: string;
|
|
9
16
|
accept: string;
|
|
10
17
|
disabled: boolean;
|
|
@@ -45,10 +52,11 @@ export interface UploaderProps {
|
|
|
45
52
|
}) => void;
|
|
46
53
|
beforeUpload?: (file: File[]) => Promise<File[]>;
|
|
47
54
|
beforeDelete?: (file: FileItem, files: FileItem[]) => boolean;
|
|
55
|
+
fileItemClick?: (file: FileItem) => void;
|
|
48
56
|
}
|
|
49
|
-
export declare type FileItemStatus = 'ready' | 'uploading' | 'success' | 'error' | 'removed';
|
|
50
57
|
export declare class FileItem {
|
|
51
58
|
status: FileItemStatus;
|
|
59
|
+
message: string;
|
|
52
60
|
uid: string;
|
|
53
61
|
name?: string;
|
|
54
62
|
url?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nutui/nutui-react",
|
|
3
|
-
"version": "1.1.4-beta.
|
|
3
|
+
"version": "1.1.4-beta.4",
|
|
4
4
|
"style": "dist/style.css",
|
|
5
5
|
"main": "dist/nutui.react.umd.js",
|
|
6
6
|
"module": "dist/esm/nutui-react.es.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"build:replace": "npm run replace:scss",
|
|
51
51
|
"build:es": "npx rollup -c rollup.config.es.js",
|
|
52
52
|
"build:locales": "vite build --config vite.config.build.locales.ts",
|
|
53
|
-
"build": "npm run checked && vite build --config vite.config.build.ts && npm run build:es && npm run build:css && npm run build:loader-style && npm run build:types && npm run build:locales",
|
|
53
|
+
"build": "npm run checked && npm run test && vite build --config vite.config.build.ts && npm run build:es && npm run build:css && npm run build:loader-style && npm run build:types && npm run build:locales",
|
|
54
54
|
"build:site": "npm run checked && vite build --config vite.config.build.site.ts",
|
|
55
55
|
"lint": "eslint .",
|
|
56
56
|
"lint:fix": "eslint --fix .",
|
|
@@ -58,6 +58,9 @@
|
|
|
58
58
|
"prepare": "husky install",
|
|
59
59
|
"test": "jest"
|
|
60
60
|
},
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": "^14.18.0 || >=15.0.0"
|
|
63
|
+
},
|
|
61
64
|
"lint-staged": {
|
|
62
65
|
"*.md": "prettier --write",
|
|
63
66
|
"*.{ts,tsx,js,vue,scss}": "prettier --write"
|
|
@@ -66,7 +69,7 @@
|
|
|
66
69
|
"@babel/runtime": "^7.16.5",
|
|
67
70
|
"@bem-react/classname": "^1.5.10",
|
|
68
71
|
"@react-spring/web": "^9.3.2",
|
|
69
|
-
"@use-gesture/react": "
|
|
72
|
+
"@use-gesture/react": "10.2.9",
|
|
70
73
|
"classnames": "^2.3.1",
|
|
71
74
|
"react-router-dom": "^5.2.0",
|
|
72
75
|
"react-transition-group": "^4.4.2"
|