antd-mobile 5.0.0-rc.6 → 5.0.0-rc.7
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 +6 -1
- package/2x/cjs/components/form/form-item.css +1 -1
- package/2x/cjs/components/form/index.css +1 -1
- package/2x/cjs/components/input/input.d.ts +2 -2
- package/2x/cjs/components/notice-bar/notice-bar.css +1 -0
- package/2x/cjs/components/progress-bar/progress-bar.css +2 -1
- package/2x/cjs/components/progress-bar/progress-bar.d.ts +1 -1
- package/2x/cjs/components/rate/rate.css +1 -0
- package/2x/cjs/components/search-bar/search-bar.css +5 -0
- package/2x/cjs/components/search-bar/search-bar.d.ts +3 -1
- package/2x/cjs/components/search-bar/search-bar.js +6 -5
- package/2x/cjs/components/side-bar/side-bar.css +2 -0
- package/2x/cjs/components/tree-select/tree-select.css +1 -0
- package/2x/cjs/global/global.css +0 -4
- package/2x/es/components/form/form-item.css +1 -1
- package/2x/es/components/form/index.css +1 -1
- package/2x/es/components/input/input.d.ts +2 -2
- package/2x/es/components/notice-bar/notice-bar.css +1 -0
- package/2x/es/components/progress-bar/progress-bar.css +2 -1
- package/2x/es/components/progress-bar/progress-bar.d.ts +1 -1
- package/2x/es/components/rate/rate.css +1 -0
- package/2x/es/components/search-bar/search-bar.css +5 -0
- package/2x/es/components/search-bar/search-bar.d.ts +3 -1
- package/2x/es/components/search-bar/search-bar.js +6 -5
- package/2x/es/components/side-bar/side-bar.css +2 -0
- package/2x/es/components/tree-select/tree-select.css +1 -0
- package/2x/es/global/global.css +0 -4
- package/2x/package.json +1 -1
- package/README.md +6 -1
- package/cjs/components/form/form-item.css +1 -1
- package/cjs/components/form/index.css +1 -1
- package/cjs/components/input/input.d.ts +2 -2
- package/cjs/components/notice-bar/notice-bar.css +1 -0
- package/cjs/components/progress-bar/progress-bar.css +2 -1
- package/cjs/components/progress-bar/progress-bar.d.ts +1 -1
- package/cjs/components/rate/rate.css +1 -0
- package/cjs/components/search-bar/search-bar.css +4 -0
- package/cjs/components/search-bar/search-bar.d.ts +3 -1
- package/cjs/components/search-bar/search-bar.js +6 -5
- package/cjs/components/side-bar/side-bar.css +2 -0
- package/cjs/components/tree-select/tree-select.css +1 -0
- package/cjs/global/global.css +0 -3
- package/es/components/form/form-item.css +1 -1
- package/es/components/form/index.css +1 -1
- package/es/components/input/input.d.ts +2 -2
- package/es/components/notice-bar/notice-bar.css +1 -0
- package/es/components/progress-bar/progress-bar.css +2 -1
- package/es/components/progress-bar/progress-bar.d.ts +1 -1
- package/es/components/rate/rate.css +1 -0
- package/es/components/search-bar/search-bar.css +4 -0
- package/es/components/search-bar/search-bar.d.ts +3 -1
- package/es/components/search-bar/search-bar.js +6 -5
- package/es/components/side-bar/side-bar.css +2 -0
- package/es/components/tree-select/tree-select.css +1 -0
- package/es/global/global.css +0 -3
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
declare type NativeInputProps = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
4
|
-
export declare type InputProps = Pick<NativeInputProps, 'maxLength' | 'minLength' | 'max' | 'min' | 'autoComplete' | 'pattern' | 'type' | 'onFocus' | 'onBlur' | 'autoCapitalize' | 'autoCorrect' | 'onKeyDown' | 'onKeyUp'> & {
|
|
4
|
+
export declare type InputProps = Pick<NativeInputProps, 'maxLength' | 'minLength' | 'max' | 'min' | 'autoComplete' | 'pattern' | 'inputMode' | 'type' | 'onFocus' | 'onBlur' | 'autoCapitalize' | 'autoCorrect' | 'onKeyDown' | 'onKeyUp'> & {
|
|
5
5
|
value?: string;
|
|
6
6
|
defaultValue?: string;
|
|
7
7
|
onChange?: (val: string) => void;
|
|
@@ -19,7 +19,7 @@ export declare type InputRef = {
|
|
|
19
19
|
focus: () => void;
|
|
20
20
|
blur: () => void;
|
|
21
21
|
};
|
|
22
|
-
export declare const Input: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "pattern" | "max" | "min" | "type" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "autoCapitalize" | "autoCorrect" | "autoComplete" | "maxLength" | "minLength"> & {
|
|
22
|
+
export declare const Input: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "pattern" | "max" | "min" | "type" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "autoCapitalize" | "autoCorrect" | "inputMode" | "autoComplete" | "maxLength" | "minLength"> & {
|
|
23
23
|
value?: string | undefined;
|
|
24
24
|
defaultValue?: string | undefined;
|
|
25
25
|
onChange?: ((val: string) => void) | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
.adm-progress-bar {
|
|
2
2
|
--track-width: var(--adm-progress-bar-track-width, 3px);
|
|
3
|
+
--track-color: var(--adm-progress-bar-track-color, #e5e5e5);
|
|
3
4
|
--fill-color: var(--adm-progress-bar-fill-color, #1677ff);
|
|
4
5
|
}
|
|
5
6
|
.adm-progress-bar-trail {
|
|
6
|
-
background:
|
|
7
|
+
background: var(--track-color);
|
|
7
8
|
overflow: hidden;
|
|
8
9
|
height: var(--track-width);
|
|
9
10
|
border-radius: var(--track-width);
|
|
@@ -2,5 +2,5 @@ import { FC } from 'react';
|
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
export declare type ProgressBarProps = {
|
|
4
4
|
percent?: number;
|
|
5
|
-
} & NativeProps<'--track-width' | '--fill-color'>;
|
|
5
|
+
} & NativeProps<'--track-width' | '--track-color' | '--fill-color'>;
|
|
6
6
|
export declare const ProgressBar: FC<ProgressBarProps>;
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
flex: auto;
|
|
27
27
|
padding: 4px 8px 4px 4px;
|
|
28
28
|
height: 28px;
|
|
29
|
+
box-sizing: border-box;
|
|
29
30
|
}
|
|
30
31
|
.adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-input-wrapper {
|
|
31
32
|
--placeholder-color: var(---placeholder-color);
|
|
@@ -34,6 +35,9 @@
|
|
|
34
35
|
font-size: 13px;
|
|
35
36
|
line-height: 19px;
|
|
36
37
|
}
|
|
38
|
+
.adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-search-bar-input-without-icon {
|
|
39
|
+
padding-left: 8px;
|
|
40
|
+
}
|
|
37
41
|
.adm-search-bar .adm-search-bar-suffix {
|
|
38
42
|
flex: none;
|
|
39
43
|
margin-left: 16px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { InputRef, InputProps } from '../input';
|
|
3
3
|
import { NativeProps } from '../../utils/native-props';
|
|
4
4
|
export declare type SearchBarRef = InputRef;
|
|
@@ -10,6 +10,7 @@ export declare type SearchBarProps = Pick<InputProps, 'onFocus' | 'onBlur' | 'on
|
|
|
10
10
|
clearable?: boolean;
|
|
11
11
|
showCancelButton?: boolean | ((focus: boolean, value: string) => boolean);
|
|
12
12
|
cancelText?: string;
|
|
13
|
+
icon?: ReactNode;
|
|
13
14
|
clearOnCancel?: boolean;
|
|
14
15
|
onSearch?: (val: string) => void;
|
|
15
16
|
onChange?: (val: string) => void;
|
|
@@ -23,6 +24,7 @@ export declare const SearchBar: React.ForwardRefExoticComponent<Pick<InputProps,
|
|
|
23
24
|
clearable?: boolean | undefined;
|
|
24
25
|
showCancelButton?: boolean | ((focus: boolean, value: string) => boolean) | undefined;
|
|
25
26
|
cancelText?: string | undefined;
|
|
27
|
+
icon?: ReactNode;
|
|
26
28
|
clearOnCancel?: boolean | undefined;
|
|
27
29
|
onSearch?: ((val: string) => void) | undefined;
|
|
28
30
|
onChange?: ((val: string) => void) | undefined;
|
|
@@ -11,10 +11,11 @@ var defaultProps = {
|
|
|
11
11
|
clearable: true,
|
|
12
12
|
showCancelButton: false,
|
|
13
13
|
defaultValue: '',
|
|
14
|
-
clearOnCancel: true
|
|
14
|
+
clearOnCancel: true,
|
|
15
|
+
icon: /*#__PURE__*/React.createElement(SearchOutline, null)
|
|
15
16
|
};
|
|
16
17
|
export var SearchBar = /*#__PURE__*/forwardRef(function (p, ref) {
|
|
17
|
-
var _classNames;
|
|
18
|
+
var _classNames, _classNames2;
|
|
18
19
|
|
|
19
20
|
var _useConfig = useConfig(),
|
|
20
21
|
locale = _useConfig.locale;
|
|
@@ -87,11 +88,11 @@ export var SearchBar = /*#__PURE__*/forwardRef(function (p, ref) {
|
|
|
87
88
|
className: classNames(classPrefix, (_classNames = {}, _classNames[classPrefix + "-active"] = hasFocus, _classNames))
|
|
88
89
|
}, /*#__PURE__*/React.createElement("div", {
|
|
89
90
|
className: classPrefix + "-input-box"
|
|
90
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
91
|
+
}, props.icon && /*#__PURE__*/React.createElement("div", {
|
|
91
92
|
className: classPrefix + "-input-box-icon"
|
|
92
|
-
},
|
|
93
|
+
}, props.icon), /*#__PURE__*/React.createElement(Input, {
|
|
93
94
|
ref: inputRef,
|
|
94
|
-
className: classPrefix + "-input",
|
|
95
|
+
className: classNames(classPrefix + "-input", (_classNames2 = {}, _classNames2[classPrefix + "-input-without-icon"] = !props.icon, _classNames2)),
|
|
95
96
|
value: value,
|
|
96
97
|
onChange: setValue,
|
|
97
98
|
maxLength: props.maxLength,
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
--item-border-radius: 8px;
|
|
5
5
|
width: var(--width);
|
|
6
6
|
height: var(--height);
|
|
7
|
+
box-sizing: border-box;
|
|
7
8
|
font-size: 15px;
|
|
8
9
|
overflow-y: auto;
|
|
9
10
|
transform: translateZ(0);
|
|
@@ -13,6 +14,7 @@
|
|
|
13
14
|
display: flex;
|
|
14
15
|
align-items: center;
|
|
15
16
|
min-height: 50px;
|
|
17
|
+
box-sizing: border-box;
|
|
16
18
|
padding: 6px 22px;
|
|
17
19
|
position: relative;
|
|
18
20
|
cursor: pointer;
|
package/es/global/global.css
CHANGED