@nutui/nutui-react-taro 2.6.6 → 2.6.8
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 +29 -6
- package/dist/esm/ActionSheet/style/style.css +1 -1
- package/dist/esm/ActionSheet.js +1 -1
- package/dist/esm/Address.js +1 -1
- package/dist/esm/Audio.js +1 -1
- package/dist/esm/AvatarCropper.js +1 -1
- package/dist/esm/Button.js +1 -1
- package/dist/esm/Calendar.js +1 -1
- package/dist/esm/Card.js +1 -1
- package/dist/esm/Cascader.js +1 -1
- package/dist/esm/DatePicker.js +1 -1
- package/dist/esm/Dialog.js +1 -1
- package/dist/esm/Empty.js +1 -1
- package/dist/esm/FixedNav.js +1 -1
- package/dist/esm/ImagePreview.js +1 -1
- package/dist/esm/InputNumber.js +1 -1
- package/dist/esm/Menu.js +1 -1
- package/dist/esm/MenuItem.js +1 -1
- package/dist/esm/NumberKeyboard.js +1 -1
- package/dist/esm/Overlay.js +1 -1
- package/dist/esm/Picker.js +1 -1
- package/dist/esm/Popover.js +1 -1
- package/dist/esm/Popup.js +1 -1
- package/dist/esm/ShortPassword.js +1 -1
- package/dist/esm/SideNavBar.js +1 -1
- package/dist/esm/Signature.js +1 -1
- package/dist/esm/Sticky.js +1 -1
- package/dist/esm/TimeSelect.js +1 -1
- package/dist/esm/Toast.js +1 -1
- package/dist/esm/Tour.js +1 -1
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/{actionsheet.taro-CI2b9f_3.js → actionsheet.taro-CQzUaPSP.js} +3 -2
- package/dist/esm/{address.taro-6VS1YZ0V.js → address.taro-D7DEQdo8.js} +2 -2
- package/dist/esm/{audio.taro-4ixA5lb2.js → audio.taro-BlniN99d.js} +1 -1
- package/dist/esm/{avatarcropper.taro-C9BoO5Lp.js → avatarcropper.taro-D6yiXZM5.js} +1 -1
- package/dist/esm/{button.taro-CjH840d8.js → button.taro-KHyp8jxX.js} +2 -2
- package/dist/esm/{calendar.taro-CDZqFYlk.js → calendar.taro-B3D8xMB3.js} +1 -1
- package/dist/esm/{card.taro-Co0BZGJI.js → card.taro-CC0SLA0p.js} +5 -5
- package/dist/esm/{cascader.taro-CZkUgupN.js → cascader.taro-BOifacJL.js} +3 -3
- package/dist/esm/{datepicker.taro-B7H4b8TO.js → datepicker.taro-DzZmcesp.js} +1 -1
- package/dist/esm/{dialog.taro-Du4bNKvD.js → dialog.taro-BNVpTbBx.js} +2 -2
- package/dist/esm/{empty.taro-DgmUYpBc.js → empty.taro-ek_1_FoA.js} +1 -1
- package/dist/esm/{fixednav.taro-CewDiT-u.js → fixednav.taro-bmuCveIB.js} +1 -1
- package/dist/esm/{get-scroll-parent-DB1VRg11.js → get-scroll-parent-9ZDWApX2.js} +0 -1
- package/dist/esm/{imagepreview.taro-CBT7aS3-.js → imagepreview.taro-CytOhJpv.js} +1 -1
- package/dist/esm/{inputnumber.taro-ByJ9DlU2.js → inputnumber.taro-CzuJKfES.js} +4 -4
- package/dist/esm/{menu.taro-DkKY62ym.js → menu.taro-70-DLJx5.js} +1 -1
- package/dist/esm/{menuitem.taro-CKjl8_Cl.js → menuitem.taro-jJWuQbQt.js} +1 -1
- package/dist/esm/{numberkeyboard.taro-CFJtMOew.js → numberkeyboard.taro-Cx3igTDN.js} +1 -1
- package/dist/esm/nutui-react.es.js +29 -29
- package/dist/esm/{overlay.taro-BJ3twlP0.js → overlay.taro-Bu45p46Z.js} +2 -16
- package/dist/esm/{picker.taro-CHsDIw4C.js → picker.taro-va25oy1i.js} +3 -4
- package/dist/esm/{popover.taro-Dve2UnRF.js → popover.taro-D1Jnx8Xp.js} +1 -1
- package/dist/esm/{popup.taro-cT6cbAxw.js → popup.taro-C_nam_bX.js} +1 -1
- package/dist/esm/{shortpassword.taro-BVp4BrTs.js → shortpassword.taro-Bn5n4rrx.js} +1 -1
- package/dist/esm/{sidenavbar.taro-DGnJgxEe.js → sidenavbar.taro-BgKUZ--g.js} +1 -1
- package/dist/esm/{signature.taro-DTZCZMDZ.js → signature.taro-Dq6JO2XJ.js} +8 -1
- package/dist/esm/{sticky.taro-CqiMtDv9.js → sticky.taro-BtxnArYZ.js} +1 -1
- package/dist/esm/{timeselect.taro-C64SUiXS.js → timeselect.taro-DtyB_UVM.js} +1 -1
- package/dist/esm/{toast.taro-CSqE0aIO.js → toast.taro-C-jP8orA.js} +1 -1
- package/dist/esm/{tour.taro-DegQCG1T.js → tour.taro-D_J_gGVX.js} +1 -1
- package/dist/esm/{uploader.taro-BE4c5x9T.js → uploader.taro-CAKO74Mg.js} +4 -4
- 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/tr-TR.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.es.js +40 -31
- package/dist/nutui.react.umd.js +40 -31
- package/dist/packages/actionsheet/actionsheet.scss +7 -4
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +0 -1
- package/dist/styles/variables.scss +0 -1
- package/dist/types/packages/button/button.taro.d.ts +5 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/signature/signature.d.ts +1 -1
- package/dist/types/packages/signature/signature.taro.d.ts +1 -1
- package/package.json +1 -1
package/dist/nutui.react.umd.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("@tarojs/taro"), require("@tarojs/components"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "@tarojs/taro", "@tarojs/components", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory((global2.nutui = global2.nutui || {}, global2.nutui.react = {}), global2.React, global2.Taro, global2.components, global2.ReactDOM));
|
|
3
3
|
})(this, function(exports2, React, Taro, components, ReactDOM) {
|
|
4
4
|
"use strict";/*!
|
|
5
|
-
* @nutui/nutui-react-taro v2.6.
|
|
5
|
+
* @nutui/nutui-react-taro v2.6.8 Fri May 31 2024 16:03:24 GMT+0800 (China Standard Time)
|
|
6
6
|
* (c) 2023 @jdf2e.
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
@@ -244,6 +244,7 @@
|
|
|
244
244
|
children,
|
|
245
245
|
className,
|
|
246
246
|
style,
|
|
247
|
+
nativeType,
|
|
247
248
|
onClick,
|
|
248
249
|
...rest
|
|
249
250
|
} = {
|
|
@@ -283,6 +284,7 @@
|
|
|
283
284
|
{
|
|
284
285
|
...rest,
|
|
285
286
|
ref,
|
|
287
|
+
type: nativeType,
|
|
286
288
|
className: classNames(
|
|
287
289
|
prefixCls$2,
|
|
288
290
|
`${prefixCls$2}-${type2}`,
|
|
@@ -3437,19 +3439,6 @@
|
|
|
3437
3439
|
}
|
|
3438
3440
|
return root2;
|
|
3439
3441
|
}
|
|
3440
|
-
let passiveSupported = false;
|
|
3441
|
-
if (canUseDom) {
|
|
3442
|
-
try {
|
|
3443
|
-
const opts = Object.defineProperty({}, "passive", {
|
|
3444
|
-
get() {
|
|
3445
|
-
passiveSupported = true;
|
|
3446
|
-
}
|
|
3447
|
-
});
|
|
3448
|
-
window.addEventListener("test-passive-supported", null, opts);
|
|
3449
|
-
} catch (e2) {
|
|
3450
|
-
console.log(e2);
|
|
3451
|
-
}
|
|
3452
|
-
}
|
|
3453
3442
|
let totalLockCount = 0;
|
|
3454
3443
|
const BODY_LOCK_CLASS = "nut-overflow-hidden";
|
|
3455
3444
|
function getScrollableElement(el) {
|
|
@@ -3498,7 +3487,7 @@
|
|
|
3498
3487
|
document.addEventListener(
|
|
3499
3488
|
"touchmove",
|
|
3500
3489
|
onTouchMove,
|
|
3501
|
-
|
|
3490
|
+
false
|
|
3502
3491
|
);
|
|
3503
3492
|
if (!totalLockCount) {
|
|
3504
3493
|
document.body.classList.add(BODY_LOCK_CLASS);
|
|
@@ -5872,7 +5861,7 @@
|
|
|
5872
5861
|
const pathNodes = state.panes.map((item) => item.selectedNode);
|
|
5873
5862
|
const optionParams = pathNodes.map((item) => item.value);
|
|
5874
5863
|
onChange(optionParams, pathNodes);
|
|
5875
|
-
onPathChange(optionParams, pathNodes);
|
|
5864
|
+
onPathChange == null ? void 0 : onPathChange(optionParams, pathNodes);
|
|
5876
5865
|
setInnerValue(optionParams);
|
|
5877
5866
|
}
|
|
5878
5867
|
setOptionsData(state.panes);
|
|
@@ -5894,7 +5883,7 @@
|
|
|
5894
5883
|
if (!type2) {
|
|
5895
5884
|
const pathNodes = state.panes.map((item) => item.selectedNode);
|
|
5896
5885
|
const optionParams = pathNodes.map((item) => item == null ? void 0 : item.value);
|
|
5897
|
-
onPathChange(optionParams, pathNodes);
|
|
5886
|
+
onPathChange == null ? void 0 : onPathChange(optionParams, pathNodes);
|
|
5898
5887
|
}
|
|
5899
5888
|
return;
|
|
5900
5889
|
}
|
|
@@ -8056,7 +8045,7 @@
|
|
|
8056
8045
|
moving: moving.current
|
|
8057
8046
|
}));
|
|
8058
8047
|
React.useEffect(() => {
|
|
8059
|
-
const eventOptions =
|
|
8048
|
+
const eventOptions = false;
|
|
8060
8049
|
const element = pickerPanelRef.current;
|
|
8061
8050
|
element.addEventListener("touchstart", touchStart, eventOptions);
|
|
8062
8051
|
element.addEventListener("touchmove", touchMove, eventOptions);
|
|
@@ -8361,7 +8350,7 @@
|
|
|
8361
8350
|
setInnerVisible(false);
|
|
8362
8351
|
}
|
|
8363
8352
|
},
|
|
8364
|
-
locale.cancel
|
|
8353
|
+
locale == null ? void 0 : locale.cancel
|
|
8365
8354
|
), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-title` }, title || ""), /* @__PURE__ */ React.createElement(
|
|
8366
8355
|
"span",
|
|
8367
8356
|
{
|
|
@@ -10679,13 +10668,12 @@
|
|
|
10679
10668
|
onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
|
|
10680
10669
|
}
|
|
10681
10670
|
};
|
|
10682
|
-
return /* @__PURE__ */ React.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React.createElement("div", { className: "nut-input-minus" }, /* @__PURE__ */ React.createElement(
|
|
10671
|
+
return /* @__PURE__ */ React.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React.createElement("div", { className: "nut-input-minus", onClick: handleReduce }, /* @__PURE__ */ React.createElement(
|
|
10683
10672
|
a$1,
|
|
10684
10673
|
{
|
|
10685
10674
|
className: classNames("nut-inputnumber-icon icon-minus", {
|
|
10686
10675
|
[`${classPrefix$h}-icon-disabled`]: shadowValue === min || disabled
|
|
10687
|
-
})
|
|
10688
|
-
onClick: handleReduce
|
|
10676
|
+
})
|
|
10689
10677
|
}
|
|
10690
10678
|
)), /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
10691
10679
|
"input",
|
|
@@ -10701,13 +10689,12 @@
|
|
|
10701
10689
|
onBlur: handleBlur,
|
|
10702
10690
|
onFocus: handleFocus
|
|
10703
10691
|
}
|
|
10704
|
-
)), /* @__PURE__ */ React.createElement("div", { className: "nut-input-add" }, /* @__PURE__ */ React.createElement(
|
|
10692
|
+
)), /* @__PURE__ */ React.createElement("div", { className: "nut-input-add", onClick: handlePlus }, /* @__PURE__ */ React.createElement(
|
|
10705
10693
|
a,
|
|
10706
10694
|
{
|
|
10707
10695
|
className: classNames("nut-inputnumber-icon icon-plus", {
|
|
10708
10696
|
[`${classPrefix$h}-icon-disabled`]: shadowValue === max || disabled
|
|
10709
|
-
})
|
|
10710
|
-
onClick: handlePlus
|
|
10697
|
+
})
|
|
10711
10698
|
}
|
|
10712
10699
|
)));
|
|
10713
10700
|
};
|
|
@@ -12216,7 +12203,9 @@
|
|
|
12216
12203
|
const [canvasWidth, setCanvasWidth] = React.useState(0);
|
|
12217
12204
|
const ctx = React.useRef(null);
|
|
12218
12205
|
const [disalbeScroll] = React.useState("true");
|
|
12206
|
+
const isSignedRef = React.useRef(false);
|
|
12219
12207
|
const startEventHandler = (event) => {
|
|
12208
|
+
isSignedRef.current = true;
|
|
12220
12209
|
if (ctx.current) {
|
|
12221
12210
|
ctx.current.beginPath();
|
|
12222
12211
|
ctx.current.lineWidth = lineWidth;
|
|
@@ -12243,6 +12232,7 @@
|
|
|
12243
12232
|
const endEventHandler = (event) => {
|
|
12244
12233
|
};
|
|
12245
12234
|
const handleClearBtn = () => {
|
|
12235
|
+
isSignedRef.current = false;
|
|
12246
12236
|
if (ctx.current) {
|
|
12247
12237
|
ctx.current.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
12248
12238
|
ctx.current.closePath();
|
|
@@ -12250,6 +12240,10 @@
|
|
|
12250
12240
|
onClear && onClear();
|
|
12251
12241
|
};
|
|
12252
12242
|
const onSave = () => {
|
|
12243
|
+
if (!isSignedRef.current) {
|
|
12244
|
+
onConfirm && onConfirm("", isSignedRef.current);
|
|
12245
|
+
return;
|
|
12246
|
+
}
|
|
12253
12247
|
Taro.createSelectorQuery().select(`#${canvasId}`).fields({
|
|
12254
12248
|
node: true,
|
|
12255
12249
|
size: true
|
|
@@ -12259,7 +12253,7 @@
|
|
|
12259
12253
|
fileType: type2,
|
|
12260
12254
|
canvasId: `${canvasId}`,
|
|
12261
12255
|
success: (res2) => {
|
|
12262
|
-
onConfirm && onConfirm(res2.tempFilePath);
|
|
12256
|
+
onConfirm && onConfirm(res2.tempFilePath, isSignedRef.current);
|
|
12263
12257
|
},
|
|
12264
12258
|
fail: (res2) => {
|
|
12265
12259
|
console.warn("保存失败");
|
|
@@ -13226,7 +13220,14 @@
|
|
|
13226
13220
|
const handleItemClick = (file, index) => {
|
|
13227
13221
|
onFileItemClick == null ? void 0 : onFileItemClick(file, index);
|
|
13228
13222
|
};
|
|
13229
|
-
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps }, (children || previewType === "list") && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-slot" }, /* @__PURE__ */ React.createElement(React.Fragment, null, children || /* @__PURE__ */ React.createElement(Button, { size: "small", type: "primary" }, "上传文件"), Number(maxCount) > fileList.length && /* @__PURE__ */ React.createElement(
|
|
13223
|
+
return /* @__PURE__ */ React.createElement("div", { className: classes, ...restProps }, (children || previewType === "list") && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-slot" }, /* @__PURE__ */ React.createElement(React.Fragment, null, children || /* @__PURE__ */ React.createElement(Button, { nativeType: "button", size: "small", type: "primary" }, "上传文件"), Number(maxCount) > fileList.length && /* @__PURE__ */ React.createElement(
|
|
13224
|
+
Button,
|
|
13225
|
+
{
|
|
13226
|
+
nativeType: "button",
|
|
13227
|
+
className: "nut-uploader-input",
|
|
13228
|
+
onClick: _chooseImage
|
|
13229
|
+
}
|
|
13230
|
+
))), /* @__PURE__ */ React.createElement(
|
|
13230
13231
|
Preview,
|
|
13231
13232
|
{
|
|
13232
13233
|
...{
|
|
@@ -13245,7 +13246,14 @@
|
|
|
13245
13246
|
className: `nut-uploader-upload ${previewType} ${disabled ? "nut-uploader-upload-disabled" : ""}`
|
|
13246
13247
|
},
|
|
13247
13248
|
/* @__PURE__ */ React.createElement("div", { className: "nut-uploader-icon" }, uploadIcon, /* @__PURE__ */ React.createElement("span", { className: "nut-uploader-icon-tip" }, uploadLabel)),
|
|
13248
|
-
/* @__PURE__ */ React.createElement(
|
|
13249
|
+
/* @__PURE__ */ React.createElement(
|
|
13250
|
+
Button,
|
|
13251
|
+
{
|
|
13252
|
+
nativeType: "button",
|
|
13253
|
+
className: "nut-uploader-input",
|
|
13254
|
+
onClick: _chooseImage
|
|
13255
|
+
}
|
|
13256
|
+
)
|
|
13249
13257
|
));
|
|
13250
13258
|
};
|
|
13251
13259
|
const Uploader = React.forwardRef(InternalUploader);
|
|
@@ -13318,7 +13326,8 @@
|
|
|
13318
13326
|
onClick: () => cancelActionSheet()
|
|
13319
13327
|
},
|
|
13320
13328
|
cancelText
|
|
13321
|
-
))
|
|
13329
|
+
)),
|
|
13330
|
+
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-safe-area` })
|
|
13322
13331
|
);
|
|
13323
13332
|
};
|
|
13324
13333
|
ActionSheet.displayName = "NutActionSheet";
|
|
@@ -18402,14 +18411,14 @@
|
|
|
18402
18411
|
...props
|
|
18403
18412
|
};
|
|
18404
18413
|
const classPrefix2 = "nut-card";
|
|
18405
|
-
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style, ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-left` }, /* @__PURE__ */ React.createElement("img", { src, alt: "" })), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-right` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-right-title` }, title), description, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-right-price` }, /* @__PURE__ */ React.createElement(Price, { size: "normal", price }), priceTag || /* @__PURE__ */ React.createElement(
|
|
18414
|
+
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style, ...rest }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-left` }, /* @__PURE__ */ React.createElement("img", { src, alt: "" })), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-right` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-right-title` }, title), description, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-right-price` }, price && /* @__PURE__ */ React.createElement(Price, { size: "normal", price }), priceTag || vipPrice && /* @__PURE__ */ React.createElement(
|
|
18406
18415
|
Price,
|
|
18407
18416
|
{
|
|
18408
18417
|
size: "normal",
|
|
18409
18418
|
className: `${classPrefix2}-right-price-origin`,
|
|
18410
18419
|
price: vipPrice
|
|
18411
18420
|
}
|
|
18412
|
-
)), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-right-other` }, tag || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Tag, { type: "danger" }, shopDescription), /* @__PURE__ */ React.createElement(Tag, { plain: true }, delivery))), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-right-shop` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-right-shop-name` }, shopName), extra)));
|
|
18421
|
+
)), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-right-other` }, tag || /* @__PURE__ */ React.createElement(React.Fragment, null, shopDescription && /* @__PURE__ */ React.createElement(Tag, { type: "danger" }, shopDescription), delivery && /* @__PURE__ */ React.createElement(Tag, { plain: true }, delivery))), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-right-shop` }, shopName && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-right-shop-name` }, shopName), extra)));
|
|
18413
18422
|
};
|
|
18414
18423
|
Card.displayName = "NutCard";
|
|
18415
18424
|
const defaultProps$4 = {
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
.nut-actionsheet {
|
|
3
|
-
display: block;
|
|
4
|
-
padding-bottom: constant(safe-area-inset-bottom);
|
|
5
|
-
padding-bottom: env(safe-area-inset-bottom);
|
|
6
3
|
text-align: center;
|
|
7
4
|
|
|
8
5
|
&.nut-popup {
|
|
9
6
|
min-height: 10%;
|
|
10
7
|
background-color: $actionsheet-background-color;
|
|
11
|
-
padding: $actionsheet-padding;
|
|
12
8
|
}
|
|
13
9
|
|
|
14
10
|
.nut-popup-title {
|
|
@@ -55,4 +51,11 @@
|
|
|
55
51
|
border-top: 1px solid $actionsheet-border-color;
|
|
56
52
|
border-radius: $actionsheet-border-radius;
|
|
57
53
|
}
|
|
54
|
+
|
|
55
|
+
&-safe-area {
|
|
56
|
+
display: block;
|
|
57
|
+
width: 100%;
|
|
58
|
+
padding-bottom: constant(safe-area-inset-bottom);
|
|
59
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
60
|
+
}
|
|
58
61
|
}
|