@cdc/data-bite 4.22.10 → 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/README.md +4 -4
- package/dist/cdcdatabite.js +2 -2
- package/examples/example-config.json +24 -24
- package/examples/example-data.json +833 -833
- package/examples/gallery/calculated-average.json +3166 -3166
- package/examples/gallery/calculated-with-pic.json +3172 -3172
- package/examples/gallery/max-value.json +3166 -3166
- package/examples/gallery/sum-of-data.json +3160 -3160
- package/examples/private/WCMSRD-12345.json +1026 -1026
- package/examples/private/totals.json +67 -1
- package/package.json +3 -3
- package/src/CdcDataBite.tsx +266 -272
- package/src/components/CircleCallout.js +8 -6
- package/src/components/EditorPanel.js +378 -636
- package/src/context.tsx +3 -3
- package/src/data/initial-state.js +37 -37
- package/src/index.html +19 -23
- package/src/index.tsx +9 -9
- package/src/scss/bite.scss +23 -18
- package/src/scss/editor-panel.scss +83 -70
- package/src/scss/main.scss +8 -8
- package/src/scss/variables.scss +1 -1
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
.editor-panel {
|
|
10
10
|
//TODO: Remove after COVE refactor
|
|
11
11
|
&.cove {
|
|
12
|
-
@import
|
|
12
|
+
@import '@cdc/core/styles/v2/layout/tooltip.scss';
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.text-center {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
justify-content: space-between;
|
|
25
25
|
> label {
|
|
26
26
|
width: 48%;
|
|
27
|
-
margin-top: 0 !important
|
|
27
|
+
margin-top: 0 !important;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
.divider-heading {
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
list-style: none;
|
|
37
37
|
border: $lightGray 1px solid;
|
|
38
38
|
&:empty {
|
|
39
|
-
border: none !important
|
|
39
|
+
border: none !important;
|
|
40
40
|
}
|
|
41
41
|
li {
|
|
42
|
-
padding: .3em .5em;
|
|
42
|
+
padding: 0.3em 0.5em;
|
|
43
43
|
display: flex;
|
|
44
44
|
align-items: center;
|
|
45
45
|
justify-content: space-between;
|
|
46
|
-
font-size: .9em;
|
|
46
|
+
font-size: 0.9em;
|
|
47
47
|
&:hover {
|
|
48
48
|
background-color: $lightestGray;
|
|
49
49
|
}
|
|
50
50
|
span {
|
|
51
|
-
font-size: .8em;
|
|
51
|
+
font-size: 0.8em;
|
|
52
52
|
color: #f00;
|
|
53
53
|
cursor: pointer;
|
|
54
54
|
}
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
}
|
|
77
77
|
.number-narrow {
|
|
78
78
|
min-width: auto;
|
|
79
|
-
width: 75px
|
|
79
|
+
width: 75px;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
.accordion__divider {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
.guidance-link {
|
|
93
93
|
margin: 2em 1em 0;
|
|
94
|
-
padding: .75em 1em;
|
|
94
|
+
padding: 0.75em 1em;
|
|
95
95
|
svg {
|
|
96
96
|
width: 60px;
|
|
97
97
|
color: $blue;
|
|
@@ -103,13 +103,13 @@
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
.warning {
|
|
106
|
-
color: #
|
|
107
|
-
background-color: #
|
|
108
|
-
padding: .75em 1em;
|
|
106
|
+
color: #d8000c;
|
|
107
|
+
background-color: #ffd2d2;
|
|
108
|
+
padding: 0.75em 1em;
|
|
109
109
|
margin: 1em 0;
|
|
110
|
-
font-size: .8em;
|
|
111
|
-
border: #
|
|
112
|
-
border-radius: .4em;
|
|
110
|
+
font-size: 0.8em;
|
|
111
|
+
border: #d8000c 1px solid;
|
|
112
|
+
border-radius: 0.4em;
|
|
113
113
|
strong {
|
|
114
114
|
font-weight: 600;
|
|
115
115
|
display: block;
|
|
@@ -118,13 +118,15 @@
|
|
|
118
118
|
.accordion__button {
|
|
119
119
|
cursor: pointer;
|
|
120
120
|
font-size: 1em;
|
|
121
|
-
padding: .3em 1em;
|
|
121
|
+
padding: 0.3em 1em;
|
|
122
122
|
width: 100%;
|
|
123
123
|
text-align: left;
|
|
124
124
|
position: relative;
|
|
125
125
|
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
|
126
126
|
}
|
|
127
|
-
.accordion__panel:first-child {
|
|
127
|
+
.accordion__panel:first-child {
|
|
128
|
+
margin-top: 0;
|
|
129
|
+
}
|
|
128
130
|
.accordion__button:before {
|
|
129
131
|
display: inline-block;
|
|
130
132
|
content: '';
|
|
@@ -138,14 +140,14 @@
|
|
|
138
140
|
position: absolute;
|
|
139
141
|
top: 50%;
|
|
140
142
|
transform: rotate(-45deg) translateY(-50%);
|
|
141
|
-
transition: .1s all;
|
|
143
|
+
transition: 0.1s all;
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
.accordion__button[aria-expanded='true']::before,
|
|
145
147
|
.accordion__button[aria-selected='true']::before {
|
|
146
148
|
transform: rotate(45deg) translateY(-50%);
|
|
147
149
|
margin-right: 1.3em;
|
|
148
|
-
transition: .1s all;
|
|
150
|
+
transition: 0.1s all;
|
|
149
151
|
}
|
|
150
152
|
|
|
151
153
|
.accordion__panel {
|
|
@@ -153,7 +155,7 @@
|
|
|
153
155
|
padding: 1em 1.25em 2em;
|
|
154
156
|
animation: fadein 0.2s ease-in;
|
|
155
157
|
h5 {
|
|
156
|
-
font-size: .8em;
|
|
158
|
+
font-size: 0.8em;
|
|
157
159
|
}
|
|
158
160
|
|
|
159
161
|
.accordion__panel-row {
|
|
@@ -161,7 +163,7 @@
|
|
|
161
163
|
justify-content: flex-start;
|
|
162
164
|
margin-left: -4px;
|
|
163
165
|
margin-right: -4px;
|
|
164
|
-
margin-bottom: 0.75em
|
|
166
|
+
margin-bottom: 0.75em;
|
|
165
167
|
}
|
|
166
168
|
|
|
167
169
|
.accordion__panel-col {
|
|
@@ -191,16 +193,22 @@
|
|
|
191
193
|
justify-content: flex-end;
|
|
192
194
|
}
|
|
193
195
|
|
|
194
|
-
.flex-grow {
|
|
195
|
-
|
|
196
|
-
|
|
196
|
+
.flex-grow {
|
|
197
|
+
flex-grow: 1;
|
|
198
|
+
}
|
|
199
|
+
.flex-shrink {
|
|
200
|
+
flex-shrink: 1;
|
|
201
|
+
}
|
|
202
|
+
.flex-auto {
|
|
203
|
+
flex-basis: auto;
|
|
204
|
+
}
|
|
197
205
|
}
|
|
198
206
|
|
|
199
207
|
.advanced {
|
|
200
208
|
padding: 0 1em 1em;
|
|
201
209
|
text-align: left;
|
|
202
210
|
p {
|
|
203
|
-
font-size: .8rem;
|
|
211
|
+
font-size: 0.8rem;
|
|
204
212
|
}
|
|
205
213
|
.advanced-toggle-link {
|
|
206
214
|
padding-top: 1em;
|
|
@@ -215,16 +223,16 @@
|
|
|
215
223
|
padding-right: 5px;
|
|
216
224
|
}
|
|
217
225
|
&:hover {
|
|
218
|
-
color: rgba(0,0,0
|
|
226
|
+
color: rgba(0, 0, 0, 0.7);
|
|
219
227
|
}
|
|
220
228
|
}
|
|
221
229
|
textarea {
|
|
222
230
|
height: 400px;
|
|
223
231
|
width: 100%;
|
|
224
|
-
font-size: .9em;
|
|
225
|
-
padding: .5em;
|
|
232
|
+
font-size: 0.9em;
|
|
233
|
+
padding: 0.5em;
|
|
226
234
|
font-family: monospace;
|
|
227
|
-
box-sizing: border-box
|
|
235
|
+
box-sizing: border-box;
|
|
228
236
|
}
|
|
229
237
|
}
|
|
230
238
|
|
|
@@ -242,22 +250,22 @@
|
|
|
242
250
|
background: #565656;
|
|
243
251
|
color: #fff;
|
|
244
252
|
font-size: 1.1em;
|
|
245
|
-
padding: .6em 1em;
|
|
253
|
+
padding: 0.6em 1em;
|
|
246
254
|
position: relative;
|
|
247
|
-
border-bottom
|
|
255
|
+
border-bottom: #565656 3px solid;
|
|
248
256
|
z-index: 3;
|
|
249
257
|
}
|
|
250
258
|
|
|
251
259
|
label {
|
|
252
260
|
text-transform: uppercase;
|
|
253
261
|
display: block;
|
|
254
|
-
font-size: .8em;
|
|
262
|
+
font-size: 0.8em;
|
|
255
263
|
font-weight: 600;
|
|
256
264
|
&:not(:first-child) {
|
|
257
265
|
margin-top: 1em;
|
|
258
266
|
}
|
|
259
267
|
span.edit-label {
|
|
260
|
-
margin-bottom: .3em;
|
|
268
|
+
margin-bottom: 0.3em;
|
|
261
269
|
display: block;
|
|
262
270
|
}
|
|
263
271
|
span.column-heading {
|
|
@@ -275,7 +283,10 @@
|
|
|
275
283
|
}
|
|
276
284
|
}
|
|
277
285
|
}
|
|
278
|
-
input[type=
|
|
286
|
+
input[type='text'],
|
|
287
|
+
input[role='combobox'],
|
|
288
|
+
input[type='number'],
|
|
289
|
+
textarea {
|
|
279
290
|
min-width: 100%;
|
|
280
291
|
max-width: 100%; // Doing this prevents width of textarea from being changed
|
|
281
292
|
}
|
|
@@ -292,7 +303,7 @@
|
|
|
292
303
|
display: flex;
|
|
293
304
|
max-width: 100%;
|
|
294
305
|
padding: 0;
|
|
295
|
-
margin: .5em 0 0 0;
|
|
306
|
+
margin: 0.5em 0 0 0;
|
|
296
307
|
list-style: none;
|
|
297
308
|
flex-wrap: wrap;
|
|
298
309
|
li {
|
|
@@ -313,7 +324,7 @@
|
|
|
313
324
|
bottom: 0;
|
|
314
325
|
}
|
|
315
326
|
&.selected {
|
|
316
|
-
border: rgba(0,0,0, .8) 2px solid;
|
|
327
|
+
border: rgba(0, 0, 0, 0.8) 2px solid;
|
|
317
328
|
}
|
|
318
329
|
span {
|
|
319
330
|
width: 33.3%;
|
|
@@ -336,13 +347,15 @@
|
|
|
336
347
|
li {
|
|
337
348
|
margin-top: 1em;
|
|
338
349
|
}
|
|
339
|
-
.three-col,
|
|
350
|
+
.three-col,
|
|
351
|
+
.two-col {
|
|
340
352
|
display: flex;
|
|
341
353
|
justify-content: space-between;
|
|
342
354
|
> label {
|
|
343
355
|
margin-top: 0;
|
|
344
356
|
display: inline-block;
|
|
345
|
-
input[type=
|
|
357
|
+
input[type='text'],
|
|
358
|
+
input[type='number'] {
|
|
346
359
|
width: 50px;
|
|
347
360
|
}
|
|
348
361
|
}
|
|
@@ -367,12 +380,12 @@
|
|
|
367
380
|
.remove-column {
|
|
368
381
|
float: right;
|
|
369
382
|
text-transform: uppercase;
|
|
370
|
-
color: #
|
|
371
|
-
font-size: .7em;
|
|
383
|
+
color: #c32b2b;
|
|
384
|
+
font-size: 0.7em;
|
|
372
385
|
line-height: 1.6em;
|
|
373
386
|
border-radius: 5px;
|
|
374
387
|
margin: 0 auto;
|
|
375
|
-
transition: .1s all;
|
|
388
|
+
transition: 0.1s all;
|
|
376
389
|
border: 0;
|
|
377
390
|
text-decoration: underline;
|
|
378
391
|
outline: 0;
|
|
@@ -383,11 +396,12 @@
|
|
|
383
396
|
.edit-block {
|
|
384
397
|
padding-left: 1em;
|
|
385
398
|
border-left: rgba(0, 0, 0, 0.2) 4px solid;
|
|
386
|
-
transition: .2s all;
|
|
399
|
+
transition: 0.2s all;
|
|
387
400
|
&:not(:first-child) {
|
|
388
401
|
margin-top: 2em;
|
|
389
402
|
}
|
|
390
|
-
input[type=
|
|
403
|
+
input[type='text'],
|
|
404
|
+
input[type='number'] {
|
|
391
405
|
font-size: 1em;
|
|
392
406
|
}
|
|
393
407
|
label {
|
|
@@ -398,13 +412,13 @@
|
|
|
398
412
|
}
|
|
399
413
|
&:hover {
|
|
400
414
|
border-left: rgba(0, 0, 0, 0.7) 4px solid;
|
|
401
|
-
transition: .2s all;
|
|
415
|
+
transition: 0.2s all;
|
|
402
416
|
}
|
|
403
417
|
}
|
|
404
418
|
|
|
405
419
|
span.subtext {
|
|
406
420
|
display: block;
|
|
407
|
-
color: rgba(0,0,0
|
|
421
|
+
color: rgba(0, 0, 0, 0.5);
|
|
408
422
|
text-transform: none;
|
|
409
423
|
font-weight: normal;
|
|
410
424
|
}
|
|
@@ -415,24 +429,24 @@
|
|
|
415
429
|
.sort-list {
|
|
416
430
|
list-style: none;
|
|
417
431
|
> li {
|
|
418
|
-
margin-right: .3em;
|
|
419
|
-
margin-bottom: .3em;
|
|
432
|
+
margin-right: 0.3em;
|
|
433
|
+
margin-bottom: 0.3em;
|
|
420
434
|
}
|
|
421
435
|
}
|
|
422
436
|
.sort-list li > div {
|
|
423
437
|
display: block;
|
|
424
438
|
box-sizing: border-box;
|
|
425
|
-
border: 1px solid #
|
|
439
|
+
border: 1px solid #d1d1d1;
|
|
426
440
|
border-radius: 2px;
|
|
427
|
-
background: #
|
|
428
|
-
padding: .4em .6em;
|
|
429
|
-
font-size: .8em;
|
|
430
|
-
margin-bottom: .3em;
|
|
441
|
+
background: #f1f1f1;
|
|
442
|
+
padding: 0.4em 0.6em;
|
|
443
|
+
font-size: 0.8em;
|
|
444
|
+
margin-bottom: 0.3em;
|
|
431
445
|
cursor: move;
|
|
432
446
|
}
|
|
433
447
|
|
|
434
448
|
.info {
|
|
435
|
-
font-size: .8em;
|
|
449
|
+
font-size: 0.8em;
|
|
436
450
|
line-height: 1.4em;
|
|
437
451
|
font-style: italic;
|
|
438
452
|
padding-top: 10px;
|
|
@@ -445,12 +459,12 @@
|
|
|
445
459
|
.react-tags {
|
|
446
460
|
position: relative;
|
|
447
461
|
input.react-tags__search-input {
|
|
448
|
-
font-size: .8rem;
|
|
462
|
+
font-size: 0.8rem;
|
|
449
463
|
}
|
|
450
464
|
/* clicking anywhere will focus the input */
|
|
451
465
|
cursor: text;
|
|
452
466
|
span {
|
|
453
|
-
display: inline
|
|
467
|
+
display: inline;
|
|
454
468
|
}
|
|
455
469
|
}
|
|
456
470
|
|
|
@@ -465,24 +479,24 @@
|
|
|
465
479
|
.react-tags__selected-tag {
|
|
466
480
|
display: inline-block;
|
|
467
481
|
box-sizing: border-box;
|
|
468
|
-
border: 1px solid #
|
|
482
|
+
border: 1px solid #d1d1d1;
|
|
469
483
|
border-radius: 2px;
|
|
470
|
-
background: #
|
|
471
|
-
padding: .4em .6em;
|
|
472
|
-
font-size: .8em;
|
|
473
|
-
margin-right: .3em;
|
|
474
|
-
margin-bottom: .3em;
|
|
484
|
+
background: #f1f1f1;
|
|
485
|
+
padding: 0.4em 0.6em;
|
|
486
|
+
font-size: 0.8em;
|
|
487
|
+
margin-right: 0.3em;
|
|
488
|
+
margin-bottom: 0.3em;
|
|
475
489
|
}
|
|
476
490
|
|
|
477
491
|
.react-tags__selected-tag:after {
|
|
478
492
|
content: '\2715';
|
|
479
|
-
color: #
|
|
493
|
+
color: #aaa;
|
|
480
494
|
margin-left: 8px;
|
|
481
495
|
}
|
|
482
496
|
|
|
483
497
|
.react-tags__selected-tag:hover,
|
|
484
498
|
.react-tags__selected-tag:focus {
|
|
485
|
-
border-color: #
|
|
499
|
+
border-color: #b1b1b1;
|
|
486
500
|
}
|
|
487
501
|
|
|
488
502
|
.react-tags__search {
|
|
@@ -497,7 +511,7 @@
|
|
|
497
511
|
padding: 0;
|
|
498
512
|
list-style: none;
|
|
499
513
|
background: white;
|
|
500
|
-
border: 1px solid #
|
|
514
|
+
border: 1px solid #d1d1d1;
|
|
501
515
|
border-radius: 2px;
|
|
502
516
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
|
503
517
|
}
|
|
@@ -526,38 +540,37 @@
|
|
|
526
540
|
opacity: 0.5;
|
|
527
541
|
cursor: auto;
|
|
528
542
|
}
|
|
529
|
-
|
|
530
543
|
}
|
|
531
544
|
.editor-toggle {
|
|
532
|
-
background: #
|
|
545
|
+
background: #f2f2f2;
|
|
533
546
|
border-radius: 60px;
|
|
534
547
|
color: #000;
|
|
535
548
|
font-size: 1em;
|
|
536
549
|
border: 0;
|
|
537
550
|
position: fixed;
|
|
538
551
|
z-index: 100;
|
|
539
|
-
transition: .1s background;
|
|
552
|
+
transition: 0.1s background;
|
|
540
553
|
cursor: pointer;
|
|
541
554
|
width: 25px;
|
|
542
555
|
height: 25px;
|
|
543
556
|
left: 307px;
|
|
544
557
|
top: 10px;
|
|
545
|
-
box-shadow: rgba(0,0,0
|
|
558
|
+
box-shadow: rgba(0, 0, 0, 0.5) 0 1px 2px;
|
|
546
559
|
&:before {
|
|
547
560
|
top: 43%;
|
|
548
561
|
left: 50%;
|
|
549
562
|
transform: translate(-50%, -50%);
|
|
550
563
|
position: absolute;
|
|
551
|
-
content:
|
|
564
|
+
content: '\00ab';
|
|
552
565
|
}
|
|
553
566
|
&.collapsed {
|
|
554
567
|
left: 1em;
|
|
555
568
|
margin-left: 0;
|
|
556
569
|
&:before {
|
|
557
|
-
content:
|
|
570
|
+
content: '\00bb';
|
|
558
571
|
}
|
|
559
572
|
}
|
|
560
573
|
&:hover {
|
|
561
|
-
background: rgba(255,255,255,1)
|
|
574
|
+
background: rgba(255, 255, 255, 1);
|
|
562
575
|
}
|
|
563
576
|
}
|
package/src/scss/main.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@import '~@cdc/core/styles/base';
|
|
2
|
-
@import
|
|
3
|
-
@import
|
|
2
|
+
@import '~@cdc/core/styles/heading-colors';
|
|
3
|
+
@import '~@cdc/core/styles/v2/themes/color-definitions';
|
|
4
4
|
@import 'variables';
|
|
5
5
|
|
|
6
6
|
.cdc-open-viz-module.type-data-bite {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
border: 1px solid #c4c4c4;
|
|
17
17
|
border-radius: 8px;
|
|
18
18
|
margin-top: 8px;
|
|
19
|
-
margin-bottom: 24px;
|
|
19
|
+
margin-bottom: 24px;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.loader {
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
background: #005eaa;
|
|
35
35
|
color: #fff;
|
|
36
36
|
border: 0;
|
|
37
|
-
padding: .4em .8em;
|
|
37
|
+
padding: 0.4em 0.8em;
|
|
38
38
|
display: block;
|
|
39
39
|
border-radius: 5px;
|
|
40
|
-
transition: .1s all;
|
|
40
|
+
transition: 0.1s all;
|
|
41
41
|
cursor: pointer;
|
|
42
42
|
|
|
43
43
|
&[disabled] {
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
|
|
62
62
|
.tooltip {
|
|
63
63
|
background-color: #fff;
|
|
64
|
-
border: rgba(0,0,0,0.3) 1px solid !important;
|
|
65
|
-
box-shadow: rgba(0,0,0
|
|
64
|
+
border: rgba(0, 0, 0, 0.3) 1px solid !important;
|
|
65
|
+
box-shadow: rgba(0, 0, 0, 0.1) 3px 3px 7px;
|
|
66
66
|
line-height: 1.4em;
|
|
67
67
|
font-size: 1em !important;
|
|
68
68
|
border-radius: 4px !important;
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
&.font-small .bite-content-container {
|
|
74
|
-
font-size: .9em !important;
|
|
74
|
+
font-size: 0.9em !important;
|
|
75
75
|
}
|
|
76
76
|
&.font-large .bite-content-container {
|
|
77
77
|
font-size: 1.1em !important;
|
package/src/scss/variables.scss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
$editorWidth: 350px;
|
|
1
|
+
$editorWidth: 350px;
|