@nutui/nutui-react-taro 1.4.1 → 1.4.2
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 +7 -0
- package/README.md +4 -4
- package/dist/esm/DatePicker.js +3 -3
- package/dist/esm/Input.js +2 -2
- package/dist/esm/Picker.js +2 -2
- package/dist/esm/SideNavBar.js +3 -3
- package/dist/esm/SubSideNavBar.js +3 -3
- package/dist/esm/address.taro-c03b8b16.js +23 -21
- package/dist/esm/barrage.taro-d86c367a.js +22 -24
- package/dist/esm/calendaritem.taro-85a8c4fc.js +16 -18
- package/dist/esm/cascader.taro-459f7d45.js +234 -244
- package/dist/esm/{datepicker.taro-00a72ca3.js → datepicker.taro-7de67b85.js} +1 -1
- package/dist/esm/ellipsis.taro-c0de6ff4.js +76 -84
- package/dist/esm/{input.taro-65db24c3.js → input.taro-8b3f8381.js} +12 -24
- package/dist/esm/menuitem.taro-2f8e69a4.js +14 -16
- package/dist/esm/noticebar.taro-43c18dc9.js +31 -33
- package/dist/esm/nutui-react.es.js +6 -6
- package/dist/esm/offsetContext-bfb02c25.js +3 -0
- package/dist/esm/{picker.taro-e23bc9d1.js → picker.taro-9b7263ca.js} +11 -15
- package/dist/esm/popover.taro-7e5dff8c.js +15 -17
- package/dist/esm/pulltorefresh.taro-f26a20dd.js +75 -81
- package/dist/esm/range.taro-4cbe2469.js +67 -71
- package/dist/esm/{sidenavbar.taro-a828250a.js → sidenavbar.taro-3b1f1218.js} +13 -5
- package/dist/esm/{subsidenavbar.taro-4c80ad38.js → subsidenavbar.taro-f46b4c73.js} +12 -11
- package/dist/esm/swipe.taro-83bc248f.js +35 -37
- package/dist/esm/swiper.taro-852f6615.js +26 -28
- package/dist/esm/types/src/packages/input/input.d.ts +0 -8
- package/dist/esm/types/src/packages/input/input.taro.d.ts +0 -8
- package/dist/esm/useClientRect-bf69d7b3.js +10 -12
- package/dist/locales/base.js +2 -2
- package/dist/locales/en-US.js +2 -2
- package/dist/locales/id-ID.js +2 -2
- package/dist/locales/zh-CN.js +2 -2
- package/dist/locales/zh-TW.js +2 -2
- package/dist/locales/zh-UG.js +2 -2
- package/dist/nutui.react.es.js +66 -88
- package/dist/nutui.react.umd.js +66 -88
- package/dist/packages/input/input.scss +12 -12
- package/dist/style.css +1 -1
- package/dist/style.es.js +2 -2
- package/dist/types/index.d.ts +0 -8
- package/package.json +1 -1
- package/dist/esm/offsetContext-0e3d04b3.js +0 -16
package/dist/locales/base.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react-taro v1.4.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui-react-taro v1.4.2-beta.0 Wed Jan 04 2023 15:06:39 GMT+0800 (China Standard Time)
|
|
3
|
+
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
package/dist/locales/en-US.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react-taro v1.4.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui-react-taro v1.4.2-beta.0 Wed Jan 04 2023 15:06:39 GMT+0800 (China Standard Time)
|
|
3
|
+
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
const enUS = {
|
package/dist/locales/id-ID.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react-taro v1.4.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui-react-taro v1.4.2-beta.0 Wed Jan 04 2023 15:06:39 GMT+0800 (China Standard Time)
|
|
3
|
+
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
const idID = {
|
package/dist/locales/zh-CN.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react-taro v1.4.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui-react-taro v1.4.2-beta.0 Wed Jan 04 2023 15:06:39 GMT+0800 (China Standard Time)
|
|
3
|
+
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
const zhCN = {
|
package/dist/locales/zh-TW.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react-taro v1.4.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui-react-taro v1.4.2-beta.0 Wed Jan 04 2023 15:06:39 GMT+0800 (China Standard Time)
|
|
3
|
+
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
const zhTW = {
|
package/dist/locales/zh-UG.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react-taro v1.4.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui-react-taro v1.4.2-beta.0 Wed Jan 04 2023 15:06:39 GMT+0800 (China Standard Time)
|
|
3
|
+
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
const zhUG = {
|
package/dist/nutui.react.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react-taro v1.4.
|
|
3
|
-
* (c)
|
|
2
|
+
* @nutui/nutui-react-taro v1.4.2-beta.0 Wed Jan 04 2023 15:06:14 GMT+0800 (China Standard Time)
|
|
3
|
+
* (c) 2023 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import * as React from "react";
|
|
@@ -95,7 +95,7 @@ function Icon$1(props) {
|
|
|
95
95
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
96
96
|
const type = isImage ? "img" : tag;
|
|
97
97
|
const b2 = cn("icon");
|
|
98
|
-
const
|
|
98
|
+
const handleClick = (e2) => {
|
|
99
99
|
if (onClick) {
|
|
100
100
|
onClick(e2);
|
|
101
101
|
}
|
|
@@ -117,7 +117,7 @@ function Icon$1(props) {
|
|
|
117
117
|
...style
|
|
118
118
|
},
|
|
119
119
|
...rest,
|
|
120
|
-
onClick:
|
|
120
|
+
onClick: handleClick,
|
|
121
121
|
...hasSrc()
|
|
122
122
|
},
|
|
123
123
|
children
|
|
@@ -219,7 +219,7 @@ const Button = (props) => {
|
|
|
219
219
|
classes,
|
|
220
220
|
getStyle
|
|
221
221
|
]);
|
|
222
|
-
const
|
|
222
|
+
const handleClick = (e2) => {
|
|
223
223
|
if (!loading && !disabled && onClick) {
|
|
224
224
|
onClick(e2);
|
|
225
225
|
}
|
|
@@ -228,7 +228,7 @@ const Button = (props) => {
|
|
|
228
228
|
className: `${btnName} ${className}`,
|
|
229
229
|
style: { ...btnStyle, ...style },
|
|
230
230
|
...rest,
|
|
231
|
-
onClick: (e2) =>
|
|
231
|
+
onClick: (e2) => handleClick(e2)
|
|
232
232
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
233
233
|
className: "nut-button__warp",
|
|
234
234
|
style: getStyle()
|
|
@@ -296,7 +296,7 @@ const Cell = (props) => {
|
|
|
296
296
|
...props
|
|
297
297
|
};
|
|
298
298
|
const b2 = cn("cell");
|
|
299
|
-
const
|
|
299
|
+
const handleClick = (event) => {
|
|
300
300
|
onClick(event);
|
|
301
301
|
const link = to2 || url;
|
|
302
302
|
if (link) {
|
|
@@ -315,7 +315,7 @@ const Cell = (props) => {
|
|
|
315
315
|
{ clickable: !!(isLink || to2), center, large: size === "large" },
|
|
316
316
|
[className]
|
|
317
317
|
)} `,
|
|
318
|
-
onClick: (event) =>
|
|
318
|
+
onClick: (event) => handleClick(event),
|
|
319
319
|
style: baseStyle,
|
|
320
320
|
...rest
|
|
321
321
|
}, children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, icon || iconSlot ? /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -478,7 +478,7 @@ const Overlay = (props) => {
|
|
|
478
478
|
document.body.classList.remove("nut-overflow-hidden");
|
|
479
479
|
}
|
|
480
480
|
};
|
|
481
|
-
const
|
|
481
|
+
const handleClick = (e2) => {
|
|
482
482
|
if (closeOnClickOverlay) {
|
|
483
483
|
props.onClick && props.onClick(e2);
|
|
484
484
|
renderRef.current = false;
|
|
@@ -492,7 +492,7 @@ const Overlay = (props) => {
|
|
|
492
492
|
className: classes,
|
|
493
493
|
style: styles,
|
|
494
494
|
...rest,
|
|
495
|
-
onClick:
|
|
495
|
+
onClick: handleClick
|
|
496
496
|
}, children));
|
|
497
497
|
};
|
|
498
498
|
Overlay.defaultProps = defaultOverlayProps;
|
|
@@ -7143,7 +7143,7 @@ const GridItem = (props) => {
|
|
|
7143
7143
|
const isIconName = () => {
|
|
7144
7144
|
return typeof icon === "string";
|
|
7145
7145
|
};
|
|
7146
|
-
const
|
|
7146
|
+
const handleClick = (e2) => {
|
|
7147
7147
|
onClick && onClick(e2);
|
|
7148
7148
|
context.onClick && context.onClick(
|
|
7149
7149
|
{
|
|
@@ -7169,7 +7169,7 @@ const GridItem = (props) => {
|
|
|
7169
7169
|
className: b2(),
|
|
7170
7170
|
style: rootStyle(),
|
|
7171
7171
|
...rest,
|
|
7172
|
-
onClick:
|
|
7172
|
+
onClick: handleClick
|
|
7173
7173
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
7174
7174
|
className: contentClass()
|
|
7175
7175
|
}, icon && isIconName() ? /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
@@ -7434,7 +7434,7 @@ const Tabbar = (props) => {
|
|
|
7434
7434
|
};
|
|
7435
7435
|
const b2 = cn("tabbar");
|
|
7436
7436
|
const [selectIndex, setSelectIndex] = useState(visible);
|
|
7437
|
-
const
|
|
7437
|
+
const handleClick = (idx) => {
|
|
7438
7438
|
setSelectIndex(idx);
|
|
7439
7439
|
};
|
|
7440
7440
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -7457,7 +7457,7 @@ const Tabbar = (props) => {
|
|
|
7457
7457
|
activeColor,
|
|
7458
7458
|
size,
|
|
7459
7459
|
handleClick: () => {
|
|
7460
|
-
|
|
7460
|
+
handleClick(idx);
|
|
7461
7461
|
tabSwitch(child, idx);
|
|
7462
7462
|
onSwitch(child, idx);
|
|
7463
7463
|
}
|
|
@@ -7499,7 +7499,7 @@ const TabbarItem = (props) => {
|
|
|
7499
7499
|
activeColor,
|
|
7500
7500
|
unactiveColor,
|
|
7501
7501
|
index,
|
|
7502
|
-
handleClick
|
|
7502
|
+
handleClick,
|
|
7503
7503
|
iconClassPrefix,
|
|
7504
7504
|
iconFontClassName
|
|
7505
7505
|
} = {
|
|
@@ -7526,7 +7526,7 @@ const TabbarItem = (props) => {
|
|
|
7526
7526
|
color: active ? activeColor : unactiveColor
|
|
7527
7527
|
},
|
|
7528
7528
|
onClick: () => {
|
|
7529
|
-
|
|
7529
|
+
handleClick(index);
|
|
7530
7530
|
}
|
|
7531
7531
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
7532
7532
|
className: `${bIcon()}`
|
|
@@ -8163,19 +8163,6 @@ const Indicator = (props) => {
|
|
|
8163
8163
|
};
|
|
8164
8164
|
Indicator.defaultProps = defaultProps$19;
|
|
8165
8165
|
Indicator.displayName = "NutIndicator";
|
|
8166
|
-
const handleClick = (e2) => {
|
|
8167
|
-
e2.stopPropagation();
|
|
8168
|
-
const isIcon = e2.target.className.includes("arrow-icon");
|
|
8169
|
-
const isTitle = e2.target.className.includes("__title") || isIcon;
|
|
8170
|
-
const currentClass = e2.currentTarget.className;
|
|
8171
|
-
const isShow = currentClass.includes("nutShow");
|
|
8172
|
-
const arrowIcon = e2.currentTarget.querySelector(".arrow-icon");
|
|
8173
|
-
const iconClass = arrowIcon.className;
|
|
8174
|
-
if (isTitle) {
|
|
8175
|
-
e2.currentTarget.className = isShow ? currentClass.replace("nutShow", "nutHide") : currentClass.replace("nutHide", "nutShow");
|
|
8176
|
-
arrowIcon.className = isShow ? iconClass.replace("arrow-down", "arrow-up") : iconClass.replace("arrow-up", "arrow-down");
|
|
8177
|
-
}
|
|
8178
|
-
};
|
|
8179
8166
|
const OffsetContext = createContext(20);
|
|
8180
8167
|
const defaultProps$18 = {
|
|
8181
8168
|
showhead: false,
|
|
@@ -8199,6 +8186,10 @@ const SideNavBar = (props) => {
|
|
|
8199
8186
|
...props
|
|
8200
8187
|
};
|
|
8201
8188
|
const offset = props.offset ? Number(props.offset) : 20;
|
|
8189
|
+
const [sidenavbarShow, setSidenavbarShow] = useState(true);
|
|
8190
|
+
const handleClick = () => {
|
|
8191
|
+
setSidenavbarShow(!sidenavbarShow);
|
|
8192
|
+
};
|
|
8202
8193
|
return /* @__PURE__ */ React__default.createElement(Popup, {
|
|
8203
8194
|
visible,
|
|
8204
8195
|
style: { width, height: "100%" },
|
|
@@ -8210,13 +8201,13 @@ const SideNavBar = (props) => {
|
|
|
8210
8201
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
8211
8202
|
className: "nut-sidenavbar__content"
|
|
8212
8203
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
8213
|
-
className:
|
|
8204
|
+
className: `nut-sidenavbar__list ${sidenavbarShow ? "nutShow" : "nutHide"}`,
|
|
8214
8205
|
onClick: handleClick
|
|
8215
8206
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
8216
8207
|
className: "nut-sidenavbar__title border-bt ",
|
|
8217
8208
|
style: { paddingLeft: `${offset}px` }
|
|
8218
|
-
}, title,
|
|
8219
|
-
className:
|
|
8209
|
+
}, title, /* @__PURE__ */ React__default.createElement("i", {
|
|
8210
|
+
className: `arrow-icon ${sidenavbarShow ? "arrow-up" : "arrow-down"}`
|
|
8220
8211
|
})), /* @__PURE__ */ React__default.createElement(OffsetContext.Provider, {
|
|
8221
8212
|
value: offset
|
|
8222
8213
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -8233,8 +8224,8 @@ const SubSideNavBar = (props) => {
|
|
|
8233
8224
|
...defaultProps$17,
|
|
8234
8225
|
...props
|
|
8235
8226
|
};
|
|
8227
|
+
const [subShow, setSubShow] = useState(open);
|
|
8236
8228
|
const offset = useContext(OffsetContext);
|
|
8237
|
-
console.log("offset>>>>>>>", offset);
|
|
8238
8229
|
const listRef = useRef(null);
|
|
8239
8230
|
const setListLevel = useCallback(
|
|
8240
8231
|
(nodeList, level = 1) => {
|
|
@@ -8263,9 +8254,9 @@ const SubSideNavBar = (props) => {
|
|
|
8263
8254
|
[offset]
|
|
8264
8255
|
);
|
|
8265
8256
|
const clickFn = (e2) => {
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
const isShow =
|
|
8257
|
+
e2.stopPropagation();
|
|
8258
|
+
setSubShow(!subShow);
|
|
8259
|
+
const isShow = !subShow;
|
|
8269
8260
|
onClick && onClick({ title, ikey, isShow });
|
|
8270
8261
|
};
|
|
8271
8262
|
useEffect(() => {
|
|
@@ -8274,8 +8265,8 @@ const SubSideNavBar = (props) => {
|
|
|
8274
8265
|
(_b = listRef.current) == null ? void 0 : _b.setAttribute("level", "1");
|
|
8275
8266
|
childNodes && setListLevel(childNodes);
|
|
8276
8267
|
}, [setListLevel]);
|
|
8277
|
-
const divClass =
|
|
8278
|
-
const iconClass =
|
|
8268
|
+
const divClass = subShow ? "nut-subsidenavbar__list nutShow" : "nut-subsidenavbar__list nutHide";
|
|
8269
|
+
const iconClass = subShow ? "arrow-icon arrow-down" : "arrow-icon arrow-up";
|
|
8279
8270
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
8280
8271
|
className: divClass,
|
|
8281
8272
|
ref: listRef,
|
|
@@ -8480,7 +8471,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
8480
8471
|
parent.updateTitle(text, orderKey);
|
|
8481
8472
|
}
|
|
8482
8473
|
};
|
|
8483
|
-
const
|
|
8474
|
+
const handleClick = (item) => {
|
|
8484
8475
|
parent.toggleItemShow(orderKey);
|
|
8485
8476
|
setTitle(item.text);
|
|
8486
8477
|
setValue(item.value);
|
|
@@ -8559,7 +8550,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
8559
8550
|
flexBasis: `${100 / columns}%`
|
|
8560
8551
|
},
|
|
8561
8552
|
onClick: () => {
|
|
8562
|
-
|
|
8553
|
+
handleClick(item);
|
|
8563
8554
|
}
|
|
8564
8555
|
}, item.value === _value ? /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
8565
8556
|
classPrefix: iconClassPrefix,
|
|
@@ -8680,7 +8671,7 @@ function Icon(props) {
|
|
|
8680
8671
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
8681
8672
|
const type = isImage ? "img" : tag;
|
|
8682
8673
|
const b2 = cn("icon");
|
|
8683
|
-
const
|
|
8674
|
+
const handleClick = (e2) => {
|
|
8684
8675
|
if (onClick) {
|
|
8685
8676
|
onClick(e2);
|
|
8686
8677
|
}
|
|
@@ -8702,7 +8693,7 @@ function Icon(props) {
|
|
|
8702
8693
|
...style
|
|
8703
8694
|
},
|
|
8704
8695
|
...rest,
|
|
8705
|
-
onClick:
|
|
8696
|
+
onClick: handleClick,
|
|
8706
8697
|
...hasSrc()
|
|
8707
8698
|
},
|
|
8708
8699
|
children
|
|
@@ -10060,7 +10051,7 @@ const Checkbox = (props) => {
|
|
|
10060
10051
|
className: `${b2("label", { disabled: innerDisabled })} `
|
|
10061
10052
|
}, children || label);
|
|
10062
10053
|
};
|
|
10063
|
-
const
|
|
10054
|
+
const handleClick = () => {
|
|
10064
10055
|
if (!disabled) {
|
|
10065
10056
|
const latest = !innerChecked;
|
|
10066
10057
|
if (max !== void 0 && latest && getParentVals().length >= max)
|
|
@@ -10072,7 +10063,7 @@ const Checkbox = (props) => {
|
|
|
10072
10063
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
10073
10064
|
className: `${b2({ reverse: textPosition === "left" })} ${className || ""}`,
|
|
10074
10065
|
...rest,
|
|
10075
|
-
onClick:
|
|
10066
|
+
onClick: handleClick
|
|
10076
10067
|
}, renderIcon(), renderLabel());
|
|
10077
10068
|
};
|
|
10078
10069
|
Checkbox.defaultProps = defaultProps$_;
|
|
@@ -10122,7 +10113,6 @@ const InternalPickerSlot = (props, ref) => {
|
|
|
10122
10113
|
setScrollDistance(translateY);
|
|
10123
10114
|
};
|
|
10124
10115
|
const setMove = (move, type, time) => {
|
|
10125
|
-
console.log("move");
|
|
10126
10116
|
let updateMove = move + transformY.current;
|
|
10127
10117
|
if (type === "end") {
|
|
10128
10118
|
if (updateMove > 0) {
|
|
@@ -10224,7 +10214,6 @@ const InternalPickerSlot = (props, ref) => {
|
|
|
10224
10214
|
};
|
|
10225
10215
|
const getReference = async () => {
|
|
10226
10216
|
const refe = await getRectByTaro(listbox == null ? void 0 : listbox.current);
|
|
10227
|
-
console.log(refe);
|
|
10228
10217
|
lineSpacing.current = refe.height ? refe.height : 36;
|
|
10229
10218
|
modifyStatus(true);
|
|
10230
10219
|
};
|
|
@@ -11114,14 +11103,6 @@ const Input = forwardRef((props, ref) => {
|
|
|
11114
11103
|
onClickLeftIcon,
|
|
11115
11104
|
onClickRightIcon,
|
|
11116
11105
|
onClick,
|
|
11117
|
-
change,
|
|
11118
|
-
blur,
|
|
11119
|
-
focus,
|
|
11120
|
-
clear,
|
|
11121
|
-
clickInput,
|
|
11122
|
-
clickLeftIcon,
|
|
11123
|
-
clickRightIcon,
|
|
11124
|
-
click,
|
|
11125
11106
|
iconClassPrefix,
|
|
11126
11107
|
iconFontClassName,
|
|
11127
11108
|
...rest
|
|
@@ -11136,7 +11117,9 @@ const Input = forwardRef((props, ref) => {
|
|
|
11136
11117
|
const getModelValue = () => String(inputValue != null ? inputValue : "");
|
|
11137
11118
|
const inputRef = useRef(null);
|
|
11138
11119
|
useLayoutEffect(() => {
|
|
11139
|
-
|
|
11120
|
+
if (defaultValue) {
|
|
11121
|
+
updateValue(getModelValue(), formatTrigger);
|
|
11122
|
+
}
|
|
11140
11123
|
});
|
|
11141
11124
|
useEffect(() => {
|
|
11142
11125
|
setClasses(inputClass);
|
|
@@ -11162,8 +11145,11 @@ const Input = forwardRef((props, ref) => {
|
|
|
11162
11145
|
`${border ? `${prefixCls}-border` : ""}`,
|
|
11163
11146
|
`${slotButton || rightIcon ? `${prefixCls}-right-mark` : ""}`
|
|
11164
11147
|
].filter(Boolean).join(" ");
|
|
11165
|
-
}, [disabled, required, error, border]);
|
|
11166
|
-
|
|
11148
|
+
}, [disabled, required, error, border, slotButton, rightIcon, center]);
|
|
11149
|
+
useEffect(() => {
|
|
11150
|
+
setClasses(inputClass);
|
|
11151
|
+
}, [disabled, required, error, border, slotButton, rightIcon, center]);
|
|
11152
|
+
const updateValue = (value, trigger = "onChange", event) => {
|
|
11167
11153
|
var _a;
|
|
11168
11154
|
let val = value;
|
|
11169
11155
|
if (type === "digit" || type === "tel") {
|
|
@@ -11184,21 +11170,19 @@ const Input = forwardRef((props, ref) => {
|
|
|
11184
11170
|
inputRef.current.value = val;
|
|
11185
11171
|
}
|
|
11186
11172
|
SetInputValue(val);
|
|
11173
|
+
onChange && onChange(val, event);
|
|
11187
11174
|
};
|
|
11188
11175
|
const handleFocus = (event) => {
|
|
11189
11176
|
const val = event.target.value;
|
|
11190
11177
|
SetActive(true);
|
|
11191
11178
|
onFocus && onFocus(val, event);
|
|
11192
|
-
focus && focus(val, event);
|
|
11193
11179
|
};
|
|
11194
11180
|
const handleInput = (event) => {
|
|
11195
11181
|
let val = event.target.value;
|
|
11196
11182
|
if (maxlength && val.length > Number(maxlength)) {
|
|
11197
11183
|
val = val.slice(0, Number(maxlength));
|
|
11198
11184
|
}
|
|
11199
|
-
updateValue(val);
|
|
11200
|
-
onChange && onChange(val, event);
|
|
11201
|
-
change && change(val, event);
|
|
11185
|
+
updateValue(val, "onChange", event);
|
|
11202
11186
|
};
|
|
11203
11187
|
const handleBlur = (event) => {
|
|
11204
11188
|
setTimeout(() => {
|
|
@@ -11210,19 +11194,15 @@ const Input = forwardRef((props, ref) => {
|
|
|
11210
11194
|
}
|
|
11211
11195
|
updateValue(getModelValue(), "onBlur");
|
|
11212
11196
|
onBlur && onBlur(val, event);
|
|
11213
|
-
blur && blur(val, event);
|
|
11214
11197
|
};
|
|
11215
11198
|
const handleClickInput = (event) => {
|
|
11216
11199
|
onClickInput && onClickInput(event);
|
|
11217
|
-
clickInput && clickInput(event);
|
|
11218
11200
|
};
|
|
11219
11201
|
const handleClickLeftIcon = (event) => {
|
|
11220
11202
|
onClickLeftIcon && onClickLeftIcon(event);
|
|
11221
|
-
clickLeftIcon && clickLeftIcon(event);
|
|
11222
11203
|
};
|
|
11223
11204
|
const handleClickRightIcon = (event) => {
|
|
11224
11205
|
onClickRightIcon && onClickRightIcon(event);
|
|
11225
|
-
clickRightIcon && clickRightIcon(event);
|
|
11226
11206
|
};
|
|
11227
11207
|
const resetValidation = () => {
|
|
11228
11208
|
};
|
|
@@ -11238,14 +11218,12 @@ const Input = forwardRef((props, ref) => {
|
|
|
11238
11218
|
const handleClear = (event) => {
|
|
11239
11219
|
updateValue("");
|
|
11240
11220
|
onClear && onClear("", event);
|
|
11241
|
-
clear && clear("", event);
|
|
11242
11221
|
};
|
|
11243
11222
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
11244
11223
|
className: `${classes} ${className || ""}`,
|
|
11245
11224
|
style,
|
|
11246
11225
|
onClick: (e2) => {
|
|
11247
11226
|
onClick && onClick(e2);
|
|
11248
|
-
click && click(e2);
|
|
11249
11227
|
}
|
|
11250
11228
|
}, slotInput ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, label ? /* @__PURE__ */ React__default.createElement("div", {
|
|
11251
11229
|
className: `nut-input-label ${labelClass}`,
|
|
@@ -11523,7 +11501,7 @@ const Radio$1 = (props) => {
|
|
|
11523
11501
|
}
|
|
11524
11502
|
return [renderIcon(), renderLabel()];
|
|
11525
11503
|
};
|
|
11526
|
-
const
|
|
11504
|
+
const handleClick = (e2) => {
|
|
11527
11505
|
if (disabledStatement || checkedStatement)
|
|
11528
11506
|
return;
|
|
11529
11507
|
setCheckedStatement(!checkedStatement);
|
|
@@ -11533,7 +11511,7 @@ const Radio$1 = (props) => {
|
|
|
11533
11511
|
const reverseState = textPosition === "left";
|
|
11534
11512
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
11535
11513
|
className: `nut-radio ${className}`,
|
|
11536
|
-
onClick:
|
|
11514
|
+
onClick: handleClick,
|
|
11537
11515
|
...rest
|
|
11538
11516
|
}, renderRadioItem());
|
|
11539
11517
|
};
|
|
@@ -13923,12 +13901,12 @@ const Content = (props) => {
|
|
|
13923
13901
|
})
|
|
13924
13902
|
}, footer);
|
|
13925
13903
|
}
|
|
13926
|
-
const
|
|
13904
|
+
const handleClick = () => {
|
|
13927
13905
|
onClickSelf && onClickSelf();
|
|
13928
13906
|
};
|
|
13929
13907
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
13930
13908
|
className: "nut-dialog__outer",
|
|
13931
|
-
onClick:
|
|
13909
|
+
onClick: handleClick
|
|
13932
13910
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
13933
13911
|
className: "nut-dialog",
|
|
13934
13912
|
style: { display: visible ? "flex" : "none" }
|
|
@@ -13954,7 +13932,7 @@ const DialogWrap = (props) => {
|
|
|
13954
13932
|
onClosed,
|
|
13955
13933
|
onCancel
|
|
13956
13934
|
} = props;
|
|
13957
|
-
const
|
|
13935
|
+
const handleClick = (e2) => {
|
|
13958
13936
|
if (closeOnClickOverlay && visible && e2.target === e2.currentTarget) {
|
|
13959
13937
|
onClosed == null ? void 0 : onClosed();
|
|
13960
13938
|
onCancel == null ? void 0 : onCancel();
|
|
@@ -13976,7 +13954,7 @@ const DialogWrap = (props) => {
|
|
|
13976
13954
|
appear: true
|
|
13977
13955
|
}, /* @__PURE__ */ React__default.createElement(Mask, null)) : null, /* @__PURE__ */ React__default.createElement("div", {
|
|
13978
13956
|
className: classNames("nut-dialog__wrap", className),
|
|
13979
|
-
onClick:
|
|
13957
|
+
onClick: handleClick,
|
|
13980
13958
|
style: wrapStyle
|
|
13981
13959
|
}, /* @__PURE__ */ React__default.createElement(Content, {
|
|
13982
13960
|
...props,
|
|
@@ -19532,7 +19510,7 @@ const NoticeBar = (props) => {
|
|
|
19532
19510
|
}
|
|
19533
19511
|
}, 0);
|
|
19534
19512
|
};
|
|
19535
|
-
const
|
|
19513
|
+
const handleClick = (event) => {
|
|
19536
19514
|
click && click(event);
|
|
19537
19515
|
onClick && onClick(event);
|
|
19538
19516
|
};
|
|
@@ -19642,7 +19620,7 @@ const NoticeBar = (props) => {
|
|
|
19642
19620
|
}, showNoticeBar && direction === "across" ? /* @__PURE__ */ React__default.createElement("div", {
|
|
19643
19621
|
className: noticebarClass,
|
|
19644
19622
|
style: barStyle,
|
|
19645
|
-
onClick:
|
|
19623
|
+
onClick: handleClick
|
|
19646
19624
|
}, iconShow() ? /* @__PURE__ */ React__default.createElement("div", {
|
|
19647
19625
|
className: "left-icon",
|
|
19648
19626
|
style: { backgroundImage: `url(${iconBg() || ""})` }
|
|
@@ -19671,7 +19649,7 @@ const NoticeBar = (props) => {
|
|
|
19671
19649
|
})) : null) : null, showNoticeBar && scrollList.current.length > 0 && direction === "vertical" ? /* @__PURE__ */ React__default.createElement("div", {
|
|
19672
19650
|
className: "nut-noticebar-vertical",
|
|
19673
19651
|
style: barStyle,
|
|
19674
|
-
onClick:
|
|
19652
|
+
onClick: handleClick
|
|
19675
19653
|
}, children ? /* @__PURE__ */ React__default.createElement("div", {
|
|
19676
19654
|
className: "horseLamp_list",
|
|
19677
19655
|
style: horseLampStyle
|
|
@@ -20668,7 +20646,7 @@ const Tag = (props) => {
|
|
|
20668
20646
|
${mark ? `${prefixCls2}--mark` : ""}
|
|
20669
20647
|
${closeable ? `${prefixCls2}--close` : ""}`;
|
|
20670
20648
|
};
|
|
20671
|
-
const
|
|
20649
|
+
const handleClick = (e2) => {
|
|
20672
20650
|
if (props.onClick) {
|
|
20673
20651
|
props.onClick(e2);
|
|
20674
20652
|
}
|
|
@@ -20691,7 +20669,7 @@ const Tag = (props) => {
|
|
|
20691
20669
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, closeable ? isTagShow && /* @__PURE__ */ React__default.createElement("div", {
|
|
20692
20670
|
className: `${btnName} ${className}`,
|
|
20693
20671
|
style: { ...style, ...getStyle() },
|
|
20694
|
-
onClick: (e2) =>
|
|
20672
|
+
onClick: (e2) => handleClick(e2)
|
|
20695
20673
|
}, children && /* @__PURE__ */ React__default.createElement("span", {
|
|
20696
20674
|
className: "text"
|
|
20697
20675
|
}, children), /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
@@ -20709,7 +20687,7 @@ const Tag = (props) => {
|
|
|
20709
20687
|
})) : /* @__PURE__ */ React__default.createElement("div", {
|
|
20710
20688
|
className: `${btnName} ${className}`,
|
|
20711
20689
|
style: { ...style, ...getStyle() },
|
|
20712
|
-
onClick: (e2) =>
|
|
20690
|
+
onClick: (e2) => handleClick(e2)
|
|
20713
20691
|
}, children && /* @__PURE__ */ React__default.createElement("span", {
|
|
20714
20692
|
className: "text"
|
|
20715
20693
|
}, children)));
|
|
@@ -20838,7 +20816,7 @@ const Popover = (props) => {
|
|
|
20838
20816
|
const prefixCls = "popover-arrow";
|
|
20839
20817
|
return `${prefixCls} ${prefixCls}-${filter()} ${location ? `${prefixCls}--${location}` : ""}`;
|
|
20840
20818
|
};
|
|
20841
|
-
const
|
|
20819
|
+
const handleClick = (e2) => {
|
|
20842
20820
|
if (props.onClick) {
|
|
20843
20821
|
props.onClick(e2);
|
|
20844
20822
|
}
|
|
@@ -20855,7 +20833,7 @@ const Popover = (props) => {
|
|
|
20855
20833
|
}, /* @__PURE__ */ React__default.createElement(Trigger, {
|
|
20856
20834
|
forwardedRef: goodItem
|
|
20857
20835
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
20858
|
-
onClick: (e2) =>
|
|
20836
|
+
onClick: (e2) => handleClick(e2)
|
|
20859
20837
|
}, Array.isArray(children) ? children[0] : children, visible ? /* @__PURE__ */ React__default.createElement("div", {
|
|
20860
20838
|
className: `${popoverContent}`,
|
|
20861
20839
|
style: getStyle()
|
|
@@ -20878,7 +20856,7 @@ const Popover = (props) => {
|
|
|
20878
20856
|
}, item.name));
|
|
20879
20857
|
})) : null))), visible ? /* @__PURE__ */ React__default.createElement(Overlay, {
|
|
20880
20858
|
visible,
|
|
20881
|
-
onClick: (e2) =>
|
|
20859
|
+
onClick: (e2) => handleClick(e2),
|
|
20882
20860
|
style: { background: "transparent" }
|
|
20883
20861
|
}) : "");
|
|
20884
20862
|
};
|
|
@@ -22495,7 +22473,7 @@ const TrendArrow = (props) => {
|
|
|
22495
22473
|
...rest
|
|
22496
22474
|
} = { ...defaultProps$c, ...props };
|
|
22497
22475
|
const b2 = cn("trendarrow");
|
|
22498
|
-
const
|
|
22476
|
+
const handleClick = () => {
|
|
22499
22477
|
};
|
|
22500
22478
|
const rateTrend = useRef(rate > 0);
|
|
22501
22479
|
const myFixed = (num, digit = 2) => {
|
|
@@ -22541,7 +22519,7 @@ const TrendArrow = (props) => {
|
|
|
22541
22519
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
22542
22520
|
className: `${b2()} ${className}`,
|
|
22543
22521
|
...rest,
|
|
22544
|
-
onClick:
|
|
22522
|
+
onClick: handleClick
|
|
22545
22523
|
}, !arrowLeft && renderContent(!arrowLeft), children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, Number(rate) !== 0 && /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
22546
22524
|
size: calcIconProps.size,
|
|
22547
22525
|
name: calcIconProps.name,
|
|
@@ -22688,7 +22666,7 @@ const Animate = (props) => {
|
|
|
22688
22666
|
loop: loop2
|
|
22689
22667
|
});
|
|
22690
22668
|
const cls = classNames(classes, className);
|
|
22691
|
-
const
|
|
22669
|
+
const handleClick = (event) => {
|
|
22692
22670
|
setClicked(true);
|
|
22693
22671
|
if (!loop2) {
|
|
22694
22672
|
setTimeout(() => {
|
|
@@ -22701,7 +22679,7 @@ const Animate = (props) => {
|
|
|
22701
22679
|
className: "nut-animate"
|
|
22702
22680
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
22703
22681
|
className: cls,
|
|
22704
|
-
onClick:
|
|
22682
|
+
onClick: handleClick,
|
|
22705
22683
|
...rest
|
|
22706
22684
|
}, children));
|
|
22707
22685
|
};
|
|
@@ -22913,12 +22891,12 @@ const Ellipsis = (props) => {
|
|
|
22913
22891
|
onChange && onChange("collapse");
|
|
22914
22892
|
}
|
|
22915
22893
|
};
|
|
22916
|
-
const
|
|
22894
|
+
const handleClick = () => {
|
|
22917
22895
|
onClick && onClick();
|
|
22918
22896
|
};
|
|
22919
22897
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", {
|
|
22920
22898
|
className: "nut-ellipsis",
|
|
22921
|
-
onClick:
|
|
22899
|
+
onClick: handleClick,
|
|
22922
22900
|
ref: root,
|
|
22923
22901
|
id: `root${refRandomId}`
|
|
22924
22902
|
}, /* @__PURE__ */ React__default.createElement("div", null, !exceeded ? /* @__PURE__ */ React__default.createElement("div", {
|