@devopmaat/badaboom 1.1.1 → 1.2.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.
- package/README.md +1 -1
- package/_index.scss +1 -1
- package/esm2022/lib/application/common/paginator/bdb-paginator.component.mjs +3 -3
- package/esm2022/lib/application/common/query-input/bdb-query-input.component.mjs +8 -9
- package/esm2022/lib/application/common/search/bdb-search-wrapper.component.mjs +3 -3
- package/esm2022/lib/application/common/search/bdb-search.component.mjs +3 -3
- package/esm2022/lib/application/common/table/bdb-cell.directive.mjs +3 -3
- package/esm2022/lib/application/common/table/bdb-column-builder.mjs +5 -4
- package/esm2022/lib/application/common/table/bdb-column-options.mjs +1 -1
- package/esm2022/lib/application/common/table/bdb-table.component.mjs +4 -4
- package/esm2022/lib/application/common/table/dynamic.pipe.mjs +3 -3
- package/esm2022/lib/application/exception-log/exception-log-table/exception-log-table.component.mjs +3 -3
- package/esm2022/lib/application/task-log/task-log-outcome.pipe.mjs +3 -3
- package/esm2022/lib/application/task-log/task-log-status.pipe.mjs +3 -3
- package/esm2022/lib/application/task-log-parameter/task-log-parameter-value.pipe.mjs +3 -3
- package/esm2022/lib/application/user/user-table/user-table.component.mjs +3 -3
- package/esm2022/lib/common/alert/bdb-alert.component.mjs +5 -5
- package/esm2022/lib/common/alert-error-response/bdb-alert-error-response.component.mjs +8 -7
- package/esm2022/lib/common/bdb-flex-child.directive.mjs +3 -3
- package/esm2022/lib/common/bdb-flex.directive.mjs +3 -3
- package/esm2022/lib/common/bdb-form-error.directive.mjs +3 -3
- package/esm2022/lib/common/bdb-grid-child.directive.mjs +3 -3
- package/esm2022/lib/common/bdb-grid.directive.mjs +3 -3
- package/esm2022/lib/common/bdb-palette.mjs +1 -1
- package/esm2022/lib/common/boolean-display/bdb-boolean-display.component.mjs +3 -3
- package/esm2022/lib/common/field/bdb-field.component.mjs +10 -7
- package/esm2022/lib/common/function.pipe.mjs +3 -3
- package/esm2022/lib/common/plain-number-pipe.mjs +20 -0
- package/esm2022/lib/domain/auth/account.service.mjs +3 -3
- package/esm2022/lib/domain/auth/auth.service.mjs +3 -3
- package/esm2022/lib/domain/entities/exception-log/exception-log.service.mjs +3 -3
- package/esm2022/lib/domain/entities/media/media.service.mjs +3 -3
- package/esm2022/lib/domain/entities/role/role.service.mjs +3 -3
- package/esm2022/lib/domain/entities/task-log/task-log.service.mjs +3 -3
- package/esm2022/lib/domain/entities/task-log-parameter/task-log-parameter.service.mjs +3 -3
- package/esm2022/lib/domain/entities/task-log-schedule/task-log-schedule.service.mjs +3 -3
- package/esm2022/lib/domain/entities/user/user.service.mjs +3 -3
- package/esm2022/lib/domain/entities/user-role/user-role.service.mjs +3 -3
- package/esm2022/lib/domain/tasks/task-log-scheduler.service.mjs +3 -3
- package/esm2022/lib/domain/tasks/task-log-type.service.mjs +3 -3
- package/esm2022/lib/presentation/access-denied-page/access-denied-page.component.mjs +3 -3
- package/esm2022/lib/presentation/auth-container/auth-container.component.mjs +3 -3
- package/esm2022/lib/presentation/forgot-password-page/forgot-password-page.component.mjs +3 -3
- package/esm2022/lib/presentation/invalid-token-page/invalid-token-page.component.mjs +3 -3
- package/esm2022/lib/presentation/login-page/login-page.component.mjs +3 -3
- package/esm2022/lib/presentation/logout-page/logout-page.component.mjs +3 -3
- package/esm2022/lib/presentation/reset-password-page/reset-password-page.component.mjs +3 -3
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/devopmaat-badaboom.mjs +167 -144
- package/fesm2022/devopmaat-badaboom.mjs.map +1 -1
- package/lib/application/common/query-input/_bdb-query-input-m3-theme.scss +30 -0
- package/lib/application/common/table/_bdb-table-m3-theme.scss +70 -0
- package/lib/application/common/table/bdb-column-options.d.ts +1 -0
- package/lib/application/common/table/bdb-table.component.d.ts +2 -2
- package/lib/common/alert/_bdb-alert-m3-theme.scss +29 -0
- package/lib/common/alert-error-response/bdb-alert-error-response.component.d.ts +1 -0
- package/lib/common/bdb-palette.d.ts +1 -0
- package/lib/common/boolean-display/_bdb-boolean-display-m3-theme.scss +27 -0
- package/lib/common/field/_bdb-field-m2-theme.scss +13 -0
- package/lib/common/field/_bdb-field-m3-theme.scss +56 -0
- package/lib/common/field/bdb-field.component.d.ts +1 -0
- package/lib/common/plain-number-pipe.d.ts +7 -0
- package/lib/styles/_core-theme.scss +29 -0
- package/lib/styles/_theme.scss +153 -0
- package/lib/styles/material/_badge-m3-theme.scss +35 -0
- package/lib/styles/material/_button-m3-theme.scss +84 -0
- package/lib/styles/material/_card-m3-theme.scss +34 -0
- package/lib/styles/material/_checkbox-m3-theme.scss +54 -0
- package/lib/styles/material/_chips-m3-theme.scss +58 -0
- package/lib/styles/material/_datepicker-m3-theme.scss +84 -0
- package/lib/styles/material/_fab-m3-theme.scss +84 -0
- package/lib/styles/material/_form-field-m3-theme.scss +36 -0
- package/lib/styles/material/_icon-m3-theme.scss +32 -0
- package/lib/styles/material/_option-m3-theme.scss +34 -0
- package/lib/styles/material/_progress-bar-m3-theme.scss +31 -0
- package/lib/styles/material/_progress-spinner-m3-theme.scss +30 -0
- package/lib/styles/material/_radio-m3-theme.scss +42 -0
- package/lib/styles/material/_slide-toggle-m3-theme.scss +68 -0
- package/lib/styles/material/_slider-m3-theme.scss +48 -0
- package/lib/styles/material/_stepper-m3-theme.scss +44 -0
- package/lib/styles/material/_tabs-m3-theme.scss +32 -0
- package/lib/styles/material/_toolbar-m3-theme.scss +63 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/lib/_theme.scss +0 -32
- /package/lib/application/common/query-input/{_bdb-query-input-theme.scss → _bdb-query-input-m2-theme.scss} +0 -0
- /package/lib/application/common/search/{_bdb-search-theme.scss → _bdb-search-m2-theme.scss} +0 -0
- /package/lib/application/common/table/{_bdb-table-theme.scss → _bdb-table-m2-theme.scss} +0 -0
- /package/lib/common/{_button-theme.scss → _button-m2-theme.scss} +0 -0
- /package/lib/common/{_icon-theme.scss → _icon-m2-theme.scss} +0 -0
- /package/lib/common/alert/{_bdb-alert-theme.scss → _bdb-alert-m2-theme.scss} +0 -0
- /package/lib/common/boolean-display/{_bdb-boolean-display-theme.scss → _bdb-boolean-display-m2-theme.scss} +0 -0
|
@@ -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
|
+
}
|
|
@@ -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,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,153 @@
|
|
|
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
|
+
|
|
39
|
+
@function define-light-theme($mat-theme, $warn-palette, $danger-palette, $success-palette, $info-palette) {
|
|
40
|
+
@warn "Using Badaboom with Material 2 is deprecated";
|
|
41
|
+
@return map.deep-merge(
|
|
42
|
+
$mat-theme,
|
|
43
|
+
(
|
|
44
|
+
color: (
|
|
45
|
+
warn: $warn-palette,
|
|
46
|
+
danger: $danger-palette,
|
|
47
|
+
success: $success-palette,
|
|
48
|
+
info: $info-palette,
|
|
49
|
+
),
|
|
50
|
+
)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@mixin all-component-m2-themes($bdb-theme) {
|
|
55
|
+
@warn "Using Badaboom with Material 2 is deprecated";
|
|
56
|
+
@include bdb-alert-m2-theme.theme($bdb-theme);
|
|
57
|
+
@include bdb-boolean-display-m2-theme.theme($bdb-theme);
|
|
58
|
+
@include bdb-field-m2-theme.theme($bdb-theme);
|
|
59
|
+
@include bdb-query-input-m2-theme.theme($bdb-theme);
|
|
60
|
+
@include bdb-search-m2-theme.theme($bdb-theme);
|
|
61
|
+
@include bdb-table-m2-theme.theme($bdb-theme);
|
|
62
|
+
@include button-m2-theme.theme($bdb-theme);
|
|
63
|
+
@include icon-m2-theme.theme($bdb-theme);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
//Material 3
|
|
67
|
+
|
|
68
|
+
@function define-theme($material-theme, $badaboom-palettes) {
|
|
69
|
+
@return map.deep-merge(
|
|
70
|
+
$material-theme,
|
|
71
|
+
(
|
|
72
|
+
color: $badaboom-palettes,
|
|
73
|
+
)
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@mixin system-level-colors($bdb-theme) {
|
|
78
|
+
$palettes: map-get($bdb-theme, color);
|
|
79
|
+
@each $palette-name in bdb.$badaboom-palettes {
|
|
80
|
+
$palette: map-get($palettes, $palette-name);
|
|
81
|
+
& {
|
|
82
|
+
@if mat.get-theme-type($bdb-theme) == dark {
|
|
83
|
+
--sys-#{$palette-name}: #{map.get($palette, 80)};
|
|
84
|
+
--sys-on-#{$palette-name}: #{map.get($palette, 20)};
|
|
85
|
+
--sys-#{$palette-name}-container: #{map.get($palette, 30)};
|
|
86
|
+
--sys-on-#{$palette-name}-container: #{map.get($palette, 90)};
|
|
87
|
+
} @else {
|
|
88
|
+
--sys-#{$palette-name}: #{map.get($palette, 40)};
|
|
89
|
+
--sys-on-#{$palette-name}: #{map.get($palette, 100)};
|
|
90
|
+
--sys-#{$palette-name}-container: #{map.get($palette, 90)};
|
|
91
|
+
--sys-on-#{$palette-name}-container: #{map.get($palette, 10)};
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@mixin all-component-themes($bdb-theme) {
|
|
98
|
+
@include badge-m3-theme.theme($bdb-theme);
|
|
99
|
+
@include button-m3-theme.theme($bdb-theme);
|
|
100
|
+
@include card-m3-theme.theme($bdb-theme);
|
|
101
|
+
@include checkbox-m3-theme.theme($bdb-theme);
|
|
102
|
+
@include chips-m3-theme.theme($bdb-theme);
|
|
103
|
+
@include datepicker-m3-theme.theme($bdb-theme);
|
|
104
|
+
@include fab-m3-theme.theme($bdb-theme);
|
|
105
|
+
@include form-field-m3-theme.theme($bdb-theme);
|
|
106
|
+
@include icon-m3-theme.theme($bdb-theme);
|
|
107
|
+
@include option-m3-theme.theme($bdb-theme);
|
|
108
|
+
@include progress-bar-m3-theme.theme($bdb-theme);
|
|
109
|
+
@include progress-spinner-m3-theme.theme($bdb-theme);
|
|
110
|
+
@include radio-m3-theme.theme($bdb-theme);
|
|
111
|
+
@include slide-toggle-m3-theme.theme($bdb-theme);
|
|
112
|
+
@include slider-m3-theme.theme($bdb-theme);
|
|
113
|
+
@include stepper-m3-theme.theme($bdb-theme);
|
|
114
|
+
@include tabs-m3-theme.theme($bdb-theme);
|
|
115
|
+
@include toolbar-m3-theme.theme($bdb-theme);
|
|
116
|
+
|
|
117
|
+
@include bdb-table-m3-theme.theme($bdb-theme);
|
|
118
|
+
@include bdb-query-input-m3-theme.theme($bdb-theme);
|
|
119
|
+
|
|
120
|
+
@include bdb-alert-m3-theme.theme($bdb-theme);
|
|
121
|
+
@include bdb-boolean-display-m3-theme.theme($bdb-theme);
|
|
122
|
+
@include bdb-field-m3-theme.theme($bdb-theme);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@mixin all-component-colors($bdb-theme) {
|
|
126
|
+
@if mat.theme-has($bdb-theme, color) {
|
|
127
|
+
@include badge-m3-theme.color($bdb-theme);
|
|
128
|
+
@include button-m3-theme.color($bdb-theme);
|
|
129
|
+
@include card-m3-theme.color($bdb-theme);
|
|
130
|
+
@include checkbox-m3-theme.color($bdb-theme);
|
|
131
|
+
@include chips-m3-theme.color($bdb-theme);
|
|
132
|
+
@include datepicker-m3-theme.color($bdb-theme);
|
|
133
|
+
@include fab-m3-theme.color($bdb-theme);
|
|
134
|
+
@include form-field-m3-theme.color($bdb-theme);
|
|
135
|
+
@include icon-m3-theme.color($bdb-theme);
|
|
136
|
+
@include option-m3-theme.color($bdb-theme);
|
|
137
|
+
@include progress-bar-m3-theme.color($bdb-theme);
|
|
138
|
+
@include progress-spinner-m3-theme.color($bdb-theme);
|
|
139
|
+
@include radio-m3-theme.color($bdb-theme);
|
|
140
|
+
@include slide-toggle-m3-theme.color($bdb-theme);
|
|
141
|
+
@include slider-m3-theme.color($bdb-theme);
|
|
142
|
+
@include stepper-m3-theme.color($bdb-theme);
|
|
143
|
+
@include tabs-m3-theme.color($bdb-theme);
|
|
144
|
+
@include toolbar-m3-theme.color($bdb-theme);
|
|
145
|
+
|
|
146
|
+
@include bdb-table-m3-theme.color($bdb-theme);
|
|
147
|
+
@include bdb-query-input-m3-theme.color($bdb-theme);
|
|
148
|
+
|
|
149
|
+
@include bdb-alert-m3-theme.color($bdb-theme);
|
|
150
|
+
@include bdb-boolean-display-m3-theme.color($bdb-theme);
|
|
151
|
+
@include bdb-field-m3-theme.color($bdb-theme);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
@@ -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
|
+
button.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
|
+
button.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
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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.$palette-names {
|
|
7
|
+
.mat-mdc-card.#{$palette-name},
|
|
8
|
+
.mat-card.mat-#{$palette-name} {
|
|
9
|
+
color: var(--sys-on-#{$palette-name});
|
|
10
|
+
--mdc-elevated-card-container-color: var(--sys-#{$palette-name});
|
|
11
|
+
--mdc-outlined-card-container-color: var(--sys-#{$palette-name});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.mat-mdc-card.#{$palette-name}-container,
|
|
15
|
+
.mat-card.mat-#{$palette-name}-container {
|
|
16
|
+
color: var(--sys-on-#{$palette-name}-container);
|
|
17
|
+
--mdc-elevated-card-container-color: var(--sys-#{$palette-name}-container);
|
|
18
|
+
--mdc-outlined-card-container-color: var(--sys-#{$palette-name}-container);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@mixin typography($theme) {
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@mixin theme($theme) {
|
|
27
|
+
@if mat.theme-has($theme, color) {
|
|
28
|
+
@include color($theme);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@if mat.theme-has($theme, typography) {
|
|
32
|
+
@include typography($theme);
|
|
33
|
+
}
|
|
34
|
+
}
|