@carbon/charts 1.11.20 → 1.12.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 (76) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +3 -3
  3. package/dist/choropleth-17b85d55.mjs.map +1 -1
  4. package/dist/color-scale-utils-faf67b75.mjs.map +1 -1
  5. package/dist/configuration-non-customizable.d.ts +1 -1
  6. package/dist/demo/index.mjs +239 -255
  7. package/dist/demo/index.mjs.map +1 -1
  8. package/dist/demo/styles.css +4499 -692
  9. package/dist/demo/styles.css.map +1 -1
  10. package/dist/demo/utils/package-versions.d.ts +0 -2
  11. package/dist/styles.css +4249 -781
  12. package/dist/styles.css.map +1 -1
  13. package/dist/styles.min.css +1 -1
  14. package/dist/styles.min.css.map +1 -1
  15. package/dist/umd/bundle.umd.js +13 -13
  16. package/dist/umd/bundle.umd.js.map +1 -1
  17. package/package.json +24 -23
  18. package/scss/_chart-holder.scss +18 -17
  19. package/scss/_chart-wrapper.scss +6 -0
  20. package/scss/_color-palette.scss +2 -2
  21. package/scss/_colors.scss +26 -25
  22. package/scss/_globals.scss +8 -0
  23. package/scss/_tokens.scss +50 -50
  24. package/scss/_transition.scss +4 -0
  25. package/scss/_type.scss +14 -14
  26. package/scss/components/_axis.scss +12 -11
  27. package/scss/components/_callouts.scss +4 -3
  28. package/scss/components/_color-legend.scss +4 -4
  29. package/scss/components/_grid-brush.scss +7 -5
  30. package/scss/components/_grid.scss +9 -8
  31. package/scss/components/_highlights.scss +6 -3
  32. package/scss/components/_layout.scss +5 -3
  33. package/scss/components/_legend.scss +14 -11
  34. package/scss/components/_meter-title.scss +11 -9
  35. package/scss/components/_modal.scss +14 -11
  36. package/scss/components/_ruler.scss +6 -3
  37. package/scss/components/_skeleton-lines.scss +9 -6
  38. package/scss/components/_skeleton.scss +9 -6
  39. package/scss/components/_threshold.scss +12 -11
  40. package/scss/components/_title.scss +5 -5
  41. package/scss/components/_toolbar.scss +6 -6
  42. package/scss/components/_tooltip.scss +12 -11
  43. package/scss/components/_zero-line.scss +4 -3
  44. package/scss/components/_zoom-bar.scss +16 -14
  45. package/scss/components/diagrams/_card-node.scss +74 -74
  46. package/scss/components/diagrams/_edge.scss +46 -49
  47. package/scss/components/diagrams/_marker.scss +4 -5
  48. package/scss/components/diagrams/_shape-node.scss +72 -73
  49. package/scss/components/diagrams/index.scss +4 -4
  50. package/scss/components/index.scss +20 -20
  51. package/scss/demos.scss +1 -0
  52. package/scss/graphs/_alluvial.scss +7 -6
  53. package/scss/graphs/_area.scss +4 -2
  54. package/scss/graphs/_bubble.scss +6 -5
  55. package/scss/graphs/_bullet.scss +11 -13
  56. package/scss/graphs/_choropleth.scss +7 -7
  57. package/scss/graphs/_circle-pack.scss +7 -6
  58. package/scss/graphs/_donut.scss +3 -1
  59. package/scss/graphs/_gauge.scss +7 -6
  60. package/scss/graphs/_heatmap.scss +6 -6
  61. package/scss/graphs/_line.scss +6 -4
  62. package/scss/graphs/_lollipop.scss +3 -1
  63. package/scss/graphs/_meter.scss +11 -10
  64. package/scss/graphs/_pie.scss +3 -1
  65. package/scss/graphs/_radar.scss +6 -5
  66. package/scss/graphs/_scatter-stacked.scss +4 -3
  67. package/scss/graphs/_scatter.scss +6 -5
  68. package/scss/graphs/_tree.scss +11 -9
  69. package/scss/graphs/_treemap.scss +3 -1
  70. package/scss/graphs/_wordcloud.scss +3 -1
  71. package/scss/graphs/index.scss +19 -19
  72. package/scss/index.scss +10 -31
  73. package/styles.css +4249 -781
  74. package/styles.min.css +1 -1
  75. package/scss/components/_edge.scss +0 -65
  76. package/scss/components/_marker.scss +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon/charts",
3
- "version": "1.11.20",
3
+ "version": "1.12.0",
4
4
  "description": "Carbon Charts component library",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/umd/bundle.umd.js",
@@ -81,7 +81,7 @@
81
81
  "@carbon/colors": "^11.19.0",
82
82
  "@carbon/telemetry": "~0.1.0",
83
83
  "@carbon/utils-position": "^1.1.4",
84
- "carbon-components": "^10.58.8",
84
+ "carbon-components": "^10.58.10",
85
85
  "d3": "^7.8.5",
86
86
  "d3-cloud": "^1.2.7",
87
87
  "d3-sankey": "^0.12.3",
@@ -89,7 +89,7 @@
89
89
  "html-to-image": "^1.11.11",
90
90
  "lodash-es": "^4.17.21",
91
91
  "topojson-client": "^3.1.0",
92
- "tslib": "^2.6.1"
92
+ "tslib": "^2.6.2"
93
93
  },
94
94
  "peerDependencies": {
95
95
  "d3": "^7.0.0",
@@ -107,43 +107,44 @@
107
107
  "devDependencies": {
108
108
  "@babel/core": "^7.22.10",
109
109
  "@carbon/import-once": "^10.7.0",
110
- "@carbon/layout": "^11.18.0",
111
- "@carbon/styles": "^1.35.0",
112
- "@carbon/themes": "^11.23.0",
110
+ "@carbon/layout": "^11.19.0",
111
+ "@carbon/styles": "^1.36.0",
112
+ "@carbon/themes": "^11.24.0",
113
+ "@rollup/plugin-replace": "^5.0.2",
113
114
  "@rushstack/eslint-patch": "^1.3.3",
114
115
  "@stackblitz/sdk": "^1.9.0",
115
- "@storybook/addon-essentials": "^7.2.2",
116
- "@storybook/addon-interactions": "^7.2.2",
117
- "@storybook/addon-links": "^7.2.2",
118
- "@storybook/blocks": "^7.2.2",
119
- "@storybook/html": "^7.2.2",
120
- "@storybook/html-vite": "^7.2.2",
121
- "@storybook/manager-api": "^7.2.2",
116
+ "@storybook/addon-essentials": "^7.3.2",
117
+ "@storybook/addon-interactions": "^7.3.2",
118
+ "@storybook/addon-links": "^7.3.2",
119
+ "@storybook/blocks": "^7.3.2",
120
+ "@storybook/html": "^7.3.2",
121
+ "@storybook/html-vite": "^7.3.2",
122
+ "@storybook/manager-api": "^7.3.2",
122
123
  "@storybook/testing-library": "^0.2.0",
123
- "@storybook/theming": "^7.2.2",
124
+ "@storybook/theming": "^7.3.2",
124
125
  "@types/d3": "^7.4.0",
125
126
  "@types/d3-cloud": "^1.2.5",
126
127
  "@types/d3-sankey": "^0.12.1",
127
128
  "@types/lodash-es": "^4.17.8",
128
129
  "@types/topojson": "^3.2.3",
129
- "@typescript-eslint/eslint-plugin": "^6.3.0",
130
- "@typescript-eslint/parser": "^6.3.0",
131
- "concurrently": "^8.2.0",
130
+ "@typescript-eslint/eslint-plugin": "^6.4.1",
131
+ "@typescript-eslint/parser": "^6.4.1",
132
+ "concurrently": "^8.2.1",
132
133
  "downlevel-dts": "^0.11.0",
133
- "eslint": "^8.46.0",
134
+ "eslint": "^8.47.0",
134
135
  "eslint-config-prettier": "^9.0.0",
135
136
  "eslint-plugin-storybook": "^0.6.13",
136
137
  "jsdom": "^22.1.0",
137
138
  "react": "^18.2.0",
138
139
  "react-dom": "^18.2.0",
139
140
  "resize-observer-polyfill": "^1.5.1",
140
- "sass": "~1.64.2",
141
- "storybook": "^7.2.2",
141
+ "sass": "^1.66.1",
142
+ "storybook": "^7.3.2",
142
143
  "typedoc": "^0.24.8",
143
144
  "typescript": "^5.1.6",
144
145
  "vite": "^4.4.9",
145
- "vite-plugin-dts": "^3.5.1",
146
- "vitest": "^0.34.1"
146
+ "vite-plugin-dts": "^3.5.2",
147
+ "vitest": "^0.34.2"
147
148
  },
148
149
  "publishConfig": {
149
150
  "access": "public"
@@ -192,5 +193,5 @@
192
193
  "url": "https://github.com/theiliad"
193
194
  }
194
195
  ],
195
- "gitHead": "8ad1a690e8e336a268d15750576485ebb54307e5"
196
+ "gitHead": "5ae03ad9e7d7d682ad3220301b46edd35f6e4929"
196
197
  }
@@ -1,7 +1,8 @@
1
- @use '@carbon/styles/scss/theme' as *;
1
+ @use '@carbon/styles/scss/theme';
2
2
  @use '@carbon/styles/scss/themes';
3
+ @use 'globals';
3
4
 
4
- .#{$prefix}--chart-holder {
5
+ .#{globals.$prefix}--chart-holder {
5
6
  position: relative;
6
7
  display: block;
7
8
  width: 100%;
@@ -9,39 +10,39 @@
9
10
 
10
11
  &.filled,
11
12
  &.fullscreen {
12
- background-color: $background;
13
+ background-color: theme.$background;
13
14
 
14
- .#{$prefix}--#{$charts-prefix}--chart-wrapper {
15
- background-color: $background;
15
+ .#{globals.$prefix}--#{globals.$charts-prefix}--chart-wrapper {
16
+ background-color: theme.$background;
16
17
  }
17
18
  }
18
19
 
20
+ // May not be needed any longer
19
21
  .DONT_STYLE_ME_css_styles_verifier {
20
22
  overflow: hidden;
21
23
  opacity: 0;
22
24
  }
23
25
  }
24
26
 
25
- .#{$prefix}--chart-holder {
26
- @include theme(themes.$white);
27
+ .#{globals.$prefix}--chart-holder {
28
+ @include theme.theme(themes.$white);
27
29
  }
28
30
 
29
- .#{$prefix}--chart-holder[data-carbon-theme='g10'] {
30
- @include theme(themes.$g10);
31
+ .#{globals.$prefix}--chart-holder[data-carbon-theme='g10'] {
32
+ @include theme.theme(themes.$g10);
31
33
  }
32
34
 
33
- .#{$prefix}--chart-holder[data-carbon-theme='g90'] {
34
- @include theme(themes.$g90);
35
+ .#{globals.$prefix}--chart-holder[data-carbon-theme='g90'] {
36
+ @include theme.theme(themes.$g90);
35
37
  }
36
38
 
37
- .#{$prefix}--chart-holder[data-carbon-theme='g100'] {
38
- @include theme(themes.$g100);
39
+ .#{globals.$prefix}--chart-holder[data-carbon-theme='g100'] {
40
+ @include theme.theme(themes.$g100);
39
41
  }
40
42
 
41
- .#{$prefix}--chart-holder.fullscreen,
42
- .#{$prefix}--chart-holder:-webkit-full-screen {
43
- /* !important is used here to get closer to
44
- a truly fullscreen experience */
43
+ .#{globals.$prefix}--chart-holder.fullscreen,
44
+ .#{globals.$prefix}--chart-holder:-webkit-full-screen {
45
+ // important used to ensure full-screen experience
45
46
  width: 100% !important;
46
47
  height: 100% !important;
47
48
  max-width: unset !important;
@@ -0,0 +1,6 @@
1
+ @use 'globals';
2
+
3
+ .#{globals.$prefix}--#{globals.$charts-prefix}--chart-wrapper {
4
+ overflow: visible;
5
+ font-family: var(--#{globals.$prefix}-charts-font-family-condensed);
6
+ }
@@ -1,8 +1,8 @@
1
1
  @use 'sass:map';
2
- @use '@carbon/styles/scss/colors';
2
+ @use '@carbon/colors';
3
3
 
4
4
  @function getColorValue($color, $scale) {
5
- @return map.get($colors, $color, $scale);
5
+ @return map.get(colors.$colors, $color, $scale);
6
6
  }
7
7
 
8
8
  $white-theme-colors: (
package/scss/_colors.scss CHANGED
@@ -1,10 +1,11 @@
1
1
  @use 'sass:color';
2
2
  @use 'sass:map';
3
3
 
4
- @use '@carbon/styles/scss/themes';
5
- @use '@carbon/styles/scss/theme' as *;
6
-
7
- @import 'color-palette';
4
+ // Prefix of these used below for traceability
5
+ @use 'globals';
6
+ @use 'transition';
7
+ @use 'tokens';
8
+ @use 'color-palette' as palette;
8
9
 
9
10
  @function generateCSSCustomProperty($token, $fallback) {
10
11
  @return var(--cds-charts-#{$token}, $fallback);
@@ -12,15 +13,15 @@
12
13
 
13
14
  @function getThemeColors($theme_type) {
14
15
  @if $theme_type == 'dark' {
15
- @return color-property(null, $dark-theme-colors);
16
+ @return color-property(null, palette.$dark-theme-colors);
16
17
  } @else {
17
- @return color-property(null, $white-theme-colors);
18
+ @return color-property(null, palette.$white-theme-colors);
18
19
  }
19
20
  }
20
21
 
21
22
  @function getGradientColors() {
22
- $monochrome: color-property(null, $monochrome-quantize-colors);
23
- $divergent: color-property(null, $divergent-quantize-colors);
23
+ $monochrome: color-property(null, palette.$monochrome-quantize-colors);
24
+ $divergent: color-property(null, palette.$divergent-quantize-colors);
24
25
 
25
26
  @return map-merge($monochrome, $divergent);
26
27
  }
@@ -43,7 +44,7 @@
43
44
  }
44
45
 
45
46
  $color-map-light: map-merge(getThemeColors('light'), getGradientColors());
46
- .#{$prefix}--chart-holder {
47
+ .#{globals.$prefix}--chart-holder {
47
48
  @each $token, $color in $color-map-light {
48
49
  --cds-charts-#{$token}: #{$color};
49
50
  --cds-charts-#{$token}-hovered: #{darken($color, 7%)};
@@ -51,8 +52,8 @@ $color-map-light: map-merge(getThemeColors('light'), getGradientColors());
51
52
  }
52
53
 
53
54
  $color-map-dark: map-merge(getThemeColors('dark'), getGradientColors());
54
- .#{$prefix}--chart-holder[data-carbon-theme='g90'],
55
- .#{$prefix}--chart-holder[data-carbon-theme='g100'] {
55
+ .#{globals.$prefix}--chart-holder[data-carbon-theme='g90'],
56
+ .#{globals.$prefix}--chart-holder[data-carbon-theme='g100'] {
56
57
  @each $token, $color in $color-map-dark {
57
58
  --cds-charts-#{$token}: #{$color};
58
59
  --cds-charts-#{$token}-hovered: #{darken($color, 7%)};
@@ -60,14 +61,14 @@ $color-map-dark: map-merge(getThemeColors('dark'), getGradientColors());
60
61
  }
61
62
 
62
63
  $color-map: map-merge(getThemeColors('light'), getGradientColors());
63
- .#{$prefix}--#{$charts-prefix}--chart-wrapper {
64
+ .#{globals.$prefix}--#{globals.$charts-prefix}--chart-wrapper {
64
65
  @each $token, $color in $color-map {
65
66
  .fill-#{$token} {
66
67
  fill: generateCSSCustomProperty($token, $color);
67
68
 
68
69
  &.hovered {
69
70
  fill: generateCSSCustomProperty(#{$token}-hovered, $color);
70
- @include default_transition;
71
+ @include transition.default_transition;
71
72
  }
72
73
  }
73
74
 
@@ -76,7 +77,7 @@ $color-map: map-merge(getThemeColors('light'), getGradientColors());
76
77
 
77
78
  &.hovered {
78
79
  background-color: generateCSSCustomProperty(#{$token}-hovered, $color);
79
- @include default_transition;
80
+ @include transition.default_transition;
80
81
  }
81
82
  }
82
83
 
@@ -90,7 +91,7 @@ $color-map: map-merge(getThemeColors('light'), getGradientColors());
90
91
  }
91
92
  }
92
93
 
93
- .#{$prefix}--#{$charts-prefix}--tooltip {
94
+ .#{globals.$prefix}--#{globals.$charts-prefix}--tooltip {
94
95
  $color-map: getThemeColors('light');
95
96
 
96
97
  @each $token, $color in $color-map {
@@ -100,31 +101,31 @@ $color-map: map-merge(getThemeColors('light'), getGradientColors());
100
101
  }
101
102
  }
102
103
 
103
- .#{$prefix}--#{$charts-prefix}--legend {
104
+ .#{globals.$prefix}--#{globals.$charts-prefix}--legend {
104
105
  .additional > .icon {
105
106
  .area-1 {
106
- fill: $zone-fill-01;
107
- stroke: $zone-stroke-01;
107
+ fill: tokens.$zone-fill-01;
108
+ stroke: tokens.$zone-stroke-01;
108
109
  }
109
110
 
110
111
  .area-2 {
111
- fill: $zone-fill-02;
112
- stroke: $zone-stroke-02;
112
+ fill: tokens.$zone-fill-02;
113
+ stroke: tokens.$zone-stroke-02;
113
114
  }
114
115
 
115
116
  .area-3 {
116
- fill: $zone-fill-03;
117
- stroke: $zone-stroke-03;
117
+ fill: tokens.$zone-fill-03;
118
+ stroke: tokens.$zone-stroke-03;
118
119
  }
119
120
 
120
121
  .quartile {
121
122
  &-wrapper {
122
- fill: $zone-fill-02;
123
- stroke: $zone-stroke-01;
123
+ fill: tokens.$zone-fill-02;
124
+ stroke: tokens.$zone-stroke-01;
124
125
  }
125
126
 
126
127
  &-line {
127
- fill: $layer-inverse-absolute;
128
+ fill: tokens.$layer-inverse-absolute;
128
129
  }
129
130
  }
130
131
  }
@@ -0,0 +1,8 @@
1
+ @use '@carbon/type/scss/font-family' as font;
2
+ $prefix: 'cds'; // Carbon Design System
3
+ $charts-prefix: 'cc'; // Carbon Charts
4
+
5
+ // Sets CSS custom property associated with chart wrapper,
6
+ // tooltips and the Tabular representation in the modal
7
+ $font-family: font.font-family('sans');
8
+ $font-family-condensed: font.font-family('sans-condensed');
package/scss/_tokens.scss CHANGED
@@ -1,7 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '@carbon/styles/scss/themes';
3
+ @use '@carbon/colors';
3
4
  @use '@carbon/styles/scss/utilities/component-tokens';
4
- @use '@carbon/colors' as *;
5
5
 
6
6
  // THEMES
7
7
  $color-scheme: (
@@ -28,15 +28,15 @@ $color-scheme: (
28
28
 
29
29
  // ELEMENTS
30
30
  $alert-stroke: (
31
- fallback: $yellow-50,
31
+ fallback: colors.$yellow-50,
32
32
  values: (
33
33
  (
34
34
  theme: themes.$white,
35
- value: $yellow-50
35
+ value: colors.$yellow-50
36
36
  ),
37
37
  (
38
38
  theme: themes.$g10,
39
- value: $yellow-50
39
+ value: colors.$yellow-50
40
40
  ),
41
41
  (
42
42
  theme: themes.$g90,
@@ -50,45 +50,45 @@ $alert-stroke: (
50
50
  ) !default;
51
51
 
52
52
  $layer-01-absolute: (
53
- fallback: $white-0,
53
+ fallback: colors.$white-0,
54
54
  values: (
55
55
  (
56
56
  theme: themes.$white,
57
- value: $white-0
57
+ value: colors.$white-0
58
58
  ),
59
59
  (
60
60
  theme: themes.$g10,
61
- value: $white-0
61
+ value: colors.$white-0
62
62
  ),
63
63
  (
64
64
  theme: themes.$g90,
65
- value: $black-100
65
+ value: colors.$black-100
66
66
  ),
67
67
  (
68
68
  theme: themes.$g100,
69
- value: $black-100
69
+ value: colors.$black-100
70
70
  )
71
71
  )
72
72
  ) !default;
73
73
 
74
74
  $layer-inverse-absolute: (
75
- fallback: $black-100,
75
+ fallback: colors.$black-100,
76
76
  values: (
77
77
  (
78
78
  theme: themes.$white,
79
- value: $black-100
79
+ value: colors.$black-100
80
80
  ),
81
81
  (
82
82
  theme: themes.$g10,
83
- value: $black-100
83
+ value: colors.$black-100
84
84
  ),
85
85
  (
86
86
  theme: themes.$g90,
87
- value: $white-0
87
+ value: colors.$white-0
88
88
  ),
89
89
  (
90
90
  theme: themes.$g100,
91
- value: $white-0
91
+ value: colors.$white-0
92
92
  )
93
93
  )
94
94
  ) !default;
@@ -129,7 +129,7 @@ $grid-bg: (
129
129
  ),
130
130
  (
131
131
  theme: themes.$g90,
132
- value: $gray-100
132
+ value: colors.$gray-100
133
133
  ),
134
134
  (
135
135
  theme: themes.$g100,
@@ -140,23 +140,23 @@ $grid-bg: (
140
140
 
141
141
  // METER
142
142
  $meter-range-indicator: (
143
- fallback: $gray-40,
143
+ fallback: colors.$gray-40,
144
144
  values: (
145
145
  (
146
146
  theme: themes.$white,
147
- value: $gray-40
147
+ value: colors.$gray-40
148
148
  ),
149
149
  (
150
150
  theme: themes.$g10,
151
- value: $gray-40
151
+ value: colors.$gray-40
152
152
  ),
153
153
  (
154
154
  theme: themes.$g90,
155
- value: $gray-60
155
+ value: colors.$gray-60
156
156
  ),
157
157
  (
158
158
  theme: themes.$g100,
159
- value: $gray-60
159
+ value: colors.$gray-60
160
160
  )
161
161
  )
162
162
  ) !default;
@@ -209,130 +209,130 @@ $tooltip-line-border: (
209
209
 
210
210
  // ZONES
211
211
  $zone-fill-01: (
212
- fallback: $gray-10,
212
+ fallback: colors.$gray-10,
213
213
  values: (
214
214
  (
215
215
  theme: themes.$white,
216
- value: $gray-10
216
+ value: colors.$gray-10
217
217
  ),
218
218
  (
219
219
  theme: themes.$g10,
220
- value: $gray-10
220
+ value: colors.$gray-10
221
221
  ),
222
222
  (
223
223
  theme: themes.$g90,
224
- value: $gray-90
224
+ value: colors.$gray-90
225
225
  ),
226
226
  (
227
227
  theme: themes.$g100,
228
- value: $gray-90
228
+ value: colors.$gray-90
229
229
  )
230
230
  )
231
231
  ) !default;
232
232
  $zone-stroke-01: (
233
- fallback: $gray-50,
233
+ fallback: colors.$gray-50,
234
234
  values: (
235
235
  (
236
236
  theme: themes.$white,
237
- value: $gray-50
237
+ value: colors.$gray-50
238
238
  ),
239
239
  (
240
240
  theme: themes.$g10,
241
- value: $gray-50
241
+ value: colors.$gray-50
242
242
  ),
243
243
  (
244
244
  theme: themes.$g90,
245
- value: $gray-60
245
+ value: colors.$gray-60
246
246
  ),
247
247
  (
248
248
  theme: themes.$g100,
249
- value: $gray-60
249
+ value: colors.$gray-60
250
250
  )
251
251
  )
252
252
  ) !default;
253
253
 
254
254
  $zone-fill-02: (
255
- fallback: $gray-20,
255
+ fallback: colors.$gray-20,
256
256
  values: (
257
257
  (
258
258
  theme: themes.$white,
259
- value: $gray-20
259
+ value: colors.$gray-20
260
260
  ),
261
261
  (
262
262
  theme: themes.$g10,
263
- value: $gray-20
263
+ value: colors.$gray-20
264
264
  ),
265
265
  (
266
266
  theme: themes.$g90,
267
- value: $gray-80
267
+ value: colors.$gray-80
268
268
  ),
269
269
  (
270
270
  theme: themes.$g100,
271
- value: $gray-80
271
+ value: colors.$gray-80
272
272
  )
273
273
  )
274
274
  ) !default;
275
275
  $zone-stroke-02: (
276
- fallback: $gray-50,
276
+ fallback: colors.$gray-50,
277
277
  values: (
278
278
  (
279
279
  theme: themes.$white,
280
- value: $gray-50
280
+ value: colors.$gray-50
281
281
  ),
282
282
  (
283
283
  theme: themes.$g10,
284
- value: $gray-50
284
+ value: colors.$gray-50
285
285
  ),
286
286
  (
287
287
  theme: themes.$g90,
288
- value: $gray-60
288
+ value: colors.$gray-60
289
289
  ),
290
290
  (
291
291
  theme: themes.$g100,
292
- value: $gray-60
292
+ value: colors.$gray-60
293
293
  )
294
294
  )
295
295
  ) !default;
296
296
 
297
297
  $zone-fill-03: (
298
- fallback: $gray-30,
298
+ fallback: colors.$gray-30,
299
299
  values: (
300
300
  (
301
301
  theme: themes.$white,
302
- value: $gray-30
302
+ value: colors.$gray-30
303
303
  ),
304
304
  (
305
305
  theme: themes.$g10,
306
- value: $gray-30
306
+ value: colors.$gray-30
307
307
  ),
308
308
  (
309
309
  theme: themes.$g90,
310
- value: $gray-70
310
+ value: colors.$gray-70
311
311
  ),
312
312
  (
313
313
  theme: themes.$g100,
314
- value: $gray-70
314
+ value: colors.$gray-70
315
315
  )
316
316
  )
317
317
  ) !default;
318
318
  $zone-stroke-03: (
319
- fallback: $gray-50,
319
+ fallback: colors.$gray-50,
320
320
  values: (
321
321
  (
322
322
  theme: themes.$white,
323
- value: $gray-50
323
+ value: colors.$gray-50
324
324
  ),
325
325
  (
326
326
  theme: themes.$g10,
327
- value: $gray-50
327
+ value: colors.$gray-50
328
328
  ),
329
329
  (
330
330
  theme: themes.$g90,
331
- value: $gray-60
331
+ value: colors.$gray-60
332
332
  ),
333
333
  (
334
334
  theme: themes.$g100,
335
- value: $gray-60
335
+ value: colors.$gray-60
336
336
  )
337
337
  )
338
338
  ) !default;
@@ -0,0 +1,4 @@
1
+ // Used by ./colors and ./components/tree
2
+ @mixin default_transition {
3
+ transition: all 0.1s ease-out;
4
+ }
package/scss/_type.scss CHANGED
@@ -1,14 +1,14 @@
1
- @use '@carbon/styles/scss/type' as *;
2
- @use '@carbon/styles/scss/theme' as *;
3
- @use '@carbon/layout' as *;
1
+ @use '@carbon/styles/scss/theme';
2
+ @use '@carbon/layout';
3
+ @use 'globals';
4
4
 
5
- .#{$prefix}--#{$charts-prefix}--chart-wrapper {
6
- // Set CSS custom properties using font-family mixin then reuse them
7
- --#{$prefix}-charts-font-family: #{font-family('sans')};
8
- --#{$prefix}-charts-font-family-condensed: #{font-family('sans-condensed')};
9
-
10
- font-family: var(--#{$prefix}-charts-font-family-condensed);
5
+ .#{globals.$prefix}--chart-holder {
6
+ --#{globals.$prefix}-charts-font-family: #{globals.$font-family};
7
+ --#{globals.$prefix}-charts-font-family-condensed: #{globals.$font-family-condensed};
8
+ font-family: var(--#{globals.$prefix}-charts-font-family);
9
+ }
11
10
 
11
+ .#{globals.$prefix}--#{globals.$charts-prefix}--chart-wrapper {
12
12
  p {
13
13
  padding: 0;
14
14
  margin: 0;
@@ -16,7 +16,7 @@
16
16
  // TODO-V11
17
17
  // font-weight: font-weight('regular');
18
18
  font-weight: 400;
19
- color: $text-secondary;
19
+ color: theme.$text-secondary;
20
20
  }
21
21
 
22
22
  text {
@@ -24,11 +24,11 @@
24
24
  // TODO-V11
25
25
  // font-weight: font-weight('regular');
26
26
  font-weight: 400;
27
- fill: $text-secondary;
27
+ fill: theme.$text-secondary;
28
28
  }
29
29
 
30
30
  g.gauge-numbers text.gauge-value-number {
31
- font-family: var(--#{$prefix}-charts-font-family);
31
+ font-family: var(--#{globals.$prefix}-charts-font-family);
32
32
  // TODO-V11
33
33
  // font-weight: font-weight('light');
34
34
  font-weight: 300;
@@ -36,8 +36,8 @@
36
36
 
37
37
  text.meter-title,
38
38
  text.percent-value {
39
- font-size: $base-font-size;
40
- font-family: var(--#{$prefix}-charts-font-family);
39
+ font-size: layout.$base-font-size;
40
+ font-family: var(--#{globals.$prefix}-charts-font-family);
41
41
  }
42
42
 
43
43
  text.meter-title {