@redseed/redseed-ui-tailwindcss 7.58.0 → 7.60.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/components/category_list.css +65 -0
- package/components/page_header.css +44 -2
- package/components/section.css +38 -0
- package/components.css +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* ---------------------------------------------------------------------------
|
|
2
|
+
Category list
|
|
3
|
+
|
|
4
|
+
A wrapping row of neutral badges naming the buckets a record sits in.
|
|
5
|
+
|
|
6
|
+
Wrapping, not scrolling. The cap is what keeps the row short; a horizontal
|
|
7
|
+
scroller would hide categories behind a gesture for the same reason a table
|
|
8
|
+
never scrolls the page sideways.
|
|
9
|
+
|
|
10
|
+
Imported after badge.css, since the linked variant restyles the badge inside
|
|
11
|
+
its anchor.
|
|
12
|
+
--------------------------------------------------------------------------- */
|
|
13
|
+
/* 16px out to the toggle, 8px between the badges — both on the brand 8px rhythm, and
|
|
14
|
+
the wider gap is what stops "+4 more" reading as one more category. */
|
|
15
|
+
.rsui-category-list {
|
|
16
|
+
@apply flex flex-wrap items-center gap-x-space-md gap-y-space-xs;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* The list resets its own margins and padding, the way breadcrumbs and
|
|
20
|
+
linked_list already do — a `ul` carries a browser indent that would push the
|
|
21
|
+
row out of line with the title above it. */
|
|
22
|
+
.rsui-category-list__items {
|
|
23
|
+
@apply flex flex-wrap items-center gap-x-space-xs gap-y-space-xs;
|
|
24
|
+
@apply list-none m-0 p-0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.rsui-category-list__item {
|
|
28
|
+
@apply flex;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* A linked category has to look like a link. A badge with no pointer and no
|
|
32
|
+
hover reads as a label, which is what most categories are, so the ones that
|
|
33
|
+
genuinely filter a list get the library's always-on underline (the LinkSlot
|
|
34
|
+
convention) plus a hover state on the pill itself. Half-measures are the
|
|
35
|
+
failure here: a pointer alone is not a visible affordance. */
|
|
36
|
+
.rsui-category-list__link {
|
|
37
|
+
@apply block rounded-full no-underline;
|
|
38
|
+
@apply focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-border-primary outline-hidden;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.rsui-category-list__link .rsui-badge {
|
|
42
|
+
@apply cursor-pointer underline underline-offset-2 transition-colors;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* One grey step darker, not the usual `hover:bg-background-secondary`. That is the
|
|
46
|
+
convention for a hover on a white surface, and a neutral badge already sits on
|
|
47
|
+
background-secondary — applying it here would be a no-op. */
|
|
48
|
+
.rsui-category-list__link:hover .rsui-badge {
|
|
49
|
+
@apply bg-background-secondary-invert border-border-primary text-text-primary;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* The toggle. Matches the "See all" / view-all treatment already used in
|
|
53
|
+
section headers and footers: semibold on the tertiary-button colour, no
|
|
54
|
+
resting underline, underline on hover only. That pairing reads as an action
|
|
55
|
+
without competing with the badges beside it.
|
|
56
|
+
|
|
57
|
+
Sibling to the list rather than inside it, so it wraps onto its own line at
|
|
58
|
+
phone widths — which is where the cap does most of its work. */
|
|
59
|
+
.rsui-category-list__more {
|
|
60
|
+
@apply inline-flex w-fit items-center whitespace-nowrap;
|
|
61
|
+
@apply text-sm font-semibold no-underline cursor-pointer transition-colors;
|
|
62
|
+
@apply text-button-tertiary hover:text-button-tertiary-hover;
|
|
63
|
+
@apply hover:underline underline-offset-4 decoration-2;
|
|
64
|
+
@apply focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-button-tertiary outline-hidden;
|
|
65
|
+
}
|
|
@@ -2,9 +2,24 @@
|
|
|
2
2
|
rest of the library has moved off — see the note in meta_info.css. It double-counts
|
|
3
3
|
against any margin a child sets for itself and it breaks once a row wraps. Both
|
|
4
4
|
happened here: see __title below. */
|
|
5
|
+
|
|
6
|
+
/* A column at every width. This was `flex` — which is row — with `lg:flex-col`, so below
|
|
7
|
+
lg the root laid its children out horizontally.
|
|
8
|
+
|
|
9
|
+
Nothing caught it because below lg there was only ever one visible child to lay out:
|
|
10
|
+
`__top`, since `__meta` is `hidden lg:flex`. A single flex item looks the same in a row
|
|
11
|
+
as in a column. The tell was this rule's own `gap-y-space-md`, which does nothing in a
|
|
12
|
+
row direction unless the row wraps — 16px of dead declaration, written by someone
|
|
13
|
+
thinking "column".
|
|
14
|
+
|
|
15
|
+
Add a second full-width row and the direction stops being invisible: the categories
|
|
16
|
+
landed *beside* the title on a phone with both squeezed to half the screen. Measured.
|
|
17
|
+
|
|
18
|
+
`justify-between` is kept rather than dropped. It is inert in an unconstrained column,
|
|
19
|
+
so it changes nothing here, but a consuming app that constrains the header's height
|
|
20
|
+
would notice it going. From lg up this rule now resolves exactly as it did before. */
|
|
5
21
|
.rsui-page-header {
|
|
6
|
-
@apply w-full flex justify-between gap-y-space-md;
|
|
7
|
-
@apply lg:flex-col;
|
|
22
|
+
@apply w-full flex flex-col justify-between gap-y-space-md;
|
|
8
23
|
}
|
|
9
24
|
|
|
10
25
|
.rsui-page-header__top {
|
|
@@ -187,3 +202,30 @@
|
|
|
187
202
|
.rsui-page-header--toned .rsui-meta-info__help {
|
|
188
203
|
color: var(--rsui-page-header-ink-muted);
|
|
189
204
|
}
|
|
205
|
+
|
|
206
|
+
/* ---------------------------------------------------------------------------
|
|
207
|
+
Categories
|
|
208
|
+
|
|
209
|
+
A wrapping row of neutral badges between the subtitle and the meta, naming
|
|
210
|
+
the buckets the record sits in. See category_list.css for the row itself.
|
|
211
|
+
|
|
212
|
+
Neutral is a rule here rather than a preference: the header already carries
|
|
213
|
+
exactly one coloured badge — the status beside the title — and a second
|
|
214
|
+
colour in this row makes both of them meaningless.
|
|
215
|
+
|
|
216
|
+
One row, not two kinds. Duration, level and domain are facts about the
|
|
217
|
+
record and belong in the meta grid; a bucket the record sits in belongs
|
|
218
|
+
here.
|
|
219
|
+
--------------------------------------------------------------------------- */
|
|
220
|
+
.rsui-page-header__categories {
|
|
221
|
+
@apply flex w-full;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* The tertiary green the toggle borrows disappears on a dark band, so it moves
|
|
225
|
+
onto the tone's own ink. Same reasoning as the MetaInfo overrides above:
|
|
226
|
+
reaching into another component's classes is not ideal, but an invisible
|
|
227
|
+
control is worse, and what a slot looks like on this component's tonal
|
|
228
|
+
surface is this stylesheet's business. */
|
|
229
|
+
.rsui-page-header--toned .rsui-category-list__more {
|
|
230
|
+
color: var(--rsui-page-header-ink);
|
|
231
|
+
}
|
package/components/section.css
CHANGED
|
@@ -54,6 +54,44 @@
|
|
|
54
54
|
@apply bg-pink-50 border-pink-200 text-text-primary;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
/* ---------------------------------------------------------------------------
|
|
58
|
+
The AI family at full strength: the same dark plum gradient Card's `ai-bold`
|
|
59
|
+
uses, so a bold section and a bold card read as one surface family. Unlike
|
|
60
|
+
`ai` this one does not animate — a moving gradient across a whole section's
|
|
61
|
+
worth of dark ground is a lot of motion for a container the reader is meant
|
|
62
|
+
to read, not glance at.
|
|
63
|
+
|
|
64
|
+
Contrast figures are card.css's: on the lightest stop, Warm Mauve 900, white
|
|
65
|
+
title 7.90:1 and Warm Mauve 200 muted 6.05:1.
|
|
66
|
+
|
|
67
|
+
`BodyText` inside is deliberately NOT adapted — it owns `onColor` for this,
|
|
68
|
+
the same split Card's `ai-bold` makes.
|
|
69
|
+
--------------------------------------------------------------------------- */
|
|
70
|
+
.rsui-section--ai-bold {
|
|
71
|
+
@apply bg-linear-to-br from-background-ai-bold-from via-background-ai-bold-via via-65% to-background-ai-bold-to;
|
|
72
|
+
@apply text-text-on-color;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* A bordered dark section wants its own edge, not a light hairline. */
|
|
76
|
+
.rsui-section--bordered.rsui-section--ai-bold {
|
|
77
|
+
@apply border-transparent;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* SectionHeader sets its own dark ink, which disappears here. Same reach
|
|
81
|
+
card.css makes into CardHeader for the same reason. */
|
|
82
|
+
.rsui-section--ai-bold .rsui-section-header__title-text {
|
|
83
|
+
@apply text-text-on-color;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.rsui-section--ai-bold .rsui-section-header__subtitle {
|
|
87
|
+
color: var(--Colors-Warm-Mauve-200);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* The header hairline is a light-ground border and vanishes on this surface. */
|
|
91
|
+
.rsui-section--ai-bold .rsui-section-header--divider {
|
|
92
|
+
border-color: var(--Colors-Warm-Mauve-900);
|
|
93
|
+
}
|
|
94
|
+
|
|
57
95
|
.rsui-section--ai {
|
|
58
96
|
@apply bg-linear-to-tr from-background-ai-from to-background-ai-to;
|
|
59
97
|
background-size: 160% 160%;
|
package/components.css
CHANGED
|
@@ -23,6 +23,7 @@ Please be careful when adding new components and updating the order.
|
|
|
23
23
|
@import './components/card.css';
|
|
24
24
|
@import './components/card_header.css';
|
|
25
25
|
@import './components/card_horizontal.css';
|
|
26
|
+
@import './components/category_list.css';
|
|
26
27
|
@import './components/checkbox_card.css';
|
|
27
28
|
@import './components/column_picker.css';
|
|
28
29
|
@import './components/comments.css';
|