@cdc/core 4.24.12 → 4.25.2-25
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/components/DataTable/DataTable.tsx +58 -45
- package/components/DataTable/DataTableStandAlone.tsx +3 -3
- package/components/DataTable/components/ChartHeader.tsx +26 -6
- package/components/DataTable/components/ExpandCollapse.tsx +1 -4
- package/components/DataTable/components/MapHeader.tsx +5 -1
- package/components/DataTable/data-table.css +3 -8
- package/components/DataTable/helpers/chartCellMatrix.tsx +14 -5
- package/components/DataTable/helpers/customSort.ts +2 -2
- package/components/DataTable/helpers/mapCellMatrix.tsx +83 -60
- package/components/DataTable/types/TableConfig.ts +0 -1
- package/components/EditorPanel/FootnotesEditor.tsx +49 -7
- package/components/EditorPanel/Inputs.tsx +4 -0
- package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +16 -3
- package/components/Filters/Filters.tsx +95 -51
- package/components/Filters/helpers/filterWrapping.ts +43 -0
- package/components/Filters/helpers/handleSorting.ts +6 -0
- package/components/Filters/helpers/tests/handleSorting.test.ts +26 -0
- package/components/Footnotes/Footnotes.tsx +1 -1
- package/components/Layout/components/Visualization/index.tsx +18 -4
- package/components/Layout/components/Visualization/visualizations.scss +1 -1
- package/components/Legend/Legend.Gradient.tsx +1 -4
- package/components/Legend/index.tsx +1 -1
- package/components/LegendShape.tsx +2 -3
- package/components/MediaControls.jsx +32 -8
- package/components/NestedDropdown/NestedDropdown.tsx +25 -17
- package/components/NestedDropdown/nesteddropdown.styles.css +13 -7
- package/components/Table/Table.tsx +11 -11
- package/components/Table/components/Row.tsx +14 -5
- package/components/_stories/DataTable.stories.tsx +1 -2
- package/components/elements/Button.jsx +38 -19
- package/components/elements/Confirm.tsx +45 -0
- package/components/elements/Error.tsx +24 -0
- package/components/managers/DataDesigner.tsx +198 -143
- package/components/ui/Title/Title.scss +12 -5
- package/components/ui/Title/index.tsx +1 -1
- package/dist/cove-main.css +260 -723
- package/dist/cove-main.css.map +1 -1
- package/helpers/DataTransform.ts +55 -61
- package/helpers/addValuesToFilters.ts +45 -16
- package/helpers/cove/accessibility.ts +24 -0
- package/helpers/cove/fontSettings.ts +1 -1
- package/helpers/cove/number.ts +1 -7
- package/helpers/coveUpdateWorker.ts +5 -1
- package/helpers/displayDataAsText.ts +64 -0
- package/helpers/filterVizData.ts +2 -2
- package/helpers/formatConfigBeforeSave.ts +17 -2
- package/helpers/isOlderVersion.ts +20 -0
- package/helpers/isRightAlignedTableValue.js +14 -0
- package/helpers/missingRequiredSections.ts +20 -0
- package/helpers/queryStringUtils.ts +7 -0
- package/helpers/tests/addValuesToFilters.test.ts +19 -1
- package/helpers/useDataVizClasses.ts +8 -4
- package/helpers/ver/4.24.10.ts +12 -0
- package/helpers/ver/4.24.11.ts +18 -0
- package/helpers/ver/4.24.7.ts +19 -1
- package/helpers/ver/4.25.1.ts +18 -0
- package/package.json +2 -2
- package/styles/_button-section.scss +2 -5
- package/styles/_global-variables.scss +17 -7
- package/styles/_global.scss +8 -12
- package/styles/_reset.scss +4 -5
- package/styles/_typography.scss +0 -20
- package/styles/_variables.scss +0 -3
- package/styles/base.scss +44 -5
- package/styles/cove-main.scss +1 -1
- package/styles/filters.scss +65 -6
- package/styles/v2/base/_general.scss +3 -2
- package/styles/v2/components/button.scss +0 -1
- package/styles/v2/main.scss +3 -4
- package/styles/v2/themes/_color-definitions.scss +4 -4
- package/styles/v2/utils/index.scss +0 -1
- package/types/BoxPlot.ts +1 -0
- package/types/Runtime.ts +1 -0
- package/types/Table.ts +0 -1
- package/types/Version.ts +1 -1
- package/types/VizFilter.ts +3 -1
- package/styles/v2/utils/_spacers.scss +0 -31
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { footnotesSymbols } from '@cdc/core/helpers/footnoteSymbols'
|
|
2
|
+
|
|
3
|
+
const numericStrings = ['N/A', 'NA', ''].concat(footnotesSymbols.map(s => s[0]))
|
|
4
|
+
|
|
5
|
+
export default function isRightAlignedTableValue(value = '') {
|
|
6
|
+
if (!value) return false
|
|
7
|
+
if (typeof value === 'number') {
|
|
8
|
+
return !Number.isNaN(value)
|
|
9
|
+
}
|
|
10
|
+
if (typeof value === 'string') {
|
|
11
|
+
return numericStrings.includes(value) || /^[\$\d\.\%\,\-\s\(\)CI]*$/.test(value)
|
|
12
|
+
}
|
|
13
|
+
return false
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const missingRequiredSections = config => {
|
|
2
|
+
if (config.visualizationType === 'Sankey') return false // skip checks for now
|
|
3
|
+
if (config.visualizationType === 'Forecasting') return false // skip required checks for now.
|
|
4
|
+
if (config.visualizationType === 'Forest Plot') return false // skip required checks for now.
|
|
5
|
+
if (config.visualizationType === 'Pie') {
|
|
6
|
+
if (undefined === config?.yAxis.dataKey) {
|
|
7
|
+
return true
|
|
8
|
+
}
|
|
9
|
+
} else {
|
|
10
|
+
if ((undefined === config?.series || false === config?.series.length > 0) && !config?.dynamicSeries) {
|
|
11
|
+
return true
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (!config.xAxis.dataKey) {
|
|
16
|
+
return true
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return false
|
|
20
|
+
}
|
|
@@ -38,7 +38,14 @@ export function updateQueryString(queryParams) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export function updateQueryParam(key: string, value: number | string) {
|
|
41
|
+
if (!key) return
|
|
41
42
|
const queryParams = getQueryParams()
|
|
42
43
|
queryParams[key] = value
|
|
43
44
|
updateQueryString(queryParams)
|
|
44
45
|
}
|
|
46
|
+
|
|
47
|
+
export function removeQueryParam(key: string) {
|
|
48
|
+
const queryParams = getQueryParams()
|
|
49
|
+
delete queryParams[key]
|
|
50
|
+
updateQueryString(queryParams)
|
|
51
|
+
}
|
|
@@ -2,6 +2,7 @@ import _ from 'lodash'
|
|
|
2
2
|
import { VizFilter } from '../../types/VizFilter'
|
|
3
3
|
import { addValuesToFilters } from '../addValuesToFilters'
|
|
4
4
|
import { describe, it, expect, vi } from 'vitest'
|
|
5
|
+
import { FILTER_STYLE } from '@cdc/dashboard/src/types/FilterStyles'
|
|
5
6
|
|
|
6
7
|
describe('addValuesToFilters', () => {
|
|
7
8
|
const parentFilter = { columnName: 'parentColumn', id: 11, active: 'apple', values: [] } as VizFilter
|
|
@@ -26,6 +27,19 @@ describe('addValuesToFilters', () => {
|
|
|
26
27
|
expect(newFilters2[2].values).toEqual([3, 1, 4])
|
|
27
28
|
expect(newFilters2[1].values).toEqual([])
|
|
28
29
|
})
|
|
30
|
+
it('adds filter values based on parent queued active values', () => {
|
|
31
|
+
const filtersCopy = _.cloneDeep([{ ...parentFilter, queuedActive: 'pear' }, childFilter, parentFilter2])
|
|
32
|
+
const newFilters2 = addValuesToFilters(filtersCopy, data)
|
|
33
|
+
expect(newFilters2[0].values).toEqual(['apple', 'pear'])
|
|
34
|
+
expect(newFilters2[2].values).toEqual([3, 1, 4])
|
|
35
|
+
expect(newFilters2[1].values).toEqual([])
|
|
36
|
+
|
|
37
|
+
filtersCopy[0].queuedActive = 'apple'
|
|
38
|
+
const newFilters = addValuesToFilters(filtersCopy, data)
|
|
39
|
+
expect(newFilters[0].values).toEqual(['apple', 'pear'])
|
|
40
|
+
expect(newFilters[2].values).toEqual([3, 1, 4])
|
|
41
|
+
expect(newFilters[1].values).toEqual(['b'])
|
|
42
|
+
})
|
|
29
43
|
it('works when data is an object', () => {
|
|
30
44
|
const filtersCopy = _.cloneDeep(filters)
|
|
31
45
|
const newFilters = addValuesToFilters(filtersCopy, { '0': data })
|
|
@@ -36,7 +50,11 @@ describe('addValuesToFilters', () => {
|
|
|
36
50
|
//expect(newFilters[1].values).toEqual([])
|
|
37
51
|
})
|
|
38
52
|
it('works for nested dropdowns', () => {
|
|
39
|
-
const nestedParentFilter = {
|
|
53
|
+
const nestedParentFilter = {
|
|
54
|
+
...parentFilter,
|
|
55
|
+
filterStyle: FILTER_STYLE.nestedDropdown,
|
|
56
|
+
subGrouping: { columnName: 'childColumn' }
|
|
57
|
+
}
|
|
40
58
|
const newFilters = addValuesToFilters([nestedParentFilter], data)
|
|
41
59
|
expect(newFilters[0].values).toEqual(['apple', 'pear'])
|
|
42
60
|
expect(newFilters[0].subGrouping.valuesLookup).toEqual({ apple: { values: ['a', 'b'] }, pear: { values: ['c'] } })
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import useResizeObserver from '@cdc/map/src/hooks/useResizeObserver'
|
|
2
|
+
import { isBelowBreakpoint } from './viewports'
|
|
3
|
+
|
|
1
4
|
export default function useDataVizClasses(config, viewport = null) {
|
|
2
5
|
const {
|
|
3
6
|
legend,
|
|
@@ -77,16 +80,17 @@ export default function useDataVizClasses(config, viewport = null) {
|
|
|
77
80
|
]
|
|
78
81
|
|
|
79
82
|
const usePadding = !legend?.hideBorder
|
|
83
|
+
const legendPadding = `m${isBelowBreakpoint('md', viewport) ? 't' : ''}-3`
|
|
80
84
|
|
|
81
85
|
const legendClasses = {
|
|
82
86
|
aside: legendOuterClasses,
|
|
83
|
-
section: ['legend-container', usePadding ?
|
|
87
|
+
section: ['legend-container', usePadding ? legendPadding : ''],
|
|
84
88
|
ul: getUlClasses(),
|
|
85
89
|
li: ['single-legend-item', 'legend-container__li'],
|
|
86
|
-
title: ['legend-container__title'],
|
|
87
|
-
description: ['legend-container__description'],
|
|
90
|
+
title: ['legend-container__title fw-bold'],
|
|
91
|
+
description: ['legend-container__description mt-2'],
|
|
88
92
|
div: [legend?.position === 'bottom' && legend?.singleRow ? 'shape-container single-row' : 'shape-container'],
|
|
89
|
-
|
|
93
|
+
showAllButton: ['legend-container__reset-button']
|
|
90
94
|
}
|
|
91
95
|
|
|
92
96
|
return { innerContainerClasses, contentClasses, lineDatapointClass, sparkLineStyles, legendClasses }
|
package/helpers/ver/4.24.10.ts
CHANGED
|
@@ -34,12 +34,24 @@ export const setXAxisLabelOffsetToZero = newConfig => {
|
|
|
34
34
|
newConfig.xAxis.labelOffset = 0
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
export const defineFilterStyles = newConfig => {
|
|
38
|
+
if (newConfig.filters) {
|
|
39
|
+
newConfig.filters = newConfig.filters.map(filter => {
|
|
40
|
+
if (!filter.filterStyle) {
|
|
41
|
+
filter.filterStyle = 'dropdown'
|
|
42
|
+
}
|
|
43
|
+
return filter
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
37
48
|
const update_4_24_10 = config => {
|
|
38
49
|
const ver = '4.24.10'
|
|
39
50
|
const newConfig = _.cloneDeep(config)
|
|
40
51
|
setXAxisLabelOffsetToZero(newConfig)
|
|
41
52
|
changePivotColumns(newConfig)
|
|
42
53
|
removeMultiSelectPropFromMultiselect(newConfig)
|
|
54
|
+
defineFilterStyles(newConfig)
|
|
43
55
|
newConfig.version = ver
|
|
44
56
|
return newConfig
|
|
45
57
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import _ from 'lodash'
|
|
2
|
+
|
|
3
|
+
const addColorMigration = config => {
|
|
4
|
+
// add new property
|
|
5
|
+
config.migrations = config.migrations || {}
|
|
6
|
+
config.migrations.addColorMigration = true
|
|
7
|
+
return config
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const update_4_24_11 = config => {
|
|
11
|
+
const ver = '4.24.11'
|
|
12
|
+
const newConfig = _.cloneDeep(config)
|
|
13
|
+
addColorMigration(newConfig)
|
|
14
|
+
newConfig.version = ver
|
|
15
|
+
return newConfig
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default update_4_24_11
|
package/helpers/ver/4.24.7.ts
CHANGED
|
@@ -4,6 +4,21 @@ import { MultiDashboardConfig } from '@cdc/dashboard/src/types/MultiDashboard'
|
|
|
4
4
|
import { AnyVisualization } from '../../types/Visualization'
|
|
5
5
|
import versionNeedsUpdate from './versionNeedsUpdate'
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Migrates the dashboard configuration to the new format.
|
|
9
|
+
*
|
|
10
|
+
* This function performs the following transformations:
|
|
11
|
+
* - Removes `autoLoad` and `defaultValue` from `apiFilter` in shared filters.
|
|
12
|
+
* - Updates visualizations to remove `hide` and set `sharedFilterIndexes`.
|
|
13
|
+
* - Renames visualization type `filter-dropdowns` to `dashboardFilters`.
|
|
14
|
+
* - Ensures `sharedFilterIndexes` and `filterBehavior` are set for `dashboardFilters`.
|
|
15
|
+
* - Adds a new `dashboardFilters` visualization if there are shared filters but no `dashboardFilters` visualization.
|
|
16
|
+
* - Updates rows to include the new `dashboardFilters` visualization.
|
|
17
|
+
* - Removes deprecated `filterBehavior` from the configuration.
|
|
18
|
+
*
|
|
19
|
+
* @param {object} config - The dashboard configuration object to migrate.
|
|
20
|
+
* @returns {object} The migrated dashboard configuration object.
|
|
21
|
+
*/
|
|
7
22
|
export const dashboardFiltersMigrate = config => {
|
|
8
23
|
if (!config.dashboard) return config
|
|
9
24
|
const dashboardConfig = config as MultiDashboardConfig
|
|
@@ -52,7 +67,10 @@ export const dashboardFiltersMigrate = config => {
|
|
|
52
67
|
newVisualizations[vizKey] = viz
|
|
53
68
|
})
|
|
54
69
|
|
|
55
|
-
if (
|
|
70
|
+
if (
|
|
71
|
+
config.dashboard.sharedFilters.length &&
|
|
72
|
+
!Object.values(newVisualizations).find((v: AnyVisualization) => v.type === 'dashboardFilters')
|
|
73
|
+
) {
|
|
56
74
|
const newViz = {
|
|
57
75
|
type: 'dashboardFilters',
|
|
58
76
|
visualizationType: 'dashboardFilters',
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import _ from 'lodash'
|
|
2
|
+
|
|
3
|
+
const removeTerritoriesLabel = config => {
|
|
4
|
+
if (config.general?.territoriesLabel) {
|
|
5
|
+
delete config.general.territoriesLabel
|
|
6
|
+
}
|
|
7
|
+
return config
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const update_4_25_1 = config => {
|
|
11
|
+
const ver = '4.25.1'
|
|
12
|
+
const newConfig = _.cloneDeep(config)
|
|
13
|
+
removeTerritoriesLabel(newConfig)
|
|
14
|
+
newConfig.version = ver
|
|
15
|
+
return newConfig
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default update_4_25_1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdc/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.25.2-25",
|
|
4
4
|
"description": "Core components, styles, hooks, and helpers, for the CDC Open Visualization project",
|
|
5
5
|
"moduleName": "CdcCore",
|
|
6
6
|
"main": "dist/cdccore",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"react": "^18.2.0",
|
|
35
35
|
"react-dom": "^18.2.0"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "f00bd8a0fc746def7cc23b91ef49a03a3ceac65e",
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"sass": "^1.79.4"
|
|
40
40
|
}
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
display: flex;
|
|
18
18
|
justify-content: flex-end;
|
|
19
19
|
width: 100%;
|
|
20
|
+
line-height: 1;
|
|
20
21
|
&.brush-active {
|
|
21
22
|
margin-top: 2em;
|
|
22
23
|
}
|
|
@@ -24,11 +25,7 @@
|
|
|
24
25
|
margin-right: 10px;
|
|
25
26
|
}
|
|
26
27
|
& a {
|
|
27
|
-
font-size:
|
|
28
|
-
}
|
|
29
|
-
margin-top: 20px;
|
|
30
|
-
&.below-table {
|
|
31
|
-
margin-top: 5px;
|
|
28
|
+
font-size: var(--download-link-font-size);
|
|
32
29
|
}
|
|
33
30
|
}
|
|
34
31
|
|
|
@@ -81,18 +81,28 @@ $colors: (
|
|
|
81
81
|
@include theme();
|
|
82
82
|
|
|
83
83
|
:root {
|
|
84
|
+
// Spacing
|
|
84
85
|
--editorContentPadding: 30px;
|
|
85
86
|
--editorWidth: 350px;
|
|
87
|
+
--space-between-legend-item-rows: 1rem;
|
|
88
|
+
--space-between-legend-item-columns: 1.5rem;
|
|
89
|
+
// Breakpoints
|
|
86
90
|
--breakpoint-xs: 480px;
|
|
87
91
|
--breakpoint-sm: 768px;
|
|
88
92
|
--breakpoint-md: 960px;
|
|
89
93
|
--breakpoint-lg: 1170px;
|
|
90
94
|
--breakpoint-xl: 1280px;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
:
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
// Font
|
|
96
|
+
--app-font-main: 'Nunito', sans-serif;
|
|
97
|
+
--app-font-secondary: 'Poppins', sans-serif;
|
|
98
|
+
// Font sizes
|
|
99
|
+
--legend-title-font-size: 1rem;
|
|
100
|
+
--legend-description-font-size: 1rem;
|
|
101
|
+
--legend-item-font-size: 0.889rem;
|
|
102
|
+
--download-link-font-size: 0.772rem;
|
|
103
|
+
--filter-select-font-size: 0.833rem;
|
|
104
|
+
--filter-label-font-size: 0.889rem;
|
|
105
|
+
--filter-buttons-font-size: 0.889rem;
|
|
106
|
+
--superTitle-font-size: 0.833rem;
|
|
107
|
+
--title-font-size: 1.222rem;
|
|
98
108
|
}
|
package/styles/_global.scss
CHANGED
|
@@ -156,17 +156,11 @@ textarea {
|
|
|
156
156
|
|
|
157
157
|
section.introText {
|
|
158
158
|
width: 100%;
|
|
159
|
-
margin-bottom: 25px;
|
|
160
159
|
}
|
|
161
160
|
|
|
162
161
|
section.footnotes {
|
|
163
|
-
border-top: 1px solid
|
|
164
|
-
|
|
165
|
-
padding: 15px;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.cdc-chart-inner-container .subtext {
|
|
169
|
-
margin-top: 20px;
|
|
162
|
+
border-top: 1px solid var(--cool-gray-10);
|
|
163
|
+
width: 100%;
|
|
170
164
|
}
|
|
171
165
|
|
|
172
166
|
.margin-left-href {
|
|
@@ -182,14 +176,16 @@ section.footnotes {
|
|
|
182
176
|
}
|
|
183
177
|
}
|
|
184
178
|
|
|
185
|
-
|
|
186
179
|
// after migration to TP5 this declaration should be removed and all references
|
|
187
180
|
// to it should be replaced with .form-select
|
|
188
181
|
.cove-form-select {
|
|
182
|
+
font-family: var(--app-font-secondary);
|
|
183
|
+
font-weight: 300;
|
|
184
|
+
font-size: var(--filter-select-font-size);
|
|
189
185
|
display: block;
|
|
190
186
|
width: 100%;
|
|
191
187
|
padding: 0.375rem 0.75rem;
|
|
192
188
|
border-radius: 0.25rem;
|
|
193
|
-
border: 1px solid var(--
|
|
194
|
-
color: var(--
|
|
195
|
-
}
|
|
189
|
+
border: 1px solid var(--cool-gray-10);
|
|
190
|
+
color: var(--cool-gray-90);
|
|
191
|
+
}
|
package/styles/_reset.scss
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
.cdc-open-viz-module {
|
|
2
2
|
margin: 0;
|
|
3
|
-
font:
|
|
4
|
-
|
|
3
|
+
font-family: var(--app-font-main);
|
|
4
|
+
font-size: 1em;
|
|
5
|
+
line-height: 1.5;
|
|
5
6
|
font-weight: 400;
|
|
6
7
|
font-style: normal;
|
|
7
8
|
text-rendering: optimizeLegibility;
|
|
8
|
-
-webkit-font-smoothing: antialiased;
|
|
9
|
-
color: #111;
|
|
10
9
|
|
|
11
10
|
// match cdc site outline
|
|
12
11
|
:focus,
|
|
@@ -90,7 +89,7 @@
|
|
|
90
89
|
margin: 0;
|
|
91
90
|
padding: 0;
|
|
92
91
|
border: 0;
|
|
93
|
-
font-family:
|
|
92
|
+
font-family: var(--app-font-main);
|
|
94
93
|
font-weight: normal;
|
|
95
94
|
vertical-align: baseline;
|
|
96
95
|
}
|
package/styles/_typography.scss
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
&.font-small {
|
|
2
|
-
.chart-container {
|
|
3
|
-
font-size: 0.9em !important;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
&.font-medium {
|
|
8
|
-
font-size: 1em !important;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
&.font-large {
|
|
12
|
-
.chart-container {
|
|
13
|
-
font-size: 1.1em !important;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.subtext {
|
|
18
|
-
font-style: italic;
|
|
19
|
-
font-size: 0.9em !important;
|
|
20
|
-
}
|
package/styles/_variables.scss
CHANGED
package/styles/base.scss
CHANGED
|
@@ -65,12 +65,7 @@ body.post-type-cdc_visualization .cdc-editor .configure .editor-panel {
|
|
|
65
65
|
|
|
66
66
|
.cdc-open-viz-module {
|
|
67
67
|
position: relative;
|
|
68
|
-
color: $baseColor;
|
|
69
|
-
font-size: 14px !important;
|
|
70
68
|
line-height: 1.4;
|
|
71
|
-
@include breakpointClass(md) {
|
|
72
|
-
font-size: 16px !important;
|
|
73
|
-
}
|
|
74
69
|
@import 'global';
|
|
75
70
|
@import 'button-section';
|
|
76
71
|
@import 'series-list';
|
|
@@ -153,4 +148,48 @@ body.post-type-cdc_visualization .cdc-editor .configure .editor-panel {
|
|
|
153
148
|
'#ebf7f5'
|
|
154
149
|
)
|
|
155
150
|
);
|
|
151
|
+
|
|
152
|
+
// These are required because Chronic has pages that still use TP4 and these Bootstrap5 margin classes aren't defined on those pages
|
|
153
|
+
.me-0 {
|
|
154
|
+
margin-right: 0 !important;
|
|
155
|
+
}
|
|
156
|
+
.me-1 {
|
|
157
|
+
margin-right: 0.25rem !important;
|
|
158
|
+
}
|
|
159
|
+
.me-2 {
|
|
160
|
+
margin-right: 0.5rem !important;
|
|
161
|
+
}
|
|
162
|
+
.me-3 {
|
|
163
|
+
margin-right: 1rem !important;
|
|
164
|
+
}
|
|
165
|
+
.me-4 {
|
|
166
|
+
margin-right: 1.5rem !important;
|
|
167
|
+
}
|
|
168
|
+
.me-5 {
|
|
169
|
+
margin-right: 3rem !important;
|
|
170
|
+
}
|
|
171
|
+
.me-auto {
|
|
172
|
+
margin-right: auto !important;
|
|
173
|
+
}
|
|
174
|
+
.ms-0 {
|
|
175
|
+
margin-left: 0 !important;
|
|
176
|
+
}
|
|
177
|
+
.ms-1 {
|
|
178
|
+
margin-left: 0.25rem !important;
|
|
179
|
+
}
|
|
180
|
+
.ms-2 {
|
|
181
|
+
margin-left: 0.5rem !important;
|
|
182
|
+
}
|
|
183
|
+
.ms-3 {
|
|
184
|
+
margin-left: 1rem !important;
|
|
185
|
+
}
|
|
186
|
+
.ms-4 {
|
|
187
|
+
margin-left: 1.5rem !important;
|
|
188
|
+
}
|
|
189
|
+
.ms-5 {
|
|
190
|
+
margin-left: 3rem !important;
|
|
191
|
+
}
|
|
192
|
+
.ms-auto {
|
|
193
|
+
margin-left: auto !important;
|
|
194
|
+
}
|
|
156
195
|
}
|
package/styles/cove-main.scss
CHANGED
package/styles/filters.scss
CHANGED
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
&__wrapper {
|
|
3
3
|
flex-wrap: wrap;
|
|
4
4
|
display: flex;
|
|
5
|
-
gap:
|
|
6
|
-
margin-top: 15px;
|
|
7
|
-
margin-bottom: 15px;
|
|
5
|
+
gap: 18px 27px;
|
|
8
6
|
label {
|
|
9
7
|
display: inherit;
|
|
10
8
|
margin-bottom: 5px;
|
|
11
|
-
font-weight:
|
|
12
|
-
font-size:
|
|
9
|
+
font-weight: 700;
|
|
10
|
+
font-size: var(--filter-label-font-size);
|
|
13
11
|
}
|
|
14
12
|
}
|
|
15
13
|
|
|
@@ -20,6 +18,7 @@
|
|
|
20
18
|
|
|
21
19
|
&__buttons {
|
|
22
20
|
width: 100%;
|
|
21
|
+
font-size: var(--filter-buttons-font-size);
|
|
23
22
|
.apply {
|
|
24
23
|
margin-right: 10px;
|
|
25
24
|
}
|
|
@@ -27,9 +26,9 @@
|
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
div.single-filters {
|
|
30
|
-
|
|
31
29
|
label {
|
|
32
30
|
width: 100%;
|
|
31
|
+
font-weight: 700;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
&__tab-bar {
|
|
@@ -38,6 +37,10 @@ div.single-filters {
|
|
|
38
37
|
border-bottom-left-radius: 15px;
|
|
39
38
|
}
|
|
40
39
|
}
|
|
40
|
+
& > select.cove-form-select,
|
|
41
|
+
& > div.nested-dropdown {
|
|
42
|
+
width: fit-content;
|
|
43
|
+
}
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
.single-filters--tab {
|
|
@@ -54,6 +57,9 @@ div.single-filters {
|
|
|
54
57
|
border-top-left-radius: 5px;
|
|
55
58
|
border-top-right-radius: 5px;
|
|
56
59
|
margin-top: 5px;
|
|
60
|
+
font-family: var(--app-font-secondary);
|
|
61
|
+
font-size: 1rem;
|
|
62
|
+
text-align: center;
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
.tab--active {
|
|
@@ -61,6 +67,59 @@ div.single-filters {
|
|
|
61
67
|
}
|
|
62
68
|
}
|
|
63
69
|
|
|
70
|
+
.single-filters--tab-simple {
|
|
71
|
+
flex-basis: 100%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.tab-simple-container {
|
|
75
|
+
border-bottom: 1px solid var(--cool-gray-10);
|
|
76
|
+
flex-wrap: wrap;
|
|
77
|
+
|
|
78
|
+
.tab.tab--simple {
|
|
79
|
+
background: none;
|
|
80
|
+
border: none;
|
|
81
|
+
font-family: var(--app-font-secondary);
|
|
82
|
+
font-size: 1rem;
|
|
83
|
+
font-weight: 300;
|
|
84
|
+
padding: 0.5rem 1rem;
|
|
85
|
+
width: auto;
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
border-radius: 6px 6px 0 0;
|
|
88
|
+
|
|
89
|
+
@include breakpointClass(xs) {
|
|
90
|
+
font-size: 0.778em;
|
|
91
|
+
padding: 0.5rem 0.778em;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&:hover {
|
|
95
|
+
color: var(--colors-blue-vivid-60, #005ea2);
|
|
96
|
+
background: var(--colors-cyan-cool-10, #eff9fa);
|
|
97
|
+
}
|
|
98
|
+
// TODO - focus styles have to be heavy handed to override the project's global styles
|
|
99
|
+
&:focus:not(:focus-visible) {
|
|
100
|
+
outline: none !important;
|
|
101
|
+
}
|
|
102
|
+
&:focus-visible {
|
|
103
|
+
outline: 2px dashed var(--colors-blue-vivid-60, #005ea2) !important;
|
|
104
|
+
outline-offset: 3px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&.tab--active {
|
|
108
|
+
font-weight: 500;
|
|
109
|
+
border-bottom: 0.3rem solid var(--colors-blue-vivid-60, #005ea2);
|
|
110
|
+
z-index: 1;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
.cdc-open-viz-module {
|
|
115
|
+
@include breakpointClass(xs) {
|
|
116
|
+
.single-filters--tab-simple .tab-simple-container .tab.tab--simple {
|
|
117
|
+
font-size: 0.778em;
|
|
118
|
+
padding: 0.5rem 0.778em;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
64
123
|
.single-filters--pill {
|
|
65
124
|
width: 100%;
|
|
66
125
|
display: flex;
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
.cove {
|
|
4
4
|
margin: 0;
|
|
5
|
-
font:
|
|
5
|
+
font-family: var(--app-font-main);
|
|
6
|
+
font-size: 1em;
|
|
7
|
+
line-height: 1.5;
|
|
6
8
|
font-weight: 400;
|
|
7
9
|
font-style: normal;
|
|
8
10
|
line-height: 1.4;
|
|
9
11
|
color: $baseColor;
|
|
10
12
|
text-rendering: optimizeLegibility;
|
|
11
|
-
-webkit-font-smoothing: antialiased;
|
|
12
13
|
|
|
13
14
|
small {
|
|
14
15
|
display: block;
|
package/styles/v2/main.scss
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
.cove {
|
|
5
5
|
@import 'base';
|
|
6
|
-
color: $baseColor;
|
|
7
6
|
font-size: 16px;
|
|
8
7
|
line-height: 1.4;
|
|
9
8
|
|
|
@@ -13,12 +12,12 @@
|
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
margin: 0;
|
|
16
|
-
font:
|
|
15
|
+
font-family: var(--app-font-main);
|
|
16
|
+
font-size: 1em;
|
|
17
|
+
line-height: 1.5;
|
|
17
18
|
font-weight: 400;
|
|
18
19
|
font-style: normal;
|
|
19
20
|
text-rendering: optimizeLegibility;
|
|
20
|
-
-webkit-font-smoothing: antialiased;
|
|
21
|
-
color: #111;
|
|
22
21
|
|
|
23
22
|
strong {
|
|
24
23
|
font-weight: 600;
|
|
@@ -134,13 +134,13 @@ $theme: (
|
|
|
134
134
|
.cdc-open-viz-module {
|
|
135
135
|
@each $theme-name, $theme-colors in $theme {
|
|
136
136
|
&.theme-#{$theme-name} {
|
|
137
|
-
.single-filters--tab .tab--active {
|
|
137
|
+
.single-filters--tab .tab--active:not(.tab--simple) {
|
|
138
138
|
border: 1px solid string.unquote(nth($theme-colors, 1));
|
|
139
139
|
border-top: 3px solid string.unquote(nth($theme-colors, 1));
|
|
140
140
|
border-bottom: none;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
.single-filters--tab .tab:not(.tab--active) {
|
|
143
|
+
.single-filters--tab .tab:not(.tab--active):not(.tab--simple) {
|
|
144
144
|
border-bottom: 1px solid string.unquote(nth($theme-colors, 1));
|
|
145
145
|
}
|
|
146
146
|
|
|
@@ -154,13 +154,13 @@ $theme: (
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
.theme-#{$theme-name} {
|
|
157
|
-
.single-filters--tab .tab--active {
|
|
157
|
+
.single-filters--tab .tab--active:not(.tab--simple) {
|
|
158
158
|
border: 1px solid string.unquote(nth($theme-colors, 1));
|
|
159
159
|
border-top: 3px solid string.unquote(nth($theme-colors, 1));
|
|
160
160
|
border-bottom: none;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
.single-filters--tab .tab:not(.tab--active) {
|
|
163
|
+
.single-filters--tab .tab:not(.tab--active):not(.tab--simple) {
|
|
164
164
|
border-bottom: 1px solid string.unquote(nth($theme-colors, 1));
|
|
165
165
|
}
|
|
166
166
|
|
package/types/BoxPlot.ts
CHANGED