@apliteni/apliteni-ui 0.74.0 → 0.75.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.74.0",
3
+ "version": "0.75.1",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
@@ -182,7 +182,7 @@
182
182
  .ui-input:disabled,
183
183
  .ui-select:disabled,
184
184
  .ui-textarea:disabled {
185
- background: var(--disabled-surface);
185
+ background-color: var(--disabled-surface);
186
186
  border-color: var(--disabled-border);
187
187
  color: var(--disabled-ink);
188
188
  cursor: not-allowed;
@@ -91,12 +91,21 @@
91
91
  .ui-snippet--reveal .ui-snippet__bar > span { color: var(--chip-success-ink); }
92
92
  .ui-snippet--reveal pre { color: var(--chip-success-ink); word-break: break-all; white-space: pre-wrap; }
93
93
 
94
- /* Inline code */
94
+ /* Inline code. The chip paints whichever reading surface its container is not on, so an
95
+ identifier keeps its chip on the page and inside a card, with no edge of its own. The
96
+ container hands the surface over in --code-bg; see src/tokens/tokens.css. #537
97
+
98
+ The chip READS --code-bg and never declares it, which is why its gap can match its paint
99
+ and its ring is composed here instead of in the shared recipe: a chip that re-pointed the
100
+ hand-off would hand the page to itself and paint the page everywhere. Backticks become a
101
+ chip wherever the kit renders prose (fmt() in site/changelog.mjs), so a link inside one is
102
+ ordinary markup and gets the gap of the surface it is actually on. */
95
103
  .ui-code {
96
104
  font-family: var(--font-mono);
97
105
  font-size: 0.9em;
98
- background: var(--surface); --ring-gap: var(--surface);
106
+ background: var(--code-bg); --ring-gap: var(--code-bg);
99
107
  padding: 2px 6px;
100
108
  border-radius: var(--radius-xs);
101
109
  color: var(--text);
110
+ --ring: 0 0 0 var(--ring-gap-width) var(--ring-gap), 0 0 0 calc(var(--ring-gap-width) + var(--ring-width)) var(--ring-color), 0 0 12px 2px color-mix(in srgb, var(--ring-color) 45%, transparent);
102
111
  }
@@ -50,16 +50,16 @@
50
50
  .ui-textarea::placeholder { /* muted-ink: placeholder — empty form field */ color: var(--muted); opacity: 0.9; }
51
51
 
52
52
  /* The value a reader typed is still the value; it goes quiet, it does not fade
53
- into the field under it the way an opacity would take both down together. #220 */
54
- /* `.ui-select` joins these two in #273. It had no disabled rule at all, and it
55
- sets `background: var(--surface-2)` as an author declaration — which outranks
56
- the UA's own grey-out — so a disabled select rendered pixel-identical to a live
57
- one. A pager marked busy showed every button and the jump input visibly off
58
- beside a size control that still looked available. */
53
+ into the field under it the way an opacity would take both down together. #220
54
+ `.ui-select` joined the pair in #273: it paints its own field, which outranks the
55
+ UA's grey-out, so a disabled one had looked exactly like a live one.
56
+ `background-color`, not `background` — the shorthand also resets the three
57
+ longhands the chevron is drawn with (#511). Held by stories/select-chevron.test.js.
58
+ why: docs/specification.md#icons-and-glyphs */
59
59
  .ui-input:disabled,
60
60
  .ui-select:disabled,
61
61
  .ui-textarea:disabled {
62
- background: var(--disabled-surface); /* ring-gap: inherit — control paint; its focus indicator uses the containing surface. */
62
+ background-color: var(--disabled-surface); /* ring-gap: inherit — control paint; its focus indicator uses the containing surface. */
63
63
  border-color: var(--disabled-border);
64
64
  /* muted-ink: state — unavailable control */ color: var(--disabled-ink);
65
65
  cursor: not-allowed;
@@ -123,8 +123,10 @@
123
123
  /* The empty state (.ui-empty) — shown when a table/list has no rows — now
124
124
  lives in styles/empty.css as a standalone component (illustration support). */
125
125
 
126
- /* Tables share their containing card’s reading surface, including pinned cells. */
127
- .ui-card { --table-bg: var(--surface); }
126
+ /* Tables share their containing card’s reading surface, including pinned cells. The code
127
+ chip's hand-off travels with it, so an identifier in a cell keeps the page rather than
128
+ the card the cell is now painted with. why: src/tokens/tokens.css */
129
+ .ui-card { --table-bg: var(--surface); --table-code-bg: var(--bg); }
128
130
 
129
131
  /* White in light, base canvas in dark; never a grey or tinted data surface. */
130
132
  .ui-table { background: var(--table-bg); --ring-gap: var(--table-bg); }
@@ -139,6 +139,16 @@
139
139
  --elev-drop under its inner line. why: docs/specification.md#elevation */
140
140
  --bg: #0e0d14;
141
141
  --table-bg: var(--bg);
142
+ /* A dark table is flush with the page, so the reading surface an inline code chip has
143
+ left inside one is the card. Light's table is white, so there it is the page. */
144
+ --table-code-bg: var(--surface);
145
+ /* A translucent wash paints BEHIND a chip, so it moves the ground and not the chip: the
146
+ pair has to be read against the wash composited over whatever opaque surface is under
147
+ it. Dark's washes lift a near-black ground away from the page, so the page is what the
148
+ chip has left; light's darken white toward the page, so the card is. Both directions
149
+ hold over EVERY opaque ground, which is why this is a token and not a context rule.
150
+ Measured in stories/code-chip.test.js. */
151
+ --wash-code-bg: var(--bg);
142
152
  --surface-2: #161520; /* non-text sunken marks and tracks */
143
153
  --surface: #211e2d; /* the card */
144
154
  --bg-elevated: #2a2639; /* FLOATING — menus, panels, drawer, modal, toasts */
@@ -319,6 +329,8 @@
319
329
  why: docs/specification.md#elevation */
320
330
  --bg: #f2f3f6;
321
331
  --table-bg: #ffffff;
332
+ --table-code-bg: var(--bg);
333
+ --wash-code-bg: var(--surface);
322
334
  --surface-2: #e9ecf3; /* non-text sunken marks and tracks */
323
335
  --surface: #ffffff; /* the card */
324
336
  --bg-elevated: #ffffff; /* FLOATING — menus, panels, drawer, modal, toasts */
@@ -472,9 +484,19 @@
472
484
  --prose-dense: 72ch;
473
485
  }
474
486
 
475
- /* Recompose only at painted containers; controls inherit the outside gap.
476
- * One recipe keeps surface propagation cheap and consistent.
477
- * why: docs/specification.md#the-focus-ring */
487
+ /* An inline code chip is text on a chip, so #455 leaves it two grounds and no grey: the
488
+ * page and the card. It cannot read the one it is on — a var() inside a custom property is
489
+ * substituted on the element that DECLARES it — so the painted container hands it the one
490
+ * it is not using itself, and the chip keeps a step wherever it is written. The page hands
491
+ * over the card below; every painted container hands over the page, in the recipe under it.
492
+ * Held by stories/code-chip.test.js. why: docs/specification.md#elevation */
493
+ :root { --code-bg: var(--surface); }
494
+
495
+ /* Recompose only at painted containers; controls inherit the outside gap, and each hands an
496
+ * inline code chip the page. One recipe keeps surface propagation cheap and consistent.
497
+ * .ui-code composes its own ring in src/styles/code.css instead of joining this list: a
498
+ * chip cannot both paint --code-bg and re-point it, and its gap has to be the surface it
499
+ * actually paints. why: docs/specification.md#the-focus-ring */
478
500
  .amenu,
479
501
  .dtsw,
480
502
  .rx-modal,
@@ -485,7 +507,6 @@
485
507
  .ui-card--accent,
486
508
  .ui-card--live,
487
509
  .ui-cmdk__panel,
488
- .ui-code,
489
510
  .ui-confirm__panel,
490
511
  .ui-drawer__footer,
491
512
  .ui-drawer__panel,
@@ -509,8 +530,38 @@
509
530
  .ui-toast--solid,
510
531
  .vsw__menu {
511
532
  --ring: 0 0 0 var(--ring-gap-width) var(--ring-gap), 0 0 0 calc(var(--ring-gap-width) + var(--ring-width)) var(--ring-color), 0 0 12px 2px color-mix(in srgb, var(--ring-color) 45%, transparent);
533
+ --code-bg: var(--bg);
512
534
  }
513
535
 
536
+ /* The two painted grounds that are not a plain card, and what each has left to hand over.
537
+ *
538
+ * A table paints the page in dark and white in light and follows its card when it is in
539
+ * one, so its hand-off travels with --table-bg as a token pair (src/styles/table.css
540
+ * re-points both). A TINTED surface mixes its colour INTO the card, so the card is the
541
+ * surface it still has: light mixes the tint down from white, which moves a tinted card
542
+ * toward the page and leaves the page 1.02 away, while the card it is a variant of stays
543
+ * 1.07-1.14 off in both themes. Measured in stories/code-chip.test.js. */
544
+ .ui-table,
545
+ .ui-table--sticky thead th,
546
+ .ui-table--pinned .ui-table__identity, .ui-table--pinned .ui-table__selection,
547
+ .ui-table--hover:not(.ui-table--zebra) tbody tr:hover td,
548
+ .ui-table--zebra tbody tr:nth-child(even) td,
549
+ .ui-table--zebra tbody tr:hover td,
550
+ .ui-table--zebra.ui-table--hover tbody tr:hover td { --code-bg: var(--table-code-bg); }
551
+ .ui-card--accent,
552
+ .ui-card--live,
553
+ .ui-snippet--reveal { --code-bg: var(--surface); }
554
+
555
+ /* A wash is not a rung: it is a layer the kit paints OVER one, and it paints behind a chip
556
+ * rather than under it, so the chip's ground moves and the chip does not. These five take
557
+ * caller markup — callout() and the success panel hand their body straight through — so a
558
+ * chip inside one is ordinary product markup rather than a shape anybody hand-places. */
559
+ .ui-callout--info,
560
+ .ui-callout--success,
561
+ .ui-callout--warn,
562
+ .ui-callout--danger,
563
+ .ui-success { --code-bg: var(--wash-code-bg); }
564
+
514
565
  /* A container focused itself paints outside its own surface; descendants only
515
566
  * inherit its inside gap again after focus moves to them. */
516
567
  .ui-card:focus-visible,