@elderbyte/ngx-starter 19.1.0-beta.26 → 19.1.0-beta.28

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.
@@ -60,6 +60,7 @@ export declare class ElderTableComponent extends ElderDataViewBaseComponent impl
60
60
  pageSizeOptions: number[];
61
61
  keepSelection: boolean;
62
62
  showFooter: boolean;
63
+ denseHorizontal: boolean;
63
64
  canLoadMore$: Observable<boolean>;
64
65
  total$: Observable<string>;
65
66
  /**
@@ -126,5 +127,5 @@ export declare class ElderTableComponent extends ElderDataViewBaseComponent impl
126
127
  **************************************************************************/
127
128
  private setupSelectionLifeCycle;
128
129
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderTableComponent, [null, { optional: true; }, { optional: true; skipSelf: true; }, { optional: true; }, { optional: true; skipSelf: true; }, null, null]>;
129
- static ɵcmp: i0.ɵɵComponentDeclaration<ElderTableComponent, "elder-table", never, { "idField": { "alias": "idField"; "required": false; }; "removingField": { "alias": "removingField"; "required": false; }; "hiddenField": { "alias": "hiddenField"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "keepSelection": { "alias": "keepSelection"; "required": false; }; "showFooter": { "alias": "showFooter"; "required": false; }; "toolbarTemplate": { "alias": "toolbarTemplate"; "required": false; }; "data": { "alias": "data"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "selectionVisible": { "alias": "selectionVisible"; "required": false; }; }, {}, ["columnDefs", "elderColumns", "rowDefs", "toolbarRowTemplateQuery"], never, true, never>;
130
+ static ɵcmp: i0.ɵɵComponentDeclaration<ElderTableComponent, "elder-table", never, { "idField": { "alias": "idField"; "required": false; }; "removingField": { "alias": "removingField"; "required": false; }; "hiddenField": { "alias": "hiddenField"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "keepSelection": { "alias": "keepSelection"; "required": false; }; "showFooter": { "alias": "showFooter"; "required": false; }; "denseHorizontal": { "alias": "denseHorizontal"; "required": false; }; "toolbarTemplate": { "alias": "toolbarTemplate"; "required": false; }; "data": { "alias": "data"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "selectionVisible": { "alias": "selectionVisible"; "required": false; }; }, {}, ["columnDefs", "elderColumns", "rowDefs", "toolbarRowTemplateQuery"], never, true, never>;
130
131
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elderbyte/ngx-starter",
3
- "version": "19.1.0-beta.26",
3
+ "version": "19.1.0-beta.28",
4
4
  "peerDependencies": {
5
5
  "@angular/core": "^18.0.0 || ^19.0.0",
6
6
  "@angular/common": "^18.0.0 || ^19.0.0",
@@ -1,201 +1,6 @@
1
1
  :host {
2
- /** https://bugzilla.mozilla.org/show_bug.cgi?id=1043520 **/
3
- // firefox-scroll-fix
4
- min-width: 0;
5
- min-height: 0;
6
- }
7
-
8
- .elder-mat-inner-table {
9
- width: 100%;
10
- }
11
-
12
- .elder-table-row.dense {
13
- height: 42px !important;
14
- }
15
-
16
- .elder-mat-table-container {
17
- border-radius: var(--elder-border-radius-sm);
18
- overflow: hidden;
19
- }
20
-
21
- /**
22
- * Style for the select column
23
- */
24
- .mat-column-select {
25
- overflow: initial;
26
- min-width: 72px;
27
- max-width: 5%;
28
- width: 72px;
29
- }
30
-
31
- .elder-row-removing {
32
- text-decoration: line-through;
33
- }
34
-
35
- .elder-row-hidden {
36
- display: none;
37
- }
38
-
39
- /******************************
40
- Clickable row
41
- *******************************/
42
-
43
- .elder-table-row {
44
- cursor: pointer;
45
- }
46
-
47
- .elder-table-hint {
48
- color: gray;
49
- }
50
-
51
- .elder-table-footer {
52
- height: var(--elder-data-element-footer-height);
53
- }
54
-
55
- .elder-table-checkbox {
56
- opacity: 0.25;
57
- transition: opacity 0.5s ease-in-out;
58
- }
59
-
60
- .elder-table-row:hover .elder-table-checkbox {
61
- opacity: 0.9;
62
- }
63
-
64
- .elder-table-checkbox-visible {
65
- opacity: 1;
66
- }
67
-
68
- .elder-table-inner {
69
- background-color: var(--md-sys-color-surface-container-lowest);
70
- }
71
-
72
- .elder-table-row:focus {
73
- // Disable browser focus style
74
- box-shadow: none;
75
- outline-style: none;
76
- td {
77
- background-color: var(--elder-color-highlight-strong);
78
- border-bottom: var(--md-sys-color-tertiary-fixed);
79
- }
80
- }
81
- .elder-table-row.elder-table-row-activated {
82
- background-color: var(--elder-color-highlight-strong);
83
- }
84
-
85
- .elder-table-row.elder-table-row-selected {
86
- background-color: var(--elder-color-highlight-variant);
87
- }
88
-
89
- .elder-table-row:hover {
90
- background-color: var(--elder-color-highlight-light);
91
- cursor: pointer;
92
- }
93
-
94
- .elder-mat-table-flat {
95
- border: var(--elder-border-light);
96
- }
97
-
98
- .elder-table {
99
- background-color: var(--mat-table-background-color);
100
-
101
- // Fix line height of paginator section
102
- .mat-mdc-paginator {
103
- .mat-mdc-form-field,
104
- .mat-mdc-floating-label {
105
- line-height: unset;
106
- }
107
-
108
- .mat-mdc-select {
109
- line-height: unset;
110
- }
111
- }
112
-
113
- $pad: 8px;
114
- $pad-right: 12px;
115
-
116
- .elder-mat-inner-table.mat-mdc-table {
117
- .mat-mdc-header-cell {
118
- padding-left: $pad;
119
- padding-right: $pad-right;
120
-
121
- // configure automatic wrapping of too long strings
122
- overflow-wrap: normal;
123
- word-wrap: normal;
124
- word-break: normal;
125
- white-space: unset;
126
- hyphens: auto;
127
-
128
- &:first-of-type {
129
- padding-left: $pad + $pad-right;
130
- }
131
-
132
- &:last-of-type {
133
- padding-right: $pad; // TODO: This can lead to overflows in some cases, is there a better solution?
134
-
135
- &[mat-sort-header]:not([arrowposition='before']) {
136
- padding-right: $pad;
137
- }
138
- }
139
-
140
- &[mat-sort-header] {
141
- &[arrowposition='before'] {
142
- padding-left: 0px;
143
- }
144
-
145
- &:not([arrowposition='before']) {
146
- padding-right: $pad-right;
147
- }
148
- }
149
-
150
- & > .mat-sort-header-container {
151
- display: inline-flex;
152
- }
153
- }
154
-
155
- .mat-mdc-cell {
156
- padding-left: $pad;
157
- padding-right: $pad-right;
158
-
159
- overflow-wrap: normal;
160
- word-wrap: normal;
161
- word-break: normal;
162
- white-space: unset;
163
- hyphens: auto;
164
-
165
- &:first-of-type {
166
- padding-left: $pad + $pad-right;
167
- }
168
-
169
- &:last-of-type {
170
- padding-right: $pad;
171
- }
172
- }
173
-
174
- .mat-mdc-footer-cell {
175
- padding-left: $pad;
176
- padding-right: $pad-right;
177
- font-weight: bold;
178
-
179
- &:first-of-type {
180
- padding-left: $pad + $pad-right;
181
- }
182
-
183
- &:last-of-type {
184
- padding-right: $pad;
185
- }
186
-
187
- .mat-mdc-paginator {
188
- margin-left: -$pad;
189
- margin-right: -$pad;
190
- }
191
- }
192
- }
193
- }
194
-
195
- .mat-mdc-row {
196
- background-color: var(--md-sys-color-surface-container-lowest);
197
- }
198
-
199
- .mat-mdc-header-row {
200
- background: var(--md-sys-color-surface-container-lowest) !important;
2
+ /** https://bugzilla.mozilla.org/show_bug.cgi?id=1043520 **/
3
+ // firefox-scroll-fix
4
+ min-width: 0;
5
+ min-height: 0;
201
6
  }
@@ -91,7 +91,7 @@
91
91
  --elder-color-highlight-strong: hsl(214, 18%, 85%);
92
92
  --elder-color-highlight-strong: var(--elder-gold-light);
93
93
  --elder-color-highlight-light: #ebebeb;
94
- --elder-color-highlight-variant: var(--md-sys-color-primary-container);
94
+ --elder-color-highlight-variant: var(--elder-gold-semi-dark);
95
95
 
96
96
  // missing md3 color
97
97
  --md-sys-color-on-primary-fixed-dim: var(--md-sys-color-on-surface);
@@ -15,6 +15,7 @@
15
15
  @use '../components/elder-chip-theme' as elder-chip;
16
16
  @use '../components/elder-select-theme' as elder-select;
17
17
  @use '../components/elder-toolbar-theme' as elder-toolbar;
18
+ @use '../components/elder-table-theme' as elder-table;
18
19
 
19
20
  // Create a theme.
20
21
  @mixin starter-theme($theme) {
@@ -44,4 +45,6 @@
44
45
  @include elder-chip.theme($theme);
45
46
  @include elder-select.theme($theme);
46
47
  @include elder-toolbar.theme($theme);
48
+ @include elder-toolbar.theme($theme);
49
+ @include elder-table.theme($theme);
47
50
  }
@@ -0,0 +1,209 @@
1
+ @mixin theme($config-or-theme) {
2
+ elder-table {
3
+ .elder-mat-inner-table {
4
+ width: 100%;
5
+ }
6
+
7
+ .elder-table-row.dense {
8
+ height: 42px !important;
9
+ }
10
+
11
+ .elder-mat-table-container {
12
+ border-radius: var(--elder-border-radius-sm);
13
+ overflow: hidden;
14
+ }
15
+
16
+ /**
17
+ * Style for the select column
18
+ */
19
+ .mat-column-select {
20
+ overflow: initial;
21
+ min-width: 72px;
22
+ max-width: 5%;
23
+ width: 72px;
24
+ }
25
+
26
+ .elder-row-removing {
27
+ text-decoration: line-through;
28
+ }
29
+
30
+ .elder-row-hidden {
31
+ display: none;
32
+ }
33
+
34
+ /******************************
35
+ Clickable row
36
+ *******************************/
37
+
38
+ .elder-table-row {
39
+ cursor: pointer;
40
+ }
41
+
42
+ .elder-table-hint {
43
+ color: gray;
44
+ }
45
+
46
+ .elder-table-footer {
47
+ height: var(--elder-data-element-footer-height);
48
+ }
49
+
50
+ .elder-table-checkbox {
51
+ opacity: 0.25;
52
+ transition: opacity 0.5s ease-in-out;
53
+ }
54
+
55
+ .elder-table-row:hover .elder-table-checkbox {
56
+ opacity: 0.9;
57
+ }
58
+
59
+ .elder-table-checkbox-visible {
60
+ opacity: 1;
61
+ }
62
+
63
+ .elder-table-inner {
64
+ background-color: var(--md-sys-color-surface-container-lowest);
65
+ }
66
+
67
+ .elder-table-row:focus {
68
+ // Disable browser focus style
69
+ box-shadow: none;
70
+ outline-style: none;
71
+ td {
72
+ background-color: var(--elder-color-highlight-strong);
73
+ border-bottom: var(--md-sys-color-tertiary-fixed);
74
+ }
75
+ }
76
+ .elder-table-row.elder-table-row-activated {
77
+ background-color: var(--elder-color-highlight-strong);
78
+ }
79
+
80
+ .elder-table-row.elder-table-row-selected {
81
+ background-color: var(--elder-color-highlight-variant);
82
+ }
83
+
84
+ .elder-table-row:hover {
85
+ background-color: var(--elder-color-highlight-light);
86
+ cursor: pointer;
87
+ }
88
+
89
+ .elder-mat-table-flat {
90
+ border: var(--elder-border-light);
91
+ }
92
+
93
+ .elder-table {
94
+ background-color: var(--mat-table-background-color);
95
+
96
+ // Fix line height of paginator section
97
+ // Fix line height of paginator section
98
+ .mat-mdc-paginator {
99
+ .mat-mdc-form-field,
100
+ .mat-mdc-floating-label {
101
+ line-height: unset;
102
+ }
103
+
104
+ .mat-mdc-select {
105
+ line-height: unset;
106
+ }
107
+ }
108
+
109
+ $pad: 8px;
110
+ $pad-right: 12px;
111
+
112
+ @include _inner-table($pad, $pad-right);
113
+ }
114
+
115
+ .mat-mdc-row {
116
+ background-color: var(--md-sys-color-surface-container-lowest);
117
+ }
118
+
119
+ .mat-mdc-header-row {
120
+ background: var(--md-sys-color-surface-container-lowest) !important;
121
+ }
122
+
123
+ .elder-table-dense-horizontal {
124
+ $pad: 8px;
125
+ $pad-right: 4px;
126
+ @include _inner-table($pad, $pad-right);
127
+ }
128
+ }
129
+ }
130
+
131
+ @mixin _inner-table($pad, $pad-right) {
132
+ .elder-mat-inner-table.mat-mdc-table {
133
+ .mat-mdc-header-cell {
134
+ padding-left: $pad;
135
+ padding-right: $pad-right;
136
+
137
+ // configure automatic wrapping of too long strings
138
+ overflow-wrap: normal;
139
+ word-wrap: normal;
140
+ word-break: normal;
141
+ white-space: unset;
142
+ hyphens: auto;
143
+
144
+ &:first-of-type {
145
+ padding-left: $pad + $pad-right;
146
+ }
147
+
148
+ &:last-of-type {
149
+ padding-right: $pad; // TODO: This can lead to overflows in some cases, is there a better solution?
150
+
151
+ &[mat-sort-header]:not([arrowposition='before']) {
152
+ padding-right: $pad;
153
+ }
154
+ }
155
+
156
+ &[mat-sort-header] {
157
+ &[arrowposition='before'] {
158
+ padding-left: 0px;
159
+ }
160
+
161
+ &:not([arrowposition='before']) {
162
+ padding-right: $pad-right;
163
+ }
164
+ }
165
+
166
+ & > .mat-sort-header-container {
167
+ display: inline-flex;
168
+ }
169
+ }
170
+
171
+ .mat-mdc-cell {
172
+ padding-left: $pad;
173
+ padding-right: $pad-right;
174
+
175
+ overflow-wrap: normal;
176
+ word-wrap: normal;
177
+ word-break: normal;
178
+ white-space: unset;
179
+ hyphens: auto;
180
+
181
+ &:first-of-type {
182
+ padding-left: $pad + $pad-right;
183
+ }
184
+
185
+ &:last-of-type {
186
+ padding-right: $pad;
187
+ }
188
+ }
189
+
190
+ .mat-mdc-footer-cell {
191
+ padding-left: $pad;
192
+ padding-right: $pad-right;
193
+ font-weight: bold;
194
+
195
+ &:first-of-type {
196
+ padding-left: $pad + $pad-right;
197
+ }
198
+
199
+ &:last-of-type {
200
+ padding-right: $pad;
201
+ }
202
+
203
+ .mat-mdc-paginator {
204
+ margin-left: -$pad;
205
+ margin-right: -$pad;
206
+ }
207
+ }
208
+ }
209
+ }