@nextlyhq/ui 0.0.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/LICENSE +22 -0
- package/README.md +93 -0
- package/dist/index.cjs +2404 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2319 -0
- package/dist/index.d.ts +2319 -0
- package/dist/index.mjs +2230 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +104 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 NextlyHQ <info@nextlyhq.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# @nextlyhq/ui
|
|
2
|
+
|
|
3
|
+
Headless React component library for Nextly's admin panel, plugins, and any custom UI you build on top.
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://www.npmjs.com/package/@nextlyhq/ui"><img alt="npm" src="https://img.shields.io/npm/v/@nextlyhq/ui?style=flat-square&label=npm&color=cb3837" /></a>
|
|
7
|
+
<a href="https://github.com/nextlyhq/nextly/blob/main/LICENSE.md"><img alt="License" src="https://img.shields.io/github/license/nextlyhq/nextly?style=flat-square&color=blue" /></a>
|
|
8
|
+
<a href="https://nextlyhq.com/docs"><img alt="Status" src="https://img.shields.io/badge/status-alpha-orange?style=flat-square" /></a>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
> [!IMPORTANT]
|
|
12
|
+
> Nextly is in alpha. APIs may change before 1.0. Pin exact versions in production.
|
|
13
|
+
|
|
14
|
+
## What it is
|
|
15
|
+
|
|
16
|
+
A shadcn/ui-flavored component set built on Radix primitives, `class-variance-authority`, and Tailwind CSS. The same components power the Nextly admin panel; you can use them in your own custom admin views, plugin UIs, or marketing pages.
|
|
17
|
+
|
|
18
|
+
Install this whenever you want admin-consistent UI in a Nextly extension or a frontend that should match the admin look.
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pnpm add @nextlyhq/ui
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Peer dependencies (must be installed in the consuming project):
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pnpm add react react-dom lucide-react
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Setup
|
|
33
|
+
|
|
34
|
+
The components ship as Tailwind CSS 4 token consumers. They reference HSL CSS variables (`--background`, `--primary`, `--border`, etc.) which your project must define.
|
|
35
|
+
|
|
36
|
+
**Tailwind v4 (recommended)**
|
|
37
|
+
|
|
38
|
+
In your global CSS, define the design tokens with `@theme` and import the components:
|
|
39
|
+
|
|
40
|
+
```css
|
|
41
|
+
/* app/globals.css */
|
|
42
|
+
@import "tailwindcss";
|
|
43
|
+
|
|
44
|
+
@theme {
|
|
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
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The exported `uiPreset` is the reference contract: it lists every token name the components expect. Use it to write the matching `@theme` block (or import it directly if you are still on Tailwind v3).
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
import { Button } from "@nextlyhq/ui";
|
|
57
|
+
|
|
58
|
+
<Button variant="outline">Click me</Button>;
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Components
|
|
62
|
+
|
|
63
|
+
**Buttons and inputs:** `Button`, `Input`, `Textarea`, `Label`
|
|
64
|
+
**Display:** `Badge`, `Card`, `Alert`, `Separator`, `Skeleton`, `Progress`
|
|
65
|
+
**Toggles:** `Checkbox`, `RadioGroup`, `Switch`, `Collapsible`
|
|
66
|
+
**Layout and disclosure:** `Accordion`, `Avatar`, `Tabs`, `Tooltip`, `Popover`
|
|
67
|
+
**Overlays:** `Dialog`, `AlertDialog`, `Sheet`
|
|
68
|
+
**Menus and command palette:** `DropdownMenu`, `Select`, `Command`
|
|
69
|
+
**Feedback:** `Spinner`, `Toaster` (with `toast()` helper)
|
|
70
|
+
**Tables:** `Table` primitives, `ResponsiveTable`, `TableSearch`, `TablePagination`, `TableSkeleton`, `TableEmpty`, `TableError`, `TableLoading`
|
|
71
|
+
**Providers:** `PortalProvider`, `usePortalContainer`
|
|
72
|
+
**Utilities:** `cn`, `uiPreset`
|
|
73
|
+
|
|
74
|
+
## Compatibility
|
|
75
|
+
|
|
76
|
+
| Tool | Version |
|
|
77
|
+
| -------------- | ---------------------------------------------------------------- |
|
|
78
|
+
| React | 18 or 19 |
|
|
79
|
+
| Tailwind CSS | 4+ (the `uiPreset` JS export also works as a Tailwind v3 preset) |
|
|
80
|
+
| `lucide-react` | 0.400+ |
|
|
81
|
+
|
|
82
|
+
## Documentation
|
|
83
|
+
|
|
84
|
+
- [**Admin customization**](https://nextlyhq.com/docs/admin/customization): theming, branding, and custom field UIs
|
|
85
|
+
|
|
86
|
+
## Related packages
|
|
87
|
+
|
|
88
|
+
- [`@nextlyhq/admin`](../admin): uses these components throughout the admin panel
|
|
89
|
+
- [`nextly`](../nextly): the core runtime
|
|
90
|
+
|
|
91
|
+
## License
|
|
92
|
+
|
|
93
|
+
[MIT](../../LICENSE.md)
|