@apliteni/apliteni-ui 0.115.0 → 0.116.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.
@@ -68,3 +68,5 @@
68
68
  **Don't:** Put text on grey fields, chips, headers or footers.
69
69
 
70
70
  **Except:** The sidebar rail's current row. Its mark may be neither an accent nor an edge — an outline there means focus — and in the page shell the rail is the card surface already. It takes the quiet fill a rung off its rail, label and all. Artur, r34 of [#475](https://github.com/apliteni/apliteni-ui/issues/475).
71
+
72
+ **Except:** A status chip carries a soft fill. Where its tone reports no verdict it takes a light tint of muted ink that leaves the panel in one direction per theme, so the neutral tones read as the same family as the coloured ones.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.115.0",
3
+ "version": "0.116.0",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
@@ -1 +1,9 @@
1
- export const calloutIcons = { info: 'info', success: 'check', warn: 'alert', danger: 'alert', neutral: 'info' };
1
+ // Default glyph per callout tone. A callout REPORTS a state, so its status
2
+ // glyphs are the circled ones — the same family toast() uses (TOAST_ICON in
3
+ // src/components/index.js) and the same split iconMeanings writes down. The
4
+ // bare `check` and `alert` this used to ship read as actions, which is why
5
+ // every showcase overrode them per instance. #453
6
+ //
7
+ // Neutral keeps `info` rather than the toast's `bolt`: a neutral callout is a
8
+ // standing note on the page, not something that just happened.
9
+ export const calloutIcons = { info: 'info', success: 'circleCheck', warn: 'circleAlert', danger: 'circleX', neutral: 'info' };
@@ -15,24 +15,29 @@
15
15
  padding: 3px 9px;
16
16
  border-radius: var(--radius-pill);
17
17
  color: var(--text);
18
- background: var(--surface); /* code-bg: inherit — decorative or text-only paint; nothing nested reads a ground from it. */
18
+ background: var(--chip-neutral-fill);
19
19
  white-space: nowrap;
20
20
  }
21
21
  /* Status chips take the --chip-* pairs, so the light app's solid fills live in
22
22
  tokens.css rather than in a theme override down here: on white the glow-tints
23
- wash out and the ink has to deepen to clear AA, and that is a token decision. */
24
- .ui-badge--live { color: var(--chip-success-ink); background: var(--chip-success-fill); /* code-bg: inherit — decorative or text-only paint; nothing nested reads a ground from it. */ }
25
- .ui-badge--soon { color: var(--accent); background: var(--surface); /* code-bg: inherit — a wash paints over a ground and behind a chip, so the opaque ground below it is the step. */ }
26
- .ui-badge--info { color: var(--chip-info-ink); background: var(--chip-info-fill); /* code-bg: inherit — decorative or text-only paint; nothing nested reads a ground from it. */ }
23
+ wash out and the ink has to deepen to clear AA, and that is a token decision.
24
+ The tones with no status take --chip-neutral-fill for the same reason: before #453
25
+ they painted the opaque --surface, the one soft badge fill that sat DARKER than the
26
+ panel in dark. why: docs/foundations.md#elevation
27
+ Soon takes body ink here, not --accent: accent ink measured 4.04:1 on a dark floating
28
+ panel under three of the four accents, body ink 9.74:1. See docs/foundations.md. */
29
+ .ui-badge--live { color: var(--chip-success-ink); background: var(--chip-success-fill); }
30
+ .ui-badge--soon { color: var(--text); background: var(--chip-neutral-fill); }
31
+ .ui-badge--info { color: var(--chip-info-ink); background: var(--chip-info-fill); }
27
32
  .ui-badge--warn { color: var(--chip-warn-ink); background: var(--chip-warn-fill); }
28
- .ui-badge--danger { color: var(--chip-danger-ink); background: var(--chip-danger-fill); /* code-bg: inherit — decorative or text-only paint; nothing nested reads a ground from it. */ }
29
- .ui-badge--archive { /* muted-ink: state — archived record */ color: var(--muted); background: var(--surface); /* code-bg: inherit — decorative or text-only paint; nothing nested reads a ground from it. */ }
33
+ .ui-badge--danger { color: var(--chip-danger-ink); background: var(--chip-danger-fill); }
34
+ .ui-badge--archive { /* muted-ink: state — archived record */ color: var(--muted); background: var(--chip-neutral-fill); }
30
35
 
31
36
  /* Semantic status variants — for record/row status in data tables
32
37
  (paid / verified / pending / failed …). Same chip, mapped to meaning. */
33
- .ui-badge--success { color: var(--chip-success-ink); background: var(--chip-success-fill); /* code-bg: inherit — decorative or text-only paint; nothing nested reads a ground from it. */ }
38
+ .ui-badge--success { color: var(--chip-success-ink); background: var(--chip-success-fill); }
34
39
  .ui-badge--pending { color: var(--chip-warn-ink); background: var(--chip-warn-fill); }
35
- .ui-badge--neutral { color: var(--text); background: var(--surface); /* code-bg: inherit — decorative or text-only paint; nothing nested reads a ground from it. */ }
40
+ .ui-badge--neutral { color: var(--text); background: var(--chip-neutral-fill); }
36
41
 
37
42
  /* Pill: same shape, sentence case, a touch larger — a metadata chip */
38
43
  .ui-pill {
@@ -42,7 +47,7 @@
42
47
  /* rank: chip */
43
48
  font-size: var(--text-xs);
44
49
  color: var(--text);
45
- background: var(--surface); /* code-bg: inherit — decorative or text-only paint; nothing nested reads a ground from it. */
50
+ background: var(--chip-neutral-fill);
46
51
  border-radius: var(--radius-pill);
47
52
  padding: 4px 11px;
48
53
  font-weight: var(--weight-semibold);
@@ -50,8 +55,8 @@
50
55
  /* The live pill is the same status paint as the live badge, so it takes the
51
56
  same pair. On its own it was --green on --glow-green, which is 3.97:1 over
52
57
  white — under AA, while the badge beside it cleared at 4.64:1. See issue #131. */
53
- .ui-pill--live { color: var(--chip-success-ink); background: var(--chip-success-fill); /* code-bg: inherit — decorative or text-only paint; nothing nested reads a ground from it. */ }
54
- .ui-pill--soon { color: var(--accent); background: var(--surface); /* code-bg: inherit — a wash paints over a ground and behind a chip, so the opaque ground below it is the step. */ }
58
+ .ui-pill--live { color: var(--chip-success-ink); background: var(--chip-success-fill); }
59
+ .ui-pill--soon { color: var(--text); background: var(--chip-neutral-fill); }
55
60
 
56
61
  /* Status dot */
57
62
  .ui-dot {
@@ -295,12 +295,12 @@
295
295
  margin-left: auto;
296
296
  flex: none;
297
297
  color: var(--text);
298
- background: color-mix(in srgb, var(--muted) 12%, transparent); /* code-bg: inherit — decorative or text-only paint; nothing nested reads a ground from it. */
299
- }
300
- .ui-dropdown__badge.is-live { color: var(--chip-success-ink); background: var(--chip-success-fill); /* code-bg: inherit — decorative or text-only paint; nothing nested reads a ground from it. */ }
301
- :root[data-theme="light"] .ui-dropdown__badge:not(.is-live) {
302
- background: color-mix(in srgb, var(--muted) 15%, transparent); /* code-bg: inherit — decorative or text-only paint; nothing nested reads a ground from it. */
298
+ /* The kit's one neutral chip fill, which #453 moved into a token so the badge, the
299
+ pill, this chip and the version badge are one family. The per-theme alphas that
300
+ used to be written here twice live with the token. */
301
+ background: var(--chip-neutral-fill); /* ring-gap: inherit — translucent wash retains the opaque containing gap. */
303
302
  }
303
+ .ui-dropdown__badge.is-live { color: var(--chip-success-ink); background: var(--chip-success-fill); /* code-bg: inherit — decorative or text-only surface has no nested chip. */ }
304
304
 
305
305
  /* Disabled + danger rows */
306
306
  .ui-dropdown__item.is-disabled { /* muted-ink: state — unavailable control */ color: var(--disabled-ink); cursor: not-allowed; pointer-events: none; }
@@ -226,8 +226,11 @@
226
226
  flex: none;
227
227
  margin-top: 1px;
228
228
  }
229
- .vbadge.live { color: var(--chip-success-ink); background: var(--chip-success-fill); /* code-bg: inherit — decorative or text-only paint; nothing nested reads a ground from it. */ }
230
- .vbadge.arch { /* muted-ink: state — archived version */ color: var(--muted); background: var(--surface); /* code-bg: inherit — decorative or text-only paint; nothing nested reads a ground from it. */ }
229
+ .vbadge.live { color: var(--chip-success-ink); background: var(--chip-success-fill); /* code-bg: inherit — decorative or text-only surface has no nested chip. */ }
230
+ /* The archived version badge is the archive badge tone in a floating menu, so it takes
231
+ the same neutral chip fill rather than the card surface — which, inside a panel that
232
+ is itself lighter than a card, was darker than the ground it sat on. #453 */
233
+ .vbadge.arch { /* muted-ink: state — archived version */ color: var(--muted); background: var(--chip-neutral-fill); /* ring-gap: inherit — translucent wash retains the opaque containing gap. */ }
231
234
  /* The phone step — the same one the rail folds at: docs/foundations.md#breakpoints.
232
235
  The switcher keeps its glyph and drops its label.
233
236
  The menu hangs the other way here. Anchored by its left edge it opened
@@ -233,10 +233,18 @@
233
233
  --chip-success-fill: var(--glow-green);
234
234
  --chip-warn-ink: var(--amber);
235
235
  --chip-warn-fill: color-mix(in srgb, var(--amber) 15%, transparent);
236
- --chip-danger-ink: var(--pink);
236
+ /* Not --pink: that reads 4.23:1 on this fill over a floating panel, under the 4.5:1 badge
237
+ floor. Same hue lifted toward white — 8.64 page / 7.02 card / 6.30 panel. The signal
238
+ and the solid-toast pair keep --pink. why: docs/foundations.md#colour-and-contrast, #453 */
239
+ --chip-danger-ink: #f5aec6;
237
240
  --chip-danger-fill: var(--glow-pink);
238
241
  --chip-info-ink: var(--cyan);
239
242
  --chip-info-fill: var(--glow-cyan);
243
+ /* The fill of a chip with no status to carry. The themes match on SEPARATION, not on
244
+ alpha — 12% here is 1.22:1 off the card, 15% in light is 1.23:1 — because --muted is
245
+ a light violet-grey in dark and a mid slate in light.
246
+ why: docs/foundations.md#colour-and-contrast, #453 */
247
+ --chip-neutral-fill: color-mix(in srgb, var(--muted) 12%, transparent);
240
248
 
241
249
  /* Solid signal surfaces — a status that has stopped being ink and become the FILL (a
242
250
  solid toast). Fill and ink are ONE pair, never two independent picks: the fill is the
@@ -412,7 +420,10 @@
412
420
  chip text clears WCAG AA on its own pale fill, and on the soft toast's wash, which
413
421
  #131 gave the same ink. Three came down again at #295 with the page; danger did not
414
422
  need to. */
415
- --chip-success-ink: #1c7034;
423
+ /* Success is held at the 7:1 body aim rather than the 4.5:1 floor: 7.17:1 on its own
424
+ fill, 8.33:1 on the card. Was #1c7034 at 5.29:1. The fill did not move.
425
+ why: docs/foundations.md#colour-and-contrast, #453 */
426
+ --chip-success-ink: #145a26;
416
427
  --chip-success-fill: #dff3e4;
417
428
  --chip-warn-ink: #825900;
418
429
  --chip-warn-fill: #fbedd2;
@@ -423,6 +434,8 @@
423
434
  already occupy. See issue #131. */
424
435
  --chip-info-ink: #096a7c;
425
436
  --chip-info-fill: #ddeff3;
437
+ /* See the dark block for why the two alphas differ. */
438
+ --chip-neutral-fill: color-mix(in srgb, var(--muted) 13%, transparent);
426
439
 
427
440
  /* Light runs the same rule the other way. The signals are mid-tone here, so NO ink
428
441
  rescues them and the fill is what has to move: it takes the deepened form the chip
@@ -579,3 +592,18 @@
579
592
  .ui-callout--warn,
580
593
  .ui-callout--danger,
581
594
  .ui-success { --code-bg: var(--wash-code-bg); }
595
+
596
+ /* React badges and pills accept inline code on opaque or translucent status fills. */
597
+ .ui-badge,
598
+ .ui-badge--live,
599
+ .ui-badge--soon,
600
+ .ui-badge--info,
601
+ .ui-badge--warn,
602
+ .ui-badge--danger,
603
+ .ui-badge--archive,
604
+ .ui-badge--success,
605
+ .ui-badge--pending,
606
+ .ui-badge--neutral,
607
+ .ui-pill,
608
+ .ui-pill--live,
609
+ .ui-pill--soon { --code-bg: var(--wash-code-bg); }