uix-ui 0.1.0 → 0.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.
- package/README.md +22 -0
- package/bin/uix-ui.mjs +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# uix-ui
|
|
2
|
+
|
|
3
|
+
The CLI for [uix-ui](https://uixdesign.pagestro.com/ui): open-source React components and Tailwind CSS v4 themes
|
|
4
|
+
that you copy into your project and own. No dependencies.
|
|
5
|
+
|
|
6
|
+
Needs React 18 or 19, Tailwind CSS v4 and Node 18+. Run in your app's folder:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npx uix-ui@latest init --preset lagoon-stretch # theme, cn() helper, components.json
|
|
10
|
+
npx uix-ui@latest add button card input # copy components into src/components/ui
|
|
11
|
+
npx uix-ui@latest theme beetroot-harrow # switch theme
|
|
12
|
+
npx uix-ui@latest list # all components and themes
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { Button } from "@/components/ui/button";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Dark mode: `<html data-theme="dark">`. Options: `--overwrite` (add), `--no-install` (print the install command
|
|
20
|
+
instead of running it), `--registry <url|folder>` (init).
|
|
21
|
+
|
|
22
|
+
Docs, live components and all 42 themes: https://uixdesign.pagestro.com/ui · Source: https://github.com/mdrakibshekh/uix-ui · MIT
|
package/bin/uix-ui.mjs
CHANGED
|
@@ -144,7 +144,7 @@ async function init() {
|
|
|
144
144
|
if (!tw) say('Note: Tailwind CSS v4 is not installed yet (https://tailwindcss.com/docs/installation).');
|
|
145
145
|
else if (/^[\^~]?3/.test(tw)) die('UIX themes need Tailwind CSS v4 (found v3).');
|
|
146
146
|
|
|
147
|
-
const css = ['src/index.css', 'src/app/globals.css', 'app/globals.css', 'src/styles/globals.css', 'src/main.css'].find(f => existsSync(join(cwd, f))) ?? 'src/index.css';
|
|
147
|
+
const css = ['src/index.css', 'src/app/globals.css', 'app/globals.css', 'src/styles/globals.css', 'src/styles/global.css', 'src/main.css', 'app/app.css', 'app/tailwind.css'].find(f => existsSync(join(cwd, f))) ?? 'src/index.css';
|
|
148
148
|
const local = opts.registry && !/^https?:/.test(opts.registry);
|
|
149
149
|
const registry = opts.registry ? (local ? resolve(cwd, opts.registry) : opts.registry).replace(/\/$/, '') : DEFAULT_REGISTRY;
|
|
150
150
|
const cfg = existsSync(join(cwd, 'components.json')) ? readJson('components.json') : {
|