antd-mobile 5.17.1 → 5.17.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.
@@ -10451,7 +10451,7 @@ const Wheel = React$1.memo((props) => {
10451
10451
  ahooks.useIsomorphicLayoutEffect(() => {
10452
10452
  if (draggingRef.current)
10453
10453
  return;
10454
- if (!value)
10454
+ if (value === null)
10455
10455
  return;
10456
10456
  const targetIndex = column.findIndex((item) => item.value === value);
10457
10457
  if (targetIndex < 0)
@@ -13867,7 +13867,7 @@ const FloatingBubble = (p2) => {
13867
13867
  ref: buttonRef
13868
13868
  }), props.children)));
13869
13869
  };
13870
- var floatingPanel = /* @__PURE__ */ (() => ".adm-floating-panel {\n --border-radius: 8px;\n --header-height: 28px;\n --z-index: var(--adm-floating-panel-z-index, 900);\n border-top-left-radius: var(--border-radius);\n border-top-right-radius: var(--border-radius);\n background: var(--adm-color-white);\n position: fixed;\n z-index: var(--z-index);\n bottom: 0;\n left: 0;\n width: 100vw;\n display: flex;\n flex-direction: column;\n touch-action: none;\n}\n.adm-floating-panel-mask {\n display: block;\n width: 100%;\n height: 100vh;\n position: absolute;\n left: 0;\n top: -100vh;\n background: transparent;\n}\n.adm-floating-panel::after {\n content: '';\n display: block;\n position: absolute;\n bottom: -100vh;\n height: 100vh;\n width: 100vw;\n background: var(--adm-color-white);\n}\n.adm-floating-panel .adm-floating-panel-header {\n flex: none;\n height: var(--header-height);\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: -webkit-grab;\n cursor: grab;\n -webkit-user-select: none;\n user-select: none;\n background-color: var(--adm-color-background);\n}\n.adm-floating-panel .adm-floating-panel-header .adm-floating-panel-bar {\n height: 3px;\n width: 20px;\n border-radius: 10px;\n background: var(--adm-color-light);\n}\n.adm-floating-panel .adm-floating-panel-content {\n flex: 1;\n overflow-y: scroll;\n}\n")();
13870
+ var floatingPanel = /* @__PURE__ */ (() => ".adm-floating-panel {\n --border-radius: 8px;\n --header-height: 28px;\n --z-index: var(--adm-floating-panel-z-index, 900);\n position: fixed;\n z-index: var(--z-index);\n bottom: 0;\n left: 0;\n width: 100vw;\n display: flex;\n flex-direction: column;\n touch-action: none;\n}\n.adm-floating-panel-mask {\n display: block;\n width: 100%;\n height: 100vh;\n position: absolute;\n left: 0;\n top: -100vh;\n background: transparent;\n}\n.adm-floating-panel::after {\n content: '';\n display: block;\n position: absolute;\n bottom: -100vh;\n height: 100vh;\n width: 100vw;\n background: var(--adm-color-background);\n}\n.adm-floating-panel .adm-floating-panel-header {\n flex: none;\n height: var(--header-height);\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: -webkit-grab;\n cursor: grab;\n -webkit-user-select: none;\n user-select: none;\n background-color: var(--adm-color-background);\n border-top-left-radius: var(--border-radius);\n border-top-right-radius: var(--border-radius);\n}\n.adm-floating-panel .adm-floating-panel-header .adm-floating-panel-bar {\n height: 3px;\n width: 20px;\n border-radius: 10px;\n background: var(--adm-color-light);\n}\n.adm-floating-panel .adm-floating-panel-content {\n flex: 1;\n overflow-y: scroll;\n background: var(--adm-color-background);\n}\n")();
13871
13871
  function nearest(arr, target) {
13872
13872
  return arr.reduce((pre, cur) => {
13873
13873
  return Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur;
@@ -18403,6 +18403,7 @@ const TextArea = React$1.forwardRef((p2, ref) => {
18403
18403
  const textArea2 = nativeTextAreaRef.current;
18404
18404
  if (!textArea2)
18405
18405
  return;
18406
+ textArea2.style.height = "auto";
18406
18407
  let height = textArea2.scrollHeight;
18407
18408
  if (typeof autoSize === "object") {
18408
18409
  const computedStyle = window.getComputedStyle(textArea2);
@@ -10441,7 +10441,7 @@ const Wheel = memo((props) => {
10441
10441
  useIsomorphicLayoutEffect(() => {
10442
10442
  if (draggingRef.current)
10443
10443
  return;
10444
- if (!value)
10444
+ if (value === null)
10445
10445
  return;
10446
10446
  const targetIndex = column.findIndex((item) => item.value === value);
10447
10447
  if (targetIndex < 0)
@@ -13857,7 +13857,7 @@ const FloatingBubble = (p2) => {
13857
13857
  ref: buttonRef
13858
13858
  }), props.children)));
13859
13859
  };
13860
- var floatingPanel = /* @__PURE__ */ (() => ".adm-floating-panel {\n --border-radius: 8px;\n --header-height: 28px;\n --z-index: var(--adm-floating-panel-z-index, 900);\n border-top-left-radius: var(--border-radius);\n border-top-right-radius: var(--border-radius);\n background: var(--adm-color-white);\n position: fixed;\n z-index: var(--z-index);\n bottom: 0;\n left: 0;\n width: 100vw;\n display: flex;\n flex-direction: column;\n touch-action: none;\n}\n.adm-floating-panel-mask {\n display: block;\n width: 100%;\n height: 100vh;\n position: absolute;\n left: 0;\n top: -100vh;\n background: transparent;\n}\n.adm-floating-panel::after {\n content: '';\n display: block;\n position: absolute;\n bottom: -100vh;\n height: 100vh;\n width: 100vw;\n background: var(--adm-color-white);\n}\n.adm-floating-panel .adm-floating-panel-header {\n flex: none;\n height: var(--header-height);\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: -webkit-grab;\n cursor: grab;\n -webkit-user-select: none;\n user-select: none;\n background-color: var(--adm-color-background);\n}\n.adm-floating-panel .adm-floating-panel-header .adm-floating-panel-bar {\n height: 3px;\n width: 20px;\n border-radius: 10px;\n background: var(--adm-color-light);\n}\n.adm-floating-panel .adm-floating-panel-content {\n flex: 1;\n overflow-y: scroll;\n}\n")();
13860
+ var floatingPanel = /* @__PURE__ */ (() => ".adm-floating-panel {\n --border-radius: 8px;\n --header-height: 28px;\n --z-index: var(--adm-floating-panel-z-index, 900);\n position: fixed;\n z-index: var(--z-index);\n bottom: 0;\n left: 0;\n width: 100vw;\n display: flex;\n flex-direction: column;\n touch-action: none;\n}\n.adm-floating-panel-mask {\n display: block;\n width: 100%;\n height: 100vh;\n position: absolute;\n left: 0;\n top: -100vh;\n background: transparent;\n}\n.adm-floating-panel::after {\n content: '';\n display: block;\n position: absolute;\n bottom: -100vh;\n height: 100vh;\n width: 100vw;\n background: var(--adm-color-background);\n}\n.adm-floating-panel .adm-floating-panel-header {\n flex: none;\n height: var(--header-height);\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: -webkit-grab;\n cursor: grab;\n -webkit-user-select: none;\n user-select: none;\n background-color: var(--adm-color-background);\n border-top-left-radius: var(--border-radius);\n border-top-right-radius: var(--border-radius);\n}\n.adm-floating-panel .adm-floating-panel-header .adm-floating-panel-bar {\n height: 3px;\n width: 20px;\n border-radius: 10px;\n background: var(--adm-color-light);\n}\n.adm-floating-panel .adm-floating-panel-content {\n flex: 1;\n overflow-y: scroll;\n background: var(--adm-color-background);\n}\n")();
13861
13861
  function nearest(arr, target) {
13862
13862
  return arr.reduce((pre, cur) => {
13863
13863
  return Math.abs(pre - target) < Math.abs(cur - target) ? pre : cur;
@@ -18393,6 +18393,7 @@ const TextArea = forwardRef((p2, ref) => {
18393
18393
  const textArea2 = nativeTextAreaRef.current;
18394
18394
  if (!textArea2)
18395
18395
  return;
18396
+ textArea2.style.height = "auto";
18396
18397
  let height = textArea2.scrollHeight;
18397
18398
  if (typeof autoSize === "object") {
18398
18399
  const computedStyle = window.getComputedStyle(textArea2);
@@ -1851,9 +1851,6 @@ a.adm-list-item:active:not(.adm-list-item-disabled)::after {
1851
1851
  --border-radius: 16px;
1852
1852
  --header-height: 56px;
1853
1853
  --z-index: var(--adm-floating-panel-z-index, 900);
1854
- border-top-left-radius: var(--border-radius);
1855
- border-top-right-radius: var(--border-radius);
1856
- background: var(--adm-color-white);
1857
1854
  position: fixed;
1858
1855
  z-index: var(--z-index);
1859
1856
  bottom: 0;
@@ -1881,7 +1878,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled)::after {
1881
1878
  bottom: -100vh;
1882
1879
  height: 100vh;
1883
1880
  width: 100vw;
1884
- background: var(--adm-color-white);
1881
+ background: var(--adm-color-background);
1885
1882
  }
1886
1883
 
1887
1884
  .adm-floating-panel .adm-floating-panel-header {
@@ -1895,6 +1892,8 @@ a.adm-list-item:active:not(.adm-list-item-disabled)::after {
1895
1892
  -webkit-user-select: none;
1896
1893
  user-select: none;
1897
1894
  background-color: var(--adm-color-background);
1895
+ border-top-left-radius: var(--border-radius);
1896
+ border-top-right-radius: var(--border-radius);
1898
1897
  }
1899
1898
 
1900
1899
  .adm-floating-panel .adm-floating-panel-header .adm-floating-panel-bar {
@@ -1907,6 +1906,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled)::after {
1907
1906
  .adm-floating-panel .adm-floating-panel-content {
1908
1907
  flex: 1;
1909
1908
  overflow-y: scroll;
1909
+ background: var(--adm-color-background);
1910
1910
  }
1911
1911
 
1912
1912
  .adm-form {
@@ -2,9 +2,6 @@
2
2
  --border-radius: 16px;
3
3
  --header-height: 56px;
4
4
  --z-index: var(--adm-floating-panel-z-index, 900);
5
- border-top-left-radius: var(--border-radius);
6
- border-top-right-radius: var(--border-radius);
7
- background: var(--adm-color-white);
8
5
  position: fixed;
9
6
  z-index: var(--z-index);
10
7
  bottom: 0;
@@ -32,7 +29,7 @@
32
29
  bottom: -100vh;
33
30
  height: 100vh;
34
31
  width: 100vw;
35
- background: var(--adm-color-white);
32
+ background: var(--adm-color-background);
36
33
  }
37
34
 
38
35
  .adm-floating-panel .adm-floating-panel-header {
@@ -46,6 +43,8 @@
46
43
  -webkit-user-select: none;
47
44
  user-select: none;
48
45
  background-color: var(--adm-color-background);
46
+ border-top-left-radius: var(--border-radius);
47
+ border-top-right-radius: var(--border-radius);
49
48
  }
50
49
 
51
50
  .adm-floating-panel .adm-floating-panel-header .adm-floating-panel-bar {
@@ -58,4 +57,5 @@
58
57
  .adm-floating-panel .adm-floating-panel-content {
59
58
  flex: 1;
60
59
  overflow-y: scroll;
60
+ background: var(--adm-color-background);
61
61
  }
@@ -62,7 +62,7 @@ const Wheel = (0, _react.memo)(props => {
62
62
  });
63
63
  (0, _ahooks.useIsomorphicLayoutEffect)(() => {
64
64
  if (draggingRef.current) return;
65
- if (!value) return;
65
+ if (value === null) return;
66
66
  const targetIndex = column.findIndex(item => item.value === value);
67
67
  if (targetIndex < 0) return;
68
68
  const finalPosition = targetIndex * -itemHeight.current;
@@ -68,6 +68,7 @@ const TextArea = (0, _react.forwardRef)((p, ref) => {
68
68
  if (!autoSize) return;
69
69
  const textArea = nativeTextAreaRef.current;
70
70
  if (!textArea) return;
71
+ textArea.style.height = 'auto';
71
72
  let height = textArea.scrollHeight;
72
73
 
73
74
  if (typeof autoSize === 'object') {
@@ -2,9 +2,6 @@
2
2
  --border-radius: 16px;
3
3
  --header-height: 56px;
4
4
  --z-index: var(--adm-floating-panel-z-index, 900);
5
- border-top-left-radius: var(--border-radius);
6
- border-top-right-radius: var(--border-radius);
7
- background: var(--adm-color-white);
8
5
  position: fixed;
9
6
  z-index: var(--z-index);
10
7
  bottom: 0;
@@ -32,7 +29,7 @@
32
29
  bottom: -100vh;
33
30
  height: 100vh;
34
31
  width: 100vw;
35
- background: var(--adm-color-white);
32
+ background: var(--adm-color-background);
36
33
  }
37
34
 
38
35
  .adm-floating-panel .adm-floating-panel-header {
@@ -46,6 +43,8 @@
46
43
  -webkit-user-select: none;
47
44
  user-select: none;
48
45
  background-color: var(--adm-color-background);
46
+ border-top-left-radius: var(--border-radius);
47
+ border-top-right-radius: var(--border-radius);
49
48
  }
50
49
 
51
50
  .adm-floating-panel .adm-floating-panel-header .adm-floating-panel-bar {
@@ -58,4 +57,5 @@
58
57
  .adm-floating-panel .adm-floating-panel-content {
59
58
  flex: 1;
60
59
  overflow-y: scroll;
60
+ background: var(--adm-color-background);
61
61
  }
@@ -40,7 +40,7 @@ export const Wheel = memo(props => {
40
40
  });
41
41
  useIsomorphicLayoutEffect(() => {
42
42
  if (draggingRef.current) return;
43
- if (!value) return;
43
+ if (value === null) return;
44
44
  const targetIndex = column.findIndex(item => item.value === value);
45
45
  if (targetIndex < 0) return;
46
46
  const finalPosition = targetIndex * -itemHeight.current;
@@ -51,6 +51,7 @@ export const TextArea = forwardRef((p, ref) => {
51
51
  if (!autoSize) return;
52
52
  const textArea = nativeTextAreaRef.current;
53
53
  if (!textArea) return;
54
+ textArea.style.height = 'auto';
54
55
  let height = textArea.scrollHeight;
55
56
 
56
57
  if (typeof autoSize === 'object') {
package/2x/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-mobile",
3
- "version": "5.17.1",
3
+ "version": "5.17.2",
4
4
  "dependencies": {
5
5
  "@floating-ui/dom": "^0.5.2",
6
6
  "@react-spring/web": "^9.4.5",