@marcoschwartz/lite-ui 0.7.0 → 0.8.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
@@ -23,6 +23,9 @@ interface SelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'size'
23
23
  value?: string;
24
24
  defaultValue?: string;
25
25
  onChange?: (value: string) => void;
26
+ label?: string;
27
+ error?: string;
28
+ helperText?: string;
26
29
  }
27
30
  declare const Select: React.FC<SelectProps>;
28
31
 
@@ -105,13 +108,16 @@ interface TextInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement
105
108
  }
106
109
  declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
107
110
 
108
- interface ActionMenuItem {
111
+ type ActionMenuItem = {
112
+ type?: 'item';
109
113
  label: string;
110
114
  onClick: () => void;
111
115
  icon?: React.ReactNode;
112
116
  disabled?: boolean;
113
117
  variant?: 'default' | 'danger';
114
- }
118
+ } | {
119
+ type: 'divider';
120
+ };
115
121
  interface ActionMenuProps {
116
122
  items: ActionMenuItem[];
117
123
  trigger?: React.ReactNode;
@@ -201,12 +207,19 @@ interface PaginationProps {
201
207
  }
202
208
  declare const Pagination: React.FC<PaginationProps>;
203
209
 
204
- interface DatePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
210
+ interface DatePickerProps {
205
211
  label?: string;
206
212
  error?: string;
207
213
  helperText?: string;
214
+ value?: Date;
215
+ onChange?: (date: Date) => void;
216
+ minDate?: Date;
217
+ maxDate?: Date;
218
+ disabled?: boolean;
219
+ className?: string;
220
+ placeholder?: string;
208
221
  }
209
- declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
222
+ declare const DatePicker: React.FC<DatePickerProps>;
210
223
 
211
224
  interface TimePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
212
225
  label?: string;
@@ -215,12 +228,28 @@ interface TimePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElemen
215
228
  }
216
229
  declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<HTMLInputElement>>;
217
230
 
218
- interface DateTimePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
231
+ interface DateTimePickerProps {
219
232
  label?: string;
220
233
  error?: string;
221
234
  helperText?: string;
235
+ value?: Date;
236
+ onChange?: (date: Date) => void;
237
+ minDate?: Date;
238
+ maxDate?: Date;
239
+ disabled?: boolean;
240
+ className?: string;
241
+ placeholder?: string;
242
+ }
243
+ declare const DateTimePicker: React.FC<DateTimePickerProps>;
244
+
245
+ interface CalendarProps {
246
+ value?: Date;
247
+ onChange?: (date: Date) => void;
248
+ minDate?: Date;
249
+ maxDate?: Date;
250
+ className?: string;
222
251
  }
223
- declare const DateTimePicker: React.ForwardRefExoticComponent<DateTimePickerProps & React.RefAttributes<HTMLInputElement>>;
252
+ declare const Calendar: React.FC<CalendarProps>;
224
253
 
225
254
  interface RadioOption {
226
255
  value: string;
@@ -487,4 +516,4 @@ declare const YouTubeIcon: IconComponent;
487
516
 
488
517
  declare const SlackIcon: IconComponent;
489
518
 
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 };
519
+ 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, Calendar, CalendarIcon, type CalendarProps, 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
@@ -23,6 +23,9 @@ interface SelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'size'
23
23
  value?: string;
24
24
  defaultValue?: string;
25
25
  onChange?: (value: string) => void;
26
+ label?: string;
27
+ error?: string;
28
+ helperText?: string;
26
29
  }
27
30
  declare const Select: React.FC<SelectProps>;
28
31
 
@@ -105,13 +108,16 @@ interface TextInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement
105
108
  }
106
109
  declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
107
110
 
108
- interface ActionMenuItem {
111
+ type ActionMenuItem = {
112
+ type?: 'item';
109
113
  label: string;
110
114
  onClick: () => void;
111
115
  icon?: React.ReactNode;
112
116
  disabled?: boolean;
113
117
  variant?: 'default' | 'danger';
114
- }
118
+ } | {
119
+ type: 'divider';
120
+ };
115
121
  interface ActionMenuProps {
116
122
  items: ActionMenuItem[];
117
123
  trigger?: React.ReactNode;
@@ -201,12 +207,19 @@ interface PaginationProps {
201
207
  }
202
208
  declare const Pagination: React.FC<PaginationProps>;
203
209
 
204
- interface DatePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
210
+ interface DatePickerProps {
205
211
  label?: string;
206
212
  error?: string;
207
213
  helperText?: string;
214
+ value?: Date;
215
+ onChange?: (date: Date) => void;
216
+ minDate?: Date;
217
+ maxDate?: Date;
218
+ disabled?: boolean;
219
+ className?: string;
220
+ placeholder?: string;
208
221
  }
209
- declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
222
+ declare const DatePicker: React.FC<DatePickerProps>;
210
223
 
211
224
  interface TimePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
212
225
  label?: string;
@@ -215,12 +228,28 @@ interface TimePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElemen
215
228
  }
216
229
  declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<HTMLInputElement>>;
217
230
 
218
- interface DateTimePickerProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
231
+ interface DateTimePickerProps {
219
232
  label?: string;
220
233
  error?: string;
221
234
  helperText?: string;
235
+ value?: Date;
236
+ onChange?: (date: Date) => void;
237
+ minDate?: Date;
238
+ maxDate?: Date;
239
+ disabled?: boolean;
240
+ className?: string;
241
+ placeholder?: string;
242
+ }
243
+ declare const DateTimePicker: React.FC<DateTimePickerProps>;
244
+
245
+ interface CalendarProps {
246
+ value?: Date;
247
+ onChange?: (date: Date) => void;
248
+ minDate?: Date;
249
+ maxDate?: Date;
250
+ className?: string;
222
251
  }
223
- declare const DateTimePicker: React.ForwardRefExoticComponent<DateTimePickerProps & React.RefAttributes<HTMLInputElement>>;
252
+ declare const Calendar: React.FC<CalendarProps>;
224
253
 
225
254
  interface RadioOption {
226
255
  value: string;
@@ -487,4 +516,4 @@ declare const YouTubeIcon: IconComponent;
487
516
 
488
517
  declare const SlackIcon: IconComponent;
489
518
 
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 };
519
+ 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, Calendar, CalendarIcon, type CalendarProps, 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 };