@nutui/nutui-react 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 +11 -4
- package/dist/esm/Form.js +6 -4
- package/dist/esm/MenuItem.js +19 -6
- 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 +201 -151
- package/dist/nutui.react.umd.js +201 -151
- 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
|
@@ -9,7 +9,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9
9
|
return value;
|
|
10
10
|
};
|
|
11
11
|
/*!
|
|
12
|
-
* @nutui/nutui-react v1.5.
|
|
12
|
+
* @nutui/nutui-react v1.5.9 Tue Jun 13 2023 15:51:56 GMT+0800 (China Standard Time)
|
|
13
13
|
* (c) 2023 @jdf2e.
|
|
14
14
|
* Released under the MIT License.
|
|
15
15
|
*/
|
|
@@ -33,10 +33,15 @@ var __publicField = (obj, key, value) => {
|
|
|
33
33
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
34
34
|
const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
|
|
35
35
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
var classnameExports = {};
|
|
37
|
+
var classname = {
|
|
38
|
+
get exports() {
|
|
39
|
+
return classnameExports;
|
|
40
|
+
},
|
|
41
|
+
set exports(v) {
|
|
42
|
+
classnameExports = v;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
40
45
|
var classname_production_min = {};
|
|
41
46
|
var hasRequiredClassname_production_min;
|
|
42
47
|
function requireClassname_production_min() {
|
|
@@ -44,37 +49,37 @@ var __publicField = (obj, key, value) => {
|
|
|
44
49
|
return classname_production_min;
|
|
45
50
|
hasRequiredClassname_production_min = 1;
|
|
46
51
|
function r(r2) {
|
|
47
|
-
function
|
|
48
|
-
var f = i ?
|
|
52
|
+
function e2(e3, i, a, o) {
|
|
53
|
+
var f = i ? t + e3 + r2.e + i : t + e3, v = f;
|
|
49
54
|
if (a) {
|
|
50
|
-
var
|
|
51
|
-
for (var
|
|
52
|
-
if (a.hasOwnProperty(
|
|
53
|
-
var p = a[
|
|
54
|
-
true === p ? v +=
|
|
55
|
+
var u = " " + v + r2.m;
|
|
56
|
+
for (var s in a)
|
|
57
|
+
if (a.hasOwnProperty(s)) {
|
|
58
|
+
var p = a[s];
|
|
59
|
+
true === p ? v += u + s : p && (v += u + s + n + p);
|
|
55
60
|
}
|
|
56
61
|
}
|
|
57
62
|
if (void 0 !== o)
|
|
58
|
-
for (var
|
|
59
|
-
var
|
|
60
|
-
if (
|
|
61
|
-
for (var g =
|
|
63
|
+
for (var c = 0, l = o.length; c < l; c++) {
|
|
64
|
+
var y = o[c];
|
|
65
|
+
if (y && "string" == typeof y.valueOf())
|
|
66
|
+
for (var g = y.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
62
67
|
var h = g[d];
|
|
63
68
|
h !== f && (v += " " + h);
|
|
64
69
|
}
|
|
65
70
|
}
|
|
66
71
|
return v;
|
|
67
72
|
}
|
|
68
|
-
var
|
|
69
|
-
return function(r3,
|
|
73
|
+
var t = r2.n || "", n = r2.v || r2.m;
|
|
74
|
+
return function(r3, t2) {
|
|
70
75
|
return function(n2, i, a) {
|
|
71
|
-
return "string" == typeof n2 ?
|
|
76
|
+
return "string" == typeof n2 ? Array.isArray(i) ? e2(r3, n2, void 0, i) : e2(r3, n2, i, a) : e2(r3, t2, n2, i);
|
|
72
77
|
};
|
|
73
78
|
};
|
|
74
79
|
}
|
|
75
80
|
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
76
|
-
var
|
|
77
|
-
classname_production_min.cn =
|
|
81
|
+
var e = r({ e: "-", m: "_" });
|
|
82
|
+
classname_production_min.cn = e, classname_production_min.withNaming = r;
|
|
78
83
|
return classname_production_min;
|
|
79
84
|
}
|
|
80
85
|
var classname_development = {};
|
|
@@ -104,7 +109,6 @@ var __publicField = (obj, key, value) => {
|
|
|
104
109
|
}
|
|
105
110
|
}
|
|
106
111
|
if (mix !== void 0) {
|
|
107
|
-
mix = Array.isArray(mix) ? mix : [mix];
|
|
108
112
|
for (var i = 0, len = mix.length; i < len; i++) {
|
|
109
113
|
var value = mix[i];
|
|
110
114
|
if (!value || typeof value.valueOf() !== "string")
|
|
@@ -123,7 +127,7 @@ var __publicField = (obj, key, value) => {
|
|
|
123
127
|
return function cnGenerator(b2, e) {
|
|
124
128
|
return function(elemOrMods, elemModsOrBlockMix, elemMix) {
|
|
125
129
|
if (typeof elemOrMods === "string") {
|
|
126
|
-
if (
|
|
130
|
+
if (Array.isArray(elemModsOrBlockMix)) {
|
|
127
131
|
return stringify(b2, elemOrMods, void 0, elemModsOrBlockMix);
|
|
128
132
|
}
|
|
129
133
|
return stringify(b2, elemOrMods, elemModsOrBlockMix, elemMix);
|
|
@@ -140,12 +144,13 @@ var __publicField = (obj, key, value) => {
|
|
|
140
144
|
classname_development.withNaming = withNaming;
|
|
141
145
|
return classname_development;
|
|
142
146
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
(function(module2) {
|
|
148
|
+
if (process.env.NODE_ENV === "production") {
|
|
149
|
+
module2.exports = requireClassname_production_min();
|
|
150
|
+
} else {
|
|
151
|
+
module2.exports = requireClassname_development();
|
|
152
|
+
}
|
|
153
|
+
})(classname);
|
|
149
154
|
const cn = classnameExports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
150
155
|
const defaultProps$1s = {
|
|
151
156
|
name: "",
|
|
@@ -757,7 +762,6 @@ var __publicField = (obj, key, value) => {
|
|
|
757
762
|
return string2.match(pattern2) || [];
|
|
758
763
|
}
|
|
759
764
|
var lodash_kebabcase = kebabCase;
|
|
760
|
-
const kebabCase$1 = /* @__PURE__ */ getDefaultExportFromCjs(lodash_kebabcase);
|
|
761
765
|
const zhCN = {
|
|
762
766
|
save: "保存",
|
|
763
767
|
confirm: "确认",
|
|
@@ -905,7 +909,7 @@ var __publicField = (obj, key, value) => {
|
|
|
905
909
|
function convertThemeVarsToCSSVars(themeVars) {
|
|
906
910
|
const cssVars = {};
|
|
907
911
|
Object.keys(themeVars).forEach((key) => {
|
|
908
|
-
cssVars[`--${
|
|
912
|
+
cssVars[`--${lodash_kebabcase(key)}`] = themeVars[key];
|
|
909
913
|
});
|
|
910
914
|
return cssVars;
|
|
911
915
|
}
|
|
@@ -1083,7 +1087,15 @@ var __publicField = (obj, key, value) => {
|
|
|
1083
1087
|
};
|
|
1084
1088
|
Image$1.defaultProps = defaultProps$1n;
|
|
1085
1089
|
Image$1.displayName = "NutImage";
|
|
1086
|
-
var
|
|
1090
|
+
var classnamesExports = {};
|
|
1091
|
+
var classnames = {
|
|
1092
|
+
get exports() {
|
|
1093
|
+
return classnamesExports;
|
|
1094
|
+
},
|
|
1095
|
+
set exports(v) {
|
|
1096
|
+
classnamesExports = v;
|
|
1097
|
+
}
|
|
1098
|
+
};
|
|
1087
1099
|
/*!
|
|
1088
1100
|
Copyright (c) 2018 Jed Watson.
|
|
1089
1101
|
Licensed under the MIT License (MIT), see
|
|
@@ -1130,8 +1142,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1130
1142
|
}
|
|
1131
1143
|
})();
|
|
1132
1144
|
})(classnames);
|
|
1133
|
-
|
|
1134
|
-
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
1145
|
+
const classNames = classnamesExports;
|
|
1135
1146
|
const defaultOverlayProps = {
|
|
1136
1147
|
zIndex: 1e3,
|
|
1137
1148
|
duration: 0.3,
|
|
@@ -1246,8 +1257,24 @@ var __publicField = (obj, key, value) => {
|
|
|
1246
1257
|
subClass.prototype.constructor = subClass;
|
|
1247
1258
|
_setPrototypeOf$1(subClass, superClass);
|
|
1248
1259
|
}
|
|
1249
|
-
var
|
|
1250
|
-
var
|
|
1260
|
+
var propTypesExports = {};
|
|
1261
|
+
var propTypes = {
|
|
1262
|
+
get exports() {
|
|
1263
|
+
return propTypesExports;
|
|
1264
|
+
},
|
|
1265
|
+
set exports(v) {
|
|
1266
|
+
propTypesExports = v;
|
|
1267
|
+
}
|
|
1268
|
+
};
|
|
1269
|
+
var reactIsExports = {};
|
|
1270
|
+
var reactIs = {
|
|
1271
|
+
get exports() {
|
|
1272
|
+
return reactIsExports;
|
|
1273
|
+
},
|
|
1274
|
+
set exports(v) {
|
|
1275
|
+
reactIsExports = v;
|
|
1276
|
+
}
|
|
1277
|
+
};
|
|
1251
1278
|
var reactIs_production_min = {};
|
|
1252
1279
|
/** @license React v16.13.1
|
|
1253
1280
|
* react-is.production.min.js
|
|
@@ -1518,14 +1545,16 @@ var __publicField = (obj, key, value) => {
|
|
|
1518
1545
|
var hasRequiredReactIs;
|
|
1519
1546
|
function requireReactIs() {
|
|
1520
1547
|
if (hasRequiredReactIs)
|
|
1521
|
-
return
|
|
1548
|
+
return reactIsExports;
|
|
1522
1549
|
hasRequiredReactIs = 1;
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1550
|
+
(function(module2) {
|
|
1551
|
+
if (process.env.NODE_ENV === "production") {
|
|
1552
|
+
module2.exports = requireReactIs_production_min();
|
|
1553
|
+
} else {
|
|
1554
|
+
module2.exports = requireReactIs_development();
|
|
1555
|
+
}
|
|
1556
|
+
})(reactIs);
|
|
1557
|
+
return reactIsExports;
|
|
1529
1558
|
}
|
|
1530
1559
|
/*
|
|
1531
1560
|
object-assign
|
|
@@ -2192,8 +2221,6 @@ var __publicField = (obj, key, value) => {
|
|
|
2192
2221
|
} else {
|
|
2193
2222
|
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
2194
2223
|
}
|
|
2195
|
-
var propTypesExports = propTypes.exports;
|
|
2196
|
-
const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
|
|
2197
2224
|
function hasClass(element, className) {
|
|
2198
2225
|
if (element.classList)
|
|
2199
2226
|
return !!className && element.classList.contains(className);
|
|
@@ -2223,22 +2250,22 @@ var __publicField = (obj, key, value) => {
|
|
|
2223
2250
|
const config$1 = {
|
|
2224
2251
|
disabled: false
|
|
2225
2252
|
};
|
|
2226
|
-
var timeoutsShape = process.env.NODE_ENV !== "production" ?
|
|
2227
|
-
enter:
|
|
2228
|
-
exit:
|
|
2229
|
-
appear:
|
|
2253
|
+
var timeoutsShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.number, propTypesExports.shape({
|
|
2254
|
+
enter: propTypesExports.number,
|
|
2255
|
+
exit: propTypesExports.number,
|
|
2256
|
+
appear: propTypesExports.number
|
|
2230
2257
|
}).isRequired]) : null;
|
|
2231
|
-
var classNamesShape = process.env.NODE_ENV !== "production" ?
|
|
2232
|
-
enter:
|
|
2233
|
-
exit:
|
|
2234
|
-
active:
|
|
2235
|
-
}),
|
|
2236
|
-
enter:
|
|
2237
|
-
enterDone:
|
|
2238
|
-
enterActive:
|
|
2239
|
-
exit:
|
|
2240
|
-
exitDone:
|
|
2241
|
-
exitActive:
|
|
2258
|
+
var classNamesShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.string, propTypesExports.shape({
|
|
2259
|
+
enter: propTypesExports.string,
|
|
2260
|
+
exit: propTypesExports.string,
|
|
2261
|
+
active: propTypesExports.string
|
|
2262
|
+
}), propTypesExports.shape({
|
|
2263
|
+
enter: propTypesExports.string,
|
|
2264
|
+
enterDone: propTypesExports.string,
|
|
2265
|
+
enterActive: propTypesExports.string,
|
|
2266
|
+
exit: propTypesExports.string,
|
|
2267
|
+
exitDone: propTypesExports.string,
|
|
2268
|
+
exitActive: propTypesExports.string
|
|
2242
2269
|
})]) : null;
|
|
2243
2270
|
const TransitionGroupContext = React.createContext(null);
|
|
2244
2271
|
var forceReflow = function forceReflow2(node) {
|
|
@@ -2488,10 +2515,10 @@ var __publicField = (obj, key, value) => {
|
|
|
2488
2515
|
* (see
|
|
2489
2516
|
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
2490
2517
|
*/
|
|
2491
|
-
nodeRef:
|
|
2492
|
-
current: typeof Element === "undefined" ?
|
|
2518
|
+
nodeRef: propTypesExports.shape({
|
|
2519
|
+
current: typeof Element === "undefined" ? propTypesExports.any : function(propValue, key, componentName, location, propFullName, secret) {
|
|
2493
2520
|
var value = propValue[key];
|
|
2494
|
-
return
|
|
2521
|
+
return propTypesExports.instanceOf(value && "ownerDocument" in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
|
|
2495
2522
|
}
|
|
2496
2523
|
}),
|
|
2497
2524
|
/**
|
|
@@ -2508,23 +2535,23 @@ var __publicField = (obj, key, value) => {
|
|
|
2508
2535
|
* </Transition>
|
|
2509
2536
|
* ```
|
|
2510
2537
|
*/
|
|
2511
|
-
children:
|
|
2538
|
+
children: propTypesExports.oneOfType([propTypesExports.func.isRequired, propTypesExports.element.isRequired]).isRequired,
|
|
2512
2539
|
/**
|
|
2513
2540
|
* Show the component; triggers the enter or exit states
|
|
2514
2541
|
*/
|
|
2515
|
-
in:
|
|
2542
|
+
in: propTypesExports.bool,
|
|
2516
2543
|
/**
|
|
2517
2544
|
* By default the child component is mounted immediately along with
|
|
2518
2545
|
* the parent `Transition` component. If you want to "lazy mount" the component on the
|
|
2519
2546
|
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
|
2520
2547
|
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
|
2521
2548
|
*/
|
|
2522
|
-
mountOnEnter:
|
|
2549
|
+
mountOnEnter: propTypesExports.bool,
|
|
2523
2550
|
/**
|
|
2524
2551
|
* By default the child component stays mounted after it reaches the `'exited'` state.
|
|
2525
2552
|
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
|
2526
2553
|
*/
|
|
2527
|
-
unmountOnExit:
|
|
2554
|
+
unmountOnExit: propTypesExports.bool,
|
|
2528
2555
|
/**
|
|
2529
2556
|
* By default the child component does not perform the enter transition when
|
|
2530
2557
|
* it first mounts, regardless of the value of `in`. If you want this
|
|
@@ -2536,15 +2563,15 @@ var __publicField = (obj, key, value) => {
|
|
|
2536
2563
|
* > additional `.appear-*` classes, that way you can choose to style it
|
|
2537
2564
|
* > differently.
|
|
2538
2565
|
*/
|
|
2539
|
-
appear:
|
|
2566
|
+
appear: propTypesExports.bool,
|
|
2540
2567
|
/**
|
|
2541
2568
|
* Enable or disable enter transitions.
|
|
2542
2569
|
*/
|
|
2543
|
-
enter:
|
|
2570
|
+
enter: propTypesExports.bool,
|
|
2544
2571
|
/**
|
|
2545
2572
|
* Enable or disable exit transitions.
|
|
2546
2573
|
*/
|
|
2547
|
-
exit:
|
|
2574
|
+
exit: propTypesExports.bool,
|
|
2548
2575
|
/**
|
|
2549
2576
|
* The duration of the transition, in milliseconds.
|
|
2550
2577
|
* Required unless `addEndListener` is provided.
|
|
@@ -2594,7 +2621,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2594
2621
|
* }}
|
|
2595
2622
|
* ```
|
|
2596
2623
|
*/
|
|
2597
|
-
addEndListener:
|
|
2624
|
+
addEndListener: propTypesExports.func,
|
|
2598
2625
|
/**
|
|
2599
2626
|
* Callback fired before the "entering" status is applied. An extra parameter
|
|
2600
2627
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -2603,7 +2630,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2603
2630
|
*
|
|
2604
2631
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
2605
2632
|
*/
|
|
2606
|
-
onEnter:
|
|
2633
|
+
onEnter: propTypesExports.func,
|
|
2607
2634
|
/**
|
|
2608
2635
|
* Callback fired after the "entering" status is applied. An extra parameter
|
|
2609
2636
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -2612,7 +2639,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2612
2639
|
*
|
|
2613
2640
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2614
2641
|
*/
|
|
2615
|
-
onEntering:
|
|
2642
|
+
onEntering: propTypesExports.func,
|
|
2616
2643
|
/**
|
|
2617
2644
|
* Callback fired after the "entered" status is applied. An extra parameter
|
|
2618
2645
|
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
@@ -2621,7 +2648,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2621
2648
|
*
|
|
2622
2649
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
2623
2650
|
*/
|
|
2624
|
-
onEntered:
|
|
2651
|
+
onEntered: propTypesExports.func,
|
|
2625
2652
|
/**
|
|
2626
2653
|
* Callback fired before the "exiting" status is applied.
|
|
2627
2654
|
*
|
|
@@ -2629,7 +2656,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2629
2656
|
*
|
|
2630
2657
|
* @type Function(node: HtmlElement) -> void
|
|
2631
2658
|
*/
|
|
2632
|
-
onExit:
|
|
2659
|
+
onExit: propTypesExports.func,
|
|
2633
2660
|
/**
|
|
2634
2661
|
* Callback fired after the "exiting" status is applied.
|
|
2635
2662
|
*
|
|
@@ -2637,7 +2664,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2637
2664
|
*
|
|
2638
2665
|
* @type Function(node: HtmlElement) -> void
|
|
2639
2666
|
*/
|
|
2640
|
-
onExiting:
|
|
2667
|
+
onExiting: propTypesExports.func,
|
|
2641
2668
|
/**
|
|
2642
2669
|
* Callback fired after the "exited" status is applied.
|
|
2643
2670
|
*
|
|
@@ -2645,7 +2672,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2645
2672
|
*
|
|
2646
2673
|
* @type Function(node: HtmlElement) -> void
|
|
2647
2674
|
*/
|
|
2648
|
-
onExited:
|
|
2675
|
+
onExited: propTypesExports.func
|
|
2649
2676
|
} : {};
|
|
2650
2677
|
function noop$2() {
|
|
2651
2678
|
}
|
|
@@ -2884,7 +2911,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2884
2911
|
*
|
|
2885
2912
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2886
2913
|
*/
|
|
2887
|
-
onEnter:
|
|
2914
|
+
onEnter: propTypesExports.func,
|
|
2888
2915
|
/**
|
|
2889
2916
|
* A `<Transition>` callback fired immediately after the 'enter-active' or
|
|
2890
2917
|
* 'appear-active' class is applied.
|
|
@@ -2893,7 +2920,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2893
2920
|
*
|
|
2894
2921
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2895
2922
|
*/
|
|
2896
|
-
onEntering:
|
|
2923
|
+
onEntering: propTypesExports.func,
|
|
2897
2924
|
/**
|
|
2898
2925
|
* A `<Transition>` callback fired immediately after the 'enter' or
|
|
2899
2926
|
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
|
|
@@ -2902,7 +2929,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2902
2929
|
*
|
|
2903
2930
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
2904
2931
|
*/
|
|
2905
|
-
onEntered:
|
|
2932
|
+
onEntered: propTypesExports.func,
|
|
2906
2933
|
/**
|
|
2907
2934
|
* A `<Transition>` callback fired immediately after the 'exit' class is
|
|
2908
2935
|
* applied.
|
|
@@ -2911,7 +2938,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2911
2938
|
*
|
|
2912
2939
|
* @type Function(node: HtmlElement)
|
|
2913
2940
|
*/
|
|
2914
|
-
onExit:
|
|
2941
|
+
onExit: propTypesExports.func,
|
|
2915
2942
|
/**
|
|
2916
2943
|
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
|
|
2917
2944
|
*
|
|
@@ -2919,7 +2946,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2919
2946
|
*
|
|
2920
2947
|
* @type Function(node: HtmlElement)
|
|
2921
2948
|
*/
|
|
2922
|
-
onExiting:
|
|
2949
|
+
onExiting: propTypesExports.func,
|
|
2923
2950
|
/**
|
|
2924
2951
|
* A `<Transition>` callback fired immediately after the 'exit' classes
|
|
2925
2952
|
* are **removed** and the `exit-done` class is added to the DOM node.
|
|
@@ -2928,7 +2955,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2928
2955
|
*
|
|
2929
2956
|
* @type Function(node: HtmlElement)
|
|
2930
2957
|
*/
|
|
2931
|
-
onExited:
|
|
2958
|
+
onExited: propTypesExports.func
|
|
2932
2959
|
}) : {};
|
|
2933
2960
|
const CSSTransition$1 = CSSTransition;
|
|
2934
2961
|
const defaultProps$1m = {
|
|
@@ -9342,99 +9369,116 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
9342
9369
|
return { display: "none" };
|
|
9343
9370
|
};
|
|
9344
9371
|
const getPosition = () => {
|
|
9345
|
-
return direction === "down" ? {
|
|
9372
|
+
return direction === "down" ? { position: "absolute", height: `${window.innerHeight}px` } : {
|
|
9373
|
+
position: "absolute",
|
|
9374
|
+
bottom: "100%",
|
|
9375
|
+
top: "auto",
|
|
9376
|
+
height: `${window.innerHeight}px`
|
|
9377
|
+
};
|
|
9346
9378
|
};
|
|
9347
9379
|
const placeholderStyle = () => {
|
|
9348
9380
|
if (direction === "down") {
|
|
9349
9381
|
return {
|
|
9350
9382
|
height: `${position.top + position.height}px`,
|
|
9383
|
+
top: "auto",
|
|
9384
|
+
bottom: "-100%",
|
|
9351
9385
|
...isShow(),
|
|
9352
9386
|
...style
|
|
9353
9387
|
};
|
|
9354
9388
|
}
|
|
9355
9389
|
return {
|
|
9356
9390
|
height: `${window.innerHeight - position.top}px`,
|
|
9357
|
-
|
|
9391
|
+
bottom: `auto`,
|
|
9392
|
+
top: "0",
|
|
9358
9393
|
...isShow(),
|
|
9359
9394
|
...style
|
|
9360
9395
|
};
|
|
9361
9396
|
};
|
|
9362
|
-
return /* @__PURE__ */ React.createElement(
|
|
9397
|
+
return /* @__PURE__ */ React.createElement(
|
|
9363
9398
|
"div",
|
|
9364
9399
|
{
|
|
9365
|
-
className:
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
lockScroll: parent.lockScroll,
|
|
9377
|
-
visible: _showPopup,
|
|
9378
|
-
closeOnClickOverlay: parent.closeOnClickOverlay,
|
|
9379
|
-
onClick: () => {
|
|
9380
|
-
parent.closeOnClickOverlay && parent.toggleItemShow(orderKey);
|
|
9400
|
+
className: "nut-menu-item-container",
|
|
9401
|
+
style: { position: "absolute", left: 0, right: 0 }
|
|
9402
|
+
},
|
|
9403
|
+
/* @__PURE__ */ React.createElement(
|
|
9404
|
+
"div",
|
|
9405
|
+
{
|
|
9406
|
+
className: `placeholder-element ${classNames({
|
|
9407
|
+
up: direction === "up"
|
|
9408
|
+
})}`,
|
|
9409
|
+
style: placeholderStyle(),
|
|
9410
|
+
onClick: () => parent.toggleItemShow(orderKey)
|
|
9381
9411
|
}
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
|
|
9412
|
+
),
|
|
9413
|
+
/* @__PURE__ */ React.createElement(
|
|
9414
|
+
Overlay,
|
|
9415
|
+
{
|
|
9416
|
+
overlayClass: "nut-menu__overlay",
|
|
9417
|
+
style: getPosition(),
|
|
9418
|
+
lockScroll: parent.lockScroll,
|
|
9419
|
+
visible: _showPopup,
|
|
9420
|
+
closeOnClickOverlay: parent.closeOnClickOverlay,
|
|
9421
|
+
onClick: () => {
|
|
9422
|
+
parent.closeOnClickOverlay && parent.toggleItemShow(orderKey);
|
|
9423
|
+
}
|
|
9390
9424
|
}
|
|
9391
|
-
|
|
9425
|
+
),
|
|
9392
9426
|
/* @__PURE__ */ React.createElement(
|
|
9393
|
-
|
|
9427
|
+
"div",
|
|
9394
9428
|
{
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9429
|
+
className: direction === "down" ? "nut-menu-item__wrap" : "nut-menu-item__wrap-up",
|
|
9430
|
+
style: {
|
|
9431
|
+
// ...getPosition(),
|
|
9432
|
+
...isShow()
|
|
9433
|
+
}
|
|
9398
9434
|
},
|
|
9399
|
-
/* @__PURE__ */ React.createElement(
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
flexBasis: `${100 / columns}%`
|
|
9409
|
-
},
|
|
9410
|
-
onClick: () => {
|
|
9411
|
-
handleClick2(item);
|
|
9412
|
-
}
|
|
9413
|
-
},
|
|
9414
|
-
item.value === _value ? /* @__PURE__ */ React.createElement(
|
|
9415
|
-
Icon,
|
|
9416
|
-
{
|
|
9417
|
-
classPrefix: iconClassPrefix,
|
|
9418
|
-
fontClassName: iconFontClassName,
|
|
9419
|
-
className: getIconCName(item.value, value),
|
|
9420
|
-
name: optionsIcon,
|
|
9421
|
-
color: activeColor
|
|
9422
|
-
}
|
|
9423
|
-
) : null,
|
|
9424
|
-
/* @__PURE__ */ React.createElement(
|
|
9435
|
+
/* @__PURE__ */ React.createElement(
|
|
9436
|
+
CSSTransition$1,
|
|
9437
|
+
{
|
|
9438
|
+
in: _showPopup,
|
|
9439
|
+
timeout: 100,
|
|
9440
|
+
classNames: direction === "down" ? "menu-item" : "menu-item-up"
|
|
9441
|
+
},
|
|
9442
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-menu-item__content" }, options2 == null ? void 0 : options2.map((item, index) => {
|
|
9443
|
+
return /* @__PURE__ */ React.createElement(
|
|
9425
9444
|
"div",
|
|
9426
9445
|
{
|
|
9427
|
-
className:
|
|
9446
|
+
className: `nut-menu-item__option ${classNames({
|
|
9447
|
+
active: item.value === _value
|
|
9448
|
+
})}`,
|
|
9449
|
+
key: item.text,
|
|
9428
9450
|
style: {
|
|
9429
|
-
|
|
9451
|
+
flexBasis: `${100 / columns}%`
|
|
9452
|
+
},
|
|
9453
|
+
onClick: () => {
|
|
9454
|
+
handleClick2(item);
|
|
9430
9455
|
}
|
|
9431
9456
|
},
|
|
9432
|
-
item.
|
|
9433
|
-
|
|
9434
|
-
|
|
9435
|
-
|
|
9457
|
+
item.value === _value ? /* @__PURE__ */ React.createElement(
|
|
9458
|
+
Icon,
|
|
9459
|
+
{
|
|
9460
|
+
classPrefix: iconClassPrefix,
|
|
9461
|
+
fontClassName: iconFontClassName,
|
|
9462
|
+
className: getIconCName(item.value, value),
|
|
9463
|
+
name: optionsIcon,
|
|
9464
|
+
color: activeColor
|
|
9465
|
+
}
|
|
9466
|
+
) : null,
|
|
9467
|
+
/* @__PURE__ */ React.createElement(
|
|
9468
|
+
"div",
|
|
9469
|
+
{
|
|
9470
|
+
className: getIconCName(item.value, value),
|
|
9471
|
+
style: {
|
|
9472
|
+
color: `${item.value === _value ? activeColor : ""}`
|
|
9473
|
+
}
|
|
9474
|
+
},
|
|
9475
|
+
item.text
|
|
9476
|
+
)
|
|
9477
|
+
);
|
|
9478
|
+
}), children)
|
|
9479
|
+
)
|
|
9436
9480
|
)
|
|
9437
|
-
)
|
|
9481
|
+
);
|
|
9438
9482
|
});
|
|
9439
9483
|
MenuItem.defaultProps = defaultProps$1a;
|
|
9440
9484
|
MenuItem.displayName = "NutMenuItem";
|
|
@@ -19320,6 +19364,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19320
19364
|
paused: false,
|
|
19321
19365
|
startTime: Date.now(),
|
|
19322
19366
|
endTime: Date.now(),
|
|
19367
|
+
remainingTime: 0,
|
|
19323
19368
|
millisecond: false,
|
|
19324
19369
|
format: "HH:mm:ss",
|
|
19325
19370
|
autoStart: true,
|
|
@@ -19332,6 +19377,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19332
19377
|
paused,
|
|
19333
19378
|
startTime,
|
|
19334
19379
|
endTime,
|
|
19380
|
+
remainingTime,
|
|
19335
19381
|
millisecond,
|
|
19336
19382
|
format: format2,
|
|
19337
19383
|
autoStart,
|
|
@@ -19371,8 +19417,12 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19371
19417
|
return new Date(t).getTime();
|
|
19372
19418
|
};
|
|
19373
19419
|
const initTime = () => {
|
|
19374
|
-
|
|
19375
|
-
|
|
19420
|
+
if (remainingTime) {
|
|
19421
|
+
stateRef.current.handleEndTime = Date.now() + Number(remainingTime);
|
|
19422
|
+
} else {
|
|
19423
|
+
stateRef.current.handleEndTime = endTime;
|
|
19424
|
+
stateRef.current.diffTime = Date.now() - getTimeStamp(startTime);
|
|
19425
|
+
}
|
|
19376
19426
|
if (!stateRef.current.counting)
|
|
19377
19427
|
stateRef.current.counting = true;
|
|
19378
19428
|
tick();
|
|
@@ -19514,7 +19564,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19514
19564
|
if (stateRef.current.isIninted) {
|
|
19515
19565
|
initTime();
|
|
19516
19566
|
}
|
|
19517
|
-
}, [endTime, startTime]);
|
|
19567
|
+
}, [endTime, startTime, remainingTime]);
|
|
19518
19568
|
React.useEffect(() => {
|
|
19519
19569
|
if (autoStart) {
|
|
19520
19570
|
initTime();
|