@enigmatry/entry-components 1.15.1-preview.15 → 1.15.1-preview.16
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/package.json +1 -1
- package/styles/_generator.scss +1 -3
- package/styles/modules/_default-theme.scss +18 -10
- package/styles/modules/typography/_fonts.scss +1 -32
- package/styles/modules/{_angular-material-generator.scss → vendors/angular-material/_generator.scss} +11 -1
- package/styles/modules/vendors/angular-material/_typography-generator.scss +98 -0
- package/styles/partials/core/components/forms/_general.scss +4 -0
- package/styles/partials/generator-test.scss +5 -5
- package/styles/modules/elements/_generator.scss +0 -20
- package/styles/modules/elements/anchors/_generator.scss +0 -16
- package/styles/modules/elements/buttons/_default.scss +0 -12
- package/styles/modules/elements/buttons/_generator.scss +0 -45
- package/styles/modules/states/_hover.scss +0 -18
- /package/styles/modules/{_palette-generator.scss → vendors/angular-material/_palette-generator.scss} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enigmatry/entry-components",
|
|
3
|
-
"version": "1.15.1-preview.
|
|
3
|
+
"version": "1.15.1-preview.16",
|
|
4
4
|
"author": "Enigmatry",
|
|
5
5
|
"description": "Enigmatry entry angular material components",
|
|
6
6
|
"homepage": "https://github.com/enigmatry/entry-angular-building-blocks/tree/master/libs/entry-components#readme",
|
package/styles/_generator.scss
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
@use 'modules/components/dialogs/generator' as dialog;
|
|
2
2
|
@use 'modules/components/headers/generator' as header;
|
|
3
3
|
@use 'modules/components/tables/generator' as table;
|
|
4
|
-
@use 'modules/elements/generator' as elements;
|
|
5
4
|
@use 'modules/default-theme' as default;
|
|
6
|
-
@use 'modules/angular-material
|
|
5
|
+
@use 'modules/vendors/angular-material/generator' as material-theme;
|
|
7
6
|
@use 'sass:map';
|
|
8
7
|
|
|
9
8
|
@mixin generate-from($custom-theme: ()) {
|
|
10
9
|
$merged-theme: map.deep-merge(default.$theme, $custom-theme);
|
|
11
10
|
|
|
12
11
|
@include material-theme.generate-from($merged-theme);
|
|
13
|
-
@include elements.generate-from($merged-theme);
|
|
14
12
|
@include table.generate-from($merged-theme);
|
|
15
13
|
@include dialog.generate-from($merged-theme);
|
|
16
14
|
@include header.generate-from($merged-theme);
|
|
@@ -7,18 +7,26 @@ $theme: (
|
|
|
7
7
|
primary: #2581C4,
|
|
8
8
|
accent: #EA518D,
|
|
9
9
|
dark: #323232,
|
|
10
|
-
disabled: #D9D9D9,
|
|
11
10
|
disabled-light: #F5F5F5
|
|
12
11
|
),
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
typography: null,
|
|
13
|
+
fonts: (
|
|
14
|
+
hero-titles: (
|
|
15
|
+
family: '',
|
|
16
|
+
size: 0
|
|
17
|
+
),
|
|
18
|
+
titles: (
|
|
19
|
+
family: '',
|
|
20
|
+
size: 0
|
|
21
|
+
),
|
|
22
|
+
body: (
|
|
23
|
+
family: '',
|
|
24
|
+
size: 0
|
|
25
|
+
),
|
|
26
|
+
buttons: (
|
|
27
|
+
family: '',
|
|
28
|
+
size: 0
|
|
29
|
+
)
|
|
22
30
|
)
|
|
23
31
|
),
|
|
24
32
|
tables: (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
|
|
3
|
-
$font-path: '
|
|
3
|
+
$font-path: 'assets/fonts/';
|
|
4
4
|
$font-sources: (
|
|
5
5
|
(
|
|
6
6
|
name: 'OpenSans',
|
|
@@ -38,34 +38,3 @@ $font-sources: (
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
@mixin font($family: 'OpenSans-normal', $size: 14px) {
|
|
43
|
-
font: {
|
|
44
|
-
family: $family;
|
|
45
|
-
size: $size;
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@mixin main-font($size: 14px) {
|
|
50
|
-
@include font('OpenSans-normal', $size);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@mixin main-bolded-font($size: 14px) {
|
|
54
|
-
@include font('OpenSans-Bold', $size);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@mixin title-font($size: 20px) {
|
|
58
|
-
@include font('Montserrat-bold', $size);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@mixin font-family-from($theme) {
|
|
62
|
-
$font-family: map.get($theme, 'general', 'font', 'family');
|
|
63
|
-
|
|
64
|
-
@if $font-family == '' {
|
|
65
|
-
@content;
|
|
66
|
-
}
|
|
67
|
-
@else {
|
|
68
|
-
$font-size: map.get($theme, 'general', 'font', 'size');
|
|
69
|
-
@include font($font-family, $font-size);
|
|
70
|
-
}
|
|
71
|
-
}
|
package/styles/modules/{_angular-material-generator.scss → vendors/angular-material/_generator.scss}
RENAMED
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
@use '@angular/material' as theming;
|
|
2
2
|
@use 'palette-generator';
|
|
3
|
+
@use 'typography-generator';
|
|
3
4
|
@use 'sass:map';
|
|
5
|
+
@use '../../typography/fonts';
|
|
4
6
|
|
|
5
7
|
/* stylelint-disable scss/function-no-unknown */
|
|
6
8
|
@mixin generate-from($theme) {
|
|
7
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
|
+
}
|
|
8
15
|
|
|
9
16
|
$primary-palette: theming.define-palette(-get-material-palette-for('primary', $theme));
|
|
10
17
|
$accent-palette: theming.define-palette(-get-material-palette-for('accent', $theme));
|
|
11
18
|
$warn-palette: theming.define-palette(theming.$red-palette);
|
|
12
19
|
|
|
20
|
+
$typography: typography-generator.generate-from($theme);
|
|
21
|
+
@include theming.typography-hierarchy($typography);
|
|
22
|
+
|
|
13
23
|
$default-theme: theming.define-light-theme((
|
|
14
24
|
color: (
|
|
15
25
|
primary: $primary-palette,
|
|
16
26
|
accent: $accent-palette,
|
|
17
27
|
warn: $warn-palette
|
|
18
28
|
),
|
|
19
|
-
typography:
|
|
29
|
+
typography: $typography
|
|
20
30
|
));
|
|
21
31
|
|
|
22
32
|
@include theming.all-component-themes($default-theme);
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
|
|
71
|
+
@return $typography;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@function -set-text-groups-for($typography, $body-font, $buttons-font) {
|
|
75
|
+
$typography: -set-typography-group($typography, ('body-1', 'body-2', 'caption'), $body-font);
|
|
76
|
+
$typography: -set-typography-group($typography, ('button'), $buttons-font);
|
|
77
|
+
@return $typography;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@function -generate-defaults-from($typography) {
|
|
81
|
+
$typography: -set-text-groups-for($typography, 'OpenSans-normal', 'OpenSans-bold');
|
|
82
|
+
$typography: -set-typography-group($typography,('headline-1', 'headline-2', 'headline-3',
|
|
83
|
+
'headline-4', 'headline-5', 'headline-6', 'subtitle-1', 'subtitle-2'),'Montserrat-bold');
|
|
84
|
+
@return $typography;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@function -set-typography-group($typography, $desired-typography-group, $font) {
|
|
88
|
+
@each $setting in $desired-typography-group {
|
|
89
|
+
$typography: -set-typography-font($typography, $setting, $font);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@return $typography;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@function -set-typography-font($typography, $section, $font) {
|
|
96
|
+
$typography: map.set($typography, $section, 'font-family', $font);
|
|
97
|
+
@return $typography;
|
|
98
|
+
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@use '../default-theme' as default;
|
|
3
|
-
@use '../typography/fonts';
|
|
4
|
-
@use 'anchors/generator' as anchors;
|
|
5
|
-
@use 'buttons/generator' as buttons;
|
|
6
|
-
|
|
7
|
-
$default-theme: default.$theme;
|
|
8
|
-
|
|
9
|
-
@mixin generate-from($custom-theme: ()) {
|
|
10
|
-
$merged-theme: map.deep-merge($default-theme, $custom-theme);
|
|
11
|
-
|
|
12
|
-
$font-family: map.get($merged-theme, 'general', 'font', 'family');
|
|
13
|
-
|
|
14
|
-
@if $font-family == '' {
|
|
15
|
-
// @include fonts.generate-default-font();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@include anchors.generate-from($merged-theme);
|
|
19
|
-
@include buttons.generate-from($merged-theme);
|
|
20
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
@mixin generate-from($theme) {
|
|
4
|
-
$colors: map.get($theme, 'general', 'colors');
|
|
5
|
-
$primary-color: map.get($colors, 'primary');
|
|
6
|
-
$accent-color: map.get($colors, 'accent');
|
|
7
|
-
|
|
8
|
-
.entry-link {
|
|
9
|
-
color: $primary-color;
|
|
10
|
-
text-decoration: none;
|
|
11
|
-
|
|
12
|
-
&:hover {
|
|
13
|
-
color: $accent-color;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
@use 'default';
|
|
2
|
-
@use 'sass:map';
|
|
3
|
-
@use '../../typography/fonts';
|
|
4
|
-
@use '../../states/hover';
|
|
5
|
-
|
|
6
|
-
@mixin generate-from($theme) {
|
|
7
|
-
$button-color: map.get($theme, 'general', 'buttons', 'color');
|
|
8
|
-
$colors: map.get($theme, 'general', 'colors');
|
|
9
|
-
$primary-color: map.get($colors, 'primary');
|
|
10
|
-
$accent-color: map.get($colors, 'accent');
|
|
11
|
-
$disabled-color: map.get($colors, 'disabled');
|
|
12
|
-
|
|
13
|
-
.entry-button-accent, .entry-button-primary, .entry-button-dark {
|
|
14
|
-
@extend %entry-button;
|
|
15
|
-
@include fonts.font-family-from($theme) {
|
|
16
|
-
@include fonts.main-bolded-font();
|
|
17
|
-
}
|
|
18
|
-
color: $button-color;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.entry-button-primary {
|
|
22
|
-
@include hover.default($primary-color, $accent-color, $button-color, $disabled-color);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.entry-button-accent {
|
|
26
|
-
@include hover.default($accent-color, $primary-color, $button-color, $disabled-color);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.entry-button-dark {
|
|
30
|
-
@include hover.default(map.get($colors, 'dark'), $primary-color, $button-color, $disabled-color);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.entry-button-blank {
|
|
34
|
-
@include fonts.font-family-from($theme) {
|
|
35
|
-
@include fonts.main-font();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@include hover.default(transparent, transparent, $accent-color, transparent);
|
|
39
|
-
color: $primary-color;
|
|
40
|
-
|
|
41
|
-
&:disabled {
|
|
42
|
-
color: $primary-color;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
@mixin default($background, $hover-background, $color, $disabled-background) {
|
|
2
|
-
background-color: $background;
|
|
3
|
-
|
|
4
|
-
&:hover, &:active {
|
|
5
|
-
background-color: $hover-background;
|
|
6
|
-
color: $color;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
&:disabled, &.disabled {
|
|
10
|
-
background-color: $disabled-background;
|
|
11
|
-
cursor: not-allowed;
|
|
12
|
-
|
|
13
|
-
/* stylelint-disable-next-line selector-max-pseudo-class */
|
|
14
|
-
&:hover {
|
|
15
|
-
background-color: $disabled-background;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
/package/styles/modules/{_palette-generator.scss → vendors/angular-material/_palette-generator.scss}
RENAMED
|
File without changes
|