@nextui-org/react 1.0.2-beta.4 → 1.0.2-beta.5-dbg3
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/cjs/avatar/avatar.styles.js +1 -1
- package/cjs/checkbox/checkbox.js +1 -1
- package/cjs/checkbox/checkbox.styles.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/pagination/pagination-highlight.js +1 -1
- package/cjs/pagination/pagination.js +1 -1
- package/cjs/pagination/pagination.styles.js +1 -1
- package/cjs/spacer/spacer.js +1 -1
- package/cjs/table/base/index.js +1 -0
- package/cjs/table/base/table-body.js +1 -0
- package/cjs/table/base/table-cell.js +1 -0
- package/cjs/table/base/table-column.js +1 -0
- package/cjs/table/base/table-header.js +1 -0
- package/cjs/table/base/table-row.js +1 -0
- package/cjs/table/index.js +1 -0
- package/cjs/table/table-body.js +1 -0
- package/cjs/table/table-cell.js +1 -0
- package/cjs/table/table-checkbox-cell.js +1 -0
- package/cjs/table/table-column-header.js +1 -0
- package/cjs/table/table-context.js +1 -0
- package/cjs/table/table-footer.js +1 -0
- package/cjs/table/table-header-row.js +1 -0
- package/cjs/table/table-pagination.js +1 -0
- package/cjs/table/table-row-group.js +1 -0
- package/cjs/table/table-row.js +1 -0
- package/cjs/table/table-select-all-checkbox.js +1 -0
- package/cjs/table/table-sort-icon.js +1 -0
- package/cjs/table/table.js +1 -0
- package/cjs/table/table.styles.js +1 -0
- package/cjs/table/utils.js +1 -0
- package/cjs/theme/common.js +1 -1
- package/cjs/theme/stitches.config.js +1 -1
- package/cjs/theme/utils.js +1 -1
- package/cjs/tooltip/tooltip.js +1 -1
- package/cjs/tooltip/tooltip.styles.js +1 -1
- package/cjs/use-keyboard/codes.js +1 -1
- package/cjs/use-keyboard/helper.js +1 -1
- package/cjs/use-keyboard/use-keyboard.js +1 -1
- package/cjs/use-pagination/index.js +1 -1
- package/cjs/user/index.js +1 -1
- package/cjs/user/user.js +1 -1
- package/cjs/user/user.styles.js +1 -1
- package/cjs/utils/collections.js +1 -1
- package/cjs/utils/icons.js +1 -1
- package/cjs/utils/object.js +1 -1
- package/cjs/utils/prop-types.js +1 -1
- package/esm/avatar/avatar.styles.js +1 -1
- package/esm/checkbox/checkbox.js +1 -1
- package/esm/checkbox/checkbox.styles.js +1 -1
- package/esm/index.js +1 -1
- package/esm/pagination/pagination-highlight.js +1 -1
- package/esm/pagination/pagination.js +1 -1
- package/esm/pagination/pagination.styles.js +1 -1
- package/esm/spacer/spacer.js +1 -1
- package/esm/table/base/index.js +1 -0
- package/esm/table/base/table-body.js +1 -0
- package/esm/table/base/table-cell.js +1 -0
- package/esm/table/base/table-column.js +1 -0
- package/esm/table/base/table-header.js +1 -0
- package/esm/table/base/table-row.js +1 -0
- package/esm/table/index.js +1 -0
- package/esm/table/table-body.js +1 -0
- package/esm/table/table-cell.js +1 -0
- package/esm/table/table-checkbox-cell.js +1 -0
- package/esm/table/table-column-header.js +1 -0
- package/esm/table/table-context.js +1 -0
- package/esm/table/table-footer.js +1 -0
- package/esm/table/table-header-row.js +1 -0
- package/esm/table/table-pagination.js +1 -0
- package/esm/table/table-row-group.js +1 -0
- package/esm/table/table-row.js +1 -0
- package/esm/table/table-select-all-checkbox.js +1 -0
- package/esm/table/table-sort-icon.js +1 -0
- package/esm/table/table.js +1 -0
- package/esm/table/table.styles.js +1 -0
- package/esm/table/utils.js +1 -0
- package/esm/theme/common.js +1 -1
- package/esm/theme/stitches.config.js +1 -1
- package/esm/theme/utils.js +1 -1
- package/esm/tooltip/tooltip.js +1 -1
- package/esm/tooltip/tooltip.styles.js +1 -1
- package/esm/use-keyboard/codes.js +1 -1
- package/esm/use-keyboard/helper.js +1 -1
- package/esm/use-keyboard/use-keyboard.js +1 -1
- package/esm/use-pagination/index.js +1 -1
- package/esm/user/index.js +1 -1
- package/esm/user/user.js +1 -1
- package/esm/user/user.styles.js +1 -1
- package/esm/utils/collections.js +1 -1
- package/esm/utils/icons.js +1 -1
- package/esm/utils/object.js +1 -1
- package/esm/utils/prop-types.js +1 -1
- package/package.json +15 -5
- package/table/package.json +6 -0
- package/types/backdrop/backdrop.d.ts +1 -1
- package/types/backdrop/backdrop.styles.d.ts +1 -1
- package/types/button/button-group.styles.d.ts +1 -1
- package/types/button/button.styles.d.ts +2 -1
- package/types/card/card.styles.d.ts +3 -3
- package/types/checkbox/checkbox.d.ts +3 -3
- package/types/checkbox/checkbox.styles.d.ts +995 -6
- package/types/checkbox/index.d.ts +1 -1
- package/types/collapse/collapse.styles.d.ts +2 -2
- package/types/image/image.styles.d.ts +1 -1
- package/types/index.d.ts +4 -0
- package/types/input/input-password.d.ts +1 -1
- package/types/input/input.styles.d.ts +5 -5
- package/types/modal/modal.styles.d.ts +1 -1
- package/types/pagination/pagination-highlight.d.ts +2 -1
- package/types/pagination/pagination.styles.d.ts +5 -5
- package/types/progress/progress.d.ts +1 -1
- package/types/radio/radio.styles.d.ts +3 -3
- package/types/snippet/snippet.styles.d.ts +1 -1
- package/types/spacer/spacer.d.ts +1 -1
- package/types/spacer/spacer.styles.d.ts +1 -1
- package/types/switch/switch.d.ts +1 -1
- package/types/switch/switch.styles.d.ts +1 -1
- package/types/table/base/index.d.ts +5 -0
- package/types/table/base/table-body.d.ts +8 -0
- package/types/table/base/table-cell.d.ts +8 -0
- package/types/table/base/table-column.d.ts +8 -0
- package/types/table/base/table-header.d.ts +4 -0
- package/types/table/base/table-row.d.ts +8 -0
- package/types/table/index.d.ts +12 -0
- package/types/table/table-body.d.ts +20 -0
- package/types/table/table-cell-old.d.ts +22 -0
- package/types/table/table-cell.d.ts +20 -0
- package/types/table/table-checkbox-cell.d.ts +23 -0
- package/types/table/table-column-header.d.ts +1018 -0
- package/types/table/table-column.d.ts +17 -0
- package/types/table/table-context.d.ts +29 -0
- package/types/table/table-footer.d.ts +31 -0
- package/types/table/table-header-row.d.ts +19 -0
- package/types/table/table-old.d.ts +49 -0
- package/types/table/table-pagination.d.ts +16 -0
- package/types/table/table-row-group.d.ts +14 -0
- package/types/table/table-row.d.ts +20 -0
- package/types/table/table-select-all-checkbox.d.ts +20 -0
- package/types/table/table-sort-icon.d.ts +944 -0
- package/types/table/table-types.d.ts +30 -0
- package/types/table/table.d.ts +28 -0
- package/types/table/table.styles.d.ts +15098 -0
- package/types/table/utils.d.ts +2 -0
- package/types/theme/ssr-provider.d.ts +7 -0
- package/types/theme/stitches.config.d.ts +2 -1
- package/types/tooltip/tooltip.d.ts +1 -1
- package/types/tooltip/tooltip.styles.d.ts +2 -2
- package/types/use-keyboard/codes.d.ts +84 -84
- package/types/user/index.d.ts +1 -2
- package/types/user/user-link.d.ts +2 -19
- package/types/user/user.d.ts +2 -2
- package/types/user/user.styles.d.ts +1 -7
- package/types/utils/collections.d.ts +2 -1
- package/types/utils/object.d.ts +4 -0
- package/types/utils/prop-types.d.ts +7 -0
- package/umd/nextui.js +30064 -13783
- package/umd/nextui.min.js +1 -1
- package/umd/nextui.min.js.LICENSE.txt +15 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CSS } from '../theme/stitches.config';
|
|
3
|
+
export declare type TableRowData = {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
export declare type TableColumnData<Item extends TableRowData> = {
|
|
7
|
+
value?: Item[keyof Item];
|
|
8
|
+
rowData?: Item;
|
|
9
|
+
rowIndex?: number;
|
|
10
|
+
};
|
|
11
|
+
export declare type TableOnCellClick<TableDataItem> = (cellData: TableDataItem[keyof TableDataItem], rowIndex?: number, columnIndex?: number) => void;
|
|
12
|
+
export declare type TableColumnHeaderData = Omit<TableColumnItem, 'renderHeader' | 'renderCell' | 'cellAlign' | 'cellClassName'>;
|
|
13
|
+
export declare type TableCellRender<Item extends TableRowData> = (data?: TableColumnData<Item>) => ReactNode;
|
|
14
|
+
export declare type TableColumnProps<TableDataItem> = {
|
|
15
|
+
field?: string;
|
|
16
|
+
label?: string;
|
|
17
|
+
width?: number;
|
|
18
|
+
hide?: boolean;
|
|
19
|
+
align?: 'left' | 'center' | 'right';
|
|
20
|
+
cellAlign?: 'left' | 'center' | 'right';
|
|
21
|
+
labelCase?: 'none' | 'capitalize' | 'uppercase' | 'lowercase';
|
|
22
|
+
cellClassName?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
headerCss?: CSS;
|
|
25
|
+
cellCss?: CSS;
|
|
26
|
+
renderHeader?: (data?: TableColumnHeaderData) => ReactNode;
|
|
27
|
+
renderCell?: TableCellRender<TableDataItem>;
|
|
28
|
+
};
|
|
29
|
+
export declare type TableColumnItem = TableColumnProps<TableRowData>;
|
|
30
|
+
export declare type TableCellData<T extends TableRowData = {}> = TableColumnData<T>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { RefAttributes, PropsWithoutRef } from 'react';
|
|
2
|
+
import { TableStateProps } from '@react-stately/table';
|
|
3
|
+
import { SelectionMode, SelectionBehavior } from '@react-types/shared';
|
|
4
|
+
import { CSS } from '../theme/stitches.config';
|
|
5
|
+
import { TableColumn as TableColumnBase, TableCell as TableCellBase, TableRow as TableRowBase, TableBody as TableBodyBase, TableHeader as TableHeaderBase } from './base';
|
|
6
|
+
import TablePagination from './table-pagination';
|
|
7
|
+
import { TableVariantsProps } from './table.styles';
|
|
8
|
+
interface Props<T> extends TableStateProps<T> {
|
|
9
|
+
selectionMode?: SelectionMode;
|
|
10
|
+
selectionBehavior?: SelectionBehavior;
|
|
11
|
+
animated?: boolean;
|
|
12
|
+
hideLoading?: boolean;
|
|
13
|
+
as?: keyof JSX.IntrinsicElements;
|
|
14
|
+
}
|
|
15
|
+
declare type NativeAttrs = Omit<React.TableHTMLAttributes<unknown>, keyof Props<object>>;
|
|
16
|
+
export declare type TableProps<T = object> = Props<T> & NativeAttrs & Omit<TableVariantsProps, 'isMultiple'> & {
|
|
17
|
+
css?: CSS;
|
|
18
|
+
};
|
|
19
|
+
declare type TableComponent<T, P = {}> = React.ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>> & {
|
|
20
|
+
Cell: typeof TableCellBase;
|
|
21
|
+
Column: typeof TableColumnBase;
|
|
22
|
+
Row: typeof TableRowBase;
|
|
23
|
+
Header: typeof TableHeaderBase;
|
|
24
|
+
Body: typeof TableBodyBase;
|
|
25
|
+
Pagination: typeof TablePagination;
|
|
26
|
+
};
|
|
27
|
+
declare const _default: TableComponent<HTMLTableElement, TableProps<object>>;
|
|
28
|
+
export default _default;
|