@nutui/nutui-react 2.3.8-beta.0 → 2.3.8
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 +23 -0
- package/dist/esm/NavBar/style/style.css +1 -1
- package/dist/esm/NavBar.js +49 -5
- package/dist/esm/Picker.js +1 -13
- package/dist/esm/RadioGroup.js +3 -2
- package/dist/esm/Rate/style/style.css +1 -1
- package/dist/esm/Rate.js +90 -4
- package/dist/esm/Step/style/style.css +1 -1
- package/dist/esm/Step.js +1 -1
- package/dist/esm/Steps/style/style.css +1 -1
- package/dist/esm/radio2.js +4 -4
- package/dist/esm/types/src/packages/navbar/navbar.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/radio/index.d.ts +2 -1
- package/dist/esm/types/src/packages/radio/index.taro.d.ts +2 -1
- package/dist/esm/types/src/packages/radio/radio.d.ts +1 -2
- package/dist/esm/types/src/packages/radio/radio.taro.d.ts +1 -2
- package/dist/esm/types/src/packages/radio/types.d.ts +2 -0
- package/dist/esm/types/src/packages/radiogroup/context.d.ts +2 -0
- package/dist/esm/types/src/packages/radiogroup/index.d.ts +1 -0
- package/dist/esm/types/src/packages/radiogroup/index.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/radiogroup/radiogroup.d.ts +4 -6
- package/dist/esm/types/src/packages/radiogroup/radiogroup.taro.d.ts +4 -6
- package/dist/esm/types/src/packages/radiogroup/types.d.ts +4 -0
- package/dist/esm/types/src/packages/rate/rate.d.ts +2 -0
- package/dist/esm/types/src/packages/rate/rate.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/video/video.taro.d.ts +4 -5
- package/dist/esm/use-refs.js +17 -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/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +136 -21
- package/dist/nutui.react.umd.js +136 -21
- package/dist/packages/navbar/navbar.scss +7 -0
- package/dist/packages/rate/rate.scss +1 -0
- package/dist/packages/step/step.scss +5 -4
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/types/packages/navbar/navbar.taro.d.ts +2 -1
- package/dist/types/packages/overlay/overlay.d.ts +5 -1
- package/dist/types/packages/radio/index.d.ts +2 -1
- package/dist/types/packages/radio/index.taro.d.ts +2 -1
- package/dist/types/packages/radio/radio.d.ts +1 -2
- package/dist/types/packages/radio/radio.taro.d.ts +1 -2
- package/dist/types/packages/radio/types.d.ts +2 -0
- package/dist/types/packages/radiogroup/context.d.ts +2 -0
- package/dist/types/packages/radiogroup/index.d.ts +1 -0
- package/dist/types/packages/radiogroup/index.taro.d.ts +1 -0
- package/dist/types/packages/radiogroup/radiogroup.d.ts +8 -6
- package/dist/types/packages/radiogroup/radiogroup.taro.d.ts +4 -6
- package/dist/types/packages/radiogroup/types.d.ts +4 -0
- package/dist/types/packages/rate/rate.d.ts +10 -0
- package/dist/types/packages/rate/rate.taro.d.ts +2 -0
- package/dist/types/packages/video/video.taro.d.ts +4 -5
- package/package.json +1 -1
package/dist/style.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { ITouchEvent } from '@tarojs/components';
|
|
2
3
|
import { BasicComponent } from '../../utils/typings';
|
|
3
4
|
export interface NavBarProps extends BasicComponent {
|
|
4
5
|
left: React.ReactNode;
|
|
@@ -9,7 +10,7 @@ export interface NavBarProps extends BasicComponent {
|
|
|
9
10
|
safeAreaInsetTop: boolean;
|
|
10
11
|
placeholder: boolean;
|
|
11
12
|
zIndex: number | string;
|
|
12
|
-
onBackClick: (e:
|
|
13
|
+
onBackClick: (e: ITouchEvent) => void;
|
|
13
14
|
children?: React.ReactNode;
|
|
14
15
|
}
|
|
15
16
|
export declare const NavBar: FunctionComponent<Partial<NavBarProps>>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React, { FunctionComponent, MouseEvent } from 'react';
|
|
2
2
|
import { BasicComponent } from '../../utils/typings';
|
|
3
3
|
export interface OverlayProps extends BasicComponent {
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* 设置组件页面层级
|
|
6
|
+
* @default 1000
|
|
7
|
+
*/
|
|
8
|
+
zIndex: number
|
|
5
9
|
/**
|
|
6
10
|
* 动画时长,单位毫秒
|
|
7
11
|
* @default 300
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import RadioGroup from '../../packages/radiogroup';
|
|
3
3
|
import { BasicComponent } from '../../utils/typings';
|
|
4
|
-
|
|
5
|
-
export type RadioPosition = 'right' | 'left';
|
|
4
|
+
import { RadioPosition, RadioShape } from '../../packages/radio/types';
|
|
6
5
|
export interface RadioProps extends BasicComponent {
|
|
7
6
|
/**
|
|
8
7
|
* 是否禁用选择
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { FunctionComponent } from 'react';
|
|
2
2
|
import RadioGroup from '../../packages/radiogroup/index.taro';
|
|
3
3
|
import { BasicComponent } from '../../utils/typings';
|
|
4
|
-
|
|
5
|
-
export type RadioPosition = 'right' | 'left';
|
|
4
|
+
import { RadioPosition, RadioShape } from '../../packages/radio/types';
|
|
6
5
|
export interface RadioProps extends BasicComponent {
|
|
7
6
|
disabled: boolean;
|
|
8
7
|
checked: boolean;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { RadioGroupShape } from './types';
|
|
2
3
|
declare const _default: React.Context<{
|
|
3
4
|
labelPosition: 'left' | 'right';
|
|
4
5
|
disabled: boolean | undefined;
|
|
5
6
|
value: string | number;
|
|
7
|
+
shape: RadioGroupShape | undefined;
|
|
6
8
|
check: (value: string | number) => void;
|
|
7
9
|
uncheck: () => void;
|
|
8
10
|
} | null>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RadioGroupOptionType } from './types';
|
|
3
|
-
type Position = 'left' | 'right';
|
|
4
|
-
type Direction = 'horizontal' | 'vertical';
|
|
2
|
+
import { RadioGroupDirection, RadioGroupOptionType, RadioGroupPosition, RadioGroupShape } from './types';
|
|
5
3
|
export interface RadioGroupProps {
|
|
6
4
|
/**
|
|
7
5
|
* 当前选中项的标识符
|
|
@@ -13,12 +11,17 @@ export interface RadioGroupProps {
|
|
|
13
11
|
* 文本所在的位置
|
|
14
12
|
* @default right
|
|
15
13
|
*/
|
|
16
|
-
labelPosition:
|
|
14
|
+
labelPosition: RadioGroupPosition
|
|
17
15
|
/**
|
|
18
16
|
* 使用横纵方向
|
|
19
17
|
* @default vertical
|
|
20
18
|
*/
|
|
21
|
-
direction:
|
|
19
|
+
direction: RadioGroupDirection
|
|
20
|
+
/**
|
|
21
|
+
* 形状
|
|
22
|
+
* @default -
|
|
23
|
+
*/
|
|
24
|
+
shape?: RadioGroupShape
|
|
22
25
|
/**
|
|
23
26
|
* 是否禁用
|
|
24
27
|
* @default false
|
|
@@ -36,4 +39,3 @@ export interface RadioGroupProps {
|
|
|
36
39
|
onChange: (value: string | number) => void
|
|
37
40
|
}
|
|
38
41
|
export declare const RadioGroup: React.ForwardRefExoticComponent<Partial<RadioGroupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<unknown>>;
|
|
39
|
-
export {};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RadioGroupOptionType } from './types';
|
|
3
|
-
type Position = 'left' | 'right';
|
|
4
|
-
type Direction = 'horizontal' | 'vertical';
|
|
2
|
+
import { RadioGroupDirection, RadioGroupOptionType, RadioGroupPosition, RadioGroupShape } from './types';
|
|
5
3
|
export interface RadioGroupProps {
|
|
6
4
|
value?: string | number;
|
|
7
5
|
defaultValue?: string | number;
|
|
8
|
-
labelPosition:
|
|
9
|
-
direction:
|
|
6
|
+
labelPosition: RadioGroupPosition;
|
|
7
|
+
direction: RadioGroupDirection;
|
|
8
|
+
shape?: RadioGroupShape;
|
|
10
9
|
disabled?: boolean;
|
|
11
10
|
options: RadioGroupOptionType[];
|
|
12
11
|
onChange: (value: string | number) => void;
|
|
13
12
|
}
|
|
14
13
|
export declare const RadioGroup: React.ForwardRefExoticComponent<Partial<RadioGroupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<unknown>>;
|
|
15
|
-
export {};
|
|
@@ -2,5 +2,9 @@ export interface RadioGroupOptionType {
|
|
|
2
2
|
label: string;
|
|
3
3
|
value: string;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
shape?: RadioGroupShape;
|
|
5
6
|
onChange?: (checked: boolean) => void;
|
|
6
7
|
}
|
|
8
|
+
export type RadioGroupPosition = 'left' | 'right';
|
|
9
|
+
export type RadioGroupDirection = 'horizontal' | 'vertical';
|
|
10
|
+
export type RadioGroupShape = 'button' | 'round';
|
|
@@ -47,9 +47,19 @@ export interface RateProps extends BasicComponent {
|
|
|
47
47
|
*/
|
|
48
48
|
allowHalf: boolean
|
|
49
49
|
/**
|
|
50
|
+
* 是否允许滑动选择 | boolean
|
|
51
|
+
* @default
|
|
52
|
+
*/
|
|
53
|
+
touchable: boolean
|
|
54
|
+
/**
|
|
50
55
|
* 当前 star 数修改时触发
|
|
51
56
|
* @default -
|
|
52
57
|
*/
|
|
53
58
|
onChange: (value: number) => void
|
|
59
|
+
/**
|
|
60
|
+
* TouchEnd 事件
|
|
61
|
+
* @default -
|
|
62
|
+
*/
|
|
63
|
+
onTouchEnd: (e: TouchEvent, value: number) => void
|
|
54
64
|
}
|
|
55
65
|
export declare const Rate: FunctionComponent<Partial<RateProps>>;
|
|
@@ -10,6 +10,8 @@ export interface RateProps extends BasicComponent {
|
|
|
10
10
|
disabled: boolean;
|
|
11
11
|
readOnly: boolean;
|
|
12
12
|
allowHalf: boolean;
|
|
13
|
+
touchable: boolean;
|
|
13
14
|
onChange: (value: number) => void;
|
|
15
|
+
onTouchEnd: (e: TouchEvent, value: number) => void;
|
|
14
16
|
}
|
|
15
17
|
export declare const Rate: FunctionComponent<Partial<RateProps>>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BaseEventOrig } from '@tarojs/components';
|
|
3
|
-
|
|
4
|
-
export interface VideoProps extends BasicComponent {
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { VideoProps as VideoPropsTaro, BaseEventOrig } from '@tarojs/components';
|
|
3
|
+
export interface VideoProps extends Omit<VideoPropsTaro, 'src'> {
|
|
5
4
|
source: {
|
|
6
5
|
type: string;
|
|
7
6
|
src: string;
|
|
@@ -18,4 +17,4 @@ export interface VideoProps extends BasicComponent {
|
|
|
18
17
|
onPause: (event: BaseEventOrig<any>) => void;
|
|
19
18
|
onPlayEnd: (event: BaseEventOrig<any>) => void;
|
|
20
19
|
}
|
|
21
|
-
export declare const Video: FunctionComponent<Partial<VideoProps
|
|
20
|
+
export declare const Video: FunctionComponent<Partial<VideoProps>>;
|