@nutui/nutui-react-taro 3.0.18-cpp.beta.1 → 3.0.19-cpp-beta.0
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 +13 -0
- package/dist/cjs/packages/actionsheet/style/style.harmony.css +0 -3
- package/dist/cjs/packages/address/style/style.harmony.css +0 -3
- package/dist/cjs/packages/calendar/style/style.harmony.css +0 -3
- package/dist/cjs/packages/cascader/style/style.harmony.css +0 -3
- package/dist/cjs/packages/datepicker/style/style.harmony.css +0 -3
- package/dist/cjs/packages/ellipsis/ellipsis.js +1 -1
- package/dist/cjs/packages/imagepreview/style/style.harmony.css +0 -3
- package/dist/cjs/packages/input/input.js +14 -5
- package/dist/cjs/packages/noticebar/style/noticebar.scss +6 -0
- package/dist/cjs/packages/noticebar/style/style.css +6 -0
- package/dist/cjs/packages/noticebar/style/style.harmony.css +6 -0
- package/dist/cjs/packages/noticebar/style-jmapp/noticebar.scss +6 -0
- package/dist/cjs/packages/noticebar/style-jmapp/style.css +6 -0
- package/dist/cjs/packages/noticebar/style-jrkf/noticebar.scss +6 -0
- package/dist/cjs/packages/noticebar/style-jrkf/style.css +6 -0
- package/dist/cjs/packages/numberkeyboard/style/style.harmony.css +0 -3
- package/dist/cjs/packages/picker/style/style.harmony.css +0 -3
- package/dist/cjs/packages/popover/style/style.harmony.css +0 -3
- package/dist/cjs/packages/popup/popup.d.ts +1 -1
- package/dist/cjs/packages/popup/popup.js +108 -21
- package/dist/cjs/packages/popup/style/popup.scss +0 -5
- package/dist/cjs/packages/popup/style/style.css +0 -3
- package/dist/cjs/packages/popup/style/style.harmony.css +0 -3
- package/dist/cjs/packages/popup/style-jmapp/popup.scss +0 -5
- package/dist/cjs/packages/popup/style-jmapp/style.css +0 -3
- package/dist/cjs/packages/popup/style-jrkf/popup.scss +0 -5
- package/dist/cjs/packages/popup/style-jrkf/style.css +0 -3
- package/dist/cjs/packages/price/price.js +43 -15
- package/dist/cjs/packages/shortpassword/style/style.harmony.css +0 -3
- package/dist/cjs/packages/swiper/swiper.js +1 -2
- package/dist/cjs/packages/timeselect/style/style.harmony.css +0 -3
- package/dist/cjs/packages/tour/style/style.harmony.css +0 -3
- package/dist/cjs/types/spec/popup/base.d.ts +6 -0
- package/dist/cjs/types/spec/price/base.d.ts +8 -2
- package/dist/cjs/types/spec/price/base.js +12 -0
- package/dist/cjs/utils/taro/get-rect.d.ts +1 -0
- package/dist/cjs/utils/taro/get-rect.js +36 -0
- package/dist/es/packages/actionsheet/style/style.harmony.css +0 -3
- package/dist/es/packages/address/style/style.harmony.css +0 -3
- package/dist/es/packages/calendar/style/style.harmony.css +0 -3
- package/dist/es/packages/cascader/style/style.harmony.css +0 -3
- package/dist/es/packages/datepicker/style/style.harmony.css +0 -3
- package/dist/es/packages/ellipsis/ellipsis.js +2 -2
- package/dist/es/packages/imagepreview/style/style.harmony.css +0 -3
- package/dist/es/packages/input/input.js +14 -5
- package/dist/es/packages/noticebar/style/noticebar.scss +6 -0
- package/dist/es/packages/noticebar/style/style.css +6 -0
- package/dist/es/packages/noticebar/style/style.harmony.css +6 -0
- package/dist/es/packages/noticebar/style-jmapp/noticebar.scss +6 -0
- package/dist/es/packages/noticebar/style-jmapp/style.css +6 -0
- package/dist/es/packages/noticebar/style-jrkf/noticebar.scss +6 -0
- package/dist/es/packages/noticebar/style-jrkf/style.css +6 -0
- package/dist/es/packages/numberkeyboard/style/style.harmony.css +0 -3
- package/dist/es/packages/picker/style/style.harmony.css +0 -3
- package/dist/es/packages/popover/style/style.harmony.css +0 -3
- package/dist/es/packages/popup/popup.d.ts +1 -1
- package/dist/es/packages/popup/popup.js +109 -22
- package/dist/es/packages/popup/style/popup.scss +0 -5
- package/dist/es/packages/popup/style/style.css +0 -3
- package/dist/es/packages/popup/style/style.harmony.css +0 -3
- package/dist/es/packages/popup/style-jmapp/popup.scss +0 -5
- package/dist/es/packages/popup/style-jmapp/style.css +0 -3
- package/dist/es/packages/popup/style-jrkf/popup.scss +0 -5
- package/dist/es/packages/popup/style-jrkf/style.css +0 -3
- package/dist/es/packages/price/price.js +42 -15
- package/dist/es/packages/shortpassword/style/style.harmony.css +0 -3
- package/dist/es/packages/swiper/swiper.js +1 -2
- package/dist/es/packages/timeselect/style/style.harmony.css +0 -3
- package/dist/es/packages/tour/style/style.harmony.css +0 -3
- package/dist/es/types/spec/popup/base.d.ts +24 -0
- package/dist/es/types/spec/price/base.d.ts +17 -5
- package/dist/es/types/spec/price/base.js +6 -1
- package/dist/es/utils/taro/get-rect.d.ts +1 -0
- package/dist/es/utils/taro/get-rect.js +34 -0
- package/dist/nutui.react.umd.js +229 -70
- package/dist/style-jmapp.css +1 -1
- package/dist/style-jmapp.scss +27 -27
- package/dist/style-jrkf.css +1 -1
- package/dist/style-jrkf.scss +35 -35
- package/dist/style.css +1 -1
- package/dist/style.scss +31 -31
- package/package.json +1 -1
|
@@ -9,14 +9,16 @@ Object.defineProperty(exports, "Price", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
12
|
+
var _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
13
|
var _define_property = require("@swc/helpers/_/_define_property");
|
|
13
14
|
var _object_spread = require("@swc/helpers/_/_object_spread");
|
|
14
15
|
var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
|
|
15
|
-
var _react = /*#__PURE__*/
|
|
16
|
+
var _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
16
17
|
var _components = require("@tarojs/components");
|
|
17
18
|
var _classnames = /*#__PURE__*/ _interop_require_default._(require("classnames"));
|
|
18
19
|
var _typings = require("../../utils/typings");
|
|
19
20
|
var _index = require("../configprovider/index");
|
|
21
|
+
var _types = require("../../types");
|
|
20
22
|
var _platform = require("../../utils/taro/platform");
|
|
21
23
|
var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typings.ComponentDefaults), {
|
|
22
24
|
color: 'primary',
|
|
@@ -29,9 +31,28 @@ var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typing
|
|
|
29
31
|
line: false
|
|
30
32
|
});
|
|
31
33
|
var Price = function Price(props) {
|
|
32
|
-
var _$_object_spread = (0, _object_spread._)({}, defaultProps, props), color = _$_object_spread.color,
|
|
34
|
+
var _$_object_spread = (0, _object_spread._)({}, defaultProps, props), color = _$_object_spread.color, originalPrice = _$_object_spread.price, symbol = _$_object_spread.symbol, digits = _$_object_spread.digits, thousands = _$_object_spread.thousands, position = _$_object_spread.position, size = _$_object_spread.size, line = _$_object_spread.line, className = _$_object_spread.className, style = _$_object_spread.style;
|
|
33
35
|
var classPrefix = 'nut-price';
|
|
34
36
|
var rtl = (0, _index.useRtl)();
|
|
37
|
+
var price = (0, _react.useMemo)(function() {
|
|
38
|
+
return originalPrice.toString().replace(/[^\d.]/g, '');
|
|
39
|
+
}, [
|
|
40
|
+
originalPrice
|
|
41
|
+
]);
|
|
42
|
+
var isCustomPriceColor = (0, _react.useMemo)(function() {
|
|
43
|
+
var specificPriceColor = Object.values(_types.PriceColorEnum);
|
|
44
|
+
return !specificPriceColor.includes(color);
|
|
45
|
+
}, [
|
|
46
|
+
color
|
|
47
|
+
]);
|
|
48
|
+
var priceColorStyle = (0, _react.useMemo)(function() {
|
|
49
|
+
return isCustomPriceColor ? {
|
|
50
|
+
color: color
|
|
51
|
+
} : {};
|
|
52
|
+
}, [
|
|
53
|
+
isCustomPriceColor,
|
|
54
|
+
color
|
|
55
|
+
]);
|
|
35
56
|
var replaceSpecialChar = function replaceSpecialChar(url) {
|
|
36
57
|
url = url.replace(/"/g, '"');
|
|
37
58
|
url = url.replace(/&/g, '&');
|
|
@@ -48,8 +69,8 @@ var Price = function Price(props) {
|
|
|
48
69
|
if (Number(num) === 0) {
|
|
49
70
|
num = 0;
|
|
50
71
|
}
|
|
51
|
-
num = num.toString();
|
|
52
72
|
if (checkPoint(num)) {
|
|
73
|
+
num = num.toString();
|
|
53
74
|
num = typeof num.split('.') === 'string' ? num.split('.') : num.split('.')[0];
|
|
54
75
|
}
|
|
55
76
|
if (thousands) {
|
|
@@ -62,14 +83,17 @@ var Price = function Price(props) {
|
|
|
62
83
|
decimalNum = 0;
|
|
63
84
|
}
|
|
64
85
|
if (checkPoint(decimalNum)) {
|
|
65
|
-
decimalNum = Number(decimalNum).toFixed(digits);
|
|
66
|
-
decimalNum = typeof decimalNum.split('.') === 'string' ? 0 : decimalNum.split('.')[1] ||
|
|
86
|
+
decimalNum = digits ? Number(decimalNum).toFixed(digits) : "".concat(decimalNum);
|
|
87
|
+
decimalNum = typeof decimalNum.split('.') === 'string' ? 0 : decimalNum.split('.')[1] || '';
|
|
67
88
|
} else {
|
|
68
|
-
decimalNum =
|
|
89
|
+
decimalNum = '';
|
|
90
|
+
}
|
|
91
|
+
if (digits) {
|
|
92
|
+
var result = "0.".concat(decimalNum);
|
|
93
|
+
var resultFixed = Number(result).toFixed(digits);
|
|
94
|
+
return String(resultFixed).substring(2, resultFixed.length);
|
|
69
95
|
}
|
|
70
|
-
|
|
71
|
-
var resultFixed = Number(result).toFixed(digits);
|
|
72
|
-
return String(resultFixed).substring(2, resultFixed.length);
|
|
96
|
+
return decimalNum;
|
|
73
97
|
};
|
|
74
98
|
var renderSymbol = function renderSymbol() {
|
|
75
99
|
var _obj;
|
|
@@ -78,16 +102,20 @@ var Price = function Price(props) {
|
|
|
78
102
|
"".concat(classPrefix, "-symbol"),
|
|
79
103
|
"".concat(classPrefix, "-symbol-").concat(size),
|
|
80
104
|
(_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-line"), line), (0, _define_property._)(_obj, "".concat(classPrefix, "-rtl"), rtl), _obj)
|
|
81
|
-
])
|
|
105
|
+
]),
|
|
106
|
+
style: priceColorStyle
|
|
82
107
|
}, symbol ? replaceSpecialChar(symbol) : '');
|
|
83
108
|
};
|
|
84
109
|
var renderInner = function renderInner() {
|
|
85
110
|
return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, symbol && position === 'before' ? renderSymbol() : null, /*#__PURE__*/ _react.default.createElement(_components.Text, {
|
|
86
|
-
className: "".concat(classPrefix, "-integer ").concat(classPrefix, "-integer-").concat(size, " ").concat(line ? "".concat(classPrefix, "-line") : '')
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
111
|
+
className: "".concat(classPrefix, "-integer ").concat(classPrefix, "-integer-").concat(size, " ").concat(line ? "".concat(classPrefix, "-line") : ''),
|
|
112
|
+
style: priceColorStyle
|
|
113
|
+
}, formatThousands(price)), digits !== 0 ? /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, checkPoint(price) || digits ? /*#__PURE__*/ _react.default.createElement(_components.Text, {
|
|
114
|
+
className: "".concat(classPrefix, "-decimal ").concat(classPrefix, "-decimal-").concat(size, " ").concat(line ? "".concat(classPrefix, "-line") : ''),
|
|
115
|
+
style: priceColorStyle
|
|
116
|
+
}, ".") : null, /*#__PURE__*/ _react.default.createElement(_components.Text, {
|
|
117
|
+
className: "".concat(classPrefix, "-decimal ").concat(classPrefix, "-decimal-").concat(size, " ").concat(line ? "".concat(classPrefix, "-line") : ''),
|
|
118
|
+
style: priceColorStyle
|
|
91
119
|
}, formatDecimal(price))) : null, symbol && position === 'after' ? renderSymbol() : null);
|
|
92
120
|
};
|
|
93
121
|
return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, (0, _platform.harmony)() ? /*#__PURE__*/ _react.default.createElement(_components.Text, {
|
|
@@ -31,7 +31,7 @@ var defaultProps = {
|
|
|
31
31
|
};
|
|
32
32
|
var classPrefix = 'nut-swiper';
|
|
33
33
|
var Swiper = /*#__PURE__*/ _react.default.forwardRef(function(props, ref) {
|
|
34
|
-
var _ref = (0, _object_spread._)({}, defaultProps, props), width = _ref.width, height = _ref.height, className = _ref.className, children = _ref.children, indicator = _ref.indicator, indicatorDots = _ref.indicatorDots, loop = _ref.loop, circular = _ref.circular, autoPlay = _ref.autoPlay, autoplay = _ref.autoplay,
|
|
34
|
+
var _ref = (0, _object_spread._)({}, defaultProps, props), width = _ref.width, height = _ref.height, className = _ref.className, children = _ref.children, indicator = _ref.indicator, indicatorDots = _ref.indicatorDots, loop = _ref.loop, circular = _ref.circular, autoPlay = _ref.autoPlay, autoplay = _ref.autoplay, vertical = _ref.vertical, direction = _ref.direction, defaultValue = _ref.defaultValue, current = _ref.current, onChange = _ref.onChange, style = _ref.style, rest = (0, _object_without_properties._)(_ref, [
|
|
35
35
|
"width",
|
|
36
36
|
"height",
|
|
37
37
|
"className",
|
|
@@ -42,7 +42,6 @@ var Swiper = /*#__PURE__*/ _react.default.forwardRef(function(props, ref) {
|
|
|
42
42
|
"circular",
|
|
43
43
|
"autoPlay",
|
|
44
44
|
"autoplay",
|
|
45
|
-
"duration",
|
|
46
45
|
"vertical",
|
|
47
46
|
"direction",
|
|
48
47
|
"defaultValue",
|
|
@@ -12,12 +12,18 @@ export interface BasePopup extends BaseProps, BaseOverlay {
|
|
|
12
12
|
closeIcon: ReactNode;
|
|
13
13
|
left?: ReactNode;
|
|
14
14
|
title?: ReactNode;
|
|
15
|
+
top?: ReactNode;
|
|
15
16
|
description?: ReactNode;
|
|
16
17
|
destroyOnClose: boolean;
|
|
17
18
|
overlay: boolean;
|
|
18
19
|
round: boolean;
|
|
20
|
+
resizable: boolean;
|
|
21
|
+
minHeight: string;
|
|
19
22
|
onOpen: () => void;
|
|
20
23
|
onClose: () => void;
|
|
21
24
|
onOverlayClick: (e: any) => boolean | void;
|
|
22
25
|
onCloseIconClick: (e: any) => boolean | void;
|
|
26
|
+
onTouchMove: (height: number, e: any, direction: 'up' | 'down') => void;
|
|
27
|
+
onTouchStart: (height: number, e: any) => void;
|
|
28
|
+
onTouchEnd: (height: number, e: any) => void;
|
|
23
29
|
}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { BaseProps } from '../../base/props';
|
|
2
2
|
import { SimpleValue, UISize } from '../../base/atoms';
|
|
3
3
|
export type PriceSize = Exclude<UISize, 'mini'>;
|
|
4
|
-
export type
|
|
4
|
+
export type SpecificPriceColor = 'primary' | 'gray' | 'darkgray';
|
|
5
|
+
export type PriceColor = SpecificPriceColor | string;
|
|
6
|
+
export declare enum PriceColorEnum {
|
|
7
|
+
Primary = "primary",
|
|
8
|
+
Gray = "gray",
|
|
9
|
+
Darkgray = "darkgray"
|
|
10
|
+
}
|
|
5
11
|
export interface BasePrice extends BaseProps {
|
|
6
12
|
color: PriceColor;
|
|
7
13
|
price: SimpleValue;
|
|
8
14
|
symbol: string;
|
|
9
|
-
digits: number;
|
|
15
|
+
digits: number | null;
|
|
10
16
|
thousands: boolean;
|
|
11
17
|
position: string;
|
|
12
18
|
size: PriceSize;
|
|
@@ -2,3 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
+
Object.defineProperty(exports, "PriceColorEnum", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return PriceColorEnum;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var PriceColorEnum = /*#__PURE__*/ function(PriceColorEnum) {
|
|
12
|
+
PriceColorEnum["Primary"] = "primary";
|
|
13
|
+
PriceColorEnum["Gray"] = "gray";
|
|
14
|
+
PriceColorEnum["Darkgray"] = "darkgray";
|
|
15
|
+
return PriceColorEnum;
|
|
16
|
+
}({});
|
|
@@ -10,3 +10,4 @@ export interface Rect {
|
|
|
10
10
|
}
|
|
11
11
|
export declare function makeRect(width: number, height: number): Rect;
|
|
12
12
|
export declare const getRectInMultiPlatform: (element: any, harmonyId?: string) => Promise<Rect>;
|
|
13
|
+
export declare const getRectInMultiPlatformWithoutCache: (element: any, harmonyId?: string) => Promise<Rect>;
|
|
@@ -12,6 +12,9 @@ _export(exports, {
|
|
|
12
12
|
getRectInMultiPlatform: function() {
|
|
13
13
|
return getRectInMultiPlatform;
|
|
14
14
|
},
|
|
15
|
+
getRectInMultiPlatformWithoutCache: function() {
|
|
16
|
+
return getRectInMultiPlatformWithoutCache;
|
|
17
|
+
},
|
|
15
18
|
makeRect: function() {
|
|
16
19
|
return makeRect;
|
|
17
20
|
}
|
|
@@ -74,3 +77,36 @@ var getRectInMultiPlatform = /*#__PURE__*/ function() {
|
|
|
74
77
|
return _ref.apply(this, arguments);
|
|
75
78
|
};
|
|
76
79
|
}();
|
|
80
|
+
var getRectInMultiPlatformWithoutCache = /*#__PURE__*/ function() {
|
|
81
|
+
var _ref = (0, _async_to_generator._)(function(element) {
|
|
82
|
+
var harmonyId;
|
|
83
|
+
var _arguments = arguments;
|
|
84
|
+
return (0, _ts_generator._)(this, function(_state) {
|
|
85
|
+
harmonyId = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : '';
|
|
86
|
+
if (element) {
|
|
87
|
+
if (_getrect.inBrowser) {
|
|
88
|
+
return [
|
|
89
|
+
2,
|
|
90
|
+
Promise.resolve((0, _getrect.getRect)(element))
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
return [
|
|
94
|
+
2,
|
|
95
|
+
new Promise(function(resolve, reject) {
|
|
96
|
+
(0, _taro.createSelectorQuery)().select("#".concat(harmonyId || element.uid)).boundingClientRect().exec(function(param) {
|
|
97
|
+
var _param = (0, _sliced_to_array._)(param, 1), rects = _param[0];
|
|
98
|
+
resolve(rects);
|
|
99
|
+
});
|
|
100
|
+
})
|
|
101
|
+
];
|
|
102
|
+
}
|
|
103
|
+
return [
|
|
104
|
+
2,
|
|
105
|
+
Promise.resolve(makeRect(0, 0))
|
|
106
|
+
];
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
return function getRectInMultiPlatformWithoutCache(element) {
|
|
110
|
+
return _ref.apply(this, arguments);
|
|
111
|
+
};
|
|
112
|
+
}();
|
|
@@ -9,7 +9,7 @@ import React, { useState, useRef, useEffect } from "react";
|
|
|
9
9
|
import { nextTick, createSelectorQuery } from "@tarojs/taro";
|
|
10
10
|
import classNames from "classnames";
|
|
11
11
|
import { View } from "@tarojs/components";
|
|
12
|
-
import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
|
|
12
|
+
import { getRectInMultiPlatform, getRectInMultiPlatformWithoutCache } from "../../utils/taro/get-rect";
|
|
13
13
|
import { ComponentDefaults } from "../../utils/typings";
|
|
14
14
|
import { useRtl } from "../configprovider/index";
|
|
15
15
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
@@ -217,7 +217,7 @@ export var Ellipsis = function(props) {
|
|
|
217
217
|
case 0:
|
|
218
218
|
return [
|
|
219
219
|
4,
|
|
220
|
-
|
|
220
|
+
getRectInMultiPlatformWithoutCache(rootContain.current)
|
|
221
221
|
];
|
|
222
222
|
case 1:
|
|
223
223
|
refe = _state.sent();
|
|
@@ -64,18 +64,27 @@ export var Input = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
64
64
|
}), 2), value = _usePropsValue[0], setValue = _usePropsValue[1];
|
|
65
65
|
var inputRef = useRef(null);
|
|
66
66
|
var _useState = _sliced_to_array(useState(false), 2), active = _useState[0], setActive = _useState[1];
|
|
67
|
+
// 兼容H5和小程序获取原生input标签
|
|
68
|
+
var getNativeInput = function() {
|
|
69
|
+
if (Taro.getEnv() === 'WEB') {
|
|
70
|
+
var taroInputCoreEl = inputRef.current;
|
|
71
|
+
var inputEl = taroInputCoreEl.querySelector('input');
|
|
72
|
+
return inputEl;
|
|
73
|
+
}
|
|
74
|
+
return inputRef.current;
|
|
75
|
+
};
|
|
67
76
|
useImperativeHandle(ref, function() {
|
|
68
77
|
return {
|
|
69
78
|
clear: function() {
|
|
70
79
|
setValue('');
|
|
71
80
|
},
|
|
72
81
|
focus: function() {
|
|
73
|
-
var
|
|
74
|
-
|
|
82
|
+
var nativeInput = getNativeInput();
|
|
83
|
+
nativeInput === null || nativeInput === void 0 ? void 0 : nativeInput.focus();
|
|
75
84
|
},
|
|
76
85
|
blur: function() {
|
|
77
|
-
var
|
|
78
|
-
|
|
86
|
+
var nativeInput = getNativeInput();
|
|
87
|
+
nativeInput === null || nativeInput === void 0 ? void 0 : nativeInput.blur();
|
|
79
88
|
},
|
|
80
89
|
get nativeElement () {
|
|
81
90
|
return inputRef.current;
|
|
@@ -163,7 +172,7 @@ export var Input = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
163
172
|
maxlength: maxLength,
|
|
164
173
|
placeholder: placeholder === undefined ? locale.placeholder : placeholder,
|
|
165
174
|
placeholderClass: "".concat(classPrefix, "-placeholder"),
|
|
166
|
-
disabled: disabled
|
|
175
|
+
disabled: disabled,
|
|
167
176
|
value: value,
|
|
168
177
|
focus: autoFocus || focus,
|
|
169
178
|
confirmType: confirmType,
|
|
@@ -51,6 +51,9 @@
|
|
|
51
51
|
min-width: $noticebar-left-icon-width;
|
|
52
52
|
margin-right: $noticebar-icon-gap;
|
|
53
53
|
background-size: 100% 100%;
|
|
54
|
+
.nut-icon {
|
|
55
|
+
color: $noticebar-color;
|
|
56
|
+
}
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
&-right-icon {
|
|
@@ -63,12 +66,14 @@
|
|
|
63
66
|
.nut-icon {
|
|
64
67
|
width: 12px;
|
|
65
68
|
height: 12px;
|
|
69
|
+
color: $noticebar-color;
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
&-wrap {
|
|
70
74
|
display: flex;
|
|
71
75
|
flex: 1;
|
|
76
|
+
align-items: center;
|
|
72
77
|
height: $noticebar-line-height;
|
|
73
78
|
line-height: $noticebar-line-height;
|
|
74
79
|
overflow: hidden;
|
|
@@ -77,6 +82,7 @@
|
|
|
77
82
|
.nut-noticebar-box-wrap-content {
|
|
78
83
|
position: absolute;
|
|
79
84
|
white-space: nowrap;
|
|
85
|
+
color: $noticebar-color;
|
|
80
86
|
|
|
81
87
|
&.nut-ellipsis {
|
|
82
88
|
max-width: 100%;
|
|
@@ -45,6 +45,9 @@
|
|
|
45
45
|
margin-right: var(--nutui-noticebar-icon-gap, 4px);
|
|
46
46
|
background-size: 100% 100%;
|
|
47
47
|
}
|
|
48
|
+
.nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
|
|
49
|
+
color: var(--nutui-noticebar-color, #d9500b);
|
|
50
|
+
}
|
|
48
51
|
.nut-noticebar .nut-noticebar-box-right-icon {
|
|
49
52
|
display: flex;
|
|
50
53
|
align-items: center;
|
|
@@ -55,10 +58,12 @@
|
|
|
55
58
|
.nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
|
|
56
59
|
width: 12px;
|
|
57
60
|
height: 12px;
|
|
61
|
+
color: var(--nutui-noticebar-color, #d9500b);
|
|
58
62
|
}
|
|
59
63
|
.nut-noticebar .nut-noticebar-box-wrap {
|
|
60
64
|
display: flex;
|
|
61
65
|
flex: 1;
|
|
66
|
+
align-items: center;
|
|
62
67
|
height: var(--nutui-noticebar-line-height, 24px);
|
|
63
68
|
line-height: var(--nutui-noticebar-line-height, 24px);
|
|
64
69
|
overflow: hidden;
|
|
@@ -67,6 +72,7 @@
|
|
|
67
72
|
.nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
|
|
68
73
|
position: absolute;
|
|
69
74
|
white-space: nowrap;
|
|
75
|
+
color: var(--nutui-noticebar-color, #d9500b);
|
|
70
76
|
}
|
|
71
77
|
.nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content.nut-ellipsis {
|
|
72
78
|
max-width: 100%;
|
|
@@ -45,6 +45,9 @@
|
|
|
45
45
|
margin-right: var(--nutui-noticebar-icon-gap, 4px);
|
|
46
46
|
background-size: 100% 100%;
|
|
47
47
|
}
|
|
48
|
+
.nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
|
|
49
|
+
color: var(--nutui-noticebar-color, #d9500b);
|
|
50
|
+
}
|
|
48
51
|
.nut-noticebar .nut-noticebar-box-right-icon {
|
|
49
52
|
display: flex;
|
|
50
53
|
align-items: center;
|
|
@@ -55,10 +58,12 @@
|
|
|
55
58
|
.nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
|
|
56
59
|
width: 12px;
|
|
57
60
|
height: 12px;
|
|
61
|
+
color: var(--nutui-noticebar-color, #d9500b);
|
|
58
62
|
}
|
|
59
63
|
.nut-noticebar .nut-noticebar-box-wrap {
|
|
60
64
|
display: flex;
|
|
61
65
|
flex: 1;
|
|
66
|
+
align-items: center;
|
|
62
67
|
height: var(--nutui-noticebar-line-height, 24px);
|
|
63
68
|
line-height: var(--nutui-noticebar-line-height, 24px);
|
|
64
69
|
overflow: hidden;
|
|
@@ -67,6 +72,7 @@
|
|
|
67
72
|
.nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
|
|
68
73
|
position: absolute;
|
|
69
74
|
white-space: nowrap;
|
|
75
|
+
color: var(--nutui-noticebar-color, #d9500b);
|
|
70
76
|
}
|
|
71
77
|
.nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content.nut-ellipsis {
|
|
72
78
|
max-width: 100%;
|
|
@@ -51,6 +51,9 @@
|
|
|
51
51
|
min-width: $noticebar-left-icon-width;
|
|
52
52
|
margin-right: $noticebar-icon-gap;
|
|
53
53
|
background-size: 100% 100%;
|
|
54
|
+
.nut-icon {
|
|
55
|
+
color: $noticebar-color;
|
|
56
|
+
}
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
&-right-icon {
|
|
@@ -63,12 +66,14 @@
|
|
|
63
66
|
.nut-icon {
|
|
64
67
|
width: 12px;
|
|
65
68
|
height: 12px;
|
|
69
|
+
color: $noticebar-color;
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
&-wrap {
|
|
70
74
|
display: flex;
|
|
71
75
|
flex: 1;
|
|
76
|
+
align-items: center;
|
|
72
77
|
height: $noticebar-line-height;
|
|
73
78
|
line-height: $noticebar-line-height;
|
|
74
79
|
overflow: hidden;
|
|
@@ -77,6 +82,7 @@
|
|
|
77
82
|
.nut-noticebar-box-wrap-content {
|
|
78
83
|
position: absolute;
|
|
79
84
|
white-space: nowrap;
|
|
85
|
+
color: $noticebar-color;
|
|
80
86
|
|
|
81
87
|
&.nut-ellipsis {
|
|
82
88
|
max-width: 100%;
|
|
@@ -45,6 +45,9 @@
|
|
|
45
45
|
margin-right: var(--nutui-noticebar-icon-gap, 4px);
|
|
46
46
|
background-size: 100% 100%;
|
|
47
47
|
}
|
|
48
|
+
.nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
|
|
49
|
+
color: var(--nutui-noticebar-color, #d9500b);
|
|
50
|
+
}
|
|
48
51
|
.nut-noticebar .nut-noticebar-box-right-icon {
|
|
49
52
|
display: flex;
|
|
50
53
|
align-items: center;
|
|
@@ -55,10 +58,12 @@
|
|
|
55
58
|
.nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
|
|
56
59
|
width: 12px;
|
|
57
60
|
height: 12px;
|
|
61
|
+
color: var(--nutui-noticebar-color, #d9500b);
|
|
58
62
|
}
|
|
59
63
|
.nut-noticebar .nut-noticebar-box-wrap {
|
|
60
64
|
display: flex;
|
|
61
65
|
flex: 1;
|
|
66
|
+
align-items: center;
|
|
62
67
|
height: var(--nutui-noticebar-line-height, 24px);
|
|
63
68
|
line-height: var(--nutui-noticebar-line-height, 24px);
|
|
64
69
|
overflow: hidden;
|
|
@@ -67,6 +72,7 @@
|
|
|
67
72
|
.nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
|
|
68
73
|
position: absolute;
|
|
69
74
|
white-space: nowrap;
|
|
75
|
+
color: var(--nutui-noticebar-color, #d9500b);
|
|
70
76
|
}
|
|
71
77
|
.nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content.nut-ellipsis {
|
|
72
78
|
max-width: 100%;
|
|
@@ -51,6 +51,9 @@
|
|
|
51
51
|
min-width: $noticebar-left-icon-width;
|
|
52
52
|
margin-right: $noticebar-icon-gap;
|
|
53
53
|
background-size: 100% 100%;
|
|
54
|
+
.nut-icon {
|
|
55
|
+
color: $noticebar-color;
|
|
56
|
+
}
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
&-right-icon {
|
|
@@ -63,12 +66,14 @@
|
|
|
63
66
|
.nut-icon {
|
|
64
67
|
width: 12px;
|
|
65
68
|
height: 12px;
|
|
69
|
+
color: $noticebar-color;
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
&-wrap {
|
|
70
74
|
display: flex;
|
|
71
75
|
flex: 1;
|
|
76
|
+
align-items: center;
|
|
72
77
|
height: $noticebar-line-height;
|
|
73
78
|
line-height: $noticebar-line-height;
|
|
74
79
|
overflow: hidden;
|
|
@@ -77,6 +82,7 @@
|
|
|
77
82
|
.nut-noticebar-box-wrap-content {
|
|
78
83
|
position: absolute;
|
|
79
84
|
white-space: nowrap;
|
|
85
|
+
color: $noticebar-color;
|
|
80
86
|
|
|
81
87
|
&.nut-ellipsis {
|
|
82
88
|
max-width: 100%;
|
|
@@ -45,6 +45,9 @@
|
|
|
45
45
|
margin-right: var(--nutui-noticebar-icon-gap, 4px);
|
|
46
46
|
background-size: 100% 100%;
|
|
47
47
|
}
|
|
48
|
+
.nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
|
|
49
|
+
color: var(--nutui-noticebar-color, #d9500b);
|
|
50
|
+
}
|
|
48
51
|
.nut-noticebar .nut-noticebar-box-right-icon {
|
|
49
52
|
display: flex;
|
|
50
53
|
align-items: center;
|
|
@@ -55,10 +58,12 @@
|
|
|
55
58
|
.nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
|
|
56
59
|
width: 12px;
|
|
57
60
|
height: 12px;
|
|
61
|
+
color: var(--nutui-noticebar-color, #d9500b);
|
|
58
62
|
}
|
|
59
63
|
.nut-noticebar .nut-noticebar-box-wrap {
|
|
60
64
|
display: flex;
|
|
61
65
|
flex: 1;
|
|
66
|
+
align-items: center;
|
|
62
67
|
height: var(--nutui-noticebar-line-height, 24px);
|
|
63
68
|
line-height: var(--nutui-noticebar-line-height, 24px);
|
|
64
69
|
overflow: hidden;
|
|
@@ -67,6 +72,7 @@
|
|
|
67
72
|
.nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
|
|
68
73
|
position: absolute;
|
|
69
74
|
white-space: nowrap;
|
|
75
|
+
color: var(--nutui-noticebar-color, #d9500b);
|
|
70
76
|
}
|
|
71
77
|
.nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content.nut-ellipsis {
|
|
72
78
|
max-width: 100%;
|