@popmenu/common-ui 0.15.0 → 0.16.0-alpha.0
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/build/components/Table/Table.d.ts +3 -0
- package/build/components/Table/TableProps.d.ts +26 -0
- package/build/components/Table/TableStyles.d.ts +2 -0
- package/build/components/Table/index.d.ts +3 -0
- package/build/components/Table/util/makeColumns.d.ts +7 -0
- package/build/components/TableActionsCell/TableActionsCell.d.ts +3 -0
- package/build/components/TableActionsCell/TableActionsCellProps.d.ts +10 -0
- package/build/components/TableActionsCell/index.d.ts +2 -0
- package/build/components/TableBody/TableBody.d.ts +2 -0
- package/build/components/TableBody/index.d.ts +1 -0
- package/build/components/TableCell/TableCell.d.ts +2 -0
- package/build/components/TableCell/TableCellStyles.d.ts +1 -0
- package/build/components/TableCell/index.d.ts +1 -0
- package/build/components/TableFooter/TableFooter.d.ts +2 -0
- package/build/components/TableFooter/index.d.ts +1 -0
- package/build/components/TableHeader/TableHeader.d.ts +2 -0
- package/build/components/TableHeader/index.d.ts +1 -0
- package/build/components/TableHeaderCell/TableHeaderCell.d.ts +3 -0
- package/build/components/TableHeaderCell/TableHeaderCellProps.d.ts +6 -0
- package/build/components/TableHeaderCell/TableHeaderCellStyles.d.ts +2 -0
- package/build/components/TableHeaderCell/index.d.ts +1 -0
- package/build/components/TableHeaderRow/TableHeaderRow.d.ts +2 -0
- package/build/components/TableHeaderRow/index.d.ts +1 -0
- package/build/components/TableRow/TableRow.d.ts +2 -0
- package/build/components/TableRow/TableRowStyles.d.ts +1 -0
- package/build/components/TableRow/index.d.ts +1 -0
- package/build/components/index.d.ts +1 -0
- package/build/index.es.js +4849 -2
- package/build/index.es.js.map +1 -1
- package/build/index.js +4846 -0
- package/build/index.js.map +1 -1
- package/package.json +7 -3
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Cell, Column } from 'react-table';
|
|
3
|
+
export interface TableProps {
|
|
4
|
+
/** Configurations for each individual column. */
|
|
5
|
+
columns: Array<Column & {
|
|
6
|
+
accessor: string;
|
|
7
|
+
}>;
|
|
8
|
+
/** A table's data set. */
|
|
9
|
+
data: Array<Record<string, unknown>>;
|
|
10
|
+
/** Actions that can be performed on any given row. */
|
|
11
|
+
actions?: Record<string, {
|
|
12
|
+
icon?: string | React.FC<React.SVGProps<SVGSVGElement>>;
|
|
13
|
+
label: string;
|
|
14
|
+
action: (cell: Cell) => void;
|
|
15
|
+
}>;
|
|
16
|
+
/** Styles the table to take up its containers full width. */
|
|
17
|
+
fullWidth?: boolean;
|
|
18
|
+
/** Enables sortability for columns. */
|
|
19
|
+
sortable?: boolean;
|
|
20
|
+
/** Sets loading state. When true, Will render a CircularProgress when true and not rows. */
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
/** A short message for users when the data set does not produce any rows. */
|
|
23
|
+
emptyMessage?: string;
|
|
24
|
+
/** An image to be displayed with the empty message. */
|
|
25
|
+
EmptyImage?: () => React.ReactNode;
|
|
26
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Column } from 'react-table';
|
|
2
|
+
import { TableProps } from '../TableProps';
|
|
3
|
+
interface MakeColumnsConfig extends Pick<TableProps, 'columns' | 'actions'> {
|
|
4
|
+
}
|
|
5
|
+
export declare const actionColumnId = "table-actions-column";
|
|
6
|
+
export declare const makeColumns: (config: MakeColumnsConfig) => Array<Column>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Cell, TableInstance } from 'react-table';
|
|
3
|
+
export interface TableActionsCellProps extends TableInstance {
|
|
4
|
+
cell: Cell;
|
|
5
|
+
actions: Record<string, {
|
|
6
|
+
icon?: string | React.FC<React.SVGProps<SVGSVGElement>>;
|
|
7
|
+
label: string;
|
|
8
|
+
action: (cell: Cell) => void;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableBody as default } from './TableBody';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useTableCellStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"root">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableCell as default } from './TableCell';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableFooter as default } from './TableFooter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableHeader as default } from './TableHeader';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableHeaderCell as default } from './TableHeaderCell';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableHeaderRow as default } from './TableHeaderRow';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useTableRowStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"root">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TableRow as default } from './TableRow';
|
|
@@ -42,6 +42,7 @@ export { default as PaperContent } from './PaperContent';
|
|
|
42
42
|
export { default as Radio, RadioProps } from './Radio';
|
|
43
43
|
export { default as SplitInput, SplitInputProps } from './SplitInput';
|
|
44
44
|
export { default as Switch, SwitchProps } from './Switch';
|
|
45
|
+
export { default as Table, TableProps } from './Table';
|
|
45
46
|
export { default as Tab, TabProps } from './Tab';
|
|
46
47
|
export { default as Tabs, TabsProps } from './Tabs';
|
|
47
48
|
export { default as TextField, TextFieldProps } from './TextField';
|