antd-mobile 5.28.2 → 5.29.1
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 +429 -217
- package/2x/bundle/antd-mobile.cjs.js +9 -9
- package/2x/bundle/antd-mobile.es.development.js +429 -217
- package/2x/bundle/antd-mobile.es.js +4918 -4678
- package/2x/bundle/antd-mobile.umd.development.js +429 -217
- 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/calendar/calendar.js +1 -1
- 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 +14 -8
- 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/popup/popup.js +13 -11
- 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/text-area/text-area.js +1 -0
- package/2x/cjs/components/virtual-input/virtual-input.js +11 -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/da-DK.d.ts +134 -0
- package/2x/cjs/locales/da-DK.js +132 -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/it-IT.d.ts +134 -0
- package/2x/cjs/locales/it-IT.js +144 -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/nb-NO.d.ts +134 -0
- package/2x/cjs/locales/nb-NO.js +144 -0
- package/2x/cjs/locales/nl-NL.d.ts +134 -0
- package/2x/cjs/locales/nl-NL.js +144 -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/calendar/calendar.js +1 -1
- 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 +14 -8
- 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/popup/popup.js +13 -11
- 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/text-area/text-area.js +1 -0
- package/2x/es/components/virtual-input/virtual-input.js +11 -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/da-DK.d.ts +134 -0
- package/2x/es/locales/da-DK.js +125 -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/it-IT.d.ts +134 -0
- package/2x/es/locales/it-IT.js +137 -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/nb-NO.d.ts +134 -0
- package/2x/es/locales/nb-NO.js +137 -0
- package/2x/es/locales/nl-NL.d.ts +134 -0
- package/2x/es/locales/nl-NL.js +137 -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 +429 -217
- package/bundle/antd-mobile.cjs.js +9 -9
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +429 -217
- package/bundle/antd-mobile.es.js +4918 -4678
- package/bundle/antd-mobile.umd.development.js +429 -217
- 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/calendar/calendar.js +1 -1
- 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 +14 -8
- 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/popup/popup.js +13 -11
- 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/text-area/text-area.js +1 -0
- package/cjs/components/virtual-input/virtual-input.js +11 -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/da-DK.d.ts +134 -0
- package/cjs/locales/da-DK.js +132 -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/it-IT.d.ts +134 -0
- package/cjs/locales/it-IT.js +144 -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/nb-NO.d.ts +134 -0
- package/cjs/locales/nb-NO.js +144 -0
- package/cjs/locales/nl-NL.d.ts +134 -0
- package/cjs/locales/nl-NL.js +144 -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/calendar/calendar.js +1 -1
- 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 +14 -8
- 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/popup/popup.js +13 -11
- 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/text-area/text-area.js +1 -0
- package/es/components/virtual-input/virtual-input.js +11 -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/da-DK.d.ts +134 -0
- package/es/locales/da-DK.js +125 -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/it-IT.d.ts +134 -0
- package/es/locales/it-IT.js +137 -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/nb-NO.d.ts +134 -0
- package/es/locales/nb-NO.js +137 -0
- package/es/locales/nl-NL.d.ts +134 -0
- package/es/locales/nl-NL.js +137 -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
|
@@ -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
|
.adm-index-bar-body {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
padding: 0 12px;
|
|
23
23
|
color: var(--adm-color-weak);
|
|
24
24
|
font-size: var(--adm-font-size-main);
|
|
25
|
-
background-color: var(--adm-color-
|
|
25
|
+
background-color: var(--adm-color-fill-content);
|
|
26
26
|
}
|
|
27
27
|
.adm-index-bar-sidebar {
|
|
28
28
|
position: absolute;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
right: 60px;
|
|
44
44
|
width: 47px;
|
|
45
45
|
height: 47px;
|
|
46
|
-
color: var(--adm-color-
|
|
46
|
+
color: var(--adm-color-text-light-solid);
|
|
47
47
|
font-size: 25px;
|
|
48
48
|
line-height: 47px;
|
|
49
49
|
text-align: center;
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
align-items: center;
|
|
71
71
|
}
|
|
72
72
|
.adm-index-bar-sidebar-item-active {
|
|
73
|
-
color: var(--adm-color-
|
|
73
|
+
color: var(--adm-color-text-light-solid);
|
|
74
74
|
background-color: var(--adm-color-primary);
|
|
75
75
|
border-radius: 50%;
|
|
76
76
|
}
|
|
@@ -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;
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
border-radius: 10px;
|
|
50
50
|
color: var(--adm-color-weak);
|
|
51
51
|
font-size: var(--adm-font-size-main);
|
|
52
|
-
background-color: var(--adm-color-
|
|
52
|
+
background-color: var(--adm-color-fill-content);
|
|
53
53
|
}
|
|
54
54
|
.adm-jumbo-tabs-tab-active {
|
|
55
55
|
color: var(--adm-color-primary);
|
|
56
56
|
}
|
|
57
57
|
.adm-jumbo-tabs-tab-active .adm-jumbo-tabs-tab-description {
|
|
58
|
-
color: var(--adm-color-
|
|
58
|
+
color: var(--adm-color-text-light-solid);
|
|
59
59
|
background-color: var(--adm-color-primary);
|
|
60
60
|
}
|
|
61
61
|
.adm-jumbo-tabs-tab-disabled {
|
|
@@ -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: 40px;
|
|
@@ -97,16 +97,18 @@ const NumberKeyboard = p => {
|
|
|
97
97
|
className: (0, _classnames.default)(`${classPrefix}-header`, {
|
|
98
98
|
[`${classPrefix}-header-with-title`]: !!title
|
|
99
99
|
})
|
|
100
|
-
}, title && _react.default.createElement("div", {
|
|
101
|
-
className: `${classPrefix}-title
|
|
100
|
+
}, 'title' && _react.default.createElement("div", {
|
|
101
|
+
className: `${classPrefix}-title`,
|
|
102
|
+
"aria-label": title
|
|
102
103
|
}, title), showCloseButton && _react.default.createElement("span", {
|
|
103
104
|
className: `${classPrefix}-header-close-button`,
|
|
104
105
|
onClick: () => {
|
|
105
106
|
var _a;
|
|
106
107
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
107
108
|
},
|
|
108
|
-
role: '
|
|
109
|
-
title: 'CLOSE'
|
|
109
|
+
role: 'grid',
|
|
110
|
+
title: 'CLOSE',
|
|
111
|
+
tabIndex: -1
|
|
110
112
|
}, _react.default.createElement(_antdMobileIcons.DownOutline, null)));
|
|
111
113
|
};
|
|
112
114
|
const renderKey = (key, index) => {
|
|
@@ -117,8 +119,9 @@ const NumberKeyboard = p => {
|
|
|
117
119
|
[`${classPrefix}-key-mid`]: index === 9 && !!confirmText && keys.length < 12
|
|
118
120
|
});
|
|
119
121
|
const ariaProps = key ? {
|
|
120
|
-
role: '
|
|
121
|
-
title: key
|
|
122
|
+
role: 'grid',
|
|
123
|
+
title: key,
|
|
124
|
+
tabIndex: -1
|
|
122
125
|
} : undefined;
|
|
123
126
|
return _react.default.createElement("div", Object.assign({
|
|
124
127
|
key: key,
|
|
@@ -170,11 +173,14 @@ const NumberKeyboard = p => {
|
|
|
170
173
|
onBackspacePressEnd();
|
|
171
174
|
},
|
|
172
175
|
title: 'BACKSPACE',
|
|
173
|
-
role: '
|
|
176
|
+
role: 'grid',
|
|
177
|
+
tabIndex: -1
|
|
174
178
|
}, _react.default.createElement(_antdMobileIcons.TextDeletionOutline, null)), _react.default.createElement("div", {
|
|
175
179
|
className: `${classPrefix}-key ${classPrefix}-key-extra ${classPrefix}-key-ok`,
|
|
176
180
|
onTouchEnd: e => onKeyPress(e, 'OK'),
|
|
177
|
-
role: '
|
|
181
|
+
role: 'grid',
|
|
182
|
+
tabIndex: -1,
|
|
183
|
+
"aria-label": confirmText
|
|
178
184
|
}, confirmText))), props.safeArea && _react.default.createElement("div", {
|
|
179
185
|
className: `${classPrefix}-footer`
|
|
180
186
|
}, _react.default.createElement(_safeArea.default, {
|
|
@@ -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>>;
|
|
@@ -108,7 +108,7 @@ const Popover = (0, _react.forwardRef)((p, ref) => {
|
|
|
108
108
|
top: arrowY != null ? `${arrowY}px` : '',
|
|
109
109
|
right: '',
|
|
110
110
|
bottom: '',
|
|
111
|
-
[arrowSide]:
|
|
111
|
+
[arrowSide]: 'calc(var(--arrow-size) * -1)'
|
|
112
112
|
});
|
|
113
113
|
const arrowRotate = {
|
|
114
114
|
top: '0deg',
|
|
@@ -88,17 +88,19 @@ const Popup = p => {
|
|
|
88
88
|
className: bodyCls,
|
|
89
89
|
style: Object.assign(Object.assign({}, props.bodyStyle), {
|
|
90
90
|
transform: percent.to(v => {
|
|
91
|
-
if (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
91
|
+
if (v) {
|
|
92
|
+
if (props.position === 'bottom') {
|
|
93
|
+
return `translate(0, ${v}%)`;
|
|
94
|
+
}
|
|
95
|
+
if (props.position === 'top') {
|
|
96
|
+
return `translate(0, -${v}%)`;
|
|
97
|
+
}
|
|
98
|
+
if (props.position === 'left') {
|
|
99
|
+
return `translate(-${v}%, 0)`;
|
|
100
|
+
}
|
|
101
|
+
if (props.position === 'right') {
|
|
102
|
+
return `translate(${v}%, 0)`;
|
|
103
|
+
}
|
|
102
104
|
}
|
|
103
105
|
return 'none';
|
|
104
106
|
})
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
box-sizing: border-box;
|
|
19
19
|
width: var(--icon-size);
|
|
20
20
|
height: var(--icon-size);
|
|
21
|
-
color: var(--adm-color-
|
|
21
|
+
color: var(--adm-color-text-light-solid);
|
|
22
22
|
}
|
|
23
23
|
.adm-radio .adm-radio-icon > svg {
|
|
24
24
|
display: block;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
.adm-radio.adm-radio-disabled .adm-radio-icon {
|
|
42
42
|
color: #b7b7b7;
|
|
43
43
|
border-color: var(--adm-color-light);
|
|
44
|
-
background-color: var(--adm-color-
|
|
44
|
+
background-color: var(--adm-color-fill-content);
|
|
45
45
|
}
|
|
46
46
|
.adm-radio .adm-radio-custom-icon {
|
|
47
47
|
font-size: var(--icon-size);
|
|
@@ -12,6 +12,7 @@ var _space = _interopRequireDefault(require("../space"));
|
|
|
12
12
|
var _grid = _interopRequireDefault(require("../grid"));
|
|
13
13
|
var _usePropsValue = require("../../utils/use-props-value");
|
|
14
14
|
var _checkMark = require("./check-mark");
|
|
15
|
+
var _configProvider = require("../config-provider");
|
|
15
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
17
|
const classPrefix = `adm-selector`;
|
|
17
18
|
const defaultProps = {
|
|
@@ -34,6 +35,9 @@ const Selector = p => {
|
|
|
34
35
|
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, val, extend);
|
|
35
36
|
}
|
|
36
37
|
});
|
|
38
|
+
const {
|
|
39
|
+
locale
|
|
40
|
+
} = (0, _configProvider.useConfig)();
|
|
37
41
|
const items = props.options.map(option => {
|
|
38
42
|
const active = (value || []).includes(option.value);
|
|
39
43
|
const disabled = option.disabled || props.disabled;
|
|
@@ -56,7 +60,9 @@ const Selector = p => {
|
|
|
56
60
|
const val = active ? [] : [option.value];
|
|
57
61
|
setValue(val);
|
|
58
62
|
}
|
|
59
|
-
}
|
|
63
|
+
},
|
|
64
|
+
role: 'option',
|
|
65
|
+
"aria-selected": active && !props.multiple || active && props.multiple
|
|
60
66
|
}, option.label, option.description && _react.default.createElement("div", {
|
|
61
67
|
className: `${classPrefix}-item-description`
|
|
62
68
|
}, option.description), active && props.showCheckMark && _react.default.createElement("div", {
|
|
@@ -64,7 +70,9 @@ const Selector = p => {
|
|
|
64
70
|
}, _react.default.createElement(_checkMark.CheckMark, null)));
|
|
65
71
|
});
|
|
66
72
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
67
|
-
className: classPrefix
|
|
73
|
+
className: classPrefix,
|
|
74
|
+
role: 'listbox',
|
|
75
|
+
"aria-label": locale.Selector.name
|
|
68
76
|
}, !props.columns && _react.default.createElement(_space.default, {
|
|
69
77
|
wrap: true
|
|
70
78
|
}, items), props.columns && _react.default.createElement(_grid.default, {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
position: relative;
|
|
13
13
|
width: 100%;
|
|
14
14
|
height: 3px;
|
|
15
|
-
background-color: var(--adm-color-
|
|
15
|
+
background-color: var(--adm-color-fill-content);
|
|
16
16
|
border-radius: 3px;
|
|
17
17
|
}
|
|
18
18
|
.adm-slider-fill {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
width: 7px;
|
|
35
35
|
height: 7px;
|
|
36
36
|
margin-left: -3px;
|
|
37
|
-
background-color: var(--adm-color-
|
|
37
|
+
background-color: var(--adm-color-fill-content);
|
|
38
38
|
border-radius: 50%;
|
|
39
39
|
}
|
|
40
40
|
.adm-slider-tick-active {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
border-radius: 50%;
|
|
48
48
|
text-align: center;
|
|
49
49
|
line-height: 28px;
|
|
50
|
-
background: var(--adm-color-
|
|
50
|
+
background: var(--adm-color-text-light-solid);
|
|
51
51
|
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.12);
|
|
52
52
|
color: var(--fill-color);
|
|
53
53
|
}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
--input-width: 44px;
|
|
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: 2px;
|
|
8
8
|
--border: none;
|
|
9
9
|
--border-inner: solid 2px 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;
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
width: calc(var(--height) - 2 * var(--border-width));
|
|
53
53
|
height: calc(var(--height) - 2 * var(--border-width));
|
|
54
54
|
border-radius: calc(var(--height) - 2 * var(--border-width));
|
|
55
|
-
background: var(--adm-color-
|
|
55
|
+
background: var(--adm-color-text-light-solid);
|
|
56
56
|
position: absolute;
|
|
57
57
|
z-index: 2;
|
|
58
58
|
top: var(--border-width);
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
}
|
|
84
84
|
.adm-switch.adm-switch-checked .adm-switch-inner {
|
|
85
85
|
margin: 0 calc(var(--height) - var(--border-width) + 5px) 0 10px;
|
|
86
|
-
color: var(--adm-color-
|
|
86
|
+
color: var(--adm-color-text-light-solid);
|
|
87
87
|
}
|
|
88
88
|
.adm-switch.adm-switch-disabled {
|
|
89
89
|
cursor: not-allowed;
|
|
@@ -192,7 +192,8 @@ const Tabs = p => {
|
|
|
192
192
|
className: `${classPrefix}-tab-list`,
|
|
193
193
|
ref: tabListContainerRef,
|
|
194
194
|
scrollLeft: scrollLeft,
|
|
195
|
-
onScroll: updateMask
|
|
195
|
+
onScroll: updateMask,
|
|
196
|
+
role: 'tablist'
|
|
196
197
|
}, _react.default.createElement(_web.animated.div, {
|
|
197
198
|
ref: activeLineRef,
|
|
198
199
|
className: `${classPrefix}-tab-line`,
|
|
@@ -219,7 +220,9 @@ const Tabs = p => {
|
|
|
219
220
|
className: (0, _classnames.default)(`${classPrefix}-tab`, {
|
|
220
221
|
[`${classPrefix}-tab-active`]: pane.key === activeKey,
|
|
221
222
|
[`${classPrefix}-tab-disabled`]: pane.props.disabled
|
|
222
|
-
})
|
|
223
|
+
}),
|
|
224
|
+
role: 'tab',
|
|
225
|
+
"aria-selected": pane.key === activeKey
|
|
223
226
|
}, pane.props.title)))))), panes.map(pane => {
|
|
224
227
|
if (pane.props.children === undefined) {
|
|
225
228
|
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;
|
|
@@ -11,6 +11,7 @@ var _usePropsValue = require("../../utils/use-props-value");
|
|
|
11
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
12
|
var _antdMobileIcons = require("antd-mobile-icons");
|
|
13
13
|
var _ahooks = require("ahooks");
|
|
14
|
+
var _configProvider = require("../config-provider");
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
16
|
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); }
|
|
16
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -24,6 +25,9 @@ const VirtualInput = (0, _react.forwardRef)((p, ref) => {
|
|
|
24
25
|
const rootRef = (0, _react.useRef)(null);
|
|
25
26
|
const contentRef = (0, _react.useRef)(null);
|
|
26
27
|
const [hasFocus, setHasFocus] = (0, _react.useState)(false);
|
|
28
|
+
const {
|
|
29
|
+
locale
|
|
30
|
+
} = (0, _configProvider.useConfig)();
|
|
27
31
|
function scrollToEnd() {
|
|
28
32
|
const root = rootRef.current;
|
|
29
33
|
if (!root) return;
|
|
@@ -88,12 +92,15 @@ const VirtualInput = (0, _react.forwardRef)((p, ref) => {
|
|
|
88
92
|
[`${classPrefix}-disabled`]: props.disabled
|
|
89
93
|
}),
|
|
90
94
|
tabIndex: props.disabled ? undefined : 0,
|
|
95
|
+
role: 'option',
|
|
91
96
|
onFocus: onFocus,
|
|
92
97
|
onBlur: onBlur,
|
|
93
98
|
onClick: props.onClick
|
|
94
99
|
}, _react.default.createElement("div", {
|
|
95
100
|
className: `${classPrefix}-content`,
|
|
96
|
-
ref: contentRef
|
|
101
|
+
ref: contentRef,
|
|
102
|
+
"aria-disabled": props.disabled,
|
|
103
|
+
"aria-label": props.placeholder
|
|
97
104
|
}, value, _react.default.createElement("div", {
|
|
98
105
|
className: `${classPrefix}-caret-container`
|
|
99
106
|
}, hasFocus && _react.default.createElement("div", {
|
|
@@ -105,7 +112,9 @@ const VirtualInput = (0, _react.forwardRef)((p, ref) => {
|
|
|
105
112
|
e.stopPropagation();
|
|
106
113
|
setValue('');
|
|
107
114
|
(_a = props.onClear) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
108
|
-
}
|
|
115
|
+
},
|
|
116
|
+
role: 'button',
|
|
117
|
+
"aria-label": locale.Input.clear
|
|
109
118
|
}, _react.default.createElement(_antdMobileIcons.CloseCircleFill, null)), !value && _react.default.createElement("div", {
|
|
110
119
|
className: `${classPrefix}-placeholder`
|
|
111
120
|
}, props.placeholder), keyboardElement));
|
package/cjs/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/cjs/locales/base.d.ts
CHANGED
package/cjs/locales/base.js
CHANGED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
declare const daDK: {
|
|
2
|
+
locale: string;
|
|
3
|
+
common: {
|
|
4
|
+
confirm: string;
|
|
5
|
+
cancel: string;
|
|
6
|
+
loading: string;
|
|
7
|
+
close: string;
|
|
8
|
+
};
|
|
9
|
+
Calendar: {
|
|
10
|
+
markItems: string[];
|
|
11
|
+
renderYearAndMonth: (year: number, month: number) => string;
|
|
12
|
+
};
|
|
13
|
+
Cascader: {
|
|
14
|
+
placeholder: string;
|
|
15
|
+
};
|
|
16
|
+
Dialog: {
|
|
17
|
+
ok: string;
|
|
18
|
+
};
|
|
19
|
+
DatePicker: {
|
|
20
|
+
tillNow: string;
|
|
21
|
+
};
|
|
22
|
+
ErrorBlock: {
|
|
23
|
+
default: {
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
busy: {
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
disconnected: {
|
|
32
|
+
title: string;
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
empty: {
|
|
36
|
+
title: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
Form: {
|
|
41
|
+
required: string;
|
|
42
|
+
optional: string;
|
|
43
|
+
defaultValidateMessages: {
|
|
44
|
+
default: string;
|
|
45
|
+
required: string;
|
|
46
|
+
enum: string;
|
|
47
|
+
whitespace: string;
|
|
48
|
+
date: {
|
|
49
|
+
format: string;
|
|
50
|
+
parse: string;
|
|
51
|
+
invalid: string;
|
|
52
|
+
};
|
|
53
|
+
types: {
|
|
54
|
+
string: string;
|
|
55
|
+
method: string;
|
|
56
|
+
array: string;
|
|
57
|
+
object: string;
|
|
58
|
+
number: string;
|
|
59
|
+
date: string;
|
|
60
|
+
boolean: string;
|
|
61
|
+
integer: string;
|
|
62
|
+
float: string;
|
|
63
|
+
regexp: string;
|
|
64
|
+
email: string;
|
|
65
|
+
url: string;
|
|
66
|
+
hex: string;
|
|
67
|
+
};
|
|
68
|
+
string: {
|
|
69
|
+
len: string;
|
|
70
|
+
min: string;
|
|
71
|
+
max: string;
|
|
72
|
+
range: string;
|
|
73
|
+
};
|
|
74
|
+
number: {
|
|
75
|
+
len: string;
|
|
76
|
+
min: string;
|
|
77
|
+
max: string;
|
|
78
|
+
range: string;
|
|
79
|
+
};
|
|
80
|
+
array: {
|
|
81
|
+
len: string;
|
|
82
|
+
min: string;
|
|
83
|
+
max: string;
|
|
84
|
+
range: string;
|
|
85
|
+
};
|
|
86
|
+
pattern: {
|
|
87
|
+
mismatch: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
ImageUploader: {
|
|
92
|
+
uploading: string;
|
|
93
|
+
upload: string;
|
|
94
|
+
};
|
|
95
|
+
InfiniteScroll: {
|
|
96
|
+
noMore: string;
|
|
97
|
+
failedToLoad: string;
|
|
98
|
+
retry: string;
|
|
99
|
+
};
|
|
100
|
+
Input: {
|
|
101
|
+
clear: string;
|
|
102
|
+
};
|
|
103
|
+
Mask: {
|
|
104
|
+
name: string;
|
|
105
|
+
};
|
|
106
|
+
Modal: {
|
|
107
|
+
ok: string;
|
|
108
|
+
};
|
|
109
|
+
PasscodeInput: {
|
|
110
|
+
name: string;
|
|
111
|
+
};
|
|
112
|
+
PullToRefresh: {
|
|
113
|
+
pulling: string;
|
|
114
|
+
canRelease: string;
|
|
115
|
+
complete: string;
|
|
116
|
+
};
|
|
117
|
+
SearchBar: {
|
|
118
|
+
name: string;
|
|
119
|
+
};
|
|
120
|
+
Slider: {
|
|
121
|
+
name: string;
|
|
122
|
+
};
|
|
123
|
+
Stepper: {
|
|
124
|
+
decrease: string;
|
|
125
|
+
increase: string;
|
|
126
|
+
};
|
|
127
|
+
Switch: {
|
|
128
|
+
name: string;
|
|
129
|
+
};
|
|
130
|
+
Selector: {
|
|
131
|
+
name: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
export default daDK;
|