antd-mobile 5.28.2 → 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 +405 -195
- package/2x/bundle/antd-mobile.cjs.js +9 -9
- package/2x/bundle/antd-mobile.es.development.js +405 -195
- package/2x/bundle/antd-mobile.es.js +4901 -4675
- package/2x/bundle/antd-mobile.umd.development.js +405 -195
- package/2x/bundle/antd-mobile.umd.js +9 -9
- package/2x/bundle/style.css +36 -33
- 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 +1 -1
- package/2x/cjs/components/popover/popover.d.ts +2 -2
- package/2x/cjs/components/popover/popover.js +1 -1
- 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/stepper.css +2 -2
- 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.d.ts +1 -1
- package/2x/cjs/components/virtual-input/virtual-input.js +12 -2
- package/2x/cjs/global/global.css +5 -2
- package/2x/cjs/global/theme-default.css +5 -2
- 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/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/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 +1 -1
- package/2x/es/components/popover/popover.d.ts +2 -2
- package/2x/es/components/popover/popover.js +1 -1
- 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/stepper.css +2 -2
- 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.d.ts +1 -1
- package/2x/es/components/virtual-input/virtual-input.js +12 -2
- package/2x/es/global/global.css +5 -2
- package/2x/es/global/theme-default.css +5 -2
- 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/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/package.json +1 -1
- package/bundle/antd-mobile.cjs.development.js +405 -195
- package/bundle/antd-mobile.cjs.js +9 -9
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +405 -195
- package/bundle/antd-mobile.es.js +4901 -4675
- package/bundle/antd-mobile.umd.development.js +405 -195
- package/bundle/antd-mobile.umd.js +9 -9
- 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 +1 -1
- package/cjs/components/popover/popover.d.ts +2 -2
- package/cjs/components/popover/popover.js +1 -1
- 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/stepper.css +2 -2
- 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.d.ts +1 -1
- package/cjs/components/virtual-input/virtual-input.js +12 -2
- package/cjs/global/global.css +5 -2
- package/cjs/global/theme-default.css +5 -2
- 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/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/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 +1 -1
- package/es/components/popover/popover.d.ts +2 -2
- package/es/components/popover/popover.js +1 -1
- 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/stepper.css +2 -2
- 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.d.ts +1 -1
- package/es/components/virtual-input/virtual-input.js +12 -2
- package/es/global/global.css +5 -2
- package/es/global/theme-default.css +5 -2
- 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/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/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -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"> & {
|
|
@@ -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',
|
|
@@ -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;
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
width: calc(var(--height) - 2 * var(--border-width));
|
|
58
58
|
height: calc(var(--height) - 2 * var(--border-width));
|
|
59
59
|
border-radius: calc(var(--height) - 2 * var(--border-width));
|
|
60
|
-
background: var(--adm-color-
|
|
60
|
+
background: var(--adm-color-text-light-solid);
|
|
61
61
|
position: absolute;
|
|
62
62
|
z-index: 2;
|
|
63
63
|
top: var(--border-width);
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
|
|
94
94
|
.adm-switch.adm-switch-checked .adm-switch-inner {
|
|
95
95
|
margin: 0 calc(var(--height) - var(--border-width) + 10px) 0 20px;
|
|
96
|
-
color: var(--adm-color-
|
|
96
|
+
color: var(--adm-color-text-light-solid);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
.adm-switch.adm-switch-disabled {
|
|
@@ -182,7 +182,8 @@ export const Tabs = p => {
|
|
|
182
182
|
className: `${classPrefix}-tab-list`,
|
|
183
183
|
ref: tabListContainerRef,
|
|
184
184
|
scrollLeft: scrollLeft,
|
|
185
|
-
onScroll: updateMask
|
|
185
|
+
onScroll: updateMask,
|
|
186
|
+
role: 'tablist'
|
|
186
187
|
}, React.createElement(animated.div, {
|
|
187
188
|
ref: activeLineRef,
|
|
188
189
|
className: `${classPrefix}-tab-line`,
|
|
@@ -209,7 +210,9 @@ export const Tabs = p => {
|
|
|
209
210
|
className: classNames(`${classPrefix}-tab`, {
|
|
210
211
|
[`${classPrefix}-tab-active`]: pane.key === activeKey,
|
|
211
212
|
[`${classPrefix}-tab-disabled`]: pane.props.disabled
|
|
212
|
-
})
|
|
213
|
+
}),
|
|
214
|
+
role: 'tab',
|
|
215
|
+
"aria-selected": pane.key === activeKey
|
|
213
216
|
}, pane.props.title)))))), panes.map(pane => {
|
|
214
217
|
if (pane.props.children === undefined) {
|
|
215
218
|
return null;
|
|
@@ -21,7 +21,7 @@ export declare type TextAreaRef = {
|
|
|
21
21
|
blur: () => void;
|
|
22
22
|
nativeElement: HTMLTextAreaElement | null;
|
|
23
23
|
};
|
|
24
|
-
export declare const TextArea: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "onClick" | "disabled" | "name" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "
|
|
24
|
+
export declare const TextArea: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "onClick" | "disabled" | "name" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "autoFocus" | "autoComplete" | "readOnly"> & {
|
|
25
25
|
onChange?: ((val: string) => void) | undefined;
|
|
26
26
|
value?: string | undefined;
|
|
27
27
|
defaultValue?: string | undefined;
|
|
@@ -5,6 +5,7 @@ import { usePropsValue } from '../../utils/use-props-value';
|
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { CloseCircleFill } from 'antd-mobile-icons';
|
|
7
7
|
import { useIsomorphicLayoutEffect } from 'ahooks';
|
|
8
|
+
import { useConfig } from '../config-provider';
|
|
8
9
|
const classPrefix = 'adm-virtual-input';
|
|
9
10
|
const defaultProps = {
|
|
10
11
|
defaultValue: ''
|
|
@@ -15,6 +16,9 @@ export const VirtualInput = forwardRef((p, ref) => {
|
|
|
15
16
|
const rootRef = useRef(null);
|
|
16
17
|
const contentRef = useRef(null);
|
|
17
18
|
const [hasFocus, setHasFocus] = useState(false);
|
|
19
|
+
const {
|
|
20
|
+
locale
|
|
21
|
+
} = useConfig();
|
|
18
22
|
function scrollToEnd() {
|
|
19
23
|
const root = rootRef.current;
|
|
20
24
|
if (!root) return;
|
|
@@ -84,7 +88,11 @@ export const VirtualInput = forwardRef((p, ref) => {
|
|
|
84
88
|
onClick: props.onClick
|
|
85
89
|
}, React.createElement("div", {
|
|
86
90
|
className: `${classPrefix}-content`,
|
|
87
|
-
ref: contentRef
|
|
91
|
+
ref: contentRef,
|
|
92
|
+
role: 'option',
|
|
93
|
+
tabIndex: props.disabled ? undefined : 0,
|
|
94
|
+
"aria-disabled": props.disabled,
|
|
95
|
+
"aria-label": props.placeholder
|
|
88
96
|
}, value, React.createElement("div", {
|
|
89
97
|
className: `${classPrefix}-caret-container`
|
|
90
98
|
}, hasFocus && React.createElement("div", {
|
|
@@ -96,7 +104,9 @@ export const VirtualInput = forwardRef((p, ref) => {
|
|
|
96
104
|
e.stopPropagation();
|
|
97
105
|
setValue('');
|
|
98
106
|
(_a = props.onClear) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
99
|
-
}
|
|
107
|
+
},
|
|
108
|
+
role: 'button',
|
|
109
|
+
"aria-label": locale.Input.clear
|
|
100
110
|
}, React.createElement(CloseCircleFill, null)), !value && React.createElement("div", {
|
|
101
111
|
className: `${classPrefix}-placeholder`
|
|
102
112
|
}, props.placeholder), keyboardElement));
|
package/2x/es/global/global.css
CHANGED
|
@@ -16,14 +16,17 @@
|
|
|
16
16
|
--adm-color-success: #00b578;
|
|
17
17
|
--adm-color-warning: #ff8f1f;
|
|
18
18
|
--adm-color-danger: #ff3141;
|
|
19
|
-
--adm-color-white: #ffffff;
|
|
20
19
|
--adm-color-text: #333333;
|
|
21
20
|
--adm-color-text-secondary: #666666;
|
|
22
21
|
--adm-color-weak: #999999;
|
|
23
22
|
--adm-color-light: #cccccc;
|
|
24
23
|
--adm-color-border: #eeeeee;
|
|
25
|
-
--adm-color-box: #f5f5f5;
|
|
26
24
|
--adm-color-background: #ffffff;
|
|
25
|
+
--adm-color-white: #ffffff;
|
|
26
|
+
--adm-color-box: #f5f5f5;
|
|
27
|
+
--adm-color-text-light-solid: var(--adm-color-white);
|
|
28
|
+
--adm-color-text-dark-solid: #000000;
|
|
29
|
+
--adm-color-fill-content: var(--adm-color-box);
|
|
27
30
|
--adm-font-size-main: var(--adm-font-size-5);
|
|
28
31
|
--adm-font-family: -apple-system, blinkmacsystemfont, 'Helvetica Neue',
|
|
29
32
|
helvetica, segoe ui, arial, roboto, 'PingFang SC', 'miui',
|
|
@@ -16,14 +16,17 @@
|
|
|
16
16
|
--adm-color-success: #00b578;
|
|
17
17
|
--adm-color-warning: #ff8f1f;
|
|
18
18
|
--adm-color-danger: #ff3141;
|
|
19
|
-
--adm-color-white: #ffffff;
|
|
20
19
|
--adm-color-text: #333333;
|
|
21
20
|
--adm-color-text-secondary: #666666;
|
|
22
21
|
--adm-color-weak: #999999;
|
|
23
22
|
--adm-color-light: #cccccc;
|
|
24
23
|
--adm-color-border: #eeeeee;
|
|
25
|
-
--adm-color-box: #f5f5f5;
|
|
26
24
|
--adm-color-background: #ffffff;
|
|
25
|
+
--adm-color-white: #ffffff;
|
|
26
|
+
--adm-color-box: #f5f5f5;
|
|
27
|
+
--adm-color-text-light-solid: var(--adm-color-white);
|
|
28
|
+
--adm-color-text-dark-solid: #000000;
|
|
29
|
+
--adm-color-fill-content: var(--adm-color-box);
|
|
27
30
|
--adm-font-size-main: var(--adm-font-size-5);
|
|
28
31
|
--adm-font-family: -apple-system, blinkmacsystemfont, 'Helvetica Neue',
|
|
29
32
|
helvetica, segoe ui, arial, roboto, 'PingFang SC', 'miui',
|
package/2x/es/locales/base.d.ts
CHANGED
package/2x/es/locales/base.js
CHANGED
package/2x/es/locales/en-US.d.ts
CHANGED
package/2x/es/locales/es-ES.d.ts
CHANGED
package/2x/es/locales/fa-IR.d.ts
CHANGED
package/2x/es/locales/fr-FR.d.ts
CHANGED
package/2x/es/locales/id-ID.d.ts
CHANGED
package/2x/es/locales/ja-JP.d.ts
CHANGED
package/2x/es/locales/kk-KZ.d.ts
CHANGED
package/2x/es/locales/ko-KR.d.ts
CHANGED
package/2x/es/locales/zh-CN.d.ts
CHANGED
package/2x/es/locales/zh-CN.js
CHANGED
package/2x/es/locales/zh-HK.d.ts
CHANGED
package/2x/es/locales/zh-TW.d.ts
CHANGED