@acontplus/ng-components 2.3.0 → 2.4.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/fesm2022/acontplus-ng-components.mjs +717 -1196
- package/fesm2022/acontplus-ng-components.mjs.map +1 -1
- package/package.json +7 -7
- package/src/_index.scss +5 -0
- package/src/core/theming/_all-theme.scss +6 -0
- package/src/core/tokens/_system.scss +2 -6
- package/src/lib/components/badge/_badge-theme.scss +58 -0
- package/src/lib/components/badge/_m3-badge.scss +52 -0
- package/src/lib/components/badge/badge.scss +318 -0
- package/src/lib/components/kpi-card/_kpi-card-theme.scss +41 -0
- package/src/lib/components/kpi-card/_m3-kpi-card.scss +98 -0
- package/src/lib/components/kpi-card/kpi-card.scss +741 -0
- package/types/acontplus-ng-components.d.ts +223 -317
- package/src/lib/components/autocomplete-wrapper/autocomplete-wrapper.scss +0 -677
- package/src/lib/styles/_elevation.scss +0 -168
- package/src/lib/styles/_token-utils.scss +0 -115
- package/src/styles/_custom-dialog.scss +0 -37
- package/src/styles/_mixins.scss +0 -12
- package/src/styles/index.scss +0 -4
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@use 'sass:math';
|
|
3
|
-
@use 'sass:meta';
|
|
4
|
-
@use 'sass:string';
|
|
5
|
-
|
|
6
|
-
$_umbra-opacity: 0.2;
|
|
7
|
-
$_penumbra-opacity: 0.14;
|
|
8
|
-
$_ambient-opacity: 0.12;
|
|
9
|
-
|
|
10
|
-
$_umbra-map: (
|
|
11
|
-
0: '0px 0px 0px 0px',
|
|
12
|
-
1: '0px 2px 1px -1px',
|
|
13
|
-
2: '0px 3px 1px -2px',
|
|
14
|
-
3: '0px 3px 3px -2px',
|
|
15
|
-
4: '0px 2px 4px -1px',
|
|
16
|
-
5: '0px 3px 5px -1px',
|
|
17
|
-
6: '0px 3px 5px -1px',
|
|
18
|
-
7: '0px 4px 5px -2px',
|
|
19
|
-
8: '0px 5px 5px -3px',
|
|
20
|
-
9: '0px 5px 6px -3px',
|
|
21
|
-
10: '0px 6px 6px -3px',
|
|
22
|
-
11: '0px 6px 7px -4px',
|
|
23
|
-
12: '0px 7px 8px -4px',
|
|
24
|
-
13: '0px 7px 8px -4px',
|
|
25
|
-
14: '0px 7px 9px -4px',
|
|
26
|
-
15: '0px 8px 9px -5px',
|
|
27
|
-
16: '0px 8px 10px -5px',
|
|
28
|
-
17: '0px 8px 11px -5px',
|
|
29
|
-
18: '0px 9px 11px -5px',
|
|
30
|
-
19: '0px 9px 12px -6px',
|
|
31
|
-
20: '0px 10px 13px -6px',
|
|
32
|
-
21: '0px 10px 13px -6px',
|
|
33
|
-
22: '0px 10px 14px -6px',
|
|
34
|
-
23: '0px 11px 14px -7px',
|
|
35
|
-
24: '0px 11px 15px -7px',
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
$_penumbra-map: (
|
|
39
|
-
0: '0px 0px 0px 0px',
|
|
40
|
-
1: '0px 1px 1px 0px',
|
|
41
|
-
2: '0px 2px 2px 0px',
|
|
42
|
-
3: '0px 3px 4px 0px',
|
|
43
|
-
4: '0px 4px 5px 0px',
|
|
44
|
-
5: '0px 5px 8px 0px',
|
|
45
|
-
6: '0px 6px 10px 0px',
|
|
46
|
-
7: '0px 7px 10px 1px',
|
|
47
|
-
8: '0px 8px 10px 1px',
|
|
48
|
-
9: '0px 9px 12px 1px',
|
|
49
|
-
10: '0px 10px 14px 1px',
|
|
50
|
-
11: '0px 11px 15px 1px',
|
|
51
|
-
12: '0px 12px 17px 2px',
|
|
52
|
-
13: '0px 13px 19px 2px',
|
|
53
|
-
14: '0px 14px 21px 2px',
|
|
54
|
-
15: '0px 15px 22px 2px',
|
|
55
|
-
16: '0px 16px 24px 2px',
|
|
56
|
-
17: '0px 17px 26px 2px',
|
|
57
|
-
18: '0px 18px 28px 2px',
|
|
58
|
-
19: '0px 19px 29px 2px',
|
|
59
|
-
20: '0px 20px 31px 3px',
|
|
60
|
-
21: '0px 21px 33px 3px',
|
|
61
|
-
22: '0px 22px 35px 3px',
|
|
62
|
-
23: '0px 23px 36px 3px',
|
|
63
|
-
24: '0px 24px 38px 3px',
|
|
64
|
-
);
|
|
65
|
-
|
|
66
|
-
$_ambient-map: (
|
|
67
|
-
0: '0px 0px 0px 0px',
|
|
68
|
-
1: '0px 1px 3px 0px',
|
|
69
|
-
2: '0px 1px 5px 0px',
|
|
70
|
-
3: '0px 1px 8px 0px',
|
|
71
|
-
4: '0px 1px 10px 0px',
|
|
72
|
-
5: '0px 1px 14px 0px',
|
|
73
|
-
6: '0px 1px 18px 0px',
|
|
74
|
-
7: '0px 2px 16px 1px',
|
|
75
|
-
8: '0px 3px 14px 2px',
|
|
76
|
-
9: '0px 3px 16px 2px',
|
|
77
|
-
10: '0px 4px 18px 3px',
|
|
78
|
-
11: '0px 4px 20px 3px',
|
|
79
|
-
12: '0px 5px 22px 4px',
|
|
80
|
-
13: '0px 5px 24px 4px',
|
|
81
|
-
14: '0px 5px 26px 4px',
|
|
82
|
-
15: '0px 6px 28px 5px',
|
|
83
|
-
16: '0px 6px 30px 5px',
|
|
84
|
-
17: '0px 6px 32px 5px',
|
|
85
|
-
18: '0px 7px 34px 6px',
|
|
86
|
-
19: '0px 7px 36px 6px',
|
|
87
|
-
20: '0px 8px 38px 7px',
|
|
88
|
-
21: '0px 8px 40px 7px',
|
|
89
|
-
22: '0px 8px 42px 7px',
|
|
90
|
-
23: '0px 9px 44px 8px',
|
|
91
|
-
24: '0px 9px 46px 8px',
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
// A collection of mixins and CSS classes that can be used to apply elevation to a material
|
|
95
|
-
// element.
|
|
96
|
-
// See: https://material.io/design/environment/elevation.html
|
|
97
|
-
// Examples:
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
// .mat-foo {
|
|
101
|
-
// @include $mat-elevation(2);
|
|
102
|
-
//
|
|
103
|
-
// &:active {
|
|
104
|
-
// @include $mat-elevation(8);
|
|
105
|
-
// }
|
|
106
|
-
// }
|
|
107
|
-
//
|
|
108
|
-
// <div id="external-card" class="mat-elevation-z2"><p>Some content</p></div>
|
|
109
|
-
//
|
|
110
|
-
// For an explanation of the design behind how elevation is implemented, see the design doc at
|
|
111
|
-
// https://goo.gl/Kq0k9Z.
|
|
112
|
-
|
|
113
|
-
// The default color for elevation shadows.
|
|
114
|
-
$color: black !default;
|
|
115
|
-
|
|
116
|
-
// Prefix for elevation-related selectors.
|
|
117
|
-
$prefix: 'mat-elevation-z';
|
|
118
|
-
|
|
119
|
-
// Applies the correct css rules to an element to give it the elevation specified by $zValue.
|
|
120
|
-
// The $zValue must be between 0 and 24.
|
|
121
|
-
@mixin elevation($zValue, $color: $color, $opacity: null) {
|
|
122
|
-
box-shadow: get-box-shadow($zValue, $color, $opacity);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// Applies the elevation to an element in a manner that allows
|
|
126
|
-
// consumers to override it via the Material elevation classes.
|
|
127
|
-
@mixin overridable-elevation($zValue, $color: $color, $opacity: null) {
|
|
128
|
-
&:not([class*='#{$prefix}']) {
|
|
129
|
-
@include elevation($zValue, $color, $opacity);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// Gets the box shadow value for a specific elevation.
|
|
134
|
-
@function get-box-shadow($zValue, $shadow-color: black, $opacity: null) {
|
|
135
|
-
@if $zValue == null {
|
|
136
|
-
@return null;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
@if meta.type-of($zValue) != number or not math.is-unitless($zValue) {
|
|
140
|
-
@error '$zValue must be a unitless number, but received `#{$zValue}`';
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
@if $zValue < 0 or $zValue > 24 {
|
|
144
|
-
@error '$zValue must be between 0 and 24, but received `#{$zValue}`';
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
$umbra-z-value: map.get($_umbra-map, $zValue);
|
|
148
|
-
$penumbra-z-value: map.get($_penumbra-map, $zValue);
|
|
149
|
-
$ambient-z-value: map.get($_ambient-map, $zValue);
|
|
150
|
-
|
|
151
|
-
$color-opacity: if($opacity != null, $opacity, 1);
|
|
152
|
-
$umbra-color: _compute-color-opacity($shadow-color, $_umbra-opacity * $color-opacity);
|
|
153
|
-
$penumbra-color: _compute-color-opacity($shadow-color, $_penumbra-opacity * $color-opacity);
|
|
154
|
-
$ambient-color: _compute-color-opacity($shadow-color, $_ambient-opacity * $color-opacity);
|
|
155
|
-
|
|
156
|
-
@return string.unquote(
|
|
157
|
-
'#{$umbra-z-value} #{$umbra-color}, #{$penumbra-z-value} ' +
|
|
158
|
-
'#{$penumbra-color}, #{$ambient-z-value} #{$ambient-color}'
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
@function _compute-color-opacity($color, $opacity) {
|
|
163
|
-
@if meta.type-of($color) == color and $opacity != null {
|
|
164
|
-
@return rgba($color, $opacity);
|
|
165
|
-
} @else {
|
|
166
|
-
@return $color;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
@use 'sass:list';
|
|
2
|
-
@use 'sass:map';
|
|
3
|
-
@use 'sass:string';
|
|
4
|
-
@use '@angular/material' as mat;
|
|
5
|
-
|
|
6
|
-
// Creates a CSS variable, including the fallback if provided.
|
|
7
|
-
@function _create-var($name, $fallback: null) {
|
|
8
|
-
@if ($fallback) {
|
|
9
|
-
@return var($name, $fallback);
|
|
10
|
-
} @else {
|
|
11
|
-
@return var($name);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// Returns a list of overrides for the given M3 get-tokens mixin and prefix. Each token has its
|
|
16
|
-
// prefix removed since the overrides API expects its absence. The returned map includes "all" for
|
|
17
|
-
// all override tokens, and also the subsets with keys base, color, typography, and density.
|
|
18
|
-
@function get-overrides($tokens, $prefix) {
|
|
19
|
-
$base: remove-token-prefixes(map.get($tokens, base), $prefix);
|
|
20
|
-
$color: remove-token-prefixes(map.get($tokens, color), $prefix);
|
|
21
|
-
$typography: remove-token-prefixes(map.get($tokens, typography), $prefix);
|
|
22
|
-
$density: remove-token-prefixes(map.get($tokens, density), $prefix);
|
|
23
|
-
$all: ();
|
|
24
|
-
@each $map in ($base, $color, $typography, $density) {
|
|
25
|
-
$all: map.merge($all, $map);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@return (all: $all, base: $base, color: $color, typography: $typography, density: $density);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Removes a prefix from each component token in the provided map of prefixed tokens.
|
|
32
|
-
@function remove-token-prefixes($prefixed-tokens: (), $prefix) {
|
|
33
|
-
$tokens: ();
|
|
34
|
-
@each $prefixed-token, $value in $prefixed-tokens {
|
|
35
|
-
$token: string.slice($prefixed-token, string.length($prefix) + 2);
|
|
36
|
-
$tokens: map.set($tokens, $token, $value);
|
|
37
|
-
}
|
|
38
|
-
@return $tokens;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Returns the token slot value.
|
|
42
|
-
// Accepts an optional fallback parameter to include in the CSS variable.
|
|
43
|
-
// If $fallback is `true`, then use the tokens map to get the fallback.
|
|
44
|
-
@function slot($token, $fallbacks, $fallback: null) {
|
|
45
|
-
// Fallbacks are a map of base, color, typography, and density tokens. To simplify
|
|
46
|
-
// lookup, flatten these token groups into a single map.
|
|
47
|
-
$fallbacks-flattened: ();
|
|
48
|
-
@each $tokens in map.values($fallbacks) {
|
|
49
|
-
@each $token, $value in $tokens {
|
|
50
|
-
$fallbacks-flattened: map.set($fallbacks-flattened, $token, $value);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
@if not map.has-key($fallbacks-flattened, $token) {
|
|
54
|
-
@error 'Token #{$token} does not exist. Configured tokens are:' +
|
|
55
|
-
#{map.keys($fallbacks-flattened)};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
$sys-fallback: map.get($fallbacks-flattened, $token);
|
|
59
|
-
@if (mat.private-is-css-var-name($sys-fallback)) {
|
|
60
|
-
$sys-fallback: _create-var($sys-fallback, $fallback);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
@return _create-var(--acp-#{$token}, $sys-fallback);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Outputs a map of token values as CSS variable definitions.
|
|
67
|
-
@mixin values($tokens) {
|
|
68
|
-
@include mat.private-current-selector-or-root() {
|
|
69
|
-
@each $key, $value in $tokens {
|
|
70
|
-
@if $value != null {
|
|
71
|
-
--acp-#{$key}: #{$value};
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/// Emits new token values for the given token overrides.
|
|
78
|
-
/// Verifies that the overrides passed in are valid tokens.
|
|
79
|
-
/// New token values are emitted under the current selector or root.
|
|
80
|
-
@mixin batch-create-token-values($overrides: (), $namespace-configs) {
|
|
81
|
-
@include mat.private-current-selector-or-root() {
|
|
82
|
-
$prefixed-name-data: ();
|
|
83
|
-
$all-names: ();
|
|
84
|
-
|
|
85
|
-
@each $config in $namespace-configs {
|
|
86
|
-
$namespace: map.get($config, namespace);
|
|
87
|
-
$prefix: '';
|
|
88
|
-
@if map.has-key($config, prefix) {
|
|
89
|
-
$prefix: map.get($config, prefix);
|
|
90
|
-
}
|
|
91
|
-
$tokens: map.get(map.get($config, tokens), all);
|
|
92
|
-
@each $name, $value in $tokens {
|
|
93
|
-
$prefixed-name: $prefix + $name;
|
|
94
|
-
$all-names: list.append($all-names, $prefixed-name, $separator: comma);
|
|
95
|
-
$prefixed-name-data: map.set($prefixed-name-data, $prefixed-name, ($namespace, $name));
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
@each $name, $value in $overrides {
|
|
100
|
-
@if map.has-key($prefixed-name-data, $name) {
|
|
101
|
-
$data: map.get($prefixed-name-data, $name);
|
|
102
|
-
$namespace: list.nth($data, 1);
|
|
103
|
-
$name: list.nth($data, 2);
|
|
104
|
-
$prefixed-name: $namespace + '-' + $name;
|
|
105
|
-
@include values(
|
|
106
|
-
(
|
|
107
|
-
$prefixed-name: $value,
|
|
108
|
-
)
|
|
109
|
-
);
|
|
110
|
-
} @else {
|
|
111
|
-
@error #{'Invalid token name `'}#{$name}#{'`. '}#{'Valid tokens are: '}#{$all-names};
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
.full-screen-dialog {
|
|
2
|
-
.mat-mdc-dialog-container {
|
|
3
|
-
padding: 0;
|
|
4
|
-
border-radius: 0;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.dialog-xs .mat-mdc-dialog-container {
|
|
9
|
-
max-width: 320px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.dialog-sm .mat-mdc-dialog-container {
|
|
13
|
-
max-width: 440px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.dialog-md .mat-mdc-dialog-container {
|
|
17
|
-
max-width: 640px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.dialog-lg .mat-mdc-dialog-container {
|
|
21
|
-
max-width: 840px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.dialog-xl .mat-mdc-dialog-container {
|
|
25
|
-
max-width: 1240px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.dialog-xxl .mat-mdc-dialog-container {
|
|
29
|
-
max-width: 1440px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@media (max-width: 768px) {
|
|
33
|
-
.mat-mdc-dialog-container {
|
|
34
|
-
max-width: 95vw !important;
|
|
35
|
-
max-height: 90vh !important;
|
|
36
|
-
}
|
|
37
|
-
}
|
package/src/styles/_mixins.scss
DELETED
package/src/styles/index.scss
DELETED