@atelic-action/ui 0.7.1 → 0.8.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.
@@ -17,4 +17,589 @@
17
17
  .mkt .not-found-closing .cta-row {
18
18
  margin-top: 22px;
19
19
  }
20
+
21
+ /* ---- Tones: the one palette this package carries, because good, a
22
+ warning, and broken read green, amber, and red whatever the brand is.
23
+ A site's theme may restate any of these on .mkt. A component sets
24
+ data-tone, and --tone, --tone-fill, and --tone-bg follow. ---- */
25
+ .mkt {
26
+ --tone-good: #1b7f3b;
27
+ --tone-good-fill: #37a35c;
28
+ --tone-good-bg: #eaf6ee;
29
+ --tone-warn: #a84500;
30
+ --tone-warn-fill: #e8a317;
31
+ --tone-warn-bg: #fff3df;
32
+ --tone-bad: #b3261e;
33
+ --tone-bad-fill: #d9483f;
34
+ --tone-bad-bg: #fdecea;
35
+ }
36
+ .mkt [data-tone="good"] {
37
+ --tone: var(--tone-good);
38
+ --tone-fill: var(--tone-good-fill);
39
+ --tone-bg: var(--tone-good-bg);
40
+ }
41
+ .mkt [data-tone="warn"] {
42
+ --tone: var(--tone-warn);
43
+ --tone-fill: var(--tone-warn-fill);
44
+ --tone-bg: var(--tone-warn-bg);
45
+ }
46
+ .mkt [data-tone="bad"] {
47
+ --tone: var(--tone-bad);
48
+ --tone-fill: var(--tone-bad-fill);
49
+ --tone-bg: var(--tone-bad-bg);
50
+ }
51
+ .mkt [data-tone="info"] {
52
+ --tone: var(--primary);
53
+ --tone-fill: var(--primary-bright);
54
+ --tone-bg: var(--primary-tint);
55
+ }
56
+ .mkt [data-tone="muted"] {
57
+ --tone: var(--neutral-500);
58
+ --tone-fill: var(--neutral-200);
59
+ --tone-bg: var(--surface-alt);
60
+ }
61
+
62
+ /* ---- StatRow: large figures, each over what it counts, its period,
63
+ and its comparisons ---- */
64
+ .mkt .stat-row {
65
+ display: grid;
66
+ gap: 24px;
67
+ grid-template-columns: repeat(2, minmax(0, 1fr));
68
+ }
69
+ @media (min-width: 760px) {
70
+ .mkt .stat-row {
71
+ grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
72
+ }
73
+ }
74
+ .mkt .stat-row.is-center .stat {
75
+ text-align: center;
76
+ }
77
+ .mkt .stat .num {
78
+ display: flex;
79
+ align-items: center;
80
+ gap: 0.12em;
81
+ font-size: clamp(2.2rem, 5vw, 3rem);
82
+ font-weight: 800;
83
+ letter-spacing: -0.03em;
84
+ color: var(--tone, var(--primary));
85
+ line-height: 1;
86
+ font-variant-numeric: tabular-nums;
87
+ }
88
+ .mkt .stat-row.is-center .stat .num {
89
+ justify-content: center;
90
+ }
91
+ .mkt .stat-trend {
92
+ width: 0.8em;
93
+ height: 0.8em;
94
+ flex: none;
95
+ }
96
+ .mkt .stat .lbl {
97
+ font-size: 0.95rem;
98
+ font-weight: 650;
99
+ color: var(--ink);
100
+ margin-top: 8px;
101
+ }
102
+ .mkt .stat-period {
103
+ margin-left: 0.5em;
104
+ font-weight: 400;
105
+ color: var(--neutral-500);
106
+ }
107
+ .mkt .stat-delta {
108
+ display: flex;
109
+ flex-wrap: wrap;
110
+ align-items: baseline;
111
+ gap: 2px 6px;
112
+ margin-top: 4px;
113
+ font-size: 0.82rem;
114
+ line-height: 1.35;
115
+ color: var(--neutral-500);
116
+ font-variant-numeric: tabular-nums;
117
+ }
118
+ .mkt .stat-delta-change {
119
+ display: inline-flex;
120
+ align-items: center;
121
+ gap: 2px;
122
+ font-weight: 700;
123
+ color: var(--tone);
124
+ }
125
+ .mkt .stat-delta-change svg {
126
+ align-self: center;
127
+ }
128
+ .mkt .stat-delta-basis {
129
+ text-decoration: none;
130
+ }
131
+ .mkt .stat .note {
132
+ font-size: 0.8rem;
133
+ color: var(--neutral-500);
134
+ margin-top: 4px;
135
+ }
136
+
137
+ /* ---- Collapsible: a labeled line that opens to the detail behind it ---- */
138
+ .mkt .collapsible > summary {
139
+ display: flex;
140
+ align-items: center;
141
+ justify-content: space-between;
142
+ gap: 14px;
143
+ cursor: pointer;
144
+ list-style: none;
145
+ }
146
+ .mkt .collapsible > summary::-webkit-details-marker {
147
+ display: none;
148
+ }
149
+ .mkt .collapsible-text {
150
+ display: flex;
151
+ flex-direction: column;
152
+ gap: 2px;
153
+ min-width: 0;
154
+ }
155
+ .mkt .collapsible-label {
156
+ font-weight: 650;
157
+ color: var(--ink);
158
+ }
159
+ .mkt .collapsible-summary {
160
+ color: var(--ink-soft);
161
+ text-wrap: pretty;
162
+ }
163
+ .mkt .collapsible > summary:hover .collapsible-label {
164
+ color: var(--primary);
165
+ }
166
+ .mkt .collapsible-chevron {
167
+ flex: none;
168
+ color: var(--neutral-500);
169
+ transition: transform 0.15s;
170
+ }
171
+ .mkt .collapsible[open] > summary .collapsible-chevron {
172
+ transform: rotate(180deg);
173
+ }
174
+ .mkt .collapsible-body {
175
+ margin-top: 12px;
176
+ }
177
+ @media (prefers-reduced-motion: reduce) {
178
+ .mkt .collapsible-chevron {
179
+ transition: none;
180
+ }
181
+ }
182
+ /* Paper cannot be clicked, so a printed collapsible is open. */
183
+ @media print {
184
+ .mkt .collapsible::details-content {
185
+ content-visibility: visible;
186
+ display: block;
187
+ }
188
+ .mkt .collapsible-chevron {
189
+ display: none;
190
+ }
191
+ }
192
+
193
+ /* ---- Callout: an icon in its tone beside the title, the explainer
194
+ under it; boxed, it sits apart on a tinted ground ---- */
195
+ .mkt .callout {
196
+ display: grid;
197
+ grid-template-columns: auto minmax(0, 1fr);
198
+ gap: 10px;
199
+ align-items: start;
200
+ }
201
+ .mkt .callout-icon {
202
+ margin-top: 0.15em;
203
+ color: var(--tone);
204
+ flex: none;
205
+ }
206
+ .mkt .callout-title {
207
+ font-weight: 650;
208
+ color: var(--ink);
209
+ text-wrap: pretty;
210
+ }
211
+ .mkt .callout-body {
212
+ margin-top: 2px;
213
+ color: var(--ink-soft);
214
+ text-wrap: pretty;
215
+ }
216
+ .mkt .callout.is-box {
217
+ padding: 14px 16px;
218
+ border-radius: var(--radius-sm);
219
+ background: var(--tone-bg);
220
+ border: 1px solid color-mix(in srgb, var(--tone-fill) 45%, transparent);
221
+ }
222
+
223
+ /* ---- Checklist: checks passed or failed, two columns when there is room ---- */
224
+ .mkt .checklist {
225
+ list-style: none;
226
+ margin: 0;
227
+ padding: 0;
228
+ display: grid;
229
+ grid-template-columns: minmax(0, 1fr);
230
+ gap: 12px 28px;
231
+ }
232
+ @media print, (min-width: 721px) {
233
+ .mkt .checklist {
234
+ grid-template-columns: repeat(2, minmax(0, 1fr));
235
+ }
236
+ }
237
+ .mkt .checklist li {
238
+ display: grid;
239
+ grid-template-columns: auto minmax(0, 1fr);
240
+ gap: 10px;
241
+ align-items: start;
242
+ line-height: 1.4;
243
+ }
244
+ .mkt .checklist li > svg {
245
+ margin-top: 0.1em;
246
+ color: var(--tone);
247
+ }
248
+ .mkt .checklist-label {
249
+ display: block;
250
+ font-weight: 600;
251
+ color: var(--ink);
252
+ }
253
+ .mkt .checklist li[data-tone="bad"] .checklist-label {
254
+ color: var(--tone);
255
+ }
256
+ .mkt .checklist-detail {
257
+ display: block;
258
+ color: var(--ink-soft);
259
+ }
260
+
261
+ /* ---- The charts' shared key: a swatch, a figure, a label ---- */
262
+ .mkt .chart-key {
263
+ list-style: none;
264
+ margin: 10px 0 0;
265
+ padding: 0;
266
+ display: flex;
267
+ flex-wrap: wrap;
268
+ gap: 5px 20px;
269
+ font-size: 0.82rem;
270
+ color: var(--ink-soft);
271
+ }
272
+ .mkt .chart-key li {
273
+ display: inline-flex;
274
+ align-items: baseline;
275
+ gap: 7px;
276
+ }
277
+ .mkt .chart-key b {
278
+ font-weight: 650;
279
+ color: var(--ink);
280
+ font-variant-numeric: tabular-nums;
281
+ }
282
+ .mkt .chart-swatch {
283
+ width: 10px;
284
+ height: 10px;
285
+ border-radius: 3px;
286
+ background: var(--tone-fill);
287
+ align-self: center;
288
+ flex: none;
289
+ }
290
+
291
+ /* ---- StackedBar: one bar, the parts of a whole ---- */
292
+ .mkt .stacked-bar-track {
293
+ display: flex;
294
+ gap: 2px;
295
+ height: 16px;
296
+ border-radius: 999px;
297
+ overflow: hidden;
298
+ }
299
+ .mkt .stacked-bar-track span {
300
+ background: var(--tone-fill);
301
+ min-width: 4px;
302
+ }
303
+
304
+ /* ---- ColumnChart: a bar a period, the periods in labeled groups ---- */
305
+ .mkt .column-chart-plot {
306
+ display: flex;
307
+ align-items: flex-end;
308
+ gap: 12px;
309
+ min-width: 0;
310
+ }
311
+ .mkt .column-chart-group {
312
+ flex: 1 1 0;
313
+ min-width: 0;
314
+ }
315
+ .mkt .column-chart-bars {
316
+ display: flex;
317
+ align-items: flex-end;
318
+ gap: 3px;
319
+ }
320
+ .mkt .column-chart-col {
321
+ flex: 1 1 0;
322
+ min-width: 0;
323
+ display: flex;
324
+ flex-direction: column;
325
+ align-items: center;
326
+ gap: 3px;
327
+ }
328
+ .mkt .column-chart-value {
329
+ font-size: 0.64rem;
330
+ font-variant-numeric: tabular-nums;
331
+ color: var(--ink-soft);
332
+ white-space: nowrap;
333
+ }
334
+ .mkt .column-chart-bar {
335
+ width: 100%;
336
+ max-width: 48px;
337
+ border-radius: 4px 4px 0 0;
338
+ background: var(--tone-fill);
339
+ }
340
+ .mkt .column-chart-label {
341
+ font-size: 0.66rem;
342
+ color: var(--ink-soft);
343
+ white-space: nowrap;
344
+ }
345
+ .mkt .column-chart-group-label {
346
+ display: flex;
347
+ flex-wrap: wrap;
348
+ justify-content: center;
349
+ gap: 0 6px;
350
+ margin-top: 6px;
351
+ padding-top: 5px;
352
+ border-top: 1px solid var(--neutral-200);
353
+ font-family: var(--font-mono);
354
+ font-size: 0.66rem;
355
+ letter-spacing: 0.04em;
356
+ color: var(--neutral-500);
357
+ white-space: nowrap;
358
+ }
359
+ .mkt .column-chart-group-label b {
360
+ font-family: var(--font-sans);
361
+ font-size: 0.8rem;
362
+ letter-spacing: 0;
363
+ font-weight: 650;
364
+ color: var(--ink);
365
+ font-variant-numeric: tabular-nums;
366
+ }
367
+
368
+ /* ---- ThresholdScale: zones, and a pin a reading ---- */
369
+ .mkt .threshold-scale {
370
+ display: flex;
371
+ flex-direction: column;
372
+ gap: 10px;
373
+ }
374
+ .mkt .threshold-scale-row {
375
+ display: grid;
376
+ grid-template-columns: 4.4em minmax(0, 1fr) 3.4em;
377
+ gap: 10px;
378
+ align-items: center;
379
+ }
380
+ .mkt .threshold-scale-label {
381
+ color: var(--ink-soft);
382
+ }
383
+ .mkt .threshold-scale-track {
384
+ position: relative;
385
+ display: flex;
386
+ gap: 2px;
387
+ height: 12px;
388
+ }
389
+ .mkt .threshold-scale-zone {
390
+ background: var(--tone-fill);
391
+ opacity: 0.32;
392
+ }
393
+ .mkt .threshold-scale-zone:first-child {
394
+ border-radius: 999px 0 0 999px;
395
+ }
396
+ .mkt .threshold-scale-zone:nth-last-child(2) {
397
+ border-radius: 0 999px 999px 0;
398
+ }
399
+ .mkt .threshold-scale-pin {
400
+ position: absolute;
401
+ top: 50%;
402
+ width: 18px;
403
+ height: 18px;
404
+ margin: -9px 0 0 -9px;
405
+ border-radius: 50%;
406
+ background: var(--tone-fill);
407
+ border: 3px solid var(--card);
408
+ box-shadow: 0 0 0 1.5px var(--tone-fill);
409
+ }
410
+ .mkt .threshold-scale-value {
411
+ font-weight: 700;
412
+ font-variant-numeric: tabular-nums;
413
+ color: var(--tone);
414
+ text-align: right;
415
+ }
416
+ .mkt .threshold-scale-axis {
417
+ position: relative;
418
+ display: flex;
419
+ gap: 2px;
420
+ height: 2.3em;
421
+ font-size: 0.8rem;
422
+ }
423
+ .mkt .threshold-scale-axis > span {
424
+ color: var(--tone);
425
+ font-weight: 600;
426
+ white-space: nowrap;
427
+ overflow: hidden;
428
+ text-overflow: ellipsis;
429
+ }
430
+ .mkt .threshold-scale-axis > i {
431
+ position: absolute;
432
+ top: 1.25em;
433
+ transform: translateX(-50%);
434
+ font-style: normal;
435
+ font-family: var(--font-mono);
436
+ font-size: 0.72rem;
437
+ color: var(--neutral-500);
438
+ white-space: nowrap;
439
+ }
440
+
441
+ /* ---- DataTable: on a phone each row stacks, its facts wearing their
442
+ column's label, and a dropdown sorts; wide, it is a table whose
443
+ headings sort ---- */
444
+ .mkt .data-table table,
445
+ .mkt .data-table tbody {
446
+ display: block;
447
+ width: 100%;
448
+ }
449
+ .mkt .data-table thead {
450
+ position: absolute;
451
+ width: 1px;
452
+ height: 1px;
453
+ overflow: hidden;
454
+ clip: rect(0, 0, 0, 0);
455
+ white-space: nowrap;
456
+ }
457
+ .mkt .data-table-sort {
458
+ display: flex;
459
+ align-items: center;
460
+ gap: 8px;
461
+ margin-bottom: 8px;
462
+ font-size: 0.85rem;
463
+ color: var(--ink-soft);
464
+ }
465
+ .mkt .data-table-sort select {
466
+ font: inherit;
467
+ color: var(--ink);
468
+ background: var(--card);
469
+ border: 1px solid var(--neutral-200);
470
+ border-radius: var(--radius-sm);
471
+ padding: 5px 8px;
472
+ max-width: 100%;
473
+ }
474
+ .mkt .data-table tbody tr {
475
+ display: flex;
476
+ flex-wrap: wrap;
477
+ align-items: center;
478
+ gap: 4px 18px;
479
+ padding: 9px 0;
480
+ border-bottom: 1px solid var(--neutral-100);
481
+ line-height: 1.35;
482
+ }
483
+ .mkt .data-table tbody tr:first-child {
484
+ border-top: 1.5px solid var(--ink);
485
+ }
486
+ .mkt .data-table tbody tr:last-child {
487
+ border-bottom: 0;
488
+ padding-bottom: 0;
489
+ }
490
+ .mkt .data-table tbody th {
491
+ width: 100%;
492
+ text-align: left;
493
+ font-weight: 400;
494
+ }
495
+ .mkt .data-table td {
496
+ display: inline-flex;
497
+ align-items: center;
498
+ gap: 6px;
499
+ font-variant-numeric: tabular-nums;
500
+ }
501
+ .mkt .data-table td::before {
502
+ content: attr(data-label);
503
+ font-family: var(--font-mono);
504
+ font-size: 0.7rem;
505
+ letter-spacing: 0.08em;
506
+ text-transform: uppercase;
507
+ color: var(--neutral-500);
508
+ }
509
+ @media print, (min-width: 721px) {
510
+ .mkt .data-table-sort {
511
+ display: none;
512
+ }
513
+ .mkt .data-table table {
514
+ display: table;
515
+ border-collapse: collapse;
516
+ }
517
+ .mkt .data-table tbody {
518
+ display: table-row-group;
519
+ }
520
+ .mkt .data-table thead {
521
+ position: static;
522
+ width: auto;
523
+ height: auto;
524
+ overflow: visible;
525
+ clip: auto;
526
+ }
527
+ .mkt .data-table tbody tr {
528
+ display: table-row;
529
+ padding: 0;
530
+ border: 0;
531
+ }
532
+ .mkt .data-table tbody tr:first-child {
533
+ border-top: 0;
534
+ }
535
+ .mkt .data-table th,
536
+ .mkt .data-table td {
537
+ display: table-cell;
538
+ padding: 7px 14px 7px 0;
539
+ border-bottom: 1px solid var(--neutral-100);
540
+ text-align: left;
541
+ vertical-align: middle;
542
+ font-weight: 400;
543
+ }
544
+ .mkt .data-table tbody th {
545
+ width: auto;
546
+ }
547
+ .mkt .data-table td::before {
548
+ content: none;
549
+ }
550
+ .mkt .data-table th:last-child,
551
+ .mkt .data-table td:last-child {
552
+ padding-right: 0;
553
+ }
554
+ .mkt .data-table [data-align="center"] {
555
+ text-align: center;
556
+ }
557
+ .mkt .data-table [data-align="right"] {
558
+ text-align: right;
559
+ }
560
+ .mkt .data-table thead th {
561
+ padding-top: 0;
562
+ padding-bottom: 8px;
563
+ border-bottom: 1.5px solid var(--ink);
564
+ font-family: var(--font-mono);
565
+ font-size: 0.72rem;
566
+ letter-spacing: 0.08em;
567
+ text-transform: uppercase;
568
+ color: var(--ink-soft);
569
+ white-space: nowrap;
570
+ vertical-align: bottom;
571
+ }
572
+ .mkt .data-table thead th button {
573
+ display: inline-flex;
574
+ align-items: center;
575
+ gap: 4px;
576
+ padding: 0;
577
+ border: 0;
578
+ background: none;
579
+ font: inherit;
580
+ letter-spacing: inherit;
581
+ text-transform: inherit;
582
+ color: inherit;
583
+ cursor: pointer;
584
+ }
585
+ .mkt .data-table thead th button:hover,
586
+ .mkt .data-table thead th button[data-active] {
587
+ color: var(--primary);
588
+ }
589
+ .mkt .data-table thead th button svg {
590
+ opacity: 0.55;
591
+ }
592
+ .mkt .data-table thead th button[data-active] svg {
593
+ opacity: 1;
594
+ }
595
+ .mkt .data-table tbody tr:last-child th,
596
+ .mkt .data-table tbody tr:last-child td {
597
+ border-bottom: 0;
598
+ }
599
+ }
600
+ @media print {
601
+ .mkt .data-table thead th button svg {
602
+ display: none;
603
+ }
604
+ }
20
605
  }