@spaced-out/ui-design-system
Version:
Sense UI components library
314 lines • 11.9 kB
TypeScript
import * as React from 'react';
import type { TableProps } from './';
declare const _default: {
tags: string[];
title: string;
argTypes: {
readonly headers: {
readonly type: {
readonly required: true;
};
readonly description: "Provide an array of objects to render the header, each object should consist of label(*), key(*), sortable, sticky and render function";
readonly control: {
readonly type: "object";
};
readonly table: {
readonly type: {
readonly summary: "{label: React.Node, key: $Keys<T>, className?: string, filterIcon?: React.Node, filtered?: boolean, subtext?: string, sortable?: boolean, headerIconClassName?: string, sticky?: boolean, render?: React.ComponentType<{data: T, extras?: U, className?: string, selected?: boolean,}>, }";
};
};
};
readonly entries: {
readonly type: {
readonly required: true;
};
readonly description: "Provide an array of object. Each object belong on one row in the table. Each object should have id and all the keys with values that is being passed in headers array";
readonly control: {
readonly type: "object";
};
readonly table: {
readonly type: {
readonly summary: "Array<T>";
};
};
};
readonly classNames: {
readonly description: "Provide optional classNames to be applied to the wrapper, table, tableHeader, tableBody, tableRow, or checkbox";
readonly control: {
readonly type: "object";
};
readonly table: {
readonly type: {
readonly summary: "{wrapper?: string, table?: string, tableHeader?: string, tableBody?: string, tableRow?: string, checkbox?: string}";
};
};
};
readonly Row: {
readonly description: "Custom Row component to be passed to table";
readonly table: {
readonly type: {
readonly summary: "TableRow<T, U>";
};
};
};
readonly sortable: {
readonly description: "Sort Icon will appear in right side of column's header with column level true sortable value";
readonly name: "sortable";
readonly options: readonly [false, true];
readonly control: "boolean";
readonly table: {
readonly type: {
readonly summary: "boolean";
};
readonly defaultValue: {
readonly summary: true;
};
};
};
readonly showHeader: {
readonly description: "Show or hide header";
readonly options: readonly [false, true];
readonly control: "boolean";
readonly table: {
readonly type: {
readonly summary: "boolean";
};
readonly defaultValue: {
readonly summary: true;
};
};
};
readonly defaultSortKey: {
readonly description: "key name for which table should be sorted by default. headers array should have sortable true for that key object";
readonly control: {
readonly type: "text";
};
readonly table: {
readonly type: {
readonly summary: "string";
};
};
};
readonly defaultSortDirection: {
readonly description: "default sorting direction for the defaultSortKey column";
readonly control: {
readonly type: "text";
};
readonly table: {
readonly type: {
readonly summary: "'asc' | 'desc' | 'original'";
};
};
};
readonly selectedKeys: {
readonly description: "array of keys which are selected. This prop is also used to decide weather to show checkboxes or not. So, pass an empty array in case no row is selected.";
readonly control: {
readonly type: "object";
};
readonly table: {
readonly type: {
readonly summary: "string[]";
};
};
};
readonly disabledKeys: {
readonly description: "array of keys which are disabled. This prop is used to disable the checkbox and its events for particular rows.";
readonly control: {
readonly type: "object";
};
readonly table: {
readonly type: {
readonly summary: "string[]";
};
};
};
readonly onSelect: {
readonly description: "callback function when any row is selected";
readonly action: "selected";
readonly type: {
readonly summary: "(keys: string[]) => mixed";
};
};
readonly idName: {
readonly description: "name of key in row objects that has to be used as id";
};
readonly onSort: {
readonly description: "callback function when any table is sorted";
readonly action: "sorted";
readonly type: {
readonly summary: "(key: $Keys<T>, direction: SortDirection) => void";
};
};
readonly isLoading: {
readonly description: "to wait for data to populate in table and show loading state when entries array is empty.";
readonly options: readonly [false, true];
readonly control: "boolean";
readonly table: {
readonly type: {
readonly summary: "boolean";
};
readonly defaultValue: {
readonly summary: false;
};
};
};
readonly emptyText: {
readonly description: "Provide component to be shown in case of empty data";
readonly table: {
readonly type: {
readonly summary: "React.Component";
};
};
};
readonly customLoader: {
readonly description: "Provide optional component to be shown in case of loading state. It will override the default loader.";
readonly table: {
readonly type: {
readonly summary: "React.Component";
};
};
};
readonly disabled: {
readonly description: "disable all the checkboxes of each row in the table";
readonly options: readonly [false, true];
readonly control: "boolean";
readonly table: {
readonly type: {
readonly summary: "boolean";
};
readonly defaultValue: {
readonly summary: false;
};
};
};
readonly borderRadius: {
readonly description: "Border Radius of all four corners of the table. Default value is borderRadiusMedium i.e., 12px.";
readonly control: "text";
readonly table: {
readonly type: {
readonly summary: "string";
};
readonly defaultValue: {
readonly summary: "12px";
};
};
};
readonly stickyHeader: {
readonly description: "Sticky header will stick the header to the top of the table when scrolling. This would only work if the table wrapper is scrollable.";
readonly control: "boolean";
readonly table: {
readonly type: {
readonly summary: "boolean";
};
readonly defaultValue: {
readonly summary: false;
};
};
};
readonly enableInternalSorting: {
readonly description: "Enable internal sorting for the table. This would sort the table data internally and not rely on the apis sorting";
readonly control: "boolean";
readonly table: {
readonly type: {
readonly summary: "?boolean";
};
readonly defaultValue: {
readonly summary: true;
};
};
};
readonly rowsCount: {
readonly name: "virtualizationOptions.rowsCount";
readonly description: "Total number of virtual rows.";
readonly control: {
readonly type: "number";
};
readonly table: {
readonly type: {
readonly summary: "number";
};
readonly defaultValue: {
readonly summary: 20;
};
};
};
readonly rowHeight: {
readonly name: "virtualizationOptions.rowHeight";
readonly description: "Row height in CSS units (e.g., \"48px\"). Should be provided correctly, otherwise it will not work as expected.";
readonly control: {
readonly type: "text";
};
readonly table: {
readonly type: {
readonly summary: "string";
};
readonly defaultValue: {
readonly summary: "48px";
};
};
};
readonly isEndLoading: {
readonly name: "virtualizationOptions.isEndLoading";
readonly description: "Whether to show loading spinner at the bottom.";
readonly control: {
readonly type: "boolean";
};
readonly table: {
readonly type: {
readonly summary: "boolean";
};
readonly defaultValue: {
readonly summary: false;
};
};
};
readonly isAllDataFetched: {
readonly name: "virtualizationOptions.isAllDataFetched";
readonly description: "Whether all rows are fetched (disables infinite loading).";
readonly control: {
readonly type: "boolean";
};
readonly table: {
readonly type: {
readonly summary: "boolean";
};
readonly defaultValue: {
readonly summary: false;
};
};
};
readonly onEndReached: {
readonly name: "virtualizationOptions.onEndReached";
readonly description: "Callback triggered when end of list is reached.";
readonly action: "onEndReached";
readonly table: {
readonly type: {
readonly summary: "() => void";
};
};
};
};
parameters: {
docs: {
subtitle: string;
description: {
component: string;
};
};
storySource: {
componentPath: string;
};
};
};
export default _default;
export declare const _InlineEdit: {
(args: TableProps<{
[key: string]: unknown;
}, {
[key: string]: unknown;
}>): React.JSX.Element;
args: {
borderRadius: string;
};
};
//# sourceMappingURL=InlineEdit.stories.d.ts.map