antd-mobile 5.32.0 → 5.32.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 +385 -302
- package/2x/bundle/antd-mobile.cjs.js +9 -9
- package/2x/bundle/antd-mobile.es.development.js +385 -302
- package/2x/bundle/antd-mobile.es.js +5266 -5213
- package/2x/bundle/antd-mobile.umd.development.js +385 -302
- package/2x/bundle/antd-mobile.umd.js +9 -9
- package/2x/bundle/style.css +15 -15
- package/2x/cjs/components/action-sheet/action-sheet.css +1 -1
- package/2x/cjs/components/button/button.css +2 -2
- package/2x/cjs/components/calendar/calendar.js +5 -1
- package/2x/cjs/components/center-popup/center-popup.js +6 -5
- package/2x/cjs/components/collapse/collapse.js +27 -12
- package/2x/cjs/components/ellipsis/ellipsis.js +4 -4
- package/2x/cjs/components/error-block/create-error-block.js +4 -4
- package/2x/cjs/components/error-block/error-block.css +1 -1
- package/2x/cjs/components/floating-panel/floating-panel.js +8 -7
- package/2x/cjs/components/form/form-item.d.ts +1 -1
- package/2x/cjs/components/form/form-item.js +6 -9
- package/2x/cjs/components/form/form.css +1 -1
- package/2x/cjs/components/form/index.css +1 -1
- package/2x/cjs/components/image-uploader/image-uploader.css +1 -1
- package/2x/cjs/components/input/input.d.ts +2 -8
- package/2x/cjs/components/notice-bar/notice-bar.css +2 -2
- package/2x/cjs/components/number-keyboard/number-keyboard.css +2 -2
- package/2x/cjs/components/picker-view/wheel.js +61 -14
- package/2x/cjs/components/popover/popover-menu.css +2 -2
- package/2x/cjs/components/progress-bar/progress-bar.css +1 -1
- package/2x/cjs/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/2x/cjs/components/rate/rate.d.ts +1 -1
- package/2x/cjs/components/steps/steps.js +5 -5
- package/2x/cjs/components/swipe-action/swipe-action.d.ts +4 -3
- package/2x/cjs/components/tag/tag.js +1 -1
- package/2x/cjs/components/text-area/text-area.js +11 -2
- package/2x/cjs/components/toast/toast.css +2 -2
- package/2x/cjs/components/water-mark/water-mark.js +1 -1
- package/2x/cjs/locales/base.d.ts +1 -1
- package/2x/cjs/locales/base.js +1 -1
- package/2x/cjs/locales/da-DK.d.ts +1 -1
- package/2x/cjs/locales/da-DK.js +1 -1
- package/2x/cjs/locales/en-US.d.ts +1 -1
- package/2x/cjs/locales/es-ES.d.ts +1 -1
- package/2x/cjs/locales/es-ES.js +1 -1
- package/2x/cjs/locales/fa-IR.d.ts +1 -1
- package/2x/cjs/locales/fa-IR.js +1 -1
- package/2x/cjs/locales/fr-FR.d.ts +1 -1
- package/2x/cjs/locales/fr-FR.js +1 -1
- package/2x/cjs/locales/id-ID.d.ts +1 -1
- package/2x/cjs/locales/id-ID.js +1 -1
- package/2x/cjs/locales/it-IT.d.ts +1 -1
- package/2x/cjs/locales/it-IT.js +1 -1
- package/2x/cjs/locales/ja-JP.d.ts +1 -1
- package/2x/cjs/locales/ja-JP.js +1 -1
- package/2x/cjs/locales/kk-KZ.d.ts +1 -1
- package/2x/cjs/locales/kk-KZ.js +1 -1
- package/2x/cjs/locales/ko-KR.d.ts +1 -1
- package/2x/cjs/locales/ko-KR.js +1 -1
- package/2x/cjs/locales/nb-NO.d.ts +1 -1
- package/2x/cjs/locales/nb-NO.js +1 -1
- package/2x/cjs/locales/nl-NL.d.ts +1 -1
- package/2x/cjs/locales/nl-NL.js +1 -1
- package/2x/cjs/locales/ru-RU.d.ts +1 -1
- package/2x/cjs/locales/ru-RU.js +1 -1
- package/2x/cjs/locales/zh-CN.d.ts +1 -1
- package/2x/cjs/locales/zh-CN.js +1 -1
- package/2x/cjs/locales/zh-HK.d.ts +1 -1
- package/2x/cjs/locales/zh-HK.js +1 -1
- package/2x/cjs/locales/zh-TW.d.ts +1 -1
- package/2x/cjs/locales/zh-TW.js +1 -1
- package/2x/cjs/utils/replace-message.d.ts +1 -0
- package/2x/cjs/utils/replace-message.js +13 -0
- package/2x/cjs/utils/use-lock-scroll.js +6 -2
- package/2x/es/components/action-sheet/action-sheet.css +1 -1
- package/2x/es/components/button/button.css +2 -2
- package/2x/es/components/calendar/calendar.js +5 -1
- package/2x/es/components/center-popup/center-popup.js +6 -5
- package/2x/es/components/collapse/collapse.js +27 -12
- package/2x/es/components/ellipsis/ellipsis.js +4 -4
- package/2x/es/components/error-block/create-error-block.js +4 -4
- package/2x/es/components/error-block/error-block.css +1 -1
- package/2x/es/components/floating-panel/floating-panel.js +8 -7
- package/2x/es/components/form/form-item.d.ts +1 -1
- package/2x/es/components/form/form-item.js +6 -9
- package/2x/es/components/form/form.css +1 -1
- package/2x/es/components/form/index.css +1 -1
- package/2x/es/components/image-uploader/image-uploader.css +1 -1
- package/2x/es/components/input/input.d.ts +2 -8
- package/2x/es/components/notice-bar/notice-bar.css +2 -2
- package/2x/es/components/number-keyboard/number-keyboard.css +2 -2
- package/2x/es/components/picker-view/wheel.js +61 -14
- package/2x/es/components/popover/popover-menu.css +2 -2
- package/2x/es/components/progress-bar/progress-bar.css +1 -1
- package/2x/es/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/2x/es/components/rate/rate.d.ts +1 -1
- package/2x/es/components/steps/steps.js +5 -5
- package/2x/es/components/swipe-action/swipe-action.d.ts +4 -3
- package/2x/es/components/tag/tag.js +1 -1
- package/2x/es/components/text-area/text-area.js +11 -2
- package/2x/es/components/toast/toast.css +2 -2
- package/2x/es/components/water-mark/water-mark.js +1 -1
- package/2x/es/locales/base.d.ts +1 -1
- package/2x/es/locales/base.js +1 -1
- package/2x/es/locales/da-DK.d.ts +1 -1
- package/2x/es/locales/da-DK.js +1 -1
- package/2x/es/locales/en-US.d.ts +1 -1
- package/2x/es/locales/es-ES.d.ts +1 -1
- package/2x/es/locales/es-ES.js +1 -1
- package/2x/es/locales/fa-IR.d.ts +1 -1
- package/2x/es/locales/fa-IR.js +1 -1
- package/2x/es/locales/fr-FR.d.ts +1 -1
- package/2x/es/locales/fr-FR.js +1 -1
- package/2x/es/locales/id-ID.d.ts +1 -1
- package/2x/es/locales/id-ID.js +1 -1
- package/2x/es/locales/it-IT.d.ts +1 -1
- package/2x/es/locales/it-IT.js +1 -1
- package/2x/es/locales/ja-JP.d.ts +1 -1
- package/2x/es/locales/ja-JP.js +1 -1
- package/2x/es/locales/kk-KZ.d.ts +1 -1
- package/2x/es/locales/kk-KZ.js +1 -1
- package/2x/es/locales/ko-KR.d.ts +1 -1
- package/2x/es/locales/ko-KR.js +1 -1
- package/2x/es/locales/nb-NO.d.ts +1 -1
- package/2x/es/locales/nb-NO.js +1 -1
- package/2x/es/locales/nl-NL.d.ts +1 -1
- package/2x/es/locales/nl-NL.js +1 -1
- package/2x/es/locales/ru-RU.d.ts +1 -1
- package/2x/es/locales/ru-RU.js +1 -1
- package/2x/es/locales/zh-CN.d.ts +1 -1
- package/2x/es/locales/zh-CN.js +1 -1
- package/2x/es/locales/zh-HK.d.ts +1 -1
- package/2x/es/locales/zh-HK.js +1 -1
- package/2x/es/locales/zh-TW.d.ts +1 -1
- package/2x/es/locales/zh-TW.js +1 -1
- package/2x/es/utils/replace-message.d.ts +1 -0
- package/2x/es/utils/replace-message.js +7 -0
- package/2x/es/utils/use-lock-scroll.js +6 -2
- package/2x/package.json +1 -1
- package/bundle/antd-mobile.cjs.development.js +385 -302
- package/bundle/antd-mobile.cjs.js +9 -9
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +385 -302
- package/bundle/antd-mobile.es.js +5266 -5213
- package/bundle/antd-mobile.umd.development.js +385 -302
- 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/button/button.css +2 -2
- package/cjs/components/calendar/calendar.js +5 -1
- package/cjs/components/center-popup/center-popup.js +6 -5
- package/cjs/components/collapse/collapse.js +27 -12
- package/cjs/components/ellipsis/ellipsis.js +4 -4
- package/cjs/components/error-block/create-error-block.js +4 -4
- package/cjs/components/error-block/error-block.css +1 -1
- package/cjs/components/floating-panel/floating-panel.js +8 -7
- package/cjs/components/form/form-item.d.ts +1 -1
- package/cjs/components/form/form-item.js +6 -9
- package/cjs/components/form/form.css +1 -1
- package/cjs/components/form/index.css +1 -1
- package/cjs/components/image-uploader/image-uploader.css +1 -1
- package/cjs/components/input/input.d.ts +2 -8
- package/cjs/components/notice-bar/notice-bar.css +2 -2
- package/cjs/components/number-keyboard/number-keyboard.css +2 -2
- package/cjs/components/picker-view/wheel.js +61 -14
- package/cjs/components/popover/popover-menu.css +2 -2
- package/cjs/components/progress-bar/progress-bar.css +1 -1
- package/cjs/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/cjs/components/rate/rate.d.ts +1 -1
- package/cjs/components/steps/steps.js +5 -5
- package/cjs/components/swipe-action/swipe-action.d.ts +4 -3
- package/cjs/components/tag/tag.js +1 -1
- package/cjs/components/text-area/text-area.js +11 -2
- package/cjs/components/toast/toast.css +2 -2
- package/cjs/components/water-mark/water-mark.js +1 -1
- package/cjs/locales/base.d.ts +1 -1
- package/cjs/locales/base.js +1 -1
- package/cjs/locales/da-DK.d.ts +1 -1
- package/cjs/locales/da-DK.js +1 -1
- package/cjs/locales/en-US.d.ts +1 -1
- package/cjs/locales/es-ES.d.ts +1 -1
- package/cjs/locales/es-ES.js +1 -1
- package/cjs/locales/fa-IR.d.ts +1 -1
- package/cjs/locales/fa-IR.js +1 -1
- package/cjs/locales/fr-FR.d.ts +1 -1
- package/cjs/locales/fr-FR.js +1 -1
- package/cjs/locales/id-ID.d.ts +1 -1
- package/cjs/locales/id-ID.js +1 -1
- package/cjs/locales/it-IT.d.ts +1 -1
- package/cjs/locales/it-IT.js +1 -1
- package/cjs/locales/ja-JP.d.ts +1 -1
- package/cjs/locales/ja-JP.js +1 -1
- package/cjs/locales/kk-KZ.d.ts +1 -1
- package/cjs/locales/kk-KZ.js +1 -1
- package/cjs/locales/ko-KR.d.ts +1 -1
- package/cjs/locales/ko-KR.js +1 -1
- package/cjs/locales/nb-NO.d.ts +1 -1
- package/cjs/locales/nb-NO.js +1 -1
- package/cjs/locales/nl-NL.d.ts +1 -1
- package/cjs/locales/nl-NL.js +1 -1
- package/cjs/locales/ru-RU.d.ts +1 -1
- package/cjs/locales/ru-RU.js +1 -1
- package/cjs/locales/zh-CN.d.ts +1 -1
- package/cjs/locales/zh-CN.js +1 -1
- package/cjs/locales/zh-HK.d.ts +1 -1
- package/cjs/locales/zh-HK.js +1 -1
- package/cjs/locales/zh-TW.d.ts +1 -1
- package/cjs/locales/zh-TW.js +1 -1
- package/cjs/utils/replace-message.d.ts +1 -0
- package/cjs/utils/replace-message.js +13 -0
- package/cjs/utils/use-lock-scroll.js +6 -2
- package/es/components/action-sheet/action-sheet.css +1 -1
- package/es/components/button/button.css +2 -2
- package/es/components/calendar/calendar.js +5 -1
- package/es/components/center-popup/center-popup.js +6 -5
- package/es/components/collapse/collapse.js +27 -12
- package/es/components/ellipsis/ellipsis.js +4 -4
- package/es/components/error-block/create-error-block.js +4 -4
- package/es/components/error-block/error-block.css +1 -1
- package/es/components/floating-panel/floating-panel.js +8 -7
- package/es/components/form/form-item.d.ts +1 -1
- package/es/components/form/form-item.js +6 -9
- package/es/components/form/form.css +1 -1
- package/es/components/form/index.css +1 -1
- package/es/components/image-uploader/image-uploader.css +1 -1
- package/es/components/input/input.d.ts +2 -8
- package/es/components/notice-bar/notice-bar.css +2 -2
- package/es/components/number-keyboard/number-keyboard.css +2 -2
- package/es/components/picker-view/wheel.js +61 -14
- package/es/components/popover/popover-menu.css +2 -2
- package/es/components/progress-bar/progress-bar.css +1 -1
- package/es/components/pull-to-refresh/pull-to-refresh.js +1 -1
- package/es/components/rate/rate.d.ts +1 -1
- package/es/components/steps/steps.js +5 -5
- package/es/components/swipe-action/swipe-action.d.ts +4 -3
- package/es/components/tag/tag.js +1 -1
- package/es/components/text-area/text-area.js +11 -2
- package/es/components/toast/toast.css +2 -2
- package/es/components/water-mark/water-mark.js +1 -1
- package/es/locales/base.d.ts +1 -1
- package/es/locales/base.js +1 -1
- package/es/locales/da-DK.d.ts +1 -1
- package/es/locales/da-DK.js +1 -1
- package/es/locales/en-US.d.ts +1 -1
- package/es/locales/es-ES.d.ts +1 -1
- package/es/locales/es-ES.js +1 -1
- package/es/locales/fa-IR.d.ts +1 -1
- package/es/locales/fa-IR.js +1 -1
- package/es/locales/fr-FR.d.ts +1 -1
- package/es/locales/fr-FR.js +1 -1
- package/es/locales/id-ID.d.ts +1 -1
- package/es/locales/id-ID.js +1 -1
- package/es/locales/it-IT.d.ts +1 -1
- package/es/locales/it-IT.js +1 -1
- package/es/locales/ja-JP.d.ts +1 -1
- package/es/locales/ja-JP.js +1 -1
- package/es/locales/kk-KZ.d.ts +1 -1
- package/es/locales/kk-KZ.js +1 -1
- package/es/locales/ko-KR.d.ts +1 -1
- package/es/locales/ko-KR.js +1 -1
- package/es/locales/nb-NO.d.ts +1 -1
- package/es/locales/nb-NO.js +1 -1
- package/es/locales/nl-NL.d.ts +1 -1
- package/es/locales/nl-NL.js +1 -1
- package/es/locales/ru-RU.d.ts +1 -1
- package/es/locales/ru-RU.js +1 -1
- package/es/locales/zh-CN.d.ts +1 -1
- package/es/locales/zh-CN.js +1 -1
- package/es/locales/zh-HK.d.ts +1 -1
- package/es/locales/zh-HK.js +1 -1
- package/es/locales/zh-TW.d.ts +1 -1
- package/es/locales/zh-TW.js +1 -1
- package/es/utils/replace-message.d.ts +1 -0
- package/es/utils/replace-message.js +7 -0
- package/es/utils/use-lock-scroll.js +6 -2
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.adm-notice-bar {
|
|
2
2
|
--background-color: #ababab;
|
|
3
|
-
--border-color:
|
|
3
|
+
--border-color: var(--adm-color-weak);
|
|
4
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);
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
.adm-notice-bar.adm-notice-bar-info {
|
|
35
35
|
--background-color: #d0e4ff;
|
|
36
36
|
--border-color: #bcd8ff;
|
|
37
|
-
--text-color:
|
|
37
|
+
--text-color: var(--adm-color-primary);
|
|
38
38
|
}
|
|
39
39
|
.adm-notice-bar .adm-notice-bar-left {
|
|
40
40
|
flex-shrink: 0;
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
left: 50%;
|
|
74
74
|
width: 100%;
|
|
75
75
|
height: 100%;
|
|
76
|
-
background-color:
|
|
76
|
+
background-color: var(--adm-color-text-dark-solid);
|
|
77
77
|
border: inherit;
|
|
78
|
-
border-color:
|
|
78
|
+
border-color: var(--adm-color-text-dark-solid);
|
|
79
79
|
border-radius: inherit;
|
|
80
80
|
transform: translate(-50%, -50%);
|
|
81
81
|
opacity: 0;
|
|
@@ -69,17 +69,66 @@ export const Wheel = memo(props => {
|
|
|
69
69
|
if (!item) return;
|
|
70
70
|
onSelect(item.value);
|
|
71
71
|
}
|
|
72
|
+
const handleGestureState = state => {
|
|
73
|
+
const {
|
|
74
|
+
direction: [, direction],
|
|
75
|
+
distance: [, distance],
|
|
76
|
+
velocity: [, velocity],
|
|
77
|
+
offset: [, offset],
|
|
78
|
+
last
|
|
79
|
+
} = state;
|
|
80
|
+
return {
|
|
81
|
+
direction,
|
|
82
|
+
distance,
|
|
83
|
+
velocity,
|
|
84
|
+
offset,
|
|
85
|
+
last
|
|
86
|
+
};
|
|
87
|
+
};
|
|
72
88
|
const handleDrag = state => {
|
|
73
89
|
draggingRef.current = true;
|
|
74
90
|
const min = -((column.length - 1) * itemHeight.current);
|
|
75
91
|
const max = 0;
|
|
76
|
-
|
|
92
|
+
const {
|
|
93
|
+
direction,
|
|
94
|
+
last,
|
|
95
|
+
velocity,
|
|
96
|
+
offset
|
|
97
|
+
} = handleGestureState(state);
|
|
98
|
+
if (last) {
|
|
99
|
+
draggingRef.current = false;
|
|
100
|
+
const position = offset + velocity * direction * 50;
|
|
101
|
+
const boundNum = bound(position, min, max);
|
|
102
|
+
const targetIndex = -Math.round(boundNum / itemHeight.current);
|
|
103
|
+
scrollSelect(targetIndex);
|
|
104
|
+
} else {
|
|
105
|
+
const position = offset;
|
|
106
|
+
api.start({
|
|
107
|
+
y: rubberbandIfOutOfBounds(position, min, max, itemHeight.current * 50, 0.2)
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
const handleWheel = state => {
|
|
112
|
+
draggingRef.current = true;
|
|
113
|
+
const min = -((column.length - 1) * itemHeight.current);
|
|
114
|
+
const max = 0;
|
|
115
|
+
const {
|
|
116
|
+
direction,
|
|
117
|
+
last,
|
|
118
|
+
velocity,
|
|
119
|
+
distance
|
|
120
|
+
} = handleGestureState(state);
|
|
121
|
+
const whellDir = -direction; // 取反
|
|
122
|
+
const scrollY = y.get();
|
|
123
|
+
if (last) {
|
|
77
124
|
draggingRef.current = false;
|
|
78
|
-
const
|
|
79
|
-
const
|
|
125
|
+
const speed = velocity * whellDir * 50;
|
|
126
|
+
const position = scrollY + distance * whellDir + speed;
|
|
127
|
+
const boundNum = bound(position, min, max);
|
|
128
|
+
const targetIndex = -Math.round(boundNum / itemHeight.current);
|
|
80
129
|
scrollSelect(targetIndex);
|
|
81
130
|
} else {
|
|
82
|
-
const position =
|
|
131
|
+
const position = scrollY + distance * whellDir;
|
|
83
132
|
api.start({
|
|
84
133
|
y: rubberbandIfOutOfBounds(position, min, max, itemHeight.current * 50, 0.2)
|
|
85
134
|
});
|
|
@@ -99,15 +148,15 @@ export const Wheel = memo(props => {
|
|
|
99
148
|
});
|
|
100
149
|
useWheel(state => {
|
|
101
150
|
state.event.stopPropagation();
|
|
102
|
-
|
|
151
|
+
handleWheel(state);
|
|
103
152
|
}, {
|
|
153
|
+
target: props.mouseWheel ? rootRef : undefined,
|
|
104
154
|
axis: 'y',
|
|
105
155
|
from: () => [0, y.get()],
|
|
106
156
|
preventDefault: true,
|
|
107
|
-
target: props.mouseWheel ? rootRef : undefined,
|
|
108
157
|
eventOptions: supportsPassive ? {
|
|
109
158
|
passive: false
|
|
110
|
-
} :
|
|
159
|
+
} : undefined
|
|
111
160
|
});
|
|
112
161
|
let selectedIndex = null;
|
|
113
162
|
function renderAccessible() {
|
|
@@ -120,13 +169,13 @@ export const Wheel = memo(props => {
|
|
|
120
169
|
const previous = column[previousIndex];
|
|
121
170
|
const next = column[nextIndex];
|
|
122
171
|
return React.createElement("div", {
|
|
123
|
-
className:
|
|
172
|
+
className: `${classPrefix}-column-accessible`
|
|
124
173
|
}, React.createElement("div", {
|
|
125
|
-
className:
|
|
174
|
+
className: `${classPrefix}-column-accessible-current`,
|
|
126
175
|
role: 'button',
|
|
127
176
|
"aria-label": current ? `当前选择的是:${current.label}` : '当前未选择'
|
|
128
177
|
}, "-"), React.createElement("div", {
|
|
129
|
-
className:
|
|
178
|
+
className: `${classPrefix}-column-accessible-button`,
|
|
130
179
|
onClick: () => {
|
|
131
180
|
if (!previous) return;
|
|
132
181
|
scrollSelect(previousIndex);
|
|
@@ -134,7 +183,7 @@ export const Wheel = memo(props => {
|
|
|
134
183
|
role: previous ? 'button' : 'text',
|
|
135
184
|
"aria-label": !previous ? '没有上一项' : `选择上一项:${previous.label}`
|
|
136
185
|
}, "-"), React.createElement("div", {
|
|
137
|
-
className:
|
|
186
|
+
className: `${classPrefix}-column-accessible-button`,
|
|
138
187
|
onClick: () => {
|
|
139
188
|
if (!next) return;
|
|
140
189
|
scrollSelect(nextIndex);
|
|
@@ -180,9 +229,7 @@ export const Wheel = memo(props => {
|
|
|
180
229
|
if (prev.onSelect !== next.onSelect) return false;
|
|
181
230
|
if (prev.renderLabel !== next.renderLabel) return false;
|
|
182
231
|
if (prev.mouseWheel !== next.mouseWheel) return false;
|
|
183
|
-
if (!isEqual(prev.column, next.column))
|
|
184
|
-
return false;
|
|
185
|
-
}
|
|
232
|
+
if (!isEqual(prev.column, next.column)) return false;
|
|
186
233
|
return true;
|
|
187
234
|
});
|
|
188
235
|
Wheel.displayName = 'Wheel';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.adm-popover-menu {
|
|
2
|
-
--border-color:
|
|
2
|
+
--border-color: var(--adm-color-border);
|
|
3
3
|
}
|
|
4
4
|
.adm-popover-menu.adm-popover {
|
|
5
5
|
--content-padding: 0;
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
border-bottom: solid 1px var(--border-color);
|
|
48
48
|
}
|
|
49
49
|
.adm-popover.adm-popover-dark.adm-popover-menu {
|
|
50
|
-
--border-color:
|
|
50
|
+
--border-color: var(--adm-color-text);
|
|
51
51
|
--background: rgba(0, 0, 0, 0.9);
|
|
52
52
|
}
|
|
@@ -9,5 +9,5 @@ export declare type RateProps = {
|
|
|
9
9
|
readOnly?: boolean;
|
|
10
10
|
value?: number;
|
|
11
11
|
onChange?: (value: number) => void;
|
|
12
|
-
} & NativeProps<'--star-size' | '--active-color' | '--inactive-color'>;
|
|
12
|
+
} & NativeProps<'--star-size' | '--active-color' | '--inactive-color' | '--inactive-color-half'>;
|
|
13
13
|
export declare const Rate: FC<RateProps>;
|
|
@@ -25,14 +25,14 @@ export const Steps = p => {
|
|
|
25
25
|
if (!React.isValidElement(child)) {
|
|
26
26
|
return child;
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
let status =
|
|
28
|
+
const childProps = child.props;
|
|
29
|
+
let status = childProps.status || 'wait';
|
|
30
30
|
if (index < current) {
|
|
31
|
-
status =
|
|
31
|
+
status = childProps.status || 'finish';
|
|
32
32
|
} else if (index === current) {
|
|
33
|
-
status =
|
|
33
|
+
status = childProps.status || 'process';
|
|
34
34
|
}
|
|
35
|
-
const icon = (_a =
|
|
35
|
+
const icon = (_a = childProps.icon) !== null && _a !== void 0 ? _a : defaultIcon;
|
|
36
36
|
return React.cloneElement(child, {
|
|
37
37
|
status,
|
|
38
38
|
icon
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
import { PropagationEvent } from '../../utils/with-stop-propagation';
|
|
4
|
+
declare type SideType = 'left' | 'right';
|
|
4
5
|
export declare type SwipeActionRef = {
|
|
5
6
|
close: () => void;
|
|
6
|
-
show: (side?:
|
|
7
|
+
show: (side?: SideType) => void;
|
|
7
8
|
};
|
|
8
9
|
declare type ActionColor = 'light' | 'weak' | 'primary' | 'success' | 'warning' | 'danger';
|
|
9
10
|
export declare type Action = {
|
|
@@ -20,7 +21,7 @@ export declare type SwipeActionProps = {
|
|
|
20
21
|
closeOnAction?: boolean;
|
|
21
22
|
children: ReactNode;
|
|
22
23
|
stopPropagation?: PropagationEvent[];
|
|
23
|
-
onActionsReveal?: (side:
|
|
24
|
+
onActionsReveal?: (side: SideType) => void;
|
|
24
25
|
} & NativeProps<'--background'>;
|
|
25
26
|
export declare const SwipeAction: React.ForwardRefExoticComponent<{
|
|
26
27
|
rightActions?: Action[] | undefined;
|
|
@@ -30,7 +31,7 @@ export declare const SwipeAction: React.ForwardRefExoticComponent<{
|
|
|
30
31
|
closeOnAction?: boolean | undefined;
|
|
31
32
|
children: ReactNode;
|
|
32
33
|
stopPropagation?: "click"[] | undefined;
|
|
33
|
-
onActionsReveal?: ((side:
|
|
34
|
+
onActionsReveal?: ((side: SideType) => void) | undefined;
|
|
34
35
|
} & {
|
|
35
36
|
className?: string | undefined;
|
|
36
37
|
style?: (React.CSSProperties & Partial<Record<"--background", string>>) | undefined;
|
package/es/components/tag/tag.js
CHANGED
|
@@ -4,7 +4,7 @@ import { withNativeProps } from '../../utils/native-props';
|
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
const classPrefix = `adm-tag`;
|
|
6
6
|
const colorRecord = {
|
|
7
|
-
default: '#666666',
|
|
7
|
+
default: 'var(--adm-color-text-secondary, #666666)',
|
|
8
8
|
primary: 'var(--adm-color-primary, #1677ff)',
|
|
9
9
|
success: 'var(--adm-color-success, #00b578)',
|
|
10
10
|
warning: 'var(--adm-color-warning, #ff8f1f)',
|
|
@@ -77,12 +77,21 @@ export const TextArea = forwardRef((p, ref) => {
|
|
|
77
77
|
className: `${classPrefix}-count`
|
|
78
78
|
}, maxLength === undefined ? valueLength : valueLength + '/' + maxLength);
|
|
79
79
|
}
|
|
80
|
+
let rows = props.rows;
|
|
81
|
+
if (typeof autoSize === 'object') {
|
|
82
|
+
if (autoSize.maxRows && rows > autoSize.maxRows) {
|
|
83
|
+
rows = autoSize.maxRows;
|
|
84
|
+
}
|
|
85
|
+
if (autoSize.minRows && rows < autoSize.minRows) {
|
|
86
|
+
rows = autoSize.minRows;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
80
89
|
return withNativeProps(props, React.createElement("div", {
|
|
81
90
|
className: classPrefix
|
|
82
91
|
}, React.createElement("textarea", {
|
|
83
92
|
ref: nativeTextAreaRef,
|
|
84
93
|
className: `${classPrefix}-element`,
|
|
85
|
-
rows:
|
|
94
|
+
rows: rows,
|
|
86
95
|
value: value,
|
|
87
96
|
placeholder: props.placeholder,
|
|
88
97
|
onChange: e => {
|
|
@@ -119,7 +128,7 @@ export const TextArea = forwardRef((p, ref) => {
|
|
|
119
128
|
ref: hiddenTextAreaRef,
|
|
120
129
|
className: `${classPrefix}-element ${classPrefix}-element-hidden`,
|
|
121
130
|
value: value,
|
|
122
|
-
rows:
|
|
131
|
+
rows: rows,
|
|
123
132
|
"aria-hidden": true,
|
|
124
133
|
readOnly: true
|
|
125
134
|
})));
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
left: 0;
|
|
5
5
|
width: 100%;
|
|
6
6
|
height: 100%;
|
|
7
|
+
text-align: center;
|
|
7
8
|
}
|
|
8
9
|
.adm-toast-mask .adm-toast-main {
|
|
9
10
|
display: inline-block;
|
|
10
11
|
position: relative;
|
|
11
12
|
top: 50%;
|
|
12
|
-
|
|
13
|
-
transform: translate(-50%, -50%);
|
|
13
|
+
transform: translateY(-50%);
|
|
14
14
|
width: auto;
|
|
15
15
|
max-width: 204px;
|
|
16
16
|
max-height: 70%;
|
package/es/locales/base.d.ts
CHANGED
package/es/locales/base.js
CHANGED
package/es/locales/da-DK.d.ts
CHANGED
package/es/locales/da-DK.js
CHANGED
package/es/locales/en-US.d.ts
CHANGED
package/es/locales/es-ES.d.ts
CHANGED
package/es/locales/es-ES.js
CHANGED
|
@@ -10,7 +10,7 @@ const esES = mergeLocale(base, {
|
|
|
10
10
|
},
|
|
11
11
|
Calendar: {
|
|
12
12
|
markItems: ['Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sab', 'Dom'],
|
|
13
|
-
|
|
13
|
+
yearAndMonth: '${year}/${month}'
|
|
14
14
|
},
|
|
15
15
|
Cascader: {
|
|
16
16
|
placeholder: 'Seleccionando'
|
package/es/locales/fa-IR.d.ts
CHANGED
package/es/locales/fa-IR.js
CHANGED
|
@@ -9,7 +9,7 @@ const faIR = mergeLocale(base, {
|
|
|
9
9
|
},
|
|
10
10
|
Calendar: {
|
|
11
11
|
markItems: ['شنبه', 'یکشنبه', 'دوشنبه', 'سهشنبه', 'چهارشنبه', 'پنجنشبه', 'جمعه'],
|
|
12
|
-
|
|
12
|
+
yearAndMonth: '${year}/${month}'
|
|
13
13
|
},
|
|
14
14
|
Cascader: {
|
|
15
15
|
placeholder: 'انتخاب کنید'
|
package/es/locales/fr-FR.d.ts
CHANGED
package/es/locales/fr-FR.js
CHANGED
|
@@ -10,7 +10,7 @@ const frFR = mergeLocale(base, {
|
|
|
10
10
|
},
|
|
11
11
|
Calendar: {
|
|
12
12
|
markItems: ['un', 'deux', 'trois', 'quatre', 'cinq', 'six', 'sept'],
|
|
13
|
-
|
|
13
|
+
yearAndMonth: '${year}Année ${month}Mois'
|
|
14
14
|
},
|
|
15
15
|
Cascader: {
|
|
16
16
|
placeholder: 'Veuillez sélectionner'
|
package/es/locales/id-ID.d.ts
CHANGED
package/es/locales/id-ID.js
CHANGED
|
@@ -10,7 +10,7 @@ const idID = mergeLocale(base, {
|
|
|
10
10
|
},
|
|
11
11
|
Calendar: {
|
|
12
12
|
markItems: ['Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu', 'Minggu'],
|
|
13
|
-
|
|
13
|
+
yearAndMonth: '${year} Tahun ${month} Bulan'
|
|
14
14
|
},
|
|
15
15
|
Cascader: {
|
|
16
16
|
placeholder: 'Silahkan Pilih'
|
package/es/locales/it-IT.d.ts
CHANGED
package/es/locales/it-IT.js
CHANGED
|
@@ -11,7 +11,7 @@ const itIT = mergeLocale(base, {
|
|
|
11
11
|
},
|
|
12
12
|
Calendar: {
|
|
13
13
|
markItems: ['lun', 'mar', 'mer', 'gio', 'ven', 'sab', 'dom'],
|
|
14
|
-
|
|
14
|
+
yearAndMonth: '${month}/${year}'
|
|
15
15
|
},
|
|
16
16
|
Cascader: {
|
|
17
17
|
placeholder: 'Si prega di selezionare'
|
package/es/locales/ja-JP.d.ts
CHANGED
package/es/locales/ja-JP.js
CHANGED
package/es/locales/kk-KZ.d.ts
CHANGED
package/es/locales/kk-KZ.js
CHANGED
|
@@ -10,7 +10,7 @@ const kkKZ = mergeLocale(base, {
|
|
|
10
10
|
},
|
|
11
11
|
Calendar: {
|
|
12
12
|
markItems: ['Дү', 'Се', 'Сә', 'Бе', 'Жұ', 'Се', 'Же'],
|
|
13
|
-
|
|
13
|
+
yearAndMonth: '${year}жыл${month}-ші ай'
|
|
14
14
|
},
|
|
15
15
|
Cascader: {
|
|
16
16
|
placeholder: 'Таңдаңыз'
|
package/es/locales/ko-KR.d.ts
CHANGED
package/es/locales/ko-KR.js
CHANGED
package/es/locales/nb-NO.d.ts
CHANGED
package/es/locales/nb-NO.js
CHANGED
package/es/locales/nl-NL.d.ts
CHANGED
package/es/locales/nl-NL.js
CHANGED
package/es/locales/ru-RU.d.ts
CHANGED
package/es/locales/ru-RU.js
CHANGED
package/es/locales/zh-CN.d.ts
CHANGED
package/es/locales/zh-CN.js
CHANGED
package/es/locales/zh-HK.d.ts
CHANGED
package/es/locales/zh-HK.js
CHANGED