@tristan2828/ui-foundation 4.76.0 → 4.77.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/conventions/docs/cell-patterns.md +81 -35
- package/conventions/docs/design-language.md +112 -27
- package/dist/components/app/data-table.d.ts +11 -1
- package/dist/components/app/data-table.js +16 -6
- package/dist/components/app/markdown.d.ts +13 -1
- package/dist/components/app/markdown.js +44 -2
- package/dist/components/ui/table.d.ts +2 -1
- package/dist/components/ui/table.js +3 -3
- package/dist/lib/markdown-inline.d.ts +10 -0
- package/dist/lib/markdown-inline.js +204 -0
- package/package.json +1 -1
- package/styles/index.css +120 -0
- package/styles/theme.css +391 -1
|
@@ -4,41 +4,41 @@
|
|
|
4
4
|
## Index
|
|
5
5
|
|
|
6
6
|
- [The rules that apply to every cell](#the-rules-that-apply-to-every-cell) · lines 70–89
|
|
7
|
-
- [1. Plain text](#1-plain-text) · lines 91–
|
|
8
|
-
- [2. Icon + label](#2-icon--label) · lines
|
|
9
|
-
- [3. Icon in a badge](#3-icon-in-a-badge) · lines
|
|
10
|
-
- [4. Icon only, label in a tooltip](#4-icon-only-label-in-a-tooltip) · lines
|
|
11
|
-
- [Several values: the icons side by side, every name in one tooltip](#several-values-the-icons-side-by-side-every-name-in-one-tooltip) · lines
|
|
12
|
-
- [5. Enum → tone-mapped badge](#5-enum--tone-mapped-badge) · lines
|
|
13
|
-
- [6. Multi-value enum, clustered](#6-multi-value-enum-clustered) · lines
|
|
14
|
-
- [7. Link as an outline button](#7-link-as-an-outline-button) · lines
|
|
15
|
-
- [8. Date, relative](#8-date-relative) · lines
|
|
16
|
-
- [9. Ordinal scale (bounded integer)](#9-ordinal-scale-bounded-integer) · lines
|
|
17
|
-
- [Two variants the package draws: a step bar and a star](#two-variants-the-package-draws-a-step-bar-and-a-star) · lines
|
|
18
|
-
- [10. Summary in the cell, detail in a popover](#10-summary-in-the-cell-detail-in-a-popover) · lines
|
|
19
|
-
- [A second example: what a row depends on](#a-second-example-what-a-row-depends-on) · lines
|
|
20
|
-
- [11. Number or currency — Unproven](#11-number-or-currency--unproven) · lines
|
|
21
|
-
- [12. Boolean](#12-boolean) · lines
|
|
22
|
-
- [13. Progress bar — Unproven](#13-progress-bar--unproven) · lines
|
|
23
|
-
- [The compact form: `ProgressRing`](#the-compact-form-progressring) · lines
|
|
24
|
-
- [14. Avatar and name — Unproven](#14-avatar-and-name--unproven) · lines
|
|
25
|
-
- [15. Yes/no you flip in the row](#15-yesno-you-flip-in-the-row) · lines
|
|
26
|
-
- [A variant: a pressed icon inside another value's cell](#a-variant-a-pressed-icon-inside-another-values-cell) · lines
|
|
27
|
-
- [16. Title linking to the record's view](#16-title-linking-to-the-records-view) · lines
|
|
28
|
-
- [17. Quick action on the view](#17-quick-action-on-the-view) · lines
|
|
29
|
-
- [18. Editable value](#18-editable-value) · lines
|
|
30
|
-
- [Presets: one line per field](#presets-one-line-per-field) · lines
|
|
31
|
-
- [Several fields edited as one](#several-fields-edited-as-one) · lines
|
|
32
|
-
- [A link and its label](#a-link-and-its-label) · lines
|
|
33
|
-
- [A list of sub-items](#a-list-of-sub-items) · lines
|
|
34
|
-
- [In a table's rows](#in-a-tables-rows) · lines
|
|
35
|
-
- [A table of a few short columns: `width="content"`](#a-table-of-a-few-short-columns-widthcontent) · lines
|
|
36
|
-
- [19. Stage circle for an ordered status](#19-stage-circle-for-an-ordered-status) · lines
|
|
37
|
-
- [20. Count linking to the related records](#20-count-linking-to-the-related-records) · lines
|
|
38
|
-
- [21. Rows grouped under headings, and a pill filter](#21-rows-grouped-under-headings-and-a-pill-filter) · lines
|
|
39
|
-
- [22. A highlighted row, and rows that are done](#22-a-highlighted-row-and-rows-that-are-done) · lines
|
|
40
|
-
- [23. A Group menu, and a record read beside the list](#23-a-group-menu-and-a-record-read-beside-the-list) · lines
|
|
41
|
-
- [24. A stored colour beside its name](#24-a-stored-colour-beside-its-name) · lines
|
|
7
|
+
- [1. Plain text](#1-plain-text) · lines 91–127
|
|
8
|
+
- [2. Icon + label](#2-icon--label) · lines 129–152
|
|
9
|
+
- [3. Icon in a badge](#3-icon-in-a-badge) · lines 154–167
|
|
10
|
+
- [4. Icon only, label in a tooltip](#4-icon-only-label-in-a-tooltip) · lines 169–246
|
|
11
|
+
- [Several values: the icons side by side, every name in one tooltip](#several-values-the-icons-side-by-side-every-name-in-one-tooltip) · lines 194–246
|
|
12
|
+
- [5. Enum → tone-mapped badge](#5-enum--tone-mapped-badge) · lines 248–261
|
|
13
|
+
- [6. Multi-value enum, clustered](#6-multi-value-enum-clustered) · lines 263–275
|
|
14
|
+
- [7. Link as an outline button](#7-link-as-an-outline-button) · lines 277–298
|
|
15
|
+
- [8. Date, relative](#8-date-relative) · lines 300–337
|
|
16
|
+
- [9. Ordinal scale (bounded integer)](#9-ordinal-scale-bounded-integer) · lines 339–387
|
|
17
|
+
- [Two variants the package draws: a step bar and a star](#two-variants-the-package-draws-a-step-bar-and-a-star) · lines 357–387
|
|
18
|
+
- [10. Summary in the cell, detail in a popover](#10-summary-in-the-cell-detail-in-a-popover) · lines 389–439
|
|
19
|
+
- [A second example: what a row depends on](#a-second-example-what-a-row-depends-on) · lines 407–439
|
|
20
|
+
- [11. Number or currency — Unproven](#11-number-or-currency--unproven) · lines 441–481
|
|
21
|
+
- [12. Boolean](#12-boolean) · lines 483–513
|
|
22
|
+
- [13. Progress bar — Unproven](#13-progress-bar--unproven) · lines 515–551
|
|
23
|
+
- [The compact form: `ProgressRing`](#the-compact-form-progressring) · lines 535–551
|
|
24
|
+
- [14. Avatar and name — Unproven](#14-avatar-and-name--unproven) · lines 553–570
|
|
25
|
+
- [15. Yes/no you flip in the row](#15-yesno-you-flip-in-the-row) · lines 572–681
|
|
26
|
+
- [A variant: a pressed icon inside another value's cell](#a-variant-a-pressed-icon-inside-another-values-cell) · lines 598–681
|
|
27
|
+
- [16. Title linking to the record's view](#16-title-linking-to-the-records-view) · lines 683–718
|
|
28
|
+
- [17. Quick action on the view](#17-quick-action-on-the-view) · lines 720–793
|
|
29
|
+
- [18. Editable value](#18-editable-value) · lines 795–1430
|
|
30
|
+
- [Presets: one line per field](#presets-one-line-per-field) · lines 1080–1136
|
|
31
|
+
- [Several fields edited as one](#several-fields-edited-as-one) · lines 1138–1170
|
|
32
|
+
- [A link and its label](#a-link-and-its-label) · lines 1172–1196
|
|
33
|
+
- [A list of sub-items](#a-list-of-sub-items) · lines 1198–1331
|
|
34
|
+
- [In a table's rows](#in-a-tables-rows) · lines 1333–1418
|
|
35
|
+
- [A table of a few short columns: `width="content"`](#a-table-of-a-few-short-columns-widthcontent) · lines 1420–1430
|
|
36
|
+
- [19. Stage circle for an ordered status](#19-stage-circle-for-an-ordered-status) · lines 1432–1498
|
|
37
|
+
- [20. Count linking to the related records](#20-count-linking-to-the-related-records) · lines 1500–1564
|
|
38
|
+
- [21. Rows grouped under headings, and a pill filter](#21-rows-grouped-under-headings-and-a-pill-filter) · lines 1566–1664
|
|
39
|
+
- [22. A highlighted row, and rows that are done](#22-a-highlighted-row-and-rows-that-are-done) · lines 1666–1694
|
|
40
|
+
- [23. A Group menu, and a record read beside the list](#23-a-group-menu-and-a-record-read-beside-the-list) · lines 1696–1772
|
|
41
|
+
- [24. A stored colour beside its name](#24-a-stored-colour-beside-its-name) · lines 1774–1797
|
|
42
42
|
|
|
43
43
|
<!-- /index -->
|
|
44
44
|
|
|
@@ -97,6 +97,35 @@ otherwise have to make themselves.
|
|
|
97
97
|
Always offer a plain-text option when exploring a column — in practice it
|
|
98
98
|
gets picked about as often as the visual ones.
|
|
99
99
|
|
|
100
|
+
**Markdown in a one-line value.** A short field the app lets people write
|
|
101
|
+
Markdown in (a summary, a status note, a title with a link) shows in a
|
|
102
|
+
cell, a card's line or a caption with `<Markdown inline>`, not the block
|
|
103
|
+
`<Markdown>`:
|
|
104
|
+
|
|
105
|
+
```tsx
|
|
106
|
+
<span className="text-muted-foreground">
|
|
107
|
+
<Markdown inline>{row.original.summary}</Markdown>
|
|
108
|
+
</span>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
- Bold, italic, code and links keep their marks; every other mark shows
|
|
112
|
+
as its words (a strikethrough or a highlight as plain words).
|
|
113
|
+
- It's a `<span>` in the font and colour of where it sits, with no block
|
|
114
|
+
margins, so the row stays as tall as a plain-text one. Code is the mono
|
|
115
|
+
face alone, with no wash, so it can't add height or fail contrast on a
|
|
116
|
+
muted cell.
|
|
117
|
+
- Blocks written in it still read on one line: paragraphs joined with a
|
|
118
|
+
space; a list's items with " · " (numbered ones with their numbers, a
|
|
119
|
+
done task with ✓, one to do with ☐); a table's rows as `Header: value`
|
|
120
|
+
pairs (`Size: S, Price: $4 · Size: L, Price: $6`); a heading, quote or
|
|
121
|
+
rule as " · "; a callout led by its kind ("Warning: …"); an image as its
|
|
122
|
+
alt text.
|
|
123
|
+
- A link opens in a new tab, and its click and Enter stay its own: they
|
|
124
|
+
never reach the row or the card it sits in, even a card of the app's
|
|
125
|
+
own with an `onClick`.
|
|
126
|
+
- It's for one line. Long text is notes, the block `<Markdown>` on the
|
|
127
|
+
record's view.
|
|
128
|
+
|
|
100
129
|
## 2. Icon + label
|
|
101
130
|
|
|
102
131
|
A single-value enum where a glyph speeds up scanning but the word still
|
|
@@ -1596,6 +1625,23 @@ const { page, filters, setFilter, setPage } = useTableUrlState(['kind'])
|
|
|
1596
1625
|
it. An ancestor of your own with `overflow` set (a card with
|
|
1597
1626
|
`overflow-hidden`, say) takes the place of the page: leave it off such a
|
|
1598
1627
|
table's ancestors.
|
|
1628
|
+
- **`stickyTop`**, with `stickyGroupHeadings`, for a page that pins a bar
|
|
1629
|
+
of its own to the top (a page header, a filter bar): how far down the
|
|
1630
|
+
header and headings pin, so they sit under the bar and never behind it.
|
|
1631
|
+
Any CSS length, resolved at the table, so a variable the page sets per
|
|
1632
|
+
breakpoint gives a phone its own offset:
|
|
1633
|
+
|
|
1634
|
+
```tsx
|
|
1635
|
+
<main className="[--page-bar:3.5rem] md:[--page-bar:3rem]">
|
|
1636
|
+
<div className="sticky top-0 z-40 h-(--page-bar) bg-background">…</div>
|
|
1637
|
+
<DataTable stickyGroupHeadings stickyTop="var(--page-bar)" … />
|
|
1638
|
+
</main>
|
|
1639
|
+
```
|
|
1640
|
+
|
|
1641
|
+
When the columns are wider than their box, the box is that much shorter
|
|
1642
|
+
than the screen instead, so once the page is scrolled to it, it fits
|
|
1643
|
+
under the bar and its header pins at its own top. Focus moved to a row
|
|
1644
|
+
clears the bar too. Give the bar a `z-index` above the table's (`z-40`).
|
|
1599
1645
|
- **`header={false}`** for a list-like table whose columns explain
|
|
1600
1646
|
themselves (a thumbnail with a title block, then actions). The header
|
|
1601
1647
|
row takes no room but stays in the table, so the columns keep their
|
|
@@ -3,33 +3,34 @@
|
|
|
3
3
|
<!-- index: written by `npm run docs:index` in the package from the headings below; never edit it by hand -->
|
|
4
4
|
## Index
|
|
5
5
|
|
|
6
|
-
- [Palettes](#palettes) · lines
|
|
7
|
-
- [Glow](#glow) · lines
|
|
8
|
-
- [Semantic tones](#semantic-tones) · lines
|
|
9
|
-
- [The three badge styles](#the-three-badge-styles) · lines
|
|
10
|
-
- [Mapping an enum to tones](#mapping-an-enum-to-tones) · lines
|
|
11
|
-
- [Glyphs and icons: 3:1](#glyphs-and-icons-31) · lines
|
|
12
|
-
- [Logos and brand marks](#logos-and-brand-marks) · lines
|
|
13
|
-
- [Categorical colour](#categorical-colour) · lines
|
|
14
|
-
- [Heat scale](#heat-scale) · lines
|
|
15
|
-
- [
|
|
16
|
-
- [
|
|
17
|
-
- [
|
|
18
|
-
|
|
19
|
-
- [
|
|
20
|
-
|
|
21
|
-
- [
|
|
22
|
-
- [
|
|
23
|
-
- [
|
|
24
|
-
- [
|
|
25
|
-
|
|
26
|
-
- [
|
|
27
|
-
- [A list as
|
|
28
|
-
- [
|
|
29
|
-
- [
|
|
30
|
-
- [
|
|
31
|
-
- [
|
|
32
|
-
- [
|
|
6
|
+
- [Palettes](#palettes) · lines 43–110
|
|
7
|
+
- [Glow](#glow) · lines 112–130
|
|
8
|
+
- [Semantic tones](#semantic-tones) · lines 132–160
|
|
9
|
+
- [The three badge styles](#the-three-badge-styles) · lines 162–179
|
|
10
|
+
- [Mapping an enum to tones](#mapping-an-enum-to-tones) · lines 181–210
|
|
11
|
+
- [Glyphs and icons: 3:1](#glyphs-and-icons-31) · lines 212–225
|
|
12
|
+
- [Logos and brand marks](#logos-and-brand-marks) · lines 227–271
|
|
13
|
+
- [Categorical colour](#categorical-colour) · lines 273–343
|
|
14
|
+
- [Heat scale](#heat-scale) · lines 345–406
|
|
15
|
+
- [Depth ramps](#depth-ramps) · lines 408–486
|
|
16
|
+
- [A stored colour](#a-stored-colour) · lines 488–536
|
|
17
|
+
- [Shapes and sizes](#shapes-and-sizes) · lines 538–559
|
|
18
|
+
- [Typography](#typography) · lines 561–671
|
|
19
|
+
- [Written text (notes)](#written-text-notes) · lines 595–671
|
|
20
|
+
- [Density](#density) · lines 673–759
|
|
21
|
+
- [Rows on this device](#rows-on-this-device) · lines 732–759
|
|
22
|
+
- [Widget cards (hub pages)](#widget-cards-hub-pages) · lines 761–875
|
|
23
|
+
- [Module cards (a hub's places)](#module-cards-a-hubs-places) · lines 877–954
|
|
24
|
+
- [Notices](#notices) · lines 956–984
|
|
25
|
+
- [A value over time](#a-value-over-time) · lines 986–1072
|
|
26
|
+
- [Several values over time](#several-values-over-time) · lines 1035–1072
|
|
27
|
+
- [A list as a board](#a-list-as-a-board) · lines 1074–1125
|
|
28
|
+
- [A list as cards](#a-list-as-cards) · lines 1127–1173
|
|
29
|
+
- [Key numbers on a record](#key-numbers-on-a-record) · lines 1175–1197
|
|
30
|
+
- [A record's tabs, mark and rail](#a-records-tabs-mark-and-rail) · lines 1199–1243
|
|
31
|
+
- [Picking at random](#picking-at-random) · lines 1245–1276
|
|
32
|
+
- [Filling in what's missing](#filling-in-whats-missing) · lines 1278–1345
|
|
33
|
+
- [Values edited in place: the presets' looks](#values-edited-in-place-the-presets-looks) · lines 1347–1372
|
|
33
34
|
|
|
34
35
|
<!-- /index -->
|
|
35
36
|
|
|
@@ -404,6 +405,86 @@ step against every palette's card and raised surface. `SideBySide` shows
|
|
|
404
405
|
both themes at once, under normal vision and simulated deuteranopia and
|
|
405
406
|
protanopia.
|
|
406
407
|
|
|
408
|
+
## Depth ramps
|
|
409
|
+
|
|
410
|
+
For **depth within one category**: the levels of one kind of thing, where
|
|
411
|
+
the category stays the same and only how deep, how specific or how far
|
|
412
|
+
in changes. A category's subcategories in a chart (Food, then Groceries,
|
|
413
|
+
then Produce), nesting levels of one tree, a stacked bar of one
|
|
414
|
+
category's parts. Every categorical slot has five steps, shallow to deep,
|
|
415
|
+
`--category-N-depth-1` through `--category-N-depth-5`, given by Tailwind
|
|
416
|
+
as `fill-category-N-depth-M` (a shape), `bg-category-N-depth-M` (a cell)
|
|
417
|
+
and `text-category-N-depth-M-foreground` (text on that cell).
|
|
418
|
+
|
|
419
|
+
**Which to use:**
|
|
420
|
+
|
|
421
|
+
| The values are | Use |
|
|
422
|
+
|---|---|
|
|
423
|
+
| different from each other, in no order | the slot itself, `text-category-N` (a glyph's tint) |
|
|
424
|
+
| one category's levels, shallow to deep | its depth ramp, `bg-category-N-depth-M` |
|
|
425
|
+
| amounts in an order, with no category | the heat scale, `bg-heat-M` |
|
|
426
|
+
| good or bad | a tone |
|
|
427
|
+
|
|
428
|
+
- **One ramp per category, its slot's.** A record whose category is slot 3
|
|
429
|
+
draws its levels from slot 3's ramp, so the depth reads as "more of the
|
|
430
|
+
same thing". Two categories side by side each keep their own ramp. A
|
|
431
|
+
ramp's hue stays within about 20° of its slot's, so a step never reads
|
|
432
|
+
as another slot, but steps of two neighbouring slots' ramps can come
|
|
433
|
+
close (orange and brown, blue and navy): tell categories apart by their
|
|
434
|
+
slot's own glyph and name, not by a ramp step alone.
|
|
435
|
+
- **Depth, not amount.** A ramp says "a level of this", never "more of
|
|
436
|
+
this is worse". A count or a total over many categories is the heat
|
|
437
|
+
scale; a status is a tone.
|
|
438
|
+
- **Opaque, at full strength.** Each step clears 3:1 against the card and
|
|
439
|
+
the page in light, dark and every palette (3.03:1 at the least, light
|
|
440
|
+
on `--muted`), so a shape stands out with no outline. An opacity
|
|
441
|
+
modifier (`bg-category-3-depth-2/50`) gives that up.
|
|
442
|
+
- **Text on a fill takes its own foreground.** Which text colour is right
|
|
443
|
+
depends on the step and the theme: pair the two as below. It measures
|
|
444
|
+
4.55:1 at the least.
|
|
445
|
+
- **Neighbours are closer than the heat scale's, so keep a boundary.**
|
|
446
|
+
Neighbouring steps are at least ΔE 17.7 apart in light and 13.9 in
|
|
447
|
+
dark (blue's; every slot but blue and navy 17.4 or more), and 10.3
|
|
448
|
+
under simulated deuteranopia and protanopia. Five steps of one hue that
|
|
449
|
+
each clear 3:1 on the card only have so much lightness to share, dark's
|
|
450
|
+
band most of all. A `stroke-card` or a 1px gap between shapes, as a
|
|
451
|
+
stacked bar's segments have, makes each boundary easy to see.
|
|
452
|
+
- **The order holds without hue.** Each step is darker than the one before
|
|
453
|
+
it in both themes, so a ramp also reads in greyscale. In the dark
|
|
454
|
+
themes step 1 is near white and step 5 the slot's deepest, still 3:1
|
|
455
|
+
on the card.
|
|
456
|
+
- **Never colour alone.** Name the level too, in the cell, a tooltip or
|
|
457
|
+
a legend, and give a shape holding one a name for screen readers.
|
|
458
|
+
- **Five steps, not more.** Deeper nesting than five shares step 5, or
|
|
459
|
+
starts again with a label saying so; don't interpolate between steps.
|
|
460
|
+
|
|
461
|
+
An app maps a slot's levels to whole class names, as the heat scale's
|
|
462
|
+
steps are mapped: Tailwind only generates classes it finds written out.
|
|
463
|
+
|
|
464
|
+
```tsx
|
|
465
|
+
// Slot 3's ramp, shallow to deep.
|
|
466
|
+
const GREEN_DEPTH = [
|
|
467
|
+
{ fill: 'fill-category-3-depth-1', cell: 'bg-category-3-depth-1 text-category-3-depth-1-foreground' },
|
|
468
|
+
{ fill: 'fill-category-3-depth-2', cell: 'bg-category-3-depth-2 text-category-3-depth-2-foreground' },
|
|
469
|
+
{ fill: 'fill-category-3-depth-3', cell: 'bg-category-3-depth-3 text-category-3-depth-3-foreground' },
|
|
470
|
+
{ fill: 'fill-category-3-depth-4', cell: 'bg-category-3-depth-4 text-category-3-depth-4-foreground' },
|
|
471
|
+
{ fill: 'fill-category-3-depth-5', cell: 'bg-category-3-depth-5 text-category-3-depth-5-foreground' },
|
|
472
|
+
] as const
|
|
473
|
+
|
|
474
|
+
<rect className={`${GREEN_DEPTH[level - 1].fill} stroke-card`} />
|
|
475
|
+
<td className={GREEN_DEPTH[level - 1].cell}>{name}</td>
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
The package's fixtures render every ramp (`patterns/DepthRamps`). Its
|
|
479
|
+
Default story runs through axe and the token check in light and dark, axe
|
|
480
|
+
in every palette too, and a check that measures every step of every
|
|
481
|
+
slot, as a fill and as a cell, against the page and a card in each.
|
|
482
|
+
`tests/depth-ramps.test.ts` holds the distance between neighbours (17 in
|
|
483
|
+
light, 13.5 in dark, 10 with deuteranopia and protanopia), the order of
|
|
484
|
+
lightness, text on every fill and every step against every palette's card
|
|
485
|
+
and raised surface. `SideBySide` shows both themes at once, under normal
|
|
486
|
+
vision and simulated deuteranopia and protanopia.
|
|
487
|
+
|
|
407
488
|
## A stored colour
|
|
408
489
|
|
|
409
490
|
A colour the user stored as data (a paint's hex, a label's colour, a
|
|
@@ -513,6 +594,10 @@ height and weight together, from tokens in the package's `styles/theme.css`:
|
|
|
513
594
|
|
|
514
595
|
### Written text (notes)
|
|
515
596
|
|
|
597
|
+
A one-line value written as Markdown (a cell, a card's line) is
|
|
598
|
+
`<Markdown inline>` instead: no headings or blocks, the font and colour
|
|
599
|
+
of where it sits (cell-patterns.md, pattern 1).
|
|
600
|
+
|
|
516
601
|
Long text written as Markdown (`<Markdown>` and `RichTextEditor`) has its
|
|
517
602
|
own three heading roles, so `#`, `##` and `###` in a note never look
|
|
518
603
|
alike. They're for headings inside the text only, never a screen's own
|
|
@@ -97,6 +97,16 @@ export type DataTableProps<TData extends Record<string, unknown>> = {
|
|
|
97
97
|
* Ungrouped, it changes nothing.
|
|
98
98
|
*/
|
|
99
99
|
stickyGroupHeadings?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* With `stickyGroupHeadings`: how far from the top of the screen the
|
|
102
|
+
* pinned header and headings sit, for a page with a bar of its own pinned
|
|
103
|
+
* to the top. Any CSS length (`'3.5rem'`, `'var(--page-bar-height)'`),
|
|
104
|
+
* resolved at the table, so a variable the page sets per breakpoint gives
|
|
105
|
+
* a phone and a desktop their own offset. When the columns are wider than
|
|
106
|
+
* their box, the box is that much shorter than the screen instead, so it
|
|
107
|
+
* fits below the bar. Without it, they sit at the very top (`0px`).
|
|
108
|
+
*/
|
|
109
|
+
stickyTop?: string;
|
|
100
110
|
/**
|
|
101
111
|
* The fields the rows can be grouped by, picked in a Group menu at the
|
|
102
112
|
* end of the toolbar: None (the default, the table as it is without
|
|
@@ -284,4 +294,4 @@ export type DataTableTotals = {
|
|
|
284
294
|
*/
|
|
285
295
|
cells?: Partial<Record<string, ReactNode>>;
|
|
286
296
|
};
|
|
287
|
-
export declare function DataTable<TData extends Record<string, unknown>>({ columns, data, total, page, pageSize, onPageChange, sorting, onSortingChange, isLoading, error, onRetry, emptyTitle, emptyDescription, emptyAction, toolbar, getRowId, pinFirstColumn, pinLastColumn, enableSortingRemoval, visibleColumns, width, groupBy, groupSummary, stickyGroupHeadings, header: showHeader, highlightRow, totals, layouts, layout: layoutProp, onLayoutChange, tableLayout, groupings, grouping: groupingProp, onGroupingChange, opens, detailPanel, onRowClick: onRowClickProp, detailRow, onDetailRowChange, detailLabel, }: DataTableProps<TData>): import("react").JSX.Element;
|
|
297
|
+
export declare function DataTable<TData extends Record<string, unknown>>({ columns, data, total, page, pageSize, onPageChange, sorting, onSortingChange, isLoading, error, onRetry, emptyTitle, emptyDescription, emptyAction, toolbar, getRowId, pinFirstColumn, pinLastColumn, enableSortingRemoval, visibleColumns, width, groupBy, groupSummary, stickyGroupHeadings, stickyTop, header: showHeader, highlightRow, totals, layouts, layout: layoutProp, onLayoutChange, tableLayout, groupings, grouping: groupingProp, onGroupingChange, opens, detailPanel, onRowClick: onRowClickProp, detailRow, onDetailRowChange, detailLabel, }: DataTableProps<TData>): import("react").JSX.Element;
|
|
@@ -188,18 +188,22 @@ const GROUP_HEADING_CLASS = 'h-auto bg-background pt-4 pb-1.5 align-bottom';
|
|
|
188
188
|
// scroll sideways, so it's bounded to the screen and scrolls down too.
|
|
189
189
|
// `isolate` keeps these z-indexes inside the table.
|
|
190
190
|
const STICKY_PAGE_SCROLL_CLASS = 'isolate overflow-x-clip';
|
|
191
|
-
const STICKY_OWN_SCROLL_CLASS = 'isolate max-h-
|
|
191
|
+
const STICKY_OWN_SCROLL_CLASS = 'isolate max-h-[calc(100dvh-var(--data-table-sticky-top))] overflow-auto';
|
|
192
192
|
// Collapsed borders stay where the row was, so a stuck cell draws its rule
|
|
193
193
|
// as an inset shadow and its row's border comes off. Above the pinned
|
|
194
194
|
// columns (z-10): the column header over the headings over the rows. A
|
|
195
195
|
// cell's sticky bounds are the whole table, not its group, so a heading isn't
|
|
196
196
|
// pushed off by the next: the next slides over it, later in the DOM and opaque.
|
|
197
197
|
const STICKY_RULE_CLASS = 'shadow-[inset_0_-1px_0_0_var(--border)]';
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
//
|
|
199
|
+
// `stickyTop` moves both down by --data-table-pin-top: the app's offset on the
|
|
200
|
+
// page's scroll, none in a box of the table's own (that box's top is its own,
|
|
201
|
+
// and the box is shortened by the offset instead).
|
|
202
|
+
const STICKY_HEAD_CELL_CLASS = `sticky top-(--data-table-pin-top) z-30 bg-background ${STICKY_RULE_CLASS}`;
|
|
203
|
+
const STICKY_GROUP_HEADING_CLASS = `sticky top-[calc(var(--data-table-pin-top)+var(--data-table-head-height))] z-20 pt-2 ${STICKY_RULE_CLASS}`;
|
|
200
204
|
// What focus scrolls to clears the stuck header and heading (3rem covers a
|
|
201
205
|
// heading's height, large density included).
|
|
202
|
-
const STICKY_FOCUS_CLASS = '[&_tbody_*]:scroll-mt-[calc(var(--data-table-head-height)+--spacing(12))]';
|
|
206
|
+
const STICKY_FOCUS_CLASS = '[&_tbody_*]:scroll-mt-[calc(var(--data-table-pin-top)+var(--data-table-head-height)+--spacing(12))]';
|
|
203
207
|
// A grouping's heading (`groupings`) is a button that folds its rows: the
|
|
204
208
|
// label, then the count, a chevron that turns when folded.
|
|
205
209
|
const GROUP_TOGGLE_CLASS = '-mx-1 inline-flex items-baseline gap-2 rounded-sm px-1 outline-none hover:underline ' +
|
|
@@ -316,7 +320,7 @@ function useStickyHeadings(containerRef, enabled) {
|
|
|
316
320
|
}, [containerRef, enabled]);
|
|
317
321
|
return { scrollsSideways, headHeight };
|
|
318
322
|
}
|
|
319
|
-
export function DataTable({ columns, data, total, page, pageSize, onPageChange, sorting, onSortingChange, isLoading, error, onRetry, emptyTitle, emptyDescription, emptyAction, toolbar, getRowId, pinFirstColumn, pinLastColumn, enableSortingRemoval, visibleColumns, width = 'full', groupBy, groupSummary, stickyGroupHeadings = false, header: showHeader = true, highlightRow, totals, layouts, layout: layoutProp, onLayoutChange, tableLayout, groupings, grouping: groupingProp, onGroupingChange, opens, detailPanel, onRowClick: onRowClickProp, detailRow, onDetailRowChange, detailLabel = 'Details', }) {
|
|
323
|
+
export function DataTable({ columns, data, total, page, pageSize, onPageChange, sorting, onSortingChange, isLoading, error, onRetry, emptyTitle, emptyDescription, emptyAction, toolbar, getRowId, pinFirstColumn, pinLastColumn, enableSortingRemoval, visibleColumns, width = 'full', groupBy, groupSummary, stickyGroupHeadings = false, stickyTop = '0px', header: showHeader = true, highlightRow, totals, layouts, layout: layoutProp, onLayoutChange, tableLayout, groupings, grouping: groupingProp, onGroupingChange, opens, detailPanel, onRowClick: onRowClickProp, detailRow, onDetailRowChange, detailLabel = 'Details', }) {
|
|
320
324
|
// The switch's own state, for a table that doesn't pass `layout`.
|
|
321
325
|
const [ownLayout, setOwnLayout] = useState('table');
|
|
322
326
|
const requestedLayout = layoutProp ?? ownLayout;
|
|
@@ -593,7 +597,13 @@ export function DataTable({ columns, data, total, page, pageSize, onPageChange,
|
|
|
593
597
|
return;
|
|
594
598
|
event.preventDefault();
|
|
595
599
|
closeDetail();
|
|
596
|
-
}, children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("h2", { className: "type-label text-muted-foreground", children: detailLabel }), _jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Close", onClick: closeDetail, children: _jsx(XIcon, { "aria-hidden": "true" }) })] }), detailPanel(selectedRow.original)] })) : null, children: [cardLayout ? (_jsx(Cards, { layout: cardLayout, runs: runs, rows: rows, folded: folded, onToggleFold: toggleFold, groupSummary: groupSummary, groupIcons: groupIcons, onCardClick: onCardClick })) : (_jsxs(Table, { "data-state": "success", containerRef: containerRef, onKeyDown: rowsOpen ? onListKeyDown : undefined, className: cn(stickyGroups && STICKY_FOCUS_CLASS),
|
|
600
|
+
}, children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("h2", { className: "type-label text-muted-foreground", children: detailLabel }), _jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Close", onClick: closeDetail, children: _jsx(XIcon, { "aria-hidden": "true" }) })] }), detailPanel(selectedRow.original)] })) : null, children: [cardLayout ? (_jsx(Cards, { layout: cardLayout, runs: runs, rows: rows, folded: folded, onToggleFold: toggleFold, groupSummary: groupSummary, groupIcons: groupIcons, onCardClick: onCardClick })) : (_jsxs(Table, { "data-state": "success", containerRef: containerRef, onKeyDown: rowsOpen ? onListKeyDown : undefined, className: cn(stickyGroups && STICKY_FOCUS_CLASS), containerStyle: stickyGroups
|
|
601
|
+
? {
|
|
602
|
+
'--data-table-head-height': `${headHeight}px`,
|
|
603
|
+
'--data-table-sticky-top': stickyTop,
|
|
604
|
+
'--data-table-pin-top': scrollsSideways ? '0px' : stickyTop,
|
|
605
|
+
}
|
|
606
|
+
: undefined,
|
|
597
607
|
// With the sticky bar below as the visible scrollbar, hide the
|
|
598
608
|
// container's own. It stays overflow-x-auto and fully
|
|
599
609
|
// scrollable (wheel, trackpad, drag, and the sync effect); it
|
|
@@ -62,6 +62,18 @@ export type MarkdownProps = {
|
|
|
62
62
|
* may nest to any depth: the package never asks whose page it is.
|
|
63
63
|
*/
|
|
64
64
|
pageLink?: PageLinkResolver;
|
|
65
|
+
/**
|
|
66
|
+
* For a one-line value (a table cell, a card's line, a summary): a
|
|
67
|
+
* `<span>` of one run of words, in the font and colour of wherever it
|
|
68
|
+
* sits, with no block margins, so a row it's in keeps its height. Bold,
|
|
69
|
+
* italic, code and links keep their marks; every other mark is its
|
|
70
|
+
* words. A list, table or other block written in it still reads: a
|
|
71
|
+
* list's items joined with " · ", a table's rows as `Header: value`
|
|
72
|
+
* pairs. A link's click and Enter never reach the row or card it sits
|
|
73
|
+
* in. The headings, folding, tasks, table and page-link props don't
|
|
74
|
+
* apply. Default `false`.
|
|
75
|
+
*/
|
|
76
|
+
inline?: boolean;
|
|
65
77
|
className?: string;
|
|
66
78
|
} & Omit<ComponentProps<'div'>, 'children'>;
|
|
67
|
-
export declare function Markdown({
|
|
79
|
+
export declare function Markdown({ inline, ...props }: MarkdownProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
// Long text written as Markdown, rendered to read: headings, lists, links,
|
|
3
3
|
// tables (GitHub-flavoured), code and quotes, in the design language's
|
|
4
4
|
// type roles and tokens. A record's notes on its view (EntityView) are the
|
|
@@ -62,6 +62,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
62
62
|
// the app reports removed shows "Page removed", with Restore when the app
|
|
63
63
|
// gives one. Every other link is as it was; the text is never changed.
|
|
64
64
|
//
|
|
65
|
+
// With `inline`, it's a one-line value's Markdown (a table cell, a card's
|
|
66
|
+
// line): bold, italic, code and links on one run of words, in the font and
|
|
67
|
+
// colour of wherever it sits, with no block margins, so a row it's in
|
|
68
|
+
// keeps its height. Blocks written in it become their words, joined so
|
|
69
|
+
// they still read (a list's items with " · ", a table's rows as
|
|
70
|
+
// `Header: value` pairs: src/lib/markdown-inline.ts). A link's click and
|
|
71
|
+
// Enter stay its own: they never reach a row or card it sits in.
|
|
72
|
+
//
|
|
65
73
|
// A task item (`- [ ] to do`, `- [x] done`) shows its box as a glyph
|
|
66
74
|
// with its state in words: read-only text has nothing to tick. With
|
|
67
75
|
// `onTasksChange`, each box is a real checkbox, named for its item's
|
|
@@ -77,6 +85,7 @@ import { Checkbox } from '../ui/checkbox.js';
|
|
|
77
85
|
import { useFolds } from '../../hooks/fold-store.js';
|
|
78
86
|
import { CALLOUT_KINDS, remarkCallouts } from '../../lib/markdown-callout.js';
|
|
79
87
|
import { rehypeFold, toggleFold } from '../../lib/markdown-fold.js';
|
|
88
|
+
import { rehypeInline } from '../../lib/markdown-inline.js';
|
|
80
89
|
import { isHighlightColor, remarkHighlights } from '../../lib/markdown-highlight.js';
|
|
81
90
|
import { rehypeTables } from '../../lib/markdown-table.js';
|
|
82
91
|
import { remarkToggleHeadings } from '../../lib/markdown-toggle.js';
|
|
@@ -177,6 +186,29 @@ function MarkdownParagraph(props) {
|
|
|
177
186
|
return _jsx("p", { ...rest, "data-page-line": "", className: "page-line" });
|
|
178
187
|
return _jsx("p", { ...rest });
|
|
179
188
|
}
|
|
189
|
+
// A link in `inline` text: an ordinary link, opening in a new tab, whose
|
|
190
|
+
// click and Enter never reach what the text sits in (a row that opens
|
|
191
|
+
// its record, a card), so following it doesn't also open the row.
|
|
192
|
+
function InlineLink(props) {
|
|
193
|
+
const { href, children, ...rest } = omitNode(props);
|
|
194
|
+
if (!href)
|
|
195
|
+
return _jsx(_Fragment, { children: children });
|
|
196
|
+
return (_jsxs("a", { ...rest, href: href, target: "_blank", rel: "noreferrer", className: PROSE.link, onClick: (event) => event.stopPropagation(), onKeyDown: (event) => {
|
|
197
|
+
if (event.key === 'Enter' || event.key === ' ')
|
|
198
|
+
event.stopPropagation();
|
|
199
|
+
}, children: [children, _jsx(ExternalLinkIcon, { "aria-hidden": "true", className: "ml-0.5 inline size-3 align-baseline" }), _jsx("span", { className: "sr-only", children: " (opens in a new tab)" })] }));
|
|
200
|
+
}
|
|
201
|
+
// `inline`: only what `rehypeInline` keeps, in the text's own font and colour.
|
|
202
|
+
// Code is the mono face alone, no wash: in the cell's own colour a wash
|
|
203
|
+
// would fail contrast (muted text on --muted is 4.34:1), and a row's own
|
|
204
|
+
// fill (the stripe, a hover, a pick) is already behind it. The face has
|
|
205
|
+
// taller metrics than the text's, so it adds no height to the line
|
|
206
|
+
// (`leading-[0]`).
|
|
207
|
+
const INLINE_COMPONENTS = {
|
|
208
|
+
a: InlineLink,
|
|
209
|
+
code: (props) => _jsx("code", { ...omitNode(props), className: "font-mono text-[0.9em] leading-[0]" }),
|
|
210
|
+
};
|
|
211
|
+
const INLINE_REHYPE = [rehypeInline];
|
|
180
212
|
// Folds a section by its heading's id: given only with `foldKey`.
|
|
181
213
|
const FoldContext = createContext(null);
|
|
182
214
|
// A heading by its Markdown level: the element the page's outline gives
|
|
@@ -273,7 +305,17 @@ function componentsFor(top, textTop) {
|
|
|
273
305
|
}
|
|
274
306
|
return components;
|
|
275
307
|
}
|
|
276
|
-
|
|
308
|
+
const BLOCK_ONLY = ['headingLevel', 'headingFrom', 'foldKey', 'foldable', 'onTasksChange', 'tableLook', 'pageLink'];
|
|
309
|
+
export function Markdown({ inline = false, ...props }) {
|
|
310
|
+
if (!inline)
|
|
311
|
+
return _jsx(BlockMarkdown, { ...props });
|
|
312
|
+
const { children, className, ...rest } = props;
|
|
313
|
+
// The block text's own props mean nothing on one line: none reach the span.
|
|
314
|
+
for (const key of BLOCK_ONLY)
|
|
315
|
+
delete rest[key];
|
|
316
|
+
return (_jsx("span", { "data-slot": "markdown", "data-inline": "", ...rest, className: cn('min-w-0 break-words', className), children: _jsx(ReactMarkdown, { remarkPlugins: REMARK_PLUGINS, rehypePlugins: INLINE_REHYPE, components: INLINE_COMPONENTS, children: children }) }));
|
|
317
|
+
}
|
|
318
|
+
function BlockMarkdown({ children, headingLevel = DEFAULT_HEADING_LEVEL, headingFrom = 'hash', foldKey: foldKeyProp, foldable = true, onTasksChange: onTasksChangeProp, tableLook = 'compact', pageLink, className, ...rest }) {
|
|
277
319
|
// On paper (EntityView's Print notes): every heading plain and open,
|
|
278
320
|
// every task box a picture.
|
|
279
321
|
const printing = usePrinting();
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare function Table({ className, containerRef, containerClassName, ...props }: React.ComponentProps<"table"> & {
|
|
2
|
+
declare function Table({ className, containerRef, containerClassName, containerStyle, ...props }: React.ComponentProps<"table"> & {
|
|
3
3
|
containerRef?: React.Ref<HTMLDivElement>;
|
|
4
4
|
containerClassName?: string;
|
|
5
|
+
containerStyle?: React.CSSProperties;
|
|
5
6
|
}): React.JSX.Element;
|
|
6
7
|
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): React.JSX.Element;
|
|
7
8
|
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { cn } from "cn";
|
|
4
|
-
// `containerRef`/`containerClassName` are this repo's patch to the upstream
|
|
4
|
+
// `containerRef`/`containerClassName`/`containerStyle` are this repo's patch to the upstream
|
|
5
5
|
// primitive. Upstream wraps the <table> in a scroll container that nothing
|
|
6
6
|
// outside can reach, so anything keyed to the scroll viewport — a sticky
|
|
7
7
|
// scrollbar, a pinned column, an IntersectionObserver — had to find that
|
|
@@ -11,8 +11,8 @@ import { cn } from "cn";
|
|
|
11
11
|
//
|
|
12
12
|
// A local patch to a shadcn primitive: re-running `shadcn add table` here
|
|
13
13
|
// would overwrite it. Diff against upstream before taking a new version.
|
|
14
|
-
function Table({ className, containerRef, containerClassName, ...props }) {
|
|
15
|
-
return (_jsx("div", { ref: containerRef, "data-slot": "table-container", className: cn("relative w-full overflow-x-auto", containerClassName), children: _jsx("table", { "data-slot": "table", className: cn("w-full caption-bottom text-sm", className), ...props }) }));
|
|
14
|
+
function Table({ className, containerRef, containerClassName, containerStyle, ...props }) {
|
|
15
|
+
return (_jsx("div", { ref: containerRef, "data-slot": "table-container", className: cn("relative w-full overflow-x-auto", containerClassName), style: containerStyle, children: _jsx("table", { "data-slot": "table", className: cn("w-full caption-bottom text-sm", className), ...props }) }));
|
|
16
16
|
}
|
|
17
17
|
function TableHeader({ className, ...props }) {
|
|
18
18
|
return (_jsx("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props }));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type Node = {
|
|
2
|
+
type: string;
|
|
3
|
+
tagName?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
properties?: Record<string, unknown>;
|
|
6
|
+
children?: Node[];
|
|
7
|
+
};
|
|
8
|
+
/** Flattens the whole text to one line of inline content (see above). */
|
|
9
|
+
export declare function rehypeInline(): (tree: Node) => void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
// <Markdown inline>: a one-line value's Markdown (a table cell, a card's
|
|
2
|
+
// line, a summary) as one run of words, so it sits in a row without
|
|
3
|
+
// making it taller. Bold, italic, code and links keep their marks; every
|
|
4
|
+
// other mark is its words. Blocks have nowhere to go on one line, so each
|
|
5
|
+
// becomes its words, in order, joined so they still read:
|
|
6
|
+
//
|
|
7
|
+
// - paragraphs (and lines): a space
|
|
8
|
+
// - headings, quotes, rules and any other block: " · "
|
|
9
|
+
// - a list: its items, " · " between them; numbered with their numbers
|
|
10
|
+
// (`1. a · 2. b`); a task item done starts "✓ ", one to do "☐ "
|
|
11
|
+
// - a table: each row as `Header: value` pairs, ", " between them and
|
|
12
|
+
// " · " between rows (the header row itself isn't repeated); cells
|
|
13
|
+
// with no header, or no words, are left out
|
|
14
|
+
// - a code block: inline code
|
|
15
|
+
// - an image: its alt text, if any
|
|
16
|
+
// - a callout: its kind first ("Note: …")
|
|
17
|
+
//
|
|
18
|
+
// The text itself is never changed: this is how it's drawn on one line.
|
|
19
|
+
// A rehype plugin, on the HTML tree after remark-gfm and the package's
|
|
20
|
+
// own remark plugins, so what it flattens is what <Markdown> would draw.
|
|
21
|
+
const KEEP = new Set(['strong', 'em', 'code', 'a']);
|
|
22
|
+
const SEPARATOR = ' · ';
|
|
23
|
+
const text = (value) => ({ type: 'text', value });
|
|
24
|
+
// A node's words alone, marks dropped (a table cell's header, an alt).
|
|
25
|
+
function plain(node) {
|
|
26
|
+
if (node.type === 'text' || node.type === 'raw')
|
|
27
|
+
return node.value ?? '';
|
|
28
|
+
if (node.tagName === 'img')
|
|
29
|
+
return typeof node.properties?.alt === 'string' ? node.properties.alt : '';
|
|
30
|
+
return (node.children ?? []).map(plain).join('');
|
|
31
|
+
}
|
|
32
|
+
const hasWords = (nodes) => nodes.some((node) => plain(node).trim() !== '');
|
|
33
|
+
// Parts joined with a separator, leaving out the empty ones.
|
|
34
|
+
function join(parts, separator) {
|
|
35
|
+
const out = [];
|
|
36
|
+
for (const part of parts.filter(hasWords)) {
|
|
37
|
+
if (out.length > 0)
|
|
38
|
+
out.push(text(separator));
|
|
39
|
+
out.push(...part);
|
|
40
|
+
}
|
|
41
|
+
return out;
|
|
42
|
+
}
|
|
43
|
+
const capitalise = (word) => word.charAt(0).toUpperCase() + word.slice(1);
|
|
44
|
+
function rows(table) {
|
|
45
|
+
const out = [];
|
|
46
|
+
const walk = (node) => {
|
|
47
|
+
for (const child of node.children ?? []) {
|
|
48
|
+
if (child.tagName === 'tr')
|
|
49
|
+
out.push((child.children ?? []).filter((cell) => cell.tagName === 'td' || cell.tagName === 'th'));
|
|
50
|
+
else
|
|
51
|
+
walk(child);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
walk(table);
|
|
55
|
+
return out;
|
|
56
|
+
}
|
|
57
|
+
function flattenTable(table) {
|
|
58
|
+
const head = table.children?.find((child) => child.tagName === 'thead');
|
|
59
|
+
const all = rows(table);
|
|
60
|
+
const headers = head ? rows(head)[0]?.map((cell) => plain(cell).trim()) ?? [] : [];
|
|
61
|
+
const body = head ? all.slice(1) : all;
|
|
62
|
+
return join(body.map((cells) => join(cells.map((cell, index) => {
|
|
63
|
+
const words = inline(cell.children ?? []);
|
|
64
|
+
if (!hasWords(words))
|
|
65
|
+
return [];
|
|
66
|
+
return headers[index] ? [text(`${headers[index]}: `), ...words] : words;
|
|
67
|
+
}), ', ')), SEPARATOR);
|
|
68
|
+
}
|
|
69
|
+
function flattenList(list) {
|
|
70
|
+
const start = Number(list.properties?.start ?? 1) || 1;
|
|
71
|
+
const items = (list.children ?? []).filter((child) => child.tagName === 'li');
|
|
72
|
+
return join(items.map((item, index) => {
|
|
73
|
+
const box = findBox(item);
|
|
74
|
+
const lead = box ? (box.properties?.checked ? '✓ ' : '☐ ') : list.tagName === 'ol' ? `${start + index}. ` : '';
|
|
75
|
+
const words = blocks(item.children ?? []);
|
|
76
|
+
return hasWords(words) ? [text(lead), ...words] : [];
|
|
77
|
+
}), SEPARATOR);
|
|
78
|
+
}
|
|
79
|
+
// A task item's box: GFM puts it first in the item, or in its first paragraph.
|
|
80
|
+
function findBox(item) {
|
|
81
|
+
const first = item.children?.find((child) => child.type === 'element');
|
|
82
|
+
if (first?.tagName === 'input')
|
|
83
|
+
return first;
|
|
84
|
+
if (first?.tagName === 'p')
|
|
85
|
+
return first.children?.find((child) => child.tagName === 'input');
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
// Inline content: the four kept marks stay (their own content flattened),
|
|
89
|
+
// anything else is its words.
|
|
90
|
+
function inline(nodes) {
|
|
91
|
+
const out = [];
|
|
92
|
+
for (const node of nodes) {
|
|
93
|
+
// Raw HTML stays its characters, as <Markdown> shows it everywhere.
|
|
94
|
+
if (node.type === 'text' || node.type === 'raw')
|
|
95
|
+
out.push(text((node.value ?? '').replace(/\s*\n\s*/g, ' ')));
|
|
96
|
+
else if (node.type !== 'element')
|
|
97
|
+
continue;
|
|
98
|
+
else if (node.tagName === 'br')
|
|
99
|
+
out.push(text(' '));
|
|
100
|
+
else if (node.tagName === 'input')
|
|
101
|
+
continue;
|
|
102
|
+
else if (node.tagName === 'img') {
|
|
103
|
+
const alt = plain(node);
|
|
104
|
+
if (alt)
|
|
105
|
+
out.push(text(alt));
|
|
106
|
+
}
|
|
107
|
+
else if (KEEP.has(node.tagName ?? ''))
|
|
108
|
+
out.push({ ...node, children: node.tagName === 'code' ? [text(plain(node))] : inline(node.children ?? []) });
|
|
109
|
+
else if (isBlock(node))
|
|
110
|
+
out.push(...blocks([node]));
|
|
111
|
+
else
|
|
112
|
+
out.push(...inline(node.children ?? []));
|
|
113
|
+
}
|
|
114
|
+
return out;
|
|
115
|
+
}
|
|
116
|
+
const BLOCKS = new Set(['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ul', 'ol', 'li', 'table', 'blockquote', 'pre', 'hr', 'div', 'section']);
|
|
117
|
+
const isBlock = (node) => node.type === 'element' && BLOCKS.has(node.tagName ?? '');
|
|
118
|
+
// One block's words.
|
|
119
|
+
function block(node) {
|
|
120
|
+
switch (node.tagName) {
|
|
121
|
+
case 'ul':
|
|
122
|
+
case 'ol':
|
|
123
|
+
return flattenList(node);
|
|
124
|
+
case 'table':
|
|
125
|
+
return flattenTable(node);
|
|
126
|
+
case 'hr':
|
|
127
|
+
return [];
|
|
128
|
+
case 'pre': {
|
|
129
|
+
const code = node.children?.find((child) => child.tagName === 'code');
|
|
130
|
+
const words = plain(code ?? node).trim().replace(/\s*\n\s*/g, ' ');
|
|
131
|
+
return words ? [{ type: 'element', tagName: 'code', properties: {}, children: [text(words)] }] : [];
|
|
132
|
+
}
|
|
133
|
+
case 'div': {
|
|
134
|
+
const kind = node.properties?.dataCallout;
|
|
135
|
+
const words = blocks(node.children ?? []);
|
|
136
|
+
return typeof kind === 'string' && hasWords(words) ? [text(`${capitalise(kind)}: `), ...words] : words;
|
|
137
|
+
}
|
|
138
|
+
case 'p':
|
|
139
|
+
case 'h1':
|
|
140
|
+
case 'h2':
|
|
141
|
+
case 'h3':
|
|
142
|
+
case 'h4':
|
|
143
|
+
case 'h5':
|
|
144
|
+
case 'h6':
|
|
145
|
+
return inline(node.children ?? []);
|
|
146
|
+
default:
|
|
147
|
+
return blocks(node.children ?? []);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// A run of siblings, some blocks and some inline: inline stretches stay
|
|
151
|
+
// as they are, blocks join with a space after a paragraph into another,
|
|
152
|
+
// else " · ".
|
|
153
|
+
function blocks(nodes) {
|
|
154
|
+
const out = [];
|
|
155
|
+
let previous = null;
|
|
156
|
+
let run = [];
|
|
157
|
+
const flush = () => {
|
|
158
|
+
if (!hasWords(run))
|
|
159
|
+
return (run = []);
|
|
160
|
+
if (previous !== null)
|
|
161
|
+
out.push(text(SEPARATOR));
|
|
162
|
+
out.push(...trim(run));
|
|
163
|
+
previous = 'inline';
|
|
164
|
+
run = [];
|
|
165
|
+
};
|
|
166
|
+
for (const node of nodes) {
|
|
167
|
+
if (!isBlock(node)) {
|
|
168
|
+
if (node.type === 'text' && !(node.value ?? '').trim() && run.length === 0)
|
|
169
|
+
continue;
|
|
170
|
+
run.push(...inline([node]));
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
flush();
|
|
174
|
+
const words = block(node);
|
|
175
|
+
// A rule has no words, but the blocks either side of it are apart.
|
|
176
|
+
if (!hasWords(words)) {
|
|
177
|
+
if (previous !== null)
|
|
178
|
+
previous = node.tagName ?? 'block';
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
if (previous !== null)
|
|
182
|
+
out.push(text(previous === 'p' && node.tagName === 'p' ? ' ' : SEPARATOR));
|
|
183
|
+
out.push(...words);
|
|
184
|
+
previous = node.tagName ?? 'block';
|
|
185
|
+
}
|
|
186
|
+
flush();
|
|
187
|
+
return trim(out);
|
|
188
|
+
}
|
|
189
|
+
// No space at either end of the line.
|
|
190
|
+
function trim(nodes) {
|
|
191
|
+
const out = [...nodes];
|
|
192
|
+
if (out[0]?.type === 'text')
|
|
193
|
+
out[0] = text((out[0].value ?? '').trimStart());
|
|
194
|
+
const last = out.length - 1;
|
|
195
|
+
if (out[last]?.type === 'text')
|
|
196
|
+
out[last] = text((out[last].value ?? '').trimEnd());
|
|
197
|
+
return out;
|
|
198
|
+
}
|
|
199
|
+
/** Flattens the whole text to one line of inline content (see above). */
|
|
200
|
+
export function rehypeInline() {
|
|
201
|
+
return (tree) => {
|
|
202
|
+
tree.children = blocks(tree.children ?? []);
|
|
203
|
+
};
|
|
204
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tristan2828/ui-foundation",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.77.0",
|
|
4
4
|
"description": "Shared UI foundation for contract-first, database-backed React apps: shadcn primitives, DataTable/EntityForm composites, auth, the gateway error seam, design tokens, lint rules and the AI playbook.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
package/styles/index.css
CHANGED
|
@@ -89,6 +89,126 @@
|
|
|
89
89
|
--color-heat-4-foreground: var(--heat-4-foreground);
|
|
90
90
|
--color-heat-5: var(--heat-5);
|
|
91
91
|
--color-heat-5-foreground: var(--heat-5-foreground);
|
|
92
|
+
--color-category-1-depth-1: var(--category-1-depth-1);
|
|
93
|
+
--color-category-1-depth-1-foreground: var(--category-1-depth-1-foreground);
|
|
94
|
+
--color-category-1-depth-2: var(--category-1-depth-2);
|
|
95
|
+
--color-category-1-depth-2-foreground: var(--category-1-depth-2-foreground);
|
|
96
|
+
--color-category-1-depth-3: var(--category-1-depth-3);
|
|
97
|
+
--color-category-1-depth-3-foreground: var(--category-1-depth-3-foreground);
|
|
98
|
+
--color-category-1-depth-4: var(--category-1-depth-4);
|
|
99
|
+
--color-category-1-depth-4-foreground: var(--category-1-depth-4-foreground);
|
|
100
|
+
--color-category-1-depth-5: var(--category-1-depth-5);
|
|
101
|
+
--color-category-1-depth-5-foreground: var(--category-1-depth-5-foreground);
|
|
102
|
+
--color-category-2-depth-1: var(--category-2-depth-1);
|
|
103
|
+
--color-category-2-depth-1-foreground: var(--category-2-depth-1-foreground);
|
|
104
|
+
--color-category-2-depth-2: var(--category-2-depth-2);
|
|
105
|
+
--color-category-2-depth-2-foreground: var(--category-2-depth-2-foreground);
|
|
106
|
+
--color-category-2-depth-3: var(--category-2-depth-3);
|
|
107
|
+
--color-category-2-depth-3-foreground: var(--category-2-depth-3-foreground);
|
|
108
|
+
--color-category-2-depth-4: var(--category-2-depth-4);
|
|
109
|
+
--color-category-2-depth-4-foreground: var(--category-2-depth-4-foreground);
|
|
110
|
+
--color-category-2-depth-5: var(--category-2-depth-5);
|
|
111
|
+
--color-category-2-depth-5-foreground: var(--category-2-depth-5-foreground);
|
|
112
|
+
--color-category-3-depth-1: var(--category-3-depth-1);
|
|
113
|
+
--color-category-3-depth-1-foreground: var(--category-3-depth-1-foreground);
|
|
114
|
+
--color-category-3-depth-2: var(--category-3-depth-2);
|
|
115
|
+
--color-category-3-depth-2-foreground: var(--category-3-depth-2-foreground);
|
|
116
|
+
--color-category-3-depth-3: var(--category-3-depth-3);
|
|
117
|
+
--color-category-3-depth-3-foreground: var(--category-3-depth-3-foreground);
|
|
118
|
+
--color-category-3-depth-4: var(--category-3-depth-4);
|
|
119
|
+
--color-category-3-depth-4-foreground: var(--category-3-depth-4-foreground);
|
|
120
|
+
--color-category-3-depth-5: var(--category-3-depth-5);
|
|
121
|
+
--color-category-3-depth-5-foreground: var(--category-3-depth-5-foreground);
|
|
122
|
+
--color-category-4-depth-1: var(--category-4-depth-1);
|
|
123
|
+
--color-category-4-depth-1-foreground: var(--category-4-depth-1-foreground);
|
|
124
|
+
--color-category-4-depth-2: var(--category-4-depth-2);
|
|
125
|
+
--color-category-4-depth-2-foreground: var(--category-4-depth-2-foreground);
|
|
126
|
+
--color-category-4-depth-3: var(--category-4-depth-3);
|
|
127
|
+
--color-category-4-depth-3-foreground: var(--category-4-depth-3-foreground);
|
|
128
|
+
--color-category-4-depth-4: var(--category-4-depth-4);
|
|
129
|
+
--color-category-4-depth-4-foreground: var(--category-4-depth-4-foreground);
|
|
130
|
+
--color-category-4-depth-5: var(--category-4-depth-5);
|
|
131
|
+
--color-category-4-depth-5-foreground: var(--category-4-depth-5-foreground);
|
|
132
|
+
--color-category-5-depth-1: var(--category-5-depth-1);
|
|
133
|
+
--color-category-5-depth-1-foreground: var(--category-5-depth-1-foreground);
|
|
134
|
+
--color-category-5-depth-2: var(--category-5-depth-2);
|
|
135
|
+
--color-category-5-depth-2-foreground: var(--category-5-depth-2-foreground);
|
|
136
|
+
--color-category-5-depth-3: var(--category-5-depth-3);
|
|
137
|
+
--color-category-5-depth-3-foreground: var(--category-5-depth-3-foreground);
|
|
138
|
+
--color-category-5-depth-4: var(--category-5-depth-4);
|
|
139
|
+
--color-category-5-depth-4-foreground: var(--category-5-depth-4-foreground);
|
|
140
|
+
--color-category-5-depth-5: var(--category-5-depth-5);
|
|
141
|
+
--color-category-5-depth-5-foreground: var(--category-5-depth-5-foreground);
|
|
142
|
+
--color-category-6-depth-1: var(--category-6-depth-1);
|
|
143
|
+
--color-category-6-depth-1-foreground: var(--category-6-depth-1-foreground);
|
|
144
|
+
--color-category-6-depth-2: var(--category-6-depth-2);
|
|
145
|
+
--color-category-6-depth-2-foreground: var(--category-6-depth-2-foreground);
|
|
146
|
+
--color-category-6-depth-3: var(--category-6-depth-3);
|
|
147
|
+
--color-category-6-depth-3-foreground: var(--category-6-depth-3-foreground);
|
|
148
|
+
--color-category-6-depth-4: var(--category-6-depth-4);
|
|
149
|
+
--color-category-6-depth-4-foreground: var(--category-6-depth-4-foreground);
|
|
150
|
+
--color-category-6-depth-5: var(--category-6-depth-5);
|
|
151
|
+
--color-category-6-depth-5-foreground: var(--category-6-depth-5-foreground);
|
|
152
|
+
--color-category-7-depth-1: var(--category-7-depth-1);
|
|
153
|
+
--color-category-7-depth-1-foreground: var(--category-7-depth-1-foreground);
|
|
154
|
+
--color-category-7-depth-2: var(--category-7-depth-2);
|
|
155
|
+
--color-category-7-depth-2-foreground: var(--category-7-depth-2-foreground);
|
|
156
|
+
--color-category-7-depth-3: var(--category-7-depth-3);
|
|
157
|
+
--color-category-7-depth-3-foreground: var(--category-7-depth-3-foreground);
|
|
158
|
+
--color-category-7-depth-4: var(--category-7-depth-4);
|
|
159
|
+
--color-category-7-depth-4-foreground: var(--category-7-depth-4-foreground);
|
|
160
|
+
--color-category-7-depth-5: var(--category-7-depth-5);
|
|
161
|
+
--color-category-7-depth-5-foreground: var(--category-7-depth-5-foreground);
|
|
162
|
+
--color-category-8-depth-1: var(--category-8-depth-1);
|
|
163
|
+
--color-category-8-depth-1-foreground: var(--category-8-depth-1-foreground);
|
|
164
|
+
--color-category-8-depth-2: var(--category-8-depth-2);
|
|
165
|
+
--color-category-8-depth-2-foreground: var(--category-8-depth-2-foreground);
|
|
166
|
+
--color-category-8-depth-3: var(--category-8-depth-3);
|
|
167
|
+
--color-category-8-depth-3-foreground: var(--category-8-depth-3-foreground);
|
|
168
|
+
--color-category-8-depth-4: var(--category-8-depth-4);
|
|
169
|
+
--color-category-8-depth-4-foreground: var(--category-8-depth-4-foreground);
|
|
170
|
+
--color-category-8-depth-5: var(--category-8-depth-5);
|
|
171
|
+
--color-category-8-depth-5-foreground: var(--category-8-depth-5-foreground);
|
|
172
|
+
--color-category-9-depth-1: var(--category-9-depth-1);
|
|
173
|
+
--color-category-9-depth-1-foreground: var(--category-9-depth-1-foreground);
|
|
174
|
+
--color-category-9-depth-2: var(--category-9-depth-2);
|
|
175
|
+
--color-category-9-depth-2-foreground: var(--category-9-depth-2-foreground);
|
|
176
|
+
--color-category-9-depth-3: var(--category-9-depth-3);
|
|
177
|
+
--color-category-9-depth-3-foreground: var(--category-9-depth-3-foreground);
|
|
178
|
+
--color-category-9-depth-4: var(--category-9-depth-4);
|
|
179
|
+
--color-category-9-depth-4-foreground: var(--category-9-depth-4-foreground);
|
|
180
|
+
--color-category-9-depth-5: var(--category-9-depth-5);
|
|
181
|
+
--color-category-9-depth-5-foreground: var(--category-9-depth-5-foreground);
|
|
182
|
+
--color-category-10-depth-1: var(--category-10-depth-1);
|
|
183
|
+
--color-category-10-depth-1-foreground: var(--category-10-depth-1-foreground);
|
|
184
|
+
--color-category-10-depth-2: var(--category-10-depth-2);
|
|
185
|
+
--color-category-10-depth-2-foreground: var(--category-10-depth-2-foreground);
|
|
186
|
+
--color-category-10-depth-3: var(--category-10-depth-3);
|
|
187
|
+
--color-category-10-depth-3-foreground: var(--category-10-depth-3-foreground);
|
|
188
|
+
--color-category-10-depth-4: var(--category-10-depth-4);
|
|
189
|
+
--color-category-10-depth-4-foreground: var(--category-10-depth-4-foreground);
|
|
190
|
+
--color-category-10-depth-5: var(--category-10-depth-5);
|
|
191
|
+
--color-category-10-depth-5-foreground: var(--category-10-depth-5-foreground);
|
|
192
|
+
--color-category-11-depth-1: var(--category-11-depth-1);
|
|
193
|
+
--color-category-11-depth-1-foreground: var(--category-11-depth-1-foreground);
|
|
194
|
+
--color-category-11-depth-2: var(--category-11-depth-2);
|
|
195
|
+
--color-category-11-depth-2-foreground: var(--category-11-depth-2-foreground);
|
|
196
|
+
--color-category-11-depth-3: var(--category-11-depth-3);
|
|
197
|
+
--color-category-11-depth-3-foreground: var(--category-11-depth-3-foreground);
|
|
198
|
+
--color-category-11-depth-4: var(--category-11-depth-4);
|
|
199
|
+
--color-category-11-depth-4-foreground: var(--category-11-depth-4-foreground);
|
|
200
|
+
--color-category-11-depth-5: var(--category-11-depth-5);
|
|
201
|
+
--color-category-11-depth-5-foreground: var(--category-11-depth-5-foreground);
|
|
202
|
+
--color-category-12-depth-1: var(--category-12-depth-1);
|
|
203
|
+
--color-category-12-depth-1-foreground: var(--category-12-depth-1-foreground);
|
|
204
|
+
--color-category-12-depth-2: var(--category-12-depth-2);
|
|
205
|
+
--color-category-12-depth-2-foreground: var(--category-12-depth-2-foreground);
|
|
206
|
+
--color-category-12-depth-3: var(--category-12-depth-3);
|
|
207
|
+
--color-category-12-depth-3-foreground: var(--category-12-depth-3-foreground);
|
|
208
|
+
--color-category-12-depth-4: var(--category-12-depth-4);
|
|
209
|
+
--color-category-12-depth-4-foreground: var(--category-12-depth-4-foreground);
|
|
210
|
+
--color-category-12-depth-5: var(--category-12-depth-5);
|
|
211
|
+
--color-category-12-depth-5-foreground: var(--category-12-depth-5-foreground);
|
|
92
212
|
--color-accent-foreground: var(--accent-foreground);
|
|
93
213
|
--color-accent: var(--accent);
|
|
94
214
|
--color-muted-foreground: var(--muted-foreground);
|
package/styles/theme.css
CHANGED
|
@@ -142,6 +142,153 @@
|
|
|
142
142
|
--heat-4-400: oklch(0.661 0.13 47);
|
|
143
143
|
--heat-5-700: oklch(0.388 0.15 20); /* red */
|
|
144
144
|
--heat-5-400: oklch(0.615 0.16 20); /* a purer red goes nearly black under protanopia */
|
|
145
|
+
/*
|
|
146
|
+
* Depth ramps (design-language.md "Depth ramps"). Five steps for each
|
|
147
|
+
* categorical slot, shallow to deep, for depth within one category: a
|
|
148
|
+
* category's subcategories in a chart, nesting levels of one kind, a
|
|
149
|
+
* stacked bar of one category's parts. Opaque fills like the heat scale,
|
|
150
|
+
* each with its own --category-N-depth-M-foreground for text on it.
|
|
151
|
+
* Lightness falls at every step in both themes, so the order survives in
|
|
152
|
+
* greyscale; hue stays within about 20 degrees of the slot's, with chroma
|
|
153
|
+
* and hue bent a little to push neighbours apart (the developer's pick B,
|
|
154
|
+
* 2026-11-09). Every palette takes dark's.
|
|
155
|
+
*
|
|
156
|
+
* Why the gaps are smaller than the heat scale's: every step clears 3:1
|
|
157
|
+
* on the card, which leaves light a lightness band of about oklch 0.18 to
|
|
158
|
+
* 0.65 and dark 0.58 to 1, and five steps of one hue have to fit in it.
|
|
159
|
+
*
|
|
160
|
+
* Measured from these values (tests/depth-ramps.test.ts holds neighbours
|
|
161
|
+
* to ΔE 17 in light and 13.5 in dark, 10 under simulated deuteranopia and
|
|
162
|
+
* protanopia, and every step to 3:1 on every card):
|
|
163
|
+
* neighbours light ΔE 17.7 or more; dark 13.9 or more (blue; navy
|
|
164
|
+
* 15.3, every other slot 17.4 or more); 10.3 or more
|
|
165
|
+
* with deuteranopia or protanopia in both
|
|
166
|
+
* on its card 3.03 at the least (light, on --muted); 3.17 in dark
|
|
167
|
+
* (on Graphite's raised surface)
|
|
168
|
+
* text on the fill 4.55 at the least: in light, black on step 1 (and
|
|
169
|
+
* step 2 of blue, gold and lime), white on the rest;
|
|
170
|
+
* black on every step in dark
|
|
171
|
+
*/
|
|
172
|
+
--category-1-depth-1-700: oklch(0.636 0.107 221); /* blue */
|
|
173
|
+
--category-1-depth-1-400: oklch(0.941 0.03 228);
|
|
174
|
+
--category-1-depth-2-700: oklch(0.616 0.199 255);
|
|
175
|
+
--category-1-depth-2-400: oklch(0.836 0.118 219);
|
|
176
|
+
--category-1-depth-3-700: oklch(0.495 0.22 264);
|
|
177
|
+
--category-1-depth-3-400: oklch(0.728 0.16 238);
|
|
178
|
+
--category-1-depth-4-700: oklch(0.311 0.131 268);
|
|
179
|
+
--category-1-depth-4-400: oklch(0.659 0.071 253);
|
|
180
|
+
--category-1-depth-5-700: oklch(0.177 0.025 268);
|
|
181
|
+
--category-1-depth-5-400: oklch(0.577 0.025 273);
|
|
182
|
+
--category-2-depth-1-700: oklch(0.644 0.025 34); /* orange */
|
|
183
|
+
--category-2-depth-1-400: oklch(0.967 0.025 73);
|
|
184
|
+
--category-2-depth-2-700: oklch(0.556 0.126 28);
|
|
185
|
+
--category-2-depth-2-400: oklch(0.859 0.122 76);
|
|
186
|
+
--category-2-depth-3-700: oklch(0.536 0.122 63);
|
|
187
|
+
--category-2-depth-3-400: oklch(0.726 0.184 53);
|
|
188
|
+
--category-2-depth-4-700: oklch(0.433 0.031 69);
|
|
189
|
+
--category-2-depth-4-400: oklch(0.706 0.105 31);
|
|
190
|
+
--category-2-depth-5-700: oklch(0.181 0.041 63);
|
|
191
|
+
--category-2-depth-5-400: oklch(0.579 0.025 36);
|
|
192
|
+
--category-3-depth-1-700: oklch(0.641 0.025 168); /* green */
|
|
193
|
+
--category-3-depth-1-400: oklch(0.981 0.025 173);
|
|
194
|
+
--category-3-depth-2-700: oklch(0.513 0.091 176);
|
|
195
|
+
--category-3-depth-2-400: oklch(0.854 0.14 165);
|
|
196
|
+
--category-3-depth-3-700: oklch(0.493 0.162 141);
|
|
197
|
+
--category-3-depth-3-400: oklch(0.834 0.219 132);
|
|
198
|
+
--category-3-depth-4-700: oklch(0.302 0.101 143);
|
|
199
|
+
--category-3-depth-4-400: oklch(0.632 0.138 131);
|
|
200
|
+
--category-3-depth-5-700: oklch(0.176 0.025 137);
|
|
201
|
+
--category-3-depth-5-400: oklch(0.574 0.025 136);
|
|
202
|
+
--category-4-depth-1-700: oklch(0.646 0.025 292); /* purple */
|
|
203
|
+
--category-4-depth-1-400: oklch(0.937 0.025 296);
|
|
204
|
+
--category-4-depth-2-700: oklch(0.573 0.123 284);
|
|
205
|
+
--category-4-depth-2-400: oklch(0.813 0.102 297);
|
|
206
|
+
--category-4-depth-3-700: oklch(0.461 0.219 299);
|
|
207
|
+
--category-4-depth-3-400: oklch(0.665 0.19 289);
|
|
208
|
+
--category-4-depth-4-700: oklch(0.263 0.115 306);
|
|
209
|
+
--category-4-depth-4-400: oklch(0.622 0.132 329);
|
|
210
|
+
--category-4-depth-5-700: oklch(0.176 0.025 324);
|
|
211
|
+
--category-4-depth-5-400: oklch(0.58 0.025 329);
|
|
212
|
+
--category-5-depth-1-700: oklch(0.647 0.026 27); /* pink */
|
|
213
|
+
--category-5-depth-1-400: oklch(0.956 0.025 344);
|
|
214
|
+
--category-5-depth-2-700: oklch(0.575 0.141 21);
|
|
215
|
+
--category-5-depth-2-400: oklch(0.826 0.114 350);
|
|
216
|
+
--category-5-depth-3-700: oklch(0.386 0.157 28);
|
|
217
|
+
--category-5-depth-3-400: oklch(0.664 0.208 343);
|
|
218
|
+
--category-5-depth-4-700: oklch(0.36 0.132 348);
|
|
219
|
+
--category-5-depth-4-400: oklch(0.637 0.253 13);
|
|
220
|
+
--category-5-depth-5-700: oklch(0.182 0.031 349);
|
|
221
|
+
--category-5-depth-5-400: oklch(0.606 0.243 30);
|
|
222
|
+
--category-6-depth-1-700: oklch(0.645 0.038 78); /* brown */
|
|
223
|
+
--category-6-depth-1-400: oklch(0.966 0.025 74);
|
|
224
|
+
--category-6-depth-2-700: oklch(0.556 0.119 72);
|
|
225
|
+
--category-6-depth-2-400: oklch(0.842 0.118 80);
|
|
226
|
+
--category-6-depth-3-700: oklch(0.535 0.105 35);
|
|
227
|
+
--category-6-depth-3-400: oklch(0.735 0.184 54);
|
|
228
|
+
--category-6-depth-4-700: oklch(0.321 0.109 36);
|
|
229
|
+
--category-6-depth-4-400: oklch(0.714 0.1 32);
|
|
230
|
+
--category-6-depth-5-700: oklch(0.178 0.026 36);
|
|
231
|
+
--category-6-depth-5-400: oklch(0.579 0.025 37);
|
|
232
|
+
--category-7-depth-1-700: oklch(0.641 0.025 206); /* teal */
|
|
233
|
+
--category-7-depth-1-400: oklch(0.979 0.027 163);
|
|
234
|
+
--category-7-depth-2-700: oklch(0.527 0.089 200);
|
|
235
|
+
--category-7-depth-2-400: oklch(0.875 0.131 162);
|
|
236
|
+
--category-7-depth-3-700: oklch(0.507 0.111 160);
|
|
237
|
+
--category-7-depth-3-400: oklch(0.849 0.143 201);
|
|
238
|
+
--category-7-depth-4-700: oklch(0.342 0.066 167);
|
|
239
|
+
--category-7-depth-4-400: oklch(0.65 0.111 194);
|
|
240
|
+
--category-7-depth-5-700: oklch(0.177 0.026 162);
|
|
241
|
+
--category-7-depth-5-400: oklch(0.574 0.025 202);
|
|
242
|
+
--category-8-depth-1-700: oklch(0.647 0.025 5); /* red */
|
|
243
|
+
--category-8-depth-1-400: oklch(0.951 0.026 50);
|
|
244
|
+
--category-8-depth-2-700: oklch(0.571 0.136 13);
|
|
245
|
+
--category-8-depth-2-400: oklch(0.812 0.108 42);
|
|
246
|
+
--category-8-depth-3-700: oklch(0.363 0.144 9);
|
|
247
|
+
--category-8-depth-3-400: oklch(0.662 0.183 47);
|
|
248
|
+
--category-8-depth-4-700: oklch(0.342 0.094 47);
|
|
249
|
+
--category-8-depth-4-400: oklch(0.622 0.251 25);
|
|
250
|
+
--category-8-depth-5-700: oklch(0.179 0.027 48);
|
|
251
|
+
--category-8-depth-5-400: oklch(0.598 0.164 4);
|
|
252
|
+
--category-9-depth-1-700: oklch(0.642 0.037 108); /* gold */
|
|
253
|
+
--category-9-depth-1-400: oklch(0.994 0.025 108);
|
|
254
|
+
--category-9-depth-2-700: oklch(0.589 0.122 99);
|
|
255
|
+
--category-9-depth-2-400: oklch(0.866 0.122 108);
|
|
256
|
+
--category-9-depth-3-700: oklch(0.538 0.071 63);
|
|
257
|
+
--category-9-depth-3-400: oklch(0.823 0.17 80);
|
|
258
|
+
--category-9-depth-4-700: oklch(0.343 0.074 68);
|
|
259
|
+
--category-9-depth-4-400: oklch(0.631 0.121 72);
|
|
260
|
+
--category-9-depth-5-700: oklch(0.181 0.032 62);
|
|
261
|
+
--category-9-depth-5-400: oklch(0.578 0.025 68);
|
|
262
|
+
--category-10-depth-1-700: oklch(0.646 0.027 303); /* navy */
|
|
263
|
+
--category-10-depth-1-400: oklch(0.944 0.026 267);
|
|
264
|
+
--category-10-depth-2-700: oklch(0.575 0.126 291);
|
|
265
|
+
--category-10-depth-2-400: oklch(0.812 0.093 266);
|
|
266
|
+
--category-10-depth-3-700: oklch(0.441 0.219 294);
|
|
267
|
+
--category-10-depth-3-400: oklch(0.668 0.176 274);
|
|
268
|
+
--category-10-depth-4-700: oklch(0.357 0.104 257);
|
|
269
|
+
--category-10-depth-4-400: oklch(0.599 0.108 301);
|
|
270
|
+
--category-10-depth-5-700: oklch(0.178 0.025 265);
|
|
271
|
+
--category-10-depth-5-400: oklch(0.579 0.025 302);
|
|
272
|
+
--category-11-depth-1-700: oklch(0.643 0.035 104); /* lime */
|
|
273
|
+
--category-11-depth-1-400: oklch(0.986 0.026 136);
|
|
274
|
+
--category-11-depth-2-700: oklch(0.576 0.119 98);
|
|
275
|
+
--category-11-depth-2-400: oklch(0.842 0.132 143);
|
|
276
|
+
--category-11-depth-3-700: oklch(0.55 0.093 137);
|
|
277
|
+
--category-11-depth-3-400: oklch(0.803 0.179 113);
|
|
278
|
+
--category-11-depth-4-700: oklch(0.413 0.033 130);
|
|
279
|
+
--category-11-depth-4-400: oklch(0.627 0.126 96);
|
|
280
|
+
--category-11-depth-5-700: oklch(0.179 0.025 141);
|
|
281
|
+
--category-11-depth-5-400: oklch(0.579 0.027 102);
|
|
282
|
+
--category-12-depth-1-700: oklch(0.646 0.025 353); /* magenta */
|
|
283
|
+
--category-12-depth-1-400: oklch(0.968 0.025 321);
|
|
284
|
+
--category-12-depth-2-700: oklch(0.566 0.139 0);
|
|
285
|
+
--category-12-depth-2-400: oklch(0.865 0.121 325);
|
|
286
|
+
--category-12-depth-3-700: oklch(0.531 0.219 317);
|
|
287
|
+
--category-12-depth-3-400: oklch(0.702 0.218 317);
|
|
288
|
+
--category-12-depth-4-700: oklch(0.319 0.129 325);
|
|
289
|
+
--category-12-depth-4-400: oklch(0.681 0.116 354);
|
|
290
|
+
--category-12-depth-5-700: oklch(0.177 0.025 314);
|
|
291
|
+
--category-12-depth-5-400: oklch(0.58 0.026 0);
|
|
145
292
|
--blue-500: oklch(0.488 0.243 264.376);
|
|
146
293
|
|
|
147
294
|
/*
|
|
@@ -392,6 +539,127 @@
|
|
|
392
539
|
--heat-4-foreground: var(--white);
|
|
393
540
|
--heat-5: var(--heat-5-700);
|
|
394
541
|
--heat-5-foreground: var(--white);
|
|
542
|
+
/* Depth ramps: opaque fills, each with its own text colour. */
|
|
543
|
+
--category-1-depth-1: var(--category-1-depth-1-700);
|
|
544
|
+
--category-1-depth-1-foreground: var(--black);
|
|
545
|
+
--category-1-depth-2: var(--category-1-depth-2-700);
|
|
546
|
+
--category-1-depth-2-foreground: var(--black);
|
|
547
|
+
--category-1-depth-3: var(--category-1-depth-3-700);
|
|
548
|
+
--category-1-depth-3-foreground: var(--white);
|
|
549
|
+
--category-1-depth-4: var(--category-1-depth-4-700);
|
|
550
|
+
--category-1-depth-4-foreground: var(--white);
|
|
551
|
+
--category-1-depth-5: var(--category-1-depth-5-700);
|
|
552
|
+
--category-1-depth-5-foreground: var(--white);
|
|
553
|
+
--category-2-depth-1: var(--category-2-depth-1-700);
|
|
554
|
+
--category-2-depth-1-foreground: var(--black);
|
|
555
|
+
--category-2-depth-2: var(--category-2-depth-2-700);
|
|
556
|
+
--category-2-depth-2-foreground: var(--white);
|
|
557
|
+
--category-2-depth-3: var(--category-2-depth-3-700);
|
|
558
|
+
--category-2-depth-3-foreground: var(--white);
|
|
559
|
+
--category-2-depth-4: var(--category-2-depth-4-700);
|
|
560
|
+
--category-2-depth-4-foreground: var(--white);
|
|
561
|
+
--category-2-depth-5: var(--category-2-depth-5-700);
|
|
562
|
+
--category-2-depth-5-foreground: var(--white);
|
|
563
|
+
--category-3-depth-1: var(--category-3-depth-1-700);
|
|
564
|
+
--category-3-depth-1-foreground: var(--black);
|
|
565
|
+
--category-3-depth-2: var(--category-3-depth-2-700);
|
|
566
|
+
--category-3-depth-2-foreground: var(--white);
|
|
567
|
+
--category-3-depth-3: var(--category-3-depth-3-700);
|
|
568
|
+
--category-3-depth-3-foreground: var(--white);
|
|
569
|
+
--category-3-depth-4: var(--category-3-depth-4-700);
|
|
570
|
+
--category-3-depth-4-foreground: var(--white);
|
|
571
|
+
--category-3-depth-5: var(--category-3-depth-5-700);
|
|
572
|
+
--category-3-depth-5-foreground: var(--white);
|
|
573
|
+
--category-4-depth-1: var(--category-4-depth-1-700);
|
|
574
|
+
--category-4-depth-1-foreground: var(--black);
|
|
575
|
+
--category-4-depth-2: var(--category-4-depth-2-700);
|
|
576
|
+
--category-4-depth-2-foreground: var(--white);
|
|
577
|
+
--category-4-depth-3: var(--category-4-depth-3-700);
|
|
578
|
+
--category-4-depth-3-foreground: var(--white);
|
|
579
|
+
--category-4-depth-4: var(--category-4-depth-4-700);
|
|
580
|
+
--category-4-depth-4-foreground: var(--white);
|
|
581
|
+
--category-4-depth-5: var(--category-4-depth-5-700);
|
|
582
|
+
--category-4-depth-5-foreground: var(--white);
|
|
583
|
+
--category-5-depth-1: var(--category-5-depth-1-700);
|
|
584
|
+
--category-5-depth-1-foreground: var(--black);
|
|
585
|
+
--category-5-depth-2: var(--category-5-depth-2-700);
|
|
586
|
+
--category-5-depth-2-foreground: var(--white);
|
|
587
|
+
--category-5-depth-3: var(--category-5-depth-3-700);
|
|
588
|
+
--category-5-depth-3-foreground: var(--white);
|
|
589
|
+
--category-5-depth-4: var(--category-5-depth-4-700);
|
|
590
|
+
--category-5-depth-4-foreground: var(--white);
|
|
591
|
+
--category-5-depth-5: var(--category-5-depth-5-700);
|
|
592
|
+
--category-5-depth-5-foreground: var(--white);
|
|
593
|
+
--category-6-depth-1: var(--category-6-depth-1-700);
|
|
594
|
+
--category-6-depth-1-foreground: var(--black);
|
|
595
|
+
--category-6-depth-2: var(--category-6-depth-2-700);
|
|
596
|
+
--category-6-depth-2-foreground: var(--white);
|
|
597
|
+
--category-6-depth-3: var(--category-6-depth-3-700);
|
|
598
|
+
--category-6-depth-3-foreground: var(--white);
|
|
599
|
+
--category-6-depth-4: var(--category-6-depth-4-700);
|
|
600
|
+
--category-6-depth-4-foreground: var(--white);
|
|
601
|
+
--category-6-depth-5: var(--category-6-depth-5-700);
|
|
602
|
+
--category-6-depth-5-foreground: var(--white);
|
|
603
|
+
--category-7-depth-1: var(--category-7-depth-1-700);
|
|
604
|
+
--category-7-depth-1-foreground: var(--black);
|
|
605
|
+
--category-7-depth-2: var(--category-7-depth-2-700);
|
|
606
|
+
--category-7-depth-2-foreground: var(--white);
|
|
607
|
+
--category-7-depth-3: var(--category-7-depth-3-700);
|
|
608
|
+
--category-7-depth-3-foreground: var(--white);
|
|
609
|
+
--category-7-depth-4: var(--category-7-depth-4-700);
|
|
610
|
+
--category-7-depth-4-foreground: var(--white);
|
|
611
|
+
--category-7-depth-5: var(--category-7-depth-5-700);
|
|
612
|
+
--category-7-depth-5-foreground: var(--white);
|
|
613
|
+
--category-8-depth-1: var(--category-8-depth-1-700);
|
|
614
|
+
--category-8-depth-1-foreground: var(--black);
|
|
615
|
+
--category-8-depth-2: var(--category-8-depth-2-700);
|
|
616
|
+
--category-8-depth-2-foreground: var(--white);
|
|
617
|
+
--category-8-depth-3: var(--category-8-depth-3-700);
|
|
618
|
+
--category-8-depth-3-foreground: var(--white);
|
|
619
|
+
--category-8-depth-4: var(--category-8-depth-4-700);
|
|
620
|
+
--category-8-depth-4-foreground: var(--white);
|
|
621
|
+
--category-8-depth-5: var(--category-8-depth-5-700);
|
|
622
|
+
--category-8-depth-5-foreground: var(--white);
|
|
623
|
+
--category-9-depth-1: var(--category-9-depth-1-700);
|
|
624
|
+
--category-9-depth-1-foreground: var(--black);
|
|
625
|
+
--category-9-depth-2: var(--category-9-depth-2-700);
|
|
626
|
+
--category-9-depth-2-foreground: var(--black);
|
|
627
|
+
--category-9-depth-3: var(--category-9-depth-3-700);
|
|
628
|
+
--category-9-depth-3-foreground: var(--white);
|
|
629
|
+
--category-9-depth-4: var(--category-9-depth-4-700);
|
|
630
|
+
--category-9-depth-4-foreground: var(--white);
|
|
631
|
+
--category-9-depth-5: var(--category-9-depth-5-700);
|
|
632
|
+
--category-9-depth-5-foreground: var(--white);
|
|
633
|
+
--category-10-depth-1: var(--category-10-depth-1-700);
|
|
634
|
+
--category-10-depth-1-foreground: var(--black);
|
|
635
|
+
--category-10-depth-2: var(--category-10-depth-2-700);
|
|
636
|
+
--category-10-depth-2-foreground: var(--white);
|
|
637
|
+
--category-10-depth-3: var(--category-10-depth-3-700);
|
|
638
|
+
--category-10-depth-3-foreground: var(--white);
|
|
639
|
+
--category-10-depth-4: var(--category-10-depth-4-700);
|
|
640
|
+
--category-10-depth-4-foreground: var(--white);
|
|
641
|
+
--category-10-depth-5: var(--category-10-depth-5-700);
|
|
642
|
+
--category-10-depth-5-foreground: var(--white);
|
|
643
|
+
--category-11-depth-1: var(--category-11-depth-1-700);
|
|
644
|
+
--category-11-depth-1-foreground: var(--black);
|
|
645
|
+
--category-11-depth-2: var(--category-11-depth-2-700);
|
|
646
|
+
--category-11-depth-2-foreground: var(--black);
|
|
647
|
+
--category-11-depth-3: var(--category-11-depth-3-700);
|
|
648
|
+
--category-11-depth-3-foreground: var(--white);
|
|
649
|
+
--category-11-depth-4: var(--category-11-depth-4-700);
|
|
650
|
+
--category-11-depth-4-foreground: var(--white);
|
|
651
|
+
--category-11-depth-5: var(--category-11-depth-5-700);
|
|
652
|
+
--category-11-depth-5-foreground: var(--white);
|
|
653
|
+
--category-12-depth-1: var(--category-12-depth-1-700);
|
|
654
|
+
--category-12-depth-1-foreground: var(--black);
|
|
655
|
+
--category-12-depth-2: var(--category-12-depth-2-700);
|
|
656
|
+
--category-12-depth-2-foreground: var(--white);
|
|
657
|
+
--category-12-depth-3: var(--category-12-depth-3-700);
|
|
658
|
+
--category-12-depth-3-foreground: var(--white);
|
|
659
|
+
--category-12-depth-4: var(--category-12-depth-4-700);
|
|
660
|
+
--category-12-depth-4-foreground: var(--white);
|
|
661
|
+
--category-12-depth-5: var(--category-12-depth-5-700);
|
|
662
|
+
--category-12-depth-5-foreground: var(--white);
|
|
395
663
|
/* The zebra stripe (table.tsx: bg-muted/40 on even rows) mixed onto the
|
|
396
664
|
page, opaque: what a pinned table cell paints on an even row, so it
|
|
397
665
|
matches the row without letting scrolled columns show through. Mixed
|
|
@@ -571,6 +839,127 @@
|
|
|
571
839
|
--heat-4-foreground: var(--black);
|
|
572
840
|
--heat-5: var(--heat-5-400);
|
|
573
841
|
--heat-5-foreground: var(--black);
|
|
842
|
+
/* Depth ramps: lighter steps to clear the dark surfaces, black text on all. */
|
|
843
|
+
--category-1-depth-1: var(--category-1-depth-1-400);
|
|
844
|
+
--category-1-depth-1-foreground: var(--black);
|
|
845
|
+
--category-1-depth-2: var(--category-1-depth-2-400);
|
|
846
|
+
--category-1-depth-2-foreground: var(--black);
|
|
847
|
+
--category-1-depth-3: var(--category-1-depth-3-400);
|
|
848
|
+
--category-1-depth-3-foreground: var(--black);
|
|
849
|
+
--category-1-depth-4: var(--category-1-depth-4-400);
|
|
850
|
+
--category-1-depth-4-foreground: var(--black);
|
|
851
|
+
--category-1-depth-5: var(--category-1-depth-5-400);
|
|
852
|
+
--category-1-depth-5-foreground: var(--black);
|
|
853
|
+
--category-2-depth-1: var(--category-2-depth-1-400);
|
|
854
|
+
--category-2-depth-1-foreground: var(--black);
|
|
855
|
+
--category-2-depth-2: var(--category-2-depth-2-400);
|
|
856
|
+
--category-2-depth-2-foreground: var(--black);
|
|
857
|
+
--category-2-depth-3: var(--category-2-depth-3-400);
|
|
858
|
+
--category-2-depth-3-foreground: var(--black);
|
|
859
|
+
--category-2-depth-4: var(--category-2-depth-4-400);
|
|
860
|
+
--category-2-depth-4-foreground: var(--black);
|
|
861
|
+
--category-2-depth-5: var(--category-2-depth-5-400);
|
|
862
|
+
--category-2-depth-5-foreground: var(--black);
|
|
863
|
+
--category-3-depth-1: var(--category-3-depth-1-400);
|
|
864
|
+
--category-3-depth-1-foreground: var(--black);
|
|
865
|
+
--category-3-depth-2: var(--category-3-depth-2-400);
|
|
866
|
+
--category-3-depth-2-foreground: var(--black);
|
|
867
|
+
--category-3-depth-3: var(--category-3-depth-3-400);
|
|
868
|
+
--category-3-depth-3-foreground: var(--black);
|
|
869
|
+
--category-3-depth-4: var(--category-3-depth-4-400);
|
|
870
|
+
--category-3-depth-4-foreground: var(--black);
|
|
871
|
+
--category-3-depth-5: var(--category-3-depth-5-400);
|
|
872
|
+
--category-3-depth-5-foreground: var(--black);
|
|
873
|
+
--category-4-depth-1: var(--category-4-depth-1-400);
|
|
874
|
+
--category-4-depth-1-foreground: var(--black);
|
|
875
|
+
--category-4-depth-2: var(--category-4-depth-2-400);
|
|
876
|
+
--category-4-depth-2-foreground: var(--black);
|
|
877
|
+
--category-4-depth-3: var(--category-4-depth-3-400);
|
|
878
|
+
--category-4-depth-3-foreground: var(--black);
|
|
879
|
+
--category-4-depth-4: var(--category-4-depth-4-400);
|
|
880
|
+
--category-4-depth-4-foreground: var(--black);
|
|
881
|
+
--category-4-depth-5: var(--category-4-depth-5-400);
|
|
882
|
+
--category-4-depth-5-foreground: var(--black);
|
|
883
|
+
--category-5-depth-1: var(--category-5-depth-1-400);
|
|
884
|
+
--category-5-depth-1-foreground: var(--black);
|
|
885
|
+
--category-5-depth-2: var(--category-5-depth-2-400);
|
|
886
|
+
--category-5-depth-2-foreground: var(--black);
|
|
887
|
+
--category-5-depth-3: var(--category-5-depth-3-400);
|
|
888
|
+
--category-5-depth-3-foreground: var(--black);
|
|
889
|
+
--category-5-depth-4: var(--category-5-depth-4-400);
|
|
890
|
+
--category-5-depth-4-foreground: var(--black);
|
|
891
|
+
--category-5-depth-5: var(--category-5-depth-5-400);
|
|
892
|
+
--category-5-depth-5-foreground: var(--black);
|
|
893
|
+
--category-6-depth-1: var(--category-6-depth-1-400);
|
|
894
|
+
--category-6-depth-1-foreground: var(--black);
|
|
895
|
+
--category-6-depth-2: var(--category-6-depth-2-400);
|
|
896
|
+
--category-6-depth-2-foreground: var(--black);
|
|
897
|
+
--category-6-depth-3: var(--category-6-depth-3-400);
|
|
898
|
+
--category-6-depth-3-foreground: var(--black);
|
|
899
|
+
--category-6-depth-4: var(--category-6-depth-4-400);
|
|
900
|
+
--category-6-depth-4-foreground: var(--black);
|
|
901
|
+
--category-6-depth-5: var(--category-6-depth-5-400);
|
|
902
|
+
--category-6-depth-5-foreground: var(--black);
|
|
903
|
+
--category-7-depth-1: var(--category-7-depth-1-400);
|
|
904
|
+
--category-7-depth-1-foreground: var(--black);
|
|
905
|
+
--category-7-depth-2: var(--category-7-depth-2-400);
|
|
906
|
+
--category-7-depth-2-foreground: var(--black);
|
|
907
|
+
--category-7-depth-3: var(--category-7-depth-3-400);
|
|
908
|
+
--category-7-depth-3-foreground: var(--black);
|
|
909
|
+
--category-7-depth-4: var(--category-7-depth-4-400);
|
|
910
|
+
--category-7-depth-4-foreground: var(--black);
|
|
911
|
+
--category-7-depth-5: var(--category-7-depth-5-400);
|
|
912
|
+
--category-7-depth-5-foreground: var(--black);
|
|
913
|
+
--category-8-depth-1: var(--category-8-depth-1-400);
|
|
914
|
+
--category-8-depth-1-foreground: var(--black);
|
|
915
|
+
--category-8-depth-2: var(--category-8-depth-2-400);
|
|
916
|
+
--category-8-depth-2-foreground: var(--black);
|
|
917
|
+
--category-8-depth-3: var(--category-8-depth-3-400);
|
|
918
|
+
--category-8-depth-3-foreground: var(--black);
|
|
919
|
+
--category-8-depth-4: var(--category-8-depth-4-400);
|
|
920
|
+
--category-8-depth-4-foreground: var(--black);
|
|
921
|
+
--category-8-depth-5: var(--category-8-depth-5-400);
|
|
922
|
+
--category-8-depth-5-foreground: var(--black);
|
|
923
|
+
--category-9-depth-1: var(--category-9-depth-1-400);
|
|
924
|
+
--category-9-depth-1-foreground: var(--black);
|
|
925
|
+
--category-9-depth-2: var(--category-9-depth-2-400);
|
|
926
|
+
--category-9-depth-2-foreground: var(--black);
|
|
927
|
+
--category-9-depth-3: var(--category-9-depth-3-400);
|
|
928
|
+
--category-9-depth-3-foreground: var(--black);
|
|
929
|
+
--category-9-depth-4: var(--category-9-depth-4-400);
|
|
930
|
+
--category-9-depth-4-foreground: var(--black);
|
|
931
|
+
--category-9-depth-5: var(--category-9-depth-5-400);
|
|
932
|
+
--category-9-depth-5-foreground: var(--black);
|
|
933
|
+
--category-10-depth-1: var(--category-10-depth-1-400);
|
|
934
|
+
--category-10-depth-1-foreground: var(--black);
|
|
935
|
+
--category-10-depth-2: var(--category-10-depth-2-400);
|
|
936
|
+
--category-10-depth-2-foreground: var(--black);
|
|
937
|
+
--category-10-depth-3: var(--category-10-depth-3-400);
|
|
938
|
+
--category-10-depth-3-foreground: var(--black);
|
|
939
|
+
--category-10-depth-4: var(--category-10-depth-4-400);
|
|
940
|
+
--category-10-depth-4-foreground: var(--black);
|
|
941
|
+
--category-10-depth-5: var(--category-10-depth-5-400);
|
|
942
|
+
--category-10-depth-5-foreground: var(--black);
|
|
943
|
+
--category-11-depth-1: var(--category-11-depth-1-400);
|
|
944
|
+
--category-11-depth-1-foreground: var(--black);
|
|
945
|
+
--category-11-depth-2: var(--category-11-depth-2-400);
|
|
946
|
+
--category-11-depth-2-foreground: var(--black);
|
|
947
|
+
--category-11-depth-3: var(--category-11-depth-3-400);
|
|
948
|
+
--category-11-depth-3-foreground: var(--black);
|
|
949
|
+
--category-11-depth-4: var(--category-11-depth-4-400);
|
|
950
|
+
--category-11-depth-4-foreground: var(--black);
|
|
951
|
+
--category-11-depth-5: var(--category-11-depth-5-400);
|
|
952
|
+
--category-11-depth-5-foreground: var(--black);
|
|
953
|
+
--category-12-depth-1: var(--category-12-depth-1-400);
|
|
954
|
+
--category-12-depth-1-foreground: var(--black);
|
|
955
|
+
--category-12-depth-2: var(--category-12-depth-2-400);
|
|
956
|
+
--category-12-depth-2-foreground: var(--black);
|
|
957
|
+
--category-12-depth-3: var(--category-12-depth-3-400);
|
|
958
|
+
--category-12-depth-3-foreground: var(--black);
|
|
959
|
+
--category-12-depth-4: var(--category-12-depth-4-400);
|
|
960
|
+
--category-12-depth-4-foreground: var(--black);
|
|
961
|
+
--category-12-depth-5: var(--category-12-depth-5-400);
|
|
962
|
+
--category-12-depth-5-foreground: var(--black);
|
|
574
963
|
--table-stripe: color-mix(in srgb, var(--muted) 40%, var(--background));
|
|
575
964
|
--table-highlight: color-mix(in srgb, var(--info) 20%, var(--background));
|
|
576
965
|
--table-highlight-muted-foreground: var(--gray-400); /* the usual muted: not var(--muted-foreground), which the row redefines from this */
|
|
@@ -601,7 +990,8 @@
|
|
|
601
990
|
* the dark theme, so a block below always sits on top of .dark and sets
|
|
602
991
|
* only what differs from it. The solid fills (--destructive, --success,
|
|
603
992
|
* --warning, --info, each with white -foreground), --info-text, the
|
|
604
|
-
* highlight washes, the categorical slots
|
|
993
|
+
* highlight washes, the categorical slots, the heat scale and the depth
|
|
994
|
+
* ramps stay .dark's.
|
|
605
995
|
*
|
|
606
996
|
* --ring is the accent (4.24 to 5.25 on the page), not the guide's
|
|
607
997
|
* accent deep (2.30 to 2.91, under the 3:1 a focus ring needs).
|