@elderbyte/ngx-starter 15.8.3 → 15.9.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/_index.scss +8 -7
- package/esm2020/lib/common/theme-sizes.mjs +1 -1
- package/lib/common/theme-sizes.d.ts +1 -1
- package/package.json +1 -1
- package/theming/_elder-common.scss +2 -2
- package/theming/_elder-defaults.scss +19 -2
- package/theming/_elder-flex-layout.scss +2 -1
- package/theming/_elder-scrollbar-theme.scss +47 -40
- package/theming/_elder-config.scss +0 -37
package/_index.scss
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
@forward "./theming/elder-scrollbar-theme";
|
|
3
3
|
@forward "./theming/elder-palettes";
|
|
4
4
|
@forward "./theming/elder-theme";
|
|
5
|
-
@forward "./theming/elder-
|
|
5
|
+
@forward "./theming/elder-defaults";
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
@use "./theming/elder-toast-theme" as elder-toast;
|
|
9
9
|
@use "./src/lib/components/chips/elder-chip-theme" as elder-chip;
|
|
10
10
|
@use "./theming/elder-style-fixes" as elder-fixes;
|
|
11
|
+
@use "./theming/elder-scrollbar-theme" as elder-scrollbar-theme;
|
|
11
12
|
@use "./theming/elder-defaults" as elder-defaults;
|
|
12
|
-
@use "./theming/elder-config" as elder-config;
|
|
13
13
|
@use "./theming/elder-mdc-support" as elder-mdc-support;
|
|
14
14
|
@use "./theming/elder-common" as elder-common;
|
|
15
15
|
@use "./theming/elder-flex-layout" as elder-flex-layout;
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
@use "./src/lib/components/select/multi/elder-multi-select-chips/elder-multi-select-chips.component" as elder-multi-select;
|
|
31
31
|
@use "./src/lib/components/iframes/iframe-host/iframe-host.component" as iframe-host;
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
@mixin starter-theme($theme, $elder-config: elder-config.buildConfig()) {
|
|
35
|
-
$common-sizes: map-get($elder-config, common-sizes);
|
|
33
|
+
@use "sass:map";
|
|
36
34
|
|
|
35
|
+
// Create a theme.
|
|
36
|
+
@mixin starter-theme($theme) {
|
|
37
37
|
$theme: elder-defaults.validate-and-set-defaults($theme);
|
|
38
38
|
@include elder-fixes.elder-style-fixes($theme);
|
|
39
39
|
@include elder-mdc-support.mdc-theme-support($theme);
|
|
40
|
-
@include elder-common.elder-common-styles($theme
|
|
41
|
-
@include elder-flex-layout.elder-flex-layout($
|
|
40
|
+
@include elder-common.elder-common-styles($theme);
|
|
41
|
+
@include elder-flex-layout.elder-flex-layout($theme);
|
|
42
42
|
|
|
43
43
|
@include elder-toast.theme($theme);
|
|
44
44
|
@include elder-chip.theme($theme);
|
|
@@ -57,5 +57,6 @@
|
|
|
57
57
|
@include elder-card.theme($theme);
|
|
58
58
|
@include elder-grid.theme($theme);
|
|
59
59
|
@include elder-button-group.theme($theme);
|
|
60
|
+
@include elder-scrollbar-theme.theme($theme);
|
|
60
61
|
@include iframe-host.theme($theme);
|
|
61
62
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWUtc2l6ZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9lbGRlcmJ5dGUvbmd4LXN0YXJ0ZXIvc3JjL2xpYi9jb21tb24vdGhlbWUtc2l6ZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRGVmaW5lZCBpbiBfZWxkZXItZGVmYXV0bHMuc2Nzc1xuICovXG5leHBvcnQgdHlwZSBFbGRlclNpemUgPSAneHMnIHwgJ3NtJyB8ICdtZCcgfCAnbGcnIHwgJ3hsJyB8ICd4eGwnO1xuIl19
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@use 'mat-icon-button-size' as icon-button-size;
|
|
2
2
|
@use '@angular/material' as mat;
|
|
3
3
|
@use 'mixins' as mixins;
|
|
4
|
-
@mixin elder-common-styles ($theme
|
|
5
|
-
|
|
4
|
+
@mixin elder-common-styles ($theme) {
|
|
5
|
+
$common-sizes: map-get($theme, elder, common-sizes);
|
|
6
6
|
$form-field-density: map-get($theme, elder, density, form-field);
|
|
7
7
|
@include mat.private-form-field-density($form-field-density);
|
|
8
8
|
|
|
@@ -3,17 +3,34 @@
|
|
|
3
3
|
/******************************
|
|
4
4
|
Default values
|
|
5
5
|
*******************************/
|
|
6
|
+
$commonSizesXs: 4px;
|
|
7
|
+
$commonSizesSm: 8px;
|
|
8
|
+
$commonSizesMd: 12px;
|
|
9
|
+
$commonSizesLg: 16px;
|
|
10
|
+
$commonSizesXl: 24px;
|
|
11
|
+
$commonSizesXxl: 32px;
|
|
12
|
+
|
|
6
13
|
$densityFormField: 0;
|
|
7
14
|
|
|
15
|
+
$scrollbarStyling: false;
|
|
8
16
|
|
|
9
17
|
/******************************
|
|
10
18
|
Validates $theme and sets default value if null
|
|
11
19
|
*******************************/
|
|
12
20
|
@function validate-and-set-defaults($theme) {
|
|
13
21
|
$elderMap: (
|
|
22
|
+
common-sizes: (
|
|
23
|
+
xs: get-or-default($theme, $commonSizesXs, common-sizes, xs),
|
|
24
|
+
sm: get-or-default($theme, $commonSizesSm, common-sizes, sm),
|
|
25
|
+
md: get-or-default($theme, $commonSizesMd, common-sizes, md),
|
|
26
|
+
lg: get-or-default($theme, $commonSizesLg, common-sizes, lg),
|
|
27
|
+
xl: get-or-default($theme, $commonSizesXl, common-sizes, xl),
|
|
28
|
+
xxl: get-or-default($theme, $commonSizesXxl, common-sizes, xxl),
|
|
29
|
+
),
|
|
14
30
|
density: (
|
|
15
|
-
form-field: get-or-default($theme, $densityFormField, density, form-field)
|
|
16
|
-
)
|
|
31
|
+
form-field: get-or-default($theme, $densityFormField, density, form-field),
|
|
32
|
+
),
|
|
33
|
+
scrollbar-styling: get-or-default($theme, $scrollbarStyling, scrollbar-styling),
|
|
17
34
|
);
|
|
18
35
|
|
|
19
36
|
@return map.set($theme, elder, $elderMap);
|
|
@@ -34,7 +34,8 @@ $media: (
|
|
|
34
34
|
box-sizing: border-box;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
@mixin elder-flex-layout($
|
|
37
|
+
@mixin elder-flex-layout($theme) {
|
|
38
|
+
$common-sizes: map-get($theme, elder, common-sizes);
|
|
38
39
|
|
|
39
40
|
/***************************************************************************
|
|
40
41
|
* *
|
|
@@ -1,56 +1,64 @@
|
|
|
1
1
|
@use '@angular/material' as mat;
|
|
2
|
-
@use '
|
|
2
|
+
@use 'sass:map';
|
|
3
3
|
|
|
4
|
-
@mixin
|
|
4
|
+
@mixin theme($theme) {
|
|
5
|
+
@include _starter-scrollbar-theme($theme);
|
|
6
|
+
}
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
$accent: map-get($theme, accent);
|
|
8
|
-
$warn: map-get($theme, warn);
|
|
9
|
-
$background: map-get($theme, background);
|
|
10
|
-
$foreground: map-get($theme, foreground);
|
|
8
|
+
@mixin _starter-scrollbar-theme($theme) {
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
$scrollbarStyling: map.get($theme, elder, scrollbar-styling);
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
@if $scrollbarStyling {
|
|
13
|
+
$primary: map-get($theme, primary);
|
|
14
|
+
$accent: map-get($theme, accent);
|
|
15
|
+
$warn: map-get($theme, warn);
|
|
16
|
+
$background: map-get($theme, background);
|
|
17
|
+
$foreground: map-get($theme, foreground);
|
|
18
|
+
$commonSizes: map.get($theme, elder, common-sizes);
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
@include scrollbar-width(map-get(elder-config.common-sizes(), sm));
|
|
20
|
-
}
|
|
20
|
+
@include scrollbar-width(map.get($commonSizes, sm)); // default
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
.scrollbar-xs {
|
|
23
|
+
@include scrollbar-width(map.get($commonSizes, xs));
|
|
24
|
+
}
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
.scrollbar-sm {
|
|
27
|
+
@include scrollbar-width(map.get($commonSizes, sm));
|
|
28
|
+
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
.scrollbar-md {
|
|
31
|
+
@include scrollbar-width(map.get($commonSizes, md));
|
|
32
|
+
}
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
.scrollbar-lg {
|
|
35
|
+
@include scrollbar-width(map.get($commonSizes, lg));
|
|
36
|
+
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
38
|
+
.scrollbar-xl {
|
|
39
|
+
@include scrollbar-width(map.get($commonSizes, xl));
|
|
40
|
+
}
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
border-radius: 5px;
|
|
47
|
-
}
|
|
42
|
+
.scrollbar-xxl {
|
|
43
|
+
@include scrollbar-width(map.get($commonSizes, xxl));
|
|
44
|
+
}
|
|
48
45
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
/* Track */
|
|
47
|
+
::-webkit-scrollbar-track {
|
|
48
|
+
// background: mat.get-color-from-palette($background, background);
|
|
49
|
+
}
|
|
53
50
|
|
|
51
|
+
/* Handle */
|
|
52
|
+
::-webkit-scrollbar-thumb {
|
|
53
|
+
background: mat.get-color-from-palette($primary);
|
|
54
|
+
border-radius: 5px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Handle on hover */
|
|
58
|
+
::-webkit-scrollbar-thumb:hover {
|
|
59
|
+
background: mat.get-color-from-palette($primary, 300);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
54
62
|
}
|
|
55
63
|
|
|
56
64
|
@mixin scrollbar-width($width) {
|
|
@@ -58,5 +66,4 @@
|
|
|
58
66
|
::-webkit-scrollbar {
|
|
59
67
|
width: $width;
|
|
60
68
|
}
|
|
61
|
-
|
|
62
69
|
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/*
|
|
3
|
-
Builds an elder-config.
|
|
4
|
-
|
|
5
|
-
All arguments are optional which means all, none are only a part of the arguments can be passed.
|
|
6
|
-
In case no arguments are passed, the default elder-config will be returned.
|
|
7
|
-
|
|
8
|
-
@Examples:
|
|
9
|
-
elder-config.build(); // returns default config
|
|
10
|
-
elder-config.build($common-sizes: $custom-sizes); // returns config with custom sizes
|
|
11
|
-
*/
|
|
12
|
-
@function buildConfig($common-sizes: common-sizes()) {
|
|
13
|
-
@return (
|
|
14
|
-
common-sizes: $common-sizes
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/*
|
|
19
|
-
Returns a map of common-sizes.
|
|
20
|
-
*/
|
|
21
|
-
@function common-sizes(
|
|
22
|
-
$xs: 4px,
|
|
23
|
-
$sm: 8px,
|
|
24
|
-
$md: 12px,
|
|
25
|
-
$lg: 16px,
|
|
26
|
-
$xl: 24px,
|
|
27
|
-
$xxl: 32px
|
|
28
|
-
) {
|
|
29
|
-
@return (
|
|
30
|
-
xs: $xs,
|
|
31
|
-
sm: $sm,
|
|
32
|
-
md: $md,
|
|
33
|
-
lg: $lg,
|
|
34
|
-
xl: $xl,
|
|
35
|
-
xxl: $xxl
|
|
36
|
-
)
|
|
37
|
-
}
|