@wavv/ui 2.0.0-alpha.7 → 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.
- package/build/cjs/index.js +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/types/components/Table/Body.d.ts +12 -0
- package/build/cjs/types/components/Table/LoadingRow.d.ts +5 -0
- package/build/cjs/types/components/Table/Row.d.ts +2 -2
- package/build/cjs/types/components/Table/SortCaret.d.ts +6 -0
- package/build/cjs/types/components/Table/Table.d.ts +11 -4
- package/build/cjs/types/components/componentTypes.d.ts +2 -2
- package/build/esm/index.js +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/types/components/Table/Body.d.ts +12 -0
- package/build/esm/types/components/Table/LoadingRow.d.ts +5 -0
- package/build/esm/types/components/Table/Row.d.ts +2 -2
- package/build/esm/types/components/Table/SortCaret.d.ts +6 -0
- package/build/esm/types/components/Table/Table.d.ts +11 -4
- package/build/esm/types/components/componentTypes.d.ts +2 -2
- package/build/index.d.ts +13 -6
- package/build/types/components/Table/Body.d.ts +12 -0
- package/build/types/components/Table/LoadingRow.d.ts +5 -0
- package/build/types/components/Table/Row.d.ts +2 -2
- package/build/types/components/Table/SortCaret.d.ts +6 -0
- package/build/types/components/Table/Table.d.ts +11 -4
- package/build/types/components/componentTypes.d.ts +2 -2
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -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
|
-
|
|
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:
|
|
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;
|
|
@@ -9,7 +9,7 @@ export type ShowHideCallbacks = {
|
|
|
9
9
|
};
|
|
10
10
|
export type ListItem = {
|
|
11
11
|
/** The id of the option that will be returned on selection */
|
|
12
|
-
id?:
|
|
12
|
+
id?: string;
|
|
13
13
|
/** The value displayed within the input after selection */
|
|
14
14
|
value: string;
|
|
15
15
|
/** The header text displayed above the body text */
|
|
@@ -50,7 +50,7 @@ export type SelectInputProps = {
|
|
|
50
50
|
/** Sets the fontSize */
|
|
51
51
|
fontSize?: number | string;
|
|
52
52
|
/** The function to be called when an option is selected */
|
|
53
|
-
onChange?: (key:
|
|
53
|
+
onChange?: (key: string) => void;
|
|
54
54
|
} & ShowHideCallbacks & Width & Margin;
|
|
55
55
|
export type CalendarBaseProps = {
|
|
56
56
|
/** Prevents selection of dates in the past (relative to the set date or current date). */
|