@usableapp/cardds 0.7.94 → 0.7.96
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/CHANGELOG.md +76 -0
- package/README.md +110 -11
- package/bin/cardds.mjs +1 -1
- package/css/actions.css +9 -12
- package/css/base.css +3 -6
- package/css/card.css +11 -17
- package/css/choice.css +14 -11
- package/css/finish.css +4 -2
- package/css/journey.css +7 -4
- package/css/layover.css +16 -11
- package/css/lists.css +4 -9
- package/css/media.css +20 -16
- package/css/numbers.css +16 -18
- package/css/palette.css +79 -97
- package/css/people.css +5 -4
- package/css/post.css +2 -1
- package/css/sheet.css +13 -10
- package/css/sticky.css +6 -5
- package/css/theme.template.css +16 -7
- package/css/tokens.css +69 -35
- package/dist/actions/Chip.d.ts +1 -1
- package/dist/actions/Chip.js +1 -1
- package/dist/actions/Dropdown.d.ts +1 -1
- package/dist/actions/Dropdown.js +1 -1
- package/dist/cardds.css +280 -260
- package/dist/cards/cardGrounds.d.ts +22 -0
- package/dist/cards/cardGrounds.js +84 -0
- package/dist/cards/inkGrounds.d.ts +34 -0
- package/dist/cards/inkGrounds.js +181 -0
- package/dist/catalog.json +1 -1
- package/dist/choice/Calendar.d.ts +1 -1
- package/dist/choice/Calendar.js +1 -1
- package/dist/choice/Check.d.ts +2 -2
- package/dist/choice/Check.js +2 -2
- package/dist/choice/DayStrip.d.ts +1 -1
- package/dist/choice/DayStrip.js +1 -1
- package/dist/choice/Mood.d.ts +1 -1
- package/dist/choice/Mood.js +1 -1
- package/dist/choice/Slider.d.ts +1 -1
- package/dist/choice/Slider.js +1 -1
- package/dist/forms/AddRow.d.ts +1 -1
- package/dist/forms/AddRow.js +1 -1
- package/dist/forms/Composer.d.ts +1 -1
- package/dist/forms/Composer.js +1 -1
- package/dist/forms/Field.d.ts +4 -2
- package/dist/forms/Field.js +4 -2
- package/dist/forms/FileBtn.d.ts +1 -1
- package/dist/forms/FileBtn.js +1 -1
- package/dist/forms/Pin.d.ts +1 -1
- package/dist/forms/Pin.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/media/MapPick.d.ts +1 -1
- package/dist/media/MapPick.js +1 -1
- package/dist/media/Tile.d.ts +1 -1
- package/dist/media/Tile.js +1 -1
- package/dist/numbers/Picker.d.ts +1 -1
- package/dist/numbers/Picker.js +1 -1
- package/dist/people/AvatarPick.d.ts +2 -2
- package/dist/people/AvatarPick.js +1 -1
- package/lib/guide.mjs +1 -1
- package/lint/rules.mjs +37 -0
- package/package.json +1 -1
package/css/sheet.css
CHANGED
|
@@ -205,12 +205,10 @@
|
|
|
205
205
|
the default spacing), the body's own top padding, and only when the sheet is paper.
|
|
206
206
|
A plain sheet keeps padding-top 0. A sheet in a stack wears the same class and the same
|
|
207
207
|
inset: the stack's own gap under the head is the card's colour, so the row still needs this white.
|
|
208
|
-
The
|
|
209
|
-
inherit a dark card's light ink, and the words would vanish on the white. */
|
|
208
|
+
The paper is a surface of the plain card's side: on a dark sheet its words still turn to onlight. */
|
|
210
209
|
.sheet--paper > .sheet__body {
|
|
211
210
|
--card-bg: var(--color-paper, #fff);
|
|
212
|
-
--
|
|
213
|
-
--card-muted: var(--_muted-on-paper, #555555);
|
|
211
|
+
--dark: var(--card-1-dark);
|
|
214
212
|
background: var(--card-bg);
|
|
215
213
|
color: var(--card-ink);
|
|
216
214
|
padding-top: var(--sp-6);
|
|
@@ -391,7 +389,7 @@
|
|
|
391
389
|
bottom: var(--sp-2);
|
|
392
390
|
padding: var(--sp-0) var(--sp-2);
|
|
393
391
|
border-radius: var(--map-credit-radius, var(--r-chip));
|
|
394
|
-
background: var(--map-credit-bg,
|
|
392
|
+
background: var(--map-credit-bg, var(--surface)); /* solid: at 80% over a map the muted words fell under 4.5:1 (clay, 3.9) */
|
|
395
393
|
color: var(--map-credit-ink, var(--on-surface-muted));
|
|
396
394
|
font: var(--map-credit-font, var(--type-caption));
|
|
397
395
|
pointer-events: none;
|
|
@@ -407,7 +405,8 @@
|
|
|
407
405
|
padding: var(--sp-2) var(--sp-4);
|
|
408
406
|
border-radius: var(--map-hint-radius, var(--r-chip));
|
|
409
407
|
background: var(--map-hint-bg, var(--card-3-bg));
|
|
410
|
-
|
|
408
|
+
--dark: var(--card-3-dark);
|
|
409
|
+
color: var(--map-hint-ink, var(--card-ink));
|
|
411
410
|
font: var(--map-hint-font, var(--type-label));
|
|
412
411
|
text-align: center;
|
|
413
412
|
box-shadow: var(--map-hint-shadow, var(--shadow-float));
|
|
@@ -456,9 +455,9 @@
|
|
|
456
455
|
width: var(--map-pick-size, var(--sp-6));
|
|
457
456
|
height: var(--map-pick-size, var(--sp-6));
|
|
458
457
|
border-radius: 50%;
|
|
459
|
-
border: var(--border-w) solid var(--map-pick-border, var(--accent));
|
|
458
|
+
border: var(--border-w) solid var(--map-pick-border, var(--action-accent));
|
|
460
459
|
background: var(--map-pick-bg, var(--surface));
|
|
461
|
-
color: var(--map-pick-mark-ink, var(--accent));
|
|
460
|
+
color: var(--map-pick-mark-ink, var(--action-accent));
|
|
462
461
|
box-shadow: var(--map-pick-shadow, var(--shadow-float));
|
|
463
462
|
pointer-events: none;
|
|
464
463
|
}
|
|
@@ -495,7 +494,10 @@
|
|
|
495
494
|
display: grid;
|
|
496
495
|
place-items: center;
|
|
497
496
|
font: var(--sheet-stage-foot-font, var(--type-caption));
|
|
498
|
-
|
|
497
|
+
/* words on the scrim: white on a strip of the scrim over it. The scrim alone is half black, so over a white page it is #808080, where white
|
|
498
|
+
is 3.9:1; doubled, #404040, 10:1. It read --card-3-ink, a brand's light ink, on a black scrim */
|
|
499
|
+
background: var(--sheet-stage-foot-bg, var(--scrim));
|
|
500
|
+
color: var(--sheet-stage-foot-ink, #ffffff);
|
|
499
501
|
z-index: 2;
|
|
500
502
|
}
|
|
501
503
|
|
|
@@ -538,6 +540,7 @@
|
|
|
538
540
|
display: flex; align-items: center; gap: var(--sp-3); min-height: var(--_row-h); min-width: 0; /* THIN: 32px, a summary line, not a button (Lh 2026-09-25) — the tap stays 44, see __go */
|
|
539
541
|
padding-inline: var(--sheet-step-bar-pad-x, var(--sp-3)); border-radius: var(--sheet-step-bar-radius, var(--r-chip));
|
|
540
542
|
background: var(--sheet-step-bar-bg, var(--ink-tint)); color: var(--sheet-step-bar-ink, inherit);
|
|
543
|
+
--card-muted: var(--card-ink); /* a tint of the ink: its secondary words are the full ink (no lighter shade holds 4.5:1 there) */
|
|
541
544
|
border-top: var(--sheet-step-border-w, 0rem) solid var(--sheet-step-border, currentColor); /* a rule instead of the bar: set this, the bar's bg transparent, radius 0 */
|
|
542
545
|
}
|
|
543
546
|
.sheet-step__title { font: var(--sheet-step-title-font, var(--type-label)); margin: 0; flex: 0 1 auto; min-width: 0; outline: none; /* the label size, not a body title: a pile of rows must stay small (Lh 2026-09-24) */ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
@@ -548,7 +551,7 @@
|
|
|
548
551
|
border-radius: 50%; font: var(--sheet-step-num-font, var(--type-caption)); line-height: 1; font-variant-numeric: tabular-nums;
|
|
549
552
|
background: var(--sheet-step-num-bg, var(--card-bg)); color: var(--sheet-step-num-ink, inherit);
|
|
550
553
|
}
|
|
551
|
-
.sheet-step__summary { color:
|
|
554
|
+
.sheet-step__summary { color: var(--sheet-step-summary-ink, var(--card-muted)); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
552
555
|
.sheet-step__check { margin-inline-start: auto; }
|
|
553
556
|
.sheet-step__body { min-height: 0; overflow: clip; overflow-clip-margin: var(--sp-1); }
|
|
554
557
|
.sheet-step__inner { display: grid; gap: var(--card-gap); padding-block: var(--card-gap); padding-inline: var(--sheet-step-inner-pad-x, var(--sheet-step-bar-pad-x, var(--sp-3))); } /* the open step's content in the frame of its title's words (the bar's own inset), so it reads as that step's (Lh 2026-09-28, #153) */
|
package/css/sticky.css
CHANGED
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
only its content box, which stops one fold short of the right and bottom edges; the paper's negative margins run
|
|
17
17
|
back out to the full size. The paper takes the tone by `inherit`. */
|
|
18
18
|
.sticky {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
--dark: var(--sticky-dark, 0); /* a note is pastel paper: a light ground in any palette and any mode, so its words are onlight */
|
|
20
|
+
color: var(--sticky-ink, var(--card-ink));
|
|
21
|
+
--_muted: var(--card-muted);
|
|
21
22
|
padding-inline-end: var(--sticky-fold, var(--sp-6)); /* the knob, read by a real property first (the knob test probes that one); --_fold hands the same value to the paper and the flap */
|
|
22
23
|
--_fold: var(--sticky-fold, var(--sp-6));
|
|
23
24
|
position: relative;
|
|
@@ -81,7 +82,7 @@
|
|
|
81
82
|
.sticky__head:has(> .sticky-date) > .ph { flex: none; width: var(--sticky-pic-size, calc(var(--tap) * 1.5)); min-height: 0; aspect-ratio: 1; } /* beside a date the picture is a small square at the start */
|
|
82
83
|
.sticky__body { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: clip; /* words past the note's room are cut, the foot keeps its place */ font: var(--sticky-font, var(--type-title)); overflow-wrap: anywhere; }
|
|
83
84
|
.sticky--small .sticky__body { font: var(--sticky-small-font, var(--type-label)); } /* the note measured its words and they did not fit at its size (src/sticky/fit.ts) */
|
|
84
|
-
.sticky__paper > :not(.sticky__body) > .chip { border-color: transparent; background-color: var(--sticky-chip-bg, rgb(255 255 255 / 0.85)); color: var(--sticky-ink,
|
|
85
|
+
.sticky__paper > :not(.sticky__body) > .chip { border-color: transparent; background-color: var(--sticky-chip-bg, rgb(255 255 255 / 0.85)); --dark: inherit; color: var(--sticky-ink, var(--card-ink)); } /* a chip on a note is a label ON the paper (whose note it is): a pale ground nearly opaque (it may lie over words), no edge, the note's ink */
|
|
85
86
|
.sticky__foot { flex: none; font: var(--sticky-foot-font, var(--type-caption)); color: var(--sticky-muted-ink, var(--_muted)); padding-inline-end: var(--_fold); } /* the line stops before the fold */
|
|
86
87
|
/* the flap: a square in the corner — the paper's cut takes its outer half, what is left is the triangle lying on the note */
|
|
87
88
|
.sticky__fold {
|
|
@@ -109,7 +110,7 @@
|
|
|
109
110
|
|
|
110
111
|
/* ---- sticky date: the day, big, the month under it — at the end of the note's head (its top-right corner) ----
|
|
111
112
|
<div class="sticky__head">…<time class="sticky-date" datetime="2026-02-14"><span class="sticky-date__day">14</span><span class="sticky-date__month">ก.พ.</span></time></div> */
|
|
112
|
-
.sticky-date { display: grid; justify-items: end; margin-inline-start: auto; text-align: end; color: var(--sticky-ink,
|
|
113
|
+
.sticky-date { display: grid; justify-items: end; margin-inline-start: auto; text-align: end; color: var(--sticky-ink, var(--card-ink)); }
|
|
113
114
|
.sticky-date__day { font: var(--sticky-date-day-font, var(--type-stat)); }
|
|
114
115
|
.sticky-date__month { font: var(--sticky-date-month-font, var(--type-caption)); color: var(--sticky-muted-ink, var(--_muted)); }
|
|
115
116
|
|
|
@@ -393,7 +394,7 @@
|
|
|
393
394
|
font: inherit;
|
|
394
395
|
}
|
|
395
396
|
.sticky-heading__title { min-width: 0; max-width: 100%; font: var(--sticky-heading-title-font, var(--type-label)); line-height: 1.35; /* Thai marks stack taller than the label's 1.2, and overflow clips them */ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
396
|
-
.sticky-heading__caption { font: var(--sticky-heading-caption-font, var(--type-caption)); color:
|
|
397
|
+
.sticky-heading__caption { font: var(--sticky-heading-caption-font, var(--type-caption)); color: var(--sticky-heading-caption-ink, var(--card-muted)); white-space: nowrap; } /* the muted words of what it stands on: a note, or the screen */
|
|
397
398
|
/* on a note: across the top of its paper, and the note's words start under it */
|
|
398
399
|
.sticky__stuck > .sticky-heading { position: absolute; inset: var(--sp-2) var(--sp-4) auto; }
|
|
399
400
|
.sticky:has(> .sticky__stuck > .sticky-heading) > .sticky__paper { padding-block-start: var(--sticky-heading-room, calc(var(--sp-12) + var(--sp-4))); }
|
package/css/theme.template.css
CHANGED
|
@@ -43,13 +43,22 @@
|
|
|
43
43
|
/* --color-brand: #ef4e0b; */ /* the primary action, the strong card */
|
|
44
44
|
/* --color-on-brand: #fff4ec; */ /* the words on the brand */
|
|
45
45
|
|
|
46
|
+
/* ---- ink: two sets, ONLIGHT and ONDARK (README "Ink follows its ground") ----
|
|
47
|
+
Every word and glyph on a light ground is onlight, on a dark ground ondark. Set the two sets; each one's ink and its muted shade
|
|
48
|
+
hold 4.5:1 on every ground of its side (inkGrounds() measures it). Unset, --color-ink and --color-on-brand derive them.
|
|
49
|
+
--ink-onlight --ink-onlight-muted --ink-ondark --ink-ondark-muted
|
|
50
|
+
---- sides: each ground says only whether it is dark (1) or light (0); its words and glyphs follow ----
|
|
51
|
+
--surface-dark (0) --card-1-dark (0) --card-2-dark (0) --card-3-dark (1) --card-4-dark (0) --card-5-dark (1)
|
|
52
|
+
--accent-dark (1, the brand fill) --action-dark (0, the paper of buttons, chips, fields) --neg-dark (1, a falling Delta)
|
|
53
|
+
A dark mode is these sides turned to 1 with their fills darkened, in a [data-mode="dark"] block of your own: no rule per piece.
|
|
54
|
+
A surface of your own: give it a fill and `--dark: 1` (or 0), and its --card-ink / --card-muted that side's set. */
|
|
55
|
+
|
|
46
56
|
/* ---- colour roles: only where a derivation is not what you want — a role set here wins over it ----
|
|
47
|
-
--surface --
|
|
48
|
-
--card-
|
|
49
|
-
--
|
|
50
|
-
--accent --on-accent --action-bg --action-ink --action-border
|
|
57
|
+
--surface --card-1-bg … --card-5-bg (five card tones: fills only, their words follow their side)
|
|
58
|
+
--card-border (a card's fill or its --card-border holds 3:1 on its ground: cardGrounds(), README)
|
|
59
|
+
--accent --action-bg --action-border
|
|
51
60
|
--pos --neg --dot-a --dot-b
|
|
52
|
-
--signal-ok --signal-warn --signal-error --signal-info (the signal set: green · yellow · red ·
|
|
53
|
-
keep the meaning;
|
|
54
|
-
|
|
61
|
+
--signal-ok-onlight --signal-warn-onlight --signal-error-onlight --signal-info-onlight (the signal set: green · yellow · red ·
|
|
62
|
+
blue — retune the shade, keep the meaning; 4.5:1 on every light ground) and --signal-*-ondark (on the dark side; the ondark ink
|
|
63
|
+
unless set). --signal-*-soft, the light ground of each, follows by itself */
|
|
55
64
|
}
|
package/css/tokens.css
CHANGED
|
@@ -103,9 +103,6 @@
|
|
|
103
103
|
--motion-quick: 0.2s; /* a small state flip that isn't a press: a chevron turning, a popover/banner opening */
|
|
104
104
|
--motion-slide: 0.22s; /* a centred card sliding out and the next in (card.css) — quick, a page turn (Lh, 2026-09-12) */
|
|
105
105
|
--motion-flip: 0.45s; /* a postcard turning over (media.css) — slow enough to read as a card in the hand */
|
|
106
|
-
--dim: 0.7; /* secondary words dimmed on a ground whose muted ink does not fit (the dark card --3, a drawer, a tile's sub line): ONE share for all */
|
|
107
|
-
--rest: 0.6; /* an unpicked choice at rest: .day, .segment__item, .float-bar__item */
|
|
108
|
-
--faint: 0.3; /* further still: rails, far dots, unselected picker items */
|
|
109
106
|
--motion-press: 0.12s; /* a control giving under the finger and springing back (actions.css PRESS) */
|
|
110
107
|
--press-scale: 0.96; /* how far a finger-sized control gives — a share of its size */
|
|
111
108
|
--press-dim: 0.6; /* how far a card-wide one (a row, a summary line, a card) fades under the finger */
|
|
@@ -174,40 +171,45 @@
|
|
|
174
171
|
value. That is what the fallbacks are for — a private mix (--_*) that
|
|
175
172
|
reads an unset base is invalid, so var(--_x, #grey) lands on the grey.
|
|
176
173
|
Set, the roles derive: tone 2 = the brand washed into the surface, the
|
|
177
|
-
muted inks = the ink washed into
|
|
174
|
+
muted inks = the ink washed into its ground. A role set directly
|
|
178
175
|
(a palette, or a project's theme.css) always wins over its derivation.
|
|
179
176
|
============================================================ */
|
|
180
|
-
--_muted-on-surface: color-mix(in srgb, var(--color-ink) 66%, var(--color-surface, #f2f2f0));
|
|
181
|
-
--_muted-on-paper: color-mix(in srgb, var(--color-ink) 66%, var(--color-paper, #ffffff));
|
|
182
177
|
--_tone-2: color-mix(in srgb, var(--color-brand) 14%, var(--color-surface, #f2f2f0));
|
|
183
|
-
--
|
|
184
|
-
--
|
|
178
|
+
--_onlight-muted: color-mix(in srgb, var(--color-ink) 70%, var(--_tone-2));
|
|
179
|
+
--_ondark-muted: color-mix(in srgb, var(--color-on-brand) 70%, var(--color-brand));
|
|
180
|
+
|
|
181
|
+
/* INK: TWO SETS, ONLIGHT AND ONDARK (Lh 2026-10-18: "there are text colours ONLIGHT and ONDARK. When the ground is light, use
|
|
182
|
+
onlight; when the ground is dark, use ondark"). Words and glyphs alike (icons, marks, dots, a check, a knob). Each set holds its
|
|
183
|
+
ink and its muted shade to 4.5:1 on every ground of its side. README "Ink follows its ground". */
|
|
184
|
+
--ink-onlight: var(--color-ink, #141414);
|
|
185
|
+
--ink-onlight-muted: var(--_onlight-muted, #575757); /* 4.6:1 on the water note and 4.9 on tone 4's grey, the darkest light grounds */
|
|
186
|
+
--ink-ondark: var(--color-on-brand, #ffffff);
|
|
187
|
+
--ink-ondark-muted: var(--_ondark-muted, #a8a8a8); /* 4.6:1 on tone 5's grey, the lightest dark ground */
|
|
188
|
+
|
|
189
|
+
/* SIDES: every ground says whether it is dark (1) or light (0); nothing else. Its words and glyphs follow from the side
|
|
190
|
+
(the surface list below). Dark mode is these switches turned to 1 with darker fills, and no rule per piece. */
|
|
191
|
+
--surface-dark: 0;
|
|
192
|
+
--card-1-dark: 0; --card-2-dark: 0; --card-3-dark: 1; --card-4-dark: 0; --card-5-dark: 1;
|
|
193
|
+
--accent-dark: 1; /* the brand fill: a primary button, a picked chip, a picked day */
|
|
194
|
+
--action-dark: 0; /* the paper fill of neutral controls: a button, a chip, a field, a plain tile */
|
|
195
|
+
--neg-dark: 1; /* a falling Delta's fill */
|
|
185
196
|
|
|
186
197
|
/* app background ("earth-toned surface or shiny color, up to the app") */
|
|
187
198
|
--surface: var(--color-surface, #f2f2f0);
|
|
188
|
-
--on-surface: var(--color-ink, #141414);
|
|
189
|
-
--on-surface-muted: var(--_muted-on-surface, #6b6b6b);
|
|
190
199
|
|
|
191
|
-
/* card boundaries —
|
|
192
|
-
--card-1-bg: var(--color-paper, #ffffff);
|
|
193
|
-
--card-2-bg: var(--_tone-2, #e6e6e3);
|
|
194
|
-
--card-3-bg: var(--color-brand, #141414);
|
|
200
|
+
/* card boundaries — five tones; each one's words follow its side */
|
|
201
|
+
--card-1-bg: var(--color-paper, #ffffff);
|
|
202
|
+
--card-2-bg: var(--_tone-2, #e6e6e3);
|
|
203
|
+
--card-3-bg: var(--color-brand, #141414);
|
|
195
204
|
/* tones 4 · 5 (Lh 2026-09-25): more card colours for a palette that has them — the wireframe keeps them grey */
|
|
196
|
-
--card-4-bg: #d4d4d0;
|
|
197
|
-
--card-5-bg: #3d3d3d;
|
|
205
|
+
--card-4-bg: #d4d4d0;
|
|
206
|
+
--card-5-bg: #3d3d3d;
|
|
198
207
|
|
|
199
|
-
--card-border: #141414; /* wireframe: visible outline;
|
|
200
|
-
--card-muted: var(--_muted-on-paper, #6b6b6b); /* secondary text inside cards (the default, tone-1 card) */
|
|
201
|
-
--card-3-muted: var(--_muted-on-brand, #b9b9b9); /* the same text on the tone-3 card — a real colour, like the two above: a theme whose brand is not near-black sets it to reach its contrast (the wireframe's #b9b9b9 = white at 0.7 on #141414, what the opacity gave) */
|
|
202
|
-
--card-2-muted: var(--_muted-on-tone-2, #5f5f5f); /* the same text on the tone-2 card — 5.1:1 on its grey (#6b6b6b is 4.3:1, under AA);
|
|
203
|
-
a palette whose tone-2 ground is strong
|
|
204
|
-
sets this to its tone-2 ink — a muted shade cannot reach AA there (clay) */
|
|
208
|
+
--card-border: #141414; /* wireframe: visible outline; coloured mode: --on-surface-muted (palette.css). Its edge, or the fill, holds 3:1 on the ground: cardGrounds() */
|
|
205
209
|
|
|
206
210
|
/* actions */
|
|
207
211
|
--accent: var(--color-brand, #141414); /* primary CTA fill */
|
|
208
|
-
--on-accent: var(--color-on-brand, #ffffff);
|
|
209
212
|
--action-bg: var(--color-paper, #ffffff); /* neutral buttons/chips/inputs */
|
|
210
|
-
--action-ink: var(--color-ink, #141414);
|
|
211
213
|
--action-border: #141414;
|
|
212
214
|
|
|
213
215
|
/* signals (chip dots, deltas) */
|
|
@@ -218,12 +220,15 @@
|
|
|
218
220
|
/* THE SIGNAL SET (Lh 2026-09-25; the standard, Lh 2026-10-02): ok (green) · warn (yellow) · error (red) · info (blue) — the same four
|
|
219
221
|
meanings in every project, wireframe included; a theme may retune the shade, never the meaning. Each is dark enough for words and
|
|
220
222
|
edges and comes with an icon and words, never the colour alone. `--signal-*-soft` (below :root) = its light ground. */
|
|
221
|
-
--signal-warn: #
|
|
222
|
-
--signal-ok: #
|
|
223
|
-
--signal-info: #
|
|
223
|
+
--signal-warn-onlight: #705903; /* each onlight shade 4.5:1 on every light ground, tone 4's grey the darkest (#7f6400 was 3.8 there) */
|
|
224
|
+
--signal-ok-onlight: #27692a;
|
|
225
|
+
--signal-info-onlight: #2e5c98;
|
|
224
226
|
/* highlights (Lh 2026-09-25): four atmosphere colours a palette may set for decoration — a count, a mark, a chart dot; the wireframe keeps them grey */
|
|
225
227
|
--highlight-1: #3d3d3d; --highlight-2: #8a8a8a; --highlight-3: #5f5f5f; --highlight-4: #b0b0b0;
|
|
226
|
-
--signal-error: #
|
|
228
|
+
--signal-error-onlight: #af2525; /* something went wrong — a field's edge, the words that say what */
|
|
229
|
+
/* on a dark ground no shade of one hue holds 4.5:1 on every palette's dark fill and stays itself: a signal there is the ondark ink,
|
|
230
|
+
and the icon and the words carry the meaning. A palette may give its own (orchard) */
|
|
231
|
+
--signal-ok-ondark: var(--ink-ondark); --signal-warn-ondark: var(--ink-ondark); --signal-error-ondark: var(--ink-ondark); --signal-info-ondark: var(--ink-ondark);
|
|
227
232
|
|
|
228
233
|
/* derived tints — read the element's own ink, so they work on any slot */
|
|
229
234
|
--outline: var(--action-border); /* control edges (palette.css softens) */
|
|
@@ -252,14 +257,43 @@
|
|
|
252
257
|
bars take over the page when the app runs edge to edge (viewport-fit=cover: Android Chrome, an iPhone home-screen app).
|
|
253
258
|
PUBLISHED: backgrounds still run to the edge; what the member reads or taps stands clear of them. 0 without cover.
|
|
254
259
|
--_safe-b-open = the bottom inset the keyboard does NOT already cover (a keyboard up hides the gesture bar). */
|
|
255
|
-
/*
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
--
|
|
260
|
-
--
|
|
261
|
-
--
|
|
260
|
+
/* THE ROLES OF THE SCREEN AND OF THE PAPER CONTROLS, from their sides. Re-derived wherever a palette or a mode is set, since one may
|
|
261
|
+
sit on <body>: a custom property is resolved where it is declared. A signal's SOFT ground (what a Snackbar stands on) is its
|
|
262
|
+
onlight shade washed 14% into the surface (tone 2's formula) */
|
|
263
|
+
:root, [data-palette], [data-mode] {
|
|
264
|
+
--on-surface: color-mix(in srgb, var(--ink-ondark) calc(var(--surface-dark) * 100%), var(--ink-onlight));
|
|
265
|
+
--on-surface-muted: color-mix(in srgb, var(--ink-ondark-muted) calc(var(--surface-dark) * 100%), var(--ink-onlight-muted));
|
|
266
|
+
--action-ink: color-mix(in srgb, var(--ink-ondark) calc(var(--action-dark) * 100%), var(--ink-onlight));
|
|
267
|
+
--action-muted: color-mix(in srgb, var(--ink-ondark-muted) calc(var(--action-dark) * 100%), var(--ink-onlight-muted));
|
|
268
|
+
/* the brand as a glyph on the paper (a typed PIN digit, a map's place mark): the brand on a light paper, ondark on a dark one. It stays
|
|
269
|
+
the paper's on a brand card, where --accent turns to the card's ink */
|
|
270
|
+
--action-accent: color-mix(in srgb, var(--ink-ondark) calc(var(--action-dark) * 100%), var(--accent));
|
|
271
|
+
--signal-ok-soft: color-mix(in srgb, var(--signal-ok-onlight) 14%, var(--surface));
|
|
272
|
+
--signal-warn-soft: color-mix(in srgb, var(--signal-warn-onlight) 14%, var(--surface));
|
|
273
|
+
--signal-error-soft: color-mix(in srgb, var(--signal-error-onlight) 14%, var(--surface));
|
|
274
|
+
--signal-info-soft: color-mix(in srgb, var(--signal-info-onlight) 14%, var(--surface));
|
|
262
275
|
}
|
|
276
|
+
/* INK FOLLOWS ITS GROUND (Lh 2026-10-18: "When the ground is light, use onlight; when the ground is dark, use ondark"). A surface
|
|
277
|
+
says only which side it is, `--dark: 0` (light) or `1` (dark), from its fill's side token above; it does so in its own file
|
|
278
|
+
(card.css, media.css…) and is named in this list, which gives it the inks every piece on it reads: --card-ink (words, icons,
|
|
279
|
+
marks, dots: currentColor), --card-muted (secondary words), the four signals, --on-accent (the ink on the accent fill, whose
|
|
280
|
+
side is --accent-dark) and --accent-ink (the brand as a glyph). A piece with no fill of its own reads only these, so a dark
|
|
281
|
+
surface turns everything on it to ondark with no rule per piece. A piece with no fill that stands in for a surface (a stat
|
|
282
|
+
tile) takes its ground's side: `--dark: inherit`. inkGrounds() measures it; README "Ink follows its ground" */
|
|
283
|
+
:where(body, [data-palette], [data-mode], .card, .tile, .modal__drawer, .postcard__front, .postcard__back, .sticky, .post-paper,
|
|
284
|
+
.float-bar__pill, .snackbar__body, .delta, .track, .tile-badge, .avatar, .bubble__body, .map__hint, .sheet--paper > .sheet__body,
|
|
285
|
+
.postcard__band, .track__step, .toggle, .chip) {
|
|
286
|
+
--card-ink: color-mix(in srgb, var(--ink-ondark) calc(var(--dark) * 100%), var(--ink-onlight));
|
|
287
|
+
--card-muted: color-mix(in srgb, var(--ink-ondark-muted) calc(var(--dark) * 100%), var(--ink-onlight-muted));
|
|
288
|
+
--on-accent: color-mix(in srgb, var(--ink-ondark) calc(var(--accent-dark) * 100%), var(--ink-onlight));
|
|
289
|
+
--accent-ink: color-mix(in srgb, var(--ink-ondark) calc(var(--dark) * 100%), var(--accent));
|
|
290
|
+
--signal-ok: color-mix(in srgb, var(--signal-ok-ondark) calc(var(--dark) * 100%), var(--signal-ok-onlight));
|
|
291
|
+
--signal-warn: color-mix(in srgb, var(--signal-warn-ondark) calc(var(--dark) * 100%), var(--signal-warn-onlight));
|
|
292
|
+
--signal-error: color-mix(in srgb, var(--signal-error-ondark) calc(var(--dark) * 100%), var(--signal-error-onlight));
|
|
293
|
+
--signal-info: color-mix(in srgb, var(--signal-info-ondark) calc(var(--dark) * 100%), var(--signal-info-onlight));
|
|
294
|
+
}
|
|
295
|
+
:where(body, [data-palette], [data-mode]) { --dark: var(--surface-dark); }
|
|
296
|
+
|
|
263
297
|
:root { --safe-top: calc(env(safe-area-inset-top, 0px) + var(--vv-top, 0px)); /* + the phone's pan while a keyboard is up (cardds.js) */ --safe-bottom: env(safe-area-inset-bottom, 0px); }
|
|
264
298
|
* { --_safe-b-open: max(0px, var(--safe-bottom) - var(--kb, 0px)); }
|
|
265
299
|
|
package/dist/actions/Chip.d.ts
CHANGED
|
@@ -318,7 +318,7 @@ export interface ChipPickProps extends Omit<ComponentProps<'label'>, 'onChange'>
|
|
|
318
318
|
/** the native input's change event: the chip was picked, or (checkbox) toggled */
|
|
319
319
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
320
320
|
}
|
|
321
|
-
/** ChipPick — a chip that is a choice: full-width in a ChipGrid (9:00 · 9:30 · …), or `sign` on a ChipRow (+ off, × on — the
|
|
321
|
+
/** ChipPick — a chip that is a choice, on a sheet and never in a Card (the sheet is the paper the member fills in, Lh 2026-10-18): full-width in a ChipGrid (9:00 · 9:30 · …), or `sign` on a ChipRow (+ off, × on — the
|
|
322
322
|
* interest picker); the picked one fills with accent. A native radio/checkbox inside the label carries the state. */
|
|
323
323
|
export declare function ChipPick({ type, sign, name, value, checked, defaultChecked, onChange, className, children, ...rest }: ChipPickProps): import("react").JSX.Element;
|
|
324
324
|
export interface ChipRowProps extends ComponentProps<'div'> {
|
package/dist/actions/Chip.js
CHANGED
|
@@ -7,7 +7,7 @@ export function Chip({ on, muted, dot, sm, as, href, className, children, ...res
|
|
|
7
7
|
const el = as ?? (href ? 'a' : 'span');
|
|
8
8
|
return createElement(el, { href, type: el === 'button' ? 'button' : undefined, className: cx('chip', on && 'chip--on', muted && 'chip--muted', sm && 'chip--sm', className), ...rest }, dot && _jsx(Dot, { b: dot === 'b', tone: dot === 'a' || dot === 'b' ? undefined : dot }), children);
|
|
9
9
|
}
|
|
10
|
-
/** ChipPick — a chip that is a choice: full-width in a ChipGrid (9:00 · 9:30 · …), or `sign` on a ChipRow (+ off, × on — the
|
|
10
|
+
/** ChipPick — a chip that is a choice, on a sheet and never in a Card (the sheet is the paper the member fills in, Lh 2026-10-18): full-width in a ChipGrid (9:00 · 9:30 · …), or `sign` on a ChipRow (+ off, × on — the
|
|
11
11
|
* interest picker); the picked one fills with accent. A native radio/checkbox inside the label carries the state. */
|
|
12
12
|
export function ChipPick({ type, sign, name, value, checked, defaultChecked, onChange, className, children, ...rest }) {
|
|
13
13
|
return (_jsxs("label", { className: cx('chip chip--pick', sign && 'chip--sign', className), ...rest, children: [_jsx("input", { type: type ?? (sign ? 'checkbox' : 'radio'), name: name, value: value, checked: checked, defaultChecked: defaultChecked, onChange: onChange }), children] }));
|
|
@@ -22,7 +22,7 @@ export interface DropdownProps extends Omit<ComponentProps<'div'>, 'onChange' |
|
|
|
22
22
|
* Dropdown — THE select: a pill trigger + its Menu popover anchored under it (native popover: light dismiss, Esc). Never a native
|
|
23
23
|
* `<select>`. ONE component, like `<select>` is — the pill and the panel are its own anatomy. It holds a VALUE, controlled like an
|
|
24
24
|
* input: `value` + `onChange`, or `defaultValue`. Children are MenuItems with a `value`; the chosen one is marked and names the pill.
|
|
25
|
-
* In a FilterRow dropdowns share the width.
|
|
25
|
+
* In a FilterRow dropdowns share the width. On a sheet, never in a Card: the sheet is the paper the member fills in (Lh 2026-10-18).
|
|
26
26
|
*/
|
|
27
27
|
export declare function Dropdown({ id, value, defaultValue, onChange, label, end, muted, className, children, ...rest }: DropdownProps): import("react").JSX.Element;
|
|
28
28
|
export interface MenuProps extends Omit<ComponentProps<'div'>, 'popover' | 'onChange' | 'defaultValue'> {
|
package/dist/actions/Dropdown.js
CHANGED
|
@@ -11,7 +11,7 @@ const useValue = (value, defaultValue, onChange) => useControlled(value, default
|
|
|
11
11
|
* Dropdown — THE select: a pill trigger + its Menu popover anchored under it (native popover: light dismiss, Esc). Never a native
|
|
12
12
|
* `<select>`. ONE component, like `<select>` is — the pill and the panel are its own anatomy. It holds a VALUE, controlled like an
|
|
13
13
|
* input: `value` + `onChange`, or `defaultValue`. Children are MenuItems with a `value`; the chosen one is marked and names the pill.
|
|
14
|
-
* In a FilterRow dropdowns share the width.
|
|
14
|
+
* In a FilterRow dropdowns share the width. On a sheet, never in a Card: the sheet is the paper the member fills in (Lh 2026-10-18).
|
|
15
15
|
*/
|
|
16
16
|
export function Dropdown({ id, value, defaultValue, onChange, label, end, muted, className, children, ...rest }) {
|
|
17
17
|
const [current, pick] = useValue(value, defaultValue, onChange);
|