@table-bro/angular-material 0.0.0-stage → 1.2.0
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/LICENSE +21 -0
- package/README.md +195 -2
- package/THIRD_PARTY_NOTICES.md +69 -0
- package/dist/table-bro.material.min.css +1 -0
- package/fesm2022/table-bro-angular-material.mjs +2142 -0
- package/fesm2022/table-bro-angular-material.mjs.map +1 -0
- package/package.json +65 -3
- package/styles/_table-bro.api.scss +3 -0
- package/styles/_table-bro.material.api.scss +5 -0
- package/styles/mixins/_text-ellipsis.scss +5 -0
- package/styles/mixins/_visually-hidden.scss +14 -0
- package/styles/skin/angular-material/_themes.scss +29 -0
- package/styles/skin/angular-material/_variables.scss +81 -0
- package/styles/skin/angular-material/components/_shadows.scss +7 -0
- package/styles/skin/angular-material/table-bro/_filter-drawer.scss +111 -0
- package/styles/skin/angular-material/table-bro/_paginator.scss +12 -0
- package/styles/skin/angular-material/table-bro/_progress-bar.scss +7 -0
- package/styles/skin/angular-material/table-bro/_slide-toggle.scss +5 -0
- package/styles/skin/angular-material/table-bro/_sort-header.scss +12 -0
- package/styles/skin/angular-material/table-bro/_table.scss +68 -0
- package/styles/skin/angular-material/table-bro/_text-ellipsis.scss +8 -0
- package/styles/skin/angular-material/table-bro/_toolbar-search.scss +27 -0
- package/styles/skin/angular-material/table-bro/_toolbar.scss +14 -0
- package/styles/skin/shared/_variables.scss +94 -0
- package/styles/skin/shared/mixins/_custom-properties.scss +39 -0
- package/styles/skin/shared/mixins/_progress-bar.scss +27 -0
- package/styles/skin/shared/mixins/_shared.scss +79 -0
- package/styles/skin/shared/mixins/_skin-colors.scss +64 -0
- package/styles/skin/shared/mixins/_slide-toggle.scss +5 -0
- package/styles/skin/shared/mixins/_sort-header.scss +11 -0
- package/styles/skin/shared/mixins/_toolbar.scss +61 -0
- package/styles/skin/shared/table-bro/_details.scss +11 -0
- package/styles/skin/shared/table-bro/_filter-drawer.scss +62 -0
- package/styles/skin/shared/table-bro/_shadows.scss +19 -0
- package/styles/skin/shared/table-bro/_state.scss +38 -0
- package/styles/skin/shared/table-bro/_table.scss +70 -0
- package/styles/skin/shared/table-bro/_text-ellipsis.scss +14 -0
- package/styles/table-bro.material.scss +80 -0
- package/types/table-bro-angular-material.d.ts +523 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use "../variables" as *;
|
|
2
|
+
@use "shared-selector-map" as *;
|
|
3
|
+
|
|
4
|
+
@mixin styles {
|
|
5
|
+
// The buttons and the field of the search lie in the toolbar itself, so it lays them out in a row as Material does,
|
|
6
|
+
// and the field takes the width between the buttons
|
|
7
|
+
#{$bro-table-toolbar_container} #{$mat-toolbar-selector}.bro-toolbar-search {
|
|
8
|
+
display: flex;
|
|
9
|
+
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// The field has the title text of the toolbar, of the theme of the application
|
|
14
|
+
#{$mat-toolbar-selector} #{$bro-toolbar_content-search} {
|
|
15
|
+
line-height: inherit;
|
|
16
|
+
|
|
17
|
+
input {
|
|
18
|
+
font-weight: inherit;
|
|
19
|
+
font-size: inherit;
|
|
20
|
+
line-height: inherit;
|
|
21
|
+
|
|
22
|
+
&::placeholder {
|
|
23
|
+
color: $mat-text-secondary-color;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@use "../variables" as *;
|
|
2
|
+
@use "shared-selector-map" as *;
|
|
3
|
+
@use "../../shared/mixins/toolbar" as *;
|
|
4
|
+
|
|
5
|
+
@mixin styles {
|
|
6
|
+
@include skin_toolbar($mat-toolbar-selector);
|
|
7
|
+
|
|
8
|
+
#{$bro-table-toolbar_container} {
|
|
9
|
+
#{$mat-toolbar-selector} {
|
|
10
|
+
border-bottom-width: 1px;
|
|
11
|
+
border-bottom-style: solid;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// The variables every skin has. Each skin forwards this file with its own values (skin/<skin>/_variables.scss),
|
|
2
|
+
// and users change them with @use "table-bro.<skin>" with (...). A variable of one skin lives in the file of that skin.
|
|
3
|
+
// The sizes and timings that the table script reads too go to the host as custom properties
|
|
4
|
+
// (skin/shared/mixins/_custom-properties.scss).
|
|
5
|
+
$bro-skin: null !default;
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
// Table
|
|
9
|
+
$bro-table-width: null !default; // or px-value, or 100%;
|
|
10
|
+
$bro-table-header-height: null !default;
|
|
11
|
+
$bro-table-row-height: null !default;
|
|
12
|
+
$bro-row-horizontal-padding: null !default;
|
|
13
|
+
$bro-table-shadow-size: null !default;
|
|
14
|
+
|
|
15
|
+
// The space between the islands of the table, as between the table and its filter drawer
|
|
16
|
+
$bro-island-space-size: null !default;
|
|
17
|
+
|
|
18
|
+
// The radius of the corners of the table; 0 keeps them square
|
|
19
|
+
$bro-corner-radius: null !default;
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
// Toolbar and paginator
|
|
23
|
+
$bro-toolbar-height: null !default;
|
|
24
|
+
$bro-paginator-height: null !default;
|
|
25
|
+
|
|
26
|
+
// The narrowest table, as wide as its paginator in one line, and the filter drawer lies over a table that would be narrower
|
|
27
|
+
// next to it. The range of the paginator writes the number of rows, so 1000 rows, as 996 – 1,000 of 1,000 on their
|
|
28
|
+
// last page, need a wider table than fewer rows: the skins take this width, and a page with fewer rows may set a smaller one
|
|
29
|
+
$bro-table-min-width: null !default;
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
// Table cells
|
|
33
|
+
$bro-cell-number-width: null !default;
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
// Filter drawer
|
|
37
|
+
$bro-filter-drawer-width: null !default;
|
|
38
|
+
$bro-filter-drawer-corner-radius: null !default;
|
|
39
|
+
|
|
40
|
+
// The scrim over the table of the modal filter drawer
|
|
41
|
+
$bro-scrim-color: null !default;
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
// Progress
|
|
45
|
+
$bro-global-progress: null !default;
|
|
46
|
+
$bro-details-progress: null !default;
|
|
47
|
+
|
|
48
|
+
// How much the body fades during a refresh, from 0 to 1, in the light and the dark theme
|
|
49
|
+
$bro-refresh-overlay-opacity: null !default;
|
|
50
|
+
$bro-refresh-overlay-opacity-dark: null !default;
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
// State
|
|
54
|
+
$bro-state-icon-size: null !default;
|
|
55
|
+
$bro-state-icon-margin-right: null !default;
|
|
56
|
+
$bro-state-line-height: null !default;
|
|
57
|
+
$bro-state-message-font-size: null !default;
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
// Motion
|
|
61
|
+
$bro-column-width-duration: null !default; // the motion of the columns to their new widths
|
|
62
|
+
$bro-details-duration: null !default;
|
|
63
|
+
$bro-details-easing: null !default; // the curve of the eased row details and of the turn of their button
|
|
64
|
+
$bro-filter-drawer-duration: null !default;
|
|
65
|
+
$bro-kinetic-time-constant: null !default; // the time constant of the exponential decay, not its duration
|
|
66
|
+
$bro-state-icon-duration: null !default;
|
|
67
|
+
$bro-state-message-duration: null !default;
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
// Layers: the containers of the table and the shadows under them
|
|
71
|
+
$bro-table-container-z-index: null !default;
|
|
72
|
+
$bro-shadow-z-index: null !default;
|
|
73
|
+
|
|
74
|
+
// The layers above the containers of the table, from the bottom up: the header and the paginator over the rows,
|
|
75
|
+
// the filter drawer next to the table, the toolbar with its menus over that drawer, and the modal filter drawer
|
|
76
|
+
// over the whole table, its toolbar too
|
|
77
|
+
$bro-header-paginator-z-index: $bro-table-container-z-index + 1;
|
|
78
|
+
$bro-filter-drawer-scrim-z-index: $bro-table-container-z-index + 2;
|
|
79
|
+
$bro-filter-drawer-card-z-index: $bro-table-container-z-index + 3;
|
|
80
|
+
$bro-filter-drawer-content-z-index: $bro-table-container-z-index + 4;
|
|
81
|
+
$bro-toolbar-z-index: $bro-table-container-z-index + 5;
|
|
82
|
+
$bro-modal-filter-drawer-scrim-z-index: $bro-table-container-z-index + 6;
|
|
83
|
+
$bro-modal-filter-drawer-card-z-index: $bro-table-container-z-index + 7;
|
|
84
|
+
$bro-modal-filter-drawer-content-z-index: $bro-table-container-z-index + 8;
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
// Derived values: a skin or a user may set them, otherwise they follow the values above
|
|
88
|
+
@if not $bro-island-space-size {
|
|
89
|
+
$bro-island-space-size: $bro-table-shadow-size * .5;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@if not $bro-state-line-height {
|
|
93
|
+
$bro-state-line-height: $bro-state-icon-size;
|
|
94
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@use "../variables" as *;
|
|
2
|
+
|
|
3
|
+
// The sizes and timings of the skin as custom properties on the host. The rules of the skin size the table with them,
|
|
4
|
+
// and the table script reads them at render (packages/core/shared/styles.ts) as numbers for the geometry
|
|
5
|
+
// of the rows, the kinetic scroll, the shadows and the animations; only the header height, the corner radii and
|
|
6
|
+
// the duration of the motion of the column widths are for the CSS alone.
|
|
7
|
+
// A value set on the table changes the CSS and the script together, without a new build of the skin.
|
|
8
|
+
// The core CSS registers the properties (_custom-properties.scss).
|
|
9
|
+
@mixin bro-skin-custom-properties() {
|
|
10
|
+
--bro-row-height: #{$bro-table-row-height};
|
|
11
|
+
--bro-header-height: #{$bro-table-header-height};
|
|
12
|
+
--bro-shadow-size: #{$bro-table-shadow-size};
|
|
13
|
+
--bro-corner-radius: #{$bro-corner-radius};
|
|
14
|
+
--bro-island-space-size: #{$bro-island-space-size};
|
|
15
|
+
--bro-table-min-width: #{$bro-table-min-width};
|
|
16
|
+
--bro-filter-drawer-width: #{$bro-filter-drawer-width};
|
|
17
|
+
--bro-filter-drawer-corner-radius: #{$bro-filter-drawer-corner-radius};
|
|
18
|
+
|
|
19
|
+
--bro-table-body-container-z-index: #{$bro-table-container-z-index};
|
|
20
|
+
--bro-refresh-overlay-opacity: #{$bro-refresh-overlay-opacity};
|
|
21
|
+
--bro-refresh-overlay-opacity-dark: #{$bro-refresh-overlay-opacity-dark};
|
|
22
|
+
|
|
23
|
+
--bro-column-width-duration: #{$bro-column-width-duration};
|
|
24
|
+
--bro-details-duration: #{$bro-details-duration};
|
|
25
|
+
--bro-details-easing: #{$bro-details-easing};
|
|
26
|
+
--bro-filter-drawer-duration: #{$bro-filter-drawer-duration};
|
|
27
|
+
--bro-kinetic-time-constant: #{$bro-kinetic-time-constant};
|
|
28
|
+
--bro-state-icon-duration: #{$bro-state-icon-duration};
|
|
29
|
+
--bro-state-message-duration: #{$bro-state-message-duration};
|
|
30
|
+
|
|
31
|
+
// The factor of every animation of the table; without motion each one draws its end at once
|
|
32
|
+
--bro-duration-scale: 1;
|
|
33
|
+
|
|
34
|
+
@media (prefers-reduced-motion: reduce) {
|
|
35
|
+
@at-root #{&} {
|
|
36
|
+
--bro-duration-scale: 0;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use "../variables" as *;
|
|
2
|
+
@use "shared-selector-map" as *;
|
|
3
|
+
|
|
4
|
+
@mixin table-header-progress-bar($progress-bar-selector) {
|
|
5
|
+
#{$bro-table-header} {
|
|
6
|
+
#{$progress-bar-selector} {
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: calc(var(--bro-header-height) - #{$bro-global-progress});
|
|
9
|
+
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: $bro-global-progress;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@mixin table-aux-progress-bar($progress-bar-selector) {
|
|
17
|
+
#{$bro-table-aux} {
|
|
18
|
+
#{$progress-bar-selector} {
|
|
19
|
+
position: absolute;
|
|
20
|
+
z-index: $bro-table-container-z-index;
|
|
21
|
+
top: calc(var(--bro-row-height) - #{$bro-details-progress});
|
|
22
|
+
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: $bro-details-progress;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@use "../variables" as *;
|
|
2
|
+
@use "../../../mixins/visually-hidden" as *;
|
|
3
|
+
|
|
4
|
+
// The same mixin is in components/material-based/_table.scss of the core: the core and the skins are separate packages,
|
|
5
|
+
// which share no Sass module but the maps of the selectors
|
|
6
|
+
@mixin table-width-transition() {
|
|
7
|
+
// --bro-duration-scale is 0 under prefers-reduced-motion: reduce
|
|
8
|
+
transition: width calc(var(--bro-column-width-duration) * var(--bro-duration-scale)) ease;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// The items of a component cell, such as tags, keep to one line, so the row keeps its height. The component calls
|
|
12
|
+
// fitCellItems() of the core: the items that do not fit whole give way to an ellipsis after the items that show.
|
|
13
|
+
// The first item always shows and shrinks with its own ellipsis in a narrow cell.
|
|
14
|
+
// @param $row - the element that holds the items in its line
|
|
15
|
+
// @param $item - an item
|
|
16
|
+
// @param $text - the text inside an item; without it the item holds its text itself
|
|
17
|
+
@mixin bro-cell-items($row, $item, $text: null) {
|
|
18
|
+
#{$row} {
|
|
19
|
+
display: flex;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
width: 100%;
|
|
24
|
+
min-width: 0;
|
|
25
|
+
|
|
26
|
+
flex-wrap: nowrap;
|
|
27
|
+
align-items: center;
|
|
28
|
+
|
|
29
|
+
> #{$item} {
|
|
30
|
+
flex: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
> #{$item}:first-child {
|
|
34
|
+
min-width: 0;
|
|
35
|
+
|
|
36
|
+
flex-shrink: 1;
|
|
37
|
+
|
|
38
|
+
// The boxes inside the item shrink with it down to its text
|
|
39
|
+
* {
|
|
40
|
+
min-width: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@if $text {
|
|
44
|
+
#{$text} {
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
|
|
47
|
+
text-overflow: ellipsis;
|
|
48
|
+
}
|
|
49
|
+
} @else {
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
|
|
52
|
+
text-overflow: ellipsis;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
> .bro-cell-items-ellipsis {
|
|
57
|
+
flex: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// An item that does not fit the line: hidden from the eye, not from screen readers (fitCellItems)
|
|
61
|
+
> .bro-cell-item-hidden {
|
|
62
|
+
@include bro-visually-hidden;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// A container of the table on the page lines the table up with its content: the table moves left by its shadow size,
|
|
68
|
+
// so its visible part starts at the content and its shadows fall into the margins around it. The table knows its skin,
|
|
69
|
+
// so the rule needs no skin class around the container. A full width table takes the full width of the container,
|
|
70
|
+
// its shadows falling into the margins.
|
|
71
|
+
@mixin bro-table-shadow-container() {
|
|
72
|
+
@at-root .bro-table-shadow-container > table-bro#{&} {
|
|
73
|
+
margin-left: calc(var(--bro-shadow-size) * -1);
|
|
74
|
+
|
|
75
|
+
@if $bro-table-width == 100% {
|
|
76
|
+
width: 100%;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@use "sass:selector";
|
|
2
|
+
@use "shared-selector-map" as *;
|
|
3
|
+
|
|
4
|
+
@mixin bro-table-theme($table-selector, $toolbar-selector, $bro-bg, $bro-border-color, $bro-text-color, $bro-text-secondary-color) {
|
|
5
|
+
#{$table-selector} {
|
|
6
|
+
background: transparent;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
#{$bro-table-header_container} {
|
|
10
|
+
> table {
|
|
11
|
+
background: $bro-bg;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
#{$bro-table-toolbar_container} #{$toolbar-selector},
|
|
16
|
+
.bro-filter-drawer-header #{$toolbar-selector} {
|
|
17
|
+
border-bottom-color: $bro-border-color;
|
|
18
|
+
|
|
19
|
+
background: $bro-bg;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// The table with the filter drawer carries the class of the skin itself, so do the drawer of the mat skin and
|
|
23
|
+
// the card in it. Unify keeps the dark theme class where it is: on an ancestor
|
|
24
|
+
// (.bro-dark-theme table-bro-filter-drawer-container.bs) or on this element (table-bro-filter-drawer-container.bro-dark-theme.bs)
|
|
25
|
+
@at-root #{selector.unify(&, 'table-bro-filter-drawer-container')} {
|
|
26
|
+
> .bro-filter-drawer-header,
|
|
27
|
+
> [slot="filters"] {
|
|
28
|
+
color: $bro-text-color;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// The ellipsis after the items of a component cell that show (fitCellItems)
|
|
33
|
+
.bro-cell-items-ellipsis {
|
|
34
|
+
color: $bro-text-color;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// The card of the drawer under its header and its filters
|
|
38
|
+
.bro-filter-drawer-card {
|
|
39
|
+
background: $bro-bg;
|
|
40
|
+
color: $bro-text-color;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// The rows of the table of the body: the aux table measures the same rows, and its rows stay transparent
|
|
44
|
+
.bro-table tr.bro-row {
|
|
45
|
+
background: $bro-bg;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.bro-table #{$bro-details_tr} {
|
|
49
|
+
background-color: $bro-bg;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
#{$bro-toolbar_content-search} input {
|
|
53
|
+
background: $bro-bg;
|
|
54
|
+
color: $bro-text-color;
|
|
55
|
+
|
|
56
|
+
&::placeholder {
|
|
57
|
+
color: $bro-text-secondary-color;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.bro-paginator-outer-container {
|
|
62
|
+
background-color: $bro-bg;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@mixin sort-header-content() {
|
|
2
|
+
// A block, not a flex container: text-overflow does not apply to the anonymous flex item of the title. The container of
|
|
3
|
+
// the sort header centers the content as its flex item
|
|
4
|
+
display: block;
|
|
5
|
+
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
|
|
8
|
+
text-overflow: ellipsis;
|
|
9
|
+
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@use "../variables" as *;
|
|
2
|
+
@use "shared-selector-map" as *;
|
|
3
|
+
|
|
4
|
+
// The component and its shadow take the same corners: the shadow follows the rounded shape of the component
|
|
5
|
+
@mixin toolbar_or_paginator-container($container-selector, $shadow-selector, $component-selector, $component-height, $component-z-index, $border-radius: null) {
|
|
6
|
+
#{$container-selector} {
|
|
7
|
+
width: $bro-table-width;
|
|
8
|
+
|
|
9
|
+
#{$shadow-selector} {
|
|
10
|
+
z-index: $bro-shadow-z-index;
|
|
11
|
+
left: var(--bro-shadow-size);
|
|
12
|
+
|
|
13
|
+
height: $component-height;
|
|
14
|
+
|
|
15
|
+
border-radius: $border-radius;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
#{$component-selector} {
|
|
19
|
+
position: relative;
|
|
20
|
+
z-index: $component-z-index;
|
|
21
|
+
left: var(--bro-shadow-size);
|
|
22
|
+
|
|
23
|
+
border-radius: $border-radius;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@mixin skin_toolbar($toolbar-selector) {
|
|
30
|
+
#{$bro-table-toolbar_container} {
|
|
31
|
+
top: 0;
|
|
32
|
+
|
|
33
|
+
.bro-toolbar {
|
|
34
|
+
display: block;
|
|
35
|
+
|
|
36
|
+
height: $bro-toolbar-height;
|
|
37
|
+
|
|
38
|
+
> nav {
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
height: 100%;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// The menus of the toolbar lie above the filter drawer next to the table (the scale of the layers, skin/shared/_variables.scss).
|
|
46
|
+
// The toolbar has the top corners of the table.
|
|
47
|
+
@include toolbar_or_paginator-container($bro-table-toolbar_container, $bro-table-toolbar_shadow, $toolbar-selector, $bro-toolbar-height, $bro-toolbar-z-index, var(--bro-corner-radius) var(--bro-corner-radius) 0 0);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@mixin skin_table-header() {
|
|
51
|
+
@include toolbar_or_paginator-container($bro-table-header_container, $bro-table-header_shadow, $bro-table-header, var(--bro-header-height), $bro-header-paginator-z-index);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@mixin skin_paginator($paginator-selector) {
|
|
55
|
+
#{$bro-paginator-container} {
|
|
56
|
+
top: calc(var(--bro-shadow-size) * -2);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// The paginator has the bottom corners of the table
|
|
60
|
+
@include toolbar_or_paginator-container($bro-paginator-container, $bro-paginator-shadow, $paginator-selector, $bro-paginator-height, $bro-header-paginator-z-index, 0 0 var(--bro-corner-radius) var(--bro-corner-radius));
|
|
61
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
@use "../variables" as *;
|
|
2
|
+
|
|
3
|
+
// The table with the filter drawer carries the class of the skin itself:
|
|
4
|
+
// table-bro-filter-drawer-container#{&} is table-bro-filter-drawer-container.nv and the like
|
|
5
|
+
@mixin styles {
|
|
6
|
+
// The drawer lies above a table that does not fit its narrowed regions, and the scrim of the modal drawer between them
|
|
7
|
+
@at-root table-bro-filter-drawer-container#{&} {
|
|
8
|
+
> .bro-filter-drawer-scrim {
|
|
9
|
+
z-index: $bro-filter-drawer-scrim-z-index;
|
|
10
|
+
|
|
11
|
+
background: $bro-scrim-color;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
> .bro-filter-drawer-card {
|
|
15
|
+
z-index: $bro-filter-drawer-card-z-index;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
> .bro-filter-drawer-header,
|
|
19
|
+
> [slot="filters"] {
|
|
20
|
+
z-index: $bro-filter-drawer-content-z-index;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// The modal drawer and its scrim lie over the whole table, its toolbar too
|
|
24
|
+
&[modal] {
|
|
25
|
+
> .bro-filter-drawer-scrim {
|
|
26
|
+
z-index: $bro-modal-filter-drawer-scrim-z-index;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
> .bro-filter-drawer-card {
|
|
30
|
+
z-index: $bro-modal-filter-drawer-card-z-index;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
> .bro-filter-drawer-header,
|
|
34
|
+
> [slot="filters"] {
|
|
35
|
+
z-index: $bro-modal-filter-drawer-content-z-index;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// The filters of the application under the header
|
|
40
|
+
> [slot="filters"] > * {
|
|
41
|
+
padding: $bro-row-horizontal-padding;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// The filters of the application under the header in the card of mat-drawer of the mat skin
|
|
46
|
+
.bro-filter-drawer-card > .bro-filter-drawer-header ~ * {
|
|
47
|
+
padding: $bro-row-horizontal-padding;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.bro-filter-drawer-header {
|
|
51
|
+
.bro-toolbar {
|
|
52
|
+
display: block;
|
|
53
|
+
|
|
54
|
+
height: $bro-toolbar-height;
|
|
55
|
+
|
|
56
|
+
> nav {
|
|
57
|
+
box-sizing: border-box;
|
|
58
|
+
height: 100%;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use "../variables" as *;
|
|
2
|
+
@use "shared-selector-map" as *;
|
|
3
|
+
|
|
4
|
+
@mixin styles {
|
|
5
|
+
#{$bro-shadow} {
|
|
6
|
+
padding-right: var(--bro-shadow-size);
|
|
7
|
+
padding-left: var(--bro-shadow-size);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
#{$bro-table-shadows} {
|
|
11
|
+
z-index: $bro-shadow-z-index;
|
|
12
|
+
|
|
13
|
+
width: calc(100% - var(--bro-shadow-size) * 2);
|
|
14
|
+
|
|
15
|
+
.bro-row {
|
|
16
|
+
height: var(--bro-row-height);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
@use "../variables" as *;
|
|
3
|
+
@use "shared-selector-map" as *;
|
|
4
|
+
|
|
5
|
+
@mixin styles {
|
|
6
|
+
$bro-state-icon-rotate-offset: math.ceil(math.sqrt(2) * $bro-state-icon-size) - $bro-state-icon-size;
|
|
7
|
+
|
|
8
|
+
#{$bro-state-container} {
|
|
9
|
+
padding-right: $bro-state-icon-rotate-offset;
|
|
10
|
+
padding-left: $bro-state-icon-rotate-offset;
|
|
11
|
+
|
|
12
|
+
font-size: $bro-state-message-font-size;
|
|
13
|
+
line-height: $bro-state-line-height;
|
|
14
|
+
|
|
15
|
+
.bro-state-icon {
|
|
16
|
+
top: $bro-state-line-height;
|
|
17
|
+
|
|
18
|
+
width: $bro-state-icon-size;
|
|
19
|
+
height: $bro-state-icon-size;
|
|
20
|
+
|
|
21
|
+
margin-right: $bro-state-icon-margin-right;
|
|
22
|
+
|
|
23
|
+
font-size: $bro-state-icon-size;
|
|
24
|
+
line-height: $bro-state-line-height;
|
|
25
|
+
|
|
26
|
+
& > svg {
|
|
27
|
+
width: $bro-state-icon-size;
|
|
28
|
+
height: $bro-state-icon-size;
|
|
29
|
+
|
|
30
|
+
vertical-align: top;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
lottie-player {
|
|
35
|
+
height: $bro-state-icon-size * 3;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// The skin class is on the table element itself: table-bro#{&} is table-bro.nv and the like
|
|
2
|
+
// The visible table starts one shadow size into the element and keeps its width, so a full width leaves room
|
|
3
|
+
// for both shadows
|
|
4
|
+
|
|
5
|
+
@use "../variables" as *;
|
|
6
|
+
@use "shared-selector-map" as *;
|
|
7
|
+
@use "../mixins/toolbar" as *;
|
|
8
|
+
|
|
9
|
+
@mixin styles {
|
|
10
|
+
@at-root table-bro#{&} {
|
|
11
|
+
@if $bro-table-width == 100% {
|
|
12
|
+
width: calc(100% - var(--bro-shadow-size) * 2);
|
|
13
|
+
} @else {
|
|
14
|
+
width: $bro-table-width;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// A narrower table would wrap its paginator; a narrow screen is for the adaptive layout of the next versions
|
|
18
|
+
min-width: var(--bro-table-min-width);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@at-root table-bro#{&} table {
|
|
22
|
+
th.bro-header-cell,
|
|
23
|
+
td.bro-cell {
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
|
|
26
|
+
padding: 0 0 0 $bro-row-horizontal-padding;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// The last column keeps the same space at the right edge of the table, as Material gives it: a value at the right
|
|
30
|
+
// edge of its column does not touch the edge of the table
|
|
31
|
+
th.bro-header-cell:last-child,
|
|
32
|
+
td.bro-cell:last-child {
|
|
33
|
+
padding-right: $bro-row-horizontal-padding;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@include skin_table-header();
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
#{$bro-table-body_container} {
|
|
42
|
+
// The body runs on under the paginator by one shadow size, with the rows of the next page; the rounded bottom
|
|
43
|
+
// corners of the paginator would show them. Under the paginator the body ends above its corners, and beside it
|
|
44
|
+
// the shadow of the body keeps its size. An extension of the layout of the body that draws its own decorations of the
|
|
45
|
+
// rows hides the rows out of the window itself, so they stay whole
|
|
46
|
+
$cut: max(0px, var(--bro-shadow-size) + var(--bro-corner-radius) - #{$bro-paginator-height});
|
|
47
|
+
|
|
48
|
+
z-index: $bro-table-container-z-index;
|
|
49
|
+
top: calc(var(--bro-shadow-size) * -1);
|
|
50
|
+
|
|
51
|
+
clip-path: polygon(0 0, 100% 0, 100% 100%, calc(100% - var(--bro-shadow-size)) 100%, calc(100% - var(--bro-shadow-size)) calc(100% - #{$cut}), var(--bro-shadow-size) calc(100% - #{$cut}), var(--bro-shadow-size) 100%, 0 100%);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
#{$bro-table-body} {
|
|
55
|
+
z-index: $bro-table-container-z-index;
|
|
56
|
+
|
|
57
|
+
> .bro-table {
|
|
58
|
+
z-index: $bro-table-container-z-index;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
#{$bro-table-body},
|
|
63
|
+
#{$bro-table-shadows} {
|
|
64
|
+
padding-top: var(--bro-shadow-size);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
#{$bro-table-aux} {
|
|
68
|
+
top: var(--bro-shadow-size);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@use "../variables" as *;
|
|
2
|
+
@use "shared-selector-map" as *;
|
|
3
|
+
@use "../../../mixins/text-ellipsis" as *;
|
|
4
|
+
|
|
5
|
+
@mixin styles {
|
|
6
|
+
#{$bro-cell_text-ellipsis-container} {
|
|
7
|
+
line-height: 1.5;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// The width of the row counter column of the skin; the skin class is on the table element itself
|
|
11
|
+
@at-root table-bro#{&} {
|
|
12
|
+
@include bro-text-ellipsis-width('.bro-cell-number', $bro-cell-number-width);
|
|
13
|
+
}
|
|
14
|
+
}
|