@onemrvapublic/design-system-theme 18.2.4-develop.8 → 18.2.4

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.
@@ -98,7 +98,7 @@
98
98
  @include µ.label-button($theme);
99
99
  font-family: mat.m2-font-family(
100
100
  map.get($theme, 'typography'),
101
- label-button
101
+ 'button'
102
102
  ); // HWKTMP For some reason, the font family is not taken into account from configuration
103
103
  }
104
104
 
@@ -6,6 +6,7 @@
6
6
  & {
7
7
  --mat-app-body-large-font: 16px;
8
8
  --mat-expansion-container-text-size: 16px;
9
+ --mat-expansion-header-text-size: 16px;
9
10
  }
10
11
  @include mat.expansion-base($theme);
11
12
  @include mat.expansion-theme($theme);
@@ -0,0 +1,5 @@
1
+ @mixin theme($theme) {
2
+ mat-drawer {
3
+ position: fixed;
4
+ }
5
+ }
@@ -22,11 +22,6 @@
22
22
  }
23
23
 
24
24
  @mixin theme($theme) {
25
- & {
26
- --mat-form-field-container-height: 44px;
27
- --mat-form-field-outlined-label-text-populated-size: 12px;
28
- }
29
-
30
25
  @include mat.input-base($theme);
31
26
  @include mat.input-theme($theme);
32
27
 
@@ -5,18 +5,4 @@
5
5
  @mixin theme($theme) {
6
6
  @include mat.list-base($theme);
7
7
  @include mat.list-theme($theme);
8
-
9
- .mat-mdc-list-base {
10
- .mat-mdc-list-item {
11
- @include µ.body-1($theme);
12
- font-family: mat.m2-font-family(
13
- map.get($theme, 'typography'),
14
- body-1
15
- ); // HWKTMP For some reason, the font family is not taken into account from configuration
16
-
17
- .mat-mdc-list-item-content {
18
- gap: 4px;
19
- }
20
- }
21
- }
22
8
  }
@@ -12,7 +12,7 @@
12
12
  @include µ.label-button($theme);
13
13
  font-family: mat.m2-font-family(
14
14
  map.get($theme, 'typography'),
15
- label-button
15
+ button
16
16
  ); // HWKTMP For some reason, the font family is not taken into account from configuration
17
17
  }
18
18
 
@@ -52,7 +52,7 @@
52
52
  @include µ.label-button($theme);
53
53
  font-family: mat.m2-font-family(
54
54
  map.get($theme, 'typography'),
55
- label-button
55
+ 'button'
56
56
  ); // HWKTMP For some reason, the font family is not taken into account from configuration
57
57
  }
58
58
 
@@ -19,18 +19,24 @@
19
19
  th.mat-mdc-header-cell {
20
20
  font-weight: 600;
21
21
  border-bottom: 2px solid µ.grayscale($theme, 200);
22
- font-size: 16px;
23
22
  color: µ.grayscale($theme, 700);
24
- font-family: mat.get-theme-typography($theme, 'headline-1', font-family);
23
+ font-family: mat.get-theme-typography(
24
+ $theme,
25
+ 'headline-1',
26
+ 'font-family'
27
+ );
25
28
  font-style: normal;
26
29
  line-height: 16px; /* 162.5% */
27
30
  vertical-align: bottom;
28
31
  padding-bottom: 16px;
29
32
  }
30
33
 
31
- .mat-mdc-row:last-child {
32
- .mat-mdc-cell {
33
- border-bottom: none;
34
+ .mat-mdc-row {
35
+ --mat-table-row-item-label-text-size: 16px;
36
+ &:last-child {
37
+ .mat-mdc-cell {
38
+ border-bottom: none;
39
+ }
34
40
  }
35
41
  }
36
42
 
@@ -50,16 +50,9 @@
50
50
  }
51
51
 
52
52
  @mixin label-button($theme) {
53
- @include mat.m2-typography-level(map.get($theme, typography), 'label-button');
53
+ @include mat.m2-typography-level(map.get($theme, typography), 'button');
54
54
  }
55
55
 
56
56
  @mixin label-smallbutton($theme) {
57
- @include mat.m2-typography-level(
58
- map.get($theme, typography),
59
- 'label-smallbutton'
60
- );
61
- }
62
-
63
- @mixin mat-h4($theme) {
64
- @include mat.m2-typography-level(map.get($theme, typography), 'mat-h4');
57
+ @include mat.m2-typography-level(map.get($theme, typography), 'button');
65
58
  }
@@ -2,9 +2,9 @@ import { NgModule } from '@angular/core';
2
2
  import { MAT_FORM_FIELD_DEFAULT_OPTIONS, } from '@angular/material/form-field';
3
3
  import * as i0 from "@angular/core";
4
4
  export class OnemrvaThemeModule {
5
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OnemrvaThemeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
6
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: OnemrvaThemeModule }); }
7
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OnemrvaThemeModule, providers: [
5
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: OnemrvaThemeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
6
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.4", ngImport: i0, type: OnemrvaThemeModule }); }
7
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: OnemrvaThemeModule, providers: [
8
8
  {
9
9
  provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
10
10
  useValue: {
@@ -14,7 +14,7 @@ export class OnemrvaThemeModule {
14
14
  },
15
15
  ] }); }
16
16
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OnemrvaThemeModule, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: OnemrvaThemeModule, decorators: [{
18
18
  type: NgModule,
19
19
  args: [{
20
20
  providers: [
@@ -3,9 +3,9 @@ import { NgModule } from '@angular/core';
3
3
  import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
4
4
 
5
5
  class OnemrvaThemeModule {
6
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OnemrvaThemeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
7
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: OnemrvaThemeModule }); }
8
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OnemrvaThemeModule, providers: [
6
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: OnemrvaThemeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
7
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.4", ngImport: i0, type: OnemrvaThemeModule }); }
8
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: OnemrvaThemeModule, providers: [
9
9
  {
10
10
  provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
11
11
  useValue: {
@@ -15,7 +15,7 @@ class OnemrvaThemeModule {
15
15
  },
16
16
  ] }); }
17
17
  }
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: OnemrvaThemeModule, decorators: [{
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: OnemrvaThemeModule, decorators: [{
19
19
  type: NgModule,
20
20
  args: [{
21
21
  providers: [
package/index.scss CHANGED
@@ -63,6 +63,7 @@
63
63
  @use './components/expansion' as expansion;
64
64
  @use './components/form-field' as form-field;
65
65
  @use './components/links';
66
+ @use './components/hacks';
66
67
  @use './components/lists';
67
68
  @use './components/menu';
68
69
  @use './components/progress-bar' as progress-bar;
@@ -136,17 +137,15 @@
136
137
  @include mat.core();
137
138
  @include mat.core-theme(variables.$onemrva-theme);
138
139
  @include mat.core-base(variables.$onemrva-theme);
139
- // TODO: This should be the way to do it but it does not seem to work correctly when used via npm import
140
- //@include mat.typography-hierarchy(
141
- // variables.$onemrva-theme
142
- //);
140
+ @include mat.typography-hierarchy(variables.$onemrva-theme);
143
141
  }
144
142
 
145
143
  // Base for Web components
146
- @mixin base($production: true) {
144
+ @mixin base() {
147
145
  @include reset();
148
- @include fonts.theme(variables.$onemrva-theme, $production);
146
+ @include fonts.theme(variables.$onemrva-theme);
149
147
  @include links.theme(variables.$onemrva-theme);
148
+ @include hacks.theme(variables.$onemrva-theme);
150
149
  @include core();
151
150
  }
152
151
 
@@ -155,6 +154,7 @@
155
154
  @include reset();
156
155
  @include fonts.theme(variables.$onemrva-theme, $production);
157
156
  @include links.theme(variables.$onemrva-theme);
157
+ @include hacks.theme(variables.$onemrva-theme);
158
158
  @include core();
159
159
 
160
160
  @include cards.theme(variables.$onemrva-theme);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onemrvapublic/design-system-theme",
3
- "version": "v18.2.4-develop.8",
3
+ "version": "v18.2.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -3,10 +3,54 @@
3
3
  @use '../components/µ';
4
4
 
5
5
  @mixin theme($onemrva-theme, $production: true) {
6
- $typography: map.get($onemrva-theme, 'typography');
7
6
  & {
7
+ $normal-font-size: mat.m2-font-size(
8
+ map.get($onemrva-theme, 'typography'),
9
+ 'subtitle-2'
10
+ );
11
+ $normal-line-height: mat.m2-line-height(
12
+ map.get($onemrva-theme, 'typography'),
13
+ 'subtitle-2'
14
+ );
15
+ $normal-font-weight: mat.m2-font-weight(
16
+ map.get($onemrva-theme, 'typography'),
17
+ 'subtitle-2'
18
+ );
19
+ $button-font-family: mat.m2-font-family(
20
+ map.get($onemrva-theme, 'typography'),
21
+ 'button'
22
+ );
23
+
24
+ --mdc-outlined-text-field-label-text-weight: $normal-font-weight;
25
+
26
+ --mat-form-field-container-height: 44px;
27
+ --mat-form-field-outlined-label-text-populated-size: 12px;
28
+ --mat-form-field-container-text-size: $normal-font-size;
29
+ --mat-form-field-container-text-weight: $normal-font-weight;
30
+
31
+ --mat-select-trigger-text-size: $normal-font-size;
32
+ --mat-select-trigger-text-weight: $normal-font-weight;
33
+
34
+ --mat-option-label-text-size: $normal-font-size;
35
+ --mat-option-label-text-line-height: $normal-line-height;
36
+ --mat-option-label-text-weight: $normal-font-weight;
37
+
38
+ --mat-menu-item-label-text-font: $button-font-family;
39
+ --mat-menu-item-label-text-line-height: $normal-line-height;
40
+ --mat-menu-item-label-text-size: $normal-font-size;
41
+ --mat-menu-item-label-text-weight: $normal-font-weight;
42
+
43
+ --mat-app-label-large-font: $button-font-family;
44
+ --mat-app-label-large-line-height: $normal-line-height;
45
+ --mat-app-label-large-size: $normal-font-size;
46
+
47
+ --mdc-list-list-item-label-text-size: $normal-font-size;
48
+
49
+ --mdc-dialog-supporting-text-size: $normal-font-size;
50
+ --mdc-dialog-supporting-text-weight: $normal-font-weight;
51
+ --mdc-dialog-supporting-text-line-height: $normal-line-height;
52
+
8
53
  color: µ.grayscale($onemrva-theme, 900);
9
- @include mat.m2-typography-level($typography, 'body-1');
10
54
  }
11
55
 
12
56
  @if ($production) {
@@ -22,36 +66,4 @@
22
66
  @import url('https://cdn.servicesval.rvaonem.fgov.be/font/material/import.css');
23
67
  }
24
68
  }
25
-
26
- .mat-small {
27
- @include mat.m2-typography-level($typography, 'body-2');
28
- }
29
-
30
- .mat-body-strong,
31
- .mat-semibold {
32
- font-weight: 600;
33
- }
34
-
35
- .heading {
36
- @include mat.m2-typography-level($typography, 'headline-1');
37
- }
38
-
39
- h1 {
40
- @include mat.m2-typography-level($typography, 'headline-1');
41
- }
42
- h2 {
43
- @include mat.m2-typography-level($typography, 'headline-2');
44
- }
45
- h3 {
46
- @include mat.m2-typography-level($typography, 'headline-3');
47
- }
48
- h4 {
49
- @include mat.m2-typography-level($typography, 'headline-4');
50
- }
51
- h5 {
52
- @include mat.m2-typography-level($typography, 'headline-5');
53
- }
54
- h6 {
55
- @include mat.m2-typography-level($typography, 'headline-6');
56
- }
57
69
  }
@@ -57,48 +57,59 @@ $onemrva-typography: mat.m2-define-typography-config(
57
57
 
58
58
  // Define h1 to h6 with mat.m2-define-typography-level(font-size, line-height, font-weight)
59
59
  $headline-1:
60
- mat.m2-define-typography-level(29px, 51px, 600, $header-font-family),
60
+ mat.m2-define-typography-level(140px, 160px, 700, $header-font-family),
61
61
  $headline-2:
62
- mat.m2-define-typography-level(26px, 46px, 600, $header-font-family),
62
+ mat.m2-define-typography-level(60px, 72px, 700, $header-font-family),
63
63
  $headline-3:
64
- mat.m2-define-typography-level(23px, 40px, 600, $header-font-family),
64
+ mat.m2-define-typography-level(48px, 60px, 700, $header-font-family),
65
65
  $headline-4:
66
- mat.m2-define-typography-level(20px, 35px, 700, $header-font-family),
66
+ mat.m2-define-typography-level(36px, 58px, 700, $header-font-family),
67
67
  $headline-5:
68
- mat.m2-define-typography-level(18px, 32px, 600, $header-font-family),
68
+ mat.m2-define-typography-level(29px, 51px, 600, $header-font-family),
69
+ // H1
69
70
  $headline-6:
70
- mat.m2-define-typography-level(16px, 28px, 600, $header-font-family),
71
+ mat.m2-define-typography-level(26px, 46px, 600, $header-font-family),
72
+ // H2
73
+ $subtitle-1:
74
+ mat.m2-define-typography-level(23px, 40px, 600, $header-font-family),
75
+ // H3
76
+ $subtitle-2:
77
+ mat.m2-define-typography-level(16px, 26px, 600, $default-font-family),
78
+ // body
71
79
  // Define body text
72
80
  $body-1: mat.m2-define-typography-level(
73
- 16px,
74
- 26px,
75
- 400,
81
+ 20px,
82
+ 35px,
83
+ 700,
76
84
  $default-font-family
77
85
  ),
86
+ // H4
78
87
  // Regular body text
79
88
  $body-2: mat.m2-define-typography-level(
80
- 14px,
81
- 21px,
89
+ 16px,
90
+ 26px,
82
91
  400,
83
92
  $default-font-family
84
93
  ),
94
+ // body
95
+ // mat.m2-define-typography-level(18px, 32px, 600, $header-font-family), // H5 H6
85
96
  // Secondary body text
86
97
  // Optional: You can define other typography levels like caption, button, etc.
87
98
  $button: mat.m2-define-typography-level(16px, 21px, 500, $header-font-family),
88
- $caption: mat.m2-define-typography-level(12px, 16px, 400),
89
- $overline: mat.m2-define-typography-level(10px, 16px, 400),
99
+ $caption: mat.m2-define-typography-level(14px, 16px, 400),
100
+ $overline: mat.m2-define-typography-level(12px, 16px, 400),
90
101
  );
91
102
 
92
- $onemrva-typography: map.merge(
93
- $onemrva-typography,
94
- (
95
- label-button:
96
- mat.m2-define-typography-level(14px, 21px, 500, $header-font-family),
97
- label-smallbutton:
98
- mat.m2-define-typography-level(14px, 21px, 400, $header-font-family),
99
- mat-h4: mat.m2-define-typography-level(20px, 35px, 700, $header-font-family),
100
- )
101
- );
103
+ //$onemrva-typography: map.merge(
104
+ // $onemrva-typography,
105
+ // (
106
+ // label-button:
107
+ // mat.m2-define-typography-level(14px, 21px, 500, $header-font-family),
108
+ // label-smallbutton:
109
+ // mat.m2-define-typography-level(14px, 21px, 400, $header-font-family),
110
+ // mat-h4: mat.m2-define-typography-level(20px, 35px, 700, $header-font-family),
111
+ // )
112
+ //);
102
113
 
103
114
  $onemrva-primary: mat.m2-define-palette(palettes.$primary-palette);
104
115
  $onemrva-accent: mat.m2-define-palette(palettes.$accent-palette);