@datawheel/bespoke 0.1.0

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/style.css ADDED
@@ -0,0 +1,765 @@
1
+ .mantine-Prism-root.cr-variable {
2
+ font-size: 11px;
3
+ padding: 0;
4
+ }
5
+ .mantine-Prism-root.cr-variable .mantine-Prism-code {
6
+ background-color: transparent !important;
7
+ padding: 0;
8
+ }
9
+
10
+ .cr-variable-accordion .mantine-Accordion-item {
11
+ border-bottom: 0;
12
+ }
13
+
14
+ .cr-variable-accordion .mantine-Accordion-control {
15
+ padding: 2px;
16
+ }
17
+
18
+ .cr-variable-accordion .mantine-Accordion-contentInner {
19
+ padding: 0;
20
+ }
21
+
22
+ .cr-variable-accordion .mantine-Accordion-icon {
23
+ margin-right: 4px;
24
+ }
25
+
26
+ .tox-notifications-container {
27
+ display:none;
28
+ }
29
+ .cr-block-output {
30
+ align-items: stretch;
31
+ margin: 0;
32
+ position: relative;
33
+ }
34
+ .cr-block-output .cr-block-output-editor {
35
+ display: flex;
36
+ flex-direction: column;
37
+ }
38
+ .cr-block-output .cr-block-output-mode-control {
39
+ position: absolute;
40
+ right: 0;
41
+ top: 0;
42
+ }
43
+
44
+ .selector-option-default-col {
45
+ width: 60px;
46
+ }
47
+
48
+ .required:after {
49
+ content:" *";
50
+ color: red;
51
+ }
52
+
53
+ .cr-section-block {
54
+ display: block;
55
+ position: relative;
56
+ transition: box-shadow 0.1s;
57
+ }
58
+
59
+ .cr-section-block .cr-block-placeholder {
60
+ color: #ccc;
61
+ font-style: italic;
62
+ }
63
+
64
+ .cr-section-block .cr-block-skeleton {
65
+ background-color: rgba(0, 0, 0, 0.25);
66
+ border-radius: 2px;
67
+ display: inline-block;
68
+ width: 100px;
69
+ }
70
+
71
+ .cr-section-block .cr-block-skeleton.value {
72
+ width: 80px;
73
+ }
74
+
75
+ .cr-section-block .cr-block-controls {
76
+ background: rgba(255, 255, 255, 0.75);
77
+ display: flex;
78
+ opacity: 0;
79
+ position: absolute;
80
+ right: 0;
81
+ top: 0;
82
+ transition: opacity 0.1s;
83
+ z-index: 1;
84
+ }
85
+
86
+ .cr-section-block .cr-block-controls:hover {
87
+ opacity: 1;
88
+ }
89
+
90
+ .cr-section-block .cr-block-link {
91
+ left: -20px;
92
+ position: absolute;
93
+ top: calc(50% - 10px);
94
+ }
95
+
96
+ .cr-section-block .cr-block-link.consumer {
97
+ transform: scaleX(-1);
98
+ }
99
+
100
+ .cr-section-block:hover {
101
+ box-shadow: 0 1px 3px rgb(0 0 0 / 5%), 0 1px 2px rgb(0 0 0 / 10%);
102
+ z-index: 1;
103
+ }
104
+
105
+ .cr-section-block:hover .cr-block-controls {
106
+ opacity: 1;
107
+ }
108
+
109
+ .cms-block-editor-dialog{
110
+ width: 80%;
111
+ }
112
+
113
+ .cms-section {
114
+ position: relative;
115
+
116
+ }
117
+
118
+ .cms-section .cms-section-content {
119
+ display: flex;
120
+ }
121
+
122
+ .cms-section .cms-section-content .cms-section-column {
123
+ display: flex;
124
+ flex-direction: column;
125
+ }
126
+
127
+ .cms-section .cms-section-content .cms-section-column .cms-entity-add-button {
128
+ align-self: center;
129
+ height: 0;
130
+ opacity: 0;
131
+ transition: opacity 0.1s;
132
+ }
133
+
134
+ .cms-section .cms-section-content .cms-section-column:hover .cms-entity-add-button {
135
+ opacity: 1;
136
+ }
137
+
138
+ .cms-section .cms-section-content .cms-section-column + .cms-entity-add-button {
139
+ align-self: center;
140
+ opacity: 0;
141
+ transition: opacity 0.1s;
142
+ width: 0;
143
+ }
144
+
145
+ .cms-section .cms-section-content .cms-section-column + .cms-entity-add-button > * {
146
+ margin-left: -10px;
147
+ }
148
+
149
+ .cms-section .cms-section-content .cms-section-column:hover + .cms-entity-add-button,
150
+ .cms-section .cms-section-content .cms-section-column + .cms-entity-add-button:hover {
151
+ opacity: 1;
152
+ }
153
+
154
+ .cms-section .cms-section-content .cms-entity-add-button:only-child {
155
+ align-self: center;
156
+ display: flex;
157
+ flex: 1;
158
+ justify-content: center;
159
+ }
160
+
161
+ .cms-section-click-to-edit {
162
+ opacity: 0;
163
+ transition: opacity 0.1s;
164
+ }
165
+
166
+ .cms-section-options {
167
+
168
+ }
169
+
170
+ .cms-section-header {
171
+ background-color: rgba(255, 255, 255, 0.5);
172
+ left: 0;
173
+ margin: 0;
174
+ opacity: 0;
175
+ top: 0;
176
+ transition: opacity 0.1s;
177
+ width: 100%;
178
+ z-index: 2;
179
+ position: absolute;
180
+ display: flex;
181
+ flex-direction: column;
182
+ }
183
+
184
+ .cms-section-header .cms-section-header-editor {
185
+ align-items: center;
186
+ flex-direction: row;
187
+ display: flex;
188
+ justify-content: space-between;
189
+ width: 100%;
190
+ }
191
+
192
+ .cms-section-header .cms-section-header-editor > * {
193
+ flex: 1 0 33%;
194
+ }
195
+
196
+ .cms-section-header .cms-section-header-editor > *:first-child {
197
+ text-align: left;
198
+ }
199
+
200
+ .cms-section-header .cms-section-header-editor > *:not(:first-child):not(:last-child) {
201
+ text-align: center;
202
+ }
203
+
204
+ .cms-section-header .cms-section-header-editor > *:not(:first-child):not(:last-child) svg {
205
+ width: 100%;
206
+ }
207
+
208
+ .cms-section-header .cms-section-header-editor > *:last-child {
209
+ display: flex !important;
210
+ justify-content: flex-end;
211
+ }
212
+
213
+ /* applies overall top margin for the Editor header */
214
+ .mantine-Header-root ~ .mantine-AppShell-body {
215
+ min-height: calc(100vh - 50px);
216
+ }
217
+
218
+ /* plus button that appears beneath section on hover */
219
+ .cms-section-controls {
220
+ height: 0;
221
+ }
222
+ .cms-section-controls button {
223
+ background-color: white;
224
+ opacity: 0;
225
+ transition: opacity 0.1s;
226
+ z-index: 2;
227
+ }
228
+ .cms-section-container:hover > .cms-section-controls button {
229
+ opacity: 1;
230
+ }
231
+
232
+ .cms-section-container:hover .cms-section-header,
233
+ .cms-section-container:hover .cms-section-click-to-edit,
234
+ .cms-section-header.active {
235
+ opacity: 1;
236
+ }
237
+
238
+ .cms-section-container:hover .cms-section-overlay,
239
+ .cms-section-container.isDragging .cms-section-overlay {
240
+ opacity: 0.4;
241
+ }
242
+
243
+ .cms-section-container .cms-section-content {
244
+ min-height: 20px;
245
+ }
246
+
247
+ /* increases max-height of Modal component */
248
+ .mantine-Modal-body {
249
+ max-height: 90vw;
250
+ }
251
+
252
+ /* decreases default Prism code font-size */
253
+ .mantine-Prism-root pre {
254
+ font-size: 12px;
255
+ line-height: 1.25;
256
+ }
257
+
258
+ .cr-monaco-container {
259
+ height: 100%;
260
+ }
261
+ /* -----------------------------------
262
+ breakpoints
263
+ ----------------------------------- */
264
+
265
+ /* mobile first */
266
+
267
+ /* max-width first */
268
+
269
+ /* target IE 11+ */
270
+ /* NOTE: since this is a media query, it can't be nested in a traaditional media query */
271
+
272
+
273
+ /* -----------------------------------
274
+ typography
275
+ ----------------------------------- */
276
+
277
+ /* type scaling */
278
+
279
+ /* font smoothing */
280
+
281
+ /* uppercase */
282
+
283
+ /* italic */
284
+
285
+ /* ellipsis */
286
+ /* NOTE: works best with defined width & height, 1 line of text */
287
+
288
+
289
+ /* -----------------------------------
290
+ accessibility
291
+ ----------------------------------- */
292
+
293
+ /* accessibly hidden text and elements */
294
+
295
+ /* reset visually-hidden properties */
296
+
297
+
298
+ /* -----------------------------------
299
+ theming
300
+ ----------------------------------- */
301
+
302
+ /* media query for dark mode */
303
+ /* NOTE: place immediately after default (light theme) css */
304
+
305
+ /* light gray text */
306
+
307
+ /* shadows */
308
+
309
+ /* dialog/alert overlay */
310
+
311
+ /* text input */
312
+
313
+
314
+ /* -----------------------------------
315
+ layout
316
+ ----------------------------------- */
317
+
318
+ /* fill up all the space — make sure the parent has pos:rel */
319
+
320
+ /* center elements the dumb but sometimes useful way */
321
+
322
+ /* overflow with inertia scrolling */
323
+
324
+
325
+ /* -----------------------------------
326
+ resets
327
+ ----------------------------------- */
328
+
329
+ /* list reset */
330
+
331
+ /* remove background & border from buttons */
332
+ /* NOTE: there's also border radius, padding, and box shadow */
333
+
334
+
335
+ /* -----------------------------------
336
+ print stylesheet helpers
337
+ ----------------------------------- */
338
+
339
+ /* display an html attr as a pseudo element */
340
+
341
+ /* -----------------------------------
342
+ CMS nav links & dropdowns
343
+ ----------------------------------- */
344
+
345
+ /* -----------------------------------
346
+ Link styles
347
+ ----------------------------------- */
348
+
349
+ /* -----------------------------------
350
+ VarTable & VarList
351
+ ----------------------------------- */
352
+
353
+ /* -----------------------------------
354
+ meta editor images
355
+ ----------------------------------- */
356
+
357
+ /* -----------------------------------
358
+ breakpoints
359
+ ----------------------------------- */
360
+
361
+ /* mobile first */
362
+
363
+ /* max-width first */
364
+
365
+ /* target IE 11+ */
366
+ /* NOTE: since this is a media query, it can't be nested in a traaditional media query */
367
+
368
+
369
+ /* -----------------------------------
370
+ typography
371
+ ----------------------------------- */
372
+
373
+ /* type scaling */
374
+
375
+ /* font smoothing */
376
+
377
+ /* uppercase */
378
+
379
+ /* italic */
380
+
381
+ /* ellipsis */
382
+ /* NOTE: works best with defined width & height, 1 line of text */
383
+
384
+
385
+ /* -----------------------------------
386
+ accessibility
387
+ ----------------------------------- */
388
+
389
+ /* accessibly hidden text and elements */
390
+
391
+ /* reset visually-hidden properties */
392
+
393
+
394
+ /* -----------------------------------
395
+ theming
396
+ ----------------------------------- */
397
+
398
+ /* media query for dark mode */
399
+ /* NOTE: place immediately after default (light theme) css */
400
+
401
+ /* light gray text */
402
+
403
+ /* shadows */
404
+
405
+ /* dialog/alert overlay */
406
+
407
+ /* text input */
408
+
409
+
410
+ /* -----------------------------------
411
+ layout
412
+ ----------------------------------- */
413
+
414
+ /* fill up all the space — make sure the parent has pos:rel */
415
+
416
+ /* center elements the dumb but sometimes useful way */
417
+
418
+ /* overflow with inertia scrolling */
419
+
420
+
421
+ /* -----------------------------------
422
+ resets
423
+ ----------------------------------- */
424
+
425
+ /* list reset */
426
+
427
+ /* remove background & border from buttons */
428
+ /* NOTE: there's also border radius, padding, and box shadow */
429
+
430
+
431
+ /* -----------------------------------
432
+ print stylesheet helpers
433
+ ----------------------------------- */
434
+
435
+ /* display an html attr as a pseudo element */
436
+
437
+ /* -----------------------------------
438
+ CMS nav links & dropdowns
439
+ ----------------------------------- */
440
+
441
+ /* -----------------------------------
442
+ Link styles
443
+ ----------------------------------- */
444
+
445
+ /* -----------------------------------
446
+ VarTable & VarList
447
+ ----------------------------------- */
448
+
449
+ /* -----------------------------------
450
+ meta editor images
451
+ ----------------------------------- */
452
+
453
+ .cms-table-viz-container .cms-viz-figure,
454
+ .cp-table-viz-container .cp-viz-figure {
455
+ height: auto !important;
456
+ }
457
+
458
+ .cms-table-viz-container .cms-viz-figure [class*="-loading"], .cp-table-viz-container .cp-viz-figure [class*="-loading"] {
459
+ text-align: center;
460
+ }
461
+
462
+ .cms-table-viz-container .cms-viz-figure .rt-table, .cp-table-viz-container .cp-viz-figure .rt-table {
463
+ overflow: auto;
464
+ overscroll-behavior: contain;
465
+ -webkit-overflow-scrolling: touch;
466
+ }
467
+
468
+ /* -----------------------------
469
+ REACT TABLE LAYOUT
470
+ NOTE: ripped from ReactTable
471
+ ----------------------------- */
472
+
473
+ .cp-table {
474
+ flex-direction: column;
475
+ min-width: 100%;
476
+ }
477
+
478
+ .cp-table.cp-table-loading {
479
+ opacity: 0.1;
480
+ }
481
+
482
+ .cp-table * {
483
+ outline: none;
484
+ }
485
+
486
+ .rt-table {
487
+ flex: auto 100%;
488
+ display: flex;
489
+ flex-direction: column;
490
+ align-items: stretch;
491
+ width: auto;
492
+ }
493
+
494
+ .rt-thead {
495
+ flex: 1 0 auto;
496
+ display: flex;
497
+ flex-direction: column;
498
+ top: 0;
499
+ left: 0;
500
+ }
501
+
502
+ .rt-tbody {
503
+ flex: 99999 1 auto;
504
+ display: flex;
505
+ flex-direction: column;
506
+ max-height: var(--table-height);
507
+ }
508
+
509
+ .rt-tr-group {
510
+ flex: 1 0 auto;
511
+ display: flex;
512
+ flex-direction: column;
513
+ align-items: stretch;
514
+ }
515
+ .rt-tr {
516
+ flex: 1 0 auto;
517
+ display: inline-flex;
518
+ }
519
+
520
+ .rt-th, .rt-td,
521
+ .cp-table-header-button {
522
+ position: relative;
523
+ flex: 1 0 0px;
524
+ white-space: nowrap;
525
+ text-overflow: ellipsis;
526
+ padding: 0.75em 0.625em 0.75em 0.625em;
527
+ overflow: hidden;
528
+ }
529
+
530
+ /* -----------------------------
531
+ MODIFIERS
532
+ NOTE: ripped from ReactTable
533
+ ----------------------------- */
534
+
535
+ .rt-expandable {
536
+ cursor: pointer;
537
+ text-overflow: clip;
538
+ }
539
+
540
+ .cp-table-header-button {
541
+ position: absolute;
542
+ top: 0;
543
+ right: 0;
544
+ bottom: 0;
545
+ left: 0;
546
+ width: 100%;
547
+ height: 100%;
548
+ display: flex;
549
+ background: none;
550
+ border: none;
551
+ color: inherit;
552
+ text-align: left;
553
+ cursor: ns-resize;
554
+ }
555
+
556
+ .cp-table-header-button > .cp-table-header-icon {
557
+ opacity: 0;
558
+ margin-left: auto;
559
+ padding-left: 0.5em;
560
+ padding-right: 0.5em;
561
+ transition:
562
+ 0.1s ease-out opacity,
563
+ 0.1s ease transform;
564
+ }
565
+
566
+ .cp-table-header-button:focus {
567
+ background-color: rgba(var(--white-RGB), 0.125);
568
+ outline: 2px solid var(--accent);
569
+ outline-offset: -2px;
570
+ }
571
+
572
+ .cp-table-header-button:focus > .cp-table-header-icon {
573
+ opacity: 1;
574
+ }
575
+
576
+ .rt-resizable-header,
577
+ .rt-thead:not(.-headerGroups) .rt-th {
578
+ padding: 0;
579
+ }
580
+
581
+ .rt-resizable-header,
582
+ .rt-resizable-header-content,
583
+ .rt-th > [class=""] {
584
+ min-height: 2rem;
585
+ }
586
+
587
+ .rt-resizable-header {
588
+ position: relative;
589
+ overflow: visible;
590
+ }
591
+
592
+ /* interactions */
593
+
594
+ .rt-resizable-header.-sort-desc, .rt-resizable-header.-sort-asc, .rt-resizable-header.rt-th.rt-th:hover {
595
+ background-color: rgba(var(--dark-1-RGB), 0.875);
596
+ }
597
+
598
+ .rt-resizable-header.-sort-desc .cp-table-header-icon, .rt-resizable-header.-sort-asc .cp-table-header-icon, .rt-resizable-header.rt-th.rt-th:hover .cp-table-header-icon {
599
+ opacity: 1;
600
+ }
601
+
602
+ .rt-resizable-header-content {
603
+ overflow: hidden;
604
+ text-overflow: ellipsis;
605
+ }
606
+
607
+ .rt-resizing .rt-th,
608
+ .rt-resizing .rt-td {
609
+ cursor: col-resize;
610
+ }
611
+
612
+ .rt-th.-sort-asc .cp-table-header-icon {
613
+ transform: rotate(-180deg);
614
+ }
615
+
616
+ /* -----------------------------
617
+ THEMING
618
+ ----------------------------- */
619
+
620
+ /* non-empty header group */
621
+ .rt-thead.-headerGroups .rt-th:not(:empty) {
622
+ background-color: var(--table-hgroup-bg-color);
623
+ border: 1px solid var(--table-hgroup-border-color);
624
+ border-bottom: none;
625
+ color: var(--table-hgroup-text-color);
626
+ text-align: center;
627
+ outline: none; /* doesn't do anything; no need to highlight */
628
+ }
629
+
630
+ /* nested / primary header */
631
+ .rt-thead.-header {
632
+ background-color: var(--table-thead-bg-color);
633
+ }
634
+ .rt-thead.-header .rt-th {
635
+ background-color: var(--table-thead-bg-color);
636
+ border: 1px solid var(--table-thead-border-color);
637
+ color: var(--table-thead-text-color);
638
+ }
639
+
640
+ /* columns */
641
+ .rt-tbody .rt-td {
642
+ background-color: var(--table-cell-bg-color);
643
+ border: 1px solid var(--table-cell-border-color);
644
+ color: var(--table-cell-text-color);
645
+ border-top: none;
646
+ }
647
+
648
+ /* remove adjacent borders from all cells */
649
+ .rt-th:not(:last-of-type),
650
+ .rt-td:not(:last-of-type) {
651
+ border-right-color: transparent !important;
652
+ }
653
+
654
+ /* nested rows */
655
+ .rt-tr-group > .rt-tr-group .rt-td {
656
+ background-color: var(--table-nested-cell-bg-color);
657
+ }
658
+
659
+ /* hide redundant double nested row */
660
+ /* NOTE: remove/override if nested pivots are necessary */
661
+ .rt-tr-group > .rt-tr-group .rt-expandable {
662
+ cursor: auto;
663
+ }
664
+ .rt-tr-group > .rt-tr-group > .rt-tr-group {
665
+ display: none;
666
+ }
667
+
668
+ /* chevron icon for expandable */
669
+ .rt-expander {
670
+ /* positioning */
671
+ display: inline-block;
672
+ color: transparent;
673
+ }
674
+ /* hide the bullet */
675
+ /* blueprint chevron-right */
676
+ .rt-expander:before {
677
+ content: "\E695";
678
+ font-family: Icons20,sans-serif;
679
+ /* positioning */
680
+ display: inline-block;
681
+ /* theming */
682
+ color: var(--table-icon-color);
683
+ /* transitions */
684
+ will-change: transform;
685
+ transition:
686
+ transform 0.2s ease-out,
687
+ color 0.2s ease-out;
688
+ }
689
+ /* expanded state */
690
+ .rt-expander.-open:before {
691
+ transform: rotateZ(90deg);
692
+ }
693
+
694
+ /* column resize handle */
695
+ .rt-resizer {
696
+ /* sizing & positioning */
697
+ display: inline-block;
698
+ position: absolute !important;
699
+ width: 4px;
700
+ top: 4px;
701
+ bottom: 4px;
702
+ right: 0;
703
+ padding-right: 4px;
704
+ border-left: 4px dotted var(--table-icon-color);
705
+ /* transitions */
706
+ cursor: col-resize;
707
+ opacity: 0;
708
+ transform: translateX(50%);
709
+ transition:
710
+ 0.1s ease-out opacity,
711
+ 0.1s ease-out transform;
712
+ }
713
+ .rt-resizable-header:hover .rt-resizer {
714
+ opacity: 1;
715
+ transform: none;
716
+ }
717
+
718
+ /* footer controls */
719
+ .-pagination {
720
+ display: flex;
721
+ align-items: baseline;
722
+ justify-content: center;
723
+ padding-top: var(--gutter-sm);
724
+ padding-bottom: var(--gutter-sm);
725
+ }
726
+ /* space out adjacent elements */
727
+ .-pagination > *:not(:last-child) {
728
+ margin-right: 1rem;
729
+ }
730
+ .-pagination .-pageInfo {
731
+ display: flex;
732
+ align-items: baseline;
733
+ color: var(--gray);
734
+ }
735
+ .-pagination .-pageInfo .-pageJump {
736
+ margin: 0.25em;
737
+ }
738
+ .-pagination .-pageInfo .-pageJump input {
739
+ padding: 0.125em 0.5em 0.25em 0.5em;
740
+ width: 2rem;
741
+ text-align: center;
742
+ font-size: inherit;
743
+ }
744
+ /* hide the pager */
745
+ .-pagination .-pageInfo .-pageJump input::-webkit-outer-spin-button,
746
+ .-pagination .-pageInfo .-pageJump input::-webkit-inner-spin-button {
747
+ -webkit-appearance: none; /* `display: none` can cause crashes */
748
+ margin: 0; /* nuke the margin */
749
+ }
750
+ .-pagination .-pageInfo .-totalPages {
751
+ margin-left: 0.25em;
752
+ }
753
+
754
+ [class="-loading"] {
755
+ display: none;
756
+ }
757
+
758
+ .cp-table-cell-inner.cp-table-cell-inner-clickable {
759
+ color: var(--accent-dark);
760
+ cursor: pointer;
761
+ }
762
+
763
+ .cp-table-cell-inner.cp-table-cell-inner-clickable:hover, .cp-table-cell-inner.cp-table-cell-inner-clickable:focus {
764
+ text-decoration: underline;
765
+ }