antd-mobile 5.0.0-rc.22 → 5.0.0-rc.23

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 (97) hide show
  1. package/2x/README.md +1 -0
  2. package/2x/cjs/components/badge/badge.css +18 -10
  3. package/2x/cjs/components/badge/badge.d.ts +1 -0
  4. package/2x/cjs/components/badge/badge.js +4 -5
  5. package/2x/cjs/components/button/button.css +1 -1
  6. package/2x/cjs/components/checkbox/check-icon.js +4 -13
  7. package/2x/cjs/components/checkbox/checkbox.css +5 -14
  8. package/2x/cjs/components/checkbox/checkbox.js +3 -5
  9. package/2x/cjs/components/checkbox/indeterminate-icon.d.ts +3 -0
  10. package/2x/cjs/components/checkbox/indeterminate-icon.js +24 -0
  11. package/2x/cjs/components/image-viewer/image-viewer.d.ts +8 -2
  12. package/2x/cjs/components/image-viewer/image-viewer.js +8 -5
  13. package/2x/cjs/components/image-viewer/index.d.ts +6 -2
  14. package/2x/cjs/components/image-viewer/slides.d.ts +7 -3
  15. package/2x/cjs/components/image-viewer/slides.js +18 -11
  16. package/2x/cjs/components/modal/modal.css +25 -20
  17. package/2x/cjs/components/modal/modal.js +8 -12
  18. package/2x/cjs/components/passcode-input/passcode-input.d.ts +2 -2
  19. package/2x/cjs/components/picker-view/picker-view.css +2 -1
  20. package/2x/cjs/components/picker-view/wheel.js +1 -1
  21. package/2x/cjs/components/radio/radio.css +4 -7
  22. package/2x/cjs/components/radio/radio.js +1 -3
  23. package/2x/cjs/components/search-bar/search-bar.css +1 -1
  24. package/2x/cjs/components/switch/switch.css +8 -3
  25. package/2x/es/components/badge/badge.css +18 -10
  26. package/2x/es/components/badge/badge.d.ts +1 -0
  27. package/2x/es/components/badge/badge.js +4 -5
  28. package/2x/es/components/button/button.css +1 -1
  29. package/2x/es/components/checkbox/check-icon.js +4 -13
  30. package/2x/es/components/checkbox/checkbox.css +5 -14
  31. package/2x/es/components/checkbox/checkbox.js +2 -5
  32. package/2x/es/components/checkbox/indeterminate-icon.d.ts +3 -0
  33. package/2x/es/components/checkbox/indeterminate-icon.js +10 -0
  34. package/2x/es/components/image-viewer/image-viewer.d.ts +8 -2
  35. package/2x/es/components/image-viewer/image-viewer.js +4 -3
  36. package/2x/es/components/image-viewer/index.d.ts +6 -2
  37. package/2x/es/components/image-viewer/slides.d.ts +7 -3
  38. package/2x/es/components/image-viewer/slides.js +19 -10
  39. package/2x/es/components/modal/modal.css +25 -20
  40. package/2x/es/components/modal/modal.js +8 -12
  41. package/2x/es/components/passcode-input/passcode-input.d.ts +2 -2
  42. package/2x/es/components/picker-view/picker-view.css +2 -1
  43. package/2x/es/components/picker-view/wheel.js +1 -1
  44. package/2x/es/components/radio/radio.css +4 -7
  45. package/2x/es/components/radio/radio.js +1 -3
  46. package/2x/es/components/search-bar/search-bar.css +1 -1
  47. package/2x/es/components/switch/switch.css +8 -3
  48. package/2x/package.json +1 -1
  49. package/README.md +1 -0
  50. package/cjs/components/badge/badge.css +16 -10
  51. package/cjs/components/badge/badge.d.ts +1 -0
  52. package/cjs/components/badge/badge.js +4 -5
  53. package/cjs/components/button/button.css +1 -1
  54. package/cjs/components/checkbox/check-icon.js +4 -13
  55. package/cjs/components/checkbox/checkbox.css +5 -13
  56. package/cjs/components/checkbox/checkbox.js +3 -5
  57. package/cjs/components/checkbox/indeterminate-icon.d.ts +3 -0
  58. package/cjs/components/checkbox/indeterminate-icon.js +24 -0
  59. package/cjs/components/image-viewer/image-viewer.d.ts +8 -2
  60. package/cjs/components/image-viewer/image-viewer.js +8 -5
  61. package/cjs/components/image-viewer/index.d.ts +6 -2
  62. package/cjs/components/image-viewer/slides.d.ts +7 -3
  63. package/cjs/components/image-viewer/slides.js +18 -11
  64. package/cjs/components/modal/modal.css +23 -19
  65. package/cjs/components/modal/modal.js +8 -12
  66. package/cjs/components/passcode-input/passcode-input.d.ts +2 -2
  67. package/cjs/components/picker-view/picker-view.css +2 -1
  68. package/cjs/components/picker-view/wheel.js +1 -1
  69. package/cjs/components/radio/radio.css +4 -7
  70. package/cjs/components/radio/radio.js +1 -3
  71. package/cjs/components/search-bar/search-bar.css +1 -1
  72. package/cjs/components/switch/switch.css +8 -3
  73. package/es/components/badge/badge.css +16 -10
  74. package/es/components/badge/badge.d.ts +1 -0
  75. package/es/components/badge/badge.js +4 -5
  76. package/es/components/button/button.css +1 -1
  77. package/es/components/checkbox/check-icon.js +4 -13
  78. package/es/components/checkbox/checkbox.css +5 -13
  79. package/es/components/checkbox/checkbox.js +2 -5
  80. package/es/components/checkbox/indeterminate-icon.d.ts +3 -0
  81. package/es/components/checkbox/indeterminate-icon.js +10 -0
  82. package/es/components/image-viewer/image-viewer.d.ts +8 -2
  83. package/es/components/image-viewer/image-viewer.js +4 -3
  84. package/es/components/image-viewer/index.d.ts +6 -2
  85. package/es/components/image-viewer/slides.d.ts +7 -3
  86. package/es/components/image-viewer/slides.js +19 -10
  87. package/es/components/modal/modal.css +23 -19
  88. package/es/components/modal/modal.js +8 -12
  89. package/es/components/passcode-input/passcode-input.d.ts +2 -2
  90. package/es/components/picker-view/picker-view.css +2 -1
  91. package/es/components/picker-view/wheel.js +1 -1
  92. package/es/components/radio/radio.css +4 -7
  93. package/es/components/radio/radio.js +1 -3
  94. package/es/components/search-bar/search-bar.css +1 -1
  95. package/es/components/switch/switch.css +8 -3
  96. package/package.json +1 -1
  97. package/umd/antd-mobile.js +1 -1
@@ -2,18 +2,9 @@ import React, { memo } from 'react';
2
2
  import { withNativeProps } from '../../utils/native-props';
3
3
  export const CheckIcon = memo(props => {
4
4
  return withNativeProps(props, React.createElement("svg", {
5
- viewBox: '0 0 24 16'
6
- }, React.createElement("g", {
7
- stroke: 'none',
8
- strokeWidth: '1',
9
- fill: 'none',
10
- fillRule: 'evenodd'
11
- }, React.createElement("g", {
12
- transform: 'translate(-35.000000, -40.000000)',
13
- fill: 'currentColor'
14
- }, React.createElement("g", {
15
- transform: 'translate(24.000000, 26.000000)'
5
+ viewBox: '0 0 40 40'
16
6
  }, React.createElement("path", {
17
- d: 'M18.8574375,25.9363304 L14.4138058,21.4926987 C13.8001225,20.8790154 12.8051453,20.8790154 12.1914621,21.4926987 C11.5777807,22.10638 11.5777807,23.1013541 12.1914621,23.7150354 C12.1914632,23.7150366 12.1914644,23.7150377 12.1914656,23.7150389 L17.4442507,28.9677909 C18.225314,29.7488091 19.4916285,29.7488141 20.2726979,28.9678021 L21.0808125,28.1597054 L21.0808125,28.1597054 L32.5627182,16.6759191 C33.176366,16.0621709 33.1763252,15.0671824 32.5626272,14.4534844 C31.948944,13.8398011 30.9539668,13.8398011 30.3402835,14.4534844 L18.8574375,25.9363304 L18.8574375,25.9363304 Z'
18
- }))))));
7
+ d: 'M31.5541766,15 L28.0892433,15 L28.0892434,15 C27.971052,15 27.8576674,15.044522 27.7740471,15.1239792 L18.2724722,24.1625319 L13.2248725,19.3630279 L13.2248725,19.3630279 C13.1417074,19.2834412 13.0287551,19.2384807 12.9107898,19.2380079 L9.44474455,19.2380079 L9.44474454,19.2380079 C9.19869815,19.2384085 8.99957935,19.4284738 9,19.66253 C9,19.7747587 9.04719253,19.8823283 9.13066188,19.9616418 L17.0907466,27.5338228 C17.4170809,27.8442545 17.8447695,28 18.2713393,28 L18.2980697,28 C18.7168464,27.993643 19.133396,27.8378975 19.4530492,27.5338228 L31.8693384,15.7236361 L31.8693384,15.7236361 C32.0434167,15.5582251 32.0435739,15.2898919 31.8696892,15.1242941 C31.7860402,15.0446329 31.6725052,15 31.5541421,15 L31.5541766,15 Z',
8
+ fill: 'currentColor'
9
+ })));
19
10
  });
@@ -16,16 +16,14 @@
16
16
  border: 1px solid var(--adm-color-light);
17
17
  border-radius: var(--icon-size);
18
18
  box-sizing: border-box;
19
- display: flex;
20
- justify-content: center;
21
- align-items: center;
22
19
  width: var(--icon-size);
23
20
  height: var(--icon-size);
24
- color: #ffffff;
21
+ color: var(--adm-color-white);
25
22
  }
26
- .adm-checkbox .adm-checkbox-icon-checked {
27
- width: 65%;
28
- height: 65%;
23
+ .adm-checkbox .adm-checkbox-icon > svg {
24
+ display: block;
25
+ width: 100%;
26
+ height: 100%;
29
27
  }
30
28
  .adm-checkbox.adm-checkbox-block {
31
29
  display: flex;
@@ -52,12 +50,6 @@
52
50
  background-color: #ffffff;
53
51
  color: var(--adm-color-primary);
54
52
  }
55
- .adm-checkbox.adm-checkbox-indeterminate .adm-checkbox-indeterminate-checked {
56
- width: 60%;
57
- height: 60%;
58
- border-radius: 100%;
59
- background-color: currentColor;
60
- }
61
53
  .adm-checkbox-content {
62
54
  flex: 0 1 auto;
63
55
  font-size: var(--font-size);
@@ -6,6 +6,7 @@ import { usePropsValue } from '../../utils/use-props-value';
6
6
  import { mergeProps } from '../../utils/with-default-props';
7
7
  import { devWarning } from '../../utils/dev-log';
8
8
  import { CheckIcon } from './check-icon';
9
+ import { IndeterminateIcon } from './indeterminate-icon';
9
10
  const classPrefix = `adm-checkbox`;
10
11
  const defaultProps = {
11
12
  defaultChecked: false,
@@ -63,11 +64,7 @@ export const Checkbox = p => {
63
64
 
64
65
  return React.createElement("div", {
65
66
  className: `${classPrefix}-icon`
66
- }, props.indeterminate ? React.createElement("div", {
67
- className: `${classPrefix}-indeterminate-checked`
68
- }) : checked && React.createElement(CheckIcon, {
69
- className: `${classPrefix}-icon-checked`
70
- }));
67
+ }, props.indeterminate ? React.createElement(IndeterminateIcon, null) : checked && React.createElement(CheckIcon, null));
71
68
  };
72
69
 
73
70
  return withNativeProps(props, React.createElement("label", {
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { NativeProps } from '../../utils/native-props';
3
+ export declare const IndeterminateIcon: React.NamedExoticComponent<NativeProps<never>>;
@@ -0,0 +1,10 @@
1
+ import React, { memo } from 'react';
2
+ import { withNativeProps } from '../../utils/native-props';
3
+ export const IndeterminateIcon = memo(props => {
4
+ return withNativeProps(props, React.createElement("svg", {
5
+ viewBox: '0 0 40 40'
6
+ }, React.createElement("path", {
7
+ d: 'M20,9 C26.0752953,9 31,13.9247047 31,20 C31,26.0752953 26.0752953,31 20,31 C13.9247047,31 9,26.0752953 9,20 C9,13.9247047 13.9247047,9 20,9 Z',
8
+ fill: 'currentColor'
9
+ })));
10
+ });
@@ -1,5 +1,6 @@
1
- import { FC } from 'react';
1
+ import React, { FC } from 'react';
2
2
  import { GetContainer } from '../../utils/render-to-container';
3
+ import { SlidesRef } from './slides';
3
4
  export declare type ImageViewerProps = {
4
5
  image?: string;
5
6
  maxZoom?: number;
@@ -9,9 +10,14 @@ export declare type ImageViewerProps = {
9
10
  afterClose?: () => void;
10
11
  };
11
12
  export declare const ImageViewer: FC<ImageViewerProps>;
13
+ export declare type MultiImageViewerRef = SlidesRef;
12
14
  export declare type MultiImageViewerProps = Omit<ImageViewerProps, 'image'> & {
13
15
  images?: string[];
14
16
  defaultIndex?: number;
15
17
  onIndexChange?: (index: number) => void;
16
18
  };
17
- export declare const MultiImageViewer: FC<MultiImageViewerProps>;
19
+ export declare const MultiImageViewer: React.ForwardRefExoticComponent<Pick<ImageViewerProps, "visible" | "onClose" | "afterClose" | "getContainer" | "maxZoom"> & {
20
+ images?: string[] | undefined;
21
+ defaultIndex?: number | undefined;
22
+ onIndexChange?: ((index: number) => void) | undefined;
23
+ } & React.RefAttributes<SlidesRef>>;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { forwardRef } from 'react';
2
2
  import { mergeProps } from '../../utils/with-default-props';
3
3
  import { renderToContainer } from '../../utils/render-to-container';
4
4
  import Mask from '../mask';
@@ -33,7 +33,7 @@ export const ImageViewer = p => {
33
33
  const multiDefaultProps = Object.assign(Object.assign({}, defaultProps), {
34
34
  defaultIndex: 0
35
35
  });
36
- export const MultiImageViewer = p => {
36
+ export const MultiImageViewer = forwardRef((p, ref) => {
37
37
  const props = mergeProps(multiDefaultProps, p);
38
38
  const node = React.createElement(Mask, {
39
39
  visible: props.visible,
@@ -43,6 +43,7 @@ export const MultiImageViewer = p => {
43
43
  }, React.createElement("div", {
44
44
  className: `${classPrefix}-content`
45
45
  }, props.images && React.createElement(Slides, {
46
+ ref: ref,
46
47
  defaultIndex: props.defaultIndex,
47
48
  onIndexChange: props.onIndexChange,
48
49
  images: props.images,
@@ -54,4 +55,4 @@ export const MultiImageViewer = p => {
54
55
  maxZoom: props.maxZoom
55
56
  })));
56
57
  return renderToContainer(props.getContainer, node);
57
- };
58
+ });
@@ -1,10 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import './image-viewer.less';
3
3
  import { showMultiImageViewer, showImageViewer, clearImageViewer } from './methods';
4
- export type { ImageViewerProps, MultiImageViewerProps } from './image-viewer';
4
+ export type { ImageViewerProps, MultiImageViewerProps, MultiImageViewerRef, } from './image-viewer';
5
5
  export type { ImageViewerHandler } from './methods';
6
6
  declare const _default: import("react").FC<import("./image-viewer").ImageViewerProps> & {
7
- Multi: import("react").FC<import("./image-viewer").MultiImageViewerProps> & {
7
+ Multi: import("react").ForwardRefExoticComponent<Pick<import("./image-viewer").ImageViewerProps, "visible" | "onClose" | "afterClose" | "getContainer" | "maxZoom"> & {
8
+ images?: string[] | undefined;
9
+ defaultIndex?: number | undefined;
10
+ onIndexChange?: ((index: number) => void) | undefined;
11
+ } & import("react").RefAttributes<import("./slides").SlidesRef>> & {
8
12
  show: typeof showMultiImageViewer;
9
13
  };
10
14
  show: typeof showImageViewer;
@@ -1,8 +1,12 @@
1
- import { FC } from 'react';
2
- export declare const Slides: FC<{
1
+ import React from 'react';
2
+ export declare type SlidesType = {
3
3
  images: string[];
4
4
  onTap: () => void;
5
5
  maxZoom: number;
6
6
  defaultIndex: number;
7
7
  onIndexChange?: (index: number) => void;
8
- }>;
8
+ };
9
+ export declare type SlidesRef = {
10
+ swipeTo: (index: number, immediate: boolean) => void;
11
+ };
12
+ export declare const Slides: React.ForwardRefExoticComponent<SlidesType & React.RefAttributes<SlidesRef>>;
@@ -1,11 +1,11 @@
1
- import React, { useRef } from 'react';
1
+ import React, { forwardRef, useImperativeHandle, useRef } from 'react';
2
2
  import { useDrag } from '@use-gesture/react';
3
3
  import { useSpring, animated } from '@react-spring/web';
4
4
  import { Slide } from './slide';
5
5
  import { convertPx } from '../../utils/convert-px';
6
6
  import { bound } from '../../utils/bound';
7
7
  const classPrefix = `adm-image-viewer`;
8
- export const Slides = props => {
8
+ export const Slides = forwardRef((props, ref) => {
9
9
  const slideWidth = window.innerWidth + convertPx(16);
10
10
  const [{
11
11
  x
@@ -17,10 +17,23 @@ export const Slides = props => {
17
17
  }
18
18
  }));
19
19
  const count = props.images.length;
20
- const dragLockRef = useRef(false);
21
- const bind = useDrag(state => {
20
+
21
+ function swipeTo(index, immediate = false) {
22
22
  var _a;
23
23
 
24
+ const i = bound(index, 0, count - 1);
25
+ (_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, i);
26
+ api.start({
27
+ x: i * slideWidth,
28
+ immediate
29
+ });
30
+ }
31
+
32
+ useImperativeHandle(ref, () => ({
33
+ swipeTo
34
+ }));
35
+ const dragLockRef = useRef(false);
36
+ const bind = useDrag(state => {
24
37
  if (dragLockRef.current) return;
25
38
  const [offsetX] = state.offset;
26
39
 
@@ -28,11 +41,7 @@ export const Slides = props => {
28
41
  const minIndex = Math.floor(offsetX / slideWidth);
29
42
  const maxIndex = minIndex + 1;
30
43
  const velocityOffset = Math.min(state.velocity[0] * 2000, slideWidth) * state.direction[0];
31
- const index = bound(bound(Math.round((offsetX + velocityOffset) / slideWidth), minIndex, maxIndex), 0, count - 1);
32
- (_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, index);
33
- api.start({
34
- x: index * slideWidth
35
- });
44
+ swipeTo(bound(Math.round((offsetX + velocityOffset) / slideWidth), minIndex, maxIndex));
36
45
  } else {
37
46
  api.start({
38
47
  x: offsetX,
@@ -81,4 +90,4 @@ export const Slides = props => {
81
90
  },
82
91
  dragLockRef: dragLockRef
83
92
  }))));
84
- };
93
+ });
@@ -19,10 +19,12 @@
19
19
  .adm-modal-main {
20
20
  width: 100%;
21
21
  max-height: 70vh;
22
+ box-sizing: border-box;
22
23
  font-size: 14px;
23
24
  background-color: white;
24
25
  border-radius: 8px;
25
- overflow: hidden;
26
+ overflow-x: hidden;
27
+ overflow-y: auto;
26
28
  display: flex;
27
29
  flex-direction: column;
28
30
  }
@@ -34,13 +36,11 @@
34
36
  }
35
37
  .adm-modal-main .adm-modal-body {
36
38
  padding: 20px 12px 12px;
39
+ display: flex;
40
+ flex-direction: column;
37
41
  }
38
- .adm-modal-main .adm-modal-body .adm-modal-close {
39
- position: absolute;
40
- right: 12px;
41
- top: 12px;
42
- color: var(--adm-color-weak);
43
- padding: 2px;
42
+ .adm-modal-main .adm-modal-body > * + * {
43
+ margin-top: 8px;
44
44
  }
45
45
  .adm-modal-main .adm-modal-body-header-wrapper {
46
46
  display: flex;
@@ -53,33 +53,37 @@
53
53
  text-align: center;
54
54
  }
55
55
  .adm-modal-main .adm-modal-body-content {
56
- max-height: 70vh;
57
- overflow-x: hidden;
58
- overflow-y: auto;
59
56
  font-size: 15px;
60
57
  line-height: 1.4;
61
58
  color: #333;
62
59
  }
63
- .adm-modal-main .adm-modal-footer {
60
+ .adm-modal-main .adm-modal-close {
61
+ position: absolute;
62
+ right: 8px;
63
+ top: 8px;
64
+ color: var(--adm-color-weak);
65
+ padding: 4px;
66
+ font-size: 18px;
67
+ }
68
+ .adm-modal-footer {
64
69
  user-select: none;
65
70
  padding: 8px 12px 12px;
66
71
  }
67
- .adm-modal-main .adm-modal-footer .adm-modal-button {
72
+ .adm-modal-footer.adm-space {
73
+ --gap-vertical: 20px;
74
+ }
75
+ .adm-modal-footer .adm-modal-button {
68
76
  font-size: 18px;
69
77
  line-height: 25px;
70
- border-right: solid 0.5px var(--adm-border-color);
71
- }
72
- .adm-modal-main .adm-modal-footer .adm-modal-button:last-child {
73
- border-right: none;
74
78
  }
75
- .adm-modal-main .adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary) {
79
+ .adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary) {
76
80
  padding-top: 0;
77
81
  padding-bottom: 0;
78
82
  }
79
- .adm-modal-main .adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary)::before {
83
+ .adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary)::before {
80
84
  display: none;
81
85
  }
82
- .adm-modal-main .adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary):active {
86
+ .adm-modal-footer .adm-modal-button:not(.adm-modal-button-primary):active {
83
87
  opacity: 0.7;
84
88
  }
85
89
  .adm-modal-image-container {
@@ -71,7 +71,10 @@ export const Modal = p => {
71
71
  style: Object.assign({}, style),
72
72
  onClick: e => e.stopPropagation(),
73
73
  className: `${classPrefix}-main`
74
- }, !!props.image && React.createElement("div", {
74
+ }, props.showCloseButton && React.createElement("a", {
75
+ className: classNames(`${classPrefix}-close`, 'adm-plain-anchor'),
76
+ onClick: props.onClose
77
+ }, React.createElement(CloseOutline, null)), !!props.image && React.createElement("div", {
75
78
  className: `${classPrefix}-image-container`
76
79
  }, React.createElement(Image, {
77
80
  src: props.image,
@@ -80,12 +83,6 @@ export const Modal = p => {
80
83
  })), React.createElement("div", {
81
84
  style: props.bodyStyle,
82
85
  className: classNames(`${classPrefix}-body`, props.bodyClassName)
83
- }, props.showCloseButton && React.createElement("a", {
84
- className: classNames(`${classPrefix}-close`, 'adm-plain-anchor'),
85
- onClick: props.onClose
86
- }, React.createElement(CloseOutline, null)), React.createElement(Space, {
87
- direction: 'vertical',
88
- block: true
89
86
  }, !!props.header && React.createElement("div", {
90
87
  className: `${classPrefix}-body-header-wrapper`
91
88
  }, React.createElement("div", {
@@ -94,11 +91,10 @@ export const Modal = p => {
94
91
  className: `${classPrefix}-body-title`
95
92
  }, props.title), !!props.content && React.createElement("div", {
96
93
  className: `${classPrefix}-body-content`
97
- }, typeof props.content === 'string' ? React.createElement(AutoCenter, null, props.content) : props.content))), React.createElement("div", {
98
- className: `${classPrefix}-footer`
99
- }, React.createElement(Space, {
94
+ }, typeof props.content === 'string' ? React.createElement(AutoCenter, null, props.content) : props.content)), React.createElement(Space, {
100
95
  direction: 'vertical',
101
- block: true
96
+ block: true,
97
+ className: `${classPrefix}-footer`
102
98
  }, props.actions.map((action, index) => {
103
99
  return React.createElement(ModalActionButton, {
104
100
  key: action.key,
@@ -113,6 +109,6 @@ export const Modal = p => {
113
109
  }
114
110
  })
115
111
  });
116
- }))))))));
112
+ })))))));
117
113
  return renderToContainer(props.getContainer, node);
118
114
  };
@@ -14,7 +14,7 @@ export declare type PasscodeInputProps = {
14
14
  onFocus?: () => void;
15
15
  keyboard?: ReactElement<NumberKeyboardProps>;
16
16
  onFill?: (val: string) => void;
17
- } & NativeProps<'--cell-gap' | '--cell-size'>;
17
+ } & NativeProps<'--cell-gap' | '--cell-size' | '--dot-size' | '--border-color' | '--border-radius'>;
18
18
  export declare type PasscodeInputRef = {
19
19
  focus: () => void;
20
20
  blur: () => void;
@@ -32,4 +32,4 @@ export declare const PasscodeInput: React.ForwardRefExoticComponent<{
32
32
  onFocus?: (() => void) | undefined;
33
33
  keyboard?: React.ReactElement<NumberKeyboardProps, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | undefined;
34
34
  onFill?: ((val: string) => void) | undefined;
35
- } & NativeProps<"--cell-size" | "--cell-gap"> & React.RefAttributes<PasscodeInputRef>>;
35
+ } & NativeProps<"--border-radius" | "--border-color" | "--cell-size" | "--dot-size" | "--cell-gap"> & React.RefAttributes<PasscodeInputRef>>;
@@ -59,6 +59,7 @@
59
59
  display: flex;
60
60
  flex-direction: column;
61
61
  position: relative;
62
+ z-index: 0;
62
63
  }
63
64
  .adm-picker-view-column-accessible > * {
64
65
  flex: 1;
@@ -75,7 +76,7 @@
75
76
  }
76
77
  .adm-picker-view-mask {
77
78
  position: absolute;
78
- z-index: 100;
79
+ z-index: 10000;
79
80
  left: 0;
80
81
  top: 0;
81
82
  width: 100%;
@@ -126,7 +126,7 @@ export const Wheel = memo(props => {
126
126
  className: `${classPrefix}-column`
127
127
  }, bind()), React.createElement(animated.div, {
128
128
  style: {
129
- y
129
+ translateY: y
130
130
  },
131
131
  className: `${classPrefix}-column-wheel`,
132
132
  "aria-hidden": true
@@ -16,17 +16,14 @@
16
16
  border: 1px solid var(--adm-color-light);
17
17
  border-radius: var(--icon-size);
18
18
  box-sizing: border-box;
19
- display: flex;
20
- justify-content: center;
21
- align-items: center;
22
19
  width: var(--icon-size);
23
20
  height: var(--icon-size);
24
- color: #ffffff;
21
+ color: var(--adm-color-white);
25
22
  }
26
- .adm-radio .adm-radio-icon-checked {
23
+ .adm-radio .adm-radio-icon > svg {
27
24
  display: block;
28
- width: 65%;
29
- height: 65%;
25
+ width: 100%;
26
+ height: 100%;
30
27
  }
31
28
  .adm-radio.adm-radio-block {
32
29
  display: flex;
@@ -49,9 +49,7 @@ export const Radio = p => {
49
49
 
50
50
  return React.createElement("div", {
51
51
  className: `${classPrefix}-icon`
52
- }, checked && React.createElement(CheckIcon, {
53
- className: `${classPrefix}-icon-checked`
54
- }));
52
+ }, checked && React.createElement(CheckIcon, null));
55
53
  };
56
54
 
57
55
  return withNativeProps(props, React.createElement("label", {
@@ -48,7 +48,7 @@
48
48
  .adm-search-bar .adm-search-bar-cancel-button.adm-button {
49
49
  padding: 3px 12px;
50
50
  }
51
- .adm-search-bar-active .adm-input.adm-input {
51
+ .adm-search-bar-active .adm-input.adm-input.adm-input {
52
52
  --placeholder-color: var(--adm-color-light);
53
53
  }
54
54
  .adm-search-bar-active .adm-search-bar-input-box {
@@ -5,8 +5,8 @@
5
5
  }
6
6
  .adm-switch {
7
7
  --checked-color: var(--adm-color-primary);
8
- --height: 30px;
9
- --width: 50px;
8
+ --height: 31px;
9
+ --width: 51px;
10
10
  --border-width: 2px;
11
11
  display: inline-block;
12
12
  vertical-align: middle;
@@ -63,9 +63,14 @@
63
63
  .adm-switch-inner {
64
64
  position: relative;
65
65
  z-index: 1;
66
- margin: 0 10px 0 calc(var(--height) - var(--border-width) + 5px);
66
+ display: flex;
67
+ justify-content: center;
68
+ align-items: center;
69
+ margin: 0 8px 0 calc(var(--height) - var(--border-width) + 4px);
70
+ height: 100%;
67
71
  color: var(--adm-color-weak);
68
72
  transition: margin 200ms;
73
+ font-size: 15px;
69
74
  }
70
75
  .adm-switch.adm-switch-checked .adm-switch-checkbox {
71
76
  background: var(--checked-color);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-mobile",
3
- "version": "5.0.0-rc.22",
3
+ "version": "5.0.0-rc.23",
4
4
  "dependencies": {
5
5
  "@react-spring/web": "^9.4.2",
6
6
  "@types/resize-observer-browser": "^0.1.6",