igniteui-theming 1.0.0-beta.1 → 1.0.0-beta.10

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.
Files changed (43) hide show
  1. package/package.json +1 -1
  2. package/sass/color/_functions.scss +49 -47
  3. package/sass/color/_mixins.scss +8 -8
  4. package/sass/color/_types.scss +27 -9
  5. package/sass/color/presets/_index.scss +2 -0
  6. package/sass/color/presets/dark/_bootstrap.scss +13 -0
  7. package/sass/color/presets/dark/_extra.scss +12 -0
  8. package/sass/color/presets/dark/_fluent.scss +29 -0
  9. package/sass/color/presets/dark/_index.scss +5 -0
  10. package/sass/color/presets/dark/_indigo.scss +13 -0
  11. package/sass/color/presets/dark/_material.scss +12 -0
  12. package/sass/color/presets/light/_bootstrap.scss +13 -0
  13. package/sass/color/presets/light/_extra.scss +12 -0
  14. package/sass/color/presets/light/_fluent.scss +30 -0
  15. package/sass/color/presets/light/_index.scss +5 -0
  16. package/sass/color/presets/light/_indigo.scss +13 -0
  17. package/sass/color/presets/light/_material.scss +12 -0
  18. package/sass/elevations/_functions.scss +2 -1
  19. package/sass/elevations/_mixins.scss +9 -9
  20. package/sass/elevations/presets/_index.scss +1 -0
  21. package/sass/elevations/presets/_material.scss +51 -35
  22. package/sass/themes/_functions.scss +50 -20
  23. package/sass/themes/_mixins.scss +21 -6
  24. package/sass/typography/_functions.scss +6 -4
  25. package/sass/typography/_mixins.scss +11 -9
  26. package/sass/typography/_types.scss +12 -0
  27. package/sass/typography/presets/_bootstrap.scss +32 -17
  28. package/sass/typography/presets/_fluent.scss +37 -15
  29. package/sass/typography/presets/_index.scss +4 -0
  30. package/sass/typography/presets/_indigo.scss +30 -19
  31. package/sass/typography/presets/_material.scss +31 -42
  32. package/sass/utils/_css.scss +32 -0
  33. package/sass/utils/_index.scss +3 -1
  34. package/sass/utils/_map.scss +24 -1
  35. package/sass/utils/_math.scss +36 -0
  36. package/sass/utils/_meta.scss +1 -1
  37. package/sass/utils/_string.scss +75 -0
  38. package/test/_color.spec.scss +1 -1
  39. package/test/_elevations.spec.scss +1 -1
  40. package/test/_themes.spec.scss +35 -4
  41. package/test/_typography.spec.scss +22 -6
  42. package/test/_utils.spec.scss +54 -1
  43. package/test/e2e/theme.scss +6 -37
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "igniteui-theming",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.10",
4
4
  "description": "A set of Sass variables, mixins, and functions for generating palettes, typography, and elevations used by Ignite UI components.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -7,13 +7,13 @@
7
7
  @use 'charts';
8
8
  @use 'multipliers';
9
9
  @use 'types';
10
- @use '../utils' as *;
10
+ @use '../utils/math' as *;
11
11
 
12
12
  $_enhanced-accessibility: false;
13
13
 
14
14
  /// Configures the color module.
15
15
  /// @access public
16
- /// @param {Boolean} $enhanced-accessibility - Enables features like color blind palettes.
16
+ /// @param {Boolean} $enhanced-accessibility [null] - Enables features like color blind palettes.
17
17
  @mixin configure($enhanced-accessibility: null) {
18
18
  @if $enhanced-accessibility {
19
19
  $_enhanced-accessibility: $enhanced-accessibility !global;
@@ -23,7 +23,6 @@ $_enhanced-accessibility: false;
23
23
  /// Generates a color palette.
24
24
  /// @access public
25
25
  /// @group Palettes
26
- /// @requires {function} _color-palette
27
26
  /// @param {Color} $primary - The primary color used to generate the primary color palette (required).
28
27
  /// @param {Color} $secondary - The secondary color used to generate the secondary color palette (required).
29
28
  /// @param {Color} $surface - The color used as a background in components, such as cards, sheets, and menus (required).
@@ -33,7 +32,8 @@ $_enhanced-accessibility: false;
33
32
  /// @param {Color} $warn [null] - The warning color used throughout the application (optional).
34
33
  /// @param {Color} $error [null] - The error color used throughout the application (optional).
35
34
  /// @param {String} $variant [null] - Used internally (optional).
36
- /// @returns {Map} - A map consisting of color shades for the passed base colors(primary, secondary, gray, etc).
35
+ /// @requires {function} shades
36
+ /// @returns {Map} - A map consisting of color shades for the passed base colors (primary, secondary, gray, etc).
37
37
  @function palette(
38
38
  $primary,
39
39
  $secondary,
@@ -47,26 +47,26 @@ $_enhanced-accessibility: false;
47
47
  ) {
48
48
  $color-shades: map.keys(types.$IColorShades);
49
49
  $gray-shades: map.keys(types.$IGrayShades);
50
- $primary-palette: shades(primary, $primary, $color-shades);
51
- $secondary-palette: shades(secondary, $secondary, $color-shades);
52
- $surface-palette: shades(surface, $surface, $color-shades);
53
- $grayscale-palette: shades(gray, $gray, $gray-shades, $surface);
54
- $info-palette: if($info, shades(info, $info, $color-shades), ());
55
- $success-palette: if($success, shades(success, $success, $color-shades), ());
56
- $warn-palette: if($warn, shades(warn, $warn, $color-shades), ());
57
- $error-palette: if($success, shades(error, $error, $color-shades), ());
50
+ $primary-palette: shades('primary', $primary, $color-shades);
51
+ $secondary-palette: shades('secondary', $secondary, $color-shades);
52
+ $surface-palette: shades('surface', $surface, $color-shades);
53
+ $grayscale-palette: shades('gray', $gray, $gray-shades, $surface);
54
+ $info-palette: if($info, shades('info', $info, $color-shades), ());
55
+ $success-palette: if($success, shades('success', $success, $color-shades), ());
56
+ $warn-palette: if($warn, shades('warn', $warn, $color-shades), ());
57
+ $error-palette: if($success, shades('error', $error, $color-shades), ());
58
58
 
59
59
  @return (
60
- primary: $primary-palette,
61
- secondary: $secondary-palette,
62
- gray: $grayscale-palette,
63
- surface: $surface-palette,
64
- info: $info-palette,
65
- success: $success-palette,
66
- warn: $warn-palette,
67
- error: $error-palette,
68
- _meta: (
69
- variant: $variant,
60
+ 'primary': $primary-palette,
61
+ 'secondary': $secondary-palette,
62
+ 'gray': $grayscale-palette,
63
+ 'surface': $surface-palette,
64
+ 'info': $info-palette,
65
+ 'success': $success-palette,
66
+ 'warn': $warn-palette,
67
+ 'error': $error-palette,
68
+ '_meta': (
69
+ 'variant': $variant,
70
70
  )
71
71
  );
72
72
  }
@@ -78,10 +78,8 @@ $_enhanced-accessibility: false;
78
78
  /// @param {Color} $color - The base color used to generate the palette.
79
79
  /// @param {List} $shades - The list of shades.
80
80
  /// @param {Color} $surface [null] - The surface color. Usefull when generating shades of gray (optional).
81
- /// @requires {function} _color-shade
82
- /// @requires {function} _hsla-shade
83
- /// @requires {function} contrast
84
- /// @requires {function} to-opaque
81
+ /// @requires {function} shade
82
+ /// @requires {function} text-contrast
85
83
  /// @returns {Map} - A map consisting of hsla color shades and thier respective contrast colors.
86
84
  @function shades(
87
85
  $name,
@@ -113,6 +111,8 @@ $_enhanced-accessibility: false;
113
111
  /// @param {Color} $color - The color value to be used to generate a color shade.
114
112
  /// @param {String | Number} $shade - The color shade variant.
115
113
  /// @param {Color} $surface [null] - The surface color. Usefull when generating a shade of gray (optional).
114
+ /// @require {function} luminance
115
+ /// @require {function} to-fixed
116
116
  /// @returns {Map} - A map containing a list of HSL values and a raw color value.
117
117
  @function shade(
118
118
  $name,
@@ -124,7 +124,7 @@ $_enhanced-accessibility: false;
124
124
  $s: var(--ig-#{$name}-s);
125
125
  $l: var(--ig-#{$name}-l);
126
126
 
127
- @if $name == gray {
127
+ @if #{$name} == 'gray' {
128
128
  $lum: luminance($surface);
129
129
  $color: if($color, $color, if($lum > .5, #000, #fff));
130
130
  $lmap: map.get(multipliers.$grayscale, 'l');
@@ -158,13 +158,13 @@ $_enhanced-accessibility: false;
158
158
  /// Retrieves a color from a color palette.
159
159
  /// @access public
160
160
  /// @group Palettes
161
- /// @param {Map} $palette [null]- The source palette map (optional).
162
- /// @param {String} $color [primary]- The target color from the color palette.
161
+ /// @param {Map} $palette [null] - The source palette map (optional).
162
+ /// @param {String} $color [primary] - The target color from the color palette.
163
163
  /// @param {Number | String} $variant [500] - The target color shade from the color palette.
164
164
  /// @param {Number} $opacity [null] - Optional opacity to apply to the color shade.
165
165
  /// @returns {Color | String} - The raw color shade or CSS variable reference from the palette.
166
- @function color($palette: null, $color: primary, $variant: 500, $opacity: null) {
167
- $c: map.get($palette or types.$IPalette, $color);
166
+ @function color($palette: null, $color: 'primary', $variant: 500, $opacity: null) {
167
+ $c: map.get($palette or types.$IPalette, #{$color});
168
168
  $a: var(--ig-#{$color}-a);
169
169
  $s: #{var(--ig-#{$color}-#{$variant})};
170
170
  $contrast: if(
@@ -175,7 +175,7 @@ $_enhanced-accessibility: false;
175
175
  $meta: if($palette, map.get($palette, '_meta'), null);
176
176
 
177
177
  @if not($c) {
178
- @error 'The passed color #{$color} is not valid.';
178
+ @error 'The passed color #{meta.inspect($color)} is not valid.';
179
179
  }
180
180
 
181
181
  @if not($palette) or not($meta) {
@@ -191,11 +191,11 @@ $_enhanced-accessibility: false;
191
191
 
192
192
  /// Retrieves a contrast text color for a given color from a color palette.
193
193
  /// @access public
194
- /// @group Palettesreference
195
- /// @param {Map} $palette [null]- The source palette map (optional).
196
- /// @param {String} $color [primary]- The target color from the color palette.
194
+ /// @group Palettes
195
+ /// @param {Map} $palette [null] - The source palette map (optional).
196
+ /// @param {String} $color [primary] - The target color from the color palette.
197
197
  /// @param {Number | String} $variant [500] - The target color shade from the color palette.
198
- /// @requires color
198
+ /// @requires {function} color
199
199
  /// @returns {Color | String} - The raw contrast color shade or CSS variable from the palette.
200
200
  @function contrast-color($palette: null, $color: primary, $variant: 500) {
201
201
  @return color($palette, $color, #{$variant}-contrast);
@@ -208,6 +208,7 @@ $_enhanced-accessibility: false;
208
208
  /// @param {Color | List<Color>} $foreground [#fff] - A list of foreground colors
209
209
  /// that can be used with the provided background.
210
210
  /// @param {AAA | AA | A} $contrast [AAA] - The contrast level according to WCAG 2.0 standards.
211
+ /// @require {function} contrast
211
212
  /// @returns {Color} - Returns either white, black, or the provided foreground
212
213
  /// color if it meets the required contrast level.
213
214
  /// @link https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html
@@ -261,6 +262,7 @@ $_enhanced-accessibility: false;
261
262
 
262
263
  /// Mixes two colors to produce an opaque color.
263
264
  /// @access public
265
+ /// @group Color
264
266
  /// @param {Color} $color-1 - The first color, usually transparent.
265
267
  /// @param {Color} $color-2 [#fff] - The second color, usually opaque.
266
268
  /// @return {Color} - The color representation of the rgba value.
@@ -282,6 +284,7 @@ $_enhanced-accessibility: false;
282
284
 
283
285
  /// Retruns a comma separated list of hue, saturation, and lightness values for a given color.
284
286
  /// @access public
287
+ /// @group Color
285
288
  /// @param {Color} $color - The color to be converted to an HSL list of values.
286
289
  /// @example scss Turn #000 into an HSL list of values
287
290
  /// $hsl-list: to-hsl(#000); // (0deg, 0%, 0%);
@@ -292,9 +295,12 @@ $_enhanced-accessibility: false;
292
295
 
293
296
  /// Calculates the contrast ratio between two colors.
294
297
  /// See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
295
- ///
298
+ /// @access public
299
+ /// @group Color
296
300
  /// @param {Color} $background - The background color.
297
301
  /// @param {Color} $foreground - The foreground color.
302
+ /// @require {function} luminance
303
+ /// @require {function} to-fixed
298
304
  /// @returns {Number} - The contrast ratio between the background and foreground colors.
299
305
  @function contrast($background, $foreground) {
300
306
  $backLum: luminance($background) + .05;
@@ -305,8 +311,10 @@ $_enhanced-accessibility: false;
305
311
 
306
312
  /// Calculates the luminance for a given color.
307
313
  /// See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests.
308
- ///
314
+ /// @access public
315
+ /// @group Color
309
316
  /// @param {Color} $color - The color to calculate luminance for.
317
+ /// @returns {Number | String} - The calculated luminance of a given color
310
318
  @function luminance($color) {
311
319
  @if meta.type-of($color) == 'color' {
312
320
  $r: math.div(color.red($color), 255);
@@ -321,6 +329,9 @@ $_enhanced-accessibility: false;
321
329
 
322
330
  /// Calculates the linear channel value for a given sRGB color.
323
331
  /// @access private
332
+ /// @group Color
333
+ /// @param {Number} $value - The sRGB color
334
+ /// @returns {Number} - The calculated linear channel value
324
335
  @function _lcv($value) {
325
336
  /* stylelint-disable number-max-precision */
326
337
  @return if(
@@ -337,12 +348,3 @@ $_enhanced-accessibility: false;
337
348
  @function chart-brushes() {
338
349
  @return if($_enhanced-accessibility, charts.$brushes-color-blind, charts.$brushes-regular);
339
350
  }
340
-
341
- /// Returns a list of H, S, L values for a given color.
342
- /// @access public
343
- /// @param {Color} $color - The color to generate HSL values for.
344
- /// @group Palettes
345
- /// @returns { List } - The list of values.
346
- @function to-hsl($color) {
347
- @return (color.hue($color), color.saturation($color), color.lightness($color));
348
- }
@@ -8,12 +8,12 @@
8
8
  /// Generates CSS variables for a given palette.
9
9
  /// @access public
10
10
  /// @group Palettes
11
- /// @param {Map} $palette [null] - The palette used to generate CSS variables.
11
+ /// @param {Map} $palette - The palette used to generate CSS variables.
12
12
  /// @param {Boolean} $contrast [true] - Specify if contrast colors should be included.
13
13
  /// @example scss Generate css variables for a palette
14
14
  /// $palette: palette($primary: red, $secondary: blue, $gray: #000);
15
15
  /// @include palette($palette);
16
- ///
16
+ /// @require {function} is-root
17
17
  @mixin palette($palette, $contrast: true) {
18
18
  $scope: if(is-root(), ':root', '&');
19
19
 
@@ -27,20 +27,20 @@
27
27
  $_contrast: if($_other-shade, string.index($shade, 'contrast'), false);
28
28
 
29
29
  @if $_base-shade and $_valid-color {
30
- --ig-#{meta.inspect($color)}-h: #{math.round(color.hue($value))};
31
- --ig-#{meta.inspect($color)}-s: #{math.round(color.saturation($value))};
32
- --ig-#{meta.inspect($color)}-l: #{math.round(color.lightness($value))};
33
- --ig-#{meta.inspect($color)}-a: #{color.alpha($value)};
30
+ --ig-#{$color}-h: #{math.round(color.hue($value))};
31
+ --ig-#{$color}-s: #{math.round(color.saturation($value))};
32
+ --ig-#{$color}-l: #{math.round(color.lightness($value))};
33
+ --ig-#{$color}-a: #{color.alpha($value)};
34
34
  }
35
35
 
36
36
  @if $_hsl {
37
37
  $variant: string.slice($shade, 1, string.index($shade, '-hsl') - 1);
38
38
 
39
- --ig-#{meta.inspect($color)}-#{$variant}: #{$value};
39
+ --ig-#{$color}-#{$variant}: #{$value};
40
40
  }
41
41
 
42
42
  @if $_contrast and $contrast {
43
- --ig-#{meta.inspect($color)}-#{$shade}: #{$value};
43
+ --ig-#{$color}-#{$shade}: #{$value};
44
44
  }
45
45
  }
46
46
  }
@@ -1,5 +1,11 @@
1
1
  @use 'sass:map';
2
2
 
3
+ ////
4
+ /// @group Palettes
5
+ ////
6
+
7
+ /// A list consisting of all generated gray shades
8
+ /// @type Map
3
9
  $IGrayShades: (
4
10
  50: '',
5
11
  100: '',
@@ -12,6 +18,9 @@ $IGrayShades: (
12
18
  800: '',
13
19
  900: '',
14
20
  );
21
+
22
+ /// A list consisting of all generated shades for palette colors
23
+ /// @type Map
15
24
  $IColorShades: map.merge(
16
25
  $IGrayShades,
17
26
  (
@@ -21,17 +30,26 @@ $IColorShades: map.merge(
21
30
  'A700': '',
22
31
  )
23
32
  );
33
+
34
+ /// All palette colors mapped with corresponding color shades
35
+ /// @type Map
24
36
  $IPaletteColors: (
25
- primary: $IColorShades,
26
- secondary: $IColorShades,
27
- gray: $IGrayShades,
28
- surface: $IColorShades,
29
- info: $IColorShades,
30
- success: $IColorShades,
31
- warn: $IColorShades,
32
- error: $IColorShades,
37
+ 'primary': $IColorShades,
38
+ 'secondary': $IColorShades,
39
+ 'gray': $IGrayShades,
40
+ 'surface': $IColorShades,
41
+ 'info': $IColorShades,
42
+ 'success': $IColorShades,
43
+ 'warn': $IColorShades,
44
+ 'error': $IColorShades,
33
45
  );
46
+
47
+ /// A list consisting of palette metadata
48
+ /// @type Map
34
49
  $IPaletteMeta: (
35
- variant: '',
50
+ 'variant': '',
36
51
  );
52
+
53
+ /// A map with all palette colors and palette meta
54
+ /// @type Map
37
55
  $IPalette: map.merge($IPaletteColors, (_meta: $IPaletteMeta));
@@ -0,0 +1,2 @@
1
+ @forward 'light';
2
+ @forward 'dark';
@@ -0,0 +1,13 @@
1
+ @use '../../functions' as *;
2
+
3
+ $palette: palette(
4
+ $primary: #0d6efd,
5
+ $secondary: #6c757d,
6
+ $gray: #adb5bd,
7
+ $surface: #212529,
8
+ $info: #0dcaf0,
9
+ $success: #198754,
10
+ $warn: #ffc107,
11
+ $error: #dc3545,
12
+ $variant: 'bootstrap'
13
+ );
@@ -0,0 +1,12 @@
1
+ @use '../../functions' as *;
2
+
3
+ $green-palette: palette(
4
+ $primary: #09f,
5
+ $secondary: #72da67,
6
+ $surface: #222,
7
+ );
8
+ $purple-palette: palette(
9
+ $primary: #00b4d6,
10
+ $secondary: #514590,
11
+ $surface: #333,
12
+ );
@@ -0,0 +1,29 @@
1
+ @use '../../functions' as *;
2
+
3
+ $palette: palette(
4
+ $primary: #0078d4,
5
+ $secondary: #0078d4,
6
+ $surface: #222,
7
+ $success: #107c10,
8
+ $warn: #797673,
9
+ $error: #a80000,
10
+ $variant: 'fluent'
11
+ );
12
+ $word-palette: palette(
13
+ $primary: #2b579a,
14
+ $secondary: #2b579a,
15
+ $surface: #222,
16
+ $success: #107c10,
17
+ $warn: #797673,
18
+ $error: #a80000,
19
+ $variant: 'fluent'
20
+ );
21
+ $excel-palette: palette(
22
+ $primary: #217346,
23
+ $secondary: #217346,
24
+ $surface: #222,
25
+ $success: #107c10,
26
+ $warn: #797673,
27
+ $error: #a80000,
28
+ $variant: 'fluent'
29
+ );
@@ -0,0 +1,5 @@
1
+ @forward 'material' as dark-material-*;
2
+ @forward 'bootstrap' as dark-bootstrap-*;
3
+ @forward 'fluent' as dark-fluent-*;
4
+ @forward 'indigo' as dark-indigo-*;
5
+ @forward 'extra' as dark-*;
@@ -0,0 +1,13 @@
1
+ @use '../../functions' as *;
2
+
3
+ $palette: palette(
4
+ $primary: #3f51b5,
5
+ $secondary: #3f51b5,
6
+ $gray: hsl(262deg 8% 98%),
7
+ $surface: #2a2b2f,
8
+ $info: #9208bc,
9
+ $success: #689f38,
10
+ $warn: #ff9800,
11
+ $error: #cf1a2b,
12
+ $variant: 'indigo'
13
+ );
@@ -0,0 +1,12 @@
1
+ @use '../../functions' as *;
2
+
3
+ $palette: palette(
4
+ $primary: #09f,
5
+ $secondary: #e41c77,
6
+ $surface: #222,
7
+ $info: #1377d5,
8
+ $success: #4eb862,
9
+ $warn: #fbb13c,
10
+ $error: #ff134a,
11
+ $variant: 'material'
12
+ );
@@ -0,0 +1,13 @@
1
+ @use '../../functions' as *;
2
+
3
+ $palette: palette(
4
+ $primary: #0d6efd,
5
+ $secondary: #6c757d,
6
+ $gray: #adb5bd,
7
+ $surface: #f8f9fa,
8
+ $info: #0dcaf0,
9
+ $success: #198754,
10
+ $warn: #ffc107,
11
+ $error: #dc3545,
12
+ $variant: 'bootstrap'
13
+ );
@@ -0,0 +1,12 @@
1
+ @use '../../functions' as *;
2
+
3
+ $green-palette: palette(
4
+ $primary: #09f,
5
+ $secondary: #72da67,
6
+ $surface: #fff
7
+ );
8
+ $purple-palette: palette(
9
+ $primary: #00b4d6,
10
+ $secondary: #514590,
11
+ $surface: #fff
12
+ );
@@ -0,0 +1,30 @@
1
+ @use '../../functions' as *;
2
+
3
+ $palette: palette(
4
+ $primary: #0078d4,
5
+ $secondary: #0078d4,
6
+ $surface: #fff,
7
+ $info: #1377d5,
8
+ $success: #107c10,
9
+ $warn: #797673,
10
+ $error: #a80000,
11
+ $variant: 'fluent'
12
+ );
13
+ $word-palette: palette(
14
+ $primary: #2b579a,
15
+ $secondary: #2b579a,
16
+ $surface: #fff,
17
+ $success: #107c10,
18
+ $warn: #797673,
19
+ $error: #a80000,
20
+ $variant: 'fluent'
21
+ );
22
+ $excel-palette: palette(
23
+ $primary: #217346,
24
+ $secondary: #217346,
25
+ $surface: #fff,
26
+ $success: #107c10,
27
+ $warn: #797673,
28
+ $error: #a80000,
29
+ $variant: 'fluent'
30
+ );
@@ -0,0 +1,5 @@
1
+ @forward 'material' as light-material-*;
2
+ @forward 'bootstrap' as light-bootstrap-*;
3
+ @forward 'fluent' as light-fluent-*;
4
+ @forward 'indigo' as light-indigo-*;
5
+ @forward 'extra' as light-*;
@@ -0,0 +1,13 @@
1
+ @use '../../functions' as *;
2
+
3
+ $palette: palette(
4
+ $primary: #3f51b5,
5
+ $secondary: #3f51b5,
6
+ $gray: hsl(236deg 8% 5%),
7
+ $surface: #fff,
8
+ $info: #9208bc,
9
+ $success: #689f38,
10
+ $warn: #ff9800,
11
+ $error: #cf1a2b,
12
+ $variant: 'indigo'
13
+ );
@@ -0,0 +1,12 @@
1
+ @use '../../functions' as *;
2
+
3
+ $palette: palette(
4
+ $primary: #09f,
5
+ $secondary: #e41c77,
6
+ $surface: white,
7
+ $info: #1377d5,
8
+ $success: #4eb862,
9
+ $warn: #fbb13c,
10
+ $error: #ff134a,
11
+ $variant: 'material'
12
+ );
@@ -3,7 +3,7 @@
3
3
  @use 'sass:list';
4
4
 
5
5
  ////
6
- /// @group elevations
6
+ /// @group Elevations
7
7
  ////
8
8
 
9
9
  $factor: var(--ig-elevation-factor, 1);
@@ -82,6 +82,7 @@ $factor: var(--ig-elevation-factor, 1);
82
82
  /// Gets a CSS elevation variable by name.
83
83
  /// @access public
84
84
  /// @param {String} $name - The name of the shadow.
85
+ /// @return {String} - The CSS elevation variable
85
86
  @function elevation($name) {
86
87
  @return var(--ig-elevation-#{$name});
87
88
  }
@@ -1,7 +1,7 @@
1
- @use '../utils' as *;
1
+ @use '../utils/meta' as *;
2
2
 
3
3
  ////
4
- /// @group elevations
4
+ /// @group Elevations
5
5
  ////
6
6
 
7
7
  /// Generates CSS variables for a given elevations map.
@@ -9,13 +9,13 @@
9
9
  /// @param {Map} $elevations - The elevations map to use to generate CSS variables.
10
10
  ///
11
11
  /// @example scss Generate CSS variables for elevations.
12
- /// $elevations: (
13
- /// small: box-shadow(0 .125rem .25rem rgba(0 0 0 / 75%)),
14
- /// medium: box-shadow(0 .25rem .5rem rgba(0 0 0 / 85%)),
15
- /// large: box-shadow(0 .75rem 1rem rgba(0 0 0 / 95%)),
16
- /// );
17
- /// @include elevations($elevations);
18
- ///
12
+ /// $elevations: (
13
+ /// small: box-shadow(0 .125rem .25rem rgba(0 0 0 / 75%)),
14
+ /// medium: box-shadow(0 .25rem .5rem rgba(0 0 0 / 85%)),
15
+ /// large: box-shadow(0 .75rem 1rem rgba(0 0 0 / 95%))
16
+ /// );
17
+ /// @include elevations($elevations);
18
+ /// @require {function} is-root
19
19
  @mixin elevations($elevations) {
20
20
  $scope: if(is-root(), ':root', '&');
21
21
 
@@ -0,0 +1 @@
1
+ @forward './material' as material-*;