c3-components 0.0.42 → 0.0.44

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.
@@ -0,0 +1,112 @@
1
+ @mixin c3-file-viewer($theme) {
2
+ .container {
3
+ position: relative;
4
+ width: 100%;
5
+ display: flex;
6
+ justify-content: center;
7
+ align-items: center;
8
+ overflow: hidden;
9
+
10
+ .btn-container {
11
+ position: absolute;
12
+ z-index: 98;
13
+ text-align: right;
14
+ bottom: 0;
15
+ right: 0;
16
+ width: 100%;
17
+ }
18
+
19
+ & img {
20
+ max-width: 100%;
21
+ max-height: 100%;
22
+ }
23
+
24
+ & a,
25
+ button {
26
+ z-index: 99;
27
+ position: relative;
28
+
29
+ &:not(:disabled) {
30
+ cursor: pointer;
31
+ }
32
+ }
33
+ }
34
+
35
+ button.default,
36
+ a.default {
37
+ height: 40px;
38
+ width: 40px;
39
+ opacity: 0.7;
40
+ transition: opacity 200ms;
41
+
42
+ &:hover {
43
+ opacity: 1;
44
+ }
45
+
46
+ &:disabled {
47
+ opacity: 0.25;
48
+ }
49
+ }
50
+
51
+ .nav-button-container > button,
52
+ .nav-button-container > a {
53
+ position: relative;
54
+ right: 0;
55
+ margin: 0 10px;
56
+ }
57
+
58
+ .nav-button-container {
59
+ text-align: center;
60
+ position: absolute;
61
+ z-index: 98;
62
+ bottom: 50px;
63
+ left: 0;
64
+ right: 0;
65
+ }
66
+
67
+ .spinner-container {
68
+ position: absolute;
69
+ left: 0;
70
+ right: 0;
71
+ top: 0;
72
+ bottom: 0;
73
+ width: 60px;
74
+ height: 60px;
75
+ margin: auto;
76
+ padding: 10px;
77
+ background-color: rgba(0, 0, 0, 0.4);
78
+ border-radius: 25%;
79
+
80
+ .spinner {
81
+ border-width: 7px;
82
+ border-style: solid;
83
+ border-color: #ccc;
84
+ border-bottom-color: #222;
85
+ border-radius: 50%;
86
+ height: 100%;
87
+ width: 100%;
88
+ box-sizing: border-box;
89
+ animation: rotation 2s linear infinite;
90
+ }
91
+ }
92
+
93
+ @keyframes rotation {
94
+ 0% {
95
+ transform: rotate(0deg);
96
+ }
97
+ 100% {
98
+ transform: rotate(359deg);
99
+ }
100
+ }
101
+
102
+ .c3-file-viewer-pdf {
103
+ height: 100%;
104
+ width: 100%;
105
+ }
106
+
107
+ .c3-file-viewer {
108
+ display: block;
109
+ height: 100%;
110
+ width: 100%;
111
+ }
112
+ }
@@ -0,0 +1,12 @@
1
+ declare class BooleanSignal {
2
+ private _signal;
3
+ constructor(initialValue: Boolean);
4
+ get value(): Boolean;
5
+ set value(newValue: Boolean);
6
+ toggle(): void;
7
+ reset(): void;
8
+ setToTrue(): void;
9
+ setToFalse(): void;
10
+ }
11
+ export declare function booleanSignal(value: boolean): BooleanSignal;
12
+ export {};
@@ -0,0 +1,11 @@
1
+ @use "./c3-root-variables" as *;
2
+ @use "../c3-dropdown/styles/_c3-dropdown" as *;
3
+ @use "../c3-file-viewer/styles/_c3-file-viewer" as *;
4
+ @use "../c3-expansion/styles/_c3-expansion" as *;
5
+
6
+ @mixin c3-core($theme) {
7
+ @include c3-root-variables($theme);
8
+ @include c3-material-dropdown($theme);
9
+ @include c3-file-viewer($theme);
10
+ @include c3-expansion($theme);
11
+ }
@@ -0,0 +1,124 @@
1
+ @use "sass:map";
2
+ @use "sass:meta";
3
+ @use "./utils" as utils;
4
+
5
+ @mixin c3-root-variables($theme) {
6
+ :root {
7
+ $primary-palette: map.get($theme, primary);
8
+ $accent-palette: map.get($theme, accent);
9
+ $warn-palette: map.get($theme, warn);
10
+ $background-palette: map.get($theme, background);
11
+ $foreground-palette: map.get($theme, foreground);
12
+
13
+ $is-dark-theme: map.get($theme, is-dark);
14
+
15
+ $primary-color: map.get($primary-palette, 500);
16
+ $primary-color-light: map.get($primary-palette, 300);
17
+ $primary-color-dark: map.get($primary-palette, 700);
18
+
19
+ $accent-color: map.get($accent-palette, 500);
20
+ $accent-color-light: map.get($accent-palette, 300);
21
+ $accent-color-dark: map.get($accent-palette, 700);
22
+
23
+ $warn-color: map.get($warn-palette, 500);
24
+ $warn-color-light: map.get($warn-palette, 300);
25
+ $warn-color-dark: map.get($warn-palette, 700);
26
+
27
+ $background-status-bar: map.get($background-palette, status-bar);
28
+ $background-app-bar: map.get($background-palette, app-bar);
29
+ $background-background: map.get($background-palette, background);
30
+ $background-hover: map.get($background-palette, hover);
31
+ $background-card: map.get($background-palette, card);
32
+ $background-dialog: map.get($background-palette, dialog);
33
+ $background-disabled-button: map.get($background-palette, disabled-button);
34
+ $background-raised-button: map.get($background-palette, raised-button);
35
+ $background-focused-button: map.get($background-palette, focused-button);
36
+ $background-selected-button: map.get($background-palette, selected-button);
37
+ $background-selected-disabled-button: map.get(
38
+ $background-palette,
39
+ selected-disabled-button
40
+ );
41
+ $background-disabled-button-toggle: map.get(
42
+ $background-palette,
43
+ disabled-button-toggle
44
+ );
45
+ $background-unselected-chip: map.get($background-palette, unselected-chip);
46
+ $background-disabled-list-option: map.get(
47
+ $background-palette,
48
+ disabled-list-option
49
+ );
50
+ $background-tooltip: map.get($background-palette, tooltip);
51
+
52
+ $foreground-base: map.get($foreground-palette, base);
53
+ $foreground-divider: map.get($foreground-palette, divider);
54
+ $foreground-dividers: map.get($foreground-palette, dividers);
55
+ $foreground-disabled: map.get($foreground-palette, disabled);
56
+ $foreground-disabled-button: map.get($foreground-palette, disabled-button);
57
+ $foreground-disabled-text: map.get($foreground-palette, disabled-text);
58
+ $foreground-elevation: map.get($foreground-palette, elevation);
59
+ $foreground-hint-text: map.get($foreground-palette, hint-text);
60
+ $foreground-secondary-text: map.get($foreground-palette, secondary-text);
61
+ $foreground-icon: map.get($foreground-palette, icon);
62
+ $foreground-icons: map.get($foreground-palette, icons);
63
+ $foreground-text: map.get($foreground-palette, text);
64
+ $foreground-slider-min: map.get($foreground-palette, slider-min);
65
+ $foreground-slider-off: map.get($foreground-palette, slider-off);
66
+ $foreground-slider-off-active: map.get(
67
+ $foreground-palette,
68
+ slider-off-active
69
+ );
70
+
71
+ --primary-color: #{$primary-color};
72
+ --primary-color-light: #{$primary-color-light};
73
+ --primary-color-dark: #{$primary-color-dark};
74
+
75
+ --accent-color: #{$accent-color};
76
+ --accent-color-light: #{$accent-color-light};
77
+ --accent-color-dark: #{$accent-color-dark};
78
+
79
+ --warn-color: #{$warn-color};
80
+ --warn-color-light: #{$warn-color-light};
81
+ --warn-color-dark: #{$warn-color-dark};
82
+
83
+ --background-status-bar: #{$background-status-bar};
84
+ --background-app-bar: #{$background-app-bar};
85
+ --background-background: #{$background-background};
86
+ --background-hover: #{$background-hover};
87
+ --background-card: #{$background-card};
88
+ --background-dialog: #{$background-dialog};
89
+ --background-disabled-button: #{$background-disabled-button};
90
+ --background-raised-button: #{$background-raised-button};
91
+ --background-focused-button: #{$background-focused-button};
92
+ --background-selected-button: #{$background-selected-button};
93
+ --background-selected-disabled-button: #{$background-selected-disabled-button};
94
+ --background-disabled-button-toggle: #{$background-disabled-button-toggle};
95
+ --background-unselected-chip: #{$background-unselected-chip};
96
+ --background-disabled-list-option: #{$background-disabled-list-option};
97
+ --background-tooltip: #{$background-tooltip};
98
+
99
+ @if $is-dark-theme {
100
+ --background-card-table: #{utils.get-color-from-palette($accent-palette)};
101
+ } @else {
102
+ --background-card-table: #{utils.get-color-from-palette(
103
+ $accent-palette,
104
+ 100
105
+ )};
106
+ }
107
+
108
+ --foreground-base: #{$foreground-base};
109
+ --foreground-divider: #{$foreground-divider};
110
+ --foreground-dividers: #{$foreground-dividers};
111
+ --foreground-disabled: #{$foreground-disabled};
112
+ --foreground-disabled-button: #{$foreground-disabled-button};
113
+ --foreground-disabled-text: #{$foreground-disabled-text};
114
+ --foreground-elevation: #{$foreground-elevation};
115
+ --foreground-hint-text: #{$foreground-hint-text};
116
+ --foreground-secondary-text: #{$foreground-secondary-text};
117
+ --foreground-icon: #{$foreground-icon};
118
+ --foreground-icons: #{$foreground-icons};
119
+ --foreground-text: #{$foreground-text};
120
+ --foreground-slider-min: #{$foreground-slider-min};
121
+ --foreground-slider-off: #{$foreground-slider-off};
122
+ --foreground-slider-off-active: #{$foreground-slider-off-active};
123
+ }
124
+ }
@@ -0,0 +1,33 @@
1
+ @use "sass:map";
2
+ @use "sass:meta";
3
+
4
+ @function get-contrast-color-from-palette($palette, $hue) {
5
+ @return map.get(map.get($palette, contrast), $hue);
6
+ }
7
+
8
+ @function get-color-from-palette($palette, $hue: default, $opacity: null) {
9
+ // If hueKey is a number between zero and one, then it actually contains an
10
+ // opacity value, so recall this function with the default hue and that given opacity.
11
+ @if meta.type-of($hue) == number and $hue >= 0 and $hue <= 1 {
12
+ @return get-color-from-palette($palette, default, $hue);
13
+ }
14
+
15
+ $color: map.get($palette, $hue);
16
+
17
+ @if (meta.type-of($color) != color) {
18
+ // If the $color resolved to something different from a color (e.g. a CSS variable),
19
+ // we can't apply the opacity anyway so we return the value as is, otherwise Sass can
20
+ // throw an error or output something invalid.
21
+ @return $color;
22
+ }
23
+
24
+ @return rgba($color, if($opacity == null, opacity($color), $opacity));
25
+ }
26
+
27
+ @function get-color-config($theme, $default: null) {
28
+ @if map.has-key($theme, color) {
29
+ @return map.get($theme, color);
30
+ }
31
+
32
+ @return $default;
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c3-components",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "description": "C3 Components Library",
5
5
  "author": "Kroenen62",
6
6
  "license": "MIT",
package/public-api.d.ts CHANGED
@@ -46,4 +46,4 @@ export * from './lib/c3-select-on-focus/c3-select-on-focus.directive';
46
46
  /**
47
47
  * Toggle Signal
48
48
  */
49
- export * from './lib/c3-signals/c3-toggle-signal';
49
+ export * from './lib/c3-signals/c3-boolean-signal';
@@ -1,24 +0,0 @@
1
- import { signal } from '@angular/core';
2
- class ToggleSignal {
3
- constructor(initialValue) {
4
- this._signal = signal(initialValue);
5
- }
6
- get value() {
7
- return this._signal();
8
- }
9
- set value(newValue) {
10
- this._signal.set(newValue);
11
- }
12
- toggle() {
13
- if (typeof this._signal() === 'boolean') {
14
- this._signal.set(!this._signal());
15
- }
16
- else {
17
- throw new Error('Toggle can only be used on boolean signals');
18
- }
19
- }
20
- }
21
- export function toggleSignal(value) {
22
- return new ToggleSignal(value);
23
- }
24
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYzMtdG9nZ2xlLXNpZ25hbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2MzLWNvbXBvbmVudHMvc3JjL2xpYi9jMy1zaWduYWxzL2MzLXRvZ2dsZS1zaWduYWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBa0IsTUFBTSxlQUFlLENBQUM7QUFFdkQsTUFBTSxZQUFZO0lBR2hCLFlBQVksWUFBZTtRQUN6QixJQUFJLENBQUMsT0FBTyxHQUFHLE1BQU0sQ0FBSSxZQUFZLENBQUMsQ0FBQztJQUN6QyxDQUFDO0lBRUQsSUFBSSxLQUFLO1FBQ1AsT0FBTyxJQUFJLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDeEIsQ0FBQztJQUVELElBQUksS0FBSyxDQUFDLFFBQVc7UUFDbkIsSUFBSSxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDLENBQUM7SUFDN0IsQ0FBQztJQUVELE1BQU07UUFDSixJQUFJLE9BQU8sSUFBSSxDQUFDLE9BQU8sRUFBRSxLQUFLLFNBQVMsRUFBRSxDQUFDO1lBQ3hDLElBQUksQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDLE9BQU8sRUFBUyxDQUFDLENBQUM7UUFDM0MsQ0FBQzthQUFNLENBQUM7WUFDTixNQUFNLElBQUksS0FBSyxDQUFDLDRDQUE0QyxDQUFDLENBQUM7UUFDaEUsQ0FBQztJQUNILENBQUM7Q0FHRjtBQUVELE1BQU0sVUFBVSxZQUFZLENBQUMsS0FBYztJQUN6QyxPQUFPLElBQUksWUFBWSxDQUFDLEtBQUssQ0FBQyxDQUFDO0FBQ2pDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBzaWduYWwsIFdyaXRhYmxlU2lnbmFsIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmNsYXNzIFRvZ2dsZVNpZ25hbDxUIGV4dGVuZHMgQm9vbGVhbj4ge1xuICBwcml2YXRlIF9zaWduYWw6IFdyaXRhYmxlU2lnbmFsPFQ+O1xuXG4gIGNvbnN0cnVjdG9yKGluaXRpYWxWYWx1ZTogVCkge1xuICAgIHRoaXMuX3NpZ25hbCA9IHNpZ25hbDxUPihpbml0aWFsVmFsdWUpO1xuICB9XG5cbiAgZ2V0IHZhbHVlKCkge1xuICAgIHJldHVybiB0aGlzLl9zaWduYWwoKTtcbiAgfVxuXG4gIHNldCB2YWx1ZShuZXdWYWx1ZTogVCkge1xuICAgIHRoaXMuX3NpZ25hbC5zZXQobmV3VmFsdWUpO1xuICB9XG5cbiAgdG9nZ2xlKCkge1xuICAgIGlmICh0eXBlb2YgdGhpcy5fc2lnbmFsKCkgPT09ICdib29sZWFuJykge1xuICAgICAgdGhpcy5fc2lnbmFsLnNldCghdGhpcy5fc2lnbmFsKCkgYXMgYW55KTtcbiAgICB9IGVsc2Uge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdUb2dnbGUgY2FuIG9ubHkgYmUgdXNlZCBvbiBib29sZWFuIHNpZ25hbHMnKTtcbiAgICB9XG4gIH1cblxuICAvLyBBam91dGV6IGQnYXV0cmVzIG3DqXRob2RlcyBwZXJzb25uYWxpc8OpZXMgc2kgbsOpY2Vzc2FpcmVcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHRvZ2dsZVNpZ25hbCh2YWx1ZTogYm9vbGVhbikge1xuICByZXR1cm4gbmV3IFRvZ2dsZVNpZ25hbCh2YWx1ZSk7XG59XG4iXX0=
@@ -1,22 +0,0 @@
1
- @use '@angular/material' as mat
2
-
3
- =c3-material-dropdown($theme)
4
- $is-dark-theme: mat.get-theme-type($theme) == dark
5
- $primary: mat.get-theme-color($theme, primary)
6
- $accent: mat.get-theme-color($theme, accent)
7
- $warn: mat.get-theme-color($theme, warn)
8
- $bg-card: mat.get-theme-color($theme, background, card)
9
- $color-text: mat.get-theme-color($theme, foreground, text)
10
-
11
- .c3-dropdown-panel
12
- background: $bg-card
13
- color: $color-text
14
- border-radius: 4px
15
- min-width: 112px
16
- overflow: auto
17
- max-height: calc(100vh - 48px)
18
- border-radius: 4px
19
- outline: 0
20
- padding: 4px
21
- @include mat.elevation-transition()
22
- @include mat.elevation(8)
@@ -1,103 +0,0 @@
1
- =c3-file-viewer($theme)
2
- .container
3
- position: relative
4
- width: 100%
5
- display: flex
6
- justify-content: center
7
- align-items: center
8
- overflow: hidden
9
-
10
- .btn-container
11
- position: absolute
12
- z-index: 98
13
- text-align: right
14
- bottom: 0
15
- right: 0
16
- width: 100%
17
-
18
- & img
19
- max-width: 100%
20
- max-height: 100%
21
-
22
- & a,
23
- button
24
- z-index: 99
25
- position: relative
26
-
27
- &:not(:disabled)
28
- cursor: pointer
29
-
30
- button.default,
31
- a.default
32
- height: 40px
33
- width: 40px
34
- opacity: 0.7
35
- transition: opacity 200ms
36
-
37
- button.default:hover,
38
- a.default:hover
39
- opacity: 1
40
-
41
- button.default:disabled,
42
- a.default:disabled
43
- opacity: 0.25
44
-
45
- .nav-button-container > button,
46
- .nav-button-container > a
47
- position: relative
48
- right: 0
49
- margin: 0 10px
50
-
51
- .nav-button-container
52
- text-align: center
53
- position: absolute
54
- z-index: 98
55
- bottom: 50px
56
- left: 0
57
- right: 0
58
-
59
- .spinner-container
60
- position: absolute
61
- left: 0
62
- right: 0
63
- top: 0
64
- bottom: 0
65
- width: 60px
66
- height: 60px
67
- margin: auto
68
- padding: 10px
69
- background-color: rgba(0, 0, 0, 0.4)
70
- border-radius: 25%
71
-
72
- .spinner
73
- border-width: 7px
74
- border-style: solid
75
- border-color: #ccc
76
- border-bottom-color: #222
77
- border-radius: 50%
78
- height: 100%
79
- width: 100%
80
- box-sizing: border-box
81
- -webkit-animation: rotation 2s linear infinite
82
- /* Safari 4+ */
83
- -moz-animation: rotation 2s linear infinite
84
- /* Fx 5+ */
85
- -o-animation: rotation 2s linear infinite
86
- /* Opera 12+ */
87
- animation: rotation 2s linear infinite
88
- /* IE 10+, Fx 29+ */
89
-
90
- @keyframes rotation
91
- 0%
92
- -transform: rotate(0deg)
93
- 100%
94
- -transform: rotate(359deg)
95
-
96
- .c3-file-viewer-pdf
97
- height: 100%
98
- width: 100%
99
-
100
- .c3-file-viewer
101
- display: block
102
- height: 100%
103
- width: 100%
@@ -1,9 +0,0 @@
1
- declare class ToggleSignal<T extends Boolean> {
2
- private _signal;
3
- constructor(initialValue: T);
4
- get value(): T;
5
- set value(newValue: T);
6
- toggle(): void;
7
- }
8
- export declare function toggleSignal(value: boolean): ToggleSignal<boolean>;
9
- export {};
@@ -1,10 +0,0 @@
1
- @use "./c3-root-variables" as *
2
- @use "../c3-dropdown/styles/_c3-dropdown" as *
3
- @use "../c3-file-viewer/styles/_c3-file-viewer" as *
4
- @use "../c3-expansion/styles/_c3-expansion" as *
5
-
6
- =c3-core($theme)
7
- @include c3-root-variables($theme)
8
- @include c3-material-dropdown($theme)
9
- @include c3-file-viewer($theme)
10
- @include c3-expansion($theme)
@@ -1,106 +0,0 @@
1
- @use "sass:map"
2
- @use "sass:meta"
3
- @use "./utils" as utils
4
-
5
- =c3-root-variables($theme)
6
- :root
7
- $primary-palette: map.get($theme, primary)
8
- $accent-palette: map.get($theme, accent)
9
- $warn-palette: map.get($theme, warn)
10
- $background-palette: map.get($theme, background)
11
- $foreground-palette: map.get($theme, foreground)
12
-
13
- $is-dark-theme: map.get($theme, is-dark)
14
-
15
- $primary-color: map.get($primary-palette, 500)
16
- $primary-color-light: map.get($primary-palette, 300)
17
- $primary-color-dark: map.get($primary-palette, 700)
18
-
19
- $accent-color: map.get($accent-palette, 500)
20
- $accent-color-light: map.get($accent-palette, 300)
21
- $accent-color-dark: map.get($accent-palette, 700)
22
-
23
- $warn-color: map.get($warn-palette, 500)
24
- $warn-color-light: map.get($warn-palette, 300)
25
- $warn-color-dark: map.get($warn-palette, 700)
26
-
27
- $background-status-bar: map.get($background-palette, status-bar)
28
- $background-app-bar: map.get($background-palette, app-bar)
29
- $background-background: map.get($background-palette, background)
30
- $background-hover: map.get($background-palette, hover)
31
- $background-card: map.get($background-palette, card)
32
- $background-dialog: map.get($background-palette, dialog)
33
- $background-disabled-button: map.get($background-palette, disabled-button)
34
- $background-raised-button: map.get($background-palette, raised-button)
35
- $background-focused-button: map.get($background-palette, focused-button)
36
- $background-selected-button: map.get($background-palette, selected-button)
37
- $background-selected-disabled-button: map.get($background-palette, selected-disabled-button)
38
- $background-disabled-button-toggle: map.get($background-palette, disabled-button-toggle)
39
- $background-unselected-chip: map.get($background-palette, unselected-chip)
40
- $background-disabled-list-option: map.get($background-palette, disabled-list-option)
41
- $background-tooltip: map.get($background-palette, tooltip)
42
-
43
- $foreground-base: map.get($foreground-palette, base)
44
- $foreground-divider: map.get($foreground-palette, divider)
45
- $foreground-dividers: map.get($foreground-palette, dividers)
46
- $foreground-disabled: map.get($foreground-palette, disabled)
47
- $foreground-disabled-button: map.get($foreground-palette, disabled-button)
48
- $foreground-disabled-text: map.get($foreground-palette, disabled-text)
49
- $foreground-elevation: map.get($foreground-palette, elevation)
50
- $foreground-hint-text: map.get($foreground-palette, hint-text)
51
- $foreground-secondary-text: map.get($foreground-palette, secondary-text)
52
- $foreground-icon: map.get($foreground-palette, icon)
53
- $foreground-icons: map.get($foreground-palette, icons)
54
- $foreground-text: map.get($foreground-palette, text)
55
- $foreground-slider-min: map.get($foreground-palette, slider-min)
56
- $foreground-slider-off: map.get($foreground-palette, slider-off)
57
- $foreground-slider-off-active: map.get($foreground-palette, slider-off-active)
58
-
59
- --primary-color: #{$primary-color}
60
- --primary-color-light: #{$primary-color-light}
61
- --primary-color-dark: #{$primary-color-dark}
62
-
63
- --accent-color: #{$accent-color}
64
- --accent-color-light: #{$accent-color-light}
65
- --accent-color-dark: #{$accent-color-dark}
66
-
67
- --warn-color: #{$warn-color}
68
- --warn-color-light: #{$warn-color-light}
69
- --warn-color-dark: #{$warn-color-dark}
70
-
71
- --background-status-bar: #{$background-status-bar}
72
- --background-app-bar: #{$background-app-bar}
73
- --background-background: #{$background-background}
74
- --background-hover: #{$background-hover}
75
- --background-card: #{$background-card}
76
- --background-dialog: #{$background-dialog}
77
- --background-disabled-button: #{$background-disabled-button}
78
- --background-raised-button: #{$background-raised-button}
79
- --background-focused-button: #{$background-focused-button}
80
- --background-selected-button: #{$background-selected-button}
81
- --background-selected-disabled-button: #{$background-selected-disabled-button}
82
- --background-disabled-button-toggle: #{$background-disabled-button-toggle}
83
- --background-unselected-chip: #{$background-unselected-chip}
84
- --background-disabled-list-option: #{$background-disabled-list-option}
85
- --background-tooltip: #{$background-tooltip}
86
-
87
- @if $is-dark-theme
88
- --background-card-table: #{utils.get-color-from-palette($accent-palette)}
89
- @else
90
- --background-card-table: #{utils.get-color-from-palette($accent-palette, 100)}
91
-
92
- --foreground-base: #{$foreground-base}
93
- --foreground-divider: #{$foreground-divider}
94
- --foreground-dividers: #{$foreground-dividers}
95
- --foreground-disabled: #{$foreground-disabled}
96
- --foreground-disabled-button: #{$foreground-disabled-button}
97
- --foreground-disabled-text: #{$foreground-disabled-text}
98
- --foreground-elevation: #{$foreground-elevation}
99
- --foreground-hint-text: #{$foreground-hint-text}
100
- --foreground-secondary-text: #{$foreground-secondary-text}
101
- --foreground-icon: #{$foreground-icon}
102
- --foreground-icons: #{$foreground-icons}
103
- --foreground-text: #{$foreground-text}
104
- --foreground-slider-min: #{$foreground-slider-min}
105
- --foreground-slider-off: #{$foreground-slider-off}
106
- --foreground-slider-off-active: #{$foreground-slider-off-active}
@@ -1,26 +0,0 @@
1
- @use "sass:map"
2
- @use "sass:meta"
3
- @function get-contrast-color-from-palette($palette, $hue)
4
- @return map.get(map.get($palette, contrast), $hue)
5
-
6
- @function get-color-from-palette($palette, $hue: default, $opacity: null)
7
- // If hueKey is a number between zero and one, then it actually contains an
8
- // opacity value, so recall this function with the default hue and that given opacity.
9
- @if meta.type-of($hue) ==number and $hue>=0 and $hue <=1
10
- @return get-color-from-palette($palette, default, $hue)
11
-
12
- $color: map.get($palette, $hue)
13
-
14
- @if (meta.type-of($color) !=color)
15
- // If the $color resolved to something different from a color (e.g. a CSS variable),
16
- // we can't apply the opacity anyway so we return the value as is, otherwise Sass can
17
- // throw an error or output something invalid.
18
- @return $color
19
-
20
- @return rgba($color, if($opacity==null, opacity($color), $opacity))
21
-
22
- @function get-color-config($theme, $default: null)
23
- @if map.has-key($theme, color)
24
- @return map.get($theme, color)
25
-
26
- @return $default