@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
@@ -83,7 +83,7 @@ strong {
83
83
  }
84
84
 
85
85
  &.danger {
86
- background-color: $red;
86
+ background-color: var(--red);
87
87
  padding: 0em 0.6em 0em;
88
88
  height: 1.6em;
89
89
  font-size: 0.8 em;
@@ -131,7 +131,7 @@ textarea {
131
131
  display: flex;
132
132
  text-decoration: none;
133
133
  color: #444;
134
- border: $lightGray 1px solid;
134
+ border: var(--lightGray) 1px solid;
135
135
  position: relative;
136
136
  transition: 0.2s all;
137
137
  font-size: 1em;
@@ -139,7 +139,7 @@ textarea {
139
139
  &:before {
140
140
  content: ' ';
141
141
  width: 5px;
142
- background: $blue;
142
+ background: var(--blue);
143
143
  left: -1px;
144
144
  top: -1px;
145
145
  bottom: -1px;
@@ -147,7 +147,7 @@ textarea {
147
147
  }
148
148
 
149
149
  &:hover {
150
- background: $lightestGray;
150
+ background: var(--lightestGray);
151
151
  transition: 0.2s all;
152
152
  color: #444;
153
153
  }
@@ -158,7 +158,7 @@ textarea {
158
158
 
159
159
  svg {
160
160
  width: 60px;
161
- color: $blue;
161
+ color: var(--blue);
162
162
  margin-right: 1rem;
163
163
 
164
164
  path {
@@ -186,8 +186,8 @@ section.footnotes {
186
186
  }
187
187
 
188
188
  .btn.btn-primary:not([disabled]) {
189
- background-color: $blue;
190
- border-color: $blue;
189
+ background-color: var(--blue);
190
+ border-color: var(--blue);
191
191
 
192
192
  &:hover:not([disabled]) {
193
193
  background-color: color.adjust($blue, $lightness: -5%);
@@ -1,4 +1,4 @@
1
- .cdc-open-viz-module {
1
+ .cove-visualization {
2
2
  margin: 0;
3
3
  font-family: var(--app-font-main);
4
4
  font-size: 1em;
@@ -11,7 +11,7 @@
11
11
  outline: none !important;
12
12
  }
13
13
  }
14
- .cdc-open-viz-module {
14
+ .cove-visualization {
15
15
  applet,
16
16
  object,
17
17
  iframe,
@@ -2,19 +2,19 @@
2
2
  padding: 1rem 3rem;
3
3
  text-align: center;
4
4
  font-size: 0.875rem;
5
- color: $mediumGray;
6
- border: $lightGray 2px dashed;
5
+ color: var(--mediumGray);
6
+ border: var(--lightGray) 2px dashed;
7
7
  border-radius: 0.2rem;
8
8
  cursor: pointer;
9
9
  transition: 0.1s all;
10
10
 
11
11
  &.drag-active {
12
- background-color: $lightestGray;
12
+ background-color: var(--lightestGray);
13
13
  }
14
14
 
15
15
  span {
16
16
  white-space: pre;
17
- color: $blue;
17
+ color: var(--blue);
18
18
  text-decoration: underline;
19
19
  }
20
20
  }
@@ -1,5 +1,3 @@
1
- @import '../themes/color-definitions';
2
-
3
1
  .cove {
4
2
  margin: 0;
5
3
  font-family: var(--app-font-main);
@@ -8,14 +6,14 @@
8
6
  font-weight: 400;
9
7
  font-style: normal;
10
8
  line-height: 1.4;
11
- color: $baseColor;
9
+ color: var(--baseColor);
12
10
  text-rendering: optimizeLegibility;
13
11
 
14
12
  small {
15
13
  display: block;
16
14
  font-size: 0.8rem;
17
15
  font-style: italic;
18
- color: $mediumGray;
16
+ color: var(--mediumGray);
19
17
  }
20
18
 
21
19
  .sr-only,
@@ -1,4 +1,4 @@
1
- // @import 'reset'; //TODO: Enable after cove refactor
1
+ @import 'reset';
2
2
 
3
3
  @import 'general';
4
4
  @import 'heading';
package/styles/base.scss CHANGED
@@ -1,10 +1,5 @@
1
- @use 'sass:string';
2
-
3
1
  // Imports
4
- @import 'reset';
5
- @import 'variables';
6
- @import 'global-variables';
7
- @import 'filters';
2
+ @import 'utils/properties';
8
3
 
9
4
  body.post-type-cdc_visualization .visx-tooltip {
10
5
  z-index: 1000000;
@@ -14,177 +9,124 @@ body.post-type-cdc_visualization .cdc-editor .configure .editor-panel {
14
9
  top: 0 !important;
15
10
  }
16
11
 
17
- .cdc-open-viz-module {
12
+ .cove-visualization {
13
+ @import 'base/reset';
14
+
18
15
  position: relative;
19
- line-height: 1.4;
16
+ margin: 0;
17
+ font-family: var(--app-font-main);
18
+ font-size: 1em;
19
+ line-height: 1.5;
20
+ font-weight: 400;
21
+ font-style: normal;
22
+ text-rendering: optimizeLegibility;
20
23
  // Force printing chart images
21
24
  -webkit-print-color-adjust: exact !important; /* Chrome, Safari 6 – 15.3, Edge */
22
25
  color-adjust: exact !important; /* Firefox 48 – 96 */
23
26
  print-color-adjust: exact !important; /* Firefox 97+, Safari 15.4+ */
24
27
 
25
- @import 'global';
26
- @import 'button-section';
27
- @import 'series-list';
28
-
29
- input[type='range'] {
30
- appearance: auto !important;
28
+ .outline-none {
29
+ outline: none !important;
31
30
  }
32
31
 
33
- $theme: (
34
- 'amber': (
35
- '#fbab18',
36
- '#ffd54f',
37
- '#ffecb3',
38
- '#fff7e1'
39
- ),
40
- 'blue': (
41
- '#005eaa',
42
- '#88c3ea',
43
- '#c0e9ff',
44
- '#edf9ff'
45
- ),
46
- 'brown': (
47
- '#705043',
48
- '#ad907b',
49
- '#d7ccc8',
50
- '#f2ebe8'
51
- ),
52
- 'cyan': (
53
- '#006778',
54
- '#65b0bd',
55
- '#cce5e9',
56
- '#ebf5f6'
57
- ),
58
- 'green': (
59
- '#4b830d',
60
- '#84bc49',
61
- '#dcedc8',
62
- '#f1f8e9'
63
- ),
64
- 'indigo': (
65
- '#26418f',
66
- '#92a6dd',
67
- '#dee8ff',
68
- '#f2f6ff'
69
- ),
70
- 'orange': (
71
- '#bb4d00',
72
- '#ffad42',
73
- '#ffe97d',
74
- '#fff4cf'
75
- ),
76
- 'pink': (
77
- '#af4448',
78
- '#e57373',
79
- '#ffc2c2',
80
- '#ffe7e7'
81
- ),
82
- 'purple': (
83
- '#712177',
84
- '#b890bb',
85
- '#e3d3e4',
86
- '#f7f2f7'
87
- ),
88
- 'slate': (
89
- '#29434e',
90
- '#7e9ba5',
91
- '#b6c6d2',
92
- '#e2e8ed'
93
- ),
94
- 'teal': (
95
- '#00695c',
96
- '#4ebaaa',
97
- '#ceece7',
98
- '#ebf7f5'
99
- )
100
- );
101
-
102
- // These are required because Chronic has pages that still use TP4 and these Bootstrap5 margin classes aren't defined on those pages
103
- .me-0 {
104
- margin-right: 0 !important;
105
- }
106
- .me-1 {
107
- margin-right: 0.25rem !important;
108
- }
109
- .me-2 {
110
- margin-right: 0.5rem !important;
111
- }
112
- .me-3 {
113
- margin-right: 1rem !important;
114
- }
115
- .me-4 {
116
- margin-right: 1.5rem !important;
117
- }
118
- .me-5 {
119
- margin-right: 3rem !important;
120
- }
121
- .me-auto {
122
- margin-right: auto !important;
123
- }
124
- .ms-0 {
125
- margin-left: 0 !important;
126
- }
127
- .ms-1 {
128
- margin-left: 0.25rem !important;
129
- }
130
- .ms-2 {
131
- margin-left: 0.5rem !important;
132
- }
133
- .ms-3 {
134
- margin-left: 1rem !important;
135
- }
136
- .ms-4 {
137
- margin-left: 1.5rem !important;
138
- }
139
- .ms-5 {
140
- margin-left: 3rem !important;
141
- }
142
- .ms-auto {
143
- margin-left: auto !important;
32
+ // Normalize margins, padding, borders, and font inheritance for all common
33
+ // HTML elements so host-page styles don't bleed into visualizations.
34
+ applet,
35
+ object,
36
+ iframe,
37
+ h1, h2, h3, h4, h5, h6,
38
+ p,
39
+ blockquote,
40
+ pre,
41
+ a,
42
+ abbr,
43
+ acronym,
44
+ address,
45
+ big,
46
+ cite,
47
+ code,
48
+ del,
49
+ dfn,
50
+ em,
51
+ img,
52
+ ins,
53
+ kbd,
54
+ q,
55
+ s,
56
+ samp,
57
+ small,
58
+ strike,
59
+ strong,
60
+ sub,
61
+ sup,
62
+ tt,
63
+ var,
64
+ b,
65
+ u,
66
+ i,
67
+ center,
68
+ dl,
69
+ dt,
70
+ dd,
71
+ ol,
72
+ ul,
73
+ li,
74
+ fieldset,
75
+ legend,
76
+ caption,
77
+ article,
78
+ aside,
79
+ canvas,
80
+ details,
81
+ embed,
82
+ figure,
83
+ figcaption,
84
+ footer,
85
+ header,
86
+ hgroup,
87
+ menu,
88
+ nav,
89
+ output,
90
+ ruby,
91
+ section,
92
+ summary,
93
+ time,
94
+ mark,
95
+ audio,
96
+ video {
97
+ margin: 0;
98
+ padding: 0;
99
+ border: 0;
100
+ font-family: var(--app-font-main);
101
+ font-weight: normal;
102
+ vertical-align: baseline;
144
103
  }
145
- .pe-0 {
146
- padding-right: 0 !important;
147
- }
148
- .pe-1 {
149
- padding-right: 0.25rem !important;
150
- }
151
- .pe-2 {
152
- padding-right: 0.5rem !important;
153
- }
154
- .pe-3 {
155
- padding-right: 1rem !important;
156
- }
157
- .pe-4 {
158
- padding-right: 1.5rem !important;
159
- }
160
- .pe-5 {
161
- padding-right: 3rem !important;
162
- }
163
- .pe-auto {
164
- padding-right: auto !important;
165
- }
166
- .ps-0 {
167
- padding-left: 0 !important;
168
- }
169
- .ps-1 {
170
- padding-left: 0.25rem !important;
171
- }
172
- .ps-2 {
173
- padding-left: 0.5rem !important;
174
- }
175
- .ps-3 {
176
- padding-left: 1rem !important;
104
+
105
+ * {
106
+ box-sizing: border-box;
177
107
  }
178
- .ps-4 {
179
- padding-left: 1.5rem !important;
108
+
109
+ sub,
110
+ sup {
111
+ font-size: 75%;
112
+ line-height: 0;
113
+ position: relative;
114
+ vertical-align: baseline;
180
115
  }
181
- .ps-5 {
182
- padding-left: 3rem !important;
116
+
117
+ sup {
118
+ top: -0.5em;
183
119
  }
184
- .ps-auto {
185
- padding-left: auto !important;
120
+
121
+ sub {
122
+ bottom: -0.25em;
186
123
  }
187
- .fw-bold {
188
- font-weight: 700 !important;
124
+
125
+ @import 'global';
126
+ @import 'button-section';
127
+ @import 'series-list';
128
+
129
+ input[type='range'] {
130
+ appearance: auto !important;
189
131
  }
190
132
  }
@@ -1,8 +1,5 @@
1
- @import 'v2/utils/breakpoints';
1
+ @import 'utils/breakpoints';
2
2
  @import 'base';
3
3
  @import 'heading-colors';
4
- @import 'v2/themes/color-definitions';
5
- @import 'variables';
6
- @import '_common-components';
7
- @import 'v2/components/ui/tooltip';
8
- @import 'v2/main.scss';
4
+ @import '../components/ui/tooltip';
5
+ @import 'main';
@@ -0,0 +1,110 @@
1
+ @import 'wrapper-padding';
2
+
3
+ .cove-visualization {
4
+ border-radius: 3px;
5
+ }
6
+
7
+ .cove-visualization .cove-visualization__body {
8
+ border: solid 1px #ccc;
9
+ border-top: none;
10
+
11
+ &.component--has-legacy-border:not(.component--has-title),
12
+ &.component--has-border-color-theme:not(.no-borders):not(.component--has-title) {
13
+ border-top: solid 1px #ccc;
14
+ }
15
+ border-radius: 0 0 3px 3px;
16
+ min-width: 0;
17
+ max-width: 100%;
18
+ @include cove-visualization-body-padding;
19
+
20
+ &.no-borders {
21
+ border: none;
22
+ }
23
+
24
+ &:not(.component--hide-background-color) {
25
+ background: $lightestGray;
26
+ }
27
+
28
+ &.component--tp5-treatment {
29
+ background: transparent;
30
+
31
+ >.cove-visualization__body-wrap {
32
+ padding: 0;
33
+ }
34
+
35
+ .cdc-callout {
36
+ box-shadow: 0 2px 4px rgb(159 159 159 / 10%);
37
+ border: 1px solid #dff2f6;
38
+ margin: 0;
39
+ padding: 1.25rem;
40
+ border-radius: 0.25rem;
41
+ position: relative;
42
+ background: transparent;
43
+
44
+
45
+ .cdc-callout__flag {
46
+ position: absolute;
47
+ top: -0.36rem;
48
+ right: 1.08rem;
49
+ width: 1.84rem;
50
+ height: auto;
51
+ }
52
+
53
+ .cove-visualization__title,
54
+ .cove-visualization__header {
55
+ background: transparent;
56
+ border: 0;
57
+ color: var(--cool-gray-90, #1f2937);
58
+ margin: 0 0 1rem;
59
+ padding: 0;
60
+ border-radius: 0;
61
+ }
62
+
63
+ .cove-visualization__title h2,
64
+ .cove-visualization__header h2 {
65
+ color: var(--cool-gray-90, #1f2937);
66
+ font-family: var(--fonts-nunito, var(--app-font-secondary));
67
+ font-size: 1.1rem;
68
+ font-weight: 700;
69
+ }
70
+ }
71
+ }
72
+ }
73
+
74
+ .cove-visualization.type-chart,
75
+ .cove-visualization.type-map {
76
+ .cove-visualization__body.component--tp5-treatment {
77
+ background: transparent;
78
+
79
+ .cdc-callout {
80
+ background: transparent;
81
+ }
82
+ }
83
+ }
84
+
85
+ .cove-visualization.type-chart {
86
+ .cdc-callout.tp5-chart-callout {
87
+ width: 100%;
88
+ max-width: 100%;
89
+ min-width: 0;
90
+
91
+ .legend-wrapper,
92
+ .tooltip-boundary,
93
+ .visx-parent-size,
94
+ >div {
95
+ width: 100%;
96
+ max-width: 100%;
97
+ min-width: 0;
98
+ }
99
+
100
+ svg {
101
+ max-width: 100%;
102
+ }
103
+ }
104
+ }
105
+
106
+ .cove-visualization .cove-visualization__body-wrap {
107
+ min-width: 0;
108
+ max-width: 100%;
109
+ padding: 0;
110
+ }
@@ -9,9 +9,9 @@
9
9
  }
10
10
 
11
11
  .cove-data-table__table-wrapper {
12
- border-right: 1px solid $lightGray;
13
- border-left: 1px solid $lightGray;
14
- border-bottom: 1px solid $lightGray;
12
+ border-right: 1px solid var(--lightGray);
13
+ border-left: 1px solid var(--lightGray);
14
+ border-bottom: 1px solid var(--lightGray);
15
15
  overflow-x: auto;
16
16
  }
17
17
 
@@ -22,7 +22,7 @@
22
22
  background-size: 15px 15px; // Need to define both for IE11
23
23
  background-position: right 0.7em center;
24
24
  background-repeat: no-repeat;
25
- border: $lightGray 1px solid;
25
+ border: var(--lightGray) 1px solid;
26
26
  border-bottom: 0;
27
27
  cursor: pointer;
28
28
 
@@ -34,7 +34,7 @@
34
34
  &.collapsed {
35
35
  //TODO find fix
36
36
  //background-image: url(~@cdc/core/core/assets/icon-plus.svg);
37
- border-bottom: $lightGray 1px solid;
37
+ border-bottom: var(--lightGray) 1px solid;
38
38
  }
39
39
  }
40
40
 
@@ -53,7 +53,7 @@
53
53
 
54
54
  thead {
55
55
  color: #fff;
56
- background-color: $mediumGray;
56
+ background-color: var(--mediumGray);
57
57
  user-select: none;
58
58
 
59
59
  tr {
@@ -68,7 +68,7 @@
68
68
  position: relative;
69
69
  text-align: left;
70
70
  cursor: pointer;
71
- border-right: 1px solid $lightGray !important;
71
+ border-right: 1px solid var(--lightGray) !important;
72
72
 
73
73
  svg {
74
74
  margin-left: 1rem;
@@ -0,0 +1,27 @@
1
+ @mixin cove-visualization-body-padding {
2
+ padding-top: 0;
3
+ padding-right: 0;
4
+ padding-bottom: 0;
5
+ padding-left: 0;
6
+
7
+ &.component--has-legacy-border,
8
+ &.component--has-border-color-theme,
9
+ &.component--has-background,
10
+ &.component--has-accent {
11
+ padding-right: 1rem;
12
+ padding-left: 1rem;
13
+ }
14
+
15
+ }
16
+
17
+
18
+ @mixin cove-visualization-body-wrap-inline-padding {
19
+ padding-inline: 0;
20
+
21
+ .cove-visualization__body.component--has-legacy-border &,
22
+ .cove-visualization__body.component--has-border-color-theme &,
23
+ .cove-visualization__body.component--has-background &,
24
+ .cove-visualization__body.component--has-accent & {
25
+ padding-inline: 1rem;
26
+ }
27
+ }
@@ -20,6 +20,8 @@
20
20
 
21
21
  .subtext {
22
22
  margin-top: 1em;
23
+ font-size: var(--app-font-size);
24
+ line-height: var(--visualization-body-line-height);
23
25
  }
24
26
 
25
27
  .warning {
@@ -56,4 +58,4 @@
56
58
  @include breakpointClass(md) {
57
59
  font-size: 16px;
58
60
  }
59
- }
61
+ }