antd-mobile 5.12.4 → 5.12.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/2x/cjs/components/action-sheet/action-sheet.css +22 -7
- package/2x/cjs/components/action-sheet/action-sheet.js +8 -16
- package/2x/cjs/components/button/button.d.ts +1 -1
- package/2x/cjs/components/calendar/calendar.css +4 -0
- package/2x/cjs/components/calendar/calendar.d.ts +1 -0
- package/2x/cjs/components/calendar/calendar.js +1 -1
- package/2x/cjs/components/form/form-item.js +1 -4
- package/2x/cjs/components/image/image.d.ts +1 -0
- package/2x/cjs/components/image/image.js +4 -2
- package/2x/cjs/components/popover/popover.css +1 -0
- package/2x/cjs/components/popover/popover.js +3 -1
- package/2x/cjs/components/search-bar/search-bar.d.ts +1 -1
- package/2x/cjs/components/swiper/index.d.ts +1 -1
- package/2x/cjs/components/swiper/swiper.d.ts +1 -1
- package/2x/cjs/components/text-area/text-area.js +2 -1
- package/2x/es/components/action-sheet/action-sheet.css +22 -7
- package/2x/es/components/action-sheet/action-sheet.js +8 -15
- package/2x/es/components/button/button.d.ts +1 -1
- package/2x/es/components/calendar/calendar.css +4 -0
- package/2x/es/components/calendar/calendar.d.ts +1 -0
- package/2x/es/components/calendar/calendar.js +1 -1
- package/2x/es/components/form/form-item.js +1 -4
- package/2x/es/components/image/image.d.ts +1 -0
- package/2x/es/components/image/image.js +4 -2
- package/2x/es/components/popover/popover.css +1 -0
- package/2x/es/components/popover/popover.js +3 -1
- package/2x/es/components/search-bar/search-bar.d.ts +1 -1
- package/2x/es/components/swiper/index.d.ts +1 -1
- package/2x/es/components/swiper/swiper.d.ts +1 -1
- package/2x/es/components/text-area/text-area.js +2 -1
- package/2x/package.json +5 -5
- package/bundle/antd-mobile.cjs.js +165 -168
- package/bundle/antd-mobile.es.js +166 -169
- package/bundle/style.css +94 -78
- package/cjs/components/action-sheet/action-sheet.css +19 -7
- package/cjs/components/action-sheet/action-sheet.js +8 -16
- package/cjs/components/button/button.d.ts +1 -1
- package/cjs/components/calendar/calendar.css +3 -0
- package/cjs/components/calendar/calendar.d.ts +1 -0
- package/cjs/components/calendar/calendar.js +1 -1
- package/cjs/components/form/form-item.js +1 -4
- package/cjs/components/image/image.d.ts +1 -0
- package/cjs/components/image/image.js +4 -2
- package/cjs/components/popover/popover.css +1 -0
- package/cjs/components/popover/popover.js +3 -1
- package/cjs/components/search-bar/search-bar.d.ts +1 -1
- package/cjs/components/swiper/index.d.ts +1 -1
- package/cjs/components/swiper/swiper.d.ts +1 -1
- package/cjs/components/text-area/text-area.js +2 -1
- package/es/components/action-sheet/action-sheet.css +19 -7
- package/es/components/action-sheet/action-sheet.js +8 -15
- package/es/components/button/button.d.ts +1 -1
- package/es/components/calendar/calendar.css +3 -0
- package/es/components/calendar/calendar.d.ts +1 -0
- package/es/components/calendar/calendar.js +1 -1
- package/es/components/form/form-item.js +1 -4
- package/es/components/image/image.d.ts +1 -0
- package/es/components/image/image.js +4 -2
- package/es/components/popover/popover.css +1 -0
- package/es/components/popover/popover.js +3 -1
- package/es/components/search-bar/search-bar.d.ts +1 -1
- package/es/components/swiper/index.d.ts +1 -1
- package/es/components/swiper/swiper.d.ts +1 -1
- package/es/components/text-area/text-area.js +2 -1
- package/package.json +5 -5
- package/umd/antd-mobile.js +1 -1
|
@@ -9033,131 +9033,11 @@ const Popup = (p2) => {
|
|
|
9033
9033
|
}, shouldRender && props.children))));
|
|
9034
9034
|
return renderToContainer(props.getContainer, node);
|
|
9035
9035
|
};
|
|
9036
|
-
var button = "";
|
|
9037
|
-
var dotLoading = "";
|
|
9038
|
-
const classPrefix$1e = `adm-dot-loading`;
|
|
9039
|
-
const colorRecord$3 = {
|
|
9040
|
-
default: "var(--adm-color-weak)",
|
|
9041
|
-
primary: "var(--adm-color-primary)",
|
|
9042
|
-
white: "var(--adm-color-white)"
|
|
9043
|
-
};
|
|
9044
|
-
const defaultProps$X = {
|
|
9045
|
-
color: "default"
|
|
9046
|
-
};
|
|
9047
|
-
const DotLoading = React$1.memo((p2) => {
|
|
9048
|
-
var _a;
|
|
9049
|
-
const props = mergeProps(defaultProps$X, p2);
|
|
9050
|
-
return withNativeProps(props, React__default["default"].createElement("div", {
|
|
9051
|
-
style: {
|
|
9052
|
-
color: (_a = colorRecord$3[props.color]) !== null && _a !== void 0 ? _a : props.color
|
|
9053
|
-
},
|
|
9054
|
-
className: classNames__default["default"]("adm-loading", classPrefix$1e)
|
|
9055
|
-
}, React__default["default"].createElement("svg", {
|
|
9056
|
-
height: "1em",
|
|
9057
|
-
viewBox: "0 0 100 40",
|
|
9058
|
-
style: {
|
|
9059
|
-
verticalAlign: "-0.125em"
|
|
9060
|
-
}
|
|
9061
|
-
}, React__default["default"].createElement("g", {
|
|
9062
|
-
stroke: "none",
|
|
9063
|
-
strokeWidth: "1",
|
|
9064
|
-
fill: "none",
|
|
9065
|
-
fillRule: "evenodd"
|
|
9066
|
-
}, React__default["default"].createElement("g", {
|
|
9067
|
-
transform: "translate(-100.000000, -71.000000)"
|
|
9068
|
-
}, React__default["default"].createElement("g", {
|
|
9069
|
-
transform: "translate(95.000000, 71.000000)"
|
|
9070
|
-
}, React__default["default"].createElement("g", {
|
|
9071
|
-
transform: "translate(5.000000, 0.000000)"
|
|
9072
|
-
}, [0, 1, 2].map((i) => React__default["default"].createElement("rect", {
|
|
9073
|
-
key: i,
|
|
9074
|
-
fill: "currentColor",
|
|
9075
|
-
x: 20 + i * 26,
|
|
9076
|
-
y: "16",
|
|
9077
|
-
width: "8",
|
|
9078
|
-
height: "8",
|
|
9079
|
-
rx: "2"
|
|
9080
|
-
}, React__default["default"].createElement("animate", {
|
|
9081
|
-
attributeName: "y",
|
|
9082
|
-
from: "16",
|
|
9083
|
-
to: "16",
|
|
9084
|
-
dur: "2s",
|
|
9085
|
-
begin: `${i * 0.2}s`,
|
|
9086
|
-
repeatCount: "indefinite",
|
|
9087
|
-
values: "16; 6; 26; 16; 16",
|
|
9088
|
-
keyTimes: "0; 0.1; 0.3; 0.4; 1"
|
|
9089
|
-
}))))))))));
|
|
9090
|
-
});
|
|
9091
|
-
function isPromise(obj) {
|
|
9092
|
-
return !!obj && typeof obj === "object" && typeof obj.then === "function";
|
|
9093
|
-
}
|
|
9094
|
-
const classPrefix$1d = `adm-button`;
|
|
9095
|
-
const defaultProps$W = {
|
|
9096
|
-
color: "default",
|
|
9097
|
-
fill: "solid",
|
|
9098
|
-
block: false,
|
|
9099
|
-
loading: false,
|
|
9100
|
-
loadingIcon: React__default["default"].createElement(DotLoading, {
|
|
9101
|
-
color: "currentColor"
|
|
9102
|
-
}),
|
|
9103
|
-
type: "button",
|
|
9104
|
-
shape: "default",
|
|
9105
|
-
size: "middle"
|
|
9106
|
-
};
|
|
9107
|
-
const Button = React$1.forwardRef((p2, ref) => {
|
|
9108
|
-
const props = mergeProps(defaultProps$W, p2);
|
|
9109
|
-
const [innerLoading, setInnerLoading] = React$1.useState(false);
|
|
9110
|
-
const nativeButtonRef = React$1.useRef(null);
|
|
9111
|
-
const loading = props.loading === "auto" ? innerLoading : props.loading;
|
|
9112
|
-
const disabled = props.disabled || loading;
|
|
9113
|
-
React$1.useImperativeHandle(ref, () => ({
|
|
9114
|
-
get nativeElement() {
|
|
9115
|
-
return nativeButtonRef.current;
|
|
9116
|
-
}
|
|
9117
|
-
}));
|
|
9118
|
-
const handleClick = (e) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
9119
|
-
if (!props.onClick)
|
|
9120
|
-
return;
|
|
9121
|
-
const promise = props.onClick(e);
|
|
9122
|
-
if (isPromise(promise)) {
|
|
9123
|
-
try {
|
|
9124
|
-
setInnerLoading(true);
|
|
9125
|
-
yield promise;
|
|
9126
|
-
setInnerLoading(false);
|
|
9127
|
-
} catch (e2) {
|
|
9128
|
-
setInnerLoading(false);
|
|
9129
|
-
throw e2;
|
|
9130
|
-
}
|
|
9131
|
-
}
|
|
9132
|
-
});
|
|
9133
|
-
return withNativeProps(props, React__default["default"].createElement("button", {
|
|
9134
|
-
ref: nativeButtonRef,
|
|
9135
|
-
type: props.type,
|
|
9136
|
-
onClick: handleClick,
|
|
9137
|
-
className: classNames__default["default"](classPrefix$1d, props.color ? `${classPrefix$1d}-${props.color}` : null, {
|
|
9138
|
-
[`${classPrefix$1d}-block`]: props.block,
|
|
9139
|
-
[`${classPrefix$1d}-disabled`]: disabled,
|
|
9140
|
-
[`${classPrefix$1d}-fill-outline`]: props.fill === "outline",
|
|
9141
|
-
[`${classPrefix$1d}-fill-none`]: props.fill === "none",
|
|
9142
|
-
[`${classPrefix$1d}-mini`]: props.size === "mini",
|
|
9143
|
-
[`${classPrefix$1d}-small`]: props.size === "small",
|
|
9144
|
-
[`${classPrefix$1d}-large`]: props.size === "large",
|
|
9145
|
-
[`${classPrefix$1d}-loading`]: loading
|
|
9146
|
-
}, `${classPrefix$1d}-shape-${props.shape}`),
|
|
9147
|
-
disabled,
|
|
9148
|
-
onMouseDown: props.onMouseDown,
|
|
9149
|
-
onMouseUp: props.onMouseUp,
|
|
9150
|
-
onTouchStart: props.onTouchStart,
|
|
9151
|
-
onTouchEnd: props.onTouchEnd
|
|
9152
|
-
}, loading ? React__default["default"].createElement("div", {
|
|
9153
|
-
className: `${classPrefix$1d}-loading-wrapper`
|
|
9154
|
-
}, props.loadingIcon, props.loadingText) : props.children));
|
|
9155
|
-
});
|
|
9156
9036
|
var safeArea = "";
|
|
9157
|
-
const classPrefix$
|
|
9037
|
+
const classPrefix$1e = "adm-safe-area";
|
|
9158
9038
|
const SafeArea = (props) => {
|
|
9159
9039
|
return withNativeProps(props, React__default["default"].createElement("div", {
|
|
9160
|
-
className: classNames__default["default"](classPrefix$
|
|
9040
|
+
className: classNames__default["default"](classPrefix$1e, `${classPrefix$1e}-position-${props.position}`)
|
|
9161
9041
|
}));
|
|
9162
9042
|
};
|
|
9163
9043
|
const fullClone = Object.assign({}, ReactDOM);
|
|
@@ -9273,8 +9153,8 @@ function renderImperatively(element) {
|
|
|
9273
9153
|
close
|
|
9274
9154
|
};
|
|
9275
9155
|
}
|
|
9276
|
-
const classPrefix$
|
|
9277
|
-
const defaultProps$
|
|
9156
|
+
const classPrefix$1d = `adm-action-sheet`;
|
|
9157
|
+
const defaultProps$X = {
|
|
9278
9158
|
visible: false,
|
|
9279
9159
|
actions: [],
|
|
9280
9160
|
cancelText: "",
|
|
@@ -9283,7 +9163,7 @@ const defaultProps$V = {
|
|
|
9283
9163
|
safeArea: true
|
|
9284
9164
|
};
|
|
9285
9165
|
const ActionSheet = (p2) => {
|
|
9286
|
-
const props = mergeProps(defaultProps$
|
|
9166
|
+
const props = mergeProps(defaultProps$X, p2);
|
|
9287
9167
|
return React__default["default"].createElement(Popup, {
|
|
9288
9168
|
visible: props.visible,
|
|
9289
9169
|
onMaskClick: () => {
|
|
@@ -9294,23 +9174,23 @@ const ActionSheet = (p2) => {
|
|
|
9294
9174
|
}
|
|
9295
9175
|
},
|
|
9296
9176
|
afterClose: props.afterClose,
|
|
9297
|
-
className: classNames__default["default"](`${classPrefix$
|
|
9177
|
+
className: classNames__default["default"](`${classPrefix$1d}-popup`, props.popupClassName),
|
|
9298
9178
|
style: props.popupStyle,
|
|
9299
9179
|
getContainer: props.getContainer
|
|
9300
9180
|
}, withNativeProps(props, React__default["default"].createElement("div", {
|
|
9301
|
-
className: classPrefix$
|
|
9181
|
+
className: classPrefix$1d
|
|
9302
9182
|
}, props.extra && React__default["default"].createElement("div", {
|
|
9303
|
-
className: `${classPrefix$
|
|
9183
|
+
className: `${classPrefix$1d}-extra`
|
|
9304
9184
|
}, props.extra), React__default["default"].createElement("div", {
|
|
9305
|
-
className: `${classPrefix$
|
|
9185
|
+
className: `${classPrefix$1d}-button-list`
|
|
9306
9186
|
}, props.actions.map((action, index2) => React__default["default"].createElement("div", {
|
|
9307
9187
|
key: action.key,
|
|
9308
|
-
className: `${classPrefix$
|
|
9309
|
-
}, React__default["default"].createElement(
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9188
|
+
className: `${classPrefix$1d}-button-item-wrapper`
|
|
9189
|
+
}, React__default["default"].createElement("a", {
|
|
9190
|
+
className: classNames__default["default"]("adm-plain-anchor", `${classPrefix$1d}-button-item`, {
|
|
9191
|
+
[`${classPrefix$1d}-button-item-danger`]: action.danger,
|
|
9192
|
+
[`${classPrefix$1d}-button-item-disabled`]: action.disabled
|
|
9193
|
+
}),
|
|
9314
9194
|
onClick: () => {
|
|
9315
9195
|
var _a, _b, _c;
|
|
9316
9196
|
(_a = action.onClick) === null || _a === void 0 ? void 0 : _a.call(action);
|
|
@@ -9318,29 +9198,23 @@ const ActionSheet = (p2) => {
|
|
|
9318
9198
|
if (props.closeOnAction) {
|
|
9319
9199
|
(_c = props.onClose) === null || _c === void 0 ? void 0 : _c.call(props);
|
|
9320
9200
|
}
|
|
9321
|
-
}
|
|
9322
|
-
className: classNames__default["default"](`${classPrefix$1b}-button-item`, {
|
|
9323
|
-
[`${classPrefix$1b}-button-item-danger`]: action.danger
|
|
9324
|
-
})
|
|
9201
|
+
}
|
|
9325
9202
|
}, React__default["default"].createElement("div", {
|
|
9326
|
-
className: `${classPrefix$
|
|
9203
|
+
className: `${classPrefix$1d}-button-item-name`
|
|
9327
9204
|
}, action.text), action.description && React__default["default"].createElement("div", {
|
|
9328
|
-
className: `${classPrefix$
|
|
9205
|
+
className: `${classPrefix$1d}-button-item-description`
|
|
9329
9206
|
}, action.description))))), props.cancelText && React__default["default"].createElement("div", {
|
|
9330
|
-
className: `${classPrefix$
|
|
9207
|
+
className: `${classPrefix$1d}-cancel`
|
|
9331
9208
|
}, React__default["default"].createElement("div", {
|
|
9332
|
-
className: `${classPrefix$
|
|
9333
|
-
}, React__default["default"].createElement(
|
|
9334
|
-
|
|
9335
|
-
fill: "none",
|
|
9336
|
-
shape: "rectangular",
|
|
9337
|
-
className: `${classPrefix$1b}-button-item`,
|
|
9209
|
+
className: `${classPrefix$1d}-button-item-wrapper`
|
|
9210
|
+
}, React__default["default"].createElement("a", {
|
|
9211
|
+
className: classNames__default["default"]("adm-plain-anchor", `${classPrefix$1d}-button-item`),
|
|
9338
9212
|
onClick: () => {
|
|
9339
9213
|
var _a;
|
|
9340
9214
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
9341
9215
|
}
|
|
9342
9216
|
}, React__default["default"].createElement("div", {
|
|
9343
|
-
className: `${classPrefix$
|
|
9217
|
+
className: `${classPrefix$1d}-button-item-name`
|
|
9344
9218
|
}, props.cancelText)))), props.safeArea && React__default["default"].createElement(SafeArea, {
|
|
9345
9219
|
position: "bottom"
|
|
9346
9220
|
}))));
|
|
@@ -9352,12 +9226,12 @@ var index$h = attachPropertiesToComponent(ActionSheet, {
|
|
|
9352
9226
|
show: showActionSheet
|
|
9353
9227
|
});
|
|
9354
9228
|
var autoCenter = "";
|
|
9355
|
-
const classPrefix$
|
|
9229
|
+
const classPrefix$1c = "adm-auto-center";
|
|
9356
9230
|
const AutoCenter = (props) => {
|
|
9357
9231
|
return withNativeProps(props, React__default["default"].createElement("div", {
|
|
9358
|
-
className: classPrefix$
|
|
9232
|
+
className: classPrefix$1c
|
|
9359
9233
|
}, React__default["default"].createElement("div", {
|
|
9360
|
-
className: `${classPrefix$
|
|
9234
|
+
className: `${classPrefix$1c}-content`
|
|
9361
9235
|
}, props.children)));
|
|
9362
9236
|
};
|
|
9363
9237
|
var avatar = "";
|
|
@@ -9399,15 +9273,15 @@ const Fallback = React$1.memo(() => React__default["default"].createElement("svg
|
|
|
9399
9273
|
fillRule: "nonzero",
|
|
9400
9274
|
mask: "url(#mask-2)"
|
|
9401
9275
|
}))))));
|
|
9402
|
-
const classPrefix$
|
|
9403
|
-
const defaultProps$
|
|
9276
|
+
const classPrefix$1b = "adm-avatar";
|
|
9277
|
+
const defaultProps$W = {
|
|
9404
9278
|
fallback: React__default["default"].createElement(Fallback, null),
|
|
9405
9279
|
fit: "cover"
|
|
9406
9280
|
};
|
|
9407
9281
|
const Avatar = (p2) => {
|
|
9408
|
-
const props = mergeProps(defaultProps$
|
|
9282
|
+
const props = mergeProps(defaultProps$W, p2);
|
|
9409
9283
|
return withNativeProps(props, React__default["default"].createElement(Image$1, {
|
|
9410
|
-
className: classPrefix$
|
|
9284
|
+
className: classPrefix$1b,
|
|
9411
9285
|
src: props.src,
|
|
9412
9286
|
fallback: props.fallback,
|
|
9413
9287
|
placeholder: props.fallback,
|
|
@@ -9419,7 +9293,7 @@ const Avatar = (p2) => {
|
|
|
9419
9293
|
}));
|
|
9420
9294
|
};
|
|
9421
9295
|
var badge = "";
|
|
9422
|
-
const classPrefix$
|
|
9296
|
+
const classPrefix$1a = `adm-badge`;
|
|
9423
9297
|
const dot = React__default["default"].createElement(React__default["default"].Fragment, null);
|
|
9424
9298
|
const Badge$1 = (props) => {
|
|
9425
9299
|
const {
|
|
@@ -9428,22 +9302,142 @@ const Badge$1 = (props) => {
|
|
|
9428
9302
|
children
|
|
9429
9303
|
} = props;
|
|
9430
9304
|
const isDot = content === dot;
|
|
9431
|
-
const badgeCls = classNames__default["default"](classPrefix$
|
|
9305
|
+
const badgeCls = classNames__default["default"](classPrefix$1a, !!children && `${classPrefix$1a}-fixed`, isDot && `${classPrefix$1a}-dot`, props.bordered && `${classPrefix$1a}-bordered`);
|
|
9432
9306
|
const element = content || content === 0 ? withNativeProps(props, React__default["default"].createElement("div", {
|
|
9433
9307
|
className: badgeCls,
|
|
9434
9308
|
style: {
|
|
9435
9309
|
"--color": color
|
|
9436
9310
|
}
|
|
9437
9311
|
}, !isDot && React__default["default"].createElement("div", {
|
|
9438
|
-
className: `${classPrefix$
|
|
9312
|
+
className: `${classPrefix$1a}-content`
|
|
9439
9313
|
}, content))) : null;
|
|
9440
9314
|
return children ? React__default["default"].createElement("div", {
|
|
9441
|
-
className: `${classPrefix$
|
|
9315
|
+
className: `${classPrefix$1a}-wrap`
|
|
9442
9316
|
}, children, element) : element;
|
|
9443
9317
|
};
|
|
9444
9318
|
var Badge = attachPropertiesToComponent(Badge$1, {
|
|
9445
9319
|
dot
|
|
9446
9320
|
});
|
|
9321
|
+
var button = "";
|
|
9322
|
+
var dotLoading = "";
|
|
9323
|
+
const classPrefix$19 = `adm-dot-loading`;
|
|
9324
|
+
const colorRecord$3 = {
|
|
9325
|
+
default: "var(--adm-color-weak)",
|
|
9326
|
+
primary: "var(--adm-color-primary)",
|
|
9327
|
+
white: "var(--adm-color-white)"
|
|
9328
|
+
};
|
|
9329
|
+
const defaultProps$V = {
|
|
9330
|
+
color: "default"
|
|
9331
|
+
};
|
|
9332
|
+
const DotLoading = React$1.memo((p2) => {
|
|
9333
|
+
var _a;
|
|
9334
|
+
const props = mergeProps(defaultProps$V, p2);
|
|
9335
|
+
return withNativeProps(props, React__default["default"].createElement("div", {
|
|
9336
|
+
style: {
|
|
9337
|
+
color: (_a = colorRecord$3[props.color]) !== null && _a !== void 0 ? _a : props.color
|
|
9338
|
+
},
|
|
9339
|
+
className: classNames__default["default"]("adm-loading", classPrefix$19)
|
|
9340
|
+
}, React__default["default"].createElement("svg", {
|
|
9341
|
+
height: "1em",
|
|
9342
|
+
viewBox: "0 0 100 40",
|
|
9343
|
+
style: {
|
|
9344
|
+
verticalAlign: "-0.125em"
|
|
9345
|
+
}
|
|
9346
|
+
}, React__default["default"].createElement("g", {
|
|
9347
|
+
stroke: "none",
|
|
9348
|
+
strokeWidth: "1",
|
|
9349
|
+
fill: "none",
|
|
9350
|
+
fillRule: "evenodd"
|
|
9351
|
+
}, React__default["default"].createElement("g", {
|
|
9352
|
+
transform: "translate(-100.000000, -71.000000)"
|
|
9353
|
+
}, React__default["default"].createElement("g", {
|
|
9354
|
+
transform: "translate(95.000000, 71.000000)"
|
|
9355
|
+
}, React__default["default"].createElement("g", {
|
|
9356
|
+
transform: "translate(5.000000, 0.000000)"
|
|
9357
|
+
}, [0, 1, 2].map((i) => React__default["default"].createElement("rect", {
|
|
9358
|
+
key: i,
|
|
9359
|
+
fill: "currentColor",
|
|
9360
|
+
x: 20 + i * 26,
|
|
9361
|
+
y: "16",
|
|
9362
|
+
width: "8",
|
|
9363
|
+
height: "8",
|
|
9364
|
+
rx: "2"
|
|
9365
|
+
}, React__default["default"].createElement("animate", {
|
|
9366
|
+
attributeName: "y",
|
|
9367
|
+
from: "16",
|
|
9368
|
+
to: "16",
|
|
9369
|
+
dur: "2s",
|
|
9370
|
+
begin: `${i * 0.2}s`,
|
|
9371
|
+
repeatCount: "indefinite",
|
|
9372
|
+
values: "16; 6; 26; 16; 16",
|
|
9373
|
+
keyTimes: "0; 0.1; 0.3; 0.4; 1"
|
|
9374
|
+
}))))))))));
|
|
9375
|
+
});
|
|
9376
|
+
function isPromise(obj) {
|
|
9377
|
+
return !!obj && typeof obj === "object" && typeof obj.then === "function";
|
|
9378
|
+
}
|
|
9379
|
+
const classPrefix$18 = `adm-button`;
|
|
9380
|
+
const defaultProps$U = {
|
|
9381
|
+
color: "default",
|
|
9382
|
+
fill: "solid",
|
|
9383
|
+
block: false,
|
|
9384
|
+
loading: false,
|
|
9385
|
+
loadingIcon: React__default["default"].createElement(DotLoading, {
|
|
9386
|
+
color: "currentColor"
|
|
9387
|
+
}),
|
|
9388
|
+
type: "button",
|
|
9389
|
+
shape: "default",
|
|
9390
|
+
size: "middle"
|
|
9391
|
+
};
|
|
9392
|
+
const Button = React$1.forwardRef((p2, ref) => {
|
|
9393
|
+
const props = mergeProps(defaultProps$U, p2);
|
|
9394
|
+
const [innerLoading, setInnerLoading] = React$1.useState(false);
|
|
9395
|
+
const nativeButtonRef = React$1.useRef(null);
|
|
9396
|
+
const loading = props.loading === "auto" ? innerLoading : props.loading;
|
|
9397
|
+
const disabled = props.disabled || loading;
|
|
9398
|
+
React$1.useImperativeHandle(ref, () => ({
|
|
9399
|
+
get nativeElement() {
|
|
9400
|
+
return nativeButtonRef.current;
|
|
9401
|
+
}
|
|
9402
|
+
}));
|
|
9403
|
+
const handleClick = (e) => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
9404
|
+
if (!props.onClick)
|
|
9405
|
+
return;
|
|
9406
|
+
const promise = props.onClick(e);
|
|
9407
|
+
if (isPromise(promise)) {
|
|
9408
|
+
try {
|
|
9409
|
+
setInnerLoading(true);
|
|
9410
|
+
yield promise;
|
|
9411
|
+
setInnerLoading(false);
|
|
9412
|
+
} catch (e2) {
|
|
9413
|
+
setInnerLoading(false);
|
|
9414
|
+
throw e2;
|
|
9415
|
+
}
|
|
9416
|
+
}
|
|
9417
|
+
});
|
|
9418
|
+
return withNativeProps(props, React__default["default"].createElement("button", {
|
|
9419
|
+
ref: nativeButtonRef,
|
|
9420
|
+
type: props.type,
|
|
9421
|
+
onClick: handleClick,
|
|
9422
|
+
className: classNames__default["default"](classPrefix$18, props.color ? `${classPrefix$18}-${props.color}` : null, {
|
|
9423
|
+
[`${classPrefix$18}-block`]: props.block,
|
|
9424
|
+
[`${classPrefix$18}-disabled`]: disabled,
|
|
9425
|
+
[`${classPrefix$18}-fill-outline`]: props.fill === "outline",
|
|
9426
|
+
[`${classPrefix$18}-fill-none`]: props.fill === "none",
|
|
9427
|
+
[`${classPrefix$18}-mini`]: props.size === "mini",
|
|
9428
|
+
[`${classPrefix$18}-small`]: props.size === "small",
|
|
9429
|
+
[`${classPrefix$18}-large`]: props.size === "large",
|
|
9430
|
+
[`${classPrefix$18}-loading`]: loading
|
|
9431
|
+
}, `${classPrefix$18}-shape-${props.shape}`),
|
|
9432
|
+
disabled,
|
|
9433
|
+
onMouseDown: props.onMouseDown,
|
|
9434
|
+
onMouseUp: props.onMouseUp,
|
|
9435
|
+
onTouchStart: props.onTouchStart,
|
|
9436
|
+
onTouchEnd: props.onTouchEnd
|
|
9437
|
+
}, loading ? React__default["default"].createElement("div", {
|
|
9438
|
+
className: `${classPrefix$18}-loading-wrapper`
|
|
9439
|
+
}, props.loadingIcon, props.loadingText) : props.children));
|
|
9440
|
+
});
|
|
9447
9441
|
var calendar = "";
|
|
9448
9442
|
const ArrowLeft = () => {
|
|
9449
9443
|
return React__default["default"].createElement("svg", {
|
|
@@ -9665,7 +9659,7 @@ const Calendar = React$1.forwardRef((p2, ref) => {
|
|
|
9665
9659
|
isSelect = isBegin || isEnd || d.isAfter(begin, "day") && d.isBefore(end, "day");
|
|
9666
9660
|
}
|
|
9667
9661
|
const inThisMonth = d.month() === current.month();
|
|
9668
|
-
const disabled = maxDay && d.isAfter(maxDay, "day") || minDay && d.isBefore(minDay, "day");
|
|
9662
|
+
const disabled = props.shouldDisableDate ? props.shouldDisableDate(d.toDate()) : maxDay && d.isAfter(maxDay, "day") || minDay && d.isBefore(minDay, "day");
|
|
9669
9663
|
cells.push(React__default["default"].createElement("div", {
|
|
9670
9664
|
key: d.valueOf(),
|
|
9671
9665
|
className: classNames__default["default"](`${classPrefix$17}-cell`, (disabled || !inThisMonth) && `${classPrefix$17}-cell-disabled`, inThisMonth && {
|
|
@@ -12292,7 +12286,8 @@ const defaultProps$H = {
|
|
|
12292
12286
|
fallback: React__default["default"].createElement("div", {
|
|
12293
12287
|
className: `${classPrefix$S}-tip`
|
|
12294
12288
|
}, React__default["default"].createElement(BrokenImageIcon, null)),
|
|
12295
|
-
lazy: false
|
|
12289
|
+
lazy: false,
|
|
12290
|
+
draggable: false
|
|
12296
12291
|
};
|
|
12297
12292
|
const Image$1 = stagedComponents.staged((p2) => {
|
|
12298
12293
|
const props = mergeProps(defaultProps$H, p2);
|
|
@@ -12337,7 +12332,8 @@ const Image$1 = stagedComponents.staged((p2) => {
|
|
|
12337
12332
|
referrerPolicy: props.referrerPolicy,
|
|
12338
12333
|
sizes: props.sizes,
|
|
12339
12334
|
srcSet,
|
|
12340
|
-
useMap: props.useMap
|
|
12335
|
+
useMap: props.useMap,
|
|
12336
|
+
draggable: props.draggable
|
|
12341
12337
|
});
|
|
12342
12338
|
return React__default["default"].createElement(React__default["default"].Fragment, null, !loaded && props.placeholder, img);
|
|
12343
12339
|
}
|
|
@@ -14086,7 +14082,9 @@ const Popover$1 = React$1.forwardRef((p2, ref) => {
|
|
|
14086
14082
|
const floatingElement = floatingRef.current;
|
|
14087
14083
|
if (!targetElement || !floatingElement)
|
|
14088
14084
|
return;
|
|
14089
|
-
return dom.autoUpdate(targetElement, floatingElement, update
|
|
14085
|
+
return dom.autoUpdate(targetElement, floatingElement, update, {
|
|
14086
|
+
elementResize: typeof ResizeObserver !== "undefined"
|
|
14087
|
+
});
|
|
14090
14088
|
}, [targetElement]);
|
|
14091
14089
|
ahooks.useClickAway(() => {
|
|
14092
14090
|
if (!props.trigger)
|
|
@@ -14346,9 +14344,7 @@ const FormItem = (props) => {
|
|
|
14346
14344
|
return renderLayout(children);
|
|
14347
14345
|
}
|
|
14348
14346
|
let Variables = {};
|
|
14349
|
-
|
|
14350
|
-
Variables.label = label;
|
|
14351
|
-
}
|
|
14347
|
+
Variables.label = typeof label === "string" ? label : "";
|
|
14352
14348
|
if (messageVariables) {
|
|
14353
14349
|
Variables = Object.assign(Object.assign({}, Variables), messageVariables);
|
|
14354
14350
|
}
|
|
@@ -18017,7 +18013,8 @@ const TextArea = React$1.forwardRef((p2, ref) => {
|
|
|
18017
18013
|
var _a;
|
|
18018
18014
|
compositingRef.current = false;
|
|
18019
18015
|
if (maxLength) {
|
|
18020
|
-
|
|
18016
|
+
const v = e.target.value;
|
|
18017
|
+
setValue([...v].slice(0, maxLength).join(""));
|
|
18021
18018
|
}
|
|
18022
18019
|
(_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
18023
18020
|
},
|