@enigmatry/entry-components 17.0.0-preview.5 → 17.0.0-preview.5.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.
- package/README.md +32 -32
- package/assets/nswag-templates/Client.RequestBody.liquid +95 -95
- package/assets/nswag-templates/Client.RequestUrl.liquid +67 -67
- package/assets/nswag-templates/ConvertToClass.liquid +64 -64
- package/assets/nswag-templates/original/Client.RequestBody.liquid +89 -89
- package/assets/nswag-templates/original/Client.RequestUrl.liquid +59 -59
- package/assets/nswag-templates/original/ConvertToClass.liquid +65 -65
- package/assets/nswag-templates/original/File.FormatDate.liquid +4 -4
- package/assets/nswag-templates/original/File.ParseDateOnly.liquid +4 -4
- package/button/README.md +45 -45
- package/date-time-picker/README.md +69 -69
- package/dialog/README.md +73 -73
- package/esm2022/button/entry-button.directive.mjs +1 -1
- package/esm2022/button/entry-button.module.mjs +1 -1
- package/esm2022/button/public-api.mjs +1 -1
- package/esm2022/common/common.module.mjs +1 -1
- package/esm2022/common/date-time/entry-date-time-adapter.mjs +1 -1
- package/esm2022/common/date-time/entry-date-time-formats.mjs +1 -1
- package/esm2022/common/date-time/entry-time-adapter.mjs +1 -1
- package/esm2022/common/date-time/native-time-adapter.mjs +1 -1
- package/esm2022/common/directives/auto-disable-button.directive.mjs +1 -1
- package/esm2022/common/directives/ng-control-accessor.directive.mjs +1 -1
- package/esm2022/common/directives/noop-control-value-accessor.mjs +1 -1
- package/esm2022/common/interceptors/accept-language.interceptor.mjs +1 -1
- package/esm2022/common/public-api.mjs +1 -1
- package/esm2022/date-time-picker/date-time-picker.component.mjs +3 -3
- package/esm2022/date-time-picker/date-time-picker.module.mjs +1 -1
- package/esm2022/date-time-picker/public-api.mjs +1 -1
- package/esm2022/date-time-picker/time-picker.component.mjs +3 -3
- package/esm2022/dialog/dialogs/alert/entry-alert-dialog-data.interface.mjs +1 -1
- package/esm2022/dialog/dialogs/alert/entry-alert-dialog.component.mjs +3 -3
- package/esm2022/dialog/dialogs/confirm/entry-confirm-dialog-data.interface.mjs +1 -1
- package/esm2022/dialog/dialogs/confirm/entry-confirm-dialog.component.mjs +3 -3
- package/esm2022/dialog/dialogs/entry-dialog.component.mjs +3 -3
- package/esm2022/dialog/dialogs/error/entry-error-dialog-data.interface.mjs +1 -1
- package/esm2022/dialog/dialogs/error/entry-error-dialog.component.mjs +3 -3
- package/esm2022/dialog/entry-dialog-buttons-alignment.type.mjs +1 -1
- package/esm2022/dialog/entry-dialog-config.model.mjs +1 -1
- package/esm2022/dialog/entry-dialog.module.mjs +1 -1
- package/esm2022/dialog/entry-dialog.service.mjs +1 -1
- package/esm2022/dialog/public-api.mjs +1 -1
- package/esm2022/file-input/entry-file-input.component.mjs +1 -1
- package/esm2022/file-input/entry-file-input.module.mjs +1 -1
- package/esm2022/file-input/public-api.mjs +1 -1
- package/esm2022/permissions/permission-type.mjs +1 -1
- package/esm2022/permissions/permission.directive.mjs +1 -1
- package/esm2022/permissions/permission.module.mjs +1 -1
- package/esm2022/permissions/permission.pipe.mjs +1 -1
- package/esm2022/permissions/public-api.mjs +1 -1
- package/esm2022/public-api.mjs +1 -1
- package/esm2022/search-filter/autocomplete/autocomplete-search-filter.component.mjs +3 -3
- package/esm2022/search-filter/autocomplete/autocomplete-search-filter.model.mjs +1 -1
- package/esm2022/search-filter/control-type.mjs +1 -1
- package/esm2022/search-filter/date/date-search-filter.component.mjs +3 -3
- package/esm2022/search-filter/date/date-search-filter.model.mjs +1 -1
- package/esm2022/search-filter/date-time/date-time-search-filter.component.mjs +3 -3
- package/esm2022/search-filter/date-time/date-time-search-filter.model.mjs +1 -1
- package/esm2022/search-filter/public-api.mjs +1 -1
- package/esm2022/search-filter/search-filter-base.model.mjs +1 -1
- package/esm2022/search-filter/search-filter-config.model.mjs +1 -1
- package/esm2022/search-filter/search-filter-params.type.mjs +1 -1
- package/esm2022/search-filter/select/select-search-filter.component.mjs +3 -3
- package/esm2022/search-filter/select/select-search-filter.model.mjs +1 -1
- package/esm2022/search-filter/select-option.model.mjs +1 -1
- package/esm2022/search-filter/text/text-search-filter.component.mjs +3 -3
- package/esm2022/search-filter/text/text-search-filter.model.mjs +1 -1
- package/esm2022/spinner/entry-spinner/spinner.component.mjs +1 -1
- package/esm2022/spinner/public-api.mjs +1 -1
- package/esm2022/spinner/spinner.module.mjs +1 -1
- package/esm2022/table/components/entry-cell/entry-cell.component.mjs +1 -1
- package/esm2022/table/components/entry-cell-context-menu/entry-cell-context-menu.component.mjs +3 -3
- package/esm2022/table/components/entry-cell-formatted-value/entry-cell-formatted-value.component.mjs +3 -3
- package/esm2022/table/components/entry-table/entry-table.component.mjs +3 -3
- package/esm2022/table/entry-table.module.mjs +1 -1
- package/esm2022/table/interfaces/entry-table-config.mjs +1 -1
- package/esm2022/table/interfaces/paged-query.mjs +1 -1
- package/esm2022/table/interfaces/pagination.mjs +1 -1
- package/esm2022/table/public-api.mjs +1 -1
- package/esm2022/validation/entry-display-control-validation.directive.mjs +1 -1
- package/esm2022/validation/entry-form-errors.component.mjs +13 -13
- package/esm2022/validation/entry-validation-config.model.mjs +1 -1
- package/esm2022/validation/entry-validation.mjs +1 -1
- package/esm2022/validation/entry-validation.module.mjs +1 -1
- package/esm2022/validation/public-api.mjs +1 -1
- package/esm2022/validation/validation-problem-details.interface.mjs +1 -1
- package/fesm2022/enigmatry-entry-components-button.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-common.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-date-time-picker.mjs +4 -4
- package/fesm2022/enigmatry-entry-components-date-time-picker.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-dialog.mjs +8 -8
- package/fesm2022/enigmatry-entry-components-dialog.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-file-input.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-permissions.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-search-filter.mjs +10 -10
- package/fesm2022/enigmatry-entry-components-search-filter.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-spinner.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-table.mjs +6 -6
- package/fesm2022/enigmatry-entry-components-table.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-validation.mjs +12 -12
- package/fesm2022/enigmatry-entry-components-validation.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components.mjs.map +1 -1
- package/file-input/README.md +70 -70
- package/package.json +1 -1
- package/permissions/README.md +67 -67
- package/search-filter/README.md +132 -132
- package/styles/_generator.scss +25 -25
- package/styles/modules/_default-theme.scss +91 -91
- package/styles/modules/components/buttons/_generator.scss +10 -10
- package/styles/modules/components/buttons/_radio.scss +18 -18
- package/styles/modules/components/checkboxes/_generator.scss +31 -31
- package/styles/modules/components/dialogs/_generator.scss +13 -13
- package/styles/modules/components/forms/_generator.scss +14 -14
- package/styles/modules/components/inputs/_generator.scss +14 -14
- package/styles/modules/components/search-filter/_generator.scss +14 -14
- package/styles/modules/components/tables/_cells.scss +25 -25
- package/styles/modules/components/tables/_generator.scss +6 -6
- package/styles/modules/components/tables/_header.scss +10 -10
- package/styles/modules/components/tables/_no-result.scss +9 -9
- package/styles/modules/components/tables/_rows.scss +39 -39
- package/styles/modules/components/tables/_sorting.scss +10 -10
- package/styles/modules/components/tables/_table-body.scss +12 -12
- package/styles/modules/components/toggle/_generator.scss +47 -47
- package/styles/modules/typography/_fonts.scss +64 -64
- package/styles/modules/vendors/angular-material/_generator.scss +46 -46
- package/styles/modules/vendors/angular-material/_palette-generator.scss +32 -32
- package/styles/modules/vendors/angular-material/_typography-generator.scss +107 -107
- package/styles/partials/core/components/_index.scss +4 -4
- package/styles/partials/core/components/date-time-picker/_general.scss +64 -64
- package/styles/partials/core/components/dialogs/_general.scss +23 -23
- package/styles/partials/core/components/forms/_general.scss +21 -21
- package/styles/partials/core/components/search-filter/_general.scss +8 -8
- package/styles/partials/core/components/tables/_general.scss +17 -17
- package/styles/partials/generator-test.scss +41 -41
- package/styles/partials/theming.scss +1 -1
- package/table/README.md +76 -76
- package/validation/README.md +108 -108
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
/* stylelint-disable max-nesting-depth */
|
|
2
|
-
@use 'sass:map';
|
|
3
|
-
@use 'sass:color';
|
|
4
|
-
|
|
5
|
-
@function -adjust-lightness($color, $percentage: 10%) {
|
|
6
|
-
@if not $color or $color == transparent {
|
|
7
|
-
@return null;
|
|
8
|
-
}
|
|
9
|
-
$current-lightness: color.lightness($color);
|
|
10
|
-
$adjustment: if($current-lightness > 50%, -$percentage, $percentage);
|
|
11
|
-
@return color.adjust($color, $lightness: $adjustment);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@mixin generate-from($theme) {
|
|
15
|
-
$enabled-states: 'enabled', 'enabled:focus:not(:active)', 'enabled:active', 'enabled:hover:not(:focus):not(:active)';
|
|
16
|
-
$handle-selector: '.mdc-switch__handle::after';
|
|
17
|
-
|
|
18
|
-
$toggle: map.get($theme, 'general', 'toggle');
|
|
19
|
-
$handle-on-background: map.get($toggle, 'on', 'background');
|
|
20
|
-
$handle-off-background: map.get($toggle, 'off', 'background');
|
|
21
|
-
|
|
22
|
-
@if $handle-on-background and $handle-off-background {
|
|
23
|
-
.mat-mdc-slide-toggle {
|
|
24
|
-
@each $state in $enabled-states {
|
|
25
|
-
.mdc-switch:#{$state} {
|
|
26
|
-
&.mdc-switch--selected #{$handle-selector} {
|
|
27
|
-
background-color: $handle-on-background;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&:not(.mdc-switch--selected) #{$handle-selector} {
|
|
31
|
-
background-color: $handle-off-background;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.mdc-switch__track {
|
|
35
|
-
&::after {
|
|
36
|
-
background-color: -adjust-lightness($handle-on-background);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&::before {
|
|
40
|
-
background-color: -adjust-lightness($handle-off-background);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
/* stylelint-disable max-nesting-depth */
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use 'sass:color';
|
|
4
|
+
|
|
5
|
+
@function -adjust-lightness($color, $percentage: 10%) {
|
|
6
|
+
@if not $color or $color == transparent {
|
|
7
|
+
@return null;
|
|
8
|
+
}
|
|
9
|
+
$current-lightness: color.lightness($color);
|
|
10
|
+
$adjustment: if($current-lightness > 50%, -$percentage, $percentage);
|
|
11
|
+
@return color.adjust($color, $lightness: $adjustment);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin generate-from($theme) {
|
|
15
|
+
$enabled-states: 'enabled', 'enabled:focus:not(:active)', 'enabled:active', 'enabled:hover:not(:focus):not(:active)';
|
|
16
|
+
$handle-selector: '.mdc-switch__handle::after';
|
|
17
|
+
|
|
18
|
+
$toggle: map.get($theme, 'general', 'toggle');
|
|
19
|
+
$handle-on-background: map.get($toggle, 'on', 'background');
|
|
20
|
+
$handle-off-background: map.get($toggle, 'off', 'background');
|
|
21
|
+
|
|
22
|
+
@if $handle-on-background and $handle-off-background {
|
|
23
|
+
.mat-mdc-slide-toggle {
|
|
24
|
+
@each $state in $enabled-states {
|
|
25
|
+
.mdc-switch:#{$state} {
|
|
26
|
+
&.mdc-switch--selected #{$handle-selector} {
|
|
27
|
+
background-color: $handle-on-background;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:not(.mdc-switch--selected) #{$handle-selector} {
|
|
31
|
+
background-color: $handle-off-background;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mdc-switch__track {
|
|
35
|
+
&::after {
|
|
36
|
+
background-color: -adjust-lightness($handle-on-background);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&::before {
|
|
40
|
+
background-color: -adjust-lightness($handle-off-background);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
$font-path: '/assets/fonts/';
|
|
4
|
-
$font-sources: (
|
|
5
|
-
(
|
|
6
|
-
name: 'Roboto',
|
|
7
|
-
style: normal,
|
|
8
|
-
formats: ('woff2'),
|
|
9
|
-
weight: 400
|
|
10
|
-
),
|
|
11
|
-
(
|
|
12
|
-
name: 'Roboto',
|
|
13
|
-
style: bold,
|
|
14
|
-
formats: ('woff2'),
|
|
15
|
-
weight: 500
|
|
16
|
-
)
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
// $font-sources: (
|
|
20
|
-
// (
|
|
21
|
-
// name: 'OpenSans',
|
|
22
|
-
// style: normal,
|
|
23
|
-
// formats: ('eot', 'woff', 'woff2', 'ttf')
|
|
24
|
-
// ),
|
|
25
|
-
// (
|
|
26
|
-
// name: 'OpenSans',
|
|
27
|
-
// style: bold,
|
|
28
|
-
// formats: ('eot', 'woff', 'woff2', 'ttf')
|
|
29
|
-
// ),
|
|
30
|
-
// (
|
|
31
|
-
// name: 'Montserrat',
|
|
32
|
-
// style: bold,
|
|
33
|
-
// formats: ('eot', 'woff', 'woff2', 'ttf')
|
|
34
|
-
// )
|
|
35
|
-
// );
|
|
36
|
-
|
|
37
|
-
@mixin generate-default-font() {
|
|
38
|
-
@each $font in $font-sources {
|
|
39
|
-
$name: map.get($font, name);
|
|
40
|
-
$style: map.get($font, style);
|
|
41
|
-
$formats: map.get($font, formats);
|
|
42
|
-
$weight: map.get($font, weight);
|
|
43
|
-
|
|
44
|
-
@each $format in $formats {
|
|
45
|
-
$url: '#{$font-path}#{$name}/#{$name}-#{$style}.#{$format}';
|
|
46
|
-
|
|
47
|
-
@font-face {
|
|
48
|
-
font: {
|
|
49
|
-
style: '#{$style}';
|
|
50
|
-
|
|
51
|
-
/* stylelint-disable property-no-unknown, max-nesting-depth */
|
|
52
|
-
@if $weight {
|
|
53
|
-
family: '#{$name}';
|
|
54
|
-
weight: $weight;
|
|
55
|
-
}
|
|
56
|
-
@else {
|
|
57
|
-
family: '#{$name}-#{$style}';
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
src: url('#{$url}') format('#{$format}');
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
$font-path: '/assets/fonts/';
|
|
4
|
+
$font-sources: (
|
|
5
|
+
(
|
|
6
|
+
name: 'Roboto',
|
|
7
|
+
style: normal,
|
|
8
|
+
formats: ('woff2'),
|
|
9
|
+
weight: 400
|
|
10
|
+
),
|
|
11
|
+
(
|
|
12
|
+
name: 'Roboto',
|
|
13
|
+
style: bold,
|
|
14
|
+
formats: ('woff2'),
|
|
15
|
+
weight: 500
|
|
16
|
+
)
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
// $font-sources: (
|
|
20
|
+
// (
|
|
21
|
+
// name: 'OpenSans',
|
|
22
|
+
// style: normal,
|
|
23
|
+
// formats: ('eot', 'woff', 'woff2', 'ttf')
|
|
24
|
+
// ),
|
|
25
|
+
// (
|
|
26
|
+
// name: 'OpenSans',
|
|
27
|
+
// style: bold,
|
|
28
|
+
// formats: ('eot', 'woff', 'woff2', 'ttf')
|
|
29
|
+
// ),
|
|
30
|
+
// (
|
|
31
|
+
// name: 'Montserrat',
|
|
32
|
+
// style: bold,
|
|
33
|
+
// formats: ('eot', 'woff', 'woff2', 'ttf')
|
|
34
|
+
// )
|
|
35
|
+
// );
|
|
36
|
+
|
|
37
|
+
@mixin generate-default-font() {
|
|
38
|
+
@each $font in $font-sources {
|
|
39
|
+
$name: map.get($font, name);
|
|
40
|
+
$style: map.get($font, style);
|
|
41
|
+
$formats: map.get($font, formats);
|
|
42
|
+
$weight: map.get($font, weight);
|
|
43
|
+
|
|
44
|
+
@each $format in $formats {
|
|
45
|
+
$url: '#{$font-path}#{$name}/#{$name}-#{$style}.#{$format}';
|
|
46
|
+
|
|
47
|
+
@font-face {
|
|
48
|
+
font: {
|
|
49
|
+
style: '#{$style}';
|
|
50
|
+
|
|
51
|
+
/* stylelint-disable property-no-unknown, max-nesting-depth */
|
|
52
|
+
@if $weight {
|
|
53
|
+
family: '#{$name}';
|
|
54
|
+
weight: $weight;
|
|
55
|
+
}
|
|
56
|
+
@else {
|
|
57
|
+
family: '#{$name}-#{$style}';
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
src: url('#{$url}') format('#{$format}');
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
/* stylelint-disable scss/no-duplicate-dollar-variables */
|
|
2
|
-
@use '@angular/material' as theming;
|
|
3
|
-
@use 'palette-generator';
|
|
4
|
-
@use 'typography-generator';
|
|
5
|
-
@use 'sass:map';
|
|
6
|
-
@use '../../typography/fonts';
|
|
7
|
-
|
|
8
|
-
/* stylelint-disable scss/function-no-unknown */
|
|
9
|
-
@mixin generate-from($entry-theme) {
|
|
10
|
-
@include theming.core();
|
|
11
|
-
$body-font: map.get($entry-theme, 'general', 'fonts', 'body', 'family');
|
|
12
|
-
|
|
13
|
-
@if $body-font == '' {
|
|
14
|
-
@include fonts.generate-default-font();
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
$primary-palette: theming.define-palette(-get-material-palette-for('primary', $entry-theme));
|
|
18
|
-
$accent-palette: theming.define-palette(-get-material-palette-for('accent', $entry-theme));
|
|
19
|
-
$warn-palette: theming.define-palette(theming.$red-palette);
|
|
20
|
-
|
|
21
|
-
$typography: typography-generator.generate-from($entry-theme);
|
|
22
|
-
@include theming.typography-hierarchy($typography);
|
|
23
|
-
|
|
24
|
-
$material-theme: theming.define-light-theme((
|
|
25
|
-
color: (
|
|
26
|
-
primary: $primary-palette,
|
|
27
|
-
accent: $accent-palette,
|
|
28
|
-
warn: $warn-palette,
|
|
29
|
-
),
|
|
30
|
-
typography: $typography,
|
|
31
|
-
density: map.get($entry-theme, 'general', 'density')
|
|
32
|
-
));
|
|
33
|
-
|
|
34
|
-
@include theming.all-component-themes($material-theme);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@function -get-material-palette-for($key, $theme) {
|
|
38
|
-
$palette: map.get($theme, 'general', 'colors', $key + '-theme');
|
|
39
|
-
|
|
40
|
-
@if $palette {
|
|
41
|
-
@return $palette;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
$color: map.get($theme, 'general', 'colors', $key);
|
|
45
|
-
@return palette-generator.generate-from($color);
|
|
46
|
-
}
|
|
1
|
+
/* stylelint-disable scss/no-duplicate-dollar-variables */
|
|
2
|
+
@use '@angular/material' as theming;
|
|
3
|
+
@use 'palette-generator';
|
|
4
|
+
@use 'typography-generator';
|
|
5
|
+
@use 'sass:map';
|
|
6
|
+
@use '../../typography/fonts';
|
|
7
|
+
|
|
8
|
+
/* stylelint-disable scss/function-no-unknown */
|
|
9
|
+
@mixin generate-from($entry-theme) {
|
|
10
|
+
@include theming.core();
|
|
11
|
+
$body-font: map.get($entry-theme, 'general', 'fonts', 'body', 'family');
|
|
12
|
+
|
|
13
|
+
@if $body-font == '' {
|
|
14
|
+
@include fonts.generate-default-font();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
$primary-palette: theming.define-palette(-get-material-palette-for('primary', $entry-theme));
|
|
18
|
+
$accent-palette: theming.define-palette(-get-material-palette-for('accent', $entry-theme));
|
|
19
|
+
$warn-palette: theming.define-palette(theming.$red-palette);
|
|
20
|
+
|
|
21
|
+
$typography: typography-generator.generate-from($entry-theme);
|
|
22
|
+
@include theming.typography-hierarchy($typography);
|
|
23
|
+
|
|
24
|
+
$material-theme: theming.define-light-theme((
|
|
25
|
+
color: (
|
|
26
|
+
primary: $primary-palette,
|
|
27
|
+
accent: $accent-palette,
|
|
28
|
+
warn: $warn-palette,
|
|
29
|
+
),
|
|
30
|
+
typography: $typography,
|
|
31
|
+
density: map.get($entry-theme, 'general', 'density')
|
|
32
|
+
));
|
|
33
|
+
|
|
34
|
+
@include theming.all-component-themes($material-theme);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@function -get-material-palette-for($key, $theme) {
|
|
38
|
+
$palette: map.get($theme, 'general', 'colors', $key + '-theme');
|
|
39
|
+
|
|
40
|
+
@if $palette {
|
|
41
|
+
@return $palette;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
$color: map.get($theme, 'general', 'colors', $key);
|
|
45
|
+
@return palette-generator.generate-from($color);
|
|
46
|
+
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
@use 'sass:color';
|
|
2
|
-
@use 'sass:map';
|
|
3
|
-
|
|
4
|
-
@function generate-from($color) {
|
|
5
|
-
$result: (
|
|
6
|
-
50: color.adjust($color, $lightness: -30%),
|
|
7
|
-
contrast: (
|
|
8
|
-
50: #212121,
|
|
9
|
-
100: #212121,
|
|
10
|
-
200: #212121,
|
|
11
|
-
300: #212121,
|
|
12
|
-
400: #212121,
|
|
13
|
-
500: #FFF,
|
|
14
|
-
600: #FFF,
|
|
15
|
-
700: #FFF,
|
|
16
|
-
800: #FFF,
|
|
17
|
-
900: #FFF,
|
|
18
|
-
a100: #212121,
|
|
19
|
-
a200: #212121,
|
|
20
|
-
a400: #FFF,
|
|
21
|
-
a700: #FFF
|
|
22
|
-
)
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
@for $counter from 1 through 9 {
|
|
26
|
-
$blended-color: color.adjust($color, $lightness: -27 + $counter * 5%);
|
|
27
|
-
/* stylelint-disable-next-line scss/no-duplicate-dollar-variables */
|
|
28
|
-
$result: map.set($result, $counter * 100, $blended-color);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@return $result;
|
|
32
|
-
}
|
|
1
|
+
@use 'sass:color';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
|
|
4
|
+
@function generate-from($color) {
|
|
5
|
+
$result: (
|
|
6
|
+
50: color.adjust($color, $lightness: -30%),
|
|
7
|
+
contrast: (
|
|
8
|
+
50: #212121,
|
|
9
|
+
100: #212121,
|
|
10
|
+
200: #212121,
|
|
11
|
+
300: #212121,
|
|
12
|
+
400: #212121,
|
|
13
|
+
500: #FFF,
|
|
14
|
+
600: #FFF,
|
|
15
|
+
700: #FFF,
|
|
16
|
+
800: #FFF,
|
|
17
|
+
900: #FFF,
|
|
18
|
+
a100: #212121,
|
|
19
|
+
a200: #212121,
|
|
20
|
+
a400: #FFF,
|
|
21
|
+
a700: #FFF
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
@for $counter from 1 through 9 {
|
|
26
|
+
$blended-color: color.adjust($color, $lightness: -27 + $counter * 5%);
|
|
27
|
+
/* stylelint-disable-next-line scss/no-duplicate-dollar-variables */
|
|
28
|
+
$result: map.set($result, $counter * 100, $blended-color);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@return $result;
|
|
32
|
+
}
|
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
/* stylelint-disable scss/no-duplicate-dollar-variables, scss/function-no-unknown */
|
|
2
|
-
@use '@angular/material' as theming;
|
|
3
|
-
@use 'sass:map';
|
|
4
|
-
|
|
5
|
-
@function generate-from($theme) {
|
|
6
|
-
$theme-typography: map.get($theme, 'general', 'typography');
|
|
7
|
-
|
|
8
|
-
@if $theme-typography {
|
|
9
|
-
@return $theme-typography;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@return -generate-typography-from($theme);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@function -generate-typography-from($theme) {
|
|
16
|
-
$fonts: map.get($theme, 'general', 'fonts');
|
|
17
|
-
$typography: theming.define-typography-config();
|
|
18
|
-
|
|
19
|
-
$typography: -set-font-for('body', $typography, $fonts, ('body-1', 'body-2'));
|
|
20
|
-
$typography: -set-font-for('buttons', $typography, $fonts, ('button'));
|
|
21
|
-
$typography: -set-font-for('hero-titles',$typography,$fonts,('headline-1', 'headline-2',
|
|
22
|
-
'headline-3', 'headline-4', 'headline-5', 'headline-6'));
|
|
23
|
-
$typography: -set-font-for('titles', $typography, $fonts, ('subtitle-1', 'subtitle-2'));
|
|
24
|
-
$typography: -set-font-family($typography, $fonts);
|
|
25
|
-
|
|
26
|
-
@return $typography;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@function -set-font-for($selector, $typography, $fonts, $desired-size-settings) {
|
|
30
|
-
$desired-size: map.get($fonts, $selector, 'size');
|
|
31
|
-
$desired-spacing: map.get($fonts, $selector, 'letter-spacing');
|
|
32
|
-
|
|
33
|
-
@each $setting in $desired-size-settings {
|
|
34
|
-
/* stylelint-disable-next-line scss/at-if-no-null */
|
|
35
|
-
@if $desired-size != null {
|
|
36
|
-
$typography: map.set($typography, $setting, 'font-size', $desired-size);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* stylelint-disable-next-line scss/at-if-no-null */
|
|
40
|
-
@if $desired-spacing != null {
|
|
41
|
-
$typography: map.set($typography, $setting, 'letter-spacing', $desired-spacing);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@return $typography;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@function -set-font-family($typography, $fonts) {
|
|
49
|
-
$body-font: map.get($fonts, 'body', 'family');
|
|
50
|
-
|
|
51
|
-
@if $body-font == '' {
|
|
52
|
-
@return -generate-defaults-from($typography);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
$typography: -set-typography-group($typography, ('body-1', 'body-2', 'caption'), $body-font);
|
|
56
|
-
|
|
57
|
-
$titles-font: map.get($fonts, 'titles', 'family');
|
|
58
|
-
$hero-titles-font: map.get($fonts, 'hero-titles', 'family');
|
|
59
|
-
$buttons-font: map.get($fonts, 'buttons', 'family');
|
|
60
|
-
|
|
61
|
-
// We fallback to body font if buttons font isn't provided.
|
|
62
|
-
@if $buttons-font == '' {
|
|
63
|
-
$buttons-font: $body-font;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Both titles font fallback to body font unless main one's being set.
|
|
67
|
-
@if $hero-titles-font == '' and $titles-font == '' {
|
|
68
|
-
$hero-titles-font: $body-font;
|
|
69
|
-
$titles-font: $body-font;
|
|
70
|
-
}
|
|
71
|
-
@else if $hero-titles-font == '' and $titles-font != '' {
|
|
72
|
-
$hero-titles-font: $titles-font;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
$typography: -set-text-groups-for($typography, $body-font, $buttons-font);
|
|
76
|
-
$typography: -set-typography-group($typography, ('headline-1', 'headline-2', 'headline-3', 'headline-4'), $hero-titles-font);
|
|
77
|
-
$typography: -set-typography-group($typography, ('headline-5', 'headline-6', 'subtitle-1', 'subtitle-2'), $titles-font);
|
|
78
|
-
$typography: map.set($typography, 'font-family', '"#{$buttons-font}"');
|
|
79
|
-
|
|
80
|
-
@return $typography;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@function -set-text-groups-for($typography, $body-font, $buttons-font) {
|
|
84
|
-
$typography: -set-typography-group($typography, ('body-1', 'body-2', 'caption'), $body-font);
|
|
85
|
-
$typography: -set-typography-group($typography, ('button'), $buttons-font);
|
|
86
|
-
@return $typography;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@function -generate-defaults-from($typography) {
|
|
90
|
-
// Return Roboto (default Angular Material's font (for now).
|
|
91
|
-
// $typography: -set-text-groups-for($typography, 'OpenSans-normal', 'OpenSans-bold');
|
|
92
|
-
// $typography: -set-typography-group($typography,('headline-1', 'headline-2', 'headline-3',
|
|
93
|
-
// 'headline-4', 'headline-5', 'headline-6', 'subtitle-1', 'subtitle-2'),'Montserrat-bold');
|
|
94
|
-
@return $typography;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
@function -set-typography-group($typography, $desired-typography-group, $font) {
|
|
98
|
-
@each $setting in $desired-typography-group {
|
|
99
|
-
$typography: -set-typography-font($typography, $setting, $font);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
@return $typography;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@function -set-typography-font($typography, $section, $font) {
|
|
106
|
-
$typography: map.set($typography, $section, 'font-family', '"#{$font}"');
|
|
107
|
-
@return $typography;
|
|
1
|
+
/* stylelint-disable scss/no-duplicate-dollar-variables, scss/function-no-unknown */
|
|
2
|
+
@use '@angular/material' as theming;
|
|
3
|
+
@use 'sass:map';
|
|
4
|
+
|
|
5
|
+
@function generate-from($theme) {
|
|
6
|
+
$theme-typography: map.get($theme, 'general', 'typography');
|
|
7
|
+
|
|
8
|
+
@if $theme-typography {
|
|
9
|
+
@return $theme-typography;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@return -generate-typography-from($theme);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@function -generate-typography-from($theme) {
|
|
16
|
+
$fonts: map.get($theme, 'general', 'fonts');
|
|
17
|
+
$typography: theming.define-typography-config();
|
|
18
|
+
|
|
19
|
+
$typography: -set-font-for('body', $typography, $fonts, ('body-1', 'body-2'));
|
|
20
|
+
$typography: -set-font-for('buttons', $typography, $fonts, ('button'));
|
|
21
|
+
$typography: -set-font-for('hero-titles',$typography,$fonts,('headline-1', 'headline-2',
|
|
22
|
+
'headline-3', 'headline-4', 'headline-5', 'headline-6'));
|
|
23
|
+
$typography: -set-font-for('titles', $typography, $fonts, ('subtitle-1', 'subtitle-2'));
|
|
24
|
+
$typography: -set-font-family($typography, $fonts);
|
|
25
|
+
|
|
26
|
+
@return $typography;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@function -set-font-for($selector, $typography, $fonts, $desired-size-settings) {
|
|
30
|
+
$desired-size: map.get($fonts, $selector, 'size');
|
|
31
|
+
$desired-spacing: map.get($fonts, $selector, 'letter-spacing');
|
|
32
|
+
|
|
33
|
+
@each $setting in $desired-size-settings {
|
|
34
|
+
/* stylelint-disable-next-line scss/at-if-no-null */
|
|
35
|
+
@if $desired-size != null {
|
|
36
|
+
$typography: map.set($typography, $setting, 'font-size', $desired-size);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* stylelint-disable-next-line scss/at-if-no-null */
|
|
40
|
+
@if $desired-spacing != null {
|
|
41
|
+
$typography: map.set($typography, $setting, 'letter-spacing', $desired-spacing);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@return $typography;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@function -set-font-family($typography, $fonts) {
|
|
49
|
+
$body-font: map.get($fonts, 'body', 'family');
|
|
50
|
+
|
|
51
|
+
@if $body-font == '' {
|
|
52
|
+
@return -generate-defaults-from($typography);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
$typography: -set-typography-group($typography, ('body-1', 'body-2', 'caption'), $body-font);
|
|
56
|
+
|
|
57
|
+
$titles-font: map.get($fonts, 'titles', 'family');
|
|
58
|
+
$hero-titles-font: map.get($fonts, 'hero-titles', 'family');
|
|
59
|
+
$buttons-font: map.get($fonts, 'buttons', 'family');
|
|
60
|
+
|
|
61
|
+
// We fallback to body font if buttons font isn't provided.
|
|
62
|
+
@if $buttons-font == '' {
|
|
63
|
+
$buttons-font: $body-font;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Both titles font fallback to body font unless main one's being set.
|
|
67
|
+
@if $hero-titles-font == '' and $titles-font == '' {
|
|
68
|
+
$hero-titles-font: $body-font;
|
|
69
|
+
$titles-font: $body-font;
|
|
70
|
+
}
|
|
71
|
+
@else if $hero-titles-font == '' and $titles-font != '' {
|
|
72
|
+
$hero-titles-font: $titles-font;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
$typography: -set-text-groups-for($typography, $body-font, $buttons-font);
|
|
76
|
+
$typography: -set-typography-group($typography, ('headline-1', 'headline-2', 'headline-3', 'headline-4'), $hero-titles-font);
|
|
77
|
+
$typography: -set-typography-group($typography, ('headline-5', 'headline-6', 'subtitle-1', 'subtitle-2'), $titles-font);
|
|
78
|
+
$typography: map.set($typography, 'font-family', '"#{$buttons-font}"');
|
|
79
|
+
|
|
80
|
+
@return $typography;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@function -set-text-groups-for($typography, $body-font, $buttons-font) {
|
|
84
|
+
$typography: -set-typography-group($typography, ('body-1', 'body-2', 'caption'), $body-font);
|
|
85
|
+
$typography: -set-typography-group($typography, ('button'), $buttons-font);
|
|
86
|
+
@return $typography;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@function -generate-defaults-from($typography) {
|
|
90
|
+
// Return Roboto (default Angular Material's font (for now).
|
|
91
|
+
// $typography: -set-text-groups-for($typography, 'OpenSans-normal', 'OpenSans-bold');
|
|
92
|
+
// $typography: -set-typography-group($typography,('headline-1', 'headline-2', 'headline-3',
|
|
93
|
+
// 'headline-4', 'headline-5', 'headline-6', 'subtitle-1', 'subtitle-2'),'Montserrat-bold');
|
|
94
|
+
@return $typography;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@function -set-typography-group($typography, $desired-typography-group, $font) {
|
|
98
|
+
@each $setting in $desired-typography-group {
|
|
99
|
+
$typography: -set-typography-font($typography, $setting, $font);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@return $typography;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@function -set-typography-font($typography, $section, $font) {
|
|
106
|
+
$typography: map.set($typography, $section, 'font-family', '"#{$font}"');
|
|
107
|
+
@return $typography;
|
|
108
108
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use 'dialogs/general' as dialogs;
|
|
2
|
-
@use 'tables/general' as tables;
|
|
3
|
-
@use 'forms/general' as forms;
|
|
4
|
-
@use 'search-filter/general' as search-filter;
|
|
1
|
+
@use 'dialogs/general' as dialogs;
|
|
2
|
+
@use 'tables/general' as tables;
|
|
3
|
+
@use 'forms/general' as forms;
|
|
4
|
+
@use 'search-filter/general' as search-filter;
|
|
5
5
|
@use 'date-time-picker/general' as date-time-picker;
|