@nextlyhq/ui 0.0.2-alpha.32 → 0.0.2-alpha.34
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 +26 -17
- package/dist/index.cjs +125 -116
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.mjs +125 -116
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +2 -0
- package/dist/theme.css +745 -0
- package/docs/plugin-ui-authoring.md +178 -0
- package/package.json +13 -6
package/README.md
CHANGED
|
@@ -31,33 +31,41 @@ pnpm add react react-dom lucide-react
|
|
|
31
31
|
|
|
32
32
|
## Setup
|
|
33
33
|
|
|
34
|
-
The
|
|
34
|
+
The package ships two CSS entry points. Pick one:
|
|
35
35
|
|
|
36
|
-
**
|
|
36
|
+
**Zero config — pre-compiled bundle**
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
Import the pre-built stylesheet once at your root. It bundles Tailwind, every design token
|
|
39
|
+
(on `:root`, flipped under `.dark`), and the base reset, so components render fully styled
|
|
40
|
+
with no build wiring:
|
|
39
41
|
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
```tsx
|
|
43
|
+
import "@nextlyhq/ui/styles.css";
|
|
44
|
+
import { Button } from "@nextlyhq/ui";
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
--color-background: hsl(0 0% 100%);
|
|
46
|
-
--color-foreground: hsl(222 47% 11%);
|
|
47
|
-
--color-primary: hsl(221 83% 53%);
|
|
48
|
-
--color-primary-foreground: hsl(0 0% 100%);
|
|
49
|
-
/* ...the rest. See `uiPreset` for the full token contract. */
|
|
50
|
-
}
|
|
46
|
+
<Button variant="outline">Click me</Button>;
|
|
51
47
|
```
|
|
52
48
|
|
|
53
|
-
|
|
49
|
+
**Bring your own Tailwind v4 build**
|
|
54
50
|
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
If you already run Tailwind v4, import just the tokens and let your pipeline compile the
|
|
52
|
+
utilities the components use:
|
|
57
53
|
|
|
58
|
-
|
|
54
|
+
```css
|
|
55
|
+
/* app/globals.css */
|
|
56
|
+
@import "tailwindcss";
|
|
57
|
+
@import "@nextlyhq/ui/theme.css";
|
|
58
|
+
@source "../node_modules/@nextlyhq/ui/dist";
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
+
`theme.css` defines the tokens as complete OKLCH color values (`--background`, `--primary`,
|
|
62
|
+
`--border`, …) with `@theme inline` mappings and the dark-mode overrides. Reference tokens
|
|
63
|
+
directly (`var(--primary)`) — never wrap them in `hsl()`. The exported `uiPreset` remains
|
|
64
|
+
available as a Tailwind v3 preset.
|
|
65
|
+
|
|
66
|
+
> Inside a Nextly admin plugin you need neither import — the admin already provides the
|
|
67
|
+
> tokens. See the [**Plugin UI authoring guide**](./docs/plugin-ui-authoring.md).
|
|
68
|
+
|
|
61
69
|
## Components
|
|
62
70
|
|
|
63
71
|
**Buttons and inputs:** `Button`, `Input`, `Textarea`, `Label`
|
|
@@ -81,6 +89,7 @@ import { Button } from "@nextlyhq/ui";
|
|
|
81
89
|
|
|
82
90
|
## Documentation
|
|
83
91
|
|
|
92
|
+
- [**Plugin UI authoring guide**](./docs/plugin-ui-authoring.md): the token contract, dark mode, container queries, and the design lint guard
|
|
84
93
|
- [**Admin customization**](https://nextlyhq.com/docs/admin/customization): theming, branding, and custom field UIs
|
|
85
94
|
|
|
86
95
|
## Related packages
|