@brightweblabs/theme 0.7.2 → 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 +20 -11
- package/package.json +1 -1
- package/src/tokens.css +3 -0
- package/src/typography.css +32 -0
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-
|
|
31
|
-
| `text-
|
|
32
|
-
| `text-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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-
|
|
48
|
-
| `text-ui-metric-display` | `text-
|
|
49
|
-
| `text-ui-metric-xl` | `text-
|
|
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
|
|
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. |
|
package/package.json
CHANGED
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;
|
package/src/typography.css
CHANGED
|
@@ -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;
|