@nutui/nutui-react-taro 2.3.6-beta.0 → 2.3.7
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 +35 -0
- package/dist/esm/Address/style/style.css +1 -1
- package/dist/esm/Address.js +3 -3
- package/dist/esm/Audio.js +2 -2
- package/dist/esm/AvatarCropper.js +2 -2
- package/dist/esm/Button.js +1 -1
- package/dist/esm/CalendarCard.js +1 -1
- package/dist/esm/Cascader/style/style.css +1 -1
- package/dist/esm/Cascader.js +2 -2
- package/dist/esm/Checkbox.js +1 -1
- package/dist/esm/CheckboxGroup.js +1 -1
- package/dist/esm/CircleProgress/style/style.css +1 -1
- package/dist/esm/Dialog/style/style.css +1 -1
- package/dist/esm/Dialog.js +2 -2
- package/dist/esm/Empty.js +2 -2
- package/dist/esm/Form.js +2 -1245
- package/dist/esm/FormItem.js +1 -1
- package/dist/esm/ImagePreview/style/style.css +1 -1
- package/dist/esm/ImagePreview.js +2 -2
- package/dist/esm/NumberKeyboard.js +1 -1
- package/dist/esm/Popover/style/style.css +1 -1
- package/dist/esm/Table/style/style.css +1 -1
- package/dist/esm/Table.js +1 -1
- package/dist/esm/Tabs/style/style.css +1 -1
- package/dist/esm/Tabs.js +1 -1
- package/dist/esm/Tour/style/style.css +1 -1
- package/dist/esm/Uploader/style/style.css +1 -1
- package/dist/esm/Uploader.js +2 -2
- package/dist/esm/{address.taro-sTqrtuxC.js → address.taro-TWHlPzXv.js} +1 -1
- package/dist/esm/{audio.taro-ixcoTq7M.js → audio.taro-UpVxFvGk.js} +1 -1
- package/dist/esm/{avatarcropper.taro-OjudqSeT.js → avatarcropper.taro-_IENn5QL.js} +1 -1
- package/dist/esm/{button.taro-kZJrygfW.js → button.taro-3IIFy1M2.js} +7 -14
- package/dist/esm/{calendarcard.taro-QStCLFET.js → calendarcard.taro-tY-cyh-F.js} +2 -2
- package/dist/esm/{cascader.taro-DYMZD6ik.js → cascader.taro-QW13vwKb.js} +1 -1
- package/dist/esm/{checkbox.taro-doAmyAh6.js → checkbox.taro-xMxWdpyI.js} +14 -7
- package/dist/esm/{dialog.taro-UQN2mJZR.js → dialog.taro-z588FBZJ.js} +25 -4
- package/dist/esm/{empty.taro-vxcxYcB5.js → empty.taro-98NzV-31.js} +1 -1
- package/dist/esm/formitem.taro-atY4A0pS.js +1406 -0
- package/dist/esm/{imagepreview.taro-_dileEvw.js → imagepreview.taro-qDST6Lh4.js} +6 -2
- package/dist/esm/{numberkeyboard.taro-gJhSoXsl.js → numberkeyboard.taro-CyW0s9bI.js} +3 -2
- package/dist/esm/nutui-react.es.js +15 -15
- package/dist/esm/{table.taro-Zyemar_o.js → table.taro-d172EUh9.js} +1 -1
- package/dist/esm/{tabs.taro-uXbRqGVo.js → tabs.taro-aR3XROu9.js} +4 -4
- package/dist/esm/types/src/packages/checkbox/checkbox.d.ts +7 -6
- package/dist/esm/types/src/packages/checkbox/checkbox.taro.d.ts +7 -6
- package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.d.ts +3 -2
- package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.taro.d.ts +3 -2
- package/dist/esm/types/src/packages/checkboxgroup/context.d.ts +3 -1
- package/dist/esm/types/src/packages/checkboxgroup/types.d.ts +3 -0
- package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
- package/dist/esm/types/src/packages/dialog/config.d.ts +9 -6
- package/dist/esm/types/src/packages/dialog/confirm.d.ts +3 -3
- package/dist/esm/types/src/packages/dialog/content.d.ts +1 -0
- package/dist/esm/types/src/packages/dialog/content.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/dialog/dialog.d.ts +2 -2
- package/dist/esm/types/src/packages/dialog/dialog.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/dialog/dialogwrap.d.ts +1 -0
- package/dist/esm/types/src/packages/dialog/index.d.ts +1 -0
- package/dist/esm/types/src/packages/imagepreview/imagepreview.d.ts +4 -1
- package/dist/esm/types/src/packages/imagepreview/imagepreview.taro.d.ts +4 -1
- package/dist/esm/types/src/packages/imagepreview/index.d.ts +1 -1
- package/dist/esm/types/src/packages/imagepreview/index.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/numberkeyboard/numberkeyboard.d.ts +2 -1
- package/dist/esm/types/src/packages/numberkeyboard/numberkeyboard.taro.d.ts +2 -1
- package/dist/esm/types/src/utils/get-scroll-parent.d.ts +1 -0
- package/dist/esm/{uploader.taro-SAahCKRj.js → uploader.taro-a-U18v5C.js} +2 -2
- 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 +129 -59
- package/dist/nutui.react.umd.js +129 -59
- package/dist/packages/circleprogress/circleprogress.scss +3 -1
- package/dist/packages/dialog/dialog.scss +25 -0
- package/dist/packages/imagepreview/imagepreview.scss +24 -0
- package/dist/packages/popover/popover.scss +1 -1
- package/dist/packages/table/table.scss +12 -1
- package/dist/packages/tabs/tabs.scss +16 -1
- package/dist/packages/uploader/uploader.scss +4 -6
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +6 -0
- package/dist/styles/variables.scss +6 -0
- package/dist/types/packages/button/button.taro.d.ts +6 -2
- package/dist/types/packages/checkbox/checkbox.d.ts +7 -6
- package/dist/types/packages/checkbox/checkbox.taro.d.ts +7 -6
- package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +3 -2
- package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +8 -3
- package/dist/types/packages/checkboxgroup/context.d.ts +3 -1
- package/dist/types/packages/checkboxgroup/types.d.ts +3 -0
- package/dist/types/packages/configprovider/types.d.ts +1 -1
- package/dist/types/packages/dialog/config.d.ts +9 -6
- package/dist/types/packages/dialog/confirm.d.ts +3 -3
- package/dist/types/packages/dialog/content.d.ts +1 -0
- package/dist/types/packages/dialog/content.taro.d.ts +1 -0
- package/dist/types/packages/dialog/dialog.d.ts +2 -2
- package/dist/types/packages/dialog/dialog.taro.d.ts +2 -2
- package/dist/types/packages/dialog/dialogwrap.d.ts +1 -0
- package/dist/types/packages/dialog/index.d.ts +1 -0
- package/dist/types/packages/imagepreview/imagepreview.d.ts +4 -1
- package/dist/types/packages/imagepreview/imagepreview.taro.d.ts +12 -1
- package/dist/types/packages/imagepreview/index.d.ts +1 -1
- package/dist/types/packages/imagepreview/index.taro.d.ts +1 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +2 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.taro.d.ts +7 -2
- package/dist/types/utils/get-scroll-parent.d.ts +1 -0
- package/package.json +2 -2
- package/dist/esm/formitem.taro-4ofczzxA.js +0 -165
|
@@ -8,7 +8,7 @@ import React__default, { useState, useImperativeHandle } from "react";
|
|
|
8
8
|
import classNames from "classnames";
|
|
9
9
|
import Taro, { uploadFile, getEnv, chooseMedia, chooseImage } from "@tarojs/taro";
|
|
10
10
|
import { Failure, Link, Del, Loading, Photograph } from "@nutui/icons-react-taro";
|
|
11
|
-
import { B as Button } from "./button.taro-
|
|
11
|
+
import { B as Button } from "./button.taro-3IIFy1M2.js";
|
|
12
12
|
import { u as useConfig } from "./configprovider.taro-_wngOo0k.js";
|
|
13
13
|
import { a as isPromise } from "./index-YvHA__3D.js";
|
|
14
14
|
import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
|
|
@@ -171,7 +171,7 @@ const Preview = ({ fileList, previewType, deletable, onDeleteItem, handleItemCli
|
|
|
171
171
|
return React__default.createElement(
|
|
172
172
|
"div",
|
|
173
173
|
{ className: `nut-uploader-preview ${previewType}`, key: item.uid },
|
|
174
|
-
previewType === "picture" && deletable && React__default.createElement(Failure, { color: "rgba(0,0,0,0.6)", className: "close", onClick: () => onDeleteItem(item, index) }),
|
|
174
|
+
previewType === "picture" && !children && deletable && React__default.createElement(Failure, { color: "rgba(0,0,0,0.6)", className: "close", onClick: () => onDeleteItem(item, index) }),
|
|
175
175
|
previewType === "picture" && !children && React__default.createElement(
|
|
176
176
|
"div",
|
|
177
177
|
{ className: "nut-uploader-preview-img" },
|
package/dist/locales/base.js
CHANGED
package/dist/locales/en-US.js
CHANGED
package/dist/locales/id-ID.js
CHANGED
package/dist/locales/tr-TR.js
CHANGED
package/dist/locales/zh-CN.js
CHANGED
package/dist/locales/zh-TW.js
CHANGED
package/dist/locales/zh-UG.js
CHANGED
package/dist/nutui.react.es.js
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
/*!
|
|
8
|
-
* @nutui/nutui-react-taro v2.3.
|
|
8
|
+
* @nutui/nutui-react-taro v2.3.7 Fri Jan 19 2024 16:35:51 GMT+0800 (China Standard Time)
|
|
9
9
|
* (c) 2023 @jdf2e.
|
|
10
10
|
* Released under the MIT License.
|
|
11
11
|
*/
|
|
@@ -5309,7 +5309,12 @@ const Tabs = (props) => {
|
|
|
5309
5309
|
activeType === "line" && /* @__PURE__ */ React__default.createElement(
|
|
5310
5310
|
View,
|
|
5311
5311
|
{
|
|
5312
|
-
className:
|
|
5312
|
+
className: classNames(
|
|
5313
|
+
`${classPrefix$k}-titles-item-line`,
|
|
5314
|
+
{
|
|
5315
|
+
[`${classPrefix$k}-titles-item-line-${direction}`]: true
|
|
5316
|
+
}
|
|
5317
|
+
),
|
|
5313
5318
|
style: tabsActiveStyle
|
|
5314
5319
|
}
|
|
5315
5320
|
),
|
|
@@ -5325,9 +5330,7 @@ const Tabs = (props) => {
|
|
|
5325
5330
|
View,
|
|
5326
5331
|
{
|
|
5327
5332
|
className: classNames(
|
|
5328
|
-
{
|
|
5329
|
-
ellipsis: true
|
|
5330
|
-
},
|
|
5333
|
+
`${classPrefix$k}-ellipsis`,
|
|
5331
5334
|
`${classPrefix$k}-titles-item-text`
|
|
5332
5335
|
)
|
|
5333
5336
|
},
|
|
@@ -7284,8 +7287,8 @@ const CalendarCard = React__default.forwardRef((props, ref) => {
|
|
|
7284
7287
|
};
|
|
7285
7288
|
const isActive = (day) => {
|
|
7286
7289
|
if (type4 === "single" || type4 === "multiple") {
|
|
7287
|
-
for (const val
|
|
7288
|
-
if (isSameDay(day, val)) {
|
|
7290
|
+
for (const val in innerValue) {
|
|
7291
|
+
if (isSameDay(day, innerValue[val])) {
|
|
7289
7292
|
return true;
|
|
7290
7293
|
}
|
|
7291
7294
|
}
|
|
@@ -7491,28 +7494,33 @@ const CheckboxGroupContext = createContext(null);
|
|
|
7491
7494
|
const Context$1 = CheckboxGroupContext;
|
|
7492
7495
|
const defaultProps$11 = {
|
|
7493
7496
|
max: void 0,
|
|
7497
|
+
min: void 0,
|
|
7494
7498
|
labelPosition: "right",
|
|
7495
7499
|
direction: "vertical",
|
|
7496
7500
|
onChange: (value) => {
|
|
7497
7501
|
},
|
|
7502
|
+
onLimit: (type4) => {
|
|
7503
|
+
},
|
|
7498
7504
|
options: []
|
|
7499
7505
|
};
|
|
7500
7506
|
const classPrefix$j = "nut-checkboxgroup";
|
|
7501
7507
|
const CheckboxGroup = React__default.forwardRef(
|
|
7502
7508
|
(props, ref) => {
|
|
7503
|
-
const { children } = { ...defaultProps$11, ...props };
|
|
7504
7509
|
const {
|
|
7510
|
+
children,
|
|
7505
7511
|
className,
|
|
7506
7512
|
disabled,
|
|
7507
7513
|
onChange,
|
|
7508
7514
|
value,
|
|
7509
7515
|
defaultValue,
|
|
7510
7516
|
max,
|
|
7517
|
+
min,
|
|
7518
|
+
onLimit,
|
|
7511
7519
|
labelPosition,
|
|
7512
7520
|
direction,
|
|
7513
7521
|
options,
|
|
7514
7522
|
...rest
|
|
7515
|
-
} = props;
|
|
7523
|
+
} = { ...defaultProps$11, ...props };
|
|
7516
7524
|
useImperativeHandle(ref, () => ({
|
|
7517
7525
|
toggle(state) {
|
|
7518
7526
|
if (state === false) {
|
|
@@ -7557,7 +7565,7 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
7557
7565
|
}
|
|
7558
7566
|
);
|
|
7559
7567
|
});
|
|
7560
|
-
}, [options, max]);
|
|
7568
|
+
}, [options, max, min]);
|
|
7561
7569
|
return /* @__PURE__ */ React__default.createElement(
|
|
7562
7570
|
Context$1.Provider,
|
|
7563
7571
|
{
|
|
@@ -7565,13 +7573,22 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
7565
7573
|
labelPosition: labelPosition || "right",
|
|
7566
7574
|
disabled,
|
|
7567
7575
|
max,
|
|
7576
|
+
onLimit,
|
|
7568
7577
|
value: _value,
|
|
7569
7578
|
check: (value2) => {
|
|
7570
7579
|
const combined = [..._value, value2];
|
|
7580
|
+
if (max !== void 0) {
|
|
7581
|
+
if (combined.length > max) {
|
|
7582
|
+
return onLimit == null ? void 0 : onLimit("max");
|
|
7583
|
+
}
|
|
7584
|
+
}
|
|
7571
7585
|
setValue(combined);
|
|
7572
7586
|
},
|
|
7573
7587
|
uncheck: (value2) => {
|
|
7574
7588
|
const reduced = _value.filter((item) => item !== value2);
|
|
7589
|
+
if (min !== void 0 && reduced.length < min) {
|
|
7590
|
+
return onLimit == null ? void 0 : onLimit("min");
|
|
7591
|
+
}
|
|
7575
7592
|
setValue(reduced);
|
|
7576
7593
|
}
|
|
7577
7594
|
}
|
|
@@ -7707,10 +7724,6 @@ const Checkbox = (props) => {
|
|
|
7707
7724
|
if (disabled)
|
|
7708
7725
|
return;
|
|
7709
7726
|
const latestChecked = !innerChecked;
|
|
7710
|
-
if (ctx && ctx.max !== void 0) {
|
|
7711
|
-
if (latestChecked && ctx.value.length >= ctx.max)
|
|
7712
|
-
return;
|
|
7713
|
-
}
|
|
7714
7727
|
setChecked(latestChecked);
|
|
7715
7728
|
};
|
|
7716
7729
|
const renderButton = () => {
|
|
@@ -9691,7 +9704,7 @@ Schema.register = function register(type4, validator) {
|
|
|
9691
9704
|
Schema.warning = warning;
|
|
9692
9705
|
Schema.messages = messages;
|
|
9693
9706
|
Schema.validators = validators;
|
|
9694
|
-
const SECRET
|
|
9707
|
+
const SECRET = "NUT_FORM_INTERNAL";
|
|
9695
9708
|
class FormStore {
|
|
9696
9709
|
constructor() {
|
|
9697
9710
|
// 初始化数据
|
|
@@ -9772,10 +9785,37 @@ class FormStore {
|
|
|
9772
9785
|
...callback
|
|
9773
9786
|
};
|
|
9774
9787
|
});
|
|
9775
|
-
__publicField(this, "
|
|
9788
|
+
__publicField(this, "validateEntities", async (entity, errs) => {
|
|
9776
9789
|
var _a;
|
|
9790
|
+
const { name, rules: rules2 = [] } = entity.props;
|
|
9791
|
+
const descriptor = {};
|
|
9792
|
+
if (rules2.length) {
|
|
9793
|
+
if (rules2.length > 1) {
|
|
9794
|
+
descriptor[name] = [];
|
|
9795
|
+
rules2.forEach((v) => {
|
|
9796
|
+
descriptor[name].push(v);
|
|
9797
|
+
});
|
|
9798
|
+
} else {
|
|
9799
|
+
descriptor[name] = rules2[0];
|
|
9800
|
+
}
|
|
9801
|
+
}
|
|
9802
|
+
const validator = new Schema(descriptor);
|
|
9803
|
+
try {
|
|
9804
|
+
await validator.validate({ [name]: (_a = this.store) == null ? void 0 : _a[name] });
|
|
9805
|
+
} catch ({ errors }) {
|
|
9806
|
+
if (errors) {
|
|
9807
|
+
errs.push(...errors);
|
|
9808
|
+
this.errors[name] = errors;
|
|
9809
|
+
}
|
|
9810
|
+
} finally {
|
|
9811
|
+
if (!errs || errs.length === 0) {
|
|
9812
|
+
this.errors[name] = [];
|
|
9813
|
+
}
|
|
9814
|
+
}
|
|
9815
|
+
entity.onStoreChange("validate");
|
|
9816
|
+
});
|
|
9817
|
+
__publicField(this, "validateFields", async (nameList) => {
|
|
9777
9818
|
let filterEntities = [];
|
|
9778
|
-
const errs = [];
|
|
9779
9819
|
this.errors.length = 0;
|
|
9780
9820
|
if (!nameList || nameList.length === 0) {
|
|
9781
9821
|
filterEntities = this.fieldEntities;
|
|
@@ -9784,34 +9824,10 @@ class FormStore {
|
|
|
9784
9824
|
({ props: { name } }) => nameList.includes(name)
|
|
9785
9825
|
);
|
|
9786
9826
|
}
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
if (rules2.length > 1) {
|
|
9792
|
-
descriptor[name] = [];
|
|
9793
|
-
rules2.forEach((v) => {
|
|
9794
|
-
descriptor[name].push(v);
|
|
9795
|
-
});
|
|
9796
|
-
} else {
|
|
9797
|
-
descriptor[name] = rules2[0];
|
|
9798
|
-
}
|
|
9799
|
-
}
|
|
9800
|
-
const validator = new Schema(descriptor);
|
|
9801
|
-
try {
|
|
9802
|
-
await validator.validate({ [name]: (_a = this.store) == null ? void 0 : _a[name] });
|
|
9803
|
-
} catch ({ errors }) {
|
|
9804
|
-
if (errors) {
|
|
9805
|
-
errs.push(...errors);
|
|
9806
|
-
this.errors[name] = errors;
|
|
9807
|
-
}
|
|
9808
|
-
} finally {
|
|
9809
|
-
if (!errs || errs.length === 0) {
|
|
9810
|
-
this.errors[name] = [];
|
|
9811
|
-
}
|
|
9812
|
-
}
|
|
9813
|
-
entity.onStoreChange("validate");
|
|
9814
|
-
}
|
|
9827
|
+
const errs = [];
|
|
9828
|
+
filterEntities.forEach((entity) => {
|
|
9829
|
+
this.validateEntities(entity, errs);
|
|
9830
|
+
});
|
|
9815
9831
|
return errs;
|
|
9816
9832
|
});
|
|
9817
9833
|
__publicField(this, "submit", async () => {
|
|
@@ -9834,7 +9850,7 @@ class FormStore {
|
|
|
9834
9850
|
this.validateFields([name]);
|
|
9835
9851
|
});
|
|
9836
9852
|
__publicField(this, "getInternal", (key) => {
|
|
9837
|
-
if (key === SECRET
|
|
9853
|
+
if (key === SECRET) {
|
|
9838
9854
|
return {
|
|
9839
9855
|
registerField: this.registerField,
|
|
9840
9856
|
setCallback: this.setCallback,
|
|
@@ -9920,7 +9936,7 @@ const Form = React__default.forwardRef(
|
|
|
9920
9936
|
React__default.useImperativeHandle(ref, () => formInstance);
|
|
9921
9937
|
formInstance.starPosition = starPosition;
|
|
9922
9938
|
const { submit, resetFields } = formInstance;
|
|
9923
|
-
const { setCallback, setInitialValues } = formInstance.getInternal(SECRET
|
|
9939
|
+
const { setCallback, setInitialValues } = formInstance.getInternal(SECRET);
|
|
9924
9940
|
setCallback({
|
|
9925
9941
|
onFinish,
|
|
9926
9942
|
onFinishFailed
|
|
@@ -9965,7 +9981,6 @@ function isForwardRefComponent(component) {
|
|
|
9965
9981
|
}
|
|
9966
9982
|
).$$typeof === component.type.$$typeof;
|
|
9967
9983
|
}
|
|
9968
|
-
const SECRET = "NUT_FORM_INTERNAL";
|
|
9969
9984
|
const defaultProps$Y = {
|
|
9970
9985
|
...ComponentDefaults,
|
|
9971
9986
|
required: false,
|
|
@@ -10937,6 +10952,7 @@ Menu.Item = MenuItem;
|
|
|
10937
10952
|
const defaultProps$T = {
|
|
10938
10953
|
...ComponentDefaults,
|
|
10939
10954
|
visible: false,
|
|
10955
|
+
rightActions: "",
|
|
10940
10956
|
type: "default",
|
|
10941
10957
|
custom: [],
|
|
10942
10958
|
random: false,
|
|
@@ -10947,6 +10963,7 @@ const NumberKeyboard = (props) => {
|
|
|
10947
10963
|
const { locale } = useConfig$1();
|
|
10948
10964
|
const {
|
|
10949
10965
|
title,
|
|
10966
|
+
rightActions,
|
|
10950
10967
|
confirmText,
|
|
10951
10968
|
visible,
|
|
10952
10969
|
type: type4,
|
|
@@ -11056,7 +11073,7 @@ const NumberKeyboard = (props) => {
|
|
|
11056
11073
|
className: `${classPrefix2}-header-close`,
|
|
11057
11074
|
onClick: onConfirm
|
|
11058
11075
|
},
|
|
11059
|
-
locale.done
|
|
11076
|
+
rightActions || locale.done
|
|
11060
11077
|
)), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-body` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-body-keys` }, keysList == null ? void 0 : keysList.map((item) => {
|
|
11061
11078
|
return /* @__PURE__ */ React__default.createElement(NumberKeyboardKey, { key: item.id, item });
|
|
11062
11079
|
})), type4 === "rightColumn" && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-sidebar` }, /* @__PURE__ */ React__default.createElement(
|
|
@@ -12554,7 +12571,7 @@ const Preview = ({
|
|
|
12554
12571
|
className: `nut-uploader-preview ${previewType}`,
|
|
12555
12572
|
key: item.uid
|
|
12556
12573
|
},
|
|
12557
|
-
previewType === "picture" && deletable && /* @__PURE__ */ React__default.createElement(
|
|
12574
|
+
previewType === "picture" && !children && deletable && /* @__PURE__ */ React__default.createElement(
|
|
12558
12575
|
j$3,
|
|
12559
12576
|
{
|
|
12560
12577
|
color: "rgba(0,0,0,0.6)",
|
|
@@ -13040,7 +13057,16 @@ const ActionSheet = (props) => {
|
|
|
13040
13057
|
ActionSheet.defaultProps = defaultProps$H;
|
|
13041
13058
|
ActionSheet.displayName = "NutActionSheet";
|
|
13042
13059
|
const Content = (props) => {
|
|
13043
|
-
const {
|
|
13060
|
+
const {
|
|
13061
|
+
visible,
|
|
13062
|
+
title,
|
|
13063
|
+
header,
|
|
13064
|
+
footer,
|
|
13065
|
+
close: close2,
|
|
13066
|
+
footerDirection,
|
|
13067
|
+
onClick,
|
|
13068
|
+
children
|
|
13069
|
+
} = props;
|
|
13044
13070
|
const classPrefix2 = "nut-dialog";
|
|
13045
13071
|
const renderHeader = () => {
|
|
13046
13072
|
return title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-header` }, title) : null;
|
|
@@ -13066,6 +13092,7 @@ const Content = (props) => {
|
|
|
13066
13092
|
style: props.style,
|
|
13067
13093
|
onClick: (e2) => handleClick(e2)
|
|
13068
13094
|
},
|
|
13095
|
+
close2,
|
|
13069
13096
|
header,
|
|
13070
13097
|
/* @__PURE__ */ React__default.createElement(
|
|
13071
13098
|
"div",
|
|
@@ -13134,6 +13161,8 @@ const defaultProps$G = {
|
|
|
13134
13161
|
disableConfirmButton: false,
|
|
13135
13162
|
footerDirection: "horizontal",
|
|
13136
13163
|
lockScroll: true,
|
|
13164
|
+
closeIconPosition: "top-right",
|
|
13165
|
+
closeIcon: false,
|
|
13137
13166
|
beforeCancel: () => true,
|
|
13138
13167
|
beforeClose: () => true,
|
|
13139
13168
|
onOverlayClick: () => true
|
|
@@ -13162,6 +13191,8 @@ const BaseDialog = (props) => {
|
|
|
13162
13191
|
confirmText,
|
|
13163
13192
|
cancelText,
|
|
13164
13193
|
overlay,
|
|
13194
|
+
closeIconPosition,
|
|
13195
|
+
closeIcon,
|
|
13165
13196
|
onClose,
|
|
13166
13197
|
onCancel,
|
|
13167
13198
|
onConfirm,
|
|
@@ -13219,6 +13250,23 @@ const BaseDialog = (props) => {
|
|
|
13219
13250
|
confirmText || locale.confirm
|
|
13220
13251
|
));
|
|
13221
13252
|
};
|
|
13253
|
+
const renderCloseIcon = () => {
|
|
13254
|
+
if (!closeIcon)
|
|
13255
|
+
return null;
|
|
13256
|
+
const handleCancel = () => {
|
|
13257
|
+
if (!(beforeCancel == null ? void 0 : beforeCancel()))
|
|
13258
|
+
return;
|
|
13259
|
+
if (!(beforeClose == null ? void 0 : beforeClose()))
|
|
13260
|
+
return;
|
|
13261
|
+
onClose == null ? void 0 : onClose();
|
|
13262
|
+
onCancel == null ? void 0 : onCancel();
|
|
13263
|
+
};
|
|
13264
|
+
const closeClasses = classNames({
|
|
13265
|
+
[`${classPrefix2}-close`]: true,
|
|
13266
|
+
[`${classPrefix2}-close-${closeIconPosition}`]: true
|
|
13267
|
+
});
|
|
13268
|
+
return /* @__PURE__ */ React__default.createElement(View, { className: closeClasses, onClick: handleCancel }, React__default.isValidElement(closeIcon) ? closeIcon : /* @__PURE__ */ React__default.createElement(A$1, null));
|
|
13269
|
+
};
|
|
13222
13270
|
const onHandleClickOverlay = (e2) => {
|
|
13223
13271
|
if (closeOnOverlayClick && visible && e2.target === e2.currentTarget) {
|
|
13224
13272
|
const closed = onOverlayClick && onOverlayClick();
|
|
@@ -13258,6 +13306,7 @@ const BaseDialog = (props) => {
|
|
|
13258
13306
|
style,
|
|
13259
13307
|
title,
|
|
13260
13308
|
header,
|
|
13309
|
+
close: renderCloseIcon(),
|
|
13261
13310
|
footer: renderFooter(),
|
|
13262
13311
|
footerDirection,
|
|
13263
13312
|
visible
|
|
@@ -16565,6 +16614,8 @@ const defaultProps$g = {
|
|
|
16565
16614
|
closeOnContentClick: false,
|
|
16566
16615
|
indicator: false,
|
|
16567
16616
|
indicatorColor: "#fff",
|
|
16617
|
+
closeIcon: false,
|
|
16618
|
+
closeIconPosition: "top-right",
|
|
16568
16619
|
showMenuByLongpress: false,
|
|
16569
16620
|
onChange: (value) => {
|
|
16570
16621
|
},
|
|
@@ -16583,6 +16634,8 @@ const ImagePreview = (props) => {
|
|
|
16583
16634
|
indicator,
|
|
16584
16635
|
autoPlay,
|
|
16585
16636
|
closeOnContentClick,
|
|
16637
|
+
closeIcon,
|
|
16638
|
+
closeIconPosition,
|
|
16586
16639
|
showMenuByLongpress,
|
|
16587
16640
|
onClose
|
|
16588
16641
|
} = props;
|
|
@@ -16798,7 +16851,15 @@ const ImagePreview = (props) => {
|
|
|
16798
16851
|
)
|
|
16799
16852
|
)
|
|
16800
16853
|
),
|
|
16801
|
-
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0))
|
|
16854
|
+
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-index` }, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0)),
|
|
16855
|
+
closeIcon !== false ? /* @__PURE__ */ React__default.createElement(
|
|
16856
|
+
"div",
|
|
16857
|
+
{
|
|
16858
|
+
className: `${classPrefix2}-close ${closeIconPosition}`,
|
|
16859
|
+
onClick: onCloseInner
|
|
16860
|
+
},
|
|
16861
|
+
closeIcon === true ? /* @__PURE__ */ React__default.createElement(A$1, null) : closeIcon
|
|
16862
|
+
) : null
|
|
16802
16863
|
);
|
|
16803
16864
|
};
|
|
16804
16865
|
ImagePreview.defaultProps = defaultProps$g;
|
|
@@ -17295,16 +17356,25 @@ const Table = (props) => {
|
|
|
17295
17356
|
return /* @__PURE__ */ React__default.createElement("div", { className: bodyClassPrefix, key: index }, renderBodyTds(item, index));
|
|
17296
17357
|
});
|
|
17297
17358
|
};
|
|
17298
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: cls, ...rest }, /* @__PURE__ */ React__default.createElement(
|
|
17359
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: cls, ...rest }, /* @__PURE__ */ React__default.createElement(
|
|
17299
17360
|
"div",
|
|
17300
17361
|
{
|
|
17301
|
-
className: classNames(
|
|
17302
|
-
|
|
17303
|
-
|
|
17362
|
+
className: classNames(
|
|
17363
|
+
`${classPrefix2}-wrapper ${isSticky ? `${classPrefix2}-wrapper-sticky` : ""}`
|
|
17364
|
+
),
|
|
17365
|
+
style
|
|
17304
17366
|
},
|
|
17305
|
-
|
|
17306
|
-
|
|
17307
|
-
|
|
17367
|
+
/* @__PURE__ */ React__default.createElement(
|
|
17368
|
+
"div",
|
|
17369
|
+
{
|
|
17370
|
+
className: classNames(`${classPrefix2}-main`, {
|
|
17371
|
+
[`${classPrefix2}-main-striped`]: striped
|
|
17372
|
+
})
|
|
17373
|
+
},
|
|
17374
|
+
showHeader && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-main-head` }, /* @__PURE__ */ React__default.createElement("div", { className: headerClassPrefix }, renderHeadCells())),
|
|
17375
|
+
/* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-main-body` }, renderBodyTrs())
|
|
17376
|
+
)
|
|
17377
|
+
), isSticky ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
17308
17378
|
"div",
|
|
17309
17379
|
{
|
|
17310
17380
|
className: `${classPrefix2}-sticky-left`,
|