@cdc/core 4.26.1 → 4.26.3

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 (249) hide show
  1. package/.claude/agents/qa-test-developer.md +126 -0
  2. package/CLAUDE.local.md +67 -0
  3. package/LICENSE +201 -0
  4. package/_stories/Gallery.Charts.stories.tsx +35 -42
  5. package/_stories/Gallery.DataBite.stories.tsx +15 -8
  6. package/_stories/Gallery.Maps.stories.tsx +37 -28
  7. package/_stories/Gallery.WaffleChart.stories.tsx +1 -1
  8. package/_stories/PageART.stories.tsx +5 -4
  9. package/_stories/PageBRFSS.stories.tsx +21 -16
  10. package/_stories/PageCancerRegistries.stories.tsx +15 -15
  11. package/_stories/PageEasternEquineEncephalitis.stories.tsx +33 -19
  12. package/_stories/PageExcessiveAlcoholUse.stories.tsx +148 -143
  13. package/_stories/PageMaternalMortality.stories.tsx +5 -4
  14. package/_stories/PageOralHealth.stories.tsx +15 -10
  15. package/_stories/PageRespiratory.stories.tsx +4 -4
  16. package/_stories/PageSmokingTobacco.stories.tsx +15 -10
  17. package/_stories/PageStateDiabetesProfiles.stories.tsx +15 -10
  18. package/_stories/PageWastewater.stories.tsx +44 -30
  19. package/_stories/VegaImport.stories.tsx +401 -0
  20. package/_stories/vega-fixtures/bars-with-line.json +444 -0
  21. package/_stories/vega-fixtures/bars.json +58 -0
  22. package/_stories/vega-fixtures/combo-bar-rolling-mean.json +88 -0
  23. package/_stories/vega-fixtures/combo.json +68 -0
  24. package/_stories/vega-fixtures/grouped-horizontal-bars.json +83 -0
  25. package/_stories/vega-fixtures/grouped-horizontal-bars2.json +231 -0
  26. package/_stories/vega-fixtures/horizontal-bar.json +427 -0
  27. package/_stories/vega-fixtures/horizontal-bars-with-bad-colors.json +197 -0
  28. package/_stories/vega-fixtures/horizontal-bars2.json +58 -0
  29. package/_stories/vega-fixtures/lines.json +227 -0
  30. package/_stories/vega-fixtures/measles-bars.json +348 -0
  31. package/_stories/vega-fixtures/measles-map.json +11101 -0
  32. package/_stories/vega-fixtures/measles-stacked-bars.json +2147 -0
  33. package/_stories/vega-fixtures/multi-dataset.json +255 -0
  34. package/_stories/vega-fixtures/no-data.json +14 -0
  35. package/_stories/vega-fixtures/pie-chart.json +94 -0
  36. package/_stories/vega-fixtures/repeat-spec.json +47 -0
  37. package/_stories/vega-fixtures/stacked-area.json +222 -0
  38. package/_stories/vega-fixtures/stacked-bar-with-rect.json +3412 -0
  39. package/_stories/vega-fixtures/stacked-bars-with-line.json +364 -0
  40. package/_stories/vega-fixtures/stacked-bars.json +212 -0
  41. package/_stories/vega-fixtures/stacked-horizontal-bars.json +140 -0
  42. package/_stories/vega-fixtures/warning-combo.json +59 -0
  43. package/_stories/vega-fixtures/warning-scatter-and-line.json +1182 -0
  44. package/assets/callout-flag.svg +7 -0
  45. package/assets/icon-chart-area.svg +1 -0
  46. package/assets/icon-chart-radar.svg +23 -0
  47. package/assets/logo2.svg +31 -0
  48. package/components/AdvancedEditor/EmbedEditor.tsx +270 -38
  49. package/components/Alert/components/Alert.styles.css +2 -2
  50. package/components/ComboBox/combobox.styles.css +48 -48
  51. package/components/CustomColorsEditor/CustomColorsEditor.css +53 -53
  52. package/components/CustomColorsEditor/CustomColorsEditor.tsx +3 -10
  53. package/components/DataTable/DataTable.tsx +46 -18
  54. package/components/DataTable/DataTableStandAlone.tsx +1 -0
  55. package/components/DataTable/components/ChartHeader.tsx +21 -12
  56. package/components/DataTable/components/MapHeader.tsx +34 -28
  57. package/components/DataTable/components/SortIcon/sort-icon.css +5 -5
  58. package/components/DataTable/data-table.css +50 -52
  59. package/components/DataTable/helpers/applyCustomOrder.ts +17 -0
  60. package/components/DataTable/helpers/getChartCellValue.ts +10 -7
  61. package/components/DataTable/helpers/getMapDataTableColumnKeys.ts +22 -0
  62. package/components/DataTable/helpers/getSeriesName.ts +6 -0
  63. package/components/DataTable/helpers/mapCellMatrix.tsx +33 -23
  64. package/components/DataTable/helpers/tests/mapCellMatrix.test.ts +33 -0
  65. package/components/DownloadButton.tsx +14 -6
  66. package/components/EditorPanel/ColumnsEditor.tsx +38 -31
  67. package/components/EditorPanel/CustomSortOrder.tsx +94 -0
  68. package/components/EditorPanel/DataTableEditor.tsx +139 -23
  69. package/components/EditorPanel/EditorPanel.styles.css +71 -71
  70. package/components/EditorPanel/EditorPanel.tsx +3 -8
  71. package/components/EditorPanel/EditorPanelDispatch.tsx +4 -4
  72. package/components/EditorPanel/FootnotesEditor.tsx +2 -2
  73. package/components/EditorPanel/VizFilterEditor/NestedDropdownEditor.tsx +21 -12
  74. package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +16 -10
  75. package/components/EditorPanel/VizFilterEditor/components/FilterOrder.tsx +33 -29
  76. package/components/EditorPanel/components/MarkupVariablesEditor.tsx +160 -106
  77. package/components/EditorPanel/components/PanelMarkup.tsx +5 -1
  78. package/{styles/v2/components → components/EditorPanel}/editor.scss +76 -22
  79. package/components/EditorPanel/sections/StyleTreatmentSection.tsx +99 -0
  80. package/components/EditorPanel/sections/VisualSection.tsx +11 -0
  81. package/components/EditorWrapper/editor-wrapper.style.css +1 -1
  82. package/components/Filters/Filters.tsx +3 -5
  83. package/components/Filters/components/Tabs.tsx +19 -7
  84. package/{styles → components/Filters}/filters.scss +3 -3
  85. package/components/Footnotes/FootnotesStandAlone.tsx +4 -2
  86. package/components/HeaderThemeSelector/HeaderThemeSelector.css +61 -5
  87. package/components/Layout/components/Responsive.tsx +14 -6
  88. package/components/Layout/components/Sidebar/components/Sidebar.tsx +1 -1
  89. package/components/Layout/components/Sidebar/components/sidebar.styles.scss +14 -20
  90. package/components/Layout/components/Visualization/index.tsx +50 -38
  91. package/components/Layout/components/Visualization/visualizations.scss +232 -15
  92. package/components/Layout/components/VisualizationContainer.test.tsx +67 -0
  93. package/components/Layout/components/VisualizationContainer.tsx +37 -0
  94. package/components/Layout/components/VisualizationContent.test.tsx +182 -0
  95. package/components/Layout/components/VisualizationContent.tsx +75 -0
  96. package/components/Layout/index.tsx +5 -5
  97. package/components/Layout/styles/editor-utils.scss +3 -3
  98. package/components/Layout/styles/editor.scss +4 -4
  99. package/components/Legend/Legend.Gradient.tsx +7 -1
  100. package/components/Loader/loader.styles.css +2 -2
  101. package/components/Loading.jsx +1 -1
  102. package/components/MediaControls.tsx +10 -3
  103. package/components/MultiSelect/multiselect.styles.css +19 -19
  104. package/components/NestedDropdown/nesteddropdown.styles.css +15 -15
  105. package/components/PaletteSelector/PaletteSelector.css +15 -15
  106. package/components/RichTooltip/richTooltip.css +6 -6
  107. package/components/Table/table.styles.css +2 -2
  108. package/components/Waiting.tsx +1 -1
  109. package/components/_stories/CustomColorsEditor.stories.tsx +37 -0
  110. package/components/_stories/DataTable.stories.tsx +1 -0
  111. package/components/_stories/Filters.stories.tsx +1 -1
  112. package/components/_stories/styles.scss +0 -1
  113. package/components/elements/Button.jsx +1 -1
  114. package/components/elements/Card.jsx +1 -1
  115. package/{styles/v2/components → components/elements}/button.scss +9 -8
  116. package/components/inputs/InputCheckbox.jsx +1 -1
  117. package/components/inputs/InputSelect.tsx +1 -1
  118. package/components/inputs/InputText.jsx +1 -1
  119. package/components/inputs/InputToggle.tsx +1 -1
  120. package/{styles/v2/components/input → components/inputs}/_input-check-radio.scss +2 -2
  121. package/{styles/v2/components/input → components/inputs}/_input-group.scss +3 -3
  122. package/{styles/v2/components/input → components/inputs}/_input-slider.scss +2 -2
  123. package/{styles/v2/components/input → components/inputs}/_input.scss +5 -5
  124. package/{styles/v2/components/input → components/inputs}/index.scss +2 -2
  125. package/{styles → components}/loading.scss +1 -1
  126. package/components/managers/DataDesigner.tsx +1 -1
  127. package/{styles/v2/components → components/managers}/data-designer.scss +6 -7
  128. package/components/ui/Accordion.jsx +1 -1
  129. package/components/ui/Icon.tsx +1 -1
  130. package/components/ui/LoadSpin.jsx +1 -1
  131. package/components/ui/Modal.jsx +1 -1
  132. package/components/ui/Overlay.jsx +1 -1
  133. package/components/ui/Title/index.test.tsx +34 -0
  134. package/components/ui/Title/index.tsx +24 -7
  135. package/components/ui/Title/title.styles.css +119 -25
  136. package/components/ui/Tooltip.tsx +1 -1
  137. package/components/ui/_stories/Title.stories.tsx +1 -1
  138. package/{styles/v2/components → components/ui}/accordion.scss +3 -3
  139. package/components/ui/accordion.styles.css +11 -11
  140. package/{styles/v2/components → components/ui}/modal.scss +2 -2
  141. package/{styles/v2/components → components/ui}/overlay.scss +6 -6
  142. package/{styles/v2/components → components}/ui/tooltip.scss +1 -1
  143. package/{styles → components}/waiting.scss +9 -3
  144. package/data/colorPalettes.ts +18 -5
  145. package/data/mapColorPalettes.ts +10 -0
  146. package/devTemplate/dev.js +285 -0
  147. package/devTemplate/index.html +30 -0
  148. package/devTemplate/preview.html +1503 -0
  149. package/devTemplate/sidebar.css +151 -0
  150. package/dist/cove-main.css +2530 -3901
  151. package/dist/cove-main.css.map +1 -1
  152. package/generateViteConfig.js +111 -2
  153. package/helpers/DataTransform.ts +1 -5
  154. package/helpers/backfillDefaults.ts +35 -0
  155. package/helpers/constants.ts +12 -0
  156. package/helpers/cove/date.ts +64 -3
  157. package/helpers/cove/number.ts +29 -15
  158. package/helpers/cove/string.ts +29 -0
  159. package/helpers/coveUpdateWorker.ts +14 -8
  160. package/helpers/displayDataAsText.ts +1 -1
  161. package/helpers/embed/embedCodeGenerator.ts +80 -0
  162. package/helpers/embed/embedHelper.js +169 -0
  163. package/helpers/embed/filterUtils.ts +121 -0
  164. package/helpers/embed/index.ts +17 -0
  165. package/helpers/embed/urlValidation.ts +119 -0
  166. package/helpers/extractDataAndMetadata.ts +20 -0
  167. package/helpers/fetchRemoteData.ts +14 -8
  168. package/helpers/filterVizData.ts +6 -1
  169. package/helpers/getFileExtension.ts +0 -6
  170. package/helpers/labelHash.ts +9 -0
  171. package/helpers/markupProcessor.ts +56 -38
  172. package/helpers/metrics/types.ts +3 -0
  173. package/helpers/palettes/colorDistributions.ts +1 -1
  174. package/helpers/palettes/utils.ts +12 -12
  175. package/helpers/parseCsvWithQuotes.ts +15 -14
  176. package/helpers/prepareScreenshot.ts +33 -10
  177. package/helpers/testing.ts +44 -0
  178. package/helpers/tests/DataTransform.test.ts +125 -0
  179. package/helpers/tests/abbreviateNumber.test.ts +59 -0
  180. package/helpers/tests/backfillDefaults.test.ts +253 -0
  181. package/helpers/tests/date.test.ts +110 -0
  182. package/helpers/tests/extractDataAndMetadata.test.ts +93 -0
  183. package/helpers/tests/markupProcessor.test.ts +315 -124
  184. package/helpers/tests/number.test.ts +42 -0
  185. package/helpers/tests/prepareScreenshot.test.ts +28 -28
  186. package/helpers/tests/testStandaloneBuild.ts +36 -26
  187. package/helpers/tests/useDataVizClasses.test.ts +66 -0
  188. package/helpers/tests/visualizationWrapperUsage.test.ts +57 -0
  189. package/helpers/useDataVizClasses.ts +13 -7
  190. package/helpers/vegaConfig.ts +1 -1
  191. package/helpers/vegaConfigImport.ts +160 -0
  192. package/helpers/ver/4.24.4.ts +24 -0
  193. package/helpers/ver/4.26.1.ts +1 -1
  194. package/helpers/ver/4.26.2.ts +84 -0
  195. package/helpers/ver/4.26.3.ts +44 -0
  196. package/helpers/ver/4.26.4.ts +31 -0
  197. package/helpers/ver/tests/4.26.1.test.ts +105 -0
  198. package/helpers/ver/tests/4.26.2.test.ts +298 -0
  199. package/helpers/ver/tests/4.26.3.test.ts +168 -0
  200. package/helpers/ver/tests/4.26.4.test.ts +88 -0
  201. package/helpers/ver/tests/coveUpdateWorker.test.ts +57 -0
  202. package/helpers/viewports.ts +2 -0
  203. package/package.json +27 -32
  204. package/styles/_global.scss +7 -7
  205. package/styles/_reset.scss +2 -2
  206. package/styles/{v2/base → base}/_file-selector.scss +4 -4
  207. package/styles/{v2/base → base}/_general.scss +2 -4
  208. package/styles/{v2/base → base}/index.scss +1 -1
  209. package/styles/base.scss +107 -165
  210. package/styles/cove-main.scss +3 -6
  211. package/styles/layout/_component.scss +110 -0
  212. package/styles/{v2/layout → layout}/_data-table.scss +7 -7
  213. package/styles/layout/_wrapper-padding.scss +27 -0
  214. package/styles/{v2/main.scss → main.scss} +3 -1
  215. package/styles/{v2/themes → themes}/_color-definitions.scss +46 -41
  216. package/styles/{_accessibility.scss → utils/_accessibility.scss} +1 -1
  217. package/styles/{v2/utils → utils}/_grid.scss +8 -3
  218. package/styles/{_global-variables.scss → utils/_properties.scss} +133 -112
  219. package/styles/{v2/utils → utils}/index.scss +2 -1
  220. package/types/Annotation.ts +10 -11
  221. package/types/Axis.ts +2 -0
  222. package/types/ComponentStyles.ts +1 -0
  223. package/types/ConfigureData.ts +1 -0
  224. package/types/General.ts +2 -0
  225. package/types/MarkupInclude.ts +1 -0
  226. package/types/MarkupVariable.ts +2 -1
  227. package/types/Palette.ts +22 -0
  228. package/types/Table.ts +9 -0
  229. package/types/Visualization.ts +7 -0
  230. package/_stories/StoryRenderingTests.stories.tsx +0 -164
  231. package/helpers/embedCodeGenerator.ts +0 -109
  232. package/styles/_common-components.css +0 -73
  233. package/styles/_variables.scss +0 -63
  234. package/styles/v2/layout/_component.scss +0 -21
  235. package/styles/v2/utils/_variables.scss +0 -9
  236. package/{styles/v2/components/card.scss → components/elements/card.css} +2 -2
  237. /package/{styles/v2/components → components/ui}/icon.scss +0 -0
  238. /package/{styles/v2/components → components/ui}/loadspin.scss +0 -0
  239. /package/styles/{v2/base → base}/_heading.scss +0 -0
  240. /package/styles/{v2/base → base}/_reset.scss +0 -0
  241. /package/styles/{v2/layout → layout}/_alert.scss +0 -0
  242. /package/styles/{v2/layout → layout}/_progression.scss +0 -0
  243. /package/styles/{v2/layout → layout}/_tooltip.scss +0 -0
  244. /package/styles/{v2/layout → layout}/index.scss +0 -0
  245. /package/styles/{v2/themes → themes}/index.scss +0 -0
  246. /package/styles/{v2/utils → utils}/_align.scss +0 -0
  247. /package/styles/{v2/utils → utils}/_animations.scss +0 -0
  248. /package/styles/{v2/utils → utils}/_breakpoints.scss +0 -0
  249. /package/styles/{v2/utils → utils}/_mixins.scss +0 -0
@@ -1,70 +1,58 @@
1
1
  @use 'sass:string';
2
2
  @use 'sass:list';
3
- @import './../../variables';
4
3
 
5
4
  $theme: (
6
- 'amber': (
7
- '#fbab18',
5
+ 'amber': ('#fbab18',
8
6
  '#ffd54f',
9
7
  '#ffecb3',
10
8
  '#fff7e1'
11
9
  ),
12
- 'blue': (
13
- '#005eaa',
10
+ 'blue': ('#005eaa',
14
11
  '#88c3ea',
15
12
  '#c0e9ff',
16
13
  '#edf9ff'
17
14
  ),
18
- 'brown': (
19
- '#705043',
15
+ 'brown': ('#705043',
20
16
  '#ad907b',
21
17
  '#d7ccc8',
22
18
  '#f2ebe8'
23
19
  ),
24
- 'cyan': (
25
- '#007B91',
20
+ 'cyan': ('#007B91',
26
21
  '#65b0bd',
27
22
  '#cce5e9',
28
23
  '#ebf5f6'
29
24
  ),
30
- 'green': (
31
- '#4b830d',
25
+ 'green': ('#4b830d',
32
26
  '#84bc49',
33
27
  '#dcedc8',
34
28
  '#f1f8e9'
35
29
  ),
36
- 'indigo': (
37
- '#26418f',
30
+ 'indigo': ('#26418f',
38
31
  '#92a6dd',
39
32
  '#dee8ff',
40
33
  '#f2f6ff'
41
34
  ),
42
- 'orange': (
43
- '#bb4d00',
35
+ 'orange': ('#bb4d00',
44
36
  '#ffad42',
45
37
  '#ffe97d',
46
38
  '#fff4cf'
47
39
  ),
48
- 'pink': (
49
- '#af4448',
40
+ 'pink': ('#af4448',
50
41
  '#e57373',
51
42
  '#ffc2c2',
52
43
  '#ffe7e7'
53
44
  ),
54
- 'purple': (
55
- '#712177',
45
+ 'purple': ('#712177',
56
46
  '#b890bb',
57
47
  '#e3d3e4',
58
48
  '#f7f2f7'
59
49
  ),
60
- 'slate': (
61
- '#29434e',
50
+ 'slate': ('#29434e',
62
51
  '#7e9ba5',
63
52
  '#b6c6d2',
64
53
  '#e2e8ed'
65
54
  ),
66
- 'teal': (
67
- '#00695c',
55
+ 'teal': ('#00695c',
68
56
  '#4ebaaa',
69
57
  '#ceece7',
70
58
  '#ebf7f5'
@@ -72,15 +60,15 @@ $theme: (
72
60
  );
73
61
 
74
62
  // .type-sparkline class used for creating sparklines
75
- // once v2 is released plz update html structure
76
- // to use .cove
77
- .markup-include,
78
- .type-waffle-chart,
79
- .type-data-bite,
80
- .type-filtered-text,
81
- .cdc-open-viz-module.type-chart.type-sparkline,
82
- .cove {
63
+ .cove-visualization.type-markup-include,
64
+ .cove-visualization.type-waffle-chart,
65
+ .cove-visualization.type-data-bite,
66
+ .cove-visualization.type-filtered-text,
67
+ .cove-visualization.type-chart,
68
+ .cove-visualization.type-chart.type-sparkline,
69
+ .cove-visualization.type-map {
83
70
  @each $theme-name, $theme-colors in $theme {
71
+
84
72
  // Header
85
73
  .theme-#{$theme-name} {
86
74
  background-color: string.unquote(list.nth($theme-colors, 1));
@@ -90,18 +78,23 @@ $theme: (
90
78
  }
91
79
 
92
80
  &.theme-#{$theme-name} {
81
+
93
82
  /// area that appears underneath the title of the component.
94
- .cove-component__content {
83
+ .cove-visualization__body {
84
+
95
85
  /// when there are borders on a component
96
86
  &:not(.no-borders) {
87
+
97
88
  /// borders are the theme color
98
- &.component--has-borderColorTheme {
89
+ &.component--has-border-color-theme {
99
90
  border: 1px solid string.unquote(list.nth($theme-colors, 1));
100
91
  }
92
+
101
93
  /// using default border color to draw borders
102
- &:not(.component--has-borderColorTheme) {
103
- border: 1px solid $lightGray;
94
+ &:not(.component--has-border-color-theme) {
95
+ border: 1px solid var(--lightGray);
104
96
  }
97
+
105
98
  &.component--has-title {
106
99
  border-top: none !important;
107
100
  }
@@ -112,19 +105,22 @@ $theme: (
112
105
  border-left: 0.5rem solid string.unquote(list.nth($theme-colors, 1)) !important;
113
106
  }
114
107
 
115
- /// Apply a background color
116
- &.component--has-background:not(.component--hideBackgroundColor) {
108
+ /// Apply a background color (excluded when TP5 treatment is active)
109
+ &.component--has-background:not(.component--hide-background-color):not(.component--tp5-treatment) {
117
110
  background: string.unquote(list.nth($theme-colors, 3));
118
111
  }
119
112
  }
120
113
 
121
- .cove-component__header {
114
+ .cove-visualization__title,
115
+ .cove-visualization__header {
122
116
  border-color: string.unquote(list.nth($theme-colors, 2));
123
117
  }
124
118
  }
125
119
 
126
120
  &.theme-#{$theme-name} {
127
- .cove-component__header {
121
+
122
+ .cove-visualization__title,
123
+ .cove-visualization__header {
128
124
  border-color: string.unquote(list.nth($theme-colors, 2));
129
125
  }
130
126
  }
@@ -132,7 +128,7 @@ $theme: (
132
128
  }
133
129
 
134
130
  // Charts filter styles
135
- .cdc-open-viz-module {
131
+ .cove-visualization {
136
132
  @each $theme-name, $theme-colors in $theme {
137
133
  &.theme-#{$theme-name} {
138
134
  .single-filters--tab .tab--active:not(.tab--simple) {
@@ -149,6 +145,14 @@ $theme: (
149
145
  background-color: string.unquote(list.nth($theme-colors, 1));
150
146
  color: #fff;
151
147
  }
148
+
149
+ .button__tab-bar--active {
150
+ outline: 2px solid string.unquote(list.nth($theme-colors, 1));
151
+ }
152
+
153
+ .apply:not([disabled]) {
154
+ background-color: string.unquote(list.nth($theme-colors, 1));
155
+ }
152
156
  }
153
157
 
154
158
  .theme-#{$theme-name} {
@@ -170,6 +174,7 @@ $theme: (
170
174
  .button__tab-bar--active {
171
175
  outline: 2px solid string.unquote(list.nth($theme-colors, 1));
172
176
  }
177
+
173
178
  .apply:not([disabled]) {
174
179
  background-color: string.unquote(list.nth($theme-colors, 1));
175
180
  }
@@ -239,4 +244,4 @@ $green-quaternary: #f1f8e9 !default;
239
244
  $amber-primary: #fbab18 !default;
240
245
  $amber-secondary: #ffd54f !default;
241
246
  $amber-tertiary: #ffecb3 !default;
242
- $amber-quaternary: #fff7e1 !default;
247
+ $amber-quaternary: #fff7e1 !default;
@@ -1,7 +1,7 @@
1
1
  // Only frontend styles are applied in WCMS/TP
2
2
  // This helps match those styles when viewing in the editor
3
3
  .modal.cdc-cove-editor *:focus-visible,
4
- .cdc-open-viz-module *:focus-visible {
4
+ .cove-visualization *:focus-visible {
5
5
  outline: dashed 2px rgb(0, 122, 153) !important;
6
6
  outline-offset: 3px !important;
7
7
  border-radius: 6px !important;
@@ -3,18 +3,21 @@ $grid-gap-max: 64;
3
3
  $grid-columns: 12;
4
4
 
5
5
  @mixin create-grid-selectors($breakpoint: null) {
6
- $infix: if($breakpoint == null, '', '-#{$breakpoint}');
6
+ $infix: if(sass($breakpoint ==null): ""; else: "-#{$breakpoint}");
7
7
 
8
8
  @for $i from 1 through $grid-columns {
9
9
  .col#{$infix}-#{$i} {
10
10
  grid-column-end: span $i;
11
11
  }
12
+
12
13
  .col-offset#{$infix}-#{$i} {
13
14
  grid-column-start: $i + 1;
14
15
  }
16
+
15
17
  .row#{$infix}-#{$i} {
16
18
  grid-row-end: span $i;
17
19
  }
20
+
18
21
  .row-offset#{$infix}-#{$i} {
19
22
  grid-row-start: $i + 1;
20
23
  }
@@ -23,11 +26,13 @@ $grid-columns: 12;
23
26
 
24
27
  @mixin grid-gaps() {
25
28
  $i: 0;
26
- @while ($i * $grid-gap-offset) <= $grid-gap-max {
29
+
30
+ @while ($i * $grid-gap-offset) <=$grid-gap-max {
27
31
  .grid-gap-#{$i} {
28
32
  grid-gap: #{($i * $grid-gap-offset) + 'px'};
29
33
  gap: #{($i * $grid-gap-offset) + 'px'};
30
34
  }
35
+
31
36
  $i: $i + 1;
32
37
  }
33
38
  }
@@ -44,4 +49,4 @@ $grid-columns: 12;
44
49
  @media (min-width: $width) {
45
50
  @include create-grid-selectors($breakpoint);
46
51
  }
47
- }
52
+ }
@@ -1,112 +1,133 @@
1
- $colors: (
2
- 'baseColor': #333,
3
- 'blue': #005eaa,
4
- 'lightestGray': #f2f2f2,
5
- 'gray2': #f5f5f5,
6
- 'lightGray': #c7c7c7,
7
- 'mediumGray': #565656,
8
- 'darkGray': #333,
9
- 'red': #d8000c,
10
- 'white': #fff,
11
- 'silver': #eee,
12
-
13
- 'primary': #005eaa,
14
- 'secondary': #88c3ea,
15
- 'tertiary': #c0e9ff,
16
- 'quaternary': #edf9ff,
17
-
18
- 'purple-primary': #712177,
19
- 'purple-secondary': #b890bb,
20
- 'purple-tertiary': #e3d3e4,
21
- 'purple-quaternary': #f7f2f7,
22
-
23
- 'brown-primary': #705043,
24
- 'brown-secondary': #ad907b,
25
- 'brown-tertiary': #d7ccc8,
26
- 'brown-quaternary': #f2ebe8,
27
-
28
- 'teal-primary': #00695c,
29
- 'teal-secondary': #4ebaaa,
30
- 'teal-tertiary': #ceece7,
31
- 'teal-quaternary': #ebf7f5,
32
-
33
- 'pink-primary': #af4448,
34
- 'pink-secondary': #e57373,
35
- 'pink-tertiary': #ffc2c2,
36
- 'pink-quaternary': #ffe7e7,
37
-
38
- 'orange-primary': #bb4d00,
39
- 'orange-secondary': #ffad42,
40
- 'orange-tertiary': #ffe97d,
41
- 'orange-quaternary': #fff4cf,
42
-
43
- 'slate-primary': #29434e,
44
- 'slate-secondary': #7e9ba5,
45
- 'slate-tertiary': #b6c6d2,
46
- 'slate-quaternary': #e2e8ed,
47
-
48
- 'indigo-primary': #26418f,
49
- 'indigo-secondary': #92a6dd,
50
- 'indigo-tertiary': #dee8ff,
51
- 'indigo-quaternary': #f2f6ff,
52
-
53
- 'cyan-primary': #006778,
54
- 'cyan-secondary': #65b0bd,
55
- 'cyan-tertiary': #cce5e9,
56
- 'cyan-quaternary': #ebf5f6,
57
-
58
- 'green-primary': #4b830d,
59
- 'green-secondary': #84bc49,
60
- 'green-tertiary': #dcedc8,
61
- 'green-quaternary': #f1f8e9,
62
-
63
- 'amber-primary': #fbab18,
64
- 'amber-secondary': #ffd54f,
65
- 'amber-tertiary': #ffecb3,
66
- 'amber-quaternary': #fff7e1,
67
-
68
- 'cool-gray-90': #1c1d1f,
69
- 'cool-gray-50': #71767a,
70
- 'cool-gray-30': #a9aeb1,
71
- 'cool-gray-10': #dfe1e2,
72
- 'colors-blue-vivid-60': #005ea2
73
- );
74
-
75
- @mixin theme() {
76
- :root {
77
- @each $key, $value in $colors {
78
- --#{$key}: #{$value};
79
- }
80
- }
81
- }
82
-
83
- @include theme();
84
-
85
- :root {
86
- // Spacing
87
- --editorContentPadding: 30px;
88
- --editorWidth: 350px;
89
- --space-between-legend-item-rows: 1rem;
90
- --space-between-legend-item-columns: 1.5rem;
91
- // Breakpoints
92
- --breakpoint-xs: 480px;
93
- --breakpoint-sm: 768px;
94
- --breakpoint-md: 960px;
95
- --breakpoint-lg: 1170px;
96
- --breakpoint-xl: 1280px;
97
- // Font
98
- --app-font-main: 'Nunito', sans-serif;
99
- --app-font-secondary: 'Poppins', sans-serif;
100
- // Font sizes
101
- --legend-title-font-size: 1rem;
102
- --legend-description-font-size: 1rem;
103
- --legend-item-font-size: 0.889rem;
104
- --download-link-font-size: 0.772rem;
105
- --filter-select-font-size: 0.833rem;
106
- --filter-label-font-size: 0.889rem;
107
- --filter-buttons-font-size: 0.889rem;
108
- --superTitle-font-size: 0.833rem;
109
- --title-font-size: 1.222rem;
110
- --territory-label-font-size: 0.809rem;
111
- --territory-label-font-size-mobile: 0.556rem;
112
- }
1
+ // ─────────────────────────────────────────────────────────────────────────────
2
+ // CSS Custom Properties — single source of truth for all design values.
3
+ // SCSS variables below are kept only where SCSS features require them:
4
+ // $cove-breakpoints — used in breakpoint mixins
5
+ // $blue, $red, $mediumGray — used in color.adjust() calls (migrate later)
6
+ // ─────────────────────────────────────────────────────────────────────────────
7
+
8
+ // Required for breakpoint mixins (cannot be replaced by CSS vars)
9
+ $cove-breakpoints: (
10
+ xs: 480px,
11
+ sm: 768px,
12
+ md: 960px,
13
+ lg: 1170px,
14
+ xl: 1280px
15
+ );
16
+
17
+ // Required for color.adjust() calls — to be removed in a future phase
18
+ $blue: #005eaa;
19
+ $red: #d8000c;
20
+ $mediumGray: #565656;
21
+
22
+ // Color map — drives the CSS custom property generation below
23
+ $colors: (
24
+ 'baseColor': #333,
25
+ 'blue': #005eaa,
26
+ 'lightestGray': #f2f2f2,
27
+ 'gray2': #f5f5f5,
28
+ 'lightGray': #c7c7c7,
29
+ 'mediumGray': #565656,
30
+ 'darkGray': #333,
31
+ 'red': #d8000c,
32
+ 'white': #fff,
33
+ 'silver': #eee,
34
+ 'primary': #005eaa,
35
+ 'secondary': #88c3ea,
36
+ 'tertiary': #c0e9ff,
37
+ 'quaternary': #edf9ff,
38
+ 'purple-primary': #712177,
39
+ 'purple-secondary': #b890bb,
40
+ 'purple-tertiary': #e3d3e4,
41
+ 'purple-quaternary': #f7f2f7,
42
+ 'brown-primary': #705043,
43
+ 'brown-secondary': #ad907b,
44
+ 'brown-tertiary': #d7ccc8,
45
+ 'brown-quaternary': #f2ebe8,
46
+ 'teal-primary': #00695c,
47
+ 'teal-secondary': #4ebaaa,
48
+ 'teal-tertiary': #ceece7,
49
+ 'teal-quaternary': #ebf7f5,
50
+ 'pink-primary': #af4448,
51
+ 'pink-secondary': #e57373,
52
+ 'pink-tertiary': #ffc2c2,
53
+ 'pink-quaternary': #ffe7e7,
54
+ 'orange-primary': #bb4d00,
55
+ 'orange-secondary': #ffad42,
56
+ 'orange-tertiary': #ffe97d,
57
+ 'orange-quaternary': #fff4cf,
58
+ 'slate-primary': #29434e,
59
+ 'slate-secondary': #7e9ba5,
60
+ 'slate-tertiary': #b6c6d2,
61
+ 'slate-quaternary': #e2e8ed,
62
+ 'indigo-primary': #26418f,
63
+ 'indigo-secondary': #92a6dd,
64
+ 'indigo-tertiary': #dee8ff,
65
+ 'indigo-quaternary': #f2f6ff,
66
+ 'cyan-primary': #006778,
67
+ 'cyan-secondary': #65b0bd,
68
+ 'cyan-tertiary': #cce5e9,
69
+ 'cyan-quaternary': #ebf5f6,
70
+ 'green-primary': #4b830d,
71
+ 'green-secondary': #84bc49,
72
+ 'green-tertiary': #dcedc8,
73
+ 'green-quaternary': #f1f8e9,
74
+ 'amber-primary': #fbab18,
75
+ 'amber-secondary': #ffd54f,
76
+ 'amber-tertiary': #ffecb3,
77
+ 'amber-quaternary': #fff7e1,
78
+ 'cool-gray-90': #1c1d1f,
79
+ 'cool-gray-50': #71767a,
80
+ 'cool-gray-30': #a9aeb1,
81
+ 'cool-gray-10': #dfe1e2,
82
+ 'colors-gray-cool-70': #3d4551,
83
+ 'colors-blue-vivid-60': #005ea2,
84
+ 'colors-cyan-10': #eff9fa,
85
+ 'colors-cyan-15': #dff2f6,
86
+ 'colors-cyan-60v': #007a99
87
+ );
88
+
89
+ @mixin theme() {
90
+ :root {
91
+ @each $key, $value in $colors {
92
+ --#{$key}: #{$value};
93
+ }
94
+ }
95
+ }
96
+
97
+ @include theme();
98
+
99
+ :root {
100
+ // Spacing
101
+ --editorContentPadding: 30px;
102
+ --editorWidth: 350px;
103
+ --space-between-legend-item-rows: 1rem;
104
+ --space-between-legend-item-columns: 1.5rem;
105
+ // Breakpoints
106
+ --breakpoint-xs: 480px;
107
+ --breakpoint-sm: 768px;
108
+ --breakpoint-md: 960px;
109
+ --breakpoint-lg: 1170px;
110
+ --breakpoint-xl: 1280px;
111
+ // Font
112
+ --app-font-main: 'Nunito', sans-serif;
113
+ --app-font-secondary: 'Poppins', sans-serif;
114
+ --app-font-size: 1rem;
115
+
116
+ // Font sizes
117
+ --legend-title-font-size: 1rem;
118
+ --legend-description-font-size: 1rem;
119
+ --legend-item-font-size: 0.889rem;
120
+ --download-link-font-size: 0.772rem;
121
+ --filter-select-font-size: 0.833rem;
122
+ --filter-label-font-size: 0.889rem;
123
+ --filter-buttons-font-size: 0.889rem;
124
+ --superTitle-font-size: 0.833rem;
125
+ --title-font-size: 1.222rem;
126
+ --territory-label-font-size: 0.809rem;
127
+ --territory-label-font-size-mobile: 0.556rem;
128
+ --visualization-body-font-family: var(--app-font-main);
129
+ --visualization-meta-font-size: 0.889rem;
130
+ --visualization-body-line-height: 1.5;
131
+ // Transitions
132
+ --transition-expo-out: cubic-bezier(0.16, 1, 0.3, 1);
133
+ }
@@ -1,6 +1,7 @@
1
- @import 'variables';
1
+ @import 'properties';
2
2
  @import 'mixins';
3
3
 
4
+ @import 'accessibility';
4
5
  @import 'align';
5
6
  @import 'animations';
6
7
  @import 'breakpoints';
@@ -1,4 +1,7 @@
1
1
  export type Annotation = {
2
+ // Positioning mode: fixed uses x/y percentages, data anchors to data point
3
+ anchorMode?: 'fixed' | 'data'
4
+
2
5
  // background opacity of annotation
3
6
  opacity: number
4
7
  // HTML text string to display in annotation
@@ -15,26 +18,22 @@ export type Annotation = {
15
18
  horizontal: boolean
16
19
  vertical: boolean
17
20
  }
18
- // x value for scaling
19
- xKey: string
20
- // y value for scaling
21
- yKey: string
22
- // orignal x value of subject
23
- originalX: number
24
- // x of subject
21
+ // Data X value for data-anchored mode (timestamp, category, etc.)
22
+ dataX?: any
23
+ // x of subject (percentage 0-100)
25
24
  x: number
26
- // y of object
25
+ // y of object (percentage 0-100)
27
26
  y: number
28
27
  // x offset of label from subject
29
28
  dx: number
30
29
  // y offset of label from subject
31
30
  dy: number
32
31
  // assigned series that the annotation should snap to
33
- seriesKey: string
34
- // if the dragged item should be snapped to the nearest point
35
- snapToNearestPoint: boolean
32
+ seriesKey?: string
36
33
  // type of connecting line from label to subject
37
34
  connectionType: 'line' | 'curve' | 'elbow' | 'none'
35
+ // curve control point offset for curve connection type
36
+ bezier?: number
38
37
  // marker type highlighting the subject
39
38
  marker: 'arrow' | 'circle'
40
39
  // should the item be snapped to the subject?
package/types/Axis.ts CHANGED
@@ -27,6 +27,7 @@ export type Axis = {
27
27
  max?: string
28
28
  maxTickRotation?: number
29
29
  min?: string
30
+ smallestLeftAxisMax?: number
30
31
  numTicks?: number
31
32
  padding?: number
32
33
  paddingPercent?: number
@@ -37,6 +38,7 @@ export type Axis = {
37
38
  rightLabel?: string
38
39
  rightLabelOffsetSize?: number
39
40
  rightMax?: string
41
+ smallestRightAxisMax?: number
40
42
  rightNumTicks?: number
41
43
  sortDates?: boolean
42
44
  sortKey?: string
@@ -4,4 +4,5 @@ export type ComponentStyles = {
4
4
  background: boolean
5
5
  hideBackgroundColor: boolean
6
6
  borderColorTheme: boolean
7
+ highlightWrappers?: boolean
7
8
  }
@@ -3,6 +3,7 @@ import { DataDescription } from './DataDescription'
3
3
  export type ConfigureData = {
4
4
  dataDescription: Partial<DataDescription>
5
5
  data?: Object[]
6
+ dataMetadata?: Record<string, string>
6
7
  formattedData?: Object[]
7
8
  dataKey: string // This is the key of the dataset in the config
8
9
  }
package/types/General.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { BoxPlot } from './BoxPlot'
2
+ import { Palette } from './Palette'
2
3
 
3
4
  export type General = {
4
5
  boxplot: BoxPlot
@@ -12,4 +13,5 @@ export type General = {
12
13
  hideNullValue: boolean
13
14
  title: string
14
15
  annotationDropdownText?: string
16
+ palette?: Palette
15
17
  }
@@ -18,6 +18,7 @@ export type MarkupIncludeConfig = Visualization & {
18
18
  useInlineHTML: boolean
19
19
  }
20
20
  data?: Object[]
21
+ dataMetadata?: Record<string, string>
21
22
  enableMarkupVariables?: boolean
22
23
  filters?: VizFilter[]
23
24
  formattedData: {}
@@ -5,12 +5,13 @@ export type MarkupCondition = {
5
5
  }
6
6
 
7
7
  export type MarkupVariable = {
8
- columnName: string
8
+ columnName?: string
9
9
  conditions: MarkupCondition[]
10
10
  name: string
11
11
  tag: string
12
12
  addCommas?: boolean
13
13
  hideOnNull?: boolean
14
+ metadataKey?: string
14
15
  }
15
16
 
16
17
  export type MarkupConfig = {
@@ -0,0 +1,22 @@
1
+ export type PaletteVersion = '1.0' | '2.0'
2
+
3
+ export type PaletteBackup = {
4
+ name: string
5
+ type?: 'twoColor' | 'primary'
6
+ version?: PaletteVersion
7
+ isReversed?: boolean
8
+ }
9
+
10
+ export type Palette = {
11
+ name?: string
12
+ customColors?: string[]
13
+ customColorsOrdered?: string[]
14
+ version?: PaletteVersion
15
+ isReversed?: boolean
16
+ backups?: PaletteBackup[]
17
+ }
18
+
19
+ export type TwoColorConfig = {
20
+ palette?: string
21
+ isPaletteReversed?: boolean
22
+ }
package/types/Table.ts CHANGED
@@ -3,6 +3,12 @@ export type Pivot = {
3
3
  valueColumns: string[]
4
4
  }
5
5
 
6
+ export type DefaultSort = {
7
+ column?: string
8
+ sortDirection?: 'asc' | 'desc' | 'custom'
9
+ customOrder?: string[]
10
+ }
11
+
6
12
  export type Table = {
7
13
  caption?: string
8
14
  cellMinWidth?: number
@@ -10,6 +16,8 @@ export type Table = {
10
16
  dateDisplayFormat?: string
11
17
  showNonGeoData?: boolean
12
18
  download?: boolean
19
+ downloadDataLabel?: string
20
+ downloadImageLabel?: string
13
21
  downloadVisibleDataOnly?: boolean
14
22
  downloadImageButton?: boolean
15
23
  downloadPdfButton?: boolean
@@ -31,4 +39,5 @@ export type Table = {
31
39
  showDownloadPdfButton?: boolean
32
40
  showDownloadUrl?: boolean
33
41
  showVertical?: boolean
42
+ defaultSort?: DefaultSort
34
43
  }