@instructure/ui-tabs 8.12.1-snapshot.7 → 8.13.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/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [8.13.0](https://github.com/instructure/instructure-ui/compare/v8.12.0...v8.13.0) (2021-12-01)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-tabs
9
+
6
10
  # [8.12.0](https://github.com/instructure/instructure-ui/compare/v8.11.1...v8.12.0) (2021-11-17)
7
11
 
8
12
  ### Features
@@ -44,8 +44,8 @@ id: Tabs.Panel
44
44
  **/
45
45
 
46
46
  let Panel = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = class Panel extends Component {
47
- constructor(...args) {
48
- super(...args);
47
+ constructor() {
48
+ super(...arguments);
49
49
  this.ref = null;
50
50
 
51
51
  this.handleRef = el => {
@@ -43,8 +43,8 @@ id: Tabs.Tab
43
43
  **/
44
44
 
45
45
  let Tab = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = class Tab extends Component {
46
- constructor(...args) {
47
- super(...args);
46
+ constructor() {
47
+ super(...arguments);
48
48
 
49
49
  this.handleClick = event => {
50
50
  const _this$props = this.props,
@@ -125,14 +125,14 @@ let Tab = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class
125
125
  variant: 'default',
126
126
  isDisabled: false,
127
127
  isSelected: false,
128
- onClick: (event, {
129
- index,
130
- id
131
- }) => {},
132
- onKeyDown: (event, {
133
- index,
134
- id
135
- }) => {}
128
+ onClick: (event, _ref) => {
129
+ let index = _ref.index,
130
+ id = _ref.id;
131
+ },
132
+ onKeyDown: (event, _ref2) => {
133
+ let index = _ref2.index,
134
+ id = _ref2.id;
135
+ }
136
136
  }, _temp)) || _class);
137
137
  export default Tab;
138
138
  export { Tab };
@@ -27,19 +27,19 @@ const TabLocator = locator('[role="tab"]');
27
27
  const PanelLocator = locator('[role="tabpanel"]');
28
28
  const SelectedTabLocator = locator('[role="tab"][aria-selected="true"]');
29
29
  export const TabsLocator = locator(Tabs.selector, {
30
- findTab: (...args) => {
31
- return TabLocator.find(...args);
30
+ findTab: function () {
31
+ return TabLocator.find(...arguments);
32
32
  },
33
- findAllTabs: (...args) => {
34
- return TabLocator.findAll(...args);
33
+ findAllTabs: function () {
34
+ return TabLocator.findAll(...arguments);
35
35
  },
36
- findSelectedTab: (...args) => {
37
- return SelectedTabLocator.find(...args);
36
+ findSelectedTab: function () {
37
+ return SelectedTabLocator.find(...arguments);
38
38
  },
39
- findTabPanel: (...args) => {
40
- return PanelLocator.find(...args);
39
+ findTabPanel: function () {
40
+ return PanelLocator.find(...arguments);
41
41
  },
42
- findAllTabPanels: (...args) => {
43
- return PanelLocator.findAll(...args);
42
+ findAllTabPanels: function () {
43
+ return PanelLocator.findAll(...arguments);
44
44
  }
45
45
  });
package/es/Tabs/index.js CHANGED
@@ -66,17 +66,15 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tex
66
66
  }
67
67
  };
68
68
 
69
- this.handleTabClick = (event, {
70
- index,
71
- id
72
- }) => {
69
+ this.handleTabClick = (event, _ref) => {
70
+ let index = _ref.index,
71
+ id = _ref.id;
73
72
  const nextTab = this.getNextTab(index, 0);
74
73
  this.fireOnChange(event, nextTab);
75
74
  };
76
75
 
77
- this.handleTabKeyDown = (event, {
78
- index
79
- }) => {
76
+ this.handleTabKeyDown = (event, _ref2) => {
77
+ let index = _ref2.index;
80
78
  let nextTab;
81
79
 
82
80
  if (event.keyCode === keycode.codes.up || event.keyCode === keycode.codes.left) {
@@ -263,10 +261,10 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tex
263
261
  };
264
262
  }
265
263
 
266
- fireOnChange(event, {
267
- index,
268
- id
269
- }) {
264
+ fireOnChange(event, _ref3) {
265
+ let index = _ref3.index,
266
+ id = _ref3.id;
267
+
270
268
  if (typeof this.props.onRequestTabChange === 'function') {
271
269
  this.props.onRequestTabChange(event, {
272
270
  index,
@@ -382,10 +380,10 @@ let Tabs = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = tex
382
380
 
383
381
  }, _class2.displayName = "Tabs", _class2.componentId = 'Tabs', _class2.allowedProps = allowedProps, _class2.propTypes = propTypes, _class2.defaultProps = {
384
382
  variant: 'default',
385
- onRequestTabChange: (event, {
386
- index,
387
- id
388
- }) => {},
383
+ onRequestTabChange: (event, _ref4) => {
384
+ let index = _ref4.index,
385
+ id = _ref4.id;
386
+ },
389
387
  children: null,
390
388
  elementRef: () => {},
391
389
  shouldFocusOnRender: false,
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.Panel = exports.default = void 0;
8
+ exports.default = exports.Panel = void 0;
9
9
 
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
 
@@ -36,8 +36,8 @@ id: Tabs.Panel
36
36
  ---
37
37
  **/
38
38
  let Panel = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = class Panel extends _react.Component {
39
- constructor(...args) {
40
- super(...args);
39
+ constructor() {
40
+ super(...arguments);
41
41
  this.ref = null;
42
42
 
43
43
  this.handleRef = el => {
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.allowedProps = exports.propTypes = void 0;
8
+ exports.propTypes = exports.allowedProps = void 0;
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.Tab = exports.default = void 0;
8
+ exports.default = exports.Tab = void 0;
9
9
 
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
 
@@ -36,8 +36,8 @@ id: Tabs.Tab
36
36
  ---
37
37
  **/
38
38
  let Tab = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = class Tab extends _react.Component {
39
- constructor(...args) {
40
- super(...args);
39
+ constructor() {
40
+ super(...arguments);
41
41
 
42
42
  this.handleClick = event => {
43
43
  const _this$props = this.props,
@@ -117,14 +117,14 @@ let Tab = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec
117
117
  variant: 'default',
118
118
  isDisabled: false,
119
119
  isSelected: false,
120
- onClick: (event, {
121
- index,
122
- id
123
- }) => {},
124
- onKeyDown: (event, {
125
- index,
126
- id
127
- }) => {}
120
+ onClick: (event, _ref) => {
121
+ let index = _ref.index,
122
+ id = _ref.id;
123
+ },
124
+ onKeyDown: (event, _ref2) => {
125
+ let index = _ref2.index,
126
+ id = _ref2.id;
127
+ }
128
128
  }, _temp)) || _class);
129
129
  exports.Tab = Tab;
130
130
  var _default = Tab;
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.allowedProps = exports.propTypes = void 0;
8
+ exports.propTypes = exports.allowedProps = void 0;
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
@@ -36,20 +36,20 @@ const TabLocator = (0, _locator.locator)('[role="tab"]');
36
36
  const PanelLocator = (0, _locator.locator)('[role="tabpanel"]');
37
37
  const SelectedTabLocator = (0, _locator.locator)('[role="tab"][aria-selected="true"]');
38
38
  const TabsLocator = (0, _locator.locator)(_index.Tabs.selector, {
39
- findTab: (...args) => {
40
- return TabLocator.find(...args);
39
+ findTab: function () {
40
+ return TabLocator.find(...arguments);
41
41
  },
42
- findAllTabs: (...args) => {
43
- return TabLocator.findAll(...args);
42
+ findAllTabs: function () {
43
+ return TabLocator.findAll(...arguments);
44
44
  },
45
- findSelectedTab: (...args) => {
46
- return SelectedTabLocator.find(...args);
45
+ findSelectedTab: function () {
46
+ return SelectedTabLocator.find(...arguments);
47
47
  },
48
- findTabPanel: (...args) => {
49
- return PanelLocator.find(...args);
48
+ findTabPanel: function () {
49
+ return PanelLocator.find(...arguments);
50
50
  },
51
- findAllTabPanels: (...args) => {
52
- return PanelLocator.findAll(...args);
51
+ findAllTabPanels: function () {
52
+ return PanelLocator.findAll(...arguments);
53
53
  }
54
54
  });
55
55
  exports.TabsLocator = TabsLocator;
package/lib/Tabs/index.js CHANGED
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "Panel", {
13
13
  return _Panel.Panel;
14
14
  }
15
15
  });
16
- exports.Tabs = exports.default = void 0;
16
+ exports.default = exports.Tabs = void 0;
17
17
 
18
18
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
19
19
 
@@ -80,17 +80,15 @@ let Tabs = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
80
80
  }
81
81
  };
82
82
 
83
- this.handleTabClick = (event, {
84
- index,
85
- id
86
- }) => {
83
+ this.handleTabClick = (event, _ref) => {
84
+ let index = _ref.index,
85
+ id = _ref.id;
87
86
  const nextTab = this.getNextTab(index, 0);
88
87
  this.fireOnChange(event, nextTab);
89
88
  };
90
89
 
91
- this.handleTabKeyDown = (event, {
92
- index
93
- }) => {
90
+ this.handleTabKeyDown = (event, _ref2) => {
91
+ let index = _ref2.index;
94
92
  let nextTab;
95
93
 
96
94
  if (event.keyCode === _keycode.default.codes.up || event.keyCode === _keycode.default.codes.left) {
@@ -278,10 +276,10 @@ let Tabs = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
278
276
  };
279
277
  }
280
278
 
281
- fireOnChange(event, {
282
- index,
283
- id
284
- }) {
279
+ fireOnChange(event, _ref3) {
280
+ let index = _ref3.index,
281
+ id = _ref3.id;
282
+
285
283
  if (typeof this.props.onRequestTabChange === 'function') {
286
284
  this.props.onRequestTabChange(event, {
287
285
  index,
@@ -399,10 +397,10 @@ let Tabs = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _de
399
397
 
400
398
  }, _class2.displayName = "Tabs", _class2.componentId = 'Tabs', _class2.allowedProps = _props.allowedProps, _class2.propTypes = _props.propTypes, _class2.defaultProps = {
401
399
  variant: 'default',
402
- onRequestTabChange: (event, {
403
- index,
404
- id
405
- }) => {},
400
+ onRequestTabChange: (event, _ref4) => {
401
+ let index = _ref4.index,
402
+ id = _ref4.id;
403
+ },
406
404
  children: null,
407
405
  elementRef: () => {},
408
406
  shouldFocusOnRender: false,
package/lib/Tabs/props.js CHANGED
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.allowedProps = exports.propTypes = void 0;
8
+ exports.propTypes = exports.allowedProps = void 0;
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-tabs",
3
- "version": "8.12.1-snapshot.7+1e7ac8219",
3
+ "version": "8.13.0",
4
4
  "description": "A UI component library made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -24,28 +24,28 @@
24
24
  },
25
25
  "license": "MIT",
26
26
  "devDependencies": {
27
- "@instructure/ui-babel-preset": "8.12.1-snapshot.7+1e7ac8219",
28
- "@instructure/ui-color-utils": "8.12.1-snapshot.7+1e7ac8219",
29
- "@instructure/ui-test-locator": "8.12.1-snapshot.7+1e7ac8219",
30
- "@instructure/ui-test-utils": "8.12.1-snapshot.7+1e7ac8219",
31
- "@instructure/ui-themes": "8.12.1-snapshot.7+1e7ac8219"
27
+ "@instructure/ui-babel-preset": "8.13.0",
28
+ "@instructure/ui-color-utils": "8.13.0",
29
+ "@instructure/ui-test-locator": "8.13.0",
30
+ "@instructure/ui-test-utils": "8.13.0",
31
+ "@instructure/ui-themes": "8.13.0"
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.13.10",
35
- "@instructure/console": "8.12.1-snapshot.7+1e7ac8219",
36
- "@instructure/debounce": "8.12.1-snapshot.7+1e7ac8219",
37
- "@instructure/emotion": "8.12.1-snapshot.7+1e7ac8219",
38
- "@instructure/shared-types": "8.12.1-snapshot.7+1e7ac8219",
39
- "@instructure/ui-dom-utils": "8.12.1-snapshot.7+1e7ac8219",
40
- "@instructure/ui-focusable": "8.12.1-snapshot.7+1e7ac8219",
41
- "@instructure/ui-i18n": "8.12.1-snapshot.7+1e7ac8219",
42
- "@instructure/ui-motion": "8.12.1-snapshot.7+1e7ac8219",
43
- "@instructure/ui-prop-types": "8.12.1-snapshot.7+1e7ac8219",
44
- "@instructure/ui-react-utils": "8.12.1-snapshot.7+1e7ac8219",
45
- "@instructure/ui-testable": "8.12.1-snapshot.7+1e7ac8219",
46
- "@instructure/ui-utils": "8.12.1-snapshot.7+1e7ac8219",
47
- "@instructure/ui-view": "8.12.1-snapshot.7+1e7ac8219",
48
- "@instructure/uid": "8.12.1-snapshot.7+1e7ac8219",
35
+ "@instructure/console": "8.13.0",
36
+ "@instructure/debounce": "8.13.0",
37
+ "@instructure/emotion": "8.13.0",
38
+ "@instructure/shared-types": "8.13.0",
39
+ "@instructure/ui-dom-utils": "8.13.0",
40
+ "@instructure/ui-focusable": "8.13.0",
41
+ "@instructure/ui-i18n": "8.13.0",
42
+ "@instructure/ui-motion": "8.13.0",
43
+ "@instructure/ui-prop-types": "8.13.0",
44
+ "@instructure/ui-react-utils": "8.13.0",
45
+ "@instructure/ui-testable": "8.13.0",
46
+ "@instructure/ui-utils": "8.13.0",
47
+ "@instructure/ui-view": "8.13.0",
48
+ "@instructure/uid": "8.13.0",
49
49
  "keycode": "^2",
50
50
  "prop-types": "^15"
51
51
  },
@@ -55,6 +55,5 @@
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "sideEffects": false,
59
- "gitHead": "1e7ac821932a91fe9ef761c96f747c7ea1f3925a"
58
+ "sideEffects": false
60
59
  }
package/LICENSE.md DELETED
@@ -1,27 +0,0 @@
1
- ---
2
- title: The MIT License (MIT)
3
- category: Getting Started
4
- order: 9
5
- ---
6
-
7
- # The MIT License (MIT)
8
-
9
- Copyright (c) 2015 Instructure, Inc.
10
-
11
- **Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions.**
17
-
18
- The above copyright notice and this permission notice shall be included in all
19
- copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- SOFTWARE.