@cdc/data-bite 1.1.1 → 1.1.3

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