@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.
Files changed (138) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +1 -1
  3. package/assets/filtered-text.svg +1 -0
  4. package/assets/icon-caret-down.svg +3 -0
  5. package/assets/icon-caret-filled-down.svg +3 -0
  6. package/assets/icon-caret-filled-up.svg +3 -0
  7. package/assets/icon-caret-up.svg +3 -0
  8. package/assets/icon-chart-bar-paired.svg +15 -0
  9. package/assets/icon-chart-bar-stacked.svg +10 -0
  10. package/assets/icon-chart-bar.svg +3 -0
  11. package/assets/icon-chart-line.svg +3 -0
  12. package/assets/icon-chart-pie.svg +3 -0
  13. package/assets/icon-check.svg +3 -0
  14. package/assets/icon-close.svg +3 -1
  15. package/assets/icon-code.svg +2 -2
  16. package/assets/icon-dashboard.svg +34 -0
  17. package/assets/icon-databite.svg +3 -0
  18. package/assets/icon-edit.svg +3 -0
  19. package/assets/icon-file-upload.svg +3 -0
  20. package/assets/icon-filter-bars.svg +5 -0
  21. package/assets/icon-gear.svg +6 -0
  22. package/assets/icon-grid.svg +2 -3
  23. package/assets/icon-info.svg +1 -1
  24. package/assets/icon-link.svg +3 -0
  25. package/assets/{alabama-graphic.svg → icon-map-alabama.svg} +2 -2
  26. package/assets/icon-map-usa.svg +3 -0
  27. package/assets/icon-map-world.svg +3 -0
  28. package/assets/icon-minus.svg +3 -0
  29. package/assets/icon-move.svg +8 -0
  30. package/assets/icon-plus.svg +3 -0
  31. package/assets/icon-question-circle.svg +3 -0
  32. package/assets/icon-tools.svg +8 -0
  33. package/assets/icon-upload.svg +3 -0
  34. package/assets/icon-warning-circle.svg +3 -0
  35. package/assets/{icon-warning.svg → icon-warning-triangle.svg} +1 -1
  36. package/components/AdvancedEditor.js +52 -67
  37. package/components/{ErrorBoundary.js → ErrorBoundary.jsx} +10 -11
  38. package/components/GlobalContext.jsx +2 -6
  39. package/components/{LegendCircle.js → LegendCircle.jsx} +4 -4
  40. package/components/Loading.jsx +17 -0
  41. package/components/Waiting.jsx +20 -0
  42. package/components/elements/Button.jsx +111 -3
  43. package/components/elements/Card.jsx +13 -0
  44. package/components/inputs/InputCheckbox.jsx +43 -38
  45. package/components/inputs/InputGroup.jsx +71 -0
  46. package/components/inputs/InputSelect.jsx +28 -24
  47. package/components/inputs/InputText.jsx +20 -37
  48. package/components/inputs/InputToggle.jsx +39 -43
  49. package/components/managers/DataDesigner.jsx +194 -0
  50. package/components/ui/Accordion.jsx +18 -30
  51. package/components/ui/Icon.jsx +59 -20
  52. package/components/ui/LoadSpin.jsx +19 -0
  53. package/components/ui/Modal.jsx +40 -39
  54. package/components/ui/Overlay.jsx +15 -24
  55. package/components/ui/OverlayFrame.jsx +1 -5
  56. package/components/ui/Tooltip.jsx +20 -31
  57. package/data/colorPalettes.js +36 -227
  58. package/data/dataDesignerTables.js +148 -0
  59. package/data/themes.js +13 -13
  60. package/helpers/DataTransform.js +162 -0
  61. package/helpers/cacheBustingString.js +5 -0
  62. package/helpers/events.js +5 -6
  63. package/helpers/fetchRemoteData.js +41 -0
  64. package/helpers/getViewport.js +15 -15
  65. package/helpers/numberFromString.js +7 -7
  66. package/helpers/updatePaletteNames.js +15 -17
  67. package/helpers/useDataVizClasses.js +40 -0
  68. package/helpers/validateFipsCodeLength.js +41 -56
  69. package/package.json +3 -2
  70. package/styles/_data-table.scss +45 -40
  71. package/styles/_global.scss +41 -22
  72. package/styles/_mixins.scss +12 -12
  73. package/styles/_reset.scss +95 -16
  74. package/styles/_variables.scss +5 -5
  75. package/styles/base.scss +104 -37
  76. package/styles/heading-colors.scss +6 -2
  77. package/styles/loading.scss +62 -60
  78. package/styles/v2/base/_file-selector.scss +20 -0
  79. package/styles/v2/base/_general.scss +9 -22
  80. package/styles/v2/base/_heading.scss +20 -0
  81. package/styles/v2/base/_reset.scss +4 -3
  82. package/styles/v2/base/index.scss +7 -3
  83. package/styles/v2/components/accordion.scss +13 -13
  84. package/styles/v2/components/button.scss +29 -68
  85. package/styles/v2/components/card.scss +7 -0
  86. package/styles/v2/components/data-designer.scss +101 -0
  87. package/styles/v2/components/editor.scss +52 -50
  88. package/styles/v2/components/guidance-block.scss +74 -0
  89. package/styles/v2/components/icon.scss +0 -4
  90. package/styles/v2/components/input/_input-check-radio.scss +97 -0
  91. package/styles/v2/components/input/_input-group.scss +74 -0
  92. package/styles/v2/components/input/_input-slider.scss +183 -0
  93. package/styles/v2/components/input/_input.scss +66 -0
  94. package/styles/v2/components/input/index.scss +7 -0
  95. package/styles/v2/components/loadspin.scss +100 -0
  96. package/styles/v2/components/modal.scss +15 -8
  97. package/styles/v2/components/overlay.scss +6 -4
  98. package/styles/v2/layout/_alert.scss +15 -14
  99. package/styles/v2/layout/_component.scss +8 -1
  100. package/styles/v2/layout/_data-table.scss +78 -156
  101. package/styles/v2/layout/_progression.scss +12 -8
  102. package/styles/v2/layout/index.scss +5 -7
  103. package/styles/v2/main.scss +52 -2
  104. package/styles/v2/themes/_color-definitions.scss +103 -20
  105. package/styles/v2/themes/index.scss +1 -1
  106. package/styles/v2/utils/_align.scss +17 -0
  107. package/styles/v2/utils/_animations.scss +2 -2
  108. package/styles/v2/utils/_breakpoints.scss +59 -0
  109. package/styles/v2/utils/_grid.scss +47 -0
  110. package/styles/v2/utils/_mixins.scss +0 -16
  111. package/styles/v2/utils/_spacers.scss +31 -0
  112. package/styles/v2/utils/_variables.scss +7 -0
  113. package/styles/v2/utils/index.scss +9 -4
  114. package/styles/waiting.scss +22 -23
  115. package/assets/asc.svg +0 -1
  116. package/assets/chart-bar-solid.svg +0 -1
  117. package/assets/chart-line-solid.svg +0 -1
  118. package/assets/chart-pie-solid.svg +0 -1
  119. package/assets/check.svg +0 -3
  120. package/assets/dashboard.svg +0 -11
  121. package/assets/data-bite-graphic.svg +0 -3
  122. package/assets/desc.svg +0 -1
  123. package/assets/file-upload-solid.svg +0 -1
  124. package/assets/horizontal-stacked-bar.svg +0 -1
  125. package/assets/link.svg +0 -1
  126. package/assets/minus.svg +0 -1
  127. package/assets/paired-bar.svg +0 -11
  128. package/assets/plus.svg +0 -1
  129. package/assets/question-circle.svg +0 -1
  130. package/assets/upload-solid.svg +0 -1
  131. package/assets/usa-graphic.svg +0 -3
  132. package/assets/world-graphic.svg +0 -3
  133. package/components/DataTransform.js +0 -162
  134. package/components/Loading.js +0 -15
  135. package/components/Waiting.js +0 -11
  136. package/styles/v2/components/input.scss +0 -372
  137. package/styles/v2/layout/_header.scss +0 -13
  138. 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
- // FIPS are within obj.
18
- if (!Array.isArray(stateOrData)) {
19
- if (stateOrData.general.geoType === 'us-county' || stateOrData.general.geoType === 'single-state' || stateOrData.general.geoType === 'us' && stateOrData?.data) {
20
-
21
- stateOrData?.data.forEach(dataPiece => {
22
- if (dataPiece[stateOrData.columns.geo.name]) {
23
-
24
- if (!isNaN(parseInt(dataPiece[stateOrData.columns.geo.name])) && dataPiece[stateOrData.columns.geo.name].length === 4) {
25
- dataPiece[stateOrData.columns.geo.name] = 0 + dataPiece[stateOrData.columns.geo.name]
26
- }
27
- dataPiece[stateOrData.columns.geo.name] = dataPiece[stateOrData.columns.geo.name].toString()
28
- }
29
- })
30
- }
31
- }
32
-
33
- // Only includes data - get column name from somewhere else
34
- if (Array.isArray(stateOrData)) {
35
-
36
- let columns = Object.keys(stateOrData[0])
37
-
38
- let potentialColumnNames = [
39
- 'fips',
40
- 'FIPS',
41
- 'fips codes',
42
- 'FIPS CODES',
43
- 'Fips Codes',
44
- 'fips Codes',
45
- 'Fips codes',
46
- 'FIPS Codes'
47
- ]
48
-
49
- const fipsCol = columns.filter(columnName => potentialColumnNames.includes(columnName));
50
-
51
- if (!fipsCol.length) return; // no column name to reference, leave the fips alone.
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": "1.1.4",
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": "ff89a7aea74c533413c62ef8859cc011e6b3cbfa"
33
+ "gitHead": "9768d1ea0e2383044977d988e33531bcdfe33ea6"
33
34
  }
@@ -1,4 +1,6 @@
1
- .collapsed + .table-container { border-bottom: none; }
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/asc.svg);
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/desc.svg);
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 #E5E5E5;
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
- &:first-child {
142
- flex-grow: 1;
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, td {
191
+ th,
192
+ td {
188
193
  width: 50%;
189
194
  &::before {
190
- content: "\00a0";
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/asc.svg);
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/asc.svg);
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
  }
@@ -7,11 +7,11 @@ strong {
7
7
  }
8
8
 
9
9
  .error-box {
10
- background: #FFC2C2;
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,.5);
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="text"], input[type="date"], input[role="combobox"], input[type="number"], input[type="search"], textarea {
104
- padding: .5em .5em;
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,.3) 1px solid !important;
113
+ border: rgba(0, 0, 0, 0.3) 1px solid !important;
109
114
  &:focus {
110
- border: rgba(0,0,0,.7) 1px solid !important;
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
+ }
@@ -1,13 +1,13 @@
1
1
  @mixin emptyState {
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
- }
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
+ }
@@ -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, span, applet, object, iframe,
12
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
13
- a, abbr, acronym, address, big, cite, code,
14
- del, dfn, em, img, ins, kbd, q, s, samp,
15
- small, strike, strong, sub, sup, tt, var,
16
- b, u, i, center,
17
- dl, dt, dd, ol, ul, li,
18
- fieldset, form, label, legend,
19
- table, caption, tbody, tfoot, thead, tr, th, td,
20
- article, aside, canvas, details, embed,
21
- figure, figcaption, footer, header, hgroup,
22
- menu, nav, output, ruby, section, summary,
23
- time, mark, audio, video {
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
- * {box-sizing: border-box}
116
+ * {
117
+ box-sizing: border-box;
118
+ }
41
119
 
42
- sub, sup {
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
+ }
@@ -1,15 +1,15 @@
1
1
  $baseColor: #333;
2
- $blue: #005EAA;
3
- $lightestGray: #F2F2F2;
4
- $lightGray: #C7C7C7;
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: #005eaa !default;
10
+ $primary: #005eaa !default;
11
11
  $secondary: #88c3ea !default;
12
- $tertiary: #c0e9ff !default;
12
+ $tertiary: #c0e9ff !default;
13
13
  $quaternary: #edf9ff !default;
14
14
 
15
15
  $purple-primary: #712177 !default;