@wavv/ui 2.0.0-alpha.8 → 2.0.0-alpha.9

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.
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ type Props = {
3
+ children?: ReactNode;
4
+ /** The element/string to display when the table is empty */
5
+ emptyFallback?: ReactNode;
6
+ /** If true, shows a loading spinner in the body */
7
+ loading?: boolean;
8
+ /** If true, shows a loading spinner at the bottom of the body */
9
+ fetching?: boolean;
10
+ };
11
+ declare const Body: ({ children, emptyFallback, fetching, loading }: Props) => import("react/jsx-runtime").JSX.Element;
12
+ export default Body;
@@ -0,0 +1,5 @@
1
+ type Props = {
2
+ spinnerSize?: 'small';
3
+ };
4
+ declare const LoadingRow: ({ spinnerSize }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ export default LoadingRow;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { Padding } from '../types';
2
+ import { Height, Padding } from '../types';
3
3
  type Props = {
4
4
  children: ReactNode;
5
5
  /** Function called when the row is clicked */
@@ -10,6 +10,6 @@ type Props = {
10
10
  backgroundColor?: string;
11
11
  /** If true, adds a left border to the row. If a string, sets the left border color of the row */
12
12
  emphasis?: boolean | string;
13
- } & Padding;
13
+ } & Padding & Height;
14
14
  declare const Row: ({ children, onClick, disabled, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
15
15
  export default Row;
@@ -5,9 +5,11 @@ import type { Data, TableChildren } from './types';
5
5
  type Props<T> = {
6
6
  /** Background color of the table */
7
7
  backgroundColor?: string;
8
- } & TableChildren<T> & MarginPadding & Omit<TableProps, 'children' | 'sortDescriptor' | 'onSortChange'>;
8
+ /** The function to be called when the end of a scrolling table has been reached */
9
+ onScrollEnd?: () => void;
10
+ } & TableChildren<T> & MarginPadding & Omit<TableProps, 'children' | 'sortDescriptor' | 'onSortChange' | 'onScroll'>;
9
11
  declare const Table: {
10
- <DataType extends Data>({ children, data, ...props }: Props<DataType>): import("react/jsx-runtime").JSX.Element;
12
+ <DataType extends Data>({ children, data, onScrollEnd, ...props }: Props<DataType>): import("react/jsx-runtime").JSX.Element;
11
13
  Header: import("@emotion/styled").StyledComponent<import("react-aria-components").TableHeaderProps<object> & import("react").RefAttributes<HTMLTableSectionElement> & {
12
14
  theme?: import("@emotion/react").Theme | undefined;
13
15
  } & {
@@ -20,14 +22,19 @@ declare const Table: {
20
22
  sorted?: import("./types").SortDir | undefined;
21
23
  sortKey?: string | undefined;
22
24
  } & Padding & import("./contentStyles").ContentProps & Omit<import("react-aria-components").ColumnProps, "children" | "allowsSorting">) => import("react/jsx-runtime").JSX.Element;
23
- Body: <T extends object>(props: import("react-aria-components").TableBodyProps<T> & import("react").RefAttributes<HTMLTableSectionElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
25
+ Body: ({ children, emptyFallback, fetching, loading }: {
26
+ children?: ReactNode;
27
+ emptyFallback?: ReactNode;
28
+ loading?: boolean | undefined;
29
+ fetching?: boolean | undefined;
30
+ }) => import("react/jsx-runtime").JSX.Element;
24
31
  Row: ({ children, onClick, disabled, ...rest }: {
25
32
  children: ReactNode;
26
33
  onClick?: (() => void) | undefined;
27
34
  disabled?: boolean | undefined;
28
35
  backgroundColor?: string | undefined;
29
36
  emphasis?: string | boolean | undefined;
30
- } & Padding) => import("react/jsx-runtime").JSX.Element;
37
+ } & Padding & import("../types").Height) => import("react/jsx-runtime").JSX.Element;
31
38
  Cell: ({ children, defaultValue, direction, justify, align, gap, ...props }: {
32
39
  children?: ReactNode;
33
40
  defaultValue?: string | undefined;