antd-mobile 5.28.1 → 5.29.0
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/bundle/antd-mobile.cjs.development.js +549 -317
- package/2x/bundle/antd-mobile.cjs.js +10 -9
- package/2x/bundle/antd-mobile.es.development.js +549 -317
- package/2x/bundle/antd-mobile.es.js +7650 -7398
- package/2x/bundle/antd-mobile.umd.development.js +549 -317
- package/2x/bundle/antd-mobile.umd.js +10 -9
- package/2x/bundle/css-vars-patch.css +1 -0
- package/2x/bundle/style.css +45 -34
- package/2x/cjs/components/action-sheet/action-sheet.css +1 -1
- package/2x/cjs/components/action-sheet/action-sheet.js +6 -2
- package/2x/cjs/components/avatar/avatar.d.ts +1 -1
- package/2x/cjs/components/avatar/avatar.js +2 -1
- package/2x/cjs/components/badge/badge.css +2 -2
- package/2x/cjs/components/button/button.css +2 -2
- package/2x/cjs/components/capsule-tabs/capsule-tabs.css +2 -2
- package/2x/cjs/components/check-list/check-list-item.js +3 -1
- package/2x/cjs/components/check-list/check-list.d.ts +1 -0
- package/2x/cjs/components/check-list/check-list.js +2 -0
- package/2x/cjs/components/check-list/context.d.ts +1 -0
- package/2x/cjs/components/checkbox/checkbox.css +2 -2
- package/2x/cjs/components/ellipsis/ellipsis.js +1 -1
- package/2x/cjs/components/image/image.css +1 -1
- package/2x/cjs/components/index-bar/index-bar.css +4 -4
- package/2x/cjs/components/input/input.d.ts +1 -1
- package/2x/cjs/components/jumbo-tabs/jumbo-tabs.css +2 -2
- package/2x/cjs/components/notice-bar/notice-bar.css +1 -1
- package/2x/cjs/components/number-keyboard/number-keyboard.js +10 -6
- package/2x/cjs/components/popover/index.d.ts +1 -1
- package/2x/cjs/components/popover/popover.css +2 -2
- package/2x/cjs/components/popover/popover.d.ts +2 -2
- package/2x/cjs/components/popover/popover.js +1 -1
- package/2x/cjs/components/popover/popover.patch.css +1 -0
- package/2x/cjs/components/pull-to-refresh/pull-to-refresh.js +15 -16
- package/2x/cjs/components/radio/radio.css +2 -2
- package/2x/cjs/components/search-bar/search-bar.css +1 -1
- package/2x/cjs/components/selector/selector.css +1 -1
- package/2x/cjs/components/selector/selector.js +10 -2
- package/2x/cjs/components/side-bar/side-bar.css +1 -1
- package/2x/cjs/components/slider/slider.css +3 -3
- package/2x/cjs/components/stepper/index.d.ts +1 -1
- package/2x/cjs/components/stepper/stepper.css +2 -2
- package/2x/cjs/components/stepper/stepper.d.ts +4 -2
- package/2x/cjs/components/stepper/stepper.js +21 -3
- package/2x/cjs/components/swipe-action/swipe-action.css +1 -1
- package/2x/cjs/components/switch/switch.css +2 -2
- package/2x/cjs/components/tabs/tabs.js +5 -2
- package/2x/cjs/components/text-area/text-area.css +8 -0
- package/2x/cjs/components/text-area/text-area.d.ts +1 -1
- package/2x/cjs/components/text-area/text-area.js +12 -2
- package/2x/cjs/components/virtual-input/virtual-input.js +12 -2
- package/2x/cjs/global/css-vars-patch.css +1 -0
- package/2x/cjs/global/global.css +5 -2
- package/2x/cjs/global/theme-default.css +5 -2
- package/2x/cjs/index.d.ts +1 -1
- package/2x/cjs/locales/base.d.ts +3 -0
- package/2x/cjs/locales/base.js +3 -0
- package/2x/cjs/locales/en-US.d.ts +3 -0
- package/2x/cjs/locales/es-ES.d.ts +3 -0
- package/2x/cjs/locales/fa-IR.d.ts +3 -0
- package/2x/cjs/locales/fr-FR.d.ts +3 -0
- package/2x/cjs/locales/id-ID.d.ts +3 -0
- package/2x/cjs/locales/ja-JP.d.ts +3 -0
- package/2x/cjs/locales/kk-KZ.d.ts +3 -0
- package/2x/cjs/locales/ko-KR.d.ts +3 -0
- package/2x/cjs/locales/ko-KR.js +31 -2
- package/2x/cjs/locales/zh-CN.d.ts +3 -0
- package/2x/cjs/locales/zh-CN.js +3 -0
- package/2x/cjs/locales/zh-HK.d.ts +3 -0
- package/2x/cjs/locales/zh-TW.d.ts +3 -0
- package/2x/cjs/utils/reduce-and-restore-motion.js +7 -6
- package/2x/cjs/utils/render-imperatively.js +9 -3
- package/2x/es/components/action-sheet/action-sheet.css +1 -1
- package/2x/es/components/action-sheet/action-sheet.js +6 -2
- package/2x/es/components/avatar/avatar.d.ts +1 -1
- package/2x/es/components/avatar/avatar.js +2 -1
- package/2x/es/components/badge/badge.css +2 -2
- package/2x/es/components/button/button.css +2 -2
- package/2x/es/components/capsule-tabs/capsule-tabs.css +2 -2
- package/2x/es/components/check-list/check-list-item.js +3 -1
- package/2x/es/components/check-list/check-list.d.ts +1 -0
- package/2x/es/components/check-list/check-list.js +2 -0
- package/2x/es/components/check-list/context.d.ts +1 -0
- package/2x/es/components/checkbox/checkbox.css +2 -2
- package/2x/es/components/ellipsis/ellipsis.js +1 -1
- package/2x/es/components/image/image.css +1 -1
- package/2x/es/components/index-bar/index-bar.css +4 -4
- package/2x/es/components/input/input.d.ts +1 -1
- package/2x/es/components/jumbo-tabs/jumbo-tabs.css +2 -2
- package/2x/es/components/notice-bar/notice-bar.css +1 -1
- package/2x/es/components/number-keyboard/number-keyboard.js +10 -6
- package/2x/es/components/popover/index.d.ts +1 -1
- package/2x/es/components/popover/popover.css +2 -2
- package/2x/es/components/popover/popover.d.ts +2 -2
- package/2x/es/components/popover/popover.js +1 -1
- package/2x/es/components/popover/popover.patch.css +1 -0
- package/2x/es/components/pull-to-refresh/pull-to-refresh.js +15 -16
- package/2x/es/components/radio/radio.css +2 -2
- package/2x/es/components/search-bar/search-bar.css +1 -1
- package/2x/es/components/selector/selector.css +1 -1
- package/2x/es/components/selector/selector.js +10 -2
- package/2x/es/components/side-bar/side-bar.css +1 -1
- package/2x/es/components/slider/slider.css +3 -3
- package/2x/es/components/stepper/index.d.ts +1 -1
- package/2x/es/components/stepper/stepper.css +2 -2
- package/2x/es/components/stepper/stepper.d.ts +4 -2
- package/2x/es/components/stepper/stepper.js +19 -3
- package/2x/es/components/swipe-action/swipe-action.css +1 -1
- package/2x/es/components/switch/switch.css +2 -2
- package/2x/es/components/tabs/tabs.js +5 -2
- package/2x/es/components/text-area/text-area.css +8 -0
- package/2x/es/components/text-area/text-area.d.ts +1 -1
- package/2x/es/components/text-area/text-area.js +12 -2
- package/2x/es/components/virtual-input/virtual-input.js +12 -2
- package/2x/es/global/css-vars-patch.css +1 -0
- package/2x/es/global/global.css +5 -2
- package/2x/es/global/theme-default.css +5 -2
- package/2x/es/index.d.ts +1 -1
- package/2x/es/locales/base.d.ts +3 -0
- package/2x/es/locales/base.js +3 -0
- package/2x/es/locales/en-US.d.ts +3 -0
- package/2x/es/locales/es-ES.d.ts +3 -0
- package/2x/es/locales/fa-IR.d.ts +3 -0
- package/2x/es/locales/fr-FR.d.ts +3 -0
- package/2x/es/locales/id-ID.d.ts +3 -0
- package/2x/es/locales/ja-JP.d.ts +3 -0
- package/2x/es/locales/kk-KZ.d.ts +3 -0
- package/2x/es/locales/ko-KR.d.ts +3 -0
- package/2x/es/locales/ko-KR.js +31 -2
- package/2x/es/locales/zh-CN.d.ts +3 -0
- package/2x/es/locales/zh-CN.js +3 -0
- package/2x/es/locales/zh-HK.d.ts +3 -0
- package/2x/es/locales/zh-TW.d.ts +3 -0
- package/2x/es/utils/reduce-and-restore-motion.js +7 -6
- package/2x/es/utils/render-imperatively.js +9 -3
- package/2x/package.json +2 -2
- package/bundle/antd-mobile.cjs.development.js +549 -317
- package/bundle/antd-mobile.cjs.js +10 -9
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +549 -317
- package/bundle/antd-mobile.es.js +7650 -7398
- package/bundle/antd-mobile.umd.development.js +549 -317
- package/bundle/antd-mobile.umd.js +10 -9
- package/bundle/css-vars-patch.css +1 -0
- package/bundle/style.css +1 -1
- package/cjs/components/action-sheet/action-sheet.css +1 -1
- package/cjs/components/action-sheet/action-sheet.js +6 -2
- package/cjs/components/avatar/avatar.d.ts +1 -1
- package/cjs/components/avatar/avatar.js +2 -1
- package/cjs/components/badge/badge.css +2 -2
- package/cjs/components/button/button.css +2 -2
- package/cjs/components/capsule-tabs/capsule-tabs.css +2 -2
- package/cjs/components/check-list/check-list-item.js +3 -1
- package/cjs/components/check-list/check-list.d.ts +1 -0
- package/cjs/components/check-list/check-list.js +2 -0
- package/cjs/components/check-list/context.d.ts +1 -0
- package/cjs/components/checkbox/checkbox.css +2 -2
- package/cjs/components/ellipsis/ellipsis.js +1 -1
- package/cjs/components/image/image.css +1 -1
- package/cjs/components/index-bar/index-bar.css +4 -4
- package/cjs/components/input/input.d.ts +1 -1
- package/cjs/components/jumbo-tabs/jumbo-tabs.css +2 -2
- package/cjs/components/notice-bar/notice-bar.css +1 -1
- package/cjs/components/number-keyboard/number-keyboard.js +10 -6
- package/cjs/components/popover/index.d.ts +1 -1
- package/cjs/components/popover/popover.css +2 -2
- package/cjs/components/popover/popover.d.ts +2 -2
- package/cjs/components/popover/popover.js +1 -1
- package/cjs/components/popover/popover.patch.css +1 -0
- package/cjs/components/pull-to-refresh/pull-to-refresh.js +15 -16
- package/cjs/components/radio/radio.css +2 -2
- package/cjs/components/search-bar/search-bar.css +1 -1
- package/cjs/components/selector/selector.css +1 -1
- package/cjs/components/selector/selector.js +10 -2
- package/cjs/components/side-bar/side-bar.css +1 -1
- package/cjs/components/slider/slider.css +3 -3
- package/cjs/components/stepper/index.d.ts +1 -1
- package/cjs/components/stepper/stepper.css +2 -2
- package/cjs/components/stepper/stepper.d.ts +4 -2
- package/cjs/components/stepper/stepper.js +21 -3
- package/cjs/components/swipe-action/swipe-action.css +1 -1
- package/cjs/components/switch/switch.css +2 -2
- package/cjs/components/tabs/tabs.js +5 -2
- package/cjs/components/text-area/text-area.css +7 -0
- package/cjs/components/text-area/text-area.d.ts +1 -1
- package/cjs/components/text-area/text-area.js +12 -2
- package/cjs/components/virtual-input/virtual-input.js +12 -2
- package/cjs/global/css-vars-patch.css +1 -0
- package/cjs/global/global.css +5 -2
- package/cjs/global/theme-default.css +5 -2
- package/cjs/index.d.ts +1 -1
- package/cjs/locales/base.d.ts +3 -0
- package/cjs/locales/base.js +3 -0
- package/cjs/locales/en-US.d.ts +3 -0
- package/cjs/locales/es-ES.d.ts +3 -0
- package/cjs/locales/fa-IR.d.ts +3 -0
- package/cjs/locales/fr-FR.d.ts +3 -0
- package/cjs/locales/id-ID.d.ts +3 -0
- package/cjs/locales/ja-JP.d.ts +3 -0
- package/cjs/locales/kk-KZ.d.ts +3 -0
- package/cjs/locales/ko-KR.d.ts +3 -0
- package/cjs/locales/ko-KR.js +31 -2
- package/cjs/locales/zh-CN.d.ts +3 -0
- package/cjs/locales/zh-CN.js +3 -0
- package/cjs/locales/zh-HK.d.ts +3 -0
- package/cjs/locales/zh-TW.d.ts +3 -0
- package/cjs/utils/reduce-and-restore-motion.js +7 -6
- package/cjs/utils/render-imperatively.js +9 -3
- package/es/components/action-sheet/action-sheet.css +1 -1
- package/es/components/action-sheet/action-sheet.js +6 -2
- package/es/components/avatar/avatar.d.ts +1 -1
- package/es/components/avatar/avatar.js +2 -1
- package/es/components/badge/badge.css +2 -2
- package/es/components/button/button.css +2 -2
- package/es/components/capsule-tabs/capsule-tabs.css +2 -2
- package/es/components/check-list/check-list-item.js +3 -1
- package/es/components/check-list/check-list.d.ts +1 -0
- package/es/components/check-list/check-list.js +2 -0
- package/es/components/check-list/context.d.ts +1 -0
- package/es/components/checkbox/checkbox.css +2 -2
- package/es/components/ellipsis/ellipsis.js +1 -1
- package/es/components/image/image.css +1 -1
- package/es/components/index-bar/index-bar.css +4 -4
- package/es/components/input/input.d.ts +1 -1
- package/es/components/jumbo-tabs/jumbo-tabs.css +2 -2
- package/es/components/notice-bar/notice-bar.css +1 -1
- package/es/components/number-keyboard/number-keyboard.js +10 -6
- package/es/components/popover/index.d.ts +1 -1
- package/es/components/popover/popover.css +2 -2
- package/es/components/popover/popover.d.ts +2 -2
- package/es/components/popover/popover.js +1 -1
- package/es/components/popover/popover.patch.css +1 -0
- package/es/components/pull-to-refresh/pull-to-refresh.js +15 -16
- package/es/components/radio/radio.css +2 -2
- package/es/components/search-bar/search-bar.css +1 -1
- package/es/components/selector/selector.css +1 -1
- package/es/components/selector/selector.js +10 -2
- package/es/components/side-bar/side-bar.css +1 -1
- package/es/components/slider/slider.css +3 -3
- package/es/components/stepper/index.d.ts +1 -1
- package/es/components/stepper/stepper.css +2 -2
- package/es/components/stepper/stepper.d.ts +4 -2
- package/es/components/stepper/stepper.js +19 -3
- package/es/components/swipe-action/swipe-action.css +1 -1
- package/es/components/switch/switch.css +2 -2
- package/es/components/tabs/tabs.js +5 -2
- package/es/components/text-area/text-area.css +7 -0
- package/es/components/text-area/text-area.d.ts +1 -1
- package/es/components/text-area/text-area.js +12 -2
- package/es/components/virtual-input/virtual-input.js +12 -2
- package/es/global/css-vars-patch.css +1 -0
- package/es/global/global.css +5 -2
- package/es/global/theme-default.css +5 -2
- package/es/index.d.ts +1 -1
- package/es/locales/base.d.ts +3 -0
- package/es/locales/base.js +3 -0
- package/es/locales/en-US.d.ts +3 -0
- package/es/locales/es-ES.d.ts +3 -0
- package/es/locales/fa-IR.d.ts +3 -0
- package/es/locales/fr-FR.d.ts +3 -0
- package/es/locales/id-ID.d.ts +3 -0
- package/es/locales/ja-JP.d.ts +3 -0
- package/es/locales/kk-KZ.d.ts +3 -0
- package/es/locales/ko-KR.d.ts +3 -0
- package/es/locales/ko-KR.js +31 -2
- package/es/locales/zh-CN.d.ts +3 -0
- package/es/locales/zh-CN.js +3 -0
- package/es/locales/zh-HK.d.ts +3 -0
- package/es/locales/zh-TW.d.ts +3 -0
- package/es/utils/reduce-and-restore-motion.js +7 -6
- package/es/utils/render-imperatively.js +9 -3
- package/package.json +2 -2
- package/umd/antd-mobile.js +1 -1
- package/umd/antd-mobile.js.LICENSE.txt +5 -4
package/2x/cjs/locales/zh-CN.js
CHANGED
|
@@ -33,11 +33,12 @@ function restoreMotion() {
|
|
|
33
33
|
function isMotionReduced() {
|
|
34
34
|
return reduced;
|
|
35
35
|
}
|
|
36
|
+
function subscribe(onStoreChange) {
|
|
37
|
+
subscribers.add(onStoreChange);
|
|
38
|
+
return () => {
|
|
39
|
+
subscribers.delete(onStoreChange);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
36
42
|
function useMotionReduced() {
|
|
37
|
-
return (0, _shim.useSyncExternalStore)(
|
|
38
|
-
subscribers.add(onStoreChange);
|
|
39
|
-
return () => {
|
|
40
|
-
subscribers.delete(onStoreChange);
|
|
41
|
-
};
|
|
42
|
-
}, isMotionReduced);
|
|
43
|
+
return (0, _shim.useSyncExternalStore)(subscribe, isMotionReduced);
|
|
43
44
|
}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.renderImperatively = renderImperatively;
|
|
7
|
+
var _tslib = require("tslib");
|
|
7
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _renderToBody = require("./render-to-body");
|
|
9
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -53,10 +54,15 @@ function renderImperatively(element) {
|
|
|
53
54
|
ref: wrapperRef
|
|
54
55
|
}));
|
|
55
56
|
return {
|
|
56
|
-
close: () => {
|
|
57
|
+
close: () => (0, _tslib.__awaiter)(this, void 0, void 0, function* () {
|
|
57
58
|
var _a;
|
|
58
|
-
(
|
|
59
|
-
|
|
59
|
+
if (!wrapperRef.current) {
|
|
60
|
+
// it means the wrapper is not mounted yet, call `unmount` directly
|
|
61
|
+
unmount();
|
|
62
|
+
} else {
|
|
63
|
+
(_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
64
|
+
}
|
|
65
|
+
}),
|
|
60
66
|
replace: element => {
|
|
61
67
|
var _a;
|
|
62
68
|
(_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.replace(element);
|
|
@@ -55,13 +55,17 @@ export const ActionSheet = p => {
|
|
|
55
55
|
if (props.closeOnAction) {
|
|
56
56
|
(_c = props.onClose) === null || _c === void 0 ? void 0 : _c.call(props);
|
|
57
57
|
}
|
|
58
|
-
}
|
|
58
|
+
},
|
|
59
|
+
role: 'option',
|
|
60
|
+
"aria-disabled": action.disabled
|
|
59
61
|
}, React.createElement("div", {
|
|
60
62
|
className: `${classPrefix}-button-item-name`
|
|
61
63
|
}, action.text), action.description && React.createElement("div", {
|
|
62
64
|
className: `${classPrefix}-button-item-description`
|
|
63
65
|
}, action.description))))), props.cancelText && React.createElement("div", {
|
|
64
|
-
className: `${classPrefix}-cancel
|
|
66
|
+
className: `${classPrefix}-cancel`,
|
|
67
|
+
role: 'option',
|
|
68
|
+
"aria-label": props.cancelText
|
|
65
69
|
}, React.createElement("div", {
|
|
66
70
|
className: `${classPrefix}-button-item-wrapper`
|
|
67
71
|
}, React.createElement("a", {
|
|
@@ -5,5 +5,5 @@ export declare type AvatarProps = {
|
|
|
5
5
|
src: string;
|
|
6
6
|
fallback?: ReactNode;
|
|
7
7
|
fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
8
|
-
} & Pick<ImageProps, 'alt' | 'lazy' | 'onClick' | 'onError'> & NativeProps<'--size' | '--border-radius'>;
|
|
8
|
+
} & Pick<ImageProps, 'alt' | 'lazy' | 'onClick' | 'onError' | 'onLoad'> & NativeProps<'--size' | '--border-radius'>;
|
|
9
9
|
export declare const Avatar: FC<AvatarProps>;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.adm-badge-content {
|
|
18
|
-
color: var(--adm-color-
|
|
18
|
+
color: var(--adm-color-text-light-solid);
|
|
19
19
|
box-sizing: border-box;
|
|
20
20
|
min-width: 16px;
|
|
21
21
|
padding: 2px 8px;
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.adm-badge-bordered {
|
|
44
|
-
border: solid 2px var(--adm-color-
|
|
44
|
+
border: solid 2px var(--adm-color-text-light-solid);
|
|
45
45
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.adm-button {
|
|
2
|
-
--color: var(--adm-color-
|
|
2
|
+
--color: var(--adm-color-text-light-solid);
|
|
3
3
|
--text-color: var(--adm-button-text-color, var(--adm-color-text));
|
|
4
4
|
--background-color: var(--adm-button-background-color, var(--adm-color-background));
|
|
5
5
|
--border-radius: var(--adm-button-border-radius, 8px);
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.adm-button:not(.adm-button-default) {
|
|
62
|
-
--text-color: var(--adm-color-
|
|
62
|
+
--text-color: var(--adm-color-text-light-solid);
|
|
63
63
|
--background-color: var(--color);
|
|
64
64
|
--border-color: var(--color);
|
|
65
65
|
}
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
font-size: var(--adm-font-size-7);
|
|
38
38
|
text-align: center;
|
|
39
39
|
white-space: nowrap;
|
|
40
|
-
background-color: var(--adm-color-
|
|
40
|
+
background-color: var(--adm-color-fill-content);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.adm-capsule-tabs-tab-active {
|
|
44
|
-
color: var(--adm-color-
|
|
44
|
+
color: var(--adm-color-text-light-solid);
|
|
45
45
|
background-color: var(--adm-color-primary);
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -13,9 +13,11 @@ export const CheckListItem = props => {
|
|
|
13
13
|
}
|
|
14
14
|
const active = context.value.includes(props.value);
|
|
15
15
|
const readOnly = props.readOnly || context.readOnly;
|
|
16
|
+
const defaultExtra = active ? context.activeIcon : null;
|
|
17
|
+
const renderExtra = context.extra ? context.extra(active) : defaultExtra;
|
|
16
18
|
const extra = React.createElement("div", {
|
|
17
19
|
className: `${classPrefix}-extra`
|
|
18
|
-
},
|
|
20
|
+
}, renderExtra);
|
|
19
21
|
return withNativeProps(props, React.createElement(List.Item, {
|
|
20
22
|
title: props.title,
|
|
21
23
|
className: classNames(classPrefix, readOnly && `${classPrefix}-readonly`, active && `${classPrefix}-active`),
|
|
@@ -7,6 +7,7 @@ export declare type CheckListProps = Pick<ListProps, 'mode' | 'style'> & {
|
|
|
7
7
|
onChange?: (val: string[]) => void;
|
|
8
8
|
multiple?: boolean;
|
|
9
9
|
activeIcon?: ReactNode;
|
|
10
|
+
extra?: (active: boolean) => ReactNode;
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
readOnly?: boolean;
|
|
12
13
|
children?: React.ReactNode;
|
|
@@ -4,6 +4,7 @@ export declare const CheckListContext: import("react").Context<{
|
|
|
4
4
|
check: (val: string) => void;
|
|
5
5
|
uncheck: (val: string) => void;
|
|
6
6
|
activeIcon?: ReactNode;
|
|
7
|
+
extra?: ((active: boolean) => ReactNode) | undefined;
|
|
7
8
|
disabled?: boolean | undefined;
|
|
8
9
|
readOnly?: boolean | undefined;
|
|
9
10
|
} | null>;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
box-sizing: border-box;
|
|
21
21
|
width: var(--icon-size);
|
|
22
22
|
height: var(--icon-size);
|
|
23
|
-
color: var(--adm-color-
|
|
23
|
+
color: var(--adm-color-text-light-solid);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.adm-checkbox .adm-checkbox-icon > svg {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
.adm-checkbox.adm-checkbox-disabled .adm-checkbox-icon.adm-checkbox-icon {
|
|
50
50
|
color: #b7b7b7;
|
|
51
51
|
border-color: var(--adm-color-light);
|
|
52
|
-
background-color: var(--adm-color-
|
|
52
|
+
background-color: var(--adm-color-fill-content);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.adm-checkbox .adm-checkbox-custom-icon {
|
|
@@ -120,7 +120,7 @@ export const Ellipsis = p => {
|
|
|
120
120
|
setExpanded(true);
|
|
121
121
|
}
|
|
122
122
|
}, props.expandText)) : null;
|
|
123
|
-
const collapseActionElement = exceeded && props.
|
|
123
|
+
const collapseActionElement = exceeded && props.collapseText ? withStopPropagation(props.stopPropagationForActionButtons, React.createElement("a", {
|
|
124
124
|
onClick: () => {
|
|
125
125
|
setExpanded(false);
|
|
126
126
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
height: 100%;
|
|
5
5
|
position: relative;
|
|
6
|
-
background-color: var(--adm-color-
|
|
6
|
+
background-color: var(--adm-color-background);
|
|
7
7
|
--sticky-offset-top: 0;
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
padding: 0 24px;
|
|
26
26
|
color: var(--adm-color-weak);
|
|
27
27
|
font-size: var(--adm-font-size-main);
|
|
28
|
-
background-color: var(--adm-color-
|
|
28
|
+
background-color: var(--adm-color-fill-content);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.adm-index-bar-sidebar {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
right: 120px;
|
|
49
49
|
width: 94px;
|
|
50
50
|
height: 94px;
|
|
51
|
-
color: var(--adm-color-
|
|
51
|
+
color: var(--adm-color-text-light-solid);
|
|
52
52
|
font-size: 50px;
|
|
53
53
|
line-height: 94px;
|
|
54
54
|
text-align: center;
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
.adm-index-bar-sidebar-item-active {
|
|
82
|
-
color: var(--adm-color-
|
|
82
|
+
color: var(--adm-color-text-light-solid);
|
|
83
83
|
background-color: var(--adm-color-primary);
|
|
84
84
|
border-radius: 50%;
|
|
85
85
|
}
|
|
@@ -26,7 +26,7 @@ export declare type InputRef = {
|
|
|
26
26
|
blur: () => void;
|
|
27
27
|
nativeElement: HTMLInputElement | null;
|
|
28
28
|
};
|
|
29
|
-
export declare const Input: React.ForwardRefExoticComponent<Pick<NativeInputProps, "pattern" | "onClick" | "name" | "type" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "
|
|
29
|
+
export declare const Input: React.ForwardRefExoticComponent<Pick<NativeInputProps, "pattern" | "onClick" | "name" | "type" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "autoFocus" | "autoCapitalize" | "autoCorrect" | "inputMode" | "autoComplete" | "maxLength" | "minLength" | "step"> & {
|
|
30
30
|
value?: string | undefined;
|
|
31
31
|
defaultValue?: string | undefined;
|
|
32
32
|
onChange?: ((val: string) => void) | undefined;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
border-radius: 20px;
|
|
57
57
|
color: var(--adm-color-weak);
|
|
58
58
|
font-size: var(--adm-font-size-main);
|
|
59
|
-
background-color: var(--adm-color-
|
|
59
|
+
background-color: var(--adm-color-fill-content);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.adm-jumbo-tabs-tab-active {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.adm-jumbo-tabs-tab-active .adm-jumbo-tabs-tab-description {
|
|
67
|
-
color: var(--adm-color-
|
|
67
|
+
color: var(--adm-color-text-light-solid);
|
|
68
68
|
background-color: var(--adm-color-primary);
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.adm-notice-bar {
|
|
2
2
|
--background-color: #ababab;
|
|
3
3
|
--border-color: #999999;
|
|
4
|
-
--text-color: var(--adm-color-
|
|
4
|
+
--text-color: var(--adm-color-text-light-solid);
|
|
5
5
|
--font-size: var(--adm-font-size-7);
|
|
6
6
|
--icon-font-size: var(--adm-font-size-10);
|
|
7
7
|
--height: 80px;
|
|
@@ -88,8 +88,9 @@ export const NumberKeyboard = p => {
|
|
|
88
88
|
className: classNames(`${classPrefix}-header`, {
|
|
89
89
|
[`${classPrefix}-header-with-title`]: !!title
|
|
90
90
|
})
|
|
91
|
-
}, title && React.createElement("div", {
|
|
92
|
-
className: `${classPrefix}-title
|
|
91
|
+
}, 'title' && React.createElement("div", {
|
|
92
|
+
className: `${classPrefix}-title`,
|
|
93
|
+
"aria-label": title
|
|
93
94
|
}, title), showCloseButton && React.createElement("span", {
|
|
94
95
|
className: `${classPrefix}-header-close-button`,
|
|
95
96
|
onClick: () => {
|
|
@@ -97,7 +98,8 @@ export const NumberKeyboard = p => {
|
|
|
97
98
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
98
99
|
},
|
|
99
100
|
role: 'button',
|
|
100
|
-
title: 'CLOSE'
|
|
101
|
+
title: 'CLOSE',
|
|
102
|
+
tabIndex: -1
|
|
101
103
|
}, React.createElement(DownOutline, null)));
|
|
102
104
|
};
|
|
103
105
|
const renderKey = (key, index) => {
|
|
@@ -108,8 +110,9 @@ export const NumberKeyboard = p => {
|
|
|
108
110
|
[`${classPrefix}-key-mid`]: index === 9 && !!confirmText && keys.length < 12
|
|
109
111
|
});
|
|
110
112
|
const ariaProps = key ? {
|
|
111
|
-
role: '
|
|
112
|
-
title: key
|
|
113
|
+
role: 'grid',
|
|
114
|
+
title: key,
|
|
115
|
+
tabIndex: -1
|
|
113
116
|
} : undefined;
|
|
114
117
|
return React.createElement("div", Object.assign({
|
|
115
118
|
key: key,
|
|
@@ -165,7 +168,8 @@ export const NumberKeyboard = p => {
|
|
|
165
168
|
}, React.createElement(TextDeletionOutline, null)), React.createElement("div", {
|
|
166
169
|
className: `${classPrefix}-key ${classPrefix}-key-extra ${classPrefix}-key-ok`,
|
|
167
170
|
onTouchEnd: e => onKeyPress(e, 'OK'),
|
|
168
|
-
role: 'button'
|
|
171
|
+
role: 'button',
|
|
172
|
+
"aria-label": confirmText
|
|
169
173
|
}, confirmText))), props.safeArea && React.createElement("div", {
|
|
170
174
|
className: `${classPrefix}-footer`
|
|
171
175
|
}, React.createElement(SafeArea, {
|
|
@@ -18,7 +18,7 @@ declare const _default: import("react").ForwardRefExoticComponent<{
|
|
|
18
18
|
content: import("react").ReactNode;
|
|
19
19
|
} & {
|
|
20
20
|
className?: string | undefined;
|
|
21
|
-
style?: (import("react").CSSProperties & Partial<Record<"--z-index", string>>) | undefined;
|
|
21
|
+
style?: (import("react").CSSProperties & Partial<Record<"--z-index" | "--arrow-size", string>>) | undefined;
|
|
22
22
|
tabIndex?: number | undefined;
|
|
23
23
|
} & import("react").AriaAttributes & import("react").RefAttributes<import("./popover").PopoverRef>> & {
|
|
24
24
|
Menu: import("react").ForwardRefExoticComponent<Omit<import("./popover").PopoverProps, "content"> & {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
--background: #ffffff;
|
|
4
4
|
--arrow-size: 16px;
|
|
5
5
|
--content-padding: 16px 24px;
|
|
6
|
-
color:
|
|
6
|
+
color: var(--adm-color-text);
|
|
7
7
|
position: absolute;
|
|
8
8
|
top: 0;
|
|
9
9
|
left: 0;
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
.adm-popover-arrow-icon {
|
|
66
66
|
display: block;
|
|
67
67
|
height: var(--arrow-size);
|
|
68
|
-
width:
|
|
68
|
+
width: calc(var(--arrow-size) / 8 * 15);
|
|
69
69
|
position: absolute;
|
|
70
70
|
top: 50%;
|
|
71
71
|
left: 50%;
|
|
@@ -15,7 +15,7 @@ export declare type PopoverProps = {
|
|
|
15
15
|
placement?: Placement | DeprecatedPlacement;
|
|
16
16
|
stopPropagation?: PropagationEvent[];
|
|
17
17
|
content: React.ReactNode;
|
|
18
|
-
} & NativeProps<'--z-index'>;
|
|
18
|
+
} & NativeProps<'--z-index' | '--arrow-size'>;
|
|
19
19
|
export declare type PopoverRef = {
|
|
20
20
|
show: () => void;
|
|
21
21
|
hide: () => void;
|
|
@@ -35,6 +35,6 @@ export declare const Popover: React.ForwardRefExoticComponent<{
|
|
|
35
35
|
content: React.ReactNode;
|
|
36
36
|
} & {
|
|
37
37
|
className?: string | undefined;
|
|
38
|
-
style?: (React.CSSProperties & Partial<Record<"--z-index", string>>) | undefined;
|
|
38
|
+
style?: (React.CSSProperties & Partial<Record<"--z-index" | "--arrow-size", string>>) | undefined;
|
|
39
39
|
tabIndex?: number | undefined;
|
|
40
40
|
} & React.AriaAttributes & React.RefAttributes<PopoverRef>>;
|
|
@@ -99,7 +99,7 @@ export const Popover = forwardRef((p, ref) => {
|
|
|
99
99
|
top: arrowY != null ? `${arrowY}px` : '',
|
|
100
100
|
right: '',
|
|
101
101
|
bottom: '',
|
|
102
|
-
[arrowSide]:
|
|
102
|
+
[arrowSide]: 'calc(var(--arrow-size) * -1)'
|
|
103
103
|
});
|
|
104
104
|
const arrowRotate = {
|
|
105
105
|
top: '0deg',
|
|
@@ -50,6 +50,19 @@ export const PullToRefresh = p => {
|
|
|
50
50
|
var _a;
|
|
51
51
|
(_a = elementRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('touchmove', () => {});
|
|
52
52
|
}, []);
|
|
53
|
+
const reset = () => {
|
|
54
|
+
return new Promise(resolve => {
|
|
55
|
+
api.start({
|
|
56
|
+
to: {
|
|
57
|
+
height: 0
|
|
58
|
+
},
|
|
59
|
+
onResolve() {
|
|
60
|
+
setStatus('pulling');
|
|
61
|
+
resolve();
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
};
|
|
53
66
|
function doRefresh() {
|
|
54
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
68
|
api.start({
|
|
@@ -60,27 +73,13 @@ export const PullToRefresh = p => {
|
|
|
60
73
|
yield props.onRefresh();
|
|
61
74
|
setStatus('complete');
|
|
62
75
|
} catch (e) {
|
|
63
|
-
|
|
64
|
-
to: next => __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
yield next({
|
|
66
|
-
height: 0
|
|
67
|
-
});
|
|
68
|
-
setStatus('pulling');
|
|
69
|
-
})
|
|
70
|
-
});
|
|
76
|
+
reset();
|
|
71
77
|
throw e;
|
|
72
78
|
}
|
|
73
79
|
if (props.completeDelay > 0) {
|
|
74
80
|
yield sleep(props.completeDelay);
|
|
75
81
|
}
|
|
76
|
-
|
|
77
|
-
to: next => __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
yield next({
|
|
79
|
-
height: 0
|
|
80
|
-
});
|
|
81
|
-
setStatus('pulling');
|
|
82
|
-
})
|
|
83
|
-
});
|
|
82
|
+
reset();
|
|
84
83
|
});
|
|
85
84
|
}
|
|
86
85
|
useDrag(state => {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
box-sizing: border-box;
|
|
21
21
|
width: var(--icon-size);
|
|
22
22
|
height: var(--icon-size);
|
|
23
|
-
color: var(--adm-color-
|
|
23
|
+
color: var(--adm-color-text-light-solid);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.adm-radio .adm-radio-icon > svg {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
.adm-radio.adm-radio-disabled .adm-radio-icon {
|
|
50
50
|
color: #b7b7b7;
|
|
51
51
|
border-color: var(--adm-color-light);
|
|
52
|
-
background-color: var(--adm-color-
|
|
52
|
+
background-color: var(--adm-color-fill-content);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.adm-radio .adm-radio-custom-icon {
|
|
@@ -6,6 +6,7 @@ import Space from '../space';
|
|
|
6
6
|
import Grid from '../grid';
|
|
7
7
|
import { usePropsValue } from '../../utils/use-props-value';
|
|
8
8
|
import { CheckMark } from './check-mark';
|
|
9
|
+
import { useConfig } from '../config-provider';
|
|
9
10
|
const classPrefix = `adm-selector`;
|
|
10
11
|
const defaultProps = {
|
|
11
12
|
multiple: false,
|
|
@@ -27,6 +28,9 @@ export const Selector = p => {
|
|
|
27
28
|
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, val, extend);
|
|
28
29
|
}
|
|
29
30
|
});
|
|
31
|
+
const {
|
|
32
|
+
locale
|
|
33
|
+
} = useConfig();
|
|
30
34
|
const items = props.options.map(option => {
|
|
31
35
|
const active = (value || []).includes(option.value);
|
|
32
36
|
const disabled = option.disabled || props.disabled;
|
|
@@ -49,7 +53,9 @@ export const Selector = p => {
|
|
|
49
53
|
const val = active ? [] : [option.value];
|
|
50
54
|
setValue(val);
|
|
51
55
|
}
|
|
52
|
-
}
|
|
56
|
+
},
|
|
57
|
+
role: 'option',
|
|
58
|
+
"aria-selected": active && !props.multiple || active && props.multiple
|
|
53
59
|
}, option.label, option.description && React.createElement("div", {
|
|
54
60
|
className: `${classPrefix}-item-description`
|
|
55
61
|
}, option.description), active && props.showCheckMark && React.createElement("div", {
|
|
@@ -57,7 +63,9 @@ export const Selector = p => {
|
|
|
57
63
|
}, React.createElement(CheckMark, null)));
|
|
58
64
|
});
|
|
59
65
|
return withNativeProps(props, React.createElement("div", {
|
|
60
|
-
className: classPrefix
|
|
66
|
+
className: classPrefix,
|
|
67
|
+
role: 'listbox',
|
|
68
|
+
"aria-label": locale.Selector.name
|
|
61
69
|
}, !props.columns && React.createElement(Space, {
|
|
62
70
|
wrap: true
|
|
63
71
|
}, items), props.columns && React.createElement(Grid, {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
position: relative;
|
|
15
15
|
width: 100%;
|
|
16
16
|
height: 6px;
|
|
17
|
-
background-color: var(--adm-color-
|
|
17
|
+
background-color: var(--adm-color-fill-content);
|
|
18
18
|
border-radius: 6px;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
width: 14px;
|
|
40
40
|
height: 14px;
|
|
41
41
|
margin-left: -6px;
|
|
42
|
-
background-color: var(--adm-color-
|
|
42
|
+
background-color: var(--adm-color-fill-content);
|
|
43
43
|
border-radius: 50%;
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
border-radius: 50%;
|
|
55
55
|
text-align: center;
|
|
56
56
|
line-height: 56px;
|
|
57
|
-
background: var(--adm-color-
|
|
57
|
+
background: var(--adm-color-text-light-solid);
|
|
58
58
|
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.12);
|
|
59
59
|
color: var(--fill-color);
|
|
60
60
|
}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
--input-width: 88px;
|
|
4
4
|
--input-font-size: var(--adm-font-size-main);
|
|
5
5
|
--input-font-color: var(--adm-color-text);
|
|
6
|
-
--input-background-color: var(--adm-color-
|
|
6
|
+
--input-background-color: var(--adm-color-fill-content);
|
|
7
7
|
--border-radius: 4px;
|
|
8
8
|
--border: none;
|
|
9
9
|
--border-inner: solid 4px transparent;
|
|
10
10
|
--active-border: var(--border);
|
|
11
11
|
--button-font-size: var(--adm-font-size-7);
|
|
12
12
|
--button-text-color: var(--adm-color-primary);
|
|
13
|
-
--button-background-color: var(--adm-color-
|
|
13
|
+
--button-background-color: var(--adm-color-fill-content);
|
|
14
14
|
--button-width: var(--height);
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|