@onemrvapublic/design-system-theme 0.0.0-semantically-released

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 (48) hide show
  1. package/README.md +1 -0
  2. package/assets/img/no-result.svg +124 -0
  3. package/fesm2022/onemrvapublic-design-system-theme.mjs +43 -0
  4. package/fesm2022/onemrvapublic-design-system-theme.mjs.map +1 -0
  5. package/index.d.ts +9 -0
  6. package/index.scss +212 -0
  7. package/overrides/_button-toggle.scss +14 -0
  8. package/overrides/_button.scss +128 -0
  9. package/overrides/_cards.scss +11 -0
  10. package/overrides/_carousel.scss +13 -0
  11. package/overrides/_checkbox.scss +46 -0
  12. package/overrides/_chips.scss +42 -0
  13. package/overrides/_dialogs.scss +130 -0
  14. package/overrides/_divider.scss +9 -0
  15. package/overrides/_drag-and-drop.scss +74 -0
  16. package/overrides/_expansion.scss +40 -0
  17. package/overrides/_fab.scss +45 -0
  18. package/overrides/_form-field.scss +40 -0
  19. package/overrides/_icon-button.scss +18 -0
  20. package/overrides/_icon.scss +97 -0
  21. package/overrides/_input.scss +237 -0
  22. package/overrides/_layout.scss +35 -0
  23. package/overrides/_menu.scss +25 -0
  24. package/overrides/_panel.scss +66 -0
  25. package/overrides/_progress-bar.scss +29 -0
  26. package/overrides/_radio.scss +17 -0
  27. package/overrides/_select.scss +75 -0
  28. package/overrides/_slide-toggle.scss +23 -0
  29. package/overrides/_stepper.scss +196 -0
  30. package/overrides/_stickers.scss +13 -0
  31. package/overrides/_table.scss +111 -0
  32. package/overrides/_tabs.scss +24 -0
  33. package/overrides/_toast.scss +16 -0
  34. package/overrides/_toc.scss +26 -0
  35. package/overrides/_toolbar.scss +18 -0
  36. package/overrides/_tooltip.scss +17 -0
  37. package/package.json +23 -0
  38. package/palettes/_palette.scss +188 -0
  39. package/utilities/_animations.scss +54 -0
  40. package/utilities/_container.scss +42 -0
  41. package/utilities/_fonts.scss +158 -0
  42. package/utilities/_grid.scss +75 -0
  43. package/utilities/_media.scss +33 -0
  44. package/utilities/_palettes.scss +119 -0
  45. package/utilities/_spacing.scss +86 -0
  46. package/utilities/_tokens.scss +85 -0
  47. package/utilities/_utilities.scss +333 -0
  48. package/utilities/_variables.scss +51 -0
@@ -0,0 +1,75 @@
1
+ @use '../utilities/variables' as variables;
2
+ @use '../utilities/media' as media;
3
+ @use 'sass:list';
4
+
5
+ @mixin colrules($suffix: '') {
6
+ @for $i from 0 through 12 {
7
+ $width: 0;
8
+ @if $i > 0 {
9
+ $width: calc(100 / 12) * $i;
10
+ }
11
+ .col-#{$i}#{$suffix} {
12
+ flex: 0 0 auto !important;
13
+ width: $width + 0% !important;
14
+ }
15
+ .offset-#{$i}#{$suffix} {
16
+ margin-left: $width + 0% !important;
17
+ }
18
+ }
19
+ }
20
+ @mixin grid() {
21
+ .row {
22
+ display: flex !important;
23
+ flex-wrap: wrap !important;
24
+ margin: 0 !important;
25
+ padding: 0 !important;
26
+ width: 100% !important;
27
+
28
+ --bs-gutter-x: 0 !important;
29
+ --bs-gutter-y: 0 !important;
30
+
31
+ & > * {
32
+ flex-shrink: 0 !important;
33
+ width: 100% !important;
34
+ max-width: 100% !important;
35
+ padding-right: var(--bs-gutter-x) !important;
36
+ padding-left: var(--bs-gutter-x) !important;
37
+ margin-top: var(--bs-gutter-y) !important;
38
+ }
39
+ .col,
40
+ .col-auto,
41
+ div[class^='col-'],
42
+ div[class*=' col-'] {
43
+ border: none !important;
44
+ box-sizing: border-box !important;
45
+ display: block !important;
46
+ }
47
+ .col,
48
+ .col-auto {
49
+ width: auto !important;
50
+ flex: 1 0 0 !important;
51
+ }
52
+ .offset-auto {
53
+ margin-left: auto !important;
54
+ }
55
+
56
+ @include colrules();
57
+
58
+ @each $breakpoint in variables.$breakpoints {
59
+ @include media.media(variables.$breakpoints, list.nth($breakpoint, 1)) {
60
+ $sfx: -#{list.nth($breakpoint, 1)};
61
+ @include colrules($sfx);
62
+ }
63
+ }
64
+ }
65
+ @each $spacer in variables.$spacers {
66
+ .gx#{list.nth($spacer, 1)},
67
+ .g#{list.nth($spacer, 1)} {
68
+ --bs-gutter-x: #{list.nth($spacer, 2)} !important;
69
+ }
70
+ .gy#{list.nth($spacer, 1)},
71
+ .g#{list.nth($spacer, 1)} {
72
+ --bs-gutter-y: #{list.nth($spacer, 2)} !important;
73
+ }
74
+ }
75
+ }
@@ -0,0 +1,33 @@
1
+ @use '../utilities/variables' as variables;
2
+ @use 'sass:map';
3
+
4
+ @mixin media($breakpoints, $from, $to: false) {
5
+ $min: false;
6
+ $max: false;
7
+ @if $from {
8
+ $min: map.get(map.get(variables.$breakpoints, $from), min);
9
+ }
10
+ @if $to {
11
+ $max: map.get(map.get(variables.$breakpoints, $to), max);
12
+ }
13
+
14
+ @if $min {
15
+ @if $max {
16
+ @media (min-width: #{$min}px) and (max-width: #{$max}px) {
17
+ @content;
18
+ }
19
+ } @else {
20
+ @media (min-width: #{$min}px) {
21
+ @content;
22
+ }
23
+ }
24
+ } @else {
25
+ @if $max {
26
+ @media (max-width: #{$max}px) {
27
+ @content;
28
+ }
29
+ } @else {
30
+ @content;
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,119 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use '../palettes/palette' as palette;
4
+
5
+ $_rest: (
6
+ secondary: map.get(palette.$palette, secondary),
7
+ neutral: map.get(palette.$palette, neutral),
8
+ 'neutral-variant': map.get(palette.$palette, 'neutral-variant'),
9
+ error: map.get(palette.$palette, error),
10
+ );
11
+
12
+ $primary-palette: map.merge(map.get(palette.$palette, primary), $_rest);
13
+ $secondary-palette: map.merge(map.get(palette.$palette, secondary), $_rest);
14
+ $tertiary-palette: map.merge(map.get(palette.$palette, tertiary), $_rest);
15
+ $success-palette: map.merge(map.get(palette.$palette, success), $_rest);
16
+ $warn-palette: map.merge(map.get(palette.$palette, warn), $_rest);
17
+ $info-palette: map.merge(map.get(palette.$palette, info), $_rest);
18
+ $error-palette: map.merge(map.get(palette.$palette, error), $_rest);
19
+ $neutral-palette: map.merge(
20
+ map.get(palette.$palette, 'neutral-variant'),
21
+ $_rest
22
+ );
23
+
24
+ //@function _high-contrast-value($light, $dark, $theme-type) {
25
+ // @if ($theme-type == light) {
26
+ // @return $light;
27
+ // }
28
+ // @if ($theme-type == dark) {
29
+ // @return $dark;
30
+ // }
31
+ // @if ($theme-type == color-scheme) {
32
+ // @return light-dark(#{$light}, #{$dark});
33
+ // }
34
+ //
35
+ // @error 'Unknown theme-type #{$theme-type}. Expected light, dark, or color-scheme';
36
+ //}
37
+ //
38
+ //@mixin high-contrast-overrides($theme-type) {
39
+ // @include mat.theme-overrides(
40
+ // (
41
+ // primary: _high-contrast-value(#292264, #f2eeff, $theme-type),
42
+ // on-primary: _high-contrast-value(#ffffff, #000000, $theme-type),
43
+ // primary-container: _high-contrast-value(#464083, #c2bbff, $theme-type),
44
+ // on-primary-container: _high-contrast-value(#ffffff, #080039, $theme-type),
45
+ // inverse-primary: _high-contrast-value(#c6c0ff, #453f82, $theme-type),
46
+ // primary-fixed: _high-contrast-value(#464083, #e4dfff, $theme-type),
47
+ // primary-fixed-dim: _high-contrast-value(#2f296b, #c6c0ff, $theme-type),
48
+ // on-primary-fixed: _high-contrast-value(#ffffff, #000000, $theme-type),
49
+ // on-primary-fixed-variant: _high-contrast-value(
50
+ // #ffffff,
51
+ // #0c0049,
52
+ // $theme-type
53
+ // ),
54
+ // secondary: _high-contrast-value(#600009, #ffecea, $theme-type),
55
+ // on-secondary: _high-contrast-value(#ffffff, #000000, $theme-type),
56
+ // secondary-container: _high-contrast-value(#970014, #ffaea7, $theme-type),
57
+ // on-secondary-container: _high-contrast-value(
58
+ // #ffffff,
59
+ // #220001,
60
+ // $theme-type
61
+ // ),
62
+ // secondary-fixed: _high-contrast-value(#970014, #ffdad7, $theme-type),
63
+ // secondary-fixed-dim: _high-contrast-value(#6d000b, #ffb3ad, $theme-type),
64
+ // on-secondary-fixed: _high-contrast-value(#ffffff, #000000, $theme-type),
65
+ // on-secondary-fixed-variant: _high-contrast-value(
66
+ // #ffffff,
67
+ // #2d0002,
68
+ // $theme-type
69
+ // ),
70
+ // tertiary: _high-contrast-value(#00341c, #bdffd1, $theme-type),
71
+ // on-tertiary: _high-contrast-value(#ffffff, #000000, $theme-type),
72
+ // tertiary-container: _high-contrast-value(#005530, #78d69c, $theme-type),
73
+ // on-tertiary-container: _high-contrast-value(#ffffff, #000f05, $theme-type),
74
+ // tertiary-fixed: _high-contrast-value(#005530, #97f6ba, $theme-type),
75
+ // tertiary-fixed-dim: _high-contrast-value(#003b20, #7cdaa0, $theme-type),
76
+ // on-tertiary-fixed: _high-contrast-value(#ffffff, #000000, $theme-type),
77
+ // on-tertiary-fixed-variant: _high-contrast-value(
78
+ // #ffffff,
79
+ // #001508,
80
+ // $theme-type
81
+ // ),
82
+ // background: _high-contrast-value(#fbf8ff, #131319, $theme-type),
83
+ // on-background: _high-contrast-value(#1b1b21, #e4e1ea, $theme-type),
84
+ // surface: _high-contrast-value(#fbf8ff, #131319, $theme-type),
85
+ // surface-dim: _high-contrast-value(#bab8c0, #131319, $theme-type),
86
+ // surface-bright: _high-contrast-value(#fbf8ff, #504f56, $theme-type),
87
+ // surface-container-lowest: _high-contrast-value(
88
+ // #ffffff,
89
+ // #000000,
90
+ // $theme-type
91
+ // ),
92
+ // surface-container: _high-contrast-value(#e4e1ea, #303036, $theme-type),
93
+ // surface-container-high: _high-contrast-value(
94
+ // #d6d3db,
95
+ // #3b3b41,
96
+ // $theme-type
97
+ // ),
98
+ // surface-container-highest: _high-contrast-value(
99
+ // #c8c5cd,
100
+ // #47464d,
101
+ // $theme-type
102
+ // ),
103
+ // on-surface: _high-contrast-value(#000000, #ffffff, $theme-type),
104
+ // shadow: _high-contrast-value(#000000, #000000, $theme-type),
105
+ // scrim: _high-contrast-value(#000000, #000000, $theme-type),
106
+ // surface-tint: _high-contrast-value(#6e68ae, #c6c0ff, $theme-type),
107
+ // inverse-surface: _high-contrast-value(#303036, #e4e1ea, $theme-type),
108
+ // inverse-on-surface: _high-contrast-value(#ffffff, #000000, $theme-type),
109
+ // outline: _high-contrast-value(#19009a, #f1eeff, $theme-type),
110
+ // outline-variant: _high-contrast-value(#3322d5, #bebcff, $theme-type),
111
+ // error: _high-contrast-value(#5b0d00, #ffece8, $theme-type),
112
+ // on-error: _high-contrast-value(#ffffff, #000000, $theme-type),
113
+ // error-container: _high-contrast-value(#901a00, #ffaf9c, $theme-type),
114
+ // on-error-container: _high-contrast-value(#ffffff, #200200, $theme-type),
115
+ // surface-variant: _high-contrast-value(#e2dfff, #301ed3, $theme-type),
116
+ // on-surface-variant: _high-contrast-value(#000000, #ffffff, $theme-type),
117
+ // )
118
+ // );
119
+ //}
@@ -0,0 +1,86 @@
1
+ @use '../utilities/variables' as variables;
2
+ @use '../utilities/media' as media;
3
+ @use 'sass:map';
4
+ @use 'sass:list';
5
+
6
+ @mixin padmarrules($name, $selector, $suffix, $value) {
7
+ .#{$selector}l#{$suffix},
8
+ .#{$selector}s#{$suffix} {
9
+ #{$name}-left: #{$value} !important;
10
+ }
11
+ .#{$selector}r#{$suffix},
12
+ .#{$selector}e#{$suffix} {
13
+ #{$name}-right: #{$value} !important;
14
+ }
15
+ .#{$selector}t#{$suffix} {
16
+ #{$name}-top: #{$value} !important;
17
+ }
18
+ .#{$selector}b#{$suffix} {
19
+ #{$name}-bottom: #{$value} !important;
20
+ }
21
+ .#{$selector}x#{$suffix} {
22
+ #{$name}-right: #{$value} !important;
23
+ #{$name}-left: #{$value} !important;
24
+ }
25
+ .#{$selector}y#{$suffix} {
26
+ #{$name}-top: #{$value} !important;
27
+ #{$name}-bottom: #{$value} !important;
28
+ }
29
+ .#{$selector}#{$suffix} {
30
+ #{$name}: #{$value} !important;
31
+ }
32
+ }
33
+ @mixin gaprules($suffix, $value) {
34
+ .g#{$suffix} {
35
+ gap: $value !important;
36
+ }
37
+ .gc#{$suffix} {
38
+ column-gap: $value !important;
39
+ }
40
+ .gr#{$suffix} {
41
+ row-gap: $value !important;
42
+ }
43
+ }
44
+
45
+ @mixin spacing() {
46
+ @each $spacer in variables.$spacers {
47
+ @include padmarrules(
48
+ $name: 'padding',
49
+ $selector: 'p',
50
+ $suffix: list.nth($spacer, 1),
51
+ $value: list.nth($spacer, 2)
52
+ );
53
+ @include padmarrules(
54
+ $name: 'margin',
55
+ $selector: 'm',
56
+ $suffix: list.nth($spacer, 1),
57
+ $value: list.nth($spacer, 2)
58
+ );
59
+
60
+ @include gaprules(
61
+ $suffix: list.nth($spacer, 1),
62
+ $value: list.nth($spacer, 2)
63
+ );
64
+
65
+ @each $breakpoint in variables.$breakpoints {
66
+ //@media (min-width: list.nth($breakpoint, 2)) {
67
+ @include media.media(variables.$breakpoints, list.nth($breakpoint, 1)) {
68
+ $sfx: #{list.nth($spacer, 1)}-#{list.nth($breakpoint, 1)};
69
+ @include padmarrules(
70
+ $name: 'padding',
71
+ $selector: 'p',
72
+ $suffix: $sfx,
73
+ $value: list.nth($spacer, 2)
74
+ );
75
+ @include padmarrules(
76
+ $name: 'margin',
77
+ $selector: 'm',
78
+ $suffix: $sfx,
79
+ $value: list.nth($spacer, 2)
80
+ );
81
+
82
+ @include gaprules($suffix: $sfx, $value: list.nth($spacer, 2));
83
+ }
84
+ }
85
+ }
86
+ }
@@ -0,0 +1,85 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+
4
+ @mixin theme() {
5
+ & {
6
+ --icon-size-xsmall: 0.75rem;
7
+ --icon-size-small: 1rem;
8
+ --icon-size-medium: 1.25rem;
9
+ --icon-size-large: 1.5rem;
10
+ --icon-size-xlarge: 3rem;
11
+ --icon-size-xxlarge: 4rem;
12
+
13
+ --layout-header-height: 90px;
14
+ --layout-content-padding-top: 106px;
15
+ --layout-footer-height: 30px;
16
+
17
+ --box-shadow: 0 2px 6px #00000026;
18
+
19
+ --border-radius: 16px;
20
+ --half-border-radius: 8px;
21
+ --small-border-radius: 4px;
22
+
23
+ --input-height: 46px;
24
+ --paginator-height: 37px;
25
+ --page-size-width: 80px;
26
+
27
+ --triple-spacer: 1.5rem;
28
+ --double-spacer: 1rem;
29
+ --spacer-and-half: 0.75rem;
30
+ --spacer: 0.5rem;
31
+ --half-spacer: 0.25rem;
32
+ --quarter-spacer: 0.125rem;
33
+
34
+ --text-font: Source Sans Pro, sans-serif;
35
+ --brand-font: Poppins, sans-serif;
36
+ --icon-font: Material Icons;
37
+ --button-border-radius: 500px;
38
+
39
+ --background-error-page: url('https://cdn.services.rvaonem.fgov.be/img/404/background.svg');
40
+
41
+ --on-background-gradient: white;
42
+ --background-gradient: transparent
43
+ linear-gradient(90deg, #de2174 0%, #eb142a 100%) 0% 0% no-repeat
44
+ padding-box;
45
+
46
+ --toc-width: 280px;
47
+
48
+ --avatar-size: 3.5rem;
49
+ --avatar-font-size: 2.5rem;
50
+ --avatar-resize: 0.75rem;
51
+
52
+ .onemrva-mat-avatar--xsmall {
53
+ --avatar-size: 2rem;
54
+ --avatar-font-size: 0.75rem;
55
+ --avatar-resize: 0.25rem;
56
+ }
57
+ .onemrva-mat-avatar--small {
58
+ --avatar-size: 2.5rem;
59
+ --avatar-font-size: 1rem;
60
+ --avatar-resize: 0.5rem;
61
+ }
62
+ .onemrva-mat-avatar--large {
63
+ --avatar-size: 4.5rem;
64
+ --avatar-font-size: 2rem;
65
+ --avatar-resize: 1rem;
66
+ }
67
+ .onemrva-mat-avatar--xlarge {
68
+ --avatar-resize: 1.5rem;
69
+ --avatar-size: 8rem;
70
+ --avatar-font-size: 4rem;
71
+ }
72
+
73
+ &:not(.light-theme) {
74
+ @media (prefers-color-scheme: dark) {
75
+ // TODO : dark mode
76
+ --background-error-page: url('https://cdn.services.rvaonem.fgov.be/img/404/background.svg');
77
+ }
78
+ }
79
+
80
+ &.dark-theme {
81
+ // TODO : dark mode
82
+ --background-error-page: url('https://cdn.services.rvaonem.fgov.be/img/404/background.svg');
83
+ }
84
+ }
85
+ }