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
package/2x/bundle/style.css
CHANGED
|
@@ -140,15 +140,19 @@ div.adm-px-tester {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
.adm-action-sheet-button-item-description {
|
|
143
|
-
font-size: var(--adm-font-size-
|
|
143
|
+
font-size: var(--adm-font-size-6);
|
|
144
144
|
color: var(--adm-color-weak);
|
|
145
|
-
padding-top:
|
|
145
|
+
padding-top: 8px;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
.adm-action-sheet-button-item-danger .adm-action-sheet-button-item-name {
|
|
149
149
|
color: var(--adm-color-danger);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
.adm-action-sheet-button-item-bold .adm-action-sheet-button-item-name {
|
|
153
|
+
font-weight: 700;
|
|
154
|
+
}
|
|
155
|
+
|
|
152
156
|
.adm-action-sheet-cancel {
|
|
153
157
|
background-color: var(--adm-color-box);
|
|
154
158
|
padding-top: 16px;
|
|
@@ -1090,7 +1094,7 @@ div.adm-px-tester {
|
|
|
1090
1094
|
}
|
|
1091
1095
|
|
|
1092
1096
|
.adm-check-list-item-extra {
|
|
1093
|
-
font-size: var(--adm-font-size-
|
|
1097
|
+
font-size: var(--adm-font-size-10);
|
|
1094
1098
|
line-height: 1;
|
|
1095
1099
|
color: var(--adm-color-primary);
|
|
1096
1100
|
}
|
|
@@ -2482,7 +2486,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
2482
2486
|
.adm-index-bar-sidebar-bubble {
|
|
2483
2487
|
position: absolute;
|
|
2484
2488
|
top: 50%;
|
|
2485
|
-
right:
|
|
2489
|
+
right: 120px;
|
|
2486
2490
|
width: 94px;
|
|
2487
2491
|
height: 94px;
|
|
2488
2492
|
color: var(--adm-color-white);
|
|
@@ -3106,7 +3110,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
3106
3110
|
.adm-page-indicator {
|
|
3107
3111
|
display: flex;
|
|
3108
3112
|
width: auto;
|
|
3109
|
-
--dot-color:
|
|
3113
|
+
--dot-color: #dddddd;
|
|
3110
3114
|
--active-dot-color: var(--adm-color-primary);
|
|
3111
3115
|
--dot-size: 6px;
|
|
3112
3116
|
--active-dot-size: 26px;
|
|
@@ -3779,6 +3783,10 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
3779
3783
|
--checked-border: none;
|
|
3780
3784
|
--border-radius: 4px;
|
|
3781
3785
|
--padding: 16px 32px;
|
|
3786
|
+
--gap: 16px;
|
|
3787
|
+
---gap: var(--gap);
|
|
3788
|
+
---gap-horizontal: var(--gap-horizontal, var(--gap));
|
|
3789
|
+
---gap-vertical: var(--gap-vertical, var(--gap));
|
|
3782
3790
|
overflow: hidden;
|
|
3783
3791
|
font-size: var(--adm-font-size-7);
|
|
3784
3792
|
line-height: 1.4;
|
|
@@ -3788,6 +3796,12 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
3788
3796
|
--gap: 24px;
|
|
3789
3797
|
}
|
|
3790
3798
|
|
|
3799
|
+
.adm-selector .adm-grid {
|
|
3800
|
+
--gap: var(---gap);
|
|
3801
|
+
--gap-horizontal: var(---gap-horizontal);
|
|
3802
|
+
--gap-vertical: var(---gap-vertical);
|
|
3803
|
+
}
|
|
3804
|
+
|
|
3791
3805
|
.adm-selector-item {
|
|
3792
3806
|
padding: var(--padding);
|
|
3793
3807
|
position: relative;
|
|
@@ -4549,7 +4563,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
4549
4563
|
|
|
4550
4564
|
.adm-tab-bar-item {
|
|
4551
4565
|
flex: 1;
|
|
4552
|
-
color: var(--adm-color-
|
|
4566
|
+
color: var(--adm-color-text-secondary);
|
|
4553
4567
|
white-space: nowrap;
|
|
4554
4568
|
padding: 8px 16px;
|
|
4555
4569
|
width: -webkit-min-content;
|
|
@@ -4569,7 +4583,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
|
|
|
4569
4583
|
}
|
|
4570
4584
|
|
|
4571
4585
|
.adm-tab-bar-item-title {
|
|
4572
|
-
font-size: var(--adm-font-size-
|
|
4586
|
+
font-size: var(--adm-font-size-2);
|
|
4573
4587
|
line-height: 30px;
|
|
4574
4588
|
}
|
|
4575
4589
|
|
|
@@ -48,15 +48,19 @@
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.adm-action-sheet-button-item-description {
|
|
51
|
-
font-size: var(--adm-font-size-
|
|
51
|
+
font-size: var(--adm-font-size-6);
|
|
52
52
|
color: var(--adm-color-weak);
|
|
53
|
-
padding-top:
|
|
53
|
+
padding-top: 8px;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.adm-action-sheet-button-item-danger .adm-action-sheet-button-item-name {
|
|
57
57
|
color: var(--adm-color-danger);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
.adm-action-sheet-button-item-bold .adm-action-sheet-button-item-name {
|
|
61
|
+
font-weight: bold;
|
|
62
|
+
}
|
|
63
|
+
|
|
60
64
|
.adm-action-sheet-cancel {
|
|
61
65
|
background-color: var(--adm-color-box);
|
|
62
66
|
padding-top: 16px;
|
|
@@ -65,7 +65,8 @@ const ActionSheet = p => {
|
|
|
65
65
|
}, _react.default.createElement("a", {
|
|
66
66
|
className: (0, _classnames.default)('adm-plain-anchor', `${classPrefix}-button-item`, {
|
|
67
67
|
[`${classPrefix}-button-item-danger`]: action.danger,
|
|
68
|
-
[`${classPrefix}-button-item-disabled`]: action.disabled
|
|
68
|
+
[`${classPrefix}-button-item-disabled`]: action.disabled,
|
|
69
|
+
[`${classPrefix}-button-item-bold`]: action.bold
|
|
69
70
|
}),
|
|
70
71
|
onClick: () => {
|
|
71
72
|
var _a, _b, _c;
|
|
@@ -41,6 +41,7 @@ const Ellipsis = p => {
|
|
|
41
41
|
function calcEllipsised() {
|
|
42
42
|
const root = rootRef.current;
|
|
43
43
|
if (!root) return;
|
|
44
|
+
if (!root.offsetParent) return;
|
|
44
45
|
const originStyle = window.getComputedStyle(root);
|
|
45
46
|
const container = document.createElement('div');
|
|
46
47
|
const styleNames = Array.prototype.slice.apply(originStyle);
|
|
@@ -133,8 +133,8 @@ const FloatingPanel = (0, _react.forwardRef)((p, ref) => {
|
|
|
133
133
|
ref: elementRef,
|
|
134
134
|
className: 'adm-floating-panel',
|
|
135
135
|
style: {
|
|
136
|
-
height: maxHeight,
|
|
137
|
-
translateY: y.to(y => `calc(100% + (${y}px))`)
|
|
136
|
+
height: Math.round(maxHeight),
|
|
137
|
+
translateY: y.to(y => `calc(100% + (${Math.round(y)}px))`)
|
|
138
138
|
}
|
|
139
139
|
}, _react.default.createElement("div", {
|
|
140
140
|
className: 'adm-floating-panel-mask',
|
|
@@ -41,7 +41,8 @@ const ImageViewer = p => {
|
|
|
41
41
|
visible: props.visible,
|
|
42
42
|
disableBodyScroll: false,
|
|
43
43
|
opacity: 'thick',
|
|
44
|
-
afterClose: props.afterClose
|
|
44
|
+
afterClose: props.afterClose,
|
|
45
|
+
destroyOnClose: true
|
|
45
46
|
}, _react.default.createElement("div", {
|
|
46
47
|
className: `${classPrefix}-content`
|
|
47
48
|
}, props.image && _react.default.createElement(_slide.Slide, {
|
|
@@ -90,7 +91,8 @@ const MultiImageViewer = (0, _react.forwardRef)((p, ref) => {
|
|
|
90
91
|
visible: props.visible,
|
|
91
92
|
disableBodyScroll: false,
|
|
92
93
|
opacity: 'thick',
|
|
93
|
-
afterClose: props.afterClose
|
|
94
|
+
afterClose: props.afterClose,
|
|
95
|
+
destroyOnClose: true
|
|
94
96
|
}, _react.default.createElement("div", {
|
|
95
97
|
className: `${classPrefix}-content`
|
|
96
98
|
}, props.images && _react.default.createElement(_slides.Slides, {
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
--checked-border: none;
|
|
8
8
|
--border-radius: 4px;
|
|
9
9
|
--padding: 16px 32px;
|
|
10
|
+
--gap: 16px;
|
|
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;
|
|
@@ -16,6 +20,12 @@
|
|
|
16
20
|
--gap: 24px;
|
|
17
21
|
}
|
|
18
22
|
|
|
23
|
+
.adm-selector .adm-grid {
|
|
24
|
+
--gap: var(---gap);
|
|
25
|
+
--gap-horizontal: var(---gap-horizontal);
|
|
26
|
+
--gap-vertical: var(---gap-vertical);
|
|
27
|
+
}
|
|
28
|
+
|
|
19
29
|
.adm-selector-item {
|
|
20
30
|
padding: var(--padding);
|
|
21
31
|
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 {};
|
|
@@ -17,8 +17,6 @@ var _space = _interopRequireDefault(require("../space"));
|
|
|
17
17
|
|
|
18
18
|
var _grid = _interopRequireDefault(require("../grid"));
|
|
19
19
|
|
|
20
|
-
var _convertPx = require("../../utils/convert-px");
|
|
21
|
-
|
|
22
20
|
var _usePropsValue = require("../../utils/use-props-value");
|
|
23
21
|
|
|
24
22
|
var _checkMark = require("./check-mark");
|
|
@@ -84,8 +82,7 @@ const Selector = p => {
|
|
|
84
82
|
}, !props.columns && _react.default.createElement(_space.default, {
|
|
85
83
|
wrap: true
|
|
86
84
|
}, items), props.columns && _react.default.createElement(_grid.default, {
|
|
87
|
-
columns: props.columns
|
|
88
|
-
gap: (0, _convertPx.convertPx)(8)
|
|
85
|
+
columns: props.columns
|
|
89
86
|
}, items)));
|
|
90
87
|
};
|
|
91
88
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
.adm-tab-bar-item {
|
|
11
11
|
flex: 1;
|
|
12
|
-
color: var(--adm-color-
|
|
12
|
+
color: var(--adm-color-text-secondary);
|
|
13
13
|
white-space: nowrap;
|
|
14
14
|
padding: 8px 16px;
|
|
15
15
|
width: -webkit-min-content;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.adm-tab-bar-item-title {
|
|
32
|
-
font-size: var(--adm-font-size-
|
|
32
|
+
font-size: var(--adm-font-size-2);
|
|
33
33
|
line-height: 30px;
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -48,15 +48,19 @@
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.adm-action-sheet-button-item-description {
|
|
51
|
-
font-size: var(--adm-font-size-
|
|
51
|
+
font-size: var(--adm-font-size-6);
|
|
52
52
|
color: var(--adm-color-weak);
|
|
53
|
-
padding-top:
|
|
53
|
+
padding-top: 8px;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.adm-action-sheet-button-item-danger .adm-action-sheet-button-item-name {
|
|
57
57
|
color: var(--adm-color-danger);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
.adm-action-sheet-button-item-bold .adm-action-sheet-button-item-name {
|
|
61
|
+
font-weight: bold;
|
|
62
|
+
}
|
|
63
|
+
|
|
60
64
|
.adm-action-sheet-cancel {
|
|
61
65
|
background-color: var(--adm-color-box);
|
|
62
66
|
padding-top: 16px;
|
|
@@ -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: 4px;
|
|
9
9
|
--padding: 16px 32px;
|
|
10
|
+
--gap: 16px;
|
|
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;
|
|
@@ -16,6 +20,12 @@
|
|
|
16
20
|
--gap: 24px;
|
|
17
21
|
}
|
|
18
22
|
|
|
23
|
+
.adm-selector .adm-grid {
|
|
24
|
+
--gap: var(---gap);
|
|
25
|
+
--gap-horizontal: var(---gap-horizontal);
|
|
26
|
+
--gap-vertical: var(---gap-vertical);
|
|
27
|
+
}
|
|
28
|
+
|
|
19
29
|
.adm-selector-item {
|
|
20
30
|
padding: var(--padding);
|
|
21
31
|
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
|
};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
.adm-tab-bar-item {
|
|
11
11
|
flex: 1;
|
|
12
|
-
color: var(--adm-color-
|
|
12
|
+
color: var(--adm-color-text-secondary);
|
|
13
13
|
white-space: nowrap;
|
|
14
14
|
padding: 8px 16px;
|
|
15
15
|
width: -webkit-min-content;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.adm-tab-bar-item-title {
|
|
32
|
-
font-size: var(--adm-font-size-
|
|
32
|
+
font-size: var(--adm-font-size-2);
|
|
33
33
|
line-height: 30px;
|
|
34
34
|
}
|
|
35
35
|
|