@nutui/nutui-react-taro 3.0.0-beta.2 → 3.0.0-beta.3
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/cjs/packages/avatar/avatar.js +14 -16
- package/dist/cjs/packages/avatar/style/avatar.scss +7 -60
- package/dist/cjs/packages/avatar/style/style.css +5 -43
- package/dist/cjs/packages/avatar/style/style.harmony.css +5 -43
- package/dist/cjs/packages/badge/badge.js +67 -12
- package/dist/cjs/packages/badge/style/badge.scss +18 -24
- package/dist/cjs/packages/badge/style/style.css +17 -15
- package/dist/cjs/packages/badge/style/style.harmony.css +22 -17
- package/dist/cjs/packages/calendarcard/calendarcard.js +8 -3
- package/dist/cjs/packages/calendarcard/icon.js +14 -2
- package/dist/cjs/packages/calendarcard/style/calendarcard.scss +25 -4
- package/dist/cjs/packages/calendarcard/style/style.css +27 -2
- package/dist/cjs/packages/image/image.js +5 -5
- package/dist/cjs/packages/input/style/style.harmony.css +4 -0
- package/dist/cjs/packages/navbar/navbar.js +17 -8
- package/dist/cjs/packages/navbar/style/navbar.scss +46 -101
- package/dist/cjs/packages/navbar/style/style.css +44 -89
- package/dist/cjs/packages/navbar/style/style.harmony.css +45 -93
- package/dist/cjs/packages/pagination/pagination.js +2 -0
- package/dist/cjs/packages/pagination/style/pagination.scss +6 -12
- package/dist/cjs/packages/pagination/style/style.css +8 -14
- package/dist/cjs/packages/radio/index.d.ts +8 -2
- package/dist/cjs/packages/radio/index.js +6 -1
- package/dist/cjs/packages/radio/radio.d.ts +2 -5
- package/dist/cjs/packages/radio/radio.js +2 -4
- package/dist/cjs/packages/radio/style/radio.scss +1 -0
- package/dist/cjs/packages/radiogroup/radiogroup.d.ts +2 -1
- package/dist/cjs/packages/radiogroup/radiogroup.js +3 -2
- package/dist/cjs/packages/safearea/style/safearea.scss +1 -1
- package/dist/cjs/packages/safearea/style/style.css +1 -1
- package/dist/cjs/packages/safearea/style/style.harmony.css +1 -1
- package/dist/cjs/packages/searchbar/searchbar.d.ts +1 -1
- package/dist/cjs/packages/searchbar/searchbar.js +31 -33
- package/dist/cjs/packages/searchbar/style/searchbar.scss +10 -7
- package/dist/cjs/packages/searchbar/style/style.css +11 -8
- package/dist/cjs/packages/searchbar/style/style.harmony.css +25 -12
- package/dist/cjs/packages/skeleton/style/style.css +5 -43
- package/dist/cjs/packages/tabbar/style/style.css +17 -15
- package/dist/cjs/packages/tabbaritem/style/style.css +17 -15
- package/dist/cjs/packages/video/video.js +3 -3
- package/dist/es/packages/avatar/avatar.js +14 -16
- package/dist/es/packages/avatar/style/avatar.scss +7 -60
- package/dist/es/packages/avatar/style/style.css +5 -43
- package/dist/es/packages/avatar/style/style.harmony.css +5 -43
- package/dist/es/packages/badge/badge.d.ts +7 -35
- package/dist/es/packages/badge/badge.js +66 -12
- package/dist/es/packages/badge/style/badge.scss +18 -24
- package/dist/es/packages/badge/style/style.css +17 -15
- package/dist/es/packages/badge/style/style.harmony.css +22 -17
- package/dist/es/packages/calendarcard/calendarcard.d.ts +13 -65
- package/dist/es/packages/calendarcard/calendarcard.js +9 -4
- package/dist/es/packages/calendarcard/icon.js +15 -3
- package/dist/es/packages/calendarcard/style/calendarcard.scss +25 -4
- package/dist/es/packages/calendarcard/style/style.css +27 -2
- package/dist/es/packages/image/image.js +5 -5
- package/dist/es/packages/input/style/style.harmony.css +4 -0
- package/dist/es/packages/loading/loading.d.ts +3 -15
- package/dist/es/packages/navbar/navbar.js +17 -8
- package/dist/es/packages/navbar/style/navbar.scss +46 -101
- package/dist/es/packages/navbar/style/style.css +44 -89
- package/dist/es/packages/navbar/style/style.harmony.css +45 -93
- package/dist/es/packages/pagination/pagination.js +2 -0
- package/dist/es/packages/pagination/style/pagination.scss +6 -12
- package/dist/es/packages/pagination/style/style.css +8 -14
- package/dist/es/packages/radio/index.d.ts +8 -2
- package/dist/es/packages/radio/index.js +5 -1
- package/dist/es/packages/radio/radio.d.ts +11 -50
- package/dist/es/packages/radio/radio.js +3 -5
- package/dist/es/packages/radio/style/radio.scss +1 -0
- package/dist/es/packages/radiogroup/radiogroup.d.ts +9 -36
- package/dist/es/packages/radiogroup/radiogroup.js +3 -2
- package/dist/es/packages/safearea/safearea.d.ts +1 -5
- package/dist/es/packages/safearea/style/safearea.scss +1 -1
- package/dist/es/packages/safearea/style/style.css +1 -1
- package/dist/es/packages/safearea/style/style.harmony.css +1 -1
- package/dist/es/packages/searchbar/searchbar.d.ts +19 -95
- package/dist/es/packages/searchbar/searchbar.js +32 -34
- package/dist/es/packages/searchbar/style/searchbar.scss +10 -7
- package/dist/es/packages/searchbar/style/style.css +11 -8
- package/dist/es/packages/searchbar/style/style.harmony.css +25 -12
- package/dist/es/packages/skeleton/style/style.css +5 -43
- package/dist/es/packages/tabbar/style/style.css +17 -15
- package/dist/es/packages/tabbaritem/style/style.css +17 -15
- package/dist/es/packages/video/video.d.ts +5 -25
- package/dist/es/packages/video/video.js +3 -3
- package/dist/nutui.react.umd.js +256 -199
- package/dist/style.css +1 -1
- package/dist/styles/themes/default.scss +25 -25
- package/dist/styles/variables.scss +7 -4
- package/package.json +2 -2
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
.nut-badge {
|
|
2
2
|
position: relative;
|
|
3
|
-
display: inline-
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
width: auto;
|
|
5
|
+
/* #ifdef harmony */
|
|
6
|
+
min-width: 1px;
|
|
7
|
+
/* #endif */
|
|
8
|
+
/* #ifndef harmony */
|
|
9
|
+
min-width: auto;
|
|
10
|
+
/* #endif */
|
|
4
11
|
}
|
|
5
12
|
.nut-badge-icon {
|
|
6
13
|
position: absolute;
|
|
@@ -8,8 +15,6 @@
|
|
|
8
15
|
justify-content: center;
|
|
9
16
|
align-items: center;
|
|
10
17
|
background: var(--nutui-badge-background-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
|
|
11
|
-
top: -10%;
|
|
12
|
-
right: -15%;
|
|
13
18
|
padding: var(--nutui-badge-icon-padding, 3px);
|
|
14
19
|
text-align: center;
|
|
15
20
|
border: var(--nutui-badge-border, 0px solid var(--nutui-color-primary-text, #ffffff));
|
|
@@ -27,7 +32,12 @@
|
|
|
27
32
|
display: flex;
|
|
28
33
|
justify-content: center;
|
|
29
34
|
align-items: center;
|
|
35
|
+
/* #ifdef harmony */
|
|
36
|
+
background: var(--nutui-color-primary, #ff0f23);
|
|
37
|
+
/* #endif */
|
|
38
|
+
/* #ifndef harmony */
|
|
30
39
|
background: var(--nutui-badge-background-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
|
|
40
|
+
/* #endif */
|
|
31
41
|
color: var(--nutui-badge-color, #fff);
|
|
32
42
|
padding: var(--nutui-badge-padding, 0 4px);
|
|
33
43
|
font-size: var(--nutui-badge-font-size, var(--nutui-font-size-xxs, 10px));
|
|
@@ -45,7 +55,9 @@
|
|
|
45
55
|
padding: 0;
|
|
46
56
|
}
|
|
47
57
|
.nut-badge-content {
|
|
48
|
-
|
|
58
|
+
/* #ifndef rn */
|
|
59
|
+
transform: var(--nutui-badge-content-transform, translateX(100%));
|
|
60
|
+
/* #endif */
|
|
49
61
|
}
|
|
50
62
|
.nut-badge-dot {
|
|
51
63
|
width: var(--nutui-badge-dot-width, 7px);
|
|
@@ -54,22 +66,12 @@
|
|
|
54
66
|
border-radius: var(--nutui-badge-dot-width, 7px);
|
|
55
67
|
padding: 0;
|
|
56
68
|
}
|
|
57
|
-
.nut-badge-outline
|
|
69
|
+
.nut-badge-outline {
|
|
58
70
|
background: var(--nutui-color-primary-text, #ffffff);
|
|
59
71
|
border: 1px solid var(--nutui-color-primary, #ff0f23);
|
|
60
72
|
color: var(--nutui-color-primary, #ff0f23);
|
|
61
73
|
}
|
|
62
74
|
|
|
63
|
-
[dir=rtl] .nut-badge-icon,
|
|
64
|
-
.nut-rtl .nut-badge-icon {
|
|
65
|
-
right: auto;
|
|
66
|
-
left: -15%;
|
|
67
|
-
}
|
|
68
|
-
[dir=rtl] .nut-badge-content,
|
|
69
|
-
.nut-rtl .nut-badge-content {
|
|
70
|
-
transform: var(--nutui-badge-content-transform, translateY(-50%) translateX(-100%));
|
|
71
|
-
}
|
|
72
|
-
|
|
73
75
|
.nut-tabbar-item {
|
|
74
76
|
display: flex;
|
|
75
77
|
flex-direction: column;
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { VideoProps as VideoPropsTaro, BaseEventOrig } from '@tarojs/components';
|
|
3
3
|
export interface VideoProps extends Omit<VideoPropsTaro, 'src'> {
|
|
4
|
-
/**
|
|
5
|
-
* 视频地址和类型设置
|
|
6
|
-
* @default {type: {}, src: ''}
|
|
7
|
-
*/
|
|
8
4
|
source: {
|
|
9
5
|
type: string;
|
|
10
6
|
src: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* 控制视频播放属性
|
|
14
|
-
* @default -
|
|
15
|
-
*/
|
|
7
|
+
};
|
|
16
8
|
options: {
|
|
17
9
|
controls?: boolean;
|
|
18
10
|
muted?: boolean;
|
|
@@ -20,21 +12,9 @@ export interface VideoProps extends Omit<VideoPropsTaro, 'src'> {
|
|
|
20
12
|
poster?: string;
|
|
21
13
|
playsinline?: boolean;
|
|
22
14
|
loop?: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
*/
|
|
28
|
-
onPlay: (event: BaseEventOrig<any>) => void
|
|
29
|
-
/**
|
|
30
|
-
* 暂停
|
|
31
|
-
* @default -
|
|
32
|
-
*/
|
|
33
|
-
onPause: (event: BaseEventOrig<any>) => void
|
|
34
|
-
/**
|
|
35
|
-
* 播放完成回调
|
|
36
|
-
* @default -
|
|
37
|
-
*/
|
|
38
|
-
onPlayEnd: (event: BaseEventOrig<any>) => void
|
|
15
|
+
};
|
|
16
|
+
onPlay: (event: BaseEventOrig<any>) => void;
|
|
17
|
+
onPause: (event: BaseEventOrig<any>) => void;
|
|
18
|
+
onPlayEnd: (event: BaseEventOrig<any>) => void;
|
|
39
19
|
}
|
|
40
20
|
export declare const Video: FunctionComponent<Partial<VideoProps>>;
|
|
@@ -3,6 +3,7 @@ import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import classNames from "classnames";
|
|
5
5
|
import { Video as VideoTaro, View } from "@tarojs/components";
|
|
6
|
+
import { mergeProps } from "../../utils/merge-props";
|
|
6
7
|
var defaultProps = {
|
|
7
8
|
source: {
|
|
8
9
|
type: {},
|
|
@@ -19,8 +20,7 @@ var defaultProps = {
|
|
|
19
20
|
};
|
|
20
21
|
var classPrefix = "nut-video";
|
|
21
22
|
export var Video = function(props) {
|
|
22
|
-
var
|
|
23
|
-
"children",
|
|
23
|
+
var _mergeProps = mergeProps(defaultProps, props), source = _mergeProps.source, options = _mergeProps.options, className = _mergeProps.className, style = _mergeProps.style, onPlay = _mergeProps.onPlay, onPause = _mergeProps.onPause, onPlayEnd = _mergeProps.onPlayEnd, restProps = _object_without_properties(_mergeProps, [
|
|
24
24
|
"source",
|
|
25
25
|
"options",
|
|
26
26
|
"className",
|
|
@@ -34,7 +34,7 @@ export var Video = function(props) {
|
|
|
34
34
|
className: classes,
|
|
35
35
|
style: style
|
|
36
36
|
}, /*#__PURE__*/ React.createElement(VideoTaro, _object_spread({
|
|
37
|
-
className: "
|
|
37
|
+
className: "".concat(classPrefix, "-player"),
|
|
38
38
|
muted: options.muted,
|
|
39
39
|
autoplay: options.autoplay,
|
|
40
40
|
loop: options.loop,
|