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
package/bundle/antd-mobile.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __rest, __awaiter } from "tslib";
|
|
2
|
-
import React$1, { useContext, useRef, useEffect, useMemo, useState, memo, forwardRef,
|
|
2
|
+
import React$1, { useContext, useRef, useEffect, useMemo, useState, useImperativeHandle, memo, forwardRef, useCallback, createContext, cloneElement, createRef } from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { useUnmountedRef, useUpdate, useMemoizedFn, useUpdateEffect, useIsomorphicLayoutEffect, createUpdateEffect, useThrottleFn, useDebounceEffect, useMount, useInViewport, useClickAway, useUnmount, useLockFn, useTimeout } from "ahooks";
|
|
5
5
|
import { useSpring, animated, to } from "@react-spring/web";
|
|
@@ -9023,131 +9023,11 @@ const Popup = (p2) => {
|
|
|
9023
9023
|
}, shouldRender && props.children))));
|
|
9024
9024
|
return renderToContainer(props.getContainer, node);
|
|
9025
9025
|
};
|
|
9026
|
-
var button = "";
|
|
9027
|
-
var dotLoading = "";
|
|
9028
|
-
const classPrefix$1e = `adm-dot-loading`;
|
|
9029
|
-
const colorRecord$3 = {
|
|
9030
|
-
default: "var(--adm-color-weak)",
|
|
9031
|
-
primary: "var(--adm-color-primary)",
|
|
9032
|
-
white: "var(--adm-color-white)"
|
|
9033
|
-
};
|
|
9034
|
-
const defaultProps$X = {
|
|
9035
|
-
color: "default"
|
|
9036
|
-
};
|
|
9037
|
-
const DotLoading = memo((p2) => {
|
|
9038
|
-
var _a;
|
|
9039
|
-
const props = mergeProps(defaultProps$X, p2);
|
|
9040
|
-
return withNativeProps(props, React$1.createElement("div", {
|
|
9041
|
-
style: {
|
|
9042
|
-
color: (_a = colorRecord$3[props.color]) !== null && _a !== void 0 ? _a : props.color
|
|
9043
|
-
},
|
|
9044
|
-
className: classNames("adm-loading", classPrefix$1e)
|
|
9045
|
-
}, React$1.createElement("svg", {
|
|
9046
|
-
height: "1em",
|
|
9047
|
-
viewBox: "0 0 100 40",
|
|
9048
|
-
style: {
|
|
9049
|
-
verticalAlign: "-0.125em"
|
|
9050
|
-
}
|
|
9051
|
-
}, React$1.createElement("g", {
|
|
9052
|
-
stroke: "none",
|
|
9053
|
-
strokeWidth: "1",
|
|
9054
|
-
fill: "none",
|
|
9055
|
-
fillRule: "evenodd"
|
|
9056
|
-
}, React$1.createElement("g", {
|
|
9057
|
-
transform: "translate(-100.000000, -71.000000)"
|
|
9058
|
-
}, React$1.createElement("g", {
|
|
9059
|
-
transform: "translate(95.000000, 71.000000)"
|
|
9060
|
-
}, React$1.createElement("g", {
|
|
9061
|
-
transform: "translate(5.000000, 0.000000)"
|
|
9062
|
-
}, [0, 1, 2].map((i) => React$1.createElement("rect", {
|
|
9063
|
-
key: i,
|
|
9064
|
-
fill: "currentColor",
|
|
9065
|
-
x: 20 + i * 26,
|
|
9066
|
-
y: "16",
|
|
9067
|
-
width: "8",
|
|
9068
|
-
height: "8",
|
|
9069
|
-
rx: "2"
|
|
9070
|
-
}, React$1.createElement("animate", {
|
|
9071
|
-
attributeName: "y",
|
|
9072
|
-
from: "16",
|
|
9073
|
-
to: "16",
|
|
9074
|
-
dur: "2s",
|
|
9075
|
-
begin: `${i * 0.2}s`,
|
|
9076
|
-
repeatCount: "indefinite",
|
|
9077
|
-
values: "16; 6; 26; 16; 16",
|
|
9078
|
-
keyTimes: "0; 0.1; 0.3; 0.4; 1"
|
|
9079
|
-
}))))))))));
|
|
9080
|
-
});
|
|
9081
|
-
function isPromise(obj) {
|
|
9082
|
-
return !!obj && typeof obj === "object" && typeof obj.then === "function";
|
|
9083
|
-
}
|
|
9084
|
-
const classPrefix$1d = `adm-button`;
|
|
9085
|
-
const defaultProps$W = {
|
|
9086
|
-
color: "default",
|
|
9087
|
-
fill: "solid",
|
|
9088
|
-
block: false,
|
|
9089
|
-
loading: false,
|
|
9090
|
-
loadingIcon: React$1.createElement(DotLoading, {
|
|
9091
|
-
color: "currentColor"
|
|
9092
|
-
}),
|
|
9093
|
-
type: "button",
|
|
9094
|
-
shape: "default",
|
|
9095
|
-
size: "middle"
|
|
9096
|
-
};
|
|
9097
|
-
const Button = forwardRef((p2, ref) => {
|
|
9098
|
-
const props = mergeProps(defaultProps$W, p2);
|
|
9099
|
-
const [innerLoading, setInnerLoading] = useState(false);
|
|
9100
|
-
const nativeButtonRef = useRef(null);
|
|
9101
|
-
const loading = props.loading === "auto" ? innerLoading : props.loading;
|
|
9102
|
-
const disabled = props.disabled || loading;
|
|
9103
|
-
useImperativeHandle(ref, () => ({
|
|
9104
|
-
get nativeElement() {
|
|
9105
|
-
return nativeButtonRef.current;
|
|
9106
|
-
}
|
|
9107
|
-
}));
|
|
9108
|
-
const handleClick = (e) => __awaiter(void 0, void 0, void 0, function* () {
|
|
9109
|
-
if (!props.onClick)
|
|
9110
|
-
return;
|
|
9111
|
-
const promise = props.onClick(e);
|
|
9112
|
-
if (isPromise(promise)) {
|
|
9113
|
-
try {
|
|
9114
|
-
setInnerLoading(true);
|
|
9115
|
-
yield promise;
|
|
9116
|
-
setInnerLoading(false);
|
|
9117
|
-
} catch (e2) {
|
|
9118
|
-
setInnerLoading(false);
|
|
9119
|
-
throw e2;
|
|
9120
|
-
}
|
|
9121
|
-
}
|
|
9122
|
-
});
|
|
9123
|
-
return withNativeProps(props, React$1.createElement("button", {
|
|
9124
|
-
ref: nativeButtonRef,
|
|
9125
|
-
type: props.type,
|
|
9126
|
-
onClick: handleClick,
|
|
9127
|
-
className: classNames(classPrefix$1d, props.color ? `${classPrefix$1d}-${props.color}` : null, {
|
|
9128
|
-
[`${classPrefix$1d}-block`]: props.block,
|
|
9129
|
-
[`${classPrefix$1d}-disabled`]: disabled,
|
|
9130
|
-
[`${classPrefix$1d}-fill-outline`]: props.fill === "outline",
|
|
9131
|
-
[`${classPrefix$1d}-fill-none`]: props.fill === "none",
|
|
9132
|
-
[`${classPrefix$1d}-mini`]: props.size === "mini",
|
|
9133
|
-
[`${classPrefix$1d}-small`]: props.size === "small",
|
|
9134
|
-
[`${classPrefix$1d}-large`]: props.size === "large",
|
|
9135
|
-
[`${classPrefix$1d}-loading`]: loading
|
|
9136
|
-
}, `${classPrefix$1d}-shape-${props.shape}`),
|
|
9137
|
-
disabled,
|
|
9138
|
-
onMouseDown: props.onMouseDown,
|
|
9139
|
-
onMouseUp: props.onMouseUp,
|
|
9140
|
-
onTouchStart: props.onTouchStart,
|
|
9141
|
-
onTouchEnd: props.onTouchEnd
|
|
9142
|
-
}, loading ? React$1.createElement("div", {
|
|
9143
|
-
className: `${classPrefix$1d}-loading-wrapper`
|
|
9144
|
-
}, props.loadingIcon, props.loadingText) : props.children));
|
|
9145
|
-
});
|
|
9146
9026
|
var safeArea = "";
|
|
9147
|
-
const classPrefix$
|
|
9027
|
+
const classPrefix$1e = "adm-safe-area";
|
|
9148
9028
|
const SafeArea = (props) => {
|
|
9149
9029
|
return withNativeProps(props, React$1.createElement("div", {
|
|
9150
|
-
className: classNames(classPrefix$
|
|
9030
|
+
className: classNames(classPrefix$1e, `${classPrefix$1e}-position-${props.position}`)
|
|
9151
9031
|
}));
|
|
9152
9032
|
};
|
|
9153
9033
|
const fullClone = Object.assign({}, ReactDOM);
|
|
@@ -9263,8 +9143,8 @@ function renderImperatively(element) {
|
|
|
9263
9143
|
close
|
|
9264
9144
|
};
|
|
9265
9145
|
}
|
|
9266
|
-
const classPrefix$
|
|
9267
|
-
const defaultProps$
|
|
9146
|
+
const classPrefix$1d = `adm-action-sheet`;
|
|
9147
|
+
const defaultProps$X = {
|
|
9268
9148
|
visible: false,
|
|
9269
9149
|
actions: [],
|
|
9270
9150
|
cancelText: "",
|
|
@@ -9273,7 +9153,7 @@ const defaultProps$V = {
|
|
|
9273
9153
|
safeArea: true
|
|
9274
9154
|
};
|
|
9275
9155
|
const ActionSheet = (p2) => {
|
|
9276
|
-
const props = mergeProps(defaultProps$
|
|
9156
|
+
const props = mergeProps(defaultProps$X, p2);
|
|
9277
9157
|
return React$1.createElement(Popup, {
|
|
9278
9158
|
visible: props.visible,
|
|
9279
9159
|
onMaskClick: () => {
|
|
@@ -9284,23 +9164,23 @@ const ActionSheet = (p2) => {
|
|
|
9284
9164
|
}
|
|
9285
9165
|
},
|
|
9286
9166
|
afterClose: props.afterClose,
|
|
9287
|
-
className: classNames(`${classPrefix$
|
|
9167
|
+
className: classNames(`${classPrefix$1d}-popup`, props.popupClassName),
|
|
9288
9168
|
style: props.popupStyle,
|
|
9289
9169
|
getContainer: props.getContainer
|
|
9290
9170
|
}, withNativeProps(props, React$1.createElement("div", {
|
|
9291
|
-
className: classPrefix$
|
|
9171
|
+
className: classPrefix$1d
|
|
9292
9172
|
}, props.extra && React$1.createElement("div", {
|
|
9293
|
-
className: `${classPrefix$
|
|
9173
|
+
className: `${classPrefix$1d}-extra`
|
|
9294
9174
|
}, props.extra), React$1.createElement("div", {
|
|
9295
|
-
className: `${classPrefix$
|
|
9175
|
+
className: `${classPrefix$1d}-button-list`
|
|
9296
9176
|
}, props.actions.map((action, index2) => React$1.createElement("div", {
|
|
9297
9177
|
key: action.key,
|
|
9298
|
-
className: `${classPrefix$
|
|
9299
|
-
}, React$1.createElement(
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9178
|
+
className: `${classPrefix$1d}-button-item-wrapper`
|
|
9179
|
+
}, React$1.createElement("a", {
|
|
9180
|
+
className: classNames("adm-plain-anchor", `${classPrefix$1d}-button-item`, {
|
|
9181
|
+
[`${classPrefix$1d}-button-item-danger`]: action.danger,
|
|
9182
|
+
[`${classPrefix$1d}-button-item-disabled`]: action.disabled
|
|
9183
|
+
}),
|
|
9304
9184
|
onClick: () => {
|
|
9305
9185
|
var _a, _b, _c;
|
|
9306
9186
|
(_a = action.onClick) === null || _a === void 0 ? void 0 : _a.call(action);
|
|
@@ -9308,29 +9188,23 @@ const ActionSheet = (p2) => {
|
|
|
9308
9188
|
if (props.closeOnAction) {
|
|
9309
9189
|
(_c = props.onClose) === null || _c === void 0 ? void 0 : _c.call(props);
|
|
9310
9190
|
}
|
|
9311
|
-
}
|
|
9312
|
-
className: classNames(`${classPrefix$1b}-button-item`, {
|
|
9313
|
-
[`${classPrefix$1b}-button-item-danger`]: action.danger
|
|
9314
|
-
})
|
|
9191
|
+
}
|
|
9315
9192
|
}, React$1.createElement("div", {
|
|
9316
|
-
className: `${classPrefix$
|
|
9193
|
+
className: `${classPrefix$1d}-button-item-name`
|
|
9317
9194
|
}, action.text), action.description && React$1.createElement("div", {
|
|
9318
|
-
className: `${classPrefix$
|
|
9195
|
+
className: `${classPrefix$1d}-button-item-description`
|
|
9319
9196
|
}, action.description))))), props.cancelText && React$1.createElement("div", {
|
|
9320
|
-
className: `${classPrefix$
|
|
9197
|
+
className: `${classPrefix$1d}-cancel`
|
|
9321
9198
|
}, React$1.createElement("div", {
|
|
9322
|
-
className: `${classPrefix$
|
|
9323
|
-
}, React$1.createElement(
|
|
9324
|
-
|
|
9325
|
-
fill: "none",
|
|
9326
|
-
shape: "rectangular",
|
|
9327
|
-
className: `${classPrefix$1b}-button-item`,
|
|
9199
|
+
className: `${classPrefix$1d}-button-item-wrapper`
|
|
9200
|
+
}, React$1.createElement("a", {
|
|
9201
|
+
className: classNames("adm-plain-anchor", `${classPrefix$1d}-button-item`),
|
|
9328
9202
|
onClick: () => {
|
|
9329
9203
|
var _a;
|
|
9330
9204
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
9331
9205
|
}
|
|
9332
9206
|
}, React$1.createElement("div", {
|
|
9333
|
-
className: `${classPrefix$
|
|
9207
|
+
className: `${classPrefix$1d}-button-item-name`
|
|
9334
9208
|
}, props.cancelText)))), props.safeArea && React$1.createElement(SafeArea, {
|
|
9335
9209
|
position: "bottom"
|
|
9336
9210
|
}))));
|
|
@@ -9342,12 +9216,12 @@ var index$h = attachPropertiesToComponent(ActionSheet, {
|
|
|
9342
9216
|
show: showActionSheet
|
|
9343
9217
|
});
|
|
9344
9218
|
var autoCenter = "";
|
|
9345
|
-
const classPrefix$
|
|
9219
|
+
const classPrefix$1c = "adm-auto-center";
|
|
9346
9220
|
const AutoCenter = (props) => {
|
|
9347
9221
|
return withNativeProps(props, React$1.createElement("div", {
|
|
9348
|
-
className: classPrefix$
|
|
9222
|
+
className: classPrefix$1c
|
|
9349
9223
|
}, React$1.createElement("div", {
|
|
9350
|
-
className: `${classPrefix$
|
|
9224
|
+
className: `${classPrefix$1c}-content`
|
|
9351
9225
|
}, props.children)));
|
|
9352
9226
|
};
|
|
9353
9227
|
var avatar = "";
|
|
@@ -9389,15 +9263,15 @@ const Fallback = memo(() => React$1.createElement("svg", {
|
|
|
9389
9263
|
fillRule: "nonzero",
|
|
9390
9264
|
mask: "url(#mask-2)"
|
|
9391
9265
|
}))))));
|
|
9392
|
-
const classPrefix$
|
|
9393
|
-
const defaultProps$
|
|
9266
|
+
const classPrefix$1b = "adm-avatar";
|
|
9267
|
+
const defaultProps$W = {
|
|
9394
9268
|
fallback: React$1.createElement(Fallback, null),
|
|
9395
9269
|
fit: "cover"
|
|
9396
9270
|
};
|
|
9397
9271
|
const Avatar = (p2) => {
|
|
9398
|
-
const props = mergeProps(defaultProps$
|
|
9272
|
+
const props = mergeProps(defaultProps$W, p2);
|
|
9399
9273
|
return withNativeProps(props, React$1.createElement(Image$1, {
|
|
9400
|
-
className: classPrefix$
|
|
9274
|
+
className: classPrefix$1b,
|
|
9401
9275
|
src: props.src,
|
|
9402
9276
|
fallback: props.fallback,
|
|
9403
9277
|
placeholder: props.fallback,
|
|
@@ -9409,7 +9283,7 @@ const Avatar = (p2) => {
|
|
|
9409
9283
|
}));
|
|
9410
9284
|
};
|
|
9411
9285
|
var badge = "";
|
|
9412
|
-
const classPrefix$
|
|
9286
|
+
const classPrefix$1a = `adm-badge`;
|
|
9413
9287
|
const dot = React$1.createElement(React$1.Fragment, null);
|
|
9414
9288
|
const Badge$1 = (props) => {
|
|
9415
9289
|
const {
|
|
@@ -9418,22 +9292,142 @@ const Badge$1 = (props) => {
|
|
|
9418
9292
|
children
|
|
9419
9293
|
} = props;
|
|
9420
9294
|
const isDot = content === dot;
|
|
9421
|
-
const badgeCls = classNames(classPrefix$
|
|
9295
|
+
const badgeCls = classNames(classPrefix$1a, !!children && `${classPrefix$1a}-fixed`, isDot && `${classPrefix$1a}-dot`, props.bordered && `${classPrefix$1a}-bordered`);
|
|
9422
9296
|
const element = content || content === 0 ? withNativeProps(props, React$1.createElement("div", {
|
|
9423
9297
|
className: badgeCls,
|
|
9424
9298
|
style: {
|
|
9425
9299
|
"--color": color
|
|
9426
9300
|
}
|
|
9427
9301
|
}, !isDot && React$1.createElement("div", {
|
|
9428
|
-
className: `${classPrefix$
|
|
9302
|
+
className: `${classPrefix$1a}-content`
|
|
9429
9303
|
}, content))) : null;
|
|
9430
9304
|
return children ? React$1.createElement("div", {
|
|
9431
|
-
className: `${classPrefix$
|
|
9305
|
+
className: `${classPrefix$1a}-wrap`
|
|
9432
9306
|
}, children, element) : element;
|
|
9433
9307
|
};
|
|
9434
9308
|
var Badge = attachPropertiesToComponent(Badge$1, {
|
|
9435
9309
|
dot
|
|
9436
9310
|
});
|
|
9311
|
+
var button = "";
|
|
9312
|
+
var dotLoading = "";
|
|
9313
|
+
const classPrefix$19 = `adm-dot-loading`;
|
|
9314
|
+
const colorRecord$3 = {
|
|
9315
|
+
default: "var(--adm-color-weak)",
|
|
9316
|
+
primary: "var(--adm-color-primary)",
|
|
9317
|
+
white: "var(--adm-color-white)"
|
|
9318
|
+
};
|
|
9319
|
+
const defaultProps$V = {
|
|
9320
|
+
color: "default"
|
|
9321
|
+
};
|
|
9322
|
+
const DotLoading = memo((p2) => {
|
|
9323
|
+
var _a;
|
|
9324
|
+
const props = mergeProps(defaultProps$V, p2);
|
|
9325
|
+
return withNativeProps(props, React$1.createElement("div", {
|
|
9326
|
+
style: {
|
|
9327
|
+
color: (_a = colorRecord$3[props.color]) !== null && _a !== void 0 ? _a : props.color
|
|
9328
|
+
},
|
|
9329
|
+
className: classNames("adm-loading", classPrefix$19)
|
|
9330
|
+
}, React$1.createElement("svg", {
|
|
9331
|
+
height: "1em",
|
|
9332
|
+
viewBox: "0 0 100 40",
|
|
9333
|
+
style: {
|
|
9334
|
+
verticalAlign: "-0.125em"
|
|
9335
|
+
}
|
|
9336
|
+
}, React$1.createElement("g", {
|
|
9337
|
+
stroke: "none",
|
|
9338
|
+
strokeWidth: "1",
|
|
9339
|
+
fill: "none",
|
|
9340
|
+
fillRule: "evenodd"
|
|
9341
|
+
}, React$1.createElement("g", {
|
|
9342
|
+
transform: "translate(-100.000000, -71.000000)"
|
|
9343
|
+
}, React$1.createElement("g", {
|
|
9344
|
+
transform: "translate(95.000000, 71.000000)"
|
|
9345
|
+
}, React$1.createElement("g", {
|
|
9346
|
+
transform: "translate(5.000000, 0.000000)"
|
|
9347
|
+
}, [0, 1, 2].map((i) => React$1.createElement("rect", {
|
|
9348
|
+
key: i,
|
|
9349
|
+
fill: "currentColor",
|
|
9350
|
+
x: 20 + i * 26,
|
|
9351
|
+
y: "16",
|
|
9352
|
+
width: "8",
|
|
9353
|
+
height: "8",
|
|
9354
|
+
rx: "2"
|
|
9355
|
+
}, React$1.createElement("animate", {
|
|
9356
|
+
attributeName: "y",
|
|
9357
|
+
from: "16",
|
|
9358
|
+
to: "16",
|
|
9359
|
+
dur: "2s",
|
|
9360
|
+
begin: `${i * 0.2}s`,
|
|
9361
|
+
repeatCount: "indefinite",
|
|
9362
|
+
values: "16; 6; 26; 16; 16",
|
|
9363
|
+
keyTimes: "0; 0.1; 0.3; 0.4; 1"
|
|
9364
|
+
}))))))))));
|
|
9365
|
+
});
|
|
9366
|
+
function isPromise(obj) {
|
|
9367
|
+
return !!obj && typeof obj === "object" && typeof obj.then === "function";
|
|
9368
|
+
}
|
|
9369
|
+
const classPrefix$18 = `adm-button`;
|
|
9370
|
+
const defaultProps$U = {
|
|
9371
|
+
color: "default",
|
|
9372
|
+
fill: "solid",
|
|
9373
|
+
block: false,
|
|
9374
|
+
loading: false,
|
|
9375
|
+
loadingIcon: React$1.createElement(DotLoading, {
|
|
9376
|
+
color: "currentColor"
|
|
9377
|
+
}),
|
|
9378
|
+
type: "button",
|
|
9379
|
+
shape: "default",
|
|
9380
|
+
size: "middle"
|
|
9381
|
+
};
|
|
9382
|
+
const Button = forwardRef((p2, ref) => {
|
|
9383
|
+
const props = mergeProps(defaultProps$U, p2);
|
|
9384
|
+
const [innerLoading, setInnerLoading] = useState(false);
|
|
9385
|
+
const nativeButtonRef = useRef(null);
|
|
9386
|
+
const loading = props.loading === "auto" ? innerLoading : props.loading;
|
|
9387
|
+
const disabled = props.disabled || loading;
|
|
9388
|
+
useImperativeHandle(ref, () => ({
|
|
9389
|
+
get nativeElement() {
|
|
9390
|
+
return nativeButtonRef.current;
|
|
9391
|
+
}
|
|
9392
|
+
}));
|
|
9393
|
+
const handleClick = (e) => __awaiter(void 0, void 0, void 0, function* () {
|
|
9394
|
+
if (!props.onClick)
|
|
9395
|
+
return;
|
|
9396
|
+
const promise = props.onClick(e);
|
|
9397
|
+
if (isPromise(promise)) {
|
|
9398
|
+
try {
|
|
9399
|
+
setInnerLoading(true);
|
|
9400
|
+
yield promise;
|
|
9401
|
+
setInnerLoading(false);
|
|
9402
|
+
} catch (e2) {
|
|
9403
|
+
setInnerLoading(false);
|
|
9404
|
+
throw e2;
|
|
9405
|
+
}
|
|
9406
|
+
}
|
|
9407
|
+
});
|
|
9408
|
+
return withNativeProps(props, React$1.createElement("button", {
|
|
9409
|
+
ref: nativeButtonRef,
|
|
9410
|
+
type: props.type,
|
|
9411
|
+
onClick: handleClick,
|
|
9412
|
+
className: classNames(classPrefix$18, props.color ? `${classPrefix$18}-${props.color}` : null, {
|
|
9413
|
+
[`${classPrefix$18}-block`]: props.block,
|
|
9414
|
+
[`${classPrefix$18}-disabled`]: disabled,
|
|
9415
|
+
[`${classPrefix$18}-fill-outline`]: props.fill === "outline",
|
|
9416
|
+
[`${classPrefix$18}-fill-none`]: props.fill === "none",
|
|
9417
|
+
[`${classPrefix$18}-mini`]: props.size === "mini",
|
|
9418
|
+
[`${classPrefix$18}-small`]: props.size === "small",
|
|
9419
|
+
[`${classPrefix$18}-large`]: props.size === "large",
|
|
9420
|
+
[`${classPrefix$18}-loading`]: loading
|
|
9421
|
+
}, `${classPrefix$18}-shape-${props.shape}`),
|
|
9422
|
+
disabled,
|
|
9423
|
+
onMouseDown: props.onMouseDown,
|
|
9424
|
+
onMouseUp: props.onMouseUp,
|
|
9425
|
+
onTouchStart: props.onTouchStart,
|
|
9426
|
+
onTouchEnd: props.onTouchEnd
|
|
9427
|
+
}, loading ? React$1.createElement("div", {
|
|
9428
|
+
className: `${classPrefix$18}-loading-wrapper`
|
|
9429
|
+
}, props.loadingIcon, props.loadingText) : props.children));
|
|
9430
|
+
});
|
|
9437
9431
|
var calendar = "";
|
|
9438
9432
|
const ArrowLeft = () => {
|
|
9439
9433
|
return React$1.createElement("svg", {
|
|
@@ -9655,7 +9649,7 @@ const Calendar = forwardRef((p2, ref) => {
|
|
|
9655
9649
|
isSelect = isBegin || isEnd || d.isAfter(begin, "day") && d.isBefore(end, "day");
|
|
9656
9650
|
}
|
|
9657
9651
|
const inThisMonth = d.month() === current.month();
|
|
9658
|
-
const disabled = maxDay && d.isAfter(maxDay, "day") || minDay && d.isBefore(minDay, "day");
|
|
9652
|
+
const disabled = props.shouldDisableDate ? props.shouldDisableDate(d.toDate()) : maxDay && d.isAfter(maxDay, "day") || minDay && d.isBefore(minDay, "day");
|
|
9659
9653
|
cells.push(React$1.createElement("div", {
|
|
9660
9654
|
key: d.valueOf(),
|
|
9661
9655
|
className: classNames(`${classPrefix$17}-cell`, (disabled || !inThisMonth) && `${classPrefix$17}-cell-disabled`, inThisMonth && {
|
|
@@ -12282,7 +12276,8 @@ const defaultProps$H = {
|
|
|
12282
12276
|
fallback: React$1.createElement("div", {
|
|
12283
12277
|
className: `${classPrefix$S}-tip`
|
|
12284
12278
|
}, React$1.createElement(BrokenImageIcon, null)),
|
|
12285
|
-
lazy: false
|
|
12279
|
+
lazy: false,
|
|
12280
|
+
draggable: false
|
|
12286
12281
|
};
|
|
12287
12282
|
const Image$1 = staged((p2) => {
|
|
12288
12283
|
const props = mergeProps(defaultProps$H, p2);
|
|
@@ -12327,7 +12322,8 @@ const Image$1 = staged((p2) => {
|
|
|
12327
12322
|
referrerPolicy: props.referrerPolicy,
|
|
12328
12323
|
sizes: props.sizes,
|
|
12329
12324
|
srcSet,
|
|
12330
|
-
useMap: props.useMap
|
|
12325
|
+
useMap: props.useMap,
|
|
12326
|
+
draggable: props.draggable
|
|
12331
12327
|
});
|
|
12332
12328
|
return React$1.createElement(React$1.Fragment, null, !loaded && props.placeholder, img);
|
|
12333
12329
|
}
|
|
@@ -14076,7 +14072,9 @@ const Popover$1 = forwardRef((p2, ref) => {
|
|
|
14076
14072
|
const floatingElement = floatingRef.current;
|
|
14077
14073
|
if (!targetElement || !floatingElement)
|
|
14078
14074
|
return;
|
|
14079
|
-
return autoUpdate(targetElement, floatingElement, update
|
|
14075
|
+
return autoUpdate(targetElement, floatingElement, update, {
|
|
14076
|
+
elementResize: typeof ResizeObserver !== "undefined"
|
|
14077
|
+
});
|
|
14080
14078
|
}, [targetElement]);
|
|
14081
14079
|
useClickAway(() => {
|
|
14082
14080
|
if (!props.trigger)
|
|
@@ -14336,9 +14334,7 @@ const FormItem = (props) => {
|
|
|
14336
14334
|
return renderLayout(children);
|
|
14337
14335
|
}
|
|
14338
14336
|
let Variables = {};
|
|
14339
|
-
|
|
14340
|
-
Variables.label = label;
|
|
14341
|
-
}
|
|
14337
|
+
Variables.label = typeof label === "string" ? label : "";
|
|
14342
14338
|
if (messageVariables) {
|
|
14343
14339
|
Variables = Object.assign(Object.assign({}, Variables), messageVariables);
|
|
14344
14340
|
}
|
|
@@ -18007,7 +18003,8 @@ const TextArea = forwardRef((p2, ref) => {
|
|
|
18007
18003
|
var _a;
|
|
18008
18004
|
compositingRef.current = false;
|
|
18009
18005
|
if (maxLength) {
|
|
18010
|
-
|
|
18006
|
+
const v = e.target.value;
|
|
18007
|
+
setValue([...v].slice(0, maxLength).join(""));
|
|
18011
18008
|
}
|
|
18012
18009
|
(_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
18013
18010
|
},
|
package/bundle/style.css
CHANGED
|
@@ -63,19 +63,31 @@ div.adm-px-tester {
|
|
|
63
63
|
justify-content: center;
|
|
64
64
|
color: var(--adm-color-weak);
|
|
65
65
|
font-size: 15px;
|
|
66
|
-
padding: 18px
|
|
66
|
+
padding: 18px 12px;
|
|
67
|
+
border-bottom: 1px solid var(--adm-border-color);
|
|
68
|
+
}
|
|
69
|
+
.adm-action-sheet-button-list {
|
|
67
70
|
border-bottom: 1px solid var(--adm-border-color);
|
|
68
71
|
}
|
|
69
72
|
.adm-action-sheet-button-item-wrapper {
|
|
70
|
-
|
|
71
|
-
border-top: 1px solid var(--adm-border-color);
|
|
73
|
+
border-bottom: 1px solid var(--adm-border-color);
|
|
72
74
|
}
|
|
73
|
-
.adm-action-sheet-button-item-wrapper:
|
|
74
|
-
border-
|
|
75
|
+
.adm-action-sheet-button-item-wrapper:last-child {
|
|
76
|
+
border-bottom: none;
|
|
75
77
|
}
|
|
76
78
|
.adm-action-sheet-button-item {
|
|
77
|
-
padding: 14px;
|
|
78
79
|
text-align: center;
|
|
80
|
+
display: block;
|
|
81
|
+
background-color: #ffffff;
|
|
82
|
+
padding: 16px;
|
|
83
|
+
}
|
|
84
|
+
.adm-action-sheet-button-item:active {
|
|
85
|
+
background-color: #eeeeee;
|
|
86
|
+
}
|
|
87
|
+
.adm-action-sheet-button-item-disabled {
|
|
88
|
+
cursor: not-allowed;
|
|
89
|
+
pointer-events: none;
|
|
90
|
+
opacity: 0.4;
|
|
79
91
|
}
|
|
80
92
|
.adm-action-sheet-button-item-name {
|
|
81
93
|
color: var(--adm-color-text);
|
|
@@ -84,7 +96,7 @@ div.adm-px-tester {
|
|
|
84
96
|
.adm-action-sheet-button-item-description {
|
|
85
97
|
font-size: 12px;
|
|
86
98
|
color: var(--adm-color-weak);
|
|
87
|
-
padding-top:
|
|
99
|
+
padding-top: 2px;
|
|
88
100
|
}
|
|
89
101
|
.adm-action-sheet-button-item-danger .adm-action-sheet-button-item-name {
|
|
90
102
|
color: var(--adm-color-danger);
|
|
@@ -145,6 +157,77 @@ div.adm-px-tester {
|
|
|
145
157
|
.adm-mask-content {
|
|
146
158
|
z-index: 1;
|
|
147
159
|
}
|
|
160
|
+
.adm-safe-area {
|
|
161
|
+
display: block;
|
|
162
|
+
width: 100%;
|
|
163
|
+
}
|
|
164
|
+
.adm-safe-area-position-top {
|
|
165
|
+
padding-top: calc(env(safe-area-inset-top) * var(--adm-hd));
|
|
166
|
+
}
|
|
167
|
+
.adm-safe-area-position-bottom {
|
|
168
|
+
padding-bottom: calc(env(safe-area-inset-bottom) * var(--adm-hd));
|
|
169
|
+
}
|
|
170
|
+
.adm-auto-center {
|
|
171
|
+
display: flex;
|
|
172
|
+
justify-content: center;
|
|
173
|
+
}
|
|
174
|
+
.adm-auto-center-content {
|
|
175
|
+
flex: 0 1 auto;
|
|
176
|
+
}
|
|
177
|
+
.adm-avatar {
|
|
178
|
+
--size: var(--adm-avatar-size, 44px);
|
|
179
|
+
--border-radius: var(--adm-avatar-border-radius, 4px);
|
|
180
|
+
border-radius: var(--border-radius);
|
|
181
|
+
}
|
|
182
|
+
.adm-avatar.adm-image {
|
|
183
|
+
--width: var(--size);
|
|
184
|
+
--height: var(--size);
|
|
185
|
+
}
|
|
186
|
+
.adm-avatar-fallback {
|
|
187
|
+
height: 100%;
|
|
188
|
+
width: 100%;
|
|
189
|
+
display: block;
|
|
190
|
+
}
|
|
191
|
+
.adm-badge-wrap {
|
|
192
|
+
display: inline-block;
|
|
193
|
+
position: relative;
|
|
194
|
+
}
|
|
195
|
+
.adm-badge {
|
|
196
|
+
display: inline-flex;
|
|
197
|
+
vertical-align: middle;
|
|
198
|
+
box-sizing: content-box;
|
|
199
|
+
border-radius: 100px;
|
|
200
|
+
background-color: var(--color);
|
|
201
|
+
--right: 0;
|
|
202
|
+
--top: 0;
|
|
203
|
+
--color: var(--adm-badge-color, #ff411c);
|
|
204
|
+
}
|
|
205
|
+
.adm-badge-content {
|
|
206
|
+
color: #fff;
|
|
207
|
+
box-sizing: border-box;
|
|
208
|
+
min-width: 8px;
|
|
209
|
+
padding: 1px 4px;
|
|
210
|
+
font-size: 9px;
|
|
211
|
+
line-height: 12px;
|
|
212
|
+
white-space: nowrap;
|
|
213
|
+
font-weight: normal;
|
|
214
|
+
text-align: center;
|
|
215
|
+
}
|
|
216
|
+
.adm-badge-fixed {
|
|
217
|
+
position: absolute;
|
|
218
|
+
right: var(--right);
|
|
219
|
+
top: var(--top);
|
|
220
|
+
transform: translate(50%, -50%);
|
|
221
|
+
}
|
|
222
|
+
.adm-badge-dot {
|
|
223
|
+
min-width: 10px;
|
|
224
|
+
width: 10px;
|
|
225
|
+
height: 10px;
|
|
226
|
+
border-radius: 5px;
|
|
227
|
+
}
|
|
228
|
+
.adm-badge-bordered {
|
|
229
|
+
border: solid 1px var(--adm-color-white);
|
|
230
|
+
}
|
|
148
231
|
.adm-button {
|
|
149
232
|
--color: var(--adm-color-white);
|
|
150
233
|
--text-color: var(--adm-button-text-color, var(--adm-color-text));
|
|
@@ -275,77 +358,6 @@ div.adm-px-tester {
|
|
|
275
358
|
.adm-dot-loading {
|
|
276
359
|
display: inline-block;
|
|
277
360
|
}
|
|
278
|
-
.adm-safe-area {
|
|
279
|
-
display: block;
|
|
280
|
-
width: 100%;
|
|
281
|
-
}
|
|
282
|
-
.adm-safe-area-position-top {
|
|
283
|
-
padding-top: calc(env(safe-area-inset-top) * var(--adm-hd));
|
|
284
|
-
}
|
|
285
|
-
.adm-safe-area-position-bottom {
|
|
286
|
-
padding-bottom: calc(env(safe-area-inset-bottom) * var(--adm-hd));
|
|
287
|
-
}
|
|
288
|
-
.adm-auto-center {
|
|
289
|
-
display: flex;
|
|
290
|
-
justify-content: center;
|
|
291
|
-
}
|
|
292
|
-
.adm-auto-center-content {
|
|
293
|
-
flex: 0 1 auto;
|
|
294
|
-
}
|
|
295
|
-
.adm-avatar {
|
|
296
|
-
--size: var(--adm-avatar-size, 44px);
|
|
297
|
-
--border-radius: var(--adm-avatar-border-radius, 4px);
|
|
298
|
-
border-radius: var(--border-radius);
|
|
299
|
-
}
|
|
300
|
-
.adm-avatar.adm-image {
|
|
301
|
-
--width: var(--size);
|
|
302
|
-
--height: var(--size);
|
|
303
|
-
}
|
|
304
|
-
.adm-avatar-fallback {
|
|
305
|
-
height: 100%;
|
|
306
|
-
width: 100%;
|
|
307
|
-
display: block;
|
|
308
|
-
}
|
|
309
|
-
.adm-badge-wrap {
|
|
310
|
-
display: inline-block;
|
|
311
|
-
position: relative;
|
|
312
|
-
}
|
|
313
|
-
.adm-badge {
|
|
314
|
-
display: inline-flex;
|
|
315
|
-
vertical-align: middle;
|
|
316
|
-
box-sizing: content-box;
|
|
317
|
-
border-radius: 100px;
|
|
318
|
-
background-color: var(--color);
|
|
319
|
-
--right: 0;
|
|
320
|
-
--top: 0;
|
|
321
|
-
--color: var(--adm-badge-color, #ff411c);
|
|
322
|
-
}
|
|
323
|
-
.adm-badge-content {
|
|
324
|
-
color: #fff;
|
|
325
|
-
box-sizing: border-box;
|
|
326
|
-
min-width: 8px;
|
|
327
|
-
padding: 1px 4px;
|
|
328
|
-
font-size: 9px;
|
|
329
|
-
line-height: 12px;
|
|
330
|
-
white-space: nowrap;
|
|
331
|
-
font-weight: normal;
|
|
332
|
-
text-align: center;
|
|
333
|
-
}
|
|
334
|
-
.adm-badge-fixed {
|
|
335
|
-
position: absolute;
|
|
336
|
-
right: var(--right);
|
|
337
|
-
top: var(--top);
|
|
338
|
-
transform: translate(50%, -50%);
|
|
339
|
-
}
|
|
340
|
-
.adm-badge-dot {
|
|
341
|
-
min-width: 10px;
|
|
342
|
-
width: 10px;
|
|
343
|
-
height: 10px;
|
|
344
|
-
border-radius: 5px;
|
|
345
|
-
}
|
|
346
|
-
.adm-badge-bordered {
|
|
347
|
-
border: solid 1px var(--adm-color-white);
|
|
348
|
-
}
|
|
349
361
|
.adm-calendar .adm-calendar-header {
|
|
350
362
|
display: flex;
|
|
351
363
|
flex-direction: row;
|
|
@@ -419,6 +431,9 @@ div.adm-px-tester {
|
|
|
419
431
|
border-top-right-radius: 4px;
|
|
420
432
|
border-bottom-right-radius: 4px;
|
|
421
433
|
}
|
|
434
|
+
.adm-calendar-cell.adm-calendar-cell-disabled.adm-calendar-cell.adm-calendar-cell-selected {
|
|
435
|
+
color: var(--adm-color-light);
|
|
436
|
+
}
|
|
422
437
|
.adm-calendar-cell .adm-calendar-cell-top {
|
|
423
438
|
flex: none;
|
|
424
439
|
font-size: 18px;
|
|
@@ -1609,6 +1624,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled)::after {
|
|
|
1609
1624
|
border-radius: 8px;
|
|
1610
1625
|
box-shadow: 0 0 30px 0 rgba(51, 51, 51, 0.2);
|
|
1611
1626
|
font-size: 15px;
|
|
1627
|
+
width: max-content;
|
|
1612
1628
|
min-width: 32px;
|
|
1613
1629
|
max-width: calc(100vw - 24px);
|
|
1614
1630
|
overflow-y: hidden;
|