antd-mobile 5.12.1 → 5.12.2

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 (58) hide show
  1. package/2x/cjs/components/dialog/dialog.d.ts +2 -1
  2. package/2x/cjs/components/dropdown/dropdown.css +1 -1
  3. package/2x/cjs/components/error-block/images/busy.d.ts +1 -0
  4. package/2x/cjs/components/error-block/images/default.d.ts +1 -0
  5. package/2x/cjs/components/error-block/images/disconnected.d.ts +1 -0
  6. package/2x/cjs/components/error-block/images/empty.d.ts +1 -0
  7. package/2x/cjs/components/image/image.d.ts +1 -1
  8. package/2x/cjs/components/modal/modal.d.ts +2 -1
  9. package/2x/cjs/components/popup/popup.d.ts +2 -1
  10. package/2x/cjs/components/search-bar/search-bar.js +2 -8
  11. package/2x/cjs/components/tabs/tabs.css +4 -3
  12. package/2x/cjs/components/tabs/tabs.d.ts +1 -1
  13. package/2x/cjs/components/toast/toast.d.ts +2 -1
  14. package/2x/es/components/dialog/dialog.d.ts +2 -1
  15. package/2x/es/components/dropdown/dropdown.css +1 -1
  16. package/2x/es/components/error-block/images/busy.d.ts +1 -0
  17. package/2x/es/components/error-block/images/default.d.ts +1 -0
  18. package/2x/es/components/error-block/images/disconnected.d.ts +1 -0
  19. package/2x/es/components/error-block/images/empty.d.ts +1 -0
  20. package/2x/es/components/image/image.d.ts +1 -1
  21. package/2x/es/components/modal/modal.d.ts +2 -1
  22. package/2x/es/components/popup/popup.d.ts +2 -1
  23. package/2x/es/components/search-bar/search-bar.js +2 -8
  24. package/2x/es/components/tabs/tabs.css +4 -3
  25. package/2x/es/components/tabs/tabs.d.ts +1 -1
  26. package/2x/es/components/toast/toast.d.ts +2 -1
  27. package/2x/package.json +2 -7
  28. package/bundle/antd-mobile.cjs.js +2 -8
  29. package/bundle/antd-mobile.es.js +2 -8
  30. package/bundle/style.css +5 -4
  31. package/cjs/components/dialog/dialog.d.ts +2 -1
  32. package/cjs/components/dropdown/dropdown.css +1 -1
  33. package/cjs/components/error-block/images/busy.d.ts +1 -0
  34. package/cjs/components/error-block/images/default.d.ts +1 -0
  35. package/cjs/components/error-block/images/disconnected.d.ts +1 -0
  36. package/cjs/components/error-block/images/empty.d.ts +1 -0
  37. package/cjs/components/image/image.d.ts +1 -1
  38. package/cjs/components/modal/modal.d.ts +2 -1
  39. package/cjs/components/popup/popup.d.ts +2 -1
  40. package/cjs/components/search-bar/search-bar.js +2 -8
  41. package/cjs/components/tabs/tabs.css +4 -3
  42. package/cjs/components/tabs/tabs.d.ts +1 -1
  43. package/cjs/components/toast/toast.d.ts +2 -1
  44. package/es/components/dialog/dialog.d.ts +2 -1
  45. package/es/components/dropdown/dropdown.css +1 -1
  46. package/es/components/error-block/images/busy.d.ts +1 -0
  47. package/es/components/error-block/images/default.d.ts +1 -0
  48. package/es/components/error-block/images/disconnected.d.ts +1 -0
  49. package/es/components/error-block/images/empty.d.ts +1 -0
  50. package/es/components/image/image.d.ts +1 -1
  51. package/es/components/modal/modal.d.ts +2 -1
  52. package/es/components/popup/popup.d.ts +2 -1
  53. package/es/components/search-bar/search-bar.js +2 -8
  54. package/es/components/tabs/tabs.css +4 -3
  55. package/es/components/tabs/tabs.d.ts +1 -1
  56. package/es/components/toast/toast.d.ts +2 -1
  57. package/package.json +2 -7
  58. package/umd/antd-mobile.js +1 -1
@@ -1,4 +1,5 @@
1
1
  import React, { FC, ReactNode } from 'react';
2
+ import type { MaskProps } from '../mask';
2
3
  import { Action } from './modal-action-button';
3
4
  import { GetContainer } from '../../utils/render-to-container';
4
5
  import { PropagationEvent } from '../../utils/with-stop-propagation';
@@ -19,7 +20,7 @@ export declare type ModalProps = {
19
20
  getContainer?: GetContainer;
20
21
  bodyStyle?: React.CSSProperties;
21
22
  bodyClassName?: string;
22
- maskStyle?: React.CSSProperties;
23
+ maskStyle?: MaskProps['style'];
23
24
  maskClassName?: string;
24
25
  stopPropagation?: PropagationEvent[];
25
26
  showCloseButton?: boolean;
@@ -1,5 +1,6 @@
1
1
  import React, { FC } from 'react';
2
2
  import { NativeProps } from '../../utils/native-props';
3
+ import type { MaskProps } from '../mask';
3
4
  import { GetContainer } from '../../utils/render-to-container';
4
5
  import { PropagationEvent } from '../../utils/with-stop-propagation';
5
6
  export declare type PopupProps = {
@@ -15,7 +16,7 @@ export declare type PopupProps = {
15
16
  bodyClassName?: string;
16
17
  bodyStyle?: React.CSSProperties;
17
18
  maskClassName?: string;
18
- maskStyle?: React.CSSProperties;
19
+ maskStyle?: MaskProps['style'];
19
20
  onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
20
21
  stopPropagation?: PropagationEvent[];
21
22
  children?: React.ReactNode;
@@ -52,7 +52,7 @@ export const SearchBar = forwardRef((p, ref) => {
52
52
  }));
53
53
 
54
54
  const renderCancelButton = () => {
55
- let isShowCancel = false;
55
+ let isShowCancel;
56
56
 
57
57
  if (typeof props.showCancelButton === 'function') {
58
58
  isShowCancel = props.showCancelButton(hasFocus, value);
@@ -61,13 +61,7 @@ export const SearchBar = forwardRef((p, ref) => {
61
61
  }
62
62
 
63
63
  return isShowCancel && React.createElement("div", {
64
- className: `${classPrefix}-suffix`,
65
- onMouseDown: e => {
66
- e.preventDefault();
67
- },
68
- onTouchStart: e => {
69
- e.preventDefault();
70
- }
64
+ className: `${classPrefix}-suffix`
71
65
  }, React.createElement(Button, {
72
66
  fill: 'none',
73
67
  className: `${classPrefix}-cancel-button`,
@@ -3,6 +3,8 @@
3
3
  --content-padding: 12px;
4
4
  --active-line-height: 2px;
5
5
  --active-line-border-radius: var(--active-line-height);
6
+ --active-line-color: var(--adm-color-primary);
7
+ --active-title-color: var(--adm-color-primary);
6
8
  position: relative;
7
9
  min-width: 0;
8
10
  }
@@ -38,7 +40,7 @@
38
40
  cursor: pointer;
39
41
  }
40
42
  .adm-tabs-tab-active {
41
- color: var(--adm-color-primary);
43
+ color: var(--active-title-color);
42
44
  }
43
45
  .adm-tabs-tab-disabled {
44
46
  opacity: 0.5;
@@ -48,8 +50,7 @@
48
50
  position: absolute;
49
51
  bottom: 0;
50
52
  height: var(--active-line-height);
51
- color: var(--adm-color-primary);
52
- background: var(--adm-color-primary);
53
+ background: var(--active-line-color);
53
54
  border-radius: var(--active-line-border-radius);
54
55
  }
55
56
  .adm-tabs-content {
@@ -15,5 +15,5 @@ export declare type TabsProps = {
15
15
  stretch?: boolean;
16
16
  onChange?: (key: string) => void;
17
17
  children?: React.ReactNode;
18
- } & NativeProps<'--fixed-active-line-width' | '--active-line-height' | '--active-line-border-radius' | '--title-font-size' | '--content-padding'>;
18
+ } & NativeProps<'--fixed-active-line-width' | '--active-line-height' | '--active-line-border-radius' | '--title-font-size' | '--content-padding' | '--active-title-color' | '--active-line-color'>;
19
19
  export declare const Tabs: FC<TabsProps>;
@@ -1,9 +1,10 @@
1
1
  import React, { ReactNode } from 'react';
2
+ import type { MaskProps } from '../mask';
2
3
  import { PropagationEvent } from '../../utils/with-stop-propagation';
3
4
  import { GetContainer } from '../../utils/render-to-container';
4
5
  export interface ToastProps {
5
6
  afterClose?: () => void;
6
- maskStyle?: React.CSSProperties;
7
+ maskStyle?: MaskProps['style'];
7
8
  maskClassName?: string;
8
9
  maskClickable?: boolean;
9
10
  content?: ReactNode;
package/package.json CHANGED
@@ -1,13 +1,9 @@
1
1
  {
2
2
  "name": "antd-mobile",
3
- "version": "5.12.1",
3
+ "version": "5.12.2",
4
4
  "dependencies": {
5
5
  "@floating-ui/dom": "^0.4.5",
6
6
  "@react-spring/web": "^9.4.5",
7
- "@types/big.js": "^6.1.3",
8
- "@types/react-is": "^17.0.3",
9
- "@types/react-virtualized": "^9.21.21",
10
- "@types/resize-observer-browser": "^0.1.7",
11
7
  "@use-gesture/react": "^10.2.12",
12
8
  "ahooks": "^3.3.10",
13
9
  "antd-mobile-icons": "^0.2.2",
@@ -43,6 +39,5 @@
43
39
  "url": "git+https://github.com/ant-design/ant-design-mobile.git",
44
40
  "branch": "master",
45
41
  "platform": "github"
46
- },
47
- "packageManager": "yarn@3.2.0"
42
+ }
48
43
  }