@tensor_1/tokens 2.37.0 → 2.39.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tensor_1/tokens",
3
- "version": "2.37.0",
3
+ "version": "2.39.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
  "sideEffects": [
@@ -59,6 +59,9 @@
59
59
  color: var(--uix-text-muted); font-size: var(--uix-text-meta);
60
60
  }
61
61
  .uix-chart__source { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
62
+ /* CorrelationScatter (HAR-1554): the stats caption always says "association, not cause". */
63
+ .uix-chart__stats { margin: 0; color: var(--uix-text-muted); font-size: var(--uix-text-meta); font-variant-numeric: tabular-nums; }
64
+ .uix-chart__insufficient { color: var(--uix-text-muted); font-size: var(--uix-text-meta); }
62
65
  .uix-legend { display: flex; flex-wrap: wrap; gap: var(--uix-space-2) var(--uix-space-4); margin: 0; padding: 0; list-style: none; }
63
66
  .uix-legend__item { display: inline-flex; align-items: center; gap: var(--uix-space-2); color: var(--uix-text-hushed); font-size: var(--uix-text-meta); }
64
67
  .uix-legend__swatch { width: 10px; height: 10px; flex: none; border-radius: var(--uix-radius-xs); background: var(--legend-color, var(--uix-chart-1)); }
@@ -0,0 +1,73 @@
1
+ /* uix insight card (HAR-1556) — a card whose headline is the answer: status (text + icon), KPIs with a
2
+ comparison and a bullet against target, the chart, an optional aside (a scatter), coverage, source and
3
+ one action. The card is an inline-size container: `data-layout="split"` puts the aside beside the
4
+ chart from 60rem (960 px) of CARD width, and stacks below that. Tones are neutral-first: only a
5
+ warning or a critical status takes a hue, and it always carries its label and icon. */
6
+ @layer uix.components {
7
+ .uix-insight {
8
+ container: uix-insight / inline-size;
9
+ display: flex; flex-direction: column; gap: var(--uix-space-4);
10
+ min-width: 0; padding: var(--uix-space-5);
11
+ border: 1px solid var(--uix-border); border-radius: var(--uix-radius-lg);
12
+ background: var(--uix-surface); color: var(--uix-text);
13
+ }
14
+ /* Inside another frame (a dashboard widget): no border, surface or outer padding of its own. */
15
+ .uix-insight--plain { padding: 0; border: 0; border-radius: 0; background: transparent; }
16
+ .uix-insight__header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--uix-space-2) var(--uix-space-4); min-width: 0; }
17
+ .uix-insight__heading { flex: 1 1 18rem; min-width: 0; }
18
+ .uix-insight__eyebrow {
19
+ margin-bottom: var(--uix-space-1); color: var(--uix-text-muted);
20
+ font-size: var(--uix-text-eyebrow); font-weight: 600; letter-spacing: var(--uix-tracking-eyebrow); text-transform: uppercase;
21
+ }
22
+ .uix-insight__headline { margin: 0; color: var(--uix-text); font-size: var(--uix-text-h3); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
23
+ .uix-insight__sowhat { margin: var(--uix-space-1) 0 0; color: var(--uix-text-hushed); font-size: var(--uix-text-body); line-height: 1.5; overflow-wrap: anywhere; }
24
+ .uix-insight__status {
25
+ display: inline-flex; flex: none; align-items: center; gap: var(--uix-space-1);
26
+ padding: var(--uix-space-1) var(--uix-space-2); line-height: 1; border: 1px solid var(--uix-border); border-radius: var(--uix-radius-pill);
27
+ color: var(--uix-text-hushed); font-size: var(--uix-text-meta); font-weight: 600; white-space: nowrap;
28
+ }
29
+ .uix-insight__status[data-tone="warning"] { border-color: var(--uix-warning-border); color: var(--uix-warning-text); }
30
+ .uix-insight__status[data-tone="critical"] { border-color: var(--uix-danger-border); color: var(--uix-danger-text); }
31
+
32
+ .uix-insight__kpis {
33
+ display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
34
+ gap: var(--uix-space-3) var(--uix-space-5); margin: 0;
35
+ }
36
+ .uix-insight__kpi { display: flex; flex-direction: column; gap: var(--uix-space-1); min-width: 0; }
37
+ .uix-insight__kpi dd { margin: 0; }
38
+ .uix-insight__kpi-label { order: 0; color: var(--uix-text-muted); font-size: var(--uix-text-meta); }
39
+ .uix-insight__kpi-value { order: -1; color: var(--uix-text); font-size: var(--uix-text-h2); font-weight: 600; line-height: 1.15; letter-spacing: var(--uix-tracking-tight); }
40
+ .uix-insight__kpi-comparison { color: var(--uix-text-hushed); font-size: var(--uix-text-meta); font-weight: 600; }
41
+ .uix-insight__kpi-comparison[data-tone="positive"] { color: var(--uix-success); }
42
+ .uix-insight__kpi-comparison[data-tone="negative"] { color: var(--uix-danger-text); }
43
+ .uix-insight__kpi-comparison[data-tone="warning"] { color: var(--uix-warning-text); }
44
+ .uix-insight__kpi-target { padding-top: var(--uix-space-1); }
45
+
46
+ .uix-insight__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--uix-space-4); min-width: 0; }
47
+ .uix-insight__main, .uix-insight__aside { min-width: 0; }
48
+ .uix-insight__body > * > .uix-chart { padding: 0; border: 0; box-shadow: none; background: transparent; }
49
+ @container uix-insight (min-width: 60rem) {
50
+ .uix-insight[data-layout="split"] .uix-insight__body:has(> .uix-insight__aside) { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
51
+ }
52
+
53
+ .uix-insight__footer {
54
+ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--uix-space-3) var(--uix-space-4);
55
+ padding-top: var(--uix-space-3); border-top: 1px solid var(--uix-border);
56
+ }
57
+ .uix-insight__meta { display: flex; flex: 1 1 16rem; flex-direction: column; gap: var(--uix-space-1); min-width: 0; color: var(--uix-text-muted); font-size: var(--uix-text-meta); }
58
+ .uix-insight__coverage, .uix-insight__source { display: flex; flex-wrap: wrap; gap: 0 var(--uix-space-3); margin: 0; overflow-wrap: anywhere; }
59
+ .uix-insight__partial { color: var(--uix-text-hushed); }
60
+ .uix-insight__actions { display: flex; flex-wrap: wrap; gap: var(--uix-space-2); }
61
+
62
+ /* Bullet (Few): bands in neutral steps, the actual as a dark bar, the target as a tick. */
63
+ .uix-bullet { position: relative; width: 100%; min-width: 6rem; height: 12px; border-radius: var(--uix-radius-xs); background: var(--uix-bg-subtle); }
64
+ .uix-bullet__range { position: absolute; top: 0; bottom: 0; background: var(--uix-bg-active); }
65
+ .uix-bullet__range[data-band="1"] { background: var(--uix-bg-hover); }
66
+ .uix-bullet__range[data-band="2"] { background: var(--uix-bg-subtle); }
67
+ .uix-bullet__bar { position: absolute; top: 4px; left: 0; height: 4px; border-radius: var(--uix-radius-xs); background: var(--uix-text); }
68
+ .uix-bullet__target { position: absolute; top: 0; bottom: 0; width: 2px; translate: -50% 0; background: var(--uix-text); }
69
+ @media (forced-colors: active) {
70
+ .uix-bullet { border: 1px solid CanvasText; }
71
+ .uix-bullet__bar, .uix-bullet__target { background: CanvasText; }
72
+ }
73
+ }
@@ -62,7 +62,7 @@
62
62
  .uix-search-suggest__icon svg { width: var(--uix-icon-md); height: var(--uix-icon-md); }
63
63
  .uix-search-suggest__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
64
64
  .uix-search-suggest__title {
65
- font-size: var(--uix-text-body); font-weight: 500; line-height: 1.35;
65
+ font-size: var(--uix-text-body); font-weight: 400; line-height: 1.35;
66
66
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
67
67
  }
68
68
 
@@ -23,12 +23,13 @@
23
23
  .uix-stat--compact .uix-stat__value { font-size: var(--uix-text-h3); line-height: var(--uix-leading-h3); margin-top: var(--uix-space-1); }
24
24
  .uix-stat--compact .uix-stat__meta { margin-top: var(--uix-space-1); }
25
25
 
26
- /* interactive — the whole tile is a <button> that opens an editor */
26
+ /* interactive — the whole tile is a <button> that opens an editor. A flex column, not a
27
+ block: a <button> stretched by its row centres block content (HAR-1753). */
27
28
  .uix-stat--interactive {
28
- display: block; width: 100%; font: inherit; color: inherit; text-align: start; cursor: pointer;
29
+ display: flex; flex-direction: column; width: 100%; font: inherit; color: inherit; text-align: start; cursor: pointer;
29
30
  transition: background-color var(--uix-dur-fast) var(--uix-ease-out), border-color var(--uix-dur-fast) var(--uix-ease-out);
30
31
  }
31
- .uix-stat--interactive:hover { background: var(--uix-bg-hover); border-color: var(--uix-border-strong); }
32
+ .uix-stat--interactive:hover:where(:not([aria-busy="true"])) { background: var(--uix-bg-hover); border-color: var(--uix-border-strong); }
32
33
  .uix-stat--interactive.uix-stat--warning:hover { border-color: var(--uix-warning-border); }
33
34
  .uix-stat--interactive.uix-stat--danger:hover { border-color: var(--uix-danger-border); }
34
35
  .uix-stat--interactive:focus-visible { outline: 2px solid var(--uix-ring); outline-offset: 2px; }
@@ -36,6 +37,8 @@
36
37
  .uix-stat__chevron { display: inline-flex; flex: none; margin-inline-start: auto; color: var(--uix-text-muted); }
37
38
  .uix-stat__label .uix-stat__chevron svg { width: var(--uix-icon-sm); height: var(--uix-icon-sm); transition: transform var(--uix-dur-fast) var(--uix-ease-out); }
38
39
  .uix-stat--interactive[aria-expanded="true"] .uix-stat__chevron svg { transform: rotate(180deg); }
40
+ /* pending — aria-busy with aria-disabled, never :disabled, so the button keeps focus */
41
+ .uix-stat--interactive[aria-busy="true"] { cursor: progress; opacity: .6; }
39
42
  /* link — the whole tile is an <a> to a filtered list or a record (HAR-1350) */
40
43
  .uix-stat--link { text-decoration: none; }
41
44
  /* current: the ring outline only; a brand tint would drop the muted label below AA */