@brightweblabs/theme 0.7.1 → 0.7.3

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
@@ -27,13 +27,22 @@ The family contract starts at `--font-body`, `--font-heading`, and `--font-code`
27
27
  | `text-meta` | `0.75rem` | Secondary metadata |
28
28
  | `text-label` | `0.6875rem` | Uppercase interface label |
29
29
  | `text-micro` | `0.625rem` | Dense supporting copy |
30
- | `text-metric` | `2.75rem` | Monospaced primary metric |
31
- | `text-metric-display` | `2.75rem` | Display-face primary metric |
32
- | `text-metric-lg` | `3.5rem` | Large display metric |
33
-
34
- Existing recipes remain supported and preserve their rendered values:
35
-
36
- | Compatibility utility | Canonical utility |
30
+ | `text-kpi` | `2.75rem` | Display-face headline KPI |
31
+ | `text-kpi-lg` | `3.5rem` | Large display-face headline KPI |
32
+ | `text-data` | inherited | Structured data: counters, ratios, percentages, dates, and numeric table cells |
33
+ | `text-data-sm` | `0.75rem` | Compact structured data |
34
+
35
+ Numeric typography follows one rule: big numbers are display, structured numbers
36
+ are mono, and numbers in sentences inherit their surrounding prose. The legacy
37
+ `text-metric`, `text-metric-display`, and `text-metric-lg` utilities retain their
38
+ existing rendered output for compatibility; new code should use the semantic roles
39
+ above.
40
+
41
+ Existing recipes remain supported and preserve their rendered values. The table
42
+ below gives the recommended semantic role for new code; it is a migration guide,
43
+ not a claim that every compatibility utility renders identically:
44
+
45
+ | Compatibility utility | Recommended role |
37
46
  | --- | --- |
38
47
  | `text-ui-title` | `text-heading-1` |
39
48
  | `text-ui-heading` | `text-heading-2` |
@@ -44,9 +53,9 @@ Existing recipes remain supported and preserve their rendered values:
44
53
  | `text-ui-meta` | `text-meta` |
45
54
  | `text-ui-label` | `text-label` |
46
55
  | `text-ui-micro` | `text-micro` |
47
- | `text-ui-metric` | `text-metric` |
48
- | `text-ui-metric-display` | `text-metric-display` |
49
- | `text-ui-metric-xl` | `text-metric-lg` |
56
+ | `text-ui-metric` | `text-kpi` |
57
+ | `text-ui-metric-display` | `text-kpi` |
58
+ | `text-ui-metric-xl` | `text-kpi-lg` |
50
59
 
51
60
  The matching `portal-*` recipes have the same typography but continue to include their established tone: headings, titles, body, and metrics use `text-foreground`; meta, label, and micro roles use `text-muted-foreground`. `text-ui-title-sm`, shell/report/preview/auth sizes, MQ `heading-2`, and MQ paragraph aliases are contextual rather than exact canonical equivalents. Keep them until their route family is visually migrated and screenshot-checked.
52
61
 
@@ -100,7 +109,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
100
109
  | --- | --- |
101
110
  | `--font-body`, `--font-heading`, `--font-code`; `--font-sans`, `--font-display`, `--font-mono` | Root font families and their Tailwind-facing aliases. |
102
111
  | `--type-weight-*`, `--type-leading-*`, `--type-tracking-*` | Shared typography weight, rhythm, and tracking primitives. |
103
- | `--text-heading-*`, `--text-title`, `--text-body*`, `--text-meta`, `--text-label`, `--text-micro`, `--text-metric*`; `--text-ui-*`, `--type-*` | Canonical visual-role typography tokens and compatibility scales. |
112
+ | `--text-heading-*`, `--text-title`, `--text-body*`, `--text-meta`, `--text-label`, `--text-micro`, `--text-kpi*`, `--text-data-sm`; `--text-metric*`, `--text-ui-*`, `--type-*` | Canonical visual-role typography tokens and compatibility scales. |
104
113
  | `--foreground-muted-accessible`, `--foreground-inverse-muted`, `--foreground-inverse-subtle` | Contrast-safe secondary and inverse text roles. |
105
114
  | `--text-ui-chip`, `--text-ui-action`, `--text-ui-calendar` | Compact control and calendar type sizes. |
106
115
  | `--text-ui-shell-title`, `--text-ui-report-title`, `--text-ui-report-title-lg`, `--text-ui-report-metric` | Shell and CRM report display type sizes. |
@@ -115,7 +124,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
115
124
  | `--tint-soft-border`, `--tint-soft-bg`, `--tint-soft-hover`, `--tint-hero-border`, `--tint-hero-bg`, `--tint-hero-fg`, `--tint-hero-hover` | Dynamic tint recipes resolved where a component supplies `--tint`. |
116
125
  | `--scrollbar-thumb`, `--scrollbar-thumb-hover`, `--scrollbar-size` | Shared scrollbar colour and geometry. |
117
126
  | `--toast-success-bg`, `--toast-success-border`, `--toast-warning-bg`, `--toast-warning-text`, `--toast-warning-border`, `--toast-error-bg`, `--toast-error-border`, `--toast-info-bg`, `--toast-info-text`, `--toast-info-border` | Sonner semantic toast palette. |
118
- | `--shadow-accent-control`, `--shadow-toolbar-control`, `--shadow-toolbar-popover`, `--shadow-tooltip`, `--shadow-dialog`, `--shadow-phone-dropdown` | Component elevation recipes. |
127
+ | `--shadow-accent-control`, `--shadow-toolbar-popover`, `--shadow-tooltip`, `--shadow-dialog`, `--shadow-phone-dropdown` | Component elevation recipes. |
119
128
  | `--report-hero-glow`, `--report-hero-rule` | CRM report decorative surfaces. |
120
129
  | `--shell-frame-offset`, `--shell-sidebar-width`, `--shell-sidebar-collapsed-width`, `--shell-sidebar-toggle-offset`, `--shell-sidebar-toggle-size`, `--shell-sidebar-toggle-inset`, `--shell-brand-height` | Shell frame and sidebar geometry. |
121
130
  | `--shell-nav-item-height`, `--shell-nav-item-collapsed-size`, `--shell-nav-icon-well-size`, `--shell-nav-icon-radius`, `--shell-nav-icon-size`, `--shell-nav-divider-width`, `--shell-nav-child-height`, `--shell-nav-child-enter-offset` | Shell navigation sizing and entry geometry. |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@brightweblabs/theme",
3
3
  "private": false,
4
- "version": "0.7.1",
4
+ "version": "0.7.3",
5
5
  "main": "./src/tint.ts",
6
6
  "types": "./src/tint.ts",
7
7
  "files": [
package/src/tokens.css CHANGED
@@ -196,6 +196,9 @@
196
196
  --text-metric: 2.75rem;
197
197
  --text-metric-display: var(--text-metric);
198
198
  --text-metric-lg: 3.5rem;
199
+ --text-kpi: var(--text-metric);
200
+ --text-kpi-lg: var(--text-metric-lg);
201
+ --text-data-sm: var(--text-meta);
199
202
 
200
203
  /* Compatibility and contextual scales retain their current rendered sizes. */
201
204
  --text-ui-nano: 0.4375rem;
@@ -286,7 +289,6 @@
286
289
  --toast-info-border: color-mix(in srgb, var(--secondary) 30%, var(--background));
287
290
 
288
291
  --shadow-accent-control: 0 4px 14px color-mix(in srgb, var(--brand-accent) 26%, transparent);
289
- --shadow-toolbar-control: 0 4px 14px rgba(91, 197, 242, 0.26);
290
292
  --shadow-toolbar-popover: 0 18px 44px rgba(10, 21, 26, 0.16), 0 2px 10px rgba(10, 21, 26, 0.08);
291
293
  --shadow-tooltip: 0 14px 34px var(--elevate-3);
292
294
  --shadow-dialog: 0 24px 64px var(--elevate-3);
@@ -81,6 +81,38 @@
81
81
  line-height: var(--type-leading-130);
82
82
  }
83
83
 
84
+ @utility text-kpi {
85
+ font-family: var(--font-display);
86
+ font-variant-numeric: tabular-nums;
87
+ font-size: var(--text-kpi);
88
+ font-weight: var(--font-weight-heavy);
89
+ line-height: var(--type-leading-none);
90
+ letter-spacing: var(--type-tracking-n040);
91
+ }
92
+
93
+ @utility text-kpi-lg {
94
+ font-family: var(--font-display);
95
+ font-variant-numeric: tabular-nums;
96
+ font-size: var(--text-kpi-lg);
97
+ font-weight: var(--font-weight-heavy);
98
+ line-height: var(--type-leading-095);
99
+ letter-spacing: var(--type-tracking-n040);
100
+ }
101
+
102
+ @utility text-data {
103
+ font-family: var(--font-mono);
104
+ font-variant-numeric: tabular-nums;
105
+ }
106
+
107
+ @utility text-data-sm {
108
+ font-family: var(--font-mono);
109
+ font-variant-numeric: tabular-nums;
110
+ font-size: var(--text-data-sm);
111
+ font-weight: var(--font-weight-medium);
112
+ line-height: var(--type-leading-none);
113
+ }
114
+
115
+ /* Deprecated metric recipes retain their existing output for compatibility. */
84
116
  @utility text-metric {
85
117
  font-family: var(--font-mono);
86
118
  font-variant-numeric: tabular-nums;