@marcoschwartz/lite-ui 0.4.0 → 0.6.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/dist/index.d.mts CHANGED
@@ -206,6 +206,143 @@ interface DateTimePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputEl
206
206
  }
207
207
  declare const DateTimePicker: React.ForwardRefExoticComponent<DateTimePickerProps & React.RefAttributes<HTMLInputElement>>;
208
208
 
209
+ interface RadioOption {
210
+ value: string;
211
+ label: string;
212
+ disabled?: boolean;
213
+ }
214
+ interface RadioProps {
215
+ name: string;
216
+ options: RadioOption[];
217
+ value?: string;
218
+ defaultValue?: string;
219
+ onChange?: (value: string) => void;
220
+ disabled?: boolean;
221
+ orientation?: 'horizontal' | 'vertical';
222
+ className?: string;
223
+ }
224
+ declare const Radio: React.FC<RadioProps>;
225
+
226
+ interface ProgressBarProps {
227
+ value: number;
228
+ max?: number;
229
+ size?: 'sm' | 'md' | 'lg';
230
+ variant?: 'default' | 'success' | 'warning' | 'danger';
231
+ showLabel?: boolean;
232
+ label?: string;
233
+ className?: string;
234
+ }
235
+ declare const ProgressBar: React.FC<ProgressBarProps>;
236
+
237
+ interface SliderProps {
238
+ value?: number;
239
+ defaultValue?: number;
240
+ min?: number;
241
+ max?: number;
242
+ step?: number;
243
+ onChange?: (value: number) => void;
244
+ disabled?: boolean;
245
+ showValue?: boolean;
246
+ label?: string;
247
+ className?: string;
248
+ }
249
+ declare const Slider: React.FC<SliderProps>;
250
+
251
+ interface AvatarProps {
252
+ src?: string;
253
+ alt?: string;
254
+ name?: string;
255
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
256
+ shape?: 'circle' | 'square';
257
+ className?: string;
258
+ fallbackColor?: string;
259
+ }
260
+ declare const Avatar: React.FC<AvatarProps>;
261
+
262
+ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
263
+ label?: string;
264
+ error?: string;
265
+ helperText?: string;
266
+ size?: 'sm' | 'md' | 'lg';
267
+ resize?: 'none' | 'vertical' | 'horizontal' | 'both';
268
+ }
269
+ declare const Textarea: React.FC<TextareaProps>;
270
+
271
+ interface Toast {
272
+ id: string;
273
+ message: string;
274
+ type?: 'success' | 'error' | 'warning' | 'info';
275
+ duration?: number;
276
+ }
277
+ interface ToastContextValue {
278
+ toasts: Toast[];
279
+ addToast: (toast: Omit<Toast, 'id'>) => void;
280
+ removeToast: (id: string) => void;
281
+ }
282
+ declare const useToast: () => ToastContextValue;
283
+ interface ToastProviderProps {
284
+ children: React.ReactNode;
285
+ position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
286
+ }
287
+ declare const ToastProvider: React.FC<ToastProviderProps>;
288
+ declare const toast: {
289
+ success: (message: string, duration?: number) => {
290
+ message: string;
291
+ type: "success";
292
+ duration: number | undefined;
293
+ };
294
+ error: (message: string, duration?: number) => {
295
+ message: string;
296
+ type: "error";
297
+ duration: number | undefined;
298
+ };
299
+ warning: (message: string, duration?: number) => {
300
+ message: string;
301
+ type: "warning";
302
+ duration: number | undefined;
303
+ };
304
+ info: (message: string, duration?: number) => {
305
+ message: string;
306
+ type: "info";
307
+ duration: number | undefined;
308
+ };
309
+ };
310
+
311
+ interface Step {
312
+ label: string;
313
+ description?: string;
314
+ }
315
+ interface StepperProps {
316
+ steps: Step[];
317
+ currentStep: number;
318
+ orientation?: 'horizontal' | 'vertical';
319
+ className?: string;
320
+ }
321
+ declare const Stepper: React.FC<StepperProps>;
322
+
323
+ interface DividerProps {
324
+ orientation?: 'horizontal' | 'vertical';
325
+ variant?: 'solid' | 'dashed' | 'dotted';
326
+ className?: string;
327
+ label?: string;
328
+ labelPosition?: 'left' | 'center' | 'right';
329
+ }
330
+ declare const Divider: React.FC<DividerProps>;
331
+
332
+ interface FileUploadProps {
333
+ accept?: string;
334
+ multiple?: boolean;
335
+ maxSize?: number;
336
+ maxFiles?: number;
337
+ disabled?: boolean;
338
+ onChange?: (files: File[]) => void;
339
+ onError?: (error: string) => void;
340
+ className?: string;
341
+ label?: string;
342
+ helperText?: string;
343
+ }
344
+ declare const FileUpload: React.FC<FileUploadProps>;
345
+
209
346
  type ThemeName = 'default' | 'minimalistic';
210
347
  interface ButtonTheme {
211
348
  primary: string;
@@ -275,34 +412,63 @@ interface IconProps {
275
412
  interface IconComponent extends React.FC<IconProps> {
276
413
  displayName?: string;
277
414
  }
415
+
278
416
  declare const HomeIcon: IconComponent;
417
+
279
418
  declare const UserIcon: IconComponent;
419
+
280
420
  declare const SearchIcon: IconComponent;
421
+
281
422
  declare const BellIcon: IconComponent;
423
+
282
424
  declare const SettingsIcon: IconComponent;
425
+
283
426
  declare const MenuIcon: IconComponent;
427
+
284
428
  declare const CloseIcon: IconComponent;
429
+
285
430
  declare const ChevronDownIcon: IconComponent;
431
+
286
432
  declare const ChevronRightIcon: IconComponent;
433
+
287
434
  declare const CheckIcon: IconComponent;
435
+
288
436
  declare const PlusIcon: IconComponent;
437
+
289
438
  declare const TrashIcon: IconComponent;
439
+
290
440
  declare const EditIcon: IconComponent;
441
+
291
442
  declare const MailIcon: IconComponent;
443
+
292
444
  declare const StarIcon: IconComponent;
445
+
293
446
  declare const HeartIcon: IconComponent;
447
+
294
448
  declare const DownloadIcon: IconComponent;
449
+
295
450
  declare const UploadIcon: IconComponent;
451
+
296
452
  declare const CameraIcon: IconComponent;
453
+
297
454
  declare const LockIcon: IconComponent;
455
+
298
456
  declare const CalendarIcon: IconComponent;
457
+
299
458
  declare const GoogleIcon: IconComponent;
459
+
300
460
  declare const GitHubIcon: IconComponent;
461
+
301
462
  declare const TwitterIcon: IconComponent;
463
+
302
464
  declare const FacebookIcon: IconComponent;
465
+
303
466
  declare const AppleIcon: IconComponent;
467
+
304
468
  declare const LinkedInIcon: IconComponent;
469
+
305
470
  declare const YouTubeIcon: IconComponent;
471
+
306
472
  declare const SlackIcon: IconComponent;
307
473
 
308
- export { ActionMenu, type ActionMenuItem, type ActionMenuProps, Alert, type AlertProps, AppleIcon, Badge, type BadgeProps, BellIcon, Button, type ButtonProps, type ButtonTheme, CalendarIcon, CameraIcon, Card, type CardProps, CheckIcon, Checkbox, type CheckboxProps, ChevronDownIcon, ChevronRightIcon, CloseIcon, type ColorMode, type Column, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, DownloadIcon, Drawer, type DrawerProps, EditIcon, FacebookIcon, GitHubIcon, GoogleIcon, HeartIcon, HomeIcon, type IconComponent, type IconProps, LinkedInIcon, LockIcon, MailIcon, MenuIcon, Modal, type ModalProps, Navbar, type NavbarProps, Pagination, type PaginationProps, PlusIcon, SearchIcon, Select, type SelectOption, type SelectProps, type SelectTheme, SettingsIcon, Sidebar, type SidebarContextValue, type SidebarProps, SidebarProvider, type SidebarProviderProps, SlackIcon, Spinner, type SpinnerProps, StarIcon, type Tab, Table, type TableProps, Tabs, type TabsProps, TextInput, type TextInputProps, type Theme, type ThemeName, ThemeProvider, TimePicker, type TimePickerProps, Toggle, type ToggleProps, TrashIcon, TwitterIcon, UploadIcon, UserIcon, YouTubeIcon, getThemeScript, themeScript, themes, useSidebar, useTheme };
474
+ export { ActionMenu, type ActionMenuItem, type ActionMenuProps, Alert, type AlertProps, AppleIcon, Avatar, type AvatarProps, Badge, type BadgeProps, BellIcon, Button, type ButtonProps, type ButtonTheme, CalendarIcon, CameraIcon, Card, type CardProps, CheckIcon, Checkbox, type CheckboxProps, ChevronDownIcon, ChevronRightIcon, CloseIcon, type ColorMode, type Column, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, Divider, type DividerProps, DownloadIcon, Drawer, type DrawerProps, EditIcon, FacebookIcon, FileUpload, type FileUploadProps, GitHubIcon, GoogleIcon, HeartIcon, HomeIcon, type IconComponent, type IconProps, LinkedInIcon, LockIcon, MailIcon, MenuIcon, Modal, type ModalProps, Navbar, type NavbarProps, Pagination, type PaginationProps, PlusIcon, ProgressBar, type ProgressBarProps, Radio, type RadioOption, type RadioProps, SearchIcon, Select, type SelectOption, type SelectProps, type SelectTheme, SettingsIcon, Sidebar, type SidebarContextValue, type SidebarProps, SidebarProvider, type SidebarProviderProps, SlackIcon, Slider, type SliderProps, Spinner, type SpinnerProps, StarIcon, type Step, Stepper, type StepperProps, type Tab, Table, type TableProps, Tabs, type TabsProps, TextInput, type TextInputProps, Textarea, type TextareaProps, type Theme, type ThemeName, ThemeProvider, TimePicker, type TimePickerProps, type Toast, ToastProvider, type ToastProviderProps, Toggle, type ToggleProps, TrashIcon, TwitterIcon, UploadIcon, UserIcon, YouTubeIcon, getThemeScript, themeScript, themes, toast, useSidebar, useTheme, useToast };
package/dist/index.d.ts CHANGED
@@ -206,6 +206,143 @@ interface DateTimePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputEl
206
206
  }
207
207
  declare const DateTimePicker: React.ForwardRefExoticComponent<DateTimePickerProps & React.RefAttributes<HTMLInputElement>>;
208
208
 
209
+ interface RadioOption {
210
+ value: string;
211
+ label: string;
212
+ disabled?: boolean;
213
+ }
214
+ interface RadioProps {
215
+ name: string;
216
+ options: RadioOption[];
217
+ value?: string;
218
+ defaultValue?: string;
219
+ onChange?: (value: string) => void;
220
+ disabled?: boolean;
221
+ orientation?: 'horizontal' | 'vertical';
222
+ className?: string;
223
+ }
224
+ declare const Radio: React.FC<RadioProps>;
225
+
226
+ interface ProgressBarProps {
227
+ value: number;
228
+ max?: number;
229
+ size?: 'sm' | 'md' | 'lg';
230
+ variant?: 'default' | 'success' | 'warning' | 'danger';
231
+ showLabel?: boolean;
232
+ label?: string;
233
+ className?: string;
234
+ }
235
+ declare const ProgressBar: React.FC<ProgressBarProps>;
236
+
237
+ interface SliderProps {
238
+ value?: number;
239
+ defaultValue?: number;
240
+ min?: number;
241
+ max?: number;
242
+ step?: number;
243
+ onChange?: (value: number) => void;
244
+ disabled?: boolean;
245
+ showValue?: boolean;
246
+ label?: string;
247
+ className?: string;
248
+ }
249
+ declare const Slider: React.FC<SliderProps>;
250
+
251
+ interface AvatarProps {
252
+ src?: string;
253
+ alt?: string;
254
+ name?: string;
255
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
256
+ shape?: 'circle' | 'square';
257
+ className?: string;
258
+ fallbackColor?: string;
259
+ }
260
+ declare const Avatar: React.FC<AvatarProps>;
261
+
262
+ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
263
+ label?: string;
264
+ error?: string;
265
+ helperText?: string;
266
+ size?: 'sm' | 'md' | 'lg';
267
+ resize?: 'none' | 'vertical' | 'horizontal' | 'both';
268
+ }
269
+ declare const Textarea: React.FC<TextareaProps>;
270
+
271
+ interface Toast {
272
+ id: string;
273
+ message: string;
274
+ type?: 'success' | 'error' | 'warning' | 'info';
275
+ duration?: number;
276
+ }
277
+ interface ToastContextValue {
278
+ toasts: Toast[];
279
+ addToast: (toast: Omit<Toast, 'id'>) => void;
280
+ removeToast: (id: string) => void;
281
+ }
282
+ declare const useToast: () => ToastContextValue;
283
+ interface ToastProviderProps {
284
+ children: React.ReactNode;
285
+ position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
286
+ }
287
+ declare const ToastProvider: React.FC<ToastProviderProps>;
288
+ declare const toast: {
289
+ success: (message: string, duration?: number) => {
290
+ message: string;
291
+ type: "success";
292
+ duration: number | undefined;
293
+ };
294
+ error: (message: string, duration?: number) => {
295
+ message: string;
296
+ type: "error";
297
+ duration: number | undefined;
298
+ };
299
+ warning: (message: string, duration?: number) => {
300
+ message: string;
301
+ type: "warning";
302
+ duration: number | undefined;
303
+ };
304
+ info: (message: string, duration?: number) => {
305
+ message: string;
306
+ type: "info";
307
+ duration: number | undefined;
308
+ };
309
+ };
310
+
311
+ interface Step {
312
+ label: string;
313
+ description?: string;
314
+ }
315
+ interface StepperProps {
316
+ steps: Step[];
317
+ currentStep: number;
318
+ orientation?: 'horizontal' | 'vertical';
319
+ className?: string;
320
+ }
321
+ declare const Stepper: React.FC<StepperProps>;
322
+
323
+ interface DividerProps {
324
+ orientation?: 'horizontal' | 'vertical';
325
+ variant?: 'solid' | 'dashed' | 'dotted';
326
+ className?: string;
327
+ label?: string;
328
+ labelPosition?: 'left' | 'center' | 'right';
329
+ }
330
+ declare const Divider: React.FC<DividerProps>;
331
+
332
+ interface FileUploadProps {
333
+ accept?: string;
334
+ multiple?: boolean;
335
+ maxSize?: number;
336
+ maxFiles?: number;
337
+ disabled?: boolean;
338
+ onChange?: (files: File[]) => void;
339
+ onError?: (error: string) => void;
340
+ className?: string;
341
+ label?: string;
342
+ helperText?: string;
343
+ }
344
+ declare const FileUpload: React.FC<FileUploadProps>;
345
+
209
346
  type ThemeName = 'default' | 'minimalistic';
210
347
  interface ButtonTheme {
211
348
  primary: string;
@@ -275,34 +412,63 @@ interface IconProps {
275
412
  interface IconComponent extends React.FC<IconProps> {
276
413
  displayName?: string;
277
414
  }
415
+
278
416
  declare const HomeIcon: IconComponent;
417
+
279
418
  declare const UserIcon: IconComponent;
419
+
280
420
  declare const SearchIcon: IconComponent;
421
+
281
422
  declare const BellIcon: IconComponent;
423
+
282
424
  declare const SettingsIcon: IconComponent;
425
+
283
426
  declare const MenuIcon: IconComponent;
427
+
284
428
  declare const CloseIcon: IconComponent;
429
+
285
430
  declare const ChevronDownIcon: IconComponent;
431
+
286
432
  declare const ChevronRightIcon: IconComponent;
433
+
287
434
  declare const CheckIcon: IconComponent;
435
+
288
436
  declare const PlusIcon: IconComponent;
437
+
289
438
  declare const TrashIcon: IconComponent;
439
+
290
440
  declare const EditIcon: IconComponent;
441
+
291
442
  declare const MailIcon: IconComponent;
443
+
292
444
  declare const StarIcon: IconComponent;
445
+
293
446
  declare const HeartIcon: IconComponent;
447
+
294
448
  declare const DownloadIcon: IconComponent;
449
+
295
450
  declare const UploadIcon: IconComponent;
451
+
296
452
  declare const CameraIcon: IconComponent;
453
+
297
454
  declare const LockIcon: IconComponent;
455
+
298
456
  declare const CalendarIcon: IconComponent;
457
+
299
458
  declare const GoogleIcon: IconComponent;
459
+
300
460
  declare const GitHubIcon: IconComponent;
461
+
301
462
  declare const TwitterIcon: IconComponent;
463
+
302
464
  declare const FacebookIcon: IconComponent;
465
+
303
466
  declare const AppleIcon: IconComponent;
467
+
304
468
  declare const LinkedInIcon: IconComponent;
469
+
305
470
  declare const YouTubeIcon: IconComponent;
471
+
306
472
  declare const SlackIcon: IconComponent;
307
473
 
308
- export { ActionMenu, type ActionMenuItem, type ActionMenuProps, Alert, type AlertProps, AppleIcon, Badge, type BadgeProps, BellIcon, Button, type ButtonProps, type ButtonTheme, CalendarIcon, CameraIcon, Card, type CardProps, CheckIcon, Checkbox, type CheckboxProps, ChevronDownIcon, ChevronRightIcon, CloseIcon, type ColorMode, type Column, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, DownloadIcon, Drawer, type DrawerProps, EditIcon, FacebookIcon, GitHubIcon, GoogleIcon, HeartIcon, HomeIcon, type IconComponent, type IconProps, LinkedInIcon, LockIcon, MailIcon, MenuIcon, Modal, type ModalProps, Navbar, type NavbarProps, Pagination, type PaginationProps, PlusIcon, SearchIcon, Select, type SelectOption, type SelectProps, type SelectTheme, SettingsIcon, Sidebar, type SidebarContextValue, type SidebarProps, SidebarProvider, type SidebarProviderProps, SlackIcon, Spinner, type SpinnerProps, StarIcon, type Tab, Table, type TableProps, Tabs, type TabsProps, TextInput, type TextInputProps, type Theme, type ThemeName, ThemeProvider, TimePicker, type TimePickerProps, Toggle, type ToggleProps, TrashIcon, TwitterIcon, UploadIcon, UserIcon, YouTubeIcon, getThemeScript, themeScript, themes, useSidebar, useTheme };
474
+ export { ActionMenu, type ActionMenuItem, type ActionMenuProps, Alert, type AlertProps, AppleIcon, Avatar, type AvatarProps, Badge, type BadgeProps, BellIcon, Button, type ButtonProps, type ButtonTheme, CalendarIcon, CameraIcon, Card, type CardProps, CheckIcon, Checkbox, type CheckboxProps, ChevronDownIcon, ChevronRightIcon, CloseIcon, type ColorMode, type Column, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, Divider, type DividerProps, DownloadIcon, Drawer, type DrawerProps, EditIcon, FacebookIcon, FileUpload, type FileUploadProps, GitHubIcon, GoogleIcon, HeartIcon, HomeIcon, type IconComponent, type IconProps, LinkedInIcon, LockIcon, MailIcon, MenuIcon, Modal, type ModalProps, Navbar, type NavbarProps, Pagination, type PaginationProps, PlusIcon, ProgressBar, type ProgressBarProps, Radio, type RadioOption, type RadioProps, SearchIcon, Select, type SelectOption, type SelectProps, type SelectTheme, SettingsIcon, Sidebar, type SidebarContextValue, type SidebarProps, SidebarProvider, type SidebarProviderProps, SlackIcon, Slider, type SliderProps, Spinner, type SpinnerProps, StarIcon, type Step, Stepper, type StepperProps, type Tab, Table, type TableProps, Tabs, type TabsProps, TextInput, type TextInputProps, Textarea, type TextareaProps, type Theme, type ThemeName, ThemeProvider, TimePicker, type TimePickerProps, type Toast, ToastProvider, type ToastProviderProps, Toggle, type ToggleProps, TrashIcon, TwitterIcon, UploadIcon, UserIcon, YouTubeIcon, getThemeScript, themeScript, themes, toast, useSidebar, useTheme, useToast };