@canlooks/can-ui 0.0.91 → 0.0.92
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/dist/cjs/components/calendar/calendar.style.js +124 -124
- package/dist/cjs/components/clickAway/clickAway.d.ts +1 -1
- package/dist/cjs/components/status/status.d.ts +6 -6
- package/dist/cjs/components/treeSelect/treeSelect.js +1 -1
- package/dist/esm/components/calendar/calendar.style.js +124 -124
- package/dist/esm/components/clickAway/clickAway.d.ts +1 -1
- package/dist/esm/components/status/status.d.ts +6 -6
- package/dist/esm/components/treeSelect/treeSelect.js +1 -1
- package/documentation/dist/assets/index-DvrKS6Tv.js +7747 -0
- package/documentation/dist/atom-one-dark.min.css +1 -0
- package/documentation/dist/components/accordion.md +38 -0
- package/documentation/dist/components/actionSheet.md +49 -0
- package/documentation/dist/components/alert.md +38 -0
- package/documentation/dist/components/anchorList.md +36 -0
- package/documentation/dist/components/autocomplete.md +68 -0
- package/documentation/dist/components/avatar.md +79 -0
- package/documentation/dist/components/badge.md +33 -0
- package/documentation/dist/components/bottomNavigation.md +39 -0
- package/documentation/dist/components/breadcrumb.md +28 -0
- package/documentation/dist/components/bubbleConfirm.md +34 -0
- package/documentation/dist/components/button.md +62 -0
- package/documentation/dist/components/card.md +30 -0
- package/documentation/dist/components/cascade.md +48 -0
- package/documentation/dist/components/checkbox.md +36 -0
- package/documentation/dist/components/colorPicker.md +27 -0
- package/documentation/dist/components/contextMenu.md +27 -0
- package/documentation/dist/components/counter.md +29 -0
- package/documentation/dist/components/dataGrid.md +112 -0
- package/documentation/dist/components/dateTimePicker.md +35 -0
- package/documentation/dist/components/dateTimeRangePicker.md +36 -0
- package/documentation/dist/components/descriptions.md +35 -0
- package/documentation/dist/components/dialog.md +56 -0
- package/documentation/dist/components/divider.md +26 -0
- package/documentation/dist/components/drawer.md +40 -0
- package/documentation/dist/components/flex.md +20 -0
- package/documentation/dist/components/form.md +131 -0
- package/documentation/dist/components/formDialog.md +36 -0
- package/documentation/dist/components/grid.md +34 -0
- package/documentation/dist/components/highlight.md +26 -0
- package/documentation/dist/components/image.md +90 -0
- package/documentation/dist/components/input.md +39 -0
- package/documentation/dist/components/loading.md +46 -0
- package/documentation/dist/components/menu.md +85 -0
- package/documentation/dist/components/pagination.md +38 -0
- package/documentation/dist/components/pickerDialog.md +56 -0
- package/documentation/dist/components/placeholder.md +30 -0
- package/documentation/dist/components/progress.md +43 -0
- package/documentation/dist/components/radio.md +37 -0
- package/documentation/dist/components/rating.md +35 -0
- package/documentation/dist/components/resizable.md +41 -0
- package/documentation/dist/components/scrollbar.md +31 -0
- package/documentation/dist/components/segmented.md +57 -0
- package/documentation/dist/components/select.md +30 -0
- package/documentation/dist/components/skeleton.md +26 -0
- package/documentation/dist/components/slidableActions.md +53 -0
- package/documentation/dist/guide/appComponent.md +30 -0
- package/documentation/dist/guide/globalMethods.md +238 -0
- package/documentation/dist/guide/icon.md +57 -0
- package/documentation/dist/guide/introduction.md +2 -0
- package/documentation/dist/guide/overrideProps.md +0 -0
- package/documentation/dist/guide/startup.md +23 -0
- package/documentation/dist/guide/theme.md +249 -0
- package/documentation/dist/index.html +13 -0
- package/documentation/dist/logo.png +0 -0
- package/extensions/curd.cjs +5 -5
- package/extensions/documentViewer.cjs +5 -5
- package/extensions/textFormatter.cjs +5 -5
- package/package.json +1 -1
|
@@ -16,128 +16,128 @@ exports.classes = (0, utils_1.defineInnerClasses)('calendar', [
|
|
|
16
16
|
'yearItem',
|
|
17
17
|
'foot'
|
|
18
18
|
]);
|
|
19
|
-
exports.style = (0, utils_1.defineCss)(({ divider, text, spacing }) => (0, react_1.css) `
|
|
20
|
-
.${exports.classes.head} {
|
|
21
|
-
height: 40px;
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
justify-content: space-between;
|
|
25
|
-
border-bottom: 1px solid ${divider};
|
|
26
|
-
padding: 0 ${menuItem_style_1.menuListPadding}px;
|
|
27
|
-
position: relative;
|
|
28
|
-
|
|
29
|
-
.${exports.classes.headSide} {
|
|
30
|
-
z-index: 1;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.${exports.classes.headControl} {
|
|
34
|
-
color: ${text.placeholder};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.${exports.classes.headCenter} {
|
|
38
|
-
display: flex;
|
|
39
|
-
align-items: center;
|
|
40
|
-
justify-content: center;
|
|
41
|
-
position: absolute;
|
|
42
|
-
inset: 0;
|
|
43
|
-
|
|
44
|
-
.${exports.classes.headButton} {
|
|
45
|
-
font-weight: bold;
|
|
46
|
-
color: ${text.primary};
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.${exports.classes.body} {
|
|
52
|
-
padding: ${spacing[3]}px ${spacing[4]}px;
|
|
53
|
-
display: grid;
|
|
54
|
-
place-items: center;
|
|
55
|
-
|
|
56
|
-
&[data-view-type=date] {
|
|
57
|
-
font-size: ${13 / 14}em;
|
|
58
|
-
grid-template-columns: repeat(7, 36px);
|
|
59
|
-
grid-template-rows: repeat(7, 36px);
|
|
60
|
-
|
|
61
|
-
.${exports.classes.dateItem} {
|
|
62
|
-
width: 24px;
|
|
63
|
-
height: 24px;
|
|
64
|
-
|
|
65
|
-
&:not([data-variant=filled]) {
|
|
66
|
-
color: ${text.primary};
|
|
67
|
-
border-color: ${text.disabled};
|
|
68
|
-
|
|
69
|
-
&[data-other-month=true] {
|
|
70
|
-
color: ${text.placeholder};
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&:disabled {
|
|
75
|
-
width: 100%;
|
|
76
|
-
border-radius: 0;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&[data-view-type=month], &[data-view-type=year] {
|
|
82
|
-
grid-template-columns: repeat(3, 84px);
|
|
83
|
-
grid-template-rows: repeat(4, 63px);
|
|
84
|
-
|
|
85
|
-
.${exports.classes.monthItem},
|
|
86
|
-
.${exports.classes.yearItem} {
|
|
87
|
-
width: 72px;
|
|
88
|
-
padding-inline: 0;
|
|
89
|
-
|
|
90
|
-
&:not([data-variant=filled]) {
|
|
91
|
-
color: ${text.primary};
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&[data-size=small] {
|
|
98
|
-
.${exports.classes.body} {
|
|
99
|
-
&[data-view-type=date] {
|
|
100
|
-
grid-template-columns: repeat(7, 30px);
|
|
101
|
-
grid-template-rows: repeat(7, 30px);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&[data-view-type=month], &[data-view-type=year] {
|
|
105
|
-
grid-template-columns: repeat(3, 70px);
|
|
106
|
-
grid-template-rows: repeat(4, 52.5px);
|
|
107
|
-
|
|
108
|
-
.${exports.classes.monthItem},
|
|
109
|
-
.${exports.classes.yearItem} {
|
|
110
|
-
width: 60px;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
&[data-size=large] {
|
|
117
|
-
.${exports.classes.body} {
|
|
118
|
-
&[data-view-type=date] {
|
|
119
|
-
font-size: 1em;
|
|
120
|
-
grid-template-columns: repeat(7, 42px);
|
|
121
|
-
grid-template-rows: repeat(7, 42px);
|
|
122
|
-
|
|
123
|
-
.${exports.classes.dateItem} {
|
|
124
|
-
width: 32px;
|
|
125
|
-
height: 32px;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
&[data-view-type=month], &[data-view-type=year] {
|
|
130
|
-
grid-template-columns: repeat(3, 98px);
|
|
131
|
-
grid-template-rows: repeat(4, 73.5px);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.${exports.classes.foot} {
|
|
137
|
-
height: 41px;
|
|
138
|
-
display: flex;
|
|
139
|
-
align-items: center;
|
|
140
|
-
justify-content: center;
|
|
141
|
-
border-top: 1px solid ${divider};
|
|
142
|
-
}
|
|
19
|
+
exports.style = (0, utils_1.defineCss)(({ divider, text, spacing }) => (0, react_1.css) `
|
|
20
|
+
.${exports.classes.head} {
|
|
21
|
+
height: 40px;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
border-bottom: 1px solid ${divider};
|
|
26
|
+
padding: 0 ${menuItem_style_1.menuListPadding}px;
|
|
27
|
+
position: relative;
|
|
28
|
+
|
|
29
|
+
.${exports.classes.headSide} {
|
|
30
|
+
z-index: 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.${exports.classes.headControl} {
|
|
34
|
+
color: ${text.placeholder};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.${exports.classes.headCenter} {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
position: absolute;
|
|
42
|
+
inset: 0;
|
|
43
|
+
|
|
44
|
+
.${exports.classes.headButton} {
|
|
45
|
+
font-weight: bold;
|
|
46
|
+
color: ${text.primary};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.${exports.classes.body} {
|
|
52
|
+
padding: ${spacing[3]}px ${spacing[4]}px;
|
|
53
|
+
display: grid;
|
|
54
|
+
place-items: center;
|
|
55
|
+
|
|
56
|
+
&[data-view-type=date] {
|
|
57
|
+
font-size: ${13 / 14}em;
|
|
58
|
+
grid-template-columns: repeat(7, 36px);
|
|
59
|
+
grid-template-rows: repeat(7, 36px);
|
|
60
|
+
|
|
61
|
+
.${exports.classes.dateItem} {
|
|
62
|
+
width: 24px;
|
|
63
|
+
height: 24px;
|
|
64
|
+
|
|
65
|
+
&:not([data-variant=filled]) {
|
|
66
|
+
color: ${text.primary};
|
|
67
|
+
border-color: ${text.disabled};
|
|
68
|
+
|
|
69
|
+
&[data-other-month=true] {
|
|
70
|
+
color: ${text.placeholder};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:disabled {
|
|
75
|
+
width: 100%;
|
|
76
|
+
border-radius: 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&[data-view-type=month], &[data-view-type=year] {
|
|
82
|
+
grid-template-columns: repeat(3, 84px);
|
|
83
|
+
grid-template-rows: repeat(4, 63px);
|
|
84
|
+
|
|
85
|
+
.${exports.classes.monthItem},
|
|
86
|
+
.${exports.classes.yearItem} {
|
|
87
|
+
width: 72px;
|
|
88
|
+
padding-inline: 0;
|
|
89
|
+
|
|
90
|
+
&:not([data-variant=filled]) {
|
|
91
|
+
color: ${text.primary};
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&[data-size=small] {
|
|
98
|
+
.${exports.classes.body} {
|
|
99
|
+
&[data-view-type=date] {
|
|
100
|
+
grid-template-columns: repeat(7, 30px);
|
|
101
|
+
grid-template-rows: repeat(7, 30px);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&[data-view-type=month], &[data-view-type=year] {
|
|
105
|
+
grid-template-columns: repeat(3, 70px);
|
|
106
|
+
grid-template-rows: repeat(4, 52.5px);
|
|
107
|
+
|
|
108
|
+
.${exports.classes.monthItem},
|
|
109
|
+
.${exports.classes.yearItem} {
|
|
110
|
+
width: 60px;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&[data-size=large] {
|
|
117
|
+
.${exports.classes.body} {
|
|
118
|
+
&[data-view-type=date] {
|
|
119
|
+
font-size: 1em;
|
|
120
|
+
grid-template-columns: repeat(7, 42px);
|
|
121
|
+
grid-template-rows: repeat(7, 42px);
|
|
122
|
+
|
|
123
|
+
.${exports.classes.dateItem} {
|
|
124
|
+
width: 32px;
|
|
125
|
+
height: 32px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&[data-view-type=month], &[data-view-type=year] {
|
|
130
|
+
grid-template-columns: repeat(3, 98px);
|
|
131
|
+
grid-template-rows: repeat(4, 73.5px);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.${exports.classes.foot} {
|
|
137
|
+
height: 41px;
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
justify-content: center;
|
|
141
|
+
border-top: 1px solid ${divider};
|
|
142
|
+
}
|
|
143
143
|
`);
|
|
@@ -60,7 +60,7 @@ export declare function ClickAway({ ref, container, eventType, onClickAway, disa
|
|
|
60
60
|
results: number;
|
|
61
61
|
security: string;
|
|
62
62
|
unselectable: "off" | "on";
|
|
63
|
-
popover: "" | "auto" | "manual"
|
|
63
|
+
popover: "" | "auto" | "manual";
|
|
64
64
|
popoverTargetAction: "toggle" | "hide" | "show";
|
|
65
65
|
popoverTarget: string;
|
|
66
66
|
inert: boolean;
|
|
@@ -3,12 +3,12 @@ import { DivProps, Status as IStatus } from '../../types';
|
|
|
3
3
|
import { FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
|
|
4
4
|
export type StatusType = IStatus | 'confirm' | 'unknown';
|
|
5
5
|
export declare const statusMapToIconDefinition: {
|
|
6
|
-
info: import("@fortawesome/
|
|
7
|
-
success: import("@fortawesome/
|
|
8
|
-
warning: import("@fortawesome/
|
|
9
|
-
error: import("@fortawesome/
|
|
10
|
-
confirm: import("@fortawesome/
|
|
11
|
-
unknown: import("@fortawesome/
|
|
6
|
+
info: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
7
|
+
success: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
8
|
+
warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
9
|
+
error: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
10
|
+
confirm: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
11
|
+
unknown: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
12
12
|
};
|
|
13
13
|
export interface StatusIconProps extends Partial<FontAwesomeIconProps> {
|
|
14
14
|
status?: StatusType;
|
|
@@ -71,7 +71,7 @@ placeholder = '请选择', autoFocus, clearable, onClear, ...props }) => {
|
|
|
71
71
|
}
|
|
72
72
|
return ((0, jsx_runtime_1.jsx)("div", { className: treeSelect_style_1.classes.backfillWrap, children: optionsMap.get(innerValue)?.[props.labelKey] ?? innerValue }));
|
|
73
73
|
};
|
|
74
|
-
return ((0, jsx_runtime_1.jsx)(popper_1.Popper, { css: popper_style_1.popperStyle, open: innerOpen.current, onOpenChange: openChangeHandler, placement: "bottom", variant: "collapse", trigger: ['click', 'enter'], disabled: props.disabled || props.readOnly, sizeAdaptable: sizeAdaptable, content: (0, jsx_runtime_1.jsx)(tree_1.Tree, { ...props, nodes: options, value: innerValue, onChange: setInnerValue }), ...popperProps, popperRef: popperRef, onPointerDown: e => {
|
|
74
|
+
return ((0, jsx_runtime_1.jsx)(popper_1.Popper, { css: popper_style_1.popperStyle, open: innerOpen.current, onOpenChange: openChangeHandler, placement: "bottom", variant: "collapse", trigger: ['click', 'enter'], disabled: props.disabled || props.readOnly, sizeAdaptable: sizeAdaptable, content: (0, jsx_runtime_1.jsx)(tree_1.Tree, { primaryKey: "value", ...props, nodes: options, value: innerValue, onChange: setInnerValue }), ...popperProps, popperRef: popperRef, onPointerDown: e => {
|
|
75
75
|
popperProps?.onPointerDown?.(e);
|
|
76
76
|
e.preventDefault();
|
|
77
77
|
}, children: (0, jsx_runtime_1.jsx)(inputBase_1.InputBase, { clearable: !!props.multiple, css: treeSelect_style_1.style, className: (0, utils_1.clsx)(treeSelect_style_1.classes.root, props.className), "data-focused": open, value: innerValue, onClear: clearHandler, placeholder: placeholder, autoFocus: autoFocus, disabled: props.disabled, readOnly: props.readOnly, children: inputBaseProps => (0, jsx_runtime_1.jsxs)("div", { className: treeSelect_style_1.classes.contentWrap, children: [(0, utils_1.isNoValue)(innerValue)
|
|
@@ -13,128 +13,128 @@ export const classes = defineInnerClasses('calendar', [
|
|
|
13
13
|
'yearItem',
|
|
14
14
|
'foot'
|
|
15
15
|
]);
|
|
16
|
-
export const style = defineCss(({ divider, text, spacing }) => css `
|
|
17
|
-
.${classes.head} {
|
|
18
|
-
height: 40px;
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
justify-content: space-between;
|
|
22
|
-
border-bottom: 1px solid ${divider};
|
|
23
|
-
padding: 0 ${menuListPadding}px;
|
|
24
|
-
position: relative;
|
|
25
|
-
|
|
26
|
-
.${classes.headSide} {
|
|
27
|
-
z-index: 1;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.${classes.headControl} {
|
|
31
|
-
color: ${text.placeholder};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.${classes.headCenter} {
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
justify-content: center;
|
|
38
|
-
position: absolute;
|
|
39
|
-
inset: 0;
|
|
40
|
-
|
|
41
|
-
.${classes.headButton} {
|
|
42
|
-
font-weight: bold;
|
|
43
|
-
color: ${text.primary};
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.${classes.body} {
|
|
49
|
-
padding: ${spacing[3]}px ${spacing[4]}px;
|
|
50
|
-
display: grid;
|
|
51
|
-
place-items: center;
|
|
52
|
-
|
|
53
|
-
&[data-view-type=date] {
|
|
54
|
-
font-size: ${13 / 14}em;
|
|
55
|
-
grid-template-columns: repeat(7, 36px);
|
|
56
|
-
grid-template-rows: repeat(7, 36px);
|
|
57
|
-
|
|
58
|
-
.${classes.dateItem} {
|
|
59
|
-
width: 24px;
|
|
60
|
-
height: 24px;
|
|
61
|
-
|
|
62
|
-
&:not([data-variant=filled]) {
|
|
63
|
-
color: ${text.primary};
|
|
64
|
-
border-color: ${text.disabled};
|
|
65
|
-
|
|
66
|
-
&[data-other-month=true] {
|
|
67
|
-
color: ${text.placeholder};
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&:disabled {
|
|
72
|
-
width: 100%;
|
|
73
|
-
border-radius: 0;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&[data-view-type=month], &[data-view-type=year] {
|
|
79
|
-
grid-template-columns: repeat(3, 84px);
|
|
80
|
-
grid-template-rows: repeat(4, 63px);
|
|
81
|
-
|
|
82
|
-
.${classes.monthItem},
|
|
83
|
-
.${classes.yearItem} {
|
|
84
|
-
width: 72px;
|
|
85
|
-
padding-inline: 0;
|
|
86
|
-
|
|
87
|
-
&:not([data-variant=filled]) {
|
|
88
|
-
color: ${text.primary};
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&[data-size=small] {
|
|
95
|
-
.${classes.body} {
|
|
96
|
-
&[data-view-type=date] {
|
|
97
|
-
grid-template-columns: repeat(7, 30px);
|
|
98
|
-
grid-template-rows: repeat(7, 30px);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&[data-view-type=month], &[data-view-type=year] {
|
|
102
|
-
grid-template-columns: repeat(3, 70px);
|
|
103
|
-
grid-template-rows: repeat(4, 52.5px);
|
|
104
|
-
|
|
105
|
-
.${classes.monthItem},
|
|
106
|
-
.${classes.yearItem} {
|
|
107
|
-
width: 60px;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&[data-size=large] {
|
|
114
|
-
.${classes.body} {
|
|
115
|
-
&[data-view-type=date] {
|
|
116
|
-
font-size: 1em;
|
|
117
|
-
grid-template-columns: repeat(7, 42px);
|
|
118
|
-
grid-template-rows: repeat(7, 42px);
|
|
119
|
-
|
|
120
|
-
.${classes.dateItem} {
|
|
121
|
-
width: 32px;
|
|
122
|
-
height: 32px;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&[data-view-type=month], &[data-view-type=year] {
|
|
127
|
-
grid-template-columns: repeat(3, 98px);
|
|
128
|
-
grid-template-rows: repeat(4, 73.5px);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.${classes.foot} {
|
|
134
|
-
height: 41px;
|
|
135
|
-
display: flex;
|
|
136
|
-
align-items: center;
|
|
137
|
-
justify-content: center;
|
|
138
|
-
border-top: 1px solid ${divider};
|
|
139
|
-
}
|
|
16
|
+
export const style = defineCss(({ divider, text, spacing }) => css `
|
|
17
|
+
.${classes.head} {
|
|
18
|
+
height: 40px;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
border-bottom: 1px solid ${divider};
|
|
23
|
+
padding: 0 ${menuListPadding}px;
|
|
24
|
+
position: relative;
|
|
25
|
+
|
|
26
|
+
.${classes.headSide} {
|
|
27
|
+
z-index: 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.${classes.headControl} {
|
|
31
|
+
color: ${text.placeholder};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.${classes.headCenter} {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
position: absolute;
|
|
39
|
+
inset: 0;
|
|
40
|
+
|
|
41
|
+
.${classes.headButton} {
|
|
42
|
+
font-weight: bold;
|
|
43
|
+
color: ${text.primary};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.${classes.body} {
|
|
49
|
+
padding: ${spacing[3]}px ${spacing[4]}px;
|
|
50
|
+
display: grid;
|
|
51
|
+
place-items: center;
|
|
52
|
+
|
|
53
|
+
&[data-view-type=date] {
|
|
54
|
+
font-size: ${13 / 14}em;
|
|
55
|
+
grid-template-columns: repeat(7, 36px);
|
|
56
|
+
grid-template-rows: repeat(7, 36px);
|
|
57
|
+
|
|
58
|
+
.${classes.dateItem} {
|
|
59
|
+
width: 24px;
|
|
60
|
+
height: 24px;
|
|
61
|
+
|
|
62
|
+
&:not([data-variant=filled]) {
|
|
63
|
+
color: ${text.primary};
|
|
64
|
+
border-color: ${text.disabled};
|
|
65
|
+
|
|
66
|
+
&[data-other-month=true] {
|
|
67
|
+
color: ${text.placeholder};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:disabled {
|
|
72
|
+
width: 100%;
|
|
73
|
+
border-radius: 0;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&[data-view-type=month], &[data-view-type=year] {
|
|
79
|
+
grid-template-columns: repeat(3, 84px);
|
|
80
|
+
grid-template-rows: repeat(4, 63px);
|
|
81
|
+
|
|
82
|
+
.${classes.monthItem},
|
|
83
|
+
.${classes.yearItem} {
|
|
84
|
+
width: 72px;
|
|
85
|
+
padding-inline: 0;
|
|
86
|
+
|
|
87
|
+
&:not([data-variant=filled]) {
|
|
88
|
+
color: ${text.primary};
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&[data-size=small] {
|
|
95
|
+
.${classes.body} {
|
|
96
|
+
&[data-view-type=date] {
|
|
97
|
+
grid-template-columns: repeat(7, 30px);
|
|
98
|
+
grid-template-rows: repeat(7, 30px);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&[data-view-type=month], &[data-view-type=year] {
|
|
102
|
+
grid-template-columns: repeat(3, 70px);
|
|
103
|
+
grid-template-rows: repeat(4, 52.5px);
|
|
104
|
+
|
|
105
|
+
.${classes.monthItem},
|
|
106
|
+
.${classes.yearItem} {
|
|
107
|
+
width: 60px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&[data-size=large] {
|
|
114
|
+
.${classes.body} {
|
|
115
|
+
&[data-view-type=date] {
|
|
116
|
+
font-size: 1em;
|
|
117
|
+
grid-template-columns: repeat(7, 42px);
|
|
118
|
+
grid-template-rows: repeat(7, 42px);
|
|
119
|
+
|
|
120
|
+
.${classes.dateItem} {
|
|
121
|
+
width: 32px;
|
|
122
|
+
height: 32px;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&[data-view-type=month], &[data-view-type=year] {
|
|
127
|
+
grid-template-columns: repeat(3, 98px);
|
|
128
|
+
grid-template-rows: repeat(4, 73.5px);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.${classes.foot} {
|
|
134
|
+
height: 41px;
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
justify-content: center;
|
|
138
|
+
border-top: 1px solid ${divider};
|
|
139
|
+
}
|
|
140
140
|
`);
|
|
@@ -60,7 +60,7 @@ export declare function ClickAway({ ref, container, eventType, onClickAway, disa
|
|
|
60
60
|
results: number;
|
|
61
61
|
security: string;
|
|
62
62
|
unselectable: "off" | "on";
|
|
63
|
-
popover: "" | "auto" | "manual"
|
|
63
|
+
popover: "" | "auto" | "manual";
|
|
64
64
|
popoverTargetAction: "toggle" | "hide" | "show";
|
|
65
65
|
popoverTarget: string;
|
|
66
66
|
inert: boolean;
|
|
@@ -3,12 +3,12 @@ import { DivProps, Status as IStatus } from '../../types';
|
|
|
3
3
|
import { FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
|
|
4
4
|
export type StatusType = IStatus | 'confirm' | 'unknown';
|
|
5
5
|
export declare const statusMapToIconDefinition: {
|
|
6
|
-
info: import("@fortawesome/
|
|
7
|
-
success: import("@fortawesome/
|
|
8
|
-
warning: import("@fortawesome/
|
|
9
|
-
error: import("@fortawesome/
|
|
10
|
-
confirm: import("@fortawesome/
|
|
11
|
-
unknown: import("@fortawesome/
|
|
6
|
+
info: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
7
|
+
success: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
8
|
+
warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
9
|
+
error: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
10
|
+
confirm: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
11
|
+
unknown: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
12
12
|
};
|
|
13
13
|
export interface StatusIconProps extends Partial<FontAwesomeIconProps> {
|
|
14
14
|
status?: StatusType;
|
|
@@ -68,7 +68,7 @@ placeholder = '请选择', autoFocus, clearable, onClear, ...props }) => {
|
|
|
68
68
|
}
|
|
69
69
|
return (_jsx("div", { className: classes.backfillWrap, children: optionsMap.get(innerValue)?.[props.labelKey] ?? innerValue }));
|
|
70
70
|
};
|
|
71
|
-
return (_jsx(Popper, { css: popperStyle, open: innerOpen.current, onOpenChange: openChangeHandler, placement: "bottom", variant: "collapse", trigger: ['click', 'enter'], disabled: props.disabled || props.readOnly, sizeAdaptable: sizeAdaptable, content: _jsx(Tree, { ...props, nodes: options, value: innerValue, onChange: setInnerValue }), ...popperProps, popperRef: popperRef, onPointerDown: e => {
|
|
71
|
+
return (_jsx(Popper, { css: popperStyle, open: innerOpen.current, onOpenChange: openChangeHandler, placement: "bottom", variant: "collapse", trigger: ['click', 'enter'], disabled: props.disabled || props.readOnly, sizeAdaptable: sizeAdaptable, content: _jsx(Tree, { primaryKey: "value", ...props, nodes: options, value: innerValue, onChange: setInnerValue }), ...popperProps, popperRef: popperRef, onPointerDown: e => {
|
|
72
72
|
popperProps?.onPointerDown?.(e);
|
|
73
73
|
e.preventDefault();
|
|
74
74
|
}, children: _jsx(InputBase, { clearable: !!props.multiple, css: style, className: clsx(classes.root, props.className), "data-focused": open, value: innerValue, onClear: clearHandler, placeholder: placeholder, autoFocus: autoFocus, disabled: props.disabled, readOnly: props.readOnly, children: inputBaseProps => _jsxs("div", { className: classes.contentWrap, children: [isNoValue(innerValue)
|