@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
|
@@ -14,172 +14,174 @@ export const treeDndClasses = defineInnerClasses('tree-dnd', [
|
|
|
14
14
|
]);
|
|
15
15
|
export function useStyle({ indent }) {
|
|
16
16
|
return useCss(({ mode, spacing, gray, colors }) => css `
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
&[data-dragging=true] {
|
|
21
|
-
background-color: ${Color(colors.primary.main).alpha(mode === 'light' ? .13 : .23).string()} !important;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&[data-active=true] {
|
|
25
|
-
outline: 2px solid ${colors.primary.main};
|
|
26
|
-
}
|
|
27
|
-
}
|
|
17
|
+
@layer reset {
|
|
18
|
+
.${classes.node} {
|
|
19
|
+
position: relative;
|
|
28
20
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
text-align: center;
|
|
33
|
-
color: ${gray(.12)};
|
|
34
|
-
cursor: grab;
|
|
35
|
-
}
|
|
21
|
+
&[data-dragging=true] {
|
|
22
|
+
background-color: ${Color(colors.primary.main).alpha(mode === 'light' ? .13 : .23).string()} !important;
|
|
23
|
+
}
|
|
36
24
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
z-index: 1;
|
|
25
|
+
&[data-active=true] {
|
|
26
|
+
outline: 2px solid ${colors.primary.main};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
42
29
|
|
|
43
|
-
.${
|
|
44
|
-
|
|
30
|
+
.${treeDndClasses.dragHandle} {
|
|
31
|
+
width: 20px;
|
|
32
|
+
margin-right: ${spacing[3]}px;
|
|
33
|
+
text-align: center;
|
|
34
|
+
color: ${gray(.12)};
|
|
35
|
+
cursor: grab;
|
|
45
36
|
}
|
|
46
37
|
|
|
47
|
-
.${treeDndClasses.
|
|
48
|
-
|
|
49
|
-
position:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
38
|
+
.${treeDndClasses.mask} {
|
|
39
|
+
display: flex;
|
|
40
|
+
position: absolute;
|
|
41
|
+
inset: 0;
|
|
42
|
+
z-index: 1;
|
|
43
|
+
|
|
44
|
+
.${classes.indent}::after {
|
|
45
|
+
display: none;
|
|
53
46
|
}
|
|
54
|
-
|
|
55
|
-
&[data-active=true] {
|
|
56
|
-
&:before, &:after {
|
|
57
|
-
content: '';
|
|
58
|
-
position: absolute;
|
|
59
|
-
}
|
|
60
47
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
border-radius: 50%;
|
|
65
|
-
border: 2px solid ${colors.primary.main};
|
|
66
|
-
left: 0;
|
|
67
|
-
bottom: -4px;
|
|
68
|
-
}
|
|
48
|
+
.${treeDndClasses.predecessor} {
|
|
49
|
+
width: ${indent}px;
|
|
50
|
+
position: relative;
|
|
69
51
|
|
|
70
|
-
&:
|
|
71
|
-
width:
|
|
72
|
-
height: 2px;
|
|
73
|
-
background: ${colors.primary.main};
|
|
74
|
-
left: 8px;
|
|
75
|
-
bottom: -1px;
|
|
52
|
+
&:has(+ .${treeDndClasses.sibling}) {
|
|
53
|
+
width: 29px;
|
|
76
54
|
}
|
|
77
|
-
|
|
78
|
-
& ~ * {
|
|
79
|
-
&:after {
|
|
80
|
-
content: '';
|
|
81
|
-
width: 100%;
|
|
82
|
-
height: 2px;
|
|
83
|
-
background: ${colors.primary.main};
|
|
84
|
-
position: absolute;
|
|
85
|
-
left: 0;
|
|
86
|
-
bottom: -1px;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.${treeDndClasses.sibling} {
|
|
93
|
-
width: ${indent * 2}px;
|
|
94
|
-
flex: 1;
|
|
95
|
-
display: flex;
|
|
96
|
-
flex-direction: column;
|
|
97
|
-
position: relative;
|
|
98
|
-
|
|
99
|
-
.${treeDndClasses.siblingPrev}, .${treeDndClasses.siblingNext} {
|
|
100
|
-
flex: 1;
|
|
101
|
-
position: relative;
|
|
102
|
-
|
|
55
|
+
|
|
103
56
|
&[data-active=true] {
|
|
104
|
-
|
|
57
|
+
&::before, &::after {
|
|
105
58
|
content: '';
|
|
106
59
|
position: absolute;
|
|
107
60
|
}
|
|
108
|
-
|
|
109
|
-
|
|
61
|
+
|
|
62
|
+
&::before {
|
|
110
63
|
width: 8px;
|
|
111
64
|
height: 8px;
|
|
112
65
|
border-radius: 50%;
|
|
113
66
|
border: 2px solid ${colors.primary.main};
|
|
114
67
|
left: 0;
|
|
68
|
+
bottom: -4px;
|
|
115
69
|
}
|
|
116
|
-
|
|
117
|
-
|
|
70
|
+
|
|
71
|
+
&::after {
|
|
118
72
|
width: calc(100% - 8px);
|
|
119
73
|
height: 2px;
|
|
120
74
|
background: ${colors.primary.main};
|
|
121
75
|
left: 8px;
|
|
76
|
+
bottom: -1px;
|
|
122
77
|
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
78
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
79
|
+
& ~ * {
|
|
80
|
+
&::after {
|
|
81
|
+
content: '';
|
|
82
|
+
width: 100%;
|
|
83
|
+
height: 2px;
|
|
84
|
+
background: ${colors.primary.main};
|
|
85
|
+
position: absolute;
|
|
86
|
+
left: 0;
|
|
87
|
+
bottom: -1px;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
133
90
|
}
|
|
134
91
|
}
|
|
135
92
|
|
|
136
|
-
.${treeDndClasses.
|
|
137
|
-
|
|
138
|
-
|
|
93
|
+
.${treeDndClasses.sibling} {
|
|
94
|
+
width: ${indent * 2}px;
|
|
95
|
+
flex: 1;
|
|
96
|
+
display: flex;
|
|
97
|
+
flex-direction: column;
|
|
98
|
+
position: relative;
|
|
99
|
+
|
|
100
|
+
.${treeDndClasses.siblingPrev}, .${treeDndClasses.siblingNext} {
|
|
101
|
+
flex: 1;
|
|
102
|
+
position: relative;
|
|
103
|
+
|
|
104
|
+
&[data-active=true] {
|
|
105
|
+
&::before, &::after {
|
|
106
|
+
content: '';
|
|
107
|
+
position: absolute;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&::before {
|
|
111
|
+
width: 8px;
|
|
112
|
+
height: 8px;
|
|
113
|
+
border-radius: 50%;
|
|
114
|
+
border: 2px solid ${colors.primary.main};
|
|
115
|
+
left: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&::after {
|
|
119
|
+
width: calc(100% - 8px);
|
|
120
|
+
height: 2px;
|
|
121
|
+
background: ${colors.primary.main};
|
|
122
|
+
left: 8px;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
139
125
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
126
|
+
|
|
127
|
+
.${treeDndClasses.siblingPrev} {
|
|
128
|
+
&::before {
|
|
129
|
+
top: -4px
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&::after {
|
|
133
|
+
top: -1px;
|
|
134
|
+
}
|
|
143
135
|
}
|
|
144
|
-
}
|
|
145
136
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
position: absolute;
|
|
150
|
-
right: 0;
|
|
151
|
-
bottom: 0;
|
|
152
|
-
|
|
153
|
-
&[data-active=true] {
|
|
154
|
-
&:before, &:after {
|
|
155
|
-
content: '';
|
|
156
|
-
position: absolute;
|
|
157
|
-
bottom: -1px;
|
|
137
|
+
.${treeDndClasses.siblingNext} {
|
|
138
|
+
&::before {
|
|
139
|
+
bottom: -4px;
|
|
158
140
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
height: 8px;
|
|
163
|
-
border-left: 2px solid ${colors.primary.main};
|
|
164
|
-
border-bottom: 2px solid ${colors.primary.main};
|
|
165
|
-
left: 0;
|
|
166
|
-
|
|
141
|
+
|
|
142
|
+
&::after {
|
|
143
|
+
bottom: -1px;
|
|
167
144
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.${treeDndClasses.child} {
|
|
148
|
+
width: calc(100% - ${indent * 2}px);
|
|
149
|
+
height: 50%;
|
|
150
|
+
position: absolute;
|
|
151
|
+
right: 0;
|
|
152
|
+
bottom: 0;
|
|
153
|
+
|
|
154
|
+
&[data-active=true] {
|
|
155
|
+
&::before, &::after {
|
|
156
|
+
content: '';
|
|
157
|
+
position: absolute;
|
|
158
|
+
bottom: -1px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&::before {
|
|
162
|
+
width: 8px;
|
|
163
|
+
height: 8px;
|
|
164
|
+
border-left: 2px solid ${colors.primary.main};
|
|
165
|
+
border-bottom: 2px solid ${colors.primary.main};
|
|
166
|
+
left: 0;
|
|
167
|
+
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&::after {
|
|
171
|
+
width: calc(100% - 12px);
|
|
172
|
+
height: 2px;
|
|
173
|
+
background: ${colors.primary.main};
|
|
174
|
+
left: 12px;
|
|
175
|
+
}
|
|
174
176
|
}
|
|
175
177
|
}
|
|
176
178
|
}
|
|
177
179
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
|
|
181
|
+
.${treeDndClasses.levelBlock} {
|
|
182
|
+
&[data-active=true] {
|
|
183
|
+
outline: 1px dashed ${colors.primary.main};
|
|
184
|
+
}
|
|
183
185
|
}
|
|
184
186
|
}
|
|
185
187
|
`, [indent]);
|
|
@@ -9,48 +9,50 @@ export const classes = defineInnerClasses('tree-select', [
|
|
|
9
9
|
'arrow'
|
|
10
10
|
]);
|
|
11
11
|
export const style = defineCss(({ spacing, text, easing }) => css `
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
@layer reset {
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
position: relative;
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.${classes.placeholder} {
|
|
22
|
-
flex: 1;
|
|
23
|
-
color: ${text.placeholder};
|
|
24
|
-
white-space: nowrap;
|
|
25
|
-
text-overflow: ellipsis;
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.${classes.backfill} {
|
|
30
|
-
flex: 1;
|
|
31
|
-
min-width: 0;
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-wrap: wrap;
|
|
34
|
-
gap: ${spacing[1]}px;
|
|
35
|
-
|
|
36
|
-
.${tagClasses.root} {
|
|
37
|
-
min-width: 0;
|
|
16
|
+
.${classes.contentWrap} {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: ${spacing[1]}px;
|
|
38
20
|
}
|
|
39
21
|
|
|
40
|
-
.${
|
|
41
|
-
|
|
22
|
+
.${classes.placeholder} {
|
|
23
|
+
flex: 1;
|
|
24
|
+
color: ${text.placeholder};
|
|
42
25
|
white-space: nowrap;
|
|
43
26
|
text-overflow: ellipsis;
|
|
44
27
|
overflow: hidden;
|
|
45
28
|
}
|
|
46
|
-
}
|
|
47
29
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
30
|
+
.${classes.backfill} {
|
|
31
|
+
flex: 1;
|
|
32
|
+
min-width: 0;
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-wrap: wrap;
|
|
35
|
+
gap: ${spacing[1]}px;
|
|
36
|
+
|
|
37
|
+
.${tagClasses.root} {
|
|
38
|
+
min-width: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.${tagClasses.content},
|
|
42
|
+
.${classes.backfillWrap} {
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
text-overflow: ellipsis;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.${classes.arrow} {
|
|
50
|
+
color: ${text.placeholder};
|
|
51
|
+
transition: transform .25s ${easing.easeOut};
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
&[data-open=true] {
|
|
54
|
+
transform: rotate(180deg);
|
|
55
|
+
}
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
`);
|
|
@@ -14,129 +14,131 @@ export function useStyle({ color }) {
|
|
|
14
14
|
const colorValue = useColor(color);
|
|
15
15
|
return useCss(({ mode, colors, gray, borderRadius, easing }) => {
|
|
16
16
|
return css `
|
|
17
|
-
|
|
17
|
+
@layer reset {
|
|
18
|
+
color: ${colorValue};
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
&[data-component=p] {
|
|
21
|
+
margin: 1em 0;
|
|
22
|
+
}
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
&[data-component=h1],
|
|
25
|
+
&[data-component=h2],
|
|
26
|
+
&[data-component=h3],
|
|
27
|
+
&[data-component=h4],
|
|
28
|
+
&[data-component=h5],
|
|
29
|
+
&[data-component=h6] {
|
|
30
|
+
margin-top: 1em;
|
|
31
|
+
margin-bottom: 0.5em;
|
|
32
|
+
}
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
&[data-component=h1] {
|
|
35
|
+
font-size: ${38 / 14}em;
|
|
36
|
+
}
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
&[data-component=h2] {
|
|
39
|
+
font-size: ${30 / 14}em;
|
|
40
|
+
}
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
&[data-component=h3] {
|
|
43
|
+
font-size: ${24 / 14}em;
|
|
44
|
+
}
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
&[data-component=h4] {
|
|
47
|
+
font-size: ${20 / 14}em;
|
|
48
|
+
}
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
&[data-component=h5] {
|
|
51
|
+
font-size: ${17 / 14}em;
|
|
52
|
+
}
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
&[data-component=h6] {
|
|
55
|
+
font-size: 1em;
|
|
56
|
+
}
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
&[data-component=mark] {
|
|
59
|
+
background-color: ${Color(colors.warning.main).lighten(.5).hex()};
|
|
60
|
+
}
|
|
60
61
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
&[data-component=kbd] {
|
|
63
|
+
background-color: ${gray(mode === 'light' ? .06 : .22)};
|
|
64
|
+
font-size: ${13 / 14}em;
|
|
65
|
+
padding: 4px 6px;
|
|
66
|
+
border-radius: ${borderRadius / 2}px;
|
|
67
|
+
box-shadow: ${mode === 'light'
|
|
67
68
|
? '0 1px 2px rgba(0, 0, 0, .4), -1px 2px rgba(255, 255, 255, .4)'
|
|
68
69
|
: '-1px 2px rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .6)'};
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&[data-component=code] {
|
|
73
|
-
background-color: ${gray(.06)};
|
|
74
|
-
font-size: ${13 / 14}em;
|
|
75
|
-
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
76
|
-
padding: 3px 6px;
|
|
77
|
-
border-radius: .15em;
|
|
78
|
-
margin: 0 4px;
|
|
79
|
-
outline: none;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&[data-component=a] {
|
|
83
|
-
color: ${colors.primary.main};
|
|
84
|
-
transition: color .25s ${easing.easeOut};
|
|
85
|
-
-webkit-tap-highlight-color: transparent;
|
|
86
|
-
|
|
87
|
-
&:hover {
|
|
88
|
-
color: ${colors.primary.light};
|
|
70
|
+
margin: 0 3px;
|
|
89
71
|
}
|
|
90
72
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
73
|
+
&[data-component=code] {
|
|
74
|
+
background-color: ${gray(.06)};
|
|
75
|
+
font-size: ${13 / 14}em;
|
|
76
|
+
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
77
|
+
padding: 3px 6px;
|
|
78
|
+
border-radius: .15em;
|
|
79
|
+
margin: 0 4px;
|
|
80
|
+
outline: none;
|
|
94
81
|
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&:not([data-ellipsis-rows="0"]) {
|
|
98
|
-
display: flex;
|
|
99
|
-
max-width: 100%;
|
|
100
|
-
align-items: flex-end;
|
|
101
82
|
|
|
102
|
-
&[data-component=mark],
|
|
103
|
-
&[data-component=kbd],
|
|
104
|
-
&[data-component=code],
|
|
105
83
|
&[data-component=a] {
|
|
106
|
-
|
|
107
|
-
|
|
84
|
+
color: ${colors.primary.main};
|
|
85
|
+
transition: color .25s ${easing.easeOut};
|
|
86
|
+
-webkit-tap-highlight-color: transparent;
|
|
108
87
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
88
|
+
&:hover {
|
|
89
|
+
color: ${colors.primary.light};
|
|
90
|
+
}
|
|
112
91
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
text-overflow: ellipsis;
|
|
92
|
+
&:active {
|
|
93
|
+
transition: color 0s;
|
|
94
|
+
color: ${colors.primary.dark};
|
|
117
95
|
}
|
|
118
96
|
}
|
|
119
97
|
|
|
120
|
-
&:not([data-ellipsis-rows="
|
|
98
|
+
&:not([data-ellipsis-rows="0"]) {
|
|
99
|
+
display: flex;
|
|
100
|
+
max-width: 100%;
|
|
101
|
+
align-items: flex-end;
|
|
102
|
+
|
|
103
|
+
&[data-component=mark],
|
|
104
|
+
&[data-component=kbd],
|
|
105
|
+
&[data-component=code],
|
|
106
|
+
&[data-component=a] {
|
|
107
|
+
display: inline-flex;
|
|
108
|
+
}
|
|
109
|
+
|
|
121
110
|
.${classes.text} {
|
|
122
|
-
|
|
123
|
-
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&[data-ellipsis-rows="1"] {
|
|
115
|
+
.${classes.text} {
|
|
116
|
+
white-space: nowrap;
|
|
117
|
+
text-overflow: ellipsis;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:not([data-ellipsis-rows="1"]) {
|
|
122
|
+
.${classes.text} {
|
|
123
|
+
display: -webkit-box;
|
|
124
|
+
-webkit-box-orient: vertical;
|
|
125
|
+
}
|
|
124
126
|
}
|
|
125
127
|
}
|
|
126
|
-
}
|
|
127
128
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
129
|
+
.${classes.action},
|
|
130
|
+
.${classes.copied} {
|
|
131
|
+
height: 1.5em;
|
|
132
|
+
vertical-align: text-bottom;
|
|
133
|
+
margin-left: .5em;
|
|
134
|
+
white-space: nowrap;
|
|
135
|
+
}
|
|
135
136
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
.${classes.copied} {
|
|
138
|
+
align-items: center;
|
|
139
|
+
color: ${colors.success.main};
|
|
140
|
+
animation: ${copyCheckAnim} .3s ${easing.swing};
|
|
141
|
+
}
|
|
140
142
|
}
|
|
141
143
|
`;
|
|
142
144
|
}, [colorValue]);
|