@table-bro/angular-material 0.0.0-stage → 1.1.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.
Files changed (38) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +174 -2
  3. package/THIRD_PARTY_NOTICES.md +69 -0
  4. package/dist/table-bro.material.min.css +1 -0
  5. package/fesm2022/table-bro-angular-material.mjs +2050 -0
  6. package/fesm2022/table-bro-angular-material.mjs.map +1 -0
  7. package/package.json +49 -3
  8. package/styles/_table-bro.api.scss +3 -0
  9. package/styles/_table-bro.material.api.scss +5 -0
  10. package/styles/mixins/_text-ellipsis.scss +5 -0
  11. package/styles/skin/angular-material/_themes.scss +29 -0
  12. package/styles/skin/angular-material/_variables.scss +81 -0
  13. package/styles/skin/angular-material/components/_shadows.scss +7 -0
  14. package/styles/skin/angular-material/table-bro/_filter-drawer.scss +111 -0
  15. package/styles/skin/angular-material/table-bro/_paginator.scss +12 -0
  16. package/styles/skin/angular-material/table-bro/_progress-bar.scss +7 -0
  17. package/styles/skin/angular-material/table-bro/_slide-toggle.scss +5 -0
  18. package/styles/skin/angular-material/table-bro/_sort-header.scss +12 -0
  19. package/styles/skin/angular-material/table-bro/_table.scss +68 -0
  20. package/styles/skin/angular-material/table-bro/_text-ellipsis.scss +8 -0
  21. package/styles/skin/angular-material/table-bro/_toolbar-search.scss +27 -0
  22. package/styles/skin/angular-material/table-bro/_toolbar.scss +14 -0
  23. package/styles/skin/shared/_variables.scss +94 -0
  24. package/styles/skin/shared/mixins/_custom-properties.scss +39 -0
  25. package/styles/skin/shared/mixins/_progress-bar.scss +27 -0
  26. package/styles/skin/shared/mixins/_shared.scss +87 -0
  27. package/styles/skin/shared/mixins/_skin-colors.scss +64 -0
  28. package/styles/skin/shared/mixins/_slide-toggle.scss +5 -0
  29. package/styles/skin/shared/mixins/_sort-header.scss +11 -0
  30. package/styles/skin/shared/mixins/_toolbar.scss +61 -0
  31. package/styles/skin/shared/table-bro/_details.scss +11 -0
  32. package/styles/skin/shared/table-bro/_filter-drawer.scss +62 -0
  33. package/styles/skin/shared/table-bro/_shadows.scss +19 -0
  34. package/styles/skin/shared/table-bro/_state.scss +38 -0
  35. package/styles/skin/shared/table-bro/_table.scss +70 -0
  36. package/styles/skin/shared/table-bro/_text-ellipsis.scss +14 -0
  37. package/styles/table-bro.material.scss +74 -0
  38. package/types/table-bro-angular-material.d.ts +482 -0
@@ -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,87 @@
1
+ @use "../variables" as *;
2
+
3
+ // The same mixin is in components/material-based/_table.scss of the core: the core and the skins are separate packages,
4
+ // which share no Sass module but the maps of the selectors
5
+ @mixin table-width-transition() {
6
+ // --bro-duration-scale is 0 under prefers-reduced-motion: reduce
7
+ transition: width calc(var(--bro-column-width-duration) * var(--bro-duration-scale)) ease;
8
+ }
9
+
10
+ // The items of a component cell, such as tags, keep to one line, so the row keeps its height. The component calls
11
+ // fitCellItems() of the core: the items that do not fit whole give way to an ellipsis after the items that show.
12
+ // The first item always shows and shrinks with its own ellipsis in a narrow cell.
13
+ // @param $row - the element that holds the items in its line
14
+ // @param $item - an item
15
+ // @param $text - the text inside an item; without it the item holds its text itself
16
+ @mixin bro-cell-items($row, $item, $text: null) {
17
+ #{$row} {
18
+ display: flex;
19
+ overflow: hidden;
20
+
21
+ box-sizing: border-box;
22
+ width: 100%;
23
+ min-width: 0;
24
+
25
+ flex-wrap: nowrap;
26
+ align-items: center;
27
+
28
+ > #{$item} {
29
+ flex: none;
30
+ }
31
+
32
+ > #{$item}:first-child {
33
+ min-width: 0;
34
+
35
+ flex-shrink: 1;
36
+
37
+ // The boxes inside the item shrink with it down to its text
38
+ * {
39
+ min-width: 0;
40
+ }
41
+
42
+ @if $text {
43
+ #{$text} {
44
+ overflow: hidden;
45
+
46
+ text-overflow: ellipsis;
47
+ }
48
+ } @else {
49
+ overflow: hidden;
50
+
51
+ text-overflow: ellipsis;
52
+ }
53
+ }
54
+
55
+ > .bro-cell-items-ellipsis {
56
+ flex: none;
57
+ }
58
+
59
+ // An item that does not fit the line: hidden from the eye, not from screen readers (fitCellItems)
60
+ > .bro-cell-item-hidden {
61
+ position: absolute;
62
+
63
+ overflow: hidden;
64
+
65
+ width: 1px;
66
+ height: 1px;
67
+
68
+ white-space: nowrap;
69
+
70
+ clip-path: inset(50%);
71
+ }
72
+ }
73
+ }
74
+
75
+ // A container of the table on the page lines the table up with its content: the table moves left by its shadow size,
76
+ // so its visible part starts at the content and its shadows fall into the margins around it. The table knows its skin,
77
+ // so the rule needs no skin class around the container. A full width table takes the full width of the container,
78
+ // its shadows falling into the margins.
79
+ @mixin bro-table-shadow-container() {
80
+ @at-root .bro-table-shadow-container > table-bro#{&} {
81
+ margin-left: calc(var(--bro-shadow-size) * -1);
82
+
83
+ @if $bro-table-width == 100% {
84
+ width: 100%;
85
+ }
86
+ }
87
+ }
@@ -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,5 @@
1
+ @mixin slide-toggle($slide-toggle-selector: 'bro-mat-slide-toggle') {
2
+ #{$slide-toggle-selector} {
3
+ overflow: visible;
4
+ }
5
+ }
@@ -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,11 @@
1
+ @use "shared-selector-map" as *;
2
+
3
+ @mixin styles {
4
+ #{$bro-details_tr} {
5
+ > td > :first-child > * {
6
+ > div {
7
+ padding: calc(var(--bro-row-height) / 2);
8
+ }
9
+ }
10
+ }
11
+ }
@@ -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
+ }
@@ -0,0 +1,74 @@
1
+ // The Angular Material skin: @use prints its CSS. The variables and mixins of the skin without the CSS: table-bro.material.api
2
+ @forward "./table-bro.material.api";
3
+ @use "./skin/angular-material/variables" as *;
4
+ @use "sass:meta";
5
+
6
+ /* Mixins */
7
+ @use "./skin/shared/mixins/custom-properties" as *;
8
+ @use "./skin/shared/mixins/shared" as *;
9
+
10
+ @use "./skin/shared/table-bro/details" as shared-details;
11
+ @use "./skin/shared/table-bro/filter-drawer" as shared-filter-drawer;
12
+ @use "./skin/shared/table-bro/shadows" as shared-shadows;
13
+ @use "./skin/shared/table-bro/state" as shared-state;
14
+ @use "./skin/shared/table-bro/table" as shared-table;
15
+ @use "./skin/shared/table-bro/text-ellipsis" as shared-text-ellipsis;
16
+ @use "./skin/angular-material/components/shadows" as mat-shadows;
17
+ @use "./skin/angular-material/table-bro/filter-drawer" as mat-filter-drawer;
18
+ @use "./skin/angular-material/table-bro/paginator" as mat-paginator;
19
+ @use "./skin/angular-material/table-bro/progress-bar" as mat-progress-bar;
20
+ @use "./skin/angular-material/table-bro/slide-toggle" as mat-slide-toggle;
21
+ @use "./skin/angular-material/table-bro/sort-header" as mat-sort-header;
22
+ @use "./skin/angular-material/table-bro/table" as mat-table;
23
+ @use "./skin/angular-material/table-bro/text-ellipsis" as mat-text-ellipsis;
24
+ @use "./skin/angular-material/table-bro/toolbar" as mat-toolbar;
25
+ @use "./skin/angular-material/table-bro/toolbar-search" as mat-toolbar-search;
26
+
27
+
28
+ /* Shared */
29
+ #{$bro-skin} {
30
+ @include shared-details.styles;
31
+ @include shared-filter-drawer.styles;
32
+ @include shared-shadows.styles;
33
+ @include shared-state.styles;
34
+ @include shared-table.styles;
35
+ @include shared-text-ellipsis.styles;
36
+
37
+ // The tags of the skin in a cell
38
+ @include bro-cell-items('bro-mat-tags .mdc-evolution-chip-set__chips', 'mat-chip', '.mdc-evolution-chip__text-label');
39
+ }
40
+
41
+
42
+ /* Angular Material components */
43
+ #{$bro-skin} {
44
+ @include mat-shadows.styles;
45
+ }
46
+
47
+ /* Angular Material extensions */
48
+ // No Angular Material extensions yet
49
+
50
+
51
+ /* Table-bro extensions */
52
+ #{$bro-skin} {
53
+ @include mat-filter-drawer.styles;
54
+ @include mat-paginator.styles;
55
+ @include mat-progress-bar.styles;
56
+ @include mat-slide-toggle.styles;
57
+ @include mat-sort-header.styles;
58
+ @include mat-table.styles;
59
+ @include mat-text-ellipsis.styles;
60
+ @include mat-toolbar.styles;
61
+ @include mat-toolbar-search.styles;
62
+ }
63
+ @include meta.load-css("./skin/angular-material/themes");
64
+
65
+
66
+ #{$bro-skin} {
67
+ @include bro-table-shadow-container();
68
+ }
69
+
70
+
71
+ /* The sizes and timings for the table script; :where() lets a plain table-bro selector override them */
72
+ :where(#{$bro-skin}) {
73
+ @include bro-skin-custom-properties();
74
+ }