@carbon/charts 1.13.15 → 1.13.18

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 (100) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +9 -4
  3. package/dist/{_baseEach-HUN6tK0-.mjs → _baseEach-L1oeNjGL.mjs} +2 -2
  4. package/dist/{_baseEach-HUN6tK0-.mjs.map → _baseEach-L1oeNjGL.mjs.map} +1 -1
  5. package/dist/{angle-utils-32tpV6-P.mjs → angle-utils-iPPUNSDt.mjs} +4 -12
  6. package/dist/{angle-utils-32tpV6-P.mjs.map → angle-utils-iPPUNSDt.mjs.map} +1 -1
  7. package/dist/{choropleth-cqJq7eSU.mjs → choropleth-bEh4R3-F.mjs} +3227 -2698
  8. package/dist/choropleth-bEh4R3-F.mjs.map +1 -0
  9. package/dist/{color-scale-utils-bwaA2TiF.mjs → color-scale-utils-GLd1MML3.mjs} +2 -2
  10. package/dist/color-scale-utils-GLd1MML3.mjs.map +1 -0
  11. package/dist/components/axes/axis.d.ts +1 -1
  12. package/dist/components/axes/chart-clip.d.ts +1 -1
  13. package/dist/components/axes/grid-brush.d.ts +1 -1
  14. package/dist/components/axes/grid.d.ts +1 -1
  15. package/dist/components/axes/ruler.d.ts +1 -1
  16. package/dist/components/axes/toolbar.d.ts +1 -1
  17. package/dist/components/axes/two-dimensional-axes.d.ts +2 -2
  18. package/dist/components/axes/zero-line.d.ts +1 -1
  19. package/dist/components/axes/zoom-bar.d.ts +1 -1
  20. package/dist/components/essentials/canvas-chart-clip.d.ts +1 -1
  21. package/dist/components/essentials/geo-projection.d.ts +1 -1
  22. package/dist/components/essentials/highlights.d.ts +1 -1
  23. package/dist/components/essentials/legend.d.ts +1 -1
  24. package/dist/components/essentials/modal.d.ts +1 -1
  25. package/dist/components/essentials/threshold.d.ts +1 -1
  26. package/dist/components/essentials/title.d.ts +1 -1
  27. package/dist/components/essentials/tooltip.d.ts +1 -1
  28. package/dist/components/graphs/alluvial.d.ts +1 -1
  29. package/dist/components/graphs/area-stacked.d.ts +1 -1
  30. package/dist/components/graphs/area.d.ts +1 -1
  31. package/dist/components/graphs/bar.d.ts +1 -1
  32. package/dist/components/graphs/boxplot.d.ts +1 -1
  33. package/dist/components/graphs/bullet.d.ts +1 -1
  34. package/dist/components/graphs/choropleth.d.ts +1 -1
  35. package/dist/components/graphs/circle-pack.d.ts +1 -1
  36. package/dist/components/graphs/gauge.d.ts +1 -1
  37. package/dist/components/graphs/heatmap.d.ts +1 -1
  38. package/dist/components/graphs/histogram.d.ts +1 -1
  39. package/dist/components/graphs/line.d.ts +1 -1
  40. package/dist/components/graphs/meter.d.ts +1 -1
  41. package/dist/components/graphs/pie.d.ts +1 -1
  42. package/dist/components/graphs/radar.d.ts +1 -1
  43. package/dist/components/graphs/scatter.d.ts +1 -1
  44. package/dist/components/graphs/skeleton.d.ts +1 -1
  45. package/dist/components/graphs/tree.d.ts +1 -1
  46. package/dist/components/graphs/treemap.d.ts +1 -1
  47. package/dist/components/graphs/wordcloud.d.ts +1 -1
  48. package/dist/components/index.mjs +4 -4
  49. package/dist/components/layout/layout.d.ts +1 -1
  50. package/dist/components/layout/spacer.d.ts +1 -1
  51. package/dist/demo/index.mjs +208 -204
  52. package/dist/demo/index.mjs.map +1 -1
  53. package/dist/demo/styles.css +35 -11
  54. package/dist/demo/styles.css.map +1 -1
  55. package/dist/demo/utils/stackblitz/angular.d.ts +1 -1
  56. package/dist/demo/utils/stackblitz/react.d.ts +1 -1
  57. package/dist/demo/utils/stackblitz/svelte.d.ts +1 -1
  58. package/dist/demo/utils/stackblitz/vanilla-js.d.ts +1 -1
  59. package/dist/demo/utils/stackblitz/vue.d.ts +1 -1
  60. package/dist/demo/utils/story-widgets.d.ts +1 -1
  61. package/dist/enums-tMKLWMMm.mjs.map +1 -1
  62. package/dist/index.mjs +16 -17
  63. package/dist/index.mjs.map +1 -1
  64. package/dist/model/index.mjs +3 -3
  65. package/dist/services/essentials/dom-utils.d.ts +1 -1
  66. package/dist/services/essentials/events.d.ts +1 -1
  67. package/dist/services/essentials/files.d.ts +1 -1
  68. package/dist/services/essentials/gradient-utils.d.ts +1 -1
  69. package/dist/services/essentials/transitions.d.ts +1 -1
  70. package/dist/services/index.mjs +3 -3
  71. package/dist/styles.css +35 -11
  72. package/dist/styles.css.map +1 -1
  73. package/dist/styles.min.css +1 -1
  74. package/dist/styles.min.css.map +1 -1
  75. package/dist/umd/bundle.umd.js +85 -0
  76. package/dist/umd/bundle.umd.js.map +1 -0
  77. package/dist/utils/sanitizeHtml.d.ts +3 -0
  78. package/dist/{wordcloud-dqk1DqiP.mjs → wordcloud-XkAQGXwu.mjs} +80 -79
  79. package/dist/wordcloud-XkAQGXwu.mjs.map +1 -0
  80. package/dist/{zoom-OcSt8txb.mjs → zoom-nkwOD6_z.mjs} +6 -4
  81. package/dist/zoom-nkwOD6_z.mjs.map +1 -0
  82. package/package.json +10 -8
  83. package/scss/_chart-wrapper.scss +1 -1
  84. package/scss/_color-palette.scss +8 -8
  85. package/scss/components/_title.scss +1 -1
  86. package/scss/components/_tooltip.scss +6 -2
  87. package/scss/components/toolbar/_buttons.scss +160 -159
  88. package/scss/components/toolbar/_modal.scss +348 -315
  89. package/scss/demos.scss +3 -2
  90. package/scss/graphs/_choropleth.scss +1 -1
  91. package/scss/graphs/_tree.scss +2 -1
  92. package/scss/index.scss +1 -1
  93. package/styles.css +35 -11
  94. package/styles.min.css +1 -1
  95. package/dist/choropleth-cqJq7eSU.mjs.map +0 -1
  96. package/dist/color-scale-utils-bwaA2TiF.mjs.map +0 -1
  97. package/dist/umd/bundle.umd.cjs +0 -84
  98. package/dist/umd/bundle.umd.cjs.map +0 -1
  99. package/dist/wordcloud-dqk1DqiP.mjs.map +0 -1
  100. package/dist/zoom-OcSt8txb.mjs.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon/charts",
3
- "version": "1.13.15",
3
+ "version": "1.13.18",
4
4
  "description": "Carbon Charts component library",
5
5
  "type": "module",
6
6
  "module": "./dist/index.mjs",
@@ -76,7 +76,7 @@
76
76
  "repository": {
77
77
  "type": "git",
78
78
  "url": "git@github.com:carbon-design-system/carbon-charts.git",
79
- "homepage": "https://carbon-design-system.github.io/carbon-charts/"
79
+ "homepage": "https://charts.carbondesignsystem.com/"
80
80
  },
81
81
  "dependencies": {
82
82
  "@carbon/colors": "^11.20.1",
@@ -87,6 +87,7 @@
87
87
  "d3-cloud": "^1.2.7",
88
88
  "d3-sankey": "^0.12.3",
89
89
  "date-fns": "^3.0.6",
90
+ "dompurify": "^3.0.6",
90
91
  "html-to-image": "^1.11.11",
91
92
  "lodash-es": "^4.17.21",
92
93
  "topojson-client": "^3.1.0",
@@ -115,19 +116,20 @@
115
116
  "@types/d3": "^7.4.3",
116
117
  "@types/d3-cloud": "^1.2.9",
117
118
  "@types/d3-sankey": "^0.12.4",
119
+ "@types/dompurify": "^3.0.5",
118
120
  "@types/lodash-es": "^4.17.12",
119
121
  "@types/topojson": "^3.2.6",
120
122
  "concurrently": "^8.2.2",
121
123
  "downlevel-dts": "^0.11.0",
122
124
  "jsdom": "^23.0.1",
123
125
  "resize-observer-polyfill": "^1.5.1",
124
- "sass": "^1.69.5",
125
- "storybook": "~7.6.6",
126
- "typedoc": "^0.25.4",
126
+ "sass": "^1.69.7",
127
+ "storybook": "~7.6.7",
128
+ "typedoc": "^0.25.6",
127
129
  "typescript": "^5.3.3",
128
130
  "vite": "^5.0.10",
129
- "vite-plugin-dts": "^3.6.4",
130
- "vitest": "^1.1.0"
131
+ "vite-plugin-dts": "^3.7.0",
132
+ "vitest": "^1.1.1"
131
133
  },
132
134
  "publishConfig": {
133
135
  "access": "public"
@@ -176,5 +178,5 @@
176
178
  "url": "https://github.com/theiliad"
177
179
  }
178
180
  ],
179
- "gitHead": "3e24b920093adbc60bd41ae893bd56a8f81efed2"
181
+ "gitHead": "bc5da5e95247793f1e70459161ca713c5aebc1d6"
180
182
  }
@@ -3,4 +3,4 @@
3
3
  .#{globals.$prefix}--#{globals.$charts-prefix}--chart-wrapper {
4
4
  overflow: visible;
5
5
  font-family: var(--#{globals.$prefix}-charts-font-family-condensed);
6
- }
6
+ }
@@ -332,7 +332,7 @@ $dark-monochrome-quantize-colors: (
332
332
  '8': getColorValue(purple, 30),
333
333
  '9': getColorValue(purple, 20),
334
334
  '10': getColorValue(purple, 10),
335
- '11': #ffffff,
335
+ '11': #ffffff
336
336
  ),
337
337
  'mono-2': (
338
338
  '1': getColorValue(blue, 100),
@@ -345,7 +345,7 @@ $dark-monochrome-quantize-colors: (
345
345
  '8': getColorValue(blue, 30),
346
346
  '9': getColorValue(blue, 20),
347
347
  '10': getColorValue(blue, 10),
348
- '11': #ffffff,
348
+ '11': #ffffff
349
349
  ),
350
350
  'mono-3': (
351
351
  '1': getColorValue(cyan, 100),
@@ -358,7 +358,7 @@ $dark-monochrome-quantize-colors: (
358
358
  '8': getColorValue(cyan, 30),
359
359
  '9': getColorValue(cyan, 20),
360
360
  '10': getColorValue(cyan, 10),
361
- '11': #ffffff,
361
+ '11': #ffffff
362
362
  ),
363
363
  'mono-4': (
364
364
  '1': getColorValue(teal, 100),
@@ -371,8 +371,8 @@ $dark-monochrome-quantize-colors: (
371
371
  '8': getColorValue(teal, 30),
372
372
  '9': getColorValue(teal, 20),
373
373
  '10': getColorValue(teal, 10),
374
- '11': #ffffff,
375
- ),
374
+ '11': #ffffff
375
+ )
376
376
  );
377
377
 
378
378
  $divergent-quantize-colors: (
@@ -434,7 +434,7 @@ $dark-divergent-quantize-colors: (
434
434
  '14': getColorValue(cyan, 40),
435
435
  '15': getColorValue(cyan, 30),
436
436
  '16': getColorValue(cyan, 20),
437
- '17': getColorValue(cyan, 10),
437
+ '17': getColorValue(cyan, 10)
438
438
  ),
439
439
  'diverge-2': (
440
440
  '1': getColorValue(purple, 10),
@@ -453,6 +453,6 @@ $dark-divergent-quantize-colors: (
453
453
  '14': getColorValue(teal, 40),
454
454
  '15': getColorValue(teal, 30),
455
455
  '16': getColorValue(teal, 20),
456
- '17': getColorValue(teal, 10),
457
- ),
456
+ '17': getColorValue(teal, 10)
457
+ )
458
458
  );
@@ -21,4 +21,4 @@
21
21
  height: unset !important;
22
22
  overflow: hidden;
23
23
  }
24
- }
24
+ }
@@ -14,12 +14,16 @@
14
14
  word-wrap: break-word;
15
15
  z-index: 1059;
16
16
  font-family: var(--#{globals.$prefix}-charts-font-family-condensed);
17
- transition: visibility 0s linear 0.1s, opacity 0.1s;
17
+ transition:
18
+ visibility 0s linear 0.1s,
19
+ opacity 0.1s;
18
20
 
19
21
  &.hidden {
20
22
  opacity: 0;
21
23
  visibility: hidden;
22
- transition: visibility 0s linear 0s, opacity 0.1s;
24
+ transition:
25
+ visibility 0s linear 0s,
26
+ opacity 0.1s;
23
27
  @include motion.motion(standard, expressive);
24
28
  }
25
29
 
@@ -1,162 +1,163 @@
1
1
  @use '../../globals';
2
2
 
3
3
  .#{globals.$prefix}--chart-holder {
4
-
5
- .#{globals.$prefix}--#{globals.$charts-prefix}--toolbar {
6
-
7
- display: flex;
8
-
9
- .#{globals.$prefix}--overflow-menu-options {
10
- box-sizing: border-box;
11
- padding: 0;
12
- border: 0;
13
- margin: 0;
14
- font-family: inherit;
15
- font-size: 100%;
16
- vertical-align: baseline;
17
- box-shadow: 0 2px 6px var(--#{globals.$prefix}-shadow, rgba(0, 0, 0, .3));
18
- position: absolute;
19
- z-index: 6000;
20
- display: none;
21
- background-color: var(--#{globals.$prefix}-layer);
22
- width: 10rem;
23
- flex-direction: column;
24
- align-items: flex-start;
25
- top: 32px;
26
- inset-inline-start: 0;
27
- list-style: none;
28
-
29
- *,
30
- ::before,
31
- ::after {
32
- box-sizing: inherit;
33
- }
34
-
35
- .#{globals.$prefix}--overflow-menu-options__option {
36
- &:hover {
37
- background-color: var(--#{globals.$prefix}-layer-hover);
38
- }
39
-
40
- box-sizing: border-box;
41
- border: 0;
42
- margin: 0;
43
- font-family: inherit;
44
- font-size: 100%;
45
- vertical-align: baseline;
46
- display: flex;
47
- align-items: center;
48
- padding: 0;
49
- background-color: transparent;
50
- block-size: 2.5rem;
51
- inline-size: 100%;
52
- transition: background-color .11s cubic-bezier(0,0,.38,.9);
53
-
54
- .#{globals.$prefix}--overflow-menu-options__btn {
55
- &:focus {
56
- outline: 2px solid var(--cds-focus,#0f62fe);
57
- outline-offset: -2px;
58
- }
59
-
60
- font-size: var(--#{globals.$prefix}-body-compact-01-font-size, .875rem);
61
- font-weight: var(--#{globals.$prefix}-body-compact-01-font-weight, 400);
62
- line-height: var(--#{globals.$prefix}-body-compact-01-line-height, 1.28572);
63
- letter-spacing: var(--#{globals.$prefix}-body-compact-01-letter-spacing, .16px);
64
- outline: 2px solid transparent;
65
- outline-offset: -2px;
66
- display: inline-flex;
67
- align-items: center;
68
- padding: 0 1rem;
69
- border: none;
70
- background-color: transparent;
71
- block-size: 100%;
72
- color: var(--#{globals.$prefix}-text-secondary, #525252);
73
- cursor: pointer;
74
- font-family: inherit;
75
- font-weight: 400;
76
- inline-size: 100%;
77
- max-inline-size: 11.25rem;
78
- text-align: start;
79
- transition: outline .11s cubic-bezier(0,0,.38,.9),background-color .11s cubic-bezier(0,0,.38,.9),color .11s cubic-bezier(0,0,.38,.9);
80
- }
81
-
82
- *,
83
- ::before,
84
- ::after {
85
- box-sizing: inherit;
86
- }
87
- }
88
- }
89
-
90
- .#{globals.$prefix}--overflow-menu--flip {
91
- right: 0;
92
- left: unset;
93
- // left: -140px;
94
-
95
- &.is-open {
96
- display: table;
97
- }
98
-
99
- ul {
100
- margin: 0;
101
- padding: 0;
102
- list-style: none;
103
- }
104
- }
105
-
106
- .#{globals.$prefix}--overflow-menu, .#{globals.$prefix}--overflow-menu__trigger {
107
-
108
- width: 2rem;
109
- height: 2rem;
110
-
111
- &:hover {
112
- background-color: var(--#{globals.$prefix}-layer-hover);
113
- }
114
-
115
- &:focus {
116
- outline: 2px solid var(--cds-focus,#0f62fe);
117
- outline-offset: -2px;
118
- }
119
-
120
- *,
121
- ::before,
122
- ::after {
123
- box-sizing: inherit;
124
- }
125
-
126
- // align-items: center;
127
- appearance: none;
128
- background: none;
129
- block-size: 2.5rem;
130
- border: 0;
131
- box-sizing: border-box;
132
- cursor: pointer;
133
- display: flex;
134
- font-family: inherit;
135
- font-size: 100%;
136
- inline-size: 2.5rem;
137
- align-items: center;
138
- justify-content: center;
139
- margin: 0;
140
- min-height: 2.5rem;
141
- outline: 2px solid transparent;
142
- outline-offset: -2px;
143
- padding: 0;
144
- position: relative;
145
- text-align: start;
146
- transition: outline 110ms cubic-bezier(0, 0, 0.38, 0.9), background-color 110ms cubic-bezier(0, 0, 0.38, 0.9);
147
- vertical-align: baseline;
148
-
149
- > :first-child {
150
- margin-block-start: 0;
151
- }
152
-
153
- .#{globals.$prefix}--overflow-menu__icon {
154
- block-size: 1rem;
155
- fill: var(--cds-icon-primary, #161616);
156
- inline-size: 1rem;
157
- }
158
-
159
- }
160
-
161
- }
162
- }
4
+ .#{globals.$prefix}--#{globals.$charts-prefix}--toolbar {
5
+ display: flex;
6
+
7
+ .#{globals.$prefix}--overflow-menu-options {
8
+ box-sizing: border-box;
9
+ padding: 0;
10
+ border: 0;
11
+ margin: 0;
12
+ font-family: inherit;
13
+ font-size: 100%;
14
+ vertical-align: baseline;
15
+ box-shadow: 0 2px 6px var(--#{globals.$prefix}-shadow, rgba(0, 0, 0, 0.3));
16
+ position: absolute;
17
+ z-index: 6000;
18
+ display: none;
19
+ background-color: var(--#{globals.$prefix}-layer);
20
+ width: 10rem;
21
+ flex-direction: column;
22
+ align-items: flex-start;
23
+ top: 32px;
24
+ inset-inline-start: 0;
25
+ list-style: none;
26
+
27
+ *,
28
+ ::before,
29
+ ::after {
30
+ box-sizing: inherit;
31
+ }
32
+
33
+ .#{globals.$prefix}--overflow-menu-options__option {
34
+ &:hover {
35
+ background-color: var(--#{globals.$prefix}-layer-hover);
36
+ }
37
+
38
+ box-sizing: border-box;
39
+ border: 0;
40
+ margin: 0;
41
+ font-family: inherit;
42
+ font-size: 100%;
43
+ vertical-align: baseline;
44
+ display: flex;
45
+ align-items: center;
46
+ padding: 0;
47
+ background-color: transparent;
48
+ block-size: 2.5rem;
49
+ inline-size: 100%;
50
+ transition: background-color 0.11s cubic-bezier(0, 0, 0.38, 0.9);
51
+
52
+ .#{globals.$prefix}--overflow-menu-options__btn {
53
+ &:focus {
54
+ outline: 2px solid var(--cds-focus, #0f62fe);
55
+ outline-offset: -2px;
56
+ }
57
+
58
+ font-size: var(--#{globals.$prefix}-body-compact-01-font-size, 0.875rem);
59
+ font-weight: var(--#{globals.$prefix}-body-compact-01-font-weight, 400);
60
+ line-height: var(--#{globals.$prefix}-body-compact-01-line-height, 1.28572);
61
+ letter-spacing: var(--#{globals.$prefix}-body-compact-01-letter-spacing, 0.16px);
62
+ outline: 2px solid transparent;
63
+ outline-offset: -2px;
64
+ display: inline-flex;
65
+ align-items: center;
66
+ padding: 0 1rem;
67
+ border: none;
68
+ background-color: transparent;
69
+ block-size: 100%;
70
+ color: var(--#{globals.$prefix}-text-secondary, #525252);
71
+ cursor: pointer;
72
+ font-family: inherit;
73
+ font-weight: 400;
74
+ inline-size: 100%;
75
+ max-inline-size: 11.25rem;
76
+ text-align: start;
77
+ transition:
78
+ outline 0.11s cubic-bezier(0, 0, 0.38, 0.9),
79
+ background-color 0.11s cubic-bezier(0, 0, 0.38, 0.9),
80
+ color 0.11s cubic-bezier(0, 0, 0.38, 0.9);
81
+ }
82
+
83
+ *,
84
+ ::before,
85
+ ::after {
86
+ box-sizing: inherit;
87
+ }
88
+ }
89
+ }
90
+
91
+ .#{globals.$prefix}--overflow-menu--flip {
92
+ right: 0;
93
+ left: unset;
94
+ // left: -140px;
95
+
96
+ &.is-open {
97
+ display: table;
98
+ }
99
+
100
+ ul {
101
+ margin: 0;
102
+ padding: 0;
103
+ list-style: none;
104
+ }
105
+ }
106
+
107
+ .#{globals.$prefix}--overflow-menu,
108
+ .#{globals.$prefix}--overflow-menu__trigger {
109
+ width: 2rem;
110
+ height: 2rem;
111
+
112
+ &:hover {
113
+ background-color: var(--#{globals.$prefix}-layer-hover);
114
+ }
115
+
116
+ &:focus {
117
+ outline: 2px solid var(--cds-focus, #0f62fe);
118
+ outline-offset: -2px;
119
+ }
120
+
121
+ *,
122
+ ::before,
123
+ ::after {
124
+ box-sizing: inherit;
125
+ }
126
+
127
+ // align-items: center;
128
+ appearance: none;
129
+ background: none;
130
+ block-size: 2.5rem;
131
+ border: 0;
132
+ box-sizing: border-box;
133
+ cursor: pointer;
134
+ display: flex;
135
+ font-family: inherit;
136
+ font-size: 100%;
137
+ inline-size: 2.5rem;
138
+ align-items: center;
139
+ justify-content: center;
140
+ margin: 0;
141
+ min-height: 2.5rem;
142
+ outline: 2px solid transparent;
143
+ outline-offset: -2px;
144
+ padding: 0;
145
+ position: relative;
146
+ text-align: start;
147
+ transition:
148
+ outline 110ms cubic-bezier(0, 0, 0.38, 0.9),
149
+ background-color 110ms cubic-bezier(0, 0, 0.38, 0.9);
150
+ vertical-align: baseline;
151
+
152
+ > :first-child {
153
+ margin-block-start: 0;
154
+ }
155
+
156
+ .#{globals.$prefix}--overflow-menu__icon {
157
+ block-size: 1rem;
158
+ fill: var(--cds-icon-primary, #161616);
159
+ inline-size: 1rem;
160
+ }
161
+ }
162
+ }
163
+ }