@onesaz/ui 0.3.1 → 0.3.2
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 +125 -1
- package/dist/index.js +1281 -208
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -440,6 +440,130 @@ interface ComboboxProps {
|
|
|
440
440
|
}
|
|
441
441
|
declare const Combobox: React.ForwardRefExoticComponent<ComboboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
442
442
|
|
|
443
|
+
interface GridColDef<TData = any> {
|
|
444
|
+
field: string;
|
|
445
|
+
headerName?: string;
|
|
446
|
+
width?: number;
|
|
447
|
+
minWidth?: number;
|
|
448
|
+
maxWidth?: number;
|
|
449
|
+
flex?: number;
|
|
450
|
+
sortable?: boolean;
|
|
451
|
+
filterable?: boolean;
|
|
452
|
+
editable?: boolean;
|
|
453
|
+
hide?: boolean;
|
|
454
|
+
hideable?: boolean;
|
|
455
|
+
align?: 'left' | 'center' | 'right';
|
|
456
|
+
headerAlign?: 'left' | 'center' | 'right';
|
|
457
|
+
renderCell?: (params: GridRenderCellParams<TData>) => React.ReactNode;
|
|
458
|
+
renderHeader?: (params: GridRenderHeaderParams) => React.ReactNode;
|
|
459
|
+
valueGetter?: (params: GridValueGetterParams<TData>) => any;
|
|
460
|
+
valueFormatter?: (params: GridValueFormatterParams) => string;
|
|
461
|
+
type?: 'string' | 'number' | 'date' | 'dateTime' | 'boolean';
|
|
462
|
+
wrapText?: boolean;
|
|
463
|
+
cellClassName?: string;
|
|
464
|
+
export?: boolean;
|
|
465
|
+
hideExport?: boolean;
|
|
466
|
+
disableExport?: boolean;
|
|
467
|
+
}
|
|
468
|
+
interface GridRenderCellParams<TData = any> {
|
|
469
|
+
row: TData;
|
|
470
|
+
value: any;
|
|
471
|
+
field: string;
|
|
472
|
+
rowIndex: number;
|
|
473
|
+
}
|
|
474
|
+
interface GridRenderHeaderParams {
|
|
475
|
+
field: string;
|
|
476
|
+
colDef: GridColDef;
|
|
477
|
+
}
|
|
478
|
+
interface GridValueGetterParams<TData = any> {
|
|
479
|
+
row: TData;
|
|
480
|
+
field: string;
|
|
481
|
+
}
|
|
482
|
+
interface GridValueFormatterParams {
|
|
483
|
+
value: any;
|
|
484
|
+
}
|
|
485
|
+
interface PaginationModel {
|
|
486
|
+
page: number;
|
|
487
|
+
pageSize: number;
|
|
488
|
+
}
|
|
489
|
+
interface GridRowSelectionModel {
|
|
490
|
+
[key: string]: boolean;
|
|
491
|
+
}
|
|
492
|
+
interface ColumnVisibilityModel {
|
|
493
|
+
[key: string]: boolean;
|
|
494
|
+
}
|
|
495
|
+
type GridDensity = 'compact' | 'standard' | 'comfortable';
|
|
496
|
+
interface DataGridProps<TData = any> {
|
|
497
|
+
rows: TData[];
|
|
498
|
+
columns: GridColDef<TData>[];
|
|
499
|
+
getRowId?: (row: TData) => string | number;
|
|
500
|
+
loading?: boolean;
|
|
501
|
+
title?: string;
|
|
502
|
+
toolBar?: boolean;
|
|
503
|
+
checkboxSelection?: boolean;
|
|
504
|
+
rowSelectionModel?: GridRowSelectionModel;
|
|
505
|
+
onRowSelectionModelChange?: (model: GridRowSelectionModel) => void;
|
|
506
|
+
disableRowSelectionOnClick?: boolean;
|
|
507
|
+
columnVisibilityModel?: ColumnVisibilityModel;
|
|
508
|
+
onColumnVisibilityModelChange?: (model: ColumnVisibilityModel) => void;
|
|
509
|
+
paginationMode?: 'client' | 'server';
|
|
510
|
+
paginationModel?: PaginationModel;
|
|
511
|
+
onPaginationModelChange?: (model: PaginationModel) => void;
|
|
512
|
+
rowCount?: number;
|
|
513
|
+
pageSizeOptions?: number[];
|
|
514
|
+
sortingMode?: 'client' | 'server';
|
|
515
|
+
filterMode?: 'client' | 'server';
|
|
516
|
+
height?: number | string;
|
|
517
|
+
minHeight?: number | string;
|
|
518
|
+
maxHeight?: number | string;
|
|
519
|
+
density?: GridDensity;
|
|
520
|
+
showCellVerticalBorder?: boolean;
|
|
521
|
+
showColumnVerticalBorder?: boolean;
|
|
522
|
+
hideFooter?: boolean;
|
|
523
|
+
hideFooterPagination?: boolean;
|
|
524
|
+
virtualized?: boolean;
|
|
525
|
+
overscan?: number;
|
|
526
|
+
wrapText?: boolean;
|
|
527
|
+
getRowClassName?: (params: {
|
|
528
|
+
row: TData;
|
|
529
|
+
rowIndex: number;
|
|
530
|
+
}) => string;
|
|
531
|
+
slotProps?: {
|
|
532
|
+
toolbar?: {
|
|
533
|
+
getExportedColumns?: (columns: GridColDef[]) => GridColDef[];
|
|
534
|
+
showQuickFilter?: boolean;
|
|
535
|
+
showColumnSelector?: boolean;
|
|
536
|
+
showExport?: boolean;
|
|
537
|
+
customButtons?: React.ReactNode;
|
|
538
|
+
moreOptions?: {
|
|
539
|
+
label: string;
|
|
540
|
+
onClick: () => void;
|
|
541
|
+
icon?: React.ReactNode;
|
|
542
|
+
}[];
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
onExport?: (data: TData[], columns: GridColDef<TData>[]) => void;
|
|
546
|
+
exportFileName?: string;
|
|
547
|
+
resizableColumns?: boolean;
|
|
548
|
+
onColumnResize?: (columnId: string, width: number) => void;
|
|
549
|
+
className?: string;
|
|
550
|
+
sx?: React.CSSProperties;
|
|
551
|
+
actions?: {
|
|
552
|
+
edit?: boolean;
|
|
553
|
+
del?: boolean;
|
|
554
|
+
};
|
|
555
|
+
sensitiveInfo?: boolean;
|
|
556
|
+
autoHeight?: boolean;
|
|
557
|
+
disableColumnMenu?: boolean;
|
|
558
|
+
disableColumnFilter?: boolean;
|
|
559
|
+
disableColumnSelector?: boolean;
|
|
560
|
+
disableDensitySelector?: boolean;
|
|
561
|
+
}
|
|
562
|
+
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, 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;
|
|
563
|
+
declare namespace DataGrid {
|
|
564
|
+
var displayName: string;
|
|
565
|
+
}
|
|
566
|
+
|
|
443
567
|
declare const Playground: () => react_jsx_runtime.JSX.Element;
|
|
444
568
|
|
|
445
|
-
export { Badge, type BadgeProps, Box, type BoxProps, Button, type ButtonProps, Caption, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, Combobox, type ComboboxOption, type ComboboxProps, DialogNamespace as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, FormControl, type FormControlProps, FormGroup, type FormGroupProps, FormHelperText, type FormHelperTextProps, FormLabel, type FormLabelProps, Grid, type GridProps, H1, H2, H3, H4, H5, H6, HStack, Input, type InputProps, Label, type LabelProps, NativeSelect, NativeSelectOption, type NativeSelectOptionProps, type NativeSelectProps, PaginationNamespace as Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, PaginationPrevious, type PaginationProps, Playground, Radio, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioProps, SelectNamespace as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, Spinner, type SpinnerProps, Stack, type StackProps, Switch, type SwitchProps, TableNamespace as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Text, TextField, type TextFieldProps, Textarea, type TextareaProps, ThemeContext, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, Typography, type TypographyProps, VStack, cn, useFormControl, useTheme };
|
|
569
|
+
export { Badge, type BadgeProps, Box, type BoxProps, Button, type ButtonProps, Caption, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, type ColumnVisibilityModel, Combobox, type ComboboxOption, type ComboboxProps, DataGrid, type DataGridProps, DataGrid as DataGridV0, DialogNamespace as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, 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, Input, type InputProps, Label, type LabelProps, NativeSelect, NativeSelectOption, type NativeSelectOptionProps, type NativeSelectProps, PaginationNamespace as Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, type PaginationModel, PaginationNext, PaginationPrevious, type PaginationProps, Playground, Radio, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioProps, SelectNamespace as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, Spinner, type SpinnerProps, Stack, type StackProps, Switch, type SwitchProps, TableNamespace as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Text, TextField, type TextFieldProps, Textarea, type TextareaProps, ThemeContext, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, Typography, type TypographyProps, VStack, cn, useFormControl, useTheme };
|