codecheck
422 строки · 10.3 Кб
1// core
2.p-treetable {
3position: relative;
4}
5
6.p-treetable table {
7border-collapse: collapse;
8width: 100%;
9table-layout: fixed;
10}
11
12.p-treetable .p-sortable-column {
13cursor: pointer;
14user-select: none;
15}
16
17.p-treetable-responsive-scroll > .p-treetable-wrapper {
18overflow-x: auto;
19}
20
21.p-treetable-responsive-scroll > .p-treetable-wrapper > table,
22.p-treetable-auto-layout > .p-treetable-wrapper > table {
23table-layout: auto;
24}
25
26.p-treetable-hoverable-rows .p-treetable-tbody > tr {
27cursor: pointer;
28}
29
30.p-treetable-toggler {
31cursor: pointer;
32user-select: none;
33display: inline-flex;
34align-items: center;
35justify-content: center;
36vertical-align: middle;
37overflow: hidden;
38position: relative;
39}
40
41.p-treetable-toggler + .p-checkbox {
42vertical-align: middle;
43}
44
45.p-treetable-toggler + .p-checkbox + span {
46vertical-align: middle;
47}
48
49/* Resizable */
50.p-treetable-resizable > .p-treetable-wrapper {
51overflow-x: auto;
52}
53
54.p-treetable-resizable .p-treetable-thead > tr > th,
55.p-treetable-resizable .p-treetable-tfoot > tr > td,
56.p-treetable-resizable .p-treetable-tbody > tr > td {
57overflow: hidden;
58}
59
60.p-treetable-resizable .p-resizable-column:not(.p-frozen-column) {
61background-clip: padding-box;
62position: relative;
63}
64
65.p-treetable-resizable-fit .p-resizable-column:last-child .p-column-resizer {
66display: none;
67}
68
69.p-treetable .p-column-resizer {
70display: block;
71position: absolute;
72top: 0;
73right: 0;
74margin: 0;
75width: 0.5rem;
76height: 100%;
77padding: 0px;
78cursor: col-resize;
79border: 1px solid transparent;
80}
81
82.p-treetable .p-column-resizer-helper {
83width: 1px;
84position: absolute;
85z-index: 10;
86display: none;
87}
88
89.p-treetable .p-treetable-loading-overlay {
90position: absolute;
91display: flex;
92align-items: center;
93justify-content: center;
94z-index: 2;
95}
96
97/* Scrollable */
98.p-treetable-scrollable .p-treetable-wrapper {
99position: relative;
100overflow: auto;
101}
102
103.p-treetable-scrollable .p-treetable-table {
104display: block;
105}
106
107.p-treetable-scrollable .p-treetable-thead,
108.p-treetable-scrollable .p-treetable-tbody,
109.p-treetable-scrollable .p-treetable-tfoot {
110display: block;
111}
112
113.p-treetable-scrollable .p-treetable-thead > tr,
114.p-treetable-scrollable .p-treetable-tbody > tr,
115.p-treetable-scrollable .p-treetable-tfoot > tr {
116display: flex;
117flex-wrap: nowrap;
118width: 100%;
119}
120
121.p-treetable-scrollable .p-treetable-thead > tr > th,
122.p-treetable-scrollable .p-treetable-tbody > tr > td,
123.p-treetable-scrollable .p-treetable-tfoot > tr > td {
124display: flex;
125flex: 1 1 0;
126align-items: center;
127}
128
129.p-treetable-scrollable .p-treetable-thead {
130position: sticky;
131top: 0;
132z-index: 1;
133}
134
135.p-treetable-scrollable .p-treetable-tfoot {
136position: sticky;
137bottom: 0;
138z-index: 1;
139}
140
141.p-treetable-scrollable .p-frozen-column {
142position: sticky;
143background: inherit;
144}
145
146.p-treetable-scrollable th.p-frozen-column {
147z-index: 1;
148}
149
150.p-treetable-scrollable-both .p-treetable-thead > tr > th,
151.p-treetable-scrollable-both .p-treetable-tbody > tr > td,
152.p-treetable-scrollable-both .p-treetable-tfoot > tr > td,
153.p-treetable-scrollable-horizontal .p-treetable-thead > tr > th .p-treetable-scrollable-horizontal .p-treetable-tbody > tr > td,
154.p-treetable-scrollable-horizontal .p-treetable-tfoot > tr > td {
155flex: 0 0 auto;
156}
157
158.p-treetable-flex-scrollable {
159display: flex;
160flex-direction: column;
161height: 100%;
162}
163
164.p-treetable-flex-scrollable .p-treetable-wrapper {
165display: flex;
166flex-direction: column;
167flex: 1;
168height: 100%;
169}
170
171// theme
172.p-treetable {
173.p-paginator-top {
174border-width: $tableTopPaginatorBorderWidth;
175border-radius: 0;
176}
177
178.p-paginator-bottom {
179border-width: $tableBottomPaginatorBorderWidth;
180border-radius: 0;
181}
182
183.p-treetable-header {
184background: $tableHeaderBg;
185color: $tableHeaderTextColor;
186border: $tableHeaderBorder;
187border-width: $tableHeaderBorderWidth;
188padding: $tableHeaderPadding;
189font-weight: $tableHeaderFontWeight;
190}
191
192.p-treetable-footer {
193background: $tableFooterBg;
194color: $tableFooterTextColor;
195border: $tableFooterBorder;
196border-width: $tableFooterBorderWidth;
197padding: $tableFooterPadding;
198font-weight: $tableFooterFontWeight;
199}
200
201.p-treetable-thead > tr > th {
202text-align: $tableCellContentAlignment;
203padding: $tableHeaderCellPadding;
204border: $tableHeaderCellBorder;
205border-width: $tableHeaderCellBorderWidth;
206font-weight: $tableHeaderCellFontWeight;
207color: $tableHeaderCellTextColor;
208background: $tableHeaderCellBg;
209transition: $listItemTransition;
210}
211
212.p-treetable-tfoot > tr > td {
213text-align: $tableCellContentAlignment;
214padding: $tableFooterCellPadding;
215border: $tableFooterCellBorder;
216border-width: $tableFooterCellBorderWidth;
217font-weight: $tableFooterCellFontWeight;
218color: $tableFooterCellTextColor;
219background: $tableFooterCellBg;
220}
221
222.p-sortable-column {
223outline-color: $focusOutlineColor;
224
225.p-sortable-column-icon {
226color: $tableHeaderCellIconColor;
227margin-left: $inlineSpacing;
228}
229
230.p-sortable-column-badge {
231border-radius: 50%;
232height: $tableSortableColumnBadgeSize;
233min-width: $tableSortableColumnBadgeSize;
234line-height: $tableSortableColumnBadgeSize;
235color: $highlightTextColor;
236background: $highlightBg;
237margin-left: $inlineSpacing;
238}
239
240&:not(.p-highlight):hover {
241background: $tableHeaderCellHoverBg;
242color: $tableHeaderCellTextHoverColor;
243
244.p-sortable-column-icon {
245color: $tableHeaderCellIconHoverColor;
246}
247}
248
249&.p-highlight {
250background: $tableHeaderCellHighlightBg;
251color: $tableHeaderCellHighlightTextColor;
252
253.p-sortable-column-icon {
254color: $tableHeaderCellHighlightTextColor;
255}
256}
257}
258
259.p-treetable-tbody {
260> tr {
261background: $tableBodyRowBg;
262color: $tableBodyRowTextColor;
263transition: $listItemTransition;
264
265> td {
266text-align: $tableCellContentAlignment;
267border: $tableBodyCellBorder;
268border-width: $tableBodyCellBorderWidth;
269padding: $tableBodyCellPadding;
270
271.p-treetable-toggler {
272@include action-icon();
273margin-right: $inlineSpacing;
274
275& + .p-checkbox {
276margin-right: $inlineSpacing;
277
278&.p-indeterminate {
279.p-checkbox-icon {
280color: $textColor;
281}
282}
283}
284}
285}
286
287&:focus-visible {
288outline: 0.15rem solid $focusOutlineColor;
289outline-offset: -0.15rem;
290}
291
292&.p-highlight {
293background: $highlightBg;
294color: $highlightTextColor;
295
296.p-treetable-toggler {
297color: $highlightTextColor;
298
299&:hover {
300color: $highlightTextColor;
301}
302
303}
304}
305}
306}
307
308&.p-treetable-hoverable-rows {
309.p-treetable-tbody > tr:not(.p-highlight):hover {
310background: $tableBodyRowHoverBg;
311color: $tableBodyRowTextHoverColor;
312
313.p-treetable-toggler {
314color: $tableBodyRowTextHoverColor;
315}
316}
317}
318
319.p-column-resizer-helper {
320background: $tableResizerHelperBg;
321}
322
323.p-treetable-scrollable-header,
324.p-treetable-scrollable-footer {
325background: $panelHeaderBg;
326}
327
328.p-treetable-loading-icon {
329font-size: $loadingIconFontSize;
330
331&.p-icon {
332width: $loadingIconFontSize;
333height: $loadingIconFontSize;
334}
335}
336
337&.p-treetable-gridlines {
338.p-datatable-header {
339border-width: 1px 1px 0 1px;
340}
341
342.p-treetable-footer {
343border-width: 0 1px 1px 1px;
344}
345
346.p-treetable-top {
347border-width: 0 1px 0 1px;
348}
349
350.p-treetable-bottom {
351border-width: 0 1px 1px 1px;
352}
353
354.p-treetable-thead {
355> tr {
356> th {
357border-width: 1px;
358}
359}
360}
361
362.p-treetable-tbody {
363> tr {
364> td {
365border-width: 1px;
366}
367}
368}
369
370.p-treetable-tfoot {
371> tr {
372> td {
373border-width: 1px;
374}
375}
376}
377}
378
379&.p-treetable-sm {
380.p-treetable-header {
381@include scaledPadding($tableHeaderPadding, $scaleSM);
382}
383
384.p-treetable-thead > tr > th {
385@include scaledPadding($tableHeaderCellPadding, $tableScaleSM);
386}
387
388.p-treetable-tbody > tr > td {
389@include scaledPadding($tableBodyCellPadding, $tableScaleSM);
390}
391
392.p-treetable-tfoot > tr > td {
393@include scaledPadding($tableFooterPadding, $tableScaleSM);
394}
395
396.p-treetable-footer {
397@include scaledPadding($tableFooterPadding, $tableScaleSM);
398}
399}
400
401&.p-treetable-lg {
402.p-treetable-header {
403@include scaledPadding($tableHeaderPadding, $tableScaleLG);
404}
405
406.p-treetable-thead > tr > th {
407@include scaledPadding($tableHeaderCellPadding, $tableScaleLG);
408}
409
410.p-treetable-tbody > tr > td {
411@include scaledPadding($tableBodyCellPadding, $tableScaleLG);
412}
413
414.p-treetable-tfoot > tr > td {
415@include scaledPadding($tableFooterPadding, $tableScaleLG);
416}
417
418.p-treetable-footer {
419@include scaledPadding($tableFooterPadding, $tableScaleLG);
420}
421}
422}
423