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