@qball-inc/tokens 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +102 -0
  2. package/package.json +9 -1
package/README.md ADDED
@@ -0,0 +1,102 @@
1
+ <p align="center">
2
+ <a href="https://qball-inc.github.io/qball-design-system/">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/QBall-Inc/qball-design-system/main/assets/qball-logo-handoff/qball-logo-dark.gif">
5
+ <img src="https://raw.githubusercontent.com/QBall-Inc/qball-design-system/main/assets/qball-logo-handoff/qball-logo-parchment.gif" alt="QBall Design System" width="180" height="180">
6
+ </picture>
7
+ </a>
8
+ </p>
9
+
10
+ <h1 align="center">@qball-inc/tokens</h1>
11
+
12
+ <p align="center">
13
+ The locked <b>token layer</b> of the QBall Design System — drop-in CSS custom properties,<br>
14
+ component classes, and a DTCG / Style-Dictionary JSON mirror. Zero build step.<br>
15
+ Framework-agnostic. Light and dark from the same source.
16
+ </p>
17
+
18
+ <p align="center">
19
+ <a href="https://www.npmjs.com/package/@qball-inc/tokens"><img src="https://img.shields.io/npm/v/@qball-inc/tokens?color=3F6B5B&label=npm" alt="npm version"></a>
20
+ <a href="https://github.com/QBall-Inc/qball-design-system/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@qball-inc/tokens?color=3F6B5B" alt="Apache-2.0 license"></a>
21
+ <a href="https://qball-inc.github.io/qball-design-system/"><img src="https://img.shields.io/badge/gallery-live-3F6B5B" alt="component gallery"></a>
22
+ </p>
23
+
24
+ ---
25
+
26
+ ## Install
27
+
28
+ ```bash
29
+ pnpm add @qball-inc/tokens
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ The token layer is **plain CSS** plus a JSON mirror — there is no build step and no
35
+ runtime. Import the CSS in your app's style entry. **Order matters:** the component
36
+ layer reads `var(--token)` values defined by the layer above it.
37
+
38
+ ```css
39
+ /* app.css */
40
+
41
+ /* REQUIRED — every --token (colors, --data-* finance signals, --font-display,
42
+ radii, spacing) + semantic element styles + the button family (.btn). */
43
+ @import "@qball-inc/tokens/colors-and-type.css";
44
+
45
+ /* REQUIRED — the application component layer (.stat, .num, .badge, .meter,
46
+ .modal, .switch, .field, …). Must come AFTER colors-and-type.css. */
47
+ @import "@qball-inc/tokens/components.css";
48
+
49
+ /* OPTIONAL — Tailwind v4 @theme export: token-named utilities for your own
50
+ markup + the --font-display override seam. */
51
+ @import "@qball-inc/tokens/theme.css";
52
+ ```
53
+
54
+ Switch themes by setting `data-theme` on the root — light and dark are both
55
+ first-class and swap every token:
56
+
57
+ ```html
58
+ <html data-theme="dark">
59
+ <!-- … --></html>
60
+ ```
61
+
62
+ Consume the tokens as cross-platform data (DTCG / Style-Dictionary shape) from the
63
+ package root or the explicit subpath:
64
+
65
+ ```js
66
+ import tokens from "@qball-inc/tokens"; // → tokens.json
67
+ // or: import tokens from "@qball-inc/tokens/tokens.json";
68
+ ```
69
+
70
+ ## What's in the package
71
+
72
+ | Import | File | Delivers | Required? |
73
+ | --- | --- | --- | --- |
74
+ | `@qball-inc/tokens/colors-and-type.css` | `colors_and_type.css` | Every CSS custom property the components reference + semantic element styles + the `.btn` family. | **Yes** |
75
+ | `@qball-inc/tokens/components.css` | `components.css` | The full application component layer (the rest of the class inventory). | **Yes** |
76
+ | `@qball-inc/tokens/theme.css` | `theme.css` | Tailwind v4 `@theme` export (token-named utilities + the `--font-display` seam). | Optional |
77
+ | `@qball-inc/tokens` · `@qball-inc/tokens/tokens.json` | `tokens.json` | DTCG / Style-Dictionary JSON mirror (cross-platform). | Optional |
78
+
79
+ Importing **only `colors-and-type.css` then `components.css`** (in that order) paints
80
+ the entire component inventory. Omitting either leaves components unstyled — a silent
81
+ miss, not an error. Full wiring guide:
82
+ [docs/consumer-setup.md](https://github.com/QBall-Inc/qball-design-system/blob/main/docs/consumer-setup.md).
83
+
84
+ ## Display font
85
+
86
+ This package ships with **Fira Code** as the default display face. The system's
87
+ intended display face is **Berkeley Mono**, a commercial typeface that is **not**
88
+ redistributed here, so nothing licensed reaches the published package. To restore
89
+ Berkeley Mono in a private build, see the
90
+ [repository README](https://github.com/QBall-Inc/qball-design-system#display-font).
91
+
92
+ ## Part of the QBall Design System
93
+
94
+ - **Components:** [`@qball-inc/react`](https://www.npmjs.com/package/@qball-inc/react) — the token-driven React component library.
95
+ - **Gallery:** [live component contact-sheet](https://qball-inc.github.io/qball-design-system/) (light + dark).
96
+ - **Source + docs:** [QBall-Inc/qball-design-system](https://github.com/QBall-Inc/qball-design-system).
97
+
98
+ ## License
99
+
100
+ [Apache-2.0](https://github.com/QBall-Inc/qball-design-system/blob/main/LICENSE) ©
101
+ QBall Inc. (The Apache-2.0 license covers this package's code; it is distinct from the
102
+ Berkeley Mono font license, which is not granted here.)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qball-inc/tokens",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "QBall Design System tokens — framework-agnostic CSS custom properties, component classes, and a DTCG/Style-Dictionary JSON mirror. Zero build step; public default display face is Fira Code (Berkeley Mono restored per README in private builds).",
5
5
  "keywords": [
6
6
  "design-tokens",
@@ -15,6 +15,14 @@
15
15
  "monospace"
16
16
  ],
17
17
  "license": "Apache-2.0",
18
+ "author": "QBall Inc",
19
+ "homepage": "https://qball-inc.github.io/qball-design-system/",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/QBall-Inc/qball-design-system.git",
23
+ "directory": "packages/tokens"
24
+ },
25
+ "bugs": "https://github.com/QBall-Inc/qball-design-system/issues",
18
26
  "private": false,
19
27
  "publishConfig": {
20
28
  "access": "public"