@sumaris-net/ngx-components 2.7.3-rc2 → 2.7.3-rc21

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.
@@ -107,7 +107,7 @@
107
107
  }
108
108
 
109
109
  /* Add a start padding to content (but not the cell itself) (e.g. tables with odd/event style - like BatchGroupsTable) */
110
- &.mat-cell-content-start-padding {
110
+ &.mat-mdc-cell-content-start-padding {
111
111
 
112
112
  // Reset start padding here (only apply cell's content)
113
113
  padding-inline-start: 0;
@@ -156,6 +156,7 @@
156
156
  }
157
157
  }
158
158
 
159
+ .mat-mdc-cell-date,
159
160
  .mat-cell-date {
160
161
  min-width: 128px;
161
162
  max-width: 128px;
@@ -166,6 +167,7 @@
166
167
  }
167
168
  }
168
169
 
170
+ .mat-mdc-cell-date-time,
169
171
  .mat-cell-date-time {
170
172
  min-width: 145px;
171
173
  max-width: 180px;
@@ -190,9 +192,11 @@
190
192
  }
191
193
 
192
194
  .mat-mdc-cell.computed mat-form-field,
195
+ .mat-mdc-cell-computed,
193
196
  .mat-cell-computed,
194
197
  .mat-mdc-cell ion-text.computed,
195
198
  .mat-mdc-cell.calculated mat-form-field,
199
+ .mat-mdc-cell-calculated,
196
200
  .mat-cell-calculated {
197
201
  color: var(--ion-color-primary-tint);
198
202
  font-style: italic;
@@ -202,6 +206,7 @@
202
206
  .mat-mdc-row {
203
207
 
204
208
  // Disabled row
209
+ &.mat-mdc-row-disabled *,
205
210
  &.mat-row-disabled * {
206
211
  color: inherit;
207
212
  cursor: pointer;
@@ -209,25 +214,28 @@
209
214
  pointer-events: unset !important;
210
215
  }
211
216
 
217
+ &.mat-mdc-row-disabled:hover,
212
218
  &.mat-row-disabled:hover {
213
219
  background-color: var(--ion-color-light);
214
220
 
215
- .mat-cell {
221
+ .mat-mdc-cell {
216
222
  color: var(--ion-color-light-contrast);
217
223
  }
218
224
  }
219
225
 
226
+ &.mat-mdc-row-selected,
220
227
  &.mat-row-selected {
221
228
  background-color: var(--ion-color-secondary100);
222
229
 
223
- &:not(.mat-row-error):hover {
230
+ &:not(.mat-mdc-row-error):not(.mat-row-error):hover {
224
231
  background-color: var(--ion-color-secondary100);
225
232
  }
226
233
 
227
- .mat-cell {
234
+ .mat-mdc-cell {
228
235
  color: var(--ion-color-secondary100-contrast);
229
236
  }
230
237
 
238
+ &.mat-mdc-row-disabled:hover,
231
239
  &.mat-row-disabled:hover {
232
240
  background-color: var(--ion-color-secondary100-shade) !important;
233
241
  }
@@ -235,9 +243,8 @@
235
243
  }
236
244
 
237
245
  // Dirty row
246
+ &.mat-mdc-row-dirty,
238
247
  &.mat-row-dirty {
239
- //border-left: 3px solid var(--ion-color-primary-tint);
240
-
241
248
  // Resize the dirty icon (in the 'actions' column)
242
249
  .mat-column-actions mat-icon.dirty-icon,
243
250
  .mat-column-actions ion-icon.dirty-icon {
@@ -246,10 +253,12 @@
246
253
  }
247
254
 
248
255
  // Error row
256
+ &.mat-mdc-row-error,
249
257
  &.mat-row-error {
250
258
  //border-left: 3px solid var(--ion-color-danger-tint) !important;
251
259
  background-color: var(--ion-color-warning-tint);
252
260
 
261
+ &.mat-mdc-row-disabled:hover,
253
262
  &.mat-row-disabled:hover {
254
263
  background-color: var(--ion-color-warning-shade) !important;
255
264
  }
@@ -267,25 +276,19 @@
267
276
  }
268
277
  }
269
278
 
270
- //.mdc-line-ripple--deactivating {
271
- // display: none;
272
- //}
273
-
274
- mat-mdc-form-field,
275
279
  mat-autocomplete-field,
276
- app-form-field,
280
+ app-form-field {
281
+ width: 100%;
282
+ }
283
+
277
284
  .mat-mdc-form-field {
278
285
  width: 100%;
286
+ padding-top: 1px; // suppress a redundant line in table
279
287
  --mat-form-field-container-text-size: 14px;
280
288
  --mdc-filled-text-field-label-text-size: var(--mat-form-field-container-text-size);
289
+ --mat-select-trigger-text-size: var(--mat-form-field-container-text-size);
281
290
  --mat-mdc-form-field-height: calc(var(--mat-row-height) - 2px);
282
- // TODO
283
- // use -- active- boder : 0;
284
291
  height: var(--mat-mdc-form-field-height);
285
- }
286
-
287
- .mat-mdc-form-field {
288
- padding-top: 1px;
289
292
 
290
293
  .mat-mdc-form-field-label {
291
294
  width: 100%;
@@ -400,8 +403,6 @@
400
403
  }
401
404
 
402
405
  mat-error {
403
- //font-size: ;
404
- //--mdc-typography-caption-font-size: 10px;
405
406
  font-size: 10px;
406
407
  }
407
408
 
@@ -426,7 +427,7 @@
426
427
  padding-top: 0.4em;
427
428
  }
428
429
 
429
- .mat-cell > .ion-text-nowrap {
430
+ .mat-mdc-cell > .ion-text-nowrap {
430
431
  width: 100%;
431
432
  overflow: hidden;
432
433
  text-overflow: ellipsis;
@@ -434,17 +435,17 @@
434
435
  }
435
436
 
436
437
  /* Show when hover row */
437
- .mat-cell .visible-hover-row {
438
+ .mat-mdc-cell .visible-hover-row {
438
439
  visibility: hidden;
439
440
  }
440
441
 
441
442
  &:hover {
442
- .mat-cell .visible-hover-row {
443
+ .mat-mdc-cell .visible-hover-row {
443
444
  visibility: visible;
444
445
  }
445
446
  }
446
447
 
447
- .mat-cell .avatar {
448
+ .mat-mdc-cell .avatar {
448
449
  color: #d9d9d9;
449
450
  background-color: #f8f8f8;
450
451
  border: solid 1px #d9d9d9;
@@ -458,103 +459,36 @@
458
459
 
459
460
  /* Special case to have small row */
460
461
  &.compact .mat-mdc-row,
462
+ .mat-mdc-row.mat-mdc-row-small,
461
463
  .mat-mdc-row.mat-row-small {
462
464
  min-height: inherit;
463
465
  --mat-row-height: 33px;
464
466
  --mat-row-max-height: 33px;
465
467
  }
466
468
 
467
- .mat-mdc-row.mat-row-small .mat-cell,
468
- .mat-mdc-row .mat-cell.mat-row-small {
469
+ .mat-mdc-row.mat-mdc-row-small .mat-mdc-cell,
470
+ .mat-mdc-row .mat-mdc-cell.mat-mdc-row-small,
471
+ .mat-mdc-row.mat-row-small .mat-mdc-cell,
472
+ .mat-mdc-row .mat-mdc-cell.mat-row-small {
469
473
  line-height: 15px;
470
474
  @include font-size(12px);
471
475
  }
472
476
 
473
- .mat-row-height-auto { // todo useful ?
477
+ .mat-mdc-row-height-auto,
478
+ .mat-row-height-auto {
474
479
  max-height: unset !important;
475
480
  }
476
481
 
477
- // Make smaller row
478
- // NOTE : useless on angular 15
479
- //&.compact {
480
- // --mat-row-height: 33px;
481
- //
482
- // // TODO test it ! then remove is not need
483
- // .mat-mdc-row {
484
- //
485
- // ion-label {
486
- // display: inline-block;
487
- // margin-top: 5px;
488
- // width: 100%;
489
- // overflow: hidden;
490
- // white-space: nowrap;
491
- // text-overflow: ellipsis;
492
- // }
493
- //
494
- // .mat-badge-content {
495
- // top: -2px;
496
- // }
497
- //
498
- // .mat-icon-button {
499
- // height: 32px;
500
- // width: 32px;
501
- // line-height: 32px;
502
- // }
503
- //
504
- // .mat-mdc-form-field-underline {
505
- // bottom: 6px !important;
506
- // }
507
- //
508
- // .mat-mdc-form-field {
509
- //
510
- // .mat-mdc-form-field-wrapper {
511
- // max-height: 32px;
512
- //
513
- // .mat-mdc-form-field-flex {
514
- //
515
- // .mat-mdc-form-field-infix {
516
- // max-height: 32px;
517
- // padding-top: 0;
518
- // border-top-width: 10px;
519
- //
520
- // .mat-mdc-form-field-label-wrapper {
521
- //
522
- // .mat-mdc-form-field-label {
523
- // top: 12px;
524
- // }
525
- // }
526
- //
527
- // .mat-checkbox {
528
- // display: block;
529
- // position: absolute;
530
- // top: -2px;
531
- //
532
- // .mat-checkbox-ripple {
533
- // height: 32px;
534
- // width: 32px;
535
- // left: calc(50% - 16px);
536
- // top: calc(50% - 16px);
537
- // }
538
- // }
539
- // }
540
- // }
541
- //
542
- // // make click on mat-error transfer to input
543
- // //.mat-mdc-form-field-subscript-wrapper {
544
- // // pointer-events: none;
545
- // //}
546
- //
547
- // mat-error {
548
- // margin-top: 10px;
549
- // }
550
- // }
551
- // }
552
- // }
553
- //}
482
+ // Restore border on last row
483
+ .mdc-data-table__row:last-child .mat-mdc-cell {
484
+ border-bottom-color: var(--mat-table-row-item-outline-color, rgba(0, 0, 0, 0.12)) !important;
485
+ border-bottom-width: var(--mat-table-row-item-outline-width, 1px) !important;
486
+ border-bottom-style: solid !important;
487
+ }
554
488
  }
555
489
 
556
490
  .mat-mdc-paginator {
557
- --mat-paginator-container-size: #{$app-paginator-height};
491
+ --mat-paginator-container-size: var(--app-paginator-height, #{$app-paginator-height});
558
492
  --mat-paginator-container-background-color: whitesmoke;
559
493
  overflow-y: hidden;
560
494
 
@@ -1,8 +1,9 @@
1
1
  // --------------------------------------------------
2
- // Material tab group
2
+ // Material tab group/link
3
3
  // --------------------------------------------------
4
+
4
5
  // -- Keep Angular 14 tab style
5
- .mat-mdc-tab-label-container {
6
+ .mat-mdc-tab-label-container, .mat-mdc-tab-link-container {
6
7
  --mat-tab-header-divider-color: rgba(0,0,0,.12) !important;
7
8
  --mat-tab-header-divider-height: 1px !important;
8
9
  }
@@ -34,328 +35,3 @@
34
35
  .mat-mdc-tab-group.mat-mdc-tab-disabled-visible .mat-mdc-tab-disabled {
35
36
  display: inherit;
36
37
  }
37
-
38
- // --------------------------------------------------
39
- // Material menu
40
- // --------------------------------------------------
41
-
42
-
43
- .mat-menu-panel {
44
-
45
- // Max width = 400px
46
- &.mat-menu-size-400 {
47
- min-width: unset;
48
- width: 400px;
49
- max-width: calc(90vw);
50
- }
51
- // Max width = 75vw
52
- &.mat-menu-size-75vw {
53
- min-width: unset;
54
- width: calc(75vw);
55
- max-width: calc(90vw);
56
- }
57
-
58
- // No padding
59
- &.ion-no-padding {
60
- .mat-menu-content {
61
- padding: 0 !important;
62
- }
63
- }
64
-
65
- // Small menu item (e.g. for actions on a table row)
66
- &.mat-menu-small-item-height .mat-menu-item,
67
- .mat-menu-item.mat-menu-item-small-height
68
- {
69
- padding: 0 8px;
70
- height: 35px;
71
- line-height: 35px;
72
- }
73
- // Reduce the font size, on label just inside a mat-menu (e.g. see trips.page.html)
74
- .mat-menu-content > ion-label {
75
- @include font-size(12px);
76
- }
77
-
78
- .mat-menu-content ion-item > ion-icon[slot="start"] {
79
- margin-right: 16px;
80
- vertical-align: middle;
81
- }
82
-
83
- // Menu title (e.g. see extraction map)
84
- .mat-menu-item.mat-menu-title {
85
- padding: 0 8px;
86
- height: 27px;
87
- line-height: 27px;
88
- @include font-size(12px);
89
- pointer-events: none;
90
- color: var(--ion-color-medium, rgba(0, 0, 0, 0.38));
91
- }
92
- }
93
-
94
- // --------------------------------------------------
95
- // Alert
96
- // --------------------------------------------------
97
-
98
- ion-alert button.alert-button {
99
- cursor: pointer;
100
- }
101
-
102
- // --------------------------------------------------
103
- // Date and time picker
104
- // --------------------------------------------------
105
-
106
- mat-calendar {
107
- .mat-calendar-header {
108
- background-color: var(--ion-color-secondary) !important;
109
- color: var(--ion-color-secondary-contrast) !important;
110
-
111
- button {
112
- color: var(--ion-color-secondary-contrast) !important;
113
- }
114
- }
115
-
116
- .mat-calendar-body-selected {
117
- background-color: var(--ion-color-accent) !important;
118
- color: var(--ion-color-accent-contrast) !important;
119
- font-weight: bold;
120
- }
121
-
122
- .mat-calendar-arrow {
123
- border-top-color: var(--ion-color-secondary-contrast) !important;
124
- }
125
- }
126
-
127
-
128
- .timepicker-backdrop-overlay {
129
- background-color: rgba(0, 0, 0, 0.32);
130
- z-index: 1000;
131
- opacity: 1;
132
- -webkit-tap-highlight-color: transparent;
133
- transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);
134
- }
135
-
136
- ngx-material-timepicker-content {
137
- --clock-hand-color: var(--ion-color-accent) !important;
138
- --clock-face-time-active-color: var(--ion-color-accent-contrast) !important;
139
- // TODO review !
140
- //@extend .mat-dialog-container !optional;
141
-
142
- .timepicker {
143
- box-shadow: unset !important;
144
- border-radius: 4px;
145
-
146
- header {
147
- --dial-background-color: var(--ion-color-secondary) !important;
148
- color: var(--ion-color-secondary-contrast) !important;
149
- }
150
- }
151
-
152
- ngx-material-timepicker-dial-control {
153
- outline-color: var(--ion-color-accent) !important;
154
- input {
155
- outline-color: inherit !important;
156
- }
157
- }
158
- }
159
-
160
- .mat-mdc-form-field-type-mat-chip-grid {
161
- .mat-mdc-form-field-infix {
162
- padding-bottom: 5px !important;
163
- --mdc-chip-container-height: 24px !important;
164
- }
165
- }
166
-
167
-
168
- // --------------------------------------------------
169
- // Pages
170
- // --------------------------------------------------
171
- ion-item {
172
- ion-label.error {
173
- line-height: 16px;
174
- line-break: normal;
175
- overflow: visible;
176
- white-space: normal;
177
- }
178
- }
179
-
180
- // --------------------------------------------------
181
- // Modal
182
- // --------------------------------------------------
183
-
184
- ion-modal.stack-modal {
185
- --box-shadow: 0 28px 48px rgba(0, 0, 0, 0.4);
186
- --backdrop-opacity: var(--ion-backdrop-opacity, 0.32);
187
- }
188
-
189
- ion-modal.modal-large{
190
- --min-height: calc(100% - 50px) !important;
191
- --min-width: calc(100% - 100px) !important;
192
- }
193
- ion-modal.modal-fullscreen {
194
- --min-height: calc(100%) !important;
195
- --min-width: calc(100%) !important;
196
- }
197
-
198
-
199
- // --------------------------------------------------
200
- // Popover
201
- // --------------------------------------------------
202
-
203
- .popover-large {
204
- --min-width: calc(min(500px, 80%));
205
- }
206
-
207
- .popover-notifications {
208
- --popover-top: 0;
209
- --max-height: calc(90vh - 40px /* header + footer height */ - var(--popover-top, 0px) - var(--offset-y, 0px));
210
-
211
- ion-item {
212
- --ion-item-background-color-hover: var(--ion-color-light);
213
- &.unread {
214
- --ion-item-background: rgba(var(--ion-color-secondary100-rgb), 0.2);
215
- --ion-item-background-color-hover: rgba(var(--ion-color-secondary100-rgb), 0.3);
216
- }
217
- }
218
- }
219
-
220
- // --------------------------------------------------
221
- // Large button with icon floating on right
222
- // --------------------------------------------------
223
- .flex-margin ion-icon,
224
- .flex-margin span {
225
- margin-left: auto;
226
- }
227
-
228
- // --------------------------------------------------
229
- // Icon tooltip, and title
230
- // --------------------------------------------------
231
- // Fix Button icon name overrides button's own title on mouse over
232
- /*ion-icon[name='chatbox'] {
233
- pointer-events: none !important;
234
- }*/
235
- .mat-cell {
236
- /* smaller size, for the comment icon */
237
- mat-icon.comment {
238
- @include font-size(16pt);
239
- height: 100%;
240
- vertical-align: center;
241
- color: var(--ion-color-tertiary, grey);
242
-
243
- &.disabled {
244
- color: var(--ion-color-medium, grey);
245
- }
246
- }
247
- }
248
-
249
- // --------------------------------------------------
250
- // Icon inside text
251
- // --------------------------------------------------
252
- mat-icon,
253
- ion-icon {
254
- &.text-size {
255
- font-size: 1em;
256
- width: 1em;
257
- height: 1em;
258
- }
259
- }
260
- ion-button[expand="block"],
261
- ion-button[expand="full"],
262
- .mat-button,
263
- .mat-raised-button {
264
- mat-icon,
265
- ion-icon {
266
- &[slot] {
267
- pointer-events: none;
268
- width: 24px;
269
- height: 24px;
270
- }
271
- &[slot='start'],
272
- &[slot='end'] {
273
- margin-left: unset;
274
- margin-right: unset;
275
- margin-top: 0;
276
- margin-bottom: 0;
277
- }
278
- &t[slot='start'] {
279
- margin-inline-start: -0.3em;
280
- margin-inline-end: 0.3em;
281
- }
282
- &[slot='end'] {
283
- margin-inline-start: 0.3em;
284
- margin-inline-end: -0.3em;
285
- }
286
- &.ion-float-start[slot='start'] {
287
- position: absolute;
288
- left: 0;
289
- }
290
- &.ion-float-end[slot='end'] {
291
- position: absolute;
292
- right: 0;
293
- }
294
- }
295
- }
296
-
297
- // --------------------------------------------------
298
- // Icon multiple
299
- // --------------------------------------------------
300
- ion-icon.icon-secondary,
301
- mat-icon.icon-secondary {
302
- position: absolute;
303
- left: 0;
304
- }
305
-
306
- // --------------------------------------------------
307
- // Toast
308
- // --------------------------------------------------
309
- ion-toast {
310
- --background: var(--ion-color-dark);
311
- --color: var(--ion-color-dark-contrast);
312
- --button-color: var(--ion-color-secondary);
313
-
314
- &.secondary {
315
- --background: var(--ion-color-secondary);
316
- --color: var(--ion-color-secondary-contrast);
317
- --button-color: var(--ion-color-tertiary);
318
- }
319
- &.accent {
320
- --background: var(--ion-color-accent);
321
- --color: var(--ion-color-accent-contrast);
322
- --button-color: var(--ion-color-primary);
323
- }
324
- &.danger {
325
- --background: var(--ion-color-danger);
326
- --color: var(--ion-color-danger-contrast);
327
- --button-color: var(--ion-color-primary);
328
- }
329
-
330
- /* -- workaround because toast animation failed */
331
- --toast-max-height: 75px;
332
-
333
- &.toast-stack-offset-1 {
334
- --toast-stack-offset: 1;
335
- }
336
- &.toast-stack-offset-2 {
337
- --toast-stack-offset: 2;
338
- }
339
- &.toast-stack-offset-3 {
340
- --toast-stack-offset: 3;
341
- }
342
- &.toast-stack-offset-4 {
343
- --toast-stack-offset: 4;
344
- }
345
-
346
- &.toast-stacked-top {
347
- --toast-top: calc(var(--toast-stack-offset, 0) * var(--toast-max-height, 0));
348
- transform: translateY(var(--toast-top));
349
- }
350
- &.toast-stacked-bottom {
351
- --toast-bottom: calc(-1 * var(--toast-stack-offset, 0) * var(--toast-max-height, 0)) !important;
352
- transform: translateY(var(--toast-bottom));
353
- }
354
- }
355
-
356
- // --------------------------------------------------
357
- // Refresher
358
- // --------------------------------------------------
359
- ion-refresher.refresher-native {
360
- z-index: 1000;
361
- }