@clayui/label 3.156.0 → 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/cjs/index.js +125 -84
- package/lib/esm/index.js +97 -81
- package/lib/index.d.ts +5 -5
- package/package.json +31 -32
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Labels are a visual pattern used to categorize information providing quick and easy recognition.
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
5
|
+
- [Documentation](https://clayui.com/docs/components/label.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/label
|
|
|
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/cjs/index.js
CHANGED
|
@@ -1,78 +1,104 @@
|
|
|
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
|
+
ItemAfter: () => ItemAfter,
|
|
32
|
+
ItemBefore: () => ItemBefore,
|
|
33
|
+
ItemExpand: () => ItemExpand,
|
|
34
|
+
default: () => src_default
|
|
5
35
|
});
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
module.exports = __toCommonJS(src_exports);
|
|
37
|
+
var import_icon = __toESM(require("@clayui/icon"));
|
|
38
|
+
var import_link = __toESM(require("@clayui/link"));
|
|
39
|
+
var import_classnames = __toESM(require("classnames"));
|
|
40
|
+
var import_react = __toESM(require("react"));
|
|
41
|
+
const ItemAfter = import_react.default.forwardRef(({ children, className, ...otherProps }, ref) => /* @__PURE__ */ import_react.default.createElement(
|
|
42
|
+
"span",
|
|
43
|
+
{
|
|
44
|
+
...otherProps,
|
|
45
|
+
className: (0, import_classnames.default)(className, "label-item label-item-after"),
|
|
46
|
+
ref
|
|
47
|
+
},
|
|
48
|
+
children
|
|
49
|
+
));
|
|
50
|
+
ItemAfter.displayName = "ClayLabelItemAfter";
|
|
51
|
+
const ItemBefore = import_react.default.forwardRef(({ children, className, ...otherProps }, ref) => /* @__PURE__ */ import_react.default.createElement(
|
|
52
|
+
"span",
|
|
53
|
+
{
|
|
54
|
+
...otherProps,
|
|
55
|
+
className: (0, import_classnames.default)(className, "label-item label-item-before"),
|
|
56
|
+
ref
|
|
57
|
+
},
|
|
58
|
+
children
|
|
59
|
+
));
|
|
60
|
+
ItemBefore.displayName = "ClayLabelItemBefore";
|
|
61
|
+
const ItemExpand = import_react.default.forwardRef(({ children, className, href, ...otherProps }, ref) => {
|
|
62
|
+
const TagName = href ? import_link.default : "span";
|
|
63
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
64
|
+
TagName,
|
|
65
|
+
{
|
|
66
|
+
...otherProps,
|
|
67
|
+
className: (0, import_classnames.default)(className, "label-item label-item-expand"),
|
|
68
|
+
href,
|
|
69
|
+
ref
|
|
70
|
+
},
|
|
71
|
+
children
|
|
72
|
+
);
|
|
38
73
|
});
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
children,
|
|
43
|
-
className,
|
|
44
|
-
href,
|
|
45
|
-
...otherProps
|
|
46
|
-
} = _ref3;
|
|
47
|
-
const TagName = href ? _link.default : 'span';
|
|
48
|
-
return /*#__PURE__*/_react.default.createElement(TagName, _extends({}, otherProps, {
|
|
49
|
-
className: (0, _classnames.default)(className, 'label-item label-item-expand'),
|
|
50
|
-
href: href,
|
|
51
|
-
ref: ref
|
|
52
|
-
}), children);
|
|
53
|
-
});
|
|
54
|
-
ItemExpand.displayName = 'ClayLabelItemExpand';
|
|
55
|
-
const OldLabel = /*#__PURE__*/_react.default.forwardRef((_ref4, ref) => {
|
|
56
|
-
let {
|
|
74
|
+
ItemExpand.displayName = "ClayLabelItemExpand";
|
|
75
|
+
const OldLabel = import_react.default.forwardRef(
|
|
76
|
+
({
|
|
57
77
|
children,
|
|
58
78
|
className,
|
|
59
79
|
dismissible,
|
|
60
|
-
displayType =
|
|
80
|
+
displayType = "secondary",
|
|
61
81
|
large = false,
|
|
62
82
|
...otherProps
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
83
|
+
}, ref) => {
|
|
84
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
85
|
+
"span",
|
|
86
|
+
{
|
|
87
|
+
...otherProps,
|
|
88
|
+
className: (0, import_classnames.default)("label", className, {
|
|
89
|
+
"label-dismissible": dismissible,
|
|
90
|
+
"label-lg": large,
|
|
91
|
+
[`label-${displayType}`]: displayType
|
|
92
|
+
}),
|
|
93
|
+
ref
|
|
94
|
+
},
|
|
95
|
+
children
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
OldLabel.displayName = "ClayLabel";
|
|
100
|
+
const LabelComponent = import_react.default.forwardRef(
|
|
101
|
+
({
|
|
76
102
|
children,
|
|
77
103
|
closeButtonProps,
|
|
78
104
|
href,
|
|
@@ -80,25 +106,40 @@ const LabelComponent = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
80
106
|
withClose = true,
|
|
81
107
|
spritemap,
|
|
82
108
|
...otherProps
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
109
|
+
}, ref) => {
|
|
110
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
111
|
+
OldLabel,
|
|
112
|
+
{
|
|
113
|
+
dismissible: withClose && !!closeButtonProps,
|
|
114
|
+
...otherProps,
|
|
115
|
+
ref
|
|
116
|
+
},
|
|
117
|
+
!withClose && children,
|
|
118
|
+
withClose && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(ItemExpand, { ...innerElementProps, href }, children), closeButtonProps && /* @__PURE__ */ import_react.default.createElement(ItemAfter, null, /* @__PURE__ */ import_react.default.createElement(
|
|
119
|
+
"button",
|
|
120
|
+
{
|
|
121
|
+
...closeButtonProps,
|
|
122
|
+
className: (0, import_classnames.default)(
|
|
123
|
+
closeButtonProps.className,
|
|
124
|
+
"close"
|
|
125
|
+
),
|
|
126
|
+
type: "button"
|
|
127
|
+
},
|
|
128
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
129
|
+
import_icon.default,
|
|
130
|
+
{
|
|
131
|
+
spritemap,
|
|
132
|
+
symbol: "times-small"
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
)))
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
LabelComponent.displayName = "ClayLabel";
|
|
99
140
|
const Label = Object.assign(LabelComponent, {
|
|
100
141
|
ItemAfter,
|
|
101
142
|
ItemBefore,
|
|
102
143
|
ItemExpand
|
|
103
144
|
});
|
|
104
|
-
var
|
|
145
|
+
var src_default = Label;
|
package/lib/esm/index.js
CHANGED
|
@@ -1,73 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
children,
|
|
38
|
-
className,
|
|
39
|
-
href,
|
|
40
|
-
...otherProps
|
|
41
|
-
} = _ref3;
|
|
42
|
-
const TagName = href ? ClayLink : 'span';
|
|
43
|
-
return /*#__PURE__*/React.createElement(TagName, _extends({}, otherProps, {
|
|
44
|
-
className: classNames(className, 'label-item label-item-expand'),
|
|
45
|
-
href: href,
|
|
46
|
-
ref: ref
|
|
47
|
-
}), children);
|
|
1
|
+
import ClayIcon from "@clayui/icon";
|
|
2
|
+
import ClayLink from "@clayui/link";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import React from "react";
|
|
5
|
+
const ItemAfter = React.forwardRef(({ children, className, ...otherProps }, ref) => /* @__PURE__ */ React.createElement(
|
|
6
|
+
"span",
|
|
7
|
+
{
|
|
8
|
+
...otherProps,
|
|
9
|
+
className: classNames(className, "label-item label-item-after"),
|
|
10
|
+
ref
|
|
11
|
+
},
|
|
12
|
+
children
|
|
13
|
+
));
|
|
14
|
+
ItemAfter.displayName = "ClayLabelItemAfter";
|
|
15
|
+
const ItemBefore = React.forwardRef(({ children, className, ...otherProps }, ref) => /* @__PURE__ */ React.createElement(
|
|
16
|
+
"span",
|
|
17
|
+
{
|
|
18
|
+
...otherProps,
|
|
19
|
+
className: classNames(className, "label-item label-item-before"),
|
|
20
|
+
ref
|
|
21
|
+
},
|
|
22
|
+
children
|
|
23
|
+
));
|
|
24
|
+
ItemBefore.displayName = "ClayLabelItemBefore";
|
|
25
|
+
const ItemExpand = React.forwardRef(({ children, className, href, ...otherProps }, ref) => {
|
|
26
|
+
const TagName = href ? ClayLink : "span";
|
|
27
|
+
return /* @__PURE__ */ React.createElement(
|
|
28
|
+
TagName,
|
|
29
|
+
{
|
|
30
|
+
...otherProps,
|
|
31
|
+
className: classNames(className, "label-item label-item-expand"),
|
|
32
|
+
href,
|
|
33
|
+
ref
|
|
34
|
+
},
|
|
35
|
+
children
|
|
36
|
+
);
|
|
48
37
|
});
|
|
49
|
-
ItemExpand.displayName =
|
|
50
|
-
const OldLabel =
|
|
51
|
-
|
|
38
|
+
ItemExpand.displayName = "ClayLabelItemExpand";
|
|
39
|
+
const OldLabel = React.forwardRef(
|
|
40
|
+
({
|
|
52
41
|
children,
|
|
53
42
|
className,
|
|
54
43
|
dismissible,
|
|
55
|
-
displayType =
|
|
44
|
+
displayType = "secondary",
|
|
56
45
|
large = false,
|
|
57
46
|
...otherProps
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
47
|
+
}, ref) => {
|
|
48
|
+
return /* @__PURE__ */ React.createElement(
|
|
49
|
+
"span",
|
|
50
|
+
{
|
|
51
|
+
...otherProps,
|
|
52
|
+
className: classNames("label", className, {
|
|
53
|
+
"label-dismissible": dismissible,
|
|
54
|
+
"label-lg": large,
|
|
55
|
+
[`label-${displayType}`]: displayType
|
|
56
|
+
}),
|
|
57
|
+
ref
|
|
58
|
+
},
|
|
59
|
+
children
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
OldLabel.displayName = "ClayLabel";
|
|
64
|
+
const LabelComponent = React.forwardRef(
|
|
65
|
+
({
|
|
71
66
|
children,
|
|
72
67
|
closeButtonProps,
|
|
73
68
|
href,
|
|
@@ -75,25 +70,46 @@ const LabelComponent = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
75
70
|
withClose = true,
|
|
76
71
|
spritemap,
|
|
77
72
|
...otherProps
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
73
|
+
}, ref) => {
|
|
74
|
+
return /* @__PURE__ */ React.createElement(
|
|
75
|
+
OldLabel,
|
|
76
|
+
{
|
|
77
|
+
dismissible: withClose && !!closeButtonProps,
|
|
78
|
+
...otherProps,
|
|
79
|
+
ref
|
|
80
|
+
},
|
|
81
|
+
!withClose && children,
|
|
82
|
+
withClose && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(ItemExpand, { ...innerElementProps, href }, children), closeButtonProps && /* @__PURE__ */ React.createElement(ItemAfter, null, /* @__PURE__ */ React.createElement(
|
|
83
|
+
"button",
|
|
84
|
+
{
|
|
85
|
+
...closeButtonProps,
|
|
86
|
+
className: classNames(
|
|
87
|
+
closeButtonProps.className,
|
|
88
|
+
"close"
|
|
89
|
+
),
|
|
90
|
+
type: "button"
|
|
91
|
+
},
|
|
92
|
+
/* @__PURE__ */ React.createElement(
|
|
93
|
+
ClayIcon,
|
|
94
|
+
{
|
|
95
|
+
spritemap,
|
|
96
|
+
symbol: "times-small"
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
)))
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
LabelComponent.displayName = "ClayLabel";
|
|
94
104
|
const Label = Object.assign(LabelComponent, {
|
|
95
105
|
ItemAfter,
|
|
96
106
|
ItemBefore,
|
|
97
107
|
ItemExpand
|
|
98
108
|
});
|
|
99
|
-
|
|
109
|
+
var src_default = Label;
|
|
110
|
+
export {
|
|
111
|
+
ItemAfter,
|
|
112
|
+
ItemBefore,
|
|
113
|
+
ItemExpand,
|
|
114
|
+
src_default as default
|
|
115
|
+
};
|
package/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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
|
export declare const ItemAfter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
7
7
|
export declare const ItemBefore: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
8
|
-
export declare const ItemExpand: React.ForwardRefExoticComponent<React.BaseHTMLAttributes<
|
|
8
|
+
export declare const ItemExpand: React.ForwardRefExoticComponent<React.BaseHTMLAttributes<HTMLAnchorElement | HTMLSpanElement> & React.RefAttributes<HTMLAnchorElement | HTMLSpanElement>>;
|
|
9
9
|
interface IBaseProps extends React.BaseHTMLAttributes<HTMLSpanElement> {
|
|
10
10
|
/**
|
|
11
11
|
* Flag to indicate if `label-dismissible` class should be applied.
|
|
@@ -40,9 +40,9 @@ interface IProps extends IBaseProps {
|
|
|
40
40
|
*/
|
|
41
41
|
withClose?: boolean;
|
|
42
42
|
}
|
|
43
|
-
declare const Label: React.ForwardRefExoticComponent<IProps & React.RefAttributes<
|
|
43
|
+
declare const Label: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLAnchorElement | HTMLSpanElement>> & {
|
|
44
44
|
ItemAfter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
45
45
|
ItemBefore: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
46
|
-
ItemExpand: React.ForwardRefExoticComponent<React.BaseHTMLAttributes<
|
|
46
|
+
ItemExpand: React.ForwardRefExoticComponent<React.BaseHTMLAttributes<HTMLAnchorElement | HTMLSpanElement> & React.RefAttributes<HTMLAnchorElement | HTMLSpanElement>>;
|
|
47
47
|
};
|
|
48
48
|
export default Label;
|
package/package.json
CHANGED
|
@@ -1,46 +1,45 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
+
"@clayui/icon": "^3.158.0",
|
|
7
|
+
"@clayui/link": "^3.158.0",
|
|
8
|
+
"classnames": "2.3.1"
|
|
15
9
|
},
|
|
16
|
-
"
|
|
17
|
-
"ts:main": "src/index.tsx",
|
|
10
|
+
"description": "ClayLabel component",
|
|
18
11
|
"files": [
|
|
19
12
|
"lib"
|
|
20
13
|
],
|
|
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": "tsc --project ./tsconfig.declarations.json",
|
|
26
|
-
"test": "jest --config ../../jest.config.js"
|
|
27
|
-
},
|
|
28
14
|
"keywords": [
|
|
29
15
|
"clay",
|
|
30
16
|
"react"
|
|
31
17
|
],
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"classnames": "^2.2.6"
|
|
36
|
-
},
|
|
18
|
+
"license": "BSD-3-Clause",
|
|
19
|
+
"main": "lib/cjs/index.js",
|
|
20
|
+
"name": "@clayui/label",
|
|
37
21
|
"peerDependencies": {
|
|
38
|
-
"@clayui/css": "3.
|
|
22
|
+
"@clayui/css": "^3.158.0",
|
|
39
23
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
|
|
40
24
|
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0"
|
|
41
25
|
},
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
26
|
+
"repository": "https://github.com/liferay/clay",
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "yarn build:cjs && yarn build:esm",
|
|
29
|
+
"build:cjs": "cross-env NODE_ENV=production node ../build-package-esbuild.js --format=cjs --outdir=lib/cjs",
|
|
30
|
+
"build:esm": "cross-env NODE_ENV=production node ../build-package-esbuild.js --format=esm --outdir=lib/esm",
|
|
31
|
+
"buildTypes": "tsc --project ./tsconfig.declarations.json",
|
|
32
|
+
"test": "jest --config ../../jest.config.js"
|
|
33
|
+
},
|
|
34
|
+
"version": "3.158.0",
|
|
35
|
+
"module": "lib/esm/index.js",
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"types": "./lib/index.d.ts",
|
|
39
|
+
"import": "./lib/esm/index.js",
|
|
40
|
+
"require": "./lib/cjs/index.js"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"types": "lib/index.d.ts",
|
|
44
|
+
"ts:main": "src/index.tsx"
|
|
46
45
|
}
|