@cdc/dashboard 1.1.1 → 1.1.4

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.
@@ -0,0 +1,652 @@
1
+ // Shift down for top level Dashboard bar when in edit mode
2
+ .layout-container, .editor-panel + .cdc-dashboard-inner-container, .editor-heading + .cdc-open-viz-module {
3
+ position: relative;
4
+ top: 3em;
5
+ .editor-panel {
6
+ top: 3em;
7
+ }
8
+ .editor-toggle {
9
+ top: 3.5em;
10
+ }
11
+ }
12
+
13
+ .editor-panel {
14
+ //TODO: Remove after COVE refactor
15
+ &.cove {
16
+ @import "@cdc/core/styles/v2/layout/tooltip.scss";
17
+ }
18
+
19
+ .two-col-inputs {
20
+ display: flex;
21
+ margin-top: 1em;
22
+ justify-content: space-between;
23
+ > label {
24
+ width: 48%;
25
+ margin-top: 0 !important
26
+ }
27
+ }
28
+ .helper-tooltip {
29
+ padding: 5px;
30
+ max-width: 300px;
31
+ }
32
+ .helper {
33
+ position: relative;
34
+ opacity: .7;
35
+ cursor: pointer;
36
+ width: 17px;
37
+ height: 17px;
38
+ align-self: center;
39
+ margin-left: .3rem;
40
+ margin-top: -0.3rem;
41
+ border: none !important;
42
+ box-shadow: none !important;
43
+ svg {
44
+ position: absolute;
45
+ top: 0;
46
+ left: 0;
47
+ width: 100%;
48
+ height: 100%;
49
+ }
50
+ }
51
+ .divider-heading {
52
+ display: block;
53
+ font-size: 1em;
54
+ margin-top: 1em;
55
+ }
56
+ .series-list {
57
+ list-style: none;
58
+ border: $lightGray 1px solid;
59
+ &:empty {
60
+ border: none !important
61
+ }
62
+ li {
63
+ padding: .3em .5em;
64
+ display: flex;
65
+ align-items: center;
66
+ justify-content: space-between;
67
+ font-size: .9em;
68
+ &:hover {
69
+ background-color: $lightestGray;
70
+ }
71
+ span {
72
+ font-size: .8em;
73
+ color: #f00;
74
+ cursor: pointer;
75
+ }
76
+ + li {
77
+ border-top: $lightGray 1px solid;
78
+ }
79
+ }
80
+ }
81
+ background: #fff;
82
+ width: $editorWidth;
83
+ overflow-y: overlay;
84
+ position: fixed;
85
+ z-index: 8;
86
+ display: flex;
87
+ flex-direction: column;
88
+ left: 0;
89
+ top: 48px;
90
+ bottom: 0;
91
+ .accordion__heading {
92
+ background: $lightestGray;
93
+ }
94
+ .accordion__item {
95
+ select {
96
+ text-transform: capitalize;
97
+ }
98
+ .number-narrow {
99
+ min-width: auto;
100
+ width: 75px
101
+ }
102
+ }
103
+ .form-container {
104
+ border-right: $lightGray 1px solid;
105
+ flex-grow: 1;
106
+ }
107
+ .guidance-link {
108
+ margin: 2em 1em 0;
109
+ padding: .75em 1em;
110
+ svg {
111
+ width: 60px;
112
+ color: $blue;
113
+ margin-right: 1rem;
114
+ height: 60px; // IE11
115
+ path {
116
+ fill: currentColor;
117
+ }
118
+ }
119
+ }
120
+ .warning {
121
+ color: #D8000C;
122
+ background-color: #FFD2D2;
123
+ padding: .75em 1em;
124
+ margin: 1em 0;
125
+ font-size: .8em;
126
+ border: #D8000C 1px solid;
127
+ border-radius: .4em;
128
+ strong {
129
+ font-weight: 600;
130
+ display: block;
131
+ }
132
+ }
133
+ .accordion__button {
134
+ cursor: pointer;
135
+ font-size: 1em;
136
+ padding: .3em 1em;
137
+ width: 100%;
138
+ text-align: left;
139
+ position: relative;
140
+ border-bottom: 1px solid rgba(0, 0, 0, 0.2);
141
+ }
142
+ .accordion__panel:first-child { margin-top: 0; }
143
+ .accordion__button:before {
144
+ display: inline-block;
145
+ content: '';
146
+ height: 7px;
147
+ width: 7px;
148
+ margin-right: 1em;
149
+ border-bottom: 2px solid currentColor;
150
+ border-right: 2px solid currentColor;
151
+ transform: rotate(-45deg);
152
+ right: 0;
153
+ position: absolute;
154
+ top: 50%;
155
+ transform: rotate(-45deg) translateY(-50%);
156
+ transition: .1s all;
157
+ }
158
+
159
+ .accordion__button[aria-expanded='true']::before,
160
+ .accordion__button[aria-selected='true']::before {
161
+ transform: rotate(45deg) translateY(-50%);
162
+ margin-right: 1.3em;
163
+ transition: .1s all;
164
+ }
165
+
166
+ .accordion__panel {
167
+ border-bottom: 1px solid rgba(0, 0, 0, 0.2);
168
+ padding: 1em 1.25em 2em;
169
+ animation: fadein 0.2s ease-in;
170
+ h5 {
171
+ font-size: .8em;
172
+ }
173
+ }
174
+
175
+ .advanced {
176
+ padding: 0 1em 1em;
177
+ text-align: left;
178
+ p {
179
+ font-size: .8rem;
180
+ }
181
+ .advanced-toggle-link {
182
+ padding-top: 1em;
183
+ display: block;
184
+ text-align: left;
185
+ cursor: pointer;
186
+ color: rgba(0,0,0,.5);
187
+ text-decoration: underline;
188
+ span {
189
+ text-decoration: none;
190
+ display: inline-block;
191
+ font-family: monospace;
192
+ padding-right: 5px;
193
+ }
194
+ &:hover {
195
+ color: rgba(0,0,0,.7);
196
+ }
197
+ }
198
+ textarea {
199
+ height: 400px;
200
+ width: 100%;
201
+ font-size: .9em;
202
+ padding: .5em;
203
+ font-family: monospace;
204
+ box-sizing: border-box
205
+ }
206
+ }
207
+
208
+ @keyframes fadein {
209
+ 0% {
210
+ opacity: 0;
211
+ }
212
+
213
+ 100% {
214
+ opacity: 1;
215
+ }
216
+ }
217
+
218
+ .heading-2 {
219
+ background: #565656;
220
+ color: #fff;
221
+ font-size: 1.1em;
222
+ padding: .6em 1em;
223
+ position: relative;
224
+ border-bottom:#565656 3px solid;
225
+ z-index: 3;
226
+ }
227
+
228
+ label {
229
+ text-transform: uppercase;
230
+ display: block;
231
+ font-size: .8em;
232
+ font-weight: 600;
233
+ &:not(:first-child) {
234
+ margin-top: 1em;
235
+ }
236
+ span.edit-label {
237
+ margin-bottom: .3em;
238
+ display: block;
239
+ }
240
+ span.column-heading {
241
+ font-size: 1em;
242
+ }
243
+ &.checkbox {
244
+ display: flex;
245
+ span {
246
+ display: inline;
247
+ }
248
+ input {
249
+ margin-left: 0;
250
+ width: inherit;
251
+ display: inline;
252
+ }
253
+ }
254
+ }
255
+ input[type="text"], input[role="combobox"], input[type="number"], textarea {
256
+ min-width: 100%;
257
+ max-width: 100%; // Doing this prevents width of textarea from being changed
258
+ }
259
+ textarea {
260
+ min-height: 140px;
261
+ }
262
+ .header .color-palette li {
263
+ width: 21px;
264
+ height: 21px;
265
+ border-radius: 40px;
266
+ margin-right: 2.8px;
267
+ }
268
+ .color-palette {
269
+ display: flex;
270
+ max-width: 100%;
271
+ padding: 0;
272
+ margin: .5em 0 0 0;
273
+ list-style: none;
274
+ flex-wrap: wrap;
275
+ li {
276
+ width: 45px;
277
+ height: 23px;
278
+ margin-right: 4px;
279
+ margin-bottom: 10px;
280
+ display: flex;
281
+ border-radius: 5px;
282
+ overflow: hidden;
283
+ cursor: pointer;
284
+ position: relative;
285
+ .click-target {
286
+ position: absolute;
287
+ top: 0;
288
+ left: 0;
289
+ right: 0;
290
+ bottom: 0;
291
+ }
292
+ &.selected {
293
+ border: rgba(0,0,0, .8) 2px solid;
294
+ }
295
+ span {
296
+ width: 33.3%;
297
+ }
298
+ }
299
+ }
300
+
301
+ fieldset {
302
+ display: block;
303
+ }
304
+
305
+ .primary-fieldset {
306
+ padding: 0;
307
+ margin: 0;
308
+ border: 0;
309
+ }
310
+
311
+ ul.column-edit {
312
+ list-style: none;
313
+ li {
314
+ margin-top: 1em;
315
+ }
316
+ .three-col {
317
+ display: flex;
318
+ justify-content: space-between;
319
+ > label {
320
+ margin-top: 0;
321
+ width: 30%;
322
+ display: inline-block;
323
+ input[type="text"], input[type="number"] {
324
+ width: 50px;
325
+ }
326
+ }
327
+ }
328
+ }
329
+
330
+ &.hidden {
331
+ display: none;
332
+ }
333
+
334
+ .emove-column {
335
+ float: right;
336
+ text-transform: uppercase;
337
+ color: #C32B2B;
338
+ font-size: .7em;
339
+ line-height: 1.6em;
340
+ border-radius: 5px;
341
+ margin: 0 auto;
342
+ transition: .1s all;
343
+ border: 0;
344
+ text-decoration: underline;
345
+ outline: 0;
346
+ cursor: pointer;
347
+ font-weight: bold;
348
+ }
349
+
350
+ .edit-block {
351
+ padding-left: 1em;
352
+ border-left: rgba(0, 0, 0, 0.2) 4px solid;
353
+ transition: .2s all;
354
+ &:not(:first-child) {
355
+ margin-top: 2em;
356
+ }
357
+ input[type="text"], input[type="number"] {
358
+ font-size: 1em;
359
+ }
360
+ label {
361
+ margin-top: 0;
362
+ }
363
+ label + label {
364
+ margin-top: 1em;
365
+ }
366
+ &:hover {
367
+ border-left: rgba(0, 0, 0, 0.7) 4px solid;
368
+ transition: .2s all;
369
+ }
370
+ }
371
+
372
+ span.subtext {
373
+ display: block;
374
+ color: rgba(0,0,0,.5);
375
+ text-transform: none;
376
+ font-weight: normal;
377
+ }
378
+
379
+ .btn {
380
+ margin-top: 1em;
381
+ }
382
+ .sort-list {
383
+ list-style: none;
384
+ > li {
385
+ margin-right: .3em;
386
+ margin-bottom: .3em;
387
+ }
388
+ }
389
+ .sort-list li > div {
390
+ display: block;
391
+ box-sizing: border-box;
392
+ border: 1px solid #D1D1D1;
393
+ border-radius: 2px;
394
+ background: #F1F1F1;
395
+ padding: .4em .6em;
396
+ font-size: .8em;
397
+ margin-bottom: .3em;
398
+ cursor: move;
399
+ }
400
+
401
+ .info {
402
+ font-size: .8em;
403
+ line-height: 1.4em;
404
+ font-style: italic;
405
+ padding-top: 10px;
406
+ }
407
+
408
+ .react-tags__search {
409
+ width: 100%;
410
+ }
411
+
412
+ .react-tags {
413
+ position: relative;
414
+ input.react-tags__search-input {
415
+ font-size: .8rem;
416
+ }
417
+ /* clicking anywhere will focus the input */
418
+ cursor: text;
419
+ span {
420
+ display: inline
421
+ }
422
+ }
423
+
424
+ .react-tags.is-focused {
425
+ border-color: rgba(0, 0, 0, 0.7);
426
+ }
427
+
428
+ .react-tags__selected {
429
+ display: inline;
430
+ }
431
+
432
+ .react-tags__selected-tag {
433
+ display: inline-block;
434
+ box-sizing: border-box;
435
+ border: 1px solid #D1D1D1;
436
+ border-radius: 2px;
437
+ background: #F1F1F1;
438
+ padding: .4em .6em;
439
+ font-size: .8em;
440
+ margin-right: .3em;
441
+ margin-bottom: .3em;
442
+ }
443
+
444
+ .react-tags__selected-tag:after {
445
+ content: '\2715';
446
+ color: #AAA;
447
+ margin-left: 8px;
448
+ }
449
+
450
+ .react-tags__selected-tag:hover,
451
+ .react-tags__selected-tag:focus {
452
+ border-color: #B1B1B1;
453
+ }
454
+
455
+ .react-tags__search {
456
+ display: inline-block;
457
+
458
+ /* prevent autoresize overflowing the container */
459
+ max-width: 100%;
460
+ }
461
+
462
+ @media screen and (min-width: 30em) {
463
+
464
+ .react-tags__search {
465
+ /* this will become the offsetParent for suggestions */
466
+ position: relative;
467
+ }
468
+
469
+ }
470
+
471
+ .react-tags__search input {
472
+ /* prevent autoresize overflowing the container */
473
+ max-width: 100%;
474
+
475
+ /* emove styles and layout from this element */
476
+ margin: 0;
477
+ outline: none;
478
+ padding: .5em .3em;
479
+
480
+ /* match the font styles */
481
+ font-size: inherit;
482
+ line-height: inherit;
483
+ }
484
+
485
+ .react-tags__search input::-ms-clear {
486
+ display: none;
487
+ }
488
+
489
+ .react-tags__suggestions {
490
+ position: absolute;
491
+ top: 100%;
492
+ left: 0;
493
+ width: 100%;
494
+ }
495
+
496
+ @media screen and (min-width: 30em) {
497
+
498
+ .react-tags__suggestions {
499
+ width: 240px;
500
+ }
501
+
502
+ }
503
+
504
+ .react-tags__suggestions ul {
505
+ margin: 4px -1px;
506
+ padding: 0;
507
+ list-style: none;
508
+ background: white;
509
+ border: 1px solid #D1D1D1;
510
+ border-radius: 2px;
511
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
512
+ }
513
+
514
+ .react-tags__suggestions li {
515
+ border-bottom: 1px solid #ddd;
516
+ padding: 6px 8px;
517
+ }
518
+
519
+ .react-tags__suggestions li mark {
520
+ text-decoration: underline;
521
+ background: none;
522
+ font-weight: 600;
523
+ }
524
+
525
+ .react-tags__suggestions li:hover {
526
+ cursor: pointer;
527
+ background: #eee;
528
+ }
529
+
530
+ .react-tags__suggestions li.is-active {
531
+ background: #b7cfe0;
532
+ }
533
+
534
+ .react-tags__suggestions li.is-disabled {
535
+ opacity: 0.5;
536
+ cursor: auto;
537
+ }
538
+
539
+ .current-viz-list {
540
+ margin: 0.5em 0;
541
+ padding-left: 1.25em;
542
+
543
+ li button {
544
+ float: right;
545
+ margin: 0 0.5em;
546
+ border: 1px solid gray;
547
+ }
548
+ }
549
+
550
+ .viz-icon {
551
+ background-color: #FFF;
552
+ color: #565656;
553
+ border: #797979 1px solid;
554
+ padding: 10px;
555
+ margin: 1em;
556
+
557
+ span {
558
+ text-transform: none;
559
+ font-size: 1em;
560
+ margin-top: 1em;
561
+ }
562
+
563
+ &:hover {
564
+ background: #F2F2F2;
565
+ transition: .2s all;
566
+ }
567
+
568
+ svg {
569
+ display: block;
570
+ margin: .5em auto;
571
+ box-sizing: border-box;
572
+ width: 100px;
573
+ height: 75px;
574
+ path {
575
+ fill: currentColor
576
+ }
577
+ }
578
+ }
579
+ }
580
+ .editor-toggle {
581
+ background: #F2F2F2;
582
+ border-radius: 60px;
583
+ color: #000;
584
+ font-size: 1em;
585
+ border: 0;
586
+ position: fixed;
587
+ z-index: 99;
588
+ transition: .1s background;
589
+ cursor: pointer;
590
+ width: 25px;
591
+ height: 25px;
592
+ left: 307px;
593
+ top: calc(3em + 10px);
594
+ box-shadow: rgba(0,0,0,.5) 0 1px 2px;
595
+ &:before {
596
+ top: 43%;
597
+ left: 50%;
598
+ transform: translate(-50%, -50%);
599
+ position: absolute;
600
+ content: "\00ab";
601
+ }
602
+ &.collapsed {
603
+ left: 1em;
604
+ margin-left: 0;
605
+ &:before {
606
+ content: "\00bb";
607
+ }
608
+ }
609
+ &:hover {
610
+ background: rgba(255,255,255,1)
611
+ }
612
+ }
613
+
614
+ .editor-panel:not(.hidden) + .cdc-dashboard-inner-container {
615
+ padding-left: $editorWidth;
616
+ }
617
+
618
+ .subheading-3 {
619
+ margin-top: 1em;
620
+ margin-bottom: .5em;
621
+ display: block;
622
+ }
623
+
624
+ .drag-grid {
625
+ display: flex;
626
+ flex-wrap: wrap;
627
+ column-gap: .5em;
628
+ row-gap: .5em;
629
+ .widget {
630
+ width: 120px;
631
+ height: 100px;
632
+ margin: 0;
633
+ padding: 0;
634
+ cursor: move;
635
+ .widget__drag {
636
+ display: none;
637
+ }
638
+ .widget__content {
639
+ flex-grow: 1;
640
+ display: flex;
641
+ flex-direction: column;
642
+ align-items: center;
643
+ justify-content: center;
644
+ font-size: .8em;
645
+ svg {
646
+ width: 50px;
647
+ height: 50px;
648
+ margin-bottom: .5em;
649
+ }
650
+ }
651
+ }
652
+ }