codecheck
584 строки · 13.8 Кб
1// core
2.p-datatable {
3position: relative;
4}
5
6.p-datatable-table {
7border-spacing: 0px;
8width: 100%;
9}
10
11.p-datatable .p-sortable-column {
12cursor: pointer;
13user-select: none;
14}
15
16.p-datatable .p-sortable-column .p-column-title,
17.p-datatable .p-sortable-column .p-sortable-column-icon,
18.p-datatable .p-sortable-column .p-sortable-column-badge {
19vertical-align: middle;
20}
21
22.p-datatable .p-sortable-column .p-sortable-column-badge {
23display: inline-flex;
24align-items: center;
25justify-content: center;
26}
27
28.p-datatable-hoverable-rows .p-selectable-row {
29cursor: pointer;
30}
31
32/* Scrollable */
33.p-datatable-scrollable > .p-datatable-wrapper {
34position: relative;
35}
36
37.p-datatable-scrollable-table > .p-datatable-thead {
38top: 0;
39z-index: 1;
40}
41
42.p-datatable-scrollable-table > .p-datatable-frozen-tbody {
43position: sticky;
44z-index: 1;
45}
46
47.p-datatable-scrollable-table > .p-datatable-tfoot {
48bottom: 0;
49z-index: 1;
50}
51
52.p-datatable-scrollable .p-frozen-column {
53position: sticky;
54background: inherit;
55}
56
57.p-datatable-scrollable th.p-frozen-column {
58z-index: 1;
59}
60
61.p-datatable-flex-scrollable {
62display: flex;
63flex-direction: column;
64height: 100%;
65}
66
67.p-datatable-flex-scrollable > .p-datatable-wrapper {
68display: flex;
69flex-direction: column;
70flex: 1;
71height: 100%;
72}
73
74.p-datatable-scrollable-table > .p-datatable-tbody > .p-rowgroup-header {
75position: sticky;
76z-index: 1;
77}
78
79/* Resizable */
80.p-datatable-resizable-table > .p-datatable-thead > tr > th,
81.p-datatable-resizable-table > .p-datatable-tfoot > tr > td,
82.p-datatable-resizable-table > .p-datatable-tbody > tr > td {
83overflow: hidden;
84white-space: nowrap;
85}
86
87.p-datatable-resizable-table > .p-datatable-thead > tr > th.p-resizable-column:not(.p-frozen-column) {
88background-clip: padding-box;
89position: relative;
90}
91
92.p-datatable-resizable-table-fit > .p-datatable-thead > tr > th.p-resizable-column:last-child .p-column-resizer {
93display: none;
94}
95
96.p-datatable .p-column-resizer {
97display: block;
98position: absolute;
99top: 0;
100right: 0;
101margin: 0;
102width: 0.5rem;
103height: 100%;
104padding: 0px;
105cursor: col-resize;
106border: 1px solid transparent;
107}
108
109.p-datatable .p-column-header-content {
110display: flex;
111align-items: center;
112}
113
114.p-datatable .p-column-resizer-helper {
115width: 1px;
116position: absolute;
117z-index: 10;
118display: none;
119}
120
121.p-datatable .p-row-editor-init,
122.p-datatable .p-row-editor-save,
123.p-datatable .p-row-editor-cancel {
124display: inline-flex;
125align-items: center;
126justify-content: center;
127overflow: hidden;
128position: relative;
129}
130
131/* Expand */
132.p-datatable .p-row-toggler {
133display: inline-flex;
134align-items: center;
135justify-content: center;
136overflow: hidden;
137position: relative;
138}
139
140/* Reorder */
141.p-datatable-reorder-indicator-up,
142.p-datatable-reorder-indicator-down {
143position: absolute;
144display: none;
145}
146
147.p-reorderable-column,
148.p-datatable-reorderablerow-handle {
149cursor: move;
150}
151
152/* Loader */
153.p-datatable .p-datatable-loading-overlay {
154position: absolute;
155display: flex;
156align-items: center;
157justify-content: center;
158z-index: 2;
159}
160
161/* Filter */
162.p-column-filter-row {
163display: flex;
164align-items: center;
165width: 100%;
166}
167
168.p-column-filter-menu {
169display: inline-flex;
170margin-left: auto;
171}
172
173.p-column-filter-row .p-column-filter-element {
174flex: 1 1 auto;
175width: 1%;
176}
177
178.p-column-filter-menu-button,
179.p-column-filter-clear-button {
180display: inline-flex;
181justify-content: center;
182align-items: center;
183cursor: pointer;
184text-decoration: none;
185overflow: hidden;
186position: relative;
187}
188
189.p-column-filter-row-items {
190margin: 0;
191padding: 0;
192list-style: none;
193}
194
195.p-column-filter-row-item {
196cursor: pointer;
197}
198
199.p-column-filter-add-button,
200.p-column-filter-remove-button {
201justify-content: center;
202}
203
204.p-column-filter-add-button .p-button-label,
205.p-column-filter-remove-button .p-button-label {
206flex-grow: 0;
207}
208
209.p-column-filter-buttonbar {
210display: flex;
211align-items: center;
212justify-content: space-between;
213}
214
215.p-column-filter-buttonbar .p-button:not(.p-button-icon-only) {
216width: auto;
217}
218
219/* Responsive */
220.p-datatable .p-datatable-tbody > tr > td > .p-column-title {
221display: none;
222}
223
224/* VirtualScroller */
225.p-datatable-virtualscroller-spacer {
226display: flex;
227}
228
229.p-datatable .p-virtualscroller .p-virtualscroller-loading {
230transform: none !important;
231min-height: 0;
232position: sticky;
233top: 0;
234left: 0;
235}
236
237// theme
238.p-datatable {
239.p-paginator-top {
240border-width: $tableTopPaginatorBorderWidth;
241border-radius: 0;
242}
243
244.p-paginator-bottom {
245border-width: $tableBottomPaginatorBorderWidth;
246border-radius: 0;
247}
248
249.p-datatable-header {
250background: $tableHeaderBg;
251color: $tableHeaderTextColor;
252border: $tableHeaderBorder;
253border-width: $tableHeaderBorderWidth;
254padding: $tableHeaderPadding;
255font-weight: $tableHeaderFontWeight;
256}
257
258.p-datatable-footer {
259background: $tableFooterBg;
260color: $tableFooterTextColor;
261border: $tableFooterBorder;
262border-width: $tableFooterBorderWidth;
263padding: $tableFooterPadding;
264font-weight: $tableFooterFontWeight;
265}
266
267.p-datatable-thead > tr > th {
268text-align: $tableCellContentAlignment;
269padding: $tableHeaderCellPadding;
270border: $tableHeaderCellBorder;
271border-width: $tableHeaderCellBorderWidth;
272font-weight: $tableHeaderCellFontWeight;
273color: $tableHeaderCellTextColor;
274background: $tableHeaderCellBg;
275transition: $listItemTransition;
276}
277
278.p-datatable-tfoot > tr > td {
279text-align: $tableCellContentAlignment;
280padding: $tableFooterCellPadding;
281border: $tableFooterCellBorder;
282border-width: $tableFooterCellBorderWidth;
283font-weight: $tableFooterCellFontWeight;
284color: $tableFooterCellTextColor;
285background: $tableFooterCellBg;
286}
287
288.p-sortable-column {
289.p-sortable-column-icon {
290color: $tableHeaderCellIconColor;
291margin-left: $inlineSpacing;
292}
293
294.p-sortable-column-badge {
295border-radius: 50%;
296height: $tableSortableColumnBadgeSize;
297min-width: $tableSortableColumnBadgeSize;
298line-height: $tableSortableColumnBadgeSize;
299color: $highlightTextColor;
300background: $highlightBg;
301margin-left: $inlineSpacing;
302}
303
304&:not(.p-highlight):hover {
305background: $tableHeaderCellHoverBg;
306color: $tableHeaderCellTextHoverColor;
307
308.p-sortable-column-icon {
309color: $tableHeaderCellIconHoverColor;
310}
311}
312
313&.p-highlight {
314background: $tableHeaderCellHighlightBg;
315color: $tableHeaderCellHighlightTextColor;
316
317.p-sortable-column-icon {
318color: $tableHeaderCellHighlightTextColor;
319}
320
321&:hover {
322background: $tableHeaderCellHighlightHoverBg;
323color: $tableHeaderCellHighlightTextColor;
324
325.p-sortable-column-icon {
326color: $tableHeaderCellHighlightTextColor;
327}
328}
329}
330
331&:focus-visible {
332box-shadow: $inputListItemFocusShadow;
333outline: 0 none;
334}
335}
336
337.p-datatable-tbody {
338> tr {
339background: $tableBodyRowBg;
340color: $tableBodyRowTextColor;
341transition: $listItemTransition;
342
343> td {
344text-align: $tableCellContentAlignment;
345border: $tableBodyCellBorder;
346border-width: $tableBodyCellBorderWidth;
347padding: $tableBodyCellPadding;
348
349.p-row-toggler,
350.p-row-editor-init,
351.p-row-editor-save,
352.p-row-editor-cancel {
353@include action-icon();
354}
355
356.p-row-editor-save {
357margin-right: $inlineSpacing;
358}
359
360> .p-column-title {
361font-weight: $tableHeaderCellFontWeight;
362}
363}
364
365&:focus-visible {
366outline: 0.15rem solid $focusOutlineColor;
367outline-offset: -0.15rem;
368}
369
370&.p-highlight {
371background: $highlightBg;
372color: $highlightTextColor;
373}
374
375&.p-highlight-contextmenu {
376outline: 0.15rem solid $focusOutlineColor;
377outline-offset: -0.15rem;
378}
379
380&.p-datatable-dragpoint-top > td {
381box-shadow: inset 0 2px 0 0 $highlightBg;
382}
383
384&.p-datatable-dragpoint-bottom > td {
385box-shadow: inset 0 -2px 0 0 $highlightBg;
386}
387}
388}
389
390&.p-datatable-hoverable-rows {
391.p-datatable-tbody > tr:not(.p-highlight):hover {
392background: $tableBodyRowHoverBg;
393color: $tableBodyRowTextHoverColor;
394}
395}
396
397.p-column-resizer-helper {
398background: $tableResizerHelperBg;
399}
400
401&.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table,
402&.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table {
403> .p-datatable-thead,
404> .p-datatable-tfoot {
405background-color: $tableHeaderCellBg;
406}
407}
408
409.p-datatable-loading-icon {
410font-size: $loadingIconFontSize;
411
412&.p-icon {
413width: $loadingIconFontSize;
414height: $loadingIconFontSize;
415}
416}
417
418&.p-datatable-gridlines {
419.p-datatable-header {
420border-width: 1px 1px 0 1px;
421}
422
423.p-datatable-footer {
424border-width: 0 1px 1px 1px;
425}
426
427.p-paginator-top {
428border-width: 0 1px 0 1px;
429}
430
431.p-paginator-bottom {
432border-width: 0 1px 1px 1px;
433}
434
435.p-datatable-thead {
436> tr {
437> th {
438border-width: 1px 0 1px 1px;
439
440&:last-child {
441border-width: 1px;
442}
443}
444}
445}
446
447.p-datatable-tbody {
448> tr {
449> td {
450border-width: 1px 0 0 1px;
451
452&:last-child {
453border-width: 1px 1px 0 1px;
454}
455}
456
457&:last-child {
458> td {
459border-width: 1px 0 1px 1px;
460
461&:last-child {
462border-width: 1px;
463}
464}
465}
466}
467}
468
469.p-datatable-tfoot {
470> tr {
471> td {
472border-width: 1px 0 1px 1px;
473
474&:last-child {
475border-width: 1px 1px 1px 1px;
476}
477}
478}
479}
480
481.p-datatable-thead + .p-datatable-tfoot {
482> tr {
483> td {
484border-width: 0 0 1px 1px;
485
486&:last-child {
487border-width: 0 1px 1px 1px;
488}
489}
490}
491}
492
493&:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody {
494> tr {
495> td {
496border-width: 0 0 1px 1px;
497
498&:last-child {
499border-width: 0 1px 1px 1px;
500}
501}
502}
503}
504
505&:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody {
506> tr {
507&:last-child {
508> td {
509border-width: 0 0 0 1px;
510
511&:last-child {
512border-width: 0 1px 0 1px;
513}
514}
515}
516}
517}
518}
519
520&.p-datatable-striped {
521.p-datatable-tbody {
522> tr.p-row-odd {
523background: $tableBodyRowEvenBg;
524
525&.p-highlight {
526background: $highlightBg;
527color: $highlightTextColor;
528
529.p-row-toggler {
530color: $highlightTextColor;
531
532&:hover {
533color: $highlightTextColor;
534}
535}
536}
537}
538}
539}
540
541&.p-datatable-sm {
542.p-datatable-header {
543@include scaledPadding($tableHeaderPadding, $tableScaleSM);
544}
545
546.p-datatable-thead > tr > th {
547@include scaledPadding($tableHeaderCellPadding, $tableScaleSM);
548}
549
550.p-datatable-tbody > tr > td {
551@include scaledPadding($tableBodyCellPadding, $tableScaleSM);
552}
553
554.p-datatable-tfoot > tr > td {
555@include scaledPadding($tableFooterPadding, $tableScaleSM);
556}
557
558.p-datatable-footer {
559@include scaledPadding($tableFooterPadding, $tableScaleSM);
560}
561}
562
563&.p-datatable-lg {
564.p-datatable-header {
565@include scaledPadding($tableHeaderPadding, $tableScaleLG);
566}
567
568.p-datatable-thead > tr > th {
569@include scaledPadding($tableHeaderCellPadding, $tableScaleLG);
570}
571
572.p-datatable-tbody > tr > td {
573@include scaledPadding($tableBodyCellPadding, $tableScaleLG);
574}
575
576.p-datatable-tfoot > tr > td {
577@include scaledPadding($tableFooterPadding, $tableScaleLG);
578}
579
580.p-datatable-footer {
581@include scaledPadding($tableFooterPadding, $tableScaleLG);
582}
583}
584}
585