@devopmaat/badaboom 1.1.1 → 1.2.1

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 (97) hide show
  1. package/README.md +1 -1
  2. package/_index.scss +1 -1
  3. package/esm2022/lib/application/common/full-table/bdb-full-table.component.mjs +43 -0
  4. package/esm2022/lib/application/common/paginator/bdb-paginator.component.mjs +3 -3
  5. package/esm2022/lib/application/common/query-input/bdb-query-input.component.mjs +8 -9
  6. package/esm2022/lib/application/common/search/bdb-search-wrapper.component.mjs +3 -3
  7. package/esm2022/lib/application/common/search/bdb-search.component.mjs +3 -3
  8. package/esm2022/lib/application/common/table/bdb-cell.directive.mjs +3 -3
  9. package/esm2022/lib/application/common/table/bdb-column-builder.mjs +7 -5
  10. package/esm2022/lib/application/common/table/bdb-column-options.mjs +1 -1
  11. package/esm2022/lib/application/common/table/bdb-table.component.mjs +4 -4
  12. package/esm2022/lib/application/common/table/dynamic.pipe.mjs +3 -3
  13. package/esm2022/lib/application/exception-log/exception-log-table/exception-log-table.component.mjs +3 -3
  14. package/esm2022/lib/application/task-log/task-log-outcome.pipe.mjs +3 -3
  15. package/esm2022/lib/application/task-log/task-log-status.pipe.mjs +3 -3
  16. package/esm2022/lib/application/task-log-parameter/task-log-parameter-value.pipe.mjs +3 -3
  17. package/esm2022/lib/application/user/user-table/user-table.component.mjs +3 -3
  18. package/esm2022/lib/common/alert/bdb-alert.component.mjs +5 -5
  19. package/esm2022/lib/common/alert-error-response/bdb-alert-error-response.component.mjs +8 -7
  20. package/esm2022/lib/common/bdb-flex-child.directive.mjs +3 -3
  21. package/esm2022/lib/common/bdb-flex.directive.mjs +3 -3
  22. package/esm2022/lib/common/bdb-form-error.directive.mjs +3 -3
  23. package/esm2022/lib/common/bdb-grid-child.directive.mjs +3 -3
  24. package/esm2022/lib/common/bdb-grid.directive.mjs +3 -3
  25. package/esm2022/lib/common/bdb-palette.mjs +1 -1
  26. package/esm2022/lib/common/boolean-display/bdb-boolean-display.component.mjs +3 -3
  27. package/esm2022/lib/common/collapse-row/collapse-row.component.mjs +31 -0
  28. package/esm2022/lib/common/field/bdb-field.component.mjs +10 -7
  29. package/esm2022/lib/common/function.pipe.mjs +3 -3
  30. package/esm2022/lib/common/plain-number-pipe.mjs +20 -0
  31. package/esm2022/lib/domain/auth/account.service.mjs +3 -3
  32. package/esm2022/lib/domain/auth/auth.service.mjs +3 -3
  33. package/esm2022/lib/domain/entities/exception-log/exception-log.service.mjs +3 -3
  34. package/esm2022/lib/domain/entities/media/media.service.mjs +3 -3
  35. package/esm2022/lib/domain/entities/role/role.service.mjs +3 -3
  36. package/esm2022/lib/domain/entities/task-log/task-log.service.mjs +3 -3
  37. package/esm2022/lib/domain/entities/task-log-parameter/task-log-parameter.service.mjs +3 -3
  38. package/esm2022/lib/domain/entities/task-log-schedule/task-log-schedule.service.mjs +3 -3
  39. package/esm2022/lib/domain/entities/user/user.service.mjs +3 -3
  40. package/esm2022/lib/domain/entities/user-role/user-role.service.mjs +3 -3
  41. package/esm2022/lib/domain/tasks/task-log-scheduler.service.mjs +3 -3
  42. package/esm2022/lib/domain/tasks/task-log-type.service.mjs +3 -3
  43. package/esm2022/lib/presentation/access-denied-page/access-denied-page.component.mjs +3 -3
  44. package/esm2022/lib/presentation/auth-container/auth-container.component.mjs +3 -3
  45. package/esm2022/lib/presentation/forgot-password-page/forgot-password-page.component.mjs +3 -3
  46. package/esm2022/lib/presentation/invalid-token-page/invalid-token-page.component.mjs +3 -3
  47. package/esm2022/lib/presentation/login-page/login-page.component.mjs +3 -3
  48. package/esm2022/lib/presentation/logout-page/logout-page.component.mjs +3 -3
  49. package/esm2022/lib/presentation/reset-password-page/reset-password-page.component.mjs +3 -3
  50. package/esm2022/public-api.mjs +4 -1
  51. package/fesm2022/devopmaat-badaboom.mjs +347 -259
  52. package/fesm2022/devopmaat-badaboom.mjs.map +1 -1
  53. package/lib/application/common/full-table/bdb-full-table.component.d.ts +24 -0
  54. package/lib/application/common/query-input/_bdb-query-input-m3-theme.scss +30 -0
  55. package/lib/application/common/table/_bdb-table-m3-theme.scss +70 -0
  56. package/lib/application/common/table/bdb-column-options.d.ts +1 -0
  57. package/lib/application/common/table/bdb-table.component.d.ts +2 -2
  58. package/lib/common/alert/_bdb-alert-m3-theme.scss +29 -0
  59. package/lib/common/alert-error-response/bdb-alert-error-response.component.d.ts +1 -0
  60. package/lib/common/bdb-palette.d.ts +1 -0
  61. package/lib/common/boolean-display/_bdb-boolean-display-m3-theme.scss +27 -0
  62. package/lib/common/collapse-row/_collapse-row-theme.scss +37 -0
  63. package/lib/common/collapse-row/collapse-row.component.d.ts +9 -0
  64. package/lib/common/field/_bdb-field-m2-theme.scss +13 -0
  65. package/lib/common/field/_bdb-field-m3-theme.scss +56 -0
  66. package/lib/common/field/bdb-field.component.d.ts +1 -0
  67. package/lib/common/plain-number-pipe.d.ts +7 -0
  68. package/lib/styles/_core-theme.scss +29 -0
  69. package/lib/styles/_theme.scss +157 -0
  70. package/lib/styles/material/_badge-m3-theme.scss +35 -0
  71. package/lib/styles/material/_button-m3-theme.scss +84 -0
  72. package/lib/styles/material/_card-m3-theme.scss +34 -0
  73. package/lib/styles/material/_checkbox-m3-theme.scss +54 -0
  74. package/lib/styles/material/_chips-m3-theme.scss +58 -0
  75. package/lib/styles/material/_datepicker-m3-theme.scss +84 -0
  76. package/lib/styles/material/_fab-m3-theme.scss +84 -0
  77. package/lib/styles/material/_form-field-m3-theme.scss +36 -0
  78. package/lib/styles/material/_icon-m3-theme.scss +32 -0
  79. package/lib/styles/material/_option-m3-theme.scss +34 -0
  80. package/lib/styles/material/_progress-bar-m3-theme.scss +31 -0
  81. package/lib/styles/material/_progress-spinner-m3-theme.scss +30 -0
  82. package/lib/styles/material/_radio-m3-theme.scss +42 -0
  83. package/lib/styles/material/_slide-toggle-m3-theme.scss +68 -0
  84. package/lib/styles/material/_slider-m3-theme.scss +48 -0
  85. package/lib/styles/material/_stepper-m3-theme.scss +44 -0
  86. package/lib/styles/material/_tabs-m3-theme.scss +32 -0
  87. package/lib/styles/material/_toolbar-m3-theme.scss +63 -0
  88. package/package.json +1 -1
  89. package/public-api.d.ts +3 -0
  90. package/lib/_theme.scss +0 -32
  91. /package/lib/application/common/query-input/{_bdb-query-input-theme.scss → _bdb-query-input-m2-theme.scss} +0 -0
  92. /package/lib/application/common/search/{_bdb-search-theme.scss → _bdb-search-m2-theme.scss} +0 -0
  93. /package/lib/application/common/table/{_bdb-table-theme.scss → _bdb-table-m2-theme.scss} +0 -0
  94. /package/lib/common/{_button-theme.scss → _button-m2-theme.scss} +0 -0
  95. /package/lib/common/{_icon-theme.scss → _icon-m2-theme.scss} +0 -0
  96. /package/lib/common/alert/{_bdb-alert-theme.scss → _bdb-alert-m2-theme.scss} +0 -0
  97. /package/lib/common/boolean-display/{_bdb-boolean-display-theme.scss → _bdb-boolean-display-m2-theme.scss} +0 -0
@@ -0,0 +1,24 @@
1
+ import { SelectionModel } from '@angular/cdk/collections';
2
+ import { EventEmitter } from '@angular/core';
3
+ import { BdbEntity } from '../../../domain/common/entities/bdb-entity';
4
+ import { BdbDataSource } from '../bdb-data-source';
5
+ import { BdbColumn } from '../table/bdb-column';
6
+ import { BdbContextAction } from '../table/bdb-context-action';
7
+ import { BdbM3Palette } from '../../../common/bdb-palette';
8
+ import * as i0 from "@angular/core";
9
+ export declare class BdbFullTableComponent<TEntityRead extends BdbEntity> {
10
+ dataSource: BdbDataSource<TEntityRead>;
11
+ columns: BdbColumn<TEntityRead, unknown>[];
12
+ displayedColumns: string[];
13
+ selection?: SelectionModel<TEntityRead>;
14
+ contextActions: BdbContextAction<TEntityRead>[];
15
+ rowColor?: (x: TEntityRead) => BdbM3Palette;
16
+ showToolbar: boolean;
17
+ rowClick: EventEmitter<TEntityRead>;
18
+ contextAction: EventEmitter<{
19
+ action: BdbContextAction<TEntityRead>;
20
+ row: TEntityRead;
21
+ }>;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<BdbFullTableComponent<any>, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<BdbFullTableComponent<any>, "bdb-full-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "contextActions": { "alias": "contextActions"; "required": false; }; "rowColor": { "alias": "rowColor"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; }, { "rowClick": "rowClick"; "contextAction": "contextAction"; }, never, ["toolbar-item", "*"], true, never>;
24
+ }
@@ -0,0 +1,30 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use '../../../styles/core-theme' as bdb;
4
+
5
+ @mixin color($theme) {
6
+ .bdb-query-input {
7
+ background: var(--mdc-filled-text-field-container-color);
8
+ border: 1px solid rgba(0, 0, 0, 0.12);
9
+ &:focus-within {
10
+ border-color: var(--sys-info);
11
+ }
12
+
13
+ input {
14
+ color: var(--mdc-filled-text-field-input-text-color);
15
+ }
16
+ }
17
+ }
18
+
19
+ @mixin typography($theme) {
20
+ }
21
+
22
+ @mixin theme($theme) {
23
+ @if mat.theme-has($theme, color) {
24
+ @include color($theme);
25
+ }
26
+
27
+ @if mat.theme-has($theme, typography) {
28
+ @include typography($theme);
29
+ }
30
+ }
@@ -0,0 +1,70 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use '../../../styles/core-theme' as bdb;
4
+
5
+ @mixin color($theme) {
6
+ & {
7
+ @each $palette-name in bdb.$palette-names {
8
+ @if mat.get-theme-type($theme) == dark {
9
+ --bdb-table-row-#{$palette-name}: #{bdb.bdb-get-theme-color($theme, $palette-name, 10)};
10
+ --bdb-table-row-#{$palette-name}-selected-hover: #{bdb.bdb-get-theme-color($theme, $palette-name, 40)};
11
+ } @else {
12
+ --bdb-table-row-#{$palette-name}: #{bdb.bdb-get-theme-color($theme, $palette-name, 95)};
13
+ --bdb-table-row-#{$palette-name}-selected-hover: #{bdb.bdb-get-theme-color($theme, $palette-name, 80)};
14
+ }
15
+ }
16
+ }
17
+
18
+ .bdb-table {
19
+ tbody tr {
20
+ &.selected {
21
+ background-color: var(--sys-info-container);
22
+ color: var(--sys-on-info-container);
23
+ }
24
+
25
+ @each $palette-name in bdb.$palette-names {
26
+ &.bdb-#{$palette-name} {
27
+ background-color: var(--bdb-table-row-#{$palette-name});
28
+ color: var(--sys-on-#{$palette-name}-container);
29
+ &.selected {
30
+ background-color: var(--sys-#{$palette-name}-container);
31
+ }
32
+ }
33
+ }
34
+ }
35
+
36
+ &.is-clickable tbody tr {
37
+ &:hover {
38
+ background-color: var(--sys-info-container);
39
+ }
40
+ &.selected:hover {
41
+ background-color: var(--bdb-table-row-info-selected-hover);
42
+ }
43
+
44
+ @each $palette-name in bdb.$palette-names {
45
+ &.bdb-#{$palette-name} {
46
+ &:hover {
47
+ background-color: var(--sys-#{$palette-name}-container);
48
+ color: var(--sys-on-#{$palette-name}-container);
49
+ }
50
+ &.selected:hover {
51
+ background-color: var(--bdb-table-row-#{$palette-name}-selected-hover);
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+
59
+ @mixin typography($theme) {
60
+ }
61
+
62
+ @mixin theme($theme) {
63
+ @if mat.theme-has($theme, color) {
64
+ @include color($theme);
65
+ }
66
+
67
+ @if mat.theme-has($theme, typography) {
68
+ @include typography($theme);
69
+ }
70
+ }
@@ -15,6 +15,7 @@ export interface BdbEnumColumnOptions extends BdbColumnOptions {
15
15
  pipe?: Type<PipeTransform>;
16
16
  }
17
17
  export interface BdbNumberColumnOptions extends BdbColumnOptions {
18
+ pipe?: Type<PipeTransform>;
18
19
  format?: string;
19
20
  }
20
21
  export interface BdbPercentageColumnOptions extends BdbColumnOptions {
@@ -9,7 +9,7 @@ import { BdbDataSource } from '../bdb-data-source';
9
9
  import { BdbContextAction } from './bdb-context-action';
10
10
  import { BdbCellDirective } from './bdb-cell.directive';
11
11
  import { BdbColumnType } from './bdb-column-type';
12
- import { BdbPalette } from '../../../common/bdb-palette';
12
+ import { BdbPalette, BdbM3Palette } from '../../../common/bdb-palette';
13
13
  import * as i0 from "@angular/core";
14
14
  export declare class BdbTableComponent<TRead extends BdbEntity> implements OnInit, OnChanges, AfterContentInit, OnDestroy {
15
15
  private readonly _onDestroy;
@@ -34,7 +34,7 @@ export declare class BdbTableComponent<TRead extends BdbEntity> implements OnIni
34
34
  x: string;
35
35
  y: string;
36
36
  };
37
- rowColor?: (x: TRead) => BdbPalette;
37
+ rowColor?: (x: TRead) => BdbPalette | BdbM3Palette;
38
38
  trackById: TrackByFunction<BdbEntity>;
39
39
  ngOnInit(): void;
40
40
  ngOnChanges(): void;
@@ -0,0 +1,29 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use '../../styles/core-theme' as bdb;
4
+
5
+ @mixin color($theme) {
6
+ @each $palette-name in bdb.$palette-names {
7
+ .#{$palette-name}.bdb-alert,
8
+ .bdb-#{$palette-name}.bdb-alert {
9
+ --bdb-alert-container-color: var(--sys-#{$palette-name});
10
+ --bdb-alert-content-container-color: var(--sys-#{$palette-name}-container);
11
+ --bdb-alert-content-color: var(--sys-on-#{$palette-name}-container);
12
+ --bdb-alert-icon-color: var(--sys-on-#{$palette-name});
13
+ --bdb-alert-border-color: var(--sys-#{$palette-name});
14
+ }
15
+ }
16
+ }
17
+
18
+ @mixin typography($theme) {
19
+ }
20
+
21
+ @mixin theme($theme) {
22
+ @if mat.theme-has($theme, color) {
23
+ @include color($theme);
24
+ }
25
+
26
+ @if mat.theme-has($theme, typography) {
27
+ @include typography($theme);
28
+ }
29
+ }
@@ -5,6 +5,7 @@ import * as i0 from "@angular/core";
5
5
  export declare class BdbAlertErrorResponseComponent implements OnChanges {
6
6
  value: HttpErrorResponse | undefined | null;
7
7
  loginFailed: boolean;
8
+ alertClass: string;
8
9
  color: BdbPalette;
9
10
  icon: string;
10
11
  label: string;
@@ -1 +1,2 @@
1
1
  export type BdbPalette = 'primary' | 'accent' | 'danger' | 'warn' | 'success' | 'info' | undefined;
2
+ export type BdbM3Palette = 'primary' | 'secondary' | 'tertiary' | 'error' | 'warn' | 'success' | 'info' | undefined;
@@ -0,0 +1,27 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use '../../styles/core-theme' as bdb;
4
+
5
+ @mixin color($theme) {
6
+ .bdb-boolean-display {
7
+ .false {
8
+ color: var(--sys-error);
9
+ }
10
+ .true {
11
+ color: var(--sys-success);
12
+ }
13
+ }
14
+ }
15
+
16
+ @mixin typography($theme) {
17
+ }
18
+
19
+ @mixin theme($theme) {
20
+ @if mat.theme-has($theme, color) {
21
+ @include color($theme);
22
+ }
23
+
24
+ @if mat.theme-has($theme, typography) {
25
+ @include typography($theme);
26
+ }
27
+ }
@@ -0,0 +1,37 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+
4
+ @mixin color($theme) {
5
+ .bdb-collapse-row .indicator {
6
+ .top,
7
+ .middle,
8
+ .bottom {
9
+ color: var(--sys-on-surface);
10
+ background-color: var(--sys-surface-container);
11
+ }
12
+ }
13
+
14
+ @each $palette-name in primary, secondary, tertiary, error, success, warn, info {
15
+ .bdb-collapse-row.#{$palette-name} .indicator {
16
+ .top,
17
+ .middle,
18
+ .bottom {
19
+ color: var(--sys-on-#{$palette-name}-container);
20
+ background-color: var(--sys-#{$palette-name}-container);
21
+ }
22
+ }
23
+ }
24
+ }
25
+
26
+ @mixin typography($theme) {
27
+ }
28
+
29
+ @mixin theme($theme) {
30
+ @if mat.theme-has($theme, color) {
31
+ @include color($theme);
32
+ }
33
+
34
+ @if mat.theme-has($theme, typography) {
35
+ @include typography($theme);
36
+ }
37
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class BdbCollapseRowComponent {
3
+ collapsed: boolean;
4
+ canCollapse: boolean;
5
+ class: string;
6
+ get isCollapsed(): boolean;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<BdbCollapseRowComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<BdbCollapseRowComponent, "bdb-collapse-row", never, { "collapsed": { "alias": "collapsed"; "required": false; }; "canCollapse": { "alias": "canCollapse"; "required": false; }; }, {}, never, ["left", "right"], true, never>;
9
+ }
@@ -0,0 +1,13 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+
4
+ @mixin theme($theme) {
5
+ .bdb-field {
6
+ background-color: rgba(0, 0, 0, 0.02);
7
+ min-height: 56px;
8
+ gap: 4px;
9
+ .field-label {
10
+ color: rgba(0, 0, 0, 0.38);
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,56 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use '../../styles/core-theme' as bdb;
4
+
5
+ @mixin color($theme) {
6
+ & {
7
+ --bdb-field-border-color: var(--sys-surface-container-high);
8
+ --bdb-field-color: var(--sys-on-surface);
9
+ --bdb-field-label-color: var(--sys-on-surface-variant);
10
+
11
+ @if mat.get-theme-type($theme) == dark {
12
+ --bdb-field-container-color: var(--sys-surface-container);
13
+ } @else {
14
+ --bdb-field-container-color: var(--sys-surface-container-low);
15
+ }
16
+ }
17
+
18
+ .bdb-field {
19
+ background-color: var(--bdb-field-container-color);
20
+ border: 1px solid var(--bdb-field-border-color);
21
+ border-bottom-width: 2px;
22
+ color: var(--bdb-field-color);
23
+ border-bottom-right-radius: 0;
24
+ border-bottom-left-radius: 0;
25
+ border-top-left-radius: var(--mdc-filled-text-field-container-shape);
26
+ border-top-right-radius: var(--mdc-filled-text-field-container-shape);
27
+ min-height: 52px;
28
+ gap: 2px;
29
+
30
+ .field-label {
31
+ color: var(--bdb-field-label-color);
32
+ }
33
+ }
34
+
35
+ @each $palette-name in bdb.$palette-names {
36
+ .#{$palette-name}.bdb-field {
37
+ border-bottom-color: var(--sys-#{$palette-name});
38
+ &.container {
39
+ border-bottom-color: var(--sys-#{$palette-name}-container);
40
+ }
41
+ }
42
+ }
43
+ }
44
+
45
+ @mixin typography($theme) {
46
+ }
47
+
48
+ @mixin theme($theme) {
49
+ @if mat.theme-has($theme, color) {
50
+ @include color($theme);
51
+ }
52
+
53
+ @if mat.theme-has($theme, typography) {
54
+ @include typography($theme);
55
+ }
56
+ }
@@ -1,5 +1,6 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class BdbFieldComponent {
3
+ class: string;
3
4
  label: string;
4
5
  static ɵfac: i0.ɵɵFactoryDeclaration<BdbFieldComponent, never>;
5
6
  static ɵcmp: i0.ɵɵComponentDeclaration<BdbFieldComponent, "bdb-field", never, { "label": { "alias": "label"; "required": false; }; }, {}, never, ["*"], true, never>;
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class PlainNumberPipe implements PipeTransform {
4
+ transform(value: number | undefined): string | undefined;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<PlainNumberPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<PlainNumberPipe, "bdbPlainNumber", true>;
7
+ }
@@ -0,0 +1,29 @@
1
+ @use 'sass:map';
2
+ @use 'sass:list';
3
+ @use '@angular/material' as mat;
4
+
5
+ $material-palettes: 'primary', 'secondary', 'tertiary', 'error';
6
+ $badaboom-palettes: 'info', 'success', 'warn';
7
+
8
+ $palette-names: list.join($material-palettes, $badaboom-palettes, $separator: auto, $bracketed: auto);
9
+
10
+ @function bdb-get-theme-color($bdb-theme, $palette-name, $hue) {
11
+ @if not list.index($palette-names, $palette-name) {
12
+ @error "#{$palette-name} is not a valid BaDaBoom palette. Expected one of #{$palette-names}.";
13
+ }
14
+ @if not list.index($material-palettes, $palette-name) {
15
+ $colors: map-get($bdb-theme, color);
16
+ @if type-of($colors) == 'map' {
17
+ $palette-map: map-get($colors, $palette-name);
18
+ @if type-of($palette-map) == 'map' {
19
+ @return map-get($palette-map, $hue);
20
+ } @else {
21
+ @warn "Make sure `#{$palette-name}` is a Sass map.";
22
+ }
23
+ } @else {
24
+ @warn "Make sure `color` is a Sass map.";
25
+ }
26
+ } @else {
27
+ @return mat.get-theme-color($bdb-theme, $palette-name, $hue);
28
+ }
29
+ }
@@ -0,0 +1,157 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use './core-theme' as bdb;
4
+
5
+ @use '../common/alert/bdb-alert-m2-theme';
6
+ @use '../common/boolean-display/bdb-boolean-display-m2-theme';
7
+ @use '../common/field/bdb-field-m2-theme';
8
+ @use '../application/common/query-input/bdb-query-input-m2-theme';
9
+ @use '../application/common/search/bdb-search-m2-theme';
10
+ @use '../application/common/table/bdb-table-m2-theme';
11
+ @use '../common/button-m2-theme';
12
+ @use '../common/icon-m2-theme';
13
+
14
+ @use './material/badge-m3-theme';
15
+ @use './material/button-m3-theme';
16
+ @use './material/card-m3-theme';
17
+ @use './material/checkbox-m3-theme';
18
+ @use './material/chips-m3-theme';
19
+ @use './material/datepicker-m3-theme';
20
+ @use './material/fab-m3-theme';
21
+ @use './material/form-field-m3-theme';
22
+ @use './material/icon-m3-theme';
23
+ @use './material/option-m3-theme';
24
+ @use './material/progress-bar-m3-theme';
25
+ @use './material/progress-spinner-m3-theme';
26
+ @use './material/radio-m3-theme';
27
+ @use './material/slide-toggle-m3-theme';
28
+ @use './material/slider-m3-theme';
29
+ @use './material/stepper-m3-theme';
30
+ @use './material/tabs-m3-theme';
31
+ @use './material/toolbar-m3-theme';
32
+
33
+ @use '../application/common/query-input/bdb-query-input-m3-theme';
34
+ @use '../application/common/table/bdb-table-m3-theme';
35
+ @use '../common/alert/bdb-alert-m3-theme';
36
+ @use '../common/boolean-display/bdb-boolean-display-m3-theme';
37
+ @use '../common/field/bdb-field-m3-theme';
38
+ @use '../common/collapse-row/collapse-row-theme';
39
+
40
+ @function define-light-theme($mat-theme, $warn-palette, $danger-palette, $success-palette, $info-palette) {
41
+ @warn "Using Badaboom with Material 2 is deprecated";
42
+ @return map.deep-merge(
43
+ $mat-theme,
44
+ (
45
+ color: (
46
+ warn: $warn-palette,
47
+ danger: $danger-palette,
48
+ success: $success-palette,
49
+ info: $info-palette,
50
+ ),
51
+ )
52
+ );
53
+ }
54
+
55
+ @mixin all-component-m2-themes($bdb-theme) {
56
+ @warn "Using Badaboom with Material 2 is deprecated";
57
+ @include bdb-alert-m2-theme.theme($bdb-theme);
58
+ @include bdb-boolean-display-m2-theme.theme($bdb-theme);
59
+ @include bdb-field-m2-theme.theme($bdb-theme);
60
+ @include bdb-query-input-m2-theme.theme($bdb-theme);
61
+ @include bdb-search-m2-theme.theme($bdb-theme);
62
+ @include bdb-table-m2-theme.theme($bdb-theme);
63
+ @include button-m2-theme.theme($bdb-theme);
64
+ @include icon-m2-theme.theme($bdb-theme);
65
+ }
66
+
67
+ //Material 3
68
+
69
+ @function define-theme($material-theme, $badaboom-palettes) {
70
+ @return map.deep-merge(
71
+ $material-theme,
72
+ (
73
+ color: $badaboom-palettes,
74
+ )
75
+ );
76
+ }
77
+
78
+ @mixin system-level-colors($bdb-theme) {
79
+ $palettes: map-get($bdb-theme, color);
80
+ @each $palette-name in bdb.$badaboom-palettes {
81
+ $palette: map-get($palettes, $palette-name);
82
+ & {
83
+ @if mat.get-theme-type($bdb-theme) == dark {
84
+ --sys-#{$palette-name}: #{map.get($palette, 80)};
85
+ --sys-on-#{$palette-name}: #{map.get($palette, 20)};
86
+ --sys-#{$palette-name}-container: #{map.get($palette, 30)};
87
+ --sys-on-#{$palette-name}-container: #{map.get($palette, 90)};
88
+ } @else {
89
+ --sys-#{$palette-name}: #{map.get($palette, 40)};
90
+ --sys-on-#{$palette-name}: #{map.get($palette, 100)};
91
+ --sys-#{$palette-name}-container: #{map.get($palette, 90)};
92
+ --sys-on-#{$palette-name}-container: #{map.get($palette, 10)};
93
+ }
94
+ }
95
+ }
96
+ }
97
+
98
+ @mixin all-component-themes($bdb-theme) {
99
+ @include badge-m3-theme.theme($bdb-theme);
100
+ @include button-m3-theme.theme($bdb-theme);
101
+ @include card-m3-theme.theme($bdb-theme);
102
+ @include checkbox-m3-theme.theme($bdb-theme);
103
+ @include chips-m3-theme.theme($bdb-theme);
104
+ @include datepicker-m3-theme.theme($bdb-theme);
105
+ @include fab-m3-theme.theme($bdb-theme);
106
+ @include form-field-m3-theme.theme($bdb-theme);
107
+ @include icon-m3-theme.theme($bdb-theme);
108
+ @include option-m3-theme.theme($bdb-theme);
109
+ @include progress-bar-m3-theme.theme($bdb-theme);
110
+ @include progress-spinner-m3-theme.theme($bdb-theme);
111
+ @include radio-m3-theme.theme($bdb-theme);
112
+ @include slide-toggle-m3-theme.theme($bdb-theme);
113
+ @include slider-m3-theme.theme($bdb-theme);
114
+ @include stepper-m3-theme.theme($bdb-theme);
115
+ @include tabs-m3-theme.theme($bdb-theme);
116
+ @include toolbar-m3-theme.theme($bdb-theme);
117
+
118
+ @include bdb-table-m3-theme.theme($bdb-theme);
119
+ @include bdb-query-input-m3-theme.theme($bdb-theme);
120
+
121
+ @include bdb-alert-m3-theme.theme($bdb-theme);
122
+ @include bdb-boolean-display-m3-theme.theme($bdb-theme);
123
+ @include bdb-field-m3-theme.theme($bdb-theme);
124
+ @include collapse-row-theme.theme($bdb-theme);
125
+ }
126
+
127
+ @mixin all-component-colors($bdb-theme) {
128
+ @if mat.theme-has($bdb-theme, color) {
129
+ @include badge-m3-theme.color($bdb-theme);
130
+ @include button-m3-theme.color($bdb-theme);
131
+ @include card-m3-theme.color($bdb-theme);
132
+ @include checkbox-m3-theme.color($bdb-theme);
133
+ @include chips-m3-theme.color($bdb-theme);
134
+ @include datepicker-m3-theme.color($bdb-theme);
135
+ @include fab-m3-theme.color($bdb-theme);
136
+ @include form-field-m3-theme.color($bdb-theme);
137
+ @include icon-m3-theme.color($bdb-theme);
138
+ @include option-m3-theme.color($bdb-theme);
139
+ @include progress-bar-m3-theme.color($bdb-theme);
140
+ @include progress-spinner-m3-theme.color($bdb-theme);
141
+ @include radio-m3-theme.color($bdb-theme);
142
+ @include slide-toggle-m3-theme.color($bdb-theme);
143
+ @include slider-m3-theme.color($bdb-theme);
144
+ @include stepper-m3-theme.color($bdb-theme);
145
+ @include tabs-m3-theme.color($bdb-theme);
146
+ @include toolbar-m3-theme.color($bdb-theme);
147
+
148
+ @include bdb-table-m3-theme.color($bdb-theme);
149
+ @include bdb-query-input-m3-theme.color($bdb-theme);
150
+
151
+ @include bdb-alert-m3-theme.color($bdb-theme);
152
+ @include bdb-boolean-display-m3-theme.color($bdb-theme);
153
+ @include bdb-field-m3-theme.color($bdb-theme);
154
+ @include bdb-field-m3-theme.color($bdb-theme);
155
+ @include collapse-row-theme.color($bdb-theme);
156
+ }
157
+ }
@@ -0,0 +1,35 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use '../core-theme' as bdb;
4
+
5
+ @mixin color($theme) {
6
+ @each $palette-name in bdb.$material-palettes {
7
+ .mat-badge-#{$palette-name} .mat-badge-content,
8
+ .badge-#{$palette-name} .mat-badge-content {
9
+ @include mat.badge-color($theme, $color-variant: $palette-name);
10
+ }
11
+ }
12
+
13
+ @each $palette-name in bdb.$badaboom-palettes {
14
+ .mat-badge-#{$palette-name} .mat-badge-content,
15
+ .badge-#{$palette-name} .mat-badge-content {
16
+ --mat-badge-background-color: var(--sys-#{$palette-name});
17
+ --mat-badge-text-color: var(--sys-on-${palette-name});
18
+ --mat-badge-disabled-state-background-color: color-mix(in srgb, var(--sys-${palette-name}) 38%, transparent);
19
+ --mat-badge-disabled-state-text-color: var(--sys-on-${palette-name});
20
+ }
21
+ }
22
+ }
23
+
24
+ @mixin typography($theme) {
25
+ }
26
+
27
+ @mixin theme($theme) {
28
+ @if mat.theme-has($theme, color) {
29
+ @include color($theme);
30
+ }
31
+
32
+ @if mat.theme-has($theme, typography) {
33
+ @include typography($theme);
34
+ }
35
+ }
@@ -0,0 +1,84 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use '../core-theme' as bdb;
4
+
5
+ @mixin color($theme) {
6
+ @each $palette-name in bdb.$material-palettes {
7
+ .mdc-button.#{$palette-name} {
8
+ @include mat.button-color($theme, $color-variant: $palette-name);
9
+ }
10
+ }
11
+
12
+ @each $palette-name in bdb.$badaboom-palettes {
13
+ .mdc-button.#{$palette-name} {
14
+ --mdc-text-button-label-text-color: var(--sys-#{$palette-name});
15
+ --mdc-text-button-disabled-label-text-color: color-mix(in srgb, var(--sys-on-surface) 38%, transparent);
16
+ --mdc-protected-button-container-elevation-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2),
17
+ 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);
18
+ --mdc-protected-button-disabled-container-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.2),
19
+ 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12);
20
+ --mdc-protected-button-focus-container-elevation-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2),
21
+ 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);
22
+ --mdc-protected-button-hover-container-elevation-shadow: 0px 3px 3px -2px rgba(0, 0, 0, 0.2),
23
+ 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12);
24
+ --mdc-protected-button-pressed-container-elevation-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2),
25
+ 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);
26
+ --mdc-protected-button-container-color: var(--sys-surface);
27
+ --mdc-protected-button-label-text-color: var(--sys-#{$palette-name});
28
+ --mdc-protected-button-disabled-container-color: color-mix(in srgb, var(--sys-on-surface) 12%, transparent);
29
+ --mdc-protected-button-disabled-label-text-color: color-mix(in srgb, var(--sys-on-surface) 38%, transparent);
30
+ --mdc-filled-button-container-color: var(--sys-#{$palette-name});
31
+ --mdc-filled-button-label-text-color: var(--sys-on-#{$palette-name});
32
+ --mdc-filled-button-disabled-container-color: color-mix(in srgb, var(--sys-on-surface) 12%, transparent);
33
+ --mdc-filled-button-disabled-label-text-color: color-mix(in srgb, var(--sys-on-surface) 38%, transparent);
34
+ --mdc-outlined-button-disabled-outline-color: color-mix(in srgb, var(--sys-on-surface) 12%, transparent);
35
+ --mdc-outlined-button-disabled-label-text-color: color-mix(in srgb, var(--sys-on-surface) 38%, transparent);
36
+ --mdc-outlined-button-label-text-color: var(--sys-#{$palette-name});
37
+ --mdc-outlined-button-outline-color: var(--sys-outline);
38
+ --mat-text-button-state-layer-color: var(--sys-#{$palette-name});
39
+ --mat-text-button-disabled-state-layer-color: var(--sys-on-surface-variant);
40
+ --mat-text-button-ripple-color: color-mix(in srgb, var(--sys-#{$palette-name}) 12%, transparent);
41
+ --mat-text-button-hover-state-layer-opacity: 0.08;
42
+ --mat-text-button-focus-state-layer-opacity: 0.12;
43
+ --mat-text-button-pressed-state-layer-opacity: 0.12;
44
+ --mat-protected-button-state-layer-color: var(--sys-#{$palette-name});
45
+ --mat-protected-button-disabled-state-layer-color: var(--sys-on-surface-variant);
46
+ --mat-protected-button-ripple-color: color-mix(in srgb, var(--sys-#{$palette-name}) 12%, transparent);
47
+ --mat-protected-button-hover-state-layer-opacity: 0.08;
48
+ --mat-protected-button-focus-state-layer-opacity: 0.12;
49
+ --mat-protected-button-pressed-state-layer-opacity: 0.12;
50
+ --mat-filled-button-state-layer-color: var(--sys-on-#{$palette-name});
51
+ --mat-filled-button-disabled-state-layer-color: var(--sys-on-surface-variant);
52
+ --mat-filled-button-ripple-color: color-mix(in srgb, var(--sys-on-#{$palette-name}) 12%, transparent);
53
+ --mat-filled-button-hover-state-layer-opacity: 0.08;
54
+ --mat-filled-button-focus-state-layer-opacity: 0.12;
55
+ --mat-filled-button-pressed-state-layer-opacity: 0.12;
56
+ --mat-outlined-button-state-layer-color: var(--sys-#{$palette-name});
57
+ --mat-outlined-button-disabled-state-layer-color: var(--sys-on-surface-variant);
58
+ --mat-outlined-button-ripple-color: color-mix(in srgb, var(--sys-#{$palette-name}) 12%, transparent);
59
+ --mat-outlined-button-hover-state-layer-opacity: 0.08;
60
+ --mat-outlined-button-focus-state-layer-opacity: 0.12;
61
+ --mat-outlined-button-pressed-state-layer-opacity: 0.12;
62
+ }
63
+ }
64
+ }
65
+
66
+ @mixin typography($theme) {
67
+ }
68
+
69
+ @mixin theme($theme) {
70
+ // round button corners to 8px
71
+ --mdc-filled-button-container-shape: 8px;
72
+ --mdc-outlined-button-container-shape: 8px;
73
+ --mdc-stroked-button-container-shape: 8px;
74
+ --mdc-protected-button-container-shape: 8px;
75
+ --mdc-text-button-container-shape: 8px;
76
+
77
+ @if mat.theme-has($theme, color) {
78
+ @include color($theme);
79
+ }
80
+
81
+ @if mat.theme-has($theme, typography) {
82
+ @include typography($theme);
83
+ }
84
+ }