@clayui/tabs 3.37.0 → 3.45.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/Content.js CHANGED
@@ -9,11 +9,13 @@ var _classnames = _interopRequireDefault(require("classnames"));
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
+ var _excluded = ["activeIndex", "children", "className", "fade"];
13
+
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
 
14
16
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
17
 
16
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
18
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
17
19
 
18
20
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
19
21
 
@@ -30,7 +32,7 @@ var Content = function Content(_ref) {
30
32
  className = _ref.className,
31
33
  _ref$fade = _ref.fade,
32
34
  fade = _ref$fade === void 0 ? false : _ref$fade,
33
- otherProps = _objectWithoutProperties(_ref, ["activeIndex", "children", "className", "fade"]);
35
+ otherProps = _objectWithoutProperties(_ref, _excluded);
34
36
 
35
37
  return /*#__PURE__*/_react.default.createElement("div", _extends({
36
38
  className: (0, _classnames.default)('tab-content', className)
package/lib/Item.js CHANGED
@@ -11,6 +11,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
12
  var _react = _interopRequireDefault(require("react"));
13
13
 
14
+ var _excluded = ["active", "children", "className", "disabled", "href", "innerProps", "onClick"];
15
+
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
17
 
16
18
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -30,7 +32,7 @@ var Item = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
30
32
  _ref$innerProps = _ref.innerProps,
31
33
  innerProps = _ref$innerProps === void 0 ? {} : _ref$innerProps,
32
34
  onClick = _ref.onClick,
33
- otherProps = _objectWithoutProperties(_ref, ["active", "children", "className", "disabled", "href", "innerProps", "onClick"]);
35
+ otherProps = _objectWithoutProperties(_ref, _excluded);
34
36
 
35
37
  return /*#__PURE__*/_react.default.createElement("li", _extends({}, otherProps, {
36
38
  className: (0, _classnames.default)('nav-item', className)
package/lib/TabPane.js CHANGED
@@ -9,6 +9,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
+ var _excluded = ["active", "children", "className", "fade"];
13
+
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
 
14
16
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -21,7 +23,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
21
23
 
22
24
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
23
25
 
24
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
26
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
25
27
 
26
28
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
29
 
@@ -42,7 +44,7 @@ var TabPane = function TabPane(_ref) {
42
44
  children = _ref.children,
43
45
  className = _ref.className,
44
46
  fade = _ref.fade,
45
- otherProps = _objectWithoutProperties(_ref, ["active", "children", "className", "fade"]);
47
+ otherProps = _objectWithoutProperties(_ref, _excluded);
46
48
 
47
49
  var _React$useState = _react.default.useState(active),
48
50
  _React$useState2 = _slicedToArray(_React$useState, 2),
package/lib/index.js CHANGED
@@ -15,6 +15,8 @@ var _Item = _interopRequireDefault(require("./Item"));
15
15
 
16
16
  var _TabPane = _interopRequireDefault(require("./TabPane"));
17
17
 
18
+ var _excluded = ["children", "className", "justified", "modern"];
19
+
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
21
 
20
22
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -29,7 +31,7 @@ var ClayTabs = function ClayTabs(_ref) {
29
31
  justified = _ref.justified,
30
32
  _ref$modern = _ref.modern,
31
33
  modern = _ref$modern === void 0 ? true : _ref$modern,
32
- otherProps = _objectWithoutProperties(_ref, ["children", "className", "justified", "modern"]);
34
+ otherProps = _objectWithoutProperties(_ref, _excluded);
33
35
 
34
36
  return /*#__PURE__*/_react.default.createElement("ul", _extends({
35
37
  className: (0, _classnames.default)('nav', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clayui/tabs",
3
- "version": "3.37.0",
3
+ "version": "3.45.0",
4
4
  "description": "ClayTabs component",
5
5
  "license": "BSD-3-Clause",
6
6
  "repository": "https://github.com/liferay/clay",
@@ -26,7 +26,7 @@
26
26
  "react"
27
27
  ],
28
28
  "dependencies": {
29
- "@clayui/shared": "^3.37.0",
29
+ "@clayui/shared": "^3.45.0",
30
30
  "classnames": "^2.2.6"
31
31
  },
32
32
  "peerDependencies": {
@@ -37,5 +37,5 @@
37
37
  "browserslist": [
38
38
  "extends browserslist-config-clay"
39
39
  ],
40
- "gitHead": "0079c5f752a4c2fd2885e507d466bfd63fe57a9f"
40
+ "gitHead": "82d19a7d31a21a6bb4ac92a0d709b32fc19502e9"
41
41
  }
@@ -18,30 +18,30 @@ const ClayTabsWithItems = () => {
18
18
  active={activeTabKeyValue == 0}
19
19
  onClick={() => setActiveTabKeyValue(0)}
20
20
  >
21
- {'Dummy1'}
21
+ Dummy1
22
22
  </ClayTabs.Item>
23
23
  <ClayTabs.Item
24
24
  active={activeTabKeyValue == 1}
25
25
  data-testid="tabItem2"
26
26
  onClick={() => setActiveTabKeyValue(1)}
27
27
  >
28
- {'Dummy2'}
28
+ Dummy2
29
29
  </ClayTabs.Item>
30
30
  <ClayTabs.Item
31
31
  active={activeTabKeyValue == 2}
32
32
  onClick={() => setActiveTabKeyValue(2)}
33
33
  >
34
- {'Dummy3'}
34
+ Dummy3
35
35
  </ClayTabs.Item>
36
36
  </ClayTabs>
37
37
  <ClayTabs.Content activeIndex={activeTabKeyValue}>
38
38
  <ClayTabs.TabPane data-testid="tabPane1">
39
- {'Tab Content 1'}
39
+ Tab Content 1
40
40
  </ClayTabs.TabPane>
41
41
  <ClayTabs.TabPane data-testid="tabPane2">
42
- {'Tab Content 2'}
42
+ Tab Content 2
43
43
  </ClayTabs.TabPane>
44
- <ClayTabs.TabPane>{'Tab Content 3'}</ClayTabs.TabPane>
44
+ <ClayTabs.TabPane>Tab Content 3</ClayTabs.TabPane>
45
45
  </ClayTabs.Content>
46
46
  </>
47
47
  );
@@ -79,14 +79,14 @@ describe('ClayTabs', () => {
79
79
  <>
80
80
  <ClayTabs>
81
81
  <ClayTabs.Item active href="https://clay.dev/foo" />
82
- {'One'}
82
+ One
83
83
  <ClayTabs.Item href="https://clay.dev/bar">
84
- {'Two'}
84
+ Two
85
85
  </ClayTabs.Item>
86
86
  </ClayTabs>
87
87
  <ClayTabs.Content activeIndex={1}>
88
- <ClayTabs.TabPane>{'Content One'}</ClayTabs.TabPane>
89
- <ClayTabs.TabPane>{'Content Two'}</ClayTabs.TabPane>
88
+ <ClayTabs.TabPane>Content One</ClayTabs.TabPane>
89
+ <ClayTabs.TabPane>Content Two</ClayTabs.TabPane>
90
90
  </ClayTabs.Content>
91
91
  </>
92
92
  );
@@ -101,14 +101,14 @@ describe('ClayTabs', () => {
101
101
  const {getAllByTestId} = render(
102
102
  <>
103
103
  <ClayTabs>
104
- <ClayTabs.Item active>{'One'}</ClayTabs.Item>
105
- <ClayTabs.Item>{'Two'}</ClayTabs.Item>
106
- <ClayTabs.Item disabled>{'Three'}</ClayTabs.Item>
104
+ <ClayTabs.Item active>One</ClayTabs.Item>
105
+ <ClayTabs.Item>Two</ClayTabs.Item>
106
+ <ClayTabs.Item disabled>Three</ClayTabs.Item>
107
107
  </ClayTabs>
108
108
  <ClayTabs.Content activeIndex={1}>
109
- <ClayTabs.TabPane>{'Content One'}</ClayTabs.TabPane>
110
- <ClayTabs.TabPane>{'Content Two'}</ClayTabs.TabPane>
111
- <ClayTabs.TabPane>{'Content Three'}</ClayTabs.TabPane>
109
+ <ClayTabs.TabPane>Content One</ClayTabs.TabPane>
110
+ <ClayTabs.TabPane>Content Two</ClayTabs.TabPane>
111
+ <ClayTabs.TabPane>Content Three</ClayTabs.TabPane>
112
112
  </ClayTabs.Content>
113
113
  </>
114
114
  );
@@ -126,13 +126,13 @@ describe('ClayTabs', () => {
126
126
  <>
127
127
  <ClayTabs>
128
128
  <ClayTabs.Item active onClick={onClick}>
129
- {'One'}
129
+ One
130
130
  </ClayTabs.Item>
131
- <ClayTabs.Item onClick={onClick}>{'Two'}</ClayTabs.Item>
131
+ <ClayTabs.Item onClick={onClick}>Two</ClayTabs.Item>
132
132
  </ClayTabs>
133
133
  <ClayTabs.Content activeIndex={1}>
134
- <ClayTabs.TabPane>{'Content One'}</ClayTabs.TabPane>
135
- <ClayTabs.TabPane>{'Content Two'}</ClayTabs.TabPane>
134
+ <ClayTabs.TabPane>Content One</ClayTabs.TabPane>
135
+ <ClayTabs.TabPane>Content Two</ClayTabs.TabPane>
136
136
  </ClayTabs.Content>
137
137
  </>
138
138
  );
package/CHANGELOG.md DELETED
@@ -1,149 +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.37.0](https://github.com/liferay/clay/compare/v3.36.0...v3.37.0) (2021-10-06)
7
-
8
- **Note:** Version bump only for package @clayui/tabs
9
-
10
- # [3.36.0](https://github.com/liferay/clay/compare/v3.35.3...v3.36.0) (2021-09-23)
11
-
12
- **Note:** Version bump only for package @clayui/tabs
13
-
14
- ## [3.35.3](https://github.com/liferay/clay/compare/v3.35.2...v3.35.3) (2021-09-09)
15
-
16
- **Note:** Version bump only for package @clayui/tabs
17
-
18
- ## [3.35.2](https://github.com/liferay/clay/compare/v3.35.1...v3.35.2) (2021-08-30)
19
-
20
- **Note:** Version bump only for package @clayui/tabs
21
-
22
- ## [3.35.1](https://github.com/liferay/clay/compare/v3.35.0...v3.35.1) (2021-08-30)
23
-
24
- **Note:** Version bump only for package @clayui/tabs
25
-
26
- # [3.35.0](https://github.com/liferay/clay/compare/v3.34.0...v3.35.0) (2021-08-30)
27
-
28
- **Note:** Version bump only for package @clayui/tabs
29
-
30
- # [3.32.0](https://github.com/liferay/clay/compare/v3.31.0...v3.32.0) (2021-07-28)
31
-
32
- **Note:** Version bump only for package @clayui/tabs
33
-
34
- # [3.29.0](https://github.com/liferay/clay/compare/v3.28.0...v3.29.0) (2021-05-28)
35
-
36
- **Note:** Version bump only for package @clayui/tabs
37
-
38
- # [3.28.0](https://github.com/liferay/clay/compare/v3.27.0...v3.28.0) (2021-05-19)
39
-
40
- **Note:** Version bump only for package @clayui/tabs
41
-
42
- # [3.27.0](https://github.com/liferay/clay/compare/v3.26.0...v3.27.0) (2021-05-05)
43
-
44
- **Note:** Version bump only for package @clayui/tabs
45
-
46
- ## [3.3.5](https://github.com/liferay/clay/compare/@clayui/tabs@3.3.4...@clayui/tabs@3.3.5) (2021-02-11)
47
-
48
- **Note:** Version bump only for package @clayui/tabs
49
-
50
- ## [3.3.4](https://github.com/liferay/clay/compare/@clayui/tabs@3.3.3...@clayui/tabs@3.3.4) (2021-01-27)
51
-
52
- **Note:** Version bump only for package @clayui/tabs
53
-
54
- ## [3.3.3](https://github.com/liferay/clay/compare/@clayui/tabs@3.3.2...@clayui/tabs@3.3.3) (2021-01-13)
55
-
56
- **Note:** Version bump only for package @clayui/tabs
57
-
58
- ## [3.3.2](https://github.com/liferay/clay/compare/@clayui/tabs@3.3.0...@clayui/tabs@3.3.2) (2020-12-16)
59
-
60
- **Note:** Version bump only for package @clayui/tabs
61
-
62
- ## [3.3.1](https://github.com/liferay/clay/compare/@clayui/tabs@3.3.0...@clayui/tabs@3.3.1) (2020-12-02)
63
-
64
- **Note:** Version bump only for package @clayui/tabs
65
-
66
- # [3.3.0](https://github.com/liferay/clay/compare/@clayui/tabs@3.2.5...@clayui/tabs@3.3.0) (2020-10-01)
67
-
68
- ### Features
69
-
70
- - **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))
71
- - add displayName for all components ([cc3211d](https://github.com/liferay/clay/commit/cc3211d))
72
-
73
- ## [3.2.5](https://github.com/liferay/clay/compare/@clayui/tabs@3.2.4...@clayui/tabs@3.2.5) (2020-08-28)
74
-
75
- **Note:** Version bump only for package @clayui/tabs
76
-
77
- ## [3.2.4](https://github.com/liferay/clay/compare/@clayui/tabs@3.2.3...@clayui/tabs@3.2.4) (2020-08-26)
78
-
79
- **Note:** Version bump only for package @clayui/tabs
80
-
81
- ## [3.2.3](https://github.com/liferay/clay/compare/@clayui/tabs@3.2.2...@clayui/tabs@3.2.3) (2020-07-28)
82
-
83
- ### Bug Fixes
84
-
85
- - update packages to appropriate dependencies ([0026168](https://github.com/liferay/clay/commit/0026168))
86
-
87
- ## [3.2.2](https://github.com/liferay/clay/compare/@clayui/tabs@3.2.1...@clayui/tabs@3.2.2) (2020-07-07)
88
-
89
- ### Bug Fixes
90
-
91
- - **@clayui/tabs:** check if child is truthy first before cloning ([c357b7d](https://github.com/liferay/clay/commit/c357b7d))
92
-
93
- ## [3.2.1](https://github.com/liferay/clay/compare/@clayui/tabs@3.2.0...@clayui/tabs@3.2.1) (2020-06-18)
94
-
95
- ### Bug Fixes
96
-
97
- - **@clayui/tabs:** Make sure we use strict equation ([ad8dd39](https://github.com/liferay/clay/commit/ad8dd39))
98
-
99
- # [3.2.0](https://github.com/liferay/clay/compare/@clayui/tabs@3.1.1...@clayui/tabs@3.2.0) (2020-05-21)
100
-
101
- ### Features
102
-
103
- - **@clayui/tabs:** add TabPanel as an alias for TabPane ([924ae4e](https://github.com/liferay/clay/commit/924ae4e))
104
- - **clayui.com:** Revert the change made to headings used, rename stickers and tables to sticker and table respectively, also change some wording ([791dabe](https://github.com/liferay/clay/commit/791dabe))
105
- - **clayui.com:** Update content structure: Checkbox, Management Toolbar, Select Box, Sticker, Table & Tabs ([0fcd54a](https://github.com/liferay/clay/commit/0fcd54a))
106
-
107
- ## [3.1.1](https://github.com/liferay/clay/compare/@clayui/tabs@3.1.0...@clayui/tabs@3.1.1) (2020-04-24)
108
-
109
- ### Bug Fixes
110
-
111
- - Fix accessibility issues ([5e09db0](https://github.com/liferay/clay/commit/5e09db0))
112
-
113
- # 3.1.0 (2020-02-28)
114
-
115
- ### Bug Fixes
116
-
117
- - replace npm in favor of yarn in new packages ([e366fbb](https://github.com/liferay/clay/commit/e366fbb))
118
- - **@clayui/tabs:** add the relationship between tab and tabpane in stories ([ee9edc4](https://github.com/liferay/clay/commit/ee9edc4))
119
- - **@clayui/tabs:** adjust class name timing so that it the tab properly fades in ([b0df6b8](https://github.com/liferay/clay/commit/b0df6b8))
120
- - **@clayui/tabs:** fix the use of React.forwardRef ([a7ce7e0](https://github.com/liferay/clay/commit/a7ce7e0))
121
- - **tabs:** Turns `active` property optional when using Item, default value is `false` ([bb1ae86](https://github.com/liferay/clay/commit/bb1ae86))
122
-
123
- ### Features
124
-
125
- - **tabs:** Creates Tabs component ([4418cc2](https://github.com/liferay/clay/commit/4418cc2))
126
-
127
- ## [3.0.6](https://github.com/liferay/clay/tree/master/packages/clay-tabs/compare/@clayui/tabs@3.0.3...@clayui/tabs@3.0.6) (2020-01-31)
128
-
129
- **Note:** Version bump only for package @clayui/tabs
130
-
131
- ## [3.0.5](https://github.com/liferay/clay/tree/master/packages/clay-tabs/compare/@clayui/tabs@3.0.3...@clayui/tabs@3.0.5) (2020-01-20)
132
-
133
- **Note:** Version bump only for package @clayui/tabs
134
-
135
- ## [3.0.4](https://github.com/liferay/clay/tree/master/packages/clay-tabs/compare/@clayui/tabs@3.0.3...@clayui/tabs@3.0.4) (2019-12-05)
136
-
137
- **Note:** Version bump only for package @clayui/tabs
138
-
139
- ## [3.0.3](https://github.com/liferay/clay/tree/master/packages/clay-tabs/compare/@clayui/tabs@3.0.2...@clayui/tabs@3.0.3) (2019-11-07)
140
-
141
- **Note:** Version bump only for package @clayui/tabs
142
-
143
- ## [3.0.2](https://github.com/liferay/clay/tree/master/packages/clay-tabs/compare/@clayui/tabs@3.0.1...@clayui/tabs@3.0.2) (2019-11-01)
144
-
145
- **Note:** Version bump only for package @clayui/tabs
146
-
147
- ## [3.0.1](https://github.com/liferay/clay/tree/master/packages/clay-tabs/compare/@clayui/tabs@3.0.0...@clayui/tabs@3.0.1) (2019-10-28)
148
-
149
- **Note:** Version bump only for package @clayui/tabs