@carbon/charts 1.11.21 → 1.13.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.
Files changed (85) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +3 -3
  3. package/dist/{angle-utils-6b17e95b.mjs → angle-utils-7844066d.mjs} +69 -57
  4. package/dist/{angle-utils-6b17e95b.mjs.map → angle-utils-7844066d.mjs.map} +1 -1
  5. package/dist/{choropleth-17b85d55.mjs → choropleth-d4b2bac9.mjs} +2 -2
  6. package/dist/{choropleth-17b85d55.mjs.map → choropleth-d4b2bac9.mjs.map} +1 -1
  7. package/dist/components/index.mjs +2 -2
  8. package/dist/demo/index.mjs +227 -244
  9. package/dist/demo/index.mjs.map +1 -1
  10. package/dist/demo/styles.css +4499 -692
  11. package/dist/demo/styles.css.map +1 -1
  12. package/dist/demo/utils/package-versions.d.ts +0 -2
  13. package/dist/{index-b0e98af9.mjs → index-0bab3ec3.mjs} +2 -2
  14. package/dist/{index-b0e98af9.mjs.map → index-0bab3ec3.mjs.map} +1 -1
  15. package/dist/index.mjs +5 -5
  16. package/dist/interfaces/charts.d.ts +6 -0
  17. package/dist/model/index.mjs +21 -13
  18. package/dist/model/index.mjs.map +1 -1
  19. package/dist/services/index.mjs +2 -2
  20. package/dist/styles.css +4249 -781
  21. package/dist/styles.css.map +1 -1
  22. package/dist/styles.min.css +1 -1
  23. package/dist/styles.min.css.map +1 -1
  24. package/dist/umd/bundle.umd.js +3 -3
  25. package/dist/umd/bundle.umd.js.map +1 -1
  26. package/package.json +21 -21
  27. package/scss/_chart-holder.scss +18 -17
  28. package/scss/_chart-wrapper.scss +6 -0
  29. package/scss/_color-palette.scss +2 -2
  30. package/scss/_colors.scss +26 -25
  31. package/scss/_globals.scss +8 -0
  32. package/scss/_tokens.scss +50 -50
  33. package/scss/_transition.scss +4 -0
  34. package/scss/_type.scss +14 -14
  35. package/scss/components/_axis.scss +12 -11
  36. package/scss/components/_callouts.scss +4 -3
  37. package/scss/components/_color-legend.scss +4 -4
  38. package/scss/components/_grid-brush.scss +7 -5
  39. package/scss/components/_grid.scss +9 -8
  40. package/scss/components/_highlights.scss +6 -3
  41. package/scss/components/_layout.scss +5 -3
  42. package/scss/components/_legend.scss +14 -11
  43. package/scss/components/_meter-title.scss +11 -9
  44. package/scss/components/_modal.scss +14 -11
  45. package/scss/components/_ruler.scss +6 -3
  46. package/scss/components/_skeleton-lines.scss +9 -6
  47. package/scss/components/_skeleton.scss +9 -6
  48. package/scss/components/_threshold.scss +12 -11
  49. package/scss/components/_title.scss +5 -5
  50. package/scss/components/_toolbar.scss +6 -6
  51. package/scss/components/_tooltip.scss +12 -11
  52. package/scss/components/_zero-line.scss +4 -3
  53. package/scss/components/_zoom-bar.scss +16 -14
  54. package/scss/components/diagrams/_card-node.scss +74 -74
  55. package/scss/components/diagrams/_edge.scss +46 -49
  56. package/scss/components/diagrams/_marker.scss +4 -5
  57. package/scss/components/diagrams/_shape-node.scss +72 -73
  58. package/scss/components/diagrams/index.scss +4 -4
  59. package/scss/components/index.scss +20 -20
  60. package/scss/demos.scss +1 -0
  61. package/scss/graphs/_alluvial.scss +7 -6
  62. package/scss/graphs/_area.scss +4 -2
  63. package/scss/graphs/_bubble.scss +6 -5
  64. package/scss/graphs/_bullet.scss +11 -13
  65. package/scss/graphs/_choropleth.scss +7 -7
  66. package/scss/graphs/_circle-pack.scss +7 -6
  67. package/scss/graphs/_donut.scss +3 -1
  68. package/scss/graphs/_gauge.scss +7 -6
  69. package/scss/graphs/_heatmap.scss +6 -6
  70. package/scss/graphs/_line.scss +6 -4
  71. package/scss/graphs/_lollipop.scss +3 -1
  72. package/scss/graphs/_meter.scss +11 -10
  73. package/scss/graphs/_pie.scss +3 -1
  74. package/scss/graphs/_radar.scss +6 -5
  75. package/scss/graphs/_scatter-stacked.scss +4 -3
  76. package/scss/graphs/_scatter.scss +6 -5
  77. package/scss/graphs/_tree.scss +11 -9
  78. package/scss/graphs/_treemap.scss +3 -1
  79. package/scss/graphs/_wordcloud.scss +3 -1
  80. package/scss/graphs/index.scss +19 -19
  81. package/scss/index.scss +10 -31
  82. package/styles.css +4249 -781
  83. package/styles.min.css +1 -1
  84. package/scss/components/_edge.scss +0 -65
  85. package/scss/components/_marker.scss +0 -7
@@ -1,6 +1,7 @@
1
- @use '@carbon/styles/scss/theme' as *;
1
+ @use '@carbon/styles/scss/theme';
2
+ @use '../globals';
2
3
 
3
- .#{$prefix}--#{$charts-prefix}--circle-pack {
4
+ .#{globals.$prefix}--#{globals.$charts-prefix}--circle-pack {
4
5
  circle.node {
5
6
  stroke-width: 1.5px;
6
7
 
@@ -9,9 +10,9 @@
9
10
  }
10
11
 
11
12
  &.non-focal {
12
- fill: $icon-disabled;
13
+ fill: theme.$icon-disabled;
13
14
  fill-opacity: 30%;
14
- stroke: $icon-disabled;
15
+ stroke: theme.$icon-disabled;
15
16
  }
16
17
 
17
18
  &.clickable {
@@ -20,9 +21,9 @@
20
21
  }
21
22
  }
22
23
 
23
- .#{$prefix}--#{$charts-prefix}--chart-wrapper.zoomed-in {
24
+ .#{globals.$prefix}--#{globals.$charts-prefix}--chart-wrapper.zoomed-in {
24
25
  cursor: zoom-out;
25
- .#{$prefix}--#{$charts-prefix}--circle-pack {
26
+ .#{globals.$prefix}--#{globals.$charts-prefix}--circle-pack {
26
27
  circle.node {
27
28
  &.hovered-child {
28
29
  stroke: 1.5px solid initial;
@@ -1,3 +1,5 @@
1
- .#{$prefix}--#{$charts-prefix}--donut {
1
+ @use '../globals';
2
+
3
+ .#{globals.$prefix}--#{globals.$charts-prefix}--donut {
2
4
  overflow: visible;
3
5
  }
@@ -1,23 +1,24 @@
1
- @use '@carbon/styles/scss/theme' as *;
1
+ @use '@carbon/styles/scss/theme';
2
+ @use '../globals';
2
3
 
3
- .#{$prefix}--#{$charts-prefix}--gauge {
4
+ .#{globals.$prefix}--#{globals.$charts-prefix}--gauge {
4
5
  overflow: visible;
5
6
 
6
7
  path.arc-background {
7
- fill: $layer-01;
8
+ fill: theme.$layer-01;
8
9
  }
9
10
 
10
11
  .gauge-delta-arrow {
11
12
  &.status--danger {
12
- fill: $support-error;
13
+ fill: theme.$support-error;
13
14
  }
14
15
 
15
16
  &.status--warning {
16
- fill: $support-warning;
17
+ fill: theme.$support-warning;
17
18
  }
18
19
 
19
20
  &.status--success {
20
- fill: $support-success;
21
+ fill: theme.$support-success;
21
22
  }
22
23
  }
23
24
  }
@@ -1,7 +1,7 @@
1
- @use '@carbon/styles/scss/themes';
2
- @use '@carbon/styles/scss/theme' as *;
1
+ @use '@carbon/styles/scss/theme';
2
+ @use '../globals';
3
3
 
4
- .#{$prefix}--#{$charts-prefix}--heatmap {
4
+ .#{globals.$prefix}--#{globals.$charts-prefix}--heatmap {
5
5
  g.highlighter-hidden {
6
6
  visibility: hidden;
7
7
  }
@@ -28,7 +28,7 @@
28
28
  }
29
29
 
30
30
  rect.pattern-fill {
31
- fill: $border-strong-01;
31
+ fill: theme.$border-strong-01;
32
32
  }
33
33
 
34
34
  g.shadows {
@@ -51,10 +51,10 @@
51
51
 
52
52
  rect.heat {
53
53
  stroke-width: 0px;
54
- stroke: $background;
54
+ stroke: theme.$background;
55
55
  }
56
56
 
57
57
  rect.null-state {
58
- fill: $icon-inverse;
58
+ fill: theme.$icon-inverse;
59
59
  }
60
60
  }
@@ -1,9 +1,11 @@
1
- @use '@carbon/styles/scss/theme' as *;
1
+ @use '@carbon/styles/scss/theme';
2
+ @use '@carbon/colors';
3
+ @use '../globals';
2
4
 
3
- $lines-bg-color: $layer-accent-01;
4
- $lines-shimmer-color: $white-0;
5
+ $lines-bg-color: theme.$layer-accent-01;
6
+ $lines-shimmer-color: colors.$white-0;
5
7
 
6
- .#{$prefix}--#{$charts-prefix}--line {
8
+ .#{globals.$prefix}--#{globals.$charts-prefix}--line {
7
9
  path.line {
8
10
  pointer-events: none;
9
11
  fill: none;
@@ -1,4 +1,6 @@
1
- .#{$prefix}--#{$charts-prefix}--lollipop {
1
+ @use '../globals';
2
+
3
+ .#{globals.$prefix}--#{globals.$charts-prefix}--lollipop {
2
4
  line.line {
3
5
  pointer-events: none;
4
6
  }
@@ -1,34 +1,35 @@
1
- @use '@carbon/styles/scss/themes';
2
- @use '@carbon/styles/scss/theme' as *;
1
+ @use '@carbon/styles/scss/theme';
2
+ @use '../globals';
3
+ @use '../tokens';
3
4
 
4
- .#{$prefix}--#{$charts-prefix}--meter {
5
+ .#{globals.$prefix}--#{globals.$charts-prefix}--meter {
5
6
  rect.container {
6
- fill: $layer-01;
7
+ fill: theme.$layer-01;
7
8
  }
8
9
 
9
10
  line.rangeIndicator {
10
- stroke: $meter-range-indicator;
11
+ stroke: tokens.$meter-range-indicator;
11
12
  stroke-width: 1px;
12
13
  }
13
14
 
14
15
  rect.value {
15
16
  &.status--danger {
16
- fill: $support-error;
17
+ fill: theme.$support-error;
17
18
  }
18
19
 
19
20
  &.status--warning {
20
- fill: $support-warning;
21
+ fill: theme.$support-warning;
21
22
  stroke-width: 1px;
22
- stroke: $alert-stroke;
23
+ stroke: tokens.$alert-stroke;
23
24
  }
24
25
 
25
26
  &.status--success {
26
- fill: $support-success;
27
+ fill: theme.$support-success;
27
28
  }
28
29
  }
29
30
 
30
31
  line.peak {
31
- stroke: $border-inverse;
32
+ stroke: theme.$border-inverse;
32
33
  stroke-width: 2px;
33
34
  }
34
35
  }
@@ -1,3 +1,5 @@
1
- .#{$prefix}--#{$charts-prefix}--pie {
1
+ @use '../globals';
2
+
3
+ .#{globals.$prefix}--#{globals.$charts-prefix}--pie {
2
4
  overflow: visible;
3
5
  }
@@ -1,7 +1,8 @@
1
- @use '@carbon/styles/scss/themes';
2
- @use '@carbon/styles/scss/theme' as *;
1
+ @use '@carbon/styles/scss/theme';
2
+ @use '../globals';
3
+ @use '../tokens';
3
4
 
4
- .#{$prefix}--#{$charts-prefix}--radar {
5
+ .#{globals.$prefix}--#{globals.$charts-prefix}--radar {
5
6
  .blobs path {
6
7
  stroke-width: 1.5px;
7
8
  }
@@ -9,10 +10,10 @@
9
10
  .y-axes path,
10
11
  .x-axes line {
11
12
  stroke-width: 1px;
12
- stroke: $layer-accent-01;
13
+ stroke: theme.$layer-accent-01;
13
14
  }
14
15
 
15
16
  .x-axes line.hovered {
16
- stroke: $layer-inverse-absolute;
17
+ stroke: tokens.$layer-inverse-absolute;
17
18
  }
18
19
  }
@@ -1,8 +1,9 @@
1
- @use '@carbon/styles/scss/theme' as *;
1
+ @use '@carbon/styles/scss/theme';
2
+ @use '../globals';
2
3
 
3
- .#{$prefix}--#{$charts-prefix}--scatter-stacked {
4
+ .#{globals.$prefix}--#{globals.$charts-prefix}--scatter-stacked {
4
5
  circle.dot.unfilled {
5
- fill: $layer-01;
6
+ fill: theme.$layer-01;
6
7
  stroke-width: 1.5;
7
8
  }
8
9
 
@@ -1,15 +1,16 @@
1
- @use '@carbon/styles/scss/motion' as *;
2
- @use '@carbon/styles/scss/theme' as *;
1
+ @use '@carbon/styles/scss/motion' as motion;
2
+ @use '@carbon/styles/scss/theme';
3
+ @use '../globals';
3
4
 
4
- .#{$prefix}--#{$charts-prefix}--scatter {
5
+ .#{globals.$prefix}--#{globals.$charts-prefix}--scatter {
5
6
  circle.dot.hovered {
6
7
  fill-opacity: 1;
7
8
  transition: all 0.1s;
8
- @include motion(standard, expressive);
9
+ @include motion.motion(standard, expressive);
9
10
  }
10
11
 
11
12
  circle.dot.unfilled {
12
- fill: $layer-01;
13
+ fill: theme.$layer-01;
13
14
  stroke-width: 1.5;
14
15
  }
15
16
 
@@ -1,9 +1,11 @@
1
- @use '@carbon/styles/scss/theme' as *;
1
+ @use '@carbon/styles/scss/theme';
2
+ @use '../globals';
3
+ @use '../transition';
2
4
 
3
- .#{$prefix}--#{$charts-prefix}--chart-wrapper .#{$prefix}--#{$charts-prefix}--tree {
5
+ .#{globals.$prefix}--#{globals.$charts-prefix}--chart-wrapper .#{globals.$prefix}--#{globals.$charts-prefix}--tree {
4
6
  g.links {
5
7
  fill: none;
6
- stroke: $border-strong-01;
8
+ stroke: theme.$border-strong-01;
7
9
  stroke-opacity: 0.4;
8
10
  stroke-width: 1.5;
9
11
  }
@@ -19,27 +21,27 @@
19
21
  }
20
22
 
21
23
  circle {
22
- fill: $text-primary;
23
- @include default_transition;
24
+ fill: theme.$text-primary;
25
+ @include transition.default_transition;
24
26
  }
25
27
  }
26
28
  }
27
29
 
28
30
  circle {
29
31
  &.parent {
30
- fill: $text-secondary;
32
+ fill: theme.$text-secondary;
31
33
  }
32
34
 
33
35
  &.child {
34
- fill: $border-strong-01;
36
+ fill: theme.$border-strong-01;
35
37
  }
36
38
  }
37
39
 
38
40
  text {
39
- fill: $text-primary;
41
+ fill: theme.$text-primary;
40
42
 
41
43
  &.text-stroke {
42
- stroke: $text-inverse;
44
+ stroke: theme.$text-inverse;
43
45
  stroke-width: 2px;
44
46
  }
45
47
  }
@@ -1,4 +1,6 @@
1
- .#{$prefix}--#{$charts-prefix}--treemap {
1
+ @use '../globals';
2
+
3
+ .#{globals.$prefix}--#{globals.$charts-prefix}--treemap {
2
4
  text {
3
5
  pointer-events: none;
4
6
  }
@@ -1,4 +1,6 @@
1
- .#{$prefix}--#{$charts-prefix}--wordcloud {
1
+ @use '../globals';
2
+
3
+ .#{globals.$prefix}--#{globals.$charts-prefix}--wordcloud {
2
4
  text.word {
3
5
  &.light {
4
6
  // TODO-V11
@@ -1,19 +1,19 @@
1
- @import './area';
2
- @import './bubble';
3
- @import './bullet';
4
- @import './donut';
5
- @import './line';
6
- @import './scatter';
7
- @import './meter';
8
- @import './scatter-stacked';
9
- @import './radar';
10
- @import './tree';
11
- @import './treemap';
12
- @import './gauge';
13
- @import './pie';
14
- @import './lollipop';
15
- @import './circle-pack';
16
- @import './wordcloud';
17
- @import './alluvial';
18
- @import './heatmap';
19
- @import './choropleth';
1
+ @use 'alluvial';
2
+ @use 'area';
3
+ @use 'bubble';
4
+ @use 'bullet';
5
+ @use 'choropleth';
6
+ @use 'circle-pack';
7
+ @use 'donut';
8
+ @use 'gauge';
9
+ @use 'heatmap';
10
+ @use 'line';
11
+ @use 'lollipop';
12
+ @use 'meter';
13
+ @use 'pie';
14
+ @use 'radar';
15
+ @use 'scatter';
16
+ @use 'scatter-stacked';
17
+ @use 'tree';
18
+ @use 'treemap';
19
+ @use 'wordcloud';
package/scss/index.scss CHANGED
@@ -1,31 +1,10 @@
1
- $charts-prefix: 'cc';
2
-
3
- // Variables picked up by @carbon/styles/scss/config in imports
4
- $prefix: 'cds'; // Default value
5
- $css--body: false; // Do not emit styles for body element
6
- $css--default-type: false; // Do not include default type
7
- $css--font-face: false; // Do not include font face mixins from scss/fonts
8
- $css--reset: false; // Do not include reset CSS
9
-
10
- // Custom charting tokens
11
- @use '@carbon/styles/scss/theme' as theme;
12
- @import 'tokens';
13
- @include theme.add-component-tokens($custom-charting-tokens);
14
- @import '@carbon/styles/scss/components/button/tokens';
15
-
16
- @mixin default_transition { // used by ./colors
17
- transition: all 0.1s ease-out;
18
- }
19
- @import '@carbon/colors';
20
- @import 'colors'; // mixins, color palette, color maps, tooltip and legend color settings
21
-
22
- @import '@carbon/import-once/scss'; // exports mixin
23
- @import 'components'; // use exports mixin to ensure component modules only loaded once
24
-
25
- @import 'graphs'; // chart-specific
26
- @import 'type'; // font size, fill, color, weight (but not family)
27
- @import 'chart-holder'; // container settings
28
-
29
- .#{$prefix}--#{$charts-prefix}--chart-wrapper {
30
- overflow: visible;
31
- }
1
+ @use 'colors';
2
+ @use 'tokens';
3
+ @use 'components';
4
+ @use 'graphs';
5
+ @use 'type';
6
+ @use 'chart-holder';
7
+ @use 'chart-wrapper';
8
+
9
+ @use '@carbon/styles/scss/theme';
10
+ @include theme.add-component-tokens(tokens.$custom-charting-tokens);