igniteui-theming 1.0.2 → 1.1.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.
Files changed (42) hide show
  1. package/package.json +1 -1
  2. package/sass/themes/charts/_category-chart-theme.scss +319 -0
  3. package/sass/themes/charts/_data-chart-theme.scss +142 -0
  4. package/sass/themes/charts/_doughnut-chart-theme.scss +81 -0
  5. package/sass/themes/charts/_financial-chart-theme.scss +325 -0
  6. package/sass/themes/charts/_funnel-chart-theme.scss +98 -0
  7. package/sass/themes/charts/_gauge-theme.scss +167 -0
  8. package/sass/themes/charts/_geo-map-theme.scss +53 -0
  9. package/sass/themes/charts/_graph-theme.scss +133 -0
  10. package/sass/themes/charts/_index.scss +12 -0
  11. package/sass/themes/charts/_pie-chart-theme.scss +108 -0
  12. package/sass/themes/charts/_shape-chart-theme.scss +271 -0
  13. package/sass/themes/charts/_sparkline-theme.scss +114 -0
  14. package/sass/themes/charts/_theme.scss +27 -0
  15. package/sass/themes/schemas/_index.scss +35 -0
  16. package/sass/themes/schemas/charts/_index.scss +2 -0
  17. package/sass/themes/schemas/charts/dark/_category-chart.scss +33 -0
  18. package/sass/themes/schemas/charts/dark/_data-chart.scss +27 -0
  19. package/sass/themes/schemas/charts/dark/_doughnut-chart.scss +28 -0
  20. package/sass/themes/schemas/charts/dark/_financial-chart.scss +28 -0
  21. package/sass/themes/schemas/charts/dark/_funnel-chart.scss +28 -0
  22. package/sass/themes/schemas/charts/dark/_gauge.scss +47 -0
  23. package/sass/themes/schemas/charts/dark/_geo-map.scss +31 -0
  24. package/sass/themes/schemas/charts/dark/_graph.scss +27 -0
  25. package/sass/themes/schemas/charts/dark/_index.scss +68 -0
  26. package/sass/themes/schemas/charts/dark/_pie-chart.scss +31 -0
  27. package/sass/themes/schemas/charts/dark/_shape-chart.scss +28 -0
  28. package/sass/themes/schemas/charts/dark/_sparkline.scss +28 -0
  29. package/sass/themes/schemas/charts/light/_category-chart.scss +178 -0
  30. package/sass/themes/schemas/charts/light/_data-chart.scss +60 -0
  31. package/sass/themes/schemas/charts/light/_doughnut-chart.scss +50 -0
  32. package/sass/themes/schemas/charts/light/_financial-chart.scss +140 -0
  33. package/sass/themes/schemas/charts/light/_funnel-chart.scss +48 -0
  34. package/sass/themes/schemas/charts/light/_gauge.scss +132 -0
  35. package/sass/themes/schemas/charts/light/_geo-map.scss +35 -0
  36. package/sass/themes/schemas/charts/light/_graph.scss +86 -0
  37. package/sass/themes/schemas/charts/light/_index.scss +68 -0
  38. package/sass/themes/schemas/charts/light/_pie-chart.scss +51 -0
  39. package/sass/themes/schemas/charts/light/_shape-chart.scss +115 -0
  40. package/sass/themes/schemas/charts/light/_sparkline.scss +71 -0
  41. package/sass/typography/_mixins.scss +26 -0
  42. package/sass/typography/charts/_index.scss +19 -0
@@ -0,0 +1,133 @@
1
+ /* stylelint-disable max-line-length */
2
+ @use 'sass:map';
3
+ @use '../index' as *;
4
+ @use '../schemas/charts' as *;
5
+ @use '../../utils' as *;
6
+ @use '../../typography' as *;
7
+
8
+ ////
9
+ /// @group themes
10
+ /// @access public
11
+ /// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
12
+ ////
13
+
14
+ /// @param {Map} $schema [$light-schema] - The schema used as basis for styling the component.
15
+ /// @param {Map} $target ['angular'] - The target platform to be used when scoping the theme variables.
16
+ /// @param {Color} $backing-brush [null] - Sets the brush to use to fill the backing of the bullet graph.
17
+ /// @param {Color} $backing-outline [null] - Sets the brush to use for the outline of the backing.
18
+ /// @param {Number} $backing-stroke-thickness [null] - Sets the stroke thickness of the backing outline.
19
+ /// @param {Color} $font-brush [null] - Sets the brush to use for the label font.
20
+ /// @param {Color} $minor-tick-brush [null] - Sets the brush to use for the minor tickmarks.
21
+ /// @param {Number} $minor-tick-thickness [null] - Stroke thickness to use when rendering minor ticks.
22
+ /// @param {List} $range-brushes [null] - Sets a collection of brushes to be used as the palette for bullet graph ranges.
23
+ /// @param {List} $range-outlines [null] - Sets a collection of brushes to be used as the palette for bullet graph outlines.
24
+ /// @param {Color} $scale-background-brush [null] - Sets the background brush for the scale.
25
+ /// @param {Color} $scale-background-outline [null] - Sets the background outline for the scale.
26
+ /// @param {Number} $scale-background-thickness [null] - Sets the background outline thickness for the scale.
27
+ /// @param {Number} $target-value-breadth [null] - Sets the breadth of the target value element.
28
+ /// @param {Color} $target-value-brush [null] - Sets the brush to use when rendering the fill of the comparative marker.
29
+ /// @param {Color} $target-value-outline [null] - Sets the brush to use when rendering the outline of the target value.
30
+ /// @param {Number} $target-value-thickness [null] - Sets the stroke thickness of the outline of the target value bar.
31
+ /// @param {Color} $tick-brush [null] - Sets the brush to use for the major tickmarks.
32
+ /// @param {Number} $tick-stroke-thickness [null] - Sets the stroke thickness to use when rendering ticks.
33
+ /// @param {Color} $value-brush [null] - Sets the brush to use for the actual value element.
34
+ /// @param {Color} $value-outline [null] - Sets the brush to use for the outline of actual value element.
35
+ /// @param {Number} $value-stroke-thickness [null] - Sets the stroke thickness to use when rendering single actual value element.
36
+ /// @requires $light-schema
37
+ /// @requires extend
38
+ ///
39
+ /// @example scss
40
+ /// $my-chart-theme: bullet-graph-theme($brushes: (orange, blue, pink));
41
+ /// // Pass the theme to the css-vars mixin
42
+ /// @include css-vars($my-chart-theme);
43
+ @function bullet-graph-theme(
44
+ $schema: $light-schema,
45
+ $target: 'angular',
46
+
47
+ $backing-brush: null,
48
+ $backing-outline: null,
49
+ $backing-stroke-thickness: null,
50
+ $font-brush: null,
51
+ $minor-tick-brush: null,
52
+ $minor-tick-thickness: null,
53
+ $range-brushes: null,
54
+ $range-outlines: null,
55
+ $scale-background-brush: null,
56
+ $scale-background-outline: null,
57
+ $scale-background-thickness: null,
58
+ $target-value-breadth: null,
59
+ $target-value-brush: null,
60
+ $target-value-outline: null,
61
+ $target-value-thickness: null,
62
+ $tick-brush: null,
63
+ $tick-stroke-thickness: null,
64
+ $value-brush: null,
65
+ $value-outline: null,
66
+ $value-stroke-thickness: null,
67
+ ) {
68
+ $name: 'bullet-graph';
69
+ $selector: map.get(
70
+ (
71
+ 'angular': 'igx-bullet-graph',
72
+ 'webc': 'igc-bullet-graph',
73
+ 'blazor': 'igb-bullet-graph'
74
+ ),
75
+ $target
76
+ );
77
+ $chart-schema: ();
78
+
79
+ @if map.has-key($schema, $name) {
80
+ $chart-schema: map.get($schema, $name);
81
+ } @else {
82
+ $chart-schema: $schema;
83
+ }
84
+
85
+ $theme: digest-schema($chart-schema);
86
+
87
+ @return extend(
88
+ $theme,
89
+ (
90
+ name: $name,
91
+ selector: $selector,
92
+ backing-brush: $backing-brush,
93
+ backing-outline: $backing-outline,
94
+ backing-stroke-thickness: $backing-stroke-thickness,
95
+ font-brush: $font-brush,
96
+ minor-tick-brush: $minor-tick-brush,
97
+ minor-tick-thickness: $minor-tick-thickness,
98
+ range-brushes: $range-brushes,
99
+ range-outlines: $range-outlines,
100
+ scale-background-brush: $scale-background-brush,
101
+ scale-background-outline: $scale-background-outline,
102
+ scale-background-thickness: $scale-background-thickness,
103
+ target-value-breadth: $target-value-breadth,
104
+ target-value-brush: $target-value-brush,
105
+ target-value-outline: $target-value-outline,
106
+ target-value-thickness: $target-value-thickness,
107
+ tick-brush: $tick-brush,
108
+ tick-stroke-thickness: $tick-stroke-thickness,
109
+ value-brush: $value-brush,
110
+ value-outline: $value-outline,
111
+ value-stroke-thickness: $value-stroke-thickness,
112
+ )
113
+ );
114
+ }
115
+
116
+ /// Adds typography styles for the graph component.
117
+ /// @access private
118
+ /// @group typography
119
+ /// @requires {mixin} type-style
120
+ @mixin graph-typography($target: 'angular') {
121
+ $selector: map.get(
122
+ (
123
+ 'angular': 'igx-bullet-graph',
124
+ 'webc': 'igc-bullet-graph',
125
+ 'blazor': 'igb-bullet-graph'
126
+ ),
127
+ $target
128
+ );
129
+
130
+ #{$selector} {
131
+ --bullet-graph-font: var(--ig-font-family, inherit);
132
+ }
133
+ }
@@ -0,0 +1,12 @@
1
+ @forward 'category-chart-theme';
2
+ @forward 'data-chart-theme';
3
+ @forward 'doughnut-chart-theme';
4
+ @forward 'financial-chart-theme';
5
+ @forward 'funnel-chart-theme';
6
+ @forward 'gauge-theme';
7
+ @forward 'geo-map-theme';
8
+ @forward 'graph-theme';
9
+ @forward 'pie-chart-theme';
10
+ @forward 'shape-chart-theme';
11
+ @forward 'sparkline-theme';
12
+ @forward 'theme';
@@ -0,0 +1,108 @@
1
+ /* stylelint-disable max-line-length */
2
+ @use 'sass:map';
3
+ @use '../index' as *;
4
+ @use '../schemas/charts' as *;
5
+ @use '../../utils' as *;
6
+ @use '../../typography' as *;
7
+
8
+ ////
9
+ /// @group themes
10
+ /// @access public
11
+ /// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
12
+ ////
13
+
14
+ /// @param {Map} $schema [$light-material-schema] - The schema used as basis for styling the component.
15
+ /// @param {Map} $target ['angular'] - The target platform to be used when scoping the theme variables.
16
+ /// @param {List} $brushes [series] - Defines the palette from which automatically assigned series colors are selected.
17
+ /// @param {List} $outlines [series] - Defines the palette from which automatically assigned series outline colors are selected.
18
+ /// @param {Number} $label-extent [null] - Sets the pixel amount by which the labels are offset from the edge of the slices.
19
+ /// @param {Color} $label-inner-color [null] - Sets the color for labels rendered inside of the pie chart.
20
+ /// @param {Color} $label-outer-color [null] - Sets the color for labels rendered outside of the pie chart.
21
+ /// @param {String} $labels-position [null] - Sets the position of chart labels. Valid values are: 'none', 'center', 'insideEnd', 'outsideEnd', and 'bestFit'.
22
+ /// @param {Number} $leader-line-margin [null] - Sets the margin between a label and the end of its leader line.
23
+ /// @param {String} $leader-line-type [null] - Sets what type of leader lines will be used for the outside end labels. Valid values are: 'straight', 'spline', and 'arc'.
24
+ /// @param {String} $leader-line-visibility [null] - Sets whether the leader lines are visible. Valid values are: 'visible' and 'collapsed'.
25
+ /// @param {Number} $radius-factor [null] - Sets the scaling factor of the chart's radius. Value between 0 and 1.
26
+ /// @requires $light-schema
27
+ /// @requires extend
28
+ ///
29
+ /// @example scss
30
+ /// $my-chart-theme: pie-chart-theme($brushes: (red, orange, blue));
31
+ /// // Pass the theme to the css-vars mixin
32
+ /// @include css-vars($my-chart-theme);
33
+ @function pie-chart-theme(
34
+ $schema: $light-material-schema,
35
+ $target: 'angular',
36
+
37
+ $brushes: null,
38
+ $outlines: null,
39
+ $label-extent: null,
40
+ $label-inner-color: null,
41
+ $label-outer-color: null,
42
+ $labels-position: null,
43
+ $leader-line-margin: null,
44
+ $leader-line-type: null,
45
+ $leader-line-visibility: null,
46
+ $radius-factor: null,
47
+ ) {
48
+ $name: 'pie-chart';
49
+ $selector: map.get(
50
+ (
51
+ 'angular': 'igx-pie-chart',
52
+ 'webc': 'igc-pie-chart',
53
+ 'blazor': 'igb-pie-chart'
54
+ ),
55
+ $target
56
+ );
57
+ $chart-schema: ();
58
+
59
+ @if map.has-key($schema, $name) {
60
+ $chart-schema: map.get($schema, $name);
61
+ } @else {
62
+ $chart-schema: $schema;
63
+ }
64
+
65
+ $theme: digest-schema($chart-schema);
66
+
67
+ @return extend( $theme, (
68
+ name: $name,
69
+ selector: $selector,
70
+ brushes: $brushes,
71
+ outlines: $outlines,
72
+ label-extent: $label-extent,
73
+ label-inner-color: $label-inner-color,
74
+ label-outer-color: $label-outer-color,
75
+ labels-position: $labels-position,
76
+ leader-line-margin: $leader-line-margin,
77
+ leader-line-type: $leader-line-type,
78
+ leader-line-visibility: $leader-line-visibility,
79
+ radius-factor: $radius-factor,
80
+ ));
81
+ }
82
+
83
+ /// Adds typography styles for the pie-chart component.
84
+ /// Uses the 'body-2'
85
+ /// category from the typographic scale.
86
+ /// @group typography
87
+ /// @param {Map} $type-scale - A typographic scale as produced by type-scale.
88
+ /// @param {Map} $categories [(text: 'body-2')] - The categories from the typographic scale used for type styles.
89
+ /// @requires {mixin} type-style
90
+ @mixin pie-chart-typography($type-scale, $categories: (
91
+ text: 'body-2',
92
+ ), $target: 'angular') {
93
+ $name: 'pie-chart';
94
+ $selector: map.get(
95
+ (
96
+ 'angular': 'igx-pie-chart',
97
+ 'webc': 'igc-pie-chart',
98
+ 'blazor': 'igb-pie-chart'
99
+ ),
100
+ $target
101
+ );
102
+ $text: map.get($categories, 'text');
103
+ $text-styles: type-scale-category($type-scale, $text);
104
+
105
+ #{$selector} {
106
+ @include font-var('text-style', $text-styles, $name);
107
+ }
108
+ }
@@ -0,0 +1,271 @@
1
+ /* stylelint-disable max-line-length */
2
+ @use 'sass:map';
3
+ @use '../index' as *;
4
+ @use '../schemas/charts' as *;
5
+ @use '../../utils' as *;
6
+ @use '../../typography' as *;
7
+
8
+ ////
9
+ /// @group themes
10
+ /// @access public
11
+ /// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
12
+ ////
13
+
14
+ /// @param {Map} $schema [$light-material-schema] - The schema used as basis for styling the component.
15
+ /// @param {Map} $target ['angular'] - The target platform to be used when scoping the theme variables.
16
+ /// @param {List} $margin [null] - Sets the margin (top, right, bottom, left) of the chart content.
17
+ /// @param {Color} $title-alignment [null] - Sets horizontal alignment which determines the title position, relative to the left and right edges of the control.
18
+ /// @param {Color} $title-text-color [null] - Sets the color of the chart title.
19
+ /// @param {List} $title-margin [null] - Sets the margin (top, right, bottom, left) of the chart title.
20
+ /// @param {String} $subtitle-alignment [null] - Sets horizontal alignment which determines the subtitle position, relative to the left and right edges of the control.
21
+ /// @param {Color} $subtitle-text-color [null] - Sets the color of the chart subtitle.
22
+ /// @param {List} $subtitle-margin [null] - Sets the margins (top, right, bottom, left) of the chart subtitle.
23
+ /// @param {List} $brushes [null] - Defines the palette from which automatically assigned series colors are selected.
24
+ /// @param {List} $marker-brushes [null] - Sets the palette of brushes used for rendering fill area of data point markers.
25
+ /// @param {List} $outlines [null] - Sets the palette of brushes to use for outlines on the chart series.
26
+ /// @param {List} $marker-outlines [null] - Sets the palette of brushes used for rendering outlines of data point markers.
27
+ /// @param {Number} $thickness [null] - Sets the thickness for all series in this chart.
28
+ /// @param {List} $trend-line-brushes [null] - Sets the palette of brushes to used for coloring trend lines in this chart.
29
+ /// @param {Number} $trend-line-thickness [null] - Sets the thickness of the trend lines in this chart. This property applies only to these chart types: point, line, spline, and bubble.
30
+ /// @param {List} $x-axis-label-margin [null] - Sets the margin of labels on the X-axis.
31
+ /// @param {Color} $x-axis-label-text-color [null] - Sets color of labels on the X-axis.
32
+ /// @param {String} $x-axis-label-vertical-alignment [null] - Sets Vertical alignment of X-axis labels.
33
+ /// @param {Color} $x-axis-major-stroke [null] - Sets the color to apply to major gridlines along the X-axis.
34
+ /// @param {Number} $x-axis-major-stroke-thickness [null] - Sets the thickness to apply to major gridlines along the X-axis.
35
+ /// @param {Color} $x-axis-minor-stroke [null] - Sets the color to apply to minor gridlines along the X-axis.
36
+ /// @param {Number} $x-axis-minor-stroke-thickness [null] - Sets the thickness to apply to minor gridlines along the X-axis.
37
+ /// @param {Color} $x-axis-strip [null] - Sets the color to apply to stripes along the X-axis.
38
+ /// @param {Color} $x-axis-stroke [null] - Sets the color to apply to the X-axis line.
39
+ /// @param {Number} $x-axis-stroke-thickness [null] - Sets the thickness to apply to the X-axis line.
40
+ /// @param {String} $x-axis-title-alignment [null] - Sets Horizontal alignment of the X-axis title.
41
+ /// @param {Color} $x-axis-title-color [null] - Sets color of title on the X-axis.
42
+ /// @param {List} $x-axis-title-margin [null] - Sets the margin around the title on the X-axis.
43
+ /// @param {List} $y-axis-label-margin [null] - Sets the margin of labels on the Y-axis.
44
+ /// @param {Color} $y-axis-label-text-color [null] - Sets color of labels on the Y-axis.
45
+ /// @param {String} $y-axis-label-vertical-alignment [null] - Sets Vertical alignment of Y-axis labels.
46
+ /// @param {Color} $y-axis-major-stroke [null] - Sets the color to apply to major gridlines along the Y-axis.
47
+ /// @param {Number} $y-axis-major-stroke-thickness [null] - Sets the thickness to apply to major gridlines along the Y-axis.
48
+ /// @param {Color} $y-axis-minor-stroke [null] - Sets the color to apply to minor gridlines along the Y-axis.
49
+ /// @param {Number} $y-axis-minor-stroke-thickness [null] - Sets the thickness to apply to minor gridlines along the Y-axis.
50
+ /// @param {Color} $y-axis-strip [null] - Sets the color to apply to stripes along the Y-axis.
51
+ /// @param {Color} $y-axis-stroke [null] - Sets the color to apply to the Y-axis line.
52
+ /// @param {Number} $y-axis-stroke-thickness [null] - Sets the thickness to apply to the Y-axis line.
53
+ /// @param {String} $y-axis-title-alignment [null] - Sets Horizontal alignment of the Y-axis title.
54
+ /// @param {Color} $y-axis-title-color [null] - Sets color of title on the Y-axis.
55
+ /// @param {List} $y-axis-title-margin [null] - Sets the margin around the title on the Y-axis.
56
+ /// @requires $light-schema
57
+ /// @requires extend
58
+ ///
59
+ /// @example scss
60
+ /// $my-chart-theme: shape-chart-theme($brushes: (orange, blue, pink));
61
+ /// // Pass the theme to the css-vars mixin
62
+ /// @include css-vars($my-chart-theme);
63
+ @function shape-chart-theme(
64
+ $schema: $light-material-schema,
65
+ $target: 'angular',
66
+
67
+ $margin: null,
68
+ $title-text-color: null,
69
+ $title-margin: null,
70
+ $subtitle-text-color: null,
71
+ $subtitle-margin: null,
72
+ $brushes: null,
73
+ $outlines: null,
74
+ $marker-brushes: null,
75
+ $marker-outlines: null,
76
+ $thickness: null,
77
+ $trend-line-brushes: null,
78
+ $trend-line-thickness: null,
79
+ $x-axis-label-margin: null,
80
+ $x-axis-label-text-color: null,
81
+ $x-axis-label-vertical-alignment: null,
82
+ $x-axis-major-stroke: null,
83
+ $x-axis-major-stroke-thickness: null,
84
+ $x-axis-minor-stroke: null,
85
+ $x-axis-minor-stroke-thickness: null,
86
+ $x-axis-strip: null,
87
+ $x-axis-stroke: null,
88
+ $x-axis-stroke-thickness: null,
89
+ $x-axis-title-alignment: null,
90
+ $x-axis-title-color: null,
91
+ $x-axis-title-margin: null,
92
+ $y-axis-label-margin: null,
93
+ $y-axis-label-text-color: null,
94
+ $y-axis-label-vertical-alignment: null,
95
+ $y-axis-major-stroke: null,
96
+ $y-axis-major-stroke-thickness: null,
97
+ $y-axis-minor-stroke: null,
98
+ $y-axis-minor-stroke-thickness: null,
99
+ $y-axis-strip: null,
100
+ $y-axis-stroke: null,
101
+ $y-axis-stroke-thickness: null,
102
+ $y-axis-title-alignment: null,
103
+ $y-axis-title-color: null,
104
+ $y-axis-title-margin: null,
105
+ ) {
106
+ $name: 'shape-chart';
107
+ $selector: map.get(
108
+ (
109
+ 'angular': 'igx-shape-chart',
110
+ 'webc': 'igc-shape-chart',
111
+ 'blazor': 'igb-shape-chart'
112
+ ),
113
+ $target
114
+ );
115
+ $chart-schema: ();
116
+
117
+ @if map.has-key($schema, $name) {
118
+ $chart-schema: map.get($schema, $name);
119
+ } @else {
120
+ $chart-schema: $schema;
121
+ }
122
+
123
+ $theme: digest-schema($chart-schema);
124
+ $margin-default: map.get($theme, 'margin');
125
+ $title-margin-default: map.get($theme, 'title-margin');
126
+ $subtitle-margin-default: map.get($theme, 'subtitle-margin');
127
+ $x-axis-label-margin-default: map.get($theme, 'x-axis-label-margin');
128
+ $y-axis-label-margin-default: map.get($theme, 'y-axis-label-margin');
129
+ $x-axis-title-margin-default: map.get($theme, 'x-axis-title-margin');
130
+ $y-axis-title-margin-default: map.get($theme, 'y-axis-title-margin');
131
+
132
+ @if not($margin) {
133
+ $margin: $margin-default;
134
+ } @else {
135
+ $margin: expand-shorthand(($margin));
136
+ }
137
+
138
+ @if not($title-margin) {
139
+ $title-margin: $title-margin-default;
140
+ } @else {
141
+ $title-margin: map-keys-prefix(expand-shorthand(($title-margin)), 'title');
142
+ }
143
+
144
+ @if not($subtitle-margin) {
145
+ $subtitle-margin: $subtitle-margin-default;
146
+ } @else {
147
+ $subtitle-margin: map-keys-prefix(expand-shorthand(($subtitle-margin)), 'subtitle');
148
+ }
149
+
150
+ @if not($x-axis-label-margin) {
151
+ $x-axis-label-margin: $x-axis-label-margin-default;
152
+ } @else {
153
+ $x-axis-label-margin: map-keys-prefix(expand-shorthand(($x-axis-label-margin)), 'x-axis-label');
154
+ }
155
+
156
+ @if not($y-axis-label-margin) {
157
+ $y-axis-label-margin: $y-axis-label-margin-default;
158
+ } @else {
159
+ $y-axis-label-margin: map-keys-prefix(expand-shorthand(($y-axis-label-margin)), 'y-axis-label');
160
+ }
161
+
162
+ @if not($x-axis-title-margin) {
163
+ $x-axis-title-margin: $x-axis-title-margin-default;
164
+ } @else {
165
+ $x-axis-title-margin: map-keys-prefix(expand-shorthand(($x-axis-title-margin)), 'x-axis-title');
166
+ }
167
+
168
+ @if not($y-axis-title-margin) {
169
+ $y-axis-title-margin: $y-axis-title-margin-default;
170
+ } @else {
171
+ $y-axis-title-margin: map-keys-prefix(expand-shorthand(($y-axis-title-margin)), 'y-axis-title');
172
+ }
173
+
174
+ @return extend(
175
+ $theme,
176
+ $margin,
177
+ $title-margin,
178
+ $subtitle-margin,
179
+ $x-axis-label-margin,
180
+ $x-axis-title-margin,
181
+ $y-axis-label-margin,
182
+ $y-axis-title-margin,
183
+ (
184
+ name: $name,
185
+ selector: $selector,
186
+ title-text-color: $title-text-color,
187
+ subtitle-text-color: $subtitle-text-color,
188
+ brushes: $brushes,
189
+ outlines: $outlines,
190
+ thickness: $thickness,
191
+ trend-line-brushes: $trend-line-brushes,
192
+ trend-line-thickness: $trend-line-thickness,
193
+ x-axis-label-text-color: $x-axis-label-text-color,
194
+ x-axis-label-vertical-alignment: $x-axis-label-vertical-alignment,
195
+ x-axis-major-stroke: $x-axis-major-stroke,
196
+ x-axis-major-stroke-thickness: $x-axis-major-stroke-thickness,
197
+ x-axis-minor-stroke: $x-axis-minor-stroke,
198
+ x-axis-minor-stroke-thickness: $x-axis-minor-stroke-thickness,
199
+ x-axis-strip: $x-axis-strip,
200
+ x-axis-stroke: $x-axis-stroke,
201
+ x-axis-stroke-thickness: $x-axis-stroke-thickness,
202
+ x-axis-title-alignment: $x-axis-title-alignment,
203
+ x-axis-title-color: $x-axis-title-color,
204
+ y-axis-label-text-color: $y-axis-label-text-color,
205
+ y-axis-label-vertical-alignment: $y-axis-label-vertical-alignment,
206
+ y-axis-major-stroke: $y-axis-major-stroke,
207
+ y-axis-major-stroke-thickness: $y-axis-major-stroke-thickness,
208
+ y-axis-minor-stroke: $y-axis-minor-stroke,
209
+ y-axis-minor-stroke-thickness: $y-axis-minor-stroke-thickness,
210
+ y-axis-strip: $y-axis-strip,
211
+ y-axis-stroke: $y-axis-stroke,
212
+ y-axis-stroke-thickness: $y-axis-stroke-thickness,
213
+ y-axis-title-alignment: $y-axis-title-alignment,
214
+ y-axis-title-color: $y-axis-title-color,
215
+ )
216
+ );
217
+ }
218
+
219
+ /// Adds typography styles for the shape-chart component.
220
+ /// Uses the 'h3', 'h4', 'h6', and 'subtitle-1'
221
+ /// category from the typographic scale.
222
+ /// @group typography
223
+ /// @param {Map} $type-scale - A typographic scale as produced by igx-type-scale.
224
+ /// @param {Map} $categories [(
225
+ /// 'title': 'h6',
226
+ /// 'subtitle': 'subtitle-1,
227
+ /// 'x-axis-label-text-style': 'h4',
228
+ /// 'y-axis-label-text-style': 'h4',
229
+ /// 'x-axis-title-text-style': 'h3',
230
+ /// 'y-axis-title-text-style': 'h3',
231
+ /// )] - The categories from the typographic scale used for type styles.
232
+ /// @requires {mixin} type-style
233
+ @mixin shape-chart-typography($type-scale, $categories: (
234
+ 'title': 'h6',
235
+ 'subtitle': 'subtitle-1',
236
+ 'x-axis-label-text-style': 'h4',
237
+ 'y-axis-label-text-style': 'h4',
238
+ 'x-axis-title-text-style': 'h3',
239
+ 'y-axis-title-text-style': 'h3',
240
+ ), $target: 'angular') {
241
+ $name: 'shape-chart';
242
+ $selector: map.get(
243
+ (
244
+ 'angular': 'igx-shape-chart',
245
+ 'webc': 'igc-shape-chart',
246
+ 'blazor': 'igb-shape-chart'
247
+ ),
248
+ $target
249
+ );
250
+ $title: map.get($categories, 'title');
251
+ $subtitle: map.get($categories, 'subtitle');
252
+ $x-axis-title-text-style: map.get($categories, 'x-axis-title-text-style');
253
+ $x-axis-label-text-style: map.get($categories, 'x-axis-label-text-style');
254
+ $y-axis-title-text-style: map.get($categories, 'y-axis-title-text-style');
255
+ $y-axis-label-text-style: map.get($categories, 'y-axis-label-text-style');
256
+ $title-styles: type-scale-category($type-scale, $title);
257
+ $subtitle-styles: type-scale-category($type-scale, $subtitle);
258
+ $x-axis-title-styles: type-scale-category($type-scale, $x-axis-title-text-style);
259
+ $x-axis-label-styles: type-scale-category($type-scale, $x-axis-label-text-style);
260
+ $y-axis-title-styles: type-scale-category($type-scale, $y-axis-title-text-style);
261
+ $y-axis-label-styles: type-scale-category($type-scale, $y-axis-label-text-style);
262
+
263
+ #{$selector} {
264
+ @include font-var('title-text-style', $title-styles, $name);
265
+ @include font-var('subtitle-text-style', $subtitle-styles, $name);
266
+ @include font-var('x-axis-title-text-style', $x-axis-title-styles, $name);
267
+ @include font-var('x-axis-label-text-style', $x-axis-label-styles, $name);
268
+ @include font-var('y-axis-title-text-style', $y-axis-title-styles, $name);
269
+ @include font-var('y-axis-label-text-style', $y-axis-label-styles, $name);
270
+ }
271
+ }
@@ -0,0 +1,114 @@
1
+ @use 'sass:map';
2
+ @use '../index' as *;
3
+ @use '../schemas/charts' as *;
4
+ @use '../../utils' as *;
5
+ @use '../../typography' as *;
6
+
7
+ ////
8
+ /// @group themes
9
+ /// @access public
10
+ /// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
11
+ ////
12
+
13
+ /// @param {Map} $schema [$light-schema] - The schema used as basis for styling the component.
14
+ /// @param {Map} $target ['angular'] - The target platform to be used when scoping the theme variables.
15
+ ///
16
+ /// @param {Color} $brush [null] - Sets the sparkline brush.
17
+ /// @param {Number} $line-thickness [null] - Sets the line thickness of the sparkline.
18
+ /// @param {Color} $marker-brush [null] - Sets the marker brush of the sparkline.
19
+ /// @param {Color} $marker-size [null] - Sets the marker size of the sparkline.
20
+ /// @param {Color} $first-marker-brush [null] - Sets the first marker brush of the sparkline.
21
+ /// @param {Number} $first-marker-size [null] - Sets the first marker size of the sparkline.
22
+ /// @param {Color} $last-marker-brush [null] - Sets the last marker brush of the sparkline.
23
+ /// @param {Number} $last-marker-size [null] - Sets the last marker size of the sparkline.
24
+ /// @param {Color} $low-marker-brush [null] - Sets the low marker brush of the sparkline.
25
+ /// @param {Number} $low-marker-size [null] - Sets the low marker size of the sparkline.
26
+ /// @param {Color} $high-marker-brush [null] - Sets the high marker brush of the sparkline.
27
+ /// @param {Number} $high-marker-size [null] - Sets the high marker size of the sparkline.
28
+ /// @param {Color} $negative-brush [null] - Sets the negative brush of the sparkline.
29
+ /// @param {Color} $negative-marker-brush [null] - Sets the negative marker brush of the sparkline.
30
+ /// @param {Number} $negative marker-size [null] - Sets the negative marker size of the sparkline.
31
+ /// @param {Color} $trend-line-brush [null] - Sets the trendline brush of the sparkline.
32
+ /// @param {Color} $trend-line-thickness [null] - Sets the thickness of the sparkline's trendline.
33
+ /// @param {Color} $horizontal-axis-brush [null] - Sets the horizontal axis line brush of the sparkline.
34
+ /// @param {Color} $vertical-axis-brush [null] - Sets the vertical axis line brush of the sparkline.
35
+ /// @param {Color} $normal-range-fill [null] - Sets the normal range brush of the sparkline.
36
+ /// @requires $light-schema
37
+ /// @requires extend
38
+ ///
39
+ /// @example scss
40
+ /// $my-sparkline-theme: sparkline-theme($brushes: (orange, blue, pink));
41
+ /// // Pass the theme to the css-vars mixin
42
+ /// @include css-vars($my-sparkline-theme);
43
+ @function sparkline-theme(
44
+ $schema: $light-schema,
45
+ $target: 'angular',
46
+
47
+ $brush: null,
48
+ $line-thickness: null,
49
+ $marker-brush: null,
50
+ $marker-size: null,
51
+ $first-marker-brush: null,
52
+ $first-marker-size: null,
53
+ $last-marker-brush: null,
54
+ $last-marker-size: null,
55
+ $low-marker-brush: null,
56
+ $low-marker-size: null,
57
+ $high-marker-brush: null,
58
+ $high-marker-size: null,
59
+ $negative-brush: null,
60
+ $negative-marker-brush: null,
61
+ $negative-marker-size: null,
62
+ $trend-line-brush: null,
63
+ $trend-line-thickness: null,
64
+ $horizontal-axis-brush: null,
65
+ $vertical-axis-brush: null,
66
+ $normal-range-fill: null,
67
+ ) {
68
+ $name: 'sparkline';
69
+ $selector: map.get(
70
+ (
71
+ 'angular': 'igx-sparkline',
72
+ 'webc': 'igc-sparkline',
73
+ 'blazor': 'igb-sparkline'
74
+ ),
75
+ $target
76
+ );
77
+ $sparkline-schema: ();
78
+
79
+ @if map.has-key($schema, $name) {
80
+ $sparkline-schema: map.get($schema, $name);
81
+ } @else {
82
+ $sparkline-schema: $schema;
83
+ }
84
+
85
+ $theme: digest-schema($sparkline-schema);
86
+
87
+ @return extend(
88
+ $theme,
89
+ (
90
+ name: $name,
91
+ selector: $selector,
92
+ brush: $brush,
93
+ line-thickness: $line-thickness,
94
+ marker-brush: $marker-brush,
95
+ marker-size: $marker-size,
96
+ first-marker-brush: $first-marker-brush,
97
+ first-marker-size: $first-marker-size,
98
+ last-marker-brush: $last-marker-brush,
99
+ last-marker-size: $last-marker-size,
100
+ low-marker-brush: $low-marker-brush,
101
+ low-marker-size: $low-marker-size,
102
+ high-marker-brush: $high-marker-brush,
103
+ high-marker-size: $high-marker-size,
104
+ negative-brush: $negative-brush,
105
+ negative-marker-brush: $negative-marker-brush,
106
+ negative-marker-size: $negative-marker-size,
107
+ trend-line-brush: $trend-line-brush,
108
+ trend-line-thickness: $trend-line-thickness,
109
+ horizontal-axis-brush: $horizontal-axis-brush,
110
+ vertical-axis-brush: $vertical-axis-brush,
111
+ normal-range-fill: $normal-range-fill,
112
+ )
113
+ );
114
+ }
@@ -0,0 +1,27 @@
1
+ @use '../mixins' as *;
2
+ @use './category-chart-theme' as *;
3
+ @use './data-chart-theme' as *;
4
+ @use './doughnut-chart-theme' as *;
5
+ @use './financial-chart-theme' as *;
6
+ @use './funnel-chart-theme' as *;
7
+ @use './gauge-theme' as *;
8
+ @use './geo-map-theme' as *;
9
+ @use './graph-theme' as *;
10
+ @use './pie-chart-theme' as *;
11
+ @use './shape-chart-theme' as *;
12
+ @use './sparkline-theme' as *;
13
+
14
+ @mixin chart-themes($schema, $target: 'angular') {
15
+ @include css-vars(category-chart-theme($schema: $schema, $target: $target));
16
+ @include css-vars(data-chart-theme($schema: $schema, $target: $target));
17
+ @include css-vars(doughnut-chart-theme($schema: $schema, $target: $target));
18
+ @include css-vars(financial-chart-theme($schema: $schema, $target: $target));
19
+ @include css-vars(funnel-chart-theme($schema: $schema, $target: $target));
20
+ @include css-vars(linear-gauge-theme($schema: $schema, $target: $target));
21
+ @include css-vars(radial-gauge-theme($schema: $schema, $target: $target));
22
+ @include css-vars(geo-map-theme($schema: $schema, $target: $target));
23
+ @include css-vars(bullet-graph-theme($schema: $schema, $target: $target));
24
+ @include css-vars(pie-chart-theme($schema: $schema, $target: $target));
25
+ @include css-vars(shape-chart-theme($schema: $schema, $target: $target));
26
+ @include css-vars(sparkline-theme($schema: $schema, $target: $target));
27
+ }