@igo2/sdg-core 1.0.0-next.100
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 +1 -0
- package/analytics/analytics.interface.d.ts +8 -0
- package/analytics/analytics.provider.d.ts +3 -0
- package/analytics/google-analytics/google-analytics.interface.d.ts +10 -0
- package/analytics/google-analytics/google-analytics.provider.d.ts +3 -0
- package/analytics/google-analytics/google-analytics.service.d.ts +12 -0
- package/analytics/google-analytics/index.d.ts +3 -0
- package/analytics/index.d.ts +3 -0
- package/fesm2022/igo2-sdg-core.mjs +189 -0
- package/fesm2022/igo2-sdg-core.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/layout/breakpoint/breakpoint.service.d.ts +12 -0
- package/layout/breakpoint/index.d.ts +1 -0
- package/layout/index.d.ts +1 -0
- package/package.json +37 -0
- package/public-api.d.ts +3 -0
- package/router/index.d.ts +4 -0
- package/router/route.interface.d.ts +9 -0
- package/router/route.utils.d.ts +2 -0
- package/router/router.d.ts +5 -0
- package/router/title-resolver/index.d.ts +2 -0
- package/router/title-resolver/title-resolver.d.ts +5 -0
- package/router/title-resolver/title-resolver.pipe.d.ts +11 -0
- package/src/_index.scss +4 -0
- package/src/layout/_breakpoints.scss +116 -0
- package/src/layout/_index.scss +1 -0
- package/src/layout/bootstrap-layout.scss +1067 -0
- package/src/style/_elevation.scss +54 -0
- package/src/style/_index.scss +4 -0
- package/src/style/_sass-utils.scss +24 -0
- package/src/style/_typography-utils.scss +23 -0
- package/src/style/_typography.scss +139 -0
- package/src/style/overrides/_index.scss +2 -0
- package/src/style/overrides/igo2-lib/_index.scss +9 -0
- package/src/style/overrides/igo2-lib/_list.scss +22 -0
- package/src/style/overrides/igo2-lib/_panel.scss +7 -0
- package/src/style/overrides/igo2-lib/_search-bar.scss +70 -0
- package/src/style/overrides/material/_button.scss +118 -0
- package/src/style/overrides/material/_checkbox.scss +120 -0
- package/src/style/overrides/material/_chip.scss +122 -0
- package/src/style/overrides/material/_dialog.scss +37 -0
- package/src/style/overrides/material/_divider.scss +11 -0
- package/src/style/overrides/material/_form-field.scss +20 -0
- package/src/style/overrides/material/_icon.scss +34 -0
- package/src/style/overrides/material/_index.scss +25 -0
- package/src/style/overrides/material/_input.scss +5 -0
- package/src/style/overrides/material/_radio-button.scss +124 -0
- package/src/style/overrides/material/_sidenav.scss +9 -0
- package/src/style/overrides/material/_tab.scss +95 -0
- package/src/theme/_index.scss +1 -0
- package/src/theme/material/_index.scss +1 -0
- package/src/theme/material/_theme.scss +241 -0
- package/src/tokens/_index.scss +7 -0
- package/src/tokens/_sys-colors.scss +99 -0
- package/src/tokens/_sys-elevation.scss +17 -0
- package/src/tokens/_sys-layout.scss +28 -0
- package/src/tokens/_sys-palettes.scss +72 -0
- package/src/tokens/_sys-typography.scss +109 -0
- package/src/tokens/_system.scss +56 -0
- package/src/tokens/_token-utils.scss +79 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Most of the code is inspired or from @angular/material
|
|
3
|
+
* https://github.com/angular/components/tree/main/src/material/core/tokens/_token-utils.scss
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@use 'sass:map';
|
|
7
|
+
@use '../style/sass-utils';
|
|
8
|
+
|
|
9
|
+
// Creates a CSS variable, including the fallback if provided.
|
|
10
|
+
@function _create-var($name, $fallback: null) {
|
|
11
|
+
@if ($fallback) {
|
|
12
|
+
@return var($name, $fallback);
|
|
13
|
+
} @else {
|
|
14
|
+
@return var($name);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Returns the token slot value.
|
|
19
|
+
// Accepts an optional fallback parameter to include in the CSS variable.
|
|
20
|
+
// If $fallback is `true`, then use the tokens map to get the fallback.
|
|
21
|
+
@function slot($token, $fallbacks, $fallback: null) {
|
|
22
|
+
// Fallbacks are a map of base, color, typography, and density tokens. To simplify
|
|
23
|
+
// lookup, flatten these token groups into a single map.
|
|
24
|
+
$fallbacks-flattened: ();
|
|
25
|
+
@each $tokens in map.values($fallbacks) {
|
|
26
|
+
@each $token, $value in $tokens {
|
|
27
|
+
$fallbacks-flattened: map.set($fallbacks-flattened, $token, $value);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
@if not map.has-key($fallbacks-flattened, $token) {
|
|
31
|
+
@error 'Token #{$token} does not exist. Configured tokens are:' +
|
|
32
|
+
#{map.keys($fallbacks-flattened)};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
$sys-fallback: map.get($fallbacks-flattened, $token);
|
|
36
|
+
@if (sass-utils.is-css-var-name($sys-fallback)) {
|
|
37
|
+
$sys-fallback: _create-var($sys-fallback, $fallback);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@return _create-var(--sdg-#{$token}, $sys-fallback);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Outputs a map of token values as CSS variable definitions.
|
|
44
|
+
@mixin values($tokens) {
|
|
45
|
+
@include sass-utils.current-selector-or-root() {
|
|
46
|
+
@each $key, $value in $tokens {
|
|
47
|
+
@if $value != null {
|
|
48
|
+
--sdg-#{$key}: #{$value};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Flattens a nested map, concatenating keys with '-' and returning a flat map.
|
|
55
|
+
@function flatten-tokens-map($map, $prefix: '') {
|
|
56
|
+
$result: ();
|
|
57
|
+
@each $key, $value in $map {
|
|
58
|
+
$full-key: if($prefix != '', $prefix + '-' + $key, $key);
|
|
59
|
+
@if type-of($value) == 'map' {
|
|
60
|
+
$nested: flatten-tokens-map($value, $full-key);
|
|
61
|
+
@each $nkey, $nvalue in $nested {
|
|
62
|
+
$result: map.merge(
|
|
63
|
+
$result,
|
|
64
|
+
(
|
|
65
|
+
$nkey: $nvalue
|
|
66
|
+
)
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
} @else {
|
|
70
|
+
$result: map.merge(
|
|
71
|
+
$result,
|
|
72
|
+
(
|
|
73
|
+
$full-key: $value
|
|
74
|
+
)
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
@return $result;
|
|
79
|
+
}
|