@clayui/table 3.144.1 → 3.158.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/README.md +4 -4
- package/lib/Body.d.ts +2 -2
- package/lib/Cell.d.ts +2 -2
- package/lib/Head.d.ts +2 -2
- package/lib/Row.d.ts +2 -2
- package/lib/cjs/Body.js +36 -20
- package/lib/cjs/Cell.js +56 -35
- package/lib/cjs/Head.js +36 -20
- package/lib/cjs/Row.js +53 -25
- package/lib/cjs/index.js +81 -45
- package/lib/cjs/types.js +15 -4
- package/lib/esm/Body.js +8 -17
- package/lib/esm/Cell.js +28 -32
- package/lib/esm/Head.js +8 -17
- package/lib/esm/Row.js +25 -22
- package/lib/esm/index.js +50 -39
- package/lib/esm/types.js +0 -1
- package/lib/index.d.ts +6 -6
- package/lib/types.d.ts +2 -2
- package/package.json +29 -30
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
A table is a specific pattern for comparing datasets in a very direct and analytical way.
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
5
|
+
- [Documentation](https://clayui.com/docs/components/table.html)
|
|
6
|
+
- [Changelog](./CHANGELOG.md)
|
|
7
|
+
- [Breaking change schedule](./BREAKING.md)
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
@@ -16,4 +16,4 @@ yarn add @clayui/table
|
|
|
16
16
|
|
|
17
17
|
## Contribute
|
|
18
18
|
|
|
19
|
-
We'd love to get contributions from you! Please, check our [Contributing Guidelines](https://github.com/liferay/clay/blob/master/CONTRIBUTING.md) to see how you can help us improve.
|
|
19
|
+
We'd love to get contributions from you! Please, check our [Contributing Guidelines](https://github.com/liferay/clay/blob/master/CONTRIBUTING.md) to see how you can help us improve.
|
package/lib/Body.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SPDX-FileCopyrightText:
|
|
3
|
-
* SPDX-License-Identifier:
|
|
2
|
+
* SPDX-FileCopyrightText: (c) 2026 Liferay, Inc. https://liferay.com
|
|
3
|
+
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
declare const ClayTableBody: React.ForwardRefExoticComponent<React.TableHTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
package/lib/Cell.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SPDX-FileCopyrightText:
|
|
3
|
-
* SPDX-License-Identifier:
|
|
2
|
+
* SPDX-FileCopyrightText: (c) 2026 Liferay, Inc. https://liferay.com
|
|
3
|
+
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { TDelimiter } from './types';
|
package/lib/Head.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SPDX-FileCopyrightText:
|
|
3
|
-
* SPDX-License-Identifier:
|
|
2
|
+
* SPDX-FileCopyrightText: (c) 2026 Liferay, Inc. https://liferay.com
|
|
3
|
+
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
declare const ClayTableHead: React.ForwardRefExoticComponent<React.TableHTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
package/lib/Row.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SPDX-FileCopyrightText:
|
|
3
|
-
* SPDX-License-Identifier:
|
|
2
|
+
* SPDX-FileCopyrightText: (c) 2026 Liferay, Inc. https://liferay.com
|
|
3
|
+
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { TDelimiter } from './types';
|
package/lib/cjs/Body.js
CHANGED
|
@@ -1,23 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty
|
|
4
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var Body_exports = {};
|
|
30
|
+
__export(Body_exports, {
|
|
31
|
+
default: () => Body_default
|
|
5
32
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
|
|
11
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/
|
|
13
|
-
const ClayTableBody = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
14
|
-
let {
|
|
15
|
-
children,
|
|
16
|
-
...otherProps
|
|
17
|
-
} = _ref;
|
|
18
|
-
return /*#__PURE__*/_react.default.createElement("tbody", _extends({}, otherProps, {
|
|
19
|
-
ref: ref
|
|
20
|
-
}), children);
|
|
33
|
+
module.exports = __toCommonJS(Body_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
const ClayTableBody = import_react.default.forwardRef(({ children, ...otherProps }, ref) => {
|
|
36
|
+
return /* @__PURE__ */ import_react.default.createElement("tbody", { ...otherProps, ref }, children);
|
|
21
37
|
});
|
|
22
|
-
ClayTableBody.displayName =
|
|
23
|
-
var
|
|
38
|
+
ClayTableBody.displayName = "ClayTableBody";
|
|
39
|
+
var Body_default = ClayTableBody;
|
package/lib/cjs/Cell.js
CHANGED
|
@@ -1,18 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty
|
|
4
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var Cell_exports = {};
|
|
30
|
+
__export(Cell_exports, {
|
|
31
|
+
default: () => Cell_default
|
|
5
32
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
|
|
12
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/
|
|
14
|
-
const ClayTableCell = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
15
|
-
let {
|
|
33
|
+
module.exports = __toCommonJS(Cell_exports);
|
|
34
|
+
var import_classnames = __toESM(require("classnames"));
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
const ClayTableCell = import_react.default.forwardRef(
|
|
37
|
+
({
|
|
16
38
|
align,
|
|
17
39
|
cellDelimiter,
|
|
18
40
|
children,
|
|
@@ -24,25 +46,24 @@ const ClayTableCell = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
24
46
|
noWrap = false,
|
|
25
47
|
truncate = false,
|
|
26
48
|
...otherProps
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var _default = exports.default = ClayTableCell;
|
|
49
|
+
}, ref) => {
|
|
50
|
+
const TagName = headingCell ? "th" : "td";
|
|
51
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
52
|
+
TagName,
|
|
53
|
+
{
|
|
54
|
+
...otherProps,
|
|
55
|
+
className: (0, import_classnames.default)(className, {
|
|
56
|
+
"table-cell-expand": expanded || truncate,
|
|
57
|
+
[`table-cell-${cellDelimiter}`]: cellDelimiter,
|
|
58
|
+
[`table-column-text-${columnTextAlignment}`]: columnTextAlignment,
|
|
59
|
+
[`text-${align}`]: align,
|
|
60
|
+
"table-cell-ws-nowrap": noWrap
|
|
61
|
+
}),
|
|
62
|
+
ref
|
|
63
|
+
},
|
|
64
|
+
headingTitle ? import_react.default.Children.map(children, (child, i) => /* @__PURE__ */ import_react.default.createElement("p", { className: "table-list-title", key: i }, child)) : truncate && typeof children === "string" ? /* @__PURE__ */ import_react.default.createElement("span", { className: "text-truncate-inline" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "text-truncate" }, children)) : children
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
ClayTableCell.displayName = "ClayTableCell";
|
|
69
|
+
var Cell_default = ClayTableCell;
|
package/lib/cjs/Head.js
CHANGED
|
@@ -1,23 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty
|
|
4
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var Head_exports = {};
|
|
30
|
+
__export(Head_exports, {
|
|
31
|
+
default: () => Head_default
|
|
5
32
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
|
|
11
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/
|
|
13
|
-
const ClayTableHead = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
14
|
-
let {
|
|
15
|
-
children,
|
|
16
|
-
...otherProps
|
|
17
|
-
} = _ref;
|
|
18
|
-
return /*#__PURE__*/_react.default.createElement("thead", _extends({}, otherProps, {
|
|
19
|
-
ref: ref
|
|
20
|
-
}), children);
|
|
33
|
+
module.exports = __toCommonJS(Head_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
const ClayTableHead = import_react.default.forwardRef(({ children, ...otherProps }, ref) => {
|
|
36
|
+
return /* @__PURE__ */ import_react.default.createElement("thead", { ...otherProps, ref }, children);
|
|
21
37
|
});
|
|
22
|
-
ClayTableHead.displayName =
|
|
23
|
-
var
|
|
38
|
+
ClayTableHead.displayName = "ClayTableHead";
|
|
39
|
+
var Head_default = ClayTableHead;
|
package/lib/cjs/Row.js
CHANGED
|
@@ -1,33 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty
|
|
4
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var Row_exports = {};
|
|
30
|
+
__export(Row_exports, {
|
|
31
|
+
default: () => Row_default
|
|
5
32
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
|
|
12
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/
|
|
14
|
-
const ClayTableRow = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
15
|
-
let {
|
|
33
|
+
module.exports = __toCommonJS(Row_exports);
|
|
34
|
+
var import_classnames = __toESM(require("classnames"));
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
const ClayTableRow = import_react.default.forwardRef(
|
|
37
|
+
({
|
|
16
38
|
active = false,
|
|
17
39
|
children,
|
|
18
40
|
className,
|
|
19
41
|
divider = false,
|
|
20
42
|
rowDelimiter,
|
|
21
43
|
...otherProps
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
|
|
44
|
+
}, ref) => {
|
|
45
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
46
|
+
"tr",
|
|
47
|
+
{
|
|
48
|
+
...otherProps,
|
|
49
|
+
className: (0, import_classnames.default)(className, {
|
|
50
|
+
"table-active": active,
|
|
51
|
+
"table-divider": divider,
|
|
52
|
+
[`table-row-${rowDelimiter}`]: rowDelimiter
|
|
53
|
+
}),
|
|
54
|
+
ref
|
|
55
|
+
},
|
|
56
|
+
children
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
ClayTableRow.displayName = "ClayTableRow";
|
|
61
|
+
var Row_default = ClayTableRow;
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,22 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty
|
|
4
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var src_exports = {};
|
|
30
|
+
__export(src_exports, {
|
|
31
|
+
default: () => src_default
|
|
5
32
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
|
|
16
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/
|
|
18
|
-
const ClayTable = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
19
|
-
let {
|
|
33
|
+
module.exports = __toCommonJS(src_exports);
|
|
34
|
+
var import_classnames = __toESM(require("classnames"));
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_Body = __toESM(require("./Body"));
|
|
37
|
+
var import_Cell = __toESM(require("./Cell"));
|
|
38
|
+
var import_Head = __toESM(require("./Head"));
|
|
39
|
+
var import_Row = __toESM(require("./Row"));
|
|
40
|
+
const ClayTable = import_react.default.forwardRef(
|
|
41
|
+
({
|
|
20
42
|
bodyVerticalAlignment,
|
|
21
43
|
borderedColumns,
|
|
22
44
|
borderless,
|
|
@@ -31,32 +53,46 @@ const ClayTable = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
31
53
|
striped = true,
|
|
32
54
|
tableVerticalAlignment,
|
|
33
55
|
...otherProps
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
}, ref) => {
|
|
57
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: (0, import_classnames.default)({
|
|
61
|
+
"table-responsive": responsive,
|
|
62
|
+
[`table-responsive-${responsiveSize}`]: responsiveSize
|
|
63
|
+
}),
|
|
64
|
+
ref
|
|
65
|
+
},
|
|
66
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
67
|
+
"table",
|
|
68
|
+
{
|
|
69
|
+
className: (0, import_classnames.default)(
|
|
70
|
+
"table table-autofit",
|
|
71
|
+
{
|
|
72
|
+
"show-quick-actions-on-hover": hover,
|
|
73
|
+
"table-bordered": borderedColumns,
|
|
74
|
+
"table-heading-nowrap": headingNoWrap,
|
|
75
|
+
"table-hover": hover,
|
|
76
|
+
"table-list table-head-bordered": !borderless,
|
|
77
|
+
"table-nowrap": noWrap,
|
|
78
|
+
"table-striped": striped,
|
|
79
|
+
[`tbody-valign-${bodyVerticalAlignment}`]: bodyVerticalAlignment,
|
|
80
|
+
[`thead-valign-${headVerticalAlignment}`]: headVerticalAlignment,
|
|
81
|
+
[`table-valign-${tableVerticalAlignment}`]: tableVerticalAlignment
|
|
82
|
+
},
|
|
83
|
+
className
|
|
84
|
+
),
|
|
85
|
+
...otherProps
|
|
86
|
+
},
|
|
87
|
+
children
|
|
88
|
+
)
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
ClayTable.displayName = "ClayTable";
|
|
93
|
+
var src_default = Object.assign(ClayTable, {
|
|
94
|
+
Body: import_Body.default,
|
|
95
|
+
Cell: import_Cell.default,
|
|
96
|
+
Head: import_Head.default,
|
|
97
|
+
Row: import_Row.default
|
|
55
98
|
});
|
|
56
|
-
ClayTable.displayName = 'ClayTable';
|
|
57
|
-
var _default = exports.default = Object.assign(ClayTable, {
|
|
58
|
-
Body: _Body.default,
|
|
59
|
-
Cell: _Cell.default,
|
|
60
|
-
Head: _Head.default,
|
|
61
|
-
Row: _Row.default
|
|
62
|
-
});
|
package/lib/cjs/types.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var types_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(types_exports);
|
package/lib/esm/Body.js
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import React from 'react';
|
|
8
|
-
const ClayTableBody = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
9
|
-
let {
|
|
10
|
-
children,
|
|
11
|
-
...otherProps
|
|
12
|
-
} = _ref;
|
|
13
|
-
return /*#__PURE__*/React.createElement("tbody", _extends({}, otherProps, {
|
|
14
|
-
ref: ref
|
|
15
|
-
}), children);
|
|
1
|
+
import React from "react";
|
|
2
|
+
const ClayTableBody = React.forwardRef(({ children, ...otherProps }, ref) => {
|
|
3
|
+
return /* @__PURE__ */ React.createElement("tbody", { ...otherProps, ref }, children);
|
|
16
4
|
});
|
|
17
|
-
ClayTableBody.displayName =
|
|
18
|
-
|
|
5
|
+
ClayTableBody.displayName = "ClayTableBody";
|
|
6
|
+
var Body_default = ClayTableBody;
|
|
7
|
+
export {
|
|
8
|
+
Body_default as default
|
|
9
|
+
};
|
package/lib/esm/Cell.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import classNames from 'classnames';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
const ClayTableCell = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
10
|
-
let {
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
|
+
const ClayTableCell = React.forwardRef(
|
|
4
|
+
({
|
|
11
5
|
align,
|
|
12
6
|
cellDelimiter,
|
|
13
7
|
children,
|
|
@@ -19,25 +13,27 @@ const ClayTableCell = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
19
13
|
noWrap = false,
|
|
20
14
|
truncate = false,
|
|
21
15
|
...otherProps
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
export
|
|
16
|
+
}, ref) => {
|
|
17
|
+
const TagName = headingCell ? "th" : "td";
|
|
18
|
+
return /* @__PURE__ */ React.createElement(
|
|
19
|
+
TagName,
|
|
20
|
+
{
|
|
21
|
+
...otherProps,
|
|
22
|
+
className: classNames(className, {
|
|
23
|
+
"table-cell-expand": expanded || truncate,
|
|
24
|
+
[`table-cell-${cellDelimiter}`]: cellDelimiter,
|
|
25
|
+
[`table-column-text-${columnTextAlignment}`]: columnTextAlignment,
|
|
26
|
+
[`text-${align}`]: align,
|
|
27
|
+
"table-cell-ws-nowrap": noWrap
|
|
28
|
+
}),
|
|
29
|
+
ref
|
|
30
|
+
},
|
|
31
|
+
headingTitle ? React.Children.map(children, (child, i) => /* @__PURE__ */ React.createElement("p", { className: "table-list-title", key: i }, child)) : truncate && typeof children === "string" ? /* @__PURE__ */ React.createElement("span", { className: "text-truncate-inline" }, /* @__PURE__ */ React.createElement("span", { className: "text-truncate" }, children)) : children
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
ClayTableCell.displayName = "ClayTableCell";
|
|
36
|
+
var Cell_default = ClayTableCell;
|
|
37
|
+
export {
|
|
38
|
+
Cell_default as default
|
|
39
|
+
};
|
package/lib/esm/Head.js
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import React from 'react';
|
|
8
|
-
const ClayTableHead = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
9
|
-
let {
|
|
10
|
-
children,
|
|
11
|
-
...otherProps
|
|
12
|
-
} = _ref;
|
|
13
|
-
return /*#__PURE__*/React.createElement("thead", _extends({}, otherProps, {
|
|
14
|
-
ref: ref
|
|
15
|
-
}), children);
|
|
1
|
+
import React from "react";
|
|
2
|
+
const ClayTableHead = React.forwardRef(({ children, ...otherProps }, ref) => {
|
|
3
|
+
return /* @__PURE__ */ React.createElement("thead", { ...otherProps, ref }, children);
|
|
16
4
|
});
|
|
17
|
-
ClayTableHead.displayName =
|
|
18
|
-
|
|
5
|
+
ClayTableHead.displayName = "ClayTableHead";
|
|
6
|
+
var Head_default = ClayTableHead;
|
|
7
|
+
export {
|
|
8
|
+
Head_default as default
|
|
9
|
+
};
|
package/lib/esm/Row.js
CHANGED
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import classNames from 'classnames';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
const ClayTableRow = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
10
|
-
let {
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
|
+
const ClayTableRow = React.forwardRef(
|
|
4
|
+
({
|
|
11
5
|
active = false,
|
|
12
6
|
children,
|
|
13
7
|
className,
|
|
14
8
|
divider = false,
|
|
15
9
|
rowDelimiter,
|
|
16
10
|
...otherProps
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
}, ref) => {
|
|
12
|
+
return /* @__PURE__ */ React.createElement(
|
|
13
|
+
"tr",
|
|
14
|
+
{
|
|
15
|
+
...otherProps,
|
|
16
|
+
className: classNames(className, {
|
|
17
|
+
"table-active": active,
|
|
18
|
+
"table-divider": divider,
|
|
19
|
+
[`table-row-${rowDelimiter}`]: rowDelimiter
|
|
20
|
+
}),
|
|
21
|
+
ref
|
|
22
|
+
},
|
|
23
|
+
children
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
ClayTableRow.displayName = "ClayTableRow";
|
|
28
|
+
var Row_default = ClayTableRow;
|
|
29
|
+
export {
|
|
30
|
+
Row_default as default
|
|
31
|
+
};
|
package/lib/esm/index.js
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import Body from "./Body.js";
|
|
10
|
-
import Cell from "./Cell.js";
|
|
11
|
-
import Head from "./Head.js";
|
|
12
|
-
import Row from "./Row.js";
|
|
13
|
-
const ClayTable = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
14
|
-
let {
|
|
1
|
+
import classNames from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Body from "./Body";
|
|
4
|
+
import Cell from "./Cell";
|
|
5
|
+
import Head from "./Head";
|
|
6
|
+
import Row from "./Row";
|
|
7
|
+
const ClayTable = React.forwardRef(
|
|
8
|
+
({
|
|
15
9
|
bodyVerticalAlignment,
|
|
16
10
|
borderedColumns,
|
|
17
11
|
borderless,
|
|
@@ -26,32 +20,49 @@ const ClayTable = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
26
20
|
striped = true,
|
|
27
21
|
tableVerticalAlignment,
|
|
28
22
|
...otherProps
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
23
|
+
}, ref) => {
|
|
24
|
+
return /* @__PURE__ */ React.createElement(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
className: classNames({
|
|
28
|
+
"table-responsive": responsive,
|
|
29
|
+
[`table-responsive-${responsiveSize}`]: responsiveSize
|
|
30
|
+
}),
|
|
31
|
+
ref
|
|
32
|
+
},
|
|
33
|
+
/* @__PURE__ */ React.createElement(
|
|
34
|
+
"table",
|
|
35
|
+
{
|
|
36
|
+
className: classNames(
|
|
37
|
+
"table table-autofit",
|
|
38
|
+
{
|
|
39
|
+
"show-quick-actions-on-hover": hover,
|
|
40
|
+
"table-bordered": borderedColumns,
|
|
41
|
+
"table-heading-nowrap": headingNoWrap,
|
|
42
|
+
"table-hover": hover,
|
|
43
|
+
"table-list table-head-bordered": !borderless,
|
|
44
|
+
"table-nowrap": noWrap,
|
|
45
|
+
"table-striped": striped,
|
|
46
|
+
[`tbody-valign-${bodyVerticalAlignment}`]: bodyVerticalAlignment,
|
|
47
|
+
[`thead-valign-${headVerticalAlignment}`]: headVerticalAlignment,
|
|
48
|
+
[`table-valign-${tableVerticalAlignment}`]: tableVerticalAlignment
|
|
49
|
+
},
|
|
50
|
+
className
|
|
51
|
+
),
|
|
52
|
+
...otherProps
|
|
53
|
+
},
|
|
54
|
+
children
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
ClayTable.displayName = "ClayTable";
|
|
60
|
+
var src_default = Object.assign(ClayTable, {
|
|
53
61
|
Body,
|
|
54
62
|
Cell,
|
|
55
63
|
Head,
|
|
56
64
|
Row
|
|
57
|
-
});
|
|
65
|
+
});
|
|
66
|
+
export {
|
|
67
|
+
src_default as default
|
|
68
|
+
};
|
package/lib/esm/types.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SPDX-FileCopyrightText:
|
|
3
|
-
* SPDX-License-Identifier:
|
|
2
|
+
* SPDX-FileCopyrightText: (c) 2026 Liferay, Inc. https://liferay.com
|
|
3
|
+
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
declare type ResposiveSizeType = 'lg' | 'md' | 'sm' | 'xl';
|
|
@@ -19,15 +19,15 @@ export interface IProps extends React.HTMLAttributes<HTMLTableElement> {
|
|
|
19
19
|
* Removes the default border and rounded corners from table.
|
|
20
20
|
*/
|
|
21
21
|
borderless?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* This property keeps all the headings on one line.
|
|
24
|
-
*/
|
|
25
|
-
headingNoWrap?: boolean;
|
|
26
22
|
/**
|
|
27
23
|
* This property vertically align the contents
|
|
28
24
|
* inside the table header according a given position.
|
|
29
25
|
*/
|
|
30
26
|
headVerticalAlignment?: VerticalAlignmentType;
|
|
27
|
+
/**
|
|
28
|
+
* This property keeps all the headings on one line.
|
|
29
|
+
*/
|
|
30
|
+
headingNoWrap?: boolean;
|
|
31
31
|
/**
|
|
32
32
|
* Applies a Hover style on Table.
|
|
33
33
|
*/
|
package/lib/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SPDX-FileCopyrightText:
|
|
3
|
-
* SPDX-License-Identifier:
|
|
2
|
+
* SPDX-FileCopyrightText: (c) 2026 Liferay, Inc. https://liferay.com
|
|
3
|
+
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
|
|
4
4
|
*/
|
|
5
5
|
export declare type TDelimiter = 'start' | 'end';
|
package/package.json
CHANGED
|
@@ -1,44 +1,43 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
"main": "lib/cjs/index.js",
|
|
8
|
-
"module": "lib/esm/index.js",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./lib/index.d.ts",
|
|
12
|
-
"import": "./lib/esm/index.js",
|
|
13
|
-
"require": "./lib/cjs/index.js"
|
|
14
|
-
}
|
|
2
|
+
"browserslist": [
|
|
3
|
+
"extends browserslist-config-clay"
|
|
4
|
+
],
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"classnames": "2.3.1"
|
|
15
7
|
},
|
|
16
|
-
"
|
|
17
|
-
"ts:main": "src/index.tsx",
|
|
8
|
+
"description": "ClayTable component",
|
|
18
9
|
"files": [
|
|
19
10
|
"lib"
|
|
20
11
|
],
|
|
21
|
-
"scripts": {
|
|
22
|
-
"build": "yarn build:cjs && yarn build:esm",
|
|
23
|
-
"build:cjs": "cross-env NODE_ENV=production babel src --root-mode upward --out-dir lib/cjs --extensions .ts,.tsx",
|
|
24
|
-
"build:esm": "cross-env NODE_ENV=production babel src --root-mode upward --out-dir lib/esm --extensions .ts,.tsx --env-name esm",
|
|
25
|
-
"buildTypes": "cross-env NODE_ENV=production tsc --project ./tsconfig.declarations.json",
|
|
26
|
-
"test": "jest --config ../../jest.config.js"
|
|
27
|
-
},
|
|
28
12
|
"keywords": [
|
|
29
13
|
"clay",
|
|
30
14
|
"react"
|
|
31
15
|
],
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
16
|
+
"license": "BSD-3-Clause",
|
|
17
|
+
"main": "lib/cjs/index.js",
|
|
18
|
+
"name": "@clayui/table",
|
|
35
19
|
"peerDependencies": {
|
|
36
|
-
"@clayui/css": "3.
|
|
20
|
+
"@clayui/css": "^3.158.0",
|
|
37
21
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
|
|
38
22
|
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0"
|
|
39
23
|
},
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
24
|
+
"repository": "https://github.com/liferay/clay",
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "yarn build:cjs && yarn build:esm",
|
|
27
|
+
"build:cjs": "cross-env NODE_ENV=production node ../build-package-esbuild.js --format=cjs --outdir=lib/cjs",
|
|
28
|
+
"build:esm": "cross-env NODE_ENV=production node ../build-package-esbuild.js --format=esm --outdir=lib/esm",
|
|
29
|
+
"buildTypes": "cross-env NODE_ENV=production tsc --project ./tsconfig.declarations.json",
|
|
30
|
+
"test": "jest --config ../../jest.config.js"
|
|
31
|
+
},
|
|
32
|
+
"version": "3.158.0",
|
|
33
|
+
"module": "lib/esm/index.js",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./lib/index.d.ts",
|
|
37
|
+
"import": "./lib/esm/index.js",
|
|
38
|
+
"require": "./lib/cjs/index.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"types": "lib/index.d.ts",
|
|
42
|
+
"ts:main": "src/index.tsx"
|
|
44
43
|
}
|