antd-mobile 5.21.0 → 5.22.0
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.
- package/2x/bundle/antd-mobile.cjs.development.js +25724 -0
- package/2x/bundle/antd-mobile.cjs.js +8 -32
- package/2x/bundle/antd-mobile.compatible.umd.js +11218 -11773
- package/2x/bundle/antd-mobile.es.development.js +25704 -0
- package/2x/bundle/antd-mobile.es.js +8163 -8512
- package/2x/bundle/antd-mobile.umd.development.js +25726 -0
- package/2x/bundle/antd-mobile.umd.js +8 -32
- package/2x/bundle/style.css +21 -7
- package/2x/cjs/components/action-sheet/action-sheet.css +6 -2
- package/2x/cjs/components/action-sheet/action-sheet.d.ts +1 -0
- package/2x/cjs/components/action-sheet/action-sheet.js +2 -1
- package/2x/cjs/components/check-list/check-list.css +1 -1
- package/2x/cjs/components/ellipsis/ellipsis.js +1 -0
- package/2x/cjs/components/floating-panel/floating-panel.js +2 -2
- package/2x/cjs/components/image-viewer/image-viewer.js +4 -2
- package/2x/cjs/components/index-bar/index-bar.css +1 -1
- package/2x/cjs/components/page-indicator/page-indicator.css +1 -1
- package/2x/cjs/components/selector/selector.css +10 -0
- package/2x/cjs/components/selector/selector.d.ts +3 -2
- package/2x/cjs/components/selector/selector.js +1 -4
- package/2x/cjs/components/tab-bar/tab-bar.css +2 -2
- package/2x/es/components/action-sheet/action-sheet.css +6 -2
- package/2x/es/components/action-sheet/action-sheet.d.ts +1 -0
- package/2x/es/components/action-sheet/action-sheet.js +2 -1
- package/2x/es/components/check-list/check-list.css +1 -1
- package/2x/es/components/ellipsis/ellipsis.js +1 -0
- package/2x/es/components/floating-panel/floating-panel.js +2 -2
- package/2x/es/components/image-viewer/image-viewer.js +4 -2
- package/2x/es/components/index-bar/index-bar.css +1 -1
- package/2x/es/components/page-indicator/page-indicator.css +1 -1
- package/2x/es/components/selector/selector.css +10 -0
- package/2x/es/components/selector/selector.d.ts +3 -2
- package/2x/es/components/selector/selector.js +1 -3
- package/2x/es/components/tab-bar/tab-bar.css +2 -2
- package/2x/package.json +1 -1
- package/2x/umd/antd-mobile.js +11218 -11773
- package/bundle/antd-mobile.cjs.development.js +25724 -0
- package/bundle/antd-mobile.cjs.js +8 -32
- package/bundle/antd-mobile.compatible.umd.js +11218 -11773
- package/bundle/antd-mobile.es.development.js +25704 -0
- package/bundle/antd-mobile.es.js +8163 -8512
- package/bundle/antd-mobile.umd.development.js +25726 -0
- package/bundle/antd-mobile.umd.js +8 -32
- package/bundle/style.css +1 -1
- package/cjs/components/action-sheet/action-sheet.css +5 -2
- package/cjs/components/action-sheet/action-sheet.d.ts +1 -0
- package/cjs/components/action-sheet/action-sheet.js +2 -1
- package/cjs/components/check-list/check-list.css +1 -1
- package/cjs/components/ellipsis/ellipsis.js +1 -0
- package/cjs/components/floating-panel/floating-panel.js +2 -2
- package/cjs/components/image-viewer/image-viewer.js +4 -2
- package/cjs/components/index-bar/index-bar.css +1 -1
- package/cjs/components/page-indicator/page-indicator.css +1 -1
- package/cjs/components/selector/selector.css +9 -0
- package/cjs/components/selector/selector.d.ts +3 -2
- package/cjs/components/selector/selector.js +1 -4
- package/cjs/components/tab-bar/tab-bar.css +2 -2
- package/es/components/action-sheet/action-sheet.css +5 -2
- package/es/components/action-sheet/action-sheet.d.ts +1 -0
- package/es/components/action-sheet/action-sheet.js +2 -1
- package/es/components/check-list/check-list.css +1 -1
- package/es/components/ellipsis/ellipsis.js +1 -0
- package/es/components/floating-panel/floating-panel.js +2 -2
- package/es/components/image-viewer/image-viewer.js +4 -2
- package/es/components/index-bar/index-bar.css +1 -1
- package/es/components/page-indicator/page-indicator.css +1 -1
- package/es/components/selector/selector.css +9 -0
- package/es/components/selector/selector.d.ts +3 -2
- package/es/components/selector/selector.js +1 -3
- package/es/components/tab-bar/tab-bar.css +2 -2
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -47,7 +47,8 @@ export const ActionSheet = p => {
|
|
|
47
47
|
}, React.createElement("a", {
|
|
48
48
|
className: classNames('adm-plain-anchor', `${classPrefix}-button-item`, {
|
|
49
49
|
[`${classPrefix}-button-item-danger`]: action.danger,
|
|
50
|
-
[`${classPrefix}-button-item-disabled`]: action.disabled
|
|
50
|
+
[`${classPrefix}-button-item-disabled`]: action.disabled,
|
|
51
|
+
[`${classPrefix}-button-item-bold`]: action.bold
|
|
51
52
|
}),
|
|
52
53
|
onClick: () => {
|
|
53
54
|
var _a, _b, _c;
|
|
@@ -23,6 +23,7 @@ export const Ellipsis = p => {
|
|
|
23
23
|
function calcEllipsised() {
|
|
24
24
|
const root = rootRef.current;
|
|
25
25
|
if (!root) return;
|
|
26
|
+
if (!root.offsetParent) return;
|
|
26
27
|
const originStyle = window.getComputedStyle(root);
|
|
27
28
|
const container = document.createElement('div');
|
|
28
29
|
const styleNames = Array.prototype.slice.apply(originStyle);
|
|
@@ -113,8 +113,8 @@ export const FloatingPanel = forwardRef((p, ref) => {
|
|
|
113
113
|
ref: elementRef,
|
|
114
114
|
className: 'adm-floating-panel',
|
|
115
115
|
style: {
|
|
116
|
-
height: maxHeight,
|
|
117
|
-
translateY: y.to(y => `calc(100% + (${y}px))`)
|
|
116
|
+
height: Math.round(maxHeight),
|
|
117
|
+
translateY: y.to(y => `calc(100% + (${Math.round(y)}px))`)
|
|
118
118
|
}
|
|
119
119
|
}, React.createElement("div", {
|
|
120
120
|
className: 'adm-floating-panel-mask',
|
|
@@ -19,7 +19,8 @@ export const ImageViewer = p => {
|
|
|
19
19
|
visible: props.visible,
|
|
20
20
|
disableBodyScroll: false,
|
|
21
21
|
opacity: 'thick',
|
|
22
|
-
afterClose: props.afterClose
|
|
22
|
+
afterClose: props.afterClose,
|
|
23
|
+
destroyOnClose: true
|
|
23
24
|
}, React.createElement("div", {
|
|
24
25
|
className: `${classPrefix}-content`
|
|
25
26
|
}, props.image && React.createElement(Slide, {
|
|
@@ -64,7 +65,8 @@ export const MultiImageViewer = forwardRef((p, ref) => {
|
|
|
64
65
|
visible: props.visible,
|
|
65
66
|
disableBodyScroll: false,
|
|
66
67
|
opacity: 'thick',
|
|
67
|
-
afterClose: props.afterClose
|
|
68
|
+
afterClose: props.afterClose,
|
|
69
|
+
destroyOnClose: true
|
|
68
70
|
}, React.createElement("div", {
|
|
69
71
|
className: `${classPrefix}-content`
|
|
70
72
|
}, props.images && React.createElement(Slides, {
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
--checked-border: none;
|
|
8
8
|
--border-radius: 2px;
|
|
9
9
|
--padding: 8px 16px;
|
|
10
|
+
--gap: 8px;
|
|
11
|
+
---gap: var(--gap);
|
|
12
|
+
---gap-horizontal: var(--gap-horizontal, var(--gap));
|
|
13
|
+
---gap-vertical: var(--gap-vertical, var(--gap));
|
|
10
14
|
overflow: hidden;
|
|
11
15
|
font-size: var(--adm-font-size-7);
|
|
12
16
|
line-height: 1.4;
|
|
@@ -14,6 +18,11 @@
|
|
|
14
18
|
.adm-selector .adm-space.adm-space {
|
|
15
19
|
--gap: 12px;
|
|
16
20
|
}
|
|
21
|
+
.adm-selector .adm-grid {
|
|
22
|
+
--gap: var(---gap);
|
|
23
|
+
--gap-horizontal: var(---gap-horizontal);
|
|
24
|
+
--gap-vertical: var(---gap-vertical);
|
|
25
|
+
}
|
|
17
26
|
.adm-selector-item {
|
|
18
27
|
padding: var(--padding);
|
|
19
28
|
position: relative;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
|
+
import { GridProps } from '../grid';
|
|
3
4
|
declare type SelectorValue = string | number;
|
|
4
5
|
export interface SelectorOption<V> {
|
|
5
6
|
label: ReactNode;
|
|
@@ -9,7 +10,7 @@ export interface SelectorOption<V> {
|
|
|
9
10
|
}
|
|
10
11
|
export declare type SelectorProps<V> = {
|
|
11
12
|
options: SelectorOption<V>[];
|
|
12
|
-
columns?:
|
|
13
|
+
columns?: GridProps['columns'];
|
|
13
14
|
multiple?: boolean;
|
|
14
15
|
disabled?: boolean;
|
|
15
16
|
defaultValue?: V[];
|
|
@@ -18,6 +19,6 @@ export declare type SelectorProps<V> = {
|
|
|
18
19
|
items: SelectorOption<V>[];
|
|
19
20
|
}) => void;
|
|
20
21
|
showCheckMark?: boolean;
|
|
21
|
-
} & NativeProps<'--color' | '--checked-color' | '--text-color' | '--checked-text-color' | '--border' | '--checked-border' | '--border-radius' | '--padding'>;
|
|
22
|
+
} & NativeProps<'--color' | '--checked-color' | '--text-color' | '--checked-text-color' | '--border' | '--checked-border' | '--border-radius' | '--padding' | '--gap' | '--gap-vertical' | '--gap-horizontal'>;
|
|
22
23
|
export declare const Selector: <V extends SelectorValue>(p: SelectorProps<V>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
23
24
|
export {};
|
|
@@ -4,7 +4,6 @@ import { withNativeProps } from '../../utils/native-props';
|
|
|
4
4
|
import { mergeProps } from '../../utils/with-default-props';
|
|
5
5
|
import Space from '../space';
|
|
6
6
|
import Grid from '../grid';
|
|
7
|
-
import { convertPx } from '../../utils/convert-px';
|
|
8
7
|
import { usePropsValue } from '../../utils/use-props-value';
|
|
9
8
|
import { CheckMark } from './check-mark';
|
|
10
9
|
const classPrefix = `adm-selector`;
|
|
@@ -65,7 +64,6 @@ export const Selector = p => {
|
|
|
65
64
|
}, !props.columns && React.createElement(Space, {
|
|
66
65
|
wrap: true
|
|
67
66
|
}, items), props.columns && React.createElement(Grid, {
|
|
68
|
-
columns: props.columns
|
|
69
|
-
gap: convertPx(8)
|
|
67
|
+
columns: props.columns
|
|
70
68
|
}, items)));
|
|
71
69
|
};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
}
|
|
9
9
|
.adm-tab-bar-item {
|
|
10
10
|
flex: 1;
|
|
11
|
-
color: var(--adm-color-
|
|
11
|
+
color: var(--adm-color-text-secondary);
|
|
12
12
|
white-space: nowrap;
|
|
13
13
|
padding: 4px 8px;
|
|
14
14
|
width: -webkit-min-content;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
line-height: 1;
|
|
27
27
|
}
|
|
28
28
|
.adm-tab-bar-item-title {
|
|
29
|
-
font-size: var(--adm-font-size-
|
|
29
|
+
font-size: var(--adm-font-size-2);
|
|
30
30
|
line-height: 15px;
|
|
31
31
|
}
|
|
32
32
|
.adm-tab-bar-item-title-with-icon {
|