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
|
@@ -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
|
})
|
|
@@ -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 {
|
|
@@ -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, {
|
|
@@ -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 {
|
|
@@ -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/2x/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/2x/cjs/locales/base.d.ts
CHANGED
package/2x/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;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _mergeLocale = require("../utils/merge-locale");
|
|
8
|
+
var _base = require("./base");
|
|
9
|
+
const typeTemplate = '${label} er ikke gyldig som ${type}';
|
|
10
|
+
const daDK = (0, _mergeLocale.mergeLocale)(_base.base, {
|
|
11
|
+
locale: 'da-DK',
|
|
12
|
+
common: {
|
|
13
|
+
confirm: 'Bekræft',
|
|
14
|
+
cancel: 'Afbestille',
|
|
15
|
+
loading: 'Indlæser',
|
|
16
|
+
close: 'Luk'
|
|
17
|
+
},
|
|
18
|
+
Calendar: {
|
|
19
|
+
markItems: ['ma', 'ti', 'on', 'to', 'fr', 'lø', 'sø'],
|
|
20
|
+
renderYearAndMonth: (year, month) => `${month}.${year}`
|
|
21
|
+
},
|
|
22
|
+
Cascader: {
|
|
23
|
+
placeholder: 'Vælger'
|
|
24
|
+
},
|
|
25
|
+
Dialog: {
|
|
26
|
+
ok: 'Bekræft'
|
|
27
|
+
},
|
|
28
|
+
DatePicker: {
|
|
29
|
+
tillNow: 'Indtil nu'
|
|
30
|
+
},
|
|
31
|
+
ErrorBlock: {
|
|
32
|
+
default: {
|
|
33
|
+
title: 'Oops, noget gik galt',
|
|
34
|
+
description: 'Vent et minut og prøv igen'
|
|
35
|
+
},
|
|
36
|
+
busy: {
|
|
37
|
+
title: 'Oops, ikke indlæser',
|
|
38
|
+
description: 'Prøv at opdatere siden'
|
|
39
|
+
},
|
|
40
|
+
disconnected: {
|
|
41
|
+
title: 'Netværket er optaget',
|
|
42
|
+
description: 'Prøv at opdatere siden'
|
|
43
|
+
},
|
|
44
|
+
empty: {
|
|
45
|
+
title: 'Hmm, kunne ikke finde det...',
|
|
46
|
+
description: 'Vil du prøve en ny søgning?'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
Form: {
|
|
50
|
+
required: 'Påkrævet',
|
|
51
|
+
optional: 'Valgfri',
|
|
52
|
+
defaultValidateMessages: {
|
|
53
|
+
default: 'Feltvalideringsfejl for ${label}',
|
|
54
|
+
required: 'Indtast venligst ${label}',
|
|
55
|
+
enum: '${label} skal være en af [${enum}]',
|
|
56
|
+
whitespace: '${label} kan ikke være et tomt tegn',
|
|
57
|
+
date: {
|
|
58
|
+
format: '${label} datoformatet er ugyldigt',
|
|
59
|
+
parse: '${label} kan ikke konverteres til en dato',
|
|
60
|
+
invalid: '${label} er en ugyldig dato'
|
|
61
|
+
},
|
|
62
|
+
types: {
|
|
63
|
+
string: typeTemplate,
|
|
64
|
+
method: typeTemplate,
|
|
65
|
+
array: typeTemplate,
|
|
66
|
+
object: typeTemplate,
|
|
67
|
+
number: typeTemplate,
|
|
68
|
+
date: typeTemplate,
|
|
69
|
+
boolean: typeTemplate,
|
|
70
|
+
integer: typeTemplate,
|
|
71
|
+
float: typeTemplate,
|
|
72
|
+
regexp: typeTemplate,
|
|
73
|
+
email: typeTemplate,
|
|
74
|
+
url: typeTemplate,
|
|
75
|
+
hex: typeTemplate
|
|
76
|
+
},
|
|
77
|
+
string: {
|
|
78
|
+
len: '${label} må være ${len} tegn',
|
|
79
|
+
min: '${label} skal være mindst ${min} tegn',
|
|
80
|
+
max: '${label} skal være op til ${max} tegn',
|
|
81
|
+
range: '${label} skal være imellem ${min}-${max} tegn'
|
|
82
|
+
},
|
|
83
|
+
number: {
|
|
84
|
+
len: '${label} skal være lig med ${len}',
|
|
85
|
+
min: '${label} skal være minimum ${min}',
|
|
86
|
+
max: '${label} skal være maksimalt ${max}',
|
|
87
|
+
range: '${label} skal være imellem ${min}-${max}'
|
|
88
|
+
},
|
|
89
|
+
array: {
|
|
90
|
+
len: 'Må være ${len} ${label}',
|
|
91
|
+
min: 'I det mindste ${min} ${label}',
|
|
92
|
+
max: 'Højst ${max} ${label}',
|
|
93
|
+
range: 'Mængden af ${label} skal være imellem ${min}-${max}'
|
|
94
|
+
},
|
|
95
|
+
pattern: {
|
|
96
|
+
mismatch: '${label} stemmer ikke overens med mønsteret ${pattern}'
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
ImageUploader: {
|
|
101
|
+
uploading: 'Uploader...',
|
|
102
|
+
upload: 'Upload'
|
|
103
|
+
},
|
|
104
|
+
InfiniteScroll: {
|
|
105
|
+
noMore: 'Ikke mere',
|
|
106
|
+
failedToLoad: 'Kunne ikke indlæses',
|
|
107
|
+
retry: 'Prøve igen'
|
|
108
|
+
},
|
|
109
|
+
Input: {
|
|
110
|
+
clear: 'slette'
|
|
111
|
+
},
|
|
112
|
+
Mask: {
|
|
113
|
+
name: 'Maske'
|
|
114
|
+
},
|
|
115
|
+
Modal: {
|
|
116
|
+
ok: 'Bekræft'
|
|
117
|
+
},
|
|
118
|
+
PullToRefresh: {
|
|
119
|
+
pulling: 'Rul ned for at opdatere',
|
|
120
|
+
canRelease: 'Slip for at opdatere med det samme',
|
|
121
|
+
complete: 'Opdatering lykkedes'
|
|
122
|
+
},
|
|
123
|
+
Stepper: {
|
|
124
|
+
decrease: 'aftage',
|
|
125
|
+
increase: 'øge'
|
|
126
|
+
},
|
|
127
|
+
Selector: {
|
|
128
|
+
name: 'Vælger'
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
var _default = daDK;
|
|
132
|
+
exports.default = _default;
|