@tensor_1/tokens 2.5.0 → 2.6.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/README.md CHANGED
@@ -56,9 +56,24 @@ The following CSS primitives (and their `@tensor_1/react` wrappers) are the inte
56
56
  | Primitive | CSS file | Key `--uix-*` tokens |
57
57
  |---|---|---|
58
58
  | Row selection | `table.css` `tr[aria-selected]` | `--uix-row-selected-bg` |
59
+ | Table column sizing | `table.css` `.uix-col--w-*` / `--flex` / `--truncate` / `--num` · `<Table fixed>` | `--uix-col-w-xs…xl`, `--uix-col-title-min` |
60
+ | Selection bulk bar | `table.css` `.uix-bulkbar` · `<BulkBar>` | `--uix-brand-muted`, `--uix-accent` |
61
+ | Row hover actions / kebab | `table.css` `.uix-table__actions` / `.uix-rowact` · `<RowActions>` / `<RowAction>` | `--uix-bg-active`, `--uix-text-muted` |
62
+ | Expandable row detail | `table.css` `.uix-table__detail` / `.uix-kv` · `<ExpandToggle>` | `--uix-bg-subtle` |
63
+ | Inline cell edit | `table.css` `.uix-cell-edit` | `--uix-ring`, `--uix-success` |
64
+ | Column resize grip | `table.css` `.uix-table__resize` | `--uix-accent` |
65
+ | Search-match highlight | `table.css` `.uix-mark` · `<Mark>` / `<Highlighted>` | `--uix-warning-bg`, `--uix-warning` |
66
+ | Cell content vocabulary | `table.css` `.uix-cell-strong` / `-sub` / `-mono` · `<CellStrong>` / `<CellSub>` | `--uix-text-muted`, `--uix-font-mono` |
67
+ | Responsive table ladder | `table.css` `.uix-table--priority` / `--cards` | `--uix-border`, `--uix-surface`, `--uix-shadow-sm` |
68
+ | Record compare view | `table.css` `.uix-compare` | `--uix-border`, `--uix-surface`, `--uix-bg-subtle` |
59
69
  | Utilization / threshold bar | `meter.css` · `<Meter>` | `--uix-attention`, `--uix-overdue`, `--uix-warning`, `--uix-danger` |
60
70
  | Triage inbox | `inbox.css` · `<Inbox>` / `<InboxItem>` | `--uix-brand-muted`, `--uix-accent` (accent stripe) |
61
71
  | Status + SLA + priority pill | `status-pill.css` · `<StatusPill>` | `--uix-sla-ok/at-risk/breached`, `--uix-p1`…`--uix-p5`, `--uix-attention`, `--uix-overdue` |
62
72
  | Entity detail related-panels | `<DetailLayout>` (`@tensor_1/react`) | `--uix-surface`, `--uix-border` |
73
+ | App-shell nav width tiers | `app-shell.css` `.uix-shell[data-nav="full\|rail\|hidden"]` · `<AppShell nav>` | `--uix-sidebar-w`, `--uix-sidebar-w-rail` |
74
+ | Shell focus / full-bleed | `app-shell.css` `.uix-shell[data-focus]` / `.uix-shell__main--bleed` · `<AppShell focus mainBleed>` | `--uix-z-overlay`, `--uix-space-7` |
75
+ | Table logic engine | `@tensor_1/react` `table-engine` (multiSort / applyFilters / searchRows / serializeView / virtualWindow / selection) | — behaviour primitive; keeps vanilla + React grids identical |
63
76
 
64
77
  If you reach for `var(--uix-danger)` or `var(--uix-warning)` to render SLA urgency or severity, use `<StatusPill tone="sla-breached">` or `<StatusPill tone="p1">` instead — the component handles WCAG contrast, dark mode, and brand overrides; a raw literal does not.
78
+
79
+ Likewise, don't fork the data grid: a product-local `data-table.tsx` (bespoke sort/filter/selection/resize + hand-coded column widths) should be replaced by `<Table>` + the subcomponents above, composed over the framework-agnostic `table-engine` (or the `useTable` hook). Sorting, filtering, search highlighting, saved views, and virtualization then match the vanilla styleguide exactly, and every visual affordance re-themes with the tokens listed here.
@@ -351,17 +351,39 @@
351
351
  /* uix app shell — sidebar + topbar + content grid. Depends only on --uix-* tokens. */
352
352
  @layer uix.components {
353
353
  .uix-shell {
354
+ position: relative;
354
355
  display: grid;
355
356
  grid-template-columns: var(--uix-sidebar-w) 1fr;
356
357
  grid-template-rows: var(--uix-topbar-h) 1fr;
357
358
  height: 100%; min-height: 360px;
358
359
  border: 1px solid var(--uix-border); border-radius: var(--uix-radius-lg); overflow: hidden;
359
- transition: grid-template-columns var(--uix-dur) var(--uix-ease-out);
360
+ transition: grid-template-columns var(--uix-dur) var(--uix-ease-out), grid-template-rows var(--uix-dur) var(--uix-ease-out);
360
361
  }
361
- .uix-shell__sidebar { grid-row: 1 / 3; background: var(--uix-bg-subtle); border-right: 1px solid var(--uix-border); overflow-y: auto; }
362
+ .uix-shell__sidebar { grid-row: 1 / 3; background: var(--uix-bg-subtle); border-right: 1px solid var(--uix-border); overflow-y: auto; overflow-x: hidden; }
362
363
  .uix-shell__topbar { grid-column: 2; display: flex; align-items: center; gap: var(--uix-space-3); padding: 0 var(--uix-space-6); background: var(--uix-bg-app); border-bottom: 1px solid var(--uix-border); }
363
364
  .uix-shell__main { grid-column: 2; overflow: auto; padding: var(--uix-space-7); background: var(--uix-bg-app); }
364
- .uix-shell[data-collapsed] { grid-template-columns: 56px 1fr; }
365
+
366
+ /* ── nav width tiers ──────────────────────────────────────────────────────────
367
+ Progressive reveal for wide, many-column tables: full (default) → rail (icon
368
+ only) → hidden (0). data-collapsed stays a back-compat alias for the rail. */
369
+ .uix-shell[data-nav="rail"], .uix-shell[data-collapsed] { grid-template-columns: var(--uix-sidebar-w-rail) 1fr; }
370
+ .uix-shell[data-nav="hidden"] { grid-template-columns: 0 1fr; }
371
+
372
+ /* ── focus / immersive mode ───────────────────────────────────────────────────
373
+ A table-scoped escape hatch: hide the sidebar AND the topbar so a dense grid
374
+ uses the whole frame. The app toggles [data-focus] (from a toolbar maximize
375
+ control) and restores the previous nav state + focus on Esc. */
376
+ .uix-shell[data-focus] { grid-template-columns: 0 1fr; grid-template-rows: 0 1fr; }
377
+ .uix-shell[data-focus] .uix-shell__topbar { display: none; }
378
+
379
+ /* a floating host for the "exit focus" affordance (Esc also exits) */
380
+ .uix-shell__focus-exit { position: absolute; top: var(--uix-space-3); right: var(--uix-space-3); z-index: var(--uix-z-overlay); }
381
+
382
+ /* ── full-bleed main ──────────────────────────────────────────────────────────
383
+ Opt-in per surface: a genuinely wide grid drops the content gutter and runs
384
+ edge to edge, reclaiming 2 x --uix-space-7. Not the default — most pages want
385
+ the gutter. Pair with a frozen identifier column for horizontal scroll. */
386
+ .uix-shell__main--bleed { padding: 0; }
365
387
  }
366
388
  /* uix sidebar nav — items, favorites, collapsible sub-items, collapsed rail. Depends only on --uix-* tokens. */
367
389
  @layer uix.components {
@@ -415,7 +437,7 @@
415
437
  .uix-subitem .uix-navitem__label::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--uix-text-muted); margin-right: var(--uix-space-3); vertical-align: middle; }
416
438
 
417
439
  /* collapsed rail */
418
- .uix-sidebar[data-collapsed] { width: 56px; }
440
+ .uix-sidebar[data-collapsed], .uix-sidebar[data-nav="rail"] { width: var(--uix-sidebar-w-rail); }
419
441
  .uix-sidebar[data-collapsed] .uix-navitem__label,
420
442
  .uix-sidebar[data-collapsed] .uix-navitem__badge,
421
443
  .uix-sidebar[data-collapsed] .uix-navitem__star,
@@ -647,17 +647,39 @@
647
647
  /* uix app shell — sidebar + topbar + content grid. Depends only on --uix-* tokens. */
648
648
  @layer uix.components {
649
649
  .uix-shell {
650
+ position: relative;
650
651
  display: grid;
651
652
  grid-template-columns: var(--uix-sidebar-w) 1fr;
652
653
  grid-template-rows: var(--uix-topbar-h) 1fr;
653
654
  height: 100%; min-height: 360px;
654
655
  border: 1px solid var(--uix-border); border-radius: var(--uix-radius-lg); overflow: hidden;
655
- transition: grid-template-columns var(--uix-dur) var(--uix-ease-out);
656
+ transition: grid-template-columns var(--uix-dur) var(--uix-ease-out), grid-template-rows var(--uix-dur) var(--uix-ease-out);
656
657
  }
657
- .uix-shell__sidebar { grid-row: 1 / 3; background: var(--uix-bg-subtle); border-right: 1px solid var(--uix-border); overflow-y: auto; }
658
+ .uix-shell__sidebar { grid-row: 1 / 3; background: var(--uix-bg-subtle); border-right: 1px solid var(--uix-border); overflow-y: auto; overflow-x: hidden; }
658
659
  .uix-shell__topbar { grid-column: 2; display: flex; align-items: center; gap: var(--uix-space-3); padding: 0 var(--uix-space-6); background: var(--uix-bg-app); border-bottom: 1px solid var(--uix-border); }
659
660
  .uix-shell__main { grid-column: 2; overflow: auto; padding: var(--uix-space-7); background: var(--uix-bg-app); }
660
- .uix-shell[data-collapsed] { grid-template-columns: 56px 1fr; }
661
+
662
+ /* ── nav width tiers ──────────────────────────────────────────────────────────
663
+ Progressive reveal for wide, many-column tables: full (default) → rail (icon
664
+ only) → hidden (0). data-collapsed stays a back-compat alias for the rail. */
665
+ .uix-shell[data-nav="rail"], .uix-shell[data-collapsed] { grid-template-columns: var(--uix-sidebar-w-rail) 1fr; }
666
+ .uix-shell[data-nav="hidden"] { grid-template-columns: 0 1fr; }
667
+
668
+ /* ── focus / immersive mode ───────────────────────────────────────────────────
669
+ A table-scoped escape hatch: hide the sidebar AND the topbar so a dense grid
670
+ uses the whole frame. The app toggles [data-focus] (from a toolbar maximize
671
+ control) and restores the previous nav state + focus on Esc. */
672
+ .uix-shell[data-focus] { grid-template-columns: 0 1fr; grid-template-rows: 0 1fr; }
673
+ .uix-shell[data-focus] .uix-shell__topbar { display: none; }
674
+
675
+ /* a floating host for the "exit focus" affordance (Esc also exits) */
676
+ .uix-shell__focus-exit { position: absolute; top: var(--uix-space-3); right: var(--uix-space-3); z-index: var(--uix-z-overlay); }
677
+
678
+ /* ── full-bleed main ──────────────────────────────────────────────────────────
679
+ Opt-in per surface: a genuinely wide grid drops the content gutter and runs
680
+ edge to edge, reclaiming 2 x --uix-space-7. Not the default — most pages want
681
+ the gutter. Pair with a frozen identifier column for horizontal scroll. */
682
+ .uix-shell__main--bleed { padding: 0; }
661
683
  }
662
684
  /* uix sidebar nav — items, favorites, collapsible sub-items, collapsed rail. Depends only on --uix-* tokens. */
663
685
  @layer uix.components {
@@ -711,7 +733,7 @@
711
733
  .uix-subitem .uix-navitem__label::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--uix-text-muted); margin-right: var(--uix-space-3); vertical-align: middle; }
712
734
 
713
735
  /* collapsed rail */
714
- .uix-sidebar[data-collapsed] { width: 56px; }
736
+ .uix-sidebar[data-collapsed], .uix-sidebar[data-nav="rail"] { width: var(--uix-sidebar-w-rail); }
715
737
  .uix-sidebar[data-collapsed] .uix-navitem__label,
716
738
  .uix-sidebar[data-collapsed] .uix-navitem__badge,
717
739
  .uix-sidebar[data-collapsed] .uix-navitem__star,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tensor_1/tokens",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "UIx v2 design tokens — the --uix-* contract for house products (Tensor, POSx, SHOPx). One DTCG source -> CSS variables, Tailwind theme, and typed TS constants.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",