@stereopt/data-table 0.1.1 → 0.1.3
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/index.cjs +8 -4
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +9 -5
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -20,14 +20,18 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
DataTable: () => DataTable
|
|
23
|
+
DataTable: () => DataTable,
|
|
24
|
+
default: () => DataTable
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(index_exports);
|
|
26
27
|
|
|
27
|
-
// src/DataTable.tsx
|
|
28
|
+
// src/dataTable/DataTable.tsx
|
|
28
29
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
function DataTable() {
|
|
30
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
30
|
+
function DataTable({ data }) {
|
|
31
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
32
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { children: "Data Table" }),
|
|
33
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { children: JSON.stringify(data, null, 2) })
|
|
34
|
+
] });
|
|
31
35
|
}
|
|
32
36
|
// Annotate the CommonJS export names for ESM import in node:
|
|
33
37
|
0 && (module.exports = {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface DataTableProps<TData, TValue> {
|
|
4
|
+
data: TData[];
|
|
5
|
+
}
|
|
6
|
+
declare function DataTable<TData, TValue>({ data }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
4
7
|
|
|
5
|
-
export { DataTable };
|
|
8
|
+
export { DataTable, type DataTableProps, DataTable as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface DataTableProps<TData, TValue> {
|
|
4
|
+
data: TData[];
|
|
5
|
+
}
|
|
6
|
+
declare function DataTable<TData, TValue>({ data }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
4
7
|
|
|
5
|
-
export { DataTable };
|
|
8
|
+
export { DataTable, type DataTableProps, DataTable as default };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
// src/DataTable.tsx
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
function DataTable() {
|
|
4
|
-
return /* @__PURE__ */
|
|
1
|
+
// src/dataTable/DataTable.tsx
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
function DataTable({ data }) {
|
|
4
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
5
|
+
/* @__PURE__ */ jsx("h1", { children: "Data Table" }),
|
|
6
|
+
/* @__PURE__ */ jsx("pre", { children: JSON.stringify(data, null, 2) })
|
|
7
|
+
] });
|
|
5
8
|
}
|
|
6
9
|
export {
|
|
7
|
-
DataTable
|
|
10
|
+
DataTable,
|
|
11
|
+
DataTable as default
|
|
8
12
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stereopt/data-table",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Simple reusable React data table component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"import": "./dist/index.js",
|
|
13
|
-
"require": "./dist/index.cjs"
|
|
13
|
+
"require": "./dist/index.cjs",
|
|
14
|
+
"default": "./dist/index.js"
|
|
14
15
|
}
|
|
15
16
|
},
|
|
16
17
|
"files": [
|