@cdc/core 1.1.4 → 4.22.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +1 -1
- package/assets/filtered-text.svg +1 -0
- package/assets/icon-caret-down.svg +3 -0
- package/assets/icon-caret-filled-down.svg +3 -0
- package/assets/icon-caret-filled-up.svg +3 -0
- package/assets/icon-caret-up.svg +3 -0
- package/assets/icon-chart-bar-paired.svg +15 -0
- package/assets/icon-chart-bar-stacked.svg +10 -0
- package/assets/icon-chart-bar.svg +3 -0
- package/assets/icon-chart-line.svg +3 -0
- package/assets/icon-chart-pie.svg +3 -0
- package/assets/icon-check.svg +3 -0
- package/assets/icon-close.svg +3 -1
- package/assets/icon-code.svg +2 -2
- package/assets/icon-dashboard.svg +34 -0
- package/assets/icon-databite.svg +3 -0
- package/assets/icon-edit.svg +3 -0
- package/assets/icon-file-upload.svg +3 -0
- package/assets/icon-filter-bars.svg +5 -0
- package/assets/icon-gear.svg +6 -0
- package/assets/icon-grid.svg +2 -3
- package/assets/icon-info.svg +1 -1
- package/assets/icon-link.svg +3 -0
- package/assets/{alabama-graphic.svg → icon-map-alabama.svg} +2 -2
- package/assets/icon-map-usa.svg +3 -0
- package/assets/icon-map-world.svg +3 -0
- package/assets/icon-minus.svg +3 -0
- package/assets/icon-move.svg +8 -0
- package/assets/icon-plus.svg +3 -0
- package/assets/icon-question-circle.svg +3 -0
- package/assets/icon-tools.svg +8 -0
- package/assets/icon-upload.svg +3 -0
- package/assets/icon-warning-circle.svg +3 -0
- package/assets/{icon-warning.svg → icon-warning-triangle.svg} +1 -1
- package/components/AdvancedEditor.js +52 -67
- package/components/{ErrorBoundary.js → ErrorBoundary.jsx} +10 -11
- package/components/GlobalContext.jsx +2 -6
- package/components/{LegendCircle.js → LegendCircle.jsx} +4 -4
- package/components/Loading.jsx +17 -0
- package/components/Waiting.jsx +20 -0
- package/components/elements/Button.jsx +111 -3
- package/components/elements/Card.jsx +13 -0
- package/components/inputs/InputCheckbox.jsx +43 -38
- package/components/inputs/InputGroup.jsx +71 -0
- package/components/inputs/InputSelect.jsx +28 -24
- package/components/inputs/InputText.jsx +20 -37
- package/components/inputs/InputToggle.jsx +39 -43
- package/components/managers/DataDesigner.jsx +194 -0
- package/components/ui/Accordion.jsx +18 -30
- package/components/ui/Icon.jsx +59 -20
- package/components/ui/LoadSpin.jsx +19 -0
- package/components/ui/Modal.jsx +40 -39
- package/components/ui/Overlay.jsx +15 -24
- package/components/ui/OverlayFrame.jsx +1 -5
- package/components/ui/Tooltip.jsx +20 -31
- package/data/colorPalettes.js +36 -227
- package/data/dataDesignerTables.js +148 -0
- package/data/themes.js +13 -13
- package/helpers/DataTransform.js +162 -0
- package/helpers/cacheBustingString.js +5 -0
- package/helpers/events.js +5 -6
- package/helpers/fetchRemoteData.js +41 -0
- package/helpers/getViewport.js +15 -15
- package/helpers/numberFromString.js +7 -7
- package/helpers/updatePaletteNames.js +15 -17
- package/helpers/useDataVizClasses.js +40 -0
- package/helpers/validateFipsCodeLength.js +41 -56
- package/package.json +3 -2
- package/styles/_data-table.scss +45 -40
- package/styles/_global.scss +41 -22
- package/styles/_mixins.scss +12 -12
- package/styles/_reset.scss +95 -16
- package/styles/_variables.scss +5 -5
- package/styles/base.scss +104 -37
- package/styles/heading-colors.scss +6 -2
- package/styles/loading.scss +62 -60
- package/styles/v2/base/_file-selector.scss +20 -0
- package/styles/v2/base/_general.scss +9 -22
- package/styles/v2/base/_heading.scss +20 -0
- package/styles/v2/base/_reset.scss +4 -3
- package/styles/v2/base/index.scss +7 -3
- package/styles/v2/components/accordion.scss +13 -13
- package/styles/v2/components/button.scss +29 -68
- package/styles/v2/components/card.scss +7 -0
- package/styles/v2/components/data-designer.scss +101 -0
- package/styles/v2/components/editor.scss +52 -50
- package/styles/v2/components/guidance-block.scss +74 -0
- package/styles/v2/components/icon.scss +0 -4
- package/styles/v2/components/input/_input-check-radio.scss +97 -0
- package/styles/v2/components/input/_input-group.scss +74 -0
- package/styles/v2/components/input/_input-slider.scss +183 -0
- package/styles/v2/components/input/_input.scss +66 -0
- package/styles/v2/components/input/index.scss +7 -0
- package/styles/v2/components/loadspin.scss +100 -0
- package/styles/v2/components/modal.scss +15 -8
- package/styles/v2/components/overlay.scss +6 -4
- package/styles/v2/layout/_alert.scss +15 -14
- package/styles/v2/layout/_component.scss +8 -1
- package/styles/v2/layout/_data-table.scss +78 -156
- package/styles/v2/layout/_progression.scss +12 -8
- package/styles/v2/layout/index.scss +5 -7
- package/styles/v2/main.scss +52 -2
- package/styles/v2/themes/_color-definitions.scss +103 -20
- package/styles/v2/themes/index.scss +1 -1
- package/styles/v2/utils/_align.scss +17 -0
- package/styles/v2/utils/_animations.scss +2 -2
- package/styles/v2/utils/_breakpoints.scss +59 -0
- package/styles/v2/utils/_grid.scss +47 -0
- package/styles/v2/utils/_mixins.scss +0 -16
- package/styles/v2/utils/_spacers.scss +31 -0
- package/styles/v2/utils/_variables.scss +7 -0
- package/styles/v2/utils/index.scss +9 -4
- package/styles/waiting.scss +22 -23
- package/assets/asc.svg +0 -1
- package/assets/chart-bar-solid.svg +0 -1
- package/assets/chart-line-solid.svg +0 -1
- package/assets/chart-pie-solid.svg +0 -1
- package/assets/check.svg +0 -3
- package/assets/dashboard.svg +0 -11
- package/assets/data-bite-graphic.svg +0 -3
- package/assets/desc.svg +0 -1
- package/assets/file-upload-solid.svg +0 -1
- package/assets/horizontal-stacked-bar.svg +0 -1
- package/assets/link.svg +0 -1
- package/assets/minus.svg +0 -1
- package/assets/paired-bar.svg +0 -11
- package/assets/plus.svg +0 -1
- package/assets/question-circle.svg +0 -1
- package/assets/upload-solid.svg +0 -1
- package/assets/usa-graphic.svg +0 -3
- package/assets/world-graphic.svg +0 -3
- package/components/DataTransform.js +0 -162
- package/components/Loading.js +0 -15
- package/components/Waiting.js +0 -11
- package/styles/v2/components/input.scss +0 -372
- package/styles/v2/layout/_header.scss +0 -13
- package/styles/v2/layout/_link.scss +0 -46
|
@@ -1,67 +1,52 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* validateFipsCodeLength
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* When stateOrData is an object...
|
|
5
|
-
* This is used for validating maps fips codes during runtime where we
|
|
5
|
+
* This is used for validating maps fips codes during runtime where we
|
|
6
6
|
* In this scenario a user is able to choose the column their Fips Codes are in.
|
|
7
|
-
*
|
|
7
|
+
*
|
|
8
8
|
* When stateOrData is an array...
|
|
9
9
|
* The user hasn't chose which column has their FIPS codes in it. We still
|
|
10
10
|
* want to present the FIPS Codes in a friendly format so we attempt to add leading zeros.
|
|
11
|
-
*
|
|
12
|
-
* @param {object|array} stateOrData
|
|
11
|
+
*
|
|
12
|
+
* @param {object|array} stateOrData
|
|
13
13
|
* @returns {object|array} stateOrData
|
|
14
14
|
*/
|
|
15
15
|
export default function validateFipsCodeLength(stateOrData) {
|
|
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
|
-
stateOrData?.forEach(dataPiece => {
|
|
54
|
-
|
|
55
|
-
if (dataPiece[fipsCol]) {
|
|
56
|
-
|
|
57
|
-
// specific to county fips codes.
|
|
58
|
-
if (!isNaN(parseInt(dataPiece[fipsCol])) && dataPiece[fipsCol].length === 4) {
|
|
59
|
-
dataPiece[fipsCol] = 0 + dataPiece[fipsCol]
|
|
60
|
-
}
|
|
61
|
-
dataPiece[fipsCol] = dataPiece[fipsCol].toString()
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return stateOrData;
|
|
16
|
+
// FIPS are within obj.
|
|
17
|
+
if (!Array.isArray(stateOrData)) {
|
|
18
|
+
if (stateOrData.general.geoType === 'us-county' || stateOrData.general.geoType === 'single-state' || (stateOrData.general.geoType === 'us' && stateOrData?.data)) {
|
|
19
|
+
stateOrData?.data.forEach(dataPiece => {
|
|
20
|
+
if (dataPiece[stateOrData.columns.geo.name]) {
|
|
21
|
+
if (!isNaN(parseInt(dataPiece[stateOrData.columns.geo.name])) && dataPiece[stateOrData.columns.geo.name].length === 4) {
|
|
22
|
+
dataPiece[stateOrData.columns.geo.name] = 0 + dataPiece[stateOrData.columns.geo.name]
|
|
23
|
+
}
|
|
24
|
+
dataPiece[stateOrData.columns.geo.name] = dataPiece[stateOrData.columns.geo.name].toString()
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Only includes data - get column name from somewhere else
|
|
31
|
+
if (Array.isArray(stateOrData)) {
|
|
32
|
+
let columns = Object.keys(stateOrData[0])
|
|
33
|
+
|
|
34
|
+
let potentialColumnNames = ['fips', 'FIPS', 'fips codes', 'FIPS CODES', 'Fips Codes', 'fips Codes', 'Fips codes', 'FIPS Codes']
|
|
35
|
+
|
|
36
|
+
const fipsCol = columns.filter(columnName => potentialColumnNames.includes(columnName))
|
|
37
|
+
|
|
38
|
+
if (!fipsCol.length) return // no column name to reference, leave the fips alone.
|
|
39
|
+
|
|
40
|
+
stateOrData?.forEach(dataPiece => {
|
|
41
|
+
if (dataPiece[fipsCol]) {
|
|
42
|
+
// specific to county fips codes.
|
|
43
|
+
if (!isNaN(parseInt(dataPiece[fipsCol])) && dataPiece[fipsCol].length === 4) {
|
|
44
|
+
dataPiece[fipsCol] = 0 + dataPiece[fipsCol]
|
|
45
|
+
}
|
|
46
|
+
dataPiece[fipsCol] = dataPiece[fipsCol].toString()
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return stateOrData
|
|
67
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdc/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.22.11",
|
|
4
4
|
"description": "Core elements of the CDC Open Visualization project",
|
|
5
5
|
"author": "Daniel Immke <npm@daniel.do>",
|
|
6
6
|
"homepage": "https://github.com/CDCgov/cdc-open-viz#readme",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"react-dom": ">=16"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
+
"papaparse": "^5.3.0",
|
|
23
24
|
"prop-types": "^15.8.1",
|
|
24
25
|
"react-accessible-accordion": "^3.3.4",
|
|
25
26
|
"react-select": "^5.3.1",
|
|
@@ -29,5 +30,5 @@
|
|
|
29
30
|
"resolutions": {
|
|
30
31
|
"@types/react": "17.x"
|
|
31
32
|
},
|
|
32
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "9768d1ea0e2383044977d988e33531bcdfe33ea6"
|
|
33
34
|
}
|
package/styles/_data-table.scss
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
.collapsed + .table-container {
|
|
1
|
+
.collapsed + .table-container {
|
|
2
|
+
border-bottom: none;
|
|
3
|
+
}
|
|
2
4
|
.table-container {
|
|
3
5
|
overflow-x: auto;
|
|
4
6
|
border-right: 1px solid $lightGray;
|
|
@@ -8,22 +10,22 @@
|
|
|
8
10
|
|
|
9
11
|
div.data-table-heading {
|
|
10
12
|
background: rgba(0, 0, 0, 0.05);
|
|
11
|
-
padding: .5em .7em;
|
|
13
|
+
padding: 0.5em 0.7em;
|
|
12
14
|
border: $lightGray 1px solid;
|
|
13
15
|
border-bottom: 0;
|
|
14
16
|
cursor: pointer;
|
|
15
|
-
background-image: url(~@cdc/core/assets/minus.svg);
|
|
17
|
+
background-image: url(~@cdc/core/assets/icon-minus.svg);
|
|
16
18
|
background-size: 15px 15px; // Need to define both for IE11
|
|
17
|
-
background-position: right .7em center;
|
|
19
|
+
background-position: right 0.7em center;
|
|
18
20
|
background-repeat: no-repeat;
|
|
19
21
|
&:focus {
|
|
20
22
|
z-index: 2;
|
|
21
23
|
position: relative;
|
|
22
24
|
}
|
|
23
25
|
&.collapsed {
|
|
24
|
-
background-image: url(~@cdc/core/assets/plus.svg);
|
|
26
|
+
background-image: url(~@cdc/core/assets/icon-plus.svg);
|
|
25
27
|
background-size: 15px 15px; // Need to define both for IE11
|
|
26
|
-
background-position: right .7em center;
|
|
28
|
+
background-position: right 0.7em center;
|
|
27
29
|
background-repeat: no-repeat;
|
|
28
30
|
border-bottom: $lightGray 1px solid;
|
|
29
31
|
}
|
|
@@ -39,7 +41,7 @@ table.data-table {
|
|
|
39
41
|
overflow: auto;
|
|
40
42
|
appearance: none;
|
|
41
43
|
* {
|
|
42
|
-
box-sizing: border-box
|
|
44
|
+
box-sizing: border-box;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
thead {
|
|
@@ -67,14 +69,14 @@ table.data-table {
|
|
|
67
69
|
top: 0;
|
|
68
70
|
bottom: 0;
|
|
69
71
|
right: 0;
|
|
70
|
-
touch-action:none;
|
|
72
|
+
touch-action: none;
|
|
71
73
|
}
|
|
72
74
|
tr {
|
|
73
75
|
text-align: left;
|
|
74
76
|
}
|
|
75
77
|
th,
|
|
76
78
|
td {
|
|
77
|
-
padding: .5em 1.3em .5em .7em;
|
|
79
|
+
padding: 0.5em 1.3em 0.5em 0.7em;
|
|
78
80
|
line-height: normal;
|
|
79
81
|
position: relative;
|
|
80
82
|
text-align: left;
|
|
@@ -84,52 +86,52 @@ table.data-table {
|
|
|
84
86
|
margin-left: 1rem;
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
|
-
|
|
89
|
+
|
|
88
90
|
th.sort {
|
|
89
91
|
background-color: darken($mediumGray, 10%);
|
|
90
92
|
background-repeat: no-repeat;
|
|
91
|
-
background-position: right .5em center;
|
|
93
|
+
background-position: right 0.5em center;
|
|
92
94
|
background-size: 10px 5px;
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
th.sort-asc,
|
|
96
98
|
td.sort-asc {
|
|
97
|
-
background-image: url(~@cdc/core/assets/
|
|
99
|
+
background-image: url(~@cdc/core/assets/icon-caret-filled-up.svg);
|
|
98
100
|
}
|
|
99
|
-
|
|
101
|
+
|
|
100
102
|
th.sort-desc,
|
|
101
103
|
td.sort-desc {
|
|
102
|
-
background-image: url(~@cdc/core/assets/
|
|
104
|
+
background-image: url(~@cdc/core/assets/icon-caret-filled-down.svg);
|
|
103
105
|
}
|
|
104
|
-
|
|
106
|
+
|
|
105
107
|
th:last-child,
|
|
106
108
|
td:last-child {
|
|
107
|
-
border-right: 0
|
|
109
|
+
border-right: 0;
|
|
108
110
|
}
|
|
109
111
|
}
|
|
110
|
-
|
|
112
|
+
|
|
111
113
|
tbody {
|
|
112
114
|
tr {
|
|
113
115
|
width: 100%;
|
|
114
116
|
&:hover {
|
|
115
|
-
background: rgba(0, 0, 0, 0.05)
|
|
117
|
+
background: rgba(0, 0, 0, 0.05);
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
tr {
|
|
121
|
-
border-bottom: solid 1px #
|
|
123
|
+
border-bottom: solid 1px #e5e5e5;
|
|
122
124
|
min-width: 100%; // Needed to fill content up
|
|
123
125
|
&:last-child {
|
|
124
|
-
border-bottom: 0
|
|
126
|
+
border-bottom: 0;
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
|
-
|
|
129
|
+
|
|
128
130
|
td {
|
|
129
|
-
padding: .3em .7em;
|
|
131
|
+
padding: 0.3em 0.7em;
|
|
130
132
|
border-right: 1px solid rgba(0, 0, 0, 0.1);
|
|
131
133
|
}
|
|
132
|
-
|
|
134
|
+
|
|
133
135
|
th,
|
|
134
136
|
td {
|
|
135
137
|
white-space: nowrap;
|
|
@@ -138,17 +140,19 @@ table.data-table {
|
|
|
138
140
|
&:last-child {
|
|
139
141
|
border-right: 0 !important;
|
|
140
142
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
th {
|
|
146
|
+
flex-grow: 1;
|
|
144
147
|
}
|
|
145
148
|
|
|
146
149
|
td {
|
|
147
150
|
position: relative;
|
|
151
|
+
flex-grow: 1;
|
|
148
152
|
}
|
|
149
153
|
|
|
150
154
|
td a {
|
|
151
|
-
padding: .3em .7em;
|
|
155
|
+
padding: 0.3em 0.7em;
|
|
152
156
|
position: absolute;
|
|
153
157
|
top: 0;
|
|
154
158
|
bottom: 0;
|
|
@@ -158,7 +162,7 @@ table.data-table {
|
|
|
158
162
|
color: inherit;
|
|
159
163
|
text-decoration: none;
|
|
160
164
|
}
|
|
161
|
-
|
|
165
|
+
|
|
162
166
|
td span.table-link {
|
|
163
167
|
text-decoration: underline;
|
|
164
168
|
cursor: pointer;
|
|
@@ -178,16 +182,17 @@ table.data-table {
|
|
|
178
182
|
h3 {
|
|
179
183
|
font-size: 1.3rem;
|
|
180
184
|
font-weight: 600;
|
|
181
|
-
margin-bottom: .3rem;
|
|
185
|
+
margin-bottom: 0.3rem;
|
|
182
186
|
}
|
|
183
187
|
}
|
|
184
188
|
tr:hover {
|
|
185
189
|
background: #fff;
|
|
186
190
|
}
|
|
187
|
-
th,
|
|
191
|
+
th,
|
|
192
|
+
td {
|
|
188
193
|
width: 50%;
|
|
189
194
|
&::before {
|
|
190
|
-
content:
|
|
195
|
+
content: '\00a0';
|
|
191
196
|
}
|
|
192
197
|
}
|
|
193
198
|
}
|
|
@@ -201,19 +206,19 @@ table.data-table {
|
|
|
201
206
|
margin: 0 1rem 0 0;
|
|
202
207
|
display: flex;
|
|
203
208
|
li + li {
|
|
204
|
-
margin-left: .3rem;
|
|
209
|
+
margin-left: 0.3rem;
|
|
205
210
|
}
|
|
206
211
|
button {
|
|
207
212
|
background: $mediumGray;
|
|
208
|
-
padding: .6rem .8rem;
|
|
213
|
+
padding: 0.6rem 0.8rem;
|
|
209
214
|
&:hover {
|
|
210
215
|
background: lighten($mediumGray, 5%);
|
|
211
216
|
}
|
|
212
217
|
}
|
|
213
218
|
button.btn-next {
|
|
214
219
|
&::before {
|
|
215
|
-
content:
|
|
216
|
-
background-image: url(~@cdc/core/assets/
|
|
220
|
+
content: ' ';
|
|
221
|
+
background-image: url(~@cdc/core/assets/icon-caret-filled-up.svg);
|
|
217
222
|
background-size: 10px 5px;
|
|
218
223
|
width: 10px;
|
|
219
224
|
height: 5px;
|
|
@@ -223,8 +228,8 @@ table.data-table {
|
|
|
223
228
|
}
|
|
224
229
|
button.btn-prev {
|
|
225
230
|
&::before {
|
|
226
|
-
content:
|
|
227
|
-
background-image: url(~@cdc/core/assets/
|
|
231
|
+
content: ' ';
|
|
232
|
+
background-image: url(~@cdc/core/assets/icon-caret-filled-up.svg);
|
|
228
233
|
background-size: 10px 5px;
|
|
229
234
|
width: 10px;
|
|
230
235
|
height: 5px;
|
|
@@ -234,7 +239,7 @@ table.data-table {
|
|
|
234
239
|
}
|
|
235
240
|
button[disabled] {
|
|
236
241
|
background: $mediumGray;
|
|
237
|
-
opacity: .3;
|
|
242
|
+
opacity: 0.3;
|
|
238
243
|
cursor: default;
|
|
239
244
|
&:hover {
|
|
240
245
|
background: $mediumGray;
|
|
@@ -247,9 +252,9 @@ table.data-table {
|
|
|
247
252
|
color: #fff;
|
|
248
253
|
float: right;
|
|
249
254
|
text-decoration: none;
|
|
250
|
-
transition: .3s all;
|
|
255
|
+
transition: 0.3s all;
|
|
251
256
|
margin: 1em 0;
|
|
252
257
|
&:hover {
|
|
253
|
-
transition: .3s all;
|
|
258
|
+
transition: 0.3s all;
|
|
254
259
|
}
|
|
255
260
|
}
|
package/styles/_global.scss
CHANGED
|
@@ -7,11 +7,11 @@ strong {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.error-box {
|
|
10
|
-
background: #
|
|
10
|
+
background: #ffc2c2;
|
|
11
11
|
display: flex;
|
|
12
12
|
justify-content: space-between;
|
|
13
|
-
padding: .3rem 1rem;
|
|
14
|
-
font-size: .9rem;
|
|
13
|
+
padding: 0.3rem 1rem;
|
|
14
|
+
font-size: 0.9rem;
|
|
15
15
|
strong {
|
|
16
16
|
font-weight: 600;
|
|
17
17
|
}
|
|
@@ -20,7 +20,7 @@ strong {
|
|
|
20
20
|
}
|
|
21
21
|
.dismiss-error {
|
|
22
22
|
flex-shrink: 0;
|
|
23
|
-
font-size: .8rem;
|
|
23
|
+
font-size: 0.8rem;
|
|
24
24
|
cursor: pointer;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -42,7 +42,7 @@ strong {
|
|
|
42
42
|
.inline-icon {
|
|
43
43
|
width: 1em !important;
|
|
44
44
|
height: auto !important;
|
|
45
|
-
@media all and (-ms-high-contrast:none) {
|
|
45
|
+
@media all and (-ms-high-contrast: none) {
|
|
46
46
|
height: 30px !important;
|
|
47
47
|
}
|
|
48
48
|
font-size: 1rem;
|
|
@@ -56,26 +56,26 @@ strong {
|
|
|
56
56
|
background: #005eaa;
|
|
57
57
|
color: #fff;
|
|
58
58
|
border: 0;
|
|
59
|
-
padding: .4em .8em;
|
|
59
|
+
padding: 0.4em 0.8em;
|
|
60
60
|
font-size: 1em;
|
|
61
61
|
display: block;
|
|
62
|
-
border-radius: .3em;
|
|
63
|
-
transition: .1s background-color;
|
|
62
|
+
border-radius: 0.3em;
|
|
63
|
+
transition: 0.1s background-color;
|
|
64
64
|
cursor: pointer;
|
|
65
65
|
&.full-width {
|
|
66
66
|
width: 100%;
|
|
67
67
|
}
|
|
68
68
|
&:hover {
|
|
69
|
-
transition: .1s background-color;
|
|
69
|
+
transition: 0.1s background-color;
|
|
70
70
|
}
|
|
71
71
|
&.secondary {
|
|
72
|
-
font-size: .8em;
|
|
73
|
-
padding: .3em 1em;
|
|
72
|
+
font-size: 0.8em;
|
|
73
|
+
padding: 0.3em 1em;
|
|
74
74
|
background: rgba(0, 0, 0, 0.3);
|
|
75
75
|
display: inline-block;
|
|
76
76
|
margin-bottom: 1em;
|
|
77
77
|
&:hover {
|
|
78
|
-
background: rgba(0,0,0
|
|
78
|
+
background: rgba(0, 0, 0, 0.5);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
&.danger {
|
|
@@ -87,7 +87,7 @@ strong {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
&:hover {
|
|
90
|
-
transition: .1s all;
|
|
90
|
+
transition: 0.1s all;
|
|
91
91
|
background: lighten(#005eaa, 5%);
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -100,14 +100,19 @@ strong {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
input[type=
|
|
104
|
-
|
|
103
|
+
input[type='text'],
|
|
104
|
+
input[type='date'],
|
|
105
|
+
input[role='combobox'],
|
|
106
|
+
input[type='number'],
|
|
107
|
+
input[type='search'],
|
|
108
|
+
textarea {
|
|
109
|
+
padding: 0.5em 0.5em;
|
|
105
110
|
font-size: 1em;
|
|
106
111
|
font-weight: normal;
|
|
107
112
|
font-family: sans-serif;
|
|
108
|
-
border: rgba(0,0,0
|
|
113
|
+
border: rgba(0, 0, 0, 0.3) 1px solid !important;
|
|
109
114
|
&:focus {
|
|
110
|
-
border: rgba(0,0,0
|
|
115
|
+
border: rgba(0, 0, 0, 0.7) 1px solid !important;
|
|
111
116
|
outline: 0;
|
|
112
117
|
}
|
|
113
118
|
}
|
|
@@ -129,16 +134,16 @@ select {
|
|
|
129
134
|
|
|
130
135
|
.guidance-link {
|
|
131
136
|
margin: 2em 0 1em;
|
|
132
|
-
padding: .75em 1em;
|
|
137
|
+
padding: 0.75em 1em;
|
|
133
138
|
display: flex;
|
|
134
139
|
text-decoration: none;
|
|
135
140
|
color: #444;
|
|
136
141
|
border: $lightGray 1px solid;
|
|
137
142
|
position: relative;
|
|
138
|
-
transition: .2s all;
|
|
143
|
+
transition: 0.2s all;
|
|
139
144
|
font-size: 1em;
|
|
140
145
|
&:before {
|
|
141
|
-
content:
|
|
146
|
+
content: ' ';
|
|
142
147
|
width: 5px;
|
|
143
148
|
background: $blue;
|
|
144
149
|
left: -1px;
|
|
@@ -148,11 +153,11 @@ select {
|
|
|
148
153
|
}
|
|
149
154
|
&:hover {
|
|
150
155
|
background: $lightestGray;
|
|
151
|
-
transition: .2s all;
|
|
156
|
+
transition: 0.2s all;
|
|
152
157
|
color: #444;
|
|
153
158
|
}
|
|
154
159
|
> div {
|
|
155
|
-
font-size: .9em;
|
|
160
|
+
font-size: 0.9em;
|
|
156
161
|
}
|
|
157
162
|
svg {
|
|
158
163
|
width: 60px;
|
|
@@ -167,3 +172,17 @@ select {
|
|
|
167
172
|
font-size: 1.2rem;
|
|
168
173
|
}
|
|
169
174
|
}
|
|
175
|
+
|
|
176
|
+
section.introText {
|
|
177
|
+
padding: 15px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
section.footnotes {
|
|
181
|
+
border-top: 1px solid #ddd;
|
|
182
|
+
margin-top: 20px;
|
|
183
|
+
padding: 15px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.cdc-chart-inner-container .subtext {
|
|
187
|
+
padding: 15px;
|
|
188
|
+
}
|
package/styles/_mixins.scss
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
@mixin emptyState {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
2
|
+
background: rgba(255, 255, 255, 0.5);
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
position: absolute;
|
|
8
|
+
text-align: center;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
z-index: 7;
|
|
13
|
+
}
|
package/styles/_reset.scss
CHANGED
|
@@ -6,21 +6,97 @@
|
|
|
6
6
|
text-rendering: optimizeLegibility;
|
|
7
7
|
-webkit-font-smoothing: antialiased;
|
|
8
8
|
color: #111;
|
|
9
|
+
|
|
10
|
+
// match cdc site outline
|
|
11
|
+
:focus,
|
|
12
|
+
[tabindex]:focus-visible {
|
|
13
|
+
outline: 2px solid rgba(255, 102, 1, 0.9) !important;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.outline-none {
|
|
17
|
+
outline: none !important;
|
|
18
|
+
}
|
|
9
19
|
}
|
|
10
20
|
.cdc-open-viz-module {
|
|
11
|
-
div,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
div,
|
|
22
|
+
span,
|
|
23
|
+
applet,
|
|
24
|
+
object,
|
|
25
|
+
iframe,
|
|
26
|
+
h1,
|
|
27
|
+
h2,
|
|
28
|
+
h3,
|
|
29
|
+
h4,
|
|
30
|
+
h5,
|
|
31
|
+
h6,
|
|
32
|
+
p,
|
|
33
|
+
blockquote,
|
|
34
|
+
pre,
|
|
35
|
+
a,
|
|
36
|
+
abbr,
|
|
37
|
+
acronym,
|
|
38
|
+
address,
|
|
39
|
+
big,
|
|
40
|
+
cite,
|
|
41
|
+
code,
|
|
42
|
+
del,
|
|
43
|
+
dfn,
|
|
44
|
+
em,
|
|
45
|
+
img,
|
|
46
|
+
ins,
|
|
47
|
+
kbd,
|
|
48
|
+
q,
|
|
49
|
+
s,
|
|
50
|
+
samp,
|
|
51
|
+
small,
|
|
52
|
+
strike,
|
|
53
|
+
strong,
|
|
54
|
+
sub,
|
|
55
|
+
sup,
|
|
56
|
+
tt,
|
|
57
|
+
var,
|
|
58
|
+
b,
|
|
59
|
+
u,
|
|
60
|
+
i,
|
|
61
|
+
center,
|
|
62
|
+
dl,
|
|
63
|
+
dt,
|
|
64
|
+
dd,
|
|
65
|
+
ol,
|
|
66
|
+
ul,
|
|
67
|
+
li,
|
|
68
|
+
fieldset,
|
|
69
|
+
form,
|
|
70
|
+
label,
|
|
71
|
+
legend,
|
|
72
|
+
table,
|
|
73
|
+
caption,
|
|
74
|
+
tbody,
|
|
75
|
+
tfoot,
|
|
76
|
+
thead,
|
|
77
|
+
tr,
|
|
78
|
+
th,
|
|
79
|
+
td,
|
|
80
|
+
article,
|
|
81
|
+
aside,
|
|
82
|
+
canvas,
|
|
83
|
+
details,
|
|
84
|
+
embed,
|
|
85
|
+
figure,
|
|
86
|
+
figcaption,
|
|
87
|
+
footer,
|
|
88
|
+
header,
|
|
89
|
+
hgroup,
|
|
90
|
+
menu,
|
|
91
|
+
nav,
|
|
92
|
+
output,
|
|
93
|
+
ruby,
|
|
94
|
+
section,
|
|
95
|
+
summary,
|
|
96
|
+
time,
|
|
97
|
+
mark,
|
|
98
|
+
audio,
|
|
99
|
+
video {
|
|
24
100
|
margin: 0;
|
|
25
101
|
padding: 0;
|
|
26
102
|
border: 0;
|
|
@@ -37,9 +113,12 @@
|
|
|
37
113
|
}
|
|
38
114
|
}
|
|
39
115
|
|
|
40
|
-
* {
|
|
116
|
+
* {
|
|
117
|
+
box-sizing: border-box;
|
|
118
|
+
}
|
|
41
119
|
|
|
42
|
-
sub,
|
|
120
|
+
sub,
|
|
121
|
+
sup {
|
|
43
122
|
/* Specified in % so that the sup/sup is the
|
|
44
123
|
right size relative to the surrounding text */
|
|
45
124
|
font-size: 75%;
|
|
@@ -67,4 +146,4 @@
|
|
|
67
146
|
half as far down as the superscript moved up */
|
|
68
147
|
bottom: -0.25em;
|
|
69
148
|
}
|
|
70
|
-
}
|
|
149
|
+
}
|
package/styles/_variables.scss
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
$baseColor: #333;
|
|
2
|
-
$blue: #
|
|
3
|
-
$lightestGray: #
|
|
4
|
-
$lightGray: #
|
|
2
|
+
$blue: #005eaa;
|
|
3
|
+
$lightestGray: #f2f2f2;
|
|
4
|
+
$lightGray: #c7c7c7;
|
|
5
5
|
$mediumGray: #565656;
|
|
6
6
|
$darkGray: #333;
|
|
7
7
|
$red: #d8000c;
|
|
8
8
|
$white: #fff;
|
|
9
9
|
|
|
10
|
-
$primary:
|
|
10
|
+
$primary: #005eaa !default;
|
|
11
11
|
$secondary: #88c3ea !default;
|
|
12
|
-
$tertiary:
|
|
12
|
+
$tertiary: #c0e9ff !default;
|
|
13
13
|
$quaternary: #edf9ff !default;
|
|
14
14
|
|
|
15
15
|
$purple-primary: #712177 !default;
|