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.
Files changed (57) hide show
  1. package/2x/README.md +6 -1
  2. package/2x/cjs/components/form/form-item.css +1 -1
  3. package/2x/cjs/components/form/index.css +1 -1
  4. package/2x/cjs/components/input/input.d.ts +2 -2
  5. package/2x/cjs/components/notice-bar/notice-bar.css +1 -0
  6. package/2x/cjs/components/progress-bar/progress-bar.css +2 -1
  7. package/2x/cjs/components/progress-bar/progress-bar.d.ts +1 -1
  8. package/2x/cjs/components/rate/rate.css +1 -0
  9. package/2x/cjs/components/search-bar/search-bar.css +5 -0
  10. package/2x/cjs/components/search-bar/search-bar.d.ts +3 -1
  11. package/2x/cjs/components/search-bar/search-bar.js +6 -5
  12. package/2x/cjs/components/side-bar/side-bar.css +2 -0
  13. package/2x/cjs/components/tree-select/tree-select.css +1 -0
  14. package/2x/cjs/global/global.css +0 -4
  15. package/2x/es/components/form/form-item.css +1 -1
  16. package/2x/es/components/form/index.css +1 -1
  17. package/2x/es/components/input/input.d.ts +2 -2
  18. package/2x/es/components/notice-bar/notice-bar.css +1 -0
  19. package/2x/es/components/progress-bar/progress-bar.css +2 -1
  20. package/2x/es/components/progress-bar/progress-bar.d.ts +1 -1
  21. package/2x/es/components/rate/rate.css +1 -0
  22. package/2x/es/components/search-bar/search-bar.css +5 -0
  23. package/2x/es/components/search-bar/search-bar.d.ts +3 -1
  24. package/2x/es/components/search-bar/search-bar.js +6 -5
  25. package/2x/es/components/side-bar/side-bar.css +2 -0
  26. package/2x/es/components/tree-select/tree-select.css +1 -0
  27. package/2x/es/global/global.css +0 -4
  28. package/2x/package.json +1 -1
  29. package/README.md +6 -1
  30. package/cjs/components/form/form-item.css +1 -1
  31. package/cjs/components/form/index.css +1 -1
  32. package/cjs/components/input/input.d.ts +2 -2
  33. package/cjs/components/notice-bar/notice-bar.css +1 -0
  34. package/cjs/components/progress-bar/progress-bar.css +2 -1
  35. package/cjs/components/progress-bar/progress-bar.d.ts +1 -1
  36. package/cjs/components/rate/rate.css +1 -0
  37. package/cjs/components/search-bar/search-bar.css +4 -0
  38. package/cjs/components/search-bar/search-bar.d.ts +3 -1
  39. package/cjs/components/search-bar/search-bar.js +6 -5
  40. package/cjs/components/side-bar/side-bar.css +2 -0
  41. package/cjs/components/tree-select/tree-select.css +1 -0
  42. package/cjs/global/global.css +0 -3
  43. package/es/components/form/form-item.css +1 -1
  44. package/es/components/form/index.css +1 -1
  45. package/es/components/input/input.d.ts +2 -2
  46. package/es/components/notice-bar/notice-bar.css +1 -0
  47. package/es/components/progress-bar/progress-bar.css +2 -1
  48. package/es/components/progress-bar/progress-bar.d.ts +1 -1
  49. package/es/components/rate/rate.css +1 -0
  50. package/es/components/search-bar/search-bar.css +4 -0
  51. package/es/components/search-bar/search-bar.d.ts +3 -1
  52. package/es/components/search-bar/search-bar.js +6 -5
  53. package/es/components/side-bar/side-bar.css +2 -0
  54. package/es/components/tree-select/tree-select.css +1 -0
  55. package/es/global/global.css +0 -3
  56. package/package.json +1 -1
  57. package/umd/antd-mobile.js +1 -1
package/2x/README.md CHANGED
@@ -15,7 +15,12 @@ $ npm install --save antd-mobile@next
15
15
  $ yarn add antd-mobile@next
16
16
  ```
17
17
 
18
- v5(Poplar) is the next major version of antd-mobile, which is still working in progress. If you plan to use it in production, **please read the [FAQ](https://mobile.ant.design/guide/faq) chapter first**.
18
+ - **Fast**: It is carefully optimized for harsh scenes, without configuration, you can have the best package size and ultimate performance.
19
+ - **Customizable**: Based on CSS variables, you can reliably and efficiently adjust the appearance of components or create your own themes.
20
+ - **Atomic**: The function of each component, neither more nor less, is exactly what you need.
21
+ - **Fluent**: With smooth gestures and delicate animation, it helps the product create the ultimate experience.
22
+
23
+ v5(Poplar) is the next major version of antd-mobile, we recommend using it instead of v2.
19
24
 
20
25
  You can also play with antd-mobile just in browser with [Codesandbox](https://codesandbox.io/s/antd-mobile-snrxr?file=/package.json). No need to prepare development environment.
21
26
 
@@ -22,7 +22,7 @@
22
22
  color: var(--adm-color-danger);
23
23
  }
24
24
 
25
- .adm-form-item-hidden {
25
+ .adm-form-item.adm-form-item-hidden {
26
26
  display: none;
27
27
  }
28
28
 
@@ -30,7 +30,7 @@
30
30
  color: var(--adm-color-danger);
31
31
  }
32
32
 
33
- .adm-form-item-hidden {
33
+ .adm-form-item.adm-form-item-hidden {
34
34
  display: none;
35
35
  }
36
36
 
@@ -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,5 +1,6 @@
1
1
  .adm-notice-bar {
2
2
  height: 60px;
3
+ box-sizing: border-box;
3
4
  font-size: 28px;
4
5
  line-height: 60px;
5
6
  padding: 0 24px;
@@ -1,10 +1,11 @@
1
1
  .adm-progress-bar {
2
2
  --track-width: var(--adm-progress-bar-track-width, 6px);
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
 
6
7
  .adm-progress-bar-trail {
7
- background: #e5e5e5;
8
+ background: var(--track-color);
8
9
  overflow: hidden;
9
10
  height: var(--track-width);
10
11
  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>;
@@ -16,6 +16,7 @@
16
16
  text-align: center;
17
17
  overflow: hidden;
18
18
  cursor: pointer;
19
+ box-sizing: border-box;
19
20
  }
20
21
 
21
22
  .adm-rate-star-half {
@@ -29,6 +29,7 @@
29
29
  flex: auto;
30
30
  padding: 8px 16px 8px 8px;
31
31
  height: 56px;
32
+ box-sizing: border-box;
32
33
  }
33
34
 
34
35
  .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-input-wrapper {
@@ -40,6 +41,10 @@
40
41
  line-height: 38px;
41
42
  }
42
43
 
44
+ .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-search-bar-input-without-icon {
45
+ padding-left: 16px;
46
+ }
47
+
43
48
  .adm-search-bar .adm-search-bar-suffix {
44
49
  flex: none;
45
50
  margin-left: 32px;
@@ -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;
@@ -32,10 +32,11 @@ var defaultProps = {
32
32
  clearable: true,
33
33
  showCancelButton: false,
34
34
  defaultValue: '',
35
- clearOnCancel: true
35
+ clearOnCancel: true,
36
+ icon: /*#__PURE__*/_react["default"].createElement(_antdMobileIcons.SearchOutline, null)
36
37
  };
37
38
  var SearchBar = /*#__PURE__*/(0, _react.forwardRef)(function (p, ref) {
38
- var _classNames;
39
+ var _classNames, _classNames2;
39
40
 
40
41
  var _useConfig = (0, _configProvider.useConfig)(),
41
42
  locale = _useConfig.locale;
@@ -108,11 +109,11 @@ var SearchBar = /*#__PURE__*/(0, _react.forwardRef)(function (p, ref) {
108
109
  className: (0, _classnames["default"])(classPrefix, (_classNames = {}, _classNames[classPrefix + "-active"] = hasFocus, _classNames))
109
110
  }, /*#__PURE__*/_react["default"].createElement("div", {
110
111
  className: classPrefix + "-input-box"
111
- }, /*#__PURE__*/_react["default"].createElement("div", {
112
+ }, props.icon && /*#__PURE__*/_react["default"].createElement("div", {
112
113
  className: classPrefix + "-input-box-icon"
113
- }, /*#__PURE__*/_react["default"].createElement(_antdMobileIcons.SearchOutline, null)), /*#__PURE__*/_react["default"].createElement(_input["default"], {
114
+ }, props.icon), /*#__PURE__*/_react["default"].createElement(_input["default"], {
114
115
  ref: inputRef,
115
- className: classPrefix + "-input",
116
+ className: (0, _classnames["default"])(classPrefix + "-input", (_classNames2 = {}, _classNames2[classPrefix + "-input-without-icon"] = !props.icon, _classNames2)),
116
117
  value: value,
117
118
  onChange: setValue,
118
119
  maxLength: props.maxLength,
@@ -4,6 +4,7 @@
4
4
  --item-border-radius: 16px;
5
5
  width: var(--width);
6
6
  height: var(--height);
7
+ box-sizing: border-box;
7
8
  font-size: 30px;
8
9
  overflow-y: auto;
9
10
  transform: translateZ(0);
@@ -14,6 +15,7 @@
14
15
  display: flex;
15
16
  align-items: center;
16
17
  min-height: 100px;
18
+ box-sizing: border-box;
17
19
  padding: 12px 44px;
18
20
  position: relative;
19
21
  cursor: pointer;
@@ -28,6 +28,7 @@
28
28
  display: flex;
29
29
  align-items: center;
30
30
  min-height: 100px;
31
+ box-sizing: border-box;
31
32
  padding: 12px 24px;
32
33
  position: relative;
33
34
  }
@@ -24,10 +24,6 @@ body {
24
24
  font-family: var(--adm-font-family);
25
25
  }
26
26
 
27
- * {
28
- box-sizing: border-box;
29
- }
30
-
31
27
  a,
32
28
  button {
33
29
  cursor: pointer;
@@ -22,7 +22,7 @@
22
22
  color: var(--adm-color-danger);
23
23
  }
24
24
 
25
- .adm-form-item-hidden {
25
+ .adm-form-item.adm-form-item-hidden {
26
26
  display: none;
27
27
  }
28
28
 
@@ -30,7 +30,7 @@
30
30
  color: var(--adm-color-danger);
31
31
  }
32
32
 
33
- .adm-form-item-hidden {
33
+ .adm-form-item.adm-form-item-hidden {
34
34
  display: none;
35
35
  }
36
36
 
@@ -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,5 +1,6 @@
1
1
  .adm-notice-bar {
2
2
  height: 60px;
3
+ box-sizing: border-box;
3
4
  font-size: 28px;
4
5
  line-height: 60px;
5
6
  padding: 0 24px;
@@ -1,10 +1,11 @@
1
1
  .adm-progress-bar {
2
2
  --track-width: var(--adm-progress-bar-track-width, 6px);
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
 
6
7
  .adm-progress-bar-trail {
7
- background: #e5e5e5;
8
+ background: var(--track-color);
8
9
  overflow: hidden;
9
10
  height: var(--track-width);
10
11
  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>;
@@ -16,6 +16,7 @@
16
16
  text-align: center;
17
17
  overflow: hidden;
18
18
  cursor: pointer;
19
+ box-sizing: border-box;
19
20
  }
20
21
 
21
22
  .adm-rate-star-half {
@@ -29,6 +29,7 @@
29
29
  flex: auto;
30
30
  padding: 8px 16px 8px 8px;
31
31
  height: 56px;
32
+ box-sizing: border-box;
32
33
  }
33
34
 
34
35
  .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-input-wrapper {
@@ -40,6 +41,10 @@
40
41
  line-height: 38px;
41
42
  }
42
43
 
44
+ .adm-search-bar .adm-search-bar-input-box .adm-search-bar-input.adm-search-bar-input-without-icon {
45
+ padding-left: 16px;
46
+ }
47
+
43
48
  .adm-search-bar .adm-search-bar-suffix {
44
49
  flex: none;
45
50
  margin-left: 32px;
@@ -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
- }, /*#__PURE__*/React.createElement(SearchOutline, null)), /*#__PURE__*/React.createElement(Input, {
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: 16px;
5
5
  width: var(--width);
6
6
  height: var(--height);
7
+ box-sizing: border-box;
7
8
  font-size: 30px;
8
9
  overflow-y: auto;
9
10
  transform: translateZ(0);
@@ -14,6 +15,7 @@
14
15
  display: flex;
15
16
  align-items: center;
16
17
  min-height: 100px;
18
+ box-sizing: border-box;
17
19
  padding: 12px 44px;
18
20
  position: relative;
19
21
  cursor: pointer;
@@ -28,6 +28,7 @@
28
28
  display: flex;
29
29
  align-items: center;
30
30
  min-height: 100px;
31
+ box-sizing: border-box;
31
32
  padding: 12px 24px;
32
33
  position: relative;
33
34
  }
@@ -24,10 +24,6 @@ body {
24
24
  font-family: var(--adm-font-family);
25
25
  }
26
26
 
27
- * {
28
- box-sizing: border-box;
29
- }
30
-
31
27
  a,
32
28
  button {
33
29
  cursor: pointer;
package/2x/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-mobile",
3
- "version": "5.0.0-rc.6",
3
+ "version": "5.0.0-rc.7",
4
4
  "dependencies": {
5
5
  "@react-spring/web": "^9.3.1",
6
6
  "@types/resize-observer-browser": "^0.1.6",
package/README.md CHANGED
@@ -15,7 +15,12 @@ $ npm install --save antd-mobile@next
15
15
  $ yarn add antd-mobile@next
16
16
  ```
17
17
 
18
- v5(Poplar) is the next major version of antd-mobile, which is still working in progress. If you plan to use it in production, **please read the [FAQ](https://mobile.ant.design/guide/faq) chapter first**.
18
+ - **Fast**: It is carefully optimized for harsh scenes, without configuration, you can have the best package size and ultimate performance.
19
+ - **Customizable**: Based on CSS variables, you can reliably and efficiently adjust the appearance of components or create your own themes.
20
+ - **Atomic**: The function of each component, neither more nor less, is exactly what you need.
21
+ - **Fluent**: With smooth gestures and delicate animation, it helps the product create the ultimate experience.
22
+
23
+ v5(Poplar) is the next major version of antd-mobile, we recommend using it instead of v2.
19
24
 
20
25
  You can also play with antd-mobile just in browser with [Codesandbox](https://codesandbox.io/s/antd-mobile-snrxr?file=/package.json). No need to prepare development environment.
21
26
 
@@ -18,7 +18,7 @@
18
18
  .adm-form-item-footer {
19
19
  color: var(--adm-color-danger);
20
20
  }
21
- .adm-form-item-hidden {
21
+ .adm-form-item.adm-form-item-hidden {
22
22
  display: none;
23
23
  }
24
24
  .adm-form-vertical .adm-form-item-label {
@@ -24,7 +24,7 @@
24
24
  .adm-form-item-footer {
25
25
  color: var(--adm-color-danger);
26
26
  }
27
- .adm-form-item-hidden {
27
+ .adm-form-item.adm-form-item-hidden {
28
28
  display: none;
29
29
  }
30
30
  .adm-form-vertical .adm-form-item-label {
@@ -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,5 +1,6 @@
1
1
  .adm-notice-bar {
2
2
  height: 30px;
3
+ box-sizing: border-box;
3
4
  font-size: 14px;
4
5
  line-height: 30px;
5
6
  padding: 0 12px;
@@ -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: #e5e5e5;
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>;
@@ -14,6 +14,7 @@
14
14
  text-align: center;
15
15
  overflow: hidden;
16
16
  cursor: pointer;
17
+ box-sizing: border-box;
17
18
  }
18
19
  .adm-rate-star-half {
19
20
  padding-right: 0;
@@ -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;
@@ -32,10 +32,11 @@ var defaultProps = {
32
32
  clearable: true,
33
33
  showCancelButton: false,
34
34
  defaultValue: '',
35
- clearOnCancel: true
35
+ clearOnCancel: true,
36
+ icon: /*#__PURE__*/_react["default"].createElement(_antdMobileIcons.SearchOutline, null)
36
37
  };
37
38
  var SearchBar = /*#__PURE__*/(0, _react.forwardRef)(function (p, ref) {
38
- var _classNames;
39
+ var _classNames, _classNames2;
39
40
 
40
41
  var _useConfig = (0, _configProvider.useConfig)(),
41
42
  locale = _useConfig.locale;
@@ -108,11 +109,11 @@ var SearchBar = /*#__PURE__*/(0, _react.forwardRef)(function (p, ref) {
108
109
  className: (0, _classnames["default"])(classPrefix, (_classNames = {}, _classNames[classPrefix + "-active"] = hasFocus, _classNames))
109
110
  }, /*#__PURE__*/_react["default"].createElement("div", {
110
111
  className: classPrefix + "-input-box"
111
- }, /*#__PURE__*/_react["default"].createElement("div", {
112
+ }, props.icon && /*#__PURE__*/_react["default"].createElement("div", {
112
113
  className: classPrefix + "-input-box-icon"
113
- }, /*#__PURE__*/_react["default"].createElement(_antdMobileIcons.SearchOutline, null)), /*#__PURE__*/_react["default"].createElement(_input["default"], {
114
+ }, props.icon), /*#__PURE__*/_react["default"].createElement(_input["default"], {
114
115
  ref: inputRef,
115
- className: classPrefix + "-input",
116
+ className: (0, _classnames["default"])(classPrefix + "-input", (_classNames2 = {}, _classNames2[classPrefix + "-input-without-icon"] = !props.icon, _classNames2)),
116
117
  value: value,
117
118
  onChange: setValue,
118
119
  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;
@@ -24,6 +24,7 @@
24
24
  display: flex;
25
25
  align-items: center;
26
26
  min-height: 50px;
27
+ box-sizing: border-box;
27
28
  padding: 6px 12px;
28
29
  position: relative;
29
30
  }
@@ -21,9 +21,6 @@ body {
21
21
  font-size: var(--adm-font-size-main);
22
22
  font-family: var(--adm-font-family);
23
23
  }
24
- * {
25
- box-sizing: border-box;
26
- }
27
24
  a,
28
25
  button {
29
26
  cursor: pointer;
@@ -18,7 +18,7 @@
18
18
  .adm-form-item-footer {
19
19
  color: var(--adm-color-danger);
20
20
  }
21
- .adm-form-item-hidden {
21
+ .adm-form-item.adm-form-item-hidden {
22
22
  display: none;
23
23
  }
24
24
  .adm-form-vertical .adm-form-item-label {
@@ -24,7 +24,7 @@
24
24
  .adm-form-item-footer {
25
25
  color: var(--adm-color-danger);
26
26
  }
27
- .adm-form-item-hidden {
27
+ .adm-form-item.adm-form-item-hidden {
28
28
  display: none;
29
29
  }
30
30
  .adm-form-vertical .adm-form-item-label {