@xyo-network/react-table 2.62.3 → 2.63.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.
Files changed (132) hide show
  1. package/dist/cjs/components/TableEx/TableCellEx.js +6 -0
  2. package/dist/cjs/components/TableEx/TableCellEx.js.map +1 -0
  3. package/dist/cjs/components/TableEx/TableEx.js +19 -0
  4. package/dist/cjs/components/TableEx/TableEx.js.map +1 -0
  5. package/dist/cjs/components/TableEx/TableFooterEx.js +20 -0
  6. package/dist/cjs/components/TableEx/TableFooterEx.js.map +1 -0
  7. package/dist/cjs/components/TableEx/index.js +8 -0
  8. package/dist/cjs/components/TableEx/index.js.map +1 -0
  9. package/dist/cjs/components/TableEx/types/TableExVariants.js +3 -0
  10. package/dist/cjs/components/TableEx/types/TableExVariants.js.map +1 -0
  11. package/dist/cjs/components/TableEx/types/index.js +5 -0
  12. package/dist/cjs/components/TableEx/types/index.js.map +1 -0
  13. package/dist/cjs/components/index.js +5 -0
  14. package/dist/cjs/components/index.js.map +1 -0
  15. package/dist/cjs/context/TableHeight/Context.js +6 -0
  16. package/dist/cjs/context/TableHeight/Context.js.map +1 -0
  17. package/dist/cjs/context/TableHeight/Provider.js +23 -0
  18. package/dist/cjs/context/TableHeight/Provider.js.map +1 -0
  19. package/dist/cjs/context/TableHeight/State.js +3 -0
  20. package/dist/cjs/context/TableHeight/State.js.map +1 -0
  21. package/dist/cjs/context/TableHeight/index.js +8 -0
  22. package/dist/cjs/context/TableHeight/index.js.map +1 -0
  23. package/dist/cjs/context/TableHeight/use.js +8 -0
  24. package/dist/cjs/context/TableHeight/use.js.map +1 -0
  25. package/dist/cjs/context/index.js +5 -0
  26. package/dist/cjs/context/index.js.map +1 -0
  27. package/dist/cjs/index.js +6 -0
  28. package/dist/cjs/index.js.map +1 -0
  29. package/dist/docs.json +27 -27
  30. package/dist/esm/components/TableEx/TableCellEx.js +5 -0
  31. package/dist/esm/components/TableEx/TableCellEx.js.map +1 -0
  32. package/dist/esm/components/TableEx/TableEx.js +13 -0
  33. package/dist/esm/components/TableEx/TableEx.js.map +1 -0
  34. package/dist/esm/components/TableEx/TableFooterEx.js +17 -0
  35. package/dist/esm/components/TableEx/TableFooterEx.js.map +1 -0
  36. package/dist/{components/TableEx/index.d.mts → esm/components/TableEx/index.js} +1 -1
  37. package/dist/esm/components/TableEx/index.js.map +1 -0
  38. package/dist/esm/components/TableEx/types/TableExVariants.js +2 -0
  39. package/dist/esm/components/TableEx/types/TableExVariants.js.map +1 -0
  40. package/dist/{components/TableEx/types/index.d.mts → esm/components/TableEx/types/index.js} +1 -1
  41. package/dist/esm/components/TableEx/types/index.js.map +1 -0
  42. package/dist/esm/components/index.js +2 -0
  43. package/dist/esm/components/index.js.map +1 -0
  44. package/dist/esm/context/TableHeight/Context.js +3 -0
  45. package/dist/esm/context/TableHeight/Context.js.map +1 -0
  46. package/dist/esm/context/TableHeight/Provider.js +19 -0
  47. package/dist/esm/context/TableHeight/Provider.js.map +1 -0
  48. package/dist/esm/context/TableHeight/State.js +2 -0
  49. package/dist/esm/context/TableHeight/State.js.map +1 -0
  50. package/dist/{context/TableHeight/index.d.mts → esm/context/TableHeight/index.js} +1 -1
  51. package/dist/esm/context/TableHeight/index.js.map +1 -0
  52. package/dist/esm/context/TableHeight/use.js +4 -0
  53. package/dist/esm/context/TableHeight/use.js.map +1 -0
  54. package/dist/esm/context/index.js +2 -0
  55. package/dist/esm/context/index.js.map +1 -0
  56. package/dist/{index.d.mts → esm/index.js} +1 -1
  57. package/dist/esm/index.js.map +1 -0
  58. package/dist/types/components/TableEx/TableCellEx.d.ts.map +1 -0
  59. package/dist/types/components/TableEx/TableEx.d.ts.map +1 -0
  60. package/dist/types/components/TableEx/TableFooterEx.d.ts.map +1 -0
  61. package/dist/types/components/TableEx/index.d.ts.map +1 -0
  62. package/dist/types/components/TableEx/types/TableExVariants.d.ts.map +1 -0
  63. package/dist/types/components/TableEx/types/index.d.ts.map +1 -0
  64. package/dist/types/components/index.d.ts.map +1 -0
  65. package/dist/types/context/TableHeight/Context.d.ts.map +1 -0
  66. package/dist/types/context/TableHeight/Provider.d.ts.map +1 -0
  67. package/dist/types/context/TableHeight/State.d.ts.map +1 -0
  68. package/dist/types/context/TableHeight/index.d.ts.map +1 -0
  69. package/dist/types/context/TableHeight/use.d.ts.map +1 -0
  70. package/dist/types/context/index.d.ts.map +1 -0
  71. package/dist/types/index.d.ts.map +1 -0
  72. package/package.json +18 -26
  73. package/dist/components/TableEx/TableCellEx.d.mts +0 -6
  74. package/dist/components/TableEx/TableCellEx.d.mts.map +0 -1
  75. package/dist/components/TableEx/TableCellEx.d.ts.map +0 -1
  76. package/dist/components/TableEx/TableEx.d.mts +0 -9
  77. package/dist/components/TableEx/TableEx.d.mts.map +0 -1
  78. package/dist/components/TableEx/TableEx.d.ts.map +0 -1
  79. package/dist/components/TableEx/TableEx.stories.d.mts +0 -7
  80. package/dist/components/TableEx/TableEx.stories.d.mts.map +0 -1
  81. package/dist/components/TableEx/TableEx.stories.d.ts +0 -7
  82. package/dist/components/TableEx/TableEx.stories.d.ts.map +0 -1
  83. package/dist/components/TableEx/TableFooterEx.d.mts +0 -8
  84. package/dist/components/TableEx/TableFooterEx.d.mts.map +0 -1
  85. package/dist/components/TableEx/TableFooterEx.d.ts.map +0 -1
  86. package/dist/components/TableEx/index.d.mts.map +0 -1
  87. package/dist/components/TableEx/index.d.ts.map +0 -1
  88. package/dist/components/TableEx/types/TableExVariants.d.mts +0 -2
  89. package/dist/components/TableEx/types/TableExVariants.d.mts.map +0 -1
  90. package/dist/components/TableEx/types/TableExVariants.d.ts.map +0 -1
  91. package/dist/components/TableEx/types/index.d.mts.map +0 -1
  92. package/dist/components/TableEx/types/index.d.ts.map +0 -1
  93. package/dist/components/index.d.mts +0 -2
  94. package/dist/components/index.d.mts.map +0 -1
  95. package/dist/components/index.d.ts.map +0 -1
  96. package/dist/context/TableHeight/Context.d.mts +0 -4
  97. package/dist/context/TableHeight/Context.d.mts.map +0 -1
  98. package/dist/context/TableHeight/Context.d.ts.map +0 -1
  99. package/dist/context/TableHeight/Provider.d.mts +0 -11
  100. package/dist/context/TableHeight/Provider.d.mts.map +0 -1
  101. package/dist/context/TableHeight/Provider.d.ts.map +0 -1
  102. package/dist/context/TableHeight/State.d.mts +0 -10
  103. package/dist/context/TableHeight/State.d.mts.map +0 -1
  104. package/dist/context/TableHeight/State.d.ts.map +0 -1
  105. package/dist/context/TableHeight/index.d.mts.map +0 -1
  106. package/dist/context/TableHeight/index.d.ts.map +0 -1
  107. package/dist/context/TableHeight/use.d.mts +0 -2
  108. package/dist/context/TableHeight/use.d.mts.map +0 -1
  109. package/dist/context/TableHeight/use.d.ts.map +0 -1
  110. package/dist/context/index.d.mts +0 -2
  111. package/dist/context/index.d.mts.map +0 -1
  112. package/dist/context/index.d.ts.map +0 -1
  113. package/dist/index.d.mts.map +0 -1
  114. package/dist/index.d.ts.map +0 -1
  115. package/dist/index.js +0 -114
  116. package/dist/index.js.map +0 -1
  117. package/dist/index.mjs +0 -81
  118. package/dist/index.mjs.map +0 -1
  119. /package/dist/{components → types/components}/TableEx/TableCellEx.d.ts +0 -0
  120. /package/dist/{components → types/components}/TableEx/TableEx.d.ts +0 -0
  121. /package/dist/{components → types/components}/TableEx/TableFooterEx.d.ts +0 -0
  122. /package/dist/{components → types/components}/TableEx/index.d.ts +0 -0
  123. /package/dist/{components → types/components}/TableEx/types/TableExVariants.d.ts +0 -0
  124. /package/dist/{components → types/components}/TableEx/types/index.d.ts +0 -0
  125. /package/dist/{components → types/components}/index.d.ts +0 -0
  126. /package/dist/{context → types/context}/TableHeight/Context.d.ts +0 -0
  127. /package/dist/{context → types/context}/TableHeight/Provider.d.ts +0 -0
  128. /package/dist/{context → types/context}/TableHeight/State.d.ts +0 -0
  129. /package/dist/{context → types/context}/TableHeight/index.d.ts +0 -0
  130. /package/dist/{context → types/context}/TableHeight/use.d.ts +0 -0
  131. /package/dist/{context → types/context}/index.d.ts +0 -0
  132. /package/dist/{index.d.ts → types/index.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
@@ -1,3 +1,3 @@
1
1
  export * from './components';
2
2
  export * from './context';
3
- //# sourceMappingURL=index.d.ts.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCellEx.d.ts","sourceRoot":"","sources":["../../../../src/components/TableEx/TableCellEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,cAAc,EAAE,MAAM,eAAe,CAAA;AAEjE,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,eAAO,MAAM,WAAW,kKAIvB,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableEx.d.ts","sourceRoot":"","sources":["../../../../src/components/TableEx/TableEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEzC,MAAM,WAAW,YAAa,SAAQ,iBAAiB,EAAE,UAAU;IACjE,OAAO,CAAC,EAAE,eAAe,CAAA;CAC1B;AAYD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAMhD,CAAA;AAIF,eAAO,MAAM,OAAO,kCAAiB,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableFooterEx.d.ts","sourceRoot":"","sources":["../../../../src/components/TableEx/TableFooterEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAgBzC,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB,EAAE,gBAAgB;IAC7E,OAAO,CAAC,EAAE,eAAe,CAAA;CAC1B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAA4F,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/TableEx/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableExVariants.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableEx/types/TableExVariants.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,QAAQ,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/TableEx/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../../src/context/TableHeight/Context.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,eAAO,MAAM,kBAAkB,gGAAsC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../../src/context/TableHeight/Provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAKlE,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB,EAAE,YAAY;IACpF,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA2BlE,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../../src/context/TableHeight/State.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAEhD,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAC3D,cAAc,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/context/TableHeight/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../../src/context/TableHeight/use.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,mIAAkF,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA"}
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": "~2.18.4",
14
- "@xyo-network/react-shared": "~2.62.3"
13
+ "@xylabs/react-shared": "~2.19.1",
14
+ "@xyo-network/react-shared": "~2.63.1"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@storybook/react": "^7.4.3",
18
- "@xylabs/ts-scripts-yarn3": "^3.0.28",
19
- "@xylabs/tsconfig-react": "^3.0.28",
20
- "@xyo-network/react-storybook": "~2.62.3",
18
+ "@xylabs/ts-scripts-yarn3": "^2.19.12",
19
+ "@xylabs/tsconfig-react": "^2.19.12",
20
+ "@xyo-network/react-storybook": "~2.63.1",
21
21
  "typescript": "^5.2.2"
22
22
  },
23
23
  "peerDependencies": {
@@ -30,35 +30,27 @@
30
30
  "react-router-dom": "^6"
31
31
  },
32
32
  "description": "Common React library for all XYO projects that use React",
33
+ "browser": "dist/esm/index.js",
33
34
  "docs": "dist/docs.json",
34
35
  "exports": {
35
36
  ".": {
36
37
  "node": {
37
- "import": {
38
- "types": "./dist/index.d.mts",
39
- "default": "./dist/index.mjs"
40
- },
41
- "require": {
42
- "types": "./dist/index.d.ts",
43
- "default": "./dist/index.js"
44
- }
38
+ "import": "./dist/esm/index.js",
39
+ "require": "./dist/cjs/index.js"
45
40
  },
46
41
  "browser": {
47
- "import": {
48
- "types": "./dist/index.d.mts",
49
- "default": "./dist/index.mjs"
50
- },
51
- "require": {
52
- "types": "./dist/index.d.ts",
53
- "default": "./dist/index.js"
54
- }
42
+ "import": "./dist/esm/index.js",
43
+ "require": "./dist/cjs/index.js"
55
44
  },
56
- "default": "./dist/index.mjs"
45
+ "default": "./dist/esm/index.js"
46
+ },
47
+ "./dist/docs.json": {
48
+ "default": "./dist/docs.json"
57
49
  },
58
50
  "./package.json": "./package.json"
59
51
  },
60
- "main": "dist/index.js",
61
- "module": "dist/index.mjs",
52
+ "main": "dist/cjs/index.js",
53
+ "module": "dist/esm/index.js",
62
54
  "homepage": "https://xyo.network",
63
55
  "keywords": [
64
56
  "xyo",
@@ -79,6 +71,6 @@
79
71
  "license": "yarn license-checker --exclude \"MIT, ISC, Apache-2.0, BSD, BSD-2-Clause, CC-BY-4.0, Unlicense, CC-BY-3.0, CC0-1.0\""
80
72
  },
81
73
  "sideEffects": false,
82
- "types": "dist/index.d.ts",
83
- "version": "2.62.3"
74
+ "types": "dist/types/index.d.ts",
75
+ "version": "2.63.1"
84
76
  }
@@ -1,6 +0,0 @@
1
- import { TableCellProps } from '@mui/material';
2
- export interface TableCellExProps extends TableCellProps {
3
- noBgColor?: boolean;
4
- }
5
- export declare const TableCellEx: import("@emotion/styled").StyledComponent<TableCellProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & TableCellExProps, {}, {}>;
6
- //# sourceMappingURL=TableCellEx.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableCellEx.d.ts","sourceRoot":"","sources":["../../../src/components/TableEx/TableCellEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,cAAc,EAAE,MAAM,eAAe,CAAA;AAEjE,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,eAAO,MAAM,WAAW,kKAIvB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableCellEx.d.ts","sourceRoot":"","sources":["../../../src/components/TableEx/TableCellEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,cAAc,EAAE,MAAM,eAAe,CAAA;AAEjE,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,eAAO,MAAM,WAAW,kKAIvB,CAAA"}
@@ -1,9 +0,0 @@
1
- import { TableProps } from '@mui/material';
2
- import { PropsWithChildren } from 'react';
3
- import { TableExVariants } from './types';
4
- export interface TableExProps extends PropsWithChildren, TableProps {
5
- variant?: TableExVariants;
6
- }
7
- export declare const TableExWithRef: React.FC<TableExProps>;
8
- export declare const TableEx: import("react").FC<TableExProps>;
9
- //# sourceMappingURL=TableEx.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableEx.d.ts","sourceRoot":"","sources":["../../../src/components/TableEx/TableEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEzC,MAAM,WAAW,YAAa,SAAQ,iBAAiB,EAAE,UAAU;IACjE,OAAO,CAAC,EAAE,eAAe,CAAA;CAC1B;AAYD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAMhD,CAAA;AAIF,eAAO,MAAM,OAAO,kCAAiB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableEx.d.ts","sourceRoot":"","sources":["../../../src/components/TableEx/TableEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEzC,MAAM,WAAW,YAAa,SAAQ,iBAAiB,EAAE,UAAU;IACjE,OAAO,CAAC,EAAE,eAAe,CAAA;CAC1B;AAYD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAMhD,CAAA;AAIF,eAAO,MAAM,OAAO,kCAAiB,CAAA"}
@@ -1,7 +0,0 @@
1
- declare const StorybookEntry: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./TableEx").TableExProps>;
2
- declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./TableEx").TableExProps>;
3
- declare const WithRef: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./TableEx").TableExProps>;
4
- declare const WithScrollable: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./TableEx").TableExProps>;
5
- export { Default, WithRef, WithScrollable };
6
- export default StorybookEntry;
7
- //# sourceMappingURL=TableEx.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableEx.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TableEx/TableEx.stories.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,cAAc,qIASK,CAAA;AAkDzB,QAAA,MAAM,OAAO,iIAAoB,CAAA;AAGjC,QAAA,MAAM,OAAO,iIAAoB,CAAA;AAGjC,QAAA,MAAM,cAAc,iIAAoB,CAAA;AAIxC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,CAAA;AAG3C,eAAe,cAAc,CAAA"}
@@ -1,7 +0,0 @@
1
- declare const StorybookEntry: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./TableEx").TableExProps>;
2
- declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./TableEx").TableExProps>;
3
- declare const WithRef: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./TableEx").TableExProps>;
4
- declare const WithScrollable: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./TableEx").TableExProps>;
5
- export { Default, WithRef, WithScrollable };
6
- export default StorybookEntry;
7
- //# sourceMappingURL=TableEx.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableEx.stories.d.ts","sourceRoot":"","sources":["../../../src/components/TableEx/TableEx.stories.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,cAAc,qIASK,CAAA;AAkDzB,QAAA,MAAM,OAAO,iIAAoB,CAAA;AAGjC,QAAA,MAAM,OAAO,iIAAoB,CAAA;AAGjC,QAAA,MAAM,cAAc,iIAAoB,CAAA;AAIxC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,CAAA;AAG3C,eAAe,cAAc,CAAA"}
@@ -1,8 +0,0 @@
1
- import { TableFooterProps } from '@mui/material';
2
- import { PropsWithChildren } from 'react';
3
- import { TableExVariants } from './types';
4
- export interface TableFooterExProps extends PropsWithChildren, TableFooterProps {
5
- variant?: TableExVariants;
6
- }
7
- export declare const TableFooterEx: React.FC<TableFooterExProps>;
8
- //# sourceMappingURL=TableFooterEx.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableFooterEx.d.ts","sourceRoot":"","sources":["../../../src/components/TableEx/TableFooterEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAgBzC,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB,EAAE,gBAAgB;IAC7E,OAAO,CAAC,EAAE,eAAe,CAAA;CAC1B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAA4F,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableFooterEx.d.ts","sourceRoot":"","sources":["../../../src/components/TableEx/TableFooterEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAgBzC,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB,EAAE,gBAAgB;IAC7E,OAAO,CAAC,EAAE,eAAe,CAAA;CAC1B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAA4F,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TableEx/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TableEx/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA;AACzB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA"}
@@ -1,2 +0,0 @@
1
- export type TableExVariants = 'scrollable' | 'normal';
2
- //# sourceMappingURL=TableExVariants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableExVariants.d.ts","sourceRoot":"","sources":["../../../../src/components/TableEx/types/TableExVariants.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,QAAQ,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableExVariants.d.ts","sourceRoot":"","sources":["../../../../src/components/TableEx/types/TableExVariants.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,QAAQ,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/TableEx/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/TableEx/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './TableEx';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { TableHeightState } from './State';
3
- export declare const TableHeightContext: import("react").Context<TableHeightState & import("@xyo-network/react-shared").ContextExState>;
4
- //# sourceMappingURL=Context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/context/TableHeight/Context.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,eAAO,MAAM,kBAAkB,gGAAsC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/context/TableHeight/Context.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,eAAO,MAAM,kBAAkB,gGAAsC,CAAA"}
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import { WithChildren } from '@xylabs/react-shared';
3
- import { ContextExProviderProps } from '@xyo-network/react-shared';
4
- export interface TableHeightProviderProps extends ContextExProviderProps, WithChildren {
5
- /** @field Account for optional header and footer rows */
6
- additionalRows?: number;
7
- defaultVisibleRows?: number;
8
- heightFormat?: string;
9
- }
10
- export declare const TableHeightProvider: React.FC<TableHeightProviderProps>;
11
- //# sourceMappingURL=Provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/context/TableHeight/Provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAKlE,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB,EAAE,YAAY;IACpF,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA2BlE,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/context/TableHeight/Provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAKlE,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB,EAAE,YAAY;IACpF,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA2BlE,CAAA"}
@@ -1,10 +0,0 @@
1
- import { ContextExState } from '@xyo-network/react-shared';
2
- import { Dispatch, SetStateAction } from 'react';
3
- export interface TableHeightState extends ContextExState {
4
- height?: string;
5
- rowHeight?: number;
6
- setRowHeight?: Dispatch<SetStateAction<number | undefined>>;
7
- setVisibleRows?: Dispatch<SetStateAction<number | undefined>>;
8
- visibleRows?: number;
9
- }
10
- //# sourceMappingURL=State.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../src/context/TableHeight/State.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAEhD,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAC3D,cAAc,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../src/context/TableHeight/State.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAEhD,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAC3D,cAAc,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/TableHeight/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/TableHeight/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,cAAc,OAAO,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const useTableHeight: (required?: boolean) => Omit<import("./State").TableHeightState & import("@xyo-network/react-shared").ContextExState, "provided">;
2
- //# sourceMappingURL=use.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../src/context/TableHeight/use.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,mIAAkF,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"use.d.ts","sourceRoot":"","sources":["../../../src/context/TableHeight/use.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,mIAAkF,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './TableHeight';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA"}
package/dist/index.js DELETED
@@ -1,114 +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
-
20
- // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- TableCellEx: () => TableCellEx,
24
- TableEx: () => TableEx,
25
- TableExWithRef: () => TableExWithRef,
26
- TableFooterEx: () => TableFooterEx,
27
- TableHeightContext: () => TableHeightContext,
28
- TableHeightProvider: () => TableHeightProvider,
29
- useTableHeight: () => useTableHeight
30
- });
31
- module.exports = __toCommonJS(src_exports);
32
-
33
- // src/components/TableEx/TableCellEx.tsx
34
- var import_material = require("@mui/material");
35
- var TableCellEx = (0, import_material.styled)(import_material.TableCell, { name: "TableCellNoBgColor", shouldForwardProp: (prop) => prop !== "noBgColor" })(
36
- ({ noBgColor = true }) => ({
37
- ...noBgColor && { backgroundColor: "transparent" }
38
- })
39
- );
40
-
41
- // src/components/TableEx/TableEx.tsx
42
- var import_material2 = require("@mui/material");
43
- var import_react = require("react");
44
- var import_jsx_runtime = require("react/jsx-runtime");
45
- var TableExInner = (0, import_react.forwardRef)(({ children, ...props }, ref) => {
46
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material2.Table, { ref, ...props, children });
47
- });
48
- TableExInner.displayName = "TableExInner";
49
- var TableExWithRef = (0, import_react.forwardRef)(({ variant, children, ...props }, ref) => {
50
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableExInner, { stickyHeader: variant === "scrollable", ref, ...props, children });
51
- });
52
- TableExWithRef.displayName = "TableEx";
53
- var TableEx = TableExWithRef;
54
-
55
- // src/components/TableEx/TableFooterEx.tsx
56
- var import_material3 = require("@mui/material");
57
- var import_jsx_runtime2 = require("react/jsx-runtime");
58
- var TableFooterExRoot = (0, import_material3.styled)(import_material3.TableFooter, {
59
- name: "TableFooterEx",
60
- shouldForwardProp: (propName) => propName !== "scrollable",
61
- slot: "Root"
62
- })(({ variant, theme }) => ({
63
- backgroundColor: theme.palette.background.default,
64
- bottom: "unset",
65
- position: "relative",
66
- ...variant === "scrollable" && {
67
- bottom: 0,
68
- position: "sticky"
69
- }
70
- }));
71
- var TableFooterEx = ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableFooterExRoot, { ...props, children });
72
-
73
- // src/context/TableHeight/Context.ts
74
- var import_react_shared = require("@xyo-network/react-shared");
75
- var TableHeightContext = (0, import_react_shared.createContextEx)();
76
-
77
- // src/context/TableHeight/Provider.tsx
78
- var import_react2 = require("react");
79
- var import_jsx_runtime3 = require("react/jsx-runtime");
80
- var TableHeightProvider = ({
81
- children,
82
- additionalRows = 0,
83
- defaultVisibleRows,
84
- heightFormat = "px"
85
- }) => {
86
- const [visibleRows, setVisibleRows] = (0, import_react2.useState)(defaultVisibleRows);
87
- const [height, setHeight] = (0, import_react2.useState)();
88
- const [rowHeight, setRowHeight] = (0, import_react2.useState)();
89
- const formattedHeight = (0, import_react2.useMemo)(() => height !== void 0 ? `${height}${heightFormat}` : void 0, [height, heightFormat]);
90
- (0, import_react2.useEffect)(() => {
91
- setVisibleRows(defaultVisibleRows);
92
- }, [defaultVisibleRows]);
93
- (0, import_react2.useEffect)(() => {
94
- if (rowHeight !== void 0 && visibleRows !== void 0) {
95
- setHeight(rowHeight * (visibleRows + additionalRows));
96
- }
97
- }, [defaultVisibleRows, rowHeight, visibleRows, additionalRows]);
98
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TableHeightContext.Provider, { value: { height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows }, children });
99
- };
100
-
101
- // src/context/TableHeight/use.tsx
102
- var import_react_shared2 = require("@xyo-network/react-shared");
103
- var useTableHeight = (required = false) => (0, import_react_shared2.useContextEx)(TableHeightContext, "TableHeight", required);
104
- // Annotate the CommonJS export names for ESM import in node:
105
- 0 && (module.exports = {
106
- TableCellEx,
107
- TableEx,
108
- TableExWithRef,
109
- TableFooterEx,
110
- TableHeightContext,
111
- TableHeightProvider,
112
- useTableHeight
113
- });
114
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts","../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.tsx"],"sourcesContent":["export * from './components'\nexport * from './context'\n","import { styled, TableCell, TableCellProps } from '@mui/material'\n\nexport interface TableCellExProps extends TableCellProps {\n noBgColor?: boolean\n}\n\nexport const TableCellEx = styled(TableCell, { name: 'TableCellNoBgColor', shouldForwardProp: (prop) => prop !== 'noBgColor' })<TableCellExProps>(\n ({ noBgColor = true }) => ({\n ...(noBgColor && { backgroundColor: 'transparent' }),\n }),\n)\n","import { Table, TableProps } from '@mui/material'\nimport { forwardRef, PropsWithChildren } from 'react'\n\nimport { TableExVariants } from './types'\n\nexport interface TableExProps extends PropsWithChildren, TableProps {\n variant?: TableExVariants\n}\n\nconst TableExInner: React.FC<TableExProps> = forwardRef(({ children, ...props }, ref) => {\n return (\n <Table ref={ref} {...props}>\n {children}\n </Table>\n )\n})\n\nTableExInner.displayName = 'TableExInner'\n\nexport const TableExWithRef: React.FC<TableExProps> = forwardRef(({ variant, children, ...props }, ref) => {\n return (\n <TableExInner stickyHeader={variant === 'scrollable'} ref={ref} {...props}>\n {children}\n </TableExInner>\n )\n})\n\nTableExWithRef.displayName = 'TableEx'\n\nexport const TableEx = TableExWithRef\n","import { styled, TableFooter, TableFooterProps } from '@mui/material'\nimport { PropsWithChildren } from 'react'\n\nimport { TableExVariants } from './types'\n\nconst TableFooterExRoot = styled(TableFooter, {\n name: 'TableFooterEx',\n shouldForwardProp: (propName) => propName !== 'scrollable',\n slot: 'Root',\n})<TableFooterExProps>(({ variant, theme }) => ({\n backgroundColor: theme.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 '@xyo-network/react-shared'\n\nimport { TableHeightState } from './State'\n\nexport const TableHeightContext = createContextEx<TableHeightState>()\n","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","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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAAkD;AAM3C,IAAM,kBAAc,wBAAO,2BAAW,EAAE,MAAM,sBAAsB,mBAAmB,CAAC,SAAS,SAAS,YAAY,CAAC;AAAA,EAC5H,CAAC,EAAE,YAAY,KAAK,OAAO;AAAA,IACzB,GAAI,aAAa,EAAE,iBAAiB,cAAc;AAAA,EACpD;AACF;;;ACVA,IAAAA,mBAAkC;AAClC,mBAA8C;AAU1C;AAFJ,IAAM,mBAAuC,yBAAW,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ;AACvF,SACE,4CAAC,0BAAM,KAAW,GAAG,OAClB,UACH;AAEJ,CAAC;AAED,aAAa,cAAc;AAEpB,IAAM,qBAAyC,yBAAW,CAAC,EAAE,SAAS,UAAU,GAAG,MAAM,GAAG,QAAQ;AACzG,SACE,4CAAC,gBAAa,cAAc,YAAY,cAAc,KAAW,GAAG,OACjE,UACH;AAEJ,CAAC;AAED,eAAe,cAAc;AAEtB,IAAM,UAAU;;;AC7BvB,IAAAC,mBAAsD;AAuBiC,IAAAC,sBAAA;AAlBvF,IAAM,wBAAoB,yBAAO,8BAAa;AAAA,EAC5C,MAAM;AAAA,EACN,mBAAmB,CAAC,aAAa,aAAa;AAAA,EAC9C,MAAM;AACR,CAAC,EAAsB,CAAC,EAAE,SAAS,MAAM,OAAO;AAAA,EAC9C,iBAAiB,MAAM,QAAQ,WAAW;AAAA,EAC1C,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,6CAAC,qBAAmB,GAAG,OAAQ,UAAS;;;ACvB/H,0BAAgC;AAIzB,IAAM,yBAAqB,qCAAkC;;;ACFpE,IAAAC,gBAA6C;AAkCzC,IAAAC,sBAAA;AAvBG,IAAM,sBAA0D,CAAC;AAAA,EACtE;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,CAAC,aAAa,cAAc,QAAI,wBAAS,kBAAkB;AACjE,QAAM,CAAC,QAAQ,SAAS,QAAI,wBAA6B;AACzD,QAAM,CAAC,WAAW,YAAY,QAAI,wBAA6B;AAE/D,QAAM,sBAAkB,uBAAQ,MAAO,WAAW,SAAY,GAAG,MAAM,GAAG,YAAY,KAAK,QAAY,CAAC,QAAQ,YAAY,CAAC;AAE7H,+BAAU,MAAM;AACd,mBAAe,kBAAkB;AAAA,EACnC,GAAG,CAAC,kBAAkB,CAAC;AAEvB,+BAAU,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,6CAAC,mBAAmB,UAAnB,EAA4B,OAAO,EAAE,QAAQ,iBAAiB,UAAU,MAAM,WAAW,cAAc,gBAAgB,YAAY,GACjI,UACH;AAEJ;;;ACxCA,IAAAC,uBAA6B;AAItB,IAAM,iBAAiB,CAAC,WAAW,cAAU,mCAAa,oBAAoB,eAAe,QAAQ;","names":["import_material","import_material","import_jsx_runtime","import_react","import_jsx_runtime","import_react_shared"]}
package/dist/index.mjs DELETED
@@ -1,81 +0,0 @@
1
- // src/components/TableEx/TableCellEx.tsx
2
- import { styled, TableCell } from "@mui/material";
3
- var TableCellEx = styled(TableCell, { name: "TableCellNoBgColor", shouldForwardProp: (prop) => prop !== "noBgColor" })(
4
- ({ noBgColor = true }) => ({
5
- ...noBgColor && { backgroundColor: "transparent" }
6
- })
7
- );
8
-
9
- // src/components/TableEx/TableEx.tsx
10
- import { Table } from "@mui/material";
11
- import { forwardRef } from "react";
12
- import { jsx } from "react/jsx-runtime";
13
- var TableExInner = forwardRef(({ children, ...props }, ref) => {
14
- return /* @__PURE__ */ jsx(Table, { ref, ...props, children });
15
- });
16
- TableExInner.displayName = "TableExInner";
17
- var TableExWithRef = forwardRef(({ variant, children, ...props }, ref) => {
18
- return /* @__PURE__ */ jsx(TableExInner, { stickyHeader: variant === "scrollable", ref, ...props, children });
19
- });
20
- TableExWithRef.displayName = "TableEx";
21
- var TableEx = TableExWithRef;
22
-
23
- // src/components/TableEx/TableFooterEx.tsx
24
- import { styled as styled2, TableFooter } from "@mui/material";
25
- import { jsx as jsx2 } from "react/jsx-runtime";
26
- var TableFooterExRoot = styled2(TableFooter, {
27
- name: "TableFooterEx",
28
- shouldForwardProp: (propName) => propName !== "scrollable",
29
- slot: "Root"
30
- })(({ variant, theme }) => ({
31
- backgroundColor: theme.palette.background.default,
32
- bottom: "unset",
33
- position: "relative",
34
- ...variant === "scrollable" && {
35
- bottom: 0,
36
- position: "sticky"
37
- }
38
- }));
39
- var TableFooterEx = ({ children, ...props }) => /* @__PURE__ */ jsx2(TableFooterExRoot, { ...props, children });
40
-
41
- // src/context/TableHeight/Context.ts
42
- import { createContextEx } from "@xyo-network/react-shared";
43
- var TableHeightContext = createContextEx();
44
-
45
- // src/context/TableHeight/Provider.tsx
46
- import { useEffect, useMemo, useState } from "react";
47
- import { jsx as jsx3 } from "react/jsx-runtime";
48
- var TableHeightProvider = ({
49
- children,
50
- additionalRows = 0,
51
- defaultVisibleRows,
52
- heightFormat = "px"
53
- }) => {
54
- const [visibleRows, setVisibleRows] = useState(defaultVisibleRows);
55
- const [height, setHeight] = useState();
56
- const [rowHeight, setRowHeight] = useState();
57
- const formattedHeight = useMemo(() => height !== void 0 ? `${height}${heightFormat}` : void 0, [height, heightFormat]);
58
- useEffect(() => {
59
- setVisibleRows(defaultVisibleRows);
60
- }, [defaultVisibleRows]);
61
- useEffect(() => {
62
- if (rowHeight !== void 0 && visibleRows !== void 0) {
63
- setHeight(rowHeight * (visibleRows + additionalRows));
64
- }
65
- }, [defaultVisibleRows, rowHeight, visibleRows, additionalRows]);
66
- return /* @__PURE__ */ jsx3(TableHeightContext.Provider, { value: { height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows }, children });
67
- };
68
-
69
- // src/context/TableHeight/use.tsx
70
- import { useContextEx } from "@xyo-network/react-shared";
71
- var useTableHeight = (required = false) => useContextEx(TableHeightContext, "TableHeight", required);
72
- export {
73
- TableCellEx,
74
- TableEx,
75
- TableExWithRef,
76
- TableFooterEx,
77
- TableHeightContext,
78
- TableHeightProvider,
79
- useTableHeight
80
- };
81
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":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.tsx"],"sourcesContent":["import { styled, TableCell, TableCellProps } from '@mui/material'\n\nexport interface TableCellExProps extends TableCellProps {\n noBgColor?: boolean\n}\n\nexport const TableCellEx = styled(TableCell, { name: 'TableCellNoBgColor', shouldForwardProp: (prop) => prop !== 'noBgColor' })<TableCellExProps>(\n ({ noBgColor = true }) => ({\n ...(noBgColor && { backgroundColor: 'transparent' }),\n }),\n)\n","import { Table, TableProps } from '@mui/material'\nimport { forwardRef, PropsWithChildren } from 'react'\n\nimport { TableExVariants } from './types'\n\nexport interface TableExProps extends PropsWithChildren, TableProps {\n variant?: TableExVariants\n}\n\nconst TableExInner: React.FC<TableExProps> = forwardRef(({ children, ...props }, ref) => {\n return (\n <Table ref={ref} {...props}>\n {children}\n </Table>\n )\n})\n\nTableExInner.displayName = 'TableExInner'\n\nexport const TableExWithRef: React.FC<TableExProps> = forwardRef(({ variant, children, ...props }, ref) => {\n return (\n <TableExInner stickyHeader={variant === 'scrollable'} ref={ref} {...props}>\n {children}\n </TableExInner>\n )\n})\n\nTableExWithRef.displayName = 'TableEx'\n\nexport const TableEx = TableExWithRef\n","import { styled, TableFooter, TableFooterProps } from '@mui/material'\nimport { PropsWithChildren } from 'react'\n\nimport { TableExVariants } from './types'\n\nconst TableFooterExRoot = styled(TableFooter, {\n name: 'TableFooterEx',\n shouldForwardProp: (propName) => propName !== 'scrollable',\n slot: 'Root',\n})<TableFooterExProps>(({ variant, theme }) => ({\n backgroundColor: theme.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 '@xyo-network/react-shared'\n\nimport { TableHeightState } from './State'\n\nexport const TableHeightContext = createContextEx<TableHeightState>()\n","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","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,QAAQ,iBAAiC;AAM3C,IAAM,cAAc,OAAO,WAAW,EAAE,MAAM,sBAAsB,mBAAmB,CAAC,SAAS,SAAS,YAAY,CAAC;AAAA,EAC5H,CAAC,EAAE,YAAY,KAAK,OAAO;AAAA,IACzB,GAAI,aAAa,EAAE,iBAAiB,cAAc;AAAA,EACpD;AACF;;;ACVA,SAAS,aAAyB;AAClC,SAAS,kBAAqC;AAU1C;AAFJ,IAAM,eAAuC,WAAW,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ;AACvF,SACE,oBAAC,SAAM,KAAW,GAAG,OAClB,UACH;AAEJ,CAAC;AAED,aAAa,cAAc;AAEpB,IAAM,iBAAyC,WAAW,CAAC,EAAE,SAAS,UAAU,GAAG,MAAM,GAAG,QAAQ;AACzG,SACE,oBAAC,gBAAa,cAAc,YAAY,cAAc,KAAW,GAAG,OACjE,UACH;AAEJ,CAAC;AAED,eAAe,cAAc;AAEtB,IAAM,UAAU;;;AC7BvB,SAAS,UAAAA,SAAQ,mBAAqC;AAuBiC,gBAAAC,YAAA;AAlBvF,IAAM,oBAAoBD,QAAO,aAAa;AAAA,EAC5C,MAAM;AAAA,EACN,mBAAmB,CAAC,aAAa,aAAa;AAAA,EAC9C,MAAM;AACR,CAAC,EAAsB,CAAC,EAAE,SAAS,MAAM,OAAO;AAAA,EAC9C,iBAAiB,MAAM,QAAQ,WAAW;AAAA,EAC1C,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;;;ACvB/H,SAAS,uBAAuB;AAIzB,IAAM,qBAAqB,gBAAkC;;;ACFpE,SAAS,WAAW,SAAS,gBAAgB;AAkCzC,gBAAAC,YAAA;AAvBG,IAAM,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,gBAAAA,KAAC,mBAAmB,UAAnB,EAA4B,OAAO,EAAE,QAAQ,iBAAiB,UAAU,MAAM,WAAW,cAAc,gBAAgB,YAAY,GACjI,UACH;AAEJ;;;ACxCA,SAAS,oBAAoB;AAItB,IAAM,iBAAiB,CAAC,WAAW,UAAU,aAAa,oBAAoB,eAAe,QAAQ;","names":["styled","jsx","jsx"]}