@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,10 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { BasicComponent } from "../../utils/typings";
|
|
3
3
|
export interface SafeAreaProps extends BasicComponent {
|
|
4
|
-
|
|
5
|
-
* 安全区的位置
|
|
6
|
-
* @default -
|
|
7
|
-
*/
|
|
8
|
-
position: 'top' | 'bottom'
|
|
4
|
+
position: 'top' | 'bottom';
|
|
9
5
|
}
|
|
10
6
|
export declare const SafeArea: FC<SafeAreaProps>;
|
|
@@ -3,100 +3,24 @@ import type { ChangeEvent, FocusEvent, MouseEvent } from 'react';
|
|
|
3
3
|
import { ITouchEvent } from '@tarojs/components';
|
|
4
4
|
import { BasicComponent } from "../../utils/typings";
|
|
5
5
|
export interface SearchBarProps extends BasicComponent {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
disabled?: boolean
|
|
26
|
-
/**
|
|
27
|
-
* 最大输入长度
|
|
28
|
-
* @default 9999
|
|
29
|
-
*/
|
|
30
|
-
maxLength?: number
|
|
31
|
-
/**
|
|
32
|
-
* 是否展示清除按钮
|
|
33
|
-
* @default true
|
|
34
|
-
*/
|
|
35
|
-
clearable?: boolean
|
|
36
|
-
/**
|
|
37
|
-
* 输入框只读
|
|
38
|
-
* @default false
|
|
39
|
-
*/
|
|
40
|
-
readOnly?: boolean
|
|
41
|
-
/**
|
|
42
|
-
* 是否自动聚焦
|
|
43
|
-
* @default false
|
|
44
|
-
*/
|
|
45
|
-
autoFocus?: boolean
|
|
46
|
-
/**
|
|
47
|
-
* 是否展示返回按钮
|
|
48
|
-
* @default false
|
|
49
|
-
*/
|
|
50
|
-
backable: boolean
|
|
51
|
-
/**
|
|
52
|
-
* 搜索框左侧区域
|
|
53
|
-
* @default -
|
|
54
|
-
*/
|
|
55
|
-
left: React.ReactNode
|
|
56
|
-
/**
|
|
57
|
-
* 搜搜框右侧区域
|
|
58
|
-
* @default -
|
|
59
|
-
*/
|
|
60
|
-
right: React.ReactNode
|
|
61
|
-
/**
|
|
62
|
-
* 输入框内左侧区域
|
|
63
|
-
* @default <Search size="12" />
|
|
64
|
-
*/
|
|
65
|
-
leftIn: React.ReactNode
|
|
66
|
-
/**
|
|
67
|
-
* 输入框内右侧区域
|
|
68
|
-
* @default -
|
|
69
|
-
*/
|
|
70
|
-
rightIn: React.ReactNode
|
|
71
|
-
/**
|
|
72
|
-
* 确定搜索时触发
|
|
73
|
-
* @default -
|
|
74
|
-
*/
|
|
75
|
-
onSearch?: (val: string) => void
|
|
76
|
-
/**
|
|
77
|
-
* 输入内容时触发
|
|
78
|
-
* @default -
|
|
79
|
-
*/
|
|
80
|
-
onChange?: (value: string, event?: ChangeEvent<HTMLInputElement>) => void
|
|
81
|
-
/**
|
|
82
|
-
* 聚焦时触发
|
|
83
|
-
* @default -
|
|
84
|
-
*/
|
|
85
|
-
onFocus?: (value: string, event: FocusEvent<HTMLInputElement>) => void
|
|
86
|
-
/**
|
|
87
|
-
* 失焦时触发
|
|
88
|
-
* @default -
|
|
89
|
-
*/
|
|
90
|
-
onBlur?: (value: string, event: FocusEvent<HTMLInputElement>) => void
|
|
91
|
-
/**
|
|
92
|
-
* 点击清空时触发
|
|
93
|
-
* @default -
|
|
94
|
-
*/
|
|
95
|
-
onClear?: (event: React.MouseEvent<Element, MouseEvent> | ITouchEvent) => void
|
|
96
|
-
/**
|
|
97
|
-
* 点击输入区域时触发
|
|
98
|
-
* @default -
|
|
99
|
-
*/
|
|
100
|
-
onInputClick?: (event: MouseEvent<HTMLInputElement>) => void
|
|
6
|
+
value?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
shape?: 'square' | 'round';
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
maxLength?: number;
|
|
11
|
+
clearable?: boolean;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
autoFocus?: boolean;
|
|
14
|
+
backable: boolean;
|
|
15
|
+
left: React.ReactNode;
|
|
16
|
+
right: React.ReactNode;
|
|
17
|
+
leftIn: React.ReactNode;
|
|
18
|
+
rightIn: React.ReactNode;
|
|
19
|
+
onSearch?: (val: string) => void;
|
|
20
|
+
onChange?: (value: string, event?: ChangeEvent<HTMLInputElement>) => void;
|
|
21
|
+
onFocus?: (value: string, event: FocusEvent<HTMLInputElement>) => void;
|
|
22
|
+
onBlur?: (value: string, event: FocusEvent<HTMLInputElement>) => void;
|
|
23
|
+
onClear?: (event: React.MouseEvent<Element, MouseEvent> | ITouchEvent) => void;
|
|
24
|
+
onInputClick?: (event: MouseEvent<HTMLInputElement>) => void;
|
|
101
25
|
}
|
|
102
26
|
export declare const SearchBar: FunctionComponent<Partial<SearchBarProps> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onFocus' | 'onBlur'>>;
|
|
@@ -2,7 +2,7 @@ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
|
2
2
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
3
3
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
4
4
|
import React, { useEffect, useRef, useState } from "react";
|
|
5
|
-
import { View } from "@tarojs/components";
|
|
5
|
+
import { View, Input as TaroInput } from "@tarojs/components";
|
|
6
6
|
import { MaskClose, Search, ArrowLeft } from "@nutui/icons-react-taro";
|
|
7
7
|
import { useConfig } from "../configprovider/configprovider";
|
|
8
8
|
import { ComponentDefaults } from "../../utils/typings";
|
|
@@ -34,21 +34,23 @@ export var SearchBar = function(props) {
|
|
|
34
34
|
var searchSelf = searchRef.current;
|
|
35
35
|
searchSelf && searchSelf.focus();
|
|
36
36
|
};
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
var onInput = function(event) {
|
|
38
|
+
var _event_detail;
|
|
39
|
+
var eventValue = event === null || event === void 0 ? void 0 : (_event_detail = event.detail) === null || _event_detail === void 0 ? void 0 : _event_detail.value;
|
|
40
|
+
if (value === eventValue) return;
|
|
41
|
+
onChange && (onChange === null || onChange === void 0 ? void 0 : onChange(eventValue, event));
|
|
42
|
+
setValue(eventValue);
|
|
43
|
+
eventValue === '' && forceFocus();
|
|
42
44
|
};
|
|
43
45
|
var focus = function(event) {
|
|
44
|
-
var
|
|
45
|
-
onFocus && (
|
|
46
|
+
var _event_detail;
|
|
47
|
+
onFocus && onFocus(event === null || event === void 0 ? void 0 : (_event_detail = event.detail) === null || _event_detail === void 0 ? void 0 : _event_detail.value, event);
|
|
46
48
|
};
|
|
47
49
|
var blur = function(event) {
|
|
50
|
+
var _event_detail;
|
|
48
51
|
var searchSelf = searchRef.current;
|
|
49
52
|
searchSelf && searchSelf.blur();
|
|
50
|
-
|
|
51
|
-
onBlur && (onBlur === null || onBlur === void 0 ? void 0 : onBlur(value, event));
|
|
53
|
+
onBlur && onBlur(event === null || event === void 0 ? void 0 : (_event_detail = event.detail) === null || _event_detail === void 0 ? void 0 : _event_detail.value, event);
|
|
52
54
|
};
|
|
53
55
|
useEffect(function() {
|
|
54
56
|
setValue(outerValue || '');
|
|
@@ -61,28 +63,21 @@ export var SearchBar = function(props) {
|
|
|
61
63
|
autoFocus
|
|
62
64
|
]);
|
|
63
65
|
var renderField = function() {
|
|
64
|
-
return /*#__PURE__*/ React.createElement(
|
|
66
|
+
return /*#__PURE__*/ React.createElement(TaroInput, {
|
|
65
67
|
className: "".concat(classPrefix, "-input ").concat(clearable ? "".concat(classPrefix, "-input-clear") : ''),
|
|
66
68
|
ref: searchRef,
|
|
67
69
|
style: style,
|
|
68
70
|
value: value || '',
|
|
69
71
|
placeholder: placeholder || locale.placeholder,
|
|
70
|
-
disabled: disabled,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
onBlur: function(e) {
|
|
81
|
-
return blur(e);
|
|
82
|
-
},
|
|
83
|
-
onClick: function(e) {
|
|
84
|
-
return clickInput(e);
|
|
85
|
-
}
|
|
72
|
+
disabled: disabled || readOnly,
|
|
73
|
+
maxlength: maxLength,
|
|
74
|
+
// @ts-ignore
|
|
75
|
+
// onKeyDown={onKeypress}
|
|
76
|
+
onInput: onInput,
|
|
77
|
+
onFocus: focus,
|
|
78
|
+
onBlur: blur,
|
|
79
|
+
onClick: clickInput,
|
|
80
|
+
onConfirm: onConfirm
|
|
86
81
|
});
|
|
87
82
|
};
|
|
88
83
|
var clickInput = function(e) {
|
|
@@ -133,13 +128,16 @@ export var SearchBar = function(props) {
|
|
|
133
128
|
onChange && (onChange === null || onChange === void 0 ? void 0 : onChange(''));
|
|
134
129
|
onClear && onClear(event);
|
|
135
130
|
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
131
|
+
// const onKeypress = (event: any) => {
|
|
132
|
+
// if (event?.detail?.keyCode === 13) {
|
|
133
|
+
// if (typeof event.cancelable !== 'boolean' || event.cancelable) {
|
|
134
|
+
// event.preventDefault()
|
|
135
|
+
// }
|
|
136
|
+
// onSearch && onSearch(value as string)
|
|
137
|
+
// }
|
|
138
|
+
// }
|
|
139
|
+
var onConfirm = function() {
|
|
140
|
+
onSearch && onSearch(value);
|
|
143
141
|
};
|
|
144
142
|
return /*#__PURE__*/ React.createElement(View, {
|
|
145
143
|
className: "".concat(classPrefix, " ").concat(disabled ? "".concat(classPrefix, "-disabled") : '', " ").concat(className || ''),
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
|
|
36
36
|
&-left,
|
|
37
37
|
&-right {
|
|
38
|
-
display: flex;
|
|
38
|
+
display: inline-flex;
|
|
39
|
+
align-items: center;
|
|
39
40
|
|
|
40
41
|
&.nut-icon {
|
|
41
42
|
width: 20px;
|
|
@@ -48,7 +49,9 @@
|
|
|
48
49
|
|
|
49
50
|
& > div,
|
|
50
51
|
& > span,
|
|
51
|
-
& >
|
|
52
|
+
& > i,
|
|
53
|
+
& > svg,
|
|
54
|
+
.nut-icon {
|
|
52
55
|
margin-right: $searchbar-gap;
|
|
53
56
|
|
|
54
57
|
&:last-child {
|
|
@@ -59,10 +62,11 @@
|
|
|
59
62
|
|
|
60
63
|
&-right {
|
|
61
64
|
margin-left: $searchbar-gap;
|
|
62
|
-
|
|
63
65
|
& > div,
|
|
64
66
|
& > span,
|
|
65
|
-
& >
|
|
67
|
+
& > i,
|
|
68
|
+
& > svg,
|
|
69
|
+
.nut-icon {
|
|
66
70
|
margin-left: $searchbar-gap;
|
|
67
71
|
|
|
68
72
|
&:first-child {
|
|
@@ -89,7 +93,8 @@
|
|
|
89
93
|
}
|
|
90
94
|
}
|
|
91
95
|
|
|
92
|
-
&-input-box
|
|
96
|
+
&-input-box,
|
|
97
|
+
&-input {
|
|
93
98
|
display: flex;
|
|
94
99
|
align-items: center;
|
|
95
100
|
flex: 1;
|
|
@@ -100,8 +105,6 @@
|
|
|
100
105
|
outline: 0;
|
|
101
106
|
box-sizing: border-box;
|
|
102
107
|
width: 100%;
|
|
103
|
-
height: $searchbar-input-height;
|
|
104
|
-
line-height: $searchbar-input-height;
|
|
105
108
|
padding: $searchbar-input-padding;
|
|
106
109
|
font-size: $searchbar-font-size;
|
|
107
110
|
color: $searchbar-input-text-color;
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
color: var(--nutui-black-5);
|
|
31
31
|
}
|
|
32
32
|
.nut-searchbar-left, .nut-searchbar-right {
|
|
33
|
-
display: flex;
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
34
35
|
}
|
|
35
36
|
.nut-searchbar-left.nut-icon, .nut-searchbar-right.nut-icon {
|
|
36
37
|
width: 20px;
|
|
@@ -39,19 +40,23 @@
|
|
|
39
40
|
.nut-searchbar-left {
|
|
40
41
|
margin-right: var(--nutui-searchbar-gap, 16px);
|
|
41
42
|
}
|
|
42
|
-
.nut-searchbar-left > div, .nut-searchbar-left > span, .nut-searchbar-left > svg
|
|
43
|
+
.nut-searchbar-left > div, .nut-searchbar-left > span, .nut-searchbar-left > i, .nut-searchbar-left > svg,
|
|
44
|
+
.nut-searchbar-left .nut-icon {
|
|
43
45
|
margin-right: var(--nutui-searchbar-gap, 16px);
|
|
44
46
|
}
|
|
45
|
-
.nut-searchbar-left > div:last-child, .nut-searchbar-left > span:last-child, .nut-searchbar-left > svg:last-child
|
|
47
|
+
.nut-searchbar-left > div:last-child, .nut-searchbar-left > span:last-child, .nut-searchbar-left > i:last-child, .nut-searchbar-left > svg:last-child,
|
|
48
|
+
.nut-searchbar-left .nut-icon:last-child {
|
|
46
49
|
margin-right: 0;
|
|
47
50
|
}
|
|
48
51
|
.nut-searchbar-right {
|
|
49
52
|
margin-left: var(--nutui-searchbar-gap, 16px);
|
|
50
53
|
}
|
|
51
|
-
.nut-searchbar-right > div, .nut-searchbar-right > span, .nut-searchbar-right > svg
|
|
54
|
+
.nut-searchbar-right > div, .nut-searchbar-right > span, .nut-searchbar-right > i, .nut-searchbar-right > svg,
|
|
55
|
+
.nut-searchbar-right .nut-icon {
|
|
52
56
|
margin-left: var(--nutui-searchbar-gap, 16px);
|
|
53
57
|
}
|
|
54
|
-
.nut-searchbar-right > div:first-child, .nut-searchbar-right > span:first-child, .nut-searchbar-right > svg:first-child
|
|
58
|
+
.nut-searchbar-right > div:first-child, .nut-searchbar-right > span:first-child, .nut-searchbar-right > i:first-child, .nut-searchbar-right > svg:first-child,
|
|
59
|
+
.nut-searchbar-right .nut-icon:first-child {
|
|
55
60
|
margin-left: 0;
|
|
56
61
|
}
|
|
57
62
|
.nut-searchbar-left > text, .nut-searchbar-left > view {
|
|
@@ -66,7 +71,7 @@
|
|
|
66
71
|
.nut-searchbar-right > text:first-child, .nut-searchbar-right > view:first-child {
|
|
67
72
|
margin-left: 0;
|
|
68
73
|
}
|
|
69
|
-
.nut-searchbar-input-box {
|
|
74
|
+
.nut-searchbar-input-box, .nut-searchbar-input {
|
|
70
75
|
display: flex;
|
|
71
76
|
align-items: center;
|
|
72
77
|
flex: 1;
|
|
@@ -76,8 +81,6 @@
|
|
|
76
81
|
outline: 0;
|
|
77
82
|
box-sizing: border-box;
|
|
78
83
|
width: 100%;
|
|
79
|
-
height: var(--nutui-searchbar-input-height, 32px);
|
|
80
|
-
line-height: var(--nutui-searchbar-input-height, 32px);
|
|
81
84
|
padding: var(--nutui-searchbar-input-padding, 0 4px);
|
|
82
85
|
font-size: var(--nutui-searchbar-font-size, var(--nutui-font-size-base, 14px));
|
|
83
86
|
color: var(--nutui-searchbar-input-text-color, var(--nutui-color-title, #1a1a1a));
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
align-items: center;
|
|
4
4
|
width: 100%;
|
|
5
5
|
padding: 6px 16px;
|
|
6
|
-
background: #
|
|
7
|
-
color: #
|
|
6
|
+
background: #f5f6fa;
|
|
7
|
+
color: #1a1a1a;
|
|
8
8
|
font-size: 14px;
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
justify-content: center;
|
|
@@ -27,15 +27,16 @@
|
|
|
27
27
|
.nut-searchbar-clear {
|
|
28
28
|
width: 16px;
|
|
29
29
|
height: 16px;
|
|
30
|
-
color:
|
|
30
|
+
color: rgba(0, 0, 0, 0.2);
|
|
31
31
|
}
|
|
32
32
|
.nut-searchbar-rightin {
|
|
33
33
|
width: 16px;
|
|
34
34
|
height: 16px;
|
|
35
|
-
color:
|
|
35
|
+
color: rgba(0, 0, 0, 0.2);
|
|
36
36
|
}
|
|
37
37
|
.nut-searchbar-left, .nut-searchbar-right {
|
|
38
|
-
display: flex;
|
|
38
|
+
display: inline-flex;
|
|
39
|
+
align-items: center;
|
|
39
40
|
}
|
|
40
41
|
.nut-searchbar-left.nut-icon, .nut-searchbar-right.nut-icon {
|
|
41
42
|
width: 20px;
|
|
@@ -50,10 +51,17 @@
|
|
|
50
51
|
.nut-searchbar-left > span {
|
|
51
52
|
margin-right: 16px;
|
|
52
53
|
}
|
|
54
|
+
.nut-searchbar-left > i {
|
|
55
|
+
margin-right: 16px;
|
|
56
|
+
}
|
|
53
57
|
.nut-searchbar-left > svg {
|
|
54
58
|
margin-right: 16px;
|
|
55
59
|
}
|
|
56
|
-
.nut-searchbar-left
|
|
60
|
+
.nut-searchbar-left .nut-icon {
|
|
61
|
+
margin-right: 16px;
|
|
62
|
+
}
|
|
63
|
+
.nut-searchbar-left > div:last-child, .nut-searchbar-left > span:last-child, .nut-searchbar-left > i:last-child, .nut-searchbar-left > svg:last-child,
|
|
64
|
+
.nut-searchbar-left .nut-icon:last-child {
|
|
57
65
|
margin-right: 0;
|
|
58
66
|
}
|
|
59
67
|
.nut-searchbar-right {
|
|
@@ -65,10 +73,17 @@
|
|
|
65
73
|
.nut-searchbar-right > span {
|
|
66
74
|
margin-left: 16px;
|
|
67
75
|
}
|
|
76
|
+
.nut-searchbar-right > i {
|
|
77
|
+
margin-left: 16px;
|
|
78
|
+
}
|
|
68
79
|
.nut-searchbar-right > svg {
|
|
69
80
|
margin-left: 16px;
|
|
70
81
|
}
|
|
71
|
-
.nut-searchbar-right
|
|
82
|
+
.nut-searchbar-right .nut-icon {
|
|
83
|
+
margin-left: 16px;
|
|
84
|
+
}
|
|
85
|
+
.nut-searchbar-right > div:first-child, .nut-searchbar-right > span:first-child, .nut-searchbar-right > i:first-child, .nut-searchbar-right > svg:first-child,
|
|
86
|
+
.nut-searchbar-right .nut-icon:first-child {
|
|
72
87
|
margin-left: 0;
|
|
73
88
|
}
|
|
74
89
|
.nut-searchbar-left > text {
|
|
@@ -89,7 +104,7 @@
|
|
|
89
104
|
.nut-searchbar-right > text:first-child, .nut-searchbar-right > view:first-child {
|
|
90
105
|
margin-left: 0;
|
|
91
106
|
}
|
|
92
|
-
.nut-searchbar-input-box {
|
|
107
|
+
.nut-searchbar-input-box, .nut-searchbar-input {
|
|
93
108
|
display: flex;
|
|
94
109
|
align-items: center;
|
|
95
110
|
flex: 1;
|
|
@@ -99,12 +114,10 @@
|
|
|
99
114
|
outline: 0;
|
|
100
115
|
box-sizing: border-box;
|
|
101
116
|
width: 100%;
|
|
102
|
-
height: 32px;
|
|
103
|
-
line-height: 32px;
|
|
104
117
|
padding: 0 4px;
|
|
105
118
|
font-size: 14px;
|
|
106
|
-
color: #
|
|
107
|
-
caret-color: #
|
|
119
|
+
color: #1a1a1a;
|
|
120
|
+
caret-color: #1a1a1a;
|
|
108
121
|
background: transparent;
|
|
109
122
|
text-align: left;
|
|
110
123
|
}
|
|
@@ -73,6 +73,11 @@
|
|
|
73
73
|
.nut-avatar {
|
|
74
74
|
position: relative;
|
|
75
75
|
flex: 0 0 auto;
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
align-items: center;
|
|
79
|
+
width: var(--nutui-avatar-normal-width, 40px);
|
|
80
|
+
height: var(--nutui-avatar-normal-height, 40px);
|
|
76
81
|
}
|
|
77
82
|
.nut-avatar-round {
|
|
78
83
|
border-radius: 999px;
|
|
@@ -96,21 +101,12 @@
|
|
|
96
101
|
.nut-avatar-icon {
|
|
97
102
|
background-size: 100% 100%;
|
|
98
103
|
}
|
|
99
|
-
.nut-avatar .nut-icon-img {
|
|
100
|
-
width: 100%;
|
|
101
|
-
height: 100%;
|
|
102
|
-
}
|
|
103
104
|
.nut-avatar-text {
|
|
104
105
|
display: flex;
|
|
105
106
|
justify-content: center;
|
|
106
107
|
align-items: center;
|
|
107
|
-
width: 100%;
|
|
108
|
-
height: 100%;
|
|
109
108
|
}
|
|
110
109
|
.nut-avatar-large {
|
|
111
|
-
display: flex;
|
|
112
|
-
justify-content: center;
|
|
113
|
-
align-items: center;
|
|
114
110
|
width: var(--nutui-avatar-large-width, 60px);
|
|
115
111
|
height: var(--nutui-avatar-large-height, 60px);
|
|
116
112
|
}
|
|
@@ -118,30 +114,15 @@
|
|
|
118
114
|
width: var(--nutui-avatar-large-width, 60px);
|
|
119
115
|
height: var(--nutui-avatar-large-height, 60px);
|
|
120
116
|
}
|
|
121
|
-
.nut-avatar-large-img-image {
|
|
122
|
-
width: var(--nutui-avatar-large-width, 60px);
|
|
123
|
-
height: var(--nutui-avatar-large-height, 60px);
|
|
124
|
-
}
|
|
125
117
|
.nut-avatar-large-icon {
|
|
126
118
|
width: var(--nutui-avatar-large-width, 60px);
|
|
127
119
|
height: var(--nutui-avatar-large-height, 60px);
|
|
128
120
|
}
|
|
129
|
-
.nut-avatar-large .nut-icon-img {
|
|
130
|
-
width: 100%;
|
|
131
|
-
height: 100%;
|
|
132
|
-
}
|
|
133
121
|
.nut-avatar-large-text {
|
|
134
122
|
width: var(--nutui-avatar-large-width, 60px);
|
|
135
123
|
height: var(--nutui-avatar-large-height, 60px);
|
|
136
124
|
}
|
|
137
125
|
.nut-avatar-small {
|
|
138
|
-
display: flex;
|
|
139
|
-
justify-content: center;
|
|
140
|
-
align-items: center;
|
|
141
|
-
width: var(--nutui-avatar-small-width, 32px);
|
|
142
|
-
height: var(--nutui-avatar-small-height, 32px);
|
|
143
|
-
}
|
|
144
|
-
.nut-avatar-small-img-image {
|
|
145
126
|
width: var(--nutui-avatar-small-width, 32px);
|
|
146
127
|
height: var(--nutui-avatar-small-height, 32px);
|
|
147
128
|
}
|
|
@@ -149,25 +130,6 @@
|
|
|
149
130
|
width: var(--nutui-avatar-small-width, 32px);
|
|
150
131
|
height: var(--nutui-avatar-small-height, 32px);
|
|
151
132
|
}
|
|
152
|
-
.nut-avatar-normal {
|
|
153
|
-
display: flex;
|
|
154
|
-
justify-content: center;
|
|
155
|
-
align-items: center;
|
|
156
|
-
width: var(--nutui-avatar-normal-width, 40px);
|
|
157
|
-
height: var(--nutui-avatar-normal-height, 40px);
|
|
158
|
-
}
|
|
159
|
-
.nut-avatar-normal-img-image {
|
|
160
|
-
width: var(--nutui-avatar-normal-width, 40px);
|
|
161
|
-
height: var(--nutui-avatar-normal-height, 40px);
|
|
162
|
-
}
|
|
163
|
-
.nut-avatar-normal .nut-icon-img {
|
|
164
|
-
width: 100%;
|
|
165
|
-
height: 100%;
|
|
166
|
-
}
|
|
167
|
-
.nut-avatar-normal-text {
|
|
168
|
-
width: var(--nutui-avatar-normal-width, 40px);
|
|
169
|
-
height: var(--nutui-avatar-normal-height, 40px);
|
|
170
|
-
}
|
|
171
133
|
|
|
172
134
|
.nut-skeleton {
|
|
173
135
|
display: inline-block;
|
|
@@ -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;
|