@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.
- package/LICENSE +201 -0
- package/assets/icon-combo-chart.svg +1 -0
- package/assets/icon-epi-chart.svg +27 -0
- package/components/AdvancedEditor/AdvancedEditor.tsx +17 -13
- package/components/Alert/components/Alert.tsx +34 -8
- package/components/BlurStrokeText.tsx +44 -0
- package/components/DataTable/DataTable.tsx +62 -36
- package/components/DataTable/DataTableStandAlone.tsx +37 -6
- package/components/DataTable/components/ChartHeader.tsx +31 -26
- package/components/DataTable/components/MapHeader.tsx +19 -10
- package/components/DataTable/components/SortIcon/index.tsx +25 -0
- package/components/DataTable/components/SortIcon/sort-icon.css +21 -0
- package/{styles/_data-table.scss → components/DataTable/data-table.css} +250 -298
- package/components/DataTable/helpers/boxplotCellMatrix.tsx +14 -13
- package/components/DataTable/helpers/customSort.ts +11 -15
- package/components/DataTable/helpers/getChartCellValue.ts +23 -5
- package/components/DataTable/helpers/getDataSeriesColumns.ts +5 -1
- package/components/DataTable/helpers/getNewSortBy.ts +35 -0
- package/components/DataTable/helpers/tests/customSort.test.ts +52 -0
- package/components/DataTable/helpers/tests/getNewSortBy.test.ts +26 -0
- package/components/EditorPanel/ColumnsEditor.tsx +81 -36
- package/components/EditorPanel/DataTableEditor.tsx +149 -43
- package/components/EditorPanel/FieldSetWrapper.tsx +2 -2
- package/components/EditorPanel/Inputs.tsx +68 -20
- package/components/EditorPanel/VizFilterEditor/NestedDropdownEditor.tsx +25 -7
- package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +30 -55
- package/components/{Filters.tsx → Filters/Filters.tsx} +60 -43
- package/components/Filters/helpers/applyQueuedActive.ts +12 -0
- package/components/Filters/helpers/getNestedOptions.ts +29 -0
- package/components/Filters/helpers/handleSorting.ts +18 -0
- package/components/Filters/helpers/tests/applyQueuedActive.test.ts +49 -0
- package/components/Filters/helpers/tests/getNestedOptions.test.ts +93 -0
- package/components/Filters/helpers/tests/handleSorting.test.ts +68 -0
- package/components/Filters/index.ts +5 -0
- package/components/Layout/components/Sidebar/components/sidebar.styles.scss +1 -7
- package/components/Layout/components/Visualization/visualizations.scss +1 -1
- package/components/Legend/Legend.Gradient.tsx +44 -36
- package/components/Loader/Loader.tsx +33 -0
- package/components/Loader/index.ts +1 -0
- package/components/Loader/loader.styles.css +13 -0
- package/components/MultiSelect/MultiSelect.tsx +85 -62
- package/components/MultiSelect/multiselect.styles.css +10 -7
- package/components/NestedDropdown/NestedDropdown.tsx +118 -56
- package/components/NestedDropdown/nestedDropdownHelpers.ts +34 -0
- package/components/NestedDropdown/nesteddropdown.styles.css +22 -13
- package/components/NestedDropdown/tests/nestedDropdownHelpers.test.ts +58 -0
- package/components/Table/Table.tsx +102 -34
- package/components/Table/components/GroupRow.tsx +1 -1
- package/components/_stories/BlurStrokeTest.stories.tsx +27 -0
- package/components/_stories/DataTable.stories.tsx +14 -0
- package/components/_stories/Filters.stories.tsx +57 -0
- package/components/_stories/NestedDropdown.stories.tsx +22 -46
- package/components/_stories/_mocks/DataTable/no-data.json +108 -0
- package/components/_stories/_mocks/nested-dropdown.json +30 -0
- package/components/_stories/styles.scss +0 -1
- package/components/ui/Icon.tsx +19 -6
- package/components/ui/{Tooltip.jsx → Tooltip.tsx} +38 -14
- package/data/colorPalettes.js +107 -10
- package/dist/cove-main.css +6080 -0
- package/dist/cove-main.css.map +1 -0
- package/helpers/DataTransform.ts +2 -1
- package/helpers/addValuesToFilters.ts +8 -3
- package/helpers/cove/{number.js → number.ts} +62 -27
- package/helpers/coveUpdateWorker.ts +6 -7
- package/helpers/fetchRemoteData.js +32 -37
- package/helpers/formatConfigBeforeSave.ts +17 -1
- package/helpers/gatherQueryParams.ts +12 -2
- package/helpers/pivotData.ts +52 -11
- package/helpers/queryStringUtils.ts +6 -0
- package/helpers/tests/gatherQueryParams.test.ts +34 -0
- package/helpers/tests/pivotData.test.ts +50 -0
- package/helpers/useDataVizClasses.ts +42 -20
- package/helpers/ver/4.24.10.ts +47 -0
- package/helpers/ver/4.24.9.ts +0 -3
- package/helpers/ver/tests/4.24.10.test.ts +45 -0
- package/helpers/viewports.ts +9 -0
- package/package.json +7 -3
- package/styles/_button-section.scss +5 -1
- package/styles/_global-variables.scss +20 -2
- package/styles/_global.scss +22 -30
- package/styles/_reset.scss +2 -26
- package/styles/base.scss +0 -1
- package/styles/cove-main.scss +6 -0
- package/styles/filters.scss +6 -26
- package/styles/v2/base/_reset.scss +0 -7
- package/styles/v2/components/editor.scss +0 -4
- package/styles/v2/components/icon.scss +1 -1
- package/styles/v2/components/ui/tooltip.scss +42 -40
- package/styles/v2/layout/_component.scss +0 -6
- package/styles/v2/layout/index.scss +0 -1
- package/types/Axis.ts +4 -0
- package/types/BoxPlot.ts +5 -3
- package/types/Color.ts +1 -1
- package/types/General.ts +1 -0
- package/types/Legend.ts +1 -2
- package/types/MarkupInclude.ts +1 -0
- package/types/Runtime.ts +3 -1
- package/types/Series.ts +8 -1
- package/types/Table.ts +3 -2
- package/types/Visualization.ts +19 -8
- package/types/VizFilter.ts +2 -1
- package/components/DataTable/components/Icons.tsx +0 -10
- package/components/_stories/EditorPanel.stories.tsx +0 -54
- package/components/_stories/Layout.Debug.stories.tsx +0 -91
- package/components/ui/Select.jsx +0 -30
- package/helpers/getGradientLegendWidth.ts +0 -15
|
@@ -1,38 +1,51 @@
|
|
|
1
1
|
export default function useDataVizClasses(config, viewport = null) {
|
|
2
|
-
const {
|
|
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 (
|
|
17
|
+
if (lineDatapointStyle === 'hover') {
|
|
6
18
|
lineDatapointClass = ' chart-line--hover'
|
|
7
19
|
}
|
|
8
|
-
if (
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
!
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
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 =
|
|
57
|
-
const legendOuterClasses = [
|
|
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
|
package/helpers/ver/4.24.9.ts
CHANGED
|
@@ -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.
|
|
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": "
|
|
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
|
|
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
|
+
}
|
package/styles/_global.scss
CHANGED
|
@@ -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
|
-
|
|
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
|
+
}
|
package/styles/_reset.scss
CHANGED
|
@@ -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,
|
|
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
package/styles/filters.scss
CHANGED
|
@@ -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;
|
|
@@ -95,56 +95,58 @@
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
&.
|
|
113
|
-
|
|
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
|
-
|
|
117
|
-
|
|
117
|
+
&.cove-tooltip__content--animated[class*='styles-module_show__'] {
|
|
118
|
+
animation: tooltip-btt var(--cove-tooltip-animation);
|
|
119
|
+
}
|
|
118
120
|
}
|
|
119
|
-
}
|
|
120
121
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
|
|
127
|
-
|
|
127
|
+
&.cove-tooltip__content--animated[class*='styles-module_show__'] {
|
|
128
|
+
animation: tooltip-ltr var(--cove-tooltip-animation);
|
|
129
|
+
}
|
|
128
130
|
}
|
|
129
|
-
}
|
|
130
131
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
|
|
137
|
-
|
|
137
|
+
&.cove-tooltip__content--animated[class*='styles-module_show__'] {
|
|
138
|
+
animation: tooltip-ttb var(--cove-tooltip-animation);
|
|
139
|
+
}
|
|
138
140
|
}
|
|
139
|
-
}
|
|
140
141
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
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
|
-
|
|
147
|
-
|
|
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
|
}
|