@clayui/label 3.4.0 → 3.38.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/lib/index.js CHANGED
@@ -13,6 +13,12 @@ var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
14
  var _react = _interopRequireDefault(require("react"));
15
15
 
16
+ var _excluded = ["children", "className"],
17
+ _excluded2 = ["children", "className"],
18
+ _excluded3 = ["children", "className", "href"],
19
+ _excluded4 = ["children", "className", "dismissible", "displayType", "large"],
20
+ _excluded5 = ["children", "closeButtonProps", "href", "innerElementProps", "withClose", "spritemap"];
21
+
16
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
23
 
18
24
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -26,7 +32,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
26
32
  var ClayLabelItemAfter = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
27
33
  var children = _ref.children,
28
34
  className = _ref.className,
29
- otherProps = _objectWithoutProperties(_ref, ["children", "className"]);
35
+ otherProps = _objectWithoutProperties(_ref, _excluded);
30
36
 
31
37
  return /*#__PURE__*/_react.default.createElement("span", _extends({}, otherProps, {
32
38
  className: (0, _classnames.default)(className, 'label-item label-item-after'),
@@ -39,7 +45,7 @@ ClayLabelItemAfter.displayName = 'ClayLabelItemAfter';
39
45
  var ClayLabelItemBefore = /*#__PURE__*/_react.default.forwardRef(function (_ref2, ref) {
40
46
  var children = _ref2.children,
41
47
  className = _ref2.className,
42
- otherProps = _objectWithoutProperties(_ref2, ["children", "className"]);
48
+ otherProps = _objectWithoutProperties(_ref2, _excluded2);
43
49
 
44
50
  return /*#__PURE__*/_react.default.createElement("span", _extends({}, otherProps, {
45
51
  className: (0, _classnames.default)(className, 'label-item label-item-before'),
@@ -53,7 +59,7 @@ var ClayLabelItemExpand = /*#__PURE__*/_react.default.forwardRef(function (_ref3
53
59
  var children = _ref3.children,
54
60
  className = _ref3.className,
55
61
  href = _ref3.href,
56
- otherProps = _objectWithoutProperties(_ref3, ["children", "className", "href"]);
62
+ otherProps = _objectWithoutProperties(_ref3, _excluded3);
57
63
 
58
64
  var TagName = href ? _link.default : 'span';
59
65
  return /*#__PURE__*/_react.default.createElement(TagName, _extends({}, otherProps, {
@@ -73,7 +79,7 @@ var ClayLabel = /*#__PURE__*/_react.default.forwardRef(function (_ref4, ref) {
73
79
  displayType = _ref4$displayType === void 0 ? 'secondary' : _ref4$displayType,
74
80
  _ref4$large = _ref4.large,
75
81
  large = _ref4$large === void 0 ? false : _ref4$large,
76
- otherProps = _objectWithoutProperties(_ref4, ["children", "className", "dismissible", "displayType", "large"]);
82
+ otherProps = _objectWithoutProperties(_ref4, _excluded4);
77
83
 
78
84
  return /*#__PURE__*/_react.default.createElement("span", _extends({}, otherProps, {
79
85
  className: (0, _classnames.default)('label', className, _defineProperty({
@@ -95,7 +101,7 @@ var ClayLabelHybrid = /*#__PURE__*/_react.default.forwardRef(function (_ref5, re
95
101
  _ref5$withClose = _ref5.withClose,
96
102
  withClose = _ref5$withClose === void 0 ? true : _ref5$withClose,
97
103
  spritemap = _ref5.spritemap,
98
- otherProps = _objectWithoutProperties(_ref5, ["children", "closeButtonProps", "href", "innerElementProps", "withClose", "spritemap"]);
104
+ otherProps = _objectWithoutProperties(_ref5, _excluded5);
99
105
 
100
106
  return /*#__PURE__*/_react.default.createElement(ClayLabel, _extends({
101
107
  dismissible: withClose && !!closeButtonProps
@@ -108,7 +114,7 @@ var ClayLabelHybrid = /*#__PURE__*/_react.default.forwardRef(function (_ref5, re
108
114
  type: "button"
109
115
  }), /*#__PURE__*/_react.default.createElement(_icon.default, {
110
116
  spritemap: spritemap,
111
- symbol: "times"
117
+ symbol: "times-small"
112
118
  })))));
113
119
  });
114
120
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clayui/label",
3
- "version": "3.4.0",
3
+ "version": "3.38.0",
4
4
  "description": "ClayLabel component",
5
5
  "license": "BSD-3-Clause",
6
6
  "repository": "https://github.com/liferay/clay",
@@ -26,17 +26,17 @@
26
26
  "react"
27
27
  ],
28
28
  "dependencies": {
29
- "@clayui/icon": "^3.1.0",
30
- "@clayui/link": "^3.2.0",
29
+ "@clayui/icon": "^3.38.0",
30
+ "@clayui/link": "^3.38.0",
31
31
  "classnames": "^2.2.6"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@clayui/css": "3.x",
35
- "react": "^16.8.1",
36
- "react-dom": "^16.8.1"
35
+ "react": "^16.12.0",
36
+ "react-dom": "^16.12.0"
37
37
  },
38
38
  "browserslist": [
39
39
  "extends browserslist-config-clay"
40
40
  ],
41
- "gitHead": "b4365d2a98a7d6a5aa2383daaa6f7a633f4f23c2"
41
+ "gitHead": "7bd99c6d432b6973d76b7003e64ed72e42879a8b"
42
42
  }
@@ -44,11 +44,11 @@ exports[`Rendering renders as a link and closable 1`] = `
44
44
  type="button"
45
45
  >
46
46
  <svg
47
- className="lexicon-icon lexicon-icon-times"
47
+ className="lexicon-icon lexicon-icon-times-small"
48
48
  role="presentation"
49
49
  >
50
50
  <use
51
- xlinkHref="path/to/spritemap#times"
51
+ xlinkHref="path/to/spritemap#times-small"
52
52
  />
53
53
  </svg>
54
54
  </button>
@@ -74,11 +74,11 @@ exports[`Rendering renders as closable 1`] = `
74
74
  type="button"
75
75
  >
76
76
  <svg
77
- className="lexicon-icon lexicon-icon-times"
77
+ className="lexicon-icon lexicon-icon-times-small"
78
78
  role="presentation"
79
79
  >
80
80
  <use
81
- xlinkHref="path/to/spritemap#times"
81
+ xlinkHref="path/to/spritemap#times-small"
82
82
  />
83
83
  </svg>
84
84
  </button>
@@ -13,7 +13,7 @@ const spritemap = 'path/to/spritemap';
13
13
  describe('Rendering', () => {
14
14
  it('default', () => {
15
15
  const testRenderer = TestRenderer.create(
16
- <ClayLabel>{'Default Label'}</ClayLabel>
16
+ <ClayLabel>Default Label</ClayLabel>
17
17
  );
18
18
 
19
19
  expect(testRenderer.toJSON()).toMatchSnapshot();
@@ -21,7 +21,7 @@ describe('Rendering', () => {
21
21
 
22
22
  it('with a different displayType ', () => {
23
23
  const testRenderer = TestRenderer.create(
24
- <ClayLabel displayType="success">{'Success Label'}</ClayLabel>
24
+ <ClayLabel displayType="success">Success Label</ClayLabel>
25
25
  );
26
26
 
27
27
  expect(testRenderer.toJSON()).toMatchSnapshot();
@@ -29,7 +29,7 @@ describe('Rendering', () => {
29
29
 
30
30
  it('as a link ', () => {
31
31
  const testRenderer = TestRenderer.create(
32
- <ClayLabel href="#/foo/bar">{'Label w/ link'}</ClayLabel>
32
+ <ClayLabel href="#/foo/bar">Label w/ link</ClayLabel>
33
33
  );
34
34
 
35
35
  expect(testRenderer.toJSON()).toMatchSnapshot();
@@ -43,7 +43,7 @@ describe('Rendering', () => {
43
43
  }}
44
44
  spritemap={spritemap}
45
45
  >
46
- {'Label Closable'}
46
+ Label Closable
47
47
  </ClayLabel>
48
48
  );
49
49
 
@@ -59,7 +59,7 @@ describe('Rendering', () => {
59
59
  href="#/foo/bar"
60
60
  spritemap={spritemap}
61
61
  >
62
- {'Label Closable'}
62
+ Label Closable
63
63
  </ClayLabel>
64
64
  );
65
65
 
@@ -69,8 +69,8 @@ describe('Rendering', () => {
69
69
  it('renders with ItemBefore', () => {
70
70
  const testRenderer = TestRenderer.create(
71
71
  <ClayLabel withClose={false}>
72
- <ClayLabel.ItemBefore>{'Content before'}</ClayLabel.ItemBefore>
73
- <ClayLabel.ItemExpand>{'Label'}</ClayLabel.ItemExpand>
72
+ <ClayLabel.ItemBefore>Content before</ClayLabel.ItemBefore>
73
+ <ClayLabel.ItemExpand>Label</ClayLabel.ItemExpand>
74
74
  </ClayLabel>
75
75
  );
76
76
 
@@ -80,8 +80,8 @@ describe('Rendering', () => {
80
80
  it('renders with ItemAfter', () => {
81
81
  const testRenderer = TestRenderer.create(
82
82
  <ClayLabel withClose={false}>
83
- <ClayLabel.ItemExpand>{'Label'}</ClayLabel.ItemExpand>
84
- <ClayLabel.ItemAfter>{'Content after'}</ClayLabel.ItemAfter>
83
+ <ClayLabel.ItemExpand>Label</ClayLabel.ItemExpand>
84
+ <ClayLabel.ItemAfter>Content after</ClayLabel.ItemAfter>
85
85
  </ClayLabel>
86
86
  );
87
87
 
package/src/index.tsx CHANGED
@@ -179,7 +179,7 @@ const ClayLabelHybrid = React.forwardRef<
179
179
  >
180
180
  <ClayIcon
181
181
  spritemap={spritemap}
182
- symbol="times"
182
+ symbol="times-small"
183
183
  />
184
184
  </button>
185
185
  </ClayLabelItemAfter>
package/CHANGELOG.md DELETED
@@ -1,59 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [3.4.0](https://github.com/liferay/clay/compare/@clayui/label@3.3.1...@clayui/label@3.4.0) (2020-10-01)
7
-
8
- ### Features
9
-
10
- - **clayui.com:** Add JSP code example to Label ([e90068e](https://github.com/liferay/clay/commit/e90068e))
11
- - **clayui.com:** Move API tables to new files and update document tabs, rename files to use singular naming instead of plural, change mainTabURL of pagination-bar to a proper one ([d812ee9](https://github.com/liferay/clay/commit/d812ee9))
12
- - add displayName for all components ([cc3211d](https://github.com/liferay/clay/commit/cc3211d))
13
-
14
- ## [3.3.1](https://github.com/liferay/clay/compare/@clayui/label@3.3.0...@clayui/label@3.3.1) (2020-06-18)
15
-
16
- **Note:** Version bump only for package @clayui/label
17
-
18
- # [3.3.0](https://github.com/liferay/clay/compare/@clayui/label@3.2.0...@clayui/label@3.3.0) (2020-04-24)
19
-
20
- ### Features
21
-
22
- - **@clayui/label:** Attempt at ClayLabel contentBefore prop ([cd634e2](https://github.com/liferay/clay/commit/cd634e2))
23
- - **@clayui/label:** use a hybrid API appraoch to expose low-level components ([deffd0e](https://github.com/liferay/clay/commit/deffd0e))
24
-
25
- # [3.2.0](https://github.com/liferay/clay/tree/master/packages/clay-label/compare/@clayui/label@3.1.1...@clayui/label@3.2.0) (2020-03-26)
26
-
27
- ### Features
28
-
29
- - **@clayui/label:** add prop for inner element attributes ([2d1f489](https://github.com/liferay/clay/commit/2d1f489))
30
-
31
- ## [3.1.1](https://github.com/liferay/clay/tree/master/packages/clay-label/compare/@clayui/label@3.1.0...@clayui/label@3.1.1) (2020-03-12)
32
-
33
- ### Bug Fixes
34
-
35
- - **@clayui/label:** use ClayLink over anchor tag ([746487f](https://github.com/liferay/clay/commit/746487f))
36
-
37
- # 3.1.0 (2020-02-28)
38
-
39
- ### Bug Fixes
40
-
41
- - update components to include 'types' and 'ts:main' package keys ([9e24b59](https://github.com/liferay/clay/commit/9e24b59))
42
-
43
- ### Features
44
-
45
- - **clay-form:** create high-level multi-select component ([feb3abc](https://github.com/liferay/clay/commit/feb3abc))
46
- - added template demos ([c2f1064](https://github.com/liferay/clay/commit/c2f1064))
47
- - update react-testing-library to be @testing-library/react ([bd78145](https://github.com/liferay/clay/commit/bd78145))
48
-
49
- ## [3.0.3](https://github.com/liferay/clay/tree/master/packages/clay-label/compare/@clayui/label@3.0.1...@clayui/label@3.0.3) (2020-01-31)
50
-
51
- **Note:** Version bump only for package @clayui/label
52
-
53
- ## [3.0.2](https://github.com/liferay/clay/tree/master/packages/clay-label/compare/@clayui/label@3.0.1...@clayui/label@3.0.2) (2020-01-20)
54
-
55
- **Note:** Version bump only for package @clayui/label
56
-
57
- ## [3.0.1](https://github.com/liferay/clay/tree/master/packages/clay-label/compare/@clayui/label@3.0.0...@clayui/label@3.0.1) (2019-10-28)
58
-
59
- **Note:** Version bump only for package @clayui/label