@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
|
@@ -1,70 +1,58 @@
|
|
|
1
1
|
@use 'sass:string';
|
|
2
2
|
@use 'sass:list';
|
|
3
|
-
@import './../../variables';
|
|
4
3
|
|
|
5
4
|
$theme: (
|
|
6
|
-
'amber': (
|
|
7
|
-
'#fbab18',
|
|
5
|
+
'amber': ('#fbab18',
|
|
8
6
|
'#ffd54f',
|
|
9
7
|
'#ffecb3',
|
|
10
8
|
'#fff7e1'
|
|
11
9
|
),
|
|
12
|
-
'blue': (
|
|
13
|
-
'#005eaa',
|
|
10
|
+
'blue': ('#005eaa',
|
|
14
11
|
'#88c3ea',
|
|
15
12
|
'#c0e9ff',
|
|
16
13
|
'#edf9ff'
|
|
17
14
|
),
|
|
18
|
-
'brown': (
|
|
19
|
-
'#705043',
|
|
15
|
+
'brown': ('#705043',
|
|
20
16
|
'#ad907b',
|
|
21
17
|
'#d7ccc8',
|
|
22
18
|
'#f2ebe8'
|
|
23
19
|
),
|
|
24
|
-
'cyan': (
|
|
25
|
-
'#007B91',
|
|
20
|
+
'cyan': ('#007B91',
|
|
26
21
|
'#65b0bd',
|
|
27
22
|
'#cce5e9',
|
|
28
23
|
'#ebf5f6'
|
|
29
24
|
),
|
|
30
|
-
'green': (
|
|
31
|
-
'#4b830d',
|
|
25
|
+
'green': ('#4b830d',
|
|
32
26
|
'#84bc49',
|
|
33
27
|
'#dcedc8',
|
|
34
28
|
'#f1f8e9'
|
|
35
29
|
),
|
|
36
|
-
'indigo': (
|
|
37
|
-
'#26418f',
|
|
30
|
+
'indigo': ('#26418f',
|
|
38
31
|
'#92a6dd',
|
|
39
32
|
'#dee8ff',
|
|
40
33
|
'#f2f6ff'
|
|
41
34
|
),
|
|
42
|
-
'orange': (
|
|
43
|
-
'#bb4d00',
|
|
35
|
+
'orange': ('#bb4d00',
|
|
44
36
|
'#ffad42',
|
|
45
37
|
'#ffe97d',
|
|
46
38
|
'#fff4cf'
|
|
47
39
|
),
|
|
48
|
-
'pink': (
|
|
49
|
-
'#af4448',
|
|
40
|
+
'pink': ('#af4448',
|
|
50
41
|
'#e57373',
|
|
51
42
|
'#ffc2c2',
|
|
52
43
|
'#ffe7e7'
|
|
53
44
|
),
|
|
54
|
-
'purple': (
|
|
55
|
-
'#712177',
|
|
45
|
+
'purple': ('#712177',
|
|
56
46
|
'#b890bb',
|
|
57
47
|
'#e3d3e4',
|
|
58
48
|
'#f7f2f7'
|
|
59
49
|
),
|
|
60
|
-
'slate': (
|
|
61
|
-
'#29434e',
|
|
50
|
+
'slate': ('#29434e',
|
|
62
51
|
'#7e9ba5',
|
|
63
52
|
'#b6c6d2',
|
|
64
53
|
'#e2e8ed'
|
|
65
54
|
),
|
|
66
|
-
'teal': (
|
|
67
|
-
'#00695c',
|
|
55
|
+
'teal': ('#00695c',
|
|
68
56
|
'#4ebaaa',
|
|
69
57
|
'#ceece7',
|
|
70
58
|
'#ebf7f5'
|
|
@@ -72,15 +60,15 @@ $theme: (
|
|
|
72
60
|
);
|
|
73
61
|
|
|
74
62
|
// .type-sparkline class used for creating sparklines
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
.
|
|
78
|
-
.type-
|
|
79
|
-
.type-
|
|
80
|
-
.type-
|
|
81
|
-
.
|
|
82
|
-
.cove {
|
|
63
|
+
.cove-visualization.type-markup-include,
|
|
64
|
+
.cove-visualization.type-waffle-chart,
|
|
65
|
+
.cove-visualization.type-data-bite,
|
|
66
|
+
.cove-visualization.type-filtered-text,
|
|
67
|
+
.cove-visualization.type-chart,
|
|
68
|
+
.cove-visualization.type-chart.type-sparkline,
|
|
69
|
+
.cove-visualization.type-map {
|
|
83
70
|
@each $theme-name, $theme-colors in $theme {
|
|
71
|
+
|
|
84
72
|
// Header
|
|
85
73
|
.theme-#{$theme-name} {
|
|
86
74
|
background-color: string.unquote(list.nth($theme-colors, 1));
|
|
@@ -90,18 +78,23 @@ $theme: (
|
|
|
90
78
|
}
|
|
91
79
|
|
|
92
80
|
&.theme-#{$theme-name} {
|
|
81
|
+
|
|
93
82
|
/// area that appears underneath the title of the component.
|
|
94
|
-
.cove-
|
|
83
|
+
.cove-visualization__body {
|
|
84
|
+
|
|
95
85
|
/// when there are borders on a component
|
|
96
86
|
&:not(.no-borders) {
|
|
87
|
+
|
|
97
88
|
/// borders are the theme color
|
|
98
|
-
&.component--has-
|
|
89
|
+
&.component--has-border-color-theme {
|
|
99
90
|
border: 1px solid string.unquote(list.nth($theme-colors, 1));
|
|
100
91
|
}
|
|
92
|
+
|
|
101
93
|
/// using default border color to draw borders
|
|
102
|
-
&:not(.component--has-
|
|
103
|
-
border: 1px solid
|
|
94
|
+
&:not(.component--has-border-color-theme) {
|
|
95
|
+
border: 1px solid var(--lightGray);
|
|
104
96
|
}
|
|
97
|
+
|
|
105
98
|
&.component--has-title {
|
|
106
99
|
border-top: none !important;
|
|
107
100
|
}
|
|
@@ -112,19 +105,22 @@ $theme: (
|
|
|
112
105
|
border-left: 0.5rem solid string.unquote(list.nth($theme-colors, 1)) !important;
|
|
113
106
|
}
|
|
114
107
|
|
|
115
|
-
/// Apply a background color
|
|
116
|
-
&.component--has-background:not(.component--
|
|
108
|
+
/// Apply a background color (excluded when TP5 treatment is active)
|
|
109
|
+
&.component--has-background:not(.component--hide-background-color):not(.component--tp5-treatment) {
|
|
117
110
|
background: string.unquote(list.nth($theme-colors, 3));
|
|
118
111
|
}
|
|
119
112
|
}
|
|
120
113
|
|
|
121
|
-
.cove-
|
|
114
|
+
.cove-visualization__title,
|
|
115
|
+
.cove-visualization__header {
|
|
122
116
|
border-color: string.unquote(list.nth($theme-colors, 2));
|
|
123
117
|
}
|
|
124
118
|
}
|
|
125
119
|
|
|
126
120
|
&.theme-#{$theme-name} {
|
|
127
|
-
|
|
121
|
+
|
|
122
|
+
.cove-visualization__title,
|
|
123
|
+
.cove-visualization__header {
|
|
128
124
|
border-color: string.unquote(list.nth($theme-colors, 2));
|
|
129
125
|
}
|
|
130
126
|
}
|
|
@@ -132,7 +128,7 @@ $theme: (
|
|
|
132
128
|
}
|
|
133
129
|
|
|
134
130
|
// Charts filter styles
|
|
135
|
-
.
|
|
131
|
+
.cove-visualization {
|
|
136
132
|
@each $theme-name, $theme-colors in $theme {
|
|
137
133
|
&.theme-#{$theme-name} {
|
|
138
134
|
.single-filters--tab .tab--active:not(.tab--simple) {
|
|
@@ -149,6 +145,14 @@ $theme: (
|
|
|
149
145
|
background-color: string.unquote(list.nth($theme-colors, 1));
|
|
150
146
|
color: #fff;
|
|
151
147
|
}
|
|
148
|
+
|
|
149
|
+
.button__tab-bar--active {
|
|
150
|
+
outline: 2px solid string.unquote(list.nth($theme-colors, 1));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.apply:not([disabled]) {
|
|
154
|
+
background-color: string.unquote(list.nth($theme-colors, 1));
|
|
155
|
+
}
|
|
152
156
|
}
|
|
153
157
|
|
|
154
158
|
.theme-#{$theme-name} {
|
|
@@ -170,6 +174,7 @@ $theme: (
|
|
|
170
174
|
.button__tab-bar--active {
|
|
171
175
|
outline: 2px solid string.unquote(list.nth($theme-colors, 1));
|
|
172
176
|
}
|
|
177
|
+
|
|
173
178
|
.apply:not([disabled]) {
|
|
174
179
|
background-color: string.unquote(list.nth($theme-colors, 1));
|
|
175
180
|
}
|
|
@@ -239,4 +244,4 @@ $green-quaternary: #f1f8e9 !default;
|
|
|
239
244
|
$amber-primary: #fbab18 !default;
|
|
240
245
|
$amber-secondary: #ffd54f !default;
|
|
241
246
|
$amber-tertiary: #ffecb3 !default;
|
|
242
|
-
$amber-quaternary: #fff7e1 !default;
|
|
247
|
+
$amber-quaternary: #fff7e1 !default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Only frontend styles are applied in WCMS/TP
|
|
2
2
|
// This helps match those styles when viewing in the editor
|
|
3
3
|
.modal.cdc-cove-editor *:focus-visible,
|
|
4
|
-
.
|
|
4
|
+
.cove-visualization *:focus-visible {
|
|
5
5
|
outline: dashed 2px rgb(0, 122, 153) !important;
|
|
6
6
|
outline-offset: 3px !important;
|
|
7
7
|
border-radius: 6px !important;
|
|
@@ -3,18 +3,21 @@ $grid-gap-max: 64;
|
|
|
3
3
|
$grid-columns: 12;
|
|
4
4
|
|
|
5
5
|
@mixin create-grid-selectors($breakpoint: null) {
|
|
6
|
-
$infix: if($breakpoint ==
|
|
6
|
+
$infix: if(sass($breakpoint ==null): ""; else: "-#{$breakpoint}");
|
|
7
7
|
|
|
8
8
|
@for $i from 1 through $grid-columns {
|
|
9
9
|
.col#{$infix}-#{$i} {
|
|
10
10
|
grid-column-end: span $i;
|
|
11
11
|
}
|
|
12
|
+
|
|
12
13
|
.col-offset#{$infix}-#{$i} {
|
|
13
14
|
grid-column-start: $i + 1;
|
|
14
15
|
}
|
|
16
|
+
|
|
15
17
|
.row#{$infix}-#{$i} {
|
|
16
18
|
grid-row-end: span $i;
|
|
17
19
|
}
|
|
20
|
+
|
|
18
21
|
.row-offset#{$infix}-#{$i} {
|
|
19
22
|
grid-row-start: $i + 1;
|
|
20
23
|
}
|
|
@@ -23,11 +26,13 @@ $grid-columns: 12;
|
|
|
23
26
|
|
|
24
27
|
@mixin grid-gaps() {
|
|
25
28
|
$i: 0;
|
|
26
|
-
|
|
29
|
+
|
|
30
|
+
@while ($i * $grid-gap-offset) <=$grid-gap-max {
|
|
27
31
|
.grid-gap-#{$i} {
|
|
28
32
|
grid-gap: #{($i * $grid-gap-offset) + 'px'};
|
|
29
33
|
gap: #{($i * $grid-gap-offset) + 'px'};
|
|
30
34
|
}
|
|
35
|
+
|
|
31
36
|
$i: $i + 1;
|
|
32
37
|
}
|
|
33
38
|
}
|
|
@@ -44,4 +49,4 @@ $grid-columns: 12;
|
|
|
44
49
|
@media (min-width: $width) {
|
|
45
50
|
@include create-grid-selectors($breakpoint);
|
|
46
51
|
}
|
|
47
|
-
}
|
|
52
|
+
}
|
|
@@ -1,112 +1,133 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
'
|
|
36
|
-
'
|
|
37
|
-
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
|
|
48
|
-
'
|
|
49
|
-
'
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
|
|
58
|
-
'
|
|
59
|
-
'
|
|
60
|
-
'
|
|
61
|
-
'
|
|
62
|
-
|
|
63
|
-
'
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'
|
|
67
|
-
|
|
68
|
-
'
|
|
69
|
-
'
|
|
70
|
-
'
|
|
71
|
-
'
|
|
72
|
-
'
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
//
|
|
101
|
-
--
|
|
102
|
-
--
|
|
103
|
-
--legend-item-
|
|
104
|
-
--
|
|
105
|
-
|
|
106
|
-
--
|
|
107
|
-
--
|
|
108
|
-
--
|
|
109
|
-
--
|
|
110
|
-
--
|
|
111
|
-
|
|
112
|
-
|
|
1
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
2
|
+
// CSS Custom Properties — single source of truth for all design values.
|
|
3
|
+
// SCSS variables below are kept only where SCSS features require them:
|
|
4
|
+
// $cove-breakpoints — used in breakpoint mixins
|
|
5
|
+
// $blue, $red, $mediumGray — used in color.adjust() calls (migrate later)
|
|
6
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
7
|
+
|
|
8
|
+
// Required for breakpoint mixins (cannot be replaced by CSS vars)
|
|
9
|
+
$cove-breakpoints: (
|
|
10
|
+
xs: 480px,
|
|
11
|
+
sm: 768px,
|
|
12
|
+
md: 960px,
|
|
13
|
+
lg: 1170px,
|
|
14
|
+
xl: 1280px
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
// Required for color.adjust() calls — to be removed in a future phase
|
|
18
|
+
$blue: #005eaa;
|
|
19
|
+
$red: #d8000c;
|
|
20
|
+
$mediumGray: #565656;
|
|
21
|
+
|
|
22
|
+
// Color map — drives the CSS custom property generation below
|
|
23
|
+
$colors: (
|
|
24
|
+
'baseColor': #333,
|
|
25
|
+
'blue': #005eaa,
|
|
26
|
+
'lightestGray': #f2f2f2,
|
|
27
|
+
'gray2': #f5f5f5,
|
|
28
|
+
'lightGray': #c7c7c7,
|
|
29
|
+
'mediumGray': #565656,
|
|
30
|
+
'darkGray': #333,
|
|
31
|
+
'red': #d8000c,
|
|
32
|
+
'white': #fff,
|
|
33
|
+
'silver': #eee,
|
|
34
|
+
'primary': #005eaa,
|
|
35
|
+
'secondary': #88c3ea,
|
|
36
|
+
'tertiary': #c0e9ff,
|
|
37
|
+
'quaternary': #edf9ff,
|
|
38
|
+
'purple-primary': #712177,
|
|
39
|
+
'purple-secondary': #b890bb,
|
|
40
|
+
'purple-tertiary': #e3d3e4,
|
|
41
|
+
'purple-quaternary': #f7f2f7,
|
|
42
|
+
'brown-primary': #705043,
|
|
43
|
+
'brown-secondary': #ad907b,
|
|
44
|
+
'brown-tertiary': #d7ccc8,
|
|
45
|
+
'brown-quaternary': #f2ebe8,
|
|
46
|
+
'teal-primary': #00695c,
|
|
47
|
+
'teal-secondary': #4ebaaa,
|
|
48
|
+
'teal-tertiary': #ceece7,
|
|
49
|
+
'teal-quaternary': #ebf7f5,
|
|
50
|
+
'pink-primary': #af4448,
|
|
51
|
+
'pink-secondary': #e57373,
|
|
52
|
+
'pink-tertiary': #ffc2c2,
|
|
53
|
+
'pink-quaternary': #ffe7e7,
|
|
54
|
+
'orange-primary': #bb4d00,
|
|
55
|
+
'orange-secondary': #ffad42,
|
|
56
|
+
'orange-tertiary': #ffe97d,
|
|
57
|
+
'orange-quaternary': #fff4cf,
|
|
58
|
+
'slate-primary': #29434e,
|
|
59
|
+
'slate-secondary': #7e9ba5,
|
|
60
|
+
'slate-tertiary': #b6c6d2,
|
|
61
|
+
'slate-quaternary': #e2e8ed,
|
|
62
|
+
'indigo-primary': #26418f,
|
|
63
|
+
'indigo-secondary': #92a6dd,
|
|
64
|
+
'indigo-tertiary': #dee8ff,
|
|
65
|
+
'indigo-quaternary': #f2f6ff,
|
|
66
|
+
'cyan-primary': #006778,
|
|
67
|
+
'cyan-secondary': #65b0bd,
|
|
68
|
+
'cyan-tertiary': #cce5e9,
|
|
69
|
+
'cyan-quaternary': #ebf5f6,
|
|
70
|
+
'green-primary': #4b830d,
|
|
71
|
+
'green-secondary': #84bc49,
|
|
72
|
+
'green-tertiary': #dcedc8,
|
|
73
|
+
'green-quaternary': #f1f8e9,
|
|
74
|
+
'amber-primary': #fbab18,
|
|
75
|
+
'amber-secondary': #ffd54f,
|
|
76
|
+
'amber-tertiary': #ffecb3,
|
|
77
|
+
'amber-quaternary': #fff7e1,
|
|
78
|
+
'cool-gray-90': #1c1d1f,
|
|
79
|
+
'cool-gray-50': #71767a,
|
|
80
|
+
'cool-gray-30': #a9aeb1,
|
|
81
|
+
'cool-gray-10': #dfe1e2,
|
|
82
|
+
'colors-gray-cool-70': #3d4551,
|
|
83
|
+
'colors-blue-vivid-60': #005ea2,
|
|
84
|
+
'colors-cyan-10': #eff9fa,
|
|
85
|
+
'colors-cyan-15': #dff2f6,
|
|
86
|
+
'colors-cyan-60v': #007a99
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
@mixin theme() {
|
|
90
|
+
:root {
|
|
91
|
+
@each $key, $value in $colors {
|
|
92
|
+
--#{$key}: #{$value};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@include theme();
|
|
98
|
+
|
|
99
|
+
:root {
|
|
100
|
+
// Spacing
|
|
101
|
+
--editorContentPadding: 30px;
|
|
102
|
+
--editorWidth: 350px;
|
|
103
|
+
--space-between-legend-item-rows: 1rem;
|
|
104
|
+
--space-between-legend-item-columns: 1.5rem;
|
|
105
|
+
// Breakpoints
|
|
106
|
+
--breakpoint-xs: 480px;
|
|
107
|
+
--breakpoint-sm: 768px;
|
|
108
|
+
--breakpoint-md: 960px;
|
|
109
|
+
--breakpoint-lg: 1170px;
|
|
110
|
+
--breakpoint-xl: 1280px;
|
|
111
|
+
// Font
|
|
112
|
+
--app-font-main: 'Nunito', sans-serif;
|
|
113
|
+
--app-font-secondary: 'Poppins', sans-serif;
|
|
114
|
+
--app-font-size: 1rem;
|
|
115
|
+
|
|
116
|
+
// Font sizes
|
|
117
|
+
--legend-title-font-size: 1rem;
|
|
118
|
+
--legend-description-font-size: 1rem;
|
|
119
|
+
--legend-item-font-size: 0.889rem;
|
|
120
|
+
--download-link-font-size: 0.772rem;
|
|
121
|
+
--filter-select-font-size: 0.833rem;
|
|
122
|
+
--filter-label-font-size: 0.889rem;
|
|
123
|
+
--filter-buttons-font-size: 0.889rem;
|
|
124
|
+
--superTitle-font-size: 0.833rem;
|
|
125
|
+
--title-font-size: 1.222rem;
|
|
126
|
+
--territory-label-font-size: 0.809rem;
|
|
127
|
+
--territory-label-font-size-mobile: 0.556rem;
|
|
128
|
+
--visualization-body-font-family: var(--app-font-main);
|
|
129
|
+
--visualization-meta-font-size: 0.889rem;
|
|
130
|
+
--visualization-body-line-height: 1.5;
|
|
131
|
+
// Transitions
|
|
132
|
+
--transition-expo-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
133
|
+
}
|
package/types/Annotation.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export type Annotation = {
|
|
2
|
+
// Positioning mode: fixed uses x/y percentages, data anchors to data point
|
|
3
|
+
anchorMode?: 'fixed' | 'data'
|
|
4
|
+
|
|
2
5
|
// background opacity of annotation
|
|
3
6
|
opacity: number
|
|
4
7
|
// HTML text string to display in annotation
|
|
@@ -15,26 +18,22 @@ export type Annotation = {
|
|
|
15
18
|
horizontal: boolean
|
|
16
19
|
vertical: boolean
|
|
17
20
|
}
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
//
|
|
21
|
-
yKey: string
|
|
22
|
-
// orignal x value of subject
|
|
23
|
-
originalX: number
|
|
24
|
-
// x of subject
|
|
21
|
+
// Data X value for data-anchored mode (timestamp, category, etc.)
|
|
22
|
+
dataX?: any
|
|
23
|
+
// x of subject (percentage 0-100)
|
|
25
24
|
x: number
|
|
26
|
-
// y of object
|
|
25
|
+
// y of object (percentage 0-100)
|
|
27
26
|
y: number
|
|
28
27
|
// x offset of label from subject
|
|
29
28
|
dx: number
|
|
30
29
|
// y offset of label from subject
|
|
31
30
|
dy: number
|
|
32
31
|
// assigned series that the annotation should snap to
|
|
33
|
-
seriesKey
|
|
34
|
-
// if the dragged item should be snapped to the nearest point
|
|
35
|
-
snapToNearestPoint: boolean
|
|
32
|
+
seriesKey?: string
|
|
36
33
|
// type of connecting line from label to subject
|
|
37
34
|
connectionType: 'line' | 'curve' | 'elbow' | 'none'
|
|
35
|
+
// curve control point offset for curve connection type
|
|
36
|
+
bezier?: number
|
|
38
37
|
// marker type highlighting the subject
|
|
39
38
|
marker: 'arrow' | 'circle'
|
|
40
39
|
// should the item be snapped to the subject?
|
package/types/Axis.ts
CHANGED
|
@@ -27,6 +27,7 @@ export type Axis = {
|
|
|
27
27
|
max?: string
|
|
28
28
|
maxTickRotation?: number
|
|
29
29
|
min?: string
|
|
30
|
+
smallestLeftAxisMax?: number
|
|
30
31
|
numTicks?: number
|
|
31
32
|
padding?: number
|
|
32
33
|
paddingPercent?: number
|
|
@@ -37,6 +38,7 @@ export type Axis = {
|
|
|
37
38
|
rightLabel?: string
|
|
38
39
|
rightLabelOffsetSize?: number
|
|
39
40
|
rightMax?: string
|
|
41
|
+
smallestRightAxisMax?: number
|
|
40
42
|
rightNumTicks?: number
|
|
41
43
|
sortDates?: boolean
|
|
42
44
|
sortKey?: string
|
package/types/ComponentStyles.ts
CHANGED
package/types/ConfigureData.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { DataDescription } from './DataDescription'
|
|
|
3
3
|
export type ConfigureData = {
|
|
4
4
|
dataDescription: Partial<DataDescription>
|
|
5
5
|
data?: Object[]
|
|
6
|
+
dataMetadata?: Record<string, string>
|
|
6
7
|
formattedData?: Object[]
|
|
7
8
|
dataKey: string // This is the key of the dataset in the config
|
|
8
9
|
}
|
package/types/General.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BoxPlot } from './BoxPlot'
|
|
2
|
+
import { Palette } from './Palette'
|
|
2
3
|
|
|
3
4
|
export type General = {
|
|
4
5
|
boxplot: BoxPlot
|
|
@@ -12,4 +13,5 @@ export type General = {
|
|
|
12
13
|
hideNullValue: boolean
|
|
13
14
|
title: string
|
|
14
15
|
annotationDropdownText?: string
|
|
16
|
+
palette?: Palette
|
|
15
17
|
}
|
package/types/MarkupInclude.ts
CHANGED
package/types/MarkupVariable.ts
CHANGED
|
@@ -5,12 +5,13 @@ export type MarkupCondition = {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export type MarkupVariable = {
|
|
8
|
-
columnName
|
|
8
|
+
columnName?: string
|
|
9
9
|
conditions: MarkupCondition[]
|
|
10
10
|
name: string
|
|
11
11
|
tag: string
|
|
12
12
|
addCommas?: boolean
|
|
13
13
|
hideOnNull?: boolean
|
|
14
|
+
metadataKey?: string
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export type MarkupConfig = {
|
package/types/Palette.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type PaletteVersion = '1.0' | '2.0'
|
|
2
|
+
|
|
3
|
+
export type PaletteBackup = {
|
|
4
|
+
name: string
|
|
5
|
+
type?: 'twoColor' | 'primary'
|
|
6
|
+
version?: PaletteVersion
|
|
7
|
+
isReversed?: boolean
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type Palette = {
|
|
11
|
+
name?: string
|
|
12
|
+
customColors?: string[]
|
|
13
|
+
customColorsOrdered?: string[]
|
|
14
|
+
version?: PaletteVersion
|
|
15
|
+
isReversed?: boolean
|
|
16
|
+
backups?: PaletteBackup[]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export type TwoColorConfig = {
|
|
20
|
+
palette?: string
|
|
21
|
+
isPaletteReversed?: boolean
|
|
22
|
+
}
|
package/types/Table.ts
CHANGED
|
@@ -3,6 +3,12 @@ export type Pivot = {
|
|
|
3
3
|
valueColumns: string[]
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
export type DefaultSort = {
|
|
7
|
+
column?: string
|
|
8
|
+
sortDirection?: 'asc' | 'desc' | 'custom'
|
|
9
|
+
customOrder?: string[]
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
export type Table = {
|
|
7
13
|
caption?: string
|
|
8
14
|
cellMinWidth?: number
|
|
@@ -10,6 +16,8 @@ export type Table = {
|
|
|
10
16
|
dateDisplayFormat?: string
|
|
11
17
|
showNonGeoData?: boolean
|
|
12
18
|
download?: boolean
|
|
19
|
+
downloadDataLabel?: string
|
|
20
|
+
downloadImageLabel?: string
|
|
13
21
|
downloadVisibleDataOnly?: boolean
|
|
14
22
|
downloadImageButton?: boolean
|
|
15
23
|
downloadPdfButton?: boolean
|
|
@@ -31,4 +39,5 @@ export type Table = {
|
|
|
31
39
|
showDownloadPdfButton?: boolean
|
|
32
40
|
showDownloadUrl?: boolean
|
|
33
41
|
showVertical?: boolean
|
|
42
|
+
defaultSort?: DefaultSort
|
|
34
43
|
}
|