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);
package/bundle/style.css CHANGED
@@ -1560,9 +1560,6 @@ a.adm-list-item:active:not(.adm-list-item-disabled)::after {
1560
1560
  --border-radius: 8px;
1561
1561
  --header-height: 28px;
1562
1562
  --z-index: var(--adm-floating-panel-z-index, 900);
1563
- border-top-left-radius: var(--border-radius);
1564
- border-top-right-radius: var(--border-radius);
1565
- background: var(--adm-color-white);
1566
1563
  position: fixed;
1567
1564
  z-index: var(--z-index);
1568
1565
  bottom: 0;
@@ -1588,7 +1585,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled)::after {
1588
1585
  bottom: -100vh;
1589
1586
  height: 100vh;
1590
1587
  width: 100vw;
1591
- background: var(--adm-color-white);
1588
+ background: var(--adm-color-background);
1592
1589
  }
1593
1590
  .adm-floating-panel .adm-floating-panel-header {
1594
1591
  flex: none;
@@ -1601,6 +1598,8 @@ a.adm-list-item:active:not(.adm-list-item-disabled)::after {
1601
1598
  -webkit-user-select: none;
1602
1599
  user-select: none;
1603
1600
  background-color: var(--adm-color-background);
1601
+ border-top-left-radius: var(--border-radius);
1602
+ border-top-right-radius: var(--border-radius);
1604
1603
  }
1605
1604
  .adm-floating-panel .adm-floating-panel-header .adm-floating-panel-bar {
1606
1605
  height: 3px;
@@ -1611,6 +1610,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled)::after {
1611
1610
  .adm-floating-panel .adm-floating-panel-content {
1612
1611
  flex: 1;
1613
1612
  overflow-y: scroll;
1613
+ background: var(--adm-color-background);
1614
1614
  }
1615
1615
  .adm-form {
1616
1616
  --border-inner: solid 1px var(--adm-color-border);
@@ -2,9 +2,6 @@
2
2
  --border-radius: 8px;
3
3
  --header-height: 28px;
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;
@@ -30,7 +27,7 @@
30
27
  bottom: -100vh;
31
28
  height: 100vh;
32
29
  width: 100vw;
33
- background: var(--adm-color-white);
30
+ background: var(--adm-color-background);
34
31
  }
35
32
  .adm-floating-panel .adm-floating-panel-header {
36
33
  flex: none;
@@ -43,6 +40,8 @@
43
40
  -webkit-user-select: none;
44
41
  user-select: none;
45
42
  background-color: var(--adm-color-background);
43
+ border-top-left-radius: var(--border-radius);
44
+ border-top-right-radius: var(--border-radius);
46
45
  }
47
46
  .adm-floating-panel .adm-floating-panel-header .adm-floating-panel-bar {
48
47
  height: 3px;
@@ -53,4 +52,5 @@
53
52
  .adm-floating-panel .adm-floating-panel-content {
54
53
  flex: 1;
55
54
  overflow-y: scroll;
55
+ background: var(--adm-color-background);
56
56
  }
@@ -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: 8px;
3
3
  --header-height: 28px;
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;
@@ -30,7 +27,7 @@
30
27
  bottom: -100vh;
31
28
  height: 100vh;
32
29
  width: 100vw;
33
- background: var(--adm-color-white);
30
+ background: var(--adm-color-background);
34
31
  }
35
32
  .adm-floating-panel .adm-floating-panel-header {
36
33
  flex: none;
@@ -43,6 +40,8 @@
43
40
  -webkit-user-select: none;
44
41
  user-select: none;
45
42
  background-color: var(--adm-color-background);
43
+ border-top-left-radius: var(--border-radius);
44
+ border-top-right-radius: var(--border-radius);
46
45
  }
47
46
  .adm-floating-panel .adm-floating-panel-header .adm-floating-panel-bar {
48
47
  height: 3px;
@@ -53,4 +52,5 @@
53
52
  .adm-floating-panel .adm-floating-panel-content {
54
53
  flex: 1;
55
54
  overflow-y: scroll;
55
+ background: var(--adm-color-background);
56
56
  }
@@ -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/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",