@marcoschwartz/lite-ui 0.4.1 → 0.7.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
@@ -67,6 +67,22 @@ interface SidebarProviderProps {
67
67
  declare const SidebarProvider: React.FC<SidebarProviderProps>;
68
68
  declare const useSidebar: () => SidebarContextValue;
69
69
 
70
+ interface AppShellProps {
71
+ children: React.ReactNode;
72
+ navbar?: {
73
+ content: React.ReactNode;
74
+ width?: 'sm' | 'md' | 'lg';
75
+ breakpoint?: 'sm' | 'md' | 'lg' | 'xl';
76
+ };
77
+ header?: React.ReactNode;
78
+ navbarTitle?: string;
79
+ navbarLogo?: React.ReactNode;
80
+ defaultNavbarOpen?: boolean;
81
+ responsive?: boolean;
82
+ className?: string;
83
+ }
84
+ declare const AppShell: React.FC<AppShellProps>;
85
+
70
86
  interface DrawerProps {
71
87
  isOpen: boolean;
72
88
  onClose: () => void;
@@ -206,6 +222,143 @@ interface DateTimePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputEl
206
222
  }
207
223
  declare const DateTimePicker: React.ForwardRefExoticComponent<DateTimePickerProps & React.RefAttributes<HTMLInputElement>>;
208
224
 
225
+ interface RadioOption {
226
+ value: string;
227
+ label: string;
228
+ disabled?: boolean;
229
+ }
230
+ interface RadioProps {
231
+ name: string;
232
+ options: RadioOption[];
233
+ value?: string;
234
+ defaultValue?: string;
235
+ onChange?: (value: string) => void;
236
+ disabled?: boolean;
237
+ orientation?: 'horizontal' | 'vertical';
238
+ className?: string;
239
+ }
240
+ declare const Radio: React.FC<RadioProps>;
241
+
242
+ interface ProgressBarProps {
243
+ value: number;
244
+ max?: number;
245
+ size?: 'sm' | 'md' | 'lg';
246
+ variant?: 'default' | 'success' | 'warning' | 'danger';
247
+ showLabel?: boolean;
248
+ label?: string;
249
+ className?: string;
250
+ }
251
+ declare const ProgressBar: React.FC<ProgressBarProps>;
252
+
253
+ interface SliderProps {
254
+ value?: number;
255
+ defaultValue?: number;
256
+ min?: number;
257
+ max?: number;
258
+ step?: number;
259
+ onChange?: (value: number) => void;
260
+ disabled?: boolean;
261
+ showValue?: boolean;
262
+ label?: string;
263
+ className?: string;
264
+ }
265
+ declare const Slider: React.FC<SliderProps>;
266
+
267
+ interface AvatarProps {
268
+ src?: string;
269
+ alt?: string;
270
+ name?: string;
271
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
272
+ shape?: 'circle' | 'square';
273
+ className?: string;
274
+ fallbackColor?: string;
275
+ }
276
+ declare const Avatar: React.FC<AvatarProps>;
277
+
278
+ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
279
+ label?: string;
280
+ error?: string;
281
+ helperText?: string;
282
+ size?: 'sm' | 'md' | 'lg';
283
+ resize?: 'none' | 'vertical' | 'horizontal' | 'both';
284
+ }
285
+ declare const Textarea: React.FC<TextareaProps>;
286
+
287
+ interface Toast {
288
+ id: string;
289
+ message: string;
290
+ type?: 'success' | 'error' | 'warning' | 'info';
291
+ duration?: number;
292
+ }
293
+ interface ToastContextValue {
294
+ toasts: Toast[];
295
+ addToast: (toast: Omit<Toast, 'id'>) => void;
296
+ removeToast: (id: string) => void;
297
+ }
298
+ declare const useToast: () => ToastContextValue;
299
+ interface ToastProviderProps {
300
+ children: React.ReactNode;
301
+ position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
302
+ }
303
+ declare const ToastProvider: React.FC<ToastProviderProps>;
304
+ declare const toast: {
305
+ success: (message: string, duration?: number) => {
306
+ message: string;
307
+ type: "success";
308
+ duration: number | undefined;
309
+ };
310
+ error: (message: string, duration?: number) => {
311
+ message: string;
312
+ type: "error";
313
+ duration: number | undefined;
314
+ };
315
+ warning: (message: string, duration?: number) => {
316
+ message: string;
317
+ type: "warning";
318
+ duration: number | undefined;
319
+ };
320
+ info: (message: string, duration?: number) => {
321
+ message: string;
322
+ type: "info";
323
+ duration: number | undefined;
324
+ };
325
+ };
326
+
327
+ interface Step {
328
+ label: string;
329
+ description?: string;
330
+ }
331
+ interface StepperProps {
332
+ steps: Step[];
333
+ currentStep: number;
334
+ orientation?: 'horizontal' | 'vertical';
335
+ className?: string;
336
+ }
337
+ declare const Stepper: React.FC<StepperProps>;
338
+
339
+ interface DividerProps {
340
+ orientation?: 'horizontal' | 'vertical';
341
+ variant?: 'solid' | 'dashed' | 'dotted';
342
+ className?: string;
343
+ label?: string;
344
+ labelPosition?: 'left' | 'center' | 'right';
345
+ }
346
+ declare const Divider: React.FC<DividerProps>;
347
+
348
+ interface FileUploadProps {
349
+ accept?: string;
350
+ multiple?: boolean;
351
+ maxSize?: number;
352
+ maxFiles?: number;
353
+ disabled?: boolean;
354
+ onChange?: (files: File[]) => void;
355
+ onError?: (error: string) => void;
356
+ className?: string;
357
+ label?: string;
358
+ helperText?: string;
359
+ }
360
+ declare const FileUpload: React.FC<FileUploadProps>;
361
+
209
362
  type ThemeName = 'default' | 'minimalistic';
210
363
  interface ButtonTheme {
211
364
  primary: string;
@@ -275,34 +428,63 @@ interface IconProps {
275
428
  interface IconComponent extends React.FC<IconProps> {
276
429
  displayName?: string;
277
430
  }
431
+
278
432
  declare const HomeIcon: IconComponent;
433
+
279
434
  declare const UserIcon: IconComponent;
435
+
280
436
  declare const SearchIcon: IconComponent;
437
+
281
438
  declare const BellIcon: IconComponent;
439
+
282
440
  declare const SettingsIcon: IconComponent;
441
+
283
442
  declare const MenuIcon: IconComponent;
443
+
284
444
  declare const CloseIcon: IconComponent;
445
+
285
446
  declare const ChevronDownIcon: IconComponent;
447
+
286
448
  declare const ChevronRightIcon: IconComponent;
449
+
287
450
  declare const CheckIcon: IconComponent;
451
+
288
452
  declare const PlusIcon: IconComponent;
453
+
289
454
  declare const TrashIcon: IconComponent;
455
+
290
456
  declare const EditIcon: IconComponent;
457
+
291
458
  declare const MailIcon: IconComponent;
459
+
292
460
  declare const StarIcon: IconComponent;
461
+
293
462
  declare const HeartIcon: IconComponent;
463
+
294
464
  declare const DownloadIcon: IconComponent;
465
+
295
466
  declare const UploadIcon: IconComponent;
467
+
296
468
  declare const CameraIcon: IconComponent;
469
+
297
470
  declare const LockIcon: IconComponent;
471
+
298
472
  declare const CalendarIcon: IconComponent;
473
+
299
474
  declare const GoogleIcon: IconComponent;
475
+
300
476
  declare const GitHubIcon: IconComponent;
477
+
301
478
  declare const TwitterIcon: IconComponent;
479
+
302
480
  declare const FacebookIcon: IconComponent;
481
+
303
482
  declare const AppleIcon: IconComponent;
483
+
304
484
  declare const LinkedInIcon: IconComponent;
485
+
305
486
  declare const YouTubeIcon: IconComponent;
487
+
306
488
  declare const SlackIcon: IconComponent;
307
489
 
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 };
490
+ export { ActionMenu, type ActionMenuItem, type ActionMenuProps, Alert, type AlertProps, AppShell, type AppShellProps, 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
@@ -67,6 +67,22 @@ interface SidebarProviderProps {
67
67
  declare const SidebarProvider: React.FC<SidebarProviderProps>;
68
68
  declare const useSidebar: () => SidebarContextValue;
69
69
 
70
+ interface AppShellProps {
71
+ children: React.ReactNode;
72
+ navbar?: {
73
+ content: React.ReactNode;
74
+ width?: 'sm' | 'md' | 'lg';
75
+ breakpoint?: 'sm' | 'md' | 'lg' | 'xl';
76
+ };
77
+ header?: React.ReactNode;
78
+ navbarTitle?: string;
79
+ navbarLogo?: React.ReactNode;
80
+ defaultNavbarOpen?: boolean;
81
+ responsive?: boolean;
82
+ className?: string;
83
+ }
84
+ declare const AppShell: React.FC<AppShellProps>;
85
+
70
86
  interface DrawerProps {
71
87
  isOpen: boolean;
72
88
  onClose: () => void;
@@ -206,6 +222,143 @@ interface DateTimePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputEl
206
222
  }
207
223
  declare const DateTimePicker: React.ForwardRefExoticComponent<DateTimePickerProps & React.RefAttributes<HTMLInputElement>>;
208
224
 
225
+ interface RadioOption {
226
+ value: string;
227
+ label: string;
228
+ disabled?: boolean;
229
+ }
230
+ interface RadioProps {
231
+ name: string;
232
+ options: RadioOption[];
233
+ value?: string;
234
+ defaultValue?: string;
235
+ onChange?: (value: string) => void;
236
+ disabled?: boolean;
237
+ orientation?: 'horizontal' | 'vertical';
238
+ className?: string;
239
+ }
240
+ declare const Radio: React.FC<RadioProps>;
241
+
242
+ interface ProgressBarProps {
243
+ value: number;
244
+ max?: number;
245
+ size?: 'sm' | 'md' | 'lg';
246
+ variant?: 'default' | 'success' | 'warning' | 'danger';
247
+ showLabel?: boolean;
248
+ label?: string;
249
+ className?: string;
250
+ }
251
+ declare const ProgressBar: React.FC<ProgressBarProps>;
252
+
253
+ interface SliderProps {
254
+ value?: number;
255
+ defaultValue?: number;
256
+ min?: number;
257
+ max?: number;
258
+ step?: number;
259
+ onChange?: (value: number) => void;
260
+ disabled?: boolean;
261
+ showValue?: boolean;
262
+ label?: string;
263
+ className?: string;
264
+ }
265
+ declare const Slider: React.FC<SliderProps>;
266
+
267
+ interface AvatarProps {
268
+ src?: string;
269
+ alt?: string;
270
+ name?: string;
271
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
272
+ shape?: 'circle' | 'square';
273
+ className?: string;
274
+ fallbackColor?: string;
275
+ }
276
+ declare const Avatar: React.FC<AvatarProps>;
277
+
278
+ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
279
+ label?: string;
280
+ error?: string;
281
+ helperText?: string;
282
+ size?: 'sm' | 'md' | 'lg';
283
+ resize?: 'none' | 'vertical' | 'horizontal' | 'both';
284
+ }
285
+ declare const Textarea: React.FC<TextareaProps>;
286
+
287
+ interface Toast {
288
+ id: string;
289
+ message: string;
290
+ type?: 'success' | 'error' | 'warning' | 'info';
291
+ duration?: number;
292
+ }
293
+ interface ToastContextValue {
294
+ toasts: Toast[];
295
+ addToast: (toast: Omit<Toast, 'id'>) => void;
296
+ removeToast: (id: string) => void;
297
+ }
298
+ declare const useToast: () => ToastContextValue;
299
+ interface ToastProviderProps {
300
+ children: React.ReactNode;
301
+ position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
302
+ }
303
+ declare const ToastProvider: React.FC<ToastProviderProps>;
304
+ declare const toast: {
305
+ success: (message: string, duration?: number) => {
306
+ message: string;
307
+ type: "success";
308
+ duration: number | undefined;
309
+ };
310
+ error: (message: string, duration?: number) => {
311
+ message: string;
312
+ type: "error";
313
+ duration: number | undefined;
314
+ };
315
+ warning: (message: string, duration?: number) => {
316
+ message: string;
317
+ type: "warning";
318
+ duration: number | undefined;
319
+ };
320
+ info: (message: string, duration?: number) => {
321
+ message: string;
322
+ type: "info";
323
+ duration: number | undefined;
324
+ };
325
+ };
326
+
327
+ interface Step {
328
+ label: string;
329
+ description?: string;
330
+ }
331
+ interface StepperProps {
332
+ steps: Step[];
333
+ currentStep: number;
334
+ orientation?: 'horizontal' | 'vertical';
335
+ className?: string;
336
+ }
337
+ declare const Stepper: React.FC<StepperProps>;
338
+
339
+ interface DividerProps {
340
+ orientation?: 'horizontal' | 'vertical';
341
+ variant?: 'solid' | 'dashed' | 'dotted';
342
+ className?: string;
343
+ label?: string;
344
+ labelPosition?: 'left' | 'center' | 'right';
345
+ }
346
+ declare const Divider: React.FC<DividerProps>;
347
+
348
+ interface FileUploadProps {
349
+ accept?: string;
350
+ multiple?: boolean;
351
+ maxSize?: number;
352
+ maxFiles?: number;
353
+ disabled?: boolean;
354
+ onChange?: (files: File[]) => void;
355
+ onError?: (error: string) => void;
356
+ className?: string;
357
+ label?: string;
358
+ helperText?: string;
359
+ }
360
+ declare const FileUpload: React.FC<FileUploadProps>;
361
+
209
362
  type ThemeName = 'default' | 'minimalistic';
210
363
  interface ButtonTheme {
211
364
  primary: string;
@@ -275,34 +428,63 @@ interface IconProps {
275
428
  interface IconComponent extends React.FC<IconProps> {
276
429
  displayName?: string;
277
430
  }
431
+
278
432
  declare const HomeIcon: IconComponent;
433
+
279
434
  declare const UserIcon: IconComponent;
435
+
280
436
  declare const SearchIcon: IconComponent;
437
+
281
438
  declare const BellIcon: IconComponent;
439
+
282
440
  declare const SettingsIcon: IconComponent;
441
+
283
442
  declare const MenuIcon: IconComponent;
443
+
284
444
  declare const CloseIcon: IconComponent;
445
+
285
446
  declare const ChevronDownIcon: IconComponent;
447
+
286
448
  declare const ChevronRightIcon: IconComponent;
449
+
287
450
  declare const CheckIcon: IconComponent;
451
+
288
452
  declare const PlusIcon: IconComponent;
453
+
289
454
  declare const TrashIcon: IconComponent;
455
+
290
456
  declare const EditIcon: IconComponent;
457
+
291
458
  declare const MailIcon: IconComponent;
459
+
292
460
  declare const StarIcon: IconComponent;
461
+
293
462
  declare const HeartIcon: IconComponent;
463
+
294
464
  declare const DownloadIcon: IconComponent;
465
+
295
466
  declare const UploadIcon: IconComponent;
467
+
296
468
  declare const CameraIcon: IconComponent;
469
+
297
470
  declare const LockIcon: IconComponent;
471
+
298
472
  declare const CalendarIcon: IconComponent;
473
+
299
474
  declare const GoogleIcon: IconComponent;
475
+
300
476
  declare const GitHubIcon: IconComponent;
477
+
301
478
  declare const TwitterIcon: IconComponent;
479
+
302
480
  declare const FacebookIcon: IconComponent;
481
+
303
482
  declare const AppleIcon: IconComponent;
483
+
304
484
  declare const LinkedInIcon: IconComponent;
485
+
305
486
  declare const YouTubeIcon: IconComponent;
487
+
306
488
  declare const SlackIcon: IconComponent;
307
489
 
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 };
490
+ export { ActionMenu, type ActionMenuItem, type ActionMenuProps, Alert, type AlertProps, AppShell, type AppShellProps, 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 };