antd-mobile 5.0.0-rc.21 → 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/calendar/calendar.js +4 -0
- package/2x/cjs/components/capsule-tabs/capsule-tabs.css +1 -1
- package/2x/cjs/components/checkbox/checkbox.css +6 -16
- package/2x/cjs/components/checkbox/checkbox.js +1 -1
- 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.css +4 -0
- package/2x/cjs/components/form/index.css +4 -0
- 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.d.ts +1 -1
- package/2x/cjs/components/nav-bar/nav-bar.css +3 -3
- package/2x/cjs/components/notice-bar/notice-bar.d.ts +1 -1
- 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/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 +0 -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/calendar/calendar.js +2 -0
- package/2x/es/components/capsule-tabs/capsule-tabs.css +1 -1
- package/2x/es/components/checkbox/checkbox.css +6 -16
- package/2x/es/components/checkbox/checkbox.js +1 -1
- 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.css +4 -0
- package/2x/es/components/form/index.css +4 -0
- 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.d.ts +1 -1
- package/2x/es/components/nav-bar/nav-bar.css +3 -3
- package/2x/es/components/notice-bar/notice-bar.d.ts +1 -1
- 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/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 +0 -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/calendar/calendar.js +4 -0
- package/cjs/components/capsule-tabs/capsule-tabs.css +1 -1
- package/cjs/components/checkbox/checkbox.css +6 -14
- package/cjs/components/checkbox/checkbox.js +1 -1
- 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.css +3 -0
- package/cjs/components/form/index.css +3 -0
- 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.d.ts +1 -1
- package/cjs/components/nav-bar/nav-bar.css +3 -3
- package/cjs/components/notice-bar/notice-bar.d.ts +1 -1
- 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/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 +0 -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/calendar/calendar.js +2 -0
- package/es/components/capsule-tabs/capsule-tabs.css +1 -1
- package/es/components/checkbox/checkbox.css +6 -14
- package/es/components/checkbox/checkbox.js +1 -1
- 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.css +3 -0
- package/es/components/form/index.css +3 -0
- 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.d.ts +1 -1
- package/es/components/nav-bar/nav-bar.css +3 -3
- package/es/components/notice-bar/notice-bar.d.ts +1 -1
- 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/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 +0 -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
package/2x/README.md
CHANGED
|
@@ -30,7 +30,7 @@ If you have some question about how to use ant-mobile, you can start a [discussi
|
|
|
30
30
|
|
|
31
31
|
Feel free to join our DingDing group:
|
|
32
32
|
|
|
33
|
-
<img src="https://gw.alipayobjects.com/mdn/rms_25513e/afts/img/A*
|
|
33
|
+
<img src="https://gw.alipayobjects.com/mdn/rms_25513e/afts/img/A*hBjlR4nUWjkAAAAAAAAAAAAAARQnAQ" alt="ding-group" width="250" />
|
|
34
34
|
|
|
35
35
|
---
|
|
36
36
|
|
|
@@ -5,5 +5,5 @@ export declare type AvatarProps = {
|
|
|
5
5
|
src: string;
|
|
6
6
|
fallback?: ReactNode;
|
|
7
7
|
fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
8
|
-
} & Pick<ImageProps, 'alt' | 'lazy' | 'onClick' | 'onError'> & NativeProps<'--size'>;
|
|
8
|
+
} & Pick<ImageProps, 'alt' | 'lazy' | 'onClick' | 'onError'> & NativeProps<'--size' | '--border-radius'>;
|
|
9
9
|
export declare const Avatar: FC<AvatarProps>;
|
|
@@ -21,12 +21,16 @@ var _arrowLeftDouble = require("./arrow-left-double");
|
|
|
21
21
|
|
|
22
22
|
var _configProvider = require("../config-provider");
|
|
23
23
|
|
|
24
|
+
var _isoWeek = _interopRequireDefault(require("dayjs/plugin/isoWeek"));
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
28
|
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); }
|
|
27
29
|
|
|
28
30
|
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; }
|
|
29
31
|
|
|
32
|
+
_dayjs.default.extend(_isoWeek.default);
|
|
33
|
+
|
|
30
34
|
const classPrefix = 'adm-calendar';
|
|
31
35
|
const defaultProps = {
|
|
32
36
|
weekStartsOn: 'Sunday'
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
.adm-checkbox .adm-checkbox-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;
|
|
@@ -45,22 +45,13 @@
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.adm-checkbox.adm-checkbox-disabled .adm-checkbox-content {
|
|
48
|
-
|
|
48
|
+
opacity: 0.4;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
.adm-checkbox.adm-checkbox-disabled.adm-checkbox-
|
|
52
|
-
color: #
|
|
53
|
-
border-color:
|
|
54
|
-
background-color: #
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.adm-checkbox.adm-checkbox-disabled.adm-checkbox-checked .adm-checkbox-icon {
|
|
58
|
-
color: #ccc;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.adm-checkbox.adm-checkbox-disabled .adm-checkbox-icon {
|
|
62
|
-
border-color: #ccc;
|
|
63
|
-
background-color: #ebedf0;
|
|
51
|
+
.adm-checkbox.adm-checkbox-disabled .adm-checkbox-icon.adm-checkbox-icon {
|
|
52
|
+
color: #b7b7b7;
|
|
53
|
+
border-color: var(--adm-color-light);
|
|
54
|
+
background-color: #f5f5f5;
|
|
64
55
|
}
|
|
65
56
|
|
|
66
57
|
.adm-checkbox .adm-checkbox-custom-icon {
|
|
@@ -68,7 +59,6 @@
|
|
|
68
59
|
}
|
|
69
60
|
|
|
70
61
|
.adm-checkbox.adm-checkbox-indeterminate .adm-checkbox-icon {
|
|
71
|
-
border-color: var(--adm-color-primary);
|
|
72
62
|
background-color: #ffffff;
|
|
73
63
|
color: var(--adm-color-primary);
|
|
74
64
|
}
|
|
@@ -94,7 +94,7 @@ const Checkbox = p => {
|
|
|
94
94
|
|
|
95
95
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("label", {
|
|
96
96
|
className: (0, _classnames.default)(classPrefix, {
|
|
97
|
-
[`${classPrefix}-checked`]: checked,
|
|
97
|
+
[`${classPrefix}-checked`]: checked && !props.indeterminate,
|
|
98
98
|
[`${classPrefix}-indeterminate`]: props.indeterminate,
|
|
99
99
|
[`${classPrefix}-disabled`]: disabled,
|
|
100
100
|
[`${classPrefix}-block`]: props.block
|
|
@@ -6,5 +6,5 @@ export declare type ErrorBlockProps = {
|
|
|
6
6
|
image?: string | ReactElement;
|
|
7
7
|
description?: ReactNode;
|
|
8
8
|
fullPage?: boolean;
|
|
9
|
-
} & NativeProps<'--image-height' | '--image-height-full-page'>;
|
|
9
|
+
} & NativeProps<'--image-height' | '--image-height-full-page' | '--image-width' | '--image-width-full-page'>;
|
|
10
10
|
export declare const ErrorBlock: FC<ErrorBlockProps>;
|
|
@@ -3,6 +3,7 @@ import { NativeProps } from '../../utils/native-props';
|
|
|
3
3
|
export declare type FloatingPanelProps = {
|
|
4
4
|
anchors: number[];
|
|
5
5
|
children: ReactNode;
|
|
6
|
+
onHeightChange?: (height: number, animating: boolean) => void;
|
|
6
7
|
} & NativeProps<'--border-radius' | '--z-index'>;
|
|
7
8
|
export declare type FloatingPanelRef = {
|
|
8
9
|
setHeight: (height: number, options?: {
|
|
@@ -12,4 +13,5 @@ export declare type FloatingPanelRef = {
|
|
|
12
13
|
export declare const FloatingPanel: React.ForwardRefExoticComponent<{
|
|
13
14
|
anchors: number[];
|
|
14
15
|
children: ReactNode;
|
|
16
|
+
onHeightChange?: ((height: number, animating: boolean) => void) | undefined;
|
|
15
17
|
} & NativeProps<"--z-index" | "--border-radius"> & React.RefAttributes<FloatingPanelRef>>;
|
|
@@ -44,6 +44,11 @@ const FloatingPanel = (0, _react.forwardRef)((props, ref) => {
|
|
|
44
44
|
y: bounds.bottom,
|
|
45
45
|
config: {
|
|
46
46
|
tension: 300
|
|
47
|
+
},
|
|
48
|
+
onChange: result => {
|
|
49
|
+
var _a;
|
|
50
|
+
|
|
51
|
+
(_a = props.onHeightChange) === null || _a === void 0 ? void 0 : _a.call(props, result.value.y, y.isAnimating);
|
|
47
52
|
}
|
|
48
53
|
}));
|
|
49
54
|
(0, _react2.useDrag)(state => {
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
.adm-input
|
|
1
|
+
.adm-input {
|
|
2
2
|
--font-size: 34px;
|
|
3
3
|
--color: var(--adm-color-text);
|
|
4
4
|
--placeholder-color: var(--adm-color-light);
|
|
5
|
-
--disabled-color: var(--adm-color-weak);
|
|
6
5
|
--text-align: left;
|
|
6
|
+
--background-color: transparent;
|
|
7
7
|
display: flex;
|
|
8
8
|
justify-content: flex-start;
|
|
9
9
|
align-items: center;
|
|
10
10
|
width: 100%;
|
|
11
11
|
max-width: 100%;
|
|
12
12
|
max-height: 100%;
|
|
13
|
+
background-color: var(--background-color);
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
.adm-input {
|
|
16
|
+
.adm-input-disabled {
|
|
17
|
+
opacity: 0.4;
|
|
18
|
+
cursor: not-allowed;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.adm-input-element {
|
|
16
22
|
flex: auto;
|
|
17
23
|
display: inline-block;
|
|
18
24
|
box-sizing: border-box;
|
|
@@ -32,65 +38,62 @@
|
|
|
32
38
|
text-align: var(--text-align);
|
|
33
39
|
}
|
|
34
40
|
|
|
35
|
-
.adm-input::placeholder {
|
|
41
|
+
.adm-input-element::placeholder {
|
|
36
42
|
color: var(--placeholder-color);
|
|
37
43
|
font-family: inherit;
|
|
38
44
|
}
|
|
39
45
|
|
|
40
|
-
.adm-input:-webkit-autofill {
|
|
46
|
+
.adm-input-element:-webkit-autofill {
|
|
41
47
|
background-color: transparent;
|
|
42
48
|
}
|
|
43
49
|
|
|
44
|
-
.adm-input:
|
|
45
|
-
color: var(--disabled-color);
|
|
46
|
-
cursor: not-allowed;
|
|
47
|
-
opacity: 1;
|
|
48
|
-
-webkit-text-fill-color: var(--disabled-color);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.adm-input:read-only {
|
|
50
|
+
.adm-input-element:read-only {
|
|
52
51
|
cursor: default;
|
|
53
52
|
}
|
|
54
53
|
|
|
55
|
-
.adm-input:invalid {
|
|
54
|
+
.adm-input-element:invalid {
|
|
56
55
|
box-shadow: none;
|
|
57
56
|
}
|
|
58
57
|
|
|
59
|
-
.adm-input::-ms-clear {
|
|
58
|
+
.adm-input-element::-ms-clear {
|
|
60
59
|
display: none;
|
|
61
60
|
}
|
|
62
61
|
|
|
63
|
-
.adm-input::-webkit-search-cancel-button {
|
|
62
|
+
.adm-input-element::-webkit-search-cancel-button {
|
|
64
63
|
display: none;
|
|
65
64
|
}
|
|
66
65
|
|
|
67
|
-
.adm-input::-webkit-search-decoration {
|
|
66
|
+
.adm-input-element::-webkit-search-decoration {
|
|
68
67
|
display: none;
|
|
69
68
|
}
|
|
70
69
|
|
|
71
|
-
.adm-input[type='date'],
|
|
72
|
-
.adm-input[type='time'],
|
|
73
|
-
.adm-input[type='datetime-local'] {
|
|
70
|
+
.adm-input-element[type='date'],
|
|
71
|
+
.adm-input-element[type='time'],
|
|
72
|
+
.adm-input-element[type='datetime-local'] {
|
|
74
73
|
min-height: 1.5em;
|
|
75
74
|
}
|
|
76
75
|
|
|
77
|
-
.adm-input[type='search'] {
|
|
76
|
+
.adm-input-element[type='search'] {
|
|
78
77
|
-webkit-appearance: none;
|
|
79
78
|
}
|
|
80
79
|
|
|
81
|
-
.adm-input[readonly] {
|
|
80
|
+
.adm-input-element[readonly] {
|
|
82
81
|
pointer-events: none;
|
|
83
82
|
}
|
|
84
83
|
|
|
85
84
|
.adm-input-clear {
|
|
86
85
|
flex: none;
|
|
87
86
|
margin-left: 16px;
|
|
88
|
-
color: var(--
|
|
89
|
-
padding:
|
|
87
|
+
color: var(--adm-color-light);
|
|
88
|
+
padding: 8px;
|
|
90
89
|
cursor: pointer;
|
|
91
90
|
}
|
|
92
91
|
|
|
92
|
+
.adm-input-clear:active {
|
|
93
|
+
color: var(--adm-color-weak);
|
|
94
|
+
}
|
|
95
|
+
|
|
93
96
|
.adm-input-clear .antd-mobile-icon {
|
|
94
97
|
display: block;
|
|
95
|
-
font-size:
|
|
98
|
+
font-size: 30px;
|
|
96
99
|
}
|
|
@@ -13,7 +13,7 @@ export declare type InputProps = Pick<NativeInputProps, 'maxLength' | 'minLength
|
|
|
13
13
|
id?: string;
|
|
14
14
|
onEnterPress?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
15
15
|
enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
|
|
16
|
-
} & NativeProps<'--font-size' | '--color' | '--placeholder-color' | '--
|
|
16
|
+
} & NativeProps<'--font-size' | '--color' | '--placeholder-color' | '--text-align'>;
|
|
17
17
|
export declare type InputRef = {
|
|
18
18
|
clear: () => void;
|
|
19
19
|
focus: () => void;
|
|
@@ -31,5 +31,5 @@ export declare const Input: React.ForwardRefExoticComponent<Pick<React.DetailedH
|
|
|
31
31
|
id?: string | undefined;
|
|
32
32
|
onEnterPress?: ((e: React.KeyboardEvent<HTMLInputElement>) => void) | undefined;
|
|
33
33
|
enterKeyHint?: "enter" | "search" | "done" | "go" | "next" | "previous" | "send" | undefined;
|
|
34
|
-
} & NativeProps<"--color" | "--font-size" | "--placeholder-color" | "--
|
|
34
|
+
} & NativeProps<"--color" | "--font-size" | "--placeholder-color" | "--text-align"> & React.RefAttributes<InputRef>>;
|
|
35
35
|
export {};
|
|
@@ -15,6 +15,10 @@ var _nativeProps = require("../../utils/native-props");
|
|
|
15
15
|
|
|
16
16
|
var _withDefaultProps = require("../../utils/with-default-props");
|
|
17
17
|
|
|
18
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
18
22
|
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); }
|
|
19
23
|
|
|
20
24
|
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; }
|
|
@@ -66,10 +70,10 @@ const Input = (0, _react.forwardRef)((p, ref) => {
|
|
|
66
70
|
};
|
|
67
71
|
}, [props.enterKeyHint]);
|
|
68
72
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
69
|
-
className: `${classPrefix}-
|
|
73
|
+
className: (0, _classnames.default)(`${classPrefix}`, props.disabled && `${classPrefix}-disabled`)
|
|
70
74
|
}, _react.default.createElement("input", {
|
|
71
75
|
ref: nativeInputRef,
|
|
72
|
-
className: classPrefix
|
|
76
|
+
className: `${classPrefix}-element`,
|
|
73
77
|
value: value,
|
|
74
78
|
onChange: e => {
|
|
75
79
|
setValue(e.target.value);
|
|
@@ -102,7 +106,7 @@ const Input = (0, _react.forwardRef)((p, ref) => {
|
|
|
102
106
|
autoCorrect: props.autoCorrect,
|
|
103
107
|
onKeyDown: handleKeydown,
|
|
104
108
|
onKeyUp: props.onKeyUp
|
|
105
|
-
}), props.clearable && !!value &&
|
|
109
|
+
}), props.clearable && !!value && _react.default.createElement("div", {
|
|
106
110
|
className: `${classPrefix}-clear`,
|
|
107
111
|
onMouseDown: e => {
|
|
108
112
|
e.preventDefault();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
.adm-jumbo-tabs {
|
|
2
|
+
--gap: 16px;
|
|
2
3
|
position: relative;
|
|
3
4
|
}
|
|
4
5
|
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
align-items: center;
|
|
15
16
|
position: relative;
|
|
16
17
|
overflow-x: scroll;
|
|
18
|
+
padding: 0 var(--gap);
|
|
17
19
|
scrollbar-width: none;
|
|
18
20
|
}
|
|
19
21
|
|
|
@@ -23,7 +25,7 @@
|
|
|
23
25
|
|
|
24
26
|
.adm-jumbo-tabs-tab-wrapper {
|
|
25
27
|
flex: auto;
|
|
26
|
-
padding: 0
|
|
28
|
+
padding: 0 calc(var(--gap) / 2);
|
|
27
29
|
text-align: center;
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -42,6 +44,7 @@
|
|
|
42
44
|
|
|
43
45
|
.adm-jumbo-tabs-tab-title {
|
|
44
46
|
line-height: 48px;
|
|
47
|
+
padding: 0 8px;
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
.adm-jumbo-tabs-tab-description {
|
|
@@ -3,5 +3,5 @@ import { NativeProps } from '../../utils/native-props';
|
|
|
3
3
|
export declare type ListProps = {
|
|
4
4
|
header?: ReactNode;
|
|
5
5
|
mode?: 'default' | 'card';
|
|
6
|
-
} & NativeProps<'--header-font-size' | '--prefix-width' | '--prefix-padding-right' | '--align-items' | '--active-background-color' | '--border-inner' | '--border-top' | '--border-bottom' | '--padding-left' | '--font-size'>;
|
|
6
|
+
} & NativeProps<'--header-font-size' | '--prefix-width' | '--prefix-padding-right' | '--align-items' | '--active-background-color' | '--border-inner' | '--border-top' | '--border-bottom' | '--padding-left' | '--padding-right' | '--font-size'>;
|
|
7
7
|
export declare const List: FC<ListProps>;
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
.adm-nav-bar-back {
|
|
25
25
|
display: flex;
|
|
26
26
|
align-items: center;
|
|
27
|
-
margin-right:
|
|
27
|
+
margin-right: 32px;
|
|
28
28
|
padding: 12px 0;
|
|
29
29
|
cursor: pointer;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.adm-nav-bar-back-arrow {
|
|
33
|
-
font-size:
|
|
34
|
-
margin-right:
|
|
33
|
+
font-size: 48px;
|
|
34
|
+
margin-right: 8px;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.adm-nav-bar-left {
|
|
@@ -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>;
|
|
@@ -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);
|
|
@@ -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, {
|