@nutui/nutui-react 1.3.1-beta.4 → 1.3.2-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/CHANGELOG.md +20 -0
- package/dist/esm/ActionSheet.js +10 -9
- package/dist/esm/Address.js +1 -1
- package/dist/esm/Badge.js +3 -3
- package/dist/esm/ConfigProvider.js +6 -0
- package/dist/esm/Elevator.js +38 -52
- package/dist/esm/Menu.js +26 -10
- package/dist/esm/NoticeBar.js +1 -1
- package/dist/esm/Picker.js +125 -49
- package/dist/esm/PullToRefresh/style/index.js +2 -0
- package/dist/esm/PullToRefresh.js +367 -0
- package/dist/esm/Radio.js +2 -0
- package/dist/esm/nutui-react.es.js +1 -0
- package/dist/locales/base.d.ts +6 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +7 -1
- package/dist/locales/id-ID.js +7 -1
- package/dist/locales/zh-CN.js +7 -1
- package/dist/locales/zh-TW.js +7 -1
- package/dist/nutui.react.es.js +10578 -9765
- package/dist/nutui.react.umd.js +10577 -9763
- package/dist/packages/actionsheet/actionsheet.scss +2 -0
- package/dist/packages/elevator/elevator.scss +1 -0
- package/dist/packages/pulltorefresh/pulltorefresh.scss +18 -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/actionsheet/__test__/actionsheet.spec.d.ts +1 -0
- package/dist/types/actionsheet/actionsheet.d.ts +2 -2
- package/dist/types/actionsheet/actionsheet.taro.d.ts +2 -2
- package/dist/types/badge/__test__/badge.spec.d.ts +1 -0
- package/dist/types/checkbox/checkbox.taro.d.ts +1 -1
- package/dist/types/elevator/elevator.d.ts +2 -2
- package/dist/types/elevator/elevator.taro.d.ts +2 -2
- package/dist/types/noticebar/__test__/noticebar.spec.d.ts +1 -0
- package/dist/types/nutui.react.d.ts +3 -1
- package/dist/types/picker/pickerSlot.d.ts +4 -1
- package/dist/types/picker/pickerSlot.taro.d.ts +16 -0
- package/dist/types/popup/popup.taro.d.ts +1 -1
- package/dist/types/pulltorefresh/__test__/pulltorefresh.spec.d.ts +1 -0
- package/dist/types/pulltorefresh/demo.d.ts +3 -0
- package/dist/types/pulltorefresh/index.d.ts +2 -0
- package/dist/types/pulltorefresh/index.taro.d.ts +2 -0
- package/dist/types/pulltorefresh/pulltorefresh.d.ts +18 -0
- package/dist/types/pulltorefresh/pulltorefresh.taro.d.ts +18 -0
- package/dist/types/radio/__test__/radio.spec.d.ts +1 -0
- package/dist/types/radio/radio.taro.d.ts +1 -1
- package/dist/types/radiogroup/index.taro.d.ts +1 -1
- package/dist/types/radiogroup/radiogroup.taro.d.ts +11 -0
- package/dist/types/range/__test__/range.spec.d.ts +1 -0
- package/dist/types/searchbar/__tests__/searchbar.spec.d.ts +1 -0
- package/dist/types/timeselect/timeselect.taro.d.ts +1 -1
- package/package.json +2 -3
package/dist/style.es.js
CHANGED
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
@import '../../packages/switch/switch.scss';
|
|
54
54
|
@import '../../packages/toast/toast.scss';
|
|
55
55
|
@import '../../packages/swipe/swipe.scss';
|
|
56
|
+
@import '../../packages/pulltorefresh/pulltorefresh.scss';
|
|
56
57
|
@import '../../packages/circleprogress/circleprogress.scss';
|
|
57
58
|
@import '../../packages/noticebar/noticebar.scss';
|
|
58
59
|
@import '../../packages/steps/steps.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -11,8 +11,8 @@ export interface ActionSheetProps {
|
|
|
11
11
|
color: string;
|
|
12
12
|
description: string;
|
|
13
13
|
menuItems: ItemType<string | boolean>[];
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
onCancel: () => void;
|
|
15
|
+
onChoose: (item: any, index: number) => void;
|
|
16
16
|
visible: boolean;
|
|
17
17
|
className: string;
|
|
18
18
|
style: React.CSSProperties;
|
|
@@ -11,8 +11,8 @@ export interface ActionSheetProps {
|
|
|
11
11
|
color: string;
|
|
12
12
|
description: string;
|
|
13
13
|
menuItems: ItemType<string | boolean>[];
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
onCancel: () => void;
|
|
15
|
+
onChoose: (item: any, index: number) => void;
|
|
16
16
|
visible: boolean;
|
|
17
17
|
className: string;
|
|
18
18
|
style: React.CSSProperties;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -10,8 +10,8 @@ export interface ElevatorProps {
|
|
|
10
10
|
className: string;
|
|
11
11
|
style: React.CSSProperties;
|
|
12
12
|
children: React.ReactNode;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
onClickItem: (key: string, item: ElevatorData) => void;
|
|
14
|
+
onClickIndex: (key: string) => void;
|
|
15
15
|
}
|
|
16
16
|
interface ElevatorData {
|
|
17
17
|
name: string;
|
|
@@ -10,8 +10,8 @@ export interface ElevatorProps {
|
|
|
10
10
|
className: string;
|
|
11
11
|
style: React.CSSProperties;
|
|
12
12
|
children: React.ReactNode;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
onClickItem: (key: string, item: ElevatorData) => void;
|
|
14
|
+
onClickIndex: (key: string) => void;
|
|
15
15
|
}
|
|
16
16
|
interface ElevatorData {
|
|
17
17
|
name: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -52,6 +52,7 @@ import Notify from './notify';
|
|
|
52
52
|
import Switch from './switch';
|
|
53
53
|
import Toast from './toast';
|
|
54
54
|
import Swipe from './swipe';
|
|
55
|
+
import PullToRefresh from './pulltorefresh';
|
|
55
56
|
import CircleProgress from './circleprogress';
|
|
56
57
|
import NoticeBar from './noticebar';
|
|
57
58
|
import Steps from './steps';
|
|
@@ -83,7 +84,7 @@ import Card from './card';
|
|
|
83
84
|
import TimePannel from './timepannel';
|
|
84
85
|
import TimeDetail from './timedetail';
|
|
85
86
|
import TimeSelect from './timeselect';
|
|
86
|
-
export { Button, Cell, CellGroup, Icon, Overlay, Popup, ConfigProvider, Layout, Col, Row, Divider, Grid, GridItem, NavBar, FixedNav, Tabbar, TabbarItem, Elevator, Pagination, Tabs, TabPane, Indicator, SideNavBar, SubSideNavBar, SideNavBarItem, Menu, MenuItem, Range, Calendar, Checkbox, CheckboxGroup, DatePicker, InputNumber, Input, Radio, RadioGroup, Rate, CalendarItem, Picker, ShortPassword, TextArea, Uploader, Cascader, SearchBar, NumberKeyboard, ActionSheet, BackTop, Drag, Dialog, Infiniteloading, Notify, Switch, Toast, Swipe, CircleProgress, NoticeBar, Steps, Step, Swiper, SwiperItem, Avatar, AvatarGroup, Price, Badge, Tag, Popover, Skeleton, CountDown, Collapse, CollapseItem, AnimatingNumbers, Empty, VirtualList, Table, Video, Progress, Audio, ImagePreview, Address, Barrage, Signature, Card, TimePannel, TimeDetail, TimeSelect };
|
|
87
|
+
export { Button, Cell, CellGroup, Icon, Overlay, Popup, ConfigProvider, Layout, Col, Row, Divider, Grid, GridItem, NavBar, FixedNav, Tabbar, TabbarItem, Elevator, Pagination, Tabs, TabPane, Indicator, SideNavBar, SubSideNavBar, SideNavBarItem, Menu, MenuItem, Range, Calendar, Checkbox, CheckboxGroup, DatePicker, InputNumber, Input, Radio, RadioGroup, Rate, CalendarItem, Picker, ShortPassword, TextArea, Uploader, Cascader, SearchBar, NumberKeyboard, ActionSheet, BackTop, Drag, Dialog, Infiniteloading, Notify, Switch, Toast, Swipe, PullToRefresh, CircleProgress, NoticeBar, Steps, Step, Swiper, SwiperItem, Avatar, AvatarGroup, Price, Badge, Tag, Popover, Skeleton, CountDown, Collapse, CollapseItem, AnimatingNumbers, Empty, VirtualList, Table, Video, Progress, Audio, ImagePreview, Address, Barrage, Signature, Card, TimePannel, TimeDetail, TimeSelect };
|
|
87
88
|
|
|
88
89
|
export type { ButtonProps } from './button/button';
|
|
89
90
|
export type { CellProps } from './cell/cell';
|
|
@@ -139,6 +140,7 @@ export type { NotifyProps } from './notify/notify';
|
|
|
139
140
|
export type { SwitchProps } from './switch/switch';
|
|
140
141
|
export type { ToastProps } from './toast/toast';
|
|
141
142
|
export type { SwipeProps } from './swipe/swipe';
|
|
143
|
+
export type { PullToRefreshProps } from './pulltorefresh/pulltorefresh';
|
|
142
144
|
export type { CircleProgressProps } from './circleprogress/circleprogress';
|
|
143
145
|
export type { NoticeBarProps } from './noticebar/noticebar';
|
|
144
146
|
export type { StepsProps } from './steps/steps';
|
|
@@ -8,5 +8,8 @@ interface IPickerSlotProps {
|
|
|
8
8
|
swipeDuration: number | string;
|
|
9
9
|
chooseItem?: (val: PickerOption, idx: number) => void;
|
|
10
10
|
}
|
|
11
|
-
declare const PickerSlot: React.ForwardRefExoticComponent<Partial<IPickerSlotProps> & React.RefAttributes<
|
|
11
|
+
declare const PickerSlot: React.ForwardRefExoticComponent<Partial<IPickerSlotProps> & React.RefAttributes<{
|
|
12
|
+
stopMomentum: () => void;
|
|
13
|
+
moving: boolean;
|
|
14
|
+
}>>;
|
|
12
15
|
export default PickerSlot;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PickerOption } from './picker.taro';
|
|
3
|
+
interface IPickerSlotProps {
|
|
4
|
+
keyIndex?: number;
|
|
5
|
+
defaultValue?: string | number;
|
|
6
|
+
listData?: PickerOption[];
|
|
7
|
+
threeDimensional: boolean;
|
|
8
|
+
swipeDuration: number | string;
|
|
9
|
+
itemShow: boolean;
|
|
10
|
+
chooseItem?: (val: PickerOption, idx: number) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const PickerSlot: React.ForwardRefExoticComponent<Partial<IPickerSlotProps> & React.RefAttributes<{
|
|
13
|
+
stopMomentum: () => void;
|
|
14
|
+
moving: boolean;
|
|
15
|
+
}>>;
|
|
16
|
+
export default PickerSlot;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent, MouseEvent } from 'react';
|
|
2
|
-
import { OverlayProps } from '../overlay/overlay';
|
|
2
|
+
import { OverlayProps } from '../overlay/overlay.taro';
|
|
3
3
|
declare type Teleport = HTMLElement | (() => HTMLElement) | null;
|
|
4
4
|
export interface PopupProps extends OverlayProps {
|
|
5
5
|
position: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
export declare type PullStatus = 'pulling' | 'canRelease' | 'refreshing' | 'complete';
|
|
3
|
+
export interface PullToRefreshProps {
|
|
4
|
+
className: string;
|
|
5
|
+
style: React.CSSProperties;
|
|
6
|
+
onRefresh: () => Promise<any>;
|
|
7
|
+
pullingText: ReactNode;
|
|
8
|
+
canReleaseText: ReactNode;
|
|
9
|
+
refreshingText: ReactNode;
|
|
10
|
+
completeText: ReactNode;
|
|
11
|
+
completeDelay: number;
|
|
12
|
+
headHeight: number;
|
|
13
|
+
threshold: number;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
renderText: (status: PullStatus) => ReactNode;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare const PullToRefresh: FunctionComponent<Partial<PullToRefreshProps>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
export declare type PullStatus = 'pulling' | 'canRelease' | 'refreshing' | 'complete';
|
|
3
|
+
export interface PullToRefreshProps {
|
|
4
|
+
className: string;
|
|
5
|
+
style: React.CSSProperties;
|
|
6
|
+
onRefresh: () => Promise<any>;
|
|
7
|
+
pullingText: ReactNode;
|
|
8
|
+
canReleaseText: ReactNode;
|
|
9
|
+
refreshingText: ReactNode;
|
|
10
|
+
completeText: ReactNode;
|
|
11
|
+
completeDelay: number;
|
|
12
|
+
headHeight: number;
|
|
13
|
+
threshold: number;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
renderText: (status: PullStatus) => ReactNode;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare const PullToRefresh: FunctionComponent<Partial<PullToRefreshProps>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent, MouseEventHandler } from 'react';
|
|
2
|
-
import RadioGroup from '../radiogroup';
|
|
2
|
+
import RadioGroup from '../radiogroup/index.taro';
|
|
3
3
|
declare type Shape = 'button' | 'round';
|
|
4
4
|
declare type Position = 'right' | 'left';
|
|
5
5
|
export interface RadioProps {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RadioGroup } from './radiogroup';
|
|
1
|
+
import { RadioGroup } from './radiogroup.taro';
|
|
2
2
|
export default RadioGroup;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Position = 'left' | 'right';
|
|
3
|
+
declare type Direction = 'horizontal' | 'vertical';
|
|
4
|
+
export interface RadioGroupProps {
|
|
5
|
+
value: string | number | boolean | null;
|
|
6
|
+
textPosition: Position;
|
|
7
|
+
direction: Direction;
|
|
8
|
+
onChange: (value: string | number | boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const RadioGroup: React.ForwardRefExoticComponent<Partial<RadioGroupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<unknown>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nutui/nutui-react",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2-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",
|
|
@@ -58,9 +58,8 @@
|
|
|
58
58
|
"prepare": "husky install",
|
|
59
59
|
"test": "jest",
|
|
60
60
|
"test:demo": "jest --testNamePattern=^should match snapshot$ --runTestsByPath ./src/packages/collapse/__test__/collapse.spec.tsx",
|
|
61
|
-
|
|
62
61
|
"generate:file:taro": "node scripts/taro/generate-nutui-taro.js",
|
|
63
|
-
"checked:taro":"npm run generate:file:taro && tsc --project ./tsconfig.taro.json",
|
|
62
|
+
"checked:taro": "npm run generate:file:taro && tsc --project ./tsconfig.taro.json",
|
|
64
63
|
"generate:file:taro:pages": "node scripts/taro/generate-taro-pages.js",
|
|
65
64
|
"dev:taro:weapp": "npm run checked:taro && npm run generate:file:taro:pages && cd ./src/sites/mobile-taro && npm run dev:weapp",
|
|
66
65
|
"replace:taro:types": "node scripts/taro/replace-taro-types-alias.js",
|