@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.umd.js
CHANGED
|
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8
8
|
return value;
|
|
9
9
|
};
|
|
10
10
|
/*!
|
|
11
|
-
* @nutui/nutui-react-taro v1.5.
|
|
11
|
+
* @nutui/nutui-react-taro v1.5.9 Tue Jun 13 2023 15:53:31 GMT+0800 (China Standard Time)
|
|
12
12
|
* (c) 2023 @jdf2e.
|
|
13
13
|
* Released under the MIT License.
|
|
14
14
|
*/
|
|
@@ -31,10 +31,15 @@ var __publicField = (obj, key, value) => {
|
|
|
31
31
|
}
|
|
32
32
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
33
33
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
var classnameExports = {};
|
|
35
|
+
var classname = {
|
|
36
|
+
get exports() {
|
|
37
|
+
return classnameExports;
|
|
38
|
+
},
|
|
39
|
+
set exports(v) {
|
|
40
|
+
classnameExports = v;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
38
43
|
var classname_production_min = {};
|
|
39
44
|
var hasRequiredClassname_production_min;
|
|
40
45
|
function requireClassname_production_min() {
|
|
@@ -42,37 +47,37 @@ var __publicField = (obj, key, value) => {
|
|
|
42
47
|
return classname_production_min;
|
|
43
48
|
hasRequiredClassname_production_min = 1;
|
|
44
49
|
function r(r2) {
|
|
45
|
-
function
|
|
46
|
-
var f = i ?
|
|
50
|
+
function e2(e3, i, a, o) {
|
|
51
|
+
var f = i ? t + e3 + r2.e + i : t + e3, v = f;
|
|
47
52
|
if (a) {
|
|
48
|
-
var
|
|
49
|
-
for (var
|
|
50
|
-
if (a.hasOwnProperty(
|
|
51
|
-
var p = a[
|
|
52
|
-
true === p ? v +=
|
|
53
|
+
var u = " " + v + r2.m;
|
|
54
|
+
for (var s in a)
|
|
55
|
+
if (a.hasOwnProperty(s)) {
|
|
56
|
+
var p = a[s];
|
|
57
|
+
true === p ? v += u + s : p && (v += u + s + n + p);
|
|
53
58
|
}
|
|
54
59
|
}
|
|
55
60
|
if (void 0 !== o)
|
|
56
|
-
for (var
|
|
57
|
-
var
|
|
58
|
-
if (
|
|
59
|
-
for (var g =
|
|
61
|
+
for (var c = 0, l = o.length; c < l; c++) {
|
|
62
|
+
var y = o[c];
|
|
63
|
+
if (y && "string" == typeof y.valueOf())
|
|
64
|
+
for (var g = y.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
60
65
|
var h = g[d];
|
|
61
66
|
h !== f && (v += " " + h);
|
|
62
67
|
}
|
|
63
68
|
}
|
|
64
69
|
return v;
|
|
65
70
|
}
|
|
66
|
-
var
|
|
67
|
-
return function(r3,
|
|
71
|
+
var t = r2.n || "", n = r2.v || r2.m;
|
|
72
|
+
return function(r3, t2) {
|
|
68
73
|
return function(n2, i, a) {
|
|
69
|
-
return "string" == typeof n2 ?
|
|
74
|
+
return "string" == typeof n2 ? Array.isArray(i) ? e2(r3, n2, void 0, i) : e2(r3, n2, i, a) : e2(r3, t2, n2, i);
|
|
70
75
|
};
|
|
71
76
|
};
|
|
72
77
|
}
|
|
73
78
|
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
74
|
-
var
|
|
75
|
-
classname_production_min.cn =
|
|
79
|
+
var e = r({ e: "-", m: "_" });
|
|
80
|
+
classname_production_min.cn = e, classname_production_min.withNaming = r;
|
|
76
81
|
return classname_production_min;
|
|
77
82
|
}
|
|
78
83
|
var classname_development = {};
|
|
@@ -102,7 +107,6 @@ var __publicField = (obj, key, value) => {
|
|
|
102
107
|
}
|
|
103
108
|
}
|
|
104
109
|
if (mix !== void 0) {
|
|
105
|
-
mix = Array.isArray(mix) ? mix : [mix];
|
|
106
110
|
for (var i = 0, len = mix.length; i < len; i++) {
|
|
107
111
|
var value = mix[i];
|
|
108
112
|
if (!value || typeof value.valueOf() !== "string")
|
|
@@ -121,7 +125,7 @@ var __publicField = (obj, key, value) => {
|
|
|
121
125
|
return function cnGenerator(b2, e) {
|
|
122
126
|
return function(elemOrMods, elemModsOrBlockMix, elemMix) {
|
|
123
127
|
if (typeof elemOrMods === "string") {
|
|
124
|
-
if (
|
|
128
|
+
if (Array.isArray(elemModsOrBlockMix)) {
|
|
125
129
|
return stringify(b2, elemOrMods, void 0, elemModsOrBlockMix);
|
|
126
130
|
}
|
|
127
131
|
return stringify(b2, elemOrMods, elemModsOrBlockMix, elemMix);
|
|
@@ -138,12 +142,13 @@ var __publicField = (obj, key, value) => {
|
|
|
138
142
|
classname_development.withNaming = withNaming;
|
|
139
143
|
return classname_development;
|
|
140
144
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
(function(module2) {
|
|
146
|
+
if (process.env.NODE_ENV === "production") {
|
|
147
|
+
module2.exports = requireClassname_production_min();
|
|
148
|
+
} else {
|
|
149
|
+
module2.exports = requireClassname_development();
|
|
150
|
+
}
|
|
151
|
+
})(classname);
|
|
147
152
|
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
148
153
|
const defaultProps$1v = {
|
|
149
154
|
name: "",
|
|
@@ -759,7 +764,6 @@ var __publicField = (obj, key, value) => {
|
|
|
759
764
|
return string.match(pattern) || [];
|
|
760
765
|
}
|
|
761
766
|
var lodash_kebabcase = kebabCase;
|
|
762
|
-
const kebabCase$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodash_kebabcase);
|
|
763
767
|
const zhCN = {
|
|
764
768
|
save: "保存",
|
|
765
769
|
confirm: "确认",
|
|
@@ -907,7 +911,7 @@ var __publicField = (obj, key, value) => {
|
|
|
907
911
|
function convertThemeVarsToCSSVars(themeVars) {
|
|
908
912
|
const cssVars = {};
|
|
909
913
|
Object.keys(themeVars).forEach((key) => {
|
|
910
|
-
cssVars[`--${
|
|
914
|
+
cssVars[`--${lodash_kebabcase(key)}`] = themeVars[key];
|
|
911
915
|
});
|
|
912
916
|
return cssVars;
|
|
913
917
|
}
|
|
@@ -1024,7 +1028,15 @@ var __publicField = (obj, key, value) => {
|
|
|
1024
1028
|
};
|
|
1025
1029
|
Image$1.defaultProps = defaultProps$1q;
|
|
1026
1030
|
Image$1.displayName = "NutImage";
|
|
1027
|
-
var
|
|
1031
|
+
var classnamesExports = {};
|
|
1032
|
+
var classnames = {
|
|
1033
|
+
get exports() {
|
|
1034
|
+
return classnamesExports;
|
|
1035
|
+
},
|
|
1036
|
+
set exports(v) {
|
|
1037
|
+
classnamesExports = v;
|
|
1038
|
+
}
|
|
1039
|
+
};
|
|
1028
1040
|
/*!
|
|
1029
1041
|
Copyright (c) 2018 Jed Watson.
|
|
1030
1042
|
Licensed under the MIT License (MIT), see
|
|
@@ -1071,8 +1083,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1071
1083
|
}
|
|
1072
1084
|
})();
|
|
1073
1085
|
})(classnames);
|
|
1074
|
-
|
|
1075
|
-
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
1086
|
+
const classNames = classnamesExports;
|
|
1076
1087
|
const defaultOverlayProps = {
|
|
1077
1088
|
zIndex: 2e3,
|
|
1078
1089
|
duration: 0.3,
|
|
@@ -1198,8 +1209,24 @@ var __publicField = (obj, key, value) => {
|
|
|
1198
1209
|
subClass.prototype.constructor = subClass;
|
|
1199
1210
|
_setPrototypeOf(subClass, superClass);
|
|
1200
1211
|
}
|
|
1201
|
-
var
|
|
1202
|
-
var
|
|
1212
|
+
var propTypesExports = {};
|
|
1213
|
+
var propTypes = {
|
|
1214
|
+
get exports() {
|
|
1215
|
+
return propTypesExports;
|
|
1216
|
+
},
|
|
1217
|
+
set exports(v) {
|
|
1218
|
+
propTypesExports = v;
|
|
1219
|
+
}
|
|
1220
|
+
};
|
|
1221
|
+
var reactIsExports = {};
|
|
1222
|
+
var reactIs = {
|
|
1223
|
+
get exports() {
|
|
1224
|
+
return reactIsExports;
|
|
1225
|
+
},
|
|
1226
|
+
set exports(v) {
|
|
1227
|
+
reactIsExports = v;
|
|
1228
|
+
}
|
|
1229
|
+
};
|
|
1203
1230
|
var reactIs_production_min = {};
|
|
1204
1231
|
/** @license React v16.13.1
|
|
1205
1232
|
* react-is.production.min.js
|
|
@@ -1470,14 +1497,16 @@ var __publicField = (obj, key, value) => {
|
|
|
1470
1497
|
var hasRequiredReactIs;
|
|
1471
1498
|
function requireReactIs() {
|
|
1472
1499
|
if (hasRequiredReactIs)
|
|
1473
|
-
return
|
|
1500
|
+
return reactIsExports;
|
|
1474
1501
|
hasRequiredReactIs = 1;
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1502
|
+
(function(module2) {
|
|
1503
|
+
if (process.env.NODE_ENV === "production") {
|
|
1504
|
+
module2.exports = requireReactIs_production_min();
|
|
1505
|
+
} else {
|
|
1506
|
+
module2.exports = requireReactIs_development();
|
|
1507
|
+
}
|
|
1508
|
+
})(reactIs);
|
|
1509
|
+
return reactIsExports;
|
|
1481
1510
|
}
|
|
1482
1511
|
/*
|
|
1483
1512
|
object-assign
|
|
@@ -2144,8 +2173,6 @@ var __publicField = (obj, key, value) => {
|
|
|
2144
2173
|
} else {
|
|
2145
2174
|
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
2146
2175
|
}
|
|
2147
|
-
var propTypesExports = propTypes.exports;
|
|
2148
|
-
const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
|
|
2149
2176
|
function hasClass(element, className) {
|
|
2150
2177
|
if (element.classList)
|
|
2151
2178
|
return !!className && element.classList.contains(className);
|
|
@@ -2175,22 +2202,22 @@ var __publicField = (obj, key, value) => {
|
|
|
2175
2202
|
const config$1 = {
|
|
2176
2203
|
disabled: false
|
|
2177
2204
|
};
|
|
2178
|
-
var timeoutsShape = process.env.NODE_ENV !== "production" ?
|
|
2179
|
-
enter:
|
|
2180
|
-
exit:
|
|
2181
|
-
appear:
|
|
2205
|
+
var timeoutsShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.number, propTypesExports.shape({
|
|
2206
|
+
enter: propTypesExports.number,
|
|
2207
|
+
exit: propTypesExports.number,
|
|
2208
|
+
appear: propTypesExports.number
|
|
2182
2209
|
}).isRequired]) : null;
|
|
2183
|
-
var classNamesShape = process.env.NODE_ENV !== "production" ?
|
|
2184
|
-
enter:
|
|
2185
|
-
exit:
|
|
2186
|
-
active:
|
|
2187
|
-
}),
|
|
2188
|
-
enter:
|
|
2189
|
-
enterDone:
|
|
2190
|
-
enterActive:
|
|
2191
|
-
exit:
|
|
2192
|
-
exitDone:
|
|
2193
|
-
exitActive:
|
|
2210
|
+
var classNamesShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.string, propTypesExports.shape({
|
|
2211
|
+
enter: propTypesExports.string,
|
|
2212
|
+
exit: propTypesExports.string,
|
|
2213
|
+
active: propTypesExports.string
|
|
2214
|
+
}), propTypesExports.shape({
|
|
2215
|
+
enter: propTypesExports.string,
|
|
2216
|
+
enterDone: propTypesExports.string,
|
|
2217
|
+
enterActive: propTypesExports.string,
|
|
2218
|
+
exit: propTypesExports.string,
|
|
2219
|
+
exitDone: propTypesExports.string,
|
|
2220
|
+
exitActive: propTypesExports.string
|
|
2194
2221
|
})]) : null;
|
|
2195
2222
|
const TransitionGroupContext = React.createContext(null);
|
|
2196
2223
|
var forceReflow = function forceReflow2(node) {
|
|
@@ -2440,10 +2467,10 @@ var __publicField = (obj, key, value) => {
|
|
|
2440
2467
|
* (see
|
|
2441
2468
|
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
2442
2469
|
*/
|
|
2443
|
-
nodeRef:
|
|
2444
|
-
current: typeof Element === "undefined" ?
|
|
2470
|
+
nodeRef: propTypesExports.shape({
|
|
2471
|
+
current: typeof Element === "undefined" ? propTypesExports.any : function(propValue, key, componentName, location, propFullName, secret) {
|
|
2445
2472
|
var value = propValue[key];
|
|
2446
|
-
return
|
|
2473
|
+
return propTypesExports.instanceOf(value && "ownerDocument" in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
|
|
2447
2474
|
}
|
|
2448
2475
|
}),
|
|
2449
2476
|
/**
|
|
@@ -2460,23 +2487,23 @@ var __publicField = (obj, key, value) => {
|
|
|
2460
2487
|
* </Transition>
|
|
2461
2488
|
* ```
|
|
2462
2489
|
*/
|
|
2463
|
-
children:
|
|
2490
|
+
children: propTypesExports.oneOfType([propTypesExports.func.isRequired, propTypesExports.element.isRequired]).isRequired,
|
|
2464
2491
|
/**
|
|
2465
2492
|
* Show the component; triggers the enter or exit states
|
|
2466
2493
|
*/
|
|
2467
|
-
in:
|
|
2494
|
+
in: propTypesExports.bool,
|
|
2468
2495
|
/**
|
|
2469
2496
|
* By default the child component is mounted immediately along with
|
|
2470
2497
|
* the parent `Transition` component. If you want to "lazy mount" the component on the
|
|
2471
2498
|
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
|
2472
2499
|
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
|
2473
2500
|
*/
|
|
2474
|
-
mountOnEnter:
|
|
2501
|
+
mountOnEnter: propTypesExports.bool,
|
|
2475
2502
|
/**
|
|
2476
2503
|
* By default the child component stays mounted after it reaches the `'exited'` state.
|
|
2477
2504
|
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
|
2478
2505
|
*/
|
|
2479
|
-
unmountOnExit:
|
|
2506
|
+
unmountOnExit: propTypesExports.bool,
|
|
2480
2507
|
/**
|
|
2481
2508
|
* By default the child component does not perform the enter transition when
|
|
2482
2509
|
* it first mounts, regardless of the value of `in`. If you want this
|
|
@@ -2488,15 +2515,15 @@ var __publicField = (obj, key, value) => {
|
|
|
2488
2515
|
* > additional `.appear-*` classes, that way you can choose to style it
|
|
2489
2516
|
* > differently.
|
|
2490
2517
|
*/
|
|
2491
|
-
appear:
|
|
2518
|
+
appear: propTypesExports.bool,
|
|
2492
2519
|
/**
|
|
2493
2520
|
* Enable or disable enter transitions.
|
|
2494
2521
|
*/
|
|
2495
|
-
enter:
|
|
2522
|
+
enter: propTypesExports.bool,
|
|
2496
2523
|
/**
|
|
2497
2524
|
* Enable or disable exit transitions.
|
|
2498
2525
|
*/
|
|
2499
|
-
exit:
|
|
2526
|
+
exit: propTypesExports.bool,
|
|
2500
2527
|
/**
|
|
2501
2528
|
* The duration of the transition, in milliseconds.
|
|
2502
2529
|
* Required unless `addEndListener` is provided.
|
|
@@ -2546,7 +2573,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2546
2573
|
* }}
|
|
2547
2574
|
* ```
|
|
2548
2575
|
*/
|
|
2549
|
-
addEndListener:
|
|
2576
|
+
addEndListener: propTypesExports.func,
|
|
2550
2577
|
/**
|
|
2551
2578
|
* Callback fired before the "entering" status is applied. An extra parameter
|
|
2552
2579
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -2555,7 +2582,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2555
2582
|
*
|
|
2556
2583
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
2557
2584
|
*/
|
|
2558
|
-
onEnter:
|
|
2585
|
+
onEnter: propTypesExports.func,
|
|
2559
2586
|
/**
|
|
2560
2587
|
* Callback fired after the "entering" status is applied. An extra parameter
|
|
2561
2588
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -2564,7 +2591,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2564
2591
|
*
|
|
2565
2592
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2566
2593
|
*/
|
|
2567
|
-
onEntering:
|
|
2594
|
+
onEntering: propTypesExports.func,
|
|
2568
2595
|
/**
|
|
2569
2596
|
* Callback fired after the "entered" status is applied. An extra parameter
|
|
2570
2597
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -2573,7 +2600,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2573
2600
|
*
|
|
2574
2601
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
2575
2602
|
*/
|
|
2576
|
-
onEntered:
|
|
2603
|
+
onEntered: propTypesExports.func,
|
|
2577
2604
|
/**
|
|
2578
2605
|
* Callback fired before the "exiting" status is applied.
|
|
2579
2606
|
*
|
|
@@ -2581,7 +2608,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2581
2608
|
*
|
|
2582
2609
|
* @type Function(node: HtmlElement) -> void
|
|
2583
2610
|
*/
|
|
2584
|
-
onExit:
|
|
2611
|
+
onExit: propTypesExports.func,
|
|
2585
2612
|
/**
|
|
2586
2613
|
* Callback fired after the "exiting" status is applied.
|
|
2587
2614
|
*
|
|
@@ -2589,7 +2616,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2589
2616
|
*
|
|
2590
2617
|
* @type Function(node: HtmlElement) -> void
|
|
2591
2618
|
*/
|
|
2592
|
-
onExiting:
|
|
2619
|
+
onExiting: propTypesExports.func,
|
|
2593
2620
|
/**
|
|
2594
2621
|
* Callback fired after the "exited" status is applied.
|
|
2595
2622
|
*
|
|
@@ -2597,7 +2624,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2597
2624
|
*
|
|
2598
2625
|
* @type Function(node: HtmlElement) -> void
|
|
2599
2626
|
*/
|
|
2600
|
-
onExited:
|
|
2627
|
+
onExited: propTypesExports.func
|
|
2601
2628
|
} : {};
|
|
2602
2629
|
function noop$2() {
|
|
2603
2630
|
}
|
|
@@ -2836,7 +2863,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2836
2863
|
*
|
|
2837
2864
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2838
2865
|
*/
|
|
2839
|
-
onEnter:
|
|
2866
|
+
onEnter: propTypesExports.func,
|
|
2840
2867
|
/**
|
|
2841
2868
|
* A `<Transition>` callback fired immediately after the 'enter-active' or
|
|
2842
2869
|
* 'appear-active' class is applied.
|
|
@@ -2845,7 +2872,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2845
2872
|
*
|
|
2846
2873
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2847
2874
|
*/
|
|
2848
|
-
onEntering:
|
|
2875
|
+
onEntering: propTypesExports.func,
|
|
2849
2876
|
/**
|
|
2850
2877
|
* A `<Transition>` callback fired immediately after the 'enter' or
|
|
2851
2878
|
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
|
|
@@ -2854,7 +2881,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2854
2881
|
*
|
|
2855
2882
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2856
2883
|
*/
|
|
2857
|
-
onEntered:
|
|
2884
|
+
onEntered: propTypesExports.func,
|
|
2858
2885
|
/**
|
|
2859
2886
|
* A `<Transition>` callback fired immediately after the 'exit' class is
|
|
2860
2887
|
* applied.
|
|
@@ -2863,7 +2890,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2863
2890
|
*
|
|
2864
2891
|
* @type Function(node: HtmlElement)
|
|
2865
2892
|
*/
|
|
2866
|
-
onExit:
|
|
2893
|
+
onExit: propTypesExports.func,
|
|
2867
2894
|
/**
|
|
2868
2895
|
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
|
|
2869
2896
|
*
|
|
@@ -2871,7 +2898,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2871
2898
|
*
|
|
2872
2899
|
* @type Function(node: HtmlElement)
|
|
2873
2900
|
*/
|
|
2874
|
-
onExiting:
|
|
2901
|
+
onExiting: propTypesExports.func,
|
|
2875
2902
|
/**
|
|
2876
2903
|
* A `<Transition>` callback fired immediately after the 'exit' classes
|
|
2877
2904
|
* are **removed** and the `exit-done` class is added to the DOM node.
|
|
@@ -2880,7 +2907,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2880
2907
|
*
|
|
2881
2908
|
* @type Function(node: HtmlElement)
|
|
2882
2909
|
*/
|
|
2883
|
-
onExited:
|
|
2910
|
+
onExited: propTypesExports.func
|
|
2884
2911
|
}) : {};
|
|
2885
2912
|
const CSSTransition$1 = CSSTransition;
|
|
2886
2913
|
const defaultProps$1p = {
|
|
@@ -4091,7 +4118,6 @@ var __publicField = (obj, key, value) => {
|
|
|
4091
4118
|
onChange: (value) => void 0
|
|
4092
4119
|
};
|
|
4093
4120
|
const MenuItem = React.forwardRef((props, ref) => {
|
|
4094
|
-
useConfig$1();
|
|
4095
4121
|
const mergedProps = { ...defaultProps$1d, ...props };
|
|
4096
4122
|
const {
|
|
4097
4123
|
style,
|
|
@@ -4160,99 +4186,114 @@ var __publicField = (obj, key, value) => {
|
|
|
4160
4186
|
return { display: "none" };
|
|
4161
4187
|
};
|
|
4162
4188
|
const getPosition = () => {
|
|
4163
|
-
return direction === "down" ? {
|
|
4189
|
+
return direction === "down" ? { position: "absolute", height: `${window.innerHeight}px` } : {
|
|
4190
|
+
position: "absolute",
|
|
4191
|
+
bottom: "100%",
|
|
4192
|
+
top: "auto",
|
|
4193
|
+
height: `${window.innerHeight}px`
|
|
4194
|
+
};
|
|
4164
4195
|
};
|
|
4165
4196
|
const placeholderStyle = () => {
|
|
4166
4197
|
if (direction === "down") {
|
|
4167
4198
|
return {
|
|
4168
4199
|
height: `${position.top + position.height}px`,
|
|
4169
|
-
|
|
4170
|
-
|
|
4200
|
+
top: "auto",
|
|
4201
|
+
bottom: "-100%",
|
|
4202
|
+
...isShow()
|
|
4171
4203
|
};
|
|
4172
4204
|
}
|
|
4173
4205
|
return {
|
|
4174
|
-
height: `${
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
...
|
|
4206
|
+
height: `${Taro.getSystemInfoSync().windowHeight - position.top}px`,
|
|
4207
|
+
bottom: `auto`,
|
|
4208
|
+
top: "0",
|
|
4209
|
+
...isShow()
|
|
4178
4210
|
};
|
|
4179
4211
|
};
|
|
4180
|
-
return /* @__PURE__ */ React.createElement(
|
|
4212
|
+
return /* @__PURE__ */ React.createElement(
|
|
4181
4213
|
"div",
|
|
4182
4214
|
{
|
|
4183
|
-
className:
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
lockScroll: parent.lockScroll,
|
|
4195
|
-
visible: _showPopup,
|
|
4196
|
-
closeOnClickOverlay: parent.closeOnClickOverlay,
|
|
4197
|
-
onClick: () => {
|
|
4198
|
-
parent.closeOnClickOverlay && parent.toggleItemShow(orderKey);
|
|
4215
|
+
className: "nut-menu-item-container",
|
|
4216
|
+
style: { position: "absolute", left: 0, right: 0 }
|
|
4217
|
+
},
|
|
4218
|
+
/* @__PURE__ */ React.createElement(
|
|
4219
|
+
"div",
|
|
4220
|
+
{
|
|
4221
|
+
className: `placeholder-element ${classNames({
|
|
4222
|
+
up: direction === "up"
|
|
4223
|
+
})}`,
|
|
4224
|
+
style: placeholderStyle(),
|
|
4225
|
+
onClick: () => parent.toggleItemShow(orderKey)
|
|
4199
4226
|
}
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4227
|
+
),
|
|
4228
|
+
/* @__PURE__ */ React.createElement(
|
|
4229
|
+
Overlay,
|
|
4230
|
+
{
|
|
4231
|
+
overlayClass: "nut-menu__overlay",
|
|
4232
|
+
style: getPosition(),
|
|
4233
|
+
lockScroll: parent.lockScroll,
|
|
4234
|
+
visible: _showPopup,
|
|
4235
|
+
closeOnClickOverlay: parent.closeOnClickOverlay,
|
|
4236
|
+
onClick: () => {
|
|
4237
|
+
parent.closeOnClickOverlay && parent.toggleItemShow(orderKey);
|
|
4238
|
+
}
|
|
4208
4239
|
}
|
|
4209
|
-
|
|
4240
|
+
),
|
|
4210
4241
|
/* @__PURE__ */ React.createElement(
|
|
4211
|
-
|
|
4242
|
+
"div",
|
|
4212
4243
|
{
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4244
|
+
className: direction === "down" ? "nut-menu-item__wrap" : "nut-menu-item__wrap-up",
|
|
4245
|
+
style: {
|
|
4246
|
+
// ...getPosition(),
|
|
4247
|
+
...isShow()
|
|
4248
|
+
}
|
|
4216
4249
|
},
|
|
4217
|
-
/* @__PURE__ */ React.createElement(
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
flexBasis: `${100 / columns}%`
|
|
4227
|
-
},
|
|
4228
|
-
onClick: () => {
|
|
4229
|
-
handleClick(item);
|
|
4230
|
-
}
|
|
4231
|
-
},
|
|
4232
|
-
item.value === _value ? /* @__PURE__ */ React.createElement(
|
|
4233
|
-
Icon$1,
|
|
4234
|
-
{
|
|
4235
|
-
classPrefix: iconClassPrefix,
|
|
4236
|
-
fontClassName: iconFontClassName,
|
|
4237
|
-
className: getIconCName(item.value, value),
|
|
4238
|
-
name: optionsIcon,
|
|
4239
|
-
color: activeColor
|
|
4240
|
-
}
|
|
4241
|
-
) : null,
|
|
4242
|
-
/* @__PURE__ */ React.createElement(
|
|
4250
|
+
/* @__PURE__ */ React.createElement(
|
|
4251
|
+
CSSTransition$1,
|
|
4252
|
+
{
|
|
4253
|
+
in: _showPopup,
|
|
4254
|
+
timeout: 100,
|
|
4255
|
+
classNames: direction === "down" ? "menu-item" : "menu-item-up"
|
|
4256
|
+
},
|
|
4257
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-menu-item__content" }, options == null ? void 0 : options.map((item, index) => {
|
|
4258
|
+
return /* @__PURE__ */ React.createElement(
|
|
4243
4259
|
"div",
|
|
4244
4260
|
{
|
|
4245
|
-
className:
|
|
4261
|
+
className: `nut-menu-item__option ${classNames({
|
|
4262
|
+
active: item.value === _value
|
|
4263
|
+
})}`,
|
|
4264
|
+
key: item.text,
|
|
4246
4265
|
style: {
|
|
4247
|
-
|
|
4266
|
+
flexBasis: `${100 / columns}%`
|
|
4267
|
+
},
|
|
4268
|
+
onClick: () => {
|
|
4269
|
+
handleClick(item);
|
|
4248
4270
|
}
|
|
4249
4271
|
},
|
|
4250
|
-
item.
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4272
|
+
item.value === _value ? /* @__PURE__ */ React.createElement(
|
|
4273
|
+
Icon$1,
|
|
4274
|
+
{
|
|
4275
|
+
classPrefix: iconClassPrefix,
|
|
4276
|
+
fontClassName: iconFontClassName,
|
|
4277
|
+
className: getIconCName(item.value, value),
|
|
4278
|
+
name: optionsIcon,
|
|
4279
|
+
color: activeColor
|
|
4280
|
+
}
|
|
4281
|
+
) : null,
|
|
4282
|
+
/* @__PURE__ */ React.createElement(
|
|
4283
|
+
"div",
|
|
4284
|
+
{
|
|
4285
|
+
className: getIconCName(item.value, value),
|
|
4286
|
+
style: {
|
|
4287
|
+
color: `${item.value === _value ? activeColor : ""}`
|
|
4288
|
+
}
|
|
4289
|
+
},
|
|
4290
|
+
item.text
|
|
4291
|
+
)
|
|
4292
|
+
);
|
|
4293
|
+
}), children)
|
|
4294
|
+
)
|
|
4254
4295
|
)
|
|
4255
|
-
)
|
|
4296
|
+
);
|
|
4256
4297
|
});
|
|
4257
4298
|
MenuItem.defaultProps = defaultProps$1d;
|
|
4258
4299
|
MenuItem.displayName = "NutMenuItem";
|
|
@@ -8013,7 +8054,9 @@ var __publicField = (obj, key, value) => {
|
|
|
8013
8054
|
onChange && onChange(val, event);
|
|
8014
8055
|
};
|
|
8015
8056
|
const handleBlur = (event) => {
|
|
8016
|
-
|
|
8057
|
+
setTimeout(() => {
|
|
8058
|
+
SetActive(false);
|
|
8059
|
+
}, 200);
|
|
8017
8060
|
let val = event.target.value;
|
|
8018
8061
|
if (maxlength && val.length > Number(maxlength)) {
|
|
8019
8062
|
val = val.slice(0, Number(maxlength));
|
|
@@ -17353,6 +17396,7 @@ This message will only show in development mode. It won't appear in production.
|
|
|
17353
17396
|
paused: false,
|
|
17354
17397
|
startTime: Date.now(),
|
|
17355
17398
|
endTime: Date.now(),
|
|
17399
|
+
remainingTime: 0,
|
|
17356
17400
|
millisecond: false,
|
|
17357
17401
|
format: "HH:mm:ss",
|
|
17358
17402
|
autoStart: true,
|
|
@@ -17365,6 +17409,7 @@ This message will only show in development mode. It won't appear in production.
|
|
|
17365
17409
|
paused,
|
|
17366
17410
|
startTime,
|
|
17367
17411
|
endTime,
|
|
17412
|
+
remainingTime,
|
|
17368
17413
|
millisecond,
|
|
17369
17414
|
format,
|
|
17370
17415
|
autoStart,
|
|
@@ -17404,8 +17449,12 @@ This message will only show in development mode. It won't appear in production.
|
|
|
17404
17449
|
return new Date(t).getTime();
|
|
17405
17450
|
};
|
|
17406
17451
|
const initTime = () => {
|
|
17407
|
-
|
|
17408
|
-
|
|
17452
|
+
if (remainingTime) {
|
|
17453
|
+
stateRef.current.handleEndTime = Date.now() + Number(remainingTime);
|
|
17454
|
+
} else {
|
|
17455
|
+
stateRef.current.handleEndTime = endTime;
|
|
17456
|
+
stateRef.current.diffTime = Date.now() - getTimeStamp(startTime);
|
|
17457
|
+
}
|
|
17409
17458
|
if (!stateRef.current.counting)
|
|
17410
17459
|
stateRef.current.counting = true;
|
|
17411
17460
|
tick();
|
|
@@ -17547,7 +17596,7 @@ This message will only show in development mode. It won't appear in production.
|
|
|
17547
17596
|
if (stateRef.current.isIninted) {
|
|
17548
17597
|
initTime();
|
|
17549
17598
|
}
|
|
17550
|
-
}, [endTime, startTime]);
|
|
17599
|
+
}, [endTime, startTime, remainingTime]);
|
|
17551
17600
|
React.useEffect(() => {
|
|
17552
17601
|
if (autoStart) {
|
|
17553
17602
|
initTime();
|