@cdc/core 4.24.9 → 4.24.11

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 (106) hide show
  1. package/LICENSE +201 -0
  2. package/assets/icon-combo-chart.svg +1 -0
  3. package/assets/icon-epi-chart.svg +27 -0
  4. package/components/AdvancedEditor/AdvancedEditor.tsx +17 -13
  5. package/components/Alert/components/Alert.tsx +34 -8
  6. package/components/BlurStrokeText.tsx +44 -0
  7. package/components/DataTable/DataTable.tsx +62 -36
  8. package/components/DataTable/DataTableStandAlone.tsx +37 -6
  9. package/components/DataTable/components/ChartHeader.tsx +31 -26
  10. package/components/DataTable/components/MapHeader.tsx +19 -10
  11. package/components/DataTable/components/SortIcon/index.tsx +25 -0
  12. package/components/DataTable/components/SortIcon/sort-icon.css +21 -0
  13. package/{styles/_data-table.scss → components/DataTable/data-table.css} +250 -298
  14. package/components/DataTable/helpers/boxplotCellMatrix.tsx +14 -13
  15. package/components/DataTable/helpers/customSort.ts +11 -15
  16. package/components/DataTable/helpers/getChartCellValue.ts +23 -5
  17. package/components/DataTable/helpers/getDataSeriesColumns.ts +5 -1
  18. package/components/DataTable/helpers/getNewSortBy.ts +35 -0
  19. package/components/DataTable/helpers/tests/customSort.test.ts +52 -0
  20. package/components/DataTable/helpers/tests/getNewSortBy.test.ts +26 -0
  21. package/components/EditorPanel/ColumnsEditor.tsx +81 -36
  22. package/components/EditorPanel/DataTableEditor.tsx +149 -43
  23. package/components/EditorPanel/FieldSetWrapper.tsx +2 -2
  24. package/components/EditorPanel/Inputs.tsx +68 -20
  25. package/components/EditorPanel/VizFilterEditor/NestedDropdownEditor.tsx +25 -7
  26. package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +30 -55
  27. package/components/{Filters.tsx → Filters/Filters.tsx} +60 -43
  28. package/components/Filters/helpers/applyQueuedActive.ts +12 -0
  29. package/components/Filters/helpers/getNestedOptions.ts +29 -0
  30. package/components/Filters/helpers/handleSorting.ts +18 -0
  31. package/components/Filters/helpers/tests/applyQueuedActive.test.ts +49 -0
  32. package/components/Filters/helpers/tests/getNestedOptions.test.ts +93 -0
  33. package/components/Filters/helpers/tests/handleSorting.test.ts +68 -0
  34. package/components/Filters/index.ts +5 -0
  35. package/components/Layout/components/Sidebar/components/sidebar.styles.scss +1 -7
  36. package/components/Layout/components/Visualization/visualizations.scss +1 -1
  37. package/components/Legend/Legend.Gradient.tsx +44 -36
  38. package/components/Loader/Loader.tsx +33 -0
  39. package/components/Loader/index.ts +1 -0
  40. package/components/Loader/loader.styles.css +13 -0
  41. package/components/MultiSelect/MultiSelect.tsx +85 -62
  42. package/components/MultiSelect/multiselect.styles.css +10 -7
  43. package/components/NestedDropdown/NestedDropdown.tsx +118 -56
  44. package/components/NestedDropdown/nestedDropdownHelpers.ts +34 -0
  45. package/components/NestedDropdown/nesteddropdown.styles.css +22 -13
  46. package/components/NestedDropdown/tests/nestedDropdownHelpers.test.ts +58 -0
  47. package/components/Table/Table.tsx +102 -34
  48. package/components/Table/components/GroupRow.tsx +1 -1
  49. package/components/_stories/BlurStrokeTest.stories.tsx +27 -0
  50. package/components/_stories/DataTable.stories.tsx +14 -0
  51. package/components/_stories/Filters.stories.tsx +57 -0
  52. package/components/_stories/NestedDropdown.stories.tsx +22 -46
  53. package/components/_stories/_mocks/DataTable/no-data.json +108 -0
  54. package/components/_stories/_mocks/nested-dropdown.json +30 -0
  55. package/components/_stories/styles.scss +0 -1
  56. package/components/ui/Icon.tsx +19 -6
  57. package/components/ui/{Tooltip.jsx → Tooltip.tsx} +38 -14
  58. package/data/colorPalettes.js +107 -10
  59. package/dist/cove-main.css +6080 -0
  60. package/dist/cove-main.css.map +1 -0
  61. package/helpers/DataTransform.ts +2 -1
  62. package/helpers/addValuesToFilters.ts +8 -3
  63. package/helpers/cove/{number.js → number.ts} +62 -27
  64. package/helpers/coveUpdateWorker.ts +6 -7
  65. package/helpers/fetchRemoteData.js +32 -37
  66. package/helpers/formatConfigBeforeSave.ts +17 -1
  67. package/helpers/gatherQueryParams.ts +12 -2
  68. package/helpers/pivotData.ts +52 -11
  69. package/helpers/queryStringUtils.ts +6 -0
  70. package/helpers/tests/gatherQueryParams.test.ts +34 -0
  71. package/helpers/tests/pivotData.test.ts +50 -0
  72. package/helpers/useDataVizClasses.ts +42 -20
  73. package/helpers/ver/4.24.10.ts +47 -0
  74. package/helpers/ver/4.24.9.ts +0 -3
  75. package/helpers/ver/tests/4.24.10.test.ts +45 -0
  76. package/helpers/viewports.ts +9 -0
  77. package/package.json +7 -3
  78. package/styles/_button-section.scss +5 -1
  79. package/styles/_global-variables.scss +20 -2
  80. package/styles/_global.scss +22 -30
  81. package/styles/_reset.scss +2 -26
  82. package/styles/base.scss +0 -1
  83. package/styles/cove-main.scss +6 -0
  84. package/styles/filters.scss +6 -26
  85. package/styles/v2/base/_reset.scss +0 -7
  86. package/styles/v2/components/editor.scss +0 -4
  87. package/styles/v2/components/icon.scss +1 -1
  88. package/styles/v2/components/ui/tooltip.scss +42 -40
  89. package/styles/v2/layout/_component.scss +0 -6
  90. package/styles/v2/layout/index.scss +0 -1
  91. package/types/Axis.ts +4 -0
  92. package/types/BoxPlot.ts +5 -3
  93. package/types/Color.ts +1 -1
  94. package/types/General.ts +1 -0
  95. package/types/Legend.ts +1 -2
  96. package/types/MarkupInclude.ts +1 -0
  97. package/types/Runtime.ts +3 -1
  98. package/types/Series.ts +8 -1
  99. package/types/Table.ts +3 -2
  100. package/types/Visualization.ts +19 -8
  101. package/types/VizFilter.ts +2 -1
  102. package/components/DataTable/components/Icons.tsx +0 -10
  103. package/components/_stories/EditorPanel.stories.tsx +0 -54
  104. package/components/_stories/Layout.Debug.stories.tsx +0 -91
  105. package/components/ui/Select.jsx +0 -30
  106. package/helpers/getGradientLegendWidth.ts +0 -15
@@ -1,38 +1,51 @@
1
1
  export default function useDataVizClasses(config, viewport = null) {
2
- const { legend } = config
2
+ const {
3
+ legend,
4
+ lineDatapointStyle,
5
+ showTitle,
6
+ title,
7
+ visualizationType,
8
+ subtext,
9
+ biteStyle,
10
+ general,
11
+ visual,
12
+ shadow
13
+ } = config
14
+
3
15
  let lineDatapointClass = ''
4
16
 
5
- if (config.lineDatapointStyle === 'hover') {
17
+ if (lineDatapointStyle === 'hover') {
6
18
  lineDatapointClass = ' chart-line--hover'
7
19
  }
8
- if (config.lineDatapointStyle === 'always show') {
20
+ if (lineDatapointStyle === 'always show') {
9
21
  lineDatapointClass = ' chart-line--always'
10
22
  }
11
23
 
12
24
  let innerContainerClasses = ['cove-component__inner']
13
25
  let contentClasses = ['cove-component__content']
14
26
 
15
- const { visualizationType, title, showTitle } = config
16
-
17
27
  if (visualizationType === 'Spark Line' || visualizationType === 'chart') {
18
28
  if (title && showTitle) contentClasses.push('component--has-title')
19
29
  }
20
30
 
21
- config.showTitle && contentClasses.push('component--has-title')
22
- config.title && config.visualizationType !== 'chart' && config.visualizationType !== 'Spark Line' && contentClasses.push('component--has-title')
23
- config.subtext && innerContainerClasses.push('component--has-subtext')
24
- config.biteStyle && innerContainerClasses.push(`bite__style--${config.biteStyle}`)
25
- config.general?.isCompactStyle && innerContainerClasses.push(`component--isCompactStyle`)
31
+ showTitle && contentClasses.push('component--has-title')
32
+ title &&
33
+ visualizationType !== 'chart' &&
34
+ visualizationType !== 'Spark Line' &&
35
+ contentClasses.push('component--has-title')
36
+ subtext && innerContainerClasses.push('component--has-subtext')
37
+ biteStyle && innerContainerClasses.push(`bite__style--${biteStyle}`)
38
+ general?.isCompactStyle && innerContainerClasses.push(`component--isCompactStyle`)
26
39
 
27
- !config.visual?.border && contentClasses.push('no-borders')
28
- config.visualizationType === 'Spark Line' && contentClasses.push('sparkline')
29
- config.visual?.borderColorTheme && contentClasses.push('component--has-borderColorTheme')
30
- config.visual?.accent && contentClasses.push('component--has-accent')
31
- config.visual?.background && contentClasses.push('component--has-background')
32
- config.visual?.hideBackgroundColor && contentClasses.push('component--hideBackgroundColor')
40
+ !visual?.border && contentClasses.push('no-borders')
41
+ visualizationType === 'Spark Line' && contentClasses.push('sparkline')
42
+ visual?.borderColorTheme && contentClasses.push('component--has-borderColorTheme')
43
+ visual?.accent && contentClasses.push('component--has-accent')
44
+ visual?.background && contentClasses.push('component--has-background')
45
+ visual?.hideBackgroundColor && contentClasses.push('component--hideBackgroundColor')
33
46
 
34
47
  // ! these two will be retired.
35
- config.shadow && innerContainerClasses.push('shadow')
48
+ shadow && innerContainerClasses.push('shadow')
36
49
  config?.visual?.roundedBorders && innerContainerClasses.push('bite--has-rounded-borders')
37
50
 
38
51
  let sparkLineStyles = {
@@ -51,14 +64,23 @@ export default function useDataVizClasses(config, viewport = null) {
51
64
  const getUlClasses = () => {
52
65
  const ulClasses = ['legend-container__ul']
53
66
  ulClasses.push(getListPosition())
67
+ if (legend?.style === 'gradient') ulClasses.push('patterns-only')
54
68
  return ulClasses
55
69
  }
56
- const hasBorder = config.legend?.hideBorder ? 'no-border' : ''
57
- const legendOuterClasses = [`${legend?.position}`, `${getListPosition()}`, `cdcdataviz-sr-focusable`, `${viewport}`, `${hasBorder}`]
70
+ const hasBorder = legend?.hideBorder ? 'no-border' : ''
71
+ const legendOuterClasses = [
72
+ `${legend?.position}`,
73
+ `${getListPosition()}`,
74
+ `cdcdataviz-sr-focusable`,
75
+ `${viewport}`,
76
+ `${hasBorder}`
77
+ ]
78
+
79
+ const usePadding = !legend?.hideBorder
58
80
 
59
81
  const legendClasses = {
60
82
  aside: legendOuterClasses,
61
- section: ['legend-container'],
83
+ section: ['legend-container', usePadding ? 'legend-padding' : ''],
62
84
  ul: getUlClasses(),
63
85
  li: ['single-legend-item', 'legend-container__li'],
64
86
  title: ['legend-container__title'],
@@ -0,0 +1,47 @@
1
+ import _ from 'lodash'
2
+
3
+ export const removeMultiSelectPropFromMultiselect = newConfig => {
4
+ if (newConfig.type === 'dashboard') {
5
+ newConfig.dashboard?.sharedFilters.forEach((filter, index) => {
6
+ if (filter.multiSelect) {
7
+ newConfig.dashboard.sharedFilters[index].filterStyle = 'multi-select'
8
+ delete newConfig.dashboard.sharedFilters[index].multiSelect
9
+ }
10
+ })
11
+ }
12
+ }
13
+
14
+ export const changePivotColumns = newConfig => {
15
+ if (newConfig.type === 'dashboard') {
16
+ Object.keys(newConfig.visualizations).forEach(key => {
17
+ const currentViz = newConfig.visualizations[key]
18
+ if (currentViz.table?.pivot?.valueColumn) {
19
+ newConfig.visualizations[key].table.pivot.valueColumns = [currentViz.table.pivot.valueColumn]
20
+ delete newConfig.visualizations[key].table.pivot.valueColumn
21
+ }
22
+ })
23
+ }
24
+ if (newConfig.table?.pivot?.valueColumn) {
25
+ newConfig.table.pivot.valueColumns = [newConfig.table.pivot.valueColumn]
26
+ delete newConfig.table.pivot.valueColumn
27
+ }
28
+
29
+ return newConfig
30
+ }
31
+
32
+ export const setXAxisLabelOffsetToZero = newConfig => {
33
+ if (!newConfig.xAxis?.labelOffset) return
34
+ newConfig.xAxis.labelOffset = 0
35
+ }
36
+
37
+ const update_4_24_10 = config => {
38
+ const ver = '4.24.10'
39
+ const newConfig = _.cloneDeep(config)
40
+ setXAxisLabelOffsetToZero(newConfig)
41
+ changePivotColumns(newConfig)
42
+ removeMultiSelectPropFromMultiselect(newConfig)
43
+ newConfig.version = ver
44
+ return newConfig
45
+ }
46
+
47
+ export default update_4_24_10
@@ -1,9 +1,6 @@
1
- import { Legend } from './../../types/Legend'
2
1
  import _ from 'lodash'
3
2
  import { AnyVisualization } from '../../types/Visualization'
4
3
  import { VizFilter } from '../../types/VizFilter'
5
- import { AnyVisualization } from '../../types/Visualization'
6
- import { VizFilter } from '../../types/VizFilter'
7
4
  import versionNeedsUpdate from './versionNeedsUpdate'
8
5
 
9
6
  /**
@@ -0,0 +1,45 @@
1
+ import { ChartConfig } from '@cdc/chart/src/types/ChartConfig'
2
+ import { changePivotColumns, removeMultiSelectPropFromMultiselect, setXAxisLabelOffsetToZero } from '../4.24.10'
3
+ import { expect, describe, it } from 'vitest'
4
+
5
+ describe('removeMultiSelectPropFromMultiSelect() ', () => {
6
+ it('replaces multiSelect boolean with filterStyle = multiSelect', () => {
7
+ const mockConfig = { type: 'dashboard', dashboard: { sharedFilters: [{ multiSelect: true }] } } as any
8
+ removeMultiSelectPropFromMultiselect(mockConfig)
9
+ expect(mockConfig.dashboard.sharedFilters[0].filterStyle).toBe('multi-select')
10
+ expect(mockConfig.dashboard.sharedFilters[0].multiSelect).toBeUndefined()
11
+ })
12
+ })
13
+
14
+ describe('changePivotColumns() ', () => {
15
+ it('works with dashboards', () => {
16
+ const config = {
17
+ type: 'dashboard',
18
+ visualizations: { a: { table: { pivot: { valueColumn: 'value' } } } }
19
+ }
20
+ const expectedConfig = {
21
+ type: 'dashboard',
22
+ visualizations: { a: { table: { pivot: { valueColumns: ['value'] } } } }
23
+ }
24
+ expect(changePivotColumns(config)).toEqual(expectedConfig)
25
+ })
26
+ it('works with regularVisualizations', () => {
27
+ const config = {
28
+ type: 'chart',
29
+ table: { pivot: { valueColumn: 'value' } }
30
+ }
31
+ const expectedConfig = {
32
+ type: 'chart',
33
+ table: { pivot: { valueColumns: ['value'] } }
34
+ }
35
+ expect(changePivotColumns(config)).toEqual(expectedConfig)
36
+ })
37
+ })
38
+
39
+ describe('setXAxisLabelOffsetToZero(config) ', () => {
40
+ it('sets the x-axis label offset to 0', () => {
41
+ const mockConfig = { xAxis: { labelOffset: 5 } } as Partial<ChartConfig>
42
+ setXAxisLabelOffsetToZero(mockConfig)
43
+ expect(mockConfig.xAxis?.labelOffset).toBe(0)
44
+ })
45
+ })
@@ -0,0 +1,9 @@
1
+ function isLegendWrapViewport(currentViewport) {
2
+ return ['xs', 'xxs'].includes(currentViewport)
3
+ }
4
+
5
+ function isMobileHeightViewport(currentViewport) {
6
+ return ['xs', 'xxs'].includes(currentViewport)
7
+ }
8
+
9
+ export { isLegendWrapViewport, isMobileHeightViewport }
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@cdc/core",
3
- "version": "4.24.9",
3
+ "version": "4.24.11",
4
4
  "description": "Core components, styles, hooks, and helpers, for the CDC Open Visualization project",
5
5
  "moduleName": "CdcCore",
6
6
  "main": "dist/cdccore",
7
7
  "scripts": {
8
8
  "test": "vitest run --environment jsdom --reporter verbose",
9
9
  "test-watch": "vitest watch --reporter verbose",
10
- "test-watch:ui": "vitest --ui"
10
+ "test-watch:ui": "vitest --ui",
11
+ "build": "sass styles/cove-main.scss dist/cove-main.css"
11
12
  },
12
13
  "repository": {
13
14
  "type": "git",
@@ -33,5 +34,8 @@
33
34
  "react": "^18.2.0",
34
35
  "react-dom": "^18.2.0"
35
36
  },
36
- "gitHead": "c4b0402afe6ed209a85b7078711549b9fd7dae7d"
37
+ "gitHead": "9ab5ee9b2b0ef7321a66a2104be6ce8899ec3808",
38
+ "devDependencies": {
39
+ "sass": "^1.79.4"
40
+ }
37
41
  }
@@ -2,7 +2,7 @@
2
2
  .download-buttons {
3
3
  display: flex;
4
4
  justify-content: flex-end;
5
- margin: 0 1em; // align w/ data table
5
+ margin: 0 0 0 auto;
6
6
 
7
7
  .btn:not(:last-child) {
8
8
  margin-right: 10px;
@@ -26,6 +26,10 @@
26
26
  & a {
27
27
  font-size: 16px;
28
28
  }
29
+ margin-top: 20px;
30
+ &.below-table {
31
+ margin-top: 5px;
32
+ }
29
33
  }
30
34
 
31
35
  // odd wrapper thats different on dashboards
@@ -2,6 +2,7 @@ $colors: (
2
2
  'baseColor': #333,
3
3
  'blue': #005eaa,
4
4
  'lightestGray': #f2f2f2,
5
+ 'gray2': #f5f5f5,
5
6
  'lightGray': #c7c7c7,
6
7
  'mediumGray': #565656,
7
8
  'darkGray': #333,
@@ -61,7 +62,7 @@ $colors: (
61
62
  'amber-primary': #fbab18,
62
63
  'amber-secondary': #ffd54f,
63
64
  'amber-tertiary': #ffecb3,
64
- 'amber-quaternary': #fff7e1,
65
+ 'amber-quaternary': #fff7e1
65
66
  );
66
67
 
67
68
  @mixin theme() {
@@ -72,4 +73,21 @@ $colors: (
72
73
  }
73
74
  }
74
75
 
75
- @include theme();
76
+ @include theme();
77
+
78
+ :root {
79
+ --editorContentPadding: 30px;
80
+ --editorWidth: 350px;
81
+ --breakpoint-xs: 480px;
82
+ --breakpoint-sm: 768px;
83
+ --breakpoint-md: 960px;
84
+ --breakpoint-lg: 1170px;
85
+ --breakpoint-xl: 1280px;
86
+ --font-size: 17px;
87
+ }
88
+
89
+ @media (max-width: 768px) {
90
+ :root {
91
+ --font-size: 0.9em;
92
+ }
93
+ }
@@ -2,10 +2,6 @@ strong {
2
2
  font-weight: 600;
3
3
  }
4
4
 
5
- .subtext {
6
- margin-top: 1em;
7
- }
8
-
9
5
  .error-box {
10
6
  background: #ffc2c2;
11
7
  display: flex;
@@ -57,15 +53,6 @@ strong {
57
53
  }
58
54
 
59
55
  .btn {
60
- background: #005eaa;
61
- color: #fff;
62
- border: 0;
63
- padding: 0.4em 0.8em;
64
- font-size: 1em;
65
- display: block;
66
- border-radius: 0.3em;
67
- transition: 0.1s background-color;
68
- cursor: pointer;
69
56
  &.full-width {
70
57
  width: 100%;
71
58
  }
@@ -93,17 +80,11 @@ strong {
93
80
  }
94
81
  }
95
82
 
96
- &:hover {
97
- transition: 0.1s all;
98
- background: lighten(#005eaa, 5%);
99
- }
100
-
101
83
  svg {
102
84
  width: 16px;
103
85
  height: 16px;
104
86
  position: relative;
105
87
  top: 2px;
106
- margin-left: 5px;
107
88
  }
108
89
  }
109
90
 
@@ -126,13 +107,6 @@ textarea {
126
107
  textarea {
127
108
  min-height: 140px;
128
109
  }
129
- select {
130
- width: 100%;
131
- font-size: 1em;
132
- font-weight: normal;
133
- text-transform: none;
134
- border: rgba(0, 0, 0, 0.3) 1px solid !important;
135
- }
136
110
 
137
111
  .input-group-text {
138
112
  border-top-left-radius: 0;
@@ -183,9 +157,6 @@ select {
183
157
  section.introText {
184
158
  width: 100%;
185
159
  margin-bottom: 25px;
186
- &.legend_visible_top {
187
- margin-bottom: 0;
188
- }
189
160
  }
190
161
 
191
162
  section.footnotes {
@@ -195,9 +166,30 @@ section.footnotes {
195
166
  }
196
167
 
197
168
  .cdc-chart-inner-container .subtext {
198
- padding: 15px 0;
169
+ margin-top: 20px;
199
170
  }
200
171
 
201
172
  .margin-left-href {
202
173
  margin-left: 15px;
203
174
  }
175
+
176
+ .btn.btn-primary:not([disabled]) {
177
+ background-color: $blue;
178
+ border-color: $blue;
179
+ &:hover:not([disabled]) {
180
+ background-color: darken($blue, 5%);
181
+ border-color: darken($blue, 5%);
182
+ }
183
+ }
184
+
185
+
186
+ // after migration to TP5 this declaration should be removed and all references
187
+ // to it should be replaced with .form-select
188
+ .cove-form-select {
189
+ display: block;
190
+ width: 100%;
191
+ padding: 0.375rem 0.75rem;
192
+ border-radius: 0.25rem;
193
+ border: 1px solid var(--lightGray);
194
+ color: var(--darkGray);
195
+ }
@@ -1,6 +1,7 @@
1
1
  .cdc-open-viz-module {
2
2
  margin: 0;
3
- font: 1em/1.6 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, Fira Sans, sans-serif;
3
+ font: 1em/1.6 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans,
4
+ Helvetica Neue, Fira Sans, sans-serif;
4
5
  font-weight: 400;
5
6
  font-style: normal;
6
7
  text-rendering: optimizeLegibility;
@@ -18,7 +19,6 @@
18
19
  }
19
20
  }
20
21
  .cdc-open-viz-module {
21
- div,
22
22
  span,
23
23
  applet,
24
24
  object,
@@ -66,17 +66,8 @@
66
66
  ul,
67
67
  li,
68
68
  fieldset,
69
- form,
70
- label,
71
69
  legend,
72
- table,
73
70
  caption,
74
- tbody,
75
- tfoot,
76
- thead,
77
- tr,
78
- th,
79
- td,
80
71
  article,
81
72
  aside,
82
73
  canvas,
@@ -105,14 +96,6 @@
105
96
  vertical-align: baseline;
106
97
  }
107
98
 
108
- button {
109
- border: 0;
110
- cursor: pointer;
111
- &:focus {
112
- outline: 0;
113
- }
114
- }
115
-
116
99
  * {
117
100
  box-sizing: border-box;
118
101
  }
@@ -146,11 +129,4 @@
146
129
  half as far down as the superscript moved up */
147
130
  bottom: -0.25em;
148
131
  }
149
-
150
- ul > li:first-child {
151
- margin-top: auto;
152
- }
153
- ul > li:last-of-type {
154
- margin-bottom: auto;
155
- }
156
132
  }
package/styles/base.scss CHANGED
@@ -71,7 +71,6 @@ body.post-type-cdc_visualization .cdc-editor .configure .editor-panel {
71
71
  @include breakpointClass(md) {
72
72
  font-size: 16px !important;
73
73
  }
74
- @import 'data-table';
75
74
  @import 'global';
76
75
  @import 'button-section';
77
76
  @import 'series-list';
@@ -0,0 +1,6 @@
1
+ @import 'base';
2
+ @import 'heading-colors';
3
+ @import 'v2/themes/color-definitions';
4
+ @import 'variables';
5
+ @import 'v2/components/ui/tooltip';
6
+ @import 'v2/main.scss'
@@ -5,6 +5,12 @@
5
5
  gap: 7px 15px;
6
6
  margin-top: 15px;
7
7
  margin-bottom: 15px;
8
+ label {
9
+ display: inherit;
10
+ margin-bottom: 5px;
11
+ font-weight: 600;
12
+ font-size: 16px;
13
+ }
8
14
  }
9
15
 
10
16
  &__intro-text {
@@ -20,28 +26,7 @@
20
26
  }
21
27
  }
22
28
 
23
- // note the diff of section and no section above.
24
- // Can't use nested selectors with top level section overwrites
25
- section.filters-section {
26
- // border: 1px solid #c7c7c7;
27
- // padding: 10px;
28
- border-radius: 10px;
29
- margin-bottom: 10px;
30
- display: block !important;
31
-
32
- &.legend_visible_top {
33
- margin-bottom: 0px;
34
- }
35
- }
36
-
37
29
  div.single-filters {
38
- display: flex;
39
- flex-wrap: wrap;
40
- margin: 15px 0;
41
-
42
- select {
43
- width: auto !important;
44
- }
45
30
 
46
31
  label {
47
32
  width: 100%;
@@ -55,11 +40,6 @@ div.single-filters {
55
40
  }
56
41
  }
57
42
 
58
- .single-filters--dropdown {
59
- width: auto;
60
- display: flex;
61
- }
62
-
63
43
  .single-filters--tab {
64
44
  width: 100%;
65
45
  display: flex;
@@ -43,13 +43,6 @@ picture {
43
43
  display: block;
44
44
  }
45
45
 
46
- input,
47
- button,
48
- textarea,
49
- select {
50
- font: inherit;
51
- }
52
-
53
46
  sub,
54
47
  sup {
55
48
  font-size: 75%;
@@ -250,10 +250,6 @@
250
250
  font-weight: normal;
251
251
  }
252
252
 
253
- .btn {
254
- margin-top: 1em;
255
- }
256
-
257
253
  .sort-list {
258
254
  list-style: none;
259
255
 
@@ -1,6 +1,6 @@
1
1
  .cove-icon {
2
2
  display: inline-flex;
3
- width: 1em;
3
+ width: 1rem;
4
4
  height: auto;
5
5
  justify-content: center;
6
6
  align-items: center;
@@ -95,56 +95,58 @@
95
95
  }
96
96
  }
97
97
 
98
- .cove-tooltip__content {
99
- max-width: var(--cove-tooltip-maxWidth);
100
- padding: 10px 8px;
101
- font-size: 0.875rem;
102
- line-height: 1.125rem;
103
- text-align: left;
104
- color: var(--cove-tooltip-color);
105
- background-color: var(--cove-tooltip-bg);
106
- border-radius: 5px;
107
- user-select: none;
108
- cursor: default;
109
- z-index: 1;
110
-
111
- &.place-top {
112
- &.has-shadow {
113
- box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
114
- }
98
+ .react-tooltip {
99
+ &.cove-tooltip__content {
100
+ max-width: var(--cove-tooltip-maxWidth);
101
+ padding: 10px 8px;
102
+ font-size: 0.875rem;
103
+ line-height: 1.125rem;
104
+ text-align: left;
105
+ color: var(--cove-tooltip-color);
106
+ background-color: var(--cove-tooltip-bg);
107
+ border-radius: 5px;
108
+ user-select: none;
109
+ cursor: default;
110
+ z-index: 1;
111
+
112
+ &.place-top {
113
+ &.has-shadow {
114
+ box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
115
+ }
115
116
 
116
- &.cove-tooltip__content--animated[class*='styles-module_show__'] {
117
- animation: tooltip-btt var(--cove-tooltip-animation);
117
+ &.cove-tooltip__content--animated[class*='styles-module_show__'] {
118
+ animation: tooltip-btt var(--cove-tooltip-animation);
119
+ }
118
120
  }
119
- }
120
121
 
121
- &.place-right {
122
- &.has-shadow {
123
- box-shadow: -4px 4px 14px rgba(0, 0, 0, 0.15), -4px 4px 8px rgba(0, 0, 0, 0.1);
124
- }
122
+ &.place-right {
123
+ &.has-shadow {
124
+ box-shadow: -4px 4px 14px rgba(0, 0, 0, 0.15), -4px 4px 8px rgba(0, 0, 0, 0.1);
125
+ }
125
126
 
126
- &.cove-tooltip__content--animated[class*='styles-module_show__'] {
127
- animation: tooltip-ltr var(--cove-tooltip-animation);
127
+ &.cove-tooltip__content--animated[class*='styles-module_show__'] {
128
+ animation: tooltip-ltr var(--cove-tooltip-animation);
129
+ }
128
130
  }
129
- }
130
131
 
131
- &.place-bottom {
132
- &.has-shadow {
133
- box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.15), 0 8px 8px rgba(0, 0, 0, 0.1);
134
- }
132
+ &.place-bottom {
133
+ &.has-shadow {
134
+ box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.15), 0 8px 8px rgba(0, 0, 0, 0.1);
135
+ }
135
136
 
136
- &.cove-tooltip__content--animated[class*='styles-module_show__'] {
137
- animation: tooltip-ttb var(--cove-tooltip-animation);
137
+ &.cove-tooltip__content--animated[class*='styles-module_show__'] {
138
+ animation: tooltip-ttb var(--cove-tooltip-animation);
139
+ }
138
140
  }
139
- }
140
141
 
141
- &.place-left {
142
- &.has-shadow {
143
- box-shadow: 4px 4px 14px rgba(0, 0, 0, 0.15), 4px 4px 8px rgba(0, 0, 0, 0.1);
144
- }
142
+ &.place-left {
143
+ &.has-shadow {
144
+ box-shadow: 4px 4px 14px rgba(0, 0, 0, 0.15), 4px 4px 8px rgba(0, 0, 0, 0.1);
145
+ }
145
146
 
146
- &.cove-tooltip__content--animated[class*='styles-module_show__'] {
147
- animation: tooltip-rtl var(--cove-tooltip-animation);
147
+ &.cove-tooltip__content--animated[class*='styles-module_show__'] {
148
+ animation: tooltip-rtl var(--cove-tooltip-animation);
149
+ }
148
150
  }
149
151
  }
150
152
  }
@@ -1,10 +1,8 @@
1
1
  .cove-component {
2
2
  border-radius: 3px;
3
- // box-shadow: rgba(0, 0, 0, 0.2) 3px 6px 10px; // no box shadows
4
3
  }
5
4
 
6
5
  .cove-component__content {
7
- padding-top: 1rem;
8
6
  border: solid 1px #ccc;
9
7
  border-top: none;
10
8
  border-radius: 0 0 3px 3px;
@@ -13,10 +11,6 @@
13
11
  border: none !important;
14
12
  }
15
13
 
16
- // .cdc-data-bite-inner-container:not(.component--has-title) .cove-component__content:not(.no-borders) {
17
- // border-top: 1px solid #ccc;
18
- // }
19
-
20
14
  .cove-component__content:not(.component--hideBackgroundColor) {
21
15
  background: $lightestGray;
22
16
  }