@gravitee/ui-particles-angular 11.0.0 → 11.0.1-fix-pre-angular-17-547a20e

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 (30) hide show
  1. package/esm2022/lib/gio-asciidoctor/gio-asciidoctor.component.mjs +2 -2
  2. package/esm2022/lib/gio-banner/gio-banner.component.mjs +10 -10
  3. package/esm2022/lib/gio-form-headers/gio-form-headers.component.mjs +2 -2
  4. package/esm2022/lib/gio-form-json-schema/gio-form-json-schema.component.mjs +2 -2
  5. package/esm2022/lib/gio-form-json-schema/type-component/array-type.component.mjs +2 -2
  6. package/esm2022/lib/gio-form-json-schema/type-component/headers-type.component.mjs +2 -2
  7. package/esm2022/lib/gio-form-json-schema/wrappers/gio-banner-wrapper.component.mjs +2 -2
  8. package/esm2022/lib/gio-form-slide-toggle/gio-form-slide-toggle.component.mjs +2 -2
  9. package/esm2022/lib/gio-license/gio-license.directive.mjs +15 -10
  10. package/esm2022/lib/gio-license-expiration-notification/gio-license-expiration-notification.component.mjs +2 -2
  11. package/esm2022/lib/gio-mat-config/gio-mat-config.module.mjs +3 -10
  12. package/esm2022/lib/gio-save-bar/gio-save-bar.component.mjs +2 -2
  13. package/esm2022/lib/oem-theme/gio-menu/gio-menu-search/gio-menu-search.component.mjs +2 -2
  14. package/fesm2022/gravitee-ui-particles-angular.mjs +45 -48
  15. package/fesm2022/gravitee-ui-particles-angular.mjs.map +1 -1
  16. package/lib/gio-license/gio-license.directive.d.ts +5 -2
  17. package/package.json +1 -1
  18. package/src/lib/gio-radio-button/gio-radio-button.scss +0 -20
  19. package/src/scss/gio-mat-theme-variable.scss +2 -2
  20. package/src/scss/gio-mat-theme.scss +3 -30
  21. package/src/scss/index.scss +0 -1
  22. package/src/scss/mat-override/index.scss +0 -1
  23. package/src/scss/mat-override/mat-button.scss +0 -71
  24. package/src/scss/mat-override/mat-card.scss +0 -5
  25. package/src/scss/mat-override/mat-form-field.scss +0 -32
  26. package/src/scss/mat-override/mat-list.scss +0 -20
  27. package/src/scss/mat-override/mat-option.scss +0 -10
  28. package/src/scss/mat-override/mat-table.scss +0 -31
  29. package/src/scss/gio-mat-legacy-theme-variable.scss +0 -100
  30. package/src/scss/mat-override/mat-tabs.scss +0 -23
@@ -6,14 +6,17 @@ export declare class GioLicenseDirective implements OnInit, OnDestroy {
6
6
  private readonly licenseService;
7
7
  private readonly matDialog;
8
8
  private elRef;
9
- gioLicense: LicenseOptions | LicensePluginOptions;
9
+ /**
10
+ * The license to check. Must be defined when the directive is initialised, otherwise the value will not be taken into account.
11
+ */
12
+ gioLicense?: LicenseOptions | LicensePluginOptions;
10
13
  private featureInfo;
11
14
  private trialURL;
12
15
  private unsubscribe$;
13
16
  private onClick;
14
17
  constructor(licenseService: GioLicenseService, matDialog: MatDialog, elRef: ElementRef);
15
18
  ngOnInit(): void;
16
- private isMissingFeature$;
19
+ private isNotAllowed$;
17
20
  ngOnDestroy(): void;
18
21
  private click;
19
22
  static ɵfac: i0.ɵɵFactoryDeclaration<GioLicenseDirective, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravitee/ui-particles-angular",
3
- "version": "11.0.0",
3
+ "version": "11.0.1-fix-pre-angular-17-547a20e",
4
4
  "description": "Gravitee.io - UI Particles Angular",
5
5
  "repository": {
6
6
  "type": "git",
@@ -62,20 +62,10 @@ $typography: map.get(theme.$mat-theme, typography);
62
62
  }
63
63
  }
64
64
 
65
- // TODO(mdc-migration): remove when legacy theme is removed
66
- .gio-radio-button.mat-radio-checked {
67
- border: 2px solid mat.get-color-from-palette(palettes.$mat-accent-palette, 'default');
68
- }
69
-
70
65
  .gio-radio-button.mat-mdc-radio-checked {
71
66
  border: 2px solid mat.get-color-from-palette(palettes.$mat-accent-palette, 'default');
72
67
  }
73
68
 
74
- // TODO(mdc-migration): remove when legacy theme is removed
75
- .mat-radio-checked .mat-icon {
76
- color: mat.get-color-from-palette(palettes.$mat-accent-palette, 'default');
77
- }
78
-
79
69
  .mat-mdc-radio-checked .mat-icon {
80
70
  color: mat.get-color-from-palette(palettes.$mat-accent-palette, 'default');
81
71
  }
@@ -90,20 +80,10 @@ $typography: map.get(theme.$mat-theme, typography);
90
80
  @include gio-radio-button;
91
81
  }
92
82
 
93
- // TODO(mdc-migration): remove when legacy theme is removed
94
- .gio-radio-button.mat-radio-checked {
95
- border: 2px solid mat.get-color-from-palette(palettes.$mat-accent-palette, 'default');
96
- }
97
-
98
83
  .gio-radio-button.mat-mdc-radio-checked {
99
84
  border: 2px solid mat.get-color-from-palette(palettes.$mat-accent-palette, 'default');
100
85
  }
101
86
 
102
- // TODO(mdc-migration): remove when legacy theme is removed
103
- .gio-radio-button.mat-radio-checked .mat-icon {
104
- color: mat.get-color-from-palette(palettes.$mat-accent-palette, 'default');
105
- }
106
-
107
87
  .gio-radio-button.mat-mdc-radio-checked .mat-icon {
108
88
  color: mat.get-color-from-palette(palettes.$mat-accent-palette, 'default');
109
89
  }
@@ -29,8 +29,8 @@ $mat-typography: mat.define-typography-config(
29
29
  $headline-6: mat.define-typography-level(26px, 36px, 600),
30
30
  $subtitle-1: mat.define-typography-level(18px, 24px, 600, $letter-spacing: 0.4px),
31
31
  $subtitle-2: mat.define-typography-level(14px, 20px, 500, $letter-spacing: 0.4px),
32
- $body-1: mat.define-typography-level(14px, 20px, 500, $letter-spacing: 0.4px),
33
- $body-2: mat.define-typography-level(14px, 20px, 400, $letter-spacing: 0.4px),
32
+ $body-1: mat.define-typography-level(14px, 22px, 500, $letter-spacing: 0.4px),
33
+ $body-2: mat.define-typography-level(14px, 22px, 400, $letter-spacing: 0.4px),
34
34
  $caption: mat.define-typography-level(12px, 16px, 400),
35
35
  $button: mat.define-typography-level(14px, 14px, 500),
36
36
  $overline: mat.define-typography-level(inherit, 1.125, 400),
@@ -15,55 +15,28 @@
15
15
  */
16
16
  @use '@angular/material' as mat;
17
17
 
18
- @use './gio-mat-legacy-theme-variable' as legacy-theme-variable;
19
18
  @use './gio-mat-theme-variable' as theme-variable;
20
19
 
21
20
  @use './mat-override' as override;
22
21
 
23
22
  // Config material theme with gio theme
24
- @mixin mat-theme($legacy: false) {
25
- // TODO(v15): As of v15 mat.legacy-core no longer includes default typography styles.
26
- // The following line adds:
27
- // 1. Default typography styles for all components
28
- // 2. Styles for typography hierarchy classes (e.g. .mat-headline-1)
29
- // If you specify typography styles for the components you use elsewhere, you should delete this line.
30
- // If you don't need the default component typographies but still want the hierarchy styles,
31
- // you can delete this line and instead use:
32
- // `@include mat.legacy-typography-hierarchy(theme-variable.$mat-typography);`
33
-
34
- /*
35
- TODO(mdc-migration): Remove all-legacy-component-typographies once all legacy components are migrated
36
- */
37
- @include mat.all-legacy-component-typographies(legacy-theme-variable.$mat-legacy-typography);
23
+ @mixin mat-theme {
38
24
  @include mat.all-component-typographies(theme-variable.$mat-typography);
39
25
 
40
- /*
41
- TODO(mdc-migration): Remove legacy-core once all legacy components are migrated
42
- */
43
- @include mat.legacy-core;
44
26
  @include mat.core;
45
27
 
46
- /*
47
- TODO(mdc-migration): Remove all-legacy-component-themes once all legacy components are migrated
48
- */
49
- @include mat.all-legacy-component-themes(legacy-theme-variable.$mat-legacy-theme);
50
28
  @include mat.all-component-themes(theme-variable.$mat-theme);
51
29
 
52
- @if $legacy {
53
- @include mat.legacy-typography-hierarchy(legacy-theme-variable.$mat-legacy-typography);
54
- } @else {
55
- @include mat.typography-hierarchy(theme-variable.$mat-typography);
56
- }
30
+ @include mat.typography-hierarchy(theme-variable.$mat-typography);
57
31
 
32
+ // Gio overrides
58
33
  @include mat.form-field-density(-1);
59
34
 
60
- // Gio overrides
61
35
  @include override.mat-h5;
62
36
  @include override.mat-form-field;
63
37
  @include override.mat-table;
64
38
  @include override.mat-card;
65
39
  @include override.mat-list;
66
- @include override.mat-tabs;
67
40
  @include override.mat-option;
68
41
  @include override.mat-button;
69
42
  }
@@ -22,7 +22,6 @@
22
22
  @forward './theme/typography/gio-typography' show subtitle-typography, code-typography, link-typography, caption-2;
23
23
 
24
24
  @forward './gio-mat-theme-variable' show $mat-theme, $mat-typography, $mat-theme-dark;
25
- @forward './gio-mat-legacy-theme-variable' show $mat-legacy-theme, $mat-legacy-typography, $mat-legacy-theme-dark;
26
25
 
27
26
  @forward './gio-fonts' show import-fonts;
28
27
 
@@ -18,6 +18,5 @@
18
18
  @forward 'mat-card';
19
19
  @forward 'mat-list' show mat-list;
20
20
  @forward 'mat-h5';
21
- @forward 'mat-tabs';
22
21
  @forward 'mat-option';
23
22
  @forward 'mat-button';
@@ -14,77 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  @mixin mat-button() {
17
- // Legacy mat-button
18
- .mat-button.mat-button-base,
19
- .mat-stroked-button.mat-button-base,
20
- .mat-raised-button.mat-button-base,
21
- .mat-flat-button.mat-button-base {
22
- border-radius: 8px;
23
-
24
- &:hover {
25
- filter: brightness(115%);
26
- transition: all 0.3s linear;
27
- }
28
- }
29
-
30
- .mat-icon-button.mat-button-base:hover {
31
- filter: brightness(115%);
32
- transition: all 0.3s linear;
33
- }
34
-
35
- .mat-button,
36
- .mat-raised-button,
37
- .mat-flat-button,
38
- .mat-stroked-button {
39
- .mat-icon {
40
- width: 18px;
41
- height: 18px;
42
- margin-top: -2px; // Center horizontally icon with text. 18 for icon 14 for text so up with -2px
43
- margin-right: 8px;
44
- line-height: 18px;
45
- }
46
-
47
- .mat-icon.mat-icon-right {
48
- margin-right: 0;
49
- margin-left: 8px;
50
- }
51
- }
52
-
53
- .mat-icon-button {
54
- .mat-icon:has(svg) {
55
- margin-top: -2px; // Center horizontally icon
56
- }
57
- }
58
-
59
- .mat-button.mat-icon-button {
60
- width: 36px;
61
- height: 36px;
62
- line-height: 24px;
63
-
64
- .mat-icon {
65
- width: 24px;
66
- height: 24px;
67
- margin-right: 0;
68
- line-height: 24px;
69
- }
70
- }
71
-
72
- .mat-flat-button.mat-icon-button,
73
- .mat-stroked-button.mat-icon-button {
74
- width: 36px;
75
- height: 36px;
76
- line-height: 18px;
77
-
78
- .mat-icon {
79
- width: 18px;
80
- height: 18px;
81
- margin-right: 0;
82
- margin-left: 0;
83
- line-height: 18px;
84
- }
85
- }
86
-
87
- // MDC mat-button
88
17
  .mdc-button {
89
18
  &:has(.mdc-button__label:empty) {
90
19
  min-width: 36px;
@@ -16,11 +16,6 @@
16
16
  @use '@angular/material' as mat;
17
17
 
18
18
  @mixin mat-card() {
19
- // Legacy mat-card
20
- .mat-card:not(.mat-card .mat-card, [class*='mat-elevation-z']) {
21
- @include mat.elevation(3);
22
- }
23
-
24
19
  // Mat card MDC
25
20
  .mat-mdc-card:not(.mat-mdc-card .mat-mdc-card, [class*='mat-mdc-elevation-z'], [class*='mat-elevation-z'], [appearance='outlined']) {
26
21
  @include mat.elevation(3);
@@ -20,38 +20,6 @@
20
20
  @use '../gio-mat-palettes' as palettes;
21
21
 
22
22
  @mixin mat-form-field() {
23
- // Legacy mat-form-field
24
- .mat-form-field:not([class*='mat-paginator']) {
25
- // Increase default padding to have space for two lines of hint & error bellow the input
26
- padding-bottom: 16px;
27
-
28
- .mat-hint,
29
- .mat-error {
30
- font-size: mat.font-size(theme.$mat-typography, caption);
31
- }
32
- }
33
-
34
- .mat-form-field-disabled * {
35
- cursor: not-allowed !important;
36
- }
37
-
38
- .mat-form-field-prefix {
39
- // Apply same margin as the one on the left of the prefix
40
- margin-right: 0.75em;
41
- color: mat.get-color-from-palette(palettes.$mat-space-palette, 'lighter30');
42
- }
43
-
44
- .mat-form-field-appearance-outline .mat-form-field-prefix,
45
- .mat-form-field-appearance-outline .mat-form-field-suffix {
46
- place-self: center;
47
- }
48
-
49
- .mat-form-field-appearance-outline .mat-form-field-infix {
50
- padding-top: 0.8em;
51
- }
52
-
53
- // MDC mat-form-field
54
-
55
23
  .mat-mdc-form-field {
56
24
  margin: 0.45em 0;
57
25
  }
@@ -21,26 +21,6 @@
21
21
  $background: map.get(theme.$mat-theme, background);
22
22
 
23
23
  @mixin mat-list() {
24
- // Legacy mat-list
25
-
26
- /**
27
- * When a Mat List is inside a Mat Card then set a negative to balance default padding of the Mat Card
28
- */
29
- .mat-card > .mat-list {
30
- margin: -16px;
31
- }
32
-
33
- /**
34
- * Change background color of each list item on hover
35
- */
36
- .mat-list-item {
37
- &:hover {
38
- background-color: mat.get-color-from-palette($background, hover);
39
- }
40
- }
41
-
42
- // MDC mat-list
43
-
44
24
  /**
45
25
  * Change background color of each list item on hover
46
26
  */
@@ -16,19 +16,9 @@
16
16
 
17
17
  @use '@angular/material' as mat;
18
18
 
19
- @use '../gio-mat-legacy-theme-variable' as theme-legacy;
20
19
  @use '../gio-mat-theme-variable' as theme;
21
20
 
22
21
  @mixin mat-option() {
23
- // Legacy mat-option
24
- .mat-option,
25
- .mat-typography .mat-option {
26
- height: 40px;
27
- font-size: mat.font-size(theme-legacy.$mat-legacy-typography, input);
28
- line-height: mat.line-height(theme-legacy.$mat-legacy-typography, input);
29
- }
30
-
31
- // MDC mat-option
32
22
  .mat-typography .mat-mdc-option {
33
23
  min-height: 40px;
34
24
  @include mat.typography-level(theme.$mat-typography, 'body-2');
@@ -21,37 +21,6 @@
21
21
  $background: map.get(theme.$mat-theme, background);
22
22
 
23
23
  @mixin mat-table() {
24
- // Legacy mat-table
25
- .mat-table {
26
- tbody tr:hover {
27
- background-color: mat.get-color-from-palette($background, hover);
28
- }
29
-
30
- // Remove bottom padding on mat-form-field inside mat-cell
31
- // Note: In Angular 15, we should be able to use SubscriptSizing option for that
32
- .mat-cell {
33
- // appearance=outline
34
- .mat-form-field.mat-form-field-appearance-outline:not(:has(mat-hint), :has(mat-error)) {
35
- padding-bottom: 0;
36
-
37
- .mat-form-field-wrapper {
38
- padding-bottom: 0;
39
- }
40
- }
41
-
42
- // appearance=standard
43
- .mat-form-field.mat-form-field-appearance-standard:not(:has(mat-hint), :has(mat-error)) {
44
- padding-bottom: 0;
45
-
46
- .mat-form-field-wrapper {
47
- // stylelint-disable-next-line number-max-precision
48
- margin-bottom: -1.34375em;
49
- }
50
- }
51
- }
52
- }
53
-
54
- // MDC mat-table
55
24
  .mat-mdc-table {
56
25
  tbody tr.mat-mdc-row:hover {
57
26
  background-color: mat.get-color-from-palette($background, hover);
@@ -1,100 +0,0 @@
1
- /*
2
- * Copyright (C) 2021 The Gravitee team (http://gravitee.io)
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- @use 'sass:map';
17
- @use '@angular/material' as mat;
18
-
19
- @use './gio-mat-palettes' as palettes;
20
-
21
- // Config mat Typography
22
- $mat-legacy-typography: mat.define-legacy-typography-config(
23
- $font-family: '"Golos UI", Roboto, "Helvetica Neue", sans-serif',
24
- $display-4: mat.define-typography-level(112px, 112px, 400, $letter-spacing: -0.05em),
25
- $display-3: mat.define-typography-level(56px, 56px, 400, $letter-spacing: -0.02em),
26
- $display-2: mat.define-typography-level(45px, 48px, 400, $letter-spacing: -0.005em),
27
- $display-1: mat.define-typography-level(60px, 66px, 600, $letter-spacing: -0.5px),
28
- $headline: mat.define-typography-level(42px, 52px, 600),
29
- $title: mat.define-typography-level(26px, 36px, 600),
30
- $subheading-2: mat.define-typography-level(18px, 24px, 600, $letter-spacing: 0.4px),
31
- $subheading-1: mat.define-typography-level(16px, 24px, 600, $letter-spacing: 0.4px),
32
- $body-2: mat.define-typography-level(14px, 20px, 600, $letter-spacing: 0.4px),
33
- $body-1: mat.define-typography-level(14px, 20px, 400, $letter-spacing: 0.4px),
34
- $caption: mat.define-typography-level(12px, 16px, 400),
35
- $button: mat.define-typography-level(14px, 14px, 500),
36
- $input: mat.define-typography-level(inherit, 1.125, 400),
37
- );
38
-
39
- // Mat default light theme
40
- $mat-theme-default: mat.define-light-theme(
41
- (
42
- color: (
43
- primary: palettes.$mat-primary-palette,
44
- accent: palettes.$mat-accent-palette,
45
- warn: palettes.$mat-error-palette,
46
- ),
47
- typography: $mat-legacy-typography,
48
- )
49
- );
50
-
51
- // Mat default dark theme
52
- $mat-legacy-theme-dark: mat.define-dark-theme(
53
- (
54
- color: (
55
- primary: palettes.$mat-primary-palette,
56
- accent: palettes.$mat-accent-palette,
57
- warn: palettes.$mat-error-palette,
58
- ),
59
- typography: $mat-legacy-typography,
60
- )
61
- );
62
-
63
- // Custom mat background & foreground color
64
- $mat-background: map.get($mat-theme-default, background);
65
- $mat-foreground: map.get($mat-theme-default, foreground);
66
-
67
- // Override $light-theme-background-palette config from node_modules/@angular/material/core/theming/_palette.scss
68
- $gio-background: map.merge(
69
- $mat-background,
70
- (
71
- background: mat.get-color-from-palette(palettes.$mat-dove-palette, default),
72
- tooltip: mat.get-color-from-palette(palettes.$mat-space-palette, default),
73
- )
74
- );
75
-
76
- // Override $light-theme-foreground-palette config from node_modules/@angular/material/core/theming/_palette.scss
77
- $gio-foreground: map.merge(
78
- $mat-foreground,
79
- (
80
- text: mat.get-color-from-palette(palettes.$mat-space-palette, default),
81
- slider-min: mat.get-color-from-palette(palettes.$mat-space-palette, default),
82
- )
83
- );
84
- $gio-background-foreground: (
85
- background: $gio-background,
86
- foreground: $gio-foreground,
87
- );
88
-
89
- // For backward compatibility with Material Design merge $gio-background-foreground into $mat-theme-default and into $mat-theme-default.color.
90
- // Otherwise the colors of bg and fg seton partially applied
91
- $mat-legacy-color: map.merge(map.get($mat-theme-default, color), $gio-background-foreground);
92
- $mat-legacy-theme: map.merge(
93
- $mat-theme-default,
94
- map.merge(
95
- $gio-background-foreground,
96
- (
97
- color: $mat-legacy-color,
98
- )
99
- )
100
- );
@@ -1,23 +0,0 @@
1
- /*
2
- * Copyright (C) 2022 The Gravitee team (http://gravitee.io)
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- @mixin mat-tabs() {
17
- // Legacy mat-tabs
18
- .mat-tab-group {
19
- .mat-tab-label {
20
- min-width: unset;
21
- }
22
- }
23
- }