@canlooks/can-ui 0.0.98 → 0.0.100
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/accordion/accordion.style.js +88 -86
- package/dist/cjs/components/actionSheet/actionSheet.style.js +35 -33
- package/dist/cjs/components/alert/alert.style.js +44 -42
- package/dist/cjs/components/anchorList/anchorList.style.js +40 -38
- package/dist/cjs/components/app/app.style.js +24 -17
- package/dist/cjs/components/avatar/avatar.style.js +22 -20
- package/dist/cjs/components/avatar/avatarGroup.style.js +24 -22
- package/dist/cjs/components/backdrop/backdrop.style.js +11 -9
- package/dist/cjs/components/badge/badge.style.js +42 -40
- package/dist/cjs/components/bottomNavigation/bottomNavigation.style.js +61 -59
- package/dist/cjs/components/boundary/errorBoundary.style.js +11 -9
- package/dist/cjs/components/breadcrumb/breadcrumb.style.js +8 -6
- package/dist/cjs/components/bubble/bubble.style.js +10 -8
- package/dist/cjs/components/bubbleConfirm/bubbleConfirm.style.js +37 -35
- package/dist/cjs/components/button/button.style.js +219 -197
- package/dist/cjs/components/calendar/calendar.style.js +93 -91
- package/dist/cjs/components/card/card.style.js +47 -44
- package/dist/cjs/components/cascade/cascade.style.js +58 -54
- package/dist/cjs/components/checkboxBase/checkboxBase.style.js +122 -120
- package/dist/cjs/components/colorPicker/colorPicker.style.js +68 -64
- package/dist/cjs/components/counter/counter.style.js +19 -17
- package/dist/cjs/components/curd/curd.style.js +70 -66
- package/dist/cjs/components/curd/curdColumnConfig.style.js +17 -15
- package/dist/cjs/components/dataGrid/dataGrid.style.js +113 -111
- package/dist/cjs/components/dateTimePicker/dateTimePicker.style.js +31 -27
- package/dist/cjs/components/dateTimePicker/timer.style.js +29 -27
- package/dist/cjs/components/dateTimeRangePicker/dateTimeRangePicker.style.js +7 -5
- package/dist/cjs/components/descriptions/descriptions.style.js +99 -95
- package/dist/cjs/components/dialog/dialog.style.js +98 -96
- package/dist/cjs/components/divider/divider.style.js +17 -15
- package/dist/cjs/components/drawer/drawer.style.js +78 -77
- package/dist/cjs/components/dropdown/dropdown.style.js +10 -8
- package/dist/cjs/components/form/form.style.js +27 -25
- package/dist/cjs/components/gallery/gallery.style.js +82 -80
- package/dist/cjs/components/image/image.style.js +35 -33
- package/dist/cjs/components/input/input.style.js +27 -26
- package/dist/cjs/components/inputBase/inputBase.style.js +164 -162
- package/dist/cjs/components/loading/loading.style.js +17 -15
- package/dist/cjs/components/loadingIndicator/loadingIndicator.style.js +10 -8
- package/dist/cjs/components/loadingMask/loadingMask.style.js +19 -17
- package/dist/cjs/components/menu/menu.style.js +3 -1
- package/dist/cjs/components/menuItem/menuItem.style.js +94 -90
- package/dist/cjs/components/modal/modal.style.js +11 -9
- package/dist/cjs/components/optionsBase/optionsBase.style.js +10 -8
- package/dist/cjs/components/overlayBase/overlayBase.style.js +15 -13
- package/dist/cjs/components/pagination/pagination.style.js +31 -29
- package/dist/cjs/components/palette/palette.style.d.ts +1 -1
- package/dist/cjs/components/palette/palette.style.js +115 -113
- package/dist/cjs/components/pickerDialog/pickerDialog.style.js +25 -23
- package/dist/cjs/components/pinchable/pinchable.style.js +10 -8
- package/dist/cjs/components/placeholder/placeholder.style.js +28 -26
- package/dist/cjs/components/popper/popper.style.js +43 -39
- package/dist/cjs/components/progress/progress.style.js +111 -111
- package/dist/cjs/components/rating/rating.style.js +52 -50
- package/dist/cjs/components/resizable/resizable.style.js +229 -223
- package/dist/cjs/components/scrollbar/scrollbar.style.js +71 -69
- package/dist/cjs/components/segmented/segmented.style.js +79 -77
- package/dist/cjs/components/select/select.style.js +36 -34
- package/dist/cjs/components/selectedList/selectedList.style.js +9 -7
- package/dist/cjs/components/serialInput/serialInput.style.js +4 -2
- package/dist/cjs/components/skeleton/skeleton.style.js +53 -47
- package/dist/cjs/components/slidableActions/slidableActions.style.js +45 -43
- package/dist/cjs/components/slider/slider.style.js +129 -127
- package/dist/cjs/components/snackbarBase/snackbarBase.style.js +96 -94
- package/dist/cjs/components/status/status.style.js +13 -11
- package/dist/cjs/components/stepper/step.style.js +217 -216
- package/dist/cjs/components/stepper/stepper.style.js +5 -3
- package/dist/cjs/components/switch/switch.style.js +73 -71
- package/dist/cjs/components/table/table.style.js +83 -81
- package/dist/cjs/components/table/tableSticky.style.js +33 -31
- package/dist/cjs/components/tabs/tabs.style.js +161 -159
- package/dist/cjs/components/tabs/tabsEllipsis.style.js +5 -3
- package/dist/cjs/components/tag/tag.style.js +96 -94
- package/dist/cjs/components/textarea/textarea.style.js +27 -25
- package/dist/cjs/components/theme/themeVariables.d.ts +1 -0
- package/dist/cjs/components/theme/themeVariables.js +3 -1
- package/dist/cjs/components/timeline/timeline.style.js +112 -108
- package/dist/cjs/components/toggleButton/toggleButton.style.js +7 -5
- package/dist/cjs/components/tooltip/tooltip.style.js +13 -11
- package/dist/cjs/components/touchRipple/touchRipple.style.js +19 -17
- package/dist/cjs/components/transfer/transfer.style.js +42 -40
- package/dist/cjs/components/transitionBase/transitionBase.style.js +101 -94
- package/dist/cjs/components/transportStyle/transportStyle.style.d.ts +1 -0
- package/dist/cjs/components/transportStyle/transportStyle.style.js +57 -0
- package/dist/cjs/components/tree/tree.style.js +83 -79
- package/dist/cjs/components/tree/treeDnd.style.js +131 -129
- package/dist/cjs/components/treeSelect/treeSelect.style.js +35 -33
- package/dist/cjs/components/typography/typography.style.js +98 -96
- package/dist/cjs/components/upload/dropArea.style.js +31 -29
- package/dist/cjs/components/upload/upload.style.js +106 -104
- package/dist/cjs/components/waterfall/waterfall.style.js +7 -5
- package/dist/cjs/extensions/documentViewer/documentViewer.style.js +43 -41
- package/dist/esm/components/accordion/accordion.style.js +88 -86
- package/dist/esm/components/actionSheet/actionSheet.style.js +35 -33
- package/dist/esm/components/alert/alert.style.js +44 -42
- package/dist/esm/components/anchorList/anchorList.style.js +40 -38
- package/dist/esm/components/app/app.style.js +24 -17
- package/dist/esm/components/avatar/avatar.style.js +22 -20
- package/dist/esm/components/avatar/avatarGroup.style.js +24 -22
- package/dist/esm/components/backdrop/backdrop.style.js +11 -9
- package/dist/esm/components/badge/badge.style.js +42 -40
- package/dist/esm/components/bottomNavigation/bottomNavigation.style.js +61 -59
- package/dist/esm/components/boundary/errorBoundary.style.js +11 -9
- package/dist/esm/components/breadcrumb/breadcrumb.style.js +8 -6
- package/dist/esm/components/bubble/bubble.style.js +10 -8
- package/dist/esm/components/bubbleConfirm/bubbleConfirm.style.js +37 -35
- package/dist/esm/components/button/button.style.js +219 -197
- package/dist/esm/components/calendar/calendar.style.js +93 -91
- package/dist/esm/components/card/card.style.js +58 -55
- package/dist/esm/components/cascade/cascade.style.js +58 -54
- package/dist/esm/components/checkboxBase/checkboxBase.style.js +122 -120
- package/dist/esm/components/colorPicker/colorPicker.style.js +69 -65
- package/dist/esm/components/counter/counter.style.js +19 -17
- package/dist/esm/components/curd/curd.style.js +70 -66
- package/dist/esm/components/curd/curdColumnConfig.style.js +17 -15
- package/dist/esm/components/dataGrid/dataGrid.style.js +113 -111
- package/dist/esm/components/dateTimePicker/dateTimePicker.style.js +31 -27
- package/dist/esm/components/dateTimePicker/timer.style.js +29 -27
- package/dist/esm/components/dateTimeRangePicker/dateTimeRangePicker.style.js +7 -5
- package/dist/esm/components/descriptions/descriptions.style.js +99 -95
- package/dist/esm/components/dialog/dialog.style.js +98 -96
- package/dist/esm/components/divider/divider.style.js +17 -15
- package/dist/esm/components/drawer/drawer.style.js +78 -77
- package/dist/esm/components/dropdown/dropdown.style.js +10 -8
- package/dist/esm/components/form/form.style.js +27 -25
- package/dist/esm/components/gallery/gallery.style.js +82 -80
- package/dist/esm/components/image/image.style.js +35 -33
- package/dist/esm/components/input/input.style.js +27 -26
- package/dist/esm/components/inputBase/inputBase.style.js +164 -162
- package/dist/esm/components/loading/loading.style.js +17 -15
- package/dist/esm/components/loadingIndicator/loadingIndicator.style.js +10 -8
- package/dist/esm/components/loadingMask/loadingMask.style.js +19 -17
- package/dist/esm/components/menu/menu.style.js +3 -1
- package/dist/esm/components/menuItem/menuItem.style.js +94 -90
- package/dist/esm/components/modal/modal.style.js +11 -9
- package/dist/esm/components/optionsBase/optionsBase.style.js +10 -8
- package/dist/esm/components/overlayBase/overlayBase.style.js +15 -13
- package/dist/esm/components/pagination/pagination.style.js +31 -29
- package/dist/esm/components/palette/palette.style.d.ts +1 -1
- package/dist/esm/components/palette/palette.style.js +113 -111
- package/dist/esm/components/pickerDialog/pickerDialog.style.js +25 -23
- package/dist/esm/components/pinchable/pinchable.style.js +10 -8
- package/dist/esm/components/placeholder/placeholder.style.js +28 -26
- package/dist/esm/components/popper/popper.style.js +43 -39
- package/dist/esm/components/progress/progress.style.js +111 -111
- package/dist/esm/components/rating/rating.style.js +52 -50
- package/dist/esm/components/resizable/resizable.style.js +229 -223
- package/dist/esm/components/scrollbar/scrollbar.style.js +71 -69
- package/dist/esm/components/segmented/segmented.style.js +79 -77
- package/dist/esm/components/select/select.style.js +36 -34
- package/dist/esm/components/selectedList/selectedList.style.js +9 -7
- package/dist/esm/components/serialInput/serialInput.style.js +4 -2
- package/dist/esm/components/skeleton/skeleton.style.js +53 -47
- package/dist/esm/components/slidableActions/slidableActions.style.js +45 -43
- package/dist/esm/components/slider/slider.style.js +129 -127
- package/dist/esm/components/snackbarBase/snackbarBase.style.js +96 -94
- package/dist/esm/components/status/status.style.js +13 -11
- package/dist/esm/components/stepper/step.style.js +217 -216
- package/dist/esm/components/stepper/stepper.style.js +5 -3
- package/dist/esm/components/switch/switch.style.js +73 -71
- package/dist/esm/components/table/table.style.js +83 -81
- package/dist/esm/components/table/tableSticky.style.js +33 -31
- package/dist/esm/components/tabs/tabs.style.js +161 -159
- package/dist/esm/components/tabs/tabsEllipsis.style.js +5 -3
- package/dist/esm/components/tag/tag.style.js +96 -94
- package/dist/esm/components/textarea/textarea.style.js +27 -25
- package/dist/esm/components/theme/themeVariables.d.ts +1 -0
- package/dist/esm/components/theme/themeVariables.js +2 -0
- package/dist/esm/components/timeline/timeline.style.js +112 -108
- package/dist/esm/components/toggleButton/toggleButton.style.js +7 -5
- package/dist/esm/components/tooltip/tooltip.style.js +13 -11
- package/dist/esm/components/touchRipple/touchRipple.style.js +19 -17
- package/dist/esm/components/transfer/transfer.style.js +42 -40
- package/dist/esm/components/transitionBase/transitionBase.style.js +101 -94
- package/dist/esm/components/transportStyle/transportStyle.style.d.ts +1 -0
- package/dist/esm/components/transportStyle/transportStyle.style.js +54 -0
- package/dist/esm/components/tree/tree.style.js +83 -79
- package/dist/esm/components/tree/treeDnd.style.js +131 -129
- package/dist/esm/components/treeSelect/treeSelect.style.js +35 -33
- package/dist/esm/components/typography/typography.style.js +98 -96
- package/dist/esm/components/upload/dropArea.style.js +31 -29
- package/dist/esm/components/upload/upload.style.js +106 -104
- package/dist/esm/components/waterfall/waterfall.style.js +7 -5
- package/dist/esm/extensions/documentViewer/documentViewer.style.js +43 -41
- package/package.json +1 -1
|
@@ -19,172 +19,174 @@ exports.treeDndClasses = (0, utils_1.defineInnerClasses)('tree-dnd', [
|
|
|
19
19
|
]);
|
|
20
20
|
function useStyle({ indent }) {
|
|
21
21
|
return (0, utils_1.useCss)(({ mode, spacing, gray, colors }) => (0, react_1.css) `
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
&[data-dragging=true] {
|
|
26
|
-
background-color: ${(0, color_1.default)(colors.primary.main).alpha(mode === 'light' ? .13 : .23).string()} !important;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&[data-active=true] {
|
|
30
|
-
outline: 2px solid ${colors.primary.main};
|
|
31
|
-
}
|
|
32
|
-
}
|
|
22
|
+
@layer reset {
|
|
23
|
+
.${tree_style_1.classes.node} {
|
|
24
|
+
position: relative;
|
|
33
25
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
text-align: center;
|
|
38
|
-
color: ${gray(.12)};
|
|
39
|
-
cursor: grab;
|
|
40
|
-
}
|
|
26
|
+
&[data-dragging=true] {
|
|
27
|
+
background-color: ${(0, color_1.default)(colors.primary.main).alpha(mode === 'light' ? .13 : .23).string()} !important;
|
|
28
|
+
}
|
|
41
29
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
z-index: 1;
|
|
30
|
+
&[data-active=true] {
|
|
31
|
+
outline: 2px solid ${colors.primary.main};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
47
34
|
|
|
48
|
-
.${
|
|
49
|
-
|
|
35
|
+
.${exports.treeDndClasses.dragHandle} {
|
|
36
|
+
width: 20px;
|
|
37
|
+
margin-right: ${spacing[3]}px;
|
|
38
|
+
text-align: center;
|
|
39
|
+
color: ${gray(.12)};
|
|
40
|
+
cursor: grab;
|
|
50
41
|
}
|
|
51
42
|
|
|
52
|
-
.${exports.treeDndClasses.
|
|
53
|
-
|
|
54
|
-
position:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
43
|
+
.${exports.treeDndClasses.mask} {
|
|
44
|
+
display: flex;
|
|
45
|
+
position: absolute;
|
|
46
|
+
inset: 0;
|
|
47
|
+
z-index: 1;
|
|
48
|
+
|
|
49
|
+
.${tree_style_1.classes.indent}::after {
|
|
50
|
+
display: none;
|
|
58
51
|
}
|
|
59
|
-
|
|
60
|
-
&[data-active=true] {
|
|
61
|
-
&:before, &:after {
|
|
62
|
-
content: '';
|
|
63
|
-
position: absolute;
|
|
64
|
-
}
|
|
65
52
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
border-radius: 50%;
|
|
70
|
-
border: 2px solid ${colors.primary.main};
|
|
71
|
-
left: 0;
|
|
72
|
-
bottom: -4px;
|
|
73
|
-
}
|
|
53
|
+
.${exports.treeDndClasses.predecessor} {
|
|
54
|
+
width: ${indent}px;
|
|
55
|
+
position: relative;
|
|
74
56
|
|
|
75
|
-
&:
|
|
76
|
-
width:
|
|
77
|
-
height: 2px;
|
|
78
|
-
background: ${colors.primary.main};
|
|
79
|
-
left: 8px;
|
|
80
|
-
bottom: -1px;
|
|
57
|
+
&:has(+ .${exports.treeDndClasses.sibling}) {
|
|
58
|
+
width: 29px;
|
|
81
59
|
}
|
|
82
|
-
|
|
83
|
-
& ~ * {
|
|
84
|
-
&:after {
|
|
85
|
-
content: '';
|
|
86
|
-
width: 100%;
|
|
87
|
-
height: 2px;
|
|
88
|
-
background: ${colors.primary.main};
|
|
89
|
-
position: absolute;
|
|
90
|
-
left: 0;
|
|
91
|
-
bottom: -1px;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.${exports.treeDndClasses.sibling} {
|
|
98
|
-
width: ${indent * 2}px;
|
|
99
|
-
flex: 1;
|
|
100
|
-
display: flex;
|
|
101
|
-
flex-direction: column;
|
|
102
|
-
position: relative;
|
|
103
|
-
|
|
104
|
-
.${exports.treeDndClasses.siblingPrev}, .${exports.treeDndClasses.siblingNext} {
|
|
105
|
-
flex: 1;
|
|
106
|
-
position: relative;
|
|
107
|
-
|
|
60
|
+
|
|
108
61
|
&[data-active=true] {
|
|
109
|
-
|
|
62
|
+
&::before, &::after {
|
|
110
63
|
content: '';
|
|
111
64
|
position: absolute;
|
|
112
65
|
}
|
|
113
|
-
|
|
114
|
-
|
|
66
|
+
|
|
67
|
+
&::before {
|
|
115
68
|
width: 8px;
|
|
116
69
|
height: 8px;
|
|
117
70
|
border-radius: 50%;
|
|
118
71
|
border: 2px solid ${colors.primary.main};
|
|
119
72
|
left: 0;
|
|
73
|
+
bottom: -4px;
|
|
120
74
|
}
|
|
121
|
-
|
|
122
|
-
|
|
75
|
+
|
|
76
|
+
&::after {
|
|
123
77
|
width: calc(100% - 8px);
|
|
124
78
|
height: 2px;
|
|
125
79
|
background: ${colors.primary.main};
|
|
126
80
|
left: 8px;
|
|
81
|
+
bottom: -1px;
|
|
127
82
|
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
83
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
84
|
+
& ~ * {
|
|
85
|
+
&::after {
|
|
86
|
+
content: '';
|
|
87
|
+
width: 100%;
|
|
88
|
+
height: 2px;
|
|
89
|
+
background: ${colors.primary.main};
|
|
90
|
+
position: absolute;
|
|
91
|
+
left: 0;
|
|
92
|
+
bottom: -1px;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
138
95
|
}
|
|
139
96
|
}
|
|
140
97
|
|
|
141
|
-
.${exports.treeDndClasses.
|
|
142
|
-
|
|
143
|
-
|
|
98
|
+
.${exports.treeDndClasses.sibling} {
|
|
99
|
+
width: ${indent * 2}px;
|
|
100
|
+
flex: 1;
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
position: relative;
|
|
104
|
+
|
|
105
|
+
.${exports.treeDndClasses.siblingPrev}, .${exports.treeDndClasses.siblingNext} {
|
|
106
|
+
flex: 1;
|
|
107
|
+
position: relative;
|
|
108
|
+
|
|
109
|
+
&[data-active=true] {
|
|
110
|
+
&::before, &::after {
|
|
111
|
+
content: '';
|
|
112
|
+
position: absolute;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&::before {
|
|
116
|
+
width: 8px;
|
|
117
|
+
height: 8px;
|
|
118
|
+
border-radius: 50%;
|
|
119
|
+
border: 2px solid ${colors.primary.main};
|
|
120
|
+
left: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&::after {
|
|
124
|
+
width: calc(100% - 8px);
|
|
125
|
+
height: 2px;
|
|
126
|
+
background: ${colors.primary.main};
|
|
127
|
+
left: 8px;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
144
130
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
131
|
+
|
|
132
|
+
.${exports.treeDndClasses.siblingPrev} {
|
|
133
|
+
&::before {
|
|
134
|
+
top: -4px
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&::after {
|
|
138
|
+
top: -1px;
|
|
139
|
+
}
|
|
148
140
|
}
|
|
149
|
-
}
|
|
150
141
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
position: absolute;
|
|
155
|
-
right: 0;
|
|
156
|
-
bottom: 0;
|
|
157
|
-
|
|
158
|
-
&[data-active=true] {
|
|
159
|
-
&:before, &:after {
|
|
160
|
-
content: '';
|
|
161
|
-
position: absolute;
|
|
162
|
-
bottom: -1px;
|
|
142
|
+
.${exports.treeDndClasses.siblingNext} {
|
|
143
|
+
&::before {
|
|
144
|
+
bottom: -4px;
|
|
163
145
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
height: 8px;
|
|
168
|
-
border-left: 2px solid ${colors.primary.main};
|
|
169
|
-
border-bottom: 2px solid ${colors.primary.main};
|
|
170
|
-
left: 0;
|
|
171
|
-
|
|
146
|
+
|
|
147
|
+
&::after {
|
|
148
|
+
bottom: -1px;
|
|
172
149
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.${exports.treeDndClasses.child} {
|
|
153
|
+
width: calc(100% - ${indent * 2}px);
|
|
154
|
+
height: 50%;
|
|
155
|
+
position: absolute;
|
|
156
|
+
right: 0;
|
|
157
|
+
bottom: 0;
|
|
158
|
+
|
|
159
|
+
&[data-active=true] {
|
|
160
|
+
&::before, &::after {
|
|
161
|
+
content: '';
|
|
162
|
+
position: absolute;
|
|
163
|
+
bottom: -1px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&::before {
|
|
167
|
+
width: 8px;
|
|
168
|
+
height: 8px;
|
|
169
|
+
border-left: 2px solid ${colors.primary.main};
|
|
170
|
+
border-bottom: 2px solid ${colors.primary.main};
|
|
171
|
+
left: 0;
|
|
172
|
+
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&::after {
|
|
176
|
+
width: calc(100% - 12px);
|
|
177
|
+
height: 2px;
|
|
178
|
+
background: ${colors.primary.main};
|
|
179
|
+
left: 12px;
|
|
180
|
+
}
|
|
179
181
|
}
|
|
180
182
|
}
|
|
181
183
|
}
|
|
182
184
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
|
|
186
|
+
.${exports.treeDndClasses.levelBlock} {
|
|
187
|
+
&[data-active=true] {
|
|
188
|
+
outline: 1px dashed ${colors.primary.main};
|
|
189
|
+
}
|
|
188
190
|
}
|
|
189
191
|
}
|
|
190
192
|
`, [indent]);
|
|
@@ -12,48 +12,50 @@ exports.classes = (0, utils_1.defineInnerClasses)('tree-select', [
|
|
|
12
12
|
'arrow'
|
|
13
13
|
]);
|
|
14
14
|
exports.style = (0, utils_1.defineCss)(({ spacing, text, easing }) => (0, react_1.css) `
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
@layer reset {
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
position: relative;
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.${exports.classes.placeholder} {
|
|
25
|
-
flex: 1;
|
|
26
|
-
color: ${text.placeholder};
|
|
27
|
-
white-space: nowrap;
|
|
28
|
-
text-overflow: ellipsis;
|
|
29
|
-
overflow: hidden;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.${exports.classes.backfill} {
|
|
33
|
-
flex: 1;
|
|
34
|
-
min-width: 0;
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-wrap: wrap;
|
|
37
|
-
gap: ${spacing[1]}px;
|
|
38
|
-
|
|
39
|
-
.${tag_style_1.classes.root} {
|
|
40
|
-
min-width: 0;
|
|
19
|
+
.${exports.classes.contentWrap} {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: ${spacing[1]}px;
|
|
41
23
|
}
|
|
42
24
|
|
|
43
|
-
.${
|
|
44
|
-
|
|
25
|
+
.${exports.classes.placeholder} {
|
|
26
|
+
flex: 1;
|
|
27
|
+
color: ${text.placeholder};
|
|
45
28
|
white-space: nowrap;
|
|
46
29
|
text-overflow: ellipsis;
|
|
47
30
|
overflow: hidden;
|
|
48
31
|
}
|
|
49
|
-
}
|
|
50
32
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
33
|
+
.${exports.classes.backfill} {
|
|
34
|
+
flex: 1;
|
|
35
|
+
min-width: 0;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-wrap: wrap;
|
|
38
|
+
gap: ${spacing[1]}px;
|
|
39
|
+
|
|
40
|
+
.${tag_style_1.classes.root} {
|
|
41
|
+
min-width: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.${tag_style_1.classes.content},
|
|
45
|
+
.${exports.classes.backfillWrap} {
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
text-overflow: ellipsis;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.${exports.classes.arrow} {
|
|
53
|
+
color: ${text.placeholder};
|
|
54
|
+
transition: transform .25s ${easing.easeOut};
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
&[data-open=true] {
|
|
57
|
+
transform: rotate(180deg);
|
|
58
|
+
}
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
`);
|
|
@@ -19,129 +19,131 @@ function useStyle({ color }) {
|
|
|
19
19
|
const colorValue = (0, utils_1.useColor)(color);
|
|
20
20
|
return (0, utils_1.useCss)(({ mode, colors, gray, borderRadius, easing }) => {
|
|
21
21
|
return (0, react_1.css) `
|
|
22
|
-
|
|
22
|
+
@layer reset {
|
|
23
|
+
color: ${colorValue};
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
&[data-component=p] {
|
|
26
|
+
margin: 1em 0;
|
|
27
|
+
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
&[data-component=h1],
|
|
30
|
+
&[data-component=h2],
|
|
31
|
+
&[data-component=h3],
|
|
32
|
+
&[data-component=h4],
|
|
33
|
+
&[data-component=h5],
|
|
34
|
+
&[data-component=h6] {
|
|
35
|
+
margin-top: 1em;
|
|
36
|
+
margin-bottom: 0.5em;
|
|
37
|
+
}
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
&[data-component=h1] {
|
|
40
|
+
font-size: ${38 / 14}em;
|
|
41
|
+
}
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
&[data-component=h2] {
|
|
44
|
+
font-size: ${30 / 14}em;
|
|
45
|
+
}
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
&[data-component=h3] {
|
|
48
|
+
font-size: ${24 / 14}em;
|
|
49
|
+
}
|
|
49
50
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
&[data-component=h4] {
|
|
52
|
+
font-size: ${20 / 14}em;
|
|
53
|
+
}
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
&[data-component=h5] {
|
|
56
|
+
font-size: ${17 / 14}em;
|
|
57
|
+
}
|
|
57
58
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
&[data-component=h6] {
|
|
60
|
+
font-size: 1em;
|
|
61
|
+
}
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
&[data-component=mark] {
|
|
64
|
+
background-color: ${(0, color_1.default)(colors.warning.main).lighten(.5).hex()};
|
|
65
|
+
}
|
|
65
66
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
&[data-component=kbd] {
|
|
68
|
+
background-color: ${gray(mode === 'light' ? .06 : .22)};
|
|
69
|
+
font-size: ${13 / 14}em;
|
|
70
|
+
padding: 4px 6px;
|
|
71
|
+
border-radius: ${borderRadius / 2}px;
|
|
72
|
+
box-shadow: ${mode === 'light'
|
|
72
73
|
? '0 1px 2px rgba(0, 0, 0, .4), -1px 2px rgba(255, 255, 255, .4)'
|
|
73
74
|
: '-1px 2px rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .6)'};
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&[data-component=code] {
|
|
78
|
-
background-color: ${gray(.06)};
|
|
79
|
-
font-size: ${13 / 14}em;
|
|
80
|
-
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
81
|
-
padding: 3px 6px;
|
|
82
|
-
border-radius: .15em;
|
|
83
|
-
margin: 0 4px;
|
|
84
|
-
outline: none;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&[data-component=a] {
|
|
88
|
-
color: ${colors.primary.main};
|
|
89
|
-
transition: color .25s ${easing.easeOut};
|
|
90
|
-
-webkit-tap-highlight-color: transparent;
|
|
91
|
-
|
|
92
|
-
&:hover {
|
|
93
|
-
color: ${colors.primary.light};
|
|
75
|
+
margin: 0 3px;
|
|
94
76
|
}
|
|
95
77
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
78
|
+
&[data-component=code] {
|
|
79
|
+
background-color: ${gray(.06)};
|
|
80
|
+
font-size: ${13 / 14}em;
|
|
81
|
+
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
82
|
+
padding: 3px 6px;
|
|
83
|
+
border-radius: .15em;
|
|
84
|
+
margin: 0 4px;
|
|
85
|
+
outline: none;
|
|
99
86
|
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
&:not([data-ellipsis-rows="0"]) {
|
|
103
|
-
display: flex;
|
|
104
|
-
max-width: 100%;
|
|
105
|
-
align-items: flex-end;
|
|
106
87
|
|
|
107
|
-
&[data-component=mark],
|
|
108
|
-
&[data-component=kbd],
|
|
109
|
-
&[data-component=code],
|
|
110
88
|
&[data-component=a] {
|
|
111
|
-
|
|
112
|
-
|
|
89
|
+
color: ${colors.primary.main};
|
|
90
|
+
transition: color .25s ${easing.easeOut};
|
|
91
|
+
-webkit-tap-highlight-color: transparent;
|
|
113
92
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
93
|
+
&:hover {
|
|
94
|
+
color: ${colors.primary.light};
|
|
95
|
+
}
|
|
117
96
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
text-overflow: ellipsis;
|
|
97
|
+
&:active {
|
|
98
|
+
transition: color 0s;
|
|
99
|
+
color: ${colors.primary.dark};
|
|
122
100
|
}
|
|
123
101
|
}
|
|
124
102
|
|
|
125
|
-
&:not([data-ellipsis-rows="
|
|
103
|
+
&:not([data-ellipsis-rows="0"]) {
|
|
104
|
+
display: flex;
|
|
105
|
+
max-width: 100%;
|
|
106
|
+
align-items: flex-end;
|
|
107
|
+
|
|
108
|
+
&[data-component=mark],
|
|
109
|
+
&[data-component=kbd],
|
|
110
|
+
&[data-component=code],
|
|
111
|
+
&[data-component=a] {
|
|
112
|
+
display: inline-flex;
|
|
113
|
+
}
|
|
114
|
+
|
|
126
115
|
.${exports.classes.text} {
|
|
127
|
-
|
|
128
|
-
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&[data-ellipsis-rows="1"] {
|
|
120
|
+
.${exports.classes.text} {
|
|
121
|
+
white-space: nowrap;
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:not([data-ellipsis-rows="1"]) {
|
|
127
|
+
.${exports.classes.text} {
|
|
128
|
+
display: -webkit-box;
|
|
129
|
+
-webkit-box-orient: vertical;
|
|
130
|
+
}
|
|
129
131
|
}
|
|
130
132
|
}
|
|
131
|
-
}
|
|
132
133
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
134
|
+
.${exports.classes.action},
|
|
135
|
+
.${exports.classes.copied} {
|
|
136
|
+
height: 1.5em;
|
|
137
|
+
vertical-align: text-bottom;
|
|
138
|
+
margin-left: .5em;
|
|
139
|
+
white-space: nowrap;
|
|
140
|
+
}
|
|
140
141
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
.${exports.classes.copied} {
|
|
143
|
+
align-items: center;
|
|
144
|
+
color: ${colors.success.main};
|
|
145
|
+
animation: ${copyCheckAnim} .3s ${easing.swing};
|
|
146
|
+
}
|
|
145
147
|
}
|
|
146
148
|
`;
|
|
147
149
|
}, [colorValue]);
|