@arkyn/components 3.0.1-beta.94 → 3.0.1-beta.99

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 (30) hide show
  1. package/README.md +6 -236
  2. package/dist/bundle.js +180 -174
  3. package/dist/bundle.umd.cjs +5 -5
  4. package/dist/components/alert/alertContainer/index.d.ts +46 -26
  5. package/dist/components/alert/alertContainer/index.d.ts.map +1 -1
  6. package/dist/components/alert/alertContainer/index.js +42 -25
  7. package/dist/components/alert/alertContent/index.d.ts +34 -30
  8. package/dist/components/alert/alertContent/index.d.ts.map +1 -1
  9. package/dist/components/alert/alertContent/index.js +27 -28
  10. package/dist/components/alert/alertDescription/index.d.ts +36 -34
  11. package/dist/components/alert/alertDescription/index.d.ts.map +1 -1
  12. package/dist/components/alert/alertDescription/index.js +29 -32
  13. package/dist/components/alert/alertIcon/index.d.ts +36 -34
  14. package/dist/components/alert/alertIcon/index.d.ts.map +1 -1
  15. package/dist/components/alert/alertIcon/index.js +28 -33
  16. package/dist/components/alert/alertTitle/index.d.ts +31 -29
  17. package/dist/components/alert/alertTitle/index.d.ts.map +1 -1
  18. package/dist/components/alert/alertTitle/index.js +21 -27
  19. package/dist/components/audioPlayer/index.d.ts +33 -34
  20. package/dist/components/audioPlayer/index.d.ts.map +1 -1
  21. package/dist/components/audioPlayer/index.js +17 -32
  22. package/dist/components/richText/index.d.ts +1 -1
  23. package/dist/components/richText/index.d.ts.map +1 -1
  24. package/dist/components/richText/index.js +3 -3
  25. package/dist/components/searchPlaces.d.ts.map +1 -1
  26. package/dist/components/searchPlaces.js +1 -1
  27. package/dist/providers/placesProvider.d.ts.map +1 -1
  28. package/dist/providers/placesProvider.js +6 -1
  29. package/dist/style.css +1 -1
  30. package/package.json +1 -1
package/README.md CHANGED
@@ -31,241 +31,11 @@ Make sure you have these peer dependencies installed:
31
31
  npm install react react-dom lucide-react
32
32
  ```
33
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
34
  ## 🧩 Components
57
35
 
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
- - **Popover** - Floating content containers with positioning
93
-
94
- ### Layout
95
-
96
- - **Table** - Data table components
97
- - **Divider** - Section dividers
98
- - **FieldWrapper** - Form field container
99
- - **FieldLabel** - Form field labels
100
- - **FieldError** - Form field error messages
101
-
102
- ### Utility
103
-
104
- - **ClientOnly** - Client-side only rendering
105
-
106
- ## 🪝 Hooks
107
-
108
- - **useForm** - Comprehensive form state management
109
- - **useModal** - Modal state management
110
- - **useDrawer** - Drawer state management
111
- - **useSlider** - Slider component logic
112
- - **useHydrated** - Check if component is hydrated
113
- - **useScopedParams** - URL parameter utilities
114
- - **useScrollLock** - Prevent page scrolling
115
- - **useToast** - Toast state management
116
-
117
- ## Services
118
-
119
- - **toHtml** -
120
- - **toRichTextValue** -
121
-
122
- ## 🎨 Component Examples
123
-
124
- ### Button
125
-
126
- ```tsx
127
- import { Button } from "@arkyn/components";
128
- import { Plus, Save } from "lucide-react";
129
-
130
- function Examples() {
131
- return (
132
- <>
133
- {/* Basic button */}
134
- <Button>Click me</Button>
135
-
136
- {/* With variants */}
137
- <Button variant="outline" scheme="success">
138
- Success
139
- </Button>
140
-
141
- {/* With icons */}
142
- <Button leftIcon={Plus} rightIcon={Save}>
143
- Save Item
144
- </Button>
145
-
146
- {/* Loading state */}
147
- <Button isLoading loadingText="Saving...">
148
- Save
149
- </Button>
150
- </>
151
- );
152
- }
153
- ```
154
-
155
- ### Form with Validation
156
-
157
- ```tsx
158
- import { Input, Button, FormProvider } from "@arkyn/components";
159
-
160
- function ContactForm() {
161
- const onSubmit = (data) => {
162
- console.log(data);
163
- };
164
-
165
- const fieldErrors = {
166
- email: "Email is required",
167
- };
168
-
169
- return (
170
- <FormProvider
171
- fieldErrors={fieldErrors}
172
- form={<form onSubmit={handleSubmit(onSubmit)} />}
173
- >
174
- <Input
175
- label="E-mail:"
176
- showAsterisk
177
- name="email"
178
- placeholder="your@email.com"
179
- />
180
-
181
- <Button type="submit">Submit</Button>
182
- </FormProvider>
183
- );
184
- }
185
- ```
186
-
187
- ### Modal with Drawer
188
-
189
- ```tsx
190
- import { Button, Modal, Drawer, useModal, useDrawer } from "@arkyn/components";
191
-
192
- function App() {
193
- const modal = useModal();
194
- const drawer = useDrawer();
195
-
196
- return (
197
- <>
198
- <Button onClick={modal.openModal}>Open Modal</Button>
199
- <Button onClick={drawer.openDrawer}>Open Drawer</Button>
200
-
201
- <Modal isOpen={modal.isOpen} onClose={modal.closeModal}>
202
- <h2>Modal Content</h2>
203
- <Button onClick={modal.closeModal}>Close</Button>
204
- </Modal>
205
-
206
- <Drawer isOpen={drawer.isOpen} onClose={drawer.closeDrawer}>
207
- <h2>Drawer Content</h2>
208
- <Button onClick={drawer.closeDrawer}>Close</Button>
209
- </Drawer>
210
- </>
211
- );
212
- }
213
- ```
214
-
215
- ## 🎯 TypeScript Support
216
-
217
- All components are built with TypeScript and provide excellent type safety:
218
-
219
- ```tsx
220
- import { ButtonProps, InputProps } from "@arkyn/components";
221
-
222
- // Extend component props
223
- interface CustomButtonProps extends ButtonProps {
224
- customProp?: string;
225
- }
226
-
227
- const CustomButton: React.FC<CustomButtonProps> = ({
228
- customProp,
229
- ...props
230
- }) => {
231
- return <Button {...props} />;
232
- };
233
- ```
234
-
235
- ## 🎨 Styling
236
-
237
- 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.
238
-
239
- ```css
240
- /* Customize button colors */
241
- .arkyn-button {
242
- --spotlight-primary: #your-color;
243
- --text-heading: #your-text-color;
244
- }
245
- ```
246
-
247
- ## 📱 Responsive Design
248
-
249
- All components are built with mobile-first responsive design:
250
-
251
- ```tsx
252
- <Button size="lg">Responsive Button</Button>
253
- ```
254
-
255
- ## 🤝 Contributing
256
-
257
- Contributions are welcome! Please read our contributing guidelines and submit pull requests to help improve the library.
258
-
259
- ## 📄 License
260
-
261
- This project is licensed under the Apache 2.0 License - see the [LICENSE](./LICENSE.txt) file for details.
262
-
263
- ## 🔗 Links
264
-
265
- - [Documentation](https://docs.arkyn.dev)
266
- - [GitHub Repository](https://github.com/Lucas-Eduardo-Goncalves/arkyn)
267
- - [NPM Package](https://www.npmjs.com/package/@arkyn/components)
268
-
269
- ---
270
-
271
- Made with ❤️ by the Arkyn team
36
+ - **AlertContainer**
37
+ - **AlertContent**
38
+ - **AlertDescription**
39
+ - **AlertIcon**
40
+ - **AlertTitle**
41
+ - **AudioPlayer**