@pimolu/web-styles 0.1.0-beta.3 → 0.1.0-beta.4
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 +125 -40
- package/README.md +125 -40
- package/dist/button.css +6 -0
- package/dist/input-group.css +10 -0
- package/dist/input.css +10 -0
- package/dist/layered.css +406 -183
- package/dist/password-input.css +10 -0
- package/dist/pimolu.css +404 -181
- package/dist/pimolu.min.css +1 -1
- package/dist/segmented-control.css +70 -3
- package/dist/tabs.css +93 -4
- package/dist/toast.css +225 -8
- package/package.json +2 -2
package/README.fr.md
CHANGED
|
@@ -1,40 +1,125 @@
|
|
|
1
|
-
# @pimolu/web-styles
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
# @pimolu/web-styles
|
|
2
|
+
|
|
3
|
+
**Un langage visuel, exprimé en CSS natif.**
|
|
4
|
+
|
|
5
|
+
La couche de style derrière Pimolu UI. Chargez une feuille complète, optez pour des couches CSS prévisibles, ou assemblez uniquement le CSS des composants utilisés. Aucune dépendance à Tailwind, aucun runtime CSS-in-JS.
|
|
6
|
+
|
|
7
|
+
[Démarrage rapide](https://pimolu.com/docs/quick-start) · [Thèmes](https://pimolu.com/docs/theming) · [Personnalisation](https://github.com/pimoludev/ui/blob/main/docs/CUSTOMIZATION.md) · [Source](https://github.com/pimoludev/ui/tree/main/packages/web-styles)
|
|
8
|
+
|
|
9
|
+
> **Bêta :** `0.1.0-beta.4` est une prévisualisation. Les entrées CSS publiques et les tokens visuels peuvent évoluer avant `1.0.0`.
|
|
10
|
+
|
|
11
|
+
## Pourquoi les styles Pimolu ?
|
|
12
|
+
|
|
13
|
+
- **Un import, le système complet.** `styles.css` combine les tokens primitifs, les thèmes sémantiques, les sept presets et chaque feuille de composant.
|
|
14
|
+
- **Des surcharges sans `!important`.** `layered.css` place la bibliothèque dans une couche `pimolu` pour que les règles applicatives et les utilitaires Tailwind gagnent de façon prévisible.
|
|
15
|
+
- **Le CSS par composant quand vous en avez besoin.** Chaque famille possède un sous-chemin CSS exporté : une petite application peut charger seulement les fondations et les contrôles utilisés.
|
|
16
|
+
- **CSS natif, zéro runtime.** Aucun calcul de style en JavaScript et aucun nom de classe généré. Les changements de thème passent par des attributs.
|
|
17
|
+
- **Des versions alignées.** Le CSS et React sont publiés à la même version. Gardez-les ensemble.
|
|
18
|
+
|
|
19
|
+
## En bref
|
|
20
|
+
|
|
21
|
+
| | |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| Entrées | `styles.css`, `layered.css`, `pimolu.min.css` |
|
|
24
|
+
| Styles de composants | 129 sous-chemins CSS exportés |
|
|
25
|
+
| Fondations | Tokens, thèmes sémantiques, sept presets visuels |
|
|
26
|
+
| Thèmes | Clair et sombre, y compris la préférence système via le Provider |
|
|
27
|
+
| Presets | default, adaptive, cartoon, glass, luxury, monochrome, neo-brutalism |
|
|
28
|
+
| Runtime | Aucun — Tailwind ou CSS-in-JS non requis |
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm add @pimolu/web-styles@beta
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Vous utilisez aussi les composants React ?
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pnpm add @pimolu/react@beta @pimolu/web-styles@beta
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Feuille complète
|
|
43
|
+
|
|
44
|
+
Importez-la une fois au point d'entrée de l'application :
|
|
45
|
+
|
|
46
|
+
```css
|
|
47
|
+
@import "@pimolu/web-styles/styles.css";
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Définissez ensuite le mode de couleur et le preset sur un conteneur, ou laissez `PimoluProvider` le faire :
|
|
51
|
+
|
|
52
|
+
```html
|
|
53
|
+
<div data-pimolu-theme="dark" data-pimolu-style="glass">
|
|
54
|
+
<!-- Votre application -->
|
|
55
|
+
</div>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Une version minifiée est disponible :
|
|
59
|
+
|
|
60
|
+
```css
|
|
61
|
+
@import "@pimolu/web-styles/pimolu.min.css";
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Des surcharges prévisibles
|
|
65
|
+
|
|
66
|
+
Utilisez l'entrée en couches quand le CSS applicatif doit surcharger Pimolu sans escalade de spécificité :
|
|
67
|
+
|
|
68
|
+
```css
|
|
69
|
+
@import "@pimolu/web-styles/layered.css";
|
|
70
|
+
|
|
71
|
+
.checkout-action:hover:enabled {
|
|
72
|
+
background: var(--pimolu-success);
|
|
73
|
+
color: var(--pimolu-success-foreground);
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Importez `styles.css` ou `layered.css`, pas les deux. Avec Tailwind v4, déclarez l'ordre complet des couches avant l'un ou l'autre :
|
|
78
|
+
|
|
79
|
+
```css
|
|
80
|
+
@layer theme, base, pimolu, components, utilities;
|
|
81
|
+
@import "tailwindcss/theme.css" layer(theme);
|
|
82
|
+
@import "@pimolu/web-styles/layered.css";
|
|
83
|
+
@import "tailwindcss/utilities.css" layer(utilities);
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Le contrat de personnalisation couvre les hooks de panneaux, le scope des portails et les responsabilités d'accessibilité.
|
|
87
|
+
|
|
88
|
+
## Assembler uniquement le nécessaire
|
|
89
|
+
|
|
90
|
+
Installez les fondations et importez le CSS des composants utilisés :
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
pnpm add @pimolu/web-styles@beta @pimolu/themes@beta
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
```css
|
|
97
|
+
@import "@pimolu/themes/styles.css";
|
|
98
|
+
@import "@pimolu/themes/presets.css";
|
|
99
|
+
@import "@pimolu/web-styles/button.css";
|
|
100
|
+
@import "@pimolu/web-styles/input.css";
|
|
101
|
+
@import "@pimolu/web-styles/card.css";
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Chaque famille possède son sous-chemin, de `accordion.css` à `watermark.css`. Gardez les versions CSS et React alignées.
|
|
105
|
+
|
|
106
|
+
## La famille de packages
|
|
107
|
+
|
|
108
|
+
| Package | Rôle |
|
|
109
|
+
| --- | --- |
|
|
110
|
+
| [`@pimolu/react`](https://www.npmjs.com/package/@pimolu/react) | Composants, hooks et layouts React |
|
|
111
|
+
| [`@pimolu/web-styles`](https://www.npmjs.com/package/@pimolu/web-styles) | CSS complet, entrée en couches et CSS par composant |
|
|
112
|
+
| [`@pimolu/themes`](https://www.npmjs.com/package/@pimolu/themes) | Thèmes clair/sombre, sept presets et données visuelles |
|
|
113
|
+
| [`@pimolu/design-tokens`](https://www.npmjs.com/package/@pimolu/design-tokens) | Tokens primitifs en CSS et JSON |
|
|
114
|
+
| [`@pimolu/core`](https://www.npmjs.com/package/@pimolu/core) | Utilitaire de classes de variantes indépendant du framework |
|
|
115
|
+
|
|
116
|
+
## Documentation et état
|
|
117
|
+
|
|
118
|
+
- [Démarrage rapide](https://pimolu.com/docs/quick-start)
|
|
119
|
+
- [Thèmes et presets](https://pimolu.com/docs/theming)
|
|
120
|
+
- [Contrat de personnalisation](https://github.com/pimoludev/ui/blob/main/docs/CUSTOMIZATION.md)
|
|
121
|
+
- [Source et issues](https://github.com/pimoludev/ui)
|
|
122
|
+
|
|
123
|
+
Pimolu UI est en bêta. Le registre React est implémenté ; les registres native, Angular et web components sont des directions futures. La revue visuelle et d'assistance technique complète reste ouverte.
|
|
124
|
+
|
|
125
|
+
MIT © Pimolu
|
package/README.md
CHANGED
|
@@ -1,40 +1,125 @@
|
|
|
1
|
-
# @pimolu/web-styles
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
# @pimolu/web-styles
|
|
2
|
+
|
|
3
|
+
**One visual language, expressed in plain CSS.**
|
|
4
|
+
|
|
5
|
+
The styling layer behind Pimolu UI. Load one complete stylesheet, opt into predictable cascade layers, or assemble only the component CSS your application uses. No Tailwind requirement and no CSS-in-JS runtime.
|
|
6
|
+
|
|
7
|
+
[Quick start](https://pimolu.com/docs/quick-start) · [Theming](https://pimolu.com/docs/theming) · [Customization](https://github.com/pimoludev/ui/blob/main/docs/CUSTOMIZATION.md) · [Source](https://github.com/pimoludev/ui/tree/main/packages/web-styles)
|
|
8
|
+
|
|
9
|
+
> **Beta:** `0.1.0-beta.4` is a preview. Public CSS entry points and visual tokens may change before `1.0.0`.
|
|
10
|
+
|
|
11
|
+
## Why Pimolu styles?
|
|
12
|
+
|
|
13
|
+
- **One import, the complete system.** `styles.css` combines primitive tokens, semantic themes, all seven presets and every component stylesheet.
|
|
14
|
+
- **Overrides without `!important`.** `layered.css` places the library in a `pimolu` cascade layer so normal application rules and Tailwind utilities can win predictably.
|
|
15
|
+
- **Component-level CSS when you need it.** Every family has an exported CSS subpath, so a small application can load only the foundations and controls it uses.
|
|
16
|
+
- **Plain CSS, zero runtime.** No style calculations in JavaScript and no generated class names. Theme changes are attribute-driven.
|
|
17
|
+
- **Aligned releases.** The CSS and React packages ship at the same version. Keep them together.
|
|
18
|
+
|
|
19
|
+
## At a glance
|
|
20
|
+
|
|
21
|
+
| | |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| Entries | `styles.css`, `layered.css`, `pimolu.min.css` |
|
|
24
|
+
| Component styles | 129 exported CSS subpaths |
|
|
25
|
+
| Foundations | Tokens, semantic themes, seven visual presets |
|
|
26
|
+
| Themes | Light and dark, including system preference through the Provider |
|
|
27
|
+
| Presets | default, adaptive, cartoon, glass, luxury, monochrome, neo-brutalism |
|
|
28
|
+
| Runtime | None — no Tailwind or CSS-in-JS required |
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm add @pimolu/web-styles@beta
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Using React components as well?
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pnpm add @pimolu/react@beta @pimolu/web-styles@beta
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Complete stylesheet
|
|
43
|
+
|
|
44
|
+
Import it once in your application entry:
|
|
45
|
+
|
|
46
|
+
```css
|
|
47
|
+
@import "@pimolu/web-styles/styles.css";
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Then set the colour mode and preset on a container, or let `PimoluProvider` do it:
|
|
51
|
+
|
|
52
|
+
```html
|
|
53
|
+
<div data-pimolu-theme="dark" data-pimolu-style="glass">
|
|
54
|
+
<!-- Your application -->
|
|
55
|
+
</div>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
A pre-minified build is available as:
|
|
59
|
+
|
|
60
|
+
```css
|
|
61
|
+
@import "@pimolu/web-styles/pimolu.min.css";
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Predictable overrides
|
|
65
|
+
|
|
66
|
+
Use the layered entry when application CSS must override Pimolu without specificity escalation:
|
|
67
|
+
|
|
68
|
+
```css
|
|
69
|
+
@import "@pimolu/web-styles/layered.css";
|
|
70
|
+
|
|
71
|
+
.checkout-action:hover:enabled {
|
|
72
|
+
background: var(--pimolu-success);
|
|
73
|
+
color: var(--pimolu-success-foreground);
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Import either `styles.css` or `layered.css`, not both. With Tailwind v4, declare the complete layer order before importing either entry:
|
|
78
|
+
|
|
79
|
+
```css
|
|
80
|
+
@layer theme, base, pimolu, components, utilities;
|
|
81
|
+
@import "tailwindcss/theme.css" layer(theme);
|
|
82
|
+
@import "@pimolu/web-styles/layered.css";
|
|
83
|
+
@import "tailwindcss/utilities.css" layer(utilities);
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The customization contract covers panel hooks, portal scope and accessibility responsibilities.
|
|
87
|
+
|
|
88
|
+
## Assemble only what you use
|
|
89
|
+
|
|
90
|
+
Install the foundations package and import the component CSS you need:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
pnpm add @pimolu/web-styles@beta @pimolu/themes@beta
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
```css
|
|
97
|
+
@import "@pimolu/themes/styles.css";
|
|
98
|
+
@import "@pimolu/themes/presets.css";
|
|
99
|
+
@import "@pimolu/web-styles/button.css";
|
|
100
|
+
@import "@pimolu/web-styles/input.css";
|
|
101
|
+
@import "@pimolu/web-styles/card.css";
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Each family has its own exported subpath, from `accordion.css` to `watermark.css`. Keep CSS and React versions aligned.
|
|
105
|
+
|
|
106
|
+
## The package family
|
|
107
|
+
|
|
108
|
+
| Package | Role |
|
|
109
|
+
| --- | --- |
|
|
110
|
+
| [`@pimolu/react`](https://www.npmjs.com/package/@pimolu/react) | React components, hooks and layouts |
|
|
111
|
+
| [`@pimolu/web-styles`](https://www.npmjs.com/package/@pimolu/web-styles) | Plain CSS bundle, layered entry and per-component CSS |
|
|
112
|
+
| [`@pimolu/themes`](https://www.npmjs.com/package/@pimolu/themes) | Light/dark themes, seven presets and visual data |
|
|
113
|
+
| [`@pimolu/design-tokens`](https://www.npmjs.com/package/@pimolu/design-tokens) | Primitive tokens in CSS and JSON |
|
|
114
|
+
| [`@pimolu/core`](https://www.npmjs.com/package/@pimolu/core) | Framework-independent variant class utility |
|
|
115
|
+
|
|
116
|
+
## Documentation and status
|
|
117
|
+
|
|
118
|
+
- [Quick start](https://pimolu.com/docs/quick-start)
|
|
119
|
+
- [Theming and presets](https://pimolu.com/docs/theming)
|
|
120
|
+
- [Customization contract](https://github.com/pimoludev/ui/blob/main/docs/CUSTOMIZATION.md)
|
|
121
|
+
- [Source and issues](https://github.com/pimoludev/ui)
|
|
122
|
+
|
|
123
|
+
Pimolu UI is a beta. The React registry is implemented; native, Angular and web-component registries are future directions. The full visual and assistive-technology audit remains open.
|
|
124
|
+
|
|
125
|
+
MIT © Pimolu
|
package/dist/button.css
CHANGED
|
@@ -202,6 +202,12 @@
|
|
|
202
202
|
align-items: center;
|
|
203
203
|
justify-content: center;
|
|
204
204
|
}
|
|
205
|
+
.pimolu-button__loading-indicator {
|
|
206
|
+
display: inline-flex;
|
|
207
|
+
align-items: center;
|
|
208
|
+
justify-content: center;
|
|
209
|
+
flex-shrink: 0;
|
|
210
|
+
}
|
|
205
211
|
.pimolu-button__spinner {
|
|
206
212
|
width: 1em;
|
|
207
213
|
height: 1em;
|
package/dist/input-group.css
CHANGED
|
@@ -63,6 +63,11 @@
|
|
|
63
63
|
color: var(--pimolu-muted-foreground);
|
|
64
64
|
opacity: 1;
|
|
65
65
|
}
|
|
66
|
+
.pimolu-input__control:is(:autofill, :-webkit-autofill) {
|
|
67
|
+
-webkit-background-clip: text;
|
|
68
|
+
background-clip: text;
|
|
69
|
+
-webkit-text-fill-color: var(--pimolu-foreground);
|
|
70
|
+
}
|
|
66
71
|
.pimolu-input__control::-webkit-search-cancel-button,
|
|
67
72
|
.pimolu-input__control::-webkit-search-decoration {
|
|
68
73
|
-webkit-appearance: none;
|
|
@@ -251,6 +256,11 @@
|
|
|
251
256
|
}
|
|
252
257
|
}
|
|
253
258
|
@media (forced-colors: active) {
|
|
259
|
+
.pimolu-input__control:is(:autofill, :-webkit-autofill) {
|
|
260
|
+
-webkit-background-clip: border-box;
|
|
261
|
+
background-clip: border-box;
|
|
262
|
+
-webkit-text-fill-color: CanvasText;
|
|
263
|
+
}
|
|
254
264
|
.pimolu-input__wrapper:focus-within {
|
|
255
265
|
outline: 2px solid Highlight;
|
|
256
266
|
outline-offset: 2px;
|
package/dist/input.css
CHANGED
|
@@ -63,6 +63,11 @@
|
|
|
63
63
|
color: var(--pimolu-muted-foreground);
|
|
64
64
|
opacity: 1;
|
|
65
65
|
}
|
|
66
|
+
.pimolu-input__control:is(:autofill, :-webkit-autofill) {
|
|
67
|
+
-webkit-background-clip: text;
|
|
68
|
+
background-clip: text;
|
|
69
|
+
-webkit-text-fill-color: var(--pimolu-foreground);
|
|
70
|
+
}
|
|
66
71
|
.pimolu-input__control::-webkit-search-cancel-button,
|
|
67
72
|
.pimolu-input__control::-webkit-search-decoration {
|
|
68
73
|
-webkit-appearance: none;
|
|
@@ -251,6 +256,11 @@
|
|
|
251
256
|
}
|
|
252
257
|
}
|
|
253
258
|
@media (forced-colors: active) {
|
|
259
|
+
.pimolu-input__control:is(:autofill, :-webkit-autofill) {
|
|
260
|
+
-webkit-background-clip: border-box;
|
|
261
|
+
background-clip: border-box;
|
|
262
|
+
-webkit-text-fill-color: CanvasText;
|
|
263
|
+
}
|
|
254
264
|
.pimolu-input__wrapper:focus-within {
|
|
255
265
|
outline: 2px solid Highlight;
|
|
256
266
|
outline-offset: 2px;
|