@cdc/core 4.26.1 → 4.26.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/qa-test-developer.md +126 -0
- package/CLAUDE.local.md +67 -0
- package/LICENSE +201 -0
- package/_stories/Gallery.Charts.stories.tsx +35 -42
- package/_stories/Gallery.DataBite.stories.tsx +15 -8
- package/_stories/Gallery.Maps.stories.tsx +37 -28
- package/_stories/Gallery.WaffleChart.stories.tsx +1 -1
- package/_stories/PageART.stories.tsx +5 -4
- package/_stories/PageBRFSS.stories.tsx +21 -16
- package/_stories/PageCancerRegistries.stories.tsx +15 -15
- package/_stories/PageEasternEquineEncephalitis.stories.tsx +33 -19
- package/_stories/PageExcessiveAlcoholUse.stories.tsx +148 -143
- package/_stories/PageMaternalMortality.stories.tsx +5 -4
- package/_stories/PageOralHealth.stories.tsx +15 -10
- package/_stories/PageRespiratory.stories.tsx +4 -4
- package/_stories/PageSmokingTobacco.stories.tsx +15 -10
- package/_stories/PageStateDiabetesProfiles.stories.tsx +15 -10
- package/_stories/PageWastewater.stories.tsx +44 -30
- package/_stories/VegaImport.stories.tsx +401 -0
- package/_stories/vega-fixtures/bars-with-line.json +444 -0
- package/_stories/vega-fixtures/bars.json +58 -0
- package/_stories/vega-fixtures/combo-bar-rolling-mean.json +88 -0
- package/_stories/vega-fixtures/combo.json +68 -0
- package/_stories/vega-fixtures/grouped-horizontal-bars.json +83 -0
- package/_stories/vega-fixtures/grouped-horizontal-bars2.json +231 -0
- package/_stories/vega-fixtures/horizontal-bar.json +427 -0
- package/_stories/vega-fixtures/horizontal-bars-with-bad-colors.json +197 -0
- package/_stories/vega-fixtures/horizontal-bars2.json +58 -0
- package/_stories/vega-fixtures/lines.json +227 -0
- package/_stories/vega-fixtures/measles-bars.json +348 -0
- package/_stories/vega-fixtures/measles-map.json +11101 -0
- package/_stories/vega-fixtures/measles-stacked-bars.json +2147 -0
- package/_stories/vega-fixtures/multi-dataset.json +255 -0
- package/_stories/vega-fixtures/no-data.json +14 -0
- package/_stories/vega-fixtures/pie-chart.json +94 -0
- package/_stories/vega-fixtures/repeat-spec.json +47 -0
- package/_stories/vega-fixtures/stacked-area.json +222 -0
- package/_stories/vega-fixtures/stacked-bar-with-rect.json +3412 -0
- package/_stories/vega-fixtures/stacked-bars-with-line.json +364 -0
- package/_stories/vega-fixtures/stacked-bars.json +212 -0
- package/_stories/vega-fixtures/stacked-horizontal-bars.json +140 -0
- package/_stories/vega-fixtures/warning-combo.json +59 -0
- package/_stories/vega-fixtures/warning-scatter-and-line.json +1182 -0
- package/assets/callout-flag.svg +7 -0
- package/assets/icon-chart-area.svg +1 -0
- package/assets/icon-chart-radar.svg +23 -0
- package/assets/logo2.svg +31 -0
- package/components/AdvancedEditor/EmbedEditor.tsx +270 -38
- package/components/Alert/components/Alert.styles.css +2 -2
- package/components/ComboBox/combobox.styles.css +48 -48
- package/components/CustomColorsEditor/CustomColorsEditor.css +53 -53
- package/components/CustomColorsEditor/CustomColorsEditor.tsx +3 -10
- package/components/DataTable/DataTable.tsx +46 -18
- package/components/DataTable/DataTableStandAlone.tsx +1 -0
- package/components/DataTable/components/ChartHeader.tsx +21 -12
- package/components/DataTable/components/MapHeader.tsx +34 -28
- package/components/DataTable/components/SortIcon/sort-icon.css +5 -5
- package/components/DataTable/data-table.css +50 -52
- package/components/DataTable/helpers/applyCustomOrder.ts +17 -0
- package/components/DataTable/helpers/getChartCellValue.ts +10 -7
- package/components/DataTable/helpers/getMapDataTableColumnKeys.ts +22 -0
- package/components/DataTable/helpers/getSeriesName.ts +6 -0
- package/components/DataTable/helpers/mapCellMatrix.tsx +33 -23
- package/components/DataTable/helpers/tests/mapCellMatrix.test.ts +33 -0
- package/components/DownloadButton.tsx +14 -6
- package/components/EditorPanel/ColumnsEditor.tsx +38 -31
- package/components/EditorPanel/CustomSortOrder.tsx +94 -0
- package/components/EditorPanel/DataTableEditor.tsx +139 -23
- package/components/EditorPanel/EditorPanel.styles.css +71 -71
- package/components/EditorPanel/EditorPanel.tsx +3 -8
- package/components/EditorPanel/EditorPanelDispatch.tsx +4 -4
- package/components/EditorPanel/FootnotesEditor.tsx +2 -2
- package/components/EditorPanel/VizFilterEditor/NestedDropdownEditor.tsx +21 -12
- package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +16 -10
- package/components/EditorPanel/VizFilterEditor/components/FilterOrder.tsx +33 -29
- package/components/EditorPanel/components/MarkupVariablesEditor.tsx +160 -106
- package/components/EditorPanel/components/PanelMarkup.tsx +5 -1
- package/{styles/v2/components → components/EditorPanel}/editor.scss +76 -22
- package/components/EditorPanel/sections/StyleTreatmentSection.tsx +99 -0
- package/components/EditorPanel/sections/VisualSection.tsx +11 -0
- package/components/EditorWrapper/editor-wrapper.style.css +1 -1
- package/components/Filters/Filters.tsx +3 -5
- package/components/Filters/components/Tabs.tsx +19 -7
- package/{styles → components/Filters}/filters.scss +3 -3
- package/components/Footnotes/FootnotesStandAlone.tsx +4 -2
- package/components/HeaderThemeSelector/HeaderThemeSelector.css +61 -5
- package/components/Layout/components/Responsive.tsx +14 -6
- package/components/Layout/components/Sidebar/components/Sidebar.tsx +1 -1
- package/components/Layout/components/Sidebar/components/sidebar.styles.scss +14 -20
- package/components/Layout/components/Visualization/index.tsx +50 -38
- package/components/Layout/components/Visualization/visualizations.scss +232 -15
- package/components/Layout/components/VisualizationContainer.test.tsx +67 -0
- package/components/Layout/components/VisualizationContainer.tsx +37 -0
- package/components/Layout/components/VisualizationContent.test.tsx +182 -0
- package/components/Layout/components/VisualizationContent.tsx +75 -0
- package/components/Layout/index.tsx +5 -5
- package/components/Layout/styles/editor-utils.scss +3 -3
- package/components/Layout/styles/editor.scss +4 -4
- package/components/Legend/Legend.Gradient.tsx +7 -1
- package/components/Loader/loader.styles.css +2 -2
- package/components/Loading.jsx +1 -1
- package/components/MediaControls.tsx +10 -3
- package/components/MultiSelect/multiselect.styles.css +19 -19
- package/components/NestedDropdown/nesteddropdown.styles.css +15 -15
- package/components/PaletteSelector/PaletteSelector.css +15 -15
- package/components/RichTooltip/richTooltip.css +6 -6
- package/components/Table/table.styles.css +2 -2
- package/components/Waiting.tsx +1 -1
- package/components/_stories/CustomColorsEditor.stories.tsx +37 -0
- package/components/_stories/DataTable.stories.tsx +1 -0
- package/components/_stories/Filters.stories.tsx +1 -1
- package/components/_stories/styles.scss +0 -1
- package/components/elements/Button.jsx +1 -1
- package/components/elements/Card.jsx +1 -1
- package/{styles/v2/components → components/elements}/button.scss +9 -8
- package/components/inputs/InputCheckbox.jsx +1 -1
- package/components/inputs/InputSelect.tsx +1 -1
- package/components/inputs/InputText.jsx +1 -1
- package/components/inputs/InputToggle.tsx +1 -1
- package/{styles/v2/components/input → components/inputs}/_input-check-radio.scss +2 -2
- package/{styles/v2/components/input → components/inputs}/_input-group.scss +3 -3
- package/{styles/v2/components/input → components/inputs}/_input-slider.scss +2 -2
- package/{styles/v2/components/input → components/inputs}/_input.scss +5 -5
- package/{styles/v2/components/input → components/inputs}/index.scss +2 -2
- package/{styles → components}/loading.scss +1 -1
- package/components/managers/DataDesigner.tsx +1 -1
- package/{styles/v2/components → components/managers}/data-designer.scss +6 -7
- package/components/ui/Accordion.jsx +1 -1
- package/components/ui/Icon.tsx +1 -1
- package/components/ui/LoadSpin.jsx +1 -1
- package/components/ui/Modal.jsx +1 -1
- package/components/ui/Overlay.jsx +1 -1
- package/components/ui/Title/index.test.tsx +34 -0
- package/components/ui/Title/index.tsx +24 -7
- package/components/ui/Title/title.styles.css +119 -25
- package/components/ui/Tooltip.tsx +1 -1
- package/components/ui/_stories/Title.stories.tsx +1 -1
- package/{styles/v2/components → components/ui}/accordion.scss +3 -3
- package/components/ui/accordion.styles.css +11 -11
- package/{styles/v2/components → components/ui}/modal.scss +2 -2
- package/{styles/v2/components → components/ui}/overlay.scss +6 -6
- package/{styles/v2/components → components}/ui/tooltip.scss +1 -1
- package/{styles → components}/waiting.scss +9 -3
- package/data/colorPalettes.ts +18 -5
- package/data/mapColorPalettes.ts +10 -0
- package/devTemplate/dev.js +285 -0
- package/devTemplate/index.html +30 -0
- package/devTemplate/preview.html +1503 -0
- package/devTemplate/sidebar.css +151 -0
- package/dist/cove-main.css +2530 -3901
- package/dist/cove-main.css.map +1 -1
- package/generateViteConfig.js +111 -2
- package/helpers/DataTransform.ts +1 -5
- package/helpers/backfillDefaults.ts +35 -0
- package/helpers/constants.ts +12 -0
- package/helpers/cove/date.ts +64 -3
- package/helpers/cove/number.ts +29 -15
- package/helpers/cove/string.ts +29 -0
- package/helpers/coveUpdateWorker.ts +14 -8
- package/helpers/displayDataAsText.ts +1 -1
- package/helpers/embed/embedCodeGenerator.ts +80 -0
- package/helpers/embed/embedHelper.js +169 -0
- package/helpers/embed/filterUtils.ts +121 -0
- package/helpers/embed/index.ts +17 -0
- package/helpers/embed/urlValidation.ts +119 -0
- package/helpers/extractDataAndMetadata.ts +20 -0
- package/helpers/fetchRemoteData.ts +14 -8
- package/helpers/filterVizData.ts +6 -1
- package/helpers/getFileExtension.ts +0 -6
- package/helpers/labelHash.ts +9 -0
- package/helpers/markupProcessor.ts +56 -38
- package/helpers/metrics/types.ts +3 -0
- package/helpers/palettes/colorDistributions.ts +1 -1
- package/helpers/palettes/utils.ts +12 -12
- package/helpers/parseCsvWithQuotes.ts +15 -14
- package/helpers/prepareScreenshot.ts +33 -10
- package/helpers/testing.ts +44 -0
- package/helpers/tests/DataTransform.test.ts +125 -0
- package/helpers/tests/abbreviateNumber.test.ts +59 -0
- package/helpers/tests/backfillDefaults.test.ts +253 -0
- package/helpers/tests/date.test.ts +110 -0
- package/helpers/tests/extractDataAndMetadata.test.ts +93 -0
- package/helpers/tests/markupProcessor.test.ts +315 -124
- package/helpers/tests/number.test.ts +42 -0
- package/helpers/tests/prepareScreenshot.test.ts +28 -28
- package/helpers/tests/testStandaloneBuild.ts +36 -26
- package/helpers/tests/useDataVizClasses.test.ts +66 -0
- package/helpers/tests/visualizationWrapperUsage.test.ts +57 -0
- package/helpers/useDataVizClasses.ts +13 -7
- package/helpers/vegaConfig.ts +1 -1
- package/helpers/vegaConfigImport.ts +160 -0
- package/helpers/ver/4.24.4.ts +24 -0
- package/helpers/ver/4.26.1.ts +1 -1
- package/helpers/ver/4.26.2.ts +84 -0
- package/helpers/ver/4.26.3.ts +44 -0
- package/helpers/ver/4.26.4.ts +31 -0
- package/helpers/ver/tests/4.26.1.test.ts +105 -0
- package/helpers/ver/tests/4.26.2.test.ts +298 -0
- package/helpers/ver/tests/4.26.3.test.ts +168 -0
- package/helpers/ver/tests/4.26.4.test.ts +88 -0
- package/helpers/ver/tests/coveUpdateWorker.test.ts +57 -0
- package/helpers/viewports.ts +2 -0
- package/package.json +27 -32
- package/styles/_global.scss +7 -7
- package/styles/_reset.scss +2 -2
- package/styles/{v2/base → base}/_file-selector.scss +4 -4
- package/styles/{v2/base → base}/_general.scss +2 -4
- package/styles/{v2/base → base}/index.scss +1 -1
- package/styles/base.scss +107 -165
- package/styles/cove-main.scss +3 -6
- package/styles/layout/_component.scss +110 -0
- package/styles/{v2/layout → layout}/_data-table.scss +7 -7
- package/styles/layout/_wrapper-padding.scss +27 -0
- package/styles/{v2/main.scss → main.scss} +3 -1
- package/styles/{v2/themes → themes}/_color-definitions.scss +46 -41
- package/styles/{_accessibility.scss → utils/_accessibility.scss} +1 -1
- package/styles/{v2/utils → utils}/_grid.scss +8 -3
- package/styles/{_global-variables.scss → utils/_properties.scss} +133 -112
- package/styles/{v2/utils → utils}/index.scss +2 -1
- package/types/Annotation.ts +10 -11
- package/types/Axis.ts +2 -0
- package/types/ComponentStyles.ts +1 -0
- package/types/ConfigureData.ts +1 -0
- package/types/General.ts +2 -0
- package/types/MarkupInclude.ts +1 -0
- package/types/MarkupVariable.ts +2 -1
- package/types/Palette.ts +22 -0
- package/types/Table.ts +9 -0
- package/types/Visualization.ts +7 -0
- package/_stories/StoryRenderingTests.stories.tsx +0 -164
- package/helpers/embedCodeGenerator.ts +0 -109
- package/styles/_common-components.css +0 -73
- package/styles/_variables.scss +0 -63
- package/styles/v2/layout/_component.scss +0 -21
- package/styles/v2/utils/_variables.scss +0 -9
- package/{styles/v2/components/card.scss → components/elements/card.css} +2 -2
- /package/{styles/v2/components → components/ui}/icon.scss +0 -0
- /package/{styles/v2/components → components/ui}/loadspin.scss +0 -0
- /package/styles/{v2/base → base}/_heading.scss +0 -0
- /package/styles/{v2/base → base}/_reset.scss +0 -0
- /package/styles/{v2/layout → layout}/_alert.scss +0 -0
- /package/styles/{v2/layout → layout}/_progression.scss +0 -0
- /package/styles/{v2/layout → layout}/_tooltip.scss +0 -0
- /package/styles/{v2/layout → layout}/index.scss +0 -0
- /package/styles/{v2/themes → themes}/index.scss +0 -0
- /package/styles/{v2/utils → utils}/_align.scss +0 -0
- /package/styles/{v2/utils → utils}/_animations.scss +0 -0
- /package/styles/{v2/utils → utils}/_breakpoints.scss +0 -0
- /package/styles/{v2/utils → utils}/_mixins.scss +0 -0
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
DATA_TABLE_SINGLE_ROW,
|
|
10
10
|
DATA_TABLE_MULTI_ROW
|
|
11
11
|
} from '../../templates/dataDesignerTables'
|
|
12
|
-
import '
|
|
12
|
+
import './data-designer.scss'
|
|
13
13
|
import { ConfigureData } from '../../types/ConfigureData'
|
|
14
14
|
|
|
15
15
|
type DataDesignerProps = {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
@import '
|
|
2
|
-
@import '../themes/color-definitions';
|
|
1
|
+
@import '../../styles/utils/properties';
|
|
3
2
|
|
|
4
3
|
.cove-modal__content {
|
|
5
4
|
.dataset-selector-container {
|
|
@@ -59,7 +58,7 @@
|
|
|
59
58
|
right: 0;
|
|
60
59
|
bottom: 0;
|
|
61
60
|
left: 0;
|
|
62
|
-
border: 1px solid
|
|
61
|
+
border: 1px solid var(--lightGray);
|
|
63
62
|
border-radius: 0.25rem;
|
|
64
63
|
}
|
|
65
64
|
}
|
|
@@ -82,20 +81,20 @@
|
|
|
82
81
|
table {
|
|
83
82
|
font-size: 0.8rem;
|
|
84
83
|
background-color: #fff;
|
|
85
|
-
border: 1px solid
|
|
84
|
+
border: 1px solid var(--lightGray);
|
|
86
85
|
border-collapse: collapse;
|
|
87
86
|
|
|
88
87
|
th {
|
|
89
88
|
color: white;
|
|
90
89
|
text-align: left;
|
|
91
|
-
background-color:
|
|
90
|
+
background-color: var(--primary);
|
|
92
91
|
}
|
|
93
92
|
|
|
94
93
|
th,
|
|
95
94
|
td {
|
|
96
95
|
padding: 0 5px;
|
|
97
|
-
border-top: 1px solid
|
|
98
|
-
border-bottom: 1px solid
|
|
96
|
+
border-top: 1px solid var(--lightGray);
|
|
97
|
+
border-bottom: 1px solid var(--lightGray);
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
100
|
}
|
|
@@ -11,7 +11,7 @@ import PropTypes from 'prop-types'
|
|
|
11
11
|
import Icon from './Icon'
|
|
12
12
|
import Tooltip from './Tooltip'
|
|
13
13
|
|
|
14
|
-
import '
|
|
14
|
+
import './accordion.scss'
|
|
15
15
|
import './accordion.styles.css'
|
|
16
16
|
|
|
17
17
|
//Define the "slots" to be populated by subcomponents
|
package/components/ui/Icon.tsx
CHANGED
|
@@ -38,7 +38,7 @@ import iconRotateLeft from '../../assets/icon-rotate-left.svg'
|
|
|
38
38
|
import iconCommand from '../../assets/icon-command.svg'
|
|
39
39
|
import iconMagnifyingGlass from '../../assets/icon-magnifying-glass.svg'
|
|
40
40
|
|
|
41
|
-
import '
|
|
41
|
+
import './icon.scss'
|
|
42
42
|
|
|
43
43
|
const iconHash = {
|
|
44
44
|
caretUp: iconCaretUp,
|
package/components/ui/Modal.jsx
CHANGED
|
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
|
|
|
4
4
|
import { useGlobalContext } from '../GlobalContext'
|
|
5
5
|
import Icon from './Icon'
|
|
6
6
|
|
|
7
|
-
import '
|
|
7
|
+
import './modal.scss'
|
|
8
8
|
|
|
9
9
|
//Define the "slots" to be populated by subcomponents
|
|
10
10
|
const ModalHeader = () => null
|
|
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'
|
|
|
2
2
|
|
|
3
3
|
import { useGlobalContext } from '../GlobalContext'
|
|
4
4
|
|
|
5
|
-
import '
|
|
5
|
+
import './overlay.scss'
|
|
6
6
|
|
|
7
7
|
const Overlay = ({ disableBgClose, children, override = null }) => {
|
|
8
8
|
//Access global modal state
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { render, screen } from '@testing-library/react'
|
|
3
|
+
import { describe, expect, it } from 'vitest'
|
|
4
|
+
import Title from './index'
|
|
5
|
+
|
|
6
|
+
const baseConfig = {
|
|
7
|
+
type: 'chart',
|
|
8
|
+
theme: 'theme-blue'
|
|
9
|
+
} as any
|
|
10
|
+
|
|
11
|
+
describe('Title', () => {
|
|
12
|
+
it('does not add legacy bottom margin classes for wrapped visualizations', () => {
|
|
13
|
+
render(<Title title='Wrapped title' titleStyle='legacy' config={baseConfig} />)
|
|
14
|
+
|
|
15
|
+
expect(screen.getByRole('banner')).not.toHaveClass('mb-3')
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it('keeps legacy dashboard title spacing classes', () => {
|
|
19
|
+
render(<Title title='Dashboard title' titleStyle='legacy' config={baseConfig} isDashboard={true} />)
|
|
20
|
+
|
|
21
|
+
expect(screen.getByRole('banner')).toHaveClass('mb-3')
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
it('renders legacy custom header markup via modern shim wrapper', () => {
|
|
25
|
+
const legacyHeaderTitle =
|
|
26
|
+
'<header class="cove-component__header component__header theme-blue mb-0"><h2>Medicaid Coverage of Cessation Treatments, 2024-Q2</h2></header>'
|
|
27
|
+
|
|
28
|
+
const { container } = render(<Title title={legacyHeaderTitle} titleStyle='small' config={baseConfig} />)
|
|
29
|
+
|
|
30
|
+
expect(container.querySelector('.cove-title__legacy-shim')).toBeInTheDocument()
|
|
31
|
+
expect(container.querySelector('.cove-title h3')).not.toBeInTheDocument()
|
|
32
|
+
expect(container.querySelector('header.cove-component__header.component__header')).toBeInTheDocument()
|
|
33
|
+
})
|
|
34
|
+
})
|
|
@@ -19,6 +19,7 @@ type HeaderProps = {
|
|
|
19
19
|
|
|
20
20
|
const Title = (props: HeaderProps) => {
|
|
21
21
|
const {
|
|
22
|
+
config,
|
|
22
23
|
isDashboard,
|
|
23
24
|
title,
|
|
24
25
|
superTitle,
|
|
@@ -29,6 +30,10 @@ const Title = (props: HeaderProps) => {
|
|
|
29
30
|
noContent = false
|
|
30
31
|
} = props
|
|
31
32
|
|
|
33
|
+
// Temporary visual verification gate for the legacy title shim.
|
|
34
|
+
const SHOW_SHIM_TITLE = false
|
|
35
|
+
const shimThemeClass = props.theme || config?.theme || 'theme-blue'
|
|
36
|
+
|
|
32
37
|
if (titleStyle === 'large' || titleStyle === 'small') {
|
|
33
38
|
const TitleElement = titleStyle === 'large' ? 'h2' : 'h3'
|
|
34
39
|
|
|
@@ -47,17 +52,29 @@ const Title = (props: HeaderProps) => {
|
|
|
47
52
|
}
|
|
48
53
|
|
|
49
54
|
// LEGACY BLOCKY HEADER (Original design with colored backgrounds)
|
|
50
|
-
const updatedClasses = [
|
|
55
|
+
const updatedClasses = [
|
|
56
|
+
'cove-visualization__title',
|
|
57
|
+
'cove-visualization__header',
|
|
58
|
+
...(isDashboard ? ['mb-3'] : []),
|
|
59
|
+
...classes
|
|
60
|
+
]
|
|
51
61
|
|
|
52
62
|
return (
|
|
53
63
|
title &&
|
|
54
64
|
showTitle && (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
<>
|
|
66
|
+
<header className={updatedClasses.join(' ')} style={props.style}>
|
|
67
|
+
{superTitle && <sup>{parse(superTitle)}</sup>}
|
|
68
|
+
<h2>
|
|
69
|
+
{parse(title)} {isDashboard}
|
|
70
|
+
</h2>
|
|
71
|
+
</header>
|
|
72
|
+
{SHOW_SHIM_TITLE && (
|
|
73
|
+
<div className='cove-title__legacy-preview'>
|
|
74
|
+
<header class="cove-component__header component__header theme-blue mb-0"><h2>Medicaid Coverage of Cessation Treatments, 2024-Q2</h2></header>
|
|
75
|
+
</div>
|
|
76
|
+
)}
|
|
77
|
+
</>
|
|
61
78
|
)
|
|
62
79
|
)
|
|
63
80
|
}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
.cove-visualization header.cove-visualization__title,
|
|
2
|
+
.cove-visualization header.cove-visualization__header {
|
|
3
|
+
|
|
4
|
+
border-top-left-radius: 3px;
|
|
5
|
+
border-top-right-radius: 3px;
|
|
5
6
|
color: var(--white);
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 1rem;
|
|
9
|
+
position: relative;
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
font-size: var(--superTitle-font-size);
|
|
11
|
+
&>sup {
|
|
9
12
|
font-family: var(--app-font-secondary);
|
|
13
|
+
font-size: var(--superTitle-font-size);
|
|
10
14
|
font-weight: 500;
|
|
11
15
|
text-transform: uppercase;
|
|
12
16
|
top: 0;
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
h2 {
|
|
16
|
-
font-size: var(--title-font-size);
|
|
17
|
-
font-family: var(--app-font-secondary);
|
|
18
20
|
color: var(--white);
|
|
21
|
+
font-family: var(--app-font-secondary);
|
|
22
|
+
font-size: var(--title-font-size);
|
|
19
23
|
margin: 0;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
|
-
border-top-left-radius: 3px;
|
|
23
|
-
border-top-right-radius: 3px;
|
|
24
|
-
|
|
25
26
|
&.mb-0 {
|
|
26
27
|
margin-bottom: 0 !important;
|
|
27
28
|
}
|
|
@@ -35,8 +36,8 @@
|
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
&:not(:empty) {
|
|
38
|
-
border-bottom-width: 4px;
|
|
39
39
|
border-bottom-style: solid;
|
|
40
|
+
border-bottom-width: 4px;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
&.bite-header {
|
|
@@ -47,42 +48,52 @@
|
|
|
47
48
|
background: #712177;
|
|
48
49
|
border-bottom-color: #b890bb;
|
|
49
50
|
}
|
|
51
|
+
|
|
50
52
|
&.theme-brown {
|
|
51
53
|
background: #705043;
|
|
52
54
|
border-bottom-color: #ad907b;
|
|
53
55
|
}
|
|
56
|
+
|
|
54
57
|
&.theme-teal {
|
|
55
58
|
background: #00695c;
|
|
56
59
|
border-bottom-color: #4ebaaa;
|
|
57
60
|
}
|
|
61
|
+
|
|
58
62
|
&.theme-pink {
|
|
59
63
|
background: #af4448;
|
|
60
64
|
border-bottom-color: #e57373;
|
|
61
65
|
}
|
|
66
|
+
|
|
62
67
|
&.theme-orange {
|
|
63
68
|
background: #bb4d00;
|
|
64
69
|
border-bottom-color: #ffad42;
|
|
65
70
|
}
|
|
71
|
+
|
|
66
72
|
&.theme-slate {
|
|
67
73
|
background: #29434e;
|
|
68
74
|
border-bottom-color: #7e9ba5;
|
|
69
75
|
}
|
|
76
|
+
|
|
70
77
|
&.theme-indigo {
|
|
71
78
|
background: #26418f;
|
|
72
79
|
border-bottom-color: #92a6dd;
|
|
73
80
|
}
|
|
81
|
+
|
|
74
82
|
&.theme-cyan {
|
|
75
83
|
background: #007b91;
|
|
76
84
|
border-bottom-color: #65b0bd;
|
|
77
85
|
}
|
|
86
|
+
|
|
78
87
|
&.theme-green {
|
|
79
88
|
background: #4b830d;
|
|
80
89
|
border-bottom-color: #84bc49;
|
|
81
90
|
}
|
|
91
|
+
|
|
82
92
|
&.theme-amber {
|
|
83
93
|
background: #fbab18;
|
|
84
94
|
border-bottom-color: #ffd54f;
|
|
85
95
|
}
|
|
96
|
+
|
|
86
97
|
&.theme-blue {
|
|
87
98
|
background: #005eaa;
|
|
88
99
|
border-bottom-color: #88c3ea;
|
|
@@ -93,48 +104,131 @@
|
|
|
93
104
|
}
|
|
94
105
|
}
|
|
95
106
|
|
|
96
|
-
.type-sparkline.type-chart .cove-
|
|
107
|
+
.type-sparkline.type-chart .cove-visualization__title,
|
|
108
|
+
.type-sparkline.type-chart .cove-visualization__header {
|
|
97
109
|
margin: 0px !important;
|
|
98
110
|
}
|
|
99
111
|
|
|
112
|
+
/* ============================================================================
|
|
113
|
+
LEGACY SHIM PREVIEW
|
|
114
|
+
============================================================================ */
|
|
115
|
+
|
|
116
|
+
header.cove-component__header {
|
|
117
|
+
border-bottom-style: solid;
|
|
118
|
+
border-bottom-width: 4px;
|
|
119
|
+
border-top-left-radius: 3px;
|
|
120
|
+
border-top-right-radius: 3px;
|
|
121
|
+
color: var(--white);
|
|
122
|
+
margin: 0;
|
|
123
|
+
padding: 1rem;
|
|
124
|
+
position: relative;
|
|
125
|
+
|
|
126
|
+
h2 {
|
|
127
|
+
color: var(--white);
|
|
128
|
+
font-family: var(--app-font-secondary);
|
|
129
|
+
font-size: var(--title-font-size);
|
|
130
|
+
margin: 0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&.theme-purple {
|
|
134
|
+
background: #712177;
|
|
135
|
+
border-bottom-color: #b890bb;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&.theme-brown {
|
|
139
|
+
background: #705043;
|
|
140
|
+
border-bottom-color: #ad907b;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&.theme-teal {
|
|
144
|
+
background: #00695c;
|
|
145
|
+
border-bottom-color: #4ebaaa;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&.theme-pink {
|
|
149
|
+
background: #af4448;
|
|
150
|
+
border-bottom-color: #e57373;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&.theme-orange {
|
|
154
|
+
background: #bb4d00;
|
|
155
|
+
border-bottom-color: #ffad42;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&.theme-slate {
|
|
159
|
+
background: #29434e;
|
|
160
|
+
border-bottom-color: #7e9ba5;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&.theme-indigo {
|
|
164
|
+
background: #26418f;
|
|
165
|
+
border-bottom-color: #92a6dd;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&.theme-cyan {
|
|
169
|
+
background: #007b91;
|
|
170
|
+
border-bottom-color: #65b0bd;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&.theme-green {
|
|
174
|
+
background: #4b830d;
|
|
175
|
+
border-bottom-color: #84bc49;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&.theme-amber {
|
|
179
|
+
background: #fbab18;
|
|
180
|
+
border-bottom-color: #ffd54f;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&.theme-blue {
|
|
184
|
+
background: #005eaa;
|
|
185
|
+
border-bottom-color: #88c3ea;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&.mb-0 {
|
|
189
|
+
margin-bottom: 0 !important;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
100
193
|
/* ============================================================================
|
|
101
194
|
MODERN TITLE
|
|
102
195
|
============================================================================ */
|
|
103
196
|
|
|
104
|
-
.
|
|
197
|
+
.cove-visualization .cove-title--small {
|
|
105
198
|
margin-bottom: 0.75rem;
|
|
106
199
|
}
|
|
107
200
|
|
|
108
|
-
.
|
|
201
|
+
.cove-visualization .cove-title--large {
|
|
109
202
|
margin-bottom: 1.33rem;
|
|
110
203
|
}
|
|
111
204
|
|
|
112
205
|
/* Used in dashboards to more closely associate a title-only component with the content below it */
|
|
113
|
-
.
|
|
114
|
-
margin-top: 1rem;
|
|
206
|
+
.cove-visualization .cove-title--no-content {
|
|
115
207
|
margin-bottom: 0;
|
|
208
|
+
margin-top: 1rem;
|
|
116
209
|
}
|
|
117
210
|
|
|
118
|
-
.
|
|
211
|
+
.cove-visualization .cove-title h2 {
|
|
212
|
+
border-bottom: 1px solid var(--cool-gray-10);
|
|
119
213
|
color: #0b4778;
|
|
120
|
-
font-size: 1.95rem;
|
|
121
214
|
font-family: var(--app-font-secondary);
|
|
122
|
-
|
|
215
|
+
font-size: 1.95rem;
|
|
123
216
|
font-weight: 300;
|
|
124
217
|
}
|
|
125
218
|
|
|
126
|
-
.
|
|
127
|
-
font-size: 1.5rem;
|
|
219
|
+
.cove-visualization .cove-title h3 {
|
|
128
220
|
font-family: var(--app-font-secondary);
|
|
221
|
+
font-size: 1.5rem;
|
|
129
222
|
}
|
|
130
223
|
|
|
131
|
-
.
|
|
224
|
+
.cove-visualization .cove-title sup {
|
|
225
|
+
color: #666;
|
|
132
226
|
font-family: var(--app-font-secondary);
|
|
133
227
|
font-size: 0.75rem;
|
|
134
228
|
font-weight: 600;
|
|
135
229
|
text-transform: uppercase;
|
|
136
|
-
|
|
230
|
+
|
|
137
231
|
sup {
|
|
138
232
|
font-size: 75%;
|
|
139
233
|
}
|
|
140
|
-
}
|
|
234
|
+
}
|
|
@@ -6,7 +6,7 @@ import 'react-tooltip/dist/react-tooltip.css'
|
|
|
6
6
|
import type { PlacesType } from 'react-tooltip'
|
|
7
7
|
|
|
8
8
|
// Styles
|
|
9
|
-
import '
|
|
9
|
+
import './tooltip.scss'
|
|
10
10
|
|
|
11
11
|
const TooltipTarget = children => children
|
|
12
12
|
const TooltipContent = children => children
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@import '
|
|
2
|
-
@import '
|
|
1
|
+
@import '../../styles/utils/properties';
|
|
2
|
+
@import '../../styles/themes/index';
|
|
3
3
|
|
|
4
4
|
.cove {
|
|
5
5
|
.cove-accordion__item {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.cove-accordion__heading {
|
|
17
|
-
background:
|
|
17
|
+
background: var(--lightestGray);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.cove-accordion__button {
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.accordion__button {
|
|
8
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
|
8
9
|
cursor: pointer;
|
|
9
10
|
font-size: 1em;
|
|
10
11
|
padding: 0.3em 1em;
|
|
11
|
-
width: 100%;
|
|
12
|
-
text-align: left;
|
|
13
12
|
position: relative;
|
|
14
|
-
|
|
13
|
+
text-align: left;
|
|
14
|
+
width: 100%;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.accordion__panel:first-child {
|
|
@@ -19,31 +19,31 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.accordion__button:before {
|
|
22
|
-
|
|
22
|
+
border-bottom: 2px solid currentColor;
|
|
23
|
+
border-right: 2px solid currentColor;
|
|
23
24
|
content: '';
|
|
25
|
+
display: inline-block;
|
|
24
26
|
height: 7px;
|
|
25
|
-
width: 7px;
|
|
26
27
|
margin-right: 1em;
|
|
27
|
-
border-bottom: 2px solid currentColor;
|
|
28
|
-
border-right: 2px solid currentColor;
|
|
29
|
-
transform: rotate(-45deg) translateY(-50%);
|
|
30
|
-
right: 0;
|
|
31
28
|
position: absolute;
|
|
29
|
+
right: 0;
|
|
32
30
|
top: 50%;
|
|
31
|
+
transform: rotate(-45deg) translateY(-50%);
|
|
33
32
|
transition: 0.1s all;
|
|
33
|
+
width: 7px;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.accordion__button[aria-expanded='true']::before,
|
|
37
37
|
.accordion__button[aria-selected='true']::before {
|
|
38
|
-
transform: rotate(45deg) translateY(-50%);
|
|
39
38
|
margin-right: 1.3em;
|
|
39
|
+
transform: rotate(45deg) translateY(-50%);
|
|
40
40
|
transition: 0.1s all;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.accordion__panel {
|
|
44
|
+
animation: fadein 0.2s ease-in;
|
|
44
45
|
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
|
45
46
|
padding: 1em 1.25em 2em;
|
|
46
|
-
animation: fadein 0.2s ease-in;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.accordion__panel h5 {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@import '
|
|
2
|
-
@import '
|
|
1
|
+
@import '../../styles/utils/properties';
|
|
2
|
+
@import '../../styles/themes/index';
|
|
3
3
|
|
|
4
4
|
.cove-overlay {
|
|
5
5
|
display: flex;
|
|
@@ -14,21 +14,21 @@
|
|
|
14
14
|
|
|
15
15
|
&.animate-in {
|
|
16
16
|
.cove-overlay__bg {
|
|
17
|
-
animation: fadeIn 400ms
|
|
17
|
+
animation: fadeIn 400ms var(--transition-expo-out) 0s 1 forwards;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.cove-overlay__container {
|
|
21
|
-
animation: fadeInUp 700ms
|
|
21
|
+
animation: fadeInUp 700ms var(--transition-expo-out) 50ms 1 forwards;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&.animate-out {
|
|
26
26
|
.cove-overlay__bg {
|
|
27
|
-
animation: fadeOut 400ms
|
|
27
|
+
animation: fadeOut 400ms var(--transition-expo-out) 0s 1 forwards;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.cove-overlay__container {
|
|
31
|
-
animation: fadeOut 400ms
|
|
31
|
+
animation: fadeOut 400ms var(--transition-expo-out) 0s 1 forwards;
|
|
32
32
|
transform: translateY(0);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
.
|
|
2
|
-
@import '
|
|
1
|
+
.cove-visualization {
|
|
2
|
+
@import '../styles/utils/mixins';
|
|
3
|
+
|
|
3
4
|
.waiting {
|
|
4
5
|
&.collapsed {
|
|
5
6
|
padding: 2em !important;
|
|
6
7
|
}
|
|
8
|
+
|
|
7
9
|
@include emptyState;
|
|
8
10
|
align-items: flex-start;
|
|
9
11
|
padding-top: 250px;
|
|
12
|
+
|
|
10
13
|
.waiting-container {
|
|
11
14
|
max-width: 400px;
|
|
12
15
|
}
|
|
16
|
+
|
|
13
17
|
h3 {
|
|
14
18
|
font-size: 1.3rem;
|
|
15
19
|
font-weight: 600;
|
|
16
20
|
margin-bottom: 0.3rem;
|
|
17
21
|
}
|
|
22
|
+
|
|
18
23
|
p {
|
|
19
24
|
font-size: 1em;
|
|
25
|
+
|
|
20
26
|
strong {
|
|
21
27
|
font-weight: bold;
|
|
22
28
|
}
|
|
23
29
|
}
|
|
24
30
|
}
|
|
25
|
-
}
|
|
31
|
+
}
|
package/data/colorPalettes.ts
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
import { mapColorPalettes, mapColorPalettesV1, mapColorPalettesV2 } from './mapColorPalettes'
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { mapColorPalettes, mapColorPalettesV1, mapColorPalettesV2, sequentialZeroColors } from './mapColorPalettes'
|
|
2
|
+
import {
|
|
3
|
+
chartColorPalettes,
|
|
4
|
+
sequentialPalettes,
|
|
5
|
+
colorPalettesChart,
|
|
6
|
+
colorPalettesChartV1,
|
|
7
|
+
colorPalettesChartV2,
|
|
8
|
+
twoColorPalette
|
|
9
|
+
} from './chartColorPalettes'
|
|
4
10
|
|
|
5
11
|
// Re-export map palettes (already processed in mapColorPalettes.ts)
|
|
6
|
-
export { mapColorPalettes, mapColorPalettesV1, mapColorPalettesV2 }
|
|
12
|
+
export { mapColorPalettes, mapColorPalettesV1, mapColorPalettesV2, sequentialZeroColors }
|
|
7
13
|
|
|
8
14
|
// Re-export chart palettes (already processed in chartColorPalettes.ts)
|
|
9
|
-
export {
|
|
15
|
+
export {
|
|
16
|
+
chartColorPalettes,
|
|
17
|
+
sequentialPalettes,
|
|
18
|
+
colorPalettesChart,
|
|
19
|
+
colorPalettesChartV1,
|
|
20
|
+
colorPalettesChartV2,
|
|
21
|
+
twoColorPalette
|
|
22
|
+
}
|
package/data/mapColorPalettes.ts
CHANGED
|
@@ -43,3 +43,13 @@ export const mapColorPalettes = {
|
|
|
43
43
|
|
|
44
44
|
export const mapColorPalettesV1 = mapColorPalettes.v1
|
|
45
45
|
export const mapColorPalettesV2 = mapColorPalettes.v2
|
|
46
|
+
|
|
47
|
+
// Lighter colors (first palette color 75% toward white) for zero-value categories in v2 sequential palettes
|
|
48
|
+
// Used when: categorical map, gradient legend, first category value is "0", palette not reversed
|
|
49
|
+
export const sequentialZeroColors: Record<string, string> = {
|
|
50
|
+
sequential_blue: '#F6F9FD',
|
|
51
|
+
sequential_teal: '#F9FEFE',
|
|
52
|
+
sequential_purple: '#F8F4F7',
|
|
53
|
+
sequential_orange: '#FFF8F5',
|
|
54
|
+
sequential_green: '#F5FEFD'
|
|
55
|
+
}
|