@redis-ui/table 2.4.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/dist/Table/Table.cjs +173 -0
- package/dist/Table/Table.context.cjs +13 -0
- package/dist/Table/Table.context.d.ts +7 -0
- package/dist/Table/Table.context.js +13 -0
- package/dist/Table/Table.d.ts +7 -0
- package/dist/Table/Table.js +173 -0
- package/dist/Table/Table.style.cjs +63 -0
- package/dist/Table/Table.style.d.ts +14 -0
- package/dist/Table/Table.style.js +61 -0
- package/dist/Table/Table.test.d.ts +1 -0
- package/dist/Table/Table.types.d.ts +31 -0
- package/dist/Table/components/ExpandRowButton/ExpandRowButton.cjs +20 -0
- package/dist/Table/components/ExpandRowButton/ExpandRowButton.d.ts +8 -0
- package/dist/Table/components/ExpandRowButton/ExpandRowButton.js +20 -0
- package/dist/Table/components/ExpandRowButton/ExpandRowButton.test.d.ts +1 -0
- package/dist/Table/components/ShowOnRowHover/ShowOnRowHover.style.cjs +11 -0
- package/dist/Table/components/ShowOnRowHover/ShowOnRowHover.style.d.ts +1 -0
- package/dist/Table/components/ShowOnRowHover/ShowOnRowHover.style.js +9 -0
- package/dist/Table/components/TableExpandedRow/TableAnimatedExpandedRow.cjs +34 -0
- package/dist/Table/components/TableExpandedRow/TableAnimatedExpandedRow.d.ts +2 -0
- package/dist/Table/components/TableExpandedRow/TableAnimatedExpandedRow.js +34 -0
- package/dist/Table/components/TableExpandedRow/TableAnimatedExpandedRow.style.cjs +11 -0
- package/dist/Table/components/TableExpandedRow/TableAnimatedExpandedRow.style.d.ts +2 -0
- package/dist/Table/components/TableExpandedRow/TableAnimatedExpandedRow.style.js +9 -0
- package/dist/Table/components/TableExpandedRow/TableExpandedRow.cjs +36 -0
- package/dist/Table/components/TableExpandedRow/TableExpandedRow.d.ts +2 -0
- package/dist/Table/components/TableExpandedRow/TableExpandedRow.js +36 -0
- package/dist/Table/components/TableExpandedRow/TableExpandedRow.style.cjs +15 -0
- package/dist/Table/components/TableExpandedRow/TableExpandedRow.style.d.ts +2 -0
- package/dist/Table/components/TableExpandedRow/TableExpandedRow.style.js +13 -0
- package/dist/Table/components/TableExpandedRow/TableExpandedRow.types.d.ts +9 -0
- package/dist/Table/components/TableExpandedRow/index.d.ts +3 -0
- package/dist/Table/components/TablePagination/TablePagination.cjs +93 -0
- package/dist/Table/components/TablePagination/TablePagination.d.ts +4 -0
- package/dist/Table/components/TablePagination/TablePagination.js +93 -0
- package/dist/Table/components/TablePagination/TablePagination.style.cjs +60 -0
- package/dist/Table/components/TablePagination/TablePagination.style.d.ts +50 -0
- package/dist/Table/components/TablePagination/TablePagination.style.js +58 -0
- package/dist/Table/components/TablePagination/TablePagination.test.d.ts +1 -0
- package/dist/Table/index.d.ts +8 -0
- package/dist/_virtual/jsx-runtime.cjs +4 -0
- package/dist/_virtual/jsx-runtime.js +4 -0
- package/dist/_virtual/react-jsx-runtime.development.cjs +4 -0
- package/dist/_virtual/react-jsx-runtime.development.js +4 -0
- package/dist/_virtual/react-jsx-runtime.production.min.cjs +4 -0
- package/dist/_virtual/react-jsx-runtime.production.min.js +4 -0
- package/dist/index.cjs +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +36 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +18 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +32 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +63 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +45 -0
- package/dist/node_modules/@tanstack/react-table/build/lib/index.cjs +123 -0
- package/dist/node_modules/@tanstack/react-table/build/lib/index.js +106 -0
- package/dist/node_modules/@tanstack/table-core/build/lib/index.cjs +2816 -0
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js +2816 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +902 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +900 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs +35 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +33 -0
- package/dist/node_modules/react/jsx-runtime.cjs +12 -0
- package/dist/node_modules/react/jsx-runtime.js +12 -0
- package/package.json +42 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const jsxRuntime = require("../node_modules/react/jsx-runtime.cjs");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const index$1 = require("../node_modules/@tanstack/react-table/build/lib/index.cjs");
|
|
6
|
+
const redisUiIcons = require("@redislabsdev/redis-ui-icons");
|
|
7
|
+
const index = require("../node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs");
|
|
8
|
+
const TablePagination = require("./components/TablePagination/TablePagination.cjs");
|
|
9
|
+
const ExpandRowButton = require("./components/ExpandRowButton/ExpandRowButton.cjs");
|
|
10
|
+
const TableExpandedRow = require("./components/TableExpandedRow/TableExpandedRow.cjs");
|
|
11
|
+
const TableAnimatedExpandedRow = require("./components/TableExpandedRow/TableAnimatedExpandedRow.cjs");
|
|
12
|
+
const Table_context = require("./Table.context.cjs");
|
|
13
|
+
const Table_style = require("./Table.style.cjs");
|
|
14
|
+
const index$2 = require("../node_modules/@tanstack/table-core/build/lib/index.cjs");
|
|
15
|
+
const getTrue = () => true;
|
|
16
|
+
const DEFAULT_PAGINATION = {
|
|
17
|
+
pageIndex: 0,
|
|
18
|
+
pageSize: 10
|
|
19
|
+
};
|
|
20
|
+
const Table = Object.assign(({
|
|
21
|
+
columns,
|
|
22
|
+
onRowClick,
|
|
23
|
+
data,
|
|
24
|
+
defaultSorting,
|
|
25
|
+
emptyState,
|
|
26
|
+
maxHeight,
|
|
27
|
+
stripedRows = false,
|
|
28
|
+
onSortingChange,
|
|
29
|
+
sorting,
|
|
30
|
+
manualSorting = false,
|
|
31
|
+
getIsRowExpandable,
|
|
32
|
+
renderExpandedRow,
|
|
33
|
+
expandRowOnClick,
|
|
34
|
+
expandedRowComponent: ExpandedRow = TableExpandedRow.TableExpandedRow,
|
|
35
|
+
pagination,
|
|
36
|
+
defaultPagination,
|
|
37
|
+
onPaginationChange,
|
|
38
|
+
manualPagination,
|
|
39
|
+
totalRowCount,
|
|
40
|
+
pageSizes,
|
|
41
|
+
paginationEnabled = (pagination || defaultPagination || onPaginationChange || pageSizes) !== void 0 || manualPagination !== void 0
|
|
42
|
+
}) => {
|
|
43
|
+
const [sortingState, setSortingState] = index.useControllableState({
|
|
44
|
+
prop: sorting,
|
|
45
|
+
defaultProp: defaultSorting,
|
|
46
|
+
onChange: onSortingChange
|
|
47
|
+
});
|
|
48
|
+
const [paginationState, setPaginationState] = index.useControllableState({
|
|
49
|
+
prop: pagination,
|
|
50
|
+
defaultProp: defaultPagination ?? DEFAULT_PAGINATION,
|
|
51
|
+
onChange: onPaginationChange
|
|
52
|
+
});
|
|
53
|
+
const isExpandable = !!renderExpandedRow;
|
|
54
|
+
const paginationSettings = {
|
|
55
|
+
getPaginationRowModel: index$2.getPaginationRowModel(),
|
|
56
|
+
onPaginationChange: setPaginationState,
|
|
57
|
+
manualPagination,
|
|
58
|
+
rowCount: totalRowCount,
|
|
59
|
+
autoResetPageIndex: false
|
|
60
|
+
};
|
|
61
|
+
const table = index$1.useReactTable({
|
|
62
|
+
data,
|
|
63
|
+
columns,
|
|
64
|
+
getCoreRowModel: index$2.getCoreRowModel(),
|
|
65
|
+
getSortedRowModel: index$2.getSortedRowModel(),
|
|
66
|
+
state: {
|
|
67
|
+
sorting: sortingState,
|
|
68
|
+
...paginationEnabled && {
|
|
69
|
+
pagination: paginationState
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
manualSorting,
|
|
73
|
+
onSortingChange: setSortingState,
|
|
74
|
+
getExpandedRowModel: isExpandable ? index$2.getExpandedRowModel() : void 0,
|
|
75
|
+
getRowCanExpand: isExpandable ? getIsRowExpandable && ((row) => getIsRowExpandable(row.original)) || getTrue : void 0,
|
|
76
|
+
...paginationEnabled && paginationSettings
|
|
77
|
+
});
|
|
78
|
+
const {
|
|
79
|
+
pageIndex
|
|
80
|
+
} = table.getState().pagination;
|
|
81
|
+
const maxPageIndex = Math.max(table.getPageCount(), 1) - 1;
|
|
82
|
+
React.useEffect(() => {
|
|
83
|
+
if (paginationEnabled) table.setPageIndex(Math.min(pageIndex, maxPageIndex));
|
|
84
|
+
}, [maxPageIndex, pageIndex, table, paginationEnabled]);
|
|
85
|
+
const {
|
|
86
|
+
rows
|
|
87
|
+
} = table.getRowModel();
|
|
88
|
+
return jsxRuntime.jsxRuntimeExports.jsx(Table_context.TableContext.Provider, {
|
|
89
|
+
value: {
|
|
90
|
+
table
|
|
91
|
+
},
|
|
92
|
+
children: jsxRuntime.jsxRuntimeExports.jsxs(Table_style.TableContainer, {
|
|
93
|
+
children: [jsxRuntime.jsxRuntimeExports.jsxs(Table_style.Table, {
|
|
94
|
+
children: [jsxRuntime.jsxRuntimeExports.jsx(Table_style.TableHead, {
|
|
95
|
+
children: table.getHeaderGroups().map((headerGroup) => jsxRuntime.jsxRuntimeExports.jsx(Table_style.TableHeaderRow, {
|
|
96
|
+
children: headerGroup.headers.map((header) => jsxRuntime.jsxRuntimeExports.jsx(Table_style.TableTh, {
|
|
97
|
+
onClick: header.column.getToggleSortingHandler(),
|
|
98
|
+
style: {
|
|
99
|
+
width: header.column.getSize()
|
|
100
|
+
},
|
|
101
|
+
children: jsxRuntime.jsxRuntimeExports.jsxs(Table_style.HeaderCellInnerWrapper, {
|
|
102
|
+
size: "XS",
|
|
103
|
+
children: [header.isPlaceholder ? null : index$1.flexRender(header.column.columnDef.header, header.getContext()), {
|
|
104
|
+
asc: jsxRuntime.jsxRuntimeExports.jsx(redisUiIcons.ArrowUpIcon, {
|
|
105
|
+
size: "S",
|
|
106
|
+
color: "neutral700"
|
|
107
|
+
}),
|
|
108
|
+
desc: jsxRuntime.jsxRuntimeExports.jsx(redisUiIcons.ArrowDownIcon, {
|
|
109
|
+
size: "S",
|
|
110
|
+
color: "neutral700"
|
|
111
|
+
})
|
|
112
|
+
}[header.column.getIsSorted()] ?? null]
|
|
113
|
+
})
|
|
114
|
+
}, header.id))
|
|
115
|
+
}, headerGroup.id))
|
|
116
|
+
}), jsxRuntime.jsxRuntimeExports.jsxs(Table_style.TableBody, {
|
|
117
|
+
maxHeight,
|
|
118
|
+
children: [!rows.length ? jsxRuntime.jsxRuntimeExports.jsx(Table_style.TableBodyRow, {
|
|
119
|
+
"$stripedRows": false,
|
|
120
|
+
children: jsxRuntime.jsxRuntimeExports.jsx(Table_style.TableBodyCell, {
|
|
121
|
+
colSpan: columns.length,
|
|
122
|
+
children: emptyState ? emptyState() : "No data to display"
|
|
123
|
+
})
|
|
124
|
+
}) : null, rows.map((row) => {
|
|
125
|
+
const isRowExpandable = isExpandable && row.getCanExpand();
|
|
126
|
+
const isRowExpanded = isRowExpandable && row.getIsExpanded();
|
|
127
|
+
const handleClick = () => {
|
|
128
|
+
isRowExpandable && expandRowOnClick && row.toggleExpanded();
|
|
129
|
+
onRowClick == null ? void 0 : onRowClick(row.original);
|
|
130
|
+
};
|
|
131
|
+
return jsxRuntime.jsxRuntimeExports.jsxs(React.Fragment, {
|
|
132
|
+
children: [jsxRuntime.jsxRuntimeExports.jsx(Table_style.TableBodyRow, {
|
|
133
|
+
tabIndex: 0,
|
|
134
|
+
"data-row-type": "regular",
|
|
135
|
+
...isRowExpandable ? {
|
|
136
|
+
"aria-expanded": isRowExpanded
|
|
137
|
+
} : null,
|
|
138
|
+
"$stripedRows": stripedRows,
|
|
139
|
+
"$hasOnClick": !!onRowClick || isRowExpandable,
|
|
140
|
+
onClick: handleClick,
|
|
141
|
+
onKeyDown: (event) => {
|
|
142
|
+
if (event.key === "Enter" && event.target === event.currentTarget) {
|
|
143
|
+
handleClick();
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
children: row.getVisibleCells().map((cell) => jsxRuntime.jsxRuntimeExports.jsx(Table_style.TableBodyCell, {
|
|
147
|
+
style: {
|
|
148
|
+
width: cell.column.getSize()
|
|
149
|
+
},
|
|
150
|
+
children: index$1.flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
151
|
+
}, cell.id))
|
|
152
|
+
}), isRowExpandable && // 2nd row is a custom 1 cell row for expanded part
|
|
153
|
+
jsxRuntime.jsxRuntimeExports.jsx(ExpandedRow, {
|
|
154
|
+
"data-row-type": "expanded",
|
|
155
|
+
"data-expanded": isRowExpanded,
|
|
156
|
+
expanded: isRowExpanded,
|
|
157
|
+
row,
|
|
158
|
+
renderExpandedRow
|
|
159
|
+
})]
|
|
160
|
+
}, row.id);
|
|
161
|
+
})]
|
|
162
|
+
})]
|
|
163
|
+
}), jsxRuntime.jsxRuntimeExports.jsx(TablePagination.default, {
|
|
164
|
+
pageSizes
|
|
165
|
+
})]
|
|
166
|
+
})
|
|
167
|
+
});
|
|
168
|
+
}, {
|
|
169
|
+
ExpandRowButton: ExpandRowButton.ExpandRowButton,
|
|
170
|
+
ExpandedRow: TableExpandedRow.TableExpandedRow,
|
|
171
|
+
AnimatedExpandedRow: TableAnimatedExpandedRow.TableAnimatedExpandedRow
|
|
172
|
+
});
|
|
173
|
+
exports.default = Table;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const TableContext = React.createContext(null);
|
|
5
|
+
const useTableContext = () => {
|
|
6
|
+
const tableContext = React.useContext(TableContext);
|
|
7
|
+
if (!tableContext) {
|
|
8
|
+
throw new Error(`Table compound components cannot be rendered outside the Table component`);
|
|
9
|
+
}
|
|
10
|
+
return tableContext;
|
|
11
|
+
};
|
|
12
|
+
exports.TableContext = TableContext;
|
|
13
|
+
exports.useTableContext = useTableContext;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Table } from '@tanstack/react-table';
|
|
3
|
+
export type TableContextProps<T extends object> = {
|
|
4
|
+
table: Table<T>;
|
|
5
|
+
};
|
|
6
|
+
export declare const TableContext: import("react").Context<TableContextProps<any> | null>;
|
|
7
|
+
export declare const useTableContext: () => TableContextProps<any>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
const TableContext = createContext(null);
|
|
3
|
+
const useTableContext = () => {
|
|
4
|
+
const tableContext = useContext(TableContext);
|
|
5
|
+
if (!tableContext) {
|
|
6
|
+
throw new Error(`Table compound components cannot be rendered outside the Table component`);
|
|
7
|
+
}
|
|
8
|
+
return tableContext;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
TableContext,
|
|
12
|
+
useTableContext
|
|
13
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TableProps } from './Table.types';
|
|
2
|
+
declare const Table: (<T extends object>({ columns, onRowClick, data, defaultSorting, emptyState, maxHeight, stripedRows, onSortingChange, sorting, manualSorting, getIsRowExpandable, renderExpandedRow, expandRowOnClick, expandedRowComponent: ExpandedRow, pagination, defaultPagination, onPaginationChange, manualPagination, totalRowCount, pageSizes, paginationEnabled }: TableProps<T>) => import("react/jsx-runtime").JSX.Element) & {
|
|
3
|
+
ExpandRowButton: ({ row, expandedIcon, collapsedIcon, ...restProps }: import("./components/ExpandRowButton/ExpandRowButton").ExpandRowButtonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
ExpandedRow: <T_1 extends object>({ row, renderExpandedRow, keepInDom, expanded, rowRef, ...restProps }: import("./components/TableExpandedRow").TableExpandedRowProps<T_1>) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
AnimatedExpandedRow: <T_2 extends object>({ expanded, rowRef, ...restProps }: import("./components/TableExpandedRow").TableExpandedRowProps<T_2>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export default Table;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { useEffect, Fragment } from "react";
|
|
3
|
+
import { useReactTable, flexRender } from "../node_modules/@tanstack/react-table/build/lib/index.js";
|
|
4
|
+
import { ArrowUpIcon, ArrowDownIcon } from "@redislabsdev/redis-ui-icons";
|
|
5
|
+
import { useControllableState } from "../node_modules/@radix-ui/react-use-controllable-state/dist/index.js";
|
|
6
|
+
import TablePagination from "./components/TablePagination/TablePagination.js";
|
|
7
|
+
import { ExpandRowButton } from "./components/ExpandRowButton/ExpandRowButton.js";
|
|
8
|
+
import { TableExpandedRow } from "./components/TableExpandedRow/TableExpandedRow.js";
|
|
9
|
+
import { TableAnimatedExpandedRow } from "./components/TableExpandedRow/TableAnimatedExpandedRow.js";
|
|
10
|
+
import { TableContext } from "./Table.context.js";
|
|
11
|
+
import { TableContainer, Table as Table$1, TableHead, TableHeaderRow, TableTh, HeaderCellInnerWrapper, TableBody, TableBodyRow, TableBodyCell } from "./Table.style.js";
|
|
12
|
+
import { getCoreRowModel, getSortedRowModel, getExpandedRowModel, getPaginationRowModel } from "../node_modules/@tanstack/table-core/build/lib/index.js";
|
|
13
|
+
const getTrue = () => true;
|
|
14
|
+
const DEFAULT_PAGINATION = {
|
|
15
|
+
pageIndex: 0,
|
|
16
|
+
pageSize: 10
|
|
17
|
+
};
|
|
18
|
+
const Table = Object.assign(({
|
|
19
|
+
columns,
|
|
20
|
+
onRowClick,
|
|
21
|
+
data,
|
|
22
|
+
defaultSorting,
|
|
23
|
+
emptyState,
|
|
24
|
+
maxHeight,
|
|
25
|
+
stripedRows = false,
|
|
26
|
+
onSortingChange,
|
|
27
|
+
sorting,
|
|
28
|
+
manualSorting = false,
|
|
29
|
+
getIsRowExpandable,
|
|
30
|
+
renderExpandedRow,
|
|
31
|
+
expandRowOnClick,
|
|
32
|
+
expandedRowComponent: ExpandedRow = TableExpandedRow,
|
|
33
|
+
pagination,
|
|
34
|
+
defaultPagination,
|
|
35
|
+
onPaginationChange,
|
|
36
|
+
manualPagination,
|
|
37
|
+
totalRowCount,
|
|
38
|
+
pageSizes,
|
|
39
|
+
paginationEnabled = (pagination || defaultPagination || onPaginationChange || pageSizes) !== void 0 || manualPagination !== void 0
|
|
40
|
+
}) => {
|
|
41
|
+
const [sortingState, setSortingState] = useControllableState({
|
|
42
|
+
prop: sorting,
|
|
43
|
+
defaultProp: defaultSorting,
|
|
44
|
+
onChange: onSortingChange
|
|
45
|
+
});
|
|
46
|
+
const [paginationState, setPaginationState] = useControllableState({
|
|
47
|
+
prop: pagination,
|
|
48
|
+
defaultProp: defaultPagination ?? DEFAULT_PAGINATION,
|
|
49
|
+
onChange: onPaginationChange
|
|
50
|
+
});
|
|
51
|
+
const isExpandable = !!renderExpandedRow;
|
|
52
|
+
const paginationSettings = {
|
|
53
|
+
getPaginationRowModel: getPaginationRowModel(),
|
|
54
|
+
onPaginationChange: setPaginationState,
|
|
55
|
+
manualPagination,
|
|
56
|
+
rowCount: totalRowCount,
|
|
57
|
+
autoResetPageIndex: false
|
|
58
|
+
};
|
|
59
|
+
const table = useReactTable({
|
|
60
|
+
data,
|
|
61
|
+
columns,
|
|
62
|
+
getCoreRowModel: getCoreRowModel(),
|
|
63
|
+
getSortedRowModel: getSortedRowModel(),
|
|
64
|
+
state: {
|
|
65
|
+
sorting: sortingState,
|
|
66
|
+
...paginationEnabled && {
|
|
67
|
+
pagination: paginationState
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
manualSorting,
|
|
71
|
+
onSortingChange: setSortingState,
|
|
72
|
+
getExpandedRowModel: isExpandable ? getExpandedRowModel() : void 0,
|
|
73
|
+
getRowCanExpand: isExpandable ? getIsRowExpandable && ((row) => getIsRowExpandable(row.original)) || getTrue : void 0,
|
|
74
|
+
...paginationEnabled && paginationSettings
|
|
75
|
+
});
|
|
76
|
+
const {
|
|
77
|
+
pageIndex
|
|
78
|
+
} = table.getState().pagination;
|
|
79
|
+
const maxPageIndex = Math.max(table.getPageCount(), 1) - 1;
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
if (paginationEnabled) table.setPageIndex(Math.min(pageIndex, maxPageIndex));
|
|
82
|
+
}, [maxPageIndex, pageIndex, table, paginationEnabled]);
|
|
83
|
+
const {
|
|
84
|
+
rows
|
|
85
|
+
} = table.getRowModel();
|
|
86
|
+
return jsxRuntimeExports.jsx(TableContext.Provider, {
|
|
87
|
+
value: {
|
|
88
|
+
table
|
|
89
|
+
},
|
|
90
|
+
children: jsxRuntimeExports.jsxs(TableContainer, {
|
|
91
|
+
children: [jsxRuntimeExports.jsxs(Table$1, {
|
|
92
|
+
children: [jsxRuntimeExports.jsx(TableHead, {
|
|
93
|
+
children: table.getHeaderGroups().map((headerGroup) => jsxRuntimeExports.jsx(TableHeaderRow, {
|
|
94
|
+
children: headerGroup.headers.map((header) => jsxRuntimeExports.jsx(TableTh, {
|
|
95
|
+
onClick: header.column.getToggleSortingHandler(),
|
|
96
|
+
style: {
|
|
97
|
+
width: header.column.getSize()
|
|
98
|
+
},
|
|
99
|
+
children: jsxRuntimeExports.jsxs(HeaderCellInnerWrapper, {
|
|
100
|
+
size: "XS",
|
|
101
|
+
children: [header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()), {
|
|
102
|
+
asc: jsxRuntimeExports.jsx(ArrowUpIcon, {
|
|
103
|
+
size: "S",
|
|
104
|
+
color: "neutral700"
|
|
105
|
+
}),
|
|
106
|
+
desc: jsxRuntimeExports.jsx(ArrowDownIcon, {
|
|
107
|
+
size: "S",
|
|
108
|
+
color: "neutral700"
|
|
109
|
+
})
|
|
110
|
+
}[header.column.getIsSorted()] ?? null]
|
|
111
|
+
})
|
|
112
|
+
}, header.id))
|
|
113
|
+
}, headerGroup.id))
|
|
114
|
+
}), jsxRuntimeExports.jsxs(TableBody, {
|
|
115
|
+
maxHeight,
|
|
116
|
+
children: [!rows.length ? jsxRuntimeExports.jsx(TableBodyRow, {
|
|
117
|
+
"$stripedRows": false,
|
|
118
|
+
children: jsxRuntimeExports.jsx(TableBodyCell, {
|
|
119
|
+
colSpan: columns.length,
|
|
120
|
+
children: emptyState ? emptyState() : "No data to display"
|
|
121
|
+
})
|
|
122
|
+
}) : null, rows.map((row) => {
|
|
123
|
+
const isRowExpandable = isExpandable && row.getCanExpand();
|
|
124
|
+
const isRowExpanded = isRowExpandable && row.getIsExpanded();
|
|
125
|
+
const handleClick = () => {
|
|
126
|
+
isRowExpandable && expandRowOnClick && row.toggleExpanded();
|
|
127
|
+
onRowClick == null ? void 0 : onRowClick(row.original);
|
|
128
|
+
};
|
|
129
|
+
return jsxRuntimeExports.jsxs(Fragment, {
|
|
130
|
+
children: [jsxRuntimeExports.jsx(TableBodyRow, {
|
|
131
|
+
tabIndex: 0,
|
|
132
|
+
"data-row-type": "regular",
|
|
133
|
+
...isRowExpandable ? {
|
|
134
|
+
"aria-expanded": isRowExpanded
|
|
135
|
+
} : null,
|
|
136
|
+
"$stripedRows": stripedRows,
|
|
137
|
+
"$hasOnClick": !!onRowClick || isRowExpandable,
|
|
138
|
+
onClick: handleClick,
|
|
139
|
+
onKeyDown: (event) => {
|
|
140
|
+
if (event.key === "Enter" && event.target === event.currentTarget) {
|
|
141
|
+
handleClick();
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
children: row.getVisibleCells().map((cell) => jsxRuntimeExports.jsx(TableBodyCell, {
|
|
145
|
+
style: {
|
|
146
|
+
width: cell.column.getSize()
|
|
147
|
+
},
|
|
148
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
149
|
+
}, cell.id))
|
|
150
|
+
}), isRowExpandable && // 2nd row is a custom 1 cell row for expanded part
|
|
151
|
+
jsxRuntimeExports.jsx(ExpandedRow, {
|
|
152
|
+
"data-row-type": "expanded",
|
|
153
|
+
"data-expanded": isRowExpanded,
|
|
154
|
+
expanded: isRowExpanded,
|
|
155
|
+
row,
|
|
156
|
+
renderExpandedRow
|
|
157
|
+
})]
|
|
158
|
+
}, row.id);
|
|
159
|
+
})]
|
|
160
|
+
})]
|
|
161
|
+
}), jsxRuntimeExports.jsx(TablePagination, {
|
|
162
|
+
pageSizes
|
|
163
|
+
})]
|
|
164
|
+
})
|
|
165
|
+
});
|
|
166
|
+
}, {
|
|
167
|
+
ExpandRowButton,
|
|
168
|
+
ExpandedRow: TableExpandedRow,
|
|
169
|
+
AnimatedExpandedRow: TableAnimatedExpandedRow
|
|
170
|
+
});
|
|
171
|
+
export {
|
|
172
|
+
Table as default
|
|
173
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const _styled = require("styled-components");
|
|
4
|
+
const redisUiStyles = require("@redislabsdev/redis-ui-styles");
|
|
5
|
+
const redisUiComponents = require("@redislabsdev/redis-ui-components");
|
|
6
|
+
const ShowOnRowHover_style = require("./components/ShowOnRowHover/ShowOnRowHover.style.cjs");
|
|
7
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
8
|
+
const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
9
|
+
const TableContainer = _styled__default.default.div.withConfig({
|
|
10
|
+
displayName: "Tablestyle__TableContainer",
|
|
11
|
+
componentId: "sc-o0xfty-0"
|
|
12
|
+
})(["width:100%;border-radius:0.8rem;box-shadow:", ";background-color:", ";overflow:hidden;"], () => redisUiStyles.useTheme().components.table.table.tableContainer.boxShadow, () => redisUiStyles.useTheme().components.table.table.tableContainer.backgroundColor);
|
|
13
|
+
const Table = _styled__default.default.table.withConfig({
|
|
14
|
+
displayName: "Tablestyle__Table",
|
|
15
|
+
componentId: "sc-o0xfty-1"
|
|
16
|
+
})(["width:100%;border-collapse:collapse;border-spacing:0;overflow-x:auto;display:block;table-layout:fixed;::-webkit-scrollbar{height:0.5rem;}"]);
|
|
17
|
+
const TableHead = _styled__default.default.thead.withConfig({
|
|
18
|
+
displayName: "Tablestyle__TableHead",
|
|
19
|
+
componentId: "sc-o0xfty-2"
|
|
20
|
+
})(["display:table;table-layout:fixed;"]);
|
|
21
|
+
const TableHeaderRow = _styled__default.default.tr.withConfig({
|
|
22
|
+
displayName: "Tablestyle__TableHeaderRow",
|
|
23
|
+
componentId: "sc-o0xfty-3"
|
|
24
|
+
})(["height:5.6rem;display:table;width:100%;table-layout:fixed;"]);
|
|
25
|
+
const HeaderCellInnerWrapper = _styled__default.default(redisUiComponents.Typography.Heading).withConfig({
|
|
26
|
+
displayName: "Tablestyle__HeaderCellInnerWrapper",
|
|
27
|
+
componentId: "sc-o0xfty-4"
|
|
28
|
+
})(["display:flex;align-items:center;justify-content:flex-start;height:35px;line-height:35px;"]);
|
|
29
|
+
const TableTh = _styled__default.default.th.withConfig({
|
|
30
|
+
displayName: "Tablestyle__TableTh",
|
|
31
|
+
componentId: "sc-o0xfty-5"
|
|
32
|
+
})(["padding:1.05rem 0 1.05rem 1.2rem;color:", ";user-select:none;white-space:nowrap;svg{vertical-align:middle;margin-left:0.8rem;}&:not(:last-child){> ", "{border-right:1px solid ", ";}}"], () => redisUiStyles.useTheme().components.table.table.tableTh.color, HeaderCellInnerWrapper, () => redisUiStyles.useTheme().components.table.table.tableTh.borderRight);
|
|
33
|
+
const TableBody = _styled__default.default.tbody.withConfig({
|
|
34
|
+
displayName: "Tablestyle__TableBody",
|
|
35
|
+
componentId: "sc-o0xfty-6"
|
|
36
|
+
})(["max-height:", ";overflow-y:auto;overflow-x:hidden;display:inline-block;table-layout:fixed;"], ({
|
|
37
|
+
maxHeight
|
|
38
|
+
}) => maxHeight);
|
|
39
|
+
const TableBodyRow = _styled__default.default.tr.withConfig({
|
|
40
|
+
displayName: "Tablestyle__TableBodyRow",
|
|
41
|
+
componentId: "sc-o0xfty-7"
|
|
42
|
+
})(["border-top:1px solid ", ";height:4.8rem;transition:box-shadow 0.2s ease-in-out;position:relative;&:hover,&:focus{cursor:", ";z-index:1;box-shadow:", ";", "{opacity:1;visibility:visible;}}", " display:table;width:100%;table-layout:fixed;"], () => redisUiStyles.useTheme().components.table.table.tableBodyRow.borderTop, ({
|
|
43
|
+
$hasOnClick
|
|
44
|
+
}) => $hasOnClick ? "pointer" : "default", () => redisUiStyles.useTheme().components.table.table.tableBodyRow.hoverBoxShadow, ShowOnRowHover_style.ShowOnRowHover, ({
|
|
45
|
+
$stripedRows
|
|
46
|
+
}) => $stripedRows && _styled.css`
|
|
47
|
+
:nth-child(even of [data-row-type='regular']) {
|
|
48
|
+
background: ${() => redisUiStyles.useTheme().components.table.table.tableBodyRow.backgroundColor};
|
|
49
|
+
}
|
|
50
|
+
`);
|
|
51
|
+
const TableBodyCell = _styled__default.default.td.withConfig({
|
|
52
|
+
displayName: "Tablestyle__TableBodyCell",
|
|
53
|
+
componentId: "sc-o0xfty-8"
|
|
54
|
+
})(["color:", ";padding:0 1.2rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"], () => redisUiStyles.useTheme().components.table.table.tableBodyCell.color);
|
|
55
|
+
exports.HeaderCellInnerWrapper = HeaderCellInnerWrapper;
|
|
56
|
+
exports.Table = Table;
|
|
57
|
+
exports.TableBody = TableBody;
|
|
58
|
+
exports.TableBodyCell = TableBodyCell;
|
|
59
|
+
exports.TableBodyRow = TableBodyRow;
|
|
60
|
+
exports.TableContainer = TableContainer;
|
|
61
|
+
exports.TableHead = TableHead;
|
|
62
|
+
exports.TableHeaderRow = TableHeaderRow;
|
|
63
|
+
exports.TableTh = TableTh;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const TableContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const Table: import("styled-components").StyledComponent<"table", any, {}, never>;
|
|
3
|
+
export declare const TableHead: import("styled-components").StyledComponent<"thead", any, {}, never>;
|
|
4
|
+
export declare const TableHeaderRow: import("styled-components").StyledComponent<"tr", any, {}, never>;
|
|
5
|
+
export declare const HeaderCellInnerWrapper: import("styled-components").StyledComponent<({ size, ellipsis, ...restProps }: import("@redislabsdev/redis-ui-components/dist/Typography/components/Heading/Heading.types").HeadingProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
|
|
6
|
+
export declare const TableTh: import("styled-components").StyledComponent<"th", any, {}, never>;
|
|
7
|
+
export declare const TableBody: import("styled-components").StyledComponent<"tbody", any, {
|
|
8
|
+
maxHeight?: string | undefined;
|
|
9
|
+
}, never>;
|
|
10
|
+
export declare const TableBodyRow: import("styled-components").StyledComponent<"tr", any, {
|
|
11
|
+
$stripedRows: boolean;
|
|
12
|
+
$hasOnClick?: boolean | undefined;
|
|
13
|
+
}, never>;
|
|
14
|
+
export declare const TableBodyCell: import("styled-components").StyledComponent<"td", any, {}, never>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import _styled, { css } from "styled-components";
|
|
2
|
+
import { useTheme } from "@redislabsdev/redis-ui-styles";
|
|
3
|
+
import { Typography } from "@redislabsdev/redis-ui-components";
|
|
4
|
+
import { ShowOnRowHover } from "./components/ShowOnRowHover/ShowOnRowHover.style.js";
|
|
5
|
+
const TableContainer = _styled.div.withConfig({
|
|
6
|
+
displayName: "Tablestyle__TableContainer",
|
|
7
|
+
componentId: "sc-o0xfty-0"
|
|
8
|
+
})(["width:100%;border-radius:0.8rem;box-shadow:", ";background-color:", ";overflow:hidden;"], () => useTheme().components.table.table.tableContainer.boxShadow, () => useTheme().components.table.table.tableContainer.backgroundColor);
|
|
9
|
+
const Table = _styled.table.withConfig({
|
|
10
|
+
displayName: "Tablestyle__Table",
|
|
11
|
+
componentId: "sc-o0xfty-1"
|
|
12
|
+
})(["width:100%;border-collapse:collapse;border-spacing:0;overflow-x:auto;display:block;table-layout:fixed;::-webkit-scrollbar{height:0.5rem;}"]);
|
|
13
|
+
const TableHead = _styled.thead.withConfig({
|
|
14
|
+
displayName: "Tablestyle__TableHead",
|
|
15
|
+
componentId: "sc-o0xfty-2"
|
|
16
|
+
})(["display:table;table-layout:fixed;"]);
|
|
17
|
+
const TableHeaderRow = _styled.tr.withConfig({
|
|
18
|
+
displayName: "Tablestyle__TableHeaderRow",
|
|
19
|
+
componentId: "sc-o0xfty-3"
|
|
20
|
+
})(["height:5.6rem;display:table;width:100%;table-layout:fixed;"]);
|
|
21
|
+
const HeaderCellInnerWrapper = _styled(Typography.Heading).withConfig({
|
|
22
|
+
displayName: "Tablestyle__HeaderCellInnerWrapper",
|
|
23
|
+
componentId: "sc-o0xfty-4"
|
|
24
|
+
})(["display:flex;align-items:center;justify-content:flex-start;height:35px;line-height:35px;"]);
|
|
25
|
+
const TableTh = _styled.th.withConfig({
|
|
26
|
+
displayName: "Tablestyle__TableTh",
|
|
27
|
+
componentId: "sc-o0xfty-5"
|
|
28
|
+
})(["padding:1.05rem 0 1.05rem 1.2rem;color:", ";user-select:none;white-space:nowrap;svg{vertical-align:middle;margin-left:0.8rem;}&:not(:last-child){> ", "{border-right:1px solid ", ";}}"], () => useTheme().components.table.table.tableTh.color, HeaderCellInnerWrapper, () => useTheme().components.table.table.tableTh.borderRight);
|
|
29
|
+
const TableBody = _styled.tbody.withConfig({
|
|
30
|
+
displayName: "Tablestyle__TableBody",
|
|
31
|
+
componentId: "sc-o0xfty-6"
|
|
32
|
+
})(["max-height:", ";overflow-y:auto;overflow-x:hidden;display:inline-block;table-layout:fixed;"], ({
|
|
33
|
+
maxHeight
|
|
34
|
+
}) => maxHeight);
|
|
35
|
+
const TableBodyRow = _styled.tr.withConfig({
|
|
36
|
+
displayName: "Tablestyle__TableBodyRow",
|
|
37
|
+
componentId: "sc-o0xfty-7"
|
|
38
|
+
})(["border-top:1px solid ", ";height:4.8rem;transition:box-shadow 0.2s ease-in-out;position:relative;&:hover,&:focus{cursor:", ";z-index:1;box-shadow:", ";", "{opacity:1;visibility:visible;}}", " display:table;width:100%;table-layout:fixed;"], () => useTheme().components.table.table.tableBodyRow.borderTop, ({
|
|
39
|
+
$hasOnClick
|
|
40
|
+
}) => $hasOnClick ? "pointer" : "default", () => useTheme().components.table.table.tableBodyRow.hoverBoxShadow, ShowOnRowHover, ({
|
|
41
|
+
$stripedRows
|
|
42
|
+
}) => $stripedRows && css`
|
|
43
|
+
:nth-child(even of [data-row-type='regular']) {
|
|
44
|
+
background: ${() => useTheme().components.table.table.tableBodyRow.backgroundColor};
|
|
45
|
+
}
|
|
46
|
+
`);
|
|
47
|
+
const TableBodyCell = _styled.td.withConfig({
|
|
48
|
+
displayName: "Tablestyle__TableBodyCell",
|
|
49
|
+
componentId: "sc-o0xfty-8"
|
|
50
|
+
})(["color:", ";padding:0 1.2rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"], () => useTheme().components.table.table.tableBodyCell.color);
|
|
51
|
+
export {
|
|
52
|
+
HeaderCellInnerWrapper,
|
|
53
|
+
Table,
|
|
54
|
+
TableBody,
|
|
55
|
+
TableBodyCell,
|
|
56
|
+
TableBodyRow,
|
|
57
|
+
TableContainer,
|
|
58
|
+
TableHead,
|
|
59
|
+
TableHeaderRow,
|
|
60
|
+
TableTh
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
import type { ColumnDef, CellContext, PaginationState, Row, SortingState } from '@tanstack/react-table';
|
|
3
|
+
import type { TableExpandedRowProps } from './components/TableExpandedRow';
|
|
4
|
+
export type ColumnDefinition<T extends object> = ColumnDef<T>;
|
|
5
|
+
export type RowDefinition<T extends object> = Row<T>;
|
|
6
|
+
export type CellDefinition<T extends object, D> = CellContext<T, D>;
|
|
7
|
+
export type PaginationTypes = PaginationState;
|
|
8
|
+
export type SortingTypes = SortingState;
|
|
9
|
+
export interface TableProps<T extends object> {
|
|
10
|
+
data: T[];
|
|
11
|
+
columns: ColumnDefinition<T>[];
|
|
12
|
+
onRowClick?: (row: T) => void;
|
|
13
|
+
emptyState?: () => ReactNode;
|
|
14
|
+
defaultSorting?: SortingState;
|
|
15
|
+
maxHeight?: string;
|
|
16
|
+
stripedRows?: boolean;
|
|
17
|
+
onSortingChange?: (state: SortingState) => void;
|
|
18
|
+
sorting?: SortingState;
|
|
19
|
+
manualSorting?: boolean;
|
|
20
|
+
getIsRowExpandable?: (row: T) => boolean;
|
|
21
|
+
renderExpandedRow?: (row: RowDefinition<T>) => ReactNode;
|
|
22
|
+
expandRowOnClick?: boolean;
|
|
23
|
+
expandedRowComponent?: ComponentType<TableExpandedRowProps<T>>;
|
|
24
|
+
pagination?: PaginationState;
|
|
25
|
+
defaultPagination?: PaginationState;
|
|
26
|
+
onPaginationChange?: (state: PaginationState) => void;
|
|
27
|
+
manualPagination?: boolean;
|
|
28
|
+
totalRowCount?: number;
|
|
29
|
+
pageSizes?: number[];
|
|
30
|
+
paginationEnabled?: boolean;
|
|
31
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("../../../node_modules/react/jsx-runtime.cjs");
|
|
4
|
+
const redisUiComponents = require("@redislabsdev/redis-ui-components");
|
|
5
|
+
const redisUiIcons = require("@redislabsdev/redis-ui-icons");
|
|
6
|
+
const ExpandRowButton = ({
|
|
7
|
+
row,
|
|
8
|
+
expandedIcon,
|
|
9
|
+
collapsedIcon,
|
|
10
|
+
...restProps
|
|
11
|
+
}) => row.getCanExpand() ? jsxRuntime.jsxRuntimeExports.jsx(redisUiComponents.IconButton, {
|
|
12
|
+
...restProps,
|
|
13
|
+
icon: row.getIsExpanded() ? expandedIcon ?? redisUiIcons.ChevronUpIcon : collapsedIcon ?? redisUiIcons.ChevronDownIcon,
|
|
14
|
+
onClick: (e) => {
|
|
15
|
+
var _a;
|
|
16
|
+
e.stopPropagation();
|
|
17
|
+
(_a = row.getToggleExpandedHandler()) == null ? void 0 : _a();
|
|
18
|
+
}
|
|
19
|
+
}) : null;
|
|
20
|
+
exports.ExpandRowButton = ExpandRowButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IconButtonProps } from '@redislabsdev/redis-ui-components';
|
|
2
|
+
import { Row } from '@tanstack/react-table';
|
|
3
|
+
export interface ExpandRowButtonProps extends Omit<IconButtonProps, 'icon' | 'onClick'> {
|
|
4
|
+
row: Pick<Row<unknown>, 'getCanExpand' | 'getIsExpanded' | 'getToggleExpandedHandler'>;
|
|
5
|
+
expandedIcon?: IconButtonProps['icon'];
|
|
6
|
+
collapsedIcon?: IconButtonProps['icon'];
|
|
7
|
+
}
|
|
8
|
+
export declare const ExpandRowButton: ({ row, expandedIcon, collapsedIcon, ...restProps }: ExpandRowButtonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { j as jsxRuntimeExports } from "../../../node_modules/react/jsx-runtime.js";
|
|
2
|
+
import { IconButton } from "@redislabsdev/redis-ui-components";
|
|
3
|
+
import { ChevronUpIcon, ChevronDownIcon } from "@redislabsdev/redis-ui-icons";
|
|
4
|
+
const ExpandRowButton = ({
|
|
5
|
+
row,
|
|
6
|
+
expandedIcon,
|
|
7
|
+
collapsedIcon,
|
|
8
|
+
...restProps
|
|
9
|
+
}) => row.getCanExpand() ? jsxRuntimeExports.jsx(IconButton, {
|
|
10
|
+
...restProps,
|
|
11
|
+
icon: row.getIsExpanded() ? expandedIcon ?? ChevronUpIcon : collapsedIcon ?? ChevronDownIcon,
|
|
12
|
+
onClick: (e) => {
|
|
13
|
+
var _a;
|
|
14
|
+
e.stopPropagation();
|
|
15
|
+
(_a = row.getToggleExpandedHandler()) == null ? void 0 : _a();
|
|
16
|
+
}
|
|
17
|
+
}) : null;
|
|
18
|
+
export {
|
|
19
|
+
ExpandRowButton
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const _styled = require("styled-components");
|
|
4
|
+
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
5
|
+
const _styled__default = /* @__PURE__ */ _interopDefault(_styled);
|
|
6
|
+
const ShowOnRowHover = _styled__default.default.div`
|
|
7
|
+
opacity: 0;
|
|
8
|
+
visibility: hidden;
|
|
9
|
+
transition: opacity 0.3s ease-in-out;
|
|
10
|
+
`;
|
|
11
|
+
exports.ShowOnRowHover = ShowOnRowHover;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ShowOnRowHover: import("styled-components").StyledComponent<"div", any, {}, never>;
|