@cdc/core 4.23.8 → 4.23.10-alpha
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/components/AdvancedEditor.jsx +1 -1
- package/components/DataTable.jsx +247 -176
- package/components/Filters.jsx +7 -5
- package/components/{GlobalContext.jsx → GlobalContext.tsx} +16 -5
- package/components/Legend/index.tsx +39 -0
- package/components/MediaControls.jsx +7 -6
- package/components/elements/_stories/Button.stories.tsx +28 -0
- package/components/elements/_stories/Card.stories.tsx +21 -0
- package/components/managers/_stories/DataDesigner.stories.tsx +26 -0
- package/components/ui/Accordion.jsx +1 -1
- package/components/ui/Icon.jsx +3 -1
- package/components/ui/Modal.jsx +1 -1
- package/components/ui/Select.jsx +30 -0
- package/components/ui/Tooltip.jsx +3 -2
- package/components/ui/_stories/Accordion.stories.tsx +36 -0
- package/components/ui/_stories/Icon.stories.tsx +22 -0
- package/data/colorPalettes.js +11 -0
- package/helpers/{DataTransform.js → DataTransform.ts} +34 -25
- package/helpers/fetchRemoteData.js +4 -10
- package/helpers/gatherQueryParams.ts +7 -0
- package/helpers/getFileExtension.ts +5 -0
- package/helpers/lineChartHelpers.js +7 -0
- package/helpers/useDataVizClasses.js +38 -5
- package/package.json +2 -2
- package/styles/_data-table.scss +25 -9
- package/styles/_reset.scss +6 -0
- package/styles/_typography.scss +20 -0
- package/styles/base.scss +1 -0
- package/styles/v2/layout/_component.scss +3 -3
- package/styles/v2/themes/_color-definitions.scss +27 -45
package/styles/_data-table.scss
CHANGED
|
@@ -30,6 +30,17 @@ div.data-table-heading {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
table.horizontal {
|
|
34
|
+
tr {
|
|
35
|
+
display: flex;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
th,
|
|
39
|
+
td {
|
|
40
|
+
min-width: 200px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
33
44
|
table.data-table {
|
|
34
45
|
width: 100%;
|
|
35
46
|
background: #fff;
|
|
@@ -108,14 +119,14 @@ table.data-table {
|
|
|
108
119
|
|
|
109
120
|
// format the white triangle sort icon in data table headers
|
|
110
121
|
.sort-icon {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
122
|
+
fill: white;
|
|
123
|
+
width: 30px;
|
|
124
|
+
float: right;
|
|
125
|
+
align-self: center;
|
|
126
|
+
position: absolute;
|
|
127
|
+
right: 10px;
|
|
128
|
+
top: 50%;
|
|
129
|
+
transform: translateY(-50%);
|
|
119
130
|
}
|
|
120
131
|
|
|
121
132
|
th:last-child,
|
|
@@ -155,7 +166,12 @@ table.data-table {
|
|
|
155
166
|
border-right: 0 !important;
|
|
156
167
|
}
|
|
157
168
|
}
|
|
158
|
-
|
|
169
|
+
tr {
|
|
170
|
+
display: flex;
|
|
171
|
+
& > * {
|
|
172
|
+
width: 100%;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
159
175
|
th {
|
|
160
176
|
flex-grow: 1;
|
|
161
177
|
}
|
package/styles/_reset.scss
CHANGED
|
@@ -141,6 +141,12 @@
|
|
|
141
141
|
top: -0.5em;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
+
header sup {
|
|
145
|
+
/* Allow line breaks using html in the header. */
|
|
146
|
+
top: initial;
|
|
147
|
+
line-height: initial;
|
|
148
|
+
}
|
|
149
|
+
|
|
144
150
|
sub {
|
|
145
151
|
/* Move the subscripted text down, but only
|
|
146
152
|
half as far down as the superscript moved up */
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
&.font-small {
|
|
2
|
+
.chart-container {
|
|
3
|
+
font-size: 0.9em !important;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
&.font-medium {
|
|
8
|
+
font-size: 1em !important;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&.font-large {
|
|
12
|
+
.chart-container {
|
|
13
|
+
font-size: 1.1em !important;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.subtext {
|
|
18
|
+
font-style: italic;
|
|
19
|
+
font-size: 0.9em !important;
|
|
20
|
+
}
|
package/styles/base.scss
CHANGED
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
border: none !important;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.cdc-data-bite-inner-container:not(.component--has-title) .cove-component__content:not(.no-borders) {
|
|
28
|
-
|
|
29
|
-
}
|
|
27
|
+
// .cdc-data-bite-inner-container:not(.component--has-title) .cove-component__content:not(.no-borders) {
|
|
28
|
+
// border-top: 1px solid #ccc;
|
|
29
|
+
// }
|
|
30
30
|
|
|
31
31
|
.cove-component__content:not(.component--hideBackgroundColor) {
|
|
32
32
|
background: $lightestGray;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use 'sass:string';
|
|
2
|
+
@import './../../variables';
|
|
2
3
|
|
|
3
4
|
$theme: (
|
|
4
5
|
'amber': (
|
|
@@ -87,62 +88,43 @@ $theme: (
|
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
&.theme-#{$theme-name} {
|
|
90
|
-
.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
91
|
+
/// area that appears underneath the title of the component.
|
|
92
|
+
.cove-component__content {
|
|
93
|
+
/// when there are borders on a component
|
|
94
|
+
&:not(.no-borders) {
|
|
95
|
+
/// borders are the theme color
|
|
96
|
+
&.component--has-borderColorTheme {
|
|
97
|
+
border: 1px solid string.unquote(nth($theme-colors, 1));
|
|
98
|
+
}
|
|
99
|
+
/// using default border color to draw borders
|
|
100
|
+
&:not(.component--has-borderColorTheme) {
|
|
101
|
+
border: 1px solid $lightGray;
|
|
102
|
+
}
|
|
103
|
+
&.component--has-title {
|
|
104
|
+
border-top: none !important;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/// left accent bar
|
|
109
|
+
&.component--has-accent {
|
|
110
|
+
border-left: 0.5rem solid string.unquote(nth($theme-colors, 1)) !important;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/// Apply a background color
|
|
114
|
+
&.component--has-background:not(.component--hideBackgroundColor) {
|
|
115
|
+
background: string.unquote(nth($theme-colors, 3));
|
|
116
|
+
}
|
|
103
117
|
}
|
|
104
118
|
|
|
105
119
|
.cove-component__header {
|
|
106
120
|
border-color: string.unquote(nth($theme-colors, 2));
|
|
107
121
|
}
|
|
108
|
-
|
|
109
|
-
.cove-component__content.component--has-accent {
|
|
110
|
-
border-left: 0.5rem solid string.unquote(nth($theme-colors, 1)) !important;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.cove-component__content.component--has-background:not(.component--hideBackgroundColor) {
|
|
114
|
-
background: string.unquote(nth($theme-colors, 3));
|
|
115
|
-
}
|
|
116
122
|
}
|
|
117
123
|
|
|
118
124
|
&.theme-#{$theme-name} {
|
|
119
|
-
.cove-component__content:not(.no-borders).component--has-borderColorTheme {
|
|
120
|
-
border-left: 1px solid string.unquote(nth($theme-colors, 1));
|
|
121
|
-
border-right: 1px solid string.unquote(nth($theme-colors, 1));
|
|
122
|
-
border-bottom: 1px solid string.unquote(nth($theme-colors, 1));
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// when component doesn't have a title add border top
|
|
126
|
-
.cove-component__inner:not(.component--has-title) .cove-component__content.component--has-borderColorTheme:not(.no-borders) {
|
|
127
|
-
border-top: 1px solid string.unquote(nth($theme-colors, 1));
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// should probably be in color definitions but logically makes sense here.
|
|
131
|
-
.cove-component__inner:not(.component--has-title) .cove-component__content {
|
|
132
|
-
border-top: 1px solid #ccc;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
125
|
.cove-component__header {
|
|
136
126
|
border-color: string.unquote(nth($theme-colors, 2));
|
|
137
127
|
}
|
|
138
|
-
|
|
139
|
-
.cove-component__content.component--has-accent {
|
|
140
|
-
border-left: 0.5rem solid string.unquote(nth($theme-colors, 1)) !important;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.cove-component__content.component--has-background:not(.component--hideBackgroundColor) {
|
|
144
|
-
background: string.unquote(nth($theme-colors, 3));
|
|
145
|
-
}
|
|
146
128
|
}
|
|
147
129
|
}
|
|
148
130
|
}
|