@cdc/core 4.22.10 → 4.23.1
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/README.md +1 -1
- package/components/AdvancedEditor.js +52 -67
- package/components/ErrorBoundary.jsx +10 -11
- package/components/GlobalContext.jsx +2 -6
- package/components/LegendCircle.jsx +3 -4
- package/components/Loading.jsx +14 -12
- package/components/Waiting.jsx +14 -5
- package/components/elements/Button.jsx +34 -45
- package/components/elements/Card.jsx +1 -1
- package/components/inputs/InputCheckbox.jsx +32 -35
- package/components/inputs/InputGroup.jsx +38 -17
- package/components/inputs/InputSelect.jsx +27 -23
- package/components/inputs/InputText.jsx +9 -25
- package/components/inputs/InputToggle.jsx +29 -33
- package/components/managers/DataDesigner.jsx +87 -64
- package/components/ui/Accordion.jsx +18 -30
- package/components/ui/Icon.jsx +34 -35
- package/components/ui/LoadSpin.jsx +6 -11
- package/components/ui/Modal.jsx +40 -44
- package/components/ui/Overlay.jsx +12 -23
- package/components/ui/OverlayFrame.jsx +1 -5
- package/components/ui/Tooltip.jsx +8 -28
- package/data/colorPalettes.js +29 -266
- package/data/dataDesignerTables.js +107 -107
- package/data/themes.js +13 -13
- package/helpers/CoveMediaControls.js +139 -0
- package/helpers/DataTransform.js +92 -92
- package/helpers/cacheBustingString.js +3 -3
- package/helpers/events.js +5 -6
- package/helpers/fetchRemoteData.js +33 -33
- package/helpers/getViewport.js +15 -15
- package/helpers/numberFromString.js +7 -7
- package/helpers/updatePaletteNames.js +15 -17
- package/helpers/useDataVizClasses.js +38 -35
- package/helpers/validateFipsCodeLength.js +41 -56
- package/package.json +4 -2
- package/styles/_button-section.scss +35 -0
- package/styles/_data-table.scss +39 -27
- package/styles/_global.scss +29 -24
- package/styles/_mixins.scss +12 -12
- package/styles/_reset.scss +85 -16
- package/styles/_variables.scss +5 -5
- package/styles/base.scss +100 -48
- package/styles/heading-colors.scss +6 -2
- package/styles/loading.scss +62 -60
- package/styles/v2/base/_file-selector.scss +2 -2
- package/styles/v2/base/_general.scss +1 -1
- package/styles/v2/base/_reset.scss +2 -2
- package/styles/v2/base/index.scss +4 -4
- package/styles/v2/components/accordion.scss +13 -13
- package/styles/v2/components/button.scss +3 -3
- package/styles/v2/components/card.scss +1 -1
- package/styles/v2/components/data-designer.scss +7 -6
- package/styles/v2/components/editor.scss +52 -51
- package/styles/v2/components/guidance-block.scss +6 -6
- package/styles/v2/components/input/_input-check-radio.scss +7 -7
- package/styles/v2/components/input/_input-group.scss +2 -2
- package/styles/v2/components/input/_input-slider.scss +2 -3
- package/styles/v2/components/input/index.scss +6 -6
- package/styles/v2/components/loadspin.scss +1 -1
- package/styles/v2/components/modal.scss +2 -2
- package/styles/v2/components/overlay.scss +4 -4
- package/styles/v2/layout/_alert.scss +8 -8
- package/styles/v2/layout/_component.scss +1 -1
- package/styles/v2/layout/_data-table.scss +12 -11
- package/styles/v2/layout/_progression.scss +8 -6
- package/styles/v2/layout/index.scss +5 -5
- package/styles/v2/main.scss +7 -7
- package/styles/v2/themes/_color-definitions.scss +77 -24
- package/styles/v2/themes/index.scss +1 -1
- package/styles/v2/utils/_animations.scss +2 -2
- package/styles/v2/utils/_breakpoints.scss +53 -12
- package/styles/v2/utils/_variables.scss +5 -5
- package/styles/v2/utils/index.scss +8 -8
- package/styles/waiting.scss +22 -23
package/styles/base.scss
CHANGED
|
@@ -1,61 +1,57 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use 'sass:string';
|
|
2
2
|
|
|
3
3
|
@mixin breakpoint($class) {
|
|
4
4
|
@if $class == xs {
|
|
5
|
-
@media (max-width: 767px) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@else if $class == sm {
|
|
9
|
-
@media (min-width: 768px) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@else if $class == md {
|
|
13
|
-
@media (min-width: 960px) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@else if $class == lg {
|
|
17
|
-
@media (min-width: 1300px) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
@else {
|
|
5
|
+
@media (max-width: 767px) {
|
|
6
|
+
@content;
|
|
7
|
+
}
|
|
8
|
+
} @else if $class == sm {
|
|
9
|
+
@media (min-width: 768px) {
|
|
10
|
+
@content;
|
|
11
|
+
}
|
|
12
|
+
} @else if $class == md {
|
|
13
|
+
@media (min-width: 960px) {
|
|
14
|
+
@content;
|
|
15
|
+
}
|
|
16
|
+
} @else if $class == lg {
|
|
17
|
+
@media (min-width: 1300px) {
|
|
18
|
+
@content;
|
|
19
|
+
}
|
|
20
|
+
} @else {
|
|
21
21
|
@warn "Breakpoint mixin supports: xs, sm, md, lg";
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
@mixin breakpointClass($class) {
|
|
26
26
|
@if $class == xs {
|
|
27
|
-
&.xs,
|
|
27
|
+
&.xs,
|
|
28
|
+
&.xxs {
|
|
28
29
|
@content;
|
|
29
30
|
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
&.
|
|
31
|
+
} @else if $class == sm {
|
|
32
|
+
&.sm,
|
|
33
|
+
&.md,
|
|
34
|
+
&.lg {
|
|
34
35
|
@content;
|
|
35
36
|
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
&.md, &.lg {
|
|
37
|
+
} @else if $class == md {
|
|
38
|
+
&.md,
|
|
39
|
+
&.lg {
|
|
40
40
|
@content;
|
|
41
41
|
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@else if $class == lg {
|
|
42
|
+
} @else if $class == lg {
|
|
45
43
|
&.lg {
|
|
46
44
|
@content;
|
|
47
45
|
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
@else {
|
|
46
|
+
} @else {
|
|
51
47
|
@warn "Breakpoint Class mixin supports: xs, sm, md, lg";
|
|
52
48
|
}
|
|
53
49
|
}
|
|
54
50
|
|
|
55
51
|
// Imports
|
|
56
|
-
@import
|
|
57
|
-
@import
|
|
58
|
-
@import
|
|
52
|
+
@import 'reset';
|
|
53
|
+
@import 'variables';
|
|
54
|
+
@import 'mixins';
|
|
59
55
|
|
|
60
56
|
.cdc-open-viz-module {
|
|
61
57
|
position: relative;
|
|
@@ -65,20 +61,76 @@
|
|
|
65
61
|
@include breakpointClass(md) {
|
|
66
62
|
font-size: 16px !important;
|
|
67
63
|
}
|
|
68
|
-
@import
|
|
69
|
-
@import
|
|
64
|
+
@import 'data-table';
|
|
65
|
+
@import 'global';
|
|
66
|
+
@import 'button-section';
|
|
70
67
|
}
|
|
71
68
|
|
|
72
69
|
$theme: (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
70
|
+
'amber': (
|
|
71
|
+
'#fbab18',
|
|
72
|
+
'#ffd54f',
|
|
73
|
+
'#ffecb3',
|
|
74
|
+
'#fff7e1'
|
|
75
|
+
),
|
|
76
|
+
'blue': (
|
|
77
|
+
'#005eaa',
|
|
78
|
+
'#88c3ea',
|
|
79
|
+
'#c0e9ff',
|
|
80
|
+
'#edf9ff'
|
|
81
|
+
),
|
|
82
|
+
'brown': (
|
|
83
|
+
'#705043',
|
|
84
|
+
'#ad907b',
|
|
85
|
+
'#d7ccc8',
|
|
86
|
+
'#f2ebe8'
|
|
87
|
+
),
|
|
88
|
+
'cyan': (
|
|
89
|
+
'#006778',
|
|
90
|
+
'#65b0bd',
|
|
91
|
+
'#cce5e9',
|
|
92
|
+
'#ebf5f6'
|
|
93
|
+
),
|
|
94
|
+
'green': (
|
|
95
|
+
'#4b830d',
|
|
96
|
+
'#84bc49',
|
|
97
|
+
'#dcedc8',
|
|
98
|
+
'#f1f8e9'
|
|
99
|
+
),
|
|
100
|
+
'indigo': (
|
|
101
|
+
'#26418f',
|
|
102
|
+
'#92a6dd',
|
|
103
|
+
'#dee8ff',
|
|
104
|
+
'#f2f6ff'
|
|
105
|
+
),
|
|
106
|
+
'orange': (
|
|
107
|
+
'#bb4d00',
|
|
108
|
+
'#ffad42',
|
|
109
|
+
'#ffe97d',
|
|
110
|
+
'#fff4cf'
|
|
111
|
+
),
|
|
112
|
+
'pink': (
|
|
113
|
+
'#af4448',
|
|
114
|
+
'#e57373',
|
|
115
|
+
'#ffc2c2',
|
|
116
|
+
'#ffe7e7'
|
|
117
|
+
),
|
|
118
|
+
'purple': (
|
|
119
|
+
'#712177',
|
|
120
|
+
'#b890bb',
|
|
121
|
+
'#e3d3e4',
|
|
122
|
+
'#f7f2f7'
|
|
123
|
+
),
|
|
124
|
+
'slate': (
|
|
125
|
+
'#29434e',
|
|
126
|
+
'#7e9ba5',
|
|
127
|
+
'#b6c6d2',
|
|
128
|
+
'#e2e8ed'
|
|
129
|
+
),
|
|
130
|
+
'teal': (
|
|
131
|
+
'#00695c',
|
|
132
|
+
'#4ebaaa',
|
|
133
|
+
'#ceece7',
|
|
134
|
+
'#ebf7f5'
|
|
135
|
+
)
|
|
84
136
|
);
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
div.dashboard-title,
|
|
1
|
+
div.dashboard-title,
|
|
2
|
+
div.chart-title,
|
|
3
|
+
div.map-title,
|
|
4
|
+
.color-palette li,
|
|
5
|
+
.btn {
|
|
2
6
|
&.theme-purple {
|
|
3
7
|
background: #712177;
|
|
4
8
|
border-bottom-color: #b890bb;
|
|
@@ -43,4 +47,4 @@ div.dashboard-title, div.chart-title, div.map-title, .color-palette li, .btn {
|
|
|
43
47
|
background: #005eaa;
|
|
44
48
|
border-bottom-color: #88c3ea;
|
|
45
49
|
}
|
|
46
|
-
}
|
|
50
|
+
}
|
package/styles/loading.scss
CHANGED
|
@@ -5,68 +5,70 @@
|
|
|
5
5
|
* Licensed under MIT
|
|
6
6
|
*/
|
|
7
7
|
@keyframes ball-beat {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
50% {
|
|
9
|
+
opacity: 0.2;
|
|
10
|
+
-webkit-transform: scale(0.75);
|
|
11
|
+
-moz-transform: scale(0.75);
|
|
12
|
+
-o-transform: scale(0.75);
|
|
13
|
+
transform: scale(0.75);
|
|
14
|
+
}
|
|
15
|
+
100% {
|
|
16
|
+
opacity: 1;
|
|
17
|
+
-webkit-transform: scale(1);
|
|
18
|
+
-moz-transform: scale(1);
|
|
19
|
+
-o-transform: scale(1);
|
|
20
|
+
transform: scale(1);
|
|
21
|
+
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.cdc-open-viz-module .loading {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
25
|
+
text-align: center;
|
|
26
|
+
position: absolute;
|
|
27
|
+
z-index: 3;
|
|
28
|
+
background: rgba(255, 255, 255, 0.5);
|
|
29
|
+
left: 0;
|
|
30
|
+
right: 0;
|
|
31
|
+
bottom: 0;
|
|
32
|
+
top: 0;
|
|
33
|
+
min-height: 30%;
|
|
34
|
+
span {
|
|
35
|
+
display: block;
|
|
36
|
+
margin-bottom: 1em;
|
|
37
|
+
font-size: 1.3em;
|
|
38
|
+
}
|
|
39
|
+
.la-ball-beat {
|
|
40
|
+
position: relative;
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
margin: 0 auto;
|
|
43
|
+
transform: scale(1.3);
|
|
44
|
+
font-size: 0;
|
|
45
|
+
color: #777;
|
|
46
|
+
display: flex;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
align-items: center;
|
|
49
|
+
width: 108px;
|
|
50
|
+
height: 36px;
|
|
51
|
+
&.sm,
|
|
52
|
+
&.xs,
|
|
53
|
+
&.xxs {
|
|
54
|
+
transform: scale(0.7);
|
|
55
|
+
}
|
|
56
|
+
div + div {
|
|
57
|
+
margin-left: 10px;
|
|
58
|
+
}
|
|
59
|
+
> div {
|
|
40
60
|
position: relative;
|
|
41
|
-
box-sizing: border-box;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
display:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
&.sm, &.xs, &.xxs {
|
|
52
|
-
transform: scale(0.7)
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
width: 20px;
|
|
63
|
+
height: 20px;
|
|
64
|
+
border-radius: 100%;
|
|
65
|
+
animation: ball-beat 0.7s -0.15s infinite linear;
|
|
66
|
+
display: inline-block;
|
|
67
|
+
background-color: currentColor;
|
|
68
|
+
border: 0 solid currentColor;
|
|
69
|
+
&:nth-child(2n-1) {
|
|
70
|
+
animation-delay: -0.5s;
|
|
53
71
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
> div {
|
|
58
|
-
position: relative;
|
|
59
|
-
box-sizing: border-box;
|
|
60
|
-
width: 20px;
|
|
61
|
-
height: 20px;
|
|
62
|
-
border-radius: 100%;
|
|
63
|
-
animation: ball-beat .7s -.15s infinite linear;
|
|
64
|
-
display: inline-block;
|
|
65
|
-
background-color: currentColor;
|
|
66
|
-
border: 0 solid currentColor;
|
|
67
|
-
&:nth-child(2n-1) {
|
|
68
|
-
animation-delay: -.5s;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -37,7 +37,6 @@ a:not([class]) {
|
|
|
37
37
|
text-decoration-skip-ink: auto;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
41
40
|
img,
|
|
42
41
|
picture {
|
|
43
42
|
max-width: 100%;
|
|
@@ -51,7 +50,8 @@ select {
|
|
|
51
50
|
font: inherit;
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
sub,
|
|
53
|
+
sub,
|
|
54
|
+
sup {
|
|
55
55
|
font-size: 75%;
|
|
56
56
|
line-height: 0;
|
|
57
57
|
position: relative;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@import
|
|
2
|
-
@import
|
|
1
|
+
@import '../utils/variables';
|
|
2
|
+
@import '../themes/index';
|
|
3
3
|
|
|
4
4
|
.cove {
|
|
5
5
|
.cove-accordion__item {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
.number-narrow {
|
|
11
11
|
min-width: auto;
|
|
12
|
-
width: 75px
|
|
12
|
+
width: 75px;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
justify-content: space-between;
|
|
23
23
|
position: relative;
|
|
24
24
|
width: 100%;
|
|
25
|
-
padding: .3em 1em;
|
|
25
|
+
padding: 0.3em 1em;
|
|
26
26
|
font-size: 1em;
|
|
27
27
|
text-align: left;
|
|
28
28
|
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
position: absolute;
|
|
42
42
|
top: 50%;
|
|
43
43
|
transform: rotate(-45deg) translateX(0) translateY(-50%);
|
|
44
|
-
transition: .1s all;
|
|
44
|
+
transition: 0.1s all;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
&[aria-expanded='true']::before,
|
|
48
48
|
&[aria-selected='true']::before {
|
|
49
49
|
transform: rotate(45deg) translateX(-2px) translateY(-70%);
|
|
50
50
|
margin-right: 1.3em;
|
|
51
|
-
transition: .1s all;
|
|
51
|
+
transition: 0.1s all;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.cove-tooltip,
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
h5 {
|
|
74
|
-
font-size: .8em;
|
|
74
|
+
font-size: 0.8em;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
.cove-accordion__small-inputs {
|
|
117
|
-
input[type=
|
|
117
|
+
input[type='text'] {
|
|
118
118
|
display: block;
|
|
119
119
|
width: 100%;
|
|
120
120
|
height: 22px;
|
|
@@ -139,14 +139,14 @@
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
.cove-accordion__input-error {
|
|
142
|
-
color: #
|
|
143
|
-
border: #
|
|
142
|
+
color: #d8000c;
|
|
143
|
+
border: #d8000c 1px solid;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
.cove-accordion__panel-error {
|
|
147
|
-
color: #
|
|
148
|
-
background-color: #
|
|
149
|
-
border: #
|
|
147
|
+
color: #d8000c;
|
|
148
|
+
background-color: #ffd2d2;
|
|
149
|
+
border: #d8000c 1px solid;
|
|
150
150
|
margin-top: 12px;
|
|
151
151
|
padding: 4px 8px;
|
|
152
152
|
line-height: 1.2em;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@import
|
|
2
|
-
@import
|
|
1
|
+
@import '../utils/variables';
|
|
2
|
+
@import '../themes/index';
|
|
3
3
|
|
|
4
4
|
.sbdocs .cove-button {
|
|
5
5
|
margin-right: 1rem;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
position: absolute;
|
|
57
57
|
inset: 0;
|
|
58
58
|
outline: 2px solid rgba(161, 161, 161, 0.6);
|
|
59
|
-
border-radius: .3125em;
|
|
59
|
+
border-radius: 0.3125em;
|
|
60
60
|
margin: -2px;
|
|
61
61
|
pointer-events: none;
|
|
62
62
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
@import
|
|
2
|
-
@import
|
|
1
|
+
@import '../utils/variables';
|
|
2
|
+
@import '../themes/color-definitions';
|
|
3
3
|
|
|
4
4
|
.cove-modal__content {
|
|
5
5
|
.dataset-selector-container {
|
|
6
6
|
padding: 1em;
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
.dataset-selector {
|
|
9
9
|
margin: 0 0.5em;
|
|
10
10
|
padding: 0.5em;
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
p {
|
|
74
|
-
font-size: .8rem;
|
|
74
|
+
font-size: 0.8rem;
|
|
75
75
|
margin-bottom: 1rem;
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
table {
|
|
83
|
-
font-size: .8rem;
|
|
83
|
+
font-size: 0.8rem;
|
|
84
84
|
background-color: #fff;
|
|
85
85
|
border: 1px solid $lightGray;
|
|
86
86
|
border-collapse: collapse;
|
|
@@ -91,7 +91,8 @@
|
|
|
91
91
|
background-color: $primary;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
th,
|
|
94
|
+
th,
|
|
95
|
+
td {
|
|
95
96
|
padding: 0 5px;
|
|
96
97
|
border-top: 1px solid $lightGray;
|
|
97
98
|
border-bottom: 1px solid $lightGray;
|