@arkyn/components 3.0.1-beta.22 → 3.0.1-beta.23

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 (70) hide show
  1. package/README.md +264 -0
  2. package/dist/bundle.js +1485 -859
  3. package/dist/bundle.umd.cjs +1 -1
  4. package/dist/components/audioUpload/hasFileContent/index.d.ts +13 -0
  5. package/dist/components/audioUpload/hasFileContent/index.d.ts.map +1 -0
  6. package/dist/components/audioUpload/hasFileContent/index.js +26 -0
  7. package/dist/components/audioUpload/index.d.ts +82 -0
  8. package/dist/components/audioUpload/index.d.ts.map +1 -0
  9. package/dist/components/audioUpload/index.js +120 -0
  10. package/dist/components/audioUpload/noFileContent/index.d.ts +12 -0
  11. package/dist/components/audioUpload/noFileContent/index.d.ts.map +1 -0
  12. package/dist/components/audioUpload/noFileContent/index.js +29 -0
  13. package/dist/components/clientOnly.d.ts +86 -0
  14. package/dist/components/clientOnly.d.ts.map +1 -0
  15. package/dist/components/clientOnly.js +86 -0
  16. package/dist/components/fileUpload/hasFileContent/index.d.ts +13 -0
  17. package/dist/components/fileUpload/hasFileContent/index.d.ts.map +1 -0
  18. package/dist/components/fileUpload/hasFileContent/index.js +34 -0
  19. package/dist/components/fileUpload/index.d.ts +94 -0
  20. package/dist/components/fileUpload/index.d.ts.map +1 -0
  21. package/dist/components/fileUpload/index.js +127 -0
  22. package/dist/components/fileUpload/noFileContent/index.d.ts +12 -0
  23. package/dist/components/fileUpload/noFileContent/index.d.ts.map +1 -0
  24. package/dist/components/fileUpload/noFileContent/index.js +29 -0
  25. package/dist/components/imageUpload/hasFileContent/index.d.ts +13 -0
  26. package/dist/components/imageUpload/hasFileContent/index.d.ts.map +1 -0
  27. package/dist/components/imageUpload/hasFileContent/index.js +24 -0
  28. package/dist/components/imageUpload/index.d.ts +114 -0
  29. package/dist/components/imageUpload/index.d.ts.map +1 -0
  30. package/dist/components/imageUpload/index.js +148 -0
  31. package/dist/components/imageUpload/noFileContent/index.d.ts +12 -0
  32. package/dist/components/imageUpload/noFileContent/index.d.ts.map +1 -0
  33. package/dist/components/imageUpload/noFileContent/index.js +29 -0
  34. package/dist/components/table/tableBody/index.d.ts +67 -0
  35. package/dist/components/table/tableBody/index.d.ts.map +1 -0
  36. package/dist/components/table/tableBody/index.js +69 -0
  37. package/dist/components/table/tableCaption/index.d.ts +62 -0
  38. package/dist/components/table/tableCaption/index.d.ts.map +1 -0
  39. package/dist/components/table/tableCaption/index.js +64 -0
  40. package/dist/components/table/tableContainer/index.d.ts +64 -0
  41. package/dist/components/table/tableContainer/index.d.ts.map +1 -0
  42. package/dist/components/table/tableContainer/index.js +66 -0
  43. package/dist/components/table/tableFooter/index.d.ts +45 -0
  44. package/dist/components/table/tableFooter/index.d.ts.map +1 -0
  45. package/dist/components/table/tableFooter/index.js +47 -0
  46. package/dist/components/table/tableHeader/index.d.ts +44 -0
  47. package/dist/components/table/tableHeader/index.d.ts.map +1 -0
  48. package/dist/components/table/tableHeader/index.js +46 -0
  49. package/dist/components/tooltip/index.d.ts.map +1 -1
  50. package/dist/components/tooltip/index.js +1 -1
  51. package/dist/hooks/useDrawer.d.ts +86 -0
  52. package/dist/hooks/useDrawer.d.ts.map +1 -0
  53. package/dist/hooks/useDrawer.js +20 -0
  54. package/dist/hooks/useHydrated.d.ts +76 -0
  55. package/dist/hooks/useHydrated.d.ts.map +1 -0
  56. package/dist/hooks/useHydrated.js +81 -0
  57. package/dist/hooks/useModal.d.ts +81 -0
  58. package/dist/hooks/useModal.d.ts.map +1 -0
  59. package/dist/hooks/useModal.js +20 -0
  60. package/dist/index.d.ts +14 -0
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +14 -0
  63. package/dist/providers/drawerProvider.d.ts +106 -0
  64. package/dist/providers/drawerProvider.d.ts.map +1 -0
  65. package/dist/providers/drawerProvider.js +120 -0
  66. package/dist/providers/modalProvider.d.ts +103 -0
  67. package/dist/providers/modalProvider.d.ts.map +1 -0
  68. package/dist/providers/modalProvider.js +119 -0
  69. package/dist/style.css +1 -1
  70. package/package.json +19 -2
package/README.md ADDED
@@ -0,0 +1,264 @@
1
+ # @arkyn/components
2
+
3
+ A modern and comprehensive React component library. Built with TypeScript, featuring smooth animations powered by Framer Motion, and providing a complete set of UI components for building beautiful web applications.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@arkyn/components.svg)](https://www.npmjs.com/package/@arkyn/components)
6
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
7
+ [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
8
+
9
+ ## ✨ Features
10
+
11
+ - 🎨 **40+ UI Components** - Complete set of modern, accessible components
12
+ - 🎭 **Smooth Animations** - Powered by Framer Motion for fluid interactions
13
+ - 🪝 **Custom Hooks** - Powerful hooks for form handling, modals, drawers, and more
14
+ - 🎯 **TypeScript First** - Full type safety and excellent IntelliSense support
15
+ - 📱 **Responsive Design** - Mobile-first approach with modern CSS
16
+ - ♿ **Accessibility** - Built with accessibility best practices in mind
17
+ - 🎨 **Customizable** - Easy to theme and customize for your brand
18
+ - 🚀 **Remix Optimized** - Designed specifically for Remix applications
19
+
20
+ ## 📦 Installation
21
+
22
+ ```bash
23
+ npm install @arkyn/components
24
+ ```
25
+
26
+ ### Peer Dependencies
27
+
28
+ Make sure you have these peer dependencies installed:
29
+
30
+ ```bash
31
+ npm install react react-dom lucide-react
32
+ ```
33
+
34
+ ## 🚀 Quick Start
35
+
36
+ ```tsx
37
+ import { Button, Input, Modal, useModal } from "@arkyn/components";
38
+
39
+ function App() {
40
+ const { isOpen, openModal, closeModal } = useModal();
41
+
42
+ return (
43
+ <div>
44
+ <Input placeholder="Enter your email" />
45
+ <Button onClick={openModal}>Open Modal</Button>
46
+
47
+ <Modal isOpen={isOpen} onClose={closeModal}>
48
+ <h2>Welcome to Arkyn!</h2>
49
+ <p>This is a beautiful modal component.</p>
50
+ </Modal>
51
+ </div>
52
+ );
53
+ }
54
+ ```
55
+
56
+ ## 🧩 Components
57
+
58
+ ### Form Components
59
+
60
+ - **Input** - Text input with validation support
61
+ - **Textarea** - Multi-line text input
62
+ - **Checkbox** - Checkbox with custom styling
63
+ - **Radio** - Radio button groups
64
+ - **Switch** - Toggle switch component
65
+ - **MultiSelect** - Multi-selection dropdown
66
+ - **PhoneInput** - International phone number input
67
+ - **CurrencyInput** - Currency input with formatting
68
+ - **MaskedInput** - Input with custom masking
69
+ - **Slider** - Range slider component
70
+
71
+ ### Upload Components
72
+
73
+ - **FileUpload** - File upload with drag & drop
74
+ - **ImageUpload** - Image upload with preview
75
+ - **AudioUpload** - Audio file upload component
76
+ - **AudioPlayer** - Audio playback component
77
+
78
+ ### Navigation
79
+
80
+ - **Button** - Versatile button component
81
+ - **IconButton** - Icon-only button
82
+ - **Tab** - Tab navigation system
83
+ - **CardTab** - Card-style tabs
84
+ - **Drawer** - Side drawer/panel
85
+
86
+ ### Feedback
87
+
88
+ - **Alert** - Alert messages with different variants
89
+ - **Modal** - Modal dialogs
90
+ - **Tooltip** - Contextual tooltips
91
+ - **Badge** - Status and count badges
92
+
93
+ ### Layout
94
+
95
+ - **Table** - Data table components
96
+ - **Divider** - Section dividers
97
+ - **FieldWrapper** - Form field container
98
+ - **FieldLabel** - Form field labels
99
+ - **FieldError** - Form field error messages
100
+
101
+ ### Utility
102
+
103
+ - **ClientOnly** - Client-side only rendering
104
+
105
+ ## 🪝 Hooks
106
+
107
+ - **useForm** - Comprehensive form state management
108
+ - **useModal** - Modal state management
109
+ - **useDrawer** - Drawer state management
110
+ - **useSlider** - Slider component logic
111
+ - **useHydrated** - Check if component is hydrated
112
+ - **useScopedParams** - URL parameter utilities
113
+ - **useScrollLock** - Prevent page scrolling
114
+
115
+ ## 🎨 Component Examples
116
+
117
+ ### Button
118
+
119
+ ```tsx
120
+ import { Button } from "@arkyn/components";
121
+ import { Plus, Save } from "lucide-react";
122
+
123
+ function Examples() {
124
+ return (
125
+ <>
126
+ {/* Basic button */}
127
+ <Button>Click me</Button>
128
+
129
+ {/* With variants */}
130
+ <Button variant="outline" scheme="success">
131
+ Success
132
+ </Button>
133
+
134
+ {/* With icons */}
135
+ <Button leftIcon={Plus} rightIcon={Save}>
136
+ Save Item
137
+ </Button>
138
+
139
+ {/* Loading state */}
140
+ <Button isLoading loadingText="Saving...">
141
+ Save
142
+ </Button>
143
+ </>
144
+ );
145
+ }
146
+ ```
147
+
148
+ ### Form with Validation
149
+
150
+ ```tsx
151
+ import { Input, Button, FormProvider } from "@arkyn/components";
152
+
153
+ function ContactForm() {
154
+ const onSubmit = (data) => {
155
+ console.log(data);
156
+ };
157
+
158
+ const fieldErrors = {
159
+ email: "Email is required",
160
+ };
161
+
162
+ return (
163
+ <FormProvider
164
+ fieldErrors={fieldErrors}
165
+ form={<form onSubmit={handleSubmit(onSubmit)} />}
166
+ >
167
+ <Input
168
+ label="E-mail:"
169
+ showAsterisk
170
+ name="email"
171
+ placeholder="your@email.com"
172
+ />
173
+
174
+ <Button type="submit">Submit</Button>
175
+ </FormProvider>
176
+ );
177
+ }
178
+ ```
179
+
180
+ ### Modal with Drawer
181
+
182
+ ```tsx
183
+ import { Button, Modal, Drawer, useModal, useDrawer } from "@arkyn/components";
184
+
185
+ function App() {
186
+ const modal = useModal();
187
+ const drawer = useDrawer();
188
+
189
+ return (
190
+ <>
191
+ <Button onClick={modal.openModal}>Open Modal</Button>
192
+ <Button onClick={drawer.openDrawer}>Open Drawer</Button>
193
+
194
+ <Modal isOpen={modal.isOpen} onClose={modal.closeModal}>
195
+ <h2>Modal Content</h2>
196
+ <Button onClick={modal.closeModal}>Close</Button>
197
+ </Modal>
198
+
199
+ <Drawer isOpen={drawer.isOpen} onClose={drawer.closeDrawer}>
200
+ <h2>Drawer Content</h2>
201
+ <Button onClick={drawer.closeDrawer}>Close</Button>
202
+ </Drawer>
203
+ </>
204
+ );
205
+ }
206
+ ```
207
+
208
+ ## 🎯 TypeScript Support
209
+
210
+ All components are built with TypeScript and provide excellent type safety:
211
+
212
+ ```tsx
213
+ import { ButtonProps, InputProps } from "@arkyn/components";
214
+
215
+ // Extend component props
216
+ interface CustomButtonProps extends ButtonProps {
217
+ customProp?: string;
218
+ }
219
+
220
+ const CustomButton: React.FC<CustomButtonProps> = ({
221
+ customProp,
222
+ ...props
223
+ }) => {
224
+ return <Button {...props} />;
225
+ };
226
+ ```
227
+
228
+ ## 🎨 Styling
229
+
230
+ Components come with default styling that can be customized through CSS variables or by overriding the CSS classes. Each component has its own CSS file that can be imported separately if needed.
231
+
232
+ ```css
233
+ /* Customize button colors */
234
+ .arkyn-button {
235
+ --spotlight-primary: #your-color;
236
+ --text-heading: #your-text-color;
237
+ }
238
+ ```
239
+
240
+ ## 📱 Responsive Design
241
+
242
+ All components are built with mobile-first responsive design:
243
+
244
+ ```tsx
245
+ <Button size="lg">Responsive Button</Button>
246
+ ```
247
+
248
+ ## 🤝 Contributing
249
+
250
+ Contributions are welcome! Please read our contributing guidelines and submit pull requests to help improve the library.
251
+
252
+ ## 📄 License
253
+
254
+ This project is licensed under the Apache 2.0 License - see the [LICENSE](./LICENSE.txt) file for details.
255
+
256
+ ## 🔗 Links
257
+
258
+ - [Documentation](https://docs.arkyn.dev)
259
+ - [GitHub Repository](https://github.com/Lucas-Eduardo-Goncalves/arkyn)
260
+ - [NPM Package](https://www.npmjs.com/package/@arkyn/components)
261
+
262
+ ---
263
+
264
+ Made with ❤️ by the Arkyn team