@sumaris-net/ngx-components 21.0.0-rc8 → 21.0.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.
@@ -2,7 +2,7 @@
2
2
  "name": "ngx-sumaris-components",
3
3
  "short_name": "ngx-sumaris-components",
4
4
  "manifest_version": 1,
5
- "version": "21.0.0-rc8",
5
+ "version": "21.0.0",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{
@@ -1,5 +1,5 @@
1
- //@use './ionic/ionic.functions.string';
2
- //@use './ionic/ionic.functions.color';
1
+ @forward './ionic/ionic.functions.string';
2
+ @forward './ionic/ionic.functions.color';
3
3
 
4
4
  @function calculateRem($size) {
5
5
  $remSize: $size / 16px;
@@ -3,7 +3,7 @@
3
3
  // --------------------------------------------------
4
4
  // Import material icons
5
5
  // --------------------------------------------------
6
- @use 'material-design-icons-iconfont/src/material-design-icons' with (
6
+ @forward 'material-design-icons-iconfont/src/material-design-icons' with (
7
7
  $material-design-icons-font-directory-path: '../dist/fonts/'
8
8
  );
9
9
 
@@ -4,16 +4,10 @@
4
4
  // values for --ion-color-*-tint/-shade/-rgb. With Sass modules, `@use ... as *` is NOT
5
5
  // transitive, so we must use/forward this module explicitly (the legacy @import made it global).
6
6
  @use 'ionic/ionic.functions.color' as *;
7
- @use 'ionic/ionic.globals' as *;
8
- @use 'ionic/ionic.theme.default' as *;
9
7
 
10
8
  // --------------------------------------------------
11
9
  // Define Ionic defaults
12
10
  // --------------------------------------------------
13
- @forward 'ionic/ionic.functions.color';
14
- @forward 'ionic/ionic.globals';
15
- @forward 'ionic/ionic.theme.default';
16
-
17
11
  $ionicons-font-path: '~ionicons/dist/fonts';
18
12
 
19
13
  // --------------------------------------------------
@@ -147,4 +141,9 @@ $colors: (
147
141
  dark: (base: $dark, contrast: #fff, shade: get-color-shade($dark), tint: get-color-tint($dark)),
148
142
  /* transparent */
149
143
  transparent: (base: $transparent, contrast: $dark, shade: $transparent, tint: $transparent)
144
+ ) !default;
145
+
146
+ @forward 'ionic/ionic.functions.color';
147
+ @forward 'ionic/ionic.globals' with (
148
+ $colors: $colors
150
149
  );
@@ -80,3 +80,5 @@ $mat-toolbar-height-mobile: 56px !default;
80
80
  $mat-toolbar-background-color: var(--ion-toolbar-background, var(--ion-background-color, whitesmoke)) !default;
81
81
  $mat-option-min-height: 48px !default;
82
82
  $mat-option-max-height: 48px !default;
83
+ $mat-expansion-container-background-color: var(--ion-color-secondary100) !default;
84
+ $mat-expansion-container-text-color: var(--ion-text-color) !default;
@@ -4,8 +4,6 @@
4
4
  @use 'ngx-components.globals' as *;
5
5
  @use '@angular/material' as mat;
6
6
 
7
- @forward "functions";
8
-
9
7
  @mixin font-size($size) {
10
8
  font-size: calculateRem($size);
11
9
  }
@@ -44,12 +42,20 @@
44
42
  /**
45
43
  * Define CSS theme colors
46
44
  */
47
- @mixin generate-color($color-name) {
48
- $value: map-get($colors, $color-name);
45
+ @mixin generate-color($color-name, $value) {
49
46
  $base: map-get($value, base);
50
47
  $contrast: map-get($value, contrast);
48
+ @if not $contrast {
49
+ $contrast: get-color-contrast($base);
50
+ }
51
51
  $shade: map-get($value, shade);
52
+ @if not $shade {
53
+ $shade: get-color-shade($base);
54
+ }
52
55
  $tint: map-get($value, tint);
56
+ @if not $tint {
57
+ $tint: get-color-tint($base);
58
+ }
53
59
  --ion-color-base: var(--ion-color-#{""+$color-name}, #{$base}) !important;
54
60
  --ion-color-base-rgb: var(--ion-color-#{""+$color-name}-rgb, #{color-to-rgb-list($base)});
55
61
  --ion-color-contrast: var(--ion-color-#{""+$color-name}-contrast, #{$contrast}) !important;
@@ -58,10 +64,12 @@
58
64
  --ion-color-tint: var(--ion-color-#{""+$color-name}-tint, #{$tint}) !important;
59
65
  }
60
66
 
61
- @mixin generate-color-list($color-name) {
62
- $value: map-get($colors, $color-name);
67
+ @mixin generate-color-list($color-name, $value) {
63
68
  $base: map-get($value, base);
64
69
  $contrast: map-get($value, contrast);
70
+ @if not $contrast {
71
+ $contrast: get-color-contrast($base);
72
+ }
65
73
  $shade: map-get($value, shade);
66
74
  $tint: map-get($value, tint);
67
75
  --ion-color-#{""+$color-name} : #{$base};
@@ -72,8 +80,7 @@
72
80
  --ion-color-#{""+$color-name}-tint: #{$tint};
73
81
  }
74
82
 
75
- @mixin generate-dark-color-list($color-name) {
76
- $value: map-get($colors, $color-name);
83
+ @mixin generate-dark-color-list($color-name, $value) {
77
84
  $base: mix(map-get($value, base), #000, 50%);
78
85
  $contrast: get-color-contrast($base, true);
79
86
  $shade: lighten($base, 10%);
@@ -95,19 +102,19 @@
95
102
  }
96
103
  }
97
104
 
98
- @mixin css-variables-to-root() {
99
- @each $color-name,
100
- $value in $colors {
105
+ @mixin css-variables-to-root($colors) {
106
+ @each $color-name, $value in $colors {
101
107
  .ion-color-#{""+$color-name} {
102
- @include generate-color($color-name);
108
+ @include generate-color($color-name, $value);
103
109
  }
104
110
  }
105
111
 
106
112
  @each $color-name,
107
113
  $value in $colors {
108
- @include generate-color-list($color-name);
114
+ @include generate-color-list($color-name, $value);
109
115
  }
110
116
 
117
+
111
118
  --ion-text-color: #{$text-color-value};
112
119
  --ion-text-color-rgb: #{$text-color-rgb-value};
113
120
  --ion-grid-column-padding: #{$ion-grid-column-padding};
@@ -122,10 +129,10 @@
122
129
  --ion-backdrop-opacity: 0.32;
123
130
  --ion-card-background-color: #{$card-background-color};
124
131
 
125
- --expansion-panel-padding: var(--ion-padding);
126
- --expansion-panel-header-padding: var(--ion-padding);
127
- --mat-expansion-container-background-color: var(--ion-background-color);
128
- --mat-expansion-container-text-color: var(--ion-text-color);
132
+ --expansion-panel-padding: var($app-expansion-panel-padding, var(--ion-padding));
133
+ --expansion-panel-header-padding: var($app-expansion-panel-header-padding, var(--ion-padding));
134
+ --mat-expansion-container-background-color:var($mat-expansion-container-background-color, var(--ion-background-color));
135
+ --mat-expansion-container-text-color: var($mat-expansion-container-text-color, var(--ion-text-color));
129
136
 
130
137
  --mat-tab-link-height: #{$mat-tab-link-height};
131
138
  --mat-tab-bar-height: #{$mat-tab-bar-height};
@@ -193,7 +200,7 @@
193
200
 
194
201
  }
195
202
 
196
- @mixin css-variables-to-root-dark() {
203
+ @mixin css-variables-to-root-dark($colors) {
197
204
 
198
205
  @include mat.all-component-colors($candy-dark-theme);
199
206
 
@@ -202,7 +209,7 @@
202
209
 
203
210
  @each $color-name,
204
211
  $value in $colors {
205
- @include generate-dark-color-list($color-name);
212
+ @include generate-dark-color-list($color-name, $value);
206
213
  }
207
214
 
208
215
  // Inverse background/text color
@@ -13,6 +13,9 @@ $app-table-cell-focus-background-color: transparent !default;
13
13
  $app-paginator-height: 34px !default;
14
14
  $app-form-buttons-bar-height: 56px !default;
15
15
 
16
+ $app-expansion-panel-padding: 0 !default;
17
+ $app-expansion-panel-header-padding: 0 !default;
18
+
16
19
  // Form's field text and label
17
20
  $app-form-color: #{$text-color} !default;
18
21
  $app-form-color-rgb: #{$text-color-rgb} !default;
@@ -209,6 +209,12 @@ mat-option {
209
209
  padding: 0 !important;
210
210
  }
211
211
  }
212
+
213
+ /* hide pseudo checkbox, in the footer*/
214
+ &.mat-pseudo-checkbox-hidden mat-pseudo-checkbox {
215
+ visibility: hidden;
216
+ display: none;
217
+ }
212
218
  }
213
219
 
214
220
  mat-option:not(:last-of-type) {
@@ -404,12 +410,14 @@ ion-list,
404
410
  /* Offset due to mat-pseudo-checkbox */
405
411
  padding-left: 32px;
406
412
  }
407
- &.column {
413
+ &.sticky {
408
414
  /* Set header as sticky*/
409
415
  position: -webkit-sticky;
410
416
  position: sticky;
411
- top: 0;
417
+ top: var(--top, 0);
412
418
  z-index: 1001;
419
+ }
420
+ &.column {
413
421
  background-color: var(--ion-color-secondary);
414
422
  border-bottom: 1px solid #{$app-select-option-border-color};
415
423
  color: var(--ion-color-secondary-contrast);
@@ -417,16 +425,16 @@ ion-list,
417
425
  @include font-size(12px);
418
426
  font-weight: 500;
419
427
  height: 20px;
428
+ --top: var(--header-column-top, 0);
420
429
  ion-col {
421
430
  white-space: nowrap;
422
431
  text-overflow: ellipsis;
423
432
  }
424
433
  &.mat-select-searchbar-sticky {
425
434
  /* offset because of the searchbar height */
426
- top: var(--ion-searchbar-height, 58px);
435
+ --header-column-top: var(--ion-searchbar-height, 58px);
427
436
  }
428
437
  }
429
-
430
438
  }
431
439
 
432
440
  ion-row.ion-list-footer,
@@ -437,7 +445,7 @@ ion-list,
437
445
  /* Set footer as sticky*/
438
446
  position: -webkit-sticky;
439
447
  position: sticky;
440
- bottom: 0;
448
+ bottom: var(--footer-bottom, 0);
441
449
  z-index: 1001;
442
450
  border-top: 1px solid #{$app-select-option-border-color};
443
451
  background-color: var(--ion-toolbar-background, #{$ion-toolbar-background});
@@ -453,6 +461,8 @@ ion-list,
453
461
  white-space: nowrap;
454
462
  text-overflow: ellipsis;
455
463
  }
464
+
465
+
456
466
  }
457
467
 
458
468
  ion-row {
@@ -126,6 +126,8 @@
126
126
  .mat-mdc-footer-cell {
127
127
  // Remove default padding
128
128
  padding-inline: 0;
129
+ padding-inline-start: 0; // Compat Chrome < 87 (padding-inline not exists yet)
130
+ padding-inline-end: 0; // Compat Chrome < 87 (padding-inline not exists yet)
129
131
 
130
132
  &.ion-padding-start {
131
133
  padding-inline-start: var(--mat-cell-horizontal-padding);
@@ -363,7 +365,10 @@
363
365
  }
364
366
 
365
367
  .mdc-text-field {
368
+ // Remove default padding
366
369
  padding-inline: 0;
370
+ padding-inline-start: 0; // Compat Chrome < 87 (padding-inline not exists yet)
371
+ padding-inline-end: 0; // Compat Chrome < 87 (padding-inline not exists yet)
367
372
  }
368
373
 
369
374
  // Prefix
@@ -1,21 +1,22 @@
1
- @use 'ionic.globals' as *;
2
- @use 'material.globals' as *;
3
- @use "ngx-components.globals" as *;
1
+ @forward 'ionic.globals';
2
+ @forward 'material.globals';
3
+ @forward 'ngx-components.globals';
4
4
 
5
5
  // --------------------------------------------------
6
6
  // Import Ionic style
7
7
  // --------------------------------------------------
8
8
  @use "ionic";
9
9
  // --------------------------------------------------
10
- // Import Ion Icons
10
+ // Import Icons
11
11
  // --------------------------------------------------
12
12
  $ionicons-font-path: '~ionicons/dist/fonts';
13
13
  @use "icons";
14
14
  // --------------------------------------------------
15
15
  // Import Fonts
16
16
  // --------------------------------------------------
17
- $roboto-font-path: '~roboto-fontface/fonts/roboto';
18
- @use "roboto";
17
+ @use "roboto" as * with (
18
+ $roboto-font-path: '~roboto-fontface/fonts/roboto'
19
+ );
19
20
  // --------------------------------------------------
20
21
  // Import responsive style
21
22
  // --------------------------------------------------
@@ -1,5 +1,7 @@
1
+ @use 'ionic.globals' as *;
1
2
  @use "mixins" as *;
2
3
 
4
+
3
5
  * {
4
6
  @include font-roboto();
5
7
  }
@@ -10,9 +12,9 @@
10
12
  // A 'html' selector has a lower specificity than ':root' and would always be
11
13
  // overridden by Ionic's defaults (e.g. --ion-color-primary: #0054e9).
12
14
  :root {
13
- @include css-variables-to-root();
15
+ @include css-variables-to-root($colors);
14
16
 
15
- &.plt-mobile {
17
+ &:has(html.plt-mobile) {
16
18
  @include css-variables-to-root-mobile();
17
19
  }
18
20
 
@@ -23,7 +25,7 @@
23
25
  * -------------------------------------------
24
26
  */
25
27
  html.dark {
26
- @include css-variables-to-root-dark();
28
+ @include css-variables-to-root-dark($colors);
27
29
 
28
30
  --ion-color-primary: #428cff;
29
31
  --ion-color-primary-rgb: 66, 140, 255;
@@ -8,8 +8,7 @@
8
8
  @use "./ionic.mixins" as *;
9
9
 
10
10
  // Default Theme
11
- @use "./ionic.theme.default" as *;
12
-
11
+ @forward "./ionic.theme.default";
13
12
 
14
13
  // Default General
15
14
  // --------------------------------------------------
@@ -1,5 +1,6 @@
1
- import { Page, Locator } from 'playwright';
2
- import { PlaywrightTestArgs } from '@playwright/test';
1
+ import { Page, Locator, PlaywrightTestArgs } from '@playwright/test';
2
+
3
+ declare const STARTUP_DATA_STORAGE_KEY = "__appStartupData";
3
4
 
4
5
  /**
5
6
  * Utility selectors and helpers for Ionic components in e2e tests.
@@ -282,5 +283,5 @@ interface LoginEnv {
282
283
  password: string;
283
284
  }
284
285
 
285
- export { AuthHelper, IonicHelper, IonicSelectors, MaterialHelper, MaterialSelectors, UiHelper, testWithEnv, withEnvs };
286
+ export { AuthHelper, IonicHelper, IonicSelectors, MaterialHelper, MaterialSelectors, STARTUP_DATA_STORAGE_KEY, UiHelper, testWithEnv, withEnvs };
286
287
  export type { EnvFilter, LoginEnv };