@pelatform/ui 1.6.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.
Files changed (126) hide show
  1. package/README.md +360 -5
  2. package/dist/animation.d.ts +6 -379
  3. package/dist/animation.js +2 -1750
  4. package/dist/base.d.ts +1 -651
  5. package/dist/base.js +2 -5554
  6. package/dist/components.d.ts +1 -2944
  7. package/dist/components.js +2 -2719
  8. package/dist/css/color/gray.css +105 -0
  9. package/dist/css/color/neutral.css +105 -0
  10. package/dist/css/color/slate.css +105 -0
  11. package/dist/css/color/stone.css +105 -0
  12. package/dist/css/color/zinc.css +105 -0
  13. package/dist/css/styles/style-lyra.css +1335 -0
  14. package/dist/css/styles/style-maia.css +1360 -0
  15. package/dist/css/styles/style-mira.css +1362 -0
  16. package/dist/css/styles/style-nova.css +1360 -0
  17. package/dist/css/styles/style-vega.css +1356 -0
  18. package/dist/hooks.d.ts +1 -1172
  19. package/dist/hooks.js +2 -664
  20. package/dist/index.d.ts +1 -318
  21. package/dist/index.js +3 -229
  22. package/dist/radix.d.ts +1 -0
  23. package/dist/radix.js +4 -0
  24. package/dist/style.css +2 -0
  25. package/package.json +82 -136
  26. package/LICENSE +0 -21
  27. package/css/components/apexcharts.css +0 -101
  28. package/css/components/book.css +0 -19
  29. package/css/components/extra.css +0 -12
  30. package/css/components/image-input.css +0 -51
  31. package/css/components/leaflet.css +0 -25
  32. package/css/components/patterns.css +0 -34
  33. package/css/components/rating.css +0 -89
  34. package/css/components/scrollable.css +0 -118
  35. package/css/components/theme-transition.css +0 -51
  36. package/css/theme.css +0 -238
  37. package/dist/animation.cjs +0 -1752
  38. package/dist/animation.d.cts +0 -379
  39. package/dist/aria.cjs +0 -139
  40. package/dist/aria.d.cts +0 -31
  41. package/dist/aria.d.ts +0 -31
  42. package/dist/aria.js +0 -139
  43. package/dist/badge-BtI4BMea.d.cts +0 -33
  44. package/dist/badge-BtI4BMea.d.ts +0 -33
  45. package/dist/base.cjs +0 -5556
  46. package/dist/base.d.cts +0 -651
  47. package/dist/chunk-3N75YA6Q.cjs +0 -60
  48. package/dist/chunk-7472NIIL.cjs +0 -40
  49. package/dist/chunk-BXUKTDPN.cjs +0 -576
  50. package/dist/chunk-CD2BCCQU.js +0 -180
  51. package/dist/chunk-CJXIPSTG.cjs +0 -10
  52. package/dist/chunk-CTHRAJQZ.js +0 -1522
  53. package/dist/chunk-D373YKDA.js +0 -196
  54. package/dist/chunk-EZW5GNS4.js +0 -6
  55. package/dist/chunk-HILACSFA.cjs +0 -1522
  56. package/dist/chunk-HR3R6KKM.js +0 -40
  57. package/dist/chunk-HW52LCWN.js +0 -22
  58. package/dist/chunk-I46SELBA.cjs +0 -22
  59. package/dist/chunk-J4JGE3U5.cjs +0 -180
  60. package/dist/chunk-RQHJBTEU.js +0 -10
  61. package/dist/chunk-SK6SSJHC.js +0 -9
  62. package/dist/chunk-T74DBLYY.js +0 -60
  63. package/dist/chunk-TB6DU23O.js +0 -576
  64. package/dist/chunk-UP53DCYH.cjs +0 -6
  65. package/dist/chunk-ZBO5IAMA.cjs +0 -196
  66. package/dist/chunk-ZDR3OZ7Z.cjs +0 -9
  67. package/dist/colors-CUDWvz1g.d.cts +0 -42
  68. package/dist/colors-CUDWvz1g.d.ts +0 -42
  69. package/dist/components-CidsRcc3.d.cts +0 -46
  70. package/dist/components-CidsRcc3.d.ts +0 -46
  71. package/dist/components.cjs +0 -2721
  72. package/dist/components.d.cts +0 -2944
  73. package/dist/default.cjs +0 -8931
  74. package/dist/default.d.cts +0 -1322
  75. package/dist/default.d.ts +0 -1322
  76. package/dist/default.js +0 -8931
  77. package/dist/hooks.cjs +0 -666
  78. package/dist/hooks.d.cts +0 -1172
  79. package/dist/index.cjs +0 -230
  80. package/dist/index.d.cts +0 -318
  81. package/dist/input-AwYIskrX.d.cts +0 -22
  82. package/dist/input-AwYIskrX.d.ts +0 -22
  83. package/dist/menu-GmSRfRGB.d.cts +0 -43
  84. package/dist/menu-GmSRfRGB.d.ts +0 -43
  85. package/dist/metafile-cjs.json +0 -1
  86. package/dist/metafile-esm.json +0 -1
  87. package/dist/re-export/cva.cjs +0 -6
  88. package/dist/re-export/cva.d.cts +0 -10
  89. package/dist/re-export/cva.d.ts +0 -10
  90. package/dist/re-export/cva.js +0 -6
  91. package/dist/re-export/motion.cjs +0 -2
  92. package/dist/re-export/motion.d.cts +0 -1
  93. package/dist/re-export/motion.d.ts +0 -1
  94. package/dist/re-export/motion.js +0 -2
  95. package/dist/re-export/next-themes.cjs +0 -2
  96. package/dist/re-export/next-themes.d.cts +0 -1
  97. package/dist/re-export/next-themes.d.ts +0 -1
  98. package/dist/re-export/next-themes.js +0 -2
  99. package/dist/re-export/react-day-picker.cjs +0 -2
  100. package/dist/re-export/react-day-picker.d.cts +0 -1
  101. package/dist/re-export/react-day-picker.d.ts +0 -1
  102. package/dist/re-export/react-day-picker.js +0 -2
  103. package/dist/re-export/react-hook-form.cjs +0 -2
  104. package/dist/re-export/react-hook-form.d.cts +0 -1
  105. package/dist/re-export/react-hook-form.d.ts +0 -1
  106. package/dist/re-export/react-hook-form.js +0 -2
  107. package/dist/re-export/resolver.cjs +0 -2
  108. package/dist/re-export/resolver.d.cts +0 -1
  109. package/dist/re-export/resolver.d.ts +0 -1
  110. package/dist/re-export/resolver.js +0 -2
  111. package/dist/re-export/sonner.cjs +0 -2
  112. package/dist/re-export/sonner.d.cts +0 -1
  113. package/dist/re-export/sonner.d.ts +0 -1
  114. package/dist/re-export/sonner.js +0 -2
  115. package/dist/re-export/tanstack-query.cjs +0 -2
  116. package/dist/re-export/tanstack-query.d.cts +0 -1
  117. package/dist/re-export/tanstack-query.d.ts +0 -1
  118. package/dist/re-export/tanstack-query.js +0 -2
  119. package/dist/re-export/tanstack-table.cjs +0 -2
  120. package/dist/re-export/tanstack-table.d.cts +0 -1
  121. package/dist/re-export/tanstack-table.d.ts +0 -1
  122. package/dist/re-export/tanstack-table.js +0 -2
  123. package/dist/re-export/zod.cjs +0 -2
  124. package/dist/re-export/zod.d.cts +0 -1
  125. package/dist/re-export/zod.d.ts +0 -1
  126. package/dist/re-export/zod.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
  [![Version](https://img.shields.io/npm/v/@pelatform/ui.svg)](https://www.npmjs.com/package/@pelatform/ui)
6
- [![License](https://img.shields.io/npm/l/@pelatform/ui.svg)](https://github.com/devpelatform/ui/blob/main/LICENSE)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](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
- ## Getting Started
363
+ ## License
9
364
 
10
- Visit https://devpelatform.github.io/ui to get started with this package.
365
+ MIT © [Pelatform Inc.](../../LICENSE)