@pimolu/design-tokens 0.1.0-beta.3 → 0.1.0-beta.3.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.
- package/README.fr.md +82 -36
- package/README.md +82 -36
- package/package.json +1 -1
package/README.fr.md
CHANGED
|
@@ -1,36 +1,82 @@
|
|
|
1
|
-
# @pimolu/design-tokens
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
# @pimolu/design-tokens
|
|
2
|
+
|
|
3
|
+
**La matière première du système.**
|
|
4
|
+
|
|
5
|
+
Les tokens de design primitifs de Pimolu en variables CSS et JSON simple. Utilisez ce package quand vous avez besoin des données de design sans React, sans thèmes et sans styles de composants.
|
|
6
|
+
|
|
7
|
+
[Guide des thèmes](https://pimolu.com/docs/theming) · [Source](https://github.com/pimoludev/ui/tree/main/packages/design-tokens)
|
|
8
|
+
|
|
9
|
+
> **Bêta :** `0.1.0-beta.3.1` est une prévisualisation. Les noms publics des tokens peuvent évoluer avant `1.0.0`.
|
|
10
|
+
|
|
11
|
+
## Pourquoi les tokens Pimolu ?
|
|
12
|
+
|
|
13
|
+
- **Une source de vérité unique.** Les primitives de couleur, espacement, radius et typographie alimentent les thèmes, les presets et chaque composant.
|
|
14
|
+
- **CSS et données.** Utilisez les variables CSS générées dans une feuille, ou consommez les mêmes valeurs en JSON dans un build tool ou un pipeline de design.
|
|
15
|
+
- **Les thèmes sémantiques sont séparés.** Ce package définit les primitives. `@pimolu/themes` les associe aux rôles sémantiques clair et sombre.
|
|
16
|
+
- **Indépendant du framework.** Pas de React, pas de CSS de composant, aucune dépendance runtime.
|
|
17
|
+
- **Nommage stable.** Les variables CSS suivent `--pimolu-<catégorie>-<nom>` ; le JSON reprend la même arborescence.
|
|
18
|
+
|
|
19
|
+
## En bref
|
|
20
|
+
|
|
21
|
+
| | |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| Catégories | couleur, espacement, radius, taille de police, famille de police |
|
|
24
|
+
| Entrée CSS | `tokens.css` |
|
|
25
|
+
| Entrée de données | `tokens.json` |
|
|
26
|
+
| Variables CSS | primitives sur `:root` |
|
|
27
|
+
| Thèmes sémantiques | Fournis par `@pimolu/themes` |
|
|
28
|
+
| Dépendances | Aucune |
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm add @pimolu/design-tokens@beta
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Utilisation en CSS
|
|
37
|
+
|
|
38
|
+
```css
|
|
39
|
+
@import "@pimolu/design-tokens/tokens.css";
|
|
40
|
+
|
|
41
|
+
.example {
|
|
42
|
+
color: var(--pimolu-color-indigo-500);
|
|
43
|
+
padding: var(--pimolu-spacing-4);
|
|
44
|
+
border-radius: var(--pimolu-radius-md);
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`tokens.css` définit les primitives sur `:root`. Pour les rôles sémantiques comme `background`, `primary` ou `surface-foreground`, utilisez `@pimolu/themes/styles.css` ou le CSS complet `@pimolu/web-styles/styles.css`.
|
|
49
|
+
|
|
50
|
+
## Utilisation comme données
|
|
51
|
+
|
|
52
|
+
`tokens.json` est un objet imbriqué simple avec des valeurs résolues :
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
// Avec les imports JSON activés dans votre toolchain
|
|
56
|
+
import tokens from "@pimolu/design-tokens/tokens.json";
|
|
57
|
+
|
|
58
|
+
tokens.color.indigo["500"]; // "#6366F1"
|
|
59
|
+
tokens.spacing["4"]; // 16
|
|
60
|
+
tokens.radius.md; // 10
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
L'export est volontairement petit et facile à consommer. Ce n'est pas une feuille de composant et il ne contient pas les alias sémantiques des thèmes.
|
|
64
|
+
|
|
65
|
+
## La famille de packages
|
|
66
|
+
|
|
67
|
+
| Package | Rôle |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| [`@pimolu/react`](https://www.npmjs.com/package/@pimolu/react) | Composants, hooks et layouts React |
|
|
70
|
+
| [`@pimolu/web-styles`](https://www.npmjs.com/package/@pimolu/web-styles) | CSS complet, entrée en couches et CSS par composant |
|
|
71
|
+
| [`@pimolu/themes`](https://www.npmjs.com/package/@pimolu/themes) | Thèmes clair/sombre, sept presets et données visuelles |
|
|
72
|
+
| [`@pimolu/design-tokens`](https://www.npmjs.com/package/@pimolu/design-tokens) | Tokens primitifs en CSS et JSON |
|
|
73
|
+
| [`@pimolu/core`](https://www.npmjs.com/package/@pimolu/core) | Utilitaire de classes de variantes indépendant du framework |
|
|
74
|
+
|
|
75
|
+
## Documentation et état
|
|
76
|
+
|
|
77
|
+
- [Guide des thèmes](https://pimolu.com/docs/theming)
|
|
78
|
+
- [Source et issues](https://github.com/pimoludev/ui)
|
|
79
|
+
|
|
80
|
+
Pimolu UI est en bêta. Les noms des tokens primitifs peuvent évoluer avant `1.0.0`. Pour une interface produit, associez ces tokens aux thèmes sémantiques et au CSS Pimolu plutôt que de reconstruire la couche composants.
|
|
81
|
+
|
|
82
|
+
MIT © Pimolu
|
package/README.md
CHANGED
|
@@ -1,36 +1,82 @@
|
|
|
1
|
-
# @pimolu/design-tokens
|
|
2
|
-
|
|
3
|
-
The raw
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
# @pimolu/design-tokens
|
|
2
|
+
|
|
3
|
+
**The raw material of the system.**
|
|
4
|
+
|
|
5
|
+
Pimolu's primitive design tokens as CSS variables and plain JSON. Use this package when you need the design data without React, themes or component styles.
|
|
6
|
+
|
|
7
|
+
[Theming guide](https://pimolu.com/docs/theming) · [Source](https://github.com/pimoludev/ui/tree/main/packages/design-tokens)
|
|
8
|
+
|
|
9
|
+
> **Beta:** `0.1.0-beta.3.1` is a preview. Public token names may change before `1.0.0`.
|
|
10
|
+
|
|
11
|
+
## Why Pimolu tokens?
|
|
12
|
+
|
|
13
|
+
- **A single source of truth.** Colour, spacing, radius and typography primitives feed the themes, presets and every component.
|
|
14
|
+
- **CSS and data.** Use the generated CSS variables in a stylesheet, or consume the same values as JSON in a build tool or design pipeline.
|
|
15
|
+
- **Semantic themes are separate.** This package defines the primitives. `@pimolu/themes` maps them to semantic light and dark roles.
|
|
16
|
+
- **Framework-independent.** No React, no component CSS, no runtime dependencies.
|
|
17
|
+
- **Stable naming.** CSS variables follow `--pimolu-<category>-<name>`; JSON mirrors the same tree.
|
|
18
|
+
|
|
19
|
+
## At a glance
|
|
20
|
+
|
|
21
|
+
| | |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| Categories | colour, spacing, radius, font size, font family |
|
|
24
|
+
| CSS entry | `tokens.css` |
|
|
25
|
+
| Data entry | `tokens.json` |
|
|
26
|
+
| CSS variables | `:root` primitives |
|
|
27
|
+
| Semantic themes | Provided by `@pimolu/themes` |
|
|
28
|
+
| Dependencies | None |
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm add @pimolu/design-tokens@beta
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Use in CSS
|
|
37
|
+
|
|
38
|
+
```css
|
|
39
|
+
@import "@pimolu/design-tokens/tokens.css";
|
|
40
|
+
|
|
41
|
+
.example {
|
|
42
|
+
color: var(--pimolu-color-indigo-500);
|
|
43
|
+
padding: var(--pimolu-spacing-4);
|
|
44
|
+
border-radius: var(--pimolu-radius-md);
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`tokens.css` defines primitives on `:root`. If you need semantic roles such as `background`, `primary` or `surface-foreground`, use `@pimolu/themes/styles.css` or the complete `@pimolu/web-styles/styles.css`.
|
|
49
|
+
|
|
50
|
+
## Use as data
|
|
51
|
+
|
|
52
|
+
`tokens.json` is a plain nested object with resolved values:
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
// With JSON imports enabled in your toolchain
|
|
56
|
+
import tokens from "@pimolu/design-tokens/tokens.json";
|
|
57
|
+
|
|
58
|
+
tokens.color.indigo["500"]; // "#6366F1"
|
|
59
|
+
tokens.spacing["4"]; // 16
|
|
60
|
+
tokens.radius.md; // 10
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The export is intentionally small and tool-friendly. It is not a component stylesheet and does not include semantic theme aliases.
|
|
64
|
+
|
|
65
|
+
## The package family
|
|
66
|
+
|
|
67
|
+
| Package | Role |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| [`@pimolu/react`](https://www.npmjs.com/package/@pimolu/react) | React components, hooks and layouts |
|
|
70
|
+
| [`@pimolu/web-styles`](https://www.npmjs.com/package/@pimolu/web-styles) | Plain CSS bundle, layered entry and per-component CSS |
|
|
71
|
+
| [`@pimolu/themes`](https://www.npmjs.com/package/@pimolu/themes) | Light/dark themes, seven presets and visual data |
|
|
72
|
+
| [`@pimolu/design-tokens`](https://www.npmjs.com/package/@pimolu/design-tokens) | Primitive tokens in CSS and JSON |
|
|
73
|
+
| [`@pimolu/core`](https://www.npmjs.com/package/@pimolu/core) | Framework-independent variant class utility |
|
|
74
|
+
|
|
75
|
+
## Documentation and status
|
|
76
|
+
|
|
77
|
+
- [Theming guide](https://pimolu.com/docs/theming)
|
|
78
|
+
- [Source and issues](https://github.com/pimoludev/ui)
|
|
79
|
+
|
|
80
|
+
Pimolu UI is a beta. Primitive token names may change before `1.0.0`. For product UI, pair these tokens with the semantic themes and Pimolu CSS rather than rebuilding the component layer.
|
|
81
|
+
|
|
82
|
+
MIT © Pimolu
|