@wakastellar/ui 2.1.0 → 2.1.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 (3) hide show
  1. package/README.md +71 -8
  2. package/dist/cli/index.cjs +1324 -154
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  **Bibliothèque de 200+ composants React professionnels pour applications Next.js modernes**
12
12
 
13
- [Quick Start](#quick-start) • [Tailwind v3/v4](#compatibilité-tailwind-v3--v4) • [Composants](#composants) • [Thèmes](#système-de-thèmes) • [i18n](#internationalisation)
13
+ [Quick Start](#quick-start) • [CLI](#cli) • [Tailwind v3/v4](#compatibilité-tailwind-v3--v4) • [Composants](#composants) • [Thèmes](#système-de-thèmes) • [i18n](#internationalisation)
14
14
 
15
15
  </div>
16
16
 
@@ -31,7 +31,7 @@
31
31
 
32
32
  ## Quick Start
33
33
 
34
- ### 1. Installation
34
+ ### Option 1 : Package complet (recommandé)
35
35
 
36
36
  ```bash
37
37
  pnpm add @wakastellar/ui
@@ -39,12 +39,6 @@ pnpm add @wakastellar/ui
39
39
  npm install @wakastellar/ui
40
40
  ```
41
41
 
42
- ### 2. Configuration (selon votre version de Tailwind)
43
-
44
- Voir la section [Compatibilité Tailwind v3 / v4](#compatibilité-tailwind-v3--v4) ci-dessous.
45
-
46
- ### 3. Utilisation
47
-
48
42
  ```tsx
49
43
  import { Button, Card, CardHeader, CardTitle, CardContent } from "@wakastellar/ui"
50
44
 
@@ -62,6 +56,24 @@ export default function Page() {
62
56
  }
63
57
  ```
64
58
 
59
+ ### Option 2 : CLI (composants individuels)
60
+
61
+ ```bash
62
+ # Initialiser votre projet
63
+ npx wakastellar-ui init
64
+
65
+ # Ajouter des composants
66
+ npx wakastellar-ui add button card input
67
+
68
+ # Lister les composants disponibles
69
+ npx wakastellar-ui list
70
+
71
+ # Rechercher un composant
72
+ npx wakastellar-ui search "date picker"
73
+ ```
74
+
75
+ Voir la section [CLI](#cli) pour plus de détails.
76
+
65
77
  ---
66
78
 
67
79
  ## Compatibilité Tailwind v3 / v4
@@ -130,6 +142,57 @@ const preset = require("@wakastellar/ui/tailwind-preset")
130
142
 
131
143
  ---
132
144
 
145
+ ## CLI
146
+
147
+ Le CLI permet d'ajouter des composants individuels à votre projet, similaire à shadcn/ui.
148
+
149
+ ### Commandes
150
+
151
+ ```bash
152
+ # Initialiser un projet
153
+ npx wakastellar-ui init
154
+ npx wakastellar-ui init --defaults # Utilise les paramètres par défaut
155
+
156
+ # Ajouter des composants
157
+ npx wakastellar-ui add button
158
+ npx wakastellar-ui add button card input dialog
159
+ npx wakastellar-ui add waka-datatable --overwrite
160
+
161
+ # Lister les composants
162
+ npx wakastellar-ui list
163
+ npx wakastellar-ui list --type ui
164
+ npx wakastellar-ui list --category gamification
165
+
166
+ # Rechercher
167
+ npx wakastellar-ui search button
168
+ npx wakastellar-ui search "date picker"
169
+ ```
170
+
171
+ ### Configuration (components.json)
172
+
173
+ Le fichier `components.json` est créé par `init` et configure votre projet :
174
+
175
+ ```json
176
+ {
177
+ "$schema": "https://wakastellar.dev/schema.json",
178
+ "style": "default",
179
+ "tailwind": {
180
+ "version": "v4",
181
+ "css": "app/globals.css"
182
+ },
183
+ "aliases": {
184
+ "components": "@/components/ui",
185
+ "utils": "@/lib/utils"
186
+ }
187
+ }
188
+ ```
189
+
190
+ ### Résolution des dépendances
191
+
192
+ Le CLI installe automatiquement les dépendances internes. Par exemple, ajouter `waka-modal` installera aussi `button` s'il n'est pas déjà présent.
193
+
194
+ ---
195
+
133
196
  ## Composants
134
197
 
135
198
  ### Catégories principales