@onesaz/ui 0.3.11 → 0.3.13

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
@@ -396,6 +396,30 @@ interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
396
396
  }
397
397
  declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>;
398
398
 
399
+ interface ChipProps extends React.HTMLAttributes<HTMLDivElement> {
400
+ /** The text content of the chip */
401
+ label?: string;
402
+ /** Visual style variant */
403
+ variant?: 'filled' | 'outlined';
404
+ /** Color scheme */
405
+ color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
406
+ /** Size of the chip */
407
+ size?: 'small' | 'medium';
408
+ /** Icon element displayed before the label */
409
+ icon?: React.ReactNode;
410
+ /** Avatar element displayed before the label */
411
+ avatar?: React.ReactNode;
412
+ /** If provided, renders a delete icon and calls this on click */
413
+ onDelete?: (event: React.MouseEvent) => void;
414
+ /** Custom delete icon */
415
+ deleteIcon?: React.ReactNode;
416
+ /** Whether the chip is clickable */
417
+ clickable?: boolean;
418
+ /** Whether the chip is disabled */
419
+ disabled?: boolean;
420
+ }
421
+ declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLDivElement>>;
422
+
399
423
  interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
400
424
  orientation?: 'horizontal' | 'vertical';
401
425
  }
@@ -728,17 +752,13 @@ interface ComboboxOption {
728
752
  type ComboboxPrimitiveOption = string;
729
753
  type ComboboxObjectOption = object;
730
754
  type ComboboxOptionInput = ComboboxPrimitiveOption | ComboboxObjectOption;
731
- interface ComboboxSingleProps<T extends ComboboxOptionInput = ComboboxOptionInput> {
755
+ interface ComboboxSharedProps<T extends ComboboxOptionInput = ComboboxOptionInput> {
732
756
  options: T[];
733
- value?: T | null;
734
- defaultValue?: T | null;
735
- onChange?: (value: T | null) => void;
736
757
  placeholder?: string;
737
758
  searchPlaceholder?: string;
738
759
  emptyMessage?: string;
739
760
  disabled?: boolean;
740
761
  className?: string;
741
- multiple?: false;
742
762
  clearable?: boolean;
743
763
  openOnFocus?: boolean;
744
764
  inputValue?: string;
@@ -746,29 +766,30 @@ interface ComboboxSingleProps<T extends ComboboxOptionInput = ComboboxOptionInpu
746
766
  simpleOptions?: boolean;
747
767
  labelKey?: string;
748
768
  valueKey?: string;
769
+ /** Node rendered at the start (left) of the trigger button */
770
+ startAdornment?: React.ReactNode;
771
+ /** Click handler for the start adornment — renders it as a button when provided */
772
+ onStartAdornmentClick?: (e: React.MouseEvent) => void;
773
+ /** Node rendered at the end (right) of the trigger button, before the chevron */
774
+ endAdornment?: React.ReactNode;
775
+ /** Click handler for the end adornment — renders it as a button when provided */
776
+ onEndAdornmentClick?: (e: React.MouseEvent) => void;
749
777
  }
750
- interface ComboboxMultipleProps<T extends ComboboxOptionInput = ComboboxOptionInput> {
751
- options: T[];
778
+ interface ComboboxSingleProps<T extends ComboboxOptionInput = ComboboxOptionInput> extends ComboboxSharedProps<T> {
779
+ value?: T | null;
780
+ defaultValue?: T | null;
781
+ onChange?: (value: T | null) => void;
782
+ multiple?: false;
783
+ }
784
+ interface ComboboxMultipleProps<T extends ComboboxOptionInput = ComboboxOptionInput> extends ComboboxSharedProps<T> {
752
785
  value?: T[];
753
786
  defaultValue?: T[];
754
787
  onChange?: (value: T[]) => void;
755
- placeholder?: string;
756
- searchPlaceholder?: string;
757
- emptyMessage?: string;
758
- disabled?: boolean;
759
- className?: string;
760
788
  multiple: true;
761
- clearable?: boolean;
762
- openOnFocus?: boolean;
763
- inputValue?: string;
764
- onInputChange?: (value: string) => void;
765
789
  /** Show select-all option */
766
790
  selectAll?: boolean;
767
791
  /** Label for select-all option */
768
792
  selectAllLabel?: string;
769
- simpleOptions?: boolean;
770
- labelKey?: string;
771
- valueKey?: string;
772
793
  /** Maximum number of items to display as chips before showing "+N more" */
773
794
  maxDisplayItems?: number;
774
795
  }
@@ -798,6 +819,8 @@ interface GridColDef<TData = any> {
798
819
  scrollable?: boolean;
799
820
  maxCellHeight?: number;
800
821
  cellClassName?: string;
822
+ colSpan?: number | ((params: GridSpanParams<TData>) => number | undefined);
823
+ rowSpan?: boolean | ((params: GridSpanParams<TData>) => number | undefined);
801
824
  export?: boolean;
802
825
  hideExport?: boolean;
803
826
  disableExport?: boolean;
@@ -819,6 +842,12 @@ interface GridValueGetterParams<TData = any> {
819
842
  interface GridValueFormatterParams {
820
843
  value: any;
821
844
  }
845
+ interface GridSpanParams<TData = any> {
846
+ row: TData;
847
+ value: any;
848
+ field: string;
849
+ rowIndex: number;
850
+ }
822
851
  interface PaginationModel {
823
852
  page: number;
824
853
  pageSize: number;
@@ -829,6 +858,22 @@ interface GridRowSelectionModel {
829
858
  interface ColumnVisibilityModel {
830
859
  [key: string]: boolean;
831
860
  }
861
+ interface PinnedRowsModel<TData = any> {
862
+ top?: TData[];
863
+ bottom?: TData[];
864
+ }
865
+ interface PinnedColumnsModel {
866
+ left?: string[];
867
+ right?: string[];
868
+ }
869
+ interface ColumnGroupModel {
870
+ groupId: string;
871
+ headerName?: string;
872
+ children: {
873
+ field: string;
874
+ }[];
875
+ headerAlign?: 'left' | 'center' | 'right';
876
+ }
832
877
  type GridDensity = 'compact' | 'standard' | 'comfortable';
833
878
  interface DataGridProps<TData = any> {
834
879
  rows: TData[];
@@ -872,6 +917,9 @@ interface DataGridProps<TData = any> {
872
917
  row: TData;
873
918
  rowIndex: number;
874
919
  }) => string;
920
+ pinnedRows?: PinnedRowsModel<TData>;
921
+ pinnedColumns?: PinnedColumnsModel;
922
+ columnGroupingModel?: ColumnGroupModel[];
875
923
  slotProps?: {
876
924
  toolbar?: {
877
925
  getExportedColumns?: (columns: GridColDef[]) => GridColDef[];
@@ -903,7 +951,7 @@ interface DataGridProps<TData = any> {
903
951
  disableColumnSelector?: boolean;
904
952
  disableDensitySelector?: boolean;
905
953
  }
906
- declare function DataGrid<TData extends Record<string, any>>({ rows, columns, getRowId, loading, title, toolBar, checkboxSelection, rowSelectionModel, onRowSelectionModelChange, disableRowSelectionOnClick, columnVisibilityModel, onColumnVisibilityModelChange, paginationMode, paginationModel, onPaginationModelChange, rowCount, pageSizeOptions, sortingMode, initialSortModel, sortLatestFirst, filterMode, height, minHeight, maxHeight, density, showCellVerticalBorder, showColumnVerticalBorder, hideFooter, hideFooterPagination, virtualized, overscan, wrapText, getRowClassName, slotProps, className, sx, autoHeight, disableColumnSelector, onExport, exportFileName, resizableColumns, onColumnResize, }: DataGridProps<TData>): react_jsx_runtime.JSX.Element;
954
+ declare function DataGrid<TData extends Record<string, any>>({ rows, columns, getRowId, loading, title, toolBar, checkboxSelection, rowSelectionModel, onRowSelectionModelChange, disableRowSelectionOnClick, columnVisibilityModel, onColumnVisibilityModelChange, paginationMode, paginationModel, onPaginationModelChange, rowCount, pageSizeOptions, sortingMode, initialSortModel, sortLatestFirst, filterMode, height, minHeight, maxHeight, density, showCellVerticalBorder, showColumnVerticalBorder, hideFooter, hideFooterPagination, virtualized, overscan, wrapText, getRowClassName, slotProps, className, sx, autoHeight, disableColumnSelector, onExport, exportFileName, resizableColumns, onColumnResize, pinnedRows, pinnedColumns, columnGroupingModel, }: DataGridProps<TData>): react_jsx_runtime.JSX.Element;
907
955
  declare namespace DataGrid {
908
956
  var displayName: string;
909
957
  }
@@ -1679,4 +1727,4 @@ declare const RailPanelItem: React.ForwardRefExoticComponent<RailPanelItemProps
1679
1727
 
1680
1728
  declare const Playground: () => react_jsx_runtime.JSX.Element;
1681
1729
 
1682
- 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, Badge, type BadgeProps, BarChart, type BarChartProps, Box, type BoxProps, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbPage, type BreadcrumbPageProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Caption, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, CircularProgress, type CircularProgressProps, type ColumnVisibilityModel, Combobox, type ComboboxMultipleProps, type ComboboxOption, type ComboboxProps, type ComboboxSingleProps, DataGrid, type DataGridProps, DataGrid as DataGridV0, 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, FormControl, type FormControlProps, FormGroup, type FormGroupProps, FormHelperText, type FormHelperTextProps, FormLabel, type FormLabelProps, Grid, type GridColDef, type GridProps, type GridRenderCellParams, type GridRenderHeaderParams, type GridRowSelectionModel, 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, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MultiProgressDonut, type MultiProgressDonutProps, NativeSelect, NativeSelectOption, type NativeSelectOptionProps, type NativeSelectProps, PaginationNamespace as Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, type PaginationModel, PaginationNext, PaginationPrevious, type PaginationProps, PieChart, type PieChartProps, 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, 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, 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, cn, useFormControl, useSidebar, useSidebarRail, useTheme };
1730
+ 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, Badge, type BadgeProps, BarChart, type BarChartProps, Box, type BoxProps, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbPage, type BreadcrumbPageProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Breadcrumbs, type BreadcrumbsProps, Button, 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, 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, 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, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MultiProgressDonut, type MultiProgressDonutProps, NativeSelect, NativeSelectOption, type NativeSelectOptionProps, type NativeSelectProps, 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, 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, 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, cn, useFormControl, useSidebar, useSidebarRail, useTheme };