@scion/components 16.1.0 → 17.0.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 +99 -1
- package/design/_index.scss +1 -0
- package/design/_theming.scss +244 -0
- package/design/colors/_scion-dark-colors.scss +91 -0
- package/design/colors/_scion-light-colors.scss +91 -0
- package/design/colors/_scion-static-colors.scss +4 -0
- package/design/components/_scion-component-tokens.scss +48 -0
- package/design/themes/_scion-dark-theme.scss +55 -0
- package/design/themes/_scion-light-theme.scss +55 -0
- package/esm2022/dimension/dimension.directive.mjs +6 -7
- package/esm2022/dimension/dimension.module.mjs +6 -7
- package/esm2022/sashbox/element-ref.directive.mjs +6 -7
- package/esm2022/sashbox/sash-initializer.directive.mjs +6 -7
- package/esm2022/sashbox/sash.directive.mjs +6 -7
- package/esm2022/sashbox/sashbox.component.mjs +20 -20
- package/esm2022/sashbox/sashbox.module.mjs +6 -7
- package/esm2022/splitter/splitter.component.mjs +20 -20
- package/esm2022/splitter/splitter.module.mjs +6 -7
- package/esm2022/throbber/ellipsis-throbber/ellipsis-throbber.component.mjs +6 -7
- package/esm2022/throbber/ripple-throbber/ripple-throbber.component.mjs +6 -7
- package/esm2022/throbber/roller-throbber/roller-throbber.component.mjs +6 -7
- package/esm2022/throbber/spinner-throbber/spinner-throbber.component.mjs +6 -7
- package/esm2022/throbber/throbber.component.mjs +9 -9
- package/esm2022/throbber/throbber.module.mjs +6 -7
- package/esm2022/viewport/native-scrollbar-track-size-provider.service.mjs +12 -10
- package/esm2022/viewport/scrollable.directive.mjs +6 -7
- package/esm2022/viewport/scrollbar/scrollbar.component.mjs +12 -12
- package/esm2022/viewport/viewport.component.mjs +13 -13
- package/esm2022/viewport/viewport.module.mjs +6 -7
- package/fesm2022/scion-components-dimension.mjs +8 -8
- package/fesm2022/scion-components-dimension.mjs.map +1 -1
- package/fesm2022/scion-components-sashbox.mjs +34 -33
- package/fesm2022/scion-components-sashbox.mjs.map +1 -1
- package/fesm2022/scion-components-splitter.mjs +22 -21
- package/fesm2022/scion-components-splitter.mjs.map +1 -1
- package/fesm2022/scion-components-throbber.mjs +27 -26
- package/fesm2022/scion-components-throbber.mjs.map +1 -1
- package/fesm2022/scion-components-viewport.mjs +39 -34
- package/fesm2022/scion-components-viewport.mjs.map +1 -1
- package/package.json +10 -4
- package/sashbox/sashbox.component.d.ts +12 -11
- package/splitter/splitter.component.d.ts +12 -11
- package/throbber/throbber.component.d.ts +3 -2
- package/viewport/{_scrollbar.scss → scrollbar/_scrollbar.scss} +3 -4
- package/viewport/scrollbar/scrollbar.component.d.ts +4 -3
- package/viewport/viewport.component.d.ts +6 -5
- /package/viewport/{_index.scss → scrollbar/_index.scss} +0 -0
package/_index.scss
CHANGED
|
@@ -1 +1,99 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* This SCSS module provides a set of design tokens to enable consistent design of components of the SCION libraries.
|
|
3
|
+
*
|
|
4
|
+
* An application can define a custom theme to change the default look of the SCION components. Multiple themes are supported.
|
|
5
|
+
* A theme is a collection of design tokens, defining specific design aspects such as colors, spacings, etc. A design token can have a different value per theme.
|
|
6
|
+
*
|
|
7
|
+
* An application typically loads this module in the `styles.scss` file.
|
|
8
|
+
*
|
|
9
|
+
* ```scss
|
|
10
|
+
* @use '@scion/components';
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* ## Themes
|
|
14
|
+
* SCION provides a light and a dark theme, `scion-light` and `scion-dark`. Custom themes can be passed to the module under the `$themes` map entry,
|
|
15
|
+
* replacing the built-in themes. A custom theme can define only a subset of the available design tokens, with unspecified tokens inherited from the
|
|
16
|
+
* built-in theme of the same color scheme. The color scheme of a theme is determined by the `color-scheme` token.
|
|
17
|
+
*
|
|
18
|
+
* ```scss
|
|
19
|
+
* @use '@scion/components' with (
|
|
20
|
+
* $themes: (
|
|
21
|
+
* dark: (
|
|
22
|
+
* color-scheme: dark,
|
|
23
|
+
* --sci-color-gray-50: #1D1D1D,
|
|
24
|
+
* --sci-color-gray-75: #262626,
|
|
25
|
+
* --sci-color-gray-100: #323232,
|
|
26
|
+
* --sci-color-gray-200: #3F3F3F,
|
|
27
|
+
* --sci-color-gray-300: #545454,
|
|
28
|
+
* --sci-color-gray-400: #707070,
|
|
29
|
+
* --sci-color-gray-500: #909090,
|
|
30
|
+
* --sci-color-gray-600: #B2B2B2,
|
|
31
|
+
* --sci-color-gray-700: #D1D1D1,
|
|
32
|
+
* --sci-color-gray-800: #EBEBEB,
|
|
33
|
+
* --sci-color-gray-900: #FFFFFF,
|
|
34
|
+
* --sci-color-accent: blueviolet,
|
|
35
|
+
* ),
|
|
36
|
+
* light: (
|
|
37
|
+
* color-scheme: light,
|
|
38
|
+
* --sci-color-gray-50: #FFFFFF,
|
|
39
|
+
* --sci-color-gray-75: #FDFDFD,
|
|
40
|
+
* --sci-color-gray-100: #F8F8F8,
|
|
41
|
+
* --sci-color-gray-200: #E6E6E6,
|
|
42
|
+
* --sci-color-gray-300: #D5D5D5,
|
|
43
|
+
* --sci-color-gray-400: #B1B1B1,
|
|
44
|
+
* --sci-color-gray-500: #909090,
|
|
45
|
+
* --sci-color-gray-600: #6D6D6D,
|
|
46
|
+
* --sci-color-gray-700: #464646,
|
|
47
|
+
* --sci-color-gray-800: #222222,
|
|
48
|
+
* --sci-color-gray-900: #000000,
|
|
49
|
+
* --sci-color-accent: blueviolet,
|
|
50
|
+
* ),
|
|
51
|
+
* )
|
|
52
|
+
* );
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* ## Theme Selection
|
|
56
|
+
* A theme is selected based on the user's OS color scheme preference. To select a theme manually, add the `sci-theme` attribute to the root HTML element and set its value to the name of the theme.
|
|
57
|
+
*
|
|
58
|
+
* ```html
|
|
59
|
+
* <html sci-theme="scion-dark">
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* ## SCION Design Tokens
|
|
63
|
+
* SCION supports the following design tokens:
|
|
64
|
+
*
|
|
65
|
+
* ### Static Color Tokens
|
|
66
|
+
* Colors that have a fixed color value across all themes.
|
|
67
|
+
*
|
|
68
|
+
* [Static Color Tokens](https://raw.githubusercontent.com/SchweizerischeBundesbahnen/scion-toolkit/master/projects/scion/components/design/colors/_scion-static-colors.scss)
|
|
69
|
+
*
|
|
70
|
+
* ### Named Color Tokens
|
|
71
|
+
* Predefined set of named colors as palette of tints and shades.
|
|
72
|
+
*
|
|
73
|
+
* [Named Color Tokens (light theme)](https://raw.githubusercontent.com/SchweizerischeBundesbahnen/scion-toolkit/master/projects/scion/components/design/colors/_scion-light-colors.scss)
|
|
74
|
+
* [Named Color Tokens (dark theme)](https://raw.githubusercontent.com/SchweizerischeBundesbahnen/scion-toolkit/master/projects/scion/components/design/colors/_scion-dark-colors.scss)
|
|
75
|
+
*
|
|
76
|
+
* ### Semantic Tokens
|
|
77
|
+
* Tokens for a particular usage.
|
|
78
|
+
*
|
|
79
|
+
* [Semantic Tokens (light theme)](https://raw.githubusercontent.com/SchweizerischeBundesbahnen/scion-toolkit/master/projects/scion/components/design/themes/_scion-light-theme.scss)
|
|
80
|
+
* [Semantic Tokens (dark theme)](https://raw.githubusercontent.com/SchweizerischeBundesbahnen/scion-toolkit/master/projects/scion/components/design/themes/_scion-dark-theme.scss)
|
|
81
|
+
*
|
|
82
|
+
* ### Component-specific Tokens
|
|
83
|
+
* Tokens for a particular component.
|
|
84
|
+
*
|
|
85
|
+
* [Component-specific Tokens](https://raw.githubusercontent.com/SchweizerischeBundesbahnen/scion-toolkit/master/projects/scion/components/design/components/_scion-component-tokens.scss)
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
@use './design/theming' as sci-theming;
|
|
89
|
+
@use './design/themes/scion-light-theme';
|
|
90
|
+
@use './design/themes/scion-dark-theme';
|
|
91
|
+
@use 'sass:map';
|
|
92
|
+
|
|
93
|
+
$-built-in-themes: (
|
|
94
|
+
scion-light: map.set(scion-light-theme.$theme, color-scheme, light),
|
|
95
|
+
scion-dark: map.set(scion-dark-theme.$theme, color-scheme, dark),
|
|
96
|
+
);
|
|
97
|
+
$themes: $-built-in-themes !default;
|
|
98
|
+
$themes: sci-theming.augment($themes, $-built-in-themes);
|
|
99
|
+
@include sci-theming.install($themes);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@forward './theming' as ɵthemes-* show ɵthemes-augment;
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Installs provided themes and selects a theme based on the user's OS color scheme preference.
|
|
5
|
+
*
|
|
6
|
+
* ```scss
|
|
7
|
+
* @use '@scion/components' with (
|
|
8
|
+
* $themes: (
|
|
9
|
+
* dark: (
|
|
10
|
+
* color-scheme: dark,
|
|
11
|
+
* --sci-color-gray-50: #1D1D1D,
|
|
12
|
+
* --sci-color-gray-75: #262626,
|
|
13
|
+
* --sci-color-gray-100: #323232,
|
|
14
|
+
* --sci-color-gray-200: #3F3F3F,
|
|
15
|
+
* --sci-color-gray-300: #545454,
|
|
16
|
+
* --sci-color-gray-400: #707070,
|
|
17
|
+
* --sci-color-gray-500: #909090,
|
|
18
|
+
* --sci-color-gray-600: #B2B2B2,
|
|
19
|
+
* --sci-color-gray-700: #D1D1D1,
|
|
20
|
+
* --sci-color-gray-800: #EBEBEB,
|
|
21
|
+
* --sci-color-gray-900: #FFFFFF,
|
|
22
|
+
* --sci-color-accent: blueviolet,
|
|
23
|
+
* ),
|
|
24
|
+
* light: (
|
|
25
|
+
* color-scheme: light,
|
|
26
|
+
* --sci-color-gray-50: #FFFFFF,
|
|
27
|
+
* --sci-color-gray-75: #FDFDFD,
|
|
28
|
+
* --sci-color-gray-100: #F8F8F8,
|
|
29
|
+
* --sci-color-gray-200: #E6E6E6,
|
|
30
|
+
* --sci-color-gray-300: #D5D5D5,
|
|
31
|
+
* --sci-color-gray-400: #B1B1B1,
|
|
32
|
+
* --sci-color-gray-500: #909090,
|
|
33
|
+
* --sci-color-gray-600: #6D6D6D,
|
|
34
|
+
* --sci-color-gray-700: #464646,
|
|
35
|
+
* --sci-color-gray-800: #222222,
|
|
36
|
+
* --sci-color-gray-900: #000000,
|
|
37
|
+
* --sci-color-accent: blueviolet,
|
|
38
|
+
* ),
|
|
39
|
+
* ),
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @param {map} $themes - A map of themes with token mappings.
|
|
44
|
+
*/
|
|
45
|
+
@mixin install($themes) {
|
|
46
|
+
@if ($themes == null or $themes == ()) {
|
|
47
|
+
@error 'No themes provided to "@scion/components" SCSS module. Provide a map of themes with token mappings. Refer to the documentation for an example.';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
$void: -warn-if-color-scheme-token-missing($themes);
|
|
51
|
+
$themes: -add-theme-name-token($themes);
|
|
52
|
+
|
|
53
|
+
@layer sci-theme {
|
|
54
|
+
@include -create-theme-selector($themes);
|
|
55
|
+
@include -auto-select-preferred-theme($themes);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Augments the provided themes with the provided built-in themes, matching the themes by name or, if there is no match, by light or dark color scheme.
|
|
61
|
+
* The color scheme of a theme is determined by evaluating the "color-scheme" token.
|
|
62
|
+
*
|
|
63
|
+
* @param {map} $themes - map of themes to be augmented with tokens of the built-in themes.
|
|
64
|
+
* @param {map} $built-in-themes - map of built-in themes.
|
|
65
|
+
* @return {map} Themes with augmented tokens.
|
|
66
|
+
*/
|
|
67
|
+
@function augment($themes, $built-in-themes) {
|
|
68
|
+
@each $theme, $tokens in $themes {
|
|
69
|
+
@if map.has-key($built-in-themes, $theme) {
|
|
70
|
+
$built-in-theme: map.get($built-in-themes, $theme);
|
|
71
|
+
$themes: map.set($themes, $theme, map.merge($built-in-theme, $tokens));
|
|
72
|
+
}
|
|
73
|
+
@else {
|
|
74
|
+
$void: -warn-if-color-scheme-token-missing(($theme: $tokens));
|
|
75
|
+
|
|
76
|
+
@if -is-dark-theme($tokens) {
|
|
77
|
+
$dark-theme: -get-dark-theme($built-in-themes);
|
|
78
|
+
$themes: map.set($themes, $theme, map.merge($dark-theme, $tokens));
|
|
79
|
+
}
|
|
80
|
+
@else {
|
|
81
|
+
$light-theme: -get-light-theme($built-in-themes);
|
|
82
|
+
$themes: map.set($themes, $theme, map.merge($light-theme, $tokens));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
@return $themes;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Adds each theme the token 'sci-theme' with its name.
|
|
91
|
+
*
|
|
92
|
+
* @param {map} $themes - map of themes with token mappings.
|
|
93
|
+
* @return {map} Themes with the token 'sci-theme' added to each theme.
|
|
94
|
+
*/
|
|
95
|
+
@function -add-theme-name-token($themes) {
|
|
96
|
+
@each $theme, $tokens in $themes {
|
|
97
|
+
$themes: map.set($themes, $theme, map.merge((--sci-theme: $theme), $tokens));
|
|
98
|
+
}
|
|
99
|
+
@return $themes;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Creates a theme selector on the root HTML element for each provided theme and sets its tokens as CSS variables, as following:
|
|
104
|
+
*
|
|
105
|
+
* ```scss
|
|
106
|
+
* :root[sci-theme="dark"] {
|
|
107
|
+
* // Tokens as CSS variables
|
|
108
|
+
* }
|
|
109
|
+
*
|
|
110
|
+
* :root[sci-theme="light"] {
|
|
111
|
+
* // Tokens as CSS variables
|
|
112
|
+
* }
|
|
113
|
+
* ```
|
|
114
|
+
*
|
|
115
|
+
* @param {map} $themes - A map of themes with token mappings.
|
|
116
|
+
*/
|
|
117
|
+
@mixin -create-theme-selector($themes) {
|
|
118
|
+
@each $theme, $tokens in $themes {
|
|
119
|
+
:root[sci-theme="#{$theme}"] {
|
|
120
|
+
@include -set-css-variables($tokens);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Selects a theme based on the user's OS color scheme preference, but ony if no theme is set on the root HTML element.
|
|
127
|
+
*
|
|
128
|
+
* The color scheme of a theme is determined by evaluating the "color-scheme" token.
|
|
129
|
+
*
|
|
130
|
+
* @param {map} $themes - A map of themes with token mappings.
|
|
131
|
+
*/
|
|
132
|
+
@mixin -auto-select-preferred-theme($themes) {
|
|
133
|
+
#{-if-no-theme-active-selector($themes)} {
|
|
134
|
+
$dark-theme: -get-dark-theme($themes);
|
|
135
|
+
$light-theme: -get-light-theme($themes);
|
|
136
|
+
|
|
137
|
+
@if ($dark-theme and $light-theme) {
|
|
138
|
+
@media (prefers-color-scheme: dark) {
|
|
139
|
+
@include -set-css-variables($dark-theme);
|
|
140
|
+
}
|
|
141
|
+
@media (prefers-color-scheme: light) {
|
|
142
|
+
@include -set-css-variables($light-theme);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
@else if ($dark-theme) {
|
|
146
|
+
@include -set-css-variables($dark-theme);
|
|
147
|
+
}
|
|
148
|
+
@else if ($light-theme) {
|
|
149
|
+
@include -set-css-variables($light-theme);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Sets passed tokens as CSS variables.
|
|
156
|
+
*
|
|
157
|
+
* @param {map} $themes - A map of themes with token mappings.
|
|
158
|
+
*/
|
|
159
|
+
@mixin -set-css-variables($tokens) {
|
|
160
|
+
@each $token-name, $token-value in $tokens {
|
|
161
|
+
#{$token-name}: #{$token-value};
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Creates a selector that matches if none of given themes is selected on the root HTML element.
|
|
167
|
+
*
|
|
168
|
+
* @param {map} $themes - A map of themes with token mappings.
|
|
169
|
+
* @return {string} selector
|
|
170
|
+
*/
|
|
171
|
+
@function -if-no-theme-active-selector($themes) {
|
|
172
|
+
$selector: ':root';
|
|
173
|
+
@each $theme in map.keys($themes) {
|
|
174
|
+
$selector: $selector + ':not([sci-theme="#{$theme}"])';
|
|
175
|
+
}
|
|
176
|
+
@return $selector;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Returns `true` for a theme with a color-scheme token 'dark'.
|
|
181
|
+
*
|
|
182
|
+
* @param {map} $tokens - Token mappings of a theme.
|
|
183
|
+
* @return {boolean} `true` if dark theme, otherwise `false`.
|
|
184
|
+
*/
|
|
185
|
+
@function -is-dark-theme($tokens) {
|
|
186
|
+
$color-scheme: map.get($tokens, 'color-scheme');
|
|
187
|
+
@return ($color-scheme == 'dark');
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Returns the token mappings of the first dark theme found, or `null` if not found.
|
|
192
|
+
*
|
|
193
|
+
* @param {map} $themes - A map of themes with token mappings.
|
|
194
|
+
* @return {map|null} Token mappings of the first dark theme found, or `null` if not found.
|
|
195
|
+
*/
|
|
196
|
+
@function -get-dark-theme($themes) {
|
|
197
|
+
@each $tokens in map.values($themes) {
|
|
198
|
+
@if (-is-dark-theme($tokens)) {
|
|
199
|
+
@return $tokens;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
@return null;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Returns the token mappings of the first light theme found, or `null` if not found.
|
|
207
|
+
*
|
|
208
|
+
* @param {map} $themes - A map of themes with token mappings.
|
|
209
|
+
* @return {map|null} Token mappings of the first light theme found, or `null` if not found.
|
|
210
|
+
*/
|
|
211
|
+
@function -get-light-theme($themes) {
|
|
212
|
+
@each $tokens in map.values($themes) {
|
|
213
|
+
@if (not -is-dark-theme($tokens)) {
|
|
214
|
+
@return $tokens;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
@return null;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Logs a warning if the 'color-scheme' design token is missing.
|
|
222
|
+
*/
|
|
223
|
+
@function -warn-if-color-scheme-token-missing($themes) {
|
|
224
|
+
@each $theme, $tokens in $themes {
|
|
225
|
+
@if (not map.has-key($tokens, 'color-scheme')) {
|
|
226
|
+
@warn 'Missing required token "color-scheme" in theme "#{$theme}". Add the token "color-scheme" to the theme "#{$theme}". For a dark theme, add the token "color-scheme: dark". For a light theme, add the token "color-scheme: light".';
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
@return null;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Merges given maps into a single map.
|
|
234
|
+
*
|
|
235
|
+
* @param {...map} $maps - Maps to be merged into a single map.
|
|
236
|
+
* @return {map} Merged map.
|
|
237
|
+
*/
|
|
238
|
+
@function map-merge($maps...) {
|
|
239
|
+
$merged: ();
|
|
240
|
+
@each $map in $maps {
|
|
241
|
+
$merged: map.merge($merged, $map);
|
|
242
|
+
}
|
|
243
|
+
@return $merged;
|
|
244
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
@use '../theming' as sci-theming;
|
|
2
|
+
|
|
3
|
+
$-gray: (
|
|
4
|
+
--sci-color-gray-50: rgb(29, 29, 29),
|
|
5
|
+
--sci-color-gray-75: rgb(38, 38, 38),
|
|
6
|
+
--sci-color-gray-100: rgb(50, 50, 50),
|
|
7
|
+
--sci-color-gray-200: rgb(63, 63, 63),
|
|
8
|
+
--sci-color-gray-300: rgb(84, 84, 84),
|
|
9
|
+
--sci-color-gray-400: rgb(112, 112, 112),
|
|
10
|
+
--sci-color-gray-500: rgb(144, 144, 144),
|
|
11
|
+
--sci-color-gray-600: rgb(178, 178, 178),
|
|
12
|
+
--sci-color-gray-700: rgb(209, 209, 209),
|
|
13
|
+
--sci-color-gray-800: rgb(235, 235, 235),
|
|
14
|
+
--sci-color-gray-900: rgb(255, 255, 255),
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
$-blue: (
|
|
18
|
+
--sci-color-blue-100: rgb(0, 56, 119),
|
|
19
|
+
--sci-color-blue-200: rgb(0, 65, 138),
|
|
20
|
+
--sci-color-blue-300: rgb(0, 77, 163),
|
|
21
|
+
--sci-color-blue-400: rgb(0, 89, 194),
|
|
22
|
+
--sci-color-blue-500: rgb(3, 103, 224),
|
|
23
|
+
--sci-color-blue-600: rgb(19, 121, 243),
|
|
24
|
+
--sci-color-blue-700: rgb(52, 143, 244),
|
|
25
|
+
--sci-color-blue-800: rgb(84, 163, 246),
|
|
26
|
+
--sci-color-blue-900: rgb(114, 183, 249),
|
|
27
|
+
--sci-color-blue-1000: rgb(143, 202, 252),
|
|
28
|
+
--sci-color-blue-1100: rgb(174, 219, 254),
|
|
29
|
+
--sci-color-blue-1200: rgb(204, 233, 255),
|
|
30
|
+
--sci-color-blue-1300: rgb(232, 246, 255),
|
|
31
|
+
--sci-color-blue-1400: rgb(255, 255, 255),
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
$-red: (
|
|
35
|
+
--sci-color-red-100: rgb(123, 0, 0),
|
|
36
|
+
--sci-color-red-200: rgb(141, 0, 0),
|
|
37
|
+
--sci-color-red-300: rgb(165, 0, 0),
|
|
38
|
+
--sci-color-red-400: rgb(190, 4, 3),
|
|
39
|
+
--sci-color-red-500: rgb(215, 25, 19),
|
|
40
|
+
--sci-color-red-600: rgb(234, 56, 41),
|
|
41
|
+
--sci-color-red-700: rgb(246, 88, 67),
|
|
42
|
+
--sci-color-red-800: rgb(255, 117, 94),
|
|
43
|
+
--sci-color-red-900: rgb(255, 149, 129),
|
|
44
|
+
--sci-color-red-1000: rgb(255, 176, 161),
|
|
45
|
+
--sci-color-red-1100: rgb(255, 201, 189),
|
|
46
|
+
--sci-color-red-1200: rgb(255, 222, 216),
|
|
47
|
+
--sci-color-red-1300: rgb(255, 241, 238),
|
|
48
|
+
--sci-color-red-1400: rgb(255, 255, 255),
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
$-orange: (
|
|
52
|
+
--sci-color-orange-100: rgb(102, 37, 0),
|
|
53
|
+
--sci-color-orange-200: rgb(117, 45, 0),
|
|
54
|
+
--sci-color-orange-300: rgb(137, 55, 0),
|
|
55
|
+
--sci-color-orange-400: rgb(158, 66, 0),
|
|
56
|
+
--sci-color-orange-500: rgb(180, 78, 0),
|
|
57
|
+
--sci-color-orange-600: rgb(202, 93, 0),
|
|
58
|
+
--sci-color-orange-700: rgb(225, 109, 0),
|
|
59
|
+
--sci-color-orange-800: rgb(244, 129, 12),
|
|
60
|
+
--sci-color-orange-900: rgb(254, 154, 46),
|
|
61
|
+
--sci-color-orange-1000: rgb(255, 181, 88),
|
|
62
|
+
--sci-color-orange-1100: rgb(253, 206, 136),
|
|
63
|
+
--sci-color-orange-1200: rgb(255, 225, 179),
|
|
64
|
+
--sci-color-orange-1300: rgb(255, 242, 221),
|
|
65
|
+
--sci-color-orange-1400: rgb(255, 253, 249),
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
$-green: (
|
|
69
|
+
--sci-color-green-100: rgb(4, 67, 41),
|
|
70
|
+
--sci-color-green-200: rgb(0, 78, 47),
|
|
71
|
+
--sci-color-green-300: rgb(0, 92, 56),
|
|
72
|
+
--sci-color-green-400: rgb(0, 108, 67),
|
|
73
|
+
--sci-color-green-500: rgb(0, 125, 78),
|
|
74
|
+
--sci-color-green-600: rgb(0, 143, 93),
|
|
75
|
+
--sci-color-green-700: rgb(18, 162, 108),
|
|
76
|
+
--sci-color-green-800: rgb(43, 180, 125),
|
|
77
|
+
--sci-color-green-900: rgb(67, 199, 143),
|
|
78
|
+
--sci-color-green-1000: rgb(94, 217, 162),
|
|
79
|
+
--sci-color-green-1100: rgb(129, 233, 184),
|
|
80
|
+
--sci-color-green-1200: rgb(177, 244, 209),
|
|
81
|
+
--sci-color-green-1300: rgb(223, 250, 234),
|
|
82
|
+
--sci-color-green-1400: rgb(254, 255, 252),
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
$tokens: sci-theming.map-merge(
|
|
86
|
+
$-gray,
|
|
87
|
+
$-blue,
|
|
88
|
+
$-red,
|
|
89
|
+
$-orange,
|
|
90
|
+
$-green
|
|
91
|
+
);
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
@use '../theming' as sci-theming;
|
|
2
|
+
|
|
3
|
+
$-gray: (
|
|
4
|
+
--sci-color-gray-50: rgb(255, 255, 255),
|
|
5
|
+
--sci-color-gray-75: rgb(253, 253, 253),
|
|
6
|
+
--sci-color-gray-100: rgb(248, 248, 248),
|
|
7
|
+
--sci-color-gray-200: rgb(230, 230, 230),
|
|
8
|
+
--sci-color-gray-300: rgb(213, 213, 213),
|
|
9
|
+
--sci-color-gray-400: rgb(177, 177, 177),
|
|
10
|
+
--sci-color-gray-500: rgb(144, 144, 144),
|
|
11
|
+
--sci-color-gray-600: rgb(109, 109, 109),
|
|
12
|
+
--sci-color-gray-700: rgb(70, 70, 70),
|
|
13
|
+
--sci-color-gray-800: rgb(34, 34, 34),
|
|
14
|
+
--sci-color-gray-900: rgb(0, 0, 0),
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
$-blue: (
|
|
18
|
+
--sci-color-blue-100: rgb(224, 242, 255),
|
|
19
|
+
--sci-color-blue-200: rgb(202, 232, 255),
|
|
20
|
+
--sci-color-blue-300: rgb(181, 222, 255),
|
|
21
|
+
--sci-color-blue-400: rgb(150, 206, 253),
|
|
22
|
+
--sci-color-blue-500: rgb(120, 187, 250),
|
|
23
|
+
--sci-color-blue-600: rgb(89, 167, 246),
|
|
24
|
+
--sci-color-blue-700: rgb(56, 146, 243),
|
|
25
|
+
--sci-color-blue-800: rgb(20, 122, 243),
|
|
26
|
+
--sci-color-blue-900: rgb(2, 101, 220),
|
|
27
|
+
--sci-color-blue-1000: rgb(0, 84, 182),
|
|
28
|
+
--sci-color-blue-1100: rgb(0, 68, 145),
|
|
29
|
+
--sci-color-blue-1200: rgb(0, 53, 113),
|
|
30
|
+
--sci-color-blue-1300: rgb(0, 39, 84),
|
|
31
|
+
--sci-color-blue-1400: rgb(0, 28, 60),
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
$-red: (
|
|
35
|
+
--sci-color-red-100: rgb(255, 235, 231),
|
|
36
|
+
--sci-color-red-200: rgb(255, 221, 214),
|
|
37
|
+
--sci-color-red-300: rgb(255, 205, 195),
|
|
38
|
+
--sci-color-red-400: rgb(255, 183, 169),
|
|
39
|
+
--sci-color-red-500: rgb(255, 155, 136),
|
|
40
|
+
--sci-color-red-600: rgb(255, 124, 101),
|
|
41
|
+
--sci-color-red-700: rgb(247, 92, 70),
|
|
42
|
+
--sci-color-red-800: rgb(234, 56, 41),
|
|
43
|
+
--sci-color-red-900: rgb(211, 21, 16),
|
|
44
|
+
--sci-color-red-1000: rgb(180, 0, 0),
|
|
45
|
+
--sci-color-red-1100: rgb(147, 0, 0),
|
|
46
|
+
--sci-color-red-1200: rgb(116, 0, 0),
|
|
47
|
+
--sci-color-red-1300: rgb(89, 0, 0),
|
|
48
|
+
--sci-color-red-1400: rgb(67, 0, 0),
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
$-orange: (
|
|
52
|
+
--sci-color-orange-100: rgb(255, 236, 204),
|
|
53
|
+
--sci-color-orange-200: rgb(255, 223, 173),
|
|
54
|
+
--sci-color-orange-300: rgb(253, 210, 145),
|
|
55
|
+
--sci-color-orange-400: rgb(255, 187, 99),
|
|
56
|
+
--sci-color-orange-500: rgb(255, 160, 55),
|
|
57
|
+
--sci-color-orange-600: rgb(246, 133, 17),
|
|
58
|
+
--sci-color-orange-700: rgb(228, 111, 0),
|
|
59
|
+
--sci-color-orange-800: rgb(203, 93, 0),
|
|
60
|
+
--sci-color-orange-900: rgb(177, 76, 0),
|
|
61
|
+
--sci-color-orange-1000: rgb(149, 61, 0),
|
|
62
|
+
--sci-color-orange-1100: rgb(122, 47, 0),
|
|
63
|
+
--sci-color-orange-1200: rgb(97, 35, 0),
|
|
64
|
+
--sci-color-orange-1300: rgb(73, 25, 1),
|
|
65
|
+
--sci-color-orange-1400: rgb(53, 18, 1),
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
$-green: (
|
|
69
|
+
--sci-color-green-100: rgb(206, 248, 224),
|
|
70
|
+
--sci-color-green-200: rgb(173, 244, 206),
|
|
71
|
+
--sci-color-green-300: rgb(137, 236, 188),
|
|
72
|
+
--sci-color-green-400: rgb(103, 222, 168),
|
|
73
|
+
--sci-color-green-500: rgb(73, 204, 147),
|
|
74
|
+
--sci-color-green-600: rgb(47, 184, 128),
|
|
75
|
+
--sci-color-green-700: rgb(21, 164, 110),
|
|
76
|
+
--sci-color-green-800: rgb(0, 143, 93),
|
|
77
|
+
--sci-color-green-900: rgb(0, 122, 77),
|
|
78
|
+
--sci-color-green-1000: rgb(0, 101, 62),
|
|
79
|
+
--sci-color-green-1100: rgb(0, 81, 50),
|
|
80
|
+
--sci-color-green-1200: rgb(5, 63, 39),
|
|
81
|
+
--sci-color-green-1300: rgb(10, 46, 29),
|
|
82
|
+
--sci-color-green-1400: rgb(10, 32, 21),
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
$tokens: sci-theming.map-merge(
|
|
86
|
+
$-gray,
|
|
87
|
+
$-blue,
|
|
88
|
+
$-red,
|
|
89
|
+
$-orange,
|
|
90
|
+
$-green
|
|
91
|
+
);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@use '../theming' as sci-theming;
|
|
2
|
+
|
|
3
|
+
$sci-scrollbar: (
|
|
4
|
+
--sci-scrollbar-color: var(--sci-color-gray-700),
|
|
5
|
+
);
|
|
6
|
+
|
|
7
|
+
$sci-viewport: (
|
|
8
|
+
--sci-viewport-scrollbar-color: var(--sci-scrollbar-color),
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
$sci-throbber: (
|
|
12
|
+
--sci-throbber-color: var(--sci-color-gray-300),
|
|
13
|
+
--sci-throbber-size: 50px,
|
|
14
|
+
--sci-throbber-duration: 1.25s,
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
$sci-splitter: (
|
|
18
|
+
--sci-splitter-background-color: var(--sci-color-border), // background color of the splitter
|
|
19
|
+
--sci-splitter-background-color-hover: var(--sci-splitter-background-color), // background color of the splitter when hovering it
|
|
20
|
+
--sci-splitter-size: 1px, // size of the splitter along the main axis (width if direction is row, or height if direction is column)
|
|
21
|
+
--sci-splitter-size-hover: 8px, // size of the splitter along the main axis when hovering it.
|
|
22
|
+
--sci-splitter-touch-target-size: 15px, // touch target size to move the splitter (accessibility)
|
|
23
|
+
--sci-splitter-cross-axis-size: 100%, // handle size along the cross axis
|
|
24
|
+
--sci-splitter-border-radius: 0, // border radius of the splitter
|
|
25
|
+
--sci-splitter-opacity-active: 1, // opacity of the splitter while the user moves the splitter
|
|
26
|
+
--sci-splitter-opacity-hover: .3, // opacity of the splitter when hovering it
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
$sci-sashbox: (
|
|
30
|
+
--sci-sashbox-gap: 10px, // gaps (gutters) between sashes
|
|
31
|
+
--sci-sashbox-splitter-background-color: var(--sci-splitter-background-color), // background color of the splitter
|
|
32
|
+
--sci-sashbox-splitter-background-color-hover: var(--sci-splitter-background-color), // background color of the splitter when hovering it
|
|
33
|
+
--sci-sashbox-splitter-size: var(--sci-splitter-size), // size of the splitter along the main axis (width if direction is row, or height if direction is column)
|
|
34
|
+
--sci-sashbox-splitter-size-hover: var(--sci-splitter-size-hover), // size of the splitter along the main axis when hovering it.
|
|
35
|
+
--sci-sashbox-splitter-touch-target-size: var(--sci-splitter-touch-target-size), // touch target size to move the splitter (accessibility)
|
|
36
|
+
--sci-sashbox-splitter-cross-axis-size: var(--sci-splitter-cross-axis-size), // handle size along the cross axis
|
|
37
|
+
--sci-sashbox-splitter-border-radius: var(--sci-splitter-border-radius), // border radius of the splitter
|
|
38
|
+
--sci-sashbox-splitter-opacity-active: var(--sci-splitter-opacity-active), // opacity of the splitter while the user moves the splitter
|
|
39
|
+
--sci-sashbox-splitter-opacity-hover: var(--sci-splitter-opacity-hover), // opacity of the splitter when hovering it
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
$tokens: sci-theming.map-merge(
|
|
43
|
+
$sci-scrollbar,
|
|
44
|
+
$sci-viewport,
|
|
45
|
+
$sci-throbber,
|
|
46
|
+
$sci-splitter,
|
|
47
|
+
$sci-sashbox,
|
|
48
|
+
);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../theming' as sci-theming;
|
|
3
|
+
@use '../colors/scion-static-colors';
|
|
4
|
+
@use '../colors/scion-dark-colors';
|
|
5
|
+
@use '../components/scion-component-tokens';
|
|
6
|
+
|
|
7
|
+
$theme: sci-theming.map-merge(scion-static-colors.$tokens, scion-dark-colors.$tokens, scion-component-tokens.$tokens, (
|
|
8
|
+
// Use for highlighting calls to action and emphasizing important information or key messages.
|
|
9
|
+
--sci-color-accent: var(--sci-color-blue-500),
|
|
10
|
+
--sci-color-accent-inverse: var(--sci-static-color-white),
|
|
11
|
+
--sci-color-background-accent: var(--sci-color-blue-1200),
|
|
12
|
+
// Use as positive semantic color to indicate success, positive states and completed tasks.
|
|
13
|
+
--sci-color-positive: var(--sci-color-green-500),
|
|
14
|
+
--sci-color-positive-inverse: var(--sci-static-color-white),
|
|
15
|
+
--sci-color-background-positive: var(--sci-color-green-1300),
|
|
16
|
+
// Use as negative semantic color to indicate errors, negative states and critical issues that need immediate attention.
|
|
17
|
+
--sci-color-negative: var(--sci-color-red-500),
|
|
18
|
+
--sci-color-negative-inverse: var(--sci-static-color-white),
|
|
19
|
+
--sci-color-background-negative: var(--sci-color-red-1200),
|
|
20
|
+
// Use as notice semantic color to indicate warnings or a state of caution that requires user attention.
|
|
21
|
+
--sci-color-notice: var(--sci-color-orange-700),
|
|
22
|
+
--sci-color-notice-inverse: var(--sci-static-color-white),
|
|
23
|
+
--sci-color-background-notice: var(--sci-color-orange-1200),
|
|
24
|
+
// Use for skeleton loading progress indicators.
|
|
25
|
+
--sci-color-skeleton: var(--sci-color-gray-300),
|
|
26
|
+
--sci-color-skeleton-subtle: var(--sci-color-gray-400),
|
|
27
|
+
// Use as the primary background for the UI.
|
|
28
|
+
--sci-color-background-primary: var(--sci-color-gray-50),
|
|
29
|
+
// Use as the background for navbars, menubars, toolbars, tabbars, sidebars and panels
|
|
30
|
+
--sci-color-background-secondary: var(--sci-color-gray-100),
|
|
31
|
+
--sci-color-background-secondary-hover: var(--sci-color-gray-200),
|
|
32
|
+
--sci-color-background-secondary-selected: var(--sci-color-gray-300),
|
|
33
|
+
// Use as the background for elevated elements, such as dialogs, menus and overlays.
|
|
34
|
+
--sci-color-background-elevation: var(--sci-color-gray-75),
|
|
35
|
+
--sci-color-background-elevation-hover: var(--sci-color-gray-100),
|
|
36
|
+
// Use as the background for input elements.
|
|
37
|
+
--sci-color-background-input: color-mix(in srgb, transparent 95%, var(--sci-static-color-white)),
|
|
38
|
+
--sci-color-background-input-disabled: color-mix(in srgb, transparent 85%, var(--sci-static-color-white)),
|
|
39
|
+
// Use for separators and element borders/strokes.
|
|
40
|
+
--sci-color-border: var(--sci-color-gray-300),
|
|
41
|
+
--sci-color-border-subtle: var(--sci-color-gray-200),
|
|
42
|
+
--sci-color-border-subtlest: var(--sci-color-gray-100),
|
|
43
|
+
--sci-color-border-strong: var(--sci-color-gray-400),
|
|
44
|
+
// Use for primary text, such as body text and input element values.
|
|
45
|
+
--sci-color-text: var(--sci-color-gray-900),
|
|
46
|
+
// Use for secondary text, such as labels and icons.
|
|
47
|
+
--sci-color-text-subtle: var(--sci-color-gray-700),
|
|
48
|
+
// Use for tertiary text, such as disabled text, placeholders and meta-data.
|
|
49
|
+
--sci-color-text-subtlest: var(--sci-color-gray-600),
|
|
50
|
+
// Use the box shadow effect for elevated elements on top UI layer, such as dialogs, menus and overlays.
|
|
51
|
+
--sci-elevation: 0 0 5px -3px,
|
|
52
|
+
// Use as corner radius for elements, such as tabs and input elements.
|
|
53
|
+
--sci-corner: 5px,
|
|
54
|
+
--sci-corner-small: 4px,
|
|
55
|
+
));
|