@pelatform/ui 2.0.0 → 2.1.0
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 +360 -5
- package/dist/animation.d.ts +6 -4
- package/dist/animation.js +3 -1
- package/dist/base.d.ts +1 -1
- package/dist/base.js +3 -1
- package/dist/components.d.ts +1 -2987
- package/dist/components.js +2 -2318
- package/dist/css/color/gray.css +105 -0
- package/dist/css/color/neutral.css +105 -0
- package/dist/css/color/slate.css +105 -0
- package/dist/css/color/stone.css +105 -0
- package/dist/css/color/zinc.css +105 -0
- package/dist/css/styles/style-lyra.css +1335 -0
- package/dist/css/styles/style-maia.css +1360 -0
- package/dist/css/styles/style-mira.css +1362 -0
- package/dist/css/styles/style-nova.css +1360 -0
- package/dist/css/styles/style-vega.css +1356 -0
- package/dist/hooks.d.ts +1 -93
- package/dist/hooks.js +2 -7
- package/dist/index.d.ts +1 -68
- package/dist/index.js +2 -7
- package/dist/radix.d.ts +1 -0
- package/dist/radix.js +4 -0
- package/dist/style.css +2 -0
- package/package.json +74 -48
- package/LICENSE +0 -21
- package/css/components/apexcharts.css +0 -101
- package/css/components/book.css +0 -19
- package/css/components/extra.css +0 -12
- package/css/components/image-input.css +0 -51
- package/css/components/leaflet.css +0 -25
- package/css/components/patterns.css +0 -34
- package/css/components/rating.css +0 -89
- package/css/components/scrollable.css +0 -118
- package/css/components/theme-transition.css +0 -51
- package/css/source.css +0 -20
- package/css/theme.css +0 -237
- package/dist/aria.d.ts +0 -1
- package/dist/aria.js +0 -2
- package/dist/chunk-UEVIEY7W.js +0 -51
- package/dist/chunk-VZEE3GOC.js +0 -458
- package/dist/default.d.ts +0 -1
- package/dist/default.js +0 -2
package/README.md
CHANGED
|
@@ -1,10 +1,365 @@
|
|
|
1
1
|
# @pelatform/ui
|
|
2
2
|
|
|
3
|
-
A Modern and Minimal React UI Library built with TailwindCSS.
|
|
4
|
-
|
|
5
3
|
[](https://www.npmjs.com/package/@pelatform/ui)
|
|
6
|
-
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
**A Modern and Minimal React UI Library built with TailwindCSS.**
|
|
7
|
+
|
|
8
|
+
This is the **scope package** for Pelatform UI that provides organized, multi-entry imports to all components, hooks, and utilities from the main `pelatform-ui` package.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
bun add @pelatform/ui
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Peer Dependencies
|
|
17
|
+
|
|
18
|
+
Make sure you have these installed:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
bun add react react-dom
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Package Overview
|
|
25
|
+
|
|
26
|
+
`@pelatform/ui` is a scope package that re-exports everything from `pelatform-ui` with organized entry points for better tree-shaking and clearer imports.
|
|
27
|
+
|
|
28
|
+
## Import Paths
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
// React hooks
|
|
32
|
+
import { useHydrated, useMobile, useMediaQuery } from "@pelatform/ui/hooks";
|
|
33
|
+
|
|
34
|
+
// Animation components
|
|
35
|
+
import {
|
|
36
|
+
ShimmeringText,
|
|
37
|
+
CountingNumber,
|
|
38
|
+
Marquee,
|
|
39
|
+
} from "@pelatform/ui/animation";
|
|
40
|
+
|
|
41
|
+
// Base headless components (full styling control)
|
|
42
|
+
import { Button, Input, Select } from "@pelatform/ui/base";
|
|
43
|
+
|
|
44
|
+
// Radix styled components (pre-styled)
|
|
45
|
+
import { Card, DataGrid, Calendar } from "@pelatform/ui/radix";
|
|
46
|
+
|
|
47
|
+
// Custom Pelatform components
|
|
48
|
+
import { Icons, Logo } from "@pelatform/ui/components";
|
|
49
|
+
|
|
50
|
+
// Styles
|
|
51
|
+
import "@pelatform/ui/css";
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Entry Points
|
|
55
|
+
|
|
56
|
+
This package provides 6 organized entry points:
|
|
57
|
+
|
|
58
|
+
### Animation (`./animation`)
|
|
59
|
+
|
|
60
|
+
14 animation components for text effects, number animations, layout effects, and backgrounds:
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
import {
|
|
64
|
+
ShimmeringText,
|
|
65
|
+
TextReveal,
|
|
66
|
+
TypingText,
|
|
67
|
+
VideoText,
|
|
68
|
+
WordRotate,
|
|
69
|
+
SvgText,
|
|
70
|
+
CountingNumber,
|
|
71
|
+
SlidingNumber,
|
|
72
|
+
Marquee,
|
|
73
|
+
GitHubButton,
|
|
74
|
+
AvatarGroup,
|
|
75
|
+
GradientBackground,
|
|
76
|
+
GridBackground,
|
|
77
|
+
HoverBackground,
|
|
78
|
+
} from "@pelatform/ui/animation";
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Base (`./base`)
|
|
82
|
+
|
|
83
|
+
77 headless components built on Base UI for complete styling control:
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
import {
|
|
87
|
+
// Forms
|
|
88
|
+
Button,
|
|
89
|
+
Input,
|
|
90
|
+
Textarea,
|
|
91
|
+
Select,
|
|
92
|
+
Checkbox,
|
|
93
|
+
Radio,
|
|
94
|
+
Switch,
|
|
95
|
+
Slider,
|
|
96
|
+
|
|
97
|
+
// Selection
|
|
98
|
+
Combobox,
|
|
99
|
+
Listbox,
|
|
100
|
+
Autocomplete,
|
|
101
|
+
|
|
102
|
+
// Layout
|
|
103
|
+
Accordion,
|
|
104
|
+
Tabs,
|
|
105
|
+
Dialog,
|
|
106
|
+
Popover,
|
|
107
|
+
Tooltip,
|
|
108
|
+
|
|
109
|
+
// Data
|
|
110
|
+
Table,
|
|
111
|
+
Pagination,
|
|
112
|
+
Avatar,
|
|
113
|
+
Badge,
|
|
114
|
+
} from "@pelatform/ui/base";
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Components (`./components`)
|
|
118
|
+
|
|
119
|
+
Custom Pelatform components:
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
import { Icons, Logo } from "@pelatform/ui/components";
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Hooks (`./hooks`)
|
|
126
|
+
|
|
127
|
+
18 React hooks for common use cases:
|
|
128
|
+
|
|
129
|
+
```typescript
|
|
130
|
+
import {
|
|
131
|
+
// Analytics
|
|
132
|
+
useAnalytics,
|
|
133
|
+
|
|
134
|
+
// DOM Interactions
|
|
135
|
+
useBodyClass,
|
|
136
|
+
useCopyToClipboard,
|
|
137
|
+
useFileUpload,
|
|
138
|
+
useScrollPosition,
|
|
139
|
+
useSliderInput,
|
|
140
|
+
|
|
141
|
+
// Detection
|
|
142
|
+
useHydrated,
|
|
143
|
+
useIntersectionObserver,
|
|
144
|
+
useIsMac,
|
|
145
|
+
useIsMobile,
|
|
146
|
+
useMediaQuery,
|
|
147
|
+
useMounted,
|
|
148
|
+
useMutationObserver,
|
|
149
|
+
useViewport,
|
|
150
|
+
|
|
151
|
+
// Features
|
|
152
|
+
useMenu,
|
|
153
|
+
useRecaptchaV2,
|
|
154
|
+
useRemoveGAParams,
|
|
155
|
+
} from "@pelatform/ui/hooks";
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Radix (`./radix`)
|
|
159
|
+
|
|
160
|
+
77 pre-styled Radix UI components:
|
|
161
|
+
|
|
162
|
+
```typescript
|
|
163
|
+
import {
|
|
164
|
+
// Layout & Structure
|
|
165
|
+
Accordion,
|
|
166
|
+
Card,
|
|
167
|
+
Resizable,
|
|
168
|
+
Separator,
|
|
169
|
+
|
|
170
|
+
// Navigation
|
|
171
|
+
Breadcrumb,
|
|
172
|
+
Command,
|
|
173
|
+
ContextMenu,
|
|
174
|
+
DropdownMenu,
|
|
175
|
+
Menubar,
|
|
176
|
+
NavigationMenu,
|
|
177
|
+
Tabs,
|
|
178
|
+
|
|
179
|
+
// Forms
|
|
180
|
+
Checkbox,
|
|
181
|
+
Combobox,
|
|
182
|
+
Form,
|
|
183
|
+
Input,
|
|
184
|
+
Label,
|
|
185
|
+
RadioGroup,
|
|
186
|
+
Select,
|
|
187
|
+
Slider,
|
|
188
|
+
Switch,
|
|
189
|
+
Textarea,
|
|
190
|
+
|
|
191
|
+
// Overlays
|
|
192
|
+
AlertDialog,
|
|
193
|
+
Dialog,
|
|
194
|
+
Drawer,
|
|
195
|
+
HoverCard,
|
|
196
|
+
Popover,
|
|
197
|
+
Sheet,
|
|
198
|
+
Toast,
|
|
199
|
+
|
|
200
|
+
// Feedback
|
|
201
|
+
Alert,
|
|
202
|
+
Progress,
|
|
203
|
+
Skeleton,
|
|
204
|
+
Sonner,
|
|
205
|
+
|
|
206
|
+
// Data Display
|
|
207
|
+
Avatar,
|
|
208
|
+
Badge,
|
|
209
|
+
Calendar,
|
|
210
|
+
Carousel,
|
|
211
|
+
Chart,
|
|
212
|
+
DataGrid,
|
|
213
|
+
Table,
|
|
214
|
+
Tree,
|
|
215
|
+
} from "@pelatform/ui/radix";
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Quick Start
|
|
219
|
+
|
|
220
|
+
```typescript
|
|
221
|
+
import { Card, Button, Input } from "@pelatform/ui/radix";
|
|
222
|
+
import { useHydrated } from "@pelatform/ui/hooks";
|
|
223
|
+
import "@pelatform/ui/css";
|
|
224
|
+
|
|
225
|
+
function App() {
|
|
226
|
+
const hydrated = useHydrated();
|
|
227
|
+
|
|
228
|
+
if (!hydrated) return null;
|
|
229
|
+
|
|
230
|
+
return (
|
|
231
|
+
<Card>
|
|
232
|
+
<Input placeholder="Enter text" />
|
|
233
|
+
<Button>Submit</Button>
|
|
234
|
+
</Card>
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Styling
|
|
240
|
+
|
|
241
|
+
Import the CSS in your app:
|
|
242
|
+
|
|
243
|
+
```typescript
|
|
244
|
+
import "@pelatform/ui/css";
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
CSS includes:
|
|
248
|
+
|
|
249
|
+
- Theme variables
|
|
250
|
+
- Component styles
|
|
251
|
+
- Animation utilities
|
|
252
|
+
- Pattern backgrounds
|
|
253
|
+
- Custom transitions
|
|
254
|
+
|
|
255
|
+
You can also import individual CSS files:
|
|
256
|
+
|
|
257
|
+
```typescript
|
|
258
|
+
// Main theme (includes animations)
|
|
259
|
+
import "@pelatform/ui/css";
|
|
260
|
+
|
|
261
|
+
// Color variants
|
|
262
|
+
import "@pelatform/ui/color/slate";
|
|
263
|
+
import "@pelatform/ui/color/gray";
|
|
264
|
+
import "@pelatform/ui/color/neutral";
|
|
265
|
+
import "@pelatform/ui/color/stone";
|
|
266
|
+
import "@pelatform/ui/color/zinc";
|
|
267
|
+
|
|
268
|
+
// Theme styles
|
|
269
|
+
import "@pelatform/ui/styles/style-vega";
|
|
270
|
+
import "@pelatform/ui/styles/style-nova";
|
|
271
|
+
import "@pelatform/ui/styles/style-mira";
|
|
272
|
+
import "@pelatform/ui/styles/style-maia";
|
|
273
|
+
import "@pelatform/ui/styles/style-lyra";
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
## TypeScript Support
|
|
277
|
+
|
|
278
|
+
Full TypeScript support with comprehensive type definitions for all components and hooks:
|
|
279
|
+
|
|
280
|
+
```typescript
|
|
281
|
+
import type { ButtonProps } from "@pelatform/ui/base";
|
|
282
|
+
import type { DataGridProps } from "@pelatform/ui/radix";
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
## Features
|
|
286
|
+
|
|
287
|
+
- 170+ production-ready components
|
|
288
|
+
- 18 React hooks for common use cases
|
|
289
|
+
- Full dark mode support
|
|
290
|
+
- Responsive design
|
|
291
|
+
- Accessibility (WCAG 2.1)
|
|
292
|
+
- SSR-safe implementations
|
|
293
|
+
- Tree-shakeable exports
|
|
294
|
+
- Next.js optimized
|
|
295
|
+
- Tailwind CSS styling
|
|
296
|
+
|
|
297
|
+
## Dependencies
|
|
298
|
+
|
|
299
|
+
### Peer Dependencies
|
|
300
|
+
|
|
301
|
+
This package requires these peer dependencies to be installed:
|
|
302
|
+
|
|
303
|
+
```json
|
|
304
|
+
{
|
|
305
|
+
"@base-ui/react": ">=1.2.0",
|
|
306
|
+
"@dnd-kit/core": ">=6.3.0",
|
|
307
|
+
"@dnd-kit/modifiers": ">=9.0.0",
|
|
308
|
+
"@dnd-kit/sortable": ">=10.0.0",
|
|
309
|
+
"@dnd-kit/utilities": ">=3.2.0",
|
|
310
|
+
"@headless-tree/core": ">=1.6.0",
|
|
311
|
+
"@pelatform/utils": ">=1.0.15",
|
|
312
|
+
"@tanstack/react-table": ">=8.20.0",
|
|
313
|
+
"cmdk": ">=1.1.0",
|
|
314
|
+
"date-fns": ">=4.1.0",
|
|
315
|
+
"embla-carousel-react": ">=8.6.0",
|
|
316
|
+
"input-otp": ">=1.4.0",
|
|
317
|
+
"lucide-react": ">=0.577.0",
|
|
318
|
+
"motion": ">=12.35.0",
|
|
319
|
+
"next-themes": ">=0.4.5",
|
|
320
|
+
"pelatform-ui": ">=1.2.0",
|
|
321
|
+
"radix-ui": ">=1.4.0",
|
|
322
|
+
"react": ">=18.0.0 || >=19.0.0-rc.0",
|
|
323
|
+
"react-day-picker": ">=9.14.0",
|
|
324
|
+
"react-dom": ">=18.0.0 || >=19.0.0-rc.0",
|
|
325
|
+
"react-phone-number-input": ">=3.4.0",
|
|
326
|
+
"react-resizable-panels": ">=4.7.0",
|
|
327
|
+
"sonner": ">=2.0.5",
|
|
328
|
+
"tsup": ">=8.5.0",
|
|
329
|
+
"typescript": ">=5.9.0",
|
|
330
|
+
"vaul": ">=1.1.0"
|
|
331
|
+
}
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
## Choosing Between Base and Radix
|
|
335
|
+
|
|
336
|
+
- **Use Base components** when:
|
|
337
|
+
- Building a custom design system
|
|
338
|
+
- Need complete styling control
|
|
339
|
+
- Want minimal bundle size
|
|
340
|
+
- Creating brand-specific components
|
|
341
|
+
|
|
342
|
+
- **Use Radix components** when:
|
|
343
|
+
- Need pre-styled components
|
|
344
|
+
- Building prototypes quickly
|
|
345
|
+
- Want consistent styling
|
|
346
|
+
- Don't have strict design requirements
|
|
347
|
+
|
|
348
|
+
- **Use both** - Import from both categories in the same application
|
|
349
|
+
|
|
350
|
+
## Related Packages
|
|
351
|
+
|
|
352
|
+
- **[pelatform-ui](https://www.npmjs.com/package/pelatform-ui)** - Main package with all components and hooks
|
|
353
|
+
- **[@pelatform/mcp.ui](https://github.com/pelatformlabs/ui/tree/main/packages/mcp)** - MCP server for documentation
|
|
354
|
+
|
|
355
|
+
## Links
|
|
356
|
+
|
|
357
|
+
- [npm Package](https://www.npmjs.com/package/@pelatform/ui)
|
|
358
|
+
- [GitHub Repository](https://github.com/pelatformlabs/ui)
|
|
359
|
+
- [Contributing Guide](../../CONTRIBUTING.md)
|
|
360
|
+
- [Code of Conduct](../../CODE_OF_CONDUCT.md)
|
|
361
|
+
- [License](../../LICENSE)
|
|
7
362
|
|
|
8
|
-
##
|
|
363
|
+
## License
|
|
9
364
|
|
|
10
|
-
|
|
365
|
+
MIT © [Pelatform Inc.](../../LICENSE)
|
package/dist/animation.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
import '
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
1
|
+
export * from 'pelatform-ui/animation';
|
|
2
|
+
import 'pelatform-ui/base';
|
|
3
|
+
import 'pelatform-ui/components';
|
|
4
|
+
import 'pelatform-ui/hooks';
|
|
5
|
+
import 'pelatform-ui';
|
|
6
|
+
import 'pelatform-ui/radix';
|
package/dist/animation.js
CHANGED
package/dist/base.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from 'pelatform-ui/base';
|
package/dist/base.js
CHANGED