@xyo-network/react-table 8.0.0 → 9.0.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/browser/index.mjs +1 -1
- package/dist/browser/index.mjs.map +7 -1
- package/package.json +23 -23
package/dist/browser/index.mjs
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/TableEx/TableCellEx.tsx", "../../src/components/TableEx/TableEx.tsx", "../../src/components/TableEx/TableFooterEx.tsx", "../../src/context/TableHeight/Context.ts", "../../src/context/TableHeight/Provider.tsx", "../../src/context/TableHeight/use.ts"],
|
|
4
|
+
"sourcesContent": ["import type { TableCellProps } from '@mui/material'\nimport { styled, TableCell } from '@mui/material'\nimport type React from 'react'\n\nexport interface TableCellExProps extends TableCellProps {\n noBgColor?: boolean\n}\n\nexport const TableCellEx: React.FC<TableCellExProps> = styled(TableCell, { name: 'TableCellNoBgColor', shouldForwardProp: prop => prop !== 'noBgColor' })<TableCellExProps>(\n ({ noBgColor = true }) => ({ ...(noBgColor && { backgroundColor: 'transparent' }) }),\n)\n", "import type { TableProps } from '@mui/material'\nimport { Table } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport type { TableExVariants } from './types/index.ts'\n\nexport interface TableExProps extends PropsWithChildren, TableProps {\n variant?: TableExVariants\n}\n\nconst TableExInner: React.FC<TableExProps> = ({ children, ...props }) => {\n return (\n <Table {...props}>\n {children}\n </Table>\n )\n}\n\nTableExInner.displayName = 'TableExInner'\n\nexport const TableExWithRef: React.FC<TableExProps> = ({\n variant, children, ...props\n}) => {\n return (\n <TableExInner stickyHeader={variant === 'scrollable'} {...props}>\n {children}\n </TableExInner>\n )\n}\n\nTableExWithRef.displayName = 'TableEx'\n\nexport const TableEx = TableExWithRef\n", "import type { TableFooterProps } from '@mui/material'\nimport { styled, TableFooter } from '@mui/material'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport type { TableExVariants } from './types/index.ts'\n\nconst TableFooterExRoot = styled(TableFooter, {\n name: 'TableFooterEx',\n shouldForwardProp: propName => propName !== 'scrollable',\n slot: 'Root',\n})<TableFooterExProps>(({ variant, theme }) => ({\n backgroundColor: theme.vars.palette.background.default,\n bottom: 'unset',\n position: 'relative',\n ...(variant === 'scrollable' && {\n bottom: 0,\n position: 'sticky',\n }),\n}))\n\nexport interface TableFooterExProps extends PropsWithChildren, TableFooterProps {\n variant?: TableExVariants\n}\n\nexport const TableFooterEx: React.FC<TableFooterExProps> = ({ children, ...props }) => <TableFooterExRoot {...props}>{children}</TableFooterExRoot>\n", "import { createContextEx } from '@xylabs/react-shared'\n\nimport type { TableHeightState } from './State.ts'\n\nexport const TableHeightContext = createContextEx<TableHeightState>()\n", "import { useResetState } from '@xylabs/react-hooks'\nimport type { ContextExProviderProps } from '@xylabs/react-shared'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo, useState } from 'react'\n\nimport { TableHeightContext } from './Context.ts'\nimport type { TableHeightState } from './State.ts'\n\nexport interface TableHeightProviderProps extends ContextExProviderProps, PropsWithChildren {\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] = useResetState(defaultVisibleRows)\n const [rowHeight, setRowHeight] = useState<number | undefined>()\n\n const height = useMemo(() => {\n if (rowHeight !== undefined && visibleRows !== undefined) {\n return rowHeight * (visibleRows + additionalRows)\n }\n }, [rowHeight, visibleRows, additionalRows])\n\n const formattedHeight = useMemo(() => (height === undefined ? undefined : `${height}${heightFormat}`), [height, heightFormat])\n\n const value: TableHeightState = useMemo(() => ({\n height: formattedHeight, provided: true as const, rowHeight, setRowHeight, setVisibleRows, visibleRows,\n }), [formattedHeight, rowHeight, setRowHeight, setVisibleRows, visibleRows])\n\n return (\n <TableHeightContext value={value}>\n {children}\n </TableHeightContext>\n )\n}\n", "import { useContextEx } from '@xylabs/react-shared'\n\nimport { TableHeightContext } from './Context.ts'\n\nexport const useTableHeight = (required = false) => useContextEx(TableHeightContext, 'TableHeight', required)\n"],
|
|
5
|
+
"mappings": ";AACA,SAAS,QAAQ,iBAAiB;AAO3B,IAAM,cAA0C,OAAO,WAAW,EAAE,MAAM,sBAAsB,mBAAmB,UAAQ,SAAS,YAAY,CAAC;AAAA,EACtJ,CAAC,EAAE,YAAY,KAAK,OAAO,EAAE,GAAI,aAAa,EAAE,iBAAiB,cAAc,EAAG;AACpF;;;ACTA,SAAS,aAAa;AAYlB;AAFJ,IAAM,eAAuC,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM;AACvE,SACE,oBAAC,SAAO,GAAG,OACR,UACH;AAEJ;AAEA,aAAa,cAAc;AAEpB,IAAM,iBAAyC,CAAC;AAAA,EACrD;AAAA,EAAS;AAAA,EAAU,GAAG;AACxB,MAAM;AACJ,SACE,oBAAC,gBAAa,cAAc,YAAY,cAAe,GAAG,OACvD,UACH;AAEJ;AAEA,eAAe,cAAc;AAEtB,IAAM,UAAU;;;AChCvB,SAAS,UAAAA,SAAQ,mBAAmB;AAwBmD,gBAAAC,YAAA;AAlBvF,IAAM,oBAAoBD,QAAO,aAAa;AAAA,EAC5C,MAAM;AAAA,EACN,mBAAmB,cAAY,aAAa;AAAA,EAC5C,MAAM;AACR,CAAC,EAAsB,CAAC,EAAE,SAAS,MAAM,OAAO;AAAA,EAC9C,iBAAiB,MAAM,KAAK,QAAQ,WAAW;AAAA,EAC/C,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,GAAI,YAAY,gBAAgB;AAAA,IAC9B,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AACF,EAAE;AAMK,IAAM,gBAA8C,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM,gBAAAC,KAAC,qBAAmB,GAAG,OAAQ,UAAS;;;ACzB/H,SAAS,uBAAuB;AAIzB,IAAM,qBAAqB,gBAAkC;;;ACJpE,SAAS,qBAAqB;AAG9B,SAAgB,SAAS,gBAAgB;AAkCrC,gBAAAC,YAAA;AAtBG,IAAM,sBAA0D,CAAC;AAAA,EACtE;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,CAAC,aAAa,cAAc,IAAI,cAAc,kBAAkB;AACtE,QAAM,CAAC,WAAW,YAAY,IAAI,SAA6B;AAE/D,QAAM,SAAS,QAAQ,MAAM;AAC3B,QAAI,cAAc,UAAa,gBAAgB,QAAW;AACxD,aAAO,aAAa,cAAc;AAAA,IACpC;AAAA,EACF,GAAG,CAAC,WAAW,aAAa,cAAc,CAAC;AAE3C,QAAM,kBAAkB,QAAQ,MAAO,WAAW,SAAY,SAAY,GAAG,MAAM,GAAG,YAAY,IAAK,CAAC,QAAQ,YAAY,CAAC;AAE7H,QAAM,QAA0B,QAAQ,OAAO;AAAA,IAC7C,QAAQ;AAAA,IAAiB,UAAU;AAAA,IAAe;AAAA,IAAW;AAAA,IAAc;AAAA,IAAgB;AAAA,EAC7F,IAAI,CAAC,iBAAiB,WAAW,cAAc,gBAAgB,WAAW,CAAC;AAE3E,SACE,gBAAAA,KAAC,sBAAmB,OACjB,UACH;AAEJ;;;ACzCA,SAAS,oBAAoB;AAItB,IAAM,iBAAiB,CAAC,WAAW,UAAU,aAAa,oBAAoB,eAAe,QAAQ;",
|
|
6
|
+
"names": ["styled", "jsx", "jsx"]
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-table",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -41,43 +41,43 @@
|
|
|
41
41
|
"README.md"
|
|
42
42
|
],
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@mui/material": "
|
|
44
|
+
"@mui/material": "^9.0.1",
|
|
45
45
|
"@opentelemetry/api": "^1.9.1",
|
|
46
46
|
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
47
|
-
"@storybook/react-vite": "~10.
|
|
48
|
-
"@types/react": "^19.2.
|
|
49
|
-
"@xylabs/react-hooks": "~
|
|
50
|
-
"@xylabs/react-shared": "~
|
|
51
|
-
"@xylabs/sdk-js": "^
|
|
52
|
-
"@xylabs/toolchain": "~
|
|
53
|
-
"@xylabs/tsconfig": "^
|
|
54
|
-
"@xylabs/tsconfig-dom": "^
|
|
55
|
-
"@xylabs/tsconfig-react": "~
|
|
56
|
-
"@xyo-network/boundwitness-model": "^
|
|
57
|
-
"@xyo-network/payload-model": "^
|
|
47
|
+
"@storybook/react-vite": "~10.4.0",
|
|
48
|
+
"@types/react": "^19.2.15",
|
|
49
|
+
"@xylabs/react-hooks": "~9.0.0",
|
|
50
|
+
"@xylabs/react-shared": "~9.0.0",
|
|
51
|
+
"@xylabs/sdk-js": "^6.0.2",
|
|
52
|
+
"@xylabs/toolchain": "~8.1.1",
|
|
53
|
+
"@xylabs/tsconfig": "^8.1.1",
|
|
54
|
+
"@xylabs/tsconfig-dom": "^8.1.1",
|
|
55
|
+
"@xylabs/tsconfig-react": "~8.1.1",
|
|
56
|
+
"@xyo-network/boundwitness-model": "^6.0.0",
|
|
57
|
+
"@xyo-network/payload-model": "^6.0.0",
|
|
58
58
|
"async-mutex": "^0.5.0",
|
|
59
59
|
"bn.js": "^5.2.3",
|
|
60
60
|
"buffer": "^6.0.3",
|
|
61
61
|
"chalk": "^5.6.2",
|
|
62
|
-
"eslint": "^10.
|
|
62
|
+
"eslint": "^10.4.0",
|
|
63
63
|
"ethers": "^6.16.0",
|
|
64
64
|
"pako": "^2.1.0",
|
|
65
65
|
"react": "^19.2.6",
|
|
66
66
|
"react-dom": "^19.2.6",
|
|
67
|
-
"react-router-dom": "^7.15.
|
|
68
|
-
"storybook": "^10.
|
|
69
|
-
"typescript": "^
|
|
70
|
-
"vite": "^8.0.
|
|
67
|
+
"react-router-dom": "^7.15.1",
|
|
68
|
+
"storybook": "^10.4.0",
|
|
69
|
+
"typescript": "^6.0.3",
|
|
70
|
+
"vite": "^8.0.13",
|
|
71
71
|
"zod": "^4.4.3",
|
|
72
|
-
"@xyo-network/react-storybook": "~
|
|
72
|
+
"@xyo-network/react-storybook": "~9.0.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@mui/material": "
|
|
75
|
+
"@mui/material": "^9.0",
|
|
76
76
|
"@opentelemetry/api": "^1.9",
|
|
77
77
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
78
|
-
"@xylabs/react-hooks": "~
|
|
79
|
-
"@xylabs/react-shared": "~
|
|
80
|
-
"@xylabs/sdk-js": "^
|
|
78
|
+
"@xylabs/react-hooks": "~9.0",
|
|
79
|
+
"@xylabs/react-shared": "~9.0",
|
|
80
|
+
"@xylabs/sdk-js": "^6.0",
|
|
81
81
|
"async-mutex": "^0.5",
|
|
82
82
|
"bn.js": "^5.2",
|
|
83
83
|
"buffer": "^6.0",
|