antd-mobile 5.12.3 → 5.12.6
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/badge/badge.d.ts +1 -1
- package/2x/cjs/components/badge/badge.js +3 -1
- package/2x/cjs/components/badge/index.d.ts +2 -4
- package/2x/cjs/components/badge/index.js +2 -4
- package/2x/cjs/components/button/button.d.ts +6 -4
- package/2x/cjs/components/button/button.js +5 -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/broken-image-icon.d.ts +1 -0
- package/2x/cjs/components/image/broken-image-icon.js +21 -0
- package/2x/cjs/components/image/image-icon.d.ts +1 -0
- package/2x/cjs/components/image/image-icon.js +21 -0
- package/2x/cjs/components/image/image.css +4 -2
- package/2x/cjs/components/image/image.d.ts +1 -0
- package/2x/cjs/components/image/image.js +10 -6
- package/2x/cjs/components/infinite-scroll/infinite-scroll.js +8 -6
- package/2x/cjs/components/popover/popover.css +1 -0
- package/2x/cjs/components/search-bar/search-bar.d.ts +1 -1
- package/2x/cjs/components/search-bar/search-bar.js +3 -0
- package/2x/cjs/components/side-bar/side-bar.d.ts +2 -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/cjs/components/toast/toast.css +1 -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/badge/badge.d.ts +1 -1
- package/2x/es/components/badge/badge.js +1 -1
- package/2x/es/components/badge/index.d.ts +2 -4
- package/2x/es/components/badge/index.js +2 -3
- package/2x/es/components/button/button.d.ts +6 -4
- package/2x/es/components/button/button.js +5 -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/broken-image-icon.d.ts +1 -0
- package/2x/es/components/image/broken-image-icon.js +9 -0
- package/2x/es/components/image/image-icon.d.ts +1 -0
- package/2x/es/components/image/image-icon.js +9 -0
- package/2x/es/components/image/image.css +4 -2
- package/2x/es/components/image/image.d.ts +1 -0
- package/2x/es/components/image/image.js +8 -5
- package/2x/es/components/infinite-scroll/infinite-scroll.js +8 -6
- package/2x/es/components/popover/popover.css +1 -0
- package/2x/es/components/search-bar/search-bar.d.ts +1 -1
- package/2x/es/components/search-bar/search-bar.js +3 -0
- package/2x/es/components/side-bar/side-bar.d.ts +2 -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/es/components/toast/toast.css +1 -1
- package/2x/package.json +4 -4
- package/bundle/antd-mobile.cjs.js +195 -177
- package/bundle/antd-mobile.es.js +197 -179
- package/bundle/style.css +99 -81
- package/cjs/components/action-sheet/action-sheet.css +19 -7
- package/cjs/components/action-sheet/action-sheet.js +8 -16
- package/cjs/components/badge/badge.d.ts +1 -1
- package/cjs/components/badge/badge.js +3 -1
- package/cjs/components/badge/index.d.ts +2 -4
- package/cjs/components/badge/index.js +2 -4
- package/cjs/components/button/button.d.ts +6 -4
- package/cjs/components/button/button.js +5 -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/broken-image-icon.d.ts +1 -0
- package/cjs/components/image/broken-image-icon.js +21 -0
- package/cjs/components/image/image-icon.d.ts +1 -0
- package/cjs/components/image/image-icon.js +21 -0
- package/cjs/components/image/image.css +4 -2
- package/cjs/components/image/image.d.ts +1 -0
- package/cjs/components/image/image.js +10 -6
- package/cjs/components/infinite-scroll/infinite-scroll.js +8 -6
- package/cjs/components/popover/popover.css +1 -0
- package/cjs/components/search-bar/search-bar.d.ts +1 -1
- package/cjs/components/search-bar/search-bar.js +3 -0
- package/cjs/components/side-bar/side-bar.d.ts +2 -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/cjs/components/toast/toast.css +1 -1
- package/es/components/action-sheet/action-sheet.css +19 -7
- package/es/components/action-sheet/action-sheet.js +8 -15
- package/es/components/badge/badge.d.ts +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/index.d.ts +2 -4
- package/es/components/badge/index.js +2 -3
- package/es/components/button/button.d.ts +6 -4
- package/es/components/button/button.js +5 -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/broken-image-icon.d.ts +1 -0
- package/es/components/image/broken-image-icon.js +9 -0
- package/es/components/image/image-icon.d.ts +1 -0
- package/es/components/image/image-icon.js +9 -0
- package/es/components/image/image.css +4 -2
- package/es/components/image/image.d.ts +1 -0
- package/es/components/image/image.js +8 -5
- package/es/components/infinite-scroll/infinite-scroll.js +8 -6
- package/es/components/popover/popover.css +1 -0
- package/es/components/search-bar/search-bar.d.ts +1 -1
- package/es/components/search-bar/search-bar.js +3 -0
- package/es/components/side-bar/side-bar.d.ts +2 -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/es/components/toast/toast.css +1 -1
- package/package.json +4 -4
- package/umd/antd-mobile.js +1 -1
|
@@ -1489,11 +1489,11 @@ function useConfig() {
|
|
|
1489
1489
|
return (_a = React$1.useContext(ConfigContext)) !== null && _a !== void 0 ? _a : getDefaultConfig();
|
|
1490
1490
|
}
|
|
1491
1491
|
var actionSheet = "";
|
|
1492
|
-
function attachPropertiesToComponent(component,
|
|
1492
|
+
function attachPropertiesToComponent(component, properties) {
|
|
1493
1493
|
const ret = component;
|
|
1494
|
-
for (const key in
|
|
1495
|
-
if (
|
|
1496
|
-
ret[key] =
|
|
1494
|
+
for (const key in properties) {
|
|
1495
|
+
if (properties.hasOwnProperty(key)) {
|
|
1496
|
+
ret[key] = properties[key];
|
|
1497
1497
|
}
|
|
1498
1498
|
}
|
|
1499
1499
|
return ret;
|
|
@@ -9033,127 +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
|
-
}, loading ? React__default["default"].createElement("div", {
|
|
9149
|
-
className: `${classPrefix$1d}-loading-wrapper`
|
|
9150
|
-
}, props.loadingIcon, props.loadingText) : props.children));
|
|
9151
|
-
});
|
|
9152
9036
|
var safeArea = "";
|
|
9153
|
-
const classPrefix$
|
|
9037
|
+
const classPrefix$1e = "adm-safe-area";
|
|
9154
9038
|
const SafeArea = (props) => {
|
|
9155
9039
|
return withNativeProps(props, React__default["default"].createElement("div", {
|
|
9156
|
-
className: classNames__default["default"](classPrefix$
|
|
9040
|
+
className: classNames__default["default"](classPrefix$1e, `${classPrefix$1e}-position-${props.position}`)
|
|
9157
9041
|
}));
|
|
9158
9042
|
};
|
|
9159
9043
|
const fullClone = Object.assign({}, ReactDOM);
|
|
@@ -9269,8 +9153,8 @@ function renderImperatively(element) {
|
|
|
9269
9153
|
close
|
|
9270
9154
|
};
|
|
9271
9155
|
}
|
|
9272
|
-
const classPrefix$
|
|
9273
|
-
const defaultProps$
|
|
9156
|
+
const classPrefix$1d = `adm-action-sheet`;
|
|
9157
|
+
const defaultProps$X = {
|
|
9274
9158
|
visible: false,
|
|
9275
9159
|
actions: [],
|
|
9276
9160
|
cancelText: "",
|
|
@@ -9279,7 +9163,7 @@ const defaultProps$V = {
|
|
|
9279
9163
|
safeArea: true
|
|
9280
9164
|
};
|
|
9281
9165
|
const ActionSheet = (p2) => {
|
|
9282
|
-
const props = mergeProps(defaultProps$
|
|
9166
|
+
const props = mergeProps(defaultProps$X, p2);
|
|
9283
9167
|
return React__default["default"].createElement(Popup, {
|
|
9284
9168
|
visible: props.visible,
|
|
9285
9169
|
onMaskClick: () => {
|
|
@@ -9290,23 +9174,23 @@ const ActionSheet = (p2) => {
|
|
|
9290
9174
|
}
|
|
9291
9175
|
},
|
|
9292
9176
|
afterClose: props.afterClose,
|
|
9293
|
-
className: classNames__default["default"](`${classPrefix$
|
|
9177
|
+
className: classNames__default["default"](`${classPrefix$1d}-popup`, props.popupClassName),
|
|
9294
9178
|
style: props.popupStyle,
|
|
9295
9179
|
getContainer: props.getContainer
|
|
9296
9180
|
}, withNativeProps(props, React__default["default"].createElement("div", {
|
|
9297
|
-
className: classPrefix$
|
|
9181
|
+
className: classPrefix$1d
|
|
9298
9182
|
}, props.extra && React__default["default"].createElement("div", {
|
|
9299
|
-
className: `${classPrefix$
|
|
9183
|
+
className: `${classPrefix$1d}-extra`
|
|
9300
9184
|
}, props.extra), React__default["default"].createElement("div", {
|
|
9301
|
-
className: `${classPrefix$
|
|
9185
|
+
className: `${classPrefix$1d}-button-list`
|
|
9302
9186
|
}, props.actions.map((action, index2) => React__default["default"].createElement("div", {
|
|
9303
9187
|
key: action.key,
|
|
9304
|
-
className: `${classPrefix$
|
|
9305
|
-
}, React__default["default"].createElement(
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
|
|
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
|
+
}),
|
|
9310
9194
|
onClick: () => {
|
|
9311
9195
|
var _a, _b, _c;
|
|
9312
9196
|
(_a = action.onClick) === null || _a === void 0 ? void 0 : _a.call(action);
|
|
@@ -9314,29 +9198,23 @@ const ActionSheet = (p2) => {
|
|
|
9314
9198
|
if (props.closeOnAction) {
|
|
9315
9199
|
(_c = props.onClose) === null || _c === void 0 ? void 0 : _c.call(props);
|
|
9316
9200
|
}
|
|
9317
|
-
}
|
|
9318
|
-
className: classNames__default["default"](`${classPrefix$1b}-button-item`, {
|
|
9319
|
-
[`${classPrefix$1b}-button-item-danger`]: action.danger
|
|
9320
|
-
})
|
|
9201
|
+
}
|
|
9321
9202
|
}, React__default["default"].createElement("div", {
|
|
9322
|
-
className: `${classPrefix$
|
|
9203
|
+
className: `${classPrefix$1d}-button-item-name`
|
|
9323
9204
|
}, action.text), action.description && React__default["default"].createElement("div", {
|
|
9324
|
-
className: `${classPrefix$
|
|
9205
|
+
className: `${classPrefix$1d}-button-item-description`
|
|
9325
9206
|
}, action.description))))), props.cancelText && React__default["default"].createElement("div", {
|
|
9326
|
-
className: `${classPrefix$
|
|
9207
|
+
className: `${classPrefix$1d}-cancel`
|
|
9327
9208
|
}, React__default["default"].createElement("div", {
|
|
9328
|
-
className: `${classPrefix$
|
|
9329
|
-
}, React__default["default"].createElement(
|
|
9330
|
-
|
|
9331
|
-
fill: "none",
|
|
9332
|
-
shape: "rectangular",
|
|
9333
|
-
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`),
|
|
9334
9212
|
onClick: () => {
|
|
9335
9213
|
var _a;
|
|
9336
9214
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
9337
9215
|
}
|
|
9338
9216
|
}, React__default["default"].createElement("div", {
|
|
9339
|
-
className: `${classPrefix$
|
|
9217
|
+
className: `${classPrefix$1d}-button-item-name`
|
|
9340
9218
|
}, props.cancelText)))), props.safeArea && React__default["default"].createElement(SafeArea, {
|
|
9341
9219
|
position: "bottom"
|
|
9342
9220
|
}))));
|
|
@@ -9348,12 +9226,12 @@ var index$h = attachPropertiesToComponent(ActionSheet, {
|
|
|
9348
9226
|
show: showActionSheet
|
|
9349
9227
|
});
|
|
9350
9228
|
var autoCenter = "";
|
|
9351
|
-
const classPrefix$
|
|
9229
|
+
const classPrefix$1c = "adm-auto-center";
|
|
9352
9230
|
const AutoCenter = (props) => {
|
|
9353
9231
|
return withNativeProps(props, React__default["default"].createElement("div", {
|
|
9354
|
-
className: classPrefix$
|
|
9232
|
+
className: classPrefix$1c
|
|
9355
9233
|
}, React__default["default"].createElement("div", {
|
|
9356
|
-
className: `${classPrefix$
|
|
9234
|
+
className: `${classPrefix$1c}-content`
|
|
9357
9235
|
}, props.children)));
|
|
9358
9236
|
};
|
|
9359
9237
|
var avatar = "";
|
|
@@ -9395,15 +9273,15 @@ const Fallback = React$1.memo(() => React__default["default"].createElement("svg
|
|
|
9395
9273
|
fillRule: "nonzero",
|
|
9396
9274
|
mask: "url(#mask-2)"
|
|
9397
9275
|
}))))));
|
|
9398
|
-
const classPrefix$
|
|
9399
|
-
const defaultProps$
|
|
9276
|
+
const classPrefix$1b = "adm-avatar";
|
|
9277
|
+
const defaultProps$W = {
|
|
9400
9278
|
fallback: React__default["default"].createElement(Fallback, null),
|
|
9401
9279
|
fit: "cover"
|
|
9402
9280
|
};
|
|
9403
9281
|
const Avatar = (p2) => {
|
|
9404
|
-
const props = mergeProps(defaultProps$
|
|
9282
|
+
const props = mergeProps(defaultProps$W, p2);
|
|
9405
9283
|
return withNativeProps(props, React__default["default"].createElement(Image$1, {
|
|
9406
|
-
className: classPrefix$
|
|
9284
|
+
className: classPrefix$1b,
|
|
9407
9285
|
src: props.src,
|
|
9408
9286
|
fallback: props.fallback,
|
|
9409
9287
|
placeholder: props.fallback,
|
|
@@ -9415,8 +9293,8 @@ const Avatar = (p2) => {
|
|
|
9415
9293
|
}));
|
|
9416
9294
|
};
|
|
9417
9295
|
var badge = "";
|
|
9418
|
-
const classPrefix$
|
|
9419
|
-
const dot =
|
|
9296
|
+
const classPrefix$1a = `adm-badge`;
|
|
9297
|
+
const dot = React__default["default"].createElement(React__default["default"].Fragment, null);
|
|
9420
9298
|
const Badge$1 = (props) => {
|
|
9421
9299
|
const {
|
|
9422
9300
|
content,
|
|
@@ -9424,23 +9302,142 @@ const Badge$1 = (props) => {
|
|
|
9424
9302
|
children
|
|
9425
9303
|
} = props;
|
|
9426
9304
|
const isDot = content === dot;
|
|
9427
|
-
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`);
|
|
9428
9306
|
const element = content || content === 0 ? withNativeProps(props, React__default["default"].createElement("div", {
|
|
9429
9307
|
className: badgeCls,
|
|
9430
9308
|
style: {
|
|
9431
9309
|
"--color": color
|
|
9432
9310
|
}
|
|
9433
9311
|
}, !isDot && React__default["default"].createElement("div", {
|
|
9434
|
-
className: `${classPrefix$
|
|
9312
|
+
className: `${classPrefix$1a}-content`
|
|
9435
9313
|
}, content))) : null;
|
|
9436
9314
|
return children ? React__default["default"].createElement("div", {
|
|
9437
|
-
className: `${classPrefix$
|
|
9315
|
+
className: `${classPrefix$1a}-wrap`
|
|
9438
9316
|
}, children, element) : element;
|
|
9439
9317
|
};
|
|
9440
|
-
|
|
9318
|
+
var Badge = attachPropertiesToComponent(Badge$1, {
|
|
9441
9319
|
dot
|
|
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"
|
|
9442
9331
|
};
|
|
9443
|
-
|
|
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
|
+
});
|
|
9444
9441
|
var calendar = "";
|
|
9445
9442
|
const ArrowLeft = () => {
|
|
9446
9443
|
return React__default["default"].createElement("svg", {
|
|
@@ -9662,7 +9659,7 @@ const Calendar = React$1.forwardRef((p2, ref) => {
|
|
|
9662
9659
|
isSelect = isBegin || isEnd || d.isAfter(begin, "day") && d.isBefore(end, "day");
|
|
9663
9660
|
}
|
|
9664
9661
|
const inThisMonth = d.month() === current.month();
|
|
9665
|
-
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");
|
|
9666
9663
|
cells.push(React__default["default"].createElement("div", {
|
|
9667
9664
|
key: d.valueOf(),
|
|
9668
9665
|
className: classNames__default["default"](`${classPrefix$17}-cell`, (disabled || !inThisMonth) && `${classPrefix$17}-cell-disabled`, inThisMonth && {
|
|
@@ -12264,16 +12261,33 @@ const LazyDetector = (props) => {
|
|
|
12264
12261
|
ref
|
|
12265
12262
|
});
|
|
12266
12263
|
};
|
|
12264
|
+
const ImageIcon = () => React__default["default"].createElement("svg", {
|
|
12265
|
+
viewBox: "0 0 48 48",
|
|
12266
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
12267
|
+
}, React__default["default"].createElement("path", {
|
|
12268
|
+
d: "M41.396 6.234c1.923 0 3.487 1.574 3.487 3.505v29.14c0 1.937-1.568 3.51-3.491 3.51H6.604c-1.923 0-3.487-1.573-3.487-3.51V9.745c0-1.936 1.564-3.51 3.487-3.51Zm0 2.847H6.604c-.355 0-.654.3-.654.658V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.405 2.405 0 0 1 1.933.752l4.182 4.525 7.58-11.005a2.374 2.374 0 0 1 1.96-1.01c.79 0 1.532.38 1.966 1.01L42.05 34.89V9.74a.664.664 0 0 0-.654-.658Zm-28.305 2.763a3.119 3.119 0 0 1 3.117 3.117 3.119 3.119 0 0 1-3.117 3.117 3.122 3.122 0 0 1-3.117-3.117 3.119 3.119 0 0 1 3.117-3.117Z",
|
|
12269
|
+
fill: "#DBDBDB",
|
|
12270
|
+
fillRule: "nonzero"
|
|
12271
|
+
}));
|
|
12272
|
+
const BrokenImageIcon = () => React__default["default"].createElement("svg", {
|
|
12273
|
+
viewBox: "0 0 48 48",
|
|
12274
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
12275
|
+
}, React__default["default"].createElement("path", {
|
|
12276
|
+
d: "M19.233 6.233 17.42 9.08l-10.817.001a.665.665 0 0 0-.647.562l-.007.096V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.415 2.415 0 0 1 1.807.625l.126.127 4.182 4.525 2.267-3.292 5.461 7.841-4.065 7.375H6.604c-1.86 0-3.382-1.47-3.482-3.317l-.005-.192V9.744c0-1.872 1.461-3.405 3.296-3.505l.19-.005h12.63Zm22.163 0c1.86 0 3.382 1.472 3.482 3.314l.005.192v29.14a3.507 3.507 0 0 1-3.3 3.505l-.191.006H27.789l3.63-6.587.06-.119a1.87 1.87 0 0 0-.163-1.853l-6.928-9.949 3.047-4.422a2.374 2.374 0 0 1 1.96-1.01 2.4 2.4 0 0 1 1.86.87l.106.14L42.05 34.89V9.74a.664.664 0 0 0-.654-.658H21.855l1.812-2.848h17.73Zm-28.305 5.611c.794 0 1.52.298 2.07.788l-.843 1.325-.067.114a1.87 1.87 0 0 0 .11 1.959l.848 1.217c-.556.515-1.3.83-2.118.83a3.122 3.122 0 0 1-3.117-3.116 3.119 3.119 0 0 1 3.117-3.117Z",
|
|
12277
|
+
fill: "#DBDBDB",
|
|
12278
|
+
fillRule: "nonzero"
|
|
12279
|
+
}));
|
|
12267
12280
|
const classPrefix$S = `adm-image`;
|
|
12268
12281
|
const defaultProps$H = {
|
|
12269
12282
|
fit: "fill",
|
|
12270
12283
|
placeholder: React__default["default"].createElement("div", {
|
|
12271
12284
|
className: `${classPrefix$S}-tip`
|
|
12272
|
-
}, React__default["default"].createElement(
|
|
12285
|
+
}, React__default["default"].createElement(ImageIcon, null)),
|
|
12273
12286
|
fallback: React__default["default"].createElement("div", {
|
|
12274
12287
|
className: `${classPrefix$S}-tip`
|
|
12275
|
-
}, React__default["default"].createElement(
|
|
12276
|
-
lazy: false
|
|
12288
|
+
}, React__default["default"].createElement(BrokenImageIcon, null)),
|
|
12289
|
+
lazy: false,
|
|
12290
|
+
draggable: false
|
|
12277
12291
|
};
|
|
12278
12292
|
const Image$1 = stagedComponents.staged((p2) => {
|
|
12279
12293
|
const props = mergeProps(defaultProps$H, p2);
|
|
@@ -12318,7 +12332,8 @@ const Image$1 = stagedComponents.staged((p2) => {
|
|
|
12318
12332
|
referrerPolicy: props.referrerPolicy,
|
|
12319
12333
|
sizes: props.sizes,
|
|
12320
12334
|
srcSet,
|
|
12321
|
-
useMap: props.useMap
|
|
12335
|
+
useMap: props.useMap,
|
|
12336
|
+
draggable: props.draggable
|
|
12322
12337
|
});
|
|
12323
12338
|
return React__default["default"].createElement(React__default["default"].Fragment, null, !loaded && props.placeholder, img);
|
|
12324
12339
|
}
|
|
@@ -14327,9 +14342,7 @@ const FormItem = (props) => {
|
|
|
14327
14342
|
return renderLayout(children);
|
|
14328
14343
|
}
|
|
14329
14344
|
let Variables = {};
|
|
14330
|
-
|
|
14331
|
-
Variables.label = label;
|
|
14332
|
-
}
|
|
14345
|
+
Variables.label = typeof label === "string" ? label : "";
|
|
14333
14346
|
if (messageVariables) {
|
|
14334
14347
|
Variables = Object.assign(Object.assign({}, Variables), messageVariables);
|
|
14335
14348
|
}
|
|
@@ -15274,6 +15287,7 @@ const InfiniteScroll = (p2) => {
|
|
|
15274
15287
|
const elementRef = React$1.useRef(null);
|
|
15275
15288
|
const [flag, setFlag] = React$1.useState({});
|
|
15276
15289
|
const nextFlagRef = React$1.useRef(flag);
|
|
15290
|
+
const [scrollParent, setScrollParent] = React$1.useState();
|
|
15277
15291
|
const check = ahooks.useMemoizedFn(() => tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
15278
15292
|
if (nextFlagRef.current !== flag)
|
|
15279
15293
|
return;
|
|
@@ -15285,6 +15299,7 @@ const InfiniteScroll = (p2) => {
|
|
|
15285
15299
|
if (!element.offsetParent)
|
|
15286
15300
|
return;
|
|
15287
15301
|
const parent = getScrollParent(element);
|
|
15302
|
+
setScrollParent(parent);
|
|
15288
15303
|
if (!parent)
|
|
15289
15304
|
return;
|
|
15290
15305
|
const rect = element.getBoundingClientRect();
|
|
@@ -15304,17 +15319,16 @@ const InfiniteScroll = (p2) => {
|
|
|
15304
15319
|
const element = elementRef.current;
|
|
15305
15320
|
if (!element)
|
|
15306
15321
|
return;
|
|
15307
|
-
|
|
15308
|
-
if (!parent)
|
|
15322
|
+
if (!scrollParent)
|
|
15309
15323
|
return;
|
|
15310
15324
|
function onScroll() {
|
|
15311
15325
|
check();
|
|
15312
15326
|
}
|
|
15313
|
-
|
|
15327
|
+
scrollParent.addEventListener("scroll", onScroll);
|
|
15314
15328
|
return () => {
|
|
15315
|
-
|
|
15329
|
+
scrollParent.removeEventListener("scroll", onScroll);
|
|
15316
15330
|
};
|
|
15317
|
-
}, []);
|
|
15331
|
+
}, [scrollParent]);
|
|
15318
15332
|
return withNativeProps(props, React__default["default"].createElement("div", {
|
|
15319
15333
|
className: classPrefix$w,
|
|
15320
15334
|
ref: elementRef
|
|
@@ -16578,6 +16592,9 @@ const SearchBar = React$1.forwardRef((p2, ref) => {
|
|
|
16578
16592
|
}
|
|
16579
16593
|
(_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.blur();
|
|
16580
16594
|
(_c = props.onCancel) === null || _c === void 0 ? void 0 : _c.call(props);
|
|
16595
|
+
},
|
|
16596
|
+
onMouseDown: (e) => {
|
|
16597
|
+
e.preventDefault();
|
|
16581
16598
|
}
|
|
16582
16599
|
}, props.cancelText));
|
|
16583
16600
|
};
|
|
@@ -17994,7 +18011,8 @@ const TextArea = React$1.forwardRef((p2, ref) => {
|
|
|
17994
18011
|
var _a;
|
|
17995
18012
|
compositingRef.current = false;
|
|
17996
18013
|
if (maxLength) {
|
|
17997
|
-
|
|
18014
|
+
const v = e.target.value;
|
|
18015
|
+
setValue([...v].slice(0, maxLength).join(""));
|
|
17998
18016
|
}
|
|
17999
18017
|
(_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
18000
18018
|
},
|