@cdc/core 4.26.2 → 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 (186) hide show
  1. package/LICENSE +201 -0
  2. package/_stories/Gallery.Charts.stories.tsx +1 -1
  3. package/_stories/Gallery.DataBite.stories.tsx +1 -1
  4. package/_stories/Gallery.Maps.stories.tsx +1 -1
  5. package/_stories/PageART.stories.tsx +1 -1
  6. package/_stories/PageBRFSS.stories.tsx +1 -1
  7. package/_stories/PageCancerRegistries.stories.tsx +1 -1
  8. package/_stories/PageEasternEquineEncephalitis.stories.tsx +3 -3
  9. package/_stories/PageExcessiveAlcoholUse.stories.tsx +1 -1
  10. package/_stories/PageMaternalMortality.stories.tsx +1 -1
  11. package/_stories/PageOralHealth.stories.tsx +1 -1
  12. package/_stories/PageRespiratory.stories.tsx +4 -4
  13. package/_stories/PageSmokingTobacco.stories.tsx +1 -1
  14. package/_stories/PageStateDiabetesProfiles.stories.tsx +1 -1
  15. package/_stories/PageWastewater.stories.tsx +4 -4
  16. package/_stories/VegaImport.stories.tsx +3 -3
  17. package/assets/callout-flag.svg +7 -0
  18. package/components/AdvancedEditor/EmbedEditor.tsx +1 -1
  19. package/components/Alert/components/Alert.styles.css +2 -2
  20. package/components/ComboBox/combobox.styles.css +48 -48
  21. package/components/CustomColorsEditor/CustomColorsEditor.css +53 -53
  22. package/components/DataTable/DataTable.tsx +46 -18
  23. package/components/DataTable/DataTableStandAlone.tsx +1 -0
  24. package/components/DataTable/components/ChartHeader.tsx +21 -12
  25. package/components/DataTable/components/MapHeader.tsx +34 -28
  26. package/components/DataTable/components/SortIcon/sort-icon.css +5 -5
  27. package/components/DataTable/data-table.css +50 -52
  28. package/components/DataTable/helpers/applyCustomOrder.ts +17 -0
  29. package/components/DataTable/helpers/getChartCellValue.ts +10 -7
  30. package/components/DataTable/helpers/getMapDataTableColumnKeys.ts +22 -0
  31. package/components/DataTable/helpers/mapCellMatrix.tsx +33 -23
  32. package/components/DataTable/helpers/tests/mapCellMatrix.test.ts +33 -0
  33. package/components/DownloadButton.tsx +14 -6
  34. package/components/EditorPanel/ColumnsEditor.tsx +38 -31
  35. package/components/EditorPanel/CustomSortOrder.tsx +94 -0
  36. package/components/EditorPanel/DataTableEditor.tsx +139 -23
  37. package/components/EditorPanel/EditorPanel.styles.css +71 -71
  38. package/components/EditorPanel/EditorPanel.tsx +3 -8
  39. package/components/EditorPanel/EditorPanelDispatch.tsx +4 -4
  40. package/components/EditorPanel/FootnotesEditor.tsx +2 -2
  41. package/components/EditorPanel/VizFilterEditor/NestedDropdownEditor.tsx +7 -6
  42. package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +12 -10
  43. package/components/EditorPanel/components/MarkupVariablesEditor.tsx +160 -106
  44. package/components/EditorPanel/components/PanelMarkup.tsx +5 -1
  45. package/{styles/v2/components → components/EditorPanel}/editor.scss +67 -13
  46. package/components/EditorPanel/sections/StyleTreatmentSection.tsx +99 -0
  47. package/components/EditorPanel/sections/VisualSection.tsx +11 -0
  48. package/components/EditorWrapper/editor-wrapper.style.css +1 -1
  49. package/components/Filters/Filters.tsx +3 -5
  50. package/components/Filters/components/Tabs.tsx +19 -7
  51. package/{styles → components/Filters}/filters.scss +3 -3
  52. package/components/Footnotes/FootnotesStandAlone.tsx +4 -2
  53. package/components/HeaderThemeSelector/HeaderThemeSelector.css +61 -5
  54. package/components/Layout/components/Responsive.tsx +14 -6
  55. package/components/Layout/components/Sidebar/components/Sidebar.tsx +1 -1
  56. package/components/Layout/components/Sidebar/components/sidebar.styles.scss +12 -18
  57. package/components/Layout/components/Visualization/index.tsx +39 -38
  58. package/components/Layout/components/Visualization/visualizations.scss +232 -15
  59. package/components/Layout/components/VisualizationContainer.test.tsx +67 -0
  60. package/components/Layout/components/VisualizationContainer.tsx +37 -0
  61. package/components/Layout/components/VisualizationContent.test.tsx +182 -0
  62. package/components/Layout/components/VisualizationContent.tsx +75 -0
  63. package/components/Layout/index.tsx +5 -5
  64. package/components/Layout/styles/editor-utils.scss +3 -3
  65. package/components/Layout/styles/editor.scss +4 -4
  66. package/components/Legend/Legend.Gradient.tsx +7 -1
  67. package/components/Loader/loader.styles.css +2 -2
  68. package/components/Loading.jsx +1 -1
  69. package/components/MediaControls.tsx +10 -2
  70. package/components/MultiSelect/multiselect.styles.css +19 -19
  71. package/components/NestedDropdown/nesteddropdown.styles.css +15 -15
  72. package/components/PaletteSelector/PaletteSelector.css +15 -15
  73. package/components/RichTooltip/richTooltip.css +6 -6
  74. package/components/Table/table.styles.css +2 -2
  75. package/components/Waiting.tsx +1 -1
  76. package/components/_stories/Filters.stories.tsx +1 -1
  77. package/components/_stories/styles.scss +0 -1
  78. package/components/elements/Button.jsx +1 -1
  79. package/components/elements/Card.jsx +1 -1
  80. package/{styles/v2/components → components/elements}/button.scss +9 -8
  81. package/components/inputs/InputCheckbox.jsx +1 -1
  82. package/components/inputs/InputSelect.tsx +1 -1
  83. package/components/inputs/InputText.jsx +1 -1
  84. package/components/inputs/InputToggle.tsx +1 -1
  85. package/{styles/v2/components/input → components/inputs}/_input-check-radio.scss +2 -2
  86. package/{styles/v2/components/input → components/inputs}/_input-group.scss +3 -3
  87. package/{styles/v2/components/input → components/inputs}/_input-slider.scss +2 -2
  88. package/{styles/v2/components/input → components/inputs}/_input.scss +5 -5
  89. package/{styles/v2/components/input → components/inputs}/index.scss +2 -2
  90. package/{styles → components}/loading.scss +1 -1
  91. package/components/managers/DataDesigner.tsx +1 -1
  92. package/{styles/v2/components → components/managers}/data-designer.scss +6 -7
  93. package/components/ui/Accordion.jsx +1 -1
  94. package/components/ui/Icon.tsx +1 -1
  95. package/components/ui/LoadSpin.jsx +1 -1
  96. package/components/ui/Modal.jsx +1 -1
  97. package/components/ui/Overlay.jsx +1 -1
  98. package/components/ui/Title/index.test.tsx +34 -0
  99. package/components/ui/Title/index.tsx +24 -7
  100. package/components/ui/Title/title.styles.css +119 -25
  101. package/components/ui/Tooltip.tsx +1 -1
  102. package/components/ui/_stories/Title.stories.tsx +1 -1
  103. package/{styles/v2/components → components/ui}/accordion.scss +3 -3
  104. package/components/ui/accordion.styles.css +11 -11
  105. package/{styles/v2/components → components/ui}/modal.scss +2 -2
  106. package/{styles/v2/components → components/ui}/overlay.scss +6 -6
  107. package/{styles/v2/components → components}/ui/tooltip.scss +1 -1
  108. package/{styles → components}/waiting.scss +9 -3
  109. package/devTemplate/dev.js +50 -0
  110. package/dist/cove-main.css +528 -231
  111. package/dist/cove-main.css.map +1 -1
  112. package/generateViteConfig.js +2 -2
  113. package/helpers/backfillDefaults.ts +35 -0
  114. package/helpers/constants.ts +12 -0
  115. package/helpers/cove/date.ts +32 -3
  116. package/helpers/cove/number.ts +29 -15
  117. package/helpers/coveUpdateWorker.ts +12 -8
  118. package/helpers/displayDataAsText.ts +1 -1
  119. package/helpers/embed/embedHelper.js +13 -2
  120. package/helpers/embed/index.ts +0 -4
  121. package/helpers/extractDataAndMetadata.ts +20 -0
  122. package/helpers/fetchRemoteData.ts +14 -8
  123. package/helpers/labelHash.ts +9 -0
  124. package/helpers/markupProcessor.ts +56 -38
  125. package/helpers/prepareScreenshot.ts +6 -3
  126. package/helpers/testing.ts +1 -1
  127. package/helpers/tests/abbreviateNumber.test.ts +59 -0
  128. package/helpers/tests/backfillDefaults.test.ts +253 -0
  129. package/helpers/tests/date.test.ts +46 -0
  130. package/helpers/tests/extractDataAndMetadata.test.ts +93 -0
  131. package/helpers/tests/markupProcessor.test.ts +315 -124
  132. package/helpers/tests/number.test.ts +42 -0
  133. package/helpers/tests/prepareScreenshot.test.ts +28 -28
  134. package/helpers/tests/testStandaloneBuild.ts +36 -26
  135. package/helpers/tests/useDataVizClasses.test.ts +66 -0
  136. package/helpers/tests/visualizationWrapperUsage.test.ts +57 -0
  137. package/helpers/useDataVizClasses.ts +13 -7
  138. package/helpers/ver/4.24.4.ts +24 -0
  139. package/helpers/ver/4.26.3.ts +44 -0
  140. package/helpers/ver/4.26.4.ts +31 -0
  141. package/helpers/ver/tests/4.26.3.test.ts +168 -0
  142. package/helpers/ver/tests/4.26.4.test.ts +88 -0
  143. package/helpers/ver/tests/coveUpdateWorker.test.ts +57 -0
  144. package/package.json +2 -2
  145. package/styles/_global.scss +7 -7
  146. package/styles/_reset.scss +2 -2
  147. package/styles/{v2/base → base}/_file-selector.scss +4 -4
  148. package/styles/{v2/base → base}/_general.scss +2 -4
  149. package/styles/{v2/base → base}/index.scss +1 -1
  150. package/styles/base.scss +107 -165
  151. package/styles/cove-main.scss +3 -6
  152. package/styles/layout/_component.scss +110 -0
  153. package/styles/{v2/layout → layout}/_data-table.scss +7 -7
  154. package/styles/layout/_wrapper-padding.scss +27 -0
  155. package/styles/{v2/main.scss → main.scss} +3 -1
  156. package/styles/{v2/themes → themes}/_color-definitions.scss +46 -41
  157. package/styles/{_accessibility.scss → utils/_accessibility.scss} +1 -1
  158. package/styles/{_global-variables.scss → utils/_properties.scss} +133 -112
  159. package/styles/{v2/utils → utils}/index.scss +2 -1
  160. package/types/Axis.ts +2 -0
  161. package/types/ComponentStyles.ts +1 -0
  162. package/types/ConfigureData.ts +1 -0
  163. package/types/MarkupInclude.ts +1 -0
  164. package/types/MarkupVariable.ts +2 -1
  165. package/types/Palette.ts +1 -0
  166. package/types/Table.ts +9 -0
  167. package/types/Visualization.ts +1 -0
  168. package/styles/_common-components.css +0 -73
  169. package/styles/_variables.scss +0 -63
  170. package/styles/v2/layout/_component.scss +0 -21
  171. package/styles/v2/utils/_variables.scss +0 -9
  172. package/{styles/v2/components/card.scss → components/elements/card.css} +2 -2
  173. /package/{styles/v2/components → components/ui}/icon.scss +0 -0
  174. /package/{styles/v2/components → components/ui}/loadspin.scss +0 -0
  175. /package/styles/{v2/base → base}/_heading.scss +0 -0
  176. /package/styles/{v2/base → base}/_reset.scss +0 -0
  177. /package/styles/{v2/layout → layout}/_alert.scss +0 -0
  178. /package/styles/{v2/layout → layout}/_progression.scss +0 -0
  179. /package/styles/{v2/layout → layout}/_tooltip.scss +0 -0
  180. /package/styles/{v2/layout → layout}/index.scss +0 -0
  181. /package/styles/{v2/themes → themes}/index.scss +0 -0
  182. /package/styles/{v2/utils → utils}/_align.scss +0 -0
  183. /package/styles/{v2/utils → utils}/_animations.scss +0 -0
  184. /package/styles/{v2/utils → utils}/_breakpoints.scss +0 -0
  185. /package/styles/{v2/utils → utils}/_grid.scss +0 -0
  186. /package/styles/{v2/utils → utils}/_mixins.scss +0 -0
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
+ }
@@ -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;