@onesaz/ui 0.4.9 → 0.4.10

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.ts CHANGED
@@ -431,6 +431,99 @@ interface RangeSliderProps extends Omit<React.ComponentPropsWithoutRef<typeof Sl
431
431
  }
432
432
  declare const RangeSlider: React.ForwardRefExoticComponent<RangeSliderProps & React.RefAttributes<HTMLSpanElement>>;
433
433
 
434
+ type PickerVariant = 'desktop' | 'mobile' | 'auto';
435
+ interface PickerSharedProps {
436
+ disabled?: boolean;
437
+ readOnly?: boolean;
438
+ label?: string;
439
+ required?: boolean;
440
+ className?: string;
441
+ /** Hide the text input — show only a button trigger */
442
+ disableInput?: boolean;
443
+ /** Disable the calendar/popover — text input only */
444
+ disableCalendar?: boolean;
445
+ variant?: PickerVariant;
446
+ }
447
+ interface DatePickerProps extends PickerSharedProps {
448
+ value?: Date | null;
449
+ defaultValue?: Date | null;
450
+ onChange?: (date: Date | null) => void;
451
+ /** dayjs format string, default: MM/DD/YYYY */
452
+ format?: string;
453
+ placeholder?: string;
454
+ minDate?: Date;
455
+ maxDate?: Date;
456
+ }
457
+ interface MonthPickerProps extends PickerSharedProps {
458
+ value?: Date | null;
459
+ defaultValue?: Date | null;
460
+ onChange?: (date: Date | null) => void;
461
+ /** dayjs format string, default: MM/YYYY */
462
+ format?: string;
463
+ placeholder?: string;
464
+ minDate?: Date;
465
+ maxDate?: Date;
466
+ }
467
+ interface YearPickerProps extends PickerSharedProps {
468
+ value?: number | null;
469
+ defaultValue?: number | null;
470
+ onChange?: (year: number | null) => void;
471
+ placeholder?: string;
472
+ minYear?: number;
473
+ maxYear?: number;
474
+ }
475
+ interface TimePickerProps extends PickerSharedProps {
476
+ /** 'HH:mm' | 'HH:mm:ss' | 'hh:mm A' | 'hh:mm:ss A' */
477
+ value?: string | null;
478
+ defaultValue?: string | null;
479
+ onChange?: (time: string | null) => void;
480
+ is12Hour?: boolean;
481
+ showSeconds?: boolean;
482
+ placeholder?: string;
483
+ }
484
+ interface DateTimePickerProps extends PickerSharedProps {
485
+ value?: Date | null;
486
+ defaultValue?: Date | null;
487
+ onChange?: (date: Date | null) => void;
488
+ /** dayjs format string, default: MM/DD/YYYY hh:mm A */
489
+ format?: string;
490
+ placeholder?: string;
491
+ is12Hour?: boolean;
492
+ showSeconds?: boolean;
493
+ minDate?: Date;
494
+ maxDate?: Date;
495
+ }
496
+ interface DateRangePreset {
497
+ label: string;
498
+ /** Return the [start, end] Date tuple for this preset */
499
+ getValue: () => [Date, Date];
500
+ }
501
+ interface DateRangePickerProps extends PickerSharedProps {
502
+ value?: [Date | null, Date | null];
503
+ defaultValue?: [Date | null, Date | null];
504
+ onChange?: (range: [Date | null, Date | null]) => void;
505
+ /** dayjs format string, default: MM/DD/YYYY */
506
+ format?: string;
507
+ startPlaceholder?: string;
508
+ endPlaceholder?: string;
509
+ minDate?: Date;
510
+ maxDate?: Date;
511
+ /**
512
+ * Preset range options shown alongside the calendars.
513
+ * Pass `DEFAULT_DATE_RANGE_PRESETS` to use built-ins, or supply your own array.
514
+ * Pass `[]` to disable presets entirely.
515
+ */
516
+ presets?: DateRangePreset[];
517
+ }
518
+ /** Built-in presets. Pass to `presets` prop or extend with your own. */
519
+ declare const DEFAULT_DATE_RANGE_PRESETS: DateRangePreset[];
520
+ declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
521
+ declare const MonthPicker: React.ForwardRefExoticComponent<MonthPickerProps & React.RefAttributes<HTMLInputElement>>;
522
+ declare const YearPicker: React.ForwardRefExoticComponent<YearPickerProps & React.RefAttributes<HTMLInputElement>>;
523
+ declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<HTMLInputElement>>;
524
+ declare const DateTimePicker: React.ForwardRefExoticComponent<DateTimePickerProps & React.RefAttributes<HTMLInputElement>>;
525
+ declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLInputElement>>;
526
+
434
527
  declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
435
528
  declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
436
529
  declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
@@ -825,6 +918,10 @@ interface ComboboxSharedProps<T extends ComboboxOptionInput = ComboboxOptionInpu
825
918
  simpleOptions?: boolean;
826
919
  labelKey?: string;
827
920
  valueKey?: string;
921
+ /** Label displayed above the trigger */
922
+ label?: string;
923
+ /** Marks the field as required — shows an asterisk and adds native required to the hidden input */
924
+ required?: boolean;
828
925
  /** Node rendered at the start (left) of the trigger button */
829
926
  startAdornment?: React.ReactNode;
830
927
  /** Click handler for the start adornment — renders it as a button when provided */
@@ -2009,4 +2106,4 @@ declare const RailPanelItem: React.ForwardRefExoticComponent<RailPanelItemProps
2009
2106
 
2010
2107
  declare const Playground: () => react_jsx_runtime.JSX.Element;
2011
2108
 
2012
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, AreaChart, type AreaChartProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Backdrop, type BackdropProps, Badge, type BadgeProps, BarChart, type BarChartProps, BottomNavigation, BottomNavigationAction, type BottomNavigationActionProps, type BottomNavigationProps, Box, type BoxProps, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbPage, type BreadcrumbPageProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Caption, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, type CircularProgressProps, type ColumnGroupModel, type ColumnVisibilityModel, Combobox, type ComboboxMultipleProps, type ComboboxOption, type ComboboxProps, type ComboboxSingleProps, DataGrid, type DataGridProps, DataGrid as DataGridV0, DataList, DataListItem, type DataListItemProps, DataListLabel, type DataListLabelProps, type DataListProps, DataListValue, type DataListValueProps, DialogNamespace as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DonutChart, type DonutChartProps, Drawer, DrawerBody, type DrawerBodyProps, DrawerClose, DrawerContent, type DrawerContentProps, DrawerDescription, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type EnqueueOptions, FormControl, type FormControlProps, FormGroup, type FormGroupProps, FormHelperText, type FormHelperTextProps, FormLabel, type FormLabelProps, Grid, type GridColDef, type GridProps, type GridRenderCellParams, type GridRenderHeaderParams, type GridRowSelectionModel, type GridSpanParams, type GridValueFormatterParams, type GridValueGetterParams, H1, H2, H3, H4, H5, H6, HStack, IconButton, type IconButtonProps, IconRail, IconRailContent, type IconRailContentProps, IconRailFooter, type IconRailFooterProps, IconRailHeader, type IconRailHeaderProps, IconRailItem, type IconRailItemProps, type IconRailProps, Input, InputAdornment, type InputAdornmentProps, type InputProps, Label, type LabelProps, LineChart, type LineChartProps, LinearProgress, type LinearProgressProps, List, ListDivider, type ListDividerProps, ListItem, ListItemAvatar, type ListItemAvatarProps, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MultiProgressDonut, type MultiProgressDonutProps, NativeSelect, NativeSelectOption, type NativeSelectOptionProps, type NativeSelectProps, PackedBubbleChart, type PackedBubbleChartProps, type PackedBubbleDataItem, PaginationNamespace as Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, type PaginationModel, PaginationNext, PaginationPrevious, type PaginationProps, PieChart, type PieChartProps, type PinnedColumnsModel, type PinnedRowsModel, Playground, Progress, ProgressCard, type ProgressCardProps, ProgressDonut, type ProgressDonutProps, type ProgressProps, RadarChart, type RadarChartProps, Radio, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioProps, RailPanel, RailPanelGroup, type RailPanelGroupProps, RailPanelItem, type RailPanelItemProps, type RailPanelProps, RangeSlider, type RangeSliderProps, ScatterChart, type ScatterChartProps, SelectNamespace as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, type SidebarContentProps, SidebarFooter, type SidebarFooterProps, SidebarGroup, type SidebarGroupProps, SidebarHeader, type SidebarHeaderProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarRail, type SidebarRailProps, SidebarSubMenu, type SidebarSubMenuProps, SidebarToggle, type SidebarToggleProps, Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonCard, type SkeletonCardProps, type SkeletonProps, SkeletonTableRow, type SkeletonTableRowProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, Snackbar, type SnackbarCloseReason, SnackbarContent, type SnackbarContentProps, type SnackbarOrigin, type SnackbarProps, SnackbarProvider, type SnackbarProviderProps, Spinner, type SpinnerProps, Stack, type StackProps, Switch, type SwitchProps, TableNamespace as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextField, type TextFieldProps, Textarea, type TextareaProps, ThemeContext, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, TopBar, TopBarBrand, type TopBarBrandProps, TopBarDivider, type TopBarDividerProps, TopBarNav, TopBarNavItem, type TopBarNavItemProps, type TopBarNavProps, type TopBarProps, TopBarSection, type TopBarSectionProps, Typography, type TypographyProps, UnderlineTabsContent, UnderlineTabsList, UnderlineTabsTrigger, type UnderlineTabsTriggerProps, VStack, VerticalTabs, VerticalTabsContent, VerticalTabsGroupLabel, type VerticalTabsGroupLabelProps, VerticalTabsList, VerticalTabsTrigger, type VerticalTabsTriggerProps, VirtualList, type VirtualListProps, cn, useFormControl, useSidebar, useSidebarRail, useSnackbar, useTheme };
2109
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, AreaChart, type AreaChartProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Backdrop, type BackdropProps, Badge, type BadgeProps, BarChart, type BarChartProps, BottomNavigation, BottomNavigationAction, type BottomNavigationActionProps, type BottomNavigationProps, Box, type BoxProps, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbPage, type BreadcrumbPageProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Caption, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, type CircularProgressProps, type ColumnGroupModel, type ColumnVisibilityModel, Combobox, type ComboboxMultipleProps, type ComboboxOption, type ComboboxProps, type ComboboxSingleProps, DEFAULT_DATE_RANGE_PRESETS, DataGrid, type DataGridProps, DataGrid as DataGridV0, DataList, DataListItem, type DataListItemProps, DataListLabel, type DataListLabelProps, type DataListProps, DataListValue, type DataListValueProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, type DateRangePreset, DateTimePicker, type DateTimePickerProps, DialogNamespace as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DonutChart, type DonutChartProps, Drawer, DrawerBody, type DrawerBodyProps, DrawerClose, DrawerContent, type DrawerContentProps, DrawerDescription, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type EnqueueOptions, FormControl, type FormControlProps, FormGroup, type FormGroupProps, FormHelperText, type FormHelperTextProps, FormLabel, type FormLabelProps, Grid, type GridColDef, type GridProps, type GridRenderCellParams, type GridRenderHeaderParams, type GridRowSelectionModel, type GridSpanParams, type GridValueFormatterParams, type GridValueGetterParams, H1, H2, H3, H4, H5, H6, HStack, IconButton, type IconButtonProps, IconRail, IconRailContent, type IconRailContentProps, IconRailFooter, type IconRailFooterProps, IconRailHeader, type IconRailHeaderProps, IconRailItem, type IconRailItemProps, type IconRailProps, Input, InputAdornment, type InputAdornmentProps, type InputProps, Label, type LabelProps, LineChart, type LineChartProps, LinearProgress, type LinearProgressProps, List, ListDivider, type ListDividerProps, ListItem, ListItemAvatar, type ListItemAvatarProps, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MonthPicker, type MonthPickerProps, MultiProgressDonut, type MultiProgressDonutProps, NativeSelect, NativeSelectOption, type NativeSelectOptionProps, type NativeSelectProps, PackedBubbleChart, type PackedBubbleChartProps, type PackedBubbleDataItem, PaginationNamespace as Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, type PaginationModel, PaginationNext, PaginationPrevious, type PaginationProps, PieChart, type PieChartProps, type PinnedColumnsModel, type PinnedRowsModel, Playground, Progress, ProgressCard, type ProgressCardProps, ProgressDonut, type ProgressDonutProps, type ProgressProps, RadarChart, type RadarChartProps, Radio, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioProps, RailPanel, RailPanelGroup, type RailPanelGroupProps, RailPanelItem, type RailPanelItemProps, type RailPanelProps, RangeSlider, type RangeSliderProps, ScatterChart, type ScatterChartProps, SelectNamespace as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, type SidebarContentProps, SidebarFooter, type SidebarFooterProps, SidebarGroup, type SidebarGroupProps, SidebarHeader, type SidebarHeaderProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarRail, type SidebarRailProps, SidebarSubMenu, type SidebarSubMenuProps, SidebarToggle, type SidebarToggleProps, Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonCard, type SkeletonCardProps, type SkeletonProps, SkeletonTableRow, type SkeletonTableRowProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, Snackbar, type SnackbarCloseReason, SnackbarContent, type SnackbarContentProps, type SnackbarOrigin, type SnackbarProps, SnackbarProvider, type SnackbarProviderProps, Spinner, type SpinnerProps, Stack, type StackProps, Switch, type SwitchProps, TableNamespace as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextField, type TextFieldProps, Textarea, type TextareaProps, ThemeContext, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, TimePicker, type TimePickerProps, Tooltip, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, TopBar, TopBarBrand, type TopBarBrandProps, TopBarDivider, type TopBarDividerProps, TopBarNav, TopBarNavItem, type TopBarNavItemProps, type TopBarNavProps, type TopBarProps, TopBarSection, type TopBarSectionProps, Typography, type TypographyProps, UnderlineTabsContent, UnderlineTabsList, UnderlineTabsTrigger, type UnderlineTabsTriggerProps, VStack, VerticalTabs, VerticalTabsContent, VerticalTabsGroupLabel, type VerticalTabsGroupLabelProps, VerticalTabsList, VerticalTabsTrigger, type VerticalTabsTriggerProps, VirtualList, type VirtualListProps, YearPicker, type YearPickerProps, cn, useFormControl, useSidebar, useSidebarRail, useSnackbar, useTheme };