@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). */
|
package/build/index.d.ts
CHANGED
|
@@ -1188,7 +1188,7 @@ type ShowHideCallbacks = {
|
|
|
1188
1188
|
};
|
|
1189
1189
|
type ListItem = {
|
|
1190
1190
|
/** The id of the option that will be returned on selection */
|
|
1191
|
-
id?:
|
|
1191
|
+
id?: string;
|
|
1192
1192
|
/** The value displayed within the input after selection */
|
|
1193
1193
|
value: string;
|
|
1194
1194
|
/** The header text displayed above the body text */
|
|
@@ -1229,7 +1229,7 @@ type SelectInputProps = {
|
|
|
1229
1229
|
/** Sets the fontSize */
|
|
1230
1230
|
fontSize?: number | string;
|
|
1231
1231
|
/** The function to be called when an option is selected */
|
|
1232
|
-
onChange?: (key:
|
|
1232
|
+
onChange?: (key: string) => void;
|
|
1233
1233
|
} & ShowHideCallbacks & Width & Margin;
|
|
1234
1234
|
type CalendarBaseProps = {
|
|
1235
1235
|
/** Prevents selection of dates in the past (relative to the set date or current date). */
|
|
@@ -2564,9 +2564,11 @@ type SortDir = 'asc' | 'desc' | 'inactive';
|
|
|
2564
2564
|
type Props$2<T> = {
|
|
2565
2565
|
/** Background color of the table */
|
|
2566
2566
|
backgroundColor?: string;
|
|
2567
|
-
|
|
2567
|
+
/** The function to be called when the end of a scrolling table has been reached */
|
|
2568
|
+
onScrollEnd?: () => void;
|
|
2569
|
+
} & TableChildren<T> & MarginPadding & Omit<TableProps, 'children' | 'sortDescriptor' | 'onSortChange' | 'onScroll'>;
|
|
2568
2570
|
declare const Table: {
|
|
2569
|
-
<DataType extends Data>({ children, data, ...props }: Props$2<DataType>): react_jsx_runtime.JSX.Element;
|
|
2571
|
+
<DataType extends Data>({ children, data, onScrollEnd, ...props }: Props$2<DataType>): react_jsx_runtime.JSX.Element;
|
|
2570
2572
|
Header: _emotion_styled.StyledComponent<react_aria_components.TableHeaderProps<object> & react.RefAttributes<HTMLTableSectionElement> & {
|
|
2571
2573
|
theme?: _emotion_react.Theme | undefined;
|
|
2572
2574
|
} & {
|
|
@@ -2579,14 +2581,19 @@ declare const Table: {
|
|
|
2579
2581
|
sorted?: SortDir | undefined;
|
|
2580
2582
|
sortKey?: string | undefined;
|
|
2581
2583
|
} & Padding & ContentProps & Omit<react_aria_components.ColumnProps, "children" | "allowsSorting">) => react_jsx_runtime.JSX.Element;
|
|
2582
|
-
Body:
|
|
2584
|
+
Body: ({ children, emptyFallback, fetching, loading }: {
|
|
2585
|
+
children?: ReactNode;
|
|
2586
|
+
emptyFallback?: ReactNode;
|
|
2587
|
+
loading?: boolean | undefined;
|
|
2588
|
+
fetching?: boolean | undefined;
|
|
2589
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
2583
2590
|
Row: ({ children, onClick, disabled, ...rest }: {
|
|
2584
2591
|
children: ReactNode;
|
|
2585
2592
|
onClick?: (() => void) | undefined;
|
|
2586
2593
|
disabled?: boolean | undefined;
|
|
2587
2594
|
backgroundColor?: string | undefined;
|
|
2588
2595
|
emphasis?: string | boolean | undefined;
|
|
2589
|
-
} & Padding) => react_jsx_runtime.JSX.Element;
|
|
2596
|
+
} & Padding & Height) => react_jsx_runtime.JSX.Element;
|
|
2590
2597
|
Cell: ({ children, defaultValue, direction, justify, align, gap, ...props }: {
|
|
2591
2598
|
children?: ReactNode;
|
|
2592
2599
|
defaultValue?: string | undefined;
|
|
@@ -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). */
|