antd-mobile 5.0.0-rc.19 → 5.0.0-rc.22
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/README.md +1 -1
- package/2x/cjs/components/avatar/avatar.d.ts +1 -1
- package/2x/cjs/components/badge/badge.css +1 -1
- package/2x/cjs/components/button/button.css +4 -3
- package/2x/cjs/components/calendar/calendar.js +4 -0
- package/2x/cjs/components/capsule-tabs/capsule-tabs.css +1 -1
- package/2x/cjs/components/check-list/check-list.css +0 -4
- package/2x/cjs/components/checkbox/checkbox.css +6 -16
- package/2x/cjs/components/checkbox/checkbox.js +1 -1
- package/2x/cjs/components/date-picker/date-picker.d.ts +2 -2
- package/2x/cjs/components/dialog/dialog-action-button.js +1 -0
- package/2x/cjs/components/dialog/dialog.css +15 -0
- package/2x/cjs/components/dialog/dialog.js +4 -2
- package/2x/cjs/components/error-block/error-block.d.ts +1 -1
- package/2x/cjs/components/floating-panel/floating-panel.d.ts +2 -0
- package/2x/cjs/components/floating-panel/floating-panel.js +5 -0
- package/2x/cjs/components/form/form-item.css +5 -0
- package/2x/cjs/components/form/form.css +10 -0
- package/2x/cjs/components/form/form.js +1 -5
- package/2x/cjs/components/form/index.css +15 -0
- package/2x/cjs/components/image/image.d.ts +1 -0
- package/2x/cjs/components/image/image.js +4 -1
- package/2x/cjs/components/input/input.css +28 -25
- package/2x/cjs/components/input/input.d.ts +2 -2
- package/2x/cjs/components/input/input.js +7 -3
- package/2x/cjs/components/jumbo-tabs/jumbo-tabs.css +4 -1
- package/2x/cjs/components/list/list-item.js +1 -1
- package/2x/cjs/components/list/list.css +3 -5
- package/2x/cjs/components/list/list.d.ts +1 -1
- package/2x/cjs/components/modal/modal.css +15 -0
- package/2x/cjs/components/modal/modal.js +4 -2
- package/2x/cjs/components/nav-bar/nav-bar.css +3 -3
- package/2x/cjs/components/notice-bar/notice-bar.css +16 -8
- package/2x/cjs/components/notice-bar/notice-bar.d.ts +1 -1
- package/2x/cjs/components/notice-bar/notice-bar.js +5 -3
- package/2x/cjs/components/picker/picker.css +7 -2
- package/2x/cjs/components/picker/picker.js +1 -0
- package/2x/cjs/components/picker-view/picker-view.css +2 -2
- package/2x/cjs/components/popover/popover.js +6 -5
- package/2x/cjs/components/radio/radio.css +5 -5
- package/2x/cjs/components/result/result.css +2 -5
- package/2x/cjs/components/search-bar/search-bar.css +14 -9
- package/2x/cjs/components/selector/selector.css +4 -0
- package/2x/cjs/components/side-bar/corner.d.ts +3 -0
- package/2x/cjs/components/side-bar/corner.js +28 -0
- package/2x/cjs/components/side-bar/side-bar.css +31 -18
- package/2x/cjs/components/side-bar/side-bar.js +22 -5
- package/2x/cjs/components/spin-loading/spin-loading.css +1 -19
- package/2x/cjs/components/spin-loading/spin-loading.d.ts +1 -1
- package/2x/cjs/components/spin-loading/spin-loading.js +33 -5
- package/2x/cjs/components/stepper/stepper.css +4 -7
- package/2x/cjs/components/stepper/stepper.js +2 -1
- package/2x/cjs/components/swipe-action/swipe-action.d.ts +2 -2
- package/2x/cjs/components/swipe-action/swipe-action.js +1 -1
- package/2x/cjs/components/swiper/swiper.js +14 -19
- package/2x/cjs/components/tabs/tabs.css +1 -1
- package/2x/cjs/components/tag/tag.css +3 -3
- package/2x/cjs/components/virtual-input/virtual-input.d.ts +1 -1
- package/2x/cjs/utils/get-scroll-parent.js +1 -1
- package/2x/es/components/avatar/avatar.d.ts +1 -1
- package/2x/es/components/badge/badge.css +1 -1
- package/2x/es/components/button/button.css +4 -3
- package/2x/es/components/calendar/calendar.js +2 -0
- package/2x/es/components/capsule-tabs/capsule-tabs.css +1 -1
- package/2x/es/components/check-list/check-list.css +0 -4
- package/2x/es/components/checkbox/checkbox.css +6 -16
- package/2x/es/components/checkbox/checkbox.js +1 -1
- package/2x/es/components/date-picker/date-picker.d.ts +2 -2
- package/2x/es/components/dialog/dialog-action-button.js +1 -0
- package/2x/es/components/dialog/dialog.css +15 -0
- package/2x/es/components/dialog/dialog.js +4 -2
- package/2x/es/components/error-block/error-block.d.ts +1 -1
- package/2x/es/components/floating-panel/floating-panel.d.ts +2 -0
- package/2x/es/components/floating-panel/floating-panel.js +5 -0
- package/2x/es/components/form/form-item.css +5 -0
- package/2x/es/components/form/form.css +10 -0
- package/2x/es/components/form/form.js +1 -5
- package/2x/es/components/form/index.css +15 -0
- package/2x/es/components/image/image.d.ts +1 -0
- package/2x/es/components/image/image.js +4 -1
- package/2x/es/components/input/input.css +28 -25
- package/2x/es/components/input/input.d.ts +2 -2
- package/2x/es/components/input/input.js +4 -3
- package/2x/es/components/jumbo-tabs/jumbo-tabs.css +4 -1
- package/2x/es/components/list/list-item.js +1 -1
- package/2x/es/components/list/list.css +3 -5
- package/2x/es/components/list/list.d.ts +1 -1
- package/2x/es/components/modal/modal.css +15 -0
- package/2x/es/components/modal/modal.js +4 -2
- package/2x/es/components/nav-bar/nav-bar.css +3 -3
- package/2x/es/components/notice-bar/notice-bar.css +16 -8
- package/2x/es/components/notice-bar/notice-bar.d.ts +1 -1
- package/2x/es/components/notice-bar/notice-bar.js +5 -3
- package/2x/es/components/picker/picker.css +7 -2
- package/2x/es/components/picker/picker.js +1 -0
- package/2x/es/components/picker-view/picker-view.css +2 -2
- package/2x/es/components/popover/popover.js +6 -5
- package/2x/es/components/radio/radio.css +5 -5
- package/2x/es/components/result/result.css +2 -5
- package/2x/es/components/search-bar/search-bar.css +14 -9
- package/2x/es/components/selector/selector.css +4 -0
- package/2x/es/components/side-bar/corner.d.ts +3 -0
- package/2x/es/components/side-bar/corner.js +14 -0
- package/2x/es/components/side-bar/side-bar.css +31 -18
- package/2x/es/components/side-bar/side-bar.js +21 -5
- package/2x/es/components/spin-loading/spin-loading.css +1 -19
- package/2x/es/components/spin-loading/spin-loading.d.ts +1 -1
- package/2x/es/components/spin-loading/spin-loading.js +32 -5
- package/2x/es/components/stepper/stepper.css +4 -7
- package/2x/es/components/stepper/stepper.js +2 -1
- package/2x/es/components/swipe-action/swipe-action.d.ts +2 -2
- package/2x/es/components/swipe-action/swipe-action.js +1 -1
- package/2x/es/components/swiper/swiper.js +13 -19
- package/2x/es/components/tabs/tabs.css +1 -1
- package/2x/es/components/tag/tag.css +3 -3
- package/2x/es/components/virtual-input/virtual-input.d.ts +1 -1
- package/2x/es/utils/get-scroll-parent.js +1 -1
- package/2x/package.json +2 -2
- package/README.md +1 -1
- package/cjs/components/avatar/avatar.d.ts +1 -1
- package/cjs/components/badge/badge.css +1 -1
- package/cjs/components/button/button.css +4 -3
- package/cjs/components/calendar/calendar.js +4 -0
- package/cjs/components/capsule-tabs/capsule-tabs.css +1 -1
- package/cjs/components/check-list/check-list.css +0 -3
- package/cjs/components/checkbox/checkbox.css +6 -14
- package/cjs/components/checkbox/checkbox.js +1 -1
- package/cjs/components/date-picker/date-picker.d.ts +2 -2
- package/cjs/components/dialog/dialog-action-button.js +1 -0
- package/cjs/components/dialog/dialog.css +12 -0
- package/cjs/components/dialog/dialog.js +4 -2
- package/cjs/components/error-block/error-block.d.ts +1 -1
- package/cjs/components/floating-panel/floating-panel.d.ts +2 -0
- package/cjs/components/floating-panel/floating-panel.js +5 -0
- package/cjs/components/form/form-item.css +4 -0
- package/cjs/components/form/form.css +8 -0
- package/cjs/components/form/form.js +1 -5
- package/cjs/components/form/index.css +12 -0
- package/cjs/components/image/image.d.ts +1 -0
- package/cjs/components/image/image.js +4 -1
- package/cjs/components/input/input.css +26 -24
- package/cjs/components/input/input.d.ts +2 -2
- package/cjs/components/input/input.js +7 -3
- package/cjs/components/jumbo-tabs/jumbo-tabs.css +4 -1
- package/cjs/components/list/list-item.js +1 -1
- package/cjs/components/list/list.css +3 -4
- package/cjs/components/list/list.d.ts +1 -1
- package/cjs/components/modal/modal.css +12 -0
- package/cjs/components/modal/modal.js +4 -2
- package/cjs/components/nav-bar/nav-bar.css +3 -3
- package/cjs/components/notice-bar/notice-bar.css +15 -8
- package/cjs/components/notice-bar/notice-bar.d.ts +1 -1
- package/cjs/components/notice-bar/notice-bar.js +5 -3
- package/cjs/components/picker/picker.css +6 -2
- package/cjs/components/picker/picker.js +1 -0
- package/cjs/components/picker-view/picker-view.css +2 -2
- package/cjs/components/popover/popover.js +6 -5
- package/cjs/components/radio/radio.css +5 -5
- package/cjs/components/result/result.css +2 -5
- package/cjs/components/search-bar/search-bar.css +13 -9
- package/cjs/components/selector/selector.css +3 -0
- package/cjs/components/side-bar/corner.d.ts +3 -0
- package/cjs/components/side-bar/corner.js +28 -0
- package/cjs/components/side-bar/side-bar.css +27 -17
- package/cjs/components/side-bar/side-bar.js +22 -5
- package/cjs/components/spin-loading/spin-loading.css +1 -17
- package/cjs/components/spin-loading/spin-loading.d.ts +1 -1
- package/cjs/components/spin-loading/spin-loading.js +33 -5
- package/cjs/components/stepper/stepper.css +4 -6
- package/cjs/components/stepper/stepper.js +2 -1
- package/cjs/components/swipe-action/swipe-action.d.ts +2 -2
- package/cjs/components/swipe-action/swipe-action.js +1 -1
- package/cjs/components/swiper/swiper.js +14 -19
- package/cjs/components/tabs/tabs.css +1 -1
- package/cjs/components/tag/tag.css +3 -3
- package/cjs/components/virtual-input/virtual-input.d.ts +1 -1
- package/cjs/utils/get-scroll-parent.js +1 -1
- package/es/components/avatar/avatar.d.ts +1 -1
- package/es/components/badge/badge.css +1 -1
- package/es/components/button/button.css +4 -3
- package/es/components/calendar/calendar.js +2 -0
- package/es/components/capsule-tabs/capsule-tabs.css +1 -1
- package/es/components/check-list/check-list.css +0 -3
- package/es/components/checkbox/checkbox.css +6 -14
- package/es/components/checkbox/checkbox.js +1 -1
- package/es/components/date-picker/date-picker.d.ts +2 -2
- package/es/components/dialog/dialog-action-button.js +1 -0
- package/es/components/dialog/dialog.css +12 -0
- package/es/components/dialog/dialog.js +4 -2
- package/es/components/error-block/error-block.d.ts +1 -1
- package/es/components/floating-panel/floating-panel.d.ts +2 -0
- package/es/components/floating-panel/floating-panel.js +5 -0
- package/es/components/form/form-item.css +4 -0
- package/es/components/form/form.css +8 -0
- package/es/components/form/form.js +1 -5
- package/es/components/form/index.css +12 -0
- package/es/components/image/image.d.ts +1 -0
- package/es/components/image/image.js +4 -1
- package/es/components/input/input.css +26 -24
- package/es/components/input/input.d.ts +2 -2
- package/es/components/input/input.js +4 -3
- package/es/components/jumbo-tabs/jumbo-tabs.css +4 -1
- package/es/components/list/list-item.js +1 -1
- package/es/components/list/list.css +3 -4
- package/es/components/list/list.d.ts +1 -1
- package/es/components/modal/modal.css +12 -0
- package/es/components/modal/modal.js +4 -2
- package/es/components/nav-bar/nav-bar.css +3 -3
- package/es/components/notice-bar/notice-bar.css +15 -8
- package/es/components/notice-bar/notice-bar.d.ts +1 -1
- package/es/components/notice-bar/notice-bar.js +5 -3
- package/es/components/picker/picker.css +6 -2
- package/es/components/picker/picker.js +1 -0
- package/es/components/picker-view/picker-view.css +2 -2
- package/es/components/popover/popover.js +6 -5
- package/es/components/radio/radio.css +5 -5
- package/es/components/result/result.css +2 -5
- package/es/components/search-bar/search-bar.css +13 -9
- package/es/components/selector/selector.css +3 -0
- package/es/components/side-bar/corner.d.ts +3 -0
- package/es/components/side-bar/corner.js +14 -0
- package/es/components/side-bar/side-bar.css +27 -17
- package/es/components/side-bar/side-bar.js +21 -5
- package/es/components/spin-loading/spin-loading.css +1 -17
- package/es/components/spin-loading/spin-loading.d.ts +1 -1
- package/es/components/spin-loading/spin-loading.js +32 -5
- package/es/components/stepper/stepper.css +4 -6
- package/es/components/stepper/stepper.js +2 -1
- package/es/components/swipe-action/swipe-action.d.ts +2 -2
- package/es/components/swipe-action/swipe-action.js +1 -1
- package/es/components/swiper/swiper.js +13 -19
- package/es/components/tabs/tabs.css +1 -1
- package/es/components/tag/tag.css +3 -3
- package/es/components/virtual-input/virtual-input.d.ts +1 -1
- package/es/utils/get-scroll-parent.js +1 -1
- package/package.json +2 -2
- package/umd/antd-mobile.js +1 -1
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
.adm-notice-bar {
|
|
2
|
-
|
|
2
|
+
--background-color: #ababab;
|
|
3
|
+
--border-color: #999999;
|
|
4
|
+
--text-color: #ffffff;
|
|
5
|
+
--font-size: 30px;
|
|
6
|
+
--icon-font-size: 36px;
|
|
7
|
+
--height: 76px;
|
|
8
|
+
height: var(--height);
|
|
3
9
|
box-sizing: border-box;
|
|
4
|
-
font-size:
|
|
5
|
-
line-height:
|
|
10
|
+
font-size: var(--font-size);
|
|
11
|
+
line-height: var(--height);
|
|
6
12
|
padding: 0 24px;
|
|
7
13
|
display: flex;
|
|
8
14
|
align-items: center;
|
|
9
15
|
justify-content: space-between;
|
|
10
|
-
--background-color: #b2b2b2;
|
|
11
|
-
--border-color: #a0a0a0;
|
|
12
|
-
--text-color: #ffffff;
|
|
13
16
|
border: solid 2px var(--border-color);
|
|
14
17
|
border-left: none;
|
|
15
18
|
border-right: none;
|
|
@@ -39,9 +42,11 @@
|
|
|
39
42
|
--text-color: #1677ff;
|
|
40
43
|
}
|
|
41
44
|
|
|
42
|
-
.adm-notice-bar .adm-notice-bar-left
|
|
45
|
+
.adm-notice-bar .adm-notice-bar-left {
|
|
43
46
|
flex-shrink: 0;
|
|
44
47
|
margin-right: 16px;
|
|
48
|
+
font-size: var(--icon-font-size);
|
|
49
|
+
line-height: var(--height);
|
|
45
50
|
}
|
|
46
51
|
|
|
47
52
|
.adm-notice-bar .adm-notice-bar-content {
|
|
@@ -57,11 +62,14 @@
|
|
|
57
62
|
width: auto;
|
|
58
63
|
transition-timing-function: linear;
|
|
59
64
|
position: absolute;
|
|
60
|
-
padding: 0 8px;
|
|
61
65
|
white-space: nowrap;
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
.adm-notice-bar .adm-notice-bar-right {
|
|
65
69
|
flex-shrink: 0;
|
|
66
70
|
margin-left: 24px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.adm-notice-bar-close-icon {
|
|
74
|
+
font-size: 36px;
|
|
67
75
|
}
|
|
@@ -17,5 +17,5 @@ export declare type NoticeBarProps = {
|
|
|
17
17
|
extra?: React.ReactNode;
|
|
18
18
|
/** 左侧广播图标 */
|
|
19
19
|
icon?: React.ReactNode;
|
|
20
|
-
} & NativeProps<'--background-color' | '--border-color' | '--text-color'>;
|
|
20
|
+
} & NativeProps<'--background-color' | '--border-color' | '--text-color' | '--font-size' | '--icon-font-size' | '--height'>;
|
|
21
21
|
export declare const NoticeBar: React.NamedExoticComponent<NoticeBarProps>;
|
|
@@ -31,7 +31,8 @@ const classPrefix = `adm-notice-bar`;
|
|
|
31
31
|
const defaultProps = {
|
|
32
32
|
color: 'default',
|
|
33
33
|
delay: 2000,
|
|
34
|
-
speed: 50
|
|
34
|
+
speed: 50,
|
|
35
|
+
icon: _react.default.createElement(_antdMobileIcons.SoundOutline, null)
|
|
35
36
|
};
|
|
36
37
|
const NoticeBar = (0, _react.memo)(p => {
|
|
37
38
|
const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
|
|
@@ -88,9 +89,9 @@ const NoticeBar = (0, _react.memo)(p => {
|
|
|
88
89
|
if (!visible) return null;
|
|
89
90
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
90
91
|
className: (0, _classnames.default)(classPrefix, `${classPrefix}-${props.color}`)
|
|
91
|
-
}, _react.default.createElement("span", {
|
|
92
|
+
}, props.icon && _react.default.createElement("span", {
|
|
92
93
|
className: `${classPrefix}-left`
|
|
93
|
-
},
|
|
94
|
+
}, props.icon), _react.default.createElement("span", {
|
|
94
95
|
ref: containerRef,
|
|
95
96
|
className: `${classPrefix}-content`
|
|
96
97
|
}, _react.default.createElement("span", {
|
|
@@ -103,6 +104,7 @@ const NoticeBar = (0, _react.memo)(p => {
|
|
|
103
104
|
}, props.content)), (props.closeable || props.extra) && _react.default.createElement("span", {
|
|
104
105
|
className: `${classPrefix}-right`
|
|
105
106
|
}, props.extra, props.closeable && _react.default.createElement(_antdMobileIcons.CloseOutline, {
|
|
107
|
+
className: `${classPrefix}-close-icon`,
|
|
106
108
|
onClick: () => {
|
|
107
109
|
var _a;
|
|
108
110
|
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
display: flex;
|
|
14
14
|
justify-content: space-between;
|
|
15
15
|
align-items: center;
|
|
16
|
-
padding:
|
|
16
|
+
padding: 8px 8px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.adm-picker-header-button {
|
|
20
20
|
font-size: 30px;
|
|
21
21
|
display: inline-block;
|
|
22
|
-
padding:
|
|
22
|
+
padding: 16px 16px;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.adm-picker-header-title {
|
|
@@ -38,4 +38,9 @@
|
|
|
38
38
|
|
|
39
39
|
.adm-picker-body > .adm-picker-view {
|
|
40
40
|
--height: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.adm-picker-popup .adm-popup-body {
|
|
44
|
+
border-top-left-radius: 16px;
|
|
45
|
+
border-top-right-radius: 16px;
|
|
41
46
|
}
|
|
@@ -110,9 +110,9 @@
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.adm-picker-view-mask-top {
|
|
113
|
-
background: linear-gradient(0deg, rgba(255, 255, 255, 0.
|
|
113
|
+
background: linear-gradient(0deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 50%, #ffffff);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
.adm-picker-view-mask-bottom {
|
|
117
|
-
background: linear-gradient(180deg, rgba(255, 255, 255, 0.
|
|
117
|
+
background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 50%, #ffffff);
|
|
118
118
|
}
|
|
@@ -49,7 +49,10 @@ const Popover = (0, _react.forwardRef)((p, ref) => {
|
|
|
49
49
|
visible
|
|
50
50
|
};
|
|
51
51
|
}, [visible]);
|
|
52
|
-
|
|
52
|
+
const overlay = (0, _withStopPropagation.withStopPropagation)(props.stopPropagation, _react.default.createElement("div", {
|
|
53
|
+
className: `${classPrefix}-inner-content`
|
|
54
|
+
}, props.content));
|
|
55
|
+
return _react.default.createElement(_rcTooltip.default, Object.assign({}, props, {
|
|
53
56
|
overlayClassName: (0, _classnames.default)(`${classPrefix}-${mode}`, props.overlayClassName),
|
|
54
57
|
destroyTooltipOnHide: props.destroyOnHide,
|
|
55
58
|
prefixCls: classPrefix,
|
|
@@ -71,9 +74,7 @@ const Popover = (0, _react.forwardRef)((p, ref) => {
|
|
|
71
74
|
},
|
|
72
75
|
motionDeadline: 200
|
|
73
76
|
},
|
|
74
|
-
overlay:
|
|
75
|
-
|
|
76
|
-
}, props.content)
|
|
77
|
-
}), props.children));
|
|
77
|
+
overlay: overlay
|
|
78
|
+
}), props.children);
|
|
78
79
|
});
|
|
79
80
|
exports.Popover = Popover;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
.adm-radio .adm-radio-icon {
|
|
17
17
|
flex: none;
|
|
18
|
-
border: 2px solid
|
|
18
|
+
border: 2px solid var(--adm-color-light);
|
|
19
19
|
border-radius: var(--icon-size);
|
|
20
20
|
box-sizing: border-box;
|
|
21
21
|
display: flex;
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.adm-radio.adm-radio-disabled .adm-radio-content {
|
|
49
|
-
|
|
49
|
+
opacity: 0.4;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.adm-radio.adm-radio-disabled .adm-radio-icon {
|
|
53
|
-
color: #
|
|
54
|
-
border-color:
|
|
55
|
-
background-color: #
|
|
53
|
+
color: #b7b7b7;
|
|
54
|
+
border-color: var(--adm-color-light);
|
|
55
|
+
background-color: #f5f5f5;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.adm-radio .adm-radio-custom-icon {
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
.adm-result {
|
|
2
|
-
--bg-color: var(--adm-color-white);
|
|
3
|
-
--color: var(--adm-color-text);
|
|
4
|
-
--adm-color-weak: var(--adm-color-weak);
|
|
5
2
|
padding: 64px 24px;
|
|
6
|
-
background-color: var(--
|
|
3
|
+
background-color: var(--adm-color-white);
|
|
7
4
|
}
|
|
8
5
|
|
|
9
6
|
.adm-result-icon {
|
|
@@ -19,7 +16,7 @@
|
|
|
19
16
|
}
|
|
20
17
|
|
|
21
18
|
.adm-result-title {
|
|
22
|
-
color: var(--color);
|
|
19
|
+
color: var(--adm-color-text);
|
|
23
20
|
font-size: 36px;
|
|
24
21
|
line-height: 1.4;
|
|
25
22
|
text-align: center;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
.adm-search-bar {
|
|
2
|
-
|
|
3
|
-
justify-content: center;
|
|
4
|
-
align-items: center;
|
|
5
|
-
--height: 56px;
|
|
2
|
+
--height: 64px;
|
|
6
3
|
--padding-left: 16px;
|
|
7
4
|
--background: #f5f5f5;
|
|
8
5
|
--border-radius: 12px;
|
|
9
6
|
--placeholder-color: var(--adm-color-weak);
|
|
10
7
|
---placeholder-color: var(--placeholder-color);
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
height: var(--height);
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
.adm-search-bar .adm-search-bar-input-box {
|
|
@@ -23,23 +24,23 @@
|
|
|
23
24
|
|
|
24
25
|
.adm-search-bar .adm-search-bar-input-box .adm-search-bar-input-box-icon {
|
|
25
26
|
flex: none;
|
|
26
|
-
color: var(
|
|
27
|
+
color: var(--adm-color-light);
|
|
27
28
|
font-size: 32px;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
.adm-search-bar .adm-search-bar-input-box .adm-search-bar-input {
|
|
31
32
|
flex: auto;
|
|
32
33
|
padding: 8px 16px 8px 8px;
|
|
33
|
-
height: var(--height);
|
|
34
|
+
height: calc(var(--height) - 4px);
|
|
34
35
|
box-sizing: border-box;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
.adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-input
|
|
38
|
+
.adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-input {
|
|
38
39
|
--placeholder-color: var(---placeholder-color);
|
|
40
|
+
--font-size: 30px;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
.adm-search-bar .adm-search-bar-input-box .adm-search-bar-input .adm-input {
|
|
42
|
-
font-size: 26px;
|
|
43
|
+
.adm-search-bar .adm-search-bar-input-box .adm-search-bar-input .adm-input-element {
|
|
43
44
|
line-height: 38px;
|
|
44
45
|
}
|
|
45
46
|
|
|
@@ -56,6 +57,10 @@
|
|
|
56
57
|
padding: 6px 24px;
|
|
57
58
|
}
|
|
58
59
|
|
|
60
|
+
.adm-search-bar-active .adm-input.adm-input {
|
|
61
|
+
--placeholder-color: var(--adm-color-light);
|
|
62
|
+
}
|
|
63
|
+
|
|
59
64
|
.adm-search-bar-active .adm-search-bar-input-box {
|
|
60
65
|
border-color: var(--adm-color-primary);
|
|
61
66
|
background: var(--adm-color-white);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Corner = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _nativeProps = require("../../utils/native-props");
|
|
11
|
+
|
|
12
|
+
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); }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
const Corner = (0, _react.memo)(props => (0, _nativeProps.withNativeProps)(props, _react.default.createElement("svg", {
|
|
17
|
+
viewBox: '0 0 30 30'
|
|
18
|
+
}, _react.default.createElement("g", {
|
|
19
|
+
stroke: 'none',
|
|
20
|
+
strokeWidth: '1',
|
|
21
|
+
fill: 'none',
|
|
22
|
+
fillRule: 'evenodd'
|
|
23
|
+
}, _react.default.createElement("path", {
|
|
24
|
+
d: 'M30,0 C13.4314575,3.04359188e-15 -2.02906125e-15,13.4314575 0,30 L0,30 L0,0 Z',
|
|
25
|
+
fill: 'var(--adm-color-white)',
|
|
26
|
+
transform: 'translate(15.000000, 15.000000) scale(-1, -1) translate(-15.000000, -15.000000) '
|
|
27
|
+
})))));
|
|
28
|
+
exports.Corner = Corner;
|
|
@@ -6,10 +6,24 @@
|
|
|
6
6
|
width: var(--width);
|
|
7
7
|
height: var(--height);
|
|
8
8
|
box-sizing: border-box;
|
|
9
|
-
font-size:
|
|
9
|
+
font-size: 26px;
|
|
10
10
|
overflow-y: auto;
|
|
11
11
|
transform: translateZ(0);
|
|
12
12
|
-webkit-transform: translateZ(0);
|
|
13
|
+
background-color: var(--background-color);
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.adm-side-bar-items {
|
|
19
|
+
flex: none;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.adm-side-bar-extra-space {
|
|
24
|
+
flex: auto;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
position: relative;
|
|
13
27
|
}
|
|
14
28
|
|
|
15
29
|
.adm-side-bar-item {
|
|
@@ -20,6 +34,7 @@
|
|
|
20
34
|
position: relative;
|
|
21
35
|
cursor: pointer;
|
|
22
36
|
background-color: var(--background-color);
|
|
37
|
+
overflow: visible;
|
|
23
38
|
}
|
|
24
39
|
|
|
25
40
|
.adm-side-bar-item-highlight {
|
|
@@ -38,29 +53,23 @@
|
|
|
38
53
|
position: relative;
|
|
39
54
|
}
|
|
40
55
|
|
|
41
|
-
.adm-side-bar-item-
|
|
42
|
-
border-top-right-radius: var(--item-border-radius);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.adm-side-bar-item-active::before {
|
|
46
|
-
content: '';
|
|
56
|
+
.adm-side-bar-item-corner {
|
|
47
57
|
width: var(--item-border-radius);
|
|
48
58
|
height: var(--item-border-radius);
|
|
49
|
-
background-color: var(--adm-color-white);
|
|
50
59
|
position: absolute;
|
|
51
|
-
|
|
60
|
+
z-index: 100;
|
|
52
61
|
right: 0;
|
|
62
|
+
user-select: none;
|
|
63
|
+
pointer-events: none;
|
|
53
64
|
}
|
|
54
65
|
|
|
55
|
-
.adm-side-bar-item-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
top: calc(var(--item-border-radius) * -1);
|
|
63
|
-
right: 0;
|
|
66
|
+
.adm-side-bar-item-corner-top {
|
|
67
|
+
top: 0;
|
|
68
|
+
transform: rotate(-90deg);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.adm-side-bar-item-corner-bottom {
|
|
72
|
+
bottom: 0;
|
|
64
73
|
}
|
|
65
74
|
|
|
66
75
|
.adm-side-bar-item-disabled {
|
|
@@ -69,4 +78,8 @@
|
|
|
69
78
|
|
|
70
79
|
.adm-side-bar-item-disabled .adm-side-bar-item-title {
|
|
71
80
|
opacity: 0.4;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.adm-side-bar-badge.adm-badge {
|
|
84
|
+
--right: -8px;
|
|
72
85
|
}
|
|
@@ -15,6 +15,8 @@ var _nativeProps = require("../../utils/native-props");
|
|
|
15
15
|
|
|
16
16
|
var _usePropsValue = require("../../utils/use-props-value");
|
|
17
17
|
|
|
18
|
+
var _corner = require("./corner");
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
21
|
|
|
20
22
|
const classPrefix = `adm-side-bar`;
|
|
@@ -53,10 +55,16 @@ const SideBar = props => {
|
|
|
53
55
|
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, v);
|
|
54
56
|
}
|
|
55
57
|
});
|
|
58
|
+
const lastItem = items[items.length - 1];
|
|
59
|
+
const isLastItemActive = lastItem && lastItem.key === activeKey;
|
|
56
60
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
57
|
-
className:
|
|
58
|
-
},
|
|
61
|
+
className: classPrefix
|
|
62
|
+
}, _react.default.createElement("div", {
|
|
63
|
+
className: `${classPrefix}-items`
|
|
64
|
+
}, items.map((item, index) => {
|
|
59
65
|
const active = item.key === activeKey;
|
|
66
|
+
const isActiveNextSibling = items[index - 1] && items[index - 1].key === activeKey;
|
|
67
|
+
const isActivePreviousSibling = items[index + 1] && items[index + 1].key === activeKey;
|
|
60
68
|
return (0, _nativeProps.withNativeProps)(item.props, _react.default.createElement("div", {
|
|
61
69
|
key: item.key,
|
|
62
70
|
onClick: () => {
|
|
@@ -70,14 +78,23 @@ const SideBar = props => {
|
|
|
70
78
|
[`${classPrefix}-item-active`]: active,
|
|
71
79
|
[`${classPrefix}-item-disabled`]: item.props.disabled
|
|
72
80
|
})
|
|
73
|
-
}, _react.default.createElement(
|
|
74
|
-
|
|
81
|
+
}, _react.default.createElement(_react.default.Fragment, null, isActiveNextSibling && _react.default.createElement(_corner.Corner, {
|
|
82
|
+
className: `${classPrefix}-item-corner ${classPrefix}-item-corner-top`
|
|
83
|
+
}), isActivePreviousSibling && _react.default.createElement(_corner.Corner, {
|
|
84
|
+
className: `${classPrefix}-item-corner ${classPrefix}-item-corner-bottom`
|
|
85
|
+
})), _react.default.createElement(_badge.default, {
|
|
86
|
+
content: item.props.badge,
|
|
87
|
+
className: `${classPrefix}-badge`
|
|
75
88
|
}, _react.default.createElement("div", {
|
|
76
89
|
className: `${classPrefix}-item-title`
|
|
77
90
|
}, active && _react.default.createElement("div", {
|
|
78
91
|
className: `${classPrefix}-item-highlight`
|
|
79
92
|
}), item.props.title))));
|
|
80
|
-
}))
|
|
93
|
+
})), _react.default.createElement("div", {
|
|
94
|
+
className: (0, _classnames.default)(`${classPrefix}-extra-space`, isLastItemActive && `${classPrefix}-item-active-next-sibling`)
|
|
95
|
+
}, isLastItemActive && _react.default.createElement(_corner.Corner, {
|
|
96
|
+
className: `${classPrefix}-item-corner ${classPrefix}-item-corner-top`
|
|
97
|
+
}))));
|
|
81
98
|
};
|
|
82
99
|
|
|
83
100
|
exports.SideBar = SideBar;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
.adm-spin-loading {
|
|
2
2
|
--color: var(--adm-color-weak);
|
|
3
3
|
--size: 64px;
|
|
4
|
-
--track-width: calc(var(--size) / 16);
|
|
5
4
|
--pi: 3.14159265;
|
|
6
|
-
--radius:
|
|
5
|
+
--radius: 15;
|
|
7
6
|
--circumference: calc(var(--radius) * var(--pi) * 2);
|
|
8
7
|
width: var(--size);
|
|
9
8
|
height: var(--size);
|
|
@@ -17,13 +16,6 @@
|
|
|
17
16
|
|
|
18
17
|
.adm-spin-loading-svg > .adm-spin-loading-fill {
|
|
19
18
|
stroke: var(--color);
|
|
20
|
-
stroke-width: var(--track-width);
|
|
21
|
-
stroke-dasharray: var(--circumference);
|
|
22
|
-
stroke-linecap: square;
|
|
23
|
-
animation: adm-spin-loading-fill 1s infinite alternate-reverse linear;
|
|
24
|
-
r: var(--radius);
|
|
25
|
-
cx: calc(var(--size) / 2);
|
|
26
|
-
cy: calc(var(--size) / 2);
|
|
27
19
|
}
|
|
28
20
|
|
|
29
21
|
@keyframes adm-spin-loading-rotate {
|
|
@@ -34,14 +26,4 @@
|
|
|
34
26
|
to {
|
|
35
27
|
transform: rotate(360deg);
|
|
36
28
|
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@keyframes adm-spin-loading-fill {
|
|
40
|
-
from {
|
|
41
|
-
stroke-dashoffset: calc(var(--circumference) * (1 - 0.4));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
to {
|
|
45
|
-
stroke-dashoffset: calc(var(--circumference) * (1 - 0.8));
|
|
46
|
-
}
|
|
47
29
|
}
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
export declare type SpinLoadingProps = {
|
|
4
4
|
color?: 'default' | 'primary' | 'white' | (string & {});
|
|
5
|
-
} & NativeProps<'--color' | '--size'
|
|
5
|
+
} & NativeProps<'--color' | '--size'>;
|
|
6
6
|
export declare const SpinLoading: React.NamedExoticComponent<SpinLoadingProps>;
|
|
@@ -11,6 +11,8 @@ var _nativeProps = require("../../utils/native-props");
|
|
|
11
11
|
|
|
12
12
|
var _withDefaultProps = require("../../utils/with-default-props");
|
|
13
13
|
|
|
14
|
+
var _web = require("@react-spring/web");
|
|
15
|
+
|
|
14
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); }
|
|
15
17
|
|
|
16
18
|
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,20 +26,46 @@ const colorRecord = {
|
|
|
24
26
|
const defaultProps = {
|
|
25
27
|
color: 'default'
|
|
26
28
|
};
|
|
29
|
+
const circumference = 15 * 3.14159265358979 * 2;
|
|
27
30
|
const SpinLoading = (0, _react.memo)(p => {
|
|
28
31
|
var _a;
|
|
29
32
|
|
|
30
33
|
const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
|
|
31
|
-
|
|
34
|
+
const {
|
|
35
|
+
percent
|
|
36
|
+
} = (0, _web.useSpring)({
|
|
37
|
+
loop: {
|
|
38
|
+
reverse: true
|
|
39
|
+
},
|
|
40
|
+
from: {
|
|
41
|
+
percent: 30
|
|
42
|
+
},
|
|
43
|
+
to: {
|
|
44
|
+
percent: 80
|
|
45
|
+
},
|
|
46
|
+
config: {
|
|
47
|
+
duration: 1200
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement(_web.animated.div, {
|
|
32
51
|
className: classPrefix,
|
|
33
52
|
style: {
|
|
34
|
-
'--color': (_a = colorRecord[props.color]) !== null && _a !== void 0 ? _a : props.color
|
|
53
|
+
'--color': (_a = colorRecord[props.color]) !== null && _a !== void 0 ? _a : props.color,
|
|
54
|
+
'--percent': percent
|
|
35
55
|
}
|
|
36
56
|
}, _react.default.createElement("svg", {
|
|
37
|
-
className: `${classPrefix}-svg
|
|
38
|
-
|
|
57
|
+
className: `${classPrefix}-svg`,
|
|
58
|
+
viewBox: '0 0 32 32'
|
|
59
|
+
}, _react.default.createElement(_web.animated.circle, {
|
|
39
60
|
className: `${classPrefix}-fill`,
|
|
40
|
-
fill: 'transparent'
|
|
61
|
+
fill: 'transparent',
|
|
62
|
+
strokeWidth: '2',
|
|
63
|
+
strokeDasharray: circumference,
|
|
64
|
+
strokeDashoffset: percent,
|
|
65
|
+
strokeLinecap: 'square',
|
|
66
|
+
r: 15,
|
|
67
|
+
cx: 16,
|
|
68
|
+
cy: 16
|
|
41
69
|
}))));
|
|
42
70
|
});
|
|
43
71
|
exports.SpinLoading = SpinLoading;
|
|
@@ -34,13 +34,10 @@
|
|
|
34
34
|
|
|
35
35
|
.adm-stepper .adm-stepper-input {
|
|
36
36
|
height: var(--height);
|
|
37
|
-
background-color: var(--input-background-color);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
text-align: center;
|
|
42
|
-
font-size: var(--input-font-size);
|
|
43
|
-
color: var(--input-font-color);
|
|
37
|
+
--background-color: var(--input-background-color);
|
|
38
|
+
--font-size: var(--input-font-size);
|
|
39
|
+
--color: var(--input-font-color);
|
|
40
|
+
--text-align: center;
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
.adm-stepper-minus,
|
|
@@ -102,7 +102,6 @@ const Stepper = p => {
|
|
|
102
102
|
|
|
103
103
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
104
104
|
className: (0, _classnames.default)(classPrefix, {
|
|
105
|
-
[`${classPrefix}-disabled`]: disabled,
|
|
106
105
|
[`${classPrefix}-active`]: hasFocus
|
|
107
106
|
})
|
|
108
107
|
}, _react.default.createElement(_button.default, {
|
|
@@ -110,6 +109,7 @@ const Stepper = p => {
|
|
|
110
109
|
onClick: handleMinus,
|
|
111
110
|
disabled: minusDisabled(),
|
|
112
111
|
fill: 'none',
|
|
112
|
+
shape: 'rectangular',
|
|
113
113
|
color: 'primary'
|
|
114
114
|
}, _react.default.createElement(_antdMobileIcons.MinusOutline, null)), _react.default.createElement("div", {
|
|
115
115
|
className: `${classPrefix}-middle`
|
|
@@ -138,6 +138,7 @@ const Stepper = p => {
|
|
|
138
138
|
onClick: handlePlus,
|
|
139
139
|
disabled: plusDisabled(),
|
|
140
140
|
fill: 'none',
|
|
141
|
+
shape: 'rectangular',
|
|
141
142
|
color: 'primary'
|
|
142
143
|
}, _react.default.createElement(_antdMobileIcons.AddOutline, null))));
|
|
143
144
|
};
|
|
@@ -14,7 +14,7 @@ export declare type Action = {
|
|
|
14
14
|
export declare type SwipeActionProps = {
|
|
15
15
|
rightActions?: Action[];
|
|
16
16
|
leftActions?: Action[];
|
|
17
|
-
onAction?: (action: Action) => void;
|
|
17
|
+
onAction?: (action: Action, e: React.MouseEvent) => void;
|
|
18
18
|
closeOnTouchOutside?: boolean;
|
|
19
19
|
closeOnAction?: boolean;
|
|
20
20
|
children: ReactNode;
|
|
@@ -22,7 +22,7 @@ export declare type SwipeActionProps = {
|
|
|
22
22
|
export declare const SwipeAction: React.ForwardRefExoticComponent<{
|
|
23
23
|
rightActions?: Action[] | undefined;
|
|
24
24
|
leftActions?: Action[] | undefined;
|
|
25
|
-
onAction?: ((action: Action) => void) | undefined;
|
|
25
|
+
onAction?: ((action: Action, e: React.MouseEvent) => void) | undefined;
|
|
26
26
|
closeOnTouchOutside?: boolean | undefined;
|
|
27
27
|
closeOnAction?: boolean | undefined;
|
|
28
28
|
children: ReactNode;
|
|
@@ -167,7 +167,7 @@ const SwipeAction = (0, _react.forwardRef)((p, ref) => {
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
(_a = action.onClick) === null || _a === void 0 ? void 0 : _a.call(action, e);
|
|
170
|
-
(_b = props.onAction) === null || _b === void 0 ? void 0 : _b.call(props, action);
|
|
170
|
+
(_b = props.onAction) === null || _b === void 0 ? void 0 : _b.call(props, action, e);
|
|
171
171
|
}
|
|
172
172
|
}, action.text);
|
|
173
173
|
}
|