@nutui/nutui-react-taro 3.0.19-cpp.26-beta.4 → 3.0.19-cpp.27
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 +14 -0
- package/dist/cjs/locales/base.d.ts +5 -0
- package/dist/cjs/locales/en-US.js +5 -0
- package/dist/cjs/locales/id-ID.js +5 -0
- package/dist/cjs/locales/ja-JP.js +6 -1
- package/dist/cjs/locales/tr-TR.js +5 -0
- package/dist/cjs/locales/zh-CN.js +5 -0
- package/dist/cjs/locales/zh-TW.js +5 -0
- package/dist/cjs/locales/zh-UG.js +5 -0
- package/dist/cjs/packages/actionsheet/style/style.harmony.css +7 -7
- package/dist/cjs/packages/address/address.d.ts +1 -1
- package/dist/cjs/packages/address/style/style.harmony.css +7 -7
- package/dist/cjs/packages/animatingnumbers/countup.js +3 -1
- package/dist/cjs/packages/avatar/avatar.js +32 -6
- package/dist/cjs/packages/badge/badge.js +16 -3
- package/dist/cjs/packages/button/button.d.ts +2 -21
- package/dist/cjs/packages/button/button.js +2 -3
- package/dist/cjs/packages/button/index.d.ts +0 -1
- package/dist/cjs/packages/calendar/style/style.harmony.css +7 -7
- package/dist/cjs/packages/cascader/style/style.harmony.css +7 -7
- package/dist/cjs/packages/datepicker/style/style.harmony.css +7 -7
- package/dist/cjs/packages/dialog/dialog.js +6 -2
- package/dist/cjs/packages/divider/divider.js +2 -2
- package/dist/cjs/packages/empty/empty.d.ts +4 -4
- package/dist/cjs/packages/image/image.js +11 -3
- package/dist/cjs/packages/imagepreview/style/style.harmony.css +7 -7
- package/dist/cjs/packages/input/input.js +10 -3
- package/dist/cjs/packages/numberkeyboard/style/style.harmony.css +7 -7
- package/dist/cjs/packages/picker/style/style.harmony.css +7 -7
- package/dist/cjs/packages/popover/style/style.harmony.css +7 -7
- package/dist/cjs/packages/popup/style/popup.scss +8 -7
- package/dist/cjs/packages/popup/style/style.css +7 -7
- package/dist/cjs/packages/popup/style/style.harmony.css +7 -7
- package/dist/cjs/packages/popup/style-jmapp/popup.scss +8 -7
- package/dist/cjs/packages/popup/style-jmapp/style.css +7 -7
- package/dist/cjs/packages/popup/style-jrkf/popup.scss +8 -7
- package/dist/cjs/packages/popup/style-jrkf/style.css +7 -7
- package/dist/cjs/packages/progress/progress.js +2 -4
- package/dist/cjs/packages/quickenter/quickenter.js +21 -15
- package/dist/cjs/packages/quickenter/style/quickenter.scss +10 -2
- package/dist/cjs/packages/quickenter/style/style.css +7 -1
- package/dist/cjs/packages/quickenter/style/style.harmony.css +13 -8
- package/dist/cjs/packages/quickenter/style-jmapp/quickenter.scss +10 -2
- package/dist/cjs/packages/quickenter/style-jmapp/style.css +7 -1
- package/dist/cjs/packages/quickenter/style-jrkf/quickenter.scss +10 -2
- package/dist/cjs/packages/quickenter/style-jrkf/style.css +7 -1
- package/dist/cjs/packages/resultpage/resultpage.js +2 -1
- package/dist/cjs/packages/searchbar/searchbar.js +23 -9
- package/dist/cjs/packages/shortpassword/style/style.harmony.css +7 -7
- package/dist/cjs/packages/swipe/swipe.d.ts +1 -1
- package/dist/cjs/packages/tabs/tabs.js +12 -5
- package/dist/cjs/packages/timeselect/style/style.harmony.css +7 -7
- package/dist/cjs/packages/tour/style/style.harmony.css +7 -7
- package/dist/cjs/types/spec/button/base.d.ts +2 -1
- package/dist/cjs/types/spec/button/taro.d.ts +5 -1
- package/dist/cjs/types/spec/quickenter/base.d.ts +1 -0
- package/dist/cjs/utils/taro/get-rect.js +4 -2
- package/dist/es/locales/base.d.ts +5 -0
- package/dist/es/locales/en-US.js +5 -0
- package/dist/es/locales/id-ID.js +5 -0
- package/dist/es/locales/ja-JP.js +6 -1
- package/dist/es/locales/tr-TR.js +5 -0
- package/dist/es/locales/zh-CN.js +5 -0
- package/dist/es/locales/zh-TW.js +5 -0
- package/dist/es/locales/zh-UG.js +5 -0
- package/dist/es/packages/actionsheet/style/style.harmony.css +7 -7
- package/dist/es/packages/address/address.d.ts +1 -1
- package/dist/es/packages/address/style/style.harmony.css +7 -7
- package/dist/es/packages/animatingnumbers/countup.js +3 -1
- package/dist/es/packages/avatar/avatar.js +32 -6
- package/dist/es/packages/badge/badge.js +16 -3
- package/dist/es/packages/button/button.d.ts +2 -21
- package/dist/es/packages/button/button.js +2 -4
- package/dist/es/packages/button/index.d.ts +0 -1
- package/dist/es/packages/calendar/style/style.harmony.css +7 -7
- package/dist/es/packages/cascader/style/style.harmony.css +7 -7
- package/dist/es/packages/datepicker/style/style.harmony.css +7 -7
- package/dist/es/packages/dialog/dialog.js +6 -2
- package/dist/es/packages/divider/divider.js +1 -1
- package/dist/es/packages/empty/empty.d.ts +4 -4
- package/dist/es/packages/image/image.js +11 -3
- package/dist/es/packages/imagepreview/style/style.harmony.css +7 -7
- package/dist/es/packages/input/input.js +10 -3
- package/dist/es/packages/numberkeyboard/style/style.harmony.css +7 -7
- package/dist/es/packages/picker/style/style.harmony.css +7 -7
- package/dist/es/packages/popover/style/style.harmony.css +7 -7
- package/dist/es/packages/popup/popup.js +1 -2
- package/dist/es/packages/popup/style/popup.scss +8 -7
- package/dist/es/packages/popup/style/style.css +7 -7
- package/dist/es/packages/popup/style/style.harmony.css +7 -7
- package/dist/es/packages/popup/style-jmapp/popup.scss +8 -7
- package/dist/es/packages/popup/style-jmapp/style.css +7 -7
- package/dist/es/packages/popup/style-jrkf/popup.scss +8 -7
- package/dist/es/packages/popup/style-jrkf/style.css +7 -7
- package/dist/es/packages/progress/progress.js +2 -4
- package/dist/es/packages/quickenter/quickenter.js +19 -13
- package/dist/es/packages/quickenter/style/quickenter.scss +10 -2
- package/dist/es/packages/quickenter/style/style.css +7 -1
- package/dist/es/packages/quickenter/style/style.harmony.css +13 -8
- package/dist/es/packages/quickenter/style-jmapp/quickenter.scss +10 -2
- package/dist/es/packages/quickenter/style-jmapp/style.css +7 -1
- package/dist/es/packages/quickenter/style-jrkf/quickenter.scss +10 -2
- package/dist/es/packages/quickenter/style-jrkf/style.css +7 -1
- package/dist/es/packages/resultpage/resultpage.js +2 -1
- package/dist/es/packages/searchbar/searchbar.js +23 -9
- package/dist/es/packages/shortpassword/style/style.harmony.css +7 -7
- package/dist/es/packages/swipe/swipe.d.ts +1 -1
- package/dist/es/packages/tabs/tabs.js +12 -5
- package/dist/es/packages/timeselect/style/style.harmony.css +7 -7
- package/dist/es/packages/tour/style/style.harmony.css +7 -7
- package/dist/es/types/spec/button/base.d.ts +2 -1
- package/dist/es/types/spec/button/taro.d.ts +5 -1
- package/dist/es/types/spec/quickenter/base.d.ts +1 -0
- package/dist/es/utils/taro/get-rect.js +4 -2
- package/dist/nutui.react.umd.js +1127 -102
- package/dist/style-jmapp.css +1 -1
- package/dist/style-jmapp.scss +34 -34
- package/dist/style-jrkf.css +1 -1
- package/dist/style-jrkf.scss +42 -42
- package/dist/style.css +1 -1
- package/dist/style.scss +36 -36
- package/dist/styles/jd-font.scss +2 -2
- package/dist/styles/themes/daojia.css +1 -1
- package/dist/styles/themes/dark-daojia.css +1 -1
- package/dist/styles/themes/dark.css +1 -1
- package/dist/styles/themes/default.css +1 -1
- package/package.json +1 -1
|
@@ -55,7 +55,8 @@ var getRectInMultiPlatform = function getRectInMultiPlatform(element) {
|
|
|
55
55
|
resolve(lru.get(element));
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
(0, _taro.createSelectorQuery)()
|
|
58
|
+
(0, _taro.createSelectorQuery)() // https://taro.jd.com/docs/reference/config/page/
|
|
59
|
+
.in((element === null || element === void 0 ? void 0 : element._scope) || element).select("#".concat(harmonyId || element.uid)).boundingClientRect().exec(function(param) {
|
|
59
60
|
var _param = (0, _sliced_to_array._)(param, 1), rects = _param[0];
|
|
60
61
|
if (rects) {
|
|
61
62
|
lru.set(element, rects);
|
|
@@ -86,7 +87,8 @@ var getRectInMultiPlatformWithoutCache = function getRectInMultiPlatformWithoutC
|
|
|
86
87
|
return [
|
|
87
88
|
2,
|
|
88
89
|
new Promise(function(resolve, reject) {
|
|
89
|
-
(0, _taro.createSelectorQuery)()
|
|
90
|
+
(0, _taro.createSelectorQuery)() // https://taro.jd.com/docs/reference/config/page/
|
|
91
|
+
.in((element === null || element === void 0 ? void 0 : element._scope) || element).select("#".concat(harmonyId || element.uid)).boundingClientRect().exec(function(param) {
|
|
90
92
|
var _param = (0, _sliced_to_array._)(param, 1), rects = _param[0];
|
|
91
93
|
resolve(rects);
|
|
92
94
|
});
|
package/dist/es/locales/en-US.js
CHANGED
package/dist/es/locales/id-ID.js
CHANGED
package/dist/es/locales/ja-JP.js
CHANGED
|
@@ -8,6 +8,12 @@ var jaJP = {
|
|
|
8
8
|
select: '選択してください',
|
|
9
9
|
edit: '編集',
|
|
10
10
|
reset: 'リセット',
|
|
11
|
+
close: '閉じる',
|
|
12
|
+
back: '戻る',
|
|
13
|
+
clear: 'クリア',
|
|
14
|
+
image: {
|
|
15
|
+
errorTip: '画像の読み込みに失敗しました'
|
|
16
|
+
},
|
|
11
17
|
video: {
|
|
12
18
|
errorTip: '動画の読み込みに失敗しました',
|
|
13
19
|
clickRetry: 'クリックして再試行'
|
|
@@ -155,7 +161,6 @@ var jaJP = {
|
|
|
155
161
|
errorCanvasTips: '現在の環境はCanvasをサポートしていません'
|
|
156
162
|
},
|
|
157
163
|
mask: 'マスク',
|
|
158
|
-
close: '閉じる',
|
|
159
164
|
quickenter: {
|
|
160
165
|
title: 'クイックアクセス'
|
|
161
166
|
}
|
package/dist/es/locales/tr-TR.js
CHANGED
package/dist/es/locales/zh-CN.js
CHANGED
package/dist/es/locales/zh-TW.js
CHANGED
package/dist/es/locales/zh-UG.js
CHANGED
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
animation-name: popup-slide-right-enter;
|
|
292
292
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
293
293
|
}
|
|
294
|
-
.nut-popup-slide-right-exit
|
|
294
|
+
.nut-popup-slide-right-exit {
|
|
295
295
|
animation-fill-mode: both;
|
|
296
296
|
animation-name: popup-slide-right-exit;
|
|
297
297
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
transform: translate3d(0, 0%, 0);
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
@keyframes
|
|
307
|
+
@keyframes slide-bottom-exit {
|
|
308
308
|
from {
|
|
309
309
|
transform: translate3d(0, 0%, 0);
|
|
310
310
|
}
|
|
@@ -313,14 +313,14 @@
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
.nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
|
|
316
|
-
transform:
|
|
316
|
+
transform: translate(0, 0);
|
|
317
317
|
animation-fill-mode: both;
|
|
318
318
|
animation-name: popup-slide-bottom-enter;
|
|
319
319
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
320
320
|
}
|
|
321
|
-
.nut-popup-slide-bottom-exit
|
|
321
|
+
.nut-popup-slide-bottom-exit {
|
|
322
322
|
animation-fill-mode: both;
|
|
323
|
-
animation-name:
|
|
323
|
+
animation-name: slide-bottom-exit;
|
|
324
324
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
325
325
|
}
|
|
326
326
|
@keyframes popup-slide-left-enter {
|
|
@@ -340,12 +340,12 @@
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
.nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
|
|
343
|
-
transform:
|
|
343
|
+
transform: translate(0, 0);
|
|
344
344
|
animation-fill-mode: both;
|
|
345
345
|
animation-name: popup-slide-left-enter;
|
|
346
346
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
347
347
|
}
|
|
348
|
-
.nut-popup-slide-left-exit-active {
|
|
348
|
+
.nut-popup-slide-left-exit-active, .nut-popup-slide-left-exit-done {
|
|
349
349
|
animation-fill-mode: both;
|
|
350
350
|
animation-name: popup-slide-left-exit;
|
|
351
351
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AddressRef, TaroAddressProps } from "../../types";
|
|
3
|
-
export declare const Address: React.ForwardRefExoticComponent<Partial<TaroAddressProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "
|
|
3
|
+
export declare const Address: React.ForwardRefExoticComponent<Partial<TaroAddressProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "title" | "onClick" | "onLoad"> & React.RefAttributes<AddressRef>>;
|
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
animation-name: popup-slide-right-enter;
|
|
442
442
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
443
443
|
}
|
|
444
|
-
.nut-popup-slide-right-exit
|
|
444
|
+
.nut-popup-slide-right-exit {
|
|
445
445
|
animation-fill-mode: both;
|
|
446
446
|
animation-name: popup-slide-right-exit;
|
|
447
447
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -454,7 +454,7 @@
|
|
|
454
454
|
transform: translate3d(0, 0%, 0);
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
@keyframes
|
|
457
|
+
@keyframes slide-bottom-exit {
|
|
458
458
|
from {
|
|
459
459
|
transform: translate3d(0, 0%, 0);
|
|
460
460
|
}
|
|
@@ -463,14 +463,14 @@
|
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
465
|
.nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
|
|
466
|
-
transform:
|
|
466
|
+
transform: translate(0, 0);
|
|
467
467
|
animation-fill-mode: both;
|
|
468
468
|
animation-name: popup-slide-bottom-enter;
|
|
469
469
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
470
470
|
}
|
|
471
|
-
.nut-popup-slide-bottom-exit
|
|
471
|
+
.nut-popup-slide-bottom-exit {
|
|
472
472
|
animation-fill-mode: both;
|
|
473
|
-
animation-name:
|
|
473
|
+
animation-name: slide-bottom-exit;
|
|
474
474
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
475
475
|
}
|
|
476
476
|
@keyframes popup-slide-left-enter {
|
|
@@ -490,12 +490,12 @@
|
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
.nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
|
|
493
|
-
transform:
|
|
493
|
+
transform: translate(0, 0);
|
|
494
494
|
animation-fill-mode: both;
|
|
495
495
|
animation-name: popup-slide-left-enter;
|
|
496
496
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
497
497
|
}
|
|
498
|
-
.nut-popup-slide-left-exit-active {
|
|
498
|
+
.nut-popup-slide-left-exit-active, .nut-popup-slide-left-exit-done {
|
|
499
499
|
animation-fill-mode: both;
|
|
500
500
|
animation-name: popup-slide-left-exit;
|
|
501
501
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -48,7 +48,9 @@ export var CountUp = function(props) {
|
|
|
48
48
|
var isLoaded = useRef(false);
|
|
49
49
|
var setNumberTransform = useCallback(function() {
|
|
50
50
|
if (countupRef.current && numberArr.length) {
|
|
51
|
-
|
|
51
|
+
var _countupRef_current;
|
|
52
|
+
createSelectorQuery()// @ts-ignore
|
|
53
|
+
.in(((_countupRef_current = countupRef.current) === null || _countupRef_current === void 0 ? void 0 : _countupRef_current._scope) || countupRef.current).selectAll('.nut-countup-listitem').node(function(numberItems) {
|
|
52
54
|
var transformArrCache = [];
|
|
53
55
|
Object.keys(numberItems).forEach(function(key) {
|
|
54
56
|
var elem = numberItems[Number(key)];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
2
2
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
3
3
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
4
|
+
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
|
|
4
5
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
5
6
|
import React, { useContext, useEffect, useRef, useState } from "react";
|
|
6
7
|
import { Image, View } from "@tarojs/components";
|
|
@@ -25,7 +26,23 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
|
25
26
|
});
|
|
26
27
|
var classPrefix = "nut-avatar";
|
|
27
28
|
export var Avatar = function(props) {
|
|
28
|
-
var
|
|
29
|
+
var _ref = _object_spread({}, defaultProps, props), children = _ref.children, size = _ref.size, shape = _ref.shape, background = _ref.background, color = _ref.color, src = _ref.src, alt = _ref.alt, icon = _ref.icon, mode = _ref.mode, fit = _ref.fit, avatarIndex = _ref.avatarIndex, className = _ref.className, style = _ref.style, onClick = _ref.onClick, onError = _ref.onError, rest = _object_without_properties(_ref, [
|
|
30
|
+
"children",
|
|
31
|
+
"size",
|
|
32
|
+
"shape",
|
|
33
|
+
"background",
|
|
34
|
+
"color",
|
|
35
|
+
"src",
|
|
36
|
+
"alt",
|
|
37
|
+
"icon",
|
|
38
|
+
"mode",
|
|
39
|
+
"fit",
|
|
40
|
+
"avatarIndex",
|
|
41
|
+
"className",
|
|
42
|
+
"style",
|
|
43
|
+
"onClick",
|
|
44
|
+
"onError"
|
|
45
|
+
]);
|
|
29
46
|
var _useState // 是否显示的最大头像个数
|
|
30
47
|
= _sliced_to_array(useState(false), 2), showMax = _useState[0], setShowMax = _useState[1];
|
|
31
48
|
var avatarRef = useRef(null);
|
|
@@ -62,7 +79,8 @@ export var Avatar = function(props) {
|
|
|
62
79
|
}
|
|
63
80
|
}, [
|
|
64
81
|
avatarIndex,
|
|
65
|
-
groupCount
|
|
82
|
+
groupCount,
|
|
83
|
+
groupMax
|
|
66
84
|
]);
|
|
67
85
|
var errorEvent = function() {
|
|
68
86
|
onError && onError();
|
|
@@ -70,19 +88,26 @@ export var Avatar = function(props) {
|
|
|
70
88
|
var clickAvatar = function(e) {
|
|
71
89
|
onClick && onClick(e);
|
|
72
90
|
};
|
|
73
|
-
return /*#__PURE__*/ React.createElement(React.Fragment, null, (showMax || !groupMax || avatarIndex <= groupMax) && /*#__PURE__*/ React.createElement(View, {
|
|
91
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, (showMax || !groupMax || avatarIndex <= groupMax) && /*#__PURE__*/ React.createElement(View, _object_spread({
|
|
74
92
|
className: cls,
|
|
75
93
|
style: !showMax ? styles : maxStyles,
|
|
76
94
|
onClick: clickAvatar,
|
|
77
|
-
ref: avatarRef
|
|
78
|
-
|
|
95
|
+
ref: avatarRef,
|
|
96
|
+
// @ts-ignore
|
|
97
|
+
ariaRole: onClick ? 'button' : undefined
|
|
98
|
+
}, rest), (!groupMax || avatarIndex <= groupMax) && /*#__PURE__*/ React.createElement(React.Fragment, null, src && /*#__PURE__*/ React.createElement(Image, {
|
|
79
99
|
className: "nut-avatar-img nut-avatar-".concat(groupSize || size || 'normal', "-img"),
|
|
80
100
|
src: src,
|
|
101
|
+
nativeProps: {
|
|
102
|
+
alt: alt
|
|
103
|
+
},
|
|
81
104
|
style: {
|
|
82
105
|
objectFit: fit
|
|
83
106
|
},
|
|
84
107
|
mode: mode,
|
|
85
|
-
onError: errorEvent
|
|
108
|
+
onError: errorEvent,
|
|
109
|
+
// @ts-ignore
|
|
110
|
+
ariaHidden: true
|
|
86
111
|
}), /*#__PURE__*/ React.isValidElement(icon) ? /*#__PURE__*/ React.createElement(View, {
|
|
87
112
|
className: "nut-avatar-text"
|
|
88
113
|
}, /*#__PURE__*/ React.cloneElement(icon, _object_spread_props(_object_spread({}, icon.props), {
|
|
@@ -96,6 +121,7 @@ export var Avatar = function(props) {
|
|
|
96
121
|
}, children), !src && !icon && !children && /*#__PURE__*/ React.createElement(View, {
|
|
97
122
|
className: "nut-avatar-text"
|
|
98
123
|
}, /*#__PURE__*/ React.createElement(User, {
|
|
124
|
+
ariaHidden: true,
|
|
99
125
|
style: {
|
|
100
126
|
color: color
|
|
101
127
|
},
|
|
@@ -2,6 +2,7 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
|
|
|
2
2
|
import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
3
3
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
4
4
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
5
|
+
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
|
|
5
6
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
6
7
|
import { _ as _type_of } from "@swc/helpers/_/_type_of";
|
|
7
8
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
@@ -41,7 +42,19 @@ export var Badge = function(props) {
|
|
|
41
42
|
};
|
|
42
43
|
var _this;
|
|
43
44
|
var rtl = useRtl();
|
|
44
|
-
var
|
|
45
|
+
var _ref = _object_spread({}, defaultProps, props), className = _ref.className, style = _ref.style, value = _ref.value, max = _ref.max, children = _ref.children, dot = _ref.dot, top = _ref.top, right = _ref.right, fill = _ref.fill, size = _ref.size, disabled = _ref.disabled, rest = _object_without_properties(_ref, [
|
|
46
|
+
"className",
|
|
47
|
+
"style",
|
|
48
|
+
"value",
|
|
49
|
+
"max",
|
|
50
|
+
"children",
|
|
51
|
+
"dot",
|
|
52
|
+
"top",
|
|
53
|
+
"right",
|
|
54
|
+
"fill",
|
|
55
|
+
"size",
|
|
56
|
+
"disabled"
|
|
57
|
+
]);
|
|
45
58
|
var classPrefix = 'nut-badge';
|
|
46
59
|
var isHarmony = harmony();
|
|
47
60
|
var classes = classNames(classPrefix, className);
|
|
@@ -69,11 +82,11 @@ export var Badge = function(props) {
|
|
|
69
82
|
})();
|
|
70
83
|
};
|
|
71
84
|
var _obj1;
|
|
72
|
-
return /*#__PURE__*/ React.createElement(View, {
|
|
85
|
+
return /*#__PURE__*/ React.createElement(View, _object_spread({
|
|
73
86
|
className: classes,
|
|
74
87
|
style: style,
|
|
75
88
|
ref: badgeRef
|
|
76
|
-
}, isIcon() && /*#__PURE__*/ React.createElement(View, {
|
|
89
|
+
}, rest), isIcon() && /*#__PURE__*/ React.createElement(View, {
|
|
77
90
|
className: classNames("".concat(classPrefix, "-content"), (_obj1 = {}, _define_property(_obj1, "".concat(classPrefix, "-icon"), true), _define_property(_obj1, "".concat(classPrefix, "-icon-rtl"), rtl), _obj1)),
|
|
78
91
|
style: contentStyle
|
|
79
92
|
}, value), children, !isIcon() && (getContent() || dot) && /*#__PURE__*/ React.createElement(View, {
|
|
@@ -1,22 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export type ButtonType = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
5
|
-
export type ButtonSize = 'xlarge' | 'large' | 'normal' | 'small' | 'mini';
|
|
6
|
-
export type ButtonShape = 'square' | 'round';
|
|
7
|
-
export type ButtonFill = 'solid' | 'outline' | 'dashed' | 'none';
|
|
8
|
-
export interface ButtonProps extends BasicComponent {
|
|
9
|
-
color: string;
|
|
10
|
-
shape: ButtonShape;
|
|
11
|
-
type: ButtonType;
|
|
12
|
-
size: ButtonSize;
|
|
13
|
-
fill: ButtonFill;
|
|
14
|
-
block: boolean;
|
|
15
|
-
loading: boolean;
|
|
16
|
-
disabled: boolean;
|
|
17
|
-
icon: React.ReactNode;
|
|
18
|
-
rightIcon: React.ReactNode;
|
|
19
|
-
nativeType: 'submit' | 'reset';
|
|
20
|
-
onClick: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
21
|
-
}
|
|
22
|
-
export declare const Button: React.ForwardRefExoticComponent<Partial<ButtonProps> & React.RefAttributes<HTMLButtonElement>>;
|
|
2
|
+
import { TaroButtonProps } from "../../types";
|
|
3
|
+
export declare const Button: React.ForwardRefExoticComponent<Omit<Partial<TaroButtonProps>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -4,8 +4,7 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
|
4
4
|
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
|
|
5
5
|
import React, { useCallback, useMemo } from "react";
|
|
6
6
|
import classNames from "classnames";
|
|
7
|
-
import {
|
|
8
|
-
View } from "@tarojs/components";
|
|
7
|
+
import { View } from "@tarojs/components";
|
|
9
8
|
import { Loading } from "@nutui/icons-react-taro";
|
|
10
9
|
import { ComponentDefaults } from "../../utils/typings";
|
|
11
10
|
import { harmony } from "../../utils/taro/platform";
|
|
@@ -96,9 +95,7 @@ export var Button = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
|
96
95
|
// ;(rest as any).type = formType
|
|
97
96
|
// }
|
|
98
97
|
return (
|
|
99
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
100
98
|
// @ts-ignore
|
|
101
|
-
// eslint-disable-next-line react/button-has-type
|
|
102
99
|
// <TaroButton
|
|
103
100
|
/*#__PURE__*/ (React.createElement(View, _object_spread_props(_object_spread({}, rest), {
|
|
104
101
|
ref: ref,
|
|
@@ -111,6 +108,7 @@ export var Button = /*#__PURE__*/ React.forwardRef(function(props, ref) {
|
|
|
111
108
|
}), /*#__PURE__*/ React.createElement(View, {
|
|
112
109
|
className: "nut-button-wrap"
|
|
113
110
|
}, loading && /*#__PURE__*/ React.createElement(Loading, {
|
|
111
|
+
ariaHidden: true,
|
|
114
112
|
className: "nut-icon-loading"
|
|
115
113
|
}), !loading && icon, children && /*#__PURE__*/ React.createElement(View, {
|
|
116
114
|
className: "nut-button-children nut-button-".concat(size, "-children nut-button-").concat(type, "-children ").concat(!(props.fill || disabled || loading) ? '' : "nut-button-".concat(type).concat(props.fill ? "-".concat(fill) : '').concat(disabled || loading ? '-disabled' : '')).concat(icon || loading ? " nut-button-text" : '').concat(rightIcon ? ' nut-button-text-right' : ''),
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
animation-name: popup-slide-right-enter;
|
|
292
292
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
293
293
|
}
|
|
294
|
-
.nut-popup-slide-right-exit
|
|
294
|
+
.nut-popup-slide-right-exit {
|
|
295
295
|
animation-fill-mode: both;
|
|
296
296
|
animation-name: popup-slide-right-exit;
|
|
297
297
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
transform: translate3d(0, 0%, 0);
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
@keyframes
|
|
307
|
+
@keyframes slide-bottom-exit {
|
|
308
308
|
from {
|
|
309
309
|
transform: translate3d(0, 0%, 0);
|
|
310
310
|
}
|
|
@@ -313,14 +313,14 @@
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
.nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
|
|
316
|
-
transform:
|
|
316
|
+
transform: translate(0, 0);
|
|
317
317
|
animation-fill-mode: both;
|
|
318
318
|
animation-name: popup-slide-bottom-enter;
|
|
319
319
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
320
320
|
}
|
|
321
|
-
.nut-popup-slide-bottom-exit
|
|
321
|
+
.nut-popup-slide-bottom-exit {
|
|
322
322
|
animation-fill-mode: both;
|
|
323
|
-
animation-name:
|
|
323
|
+
animation-name: slide-bottom-exit;
|
|
324
324
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
325
325
|
}
|
|
326
326
|
@keyframes popup-slide-left-enter {
|
|
@@ -340,12 +340,12 @@
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
.nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
|
|
343
|
-
transform:
|
|
343
|
+
transform: translate(0, 0);
|
|
344
344
|
animation-fill-mode: both;
|
|
345
345
|
animation-name: popup-slide-left-enter;
|
|
346
346
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
347
347
|
}
|
|
348
|
-
.nut-popup-slide-left-exit-active {
|
|
348
|
+
.nut-popup-slide-left-exit-active, .nut-popup-slide-left-exit-done {
|
|
349
349
|
animation-fill-mode: both;
|
|
350
350
|
animation-name: popup-slide-left-exit;
|
|
351
351
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
animation-name: popup-slide-right-enter;
|
|
292
292
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
293
293
|
}
|
|
294
|
-
.nut-popup-slide-right-exit
|
|
294
|
+
.nut-popup-slide-right-exit {
|
|
295
295
|
animation-fill-mode: both;
|
|
296
296
|
animation-name: popup-slide-right-exit;
|
|
297
297
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
transform: translate3d(0, 0%, 0);
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
@keyframes
|
|
307
|
+
@keyframes slide-bottom-exit {
|
|
308
308
|
from {
|
|
309
309
|
transform: translate3d(0, 0%, 0);
|
|
310
310
|
}
|
|
@@ -313,14 +313,14 @@
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
.nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
|
|
316
|
-
transform:
|
|
316
|
+
transform: translate(0, 0);
|
|
317
317
|
animation-fill-mode: both;
|
|
318
318
|
animation-name: popup-slide-bottom-enter;
|
|
319
319
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
320
320
|
}
|
|
321
|
-
.nut-popup-slide-bottom-exit
|
|
321
|
+
.nut-popup-slide-bottom-exit {
|
|
322
322
|
animation-fill-mode: both;
|
|
323
|
-
animation-name:
|
|
323
|
+
animation-name: slide-bottom-exit;
|
|
324
324
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
325
325
|
}
|
|
326
326
|
@keyframes popup-slide-left-enter {
|
|
@@ -340,12 +340,12 @@
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
.nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
|
|
343
|
-
transform:
|
|
343
|
+
transform: translate(0, 0);
|
|
344
344
|
animation-fill-mode: both;
|
|
345
345
|
animation-name: popup-slide-left-enter;
|
|
346
346
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
347
347
|
}
|
|
348
|
-
.nut-popup-slide-left-exit-active {
|
|
348
|
+
.nut-popup-slide-left-exit-active, .nut-popup-slide-left-exit-done {
|
|
349
349
|
animation-fill-mode: both;
|
|
350
350
|
animation-name: popup-slide-left-exit;
|
|
351
351
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
animation-name: popup-slide-right-enter;
|
|
292
292
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
293
293
|
}
|
|
294
|
-
.nut-popup-slide-right-exit
|
|
294
|
+
.nut-popup-slide-right-exit {
|
|
295
295
|
animation-fill-mode: both;
|
|
296
296
|
animation-name: popup-slide-right-exit;
|
|
297
297
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
transform: translate3d(0, 0%, 0);
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
@keyframes
|
|
307
|
+
@keyframes slide-bottom-exit {
|
|
308
308
|
from {
|
|
309
309
|
transform: translate3d(0, 0%, 0);
|
|
310
310
|
}
|
|
@@ -313,14 +313,14 @@
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
.nut-popup-slide-bottom-enter-active, .nut-popup-slide-bottom-appear-active {
|
|
316
|
-
transform:
|
|
316
|
+
transform: translate(0, 0);
|
|
317
317
|
animation-fill-mode: both;
|
|
318
318
|
animation-name: popup-slide-bottom-enter;
|
|
319
319
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
320
320
|
}
|
|
321
|
-
.nut-popup-slide-bottom-exit
|
|
321
|
+
.nut-popup-slide-bottom-exit {
|
|
322
322
|
animation-fill-mode: both;
|
|
323
|
-
animation-name:
|
|
323
|
+
animation-name: slide-bottom-exit;
|
|
324
324
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
325
325
|
}
|
|
326
326
|
@keyframes popup-slide-left-enter {
|
|
@@ -340,12 +340,12 @@
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
.nut-popup-slide-left-enter-active, .nut-popup-slide-left-appear-active {
|
|
343
|
-
transform:
|
|
343
|
+
transform: translate(0, 0);
|
|
344
344
|
animation-fill-mode: both;
|
|
345
345
|
animation-name: popup-slide-left-enter;
|
|
346
346
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
347
347
|
}
|
|
348
|
-
.nut-popup-slide-left-exit-active {
|
|
348
|
+
.nut-popup-slide-left-exit-active, .nut-popup-slide-left-exit-done {
|
|
349
349
|
animation-fill-mode: both;
|
|
350
350
|
animation-name: popup-slide-left-exit;
|
|
351
351
|
animation-duration: var(--nutui-popup-animation-duration, 0.3s);
|
|
@@ -180,7 +180,11 @@ export var BaseDialog = function(props) {
|
|
|
180
180
|
};
|
|
181
181
|
var _obj;
|
|
182
182
|
var closeClasses = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-close"), true), _define_property(_obj, "".concat(classPrefix, "-close-").concat(closeIconPosition), true), _obj));
|
|
183
|
-
var
|
|
183
|
+
var systemIcon = closeIconPosition !== 'bottom' ? /*#__PURE__*/ React.createElement(Close, {
|
|
184
|
+
ariaHidden: true
|
|
185
|
+
}) : /*#__PURE__*/ React.createElement(Failure, {
|
|
186
|
+
ariaHidden: true
|
|
187
|
+
});
|
|
184
188
|
return /*#__PURE__*/ React.createElement(View, {
|
|
185
189
|
className: closeClasses,
|
|
186
190
|
onClick: handleClose,
|
|
@@ -188,7 +192,7 @@ export var BaseDialog = function(props) {
|
|
|
188
192
|
ariaLabel: locale.close,
|
|
189
193
|
// @ts-ignore
|
|
190
194
|
tabIndex: 0
|
|
191
|
-
}, /*#__PURE__*/ React.isValidElement(closeIcon) ? closeIcon :
|
|
195
|
+
}, /*#__PURE__*/ React.isValidElement(closeIcon) ? closeIcon : systemIcon);
|
|
192
196
|
};
|
|
193
197
|
var onHandleClickOverlay = function(e) {
|
|
194
198
|
if (closeOnOverlayClick && visible && e.target === e.currentTarget) {
|
|
@@ -6,7 +6,7 @@ import React from "react";
|
|
|
6
6
|
import classNames from "classnames";
|
|
7
7
|
import { View } from "@tarojs/components";
|
|
8
8
|
import { ComponentDefaults } from "../../utils/typings";
|
|
9
|
-
import { useRtl } from "../configprovider/
|
|
9
|
+
import { useRtl } from "../configprovider/index";
|
|
10
10
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
11
11
|
contentPosition: 'center',
|
|
12
12
|
direction: 'horizontal'
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import { BasicComponent } from "../../utils/typings";
|
|
3
|
-
import {
|
|
3
|
+
import { UIFill, UISize, UIType } from "../../types/base/atoms";
|
|
4
4
|
export interface EmptyAction {
|
|
5
5
|
text: React.ReactNode;
|
|
6
|
-
type?:
|
|
7
|
-
size?:
|
|
8
|
-
fill?:
|
|
6
|
+
type?: UIType;
|
|
7
|
+
size?: UISize;
|
|
8
|
+
fill?: UIFill;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
onClick?: () => () => void;
|
|
11
11
|
}
|