@xyo-network/react-table 2.64.0-rc.7 → 2.64.1
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/browser/components/TableEx/TableCellEx.cjs +32 -0
- package/dist/{node/components/TableEx/TableCellEx.mjs.map → browser/components/TableEx/TableCellEx.cjs.map} +1 -1
- package/dist/browser/components/TableEx/TableCellEx.d.cts +6 -0
- package/dist/browser/components/TableEx/TableCellEx.d.cts.map +1 -0
- package/dist/browser/components/TableEx/TableCellEx.js +2 -1
- package/dist/browser/components/TableEx/TableCellEx.js.map +1 -1
- package/dist/browser/components/TableEx/TableEx.cjs +39 -0
- package/dist/{node/components/TableEx/TableEx.mjs.map → browser/components/TableEx/TableEx.cjs.map} +1 -1
- package/dist/browser/components/TableEx/TableEx.d.cts +9 -0
- package/dist/browser/components/TableEx/TableEx.d.cts.map +1 -0
- package/dist/browser/components/TableEx/TableEx.js +5 -4
- package/dist/browser/components/TableEx/TableEx.js.map +1 -1
- package/dist/browser/components/TableEx/TableFooterEx.cjs +42 -0
- package/dist/{node/components/TableEx/TableFooterEx.mjs.map → browser/components/TableEx/TableFooterEx.cjs.map} +1 -1
- package/dist/browser/components/TableEx/TableFooterEx.d.cts +8 -0
- package/dist/browser/components/TableEx/TableFooterEx.d.cts.map +1 -0
- package/dist/browser/components/TableEx/TableFooterEx.js +4 -3
- package/dist/browser/components/TableEx/TableFooterEx.js.map +1 -1
- package/dist/browser/components/TableEx/index.cjs +69 -0
- package/dist/browser/components/TableEx/index.cjs.map +1 -0
- package/dist/browser/components/TableEx/index.d.cts +5 -0
- package/dist/browser/components/TableEx/index.d.cts.map +1 -0
- package/dist/browser/components/TableEx/index.js +45 -4
- package/dist/browser/components/TableEx/index.js.map +1 -1
- package/dist/browser/components/TableEx/types/TableExVariants.cjs +19 -0
- package/dist/browser/components/TableEx/types/TableExVariants.cjs.map +1 -0
- package/dist/browser/components/TableEx/types/TableExVariants.d.cts +2 -0
- package/dist/browser/components/TableEx/types/TableExVariants.d.cts.map +1 -0
- package/dist/browser/components/TableEx/types/index.cjs +19 -0
- package/dist/{node/components/TableEx/types/index.mjs.map → browser/components/TableEx/types/index.cjs.map} +1 -1
- package/dist/browser/components/TableEx/types/index.d.cts +2 -0
- package/dist/browser/components/TableEx/types/index.d.cts.map +1 -0
- package/dist/browser/components/TableEx/types/index.js +0 -1
- package/dist/browser/components/TableEx/types/index.js.map +1 -1
- package/dist/browser/components/index.cjs +69 -0
- package/dist/browser/components/index.cjs.map +1 -0
- package/dist/browser/components/index.d.cts +2 -0
- package/dist/browser/components/index.d.cts.map +1 -0
- package/dist/browser/components/index.js +45 -1
- package/dist/browser/components/index.js.map +1 -1
- package/dist/browser/context/TableHeight/Context.cjs +28 -0
- package/dist/{node/context/TableHeight/Context.mjs.map → browser/context/TableHeight/Context.cjs.map} +1 -1
- package/dist/browser/context/TableHeight/Context.d.cts +4 -0
- package/dist/browser/context/TableHeight/Context.d.cts.map +1 -0
- package/dist/browser/context/TableHeight/Context.js +2 -1
- package/dist/browser/context/TableHeight/Context.js.map +1 -1
- package/dist/browser/context/TableHeight/Provider.cjs +54 -0
- package/dist/browser/context/TableHeight/Provider.cjs.map +1 -0
- package/dist/browser/context/TableHeight/Provider.d.cts +11 -0
- package/dist/browser/context/TableHeight/Provider.d.cts.map +1 -0
- package/dist/browser/context/TableHeight/Provider.js +9 -3
- package/dist/browser/context/TableHeight/Provider.js.map +1 -1
- package/dist/browser/context/TableHeight/State.cjs +19 -0
- package/dist/browser/context/TableHeight/State.cjs.map +1 -0
- package/dist/browser/context/TableHeight/State.d.cts +10 -0
- package/dist/browser/context/TableHeight/State.d.cts.map +1 -0
- package/dist/browser/context/TableHeight/index.cjs +60 -0
- package/dist/browser/context/TableHeight/index.cjs.map +1 -0
- package/dist/browser/context/TableHeight/index.d.cts +5 -0
- package/dist/browser/context/TableHeight/index.d.cts.map +1 -0
- package/dist/browser/context/TableHeight/index.js +36 -4
- package/dist/browser/context/TableHeight/index.js.map +1 -1
- package/dist/browser/context/TableHeight/use.cjs +34 -0
- package/dist/browser/context/TableHeight/use.cjs.map +1 -0
- package/dist/browser/context/TableHeight/use.d.cts +2 -0
- package/dist/browser/context/TableHeight/use.d.cts.map +1 -0
- package/dist/browser/context/TableHeight/use.js +8 -2
- package/dist/browser/context/TableHeight/use.js.map +1 -1
- package/dist/browser/context/index.cjs +60 -0
- package/dist/browser/context/index.cjs.map +1 -0
- package/dist/browser/context/index.d.cts +2 -0
- package/dist/browser/context/index.d.cts.map +1 -0
- package/dist/browser/context/index.js +36 -1
- package/dist/browser/context/index.js.map +1 -1
- package/dist/browser/index.cjs +104 -0
- package/dist/browser/index.cjs.map +1 -0
- package/dist/browser/index.d.cts +3 -0
- package/dist/browser/index.d.cts.map +1 -0
- package/dist/browser/index.js +80 -2
- package/dist/browser/index.js.map +1 -1
- package/dist/docs.json +1442 -0
- package/dist/node/components/TableEx/TableCellEx.cjs +36 -0
- package/dist/node/components/TableEx/TableCellEx.cjs.map +1 -0
- package/dist/node/components/TableEx/TableCellEx.d.cts +6 -0
- package/dist/node/components/TableEx/TableCellEx.d.cts.map +1 -0
- package/dist/node/components/TableEx/TableCellEx.js +5 -28
- package/dist/node/components/TableEx/TableCellEx.js.map +1 -1
- package/dist/node/components/TableEx/TableEx.cjs +44 -0
- package/dist/node/components/TableEx/TableEx.cjs.map +1 -0
- package/dist/node/components/TableEx/TableEx.d.cts +9 -0
- package/dist/node/components/TableEx/TableEx.d.cts.map +1 -0
- package/dist/node/components/TableEx/TableEx.js +11 -35
- package/dist/node/components/TableEx/TableEx.js.map +1 -1
- package/dist/node/components/TableEx/TableFooterEx.cjs +46 -0
- package/dist/node/components/TableEx/TableFooterEx.cjs.map +1 -0
- package/dist/node/components/TableEx/TableFooterEx.d.cts +8 -0
- package/dist/node/components/TableEx/TableFooterEx.d.cts.map +1 -0
- package/dist/node/components/TableEx/TableFooterEx.js +7 -30
- package/dist/node/components/TableEx/TableFooterEx.js.map +1 -1
- package/dist/node/components/TableEx/index.cjs +76 -0
- package/dist/node/components/TableEx/index.cjs.map +1 -0
- package/dist/node/components/TableEx/index.d.cts +5 -0
- package/dist/node/components/TableEx/index.d.cts.map +1 -0
- package/dist/node/components/TableEx/index.js +43 -26
- package/dist/node/components/TableEx/index.js.map +1 -1
- package/dist/node/components/TableEx/types/TableExVariants.cjs +19 -0
- package/dist/node/components/TableEx/types/TableExVariants.cjs.map +1 -0
- package/dist/node/components/TableEx/types/TableExVariants.d.cts +2 -0
- package/dist/node/components/TableEx/types/TableExVariants.d.cts.map +1 -0
- package/dist/node/components/TableEx/types/TableExVariants.js +0 -16
- package/dist/node/components/TableEx/types/TableExVariants.js.map +1 -1
- package/dist/node/components/TableEx/types/index.cjs +19 -0
- package/dist/node/components/TableEx/types/index.cjs.map +1 -0
- package/dist/node/components/TableEx/types/index.d.cts +2 -0
- package/dist/node/components/TableEx/types/index.d.cts.map +1 -0
- package/dist/node/components/TableEx/types/index.js +0 -22
- package/dist/node/components/TableEx/types/index.js.map +1 -1
- package/dist/node/components/index.cjs +76 -0
- package/dist/node/components/index.cjs.map +1 -0
- package/dist/node/components/index.d.cts +2 -0
- package/dist/node/components/index.d.cts.map +1 -0
- package/dist/node/components/index.js +43 -20
- package/dist/node/components/index.js.map +1 -1
- package/dist/node/context/TableHeight/Context.cjs +32 -0
- package/dist/node/context/TableHeight/Context.cjs.map +1 -0
- package/dist/node/context/TableHeight/Context.d.cts +4 -0
- package/dist/node/context/TableHeight/Context.d.cts.map +1 -0
- package/dist/node/context/TableHeight/Context.js +5 -28
- package/dist/node/context/TableHeight/Context.js.map +1 -1
- package/dist/node/context/TableHeight/Provider.cjs +58 -0
- package/dist/node/context/TableHeight/Provider.cjs.map +1 -0
- package/dist/node/context/TableHeight/Provider.d.cts +11 -0
- package/dist/node/context/TableHeight/Provider.d.cts.map +1 -0
- package/dist/node/context/TableHeight/Provider.js +19 -37
- package/dist/node/context/TableHeight/Provider.js.map +1 -1
- package/dist/node/context/TableHeight/State.cjs +19 -0
- package/dist/node/context/TableHeight/State.cjs.map +1 -0
- package/dist/node/context/TableHeight/State.d.cts +10 -0
- package/dist/node/context/TableHeight/State.d.cts.map +1 -0
- package/dist/node/context/TableHeight/State.js +0 -16
- package/dist/node/context/TableHeight/State.js.map +1 -1
- package/dist/node/context/TableHeight/index.cjs +66 -0
- package/dist/node/context/TableHeight/index.cjs.map +1 -0
- package/dist/node/context/TableHeight/index.d.cts +5 -0
- package/dist/node/context/TableHeight/index.d.cts.map +1 -0
- package/dist/node/context/TableHeight/index.js +35 -27
- package/dist/node/context/TableHeight/index.js.map +1 -1
- package/dist/node/context/TableHeight/use.cjs +38 -0
- package/dist/node/context/TableHeight/use.cjs.map +1 -0
- package/dist/node/context/TableHeight/use.d.cts +2 -0
- package/dist/node/context/TableHeight/use.d.cts.map +1 -0
- package/dist/node/context/TableHeight/use.js +11 -29
- package/dist/node/context/TableHeight/use.js.map +1 -1
- package/dist/node/context/index.cjs +66 -0
- package/dist/node/context/index.cjs.map +1 -0
- package/dist/node/context/index.d.cts +2 -0
- package/dist/node/context/index.d.cts.map +1 -0
- package/dist/node/context/index.js +35 -21
- package/dist/node/context/index.js.map +1 -1
- package/dist/node/index.cjs +114 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +3 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.js +78 -22
- package/dist/node/index.js.map +1 -1
- package/package.json +16 -16
- package/dist/browser/components/TableEx/TableEx.stories.js +0 -72
- package/dist/browser/components/TableEx/TableEx.stories.js.map +0 -1
- package/dist/node/components/TableEx/TableCellEx.mjs +0 -10
- package/dist/node/components/TableEx/TableEx.mjs +0 -17
- package/dist/node/components/TableEx/TableEx.stories.js +0 -98
- package/dist/node/components/TableEx/TableEx.stories.js.map +0 -1
- package/dist/node/components/TableEx/TableEx.stories.mjs +0 -72
- package/dist/node/components/TableEx/TableEx.stories.mjs.map +0 -1
- package/dist/node/components/TableEx/TableFooterEx.mjs +0 -20
- package/dist/node/components/TableEx/index.mjs +0 -5
- package/dist/node/components/TableEx/index.mjs.map +0 -1
- package/dist/node/components/TableEx/types/TableExVariants.mjs +0 -1
- package/dist/node/components/TableEx/types/TableExVariants.mjs.map +0 -1
- package/dist/node/components/TableEx/types/index.mjs +0 -2
- package/dist/node/components/index.mjs +0 -2
- package/dist/node/components/index.mjs.map +0 -1
- package/dist/node/context/TableHeight/Context.mjs +0 -6
- package/dist/node/context/TableHeight/Provider.mjs +0 -27
- package/dist/node/context/TableHeight/Provider.mjs.map +0 -1
- package/dist/node/context/TableHeight/State.mjs +0 -1
- package/dist/node/context/TableHeight/State.mjs.map +0 -1
- package/dist/node/context/TableHeight/index.mjs +0 -5
- package/dist/node/context/TableHeight/index.mjs.map +0 -1
- package/dist/node/context/TableHeight/use.mjs +0 -7
- package/dist/node/context/TableHeight/use.mjs.map +0 -1
- package/dist/node/context/index.mjs +0 -2
- package/dist/node/context/index.mjs.map +0 -1
- package/dist/node/index.mjs +0 -3
- package/dist/node/index.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xylabs/react-shared": "^3.
|
|
14
|
-
"@xyo-network/react-shared": "~2.64.
|
|
13
|
+
"@xylabs/react-shared": "^3.0.6",
|
|
14
|
+
"@xyo-network/react-shared": "~2.64.1"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@storybook/react": "^7.4.
|
|
18
|
-
"@xylabs/ts-scripts-yarn3": "^3.0.
|
|
19
|
-
"@xylabs/tsconfig-react": "^3.0.
|
|
20
|
-
"@xyo-network/react-storybook": "~2.64.
|
|
17
|
+
"@storybook/react": "^7.4.5",
|
|
18
|
+
"@xylabs/ts-scripts-yarn3": "^3.0.79",
|
|
19
|
+
"@xylabs/tsconfig-react": "^3.0.79",
|
|
20
|
+
"@xyo-network/react-storybook": "~2.64.1",
|
|
21
21
|
"typescript": "^5.2.2"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
@@ -36,28 +36,28 @@
|
|
|
36
36
|
"node": {
|
|
37
37
|
"import": {
|
|
38
38
|
"types": "./dist/node/index.d.mts",
|
|
39
|
-
"default": "./dist/node/index.
|
|
39
|
+
"default": "./dist/node/index.js"
|
|
40
40
|
},
|
|
41
41
|
"require": {
|
|
42
|
-
"types": "./dist/node/index.d.
|
|
43
|
-
"default": "./dist/node/index.
|
|
42
|
+
"types": "./dist/node/index.d.cts",
|
|
43
|
+
"default": "./dist/node/index.cjs"
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"browser": {
|
|
47
47
|
"import": {
|
|
48
|
-
"types": "./dist/browser/index.d.
|
|
48
|
+
"types": "./dist/browser/index.d.mts",
|
|
49
49
|
"default": "./dist/browser/index.js"
|
|
50
50
|
},
|
|
51
51
|
"require": {
|
|
52
|
-
"types": "./dist/browser/index.d.
|
|
53
|
-
"default": "./dist/browser/index.
|
|
52
|
+
"types": "./dist/browser/index.d.cts",
|
|
53
|
+
"default": "./dist/browser/index.cjs"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
"default": "./dist/browser/index.
|
|
56
|
+
"default": "./dist/browser/index.js"
|
|
57
57
|
},
|
|
58
58
|
"./package.json": "./package.json"
|
|
59
59
|
},
|
|
60
|
-
"main": "dist/browser/index.
|
|
60
|
+
"main": "dist/browser/index.cjs",
|
|
61
61
|
"module": "dist/browser/index.js",
|
|
62
62
|
"homepage": "https://xyo.network",
|
|
63
63
|
"keywords": [
|
|
@@ -80,6 +80,6 @@
|
|
|
80
80
|
},
|
|
81
81
|
"sideEffects": false,
|
|
82
82
|
"types": "dist/browser/index.d.ts",
|
|
83
|
-
"version": "2.64.
|
|
84
|
-
"
|
|
83
|
+
"version": "2.64.1",
|
|
84
|
+
"type": "module"
|
|
85
85
|
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { TableBody, TableCell, TableHead, TablePagination, TableRow, useTheme } from "@mui/material";
|
|
3
|
-
import { WithRefDecorator } from "@xyo-network/react-storybook";
|
|
4
|
-
import { TableCellEx } from "./TableCellEx";
|
|
5
|
-
import { TableEx } from "./TableEx";
|
|
6
|
-
import { TableFooterEx } from "./TableFooterEx";
|
|
7
|
-
const ScrollableDecorator = (Story, args) => /* @__PURE__ */ jsx("div", { style: { height: "calc(100vh - 2rem)", inset: 0, position: "absolute" }, children: /* @__PURE__ */ jsx(Story, { ...args }) });
|
|
8
|
-
const StorybookEntry = {
|
|
9
|
-
argTypes: {},
|
|
10
|
-
component: TableEx,
|
|
11
|
-
parameters: {
|
|
12
|
-
docs: {
|
|
13
|
-
page: null
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
title: "shared/TableEx"
|
|
17
|
-
};
|
|
18
|
-
const Template = (args) => {
|
|
19
|
-
const { variant } = args;
|
|
20
|
-
const theme = useTheme();
|
|
21
|
-
const tableRows = [...Array(100).keys()];
|
|
22
|
-
return /* @__PURE__ */ jsxs(TableEx, { ...args, children: [
|
|
23
|
-
/* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
24
|
-
/* @__PURE__ */ jsx(TableCellEx, { children: "Heading 1" }),
|
|
25
|
-
/* @__PURE__ */ jsx(TableCellEx, { children: "Heading 2" })
|
|
26
|
-
] }) }),
|
|
27
|
-
/* @__PURE__ */ jsx(TableBody, { children: tableRows.map((row) => /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
28
|
-
/* @__PURE__ */ jsxs(TableCell, { children: [
|
|
29
|
-
"Row ",
|
|
30
|
-
row
|
|
31
|
-
] }),
|
|
32
|
-
/* @__PURE__ */ jsx(TableCell, { children: "Cell 2" })
|
|
33
|
-
] }, row)) }),
|
|
34
|
-
/* @__PURE__ */ jsx(TableFooterEx, { variant, children: /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(
|
|
35
|
-
TablePagination,
|
|
36
|
-
{
|
|
37
|
-
rowsPerPageOptions: [5, 10, 25, { label: "All", value: -1 }],
|
|
38
|
-
count: 25,
|
|
39
|
-
page: 1,
|
|
40
|
-
rowsPerPage: 5,
|
|
41
|
-
style: { borderTop: "1px solid", borderTopColor: theme.palette.divider },
|
|
42
|
-
SelectProps: {
|
|
43
|
-
inputProps: {
|
|
44
|
-
"aria-label": "rows per page"
|
|
45
|
-
},
|
|
46
|
-
native: true
|
|
47
|
-
},
|
|
48
|
-
onPageChange: () => {
|
|
49
|
-
return;
|
|
50
|
-
},
|
|
51
|
-
onRowsPerPageChange: () => {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
) }) })
|
|
56
|
-
] });
|
|
57
|
-
};
|
|
58
|
-
const Default = Template.bind({});
|
|
59
|
-
Default.args = {};
|
|
60
|
-
const WithRef = Template.bind({});
|
|
61
|
-
WithRef.decorators = [WithRefDecorator];
|
|
62
|
-
const WithScrollable = Template.bind({});
|
|
63
|
-
WithScrollable.args = { variant: "scrollable" };
|
|
64
|
-
WithScrollable.decorators = [ScrollableDecorator];
|
|
65
|
-
var TableEx_stories_default = StorybookEntry;
|
|
66
|
-
export {
|
|
67
|
-
Default,
|
|
68
|
-
WithRef,
|
|
69
|
-
WithScrollable,
|
|
70
|
-
TableEx_stories_default as default
|
|
71
|
-
};
|
|
72
|
-
//# sourceMappingURL=TableEx.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/TableEx/TableEx.stories.tsx"],"sourcesContent":["/* eslint-disable import/no-internal-modules */\nimport { TableBody, TableCell, TableHead, TablePagination, TableRow, useTheme } from '@mui/material'\nimport { Decorator, Meta, StoryFn } from '@storybook/react'\nimport { WithRefDecorator } from '@xyo-network/react-storybook'\n\nimport { TableCellEx } from './TableCellEx'\nimport { TableEx } from './TableEx'\nimport { TableFooterEx } from './TableFooterEx'\n\nconst ScrollableDecorator: Decorator = (Story, args) => (\n <div style={{ height: 'calc(100vh - 2rem)', inset: 0, position: 'absolute' }}>\n <Story {...args} />\n </div>\n)\n\nconst StorybookEntry = {\n argTypes: {},\n component: TableEx,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'shared/TableEx',\n} as Meta<typeof TableEx>\n\nconst Template: StoryFn<typeof TableEx> = (args) => {\n const { variant } = args\n const theme = useTheme()\n const tableRows = [...Array(100).keys()]\n\n return (\n <TableEx {...args}>\n <TableHead>\n <TableRow>\n <TableCellEx>Heading 1</TableCellEx>\n <TableCellEx>Heading 2</TableCellEx>\n </TableRow>\n </TableHead>\n <TableBody>\n {tableRows.map((row) => (\n <TableRow key={row}>\n <TableCell>Row {row}</TableCell>\n <TableCell>Cell 2</TableCell>\n </TableRow>\n ))}\n </TableBody>\n <TableFooterEx variant={variant}>\n <TableRow>\n <TablePagination\n rowsPerPageOptions={[5, 10, 25, { label: 'All', value: -1 }]}\n count={25}\n page={1}\n rowsPerPage={5}\n style={{ borderTop: '1px solid', borderTopColor: theme.palette.divider }}\n SelectProps={{\n inputProps: {\n 'aria-label': 'rows per page',\n },\n native: true,\n }}\n onPageChange={() => {\n return\n }}\n onRowsPerPageChange={() => {\n return\n }}\n />\n </TableRow>\n </TableFooterEx>\n </TableEx>\n )\n}\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nconst WithRef = Template.bind({})\nWithRef.decorators = [WithRefDecorator]\n\nconst WithScrollable = Template.bind({})\nWithScrollable.args = { variant: 'scrollable' }\nWithScrollable.decorators = [ScrollableDecorator]\n\nexport { Default, WithRef, WithScrollable }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAWI,cAuBI,YAvBJ;AAVJ,SAAS,WAAW,WAAW,WAAW,iBAAiB,UAAU,gBAAgB;AAErF,SAAS,wBAAwB;AAEjC,SAAS,mBAAmB;AAC5B,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAE9B,MAAM,sBAAiC,CAAC,OAAO,SAC7C,oBAAC,SAAI,OAAO,EAAE,QAAQ,sBAAsB,OAAO,GAAG,UAAU,WAAW,GACzE,8BAAC,SAAO,GAAG,MAAM,GACnB;AAGF,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAAoC,CAAC,SAAS;AAClD,QAAM,EAAE,QAAQ,IAAI;AACpB,QAAM,QAAQ,SAAS;AACvB,QAAM,YAAY,CAAC,GAAG,MAAM,GAAG,EAAE,KAAK,CAAC;AAEvC,SACE,qBAAC,WAAS,GAAG,MACX;AAAA,wBAAC,aACC,+BAAC,YACC;AAAA,0BAAC,eAAY,uBAAS;AAAA,MACtB,oBAAC,eAAY,uBAAS;AAAA,OACxB,GACF;AAAA,IACA,oBAAC,aACE,oBAAU,IAAI,CAAC,QACd,qBAAC,YACC;AAAA,2BAAC,aAAU;AAAA;AAAA,QAAK;AAAA,SAAI;AAAA,MACpB,oBAAC,aAAU,oBAAM;AAAA,SAFJ,GAGf,CACD,GACH;AAAA,IACA,oBAAC,iBAAc,SACb,8BAAC,YACC;AAAA,MAAC;AAAA;AAAA,QACC,oBAAoB,CAAC,GAAG,IAAI,IAAI,EAAE,OAAO,OAAO,OAAO,GAAG,CAAC;AAAA,QAC3D,OAAO;AAAA,QACP,MAAM;AAAA,QACN,aAAa;AAAA,QACb,OAAO,EAAE,WAAW,aAAa,gBAAgB,MAAM,QAAQ,QAAQ;AAAA,QACvE,aAAa;AAAA,UACX,YAAY;AAAA,YACV,cAAc;AAAA,UAChB;AAAA,UACA,QAAQ;AAAA,QACV;AAAA,QACA,cAAc,MAAM;AAClB;AAAA,QACF;AAAA,QACA,qBAAqB,MAAM;AACzB;AAAA,QACF;AAAA;AAAA,IACF,GACF,GACF;AAAA,KACF;AAEJ;AAEA,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAEhB,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,aAAa,CAAC,gBAAgB;AAEtC,MAAM,iBAAiB,SAAS,KAAK,CAAC,CAAC;AACvC,eAAe,OAAO,EAAE,SAAS,aAAa;AAC9C,eAAe,aAAa,CAAC,mBAAmB;AAKhD,IAAO,0BAAQ;","names":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { styled, TableCell } from "@mui/material";
|
|
2
|
-
const TableCellEx = styled(TableCell, { name: "TableCellNoBgColor", shouldForwardProp: (prop) => prop !== "noBgColor" })(
|
|
3
|
-
({ noBgColor = true }) => ({
|
|
4
|
-
...noBgColor && { backgroundColor: "transparent" }
|
|
5
|
-
})
|
|
6
|
-
);
|
|
7
|
-
export {
|
|
8
|
-
TableCellEx
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=TableCellEx.mjs.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Table } from "@mui/material";
|
|
3
|
-
import { forwardRef } from "react";
|
|
4
|
-
const TableExInner = forwardRef(({ children, ...props }, ref) => {
|
|
5
|
-
return /* @__PURE__ */ jsx(Table, { ref, ...props, children });
|
|
6
|
-
});
|
|
7
|
-
TableExInner.displayName = "TableExInner";
|
|
8
|
-
const TableExWithRef = forwardRef(({ variant, children, ...props }, ref) => {
|
|
9
|
-
return /* @__PURE__ */ jsx(TableExInner, { stickyHeader: variant === "scrollable", ref, ...props, children });
|
|
10
|
-
});
|
|
11
|
-
TableExWithRef.displayName = "TableEx";
|
|
12
|
-
const TableEx = TableExWithRef;
|
|
13
|
-
export {
|
|
14
|
-
TableEx,
|
|
15
|
-
TableExWithRef
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=TableEx.mjs.map
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var TableEx_stories_exports = {};
|
|
20
|
-
__export(TableEx_stories_exports, {
|
|
21
|
-
Default: () => Default,
|
|
22
|
-
WithRef: () => WithRef,
|
|
23
|
-
WithScrollable: () => WithScrollable,
|
|
24
|
-
default: () => TableEx_stories_default
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(TableEx_stories_exports);
|
|
27
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
|
-
var import_material = require("@mui/material");
|
|
29
|
-
var import_react_storybook = require("@xyo-network/react-storybook");
|
|
30
|
-
var import_TableCellEx = require("./TableCellEx");
|
|
31
|
-
var import_TableEx = require("./TableEx");
|
|
32
|
-
var import_TableFooterEx = require("./TableFooterEx");
|
|
33
|
-
const ScrollableDecorator = (Story, args) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { height: "calc(100vh - 2rem)", inset: 0, position: "absolute" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Story, { ...args }) });
|
|
34
|
-
const StorybookEntry = {
|
|
35
|
-
argTypes: {},
|
|
36
|
-
component: import_TableEx.TableEx,
|
|
37
|
-
parameters: {
|
|
38
|
-
docs: {
|
|
39
|
-
page: null
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
title: "shared/TableEx"
|
|
43
|
-
};
|
|
44
|
-
const Template = (args) => {
|
|
45
|
-
const { variant } = args;
|
|
46
|
-
const theme = (0, import_material.useTheme)();
|
|
47
|
-
const tableRows = [...Array(100).keys()];
|
|
48
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_TableEx.TableEx, { ...args, children: [
|
|
49
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.TableRow, { children: [
|
|
50
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TableCellEx.TableCellEx, { children: "Heading 1" }),
|
|
51
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TableCellEx.TableCellEx, { children: "Heading 2" })
|
|
52
|
-
] }) }),
|
|
53
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableBody, { children: tableRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.TableRow, { children: [
|
|
54
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.TableCell, { children: [
|
|
55
|
-
"Row ",
|
|
56
|
-
row
|
|
57
|
-
] }),
|
|
58
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { children: "Cell 2" })
|
|
59
|
-
] }, row)) }),
|
|
60
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_TableFooterEx.TableFooterEx, { variant, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
61
|
-
import_material.TablePagination,
|
|
62
|
-
{
|
|
63
|
-
rowsPerPageOptions: [5, 10, 25, { label: "All", value: -1 }],
|
|
64
|
-
count: 25,
|
|
65
|
-
page: 1,
|
|
66
|
-
rowsPerPage: 5,
|
|
67
|
-
style: { borderTop: "1px solid", borderTopColor: theme.palette.divider },
|
|
68
|
-
SelectProps: {
|
|
69
|
-
inputProps: {
|
|
70
|
-
"aria-label": "rows per page"
|
|
71
|
-
},
|
|
72
|
-
native: true
|
|
73
|
-
},
|
|
74
|
-
onPageChange: () => {
|
|
75
|
-
return;
|
|
76
|
-
},
|
|
77
|
-
onRowsPerPageChange: () => {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
) }) })
|
|
82
|
-
] });
|
|
83
|
-
};
|
|
84
|
-
const Default = Template.bind({});
|
|
85
|
-
Default.args = {};
|
|
86
|
-
const WithRef = Template.bind({});
|
|
87
|
-
WithRef.decorators = [import_react_storybook.WithRefDecorator];
|
|
88
|
-
const WithScrollable = Template.bind({});
|
|
89
|
-
WithScrollable.args = { variant: "scrollable" };
|
|
90
|
-
WithScrollable.decorators = [ScrollableDecorator];
|
|
91
|
-
var TableEx_stories_default = StorybookEntry;
|
|
92
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
93
|
-
0 && (module.exports = {
|
|
94
|
-
Default,
|
|
95
|
-
WithRef,
|
|
96
|
-
WithScrollable
|
|
97
|
-
});
|
|
98
|
-
//# sourceMappingURL=TableEx.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/TableEx/TableEx.stories.tsx"],"sourcesContent":["/* eslint-disable import/no-internal-modules */\nimport { TableBody, TableCell, TableHead, TablePagination, TableRow, useTheme } from '@mui/material'\nimport { Decorator, Meta, StoryFn } from '@storybook/react'\nimport { WithRefDecorator } from '@xyo-network/react-storybook'\n\nimport { TableCellEx } from './TableCellEx'\nimport { TableEx } from './TableEx'\nimport { TableFooterEx } from './TableFooterEx'\n\nconst ScrollableDecorator: Decorator = (Story, args) => (\n <div style={{ height: 'calc(100vh - 2rem)', inset: 0, position: 'absolute' }}>\n <Story {...args} />\n </div>\n)\n\nconst StorybookEntry = {\n argTypes: {},\n component: TableEx,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'shared/TableEx',\n} as Meta<typeof TableEx>\n\nconst Template: StoryFn<typeof TableEx> = (args) => {\n const { variant } = args\n const theme = useTheme()\n const tableRows = [...Array(100).keys()]\n\n return (\n <TableEx {...args}>\n <TableHead>\n <TableRow>\n <TableCellEx>Heading 1</TableCellEx>\n <TableCellEx>Heading 2</TableCellEx>\n </TableRow>\n </TableHead>\n <TableBody>\n {tableRows.map((row) => (\n <TableRow key={row}>\n <TableCell>Row {row}</TableCell>\n <TableCell>Cell 2</TableCell>\n </TableRow>\n ))}\n </TableBody>\n <TableFooterEx variant={variant}>\n <TableRow>\n <TablePagination\n rowsPerPageOptions={[5, 10, 25, { label: 'All', value: -1 }]}\n count={25}\n page={1}\n rowsPerPage={5}\n style={{ borderTop: '1px solid', borderTopColor: theme.palette.divider }}\n SelectProps={{\n inputProps: {\n 'aria-label': 'rows per page',\n },\n native: true,\n }}\n onPageChange={() => {\n return\n }}\n onRowsPerPageChange={() => {\n return\n }}\n />\n </TableRow>\n </TableFooterEx>\n </TableEx>\n )\n}\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nconst WithRef = Template.bind({})\nWithRef.decorators = [WithRefDecorator]\n\nconst WithScrollable = Template.bind({})\nWithScrollable.args = { variant: 'scrollable' }\nWithScrollable.decorators = [ScrollableDecorator]\n\nexport { Default, WithRef, WithScrollable }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWI;AAVJ,sBAAqF;AAErF,6BAAiC;AAEjC,yBAA4B;AAC5B,qBAAwB;AACxB,2BAA8B;AAE9B,MAAM,sBAAiC,CAAC,OAAO,SAC7C,4CAAC,SAAI,OAAO,EAAE,QAAQ,sBAAsB,OAAO,GAAG,UAAU,WAAW,GACzE,sDAAC,SAAO,GAAG,MAAM,GACnB;AAGF,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAAoC,CAAC,SAAS;AAClD,QAAM,EAAE,QAAQ,IAAI;AACpB,QAAM,YAAQ,0BAAS;AACvB,QAAM,YAAY,CAAC,GAAG,MAAM,GAAG,EAAE,KAAK,CAAC;AAEvC,SACE,6CAAC,0BAAS,GAAG,MACX;AAAA,gDAAC,6BACC,uDAAC,4BACC;AAAA,kDAAC,kCAAY,uBAAS;AAAA,MACtB,4CAAC,kCAAY,uBAAS;AAAA,OACxB,GACF;AAAA,IACA,4CAAC,6BACE,oBAAU,IAAI,CAAC,QACd,6CAAC,4BACC;AAAA,mDAAC,6BAAU;AAAA;AAAA,QAAK;AAAA,SAAI;AAAA,MACpB,4CAAC,6BAAU,oBAAM;AAAA,SAFJ,GAGf,CACD,GACH;AAAA,IACA,4CAAC,sCAAc,SACb,sDAAC,4BACC;AAAA,MAAC;AAAA;AAAA,QACC,oBAAoB,CAAC,GAAG,IAAI,IAAI,EAAE,OAAO,OAAO,OAAO,GAAG,CAAC;AAAA,QAC3D,OAAO;AAAA,QACP,MAAM;AAAA,QACN,aAAa;AAAA,QACb,OAAO,EAAE,WAAW,aAAa,gBAAgB,MAAM,QAAQ,QAAQ;AAAA,QACvE,aAAa;AAAA,UACX,YAAY;AAAA,YACV,cAAc;AAAA,UAChB;AAAA,UACA,QAAQ;AAAA,QACV;AAAA,QACA,cAAc,MAAM;AAClB;AAAA,QACF;AAAA,QACA,qBAAqB,MAAM;AACzB;AAAA,QACF;AAAA;AAAA,IACF,GACF,GACF;AAAA,KACF;AAEJ;AAEA,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAEhB,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,aAAa,CAAC,uCAAgB;AAEtC,MAAM,iBAAiB,SAAS,KAAK,CAAC,CAAC;AACvC,eAAe,OAAO,EAAE,SAAS,aAAa;AAC9C,eAAe,aAAa,CAAC,mBAAmB;AAKhD,IAAO,0BAAQ;","names":[]}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { TableBody, TableCell, TableHead, TablePagination, TableRow, useTheme } from "@mui/material";
|
|
3
|
-
import { WithRefDecorator } from "@xyo-network/react-storybook";
|
|
4
|
-
import { TableCellEx } from "./TableCellEx";
|
|
5
|
-
import { TableEx } from "./TableEx";
|
|
6
|
-
import { TableFooterEx } from "./TableFooterEx";
|
|
7
|
-
const ScrollableDecorator = (Story, args) => /* @__PURE__ */ jsx("div", { style: { height: "calc(100vh - 2rem)", inset: 0, position: "absolute" }, children: /* @__PURE__ */ jsx(Story, { ...args }) });
|
|
8
|
-
const StorybookEntry = {
|
|
9
|
-
argTypes: {},
|
|
10
|
-
component: TableEx,
|
|
11
|
-
parameters: {
|
|
12
|
-
docs: {
|
|
13
|
-
page: null
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
title: "shared/TableEx"
|
|
17
|
-
};
|
|
18
|
-
const Template = (args) => {
|
|
19
|
-
const { variant } = args;
|
|
20
|
-
const theme = useTheme();
|
|
21
|
-
const tableRows = [...Array(100).keys()];
|
|
22
|
-
return /* @__PURE__ */ jsxs(TableEx, { ...args, children: [
|
|
23
|
-
/* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
24
|
-
/* @__PURE__ */ jsx(TableCellEx, { children: "Heading 1" }),
|
|
25
|
-
/* @__PURE__ */ jsx(TableCellEx, { children: "Heading 2" })
|
|
26
|
-
] }) }),
|
|
27
|
-
/* @__PURE__ */ jsx(TableBody, { children: tableRows.map((row) => /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
28
|
-
/* @__PURE__ */ jsxs(TableCell, { children: [
|
|
29
|
-
"Row ",
|
|
30
|
-
row
|
|
31
|
-
] }),
|
|
32
|
-
/* @__PURE__ */ jsx(TableCell, { children: "Cell 2" })
|
|
33
|
-
] }, row)) }),
|
|
34
|
-
/* @__PURE__ */ jsx(TableFooterEx, { variant, children: /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(
|
|
35
|
-
TablePagination,
|
|
36
|
-
{
|
|
37
|
-
rowsPerPageOptions: [5, 10, 25, { label: "All", value: -1 }],
|
|
38
|
-
count: 25,
|
|
39
|
-
page: 1,
|
|
40
|
-
rowsPerPage: 5,
|
|
41
|
-
style: { borderTop: "1px solid", borderTopColor: theme.palette.divider },
|
|
42
|
-
SelectProps: {
|
|
43
|
-
inputProps: {
|
|
44
|
-
"aria-label": "rows per page"
|
|
45
|
-
},
|
|
46
|
-
native: true
|
|
47
|
-
},
|
|
48
|
-
onPageChange: () => {
|
|
49
|
-
return;
|
|
50
|
-
},
|
|
51
|
-
onRowsPerPageChange: () => {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
) }) })
|
|
56
|
-
] });
|
|
57
|
-
};
|
|
58
|
-
const Default = Template.bind({});
|
|
59
|
-
Default.args = {};
|
|
60
|
-
const WithRef = Template.bind({});
|
|
61
|
-
WithRef.decorators = [WithRefDecorator];
|
|
62
|
-
const WithScrollable = Template.bind({});
|
|
63
|
-
WithScrollable.args = { variant: "scrollable" };
|
|
64
|
-
WithScrollable.decorators = [ScrollableDecorator];
|
|
65
|
-
var TableEx_stories_default = StorybookEntry;
|
|
66
|
-
export {
|
|
67
|
-
Default,
|
|
68
|
-
WithRef,
|
|
69
|
-
WithScrollable,
|
|
70
|
-
TableEx_stories_default as default
|
|
71
|
-
};
|
|
72
|
-
//# sourceMappingURL=TableEx.stories.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/TableEx/TableEx.stories.tsx"],"sourcesContent":["/* eslint-disable import/no-internal-modules */\nimport { TableBody, TableCell, TableHead, TablePagination, TableRow, useTheme } from '@mui/material'\nimport { Decorator, Meta, StoryFn } from '@storybook/react'\nimport { WithRefDecorator } from '@xyo-network/react-storybook'\n\nimport { TableCellEx } from './TableCellEx'\nimport { TableEx } from './TableEx'\nimport { TableFooterEx } from './TableFooterEx'\n\nconst ScrollableDecorator: Decorator = (Story, args) => (\n <div style={{ height: 'calc(100vh - 2rem)', inset: 0, position: 'absolute' }}>\n <Story {...args} />\n </div>\n)\n\nconst StorybookEntry = {\n argTypes: {},\n component: TableEx,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'shared/TableEx',\n} as Meta<typeof TableEx>\n\nconst Template: StoryFn<typeof TableEx> = (args) => {\n const { variant } = args\n const theme = useTheme()\n const tableRows = [...Array(100).keys()]\n\n return (\n <TableEx {...args}>\n <TableHead>\n <TableRow>\n <TableCellEx>Heading 1</TableCellEx>\n <TableCellEx>Heading 2</TableCellEx>\n </TableRow>\n </TableHead>\n <TableBody>\n {tableRows.map((row) => (\n <TableRow key={row}>\n <TableCell>Row {row}</TableCell>\n <TableCell>Cell 2</TableCell>\n </TableRow>\n ))}\n </TableBody>\n <TableFooterEx variant={variant}>\n <TableRow>\n <TablePagination\n rowsPerPageOptions={[5, 10, 25, { label: 'All', value: -1 }]}\n count={25}\n page={1}\n rowsPerPage={5}\n style={{ borderTop: '1px solid', borderTopColor: theme.palette.divider }}\n SelectProps={{\n inputProps: {\n 'aria-label': 'rows per page',\n },\n native: true,\n }}\n onPageChange={() => {\n return\n }}\n onRowsPerPageChange={() => {\n return\n }}\n />\n </TableRow>\n </TableFooterEx>\n </TableEx>\n )\n}\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nconst WithRef = Template.bind({})\nWithRef.decorators = [WithRefDecorator]\n\nconst WithScrollable = Template.bind({})\nWithScrollable.args = { variant: 'scrollable' }\nWithScrollable.decorators = [ScrollableDecorator]\n\nexport { Default, WithRef, WithScrollable }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAWI,cAuBI,YAvBJ;AAVJ,SAAS,WAAW,WAAW,WAAW,iBAAiB,UAAU,gBAAgB;AAErF,SAAS,wBAAwB;AAEjC,SAAS,mBAAmB;AAC5B,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAE9B,MAAM,sBAAiC,CAAC,OAAO,SAC7C,oBAAC,SAAI,OAAO,EAAE,QAAQ,sBAAsB,OAAO,GAAG,UAAU,WAAW,GACzE,8BAAC,SAAO,GAAG,MAAM,GACnB;AAGF,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAAoC,CAAC,SAAS;AAClD,QAAM,EAAE,QAAQ,IAAI;AACpB,QAAM,QAAQ,SAAS;AACvB,QAAM,YAAY,CAAC,GAAG,MAAM,GAAG,EAAE,KAAK,CAAC;AAEvC,SACE,qBAAC,WAAS,GAAG,MACX;AAAA,wBAAC,aACC,+BAAC,YACC;AAAA,0BAAC,eAAY,uBAAS;AAAA,MACtB,oBAAC,eAAY,uBAAS;AAAA,OACxB,GACF;AAAA,IACA,oBAAC,aACE,oBAAU,IAAI,CAAC,QACd,qBAAC,YACC;AAAA,2BAAC,aAAU;AAAA;AAAA,QAAK;AAAA,SAAI;AAAA,MACpB,oBAAC,aAAU,oBAAM;AAAA,SAFJ,GAGf,CACD,GACH;AAAA,IACA,oBAAC,iBAAc,SACb,8BAAC,YACC;AAAA,MAAC;AAAA;AAAA,QACC,oBAAoB,CAAC,GAAG,IAAI,IAAI,EAAE,OAAO,OAAO,OAAO,GAAG,CAAC;AAAA,QAC3D,OAAO;AAAA,QACP,MAAM;AAAA,QACN,aAAa;AAAA,QACb,OAAO,EAAE,WAAW,aAAa,gBAAgB,MAAM,QAAQ,QAAQ;AAAA,QACvE,aAAa;AAAA,UACX,YAAY;AAAA,YACV,cAAc;AAAA,UAChB;AAAA,UACA,QAAQ;AAAA,QACV;AAAA,QACA,cAAc,MAAM;AAClB;AAAA,QACF;AAAA,QACA,qBAAqB,MAAM;AACzB;AAAA,QACF;AAAA;AAAA,IACF,GACF,GACF;AAAA,KACF;AAEJ;AAEA,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAEhB,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,aAAa,CAAC,gBAAgB;AAEtC,MAAM,iBAAiB,SAAS,KAAK,CAAC,CAAC;AACvC,eAAe,OAAO,EAAE,SAAS,aAAa;AAC9C,eAAe,aAAa,CAAC,mBAAmB;AAKhD,IAAO,0BAAQ;","names":[]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { styled, TableFooter } from "@mui/material";
|
|
3
|
-
const TableFooterExRoot = styled(TableFooter, {
|
|
4
|
-
name: "TableFooterEx",
|
|
5
|
-
shouldForwardProp: (propName) => propName !== "scrollable",
|
|
6
|
-
slot: "Root"
|
|
7
|
-
})(({ variant, theme }) => ({
|
|
8
|
-
backgroundColor: theme.palette.background.default,
|
|
9
|
-
bottom: "unset",
|
|
10
|
-
position: "relative",
|
|
11
|
-
...variant === "scrollable" && {
|
|
12
|
-
bottom: 0,
|
|
13
|
-
position: "sticky"
|
|
14
|
-
}
|
|
15
|
-
}));
|
|
16
|
-
const TableFooterEx = ({ children, ...props }) => /* @__PURE__ */ jsx(TableFooterExRoot, { ...props, children });
|
|
17
|
-
export {
|
|
18
|
-
TableFooterEx
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=TableFooterEx.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/TableEx/index.ts"],"sourcesContent":["export * from './TableCellEx'\nexport * from './TableEx'\nexport * from './TableFooterEx'\nexport * from './types'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=TableExVariants.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './TableEx'\n"],"mappings":"AAAA,cAAc;","names":[]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useMemo, useState } from "react";
|
|
3
|
-
import { TableHeightContext } from "./Context";
|
|
4
|
-
const TableHeightProvider = ({
|
|
5
|
-
children,
|
|
6
|
-
additionalRows = 0,
|
|
7
|
-
defaultVisibleRows,
|
|
8
|
-
heightFormat = "px"
|
|
9
|
-
}) => {
|
|
10
|
-
const [visibleRows, setVisibleRows] = useState(defaultVisibleRows);
|
|
11
|
-
const [height, setHeight] = useState();
|
|
12
|
-
const [rowHeight, setRowHeight] = useState();
|
|
13
|
-
const formattedHeight = useMemo(() => height !== void 0 ? `${height}${heightFormat}` : void 0, [height, heightFormat]);
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
setVisibleRows(defaultVisibleRows);
|
|
16
|
-
}, [defaultVisibleRows]);
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
if (rowHeight !== void 0 && visibleRows !== void 0) {
|
|
19
|
-
setHeight(rowHeight * (visibleRows + additionalRows));
|
|
20
|
-
}
|
|
21
|
-
}, [defaultVisibleRows, rowHeight, visibleRows, additionalRows]);
|
|
22
|
-
return /* @__PURE__ */ jsx(TableHeightContext.Provider, { value: { height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows }, children });
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
TableHeightProvider
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=Provider.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/TableHeight/Provider.tsx"],"sourcesContent":["import { WithChildren } from '@xylabs/react-shared'\nimport { ContextExProviderProps } from '@xyo-network/react-shared'\nimport { useEffect, useMemo, useState } from 'react'\n\nimport { TableHeightContext } from './Context'\n\nexport interface TableHeightProviderProps extends ContextExProviderProps, WithChildren {\n /** @field Account for optional header and footer rows */\n additionalRows?: number\n defaultVisibleRows?: number\n heightFormat?: string\n}\n\nexport const TableHeightProvider: React.FC<TableHeightProviderProps> = ({\n children,\n additionalRows = 0,\n defaultVisibleRows,\n heightFormat = 'px',\n}) => {\n const [visibleRows, setVisibleRows] = useState(defaultVisibleRows)\n const [height, setHeight] = useState<number | undefined>()\n const [rowHeight, setRowHeight] = useState<number | undefined>()\n\n const formattedHeight = useMemo(() => (height !== undefined ? `${height}${heightFormat}` : undefined), [height, heightFormat])\n\n useEffect(() => {\n setVisibleRows(defaultVisibleRows)\n }, [defaultVisibleRows])\n\n useEffect(() => {\n if (rowHeight !== undefined && visibleRows !== undefined) {\n setHeight(rowHeight * (visibleRows + additionalRows))\n }\n }, [defaultVisibleRows, rowHeight, visibleRows, additionalRows])\n\n return (\n <TableHeightContext.Provider value={{ height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows }}>\n {children}\n </TableHeightContext.Provider>\n )\n}\n"],"mappings":"AAoCI;AAlCJ,SAAS,WAAW,SAAS,gBAAgB;AAE7C,SAAS,0BAA0B;AAS5B,MAAM,sBAA0D,CAAC;AAAA,EACtE;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,kBAAkB;AACjE,QAAM,CAAC,QAAQ,SAAS,IAAI,SAA6B;AACzD,QAAM,CAAC,WAAW,YAAY,IAAI,SAA6B;AAE/D,QAAM,kBAAkB,QAAQ,MAAO,WAAW,SAAY,GAAG,MAAM,GAAG,YAAY,KAAK,QAAY,CAAC,QAAQ,YAAY,CAAC;AAE7H,YAAU,MAAM;AACd,mBAAe,kBAAkB;AAAA,EACnC,GAAG,CAAC,kBAAkB,CAAC;AAEvB,YAAU,MAAM;AACd,QAAI,cAAc,UAAa,gBAAgB,QAAW;AACxD,gBAAU,aAAa,cAAc,eAAe;AAAA,IACtD;AAAA,EACF,GAAG,CAAC,oBAAoB,WAAW,aAAa,cAAc,CAAC;AAE/D,SACE,oBAAC,mBAAmB,UAAnB,EAA4B,OAAO,EAAE,QAAQ,iBAAiB,UAAU,MAAM,WAAW,cAAc,gBAAgB,YAAY,GACjI,UACH;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=State.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/TableHeight/index.ts"],"sourcesContent":["export * from './Context'\nexport * from './Provider'\nexport * from './State'\nexport * from './use'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { useContextEx } from "@xyo-network/react-shared";
|
|
2
|
-
import { TableHeightContext } from "./Context";
|
|
3
|
-
const useTableHeight = (required = false) => useContextEx(TableHeightContext, "TableHeight", required);
|
|
4
|
-
export {
|
|
5
|
-
useTableHeight
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=use.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/TableHeight/use.tsx"],"sourcesContent":["import { useContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightContext } from './Context'\n\nexport const useTableHeight = (required = false) => useContextEx(TableHeightContext, 'TableHeight', required)\n"],"mappings":"AAAA,SAAS,oBAAoB;AAE7B,SAAS,0BAA0B;AAE5B,MAAM,iBAAiB,CAAC,WAAW,UAAU,aAAa,oBAAoB,eAAe,QAAQ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/context/index.ts"],"sourcesContent":["export * from './TableHeight'\n"],"mappings":"AAAA,cAAc;","names":[]}
|
package/dist/node/index.mjs
DELETED
package/dist/node/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './components'\nexport * from './context'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
|