@nutui/nutui-react-taro 1.5.8 → 1.5.9
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 +9 -0
- package/dist/esm/CountDown.js +1 -1
- package/dist/esm/Input.js +1 -1
- package/dist/esm/MenuItem.js +2 -4
- package/dist/esm/{countdown.taro-5b17c607.js → countdown.taro-9d970dbe.js} +10 -4
- package/dist/esm/{input.taro-77dcb8d9.js → input.taro-4c33409b.js} +3 -1
- package/dist/esm/{menuitem.taro-96cc4f15.js → menuitem.taro-fed68a19.js} +14 -9
- package/dist/esm/nutui-react.es.js +3 -3
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.mjs +207 -158
- package/dist/nutui.react.umd.js +207 -158
- package/dist/packages/menuitem/menuitem.scss +1 -1
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables.scss +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/nutui.react.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
/*!
|
|
8
|
-
* @nutui/nutui-react-taro v1.5.
|
|
8
|
+
* @nutui/nutui-react-taro v1.5.9 Tue Jun 13 2023 15:53:31 GMT+0800 (China Standard Time)
|
|
9
9
|
* (c) 2023 @jdf2e.
|
|
10
10
|
* Released under the MIT License.
|
|
11
11
|
*/
|
|
@@ -15,10 +15,15 @@ import Taro, { redirectTo, navigateTo, getEnv, usePageScroll, getSystemInfoSync,
|
|
|
15
15
|
import { View, ScrollView, PickerView, PickerViewColumn, Image as Image$2 } from "@tarojs/components";
|
|
16
16
|
import ReactDOM, { createPortal, unstable_batchedUpdates } from "react-dom";
|
|
17
17
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
var classnameExports = {};
|
|
19
|
+
var classname = {
|
|
20
|
+
get exports() {
|
|
21
|
+
return classnameExports;
|
|
22
|
+
},
|
|
23
|
+
set exports(v) {
|
|
24
|
+
classnameExports = v;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
22
27
|
var classname_production_min = {};
|
|
23
28
|
var hasRequiredClassname_production_min;
|
|
24
29
|
function requireClassname_production_min() {
|
|
@@ -26,37 +31,37 @@ function requireClassname_production_min() {
|
|
|
26
31
|
return classname_production_min;
|
|
27
32
|
hasRequiredClassname_production_min = 1;
|
|
28
33
|
function r(r2) {
|
|
29
|
-
function
|
|
30
|
-
var f = i ?
|
|
34
|
+
function e2(e3, i, a, o) {
|
|
35
|
+
var f = i ? t + e3 + r2.e + i : t + e3, v = f;
|
|
31
36
|
if (a) {
|
|
32
|
-
var
|
|
33
|
-
for (var
|
|
34
|
-
if (a.hasOwnProperty(
|
|
35
|
-
var p = a[
|
|
36
|
-
true === p ? v +=
|
|
37
|
+
var u = " " + v + r2.m;
|
|
38
|
+
for (var s in a)
|
|
39
|
+
if (a.hasOwnProperty(s)) {
|
|
40
|
+
var p = a[s];
|
|
41
|
+
true === p ? v += u + s : p && (v += u + s + n + p);
|
|
37
42
|
}
|
|
38
43
|
}
|
|
39
44
|
if (void 0 !== o)
|
|
40
|
-
for (var
|
|
41
|
-
var
|
|
42
|
-
if (
|
|
43
|
-
for (var g =
|
|
45
|
+
for (var c = 0, l = o.length; c < l; c++) {
|
|
46
|
+
var y = o[c];
|
|
47
|
+
if (y && "string" == typeof y.valueOf())
|
|
48
|
+
for (var g = y.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
44
49
|
var h = g[d];
|
|
45
50
|
h !== f && (v += " " + h);
|
|
46
51
|
}
|
|
47
52
|
}
|
|
48
53
|
return v;
|
|
49
54
|
}
|
|
50
|
-
var
|
|
51
|
-
return function(r3,
|
|
55
|
+
var t = r2.n || "", n = r2.v || r2.m;
|
|
56
|
+
return function(r3, t2) {
|
|
52
57
|
return function(n2, i, a) {
|
|
53
|
-
return "string" == typeof n2 ?
|
|
58
|
+
return "string" == typeof n2 ? Array.isArray(i) ? e2(r3, n2, void 0, i) : e2(r3, n2, i, a) : e2(r3, t2, n2, i);
|
|
54
59
|
};
|
|
55
60
|
};
|
|
56
61
|
}
|
|
57
62
|
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
58
|
-
var
|
|
59
|
-
classname_production_min.cn =
|
|
63
|
+
var e = r({ e: "-", m: "_" });
|
|
64
|
+
classname_production_min.cn = e, classname_production_min.withNaming = r;
|
|
60
65
|
return classname_production_min;
|
|
61
66
|
}
|
|
62
67
|
var classname_development = {};
|
|
@@ -86,7 +91,6 @@ function requireClassname_development() {
|
|
|
86
91
|
}
|
|
87
92
|
}
|
|
88
93
|
if (mix !== void 0) {
|
|
89
|
-
mix = Array.isArray(mix) ? mix : [mix];
|
|
90
94
|
for (var i = 0, len = mix.length; i < len; i++) {
|
|
91
95
|
var value = mix[i];
|
|
92
96
|
if (!value || typeof value.valueOf() !== "string")
|
|
@@ -105,7 +109,7 @@ function requireClassname_development() {
|
|
|
105
109
|
return function cnGenerator(b2, e) {
|
|
106
110
|
return function(elemOrMods, elemModsOrBlockMix, elemMix) {
|
|
107
111
|
if (typeof elemOrMods === "string") {
|
|
108
|
-
if (
|
|
112
|
+
if (Array.isArray(elemModsOrBlockMix)) {
|
|
109
113
|
return stringify(b2, elemOrMods, void 0, elemModsOrBlockMix);
|
|
110
114
|
}
|
|
111
115
|
return stringify(b2, elemOrMods, elemModsOrBlockMix, elemMix);
|
|
@@ -122,12 +126,13 @@ function requireClassname_development() {
|
|
|
122
126
|
classname_development.withNaming = withNaming;
|
|
123
127
|
return classname_development;
|
|
124
128
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
(function(module) {
|
|
130
|
+
if (process.env.NODE_ENV === "production") {
|
|
131
|
+
module.exports = requireClassname_production_min();
|
|
132
|
+
} else {
|
|
133
|
+
module.exports = requireClassname_development();
|
|
134
|
+
}
|
|
135
|
+
})(classname);
|
|
131
136
|
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
132
137
|
const defaultProps$1v = {
|
|
133
138
|
name: "",
|
|
@@ -743,7 +748,6 @@ function words(string, pattern, guard) {
|
|
|
743
748
|
return string.match(pattern) || [];
|
|
744
749
|
}
|
|
745
750
|
var lodash_kebabcase = kebabCase;
|
|
746
|
-
const kebabCase$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodash_kebabcase);
|
|
747
751
|
const zhCN = {
|
|
748
752
|
save: "保存",
|
|
749
753
|
confirm: "确认",
|
|
@@ -891,7 +895,7 @@ const useConfig$1 = () => {
|
|
|
891
895
|
function convertThemeVarsToCSSVars(themeVars) {
|
|
892
896
|
const cssVars = {};
|
|
893
897
|
Object.keys(themeVars).forEach((key) => {
|
|
894
|
-
cssVars[`--${
|
|
898
|
+
cssVars[`--${lodash_kebabcase(key)}`] = themeVars[key];
|
|
895
899
|
});
|
|
896
900
|
return cssVars;
|
|
897
901
|
}
|
|
@@ -1008,7 +1012,15 @@ const Image$1 = (props) => {
|
|
|
1008
1012
|
};
|
|
1009
1013
|
Image$1.defaultProps = defaultProps$1q;
|
|
1010
1014
|
Image$1.displayName = "NutImage";
|
|
1011
|
-
var
|
|
1015
|
+
var classnamesExports = {};
|
|
1016
|
+
var classnames = {
|
|
1017
|
+
get exports() {
|
|
1018
|
+
return classnamesExports;
|
|
1019
|
+
},
|
|
1020
|
+
set exports(v) {
|
|
1021
|
+
classnamesExports = v;
|
|
1022
|
+
}
|
|
1023
|
+
};
|
|
1012
1024
|
/*!
|
|
1013
1025
|
Copyright (c) 2018 Jed Watson.
|
|
1014
1026
|
Licensed under the MIT License (MIT), see
|
|
@@ -1055,8 +1067,7 @@ var classnames = { exports: {} };
|
|
|
1055
1067
|
}
|
|
1056
1068
|
})();
|
|
1057
1069
|
})(classnames);
|
|
1058
|
-
|
|
1059
|
-
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
1070
|
+
const classNames = classnamesExports;
|
|
1060
1071
|
const defaultOverlayProps = {
|
|
1061
1072
|
zIndex: 2e3,
|
|
1062
1073
|
duration: 0.3,
|
|
@@ -1182,8 +1193,24 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
1182
1193
|
subClass.prototype.constructor = subClass;
|
|
1183
1194
|
_setPrototypeOf(subClass, superClass);
|
|
1184
1195
|
}
|
|
1185
|
-
var
|
|
1186
|
-
var
|
|
1196
|
+
var propTypesExports = {};
|
|
1197
|
+
var propTypes = {
|
|
1198
|
+
get exports() {
|
|
1199
|
+
return propTypesExports;
|
|
1200
|
+
},
|
|
1201
|
+
set exports(v) {
|
|
1202
|
+
propTypesExports = v;
|
|
1203
|
+
}
|
|
1204
|
+
};
|
|
1205
|
+
var reactIsExports = {};
|
|
1206
|
+
var reactIs = {
|
|
1207
|
+
get exports() {
|
|
1208
|
+
return reactIsExports;
|
|
1209
|
+
},
|
|
1210
|
+
set exports(v) {
|
|
1211
|
+
reactIsExports = v;
|
|
1212
|
+
}
|
|
1213
|
+
};
|
|
1187
1214
|
var reactIs_production_min = {};
|
|
1188
1215
|
/** @license React v16.13.1
|
|
1189
1216
|
* react-is.production.min.js
|
|
@@ -1454,14 +1481,16 @@ function requireReactIs_development() {
|
|
|
1454
1481
|
var hasRequiredReactIs;
|
|
1455
1482
|
function requireReactIs() {
|
|
1456
1483
|
if (hasRequiredReactIs)
|
|
1457
|
-
return
|
|
1484
|
+
return reactIsExports;
|
|
1458
1485
|
hasRequiredReactIs = 1;
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1486
|
+
(function(module) {
|
|
1487
|
+
if (process.env.NODE_ENV === "production") {
|
|
1488
|
+
module.exports = requireReactIs_production_min();
|
|
1489
|
+
} else {
|
|
1490
|
+
module.exports = requireReactIs_development();
|
|
1491
|
+
}
|
|
1492
|
+
})(reactIs);
|
|
1493
|
+
return reactIsExports;
|
|
1465
1494
|
}
|
|
1466
1495
|
/*
|
|
1467
1496
|
object-assign
|
|
@@ -2128,8 +2157,6 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
2128
2157
|
} else {
|
|
2129
2158
|
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
2130
2159
|
}
|
|
2131
|
-
var propTypesExports = propTypes.exports;
|
|
2132
|
-
const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
|
|
2133
2160
|
function hasClass(element, className) {
|
|
2134
2161
|
if (element.classList)
|
|
2135
2162
|
return !!className && element.classList.contains(className);
|
|
@@ -2159,22 +2186,22 @@ function removeClass$1(element, className) {
|
|
|
2159
2186
|
const config$1 = {
|
|
2160
2187
|
disabled: false
|
|
2161
2188
|
};
|
|
2162
|
-
var timeoutsShape = process.env.NODE_ENV !== "production" ?
|
|
2163
|
-
enter:
|
|
2164
|
-
exit:
|
|
2165
|
-
appear:
|
|
2189
|
+
var timeoutsShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.number, propTypesExports.shape({
|
|
2190
|
+
enter: propTypesExports.number,
|
|
2191
|
+
exit: propTypesExports.number,
|
|
2192
|
+
appear: propTypesExports.number
|
|
2166
2193
|
}).isRequired]) : null;
|
|
2167
|
-
var classNamesShape = process.env.NODE_ENV !== "production" ?
|
|
2168
|
-
enter:
|
|
2169
|
-
exit:
|
|
2170
|
-
active:
|
|
2171
|
-
}),
|
|
2172
|
-
enter:
|
|
2173
|
-
enterDone:
|
|
2174
|
-
enterActive:
|
|
2175
|
-
exit:
|
|
2176
|
-
exitDone:
|
|
2177
|
-
exitActive:
|
|
2194
|
+
var classNamesShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.string, propTypesExports.shape({
|
|
2195
|
+
enter: propTypesExports.string,
|
|
2196
|
+
exit: propTypesExports.string,
|
|
2197
|
+
active: propTypesExports.string
|
|
2198
|
+
}), propTypesExports.shape({
|
|
2199
|
+
enter: propTypesExports.string,
|
|
2200
|
+
enterDone: propTypesExports.string,
|
|
2201
|
+
enterActive: propTypesExports.string,
|
|
2202
|
+
exit: propTypesExports.string,
|
|
2203
|
+
exitDone: propTypesExports.string,
|
|
2204
|
+
exitActive: propTypesExports.string
|
|
2178
2205
|
})]) : null;
|
|
2179
2206
|
const TransitionGroupContext = React__default.createContext(null);
|
|
2180
2207
|
var forceReflow = function forceReflow2(node) {
|
|
@@ -2424,10 +2451,10 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2424
2451
|
* (see
|
|
2425
2452
|
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
2426
2453
|
*/
|
|
2427
|
-
nodeRef:
|
|
2428
|
-
current: typeof Element === "undefined" ?
|
|
2454
|
+
nodeRef: propTypesExports.shape({
|
|
2455
|
+
current: typeof Element === "undefined" ? propTypesExports.any : function(propValue, key, componentName, location, propFullName, secret) {
|
|
2429
2456
|
var value = propValue[key];
|
|
2430
|
-
return
|
|
2457
|
+
return propTypesExports.instanceOf(value && "ownerDocument" in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
|
|
2431
2458
|
}
|
|
2432
2459
|
}),
|
|
2433
2460
|
/**
|
|
@@ -2444,23 +2471,23 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2444
2471
|
* </Transition>
|
|
2445
2472
|
* ```
|
|
2446
2473
|
*/
|
|
2447
|
-
children:
|
|
2474
|
+
children: propTypesExports.oneOfType([propTypesExports.func.isRequired, propTypesExports.element.isRequired]).isRequired,
|
|
2448
2475
|
/**
|
|
2449
2476
|
* Show the component; triggers the enter or exit states
|
|
2450
2477
|
*/
|
|
2451
|
-
in:
|
|
2478
|
+
in: propTypesExports.bool,
|
|
2452
2479
|
/**
|
|
2453
2480
|
* By default the child component is mounted immediately along with
|
|
2454
2481
|
* the parent `Transition` component. If you want to "lazy mount" the component on the
|
|
2455
2482
|
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
|
2456
2483
|
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
|
2457
2484
|
*/
|
|
2458
|
-
mountOnEnter:
|
|
2485
|
+
mountOnEnter: propTypesExports.bool,
|
|
2459
2486
|
/**
|
|
2460
2487
|
* By default the child component stays mounted after it reaches the `'exited'` state.
|
|
2461
2488
|
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
|
2462
2489
|
*/
|
|
2463
|
-
unmountOnExit:
|
|
2490
|
+
unmountOnExit: propTypesExports.bool,
|
|
2464
2491
|
/**
|
|
2465
2492
|
* By default the child component does not perform the enter transition when
|
|
2466
2493
|
* it first mounts, regardless of the value of `in`. If you want this
|
|
@@ -2472,15 +2499,15 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2472
2499
|
* > additional `.appear-*` classes, that way you can choose to style it
|
|
2473
2500
|
* > differently.
|
|
2474
2501
|
*/
|
|
2475
|
-
appear:
|
|
2502
|
+
appear: propTypesExports.bool,
|
|
2476
2503
|
/**
|
|
2477
2504
|
* Enable or disable enter transitions.
|
|
2478
2505
|
*/
|
|
2479
|
-
enter:
|
|
2506
|
+
enter: propTypesExports.bool,
|
|
2480
2507
|
/**
|
|
2481
2508
|
* Enable or disable exit transitions.
|
|
2482
2509
|
*/
|
|
2483
|
-
exit:
|
|
2510
|
+
exit: propTypesExports.bool,
|
|
2484
2511
|
/**
|
|
2485
2512
|
* The duration of the transition, in milliseconds.
|
|
2486
2513
|
* Required unless `addEndListener` is provided.
|
|
@@ -2530,7 +2557,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2530
2557
|
* }}
|
|
2531
2558
|
* ```
|
|
2532
2559
|
*/
|
|
2533
|
-
addEndListener:
|
|
2560
|
+
addEndListener: propTypesExports.func,
|
|
2534
2561
|
/**
|
|
2535
2562
|
* Callback fired before the "entering" status is applied. An extra parameter
|
|
2536
2563
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -2539,7 +2566,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2539
2566
|
*
|
|
2540
2567
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
2541
2568
|
*/
|
|
2542
|
-
onEnter:
|
|
2569
|
+
onEnter: propTypesExports.func,
|
|
2543
2570
|
/**
|
|
2544
2571
|
* Callback fired after the "entering" status is applied. An extra parameter
|
|
2545
2572
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -2548,7 +2575,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2548
2575
|
*
|
|
2549
2576
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2550
2577
|
*/
|
|
2551
|
-
onEntering:
|
|
2578
|
+
onEntering: propTypesExports.func,
|
|
2552
2579
|
/**
|
|
2553
2580
|
* Callback fired after the "entered" status is applied. An extra parameter
|
|
2554
2581
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -2557,7 +2584,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2557
2584
|
*
|
|
2558
2585
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
2559
2586
|
*/
|
|
2560
|
-
onEntered:
|
|
2587
|
+
onEntered: propTypesExports.func,
|
|
2561
2588
|
/**
|
|
2562
2589
|
* Callback fired before the "exiting" status is applied.
|
|
2563
2590
|
*
|
|
@@ -2565,7 +2592,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2565
2592
|
*
|
|
2566
2593
|
* @type Function(node: HtmlElement) -> void
|
|
2567
2594
|
*/
|
|
2568
|
-
onExit:
|
|
2595
|
+
onExit: propTypesExports.func,
|
|
2569
2596
|
/**
|
|
2570
2597
|
* Callback fired after the "exiting" status is applied.
|
|
2571
2598
|
*
|
|
@@ -2573,7 +2600,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2573
2600
|
*
|
|
2574
2601
|
* @type Function(node: HtmlElement) -> void
|
|
2575
2602
|
*/
|
|
2576
|
-
onExiting:
|
|
2603
|
+
onExiting: propTypesExports.func,
|
|
2577
2604
|
/**
|
|
2578
2605
|
* Callback fired after the "exited" status is applied.
|
|
2579
2606
|
*
|
|
@@ -2581,7 +2608,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2581
2608
|
*
|
|
2582
2609
|
* @type Function(node: HtmlElement) -> void
|
|
2583
2610
|
*/
|
|
2584
|
-
onExited:
|
|
2611
|
+
onExited: propTypesExports.func
|
|
2585
2612
|
} : {};
|
|
2586
2613
|
function noop$2() {
|
|
2587
2614
|
}
|
|
@@ -2820,7 +2847,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$3({},
|
|
|
2820
2847
|
*
|
|
2821
2848
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2822
2849
|
*/
|
|
2823
|
-
onEnter:
|
|
2850
|
+
onEnter: propTypesExports.func,
|
|
2824
2851
|
/**
|
|
2825
2852
|
* A `<Transition>` callback fired immediately after the 'enter-active' or
|
|
2826
2853
|
* 'appear-active' class is applied.
|
|
@@ -2829,7 +2856,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$3({},
|
|
|
2829
2856
|
*
|
|
2830
2857
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2831
2858
|
*/
|
|
2832
|
-
onEntering:
|
|
2859
|
+
onEntering: propTypesExports.func,
|
|
2833
2860
|
/**
|
|
2834
2861
|
* A `<Transition>` callback fired immediately after the 'enter' or
|
|
2835
2862
|
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
|
|
@@ -2838,7 +2865,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$3({},
|
|
|
2838
2865
|
*
|
|
2839
2866
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2840
2867
|
*/
|
|
2841
|
-
onEntered:
|
|
2868
|
+
onEntered: propTypesExports.func,
|
|
2842
2869
|
/**
|
|
2843
2870
|
* A `<Transition>` callback fired immediately after the 'exit' class is
|
|
2844
2871
|
* applied.
|
|
@@ -2847,7 +2874,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$3({},
|
|
|
2847
2874
|
*
|
|
2848
2875
|
* @type Function(node: HtmlElement)
|
|
2849
2876
|
*/
|
|
2850
|
-
onExit:
|
|
2877
|
+
onExit: propTypesExports.func,
|
|
2851
2878
|
/**
|
|
2852
2879
|
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
|
|
2853
2880
|
*
|
|
@@ -2855,7 +2882,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$3({},
|
|
|
2855
2882
|
*
|
|
2856
2883
|
* @type Function(node: HtmlElement)
|
|
2857
2884
|
*/
|
|
2858
|
-
onExiting:
|
|
2885
|
+
onExiting: propTypesExports.func,
|
|
2859
2886
|
/**
|
|
2860
2887
|
* A `<Transition>` callback fired immediately after the 'exit' classes
|
|
2861
2888
|
* are **removed** and the `exit-done` class is added to the DOM node.
|
|
@@ -2864,7 +2891,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends$3({},
|
|
|
2864
2891
|
*
|
|
2865
2892
|
* @type Function(node: HtmlElement)
|
|
2866
2893
|
*/
|
|
2867
|
-
onExited:
|
|
2894
|
+
onExited: propTypesExports.func
|
|
2868
2895
|
}) : {};
|
|
2869
2896
|
const CSSTransition$1 = CSSTransition;
|
|
2870
2897
|
const defaultProps$1p = {
|
|
@@ -4075,7 +4102,6 @@ const defaultProps$1d = {
|
|
|
4075
4102
|
onChange: (value) => void 0
|
|
4076
4103
|
};
|
|
4077
4104
|
const MenuItem = forwardRef((props, ref) => {
|
|
4078
|
-
useConfig$1();
|
|
4079
4105
|
const mergedProps = { ...defaultProps$1d, ...props };
|
|
4080
4106
|
const {
|
|
4081
4107
|
style,
|
|
@@ -4144,99 +4170,114 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
4144
4170
|
return { display: "none" };
|
|
4145
4171
|
};
|
|
4146
4172
|
const getPosition = () => {
|
|
4147
|
-
return direction === "down" ? {
|
|
4173
|
+
return direction === "down" ? { position: "absolute", height: `${window.innerHeight}px` } : {
|
|
4174
|
+
position: "absolute",
|
|
4175
|
+
bottom: "100%",
|
|
4176
|
+
top: "auto",
|
|
4177
|
+
height: `${window.innerHeight}px`
|
|
4178
|
+
};
|
|
4148
4179
|
};
|
|
4149
4180
|
const placeholderStyle = () => {
|
|
4150
4181
|
if (direction === "down") {
|
|
4151
4182
|
return {
|
|
4152
4183
|
height: `${position.top + position.height}px`,
|
|
4153
|
-
|
|
4154
|
-
|
|
4184
|
+
top: "auto",
|
|
4185
|
+
bottom: "-100%",
|
|
4186
|
+
...isShow()
|
|
4155
4187
|
};
|
|
4156
4188
|
}
|
|
4157
4189
|
return {
|
|
4158
|
-
height: `${
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
...
|
|
4190
|
+
height: `${getSystemInfoSync().windowHeight - position.top}px`,
|
|
4191
|
+
bottom: `auto`,
|
|
4192
|
+
top: "0",
|
|
4193
|
+
...isShow()
|
|
4162
4194
|
};
|
|
4163
4195
|
};
|
|
4164
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
4196
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
4165
4197
|
"div",
|
|
4166
4198
|
{
|
|
4167
|
-
className:
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
lockScroll: parent.lockScroll,
|
|
4179
|
-
visible: _showPopup,
|
|
4180
|
-
closeOnClickOverlay: parent.closeOnClickOverlay,
|
|
4181
|
-
onClick: () => {
|
|
4182
|
-
parent.closeOnClickOverlay && parent.toggleItemShow(orderKey);
|
|
4199
|
+
className: "nut-menu-item-container",
|
|
4200
|
+
style: { position: "absolute", left: 0, right: 0 }
|
|
4201
|
+
},
|
|
4202
|
+
/* @__PURE__ */ React__default.createElement(
|
|
4203
|
+
"div",
|
|
4204
|
+
{
|
|
4205
|
+
className: `placeholder-element ${classNames({
|
|
4206
|
+
up: direction === "up"
|
|
4207
|
+
})}`,
|
|
4208
|
+
style: placeholderStyle(),
|
|
4209
|
+
onClick: () => parent.toggleItemShow(orderKey)
|
|
4183
4210
|
}
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4211
|
+
),
|
|
4212
|
+
/* @__PURE__ */ React__default.createElement(
|
|
4213
|
+
Overlay,
|
|
4214
|
+
{
|
|
4215
|
+
overlayClass: "nut-menu__overlay",
|
|
4216
|
+
style: getPosition(),
|
|
4217
|
+
lockScroll: parent.lockScroll,
|
|
4218
|
+
visible: _showPopup,
|
|
4219
|
+
closeOnClickOverlay: parent.closeOnClickOverlay,
|
|
4220
|
+
onClick: () => {
|
|
4221
|
+
parent.closeOnClickOverlay && parent.toggleItemShow(orderKey);
|
|
4222
|
+
}
|
|
4192
4223
|
}
|
|
4193
|
-
|
|
4224
|
+
),
|
|
4194
4225
|
/* @__PURE__ */ React__default.createElement(
|
|
4195
|
-
|
|
4226
|
+
"div",
|
|
4196
4227
|
{
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4228
|
+
className: direction === "down" ? "nut-menu-item__wrap" : "nut-menu-item__wrap-up",
|
|
4229
|
+
style: {
|
|
4230
|
+
// ...getPosition(),
|
|
4231
|
+
...isShow()
|
|
4232
|
+
}
|
|
4200
4233
|
},
|
|
4201
|
-
/* @__PURE__ */ React__default.createElement(
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
flexBasis: `${100 / columns}%`
|
|
4211
|
-
},
|
|
4212
|
-
onClick: () => {
|
|
4213
|
-
handleClick(item);
|
|
4214
|
-
}
|
|
4215
|
-
},
|
|
4216
|
-
item.value === _value ? /* @__PURE__ */ React__default.createElement(
|
|
4217
|
-
Icon$1,
|
|
4218
|
-
{
|
|
4219
|
-
classPrefix: iconClassPrefix,
|
|
4220
|
-
fontClassName: iconFontClassName,
|
|
4221
|
-
className: getIconCName(item.value, value),
|
|
4222
|
-
name: optionsIcon,
|
|
4223
|
-
color: activeColor
|
|
4224
|
-
}
|
|
4225
|
-
) : null,
|
|
4226
|
-
/* @__PURE__ */ React__default.createElement(
|
|
4234
|
+
/* @__PURE__ */ React__default.createElement(
|
|
4235
|
+
CSSTransition$1,
|
|
4236
|
+
{
|
|
4237
|
+
in: _showPopup,
|
|
4238
|
+
timeout: 100,
|
|
4239
|
+
classNames: direction === "down" ? "menu-item" : "menu-item-up"
|
|
4240
|
+
},
|
|
4241
|
+
/* @__PURE__ */ React__default.createElement("div", { className: "nut-menu-item__content" }, options == null ? void 0 : options.map((item, index) => {
|
|
4242
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
4227
4243
|
"div",
|
|
4228
4244
|
{
|
|
4229
|
-
className:
|
|
4245
|
+
className: `nut-menu-item__option ${classNames({
|
|
4246
|
+
active: item.value === _value
|
|
4247
|
+
})}`,
|
|
4248
|
+
key: item.text,
|
|
4230
4249
|
style: {
|
|
4231
|
-
|
|
4250
|
+
flexBasis: `${100 / columns}%`
|
|
4251
|
+
},
|
|
4252
|
+
onClick: () => {
|
|
4253
|
+
handleClick(item);
|
|
4232
4254
|
}
|
|
4233
4255
|
},
|
|
4234
|
-
item.
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4256
|
+
item.value === _value ? /* @__PURE__ */ React__default.createElement(
|
|
4257
|
+
Icon$1,
|
|
4258
|
+
{
|
|
4259
|
+
classPrefix: iconClassPrefix,
|
|
4260
|
+
fontClassName: iconFontClassName,
|
|
4261
|
+
className: getIconCName(item.value, value),
|
|
4262
|
+
name: optionsIcon,
|
|
4263
|
+
color: activeColor
|
|
4264
|
+
}
|
|
4265
|
+
) : null,
|
|
4266
|
+
/* @__PURE__ */ React__default.createElement(
|
|
4267
|
+
"div",
|
|
4268
|
+
{
|
|
4269
|
+
className: getIconCName(item.value, value),
|
|
4270
|
+
style: {
|
|
4271
|
+
color: `${item.value === _value ? activeColor : ""}`
|
|
4272
|
+
}
|
|
4273
|
+
},
|
|
4274
|
+
item.text
|
|
4275
|
+
)
|
|
4276
|
+
);
|
|
4277
|
+
}), children)
|
|
4278
|
+
)
|
|
4238
4279
|
)
|
|
4239
|
-
)
|
|
4280
|
+
);
|
|
4240
4281
|
});
|
|
4241
4282
|
MenuItem.defaultProps = defaultProps$1d;
|
|
4242
4283
|
MenuItem.displayName = "NutMenuItem";
|
|
@@ -7997,7 +8038,9 @@ const Input = forwardRef(
|
|
|
7997
8038
|
onChange && onChange(val, event);
|
|
7998
8039
|
};
|
|
7999
8040
|
const handleBlur = (event) => {
|
|
8000
|
-
|
|
8041
|
+
setTimeout(() => {
|
|
8042
|
+
SetActive(false);
|
|
8043
|
+
}, 200);
|
|
8001
8044
|
let val = event.target.value;
|
|
8002
8045
|
if (maxlength && val.length > Number(maxlength)) {
|
|
8003
8046
|
val = val.slice(0, Number(maxlength));
|
|
@@ -17337,6 +17380,7 @@ const defaultProps$q = {
|
|
|
17337
17380
|
paused: false,
|
|
17338
17381
|
startTime: Date.now(),
|
|
17339
17382
|
endTime: Date.now(),
|
|
17383
|
+
remainingTime: 0,
|
|
17340
17384
|
millisecond: false,
|
|
17341
17385
|
format: "HH:mm:ss",
|
|
17342
17386
|
autoStart: true,
|
|
@@ -17349,6 +17393,7 @@ const InternalCountDown = (props, ref) => {
|
|
|
17349
17393
|
paused,
|
|
17350
17394
|
startTime,
|
|
17351
17395
|
endTime,
|
|
17396
|
+
remainingTime,
|
|
17352
17397
|
millisecond,
|
|
17353
17398
|
format,
|
|
17354
17399
|
autoStart,
|
|
@@ -17388,8 +17433,12 @@ const InternalCountDown = (props, ref) => {
|
|
|
17388
17433
|
return new Date(t).getTime();
|
|
17389
17434
|
};
|
|
17390
17435
|
const initTime = () => {
|
|
17391
|
-
|
|
17392
|
-
|
|
17436
|
+
if (remainingTime) {
|
|
17437
|
+
stateRef.current.handleEndTime = Date.now() + Number(remainingTime);
|
|
17438
|
+
} else {
|
|
17439
|
+
stateRef.current.handleEndTime = endTime;
|
|
17440
|
+
stateRef.current.diffTime = Date.now() - getTimeStamp(startTime);
|
|
17441
|
+
}
|
|
17393
17442
|
if (!stateRef.current.counting)
|
|
17394
17443
|
stateRef.current.counting = true;
|
|
17395
17444
|
tick();
|
|
@@ -17531,7 +17580,7 @@ const InternalCountDown = (props, ref) => {
|
|
|
17531
17580
|
if (stateRef.current.isIninted) {
|
|
17532
17581
|
initTime();
|
|
17533
17582
|
}
|
|
17534
|
-
}, [endTime, startTime]);
|
|
17583
|
+
}, [endTime, startTime, remainingTime]);
|
|
17535
17584
|
useEffect(() => {
|
|
17536
17585
|
if (autoStart) {
|
|
17537
17586
|
initTime();
|