@enigmatry/entry-components 1.15.1-preview.2 → 1.15.1-preview.21
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/assets/fonts/Montserrat/Montserrat-bold.eot +0 -0
- package/assets/fonts/Montserrat/Montserrat-bold.ttf +0 -0
- package/assets/fonts/Montserrat/Montserrat-bold.woff +0 -0
- package/assets/fonts/Montserrat/Montserrat-bold.woff2 +0 -0
- package/assets/fonts/OpenSans/OpenSans-bold.eot +0 -0
- package/assets/fonts/OpenSans/OpenSans-bold.ttf +0 -0
- package/assets/fonts/OpenSans/OpenSans-bold.woff +0 -0
- package/assets/fonts/OpenSans/OpenSans-bold.woff2 +0 -0
- package/assets/fonts/OpenSans/OpenSans-normal.eot +0 -0
- package/assets/fonts/OpenSans/OpenSans-normal.ttf +0 -0
- package/assets/fonts/OpenSans/OpenSans-normal.woff +0 -0
- package/assets/fonts/OpenSans/OpenSans-normal.woff2 +0 -0
- package/assets/fonts/Roboto/Roboto-bold.woff2 +0 -0
- package/assets/fonts/Roboto/Roboto-normal.woff2 +0 -0
- package/button/README.md +47 -0
- package/button/entry-button-config.d.ts +26 -0
- package/button/entry-button.directive.d.ts +18 -0
- package/button/entry-button.module.d.ts +9 -0
- package/button/index.d.ts +5 -0
- package/button/public-api.d.ts +3 -0
- package/esm2020/button/enigmatry-entry-components-button.mjs +5 -0
- package/esm2020/button/entry-button-config.mjs +22 -0
- package/esm2020/button/entry-button.directive.mjs +56 -0
- package/esm2020/button/entry-button.module.mjs +28 -0
- package/esm2020/button/public-api.mjs +4 -0
- package/esm2020/dialog/entry-dialog-buttons-alignment.type.mjs +2 -1
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/enigmatry-entry-components-button.mjs +110 -0
- package/fesm2015/enigmatry-entry-components-button.mjs.map +1 -0
- package/fesm2015/enigmatry-entry-components.mjs +1 -0
- package/fesm2015/enigmatry-entry-components.mjs.map +1 -1
- package/fesm2020/enigmatry-entry-components-button.mjs +107 -0
- package/fesm2020/enigmatry-entry-components-button.mjs.map +1 -0
- package/fesm2020/enigmatry-entry-components.mjs +1 -0
- package/fesm2020/enigmatry-entry-components.mjs.map +1 -1
- package/package.json +9 -1
- package/public-api.d.ts +1 -0
- package/styles/_generator.scss +15 -0
- package/styles/modules/_default-theme.scss +57 -0
- package/styles/modules/components/dialogs/_generator.scss +11 -0
- package/styles/modules/components/headers/_generator.scss +12 -0
- package/styles/modules/components/tables/_cells.scss +15 -0
- package/styles/modules/components/tables/_generator.scss +7 -0
- package/styles/modules/components/tables/_no-result.scss +10 -0
- package/styles/modules/components/tables/_rows.scss +23 -0
- package/styles/modules/components/tables/_sorting.scss +11 -0
- package/styles/modules/components/tables/_table-body.scss +11 -0
- package/styles/modules/typography/_fonts.scss +46 -68
- package/styles/modules/vendors/angular-material/_generator.scss +44 -0
- package/styles/modules/vendors/angular-material/_palette-generator.scss +32 -0
- package/styles/modules/vendors/angular-material/_typography-generator.scss +100 -0
- package/styles/partials/core/components/_index.scss +4 -0
- package/{dialog/styles → styles}/partials/core/components/dialogs/_general.scss +9 -10
- package/styles/partials/core/components/forms/_general.scss +36 -0
- package/styles/partials/core/components/headers/_general.scss +7 -0
- package/styles/partials/core/components/tables/_general.scss +21 -0
- package/styles/partials/generator-test.scss +27 -0
- package/styles/partials/theming.scss +1 -0
- package/dialog/styles/modules/_generator.scss +0 -11
- package/dialog/styles/modules/components/dialogs/_general.scss +0 -11
- package/dialog/styles/modules/components/dialogs/footers/_general.scss +0 -26
- package/dialog/styles/modules/components/dialogs/headers/_general.scss +0 -16
- package/dialog/styles/modules/theming/_default-theming.scss +0 -29
- package/dialog/styles/partials/core/_index.scss +0 -3
- package/dialog/styles/partials/core/components/_index.scss +0 -1
- package/dialog/styles/partials/core/components/dialogs/_index.scss +0 -1
- package/dialog/styles/partials/core/elements/_general.scss +0 -10
- package/dialog/styles/partials/core/elements/_index.scss +0 -1
- package/dialog/styles/partials/core/layouts/_alignments.scss +0 -13
- package/dialog/styles/partials/core/layouts/_index.scss +0 -1
- package/dialog/styles/partials/main.scss +0 -1
- package/header/styles/modules/_generator.scss +0 -13
- package/header/styles/modules/components/buttons/_general.scss +0 -26
- package/header/styles/modules/components/headers/_general.scss +0 -13
- package/header/styles/modules/theming/_default-theming.scss +0 -21
- package/header/styles/partials/core/_index.scss +0 -3
- package/header/styles/partials/core/components/_index.scss +0 -2
- package/header/styles/partials/core/components/buttons/_general.scss +0 -42
- package/header/styles/partials/core/components/buttons/_index.scss +0 -1
- package/header/styles/partials/core/components/headers/_general.scss +0 -9
- package/header/styles/partials/core/components/headers/_index.scss +0 -1
- package/header/styles/partials/core/elements/_index.scss +0 -1
- package/header/styles/partials/core/elements/headings.scss +0 -3
- package/header/styles/partials/core/layouts/_alignment.scss +0 -6
- package/header/styles/partials/core/layouts/_index.scss +0 -1
- package/header/styles/partials/main.scss +0 -1
- package/styles/_generate.scss +0 -15
- package/styles/modules/_breakpoints.scss +0 -37
- package/styles/modules/_generate.scss +0 -5
- package/styles/modules/_variables.scss +0 -22
- package/styles/modules/states/_hover.scss +0 -27
- package/styles/modules/theming/_default-theming.scss +0 -9
- package/styles/modules/typography/_generate.scss +0 -7
- package/toolbar/styles/modules/_generate.scss +0 -10
- package/toolbar/styles/modules/components/toolbar/_general.scss +0 -34
- package/toolbar/styles/modules/theming/_default-theming.scss +0 -8
- package/toolbar/styles/partials/core/_index.scss +0 -1
- package/toolbar/styles/partials/core/components/_index.scss +0 -1
- package/toolbar/styles/partials/core/components/toolbar/_general.scss +0 -100
- package/toolbar/styles/partials/core/components/toolbar/_index.scss +0 -1
- package/toolbar/styles/partials/main.scss +0 -1
package/public-api.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export * from '@enigmatry/entry-components/dialog';
|
|
|
3
3
|
export * from '@enigmatry/entry-components/search-filter';
|
|
4
4
|
export * from '@enigmatry/entry-components/toolbar';
|
|
5
5
|
export * from '@enigmatry/entry-components/validation';
|
|
6
|
+
export * from '@enigmatry/entry-components/button';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@use 'modules/components/dialogs/generator' as dialog;
|
|
2
|
+
@use 'modules/components/headers/generator' as header;
|
|
3
|
+
@use 'modules/components/tables/generator' as table;
|
|
4
|
+
@use 'modules/default-theme' as default;
|
|
5
|
+
@use 'modules/vendors/angular-material/generator' as material-theme;
|
|
6
|
+
@use 'sass:map';
|
|
7
|
+
|
|
8
|
+
@mixin generate-from($custom-theme: ()) {
|
|
9
|
+
$merged-theme: map.deep-merge(default.$theme, $custom-theme);
|
|
10
|
+
|
|
11
|
+
@include material-theme.generate-from($merged-theme);
|
|
12
|
+
@include table.generate-from($merged-theme);
|
|
13
|
+
@include dialog.generate-from($merged-theme);
|
|
14
|
+
@include header.generate-from($merged-theme);
|
|
15
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
$theme: (
|
|
2
|
+
general: (
|
|
3
|
+
colors: (
|
|
4
|
+
primary-theme: null,
|
|
5
|
+
accent-theme: null,
|
|
6
|
+
primary: #2581C4,
|
|
7
|
+
accent: #EA518D,
|
|
8
|
+
font: #323232
|
|
9
|
+
),
|
|
10
|
+
typography: null,
|
|
11
|
+
fonts: (
|
|
12
|
+
hero-titles: (
|
|
13
|
+
family: '',
|
|
14
|
+
size: 0
|
|
15
|
+
),
|
|
16
|
+
titles: (
|
|
17
|
+
family: '',
|
|
18
|
+
size: 0
|
|
19
|
+
),
|
|
20
|
+
body: (
|
|
21
|
+
family: '',
|
|
22
|
+
size: 0
|
|
23
|
+
),
|
|
24
|
+
buttons: (
|
|
25
|
+
family: '',
|
|
26
|
+
size: 0
|
|
27
|
+
)
|
|
28
|
+
)
|
|
29
|
+
),
|
|
30
|
+
tables: (
|
|
31
|
+
cells: (
|
|
32
|
+
edge-gap: 4px
|
|
33
|
+
),
|
|
34
|
+
rows: (
|
|
35
|
+
selected-color: #FFF,
|
|
36
|
+
disabled-color: #F5F5F5,
|
|
37
|
+
odd-even-row: odd,
|
|
38
|
+
odd-even-background: #F0F0F0
|
|
39
|
+
),
|
|
40
|
+
contents: (
|
|
41
|
+
no-result: (
|
|
42
|
+
font-size: 13px,
|
|
43
|
+
font-weight: 500
|
|
44
|
+
)
|
|
45
|
+
)
|
|
46
|
+
),
|
|
47
|
+
headers: (
|
|
48
|
+
title: (
|
|
49
|
+
size: 32px
|
|
50
|
+
)
|
|
51
|
+
),
|
|
52
|
+
dialogs: (
|
|
53
|
+
title: (
|
|
54
|
+
size: 20px
|
|
55
|
+
)
|
|
56
|
+
)
|
|
57
|
+
);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@mixin generate-from($theme) {
|
|
4
|
+
.entry-dialog {
|
|
5
|
+
.title {
|
|
6
|
+
color: map.get($theme, 'general', 'colors', 'font');
|
|
7
|
+
font-size: map.get($theme, 'dialogs', 'title', 'size');
|
|
8
|
+
}
|
|
9
|
+
font-size: map.get($theme, 'general', 'font', 'size');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@mixin generate-from($theme) {
|
|
4
|
+
.entry-header {
|
|
5
|
+
background-color: map.get($theme, 'general', 'colors', 'primary');
|
|
6
|
+
|
|
7
|
+
.title {
|
|
8
|
+
color: map.get($theme, 'general', 'colors', 'font');
|
|
9
|
+
font-size: map.get($theme, 'headers', 'title', 'size');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@mixin generate-from($theme) {
|
|
4
|
+
.mat-mdc-cell {
|
|
5
|
+
color: map.get($theme, 'general', 'colors', 'font');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.mat-mdc-header-cell:first-of-type, .mat-mdc-cell:first-of-type, .mat-mdc-footer-cell:first-of-type {
|
|
9
|
+
padding-left: map.get($theme, 'tables', 'cells', 'edge-gap');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.mat-mdc-header-cell:last-of-type, .mat-mdc-cell:last-of-type, .mat-mdc-footer-cell:last-of-type {
|
|
13
|
+
padding-right: map.get($theme, 'tables', 'cells', 'edge-gap');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '@enigmatry/scss-foundation/src/modules/lists/row-coloring' as list;
|
|
3
|
+
|
|
4
|
+
@mixin generate-from($theme) {
|
|
5
|
+
.mat-mdc-row {
|
|
6
|
+
&.mdc-data-table__row {
|
|
7
|
+
@include list.row-coloring(map.get($theme, 'tables', 'rows', 'odd-even-background'),
|
|
8
|
+
map.get($theme, 'tables', 'rows', 'odd-even-row'));
|
|
9
|
+
|
|
10
|
+
&.selected {
|
|
11
|
+
background-color: map.get($theme, 'general', 'colors', 'primary');
|
|
12
|
+
|
|
13
|
+
.mat-mdc-cell {
|
|
14
|
+
color: map.get($theme, 'tables', 'rows', 'selected-color');
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&.mat-row-disabled {
|
|
19
|
+
background-color: map.get($theme, 'tables', 'rows', 'disabled-color');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,86 +1,64 @@
|
|
|
1
|
-
@use 'sass:string';
|
|
2
1
|
@use 'sass:map';
|
|
3
|
-
@use 'sass:math';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
+
);
|
|
8
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() {
|
|
9
38
|
@each $font in $font-sources {
|
|
10
39
|
$name: map.get($font, name);
|
|
11
40
|
$style: map.get($font, style);
|
|
12
41
|
$formats: map.get($font, formats);
|
|
13
|
-
|
|
42
|
+
$weight: map.get($font, weight);
|
|
43
|
+
|
|
14
44
|
@each $format in $formats {
|
|
15
45
|
$url: '#{$font-path}#{$name}/#{$name}-#{$style}.#{$format}';
|
|
16
|
-
|
|
46
|
+
|
|
17
47
|
@font-face {
|
|
18
48
|
font: {
|
|
19
|
-
family: '#{$name}-#{$style}';
|
|
20
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
|
+
}
|
|
21
59
|
}
|
|
22
60
|
src: url('#{$url}') format('#{$format}');
|
|
23
61
|
}
|
|
24
62
|
}
|
|
25
63
|
}
|
|
26
|
-
|
|
27
|
-
// Generate icomoon icons font face:
|
|
28
|
-
@include entry-icomoon-icons($font-path);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// TODO: Hardcoded icons font, must be configurable but also to support default value!
|
|
32
|
-
@mixin entry-icomoon-icons($font-path) {
|
|
33
|
-
@font-face {
|
|
34
|
-
font-family: 'icomoon';
|
|
35
|
-
font-style: normal;
|
|
36
|
-
font-weight: normal;
|
|
37
|
-
src: url($font-path + 'icomoon/fonts/icomoon.eot?s68r7n');
|
|
38
|
-
src: url($font-path + 'icomoon/fonts/icomoon.eot?s68r7n#iefix') format('embedded-opentype'),
|
|
39
|
-
url($font-path + 'icomoon/fonts/icomoon.ttf?s68r7n') format('truetype'),
|
|
40
|
-
url($font-path + 'icomoon/fonts//icomoon.woff?s68r7n') format('woff'),
|
|
41
|
-
url($font-path + 'icomoon/fonts//icomoon.svg?s68r7n#icomoon') format('svg');
|
|
42
|
-
font-display: block;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
[class ^= 'icon-'], [class *= ' icon-'] {
|
|
46
|
-
/* use !important to prevent issues with browser extensions that change fonts */
|
|
47
|
-
font-family: 'icomoon' !important;
|
|
48
|
-
|
|
49
|
-
/* Better Font Rendering =========== */
|
|
50
|
-
-webkit-font-smoothing: antialiased;
|
|
51
|
-
-moz-osx-font-smoothing: grayscale;
|
|
52
|
-
font-style: normal;
|
|
53
|
-
font-variant: normal;
|
|
54
|
-
font-weight: normal;
|
|
55
|
-
line-height: 1;
|
|
56
|
-
text-transform: none;
|
|
57
|
-
speak: never;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.icon-close::before {
|
|
61
|
-
content: '\e900';
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.icon-menu:before {
|
|
65
|
-
content: "\e9bd";
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// TODO: Hardcoded mixins (currently not ins use) that should be configurable!
|
|
70
|
-
/*
|
|
71
|
-
@mixin -font($family, $size) {
|
|
72
|
-
font: {
|
|
73
|
-
family: $family;
|
|
74
|
-
size: $size;
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
@mixin main-font($size: 14px) {
|
|
78
|
-
@include -font('OpenSans-normal', $size);
|
|
79
|
-
}
|
|
80
|
-
@mixin main-bolded-font($size: 14px) {
|
|
81
|
-
@include -font('OpenSans-Bold', $size);
|
|
82
|
-
}
|
|
83
|
-
@mixin title-font($size: 20px) {
|
|
84
|
-
@include -font('Montserrat-bold', $size);
|
|
85
64
|
}
|
|
86
|
-
*/
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@use '@angular/material' as theming;
|
|
2
|
+
@use 'palette-generator';
|
|
3
|
+
@use 'typography-generator';
|
|
4
|
+
@use 'sass:map';
|
|
5
|
+
@use '../../typography/fonts';
|
|
6
|
+
|
|
7
|
+
/* stylelint-disable scss/function-no-unknown */
|
|
8
|
+
@mixin generate-from($theme) {
|
|
9
|
+
@include theming.core();
|
|
10
|
+
$body-font: map.get($theme, 'general', 'fonts', 'body', 'family');
|
|
11
|
+
|
|
12
|
+
@if $body-font == '' {
|
|
13
|
+
@include fonts.generate-default-font();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
$primary-palette: theming.define-palette(-get-material-palette-for('primary', $theme));
|
|
17
|
+
$accent-palette: theming.define-palette(-get-material-palette-for('accent', $theme));
|
|
18
|
+
$warn-palette: theming.define-palette(theming.$red-palette);
|
|
19
|
+
|
|
20
|
+
$typography: typography-generator.generate-from($theme);
|
|
21
|
+
@include theming.typography-hierarchy($typography);
|
|
22
|
+
|
|
23
|
+
$default-theme: theming.define-light-theme((
|
|
24
|
+
color: (
|
|
25
|
+
primary: $primary-palette,
|
|
26
|
+
accent: $accent-palette,
|
|
27
|
+
warn: $warn-palette
|
|
28
|
+
),
|
|
29
|
+
typography: $typography
|
|
30
|
+
));
|
|
31
|
+
|
|
32
|
+
@include theming.all-component-themes($default-theme);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@function -get-material-palette-for($key, $theme) {
|
|
36
|
+
$palette: map.get($theme, 'general', 'colors', $key + '-theme');
|
|
37
|
+
|
|
38
|
+
@if $palette {
|
|
39
|
+
@return $palette;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
$color: map.get($theme, 'general', 'colors', $key);
|
|
43
|
+
@return palette-generator.generate-from($color);
|
|
44
|
+
}
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
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-size-for('body', $typography, $fonts, ('body-1', 'body-2'));
|
|
20
|
+
$typography: -set-font-size-for('buttons', $typography, $fonts, ('buttons'));
|
|
21
|
+
$typography: -set-font-size-for('hero-titles', $typography, $fonts, ('headline-1', 'headline-2', 'headline-3', 'headline-4'));
|
|
22
|
+
$typography: -set-font-size-for('titles', $typography, $fonts, ('headline-5', 'headline-6', 'subtitle-1', 'subtitle-2'));
|
|
23
|
+
$typography: -set-font-family($typography, $fonts);
|
|
24
|
+
|
|
25
|
+
@return $typography;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@function -set-font-size-for($selector, $typography, $fonts, $desired-size-settings) {
|
|
29
|
+
$desired-size: map.get($fonts, $selector, 'size');
|
|
30
|
+
|
|
31
|
+
@if $desired-size != 0 {
|
|
32
|
+
@each $setting in $desired-size-settings {
|
|
33
|
+
$typography: map.set($typography, $setting, 'font-size', $desired-size);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@return $typography;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@function -set-font-family($typography, $fonts) {
|
|
41
|
+
$body-font: map.get($fonts, 'body', 'family');
|
|
42
|
+
|
|
43
|
+
@if $body-font == '' {
|
|
44
|
+
@return -generate-defaults-from($typography);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
$typography: -set-typography-group($typography, ('body-1', 'body-2', 'caption'), $body-font);
|
|
48
|
+
|
|
49
|
+
$titles-font: map.get($fonts, 'titles', 'family');
|
|
50
|
+
$hero-titles-font: map.get($fonts, 'hero-titles', 'family');
|
|
51
|
+
$buttons-font: map.get($fonts, 'buttons', 'family');
|
|
52
|
+
|
|
53
|
+
// We fallback to body font if buttons font isn't provided.
|
|
54
|
+
@if $buttons-font == '' {
|
|
55
|
+
$buttons-font: $body-font;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Both titles font fallback to body font unless main one's being set.
|
|
59
|
+
@if $hero-titles-font == '' and $titles-font == '' {
|
|
60
|
+
$hero-titles-font: $body-font;
|
|
61
|
+
$titles-font: $body-font;
|
|
62
|
+
}
|
|
63
|
+
@else if $hero-titles-font == '' and $titles-font != '' {
|
|
64
|
+
$hero-titles-font: $titles-font;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
$typography: -set-text-groups-for($typography, $body-font, $buttons-font);
|
|
68
|
+
$typography: -set-typography-group($typography, ('headline-1', 'headline-2', 'headline-3', 'headline-4'), $hero-titles-font);
|
|
69
|
+
$typography: -set-typography-group($typography, ('headline-5', 'headline-6', 'subtitle-1', 'subtitle-2'), $titles-font);
|
|
70
|
+
$typography: map.set($typography, 'font-family', '"#{$buttons-font}"');
|
|
71
|
+
|
|
72
|
+
@return $typography;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@function -set-text-groups-for($typography, $body-font, $buttons-font) {
|
|
76
|
+
$typography: -set-typography-group($typography, ('body-1', 'body-2', 'caption'), $body-font);
|
|
77
|
+
$typography: -set-typography-group($typography, ('button'), $buttons-font);
|
|
78
|
+
@return $typography;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@function -generate-defaults-from($typography) {
|
|
82
|
+
// Return Roboto (default Angular Material's font (for now).
|
|
83
|
+
// $typography: -set-text-groups-for($typography, 'OpenSans-normal', 'OpenSans-bold');
|
|
84
|
+
// $typography: -set-typography-group($typography,('headline-1', 'headline-2', 'headline-3',
|
|
85
|
+
// 'headline-4', 'headline-5', 'headline-6', 'subtitle-1', 'subtitle-2'),'Montserrat-bold');
|
|
86
|
+
@return $typography;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@function -set-typography-group($typography, $desired-typography-group, $font) {
|
|
90
|
+
@each $setting in $desired-typography-group {
|
|
91
|
+
$typography: -set-typography-font($typography, $setting, $font);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@return $typography;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@function -set-typography-font($typography, $section, $font) {
|
|
98
|
+
$typography: map.set($typography, $section, 'font-family', '"#{$font}"');
|
|
99
|
+
@return $typography;
|
|
100
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
2
|
@use '@enigmatry/scss-foundation/src/modules/display/items';
|
|
3
|
-
@use '../../../../../../styles/modules/variables' as vars;
|
|
4
|
-
@use '../../../../../../styles/modules/states/hover';
|
|
5
|
-
@use '../../../../../../styles/modules/typography/fonts' as fonts;
|
|
6
3
|
|
|
7
4
|
$border-dark: #000;
|
|
5
|
+
$default-gap: 16px;
|
|
6
|
+
$large-gap: calc(#{$default-gap} * 2);
|
|
8
7
|
|
|
8
|
+
// TODO: Refactor me. Rename things adequately taking care of context, try minimizing styles required for this to look as expected.
|
|
9
9
|
.dialog-container {
|
|
10
10
|
/* stylelint-disable-next-line declaration-no-important */
|
|
11
11
|
position: absolute !important;
|
|
12
|
-
top:
|
|
12
|
+
top: $large-gap;
|
|
13
13
|
width: 100%;
|
|
14
14
|
max: {
|
|
15
15
|
/* stylelint-disable-next-line declaration-no-important */
|
|
16
16
|
width: 700px !important;
|
|
17
17
|
/* stylelint-disable-next-line declaration-no-important */
|
|
18
|
-
height: calc(100% - 2 *
|
|
18
|
+
height: calc(100% - 2 * $large-gap) !important;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
&.wide {
|
|
@@ -37,12 +37,11 @@ $border-dark: #000;
|
|
|
37
37
|
@include items.fully-align(center, space-between, row, nowrap);
|
|
38
38
|
|
|
39
39
|
.title {
|
|
40
|
-
// @include fonts.title-font();
|
|
41
40
|
line-height: 1.2;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
.close-button {
|
|
45
|
-
margin-left:
|
|
44
|
+
margin-left: $default-gap;
|
|
46
45
|
border: none;
|
|
47
46
|
background: none;
|
|
48
47
|
}
|
|
@@ -50,8 +49,8 @@ $border-dark: #000;
|
|
|
50
49
|
|
|
51
50
|
.dialog-content {
|
|
52
51
|
margin: {
|
|
53
|
-
top:
|
|
54
|
-
bottom:
|
|
52
|
+
top: $default-gap;
|
|
53
|
+
bottom: $large-gap;
|
|
55
54
|
}
|
|
56
55
|
line-height: 1.4;
|
|
57
56
|
|
|
@@ -72,7 +71,7 @@ $border-dark: #000;
|
|
|
72
71
|
|
|
73
72
|
.dialog-radio-button {
|
|
74
73
|
display: block;
|
|
75
|
-
margin-top:
|
|
74
|
+
margin-top: $default-gap;
|
|
76
75
|
white-space: break;
|
|
77
76
|
}
|
|
78
77
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@use '@enigmatry/scss-foundation/src/modules/display/items';
|
|
2
|
+
|
|
3
|
+
.entry-form {
|
|
4
|
+
.action-buttons {
|
|
5
|
+
margin-top: 25px;
|
|
6
|
+
|
|
7
|
+
.mdc-button:not(:first-child) {
|
|
8
|
+
margin-left: 10px;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.entry-checkbox {
|
|
13
|
+
display: block;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.mat-mdc-form-field {
|
|
17
|
+
margin-bottom: 20px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.mdc-form-field {
|
|
21
|
+
margin-bottom: 10px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.datetimepicker {
|
|
26
|
+
.mat-form-field-appearance-outline .mat-form-field-infix {
|
|
27
|
+
padding: {
|
|
28
|
+
top: 8px;
|
|
29
|
+
bottom: 8px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.entry-date-time-picker {
|
|
35
|
+
@include items.fully-align(baseline, space-between, row, nowrap);
|
|
36
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@use '@enigmatry/scss-foundation/src/modules/display/items';
|
|
2
|
+
|
|
3
|
+
.entry-table {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
overflow: auto;
|
|
7
|
+
|
|
8
|
+
.selection-cell, .action-cell {
|
|
9
|
+
width: 48px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.pagination {
|
|
13
|
+
margin-bottom: 10px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.no-results {
|
|
17
|
+
@include items.align-absolute-center();
|
|
18
|
+
flex: 1;
|
|
19
|
+
min-height: 50px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use '../generator';
|
|
2
|
+
|
|
3
|
+
$custom-theme: (
|
|
4
|
+
general: (
|
|
5
|
+
colors: (
|
|
6
|
+
primary: #FAE3C1
|
|
7
|
+
),
|
|
8
|
+
fonts: (
|
|
9
|
+
body: (
|
|
10
|
+
family: 'My-Font',
|
|
11
|
+
size: 41px
|
|
12
|
+
)
|
|
13
|
+
)
|
|
14
|
+
),
|
|
15
|
+
tables: (
|
|
16
|
+
cells: (
|
|
17
|
+
first-cell-padding-left: 11px
|
|
18
|
+
)
|
|
19
|
+
),
|
|
20
|
+
headers: (
|
|
21
|
+
title: (
|
|
22
|
+
size: 41px
|
|
23
|
+
)
|
|
24
|
+
),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
@include generator.generate-from($custom-theme);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use 'core/components';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
@use 'theming/default-theming' as default_theme;
|
|
4
|
-
@use 'components/dialogs/general' as dialogs;
|
|
5
|
-
|
|
6
|
-
$default-theme: default_theme.$theme;
|
|
7
|
-
|
|
8
|
-
@mixin generate($custom-theme: ()) {
|
|
9
|
-
$merged-theme: map.deep-merge($default-theme, $custom-theme);
|
|
10
|
-
@include dialogs.generate-dialog-from($merged-theme);
|
|
11
|
-
}
|