@orderly.network/ui 2.1.1 → 2.1.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.mts CHANGED
@@ -10,7 +10,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
10
10
  import { TooltipContentProps } from '@radix-ui/react-tooltip';
11
11
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
12
12
  import * as SwitchPrimitives from '@radix-ui/react-switch';
13
- import { Row, CoreOptions, Column as Column$1, ColumnFilter, RowSelectionState, TableFeature, Table, RowData } from '@tanstack/react-table';
13
+ import { Row, ExpandedState, OnChangeFn, CoreOptions, Column as Column$1, ColumnFilter, RowSelectionState, TableFeature, Table, RowData } from '@tanstack/react-table';
14
14
  export { Table, Column as TanstackColumn } from '@tanstack/react-table';
15
15
  import { DateRange, DayPickerRangeProps, DayPicker } from 'react-day-picker';
16
16
  import * as SelectPrimitive from '@radix-ui/react-select';
@@ -3305,7 +3305,8 @@ declare const currencyFormatter: InputFormatter;
3305
3305
 
3306
3306
  declare const numberFormatter: InputFormatter;
3307
3307
 
3308
- type RegexInputFormatter = (regex: RegExp) => InputFormatter;
3308
+ type RegExpFunction = (value: string | number) => string;
3309
+ type RegexInputFormatter = (regex: RegExp | RegExpFunction) => InputFormatter;
3309
3310
  declare const createRegexInputFormatter: RegexInputFormatter;
3310
3311
 
3311
3312
  declare const dpFormatter: (dp: number, config?: {
@@ -3783,6 +3784,9 @@ type DataTableProps<RecordType> = {
3783
3784
  id?: string;
3784
3785
  getRowCanExpand?: (row: Row<any>) => boolean;
3785
3786
  expandRowRender?: (row: Row<any>, index: number) => ReactNode;
3787
+ expanded?: ExpandedState;
3788
+ onExpandedChange?: OnChangeFn<ExpandedState>;
3789
+ getSubRows?: (record: any, index: number) => undefined | any[];
3786
3790
  manualSorting?: boolean;
3787
3791
  manualPagination?: boolean;
3788
3792
  manualFiltering?: boolean;
@@ -4972,7 +4976,7 @@ declare const SimpleDialogFooter: FC<SimpleDialogFooterProps>;
4972
4976
  type SimpleDialogProps = {
4973
4977
  open?: boolean;
4974
4978
  onOpenChange?: (open: boolean) => void;
4975
- size?: "xs" | "sm" | "md" | "lg";
4979
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
4976
4980
  closable?: boolean;
4977
4981
  title?: ReactNode | (() => ReactNode);
4978
4982
  description?: ReactNode;
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
10
10
  import { TooltipContentProps } from '@radix-ui/react-tooltip';
11
11
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
12
12
  import * as SwitchPrimitives from '@radix-ui/react-switch';
13
- import { Row, CoreOptions, Column as Column$1, ColumnFilter, RowSelectionState, TableFeature, Table, RowData } from '@tanstack/react-table';
13
+ import { Row, ExpandedState, OnChangeFn, CoreOptions, Column as Column$1, ColumnFilter, RowSelectionState, TableFeature, Table, RowData } from '@tanstack/react-table';
14
14
  export { Table, Column as TanstackColumn } from '@tanstack/react-table';
15
15
  import { DateRange, DayPickerRangeProps, DayPicker } from 'react-day-picker';
16
16
  import * as SelectPrimitive from '@radix-ui/react-select';
@@ -3305,7 +3305,8 @@ declare const currencyFormatter: InputFormatter;
3305
3305
 
3306
3306
  declare const numberFormatter: InputFormatter;
3307
3307
 
3308
- type RegexInputFormatter = (regex: RegExp) => InputFormatter;
3308
+ type RegExpFunction = (value: string | number) => string;
3309
+ type RegexInputFormatter = (regex: RegExp | RegExpFunction) => InputFormatter;
3309
3310
  declare const createRegexInputFormatter: RegexInputFormatter;
3310
3311
 
3311
3312
  declare const dpFormatter: (dp: number, config?: {
@@ -3783,6 +3784,9 @@ type DataTableProps<RecordType> = {
3783
3784
  id?: string;
3784
3785
  getRowCanExpand?: (row: Row<any>) => boolean;
3785
3786
  expandRowRender?: (row: Row<any>, index: number) => ReactNode;
3787
+ expanded?: ExpandedState;
3788
+ onExpandedChange?: OnChangeFn<ExpandedState>;
3789
+ getSubRows?: (record: any, index: number) => undefined | any[];
3786
3790
  manualSorting?: boolean;
3787
3791
  manualPagination?: boolean;
3788
3792
  manualFiltering?: boolean;
@@ -4972,7 +4976,7 @@ declare const SimpleDialogFooter: FC<SimpleDialogFooterProps>;
4972
4976
  type SimpleDialogProps = {
4973
4977
  open?: boolean;
4974
4978
  onOpenChange?: (open: boolean) => void;
4975
- size?: "xs" | "sm" | "md" | "lg";
4979
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
4976
4980
  closable?: boolean;
4977
4981
  title?: ReactNode | (() => ReactNode);
4978
4982
  description?: ReactNode;