carbon-react 8.1.3 → 8.1.6

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.
Files changed (170) hide show
  1. package/change_log/v8_1_4/position_date_picker.yml +1 -0
  2. package/change_log/v8_1_5/fix_path.yml +1 -0
  3. package/lib/__experimental__/components/input/input-presentation.component.js +35 -29
  4. package/lib/__experimental__/components/input/input.component.js +36 -28
  5. package/lib/__experimental__/components/input-decorator-bridge/input-decorator-bridge.component.js +45 -35
  6. package/lib/__experimental__/components/select/index.js +4 -4
  7. package/lib/__experimental__/components/select/option.component.js +6 -4
  8. package/lib/__experimental__/components/select/select-list.component.js +39 -35
  9. package/lib/__experimental__/components/select/select.component.js +45 -39
  10. package/lib/__experimental__/components/select-async/index.js +4 -4
  11. package/lib/__experimental__/components/select-async/select-async.component.js +53 -37
  12. package/lib/__experimental__/components/textbox/textbox.component.js +6 -4
  13. package/lib/__spec_helper__/index.js +1 -1
  14. package/lib/components/action-toolbar/action-toolbar.js +43 -37
  15. package/lib/components/alert/alert.js +35 -29
  16. package/lib/components/alert/alert.stories.js +4 -4
  17. package/lib/components/animated-menu-button/animated-menu-button.js +36 -32
  18. package/lib/components/animated-menu-button/animated-menu-button.stories.js +16 -24
  19. package/lib/components/app-wrapper/app-wrapper.js +29 -25
  20. package/lib/components/app-wrapper/app-wrapper.stories.js +1 -1
  21. package/lib/components/button/button.js +30 -26
  22. package/lib/components/button/button.stories.js +1 -1
  23. package/lib/components/button-toggle/button-toggle.js +52 -46
  24. package/lib/components/button-toggle/button-toggle.stories.js +23 -15
  25. package/lib/components/button-toggle-group/button-toggle-group.js +54 -48
  26. package/lib/components/button-toggle-group/button-toggle-group.stories.js +4 -4
  27. package/lib/components/carousel/carousel.js +48 -42
  28. package/lib/components/carousel/slide/slide.js +4 -4
  29. package/lib/components/checkbox/checkbox.js +68 -72
  30. package/lib/components/configurable-items/configurable-item-row/configurable-item-row.js +37 -33
  31. package/lib/components/configurable-items/configurable-items.js +38 -34
  32. package/lib/components/confirm/confirm.js +60 -54
  33. package/lib/components/content/content.js +31 -25
  34. package/lib/components/create/create.js +32 -24
  35. package/lib/components/date/date.js +216 -194
  36. package/lib/components/date/navbar/navbar.js +5 -5
  37. package/lib/components/date-range/date-range.js +97 -93
  38. package/lib/components/decimal/decimal.js +62 -56
  39. package/lib/components/detail/detail.js +51 -47
  40. package/lib/components/dialog/dialog.js +80 -72
  41. package/lib/components/dialog-full-screen/dialog-full-screen.js +53 -47
  42. package/lib/components/dialog-full-screen/full-screen-heading/full-screen-heading.js +9 -7
  43. package/lib/components/drag-and-drop/custom-drag-layer/custom-drag-layer.js +28 -24
  44. package/lib/components/drag-and-drop/drag-and-drop.js +6 -6
  45. package/lib/components/drag-and-drop/draggable-context/draggable-context.js +40 -37
  46. package/lib/components/drag-and-drop/with-drag/with-drag.js +26 -22
  47. package/lib/components/drag-and-drop/with-drop/with-drop.js +26 -20
  48. package/lib/components/dropdown/dropdown.js +146 -143
  49. package/lib/components/dropdown-filter/dropdown-filter.js +94 -88
  50. package/lib/components/dropdown-filter-ajax/dropdown-filter-ajax.js +54 -50
  51. package/lib/components/fieldset/fieldset.js +50 -42
  52. package/lib/components/filter/filter.js +43 -46
  53. package/lib/components/flash/flash.js +72 -64
  54. package/lib/components/form/cancel-button/cancel-button.js +11 -11
  55. package/lib/components/form/form-summary/form-summary.js +7 -7
  56. package/lib/components/form/form.js +68 -69
  57. package/lib/components/form/save-button/save-button.js +11 -11
  58. package/lib/components/grouped-character/grouped-character.js +49 -43
  59. package/lib/components/heading/heading.js +65 -59
  60. package/lib/components/help/help.js +46 -40
  61. package/lib/components/i18n/i18n.js +30 -22
  62. package/lib/components/icon/icon.js +55 -51
  63. package/lib/components/inline-inputs/inline-inputs.js +6 -6
  64. package/lib/components/link/link.js +45 -37
  65. package/lib/components/menu/menu-item/menu-item.js +55 -49
  66. package/lib/components/menu/menu.js +47 -41
  67. package/lib/components/menu/submenu-block/submenu-block.js +43 -37
  68. package/lib/components/menu-list/menu-list-item/menu-list-item.js +29 -25
  69. package/lib/components/menu-list/menu-list.js +49 -43
  70. package/lib/components/message/message.js +47 -41
  71. package/lib/components/modal/modal.js +77 -71
  72. package/lib/components/mount-in-app/mount-in-app.js +32 -26
  73. package/lib/components/multi-action-button/multi-action-button.js +52 -46
  74. package/lib/components/multi-step-wizard/multi-step-wizard.js +60 -54
  75. package/lib/components/multi-step-wizard/step/step.js +68 -69
  76. package/lib/components/navigation-bar/navigation-bar.js +44 -38
  77. package/lib/components/number/number.js +58 -52
  78. package/lib/components/pager/pager.js +75 -71
  79. package/lib/components/pages/page/page.js +6 -6
  80. package/lib/components/pages/pages.js +4 -4
  81. package/lib/components/pill/pill.js +33 -27
  82. package/lib/components/pod/pod.js +84 -80
  83. package/lib/components/portal/portal.js +34 -26
  84. package/lib/components/portrait/portrait.js +52 -48
  85. package/lib/components/preview/preview.js +4 -4
  86. package/lib/components/profile/profile.js +51 -45
  87. package/lib/components/radio-button/radio-button.js +51 -45
  88. package/lib/components/rainbow/rainbow.js +44 -38
  89. package/lib/components/row/column/column.js +1 -1
  90. package/lib/components/row/row.js +47 -41
  91. package/lib/components/scrollable-list/as-scrollable-list-item.wrapper.js +8 -8
  92. package/lib/components/scrollable-list/scrollable-list-item.component.js +27 -35
  93. package/lib/components/scrollable-list/scrollable-list.component.js +53 -37
  94. package/lib/components/scrollable-list/scrollable-list.style.js +5 -13
  95. package/lib/components/scrollable-list/test-utils.js +38 -28
  96. package/lib/components/settings-row/settings-row.js +49 -43
  97. package/lib/components/show-edit-pod/show-edit-pod.js +67 -63
  98. package/lib/components/sidebar/sidebar-header/sidebar-header.js +43 -37
  99. package/lib/components/sidebar/sidebar.js +54 -48
  100. package/lib/components/simple-color-picker/color-option/color-option.js +47 -41
  101. package/lib/components/simple-color-picker/simple-color-picker.js +53 -47
  102. package/lib/components/spinner/spinner.js +43 -37
  103. package/lib/components/split-button/split-button.js +69 -69
  104. package/lib/components/step-sequence/step-sequence-item/step-sequence-item.js +15 -13
  105. package/lib/components/step-sequence/step-sequence.js +4 -4
  106. package/lib/components/switch/switch.js +23 -21
  107. package/lib/components/table/draggable-table-cell/draggable-table-cell.js +4 -4
  108. package/lib/components/table/table-cell/table-cell.js +45 -39
  109. package/lib/components/table/table-header/table-header.js +107 -110
  110. package/lib/components/table/table-row/table-row.js +62 -58
  111. package/lib/components/table/table-subheader/table-subheader.js +32 -26
  112. package/lib/components/table/table.js +166 -169
  113. package/lib/components/table-ajax/table-ajax.js +67 -70
  114. package/lib/components/tabs/tab/tab.js +48 -44
  115. package/lib/components/tabs/tabs.js +73 -67
  116. package/lib/components/textarea/textarea.js +52 -49
  117. package/lib/components/textbox/textbox.js +49 -43
  118. package/lib/components/toast/toast.js +56 -50
  119. package/lib/components/tooltip/tooltip.js +47 -41
  120. package/lib/patterns/configurable-items/configurable-items-content/configurable-items-content.js +35 -29
  121. package/lib/patterns/configurable-items/configurable-items.js +55 -51
  122. package/lib/patterns/configurable-items/store/store.js +35 -27
  123. package/lib/style/index.js +1 -1
  124. package/lib/style/palette/index.js +4 -2
  125. package/lib/style/themes/base/index.js +7 -7
  126. package/lib/style/themes/test-utils.js +19 -21
  127. package/lib/style/utils/add-hex-symbols.js +4 -2
  128. package/lib/style/utils/at-opacity.js +10 -8
  129. package/lib/style/utils/merge-deep.js +15 -15
  130. package/lib/style/utils/mix.js +32 -20
  131. package/lib/utils/decorators/input/input.js +46 -42
  132. package/lib/utils/decorators/input-icon/input-icon.js +37 -33
  133. package/lib/utils/decorators/input-label/input-label.js +37 -31
  134. package/lib/utils/decorators/input-validation/input-validation.js +40 -36
  135. package/lib/utils/decorators/should-component-update/should-component-update.js +29 -23
  136. package/lib/utils/decorators/tooltip-decorator/tooltip-decorator.js +38 -34
  137. package/lib/utils/ether/ether.js +16 -14
  138. package/lib/utils/filter-children/filter-children.util.js +10 -8
  139. package/lib/utils/handlers/base-registry/base-registry.js +12 -13
  140. package/lib/utils/helpers/browser/browser.js +15 -13
  141. package/lib/utils/helpers/date/date.js +4 -2
  142. package/lib/utils/helpers/element-resize/element-resize.js +6 -4
  143. package/lib/utils/helpers/events/events.js +2 -2
  144. package/lib/utils/helpers/guid/guid.js +6 -6
  145. package/lib/utils/helpers/i18n/i18n.js +11 -9
  146. package/lib/utils/helpers/immutable/immutable.js +13 -13
  147. package/lib/utils/helpers/options-helper/options-helper.js +2 -1
  148. package/lib/utils/helpers/prop-types/prop-types.js +2 -2
  149. package/lib/utils/helpers/scrollable-parent/scrollable-parent.js +2 -0
  150. package/lib/utils/helpers/serialize/serialize.js +12 -12
  151. package/lib/utils/helpers/tags/tags-specs/tags-specs.js +6 -4
  152. package/lib/utils/helpers/to-array/to-array.js +8 -6
  153. package/lib/utils/router/router.js +2 -2
  154. package/lib/utils/service/service.js +34 -34
  155. package/lib/utils/validations/blank/blank.js +6 -2
  156. package/lib/utils/validations/date/date.js +6 -2
  157. package/lib/utils/validations/date-range/date-range.js +6 -2
  158. package/lib/utils/validations/date-within-range/date-within-range.js +6 -2
  159. package/lib/utils/validations/email/email.js +6 -2
  160. package/lib/utils/validations/exclusion/exclusion.js +6 -2
  161. package/lib/utils/validations/inclusion/inclusion.js +6 -2
  162. package/lib/utils/validations/length/length.js +6 -2
  163. package/lib/utils/validations/numeral/numeral-type/numeral-type.js +8 -2
  164. package/lib/utils/validations/numeral/numeral.js +6 -2
  165. package/lib/utils/validations/presence/presence.js +12 -4
  166. package/lib/utils/validations/regex/regex.js +8 -2
  167. package/lib/utils/validations/validator/validator.js +14 -14
  168. package/package.json +13 -13
  169. package/release_notes/v8_1_4.html.md +5 -0
  170. package/release_notes/v8_1_5.html.md +5 -0
@@ -1,28 +1,24 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/es.symbol");
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
4
 
5
- require("core-js/modules/es.symbol.description");
5
+ require("core-js/modules/es.object.get-prototype-of.js");
6
6
 
7
- require("core-js/modules/es.symbol.iterator");
7
+ require("core-js/modules/es.reflect.construct.js");
8
8
 
9
- require("core-js/modules/es.array.concat");
9
+ require("core-js/modules/es.object.assign.js");
10
10
 
11
- require("core-js/modules/es.array.iterator");
11
+ require("core-js/modules/es.symbol.js");
12
12
 
13
- require("core-js/modules/es.array.map");
13
+ require("core-js/modules/es.symbol.description.js");
14
14
 
15
- require("core-js/modules/es.object.assign");
15
+ require("core-js/modules/es.symbol.iterator.js");
16
16
 
17
- require("core-js/modules/es.object.get-prototype-of");
17
+ require("core-js/modules/es.array.iterator.js");
18
18
 
19
- require("core-js/modules/es.object.to-string");
19
+ require("core-js/modules/es.string.iterator.js");
20
20
 
21
- require("core-js/modules/es.string.iterator");
22
-
23
- require("core-js/modules/web.dom-collections.for-each");
24
-
25
- require("core-js/modules/web.dom-collections.iterator");
21
+ require("core-js/modules/web.dom-collections.iterator.js");
26
22
 
27
23
  Object.defineProperty(exports, "__esModule", {
28
24
  value: true
@@ -35,6 +31,16 @@ Object.defineProperty(exports, "Tab", {
35
31
  });
36
32
  exports.Tabs = void 0;
37
33
 
34
+ require("core-js/modules/es.array.concat.js");
35
+
36
+ require("core-js/modules/es.object.to-string.js");
37
+
38
+ require("core-js/modules/es.promise.js");
39
+
40
+ require("core-js/modules/es.array.map.js");
41
+
42
+ require("core-js/modules/web.dom-collections.for-each.js");
43
+
38
44
  var _react = _interopRequireDefault(require("react"));
39
45
 
40
46
  var _reactDom = _interopRequireDefault(require("react-dom"));
@@ -59,25 +65,27 @@ require("./tabs.scss");
59
65
 
60
66
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
61
67
 
62
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
63
-
64
- 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); }
68
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
65
69
 
66
70
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
67
71
 
68
72
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
69
73
 
70
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
74
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
75
+
76
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
71
77
 
72
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
78
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
73
79
 
74
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
80
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
81
+
82
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
75
83
 
76
84
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
77
85
 
78
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
86
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
79
87
 
80
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
88
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
81
89
 
82
90
  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; }
83
91
 
@@ -144,14 +152,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
144
152
  * @class Tabs
145
153
  * @constructor
146
154
  */
147
- var Tabs =
148
- /*#__PURE__*/
149
- function (_React$Component) {
155
+ var Tabs = /*#__PURE__*/function (_React$Component) {
150
156
  _inherits(Tabs, _React$Component);
151
157
 
152
- function Tabs() {
153
- var _getPrototypeOf2;
158
+ var _super = _createSuper(Tabs);
154
159
 
160
+ function Tabs() {
155
161
  var _this;
156
162
 
157
163
  _classCallCheck(this, Tabs);
@@ -160,7 +166,7 @@ function (_React$Component) {
160
166
  args[_key] = arguments[_key];
161
167
  }
162
168
 
163
- _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Tabs)).call.apply(_getPrototypeOf2, [this].concat(args)));
169
+ _this = _super.call.apply(_super, [this].concat(args));
164
170
 
165
171
  _defineProperty(_assertThisInitialized(_this), "state", {
166
172
  /**
@@ -178,12 +184,6 @@ function (_React$Component) {
178
184
  * @type {Object}
179
185
  */
180
186
  tabWarning: _immutable.default.Map()
181
- /**
182
- * Returns tabs object to tab component.
183
- *
184
- * @method getChildContext
185
- */
186
-
187
187
  });
188
188
 
189
189
  _defineProperty(_assertThisInitialized(_this), "_window", _browser.default.getWindow());
@@ -257,7 +257,13 @@ function (_React$Component) {
257
257
 
258
258
  _createClass(Tabs, [{
259
259
  key: "getChildContext",
260
- value: function getChildContext() {
260
+ value:
261
+ /**
262
+ * Returns tabs object to tab component.
263
+ *
264
+ * @method getChildContext
265
+ */
266
+ function getChildContext() {
261
267
  return {
262
268
  tabs: {
263
269
  changeValidity: this.changeValidity,
@@ -331,7 +337,7 @@ function (_React$Component) {
331
337
 
332
338
  }, {
333
339
  key: "goToTab",
334
-
340
+ value:
335
341
  /**
336
342
  * Will trigger the tab at the given index.
337
343
  *
@@ -339,7 +345,7 @@ function (_React$Component) {
339
345
  * @param {Integer}
340
346
  * @return {Void}
341
347
  */
342
- value: function goToTab(event, index) {
348
+ function goToTab(event, index) {
343
349
  event.preventDefault();
344
350
  var newIndex = index;
345
351
 
@@ -399,32 +405,6 @@ function (_React$Component) {
399
405
  * @method mainClasses Main Class getter
400
406
  */
401
407
 
402
- }, {
403
- key: "isVertical",
404
-
405
- /**
406
- * Determines if the tab titles are in a vertical format.
407
- *
408
- * @method isVertical
409
- * @param {String} position
410
- * @return {Boolean}
411
- */
412
- value: function isVertical(position) {
413
- return position === 'left';
414
- }
415
- /**
416
- * Renders the component.
417
- *
418
- * @method render
419
- */
420
-
421
- }, {
422
- key: "render",
423
- value: function render() {
424
- return _react.default.createElement("div", _extends({
425
- className: this.mainClasses
426
- }, (0, _tags.default)('tabs', this.props)), this.tabHeaders, this.tabs);
427
- }
428
408
  }, {
429
409
  key: "mainClasses",
430
410
  get: function get() {
@@ -439,14 +419,14 @@ function (_React$Component) {
439
419
 
440
420
  }, {
441
421
  key: "children",
442
-
422
+ get:
443
423
  /**
444
424
  * The children nodes converted into an Array
445
425
  *
446
426
  * @method children
447
427
  * @return {Array} Ordered array of children
448
428
  */
449
- get: function get() {
429
+ function get() {
450
430
  return (0, _lodash.compact)(_react.default.Children.toArray(this.props.children));
451
431
  }
452
432
  /**
@@ -481,7 +461,7 @@ function (_React$Component) {
481
461
 
482
462
  _this2.tabRefs.push(_ref);
483
463
 
484
- return _react.default.createElement("li", {
464
+ return /*#__PURE__*/_react.default.createElement("li", {
485
465
  "aria-selected": _this2.isTabSelected(child.props.tabId),
486
466
  className: _this2.tabHeaderClasses(child),
487
467
  "data-element": "select-tab",
@@ -497,7 +477,7 @@ function (_React$Component) {
497
477
  tabIndex: _this2.isTabSelected(child.props.tabId) ? '0' : '-1'
498
478
  }, child.props.title);
499
479
  });
500
- return _react.default.createElement("ul", {
480
+ return /*#__PURE__*/_react.default.createElement("ul", {
501
481
  className: this.tabsHeaderClasses(),
502
482
  role: "tablist"
503
483
  }, tabTitles);
@@ -556,6 +536,32 @@ function (_React$Component) {
556
536
  });
557
537
  return tabs;
558
538
  }
539
+ /**
540
+ * Determines if the tab titles are in a vertical format.
541
+ *
542
+ * @method isVertical
543
+ * @param {String} position
544
+ * @return {Boolean}
545
+ */
546
+
547
+ }, {
548
+ key: "isVertical",
549
+ value: function isVertical(position) {
550
+ return position === 'left';
551
+ }
552
+ /**
553
+ * Renders the component.
554
+ *
555
+ * @method render
556
+ */
557
+
558
+ }, {
559
+ key: "render",
560
+ value: function render() {
561
+ return /*#__PURE__*/_react.default.createElement("div", _extends({
562
+ className: this.mainClasses
563
+ }, (0, _tags.default)('tabs', this.props)), this.tabHeaders, this.tabs);
564
+ }
559
565
  }]);
560
566
 
561
567
  return Tabs;
@@ -1,30 +1,34 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/es.symbol");
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
4
 
5
- require("core-js/modules/es.symbol.description");
5
+ require("core-js/modules/es.object.get-prototype-of.js");
6
6
 
7
- require("core-js/modules/es.symbol.iterator");
7
+ require("core-js/modules/es.object.to-string.js");
8
8
 
9
- require("core-js/modules/es.array.concat");
9
+ require("core-js/modules/es.reflect.construct.js");
10
10
 
11
- require("core-js/modules/es.array.iterator");
11
+ require("core-js/modules/es.symbol.js");
12
12
 
13
- require("core-js/modules/es.object.assign");
13
+ require("core-js/modules/es.symbol.description.js");
14
14
 
15
- require("core-js/modules/es.object.get-prototype-of");
15
+ require("core-js/modules/es.symbol.iterator.js");
16
16
 
17
- require("core-js/modules/es.object.to-string");
17
+ require("core-js/modules/es.array.iterator.js");
18
18
 
19
- require("core-js/modules/es.string.iterator");
19
+ require("core-js/modules/es.string.iterator.js");
20
20
 
21
- require("core-js/modules/web.dom-collections.iterator");
21
+ require("core-js/modules/web.dom-collections.iterator.js");
22
22
 
23
23
  Object.defineProperty(exports, "__esModule", {
24
24
  value: true
25
25
  });
26
26
  exports.default = void 0;
27
27
 
28
+ require("core-js/modules/es.array.concat.js");
29
+
30
+ require("core-js/modules/es.object.assign.js");
31
+
28
32
  var _react = _interopRequireDefault(require("react"));
29
33
 
30
34
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -45,29 +49,31 @@ var _tags = _interopRequireDefault(require("../../utils/helpers/tags"));
45
49
 
46
50
  require("./textarea.scss");
47
51
 
48
- var _class, _temp;
52
+ var _class;
49
53
 
50
54
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
51
55
 
52
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
53
-
54
- 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); }
56
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
55
57
 
56
58
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
57
59
 
58
60
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
59
61
 
60
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
62
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
63
+
64
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
65
+
66
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
61
67
 
62
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
68
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
63
69
 
64
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
70
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
65
71
 
66
72
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
67
73
 
68
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
74
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
69
75
 
70
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
76
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
71
77
 
72
78
  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; }
73
79
 
@@ -88,14 +94,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
88
94
  * @constructor
89
95
  * @decorators {Input,InputLabel,InputValidation}
90
96
  */
91
- var Textarea = (0, _input.default)((0, _inputLabel.default)((0, _inputValidation.default)((_temp = _class =
92
- /*#__PURE__*/
93
- function (_React$Component) {
97
+ var Textarea = (0, _input.default)((0, _inputLabel.default)((0, _inputValidation.default)((_class = /*#__PURE__*/function (_React$Component) {
94
98
  _inherits(Textarea, _React$Component);
95
99
 
96
- function Textarea() {
97
- var _getPrototypeOf2;
100
+ var _super = _createSuper(Textarea);
98
101
 
102
+ function Textarea() {
99
103
  var _this;
100
104
 
101
105
  _classCallCheck(this, Textarea);
@@ -104,7 +108,7 @@ function (_React$Component) {
104
108
  args[_key] = arguments[_key];
105
109
  }
106
110
 
107
- _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Textarea)).call.apply(_getPrototypeOf2, [this].concat(args)));
111
+ _this = _super.call.apply(_super, [this].concat(args));
108
112
 
109
113
  _defineProperty(_assertThisInitialized(_this), "minHeight", 0);
110
114
 
@@ -124,7 +128,7 @@ function (_React$Component) {
124
128
 
125
129
  _createClass(Textarea, [{
126
130
  key: "componentDidMount",
127
-
131
+ value:
128
132
  /**
129
133
  * A lifecycle method that is called after initial render.
130
134
  * Allows access to refs and DOM to set expandable variables
@@ -132,7 +136,7 @@ function (_React$Component) {
132
136
  * @method componentDidMount
133
137
  * @return {void}
134
138
  */
135
- value: function componentDidMount() {
139
+ function componentDidMount() {
136
140
  if (this.props.expandable) {
137
141
  window.addEventListener('resize', this.expandTextarea); // Set the min height to the initially rendered height.
138
142
  // Without minHeight expandable textareas will only have
@@ -181,30 +185,16 @@ function (_React$Component) {
181
185
  * @return {void}
182
186
  */
183
187
 
184
- }, {
185
- key: "render",
186
-
187
- /**
188
- * Renders the component.
189
- *
190
- * @method render
191
- * @return {Object} JSX
192
- */
193
- value: function render() {
194
- return _react.default.createElement("div", _extends({
195
- className: this.mainClasses
196
- }, (0, _tags.default)('textarea', this.props)), this.labelHTML, this.inputHTML, this.validationHTML, this.fieldHelpHTML, this.characterCount);
197
- }
198
188
  }, {
199
189
  key: "mainClasses",
200
-
190
+ get:
201
191
  /**
202
192
  * Uses the mainClasses method provided by the decorator to add additional classes
203
193
  *
204
194
  * @method mainClasses
205
195
  * @return {String} main className
206
196
  */
207
- get: function get() {
197
+ function get() {
208
198
  return 'carbon-textarea';
209
199
  }
210
200
  /**
@@ -314,21 +304,35 @@ function (_React$Component) {
314
304
  return null;
315
305
  }
316
306
 
317
- return _react.default.createElement("div", {
307
+ return /*#__PURE__*/_react.default.createElement("div", {
318
308
  className: this.textAreaClasses,
319
309
  "data-element": "character-limit"
320
310
  }, _i18nJs.default.t('textarea.limit.prefix', {
321
311
  defaultValue: 'You have used '
322
- }), _react.default.createElement("span", {
312
+ }), /*#__PURE__*/_react.default.createElement("span", {
323
313
  className: "carbon-textarea__limit-used"
324
314
  }, _i18nJs.default.toNumber(value.length, this.i18nNumberOpts)), _i18nJs.default.t('textarea.limit.middle', {
325
315
  defaultValue: ' of '
326
- }), _react.default.createElement("span", {
316
+ }), /*#__PURE__*/_react.default.createElement("span", {
327
317
  className: "carbon-textarea__limit-max"
328
318
  }, _i18nJs.default.toNumber(this.props.characterLimit, this.i18nNumberOpts)), _i18nJs.default.t('textarea.limit.suffix', {
329
319
  defaultValue: ' characters'
330
320
  }));
331
321
  }
322
+ /**
323
+ * Renders the component.
324
+ *
325
+ * @method render
326
+ * @return {Object} JSX
327
+ */
328
+
329
+ }, {
330
+ key: "render",
331
+ value: function render() {
332
+ return /*#__PURE__*/_react.default.createElement("div", _extends({
333
+ className: this.mainClasses
334
+ }, (0, _tags.default)('textarea', this.props)), this.labelHTML, this.inputHTML, this.validationHTML, this.fieldHelpHTML, this.characterCount);
335
+ }
332
336
  }]);
333
337
 
334
338
  return Textarea;
@@ -395,8 +399,7 @@ function (_React$Component) {
395
399
  }), _defineProperty(_class, "defaultProps", {
396
400
  expandable: false,
397
401
  enforceCharacterLimit: true,
398
- warnOverLimit: false // Minimum height of the textarea
399
-
400
- }), _temp))));
402
+ warnOverLimit: false
403
+ }), _class))));
401
404
  var _default = Textarea;
402
405
  exports.default = _default;
@@ -1,28 +1,32 @@
1
1
  "use strict";
2
2
 
3
- require("core-js/modules/es.symbol");
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
4
 
5
- require("core-js/modules/es.symbol.description");
5
+ require("core-js/modules/es.object.to-string.js");
6
6
 
7
- require("core-js/modules/es.symbol.iterator");
7
+ require("core-js/modules/es.reflect.construct.js");
8
8
 
9
- require("core-js/modules/es.array.iterator");
9
+ require("core-js/modules/es.symbol.js");
10
10
 
11
- require("core-js/modules/es.object.assign");
11
+ require("core-js/modules/es.symbol.description.js");
12
12
 
13
- require("core-js/modules/es.object.get-prototype-of");
13
+ require("core-js/modules/es.symbol.iterator.js");
14
14
 
15
- require("core-js/modules/es.object.to-string");
15
+ require("core-js/modules/es.array.iterator.js");
16
16
 
17
- require("core-js/modules/es.string.iterator");
17
+ require("core-js/modules/es.string.iterator.js");
18
18
 
19
- require("core-js/modules/web.dom-collections.iterator");
19
+ require("core-js/modules/web.dom-collections.iterator.js");
20
20
 
21
21
  Object.defineProperty(exports, "__esModule", {
22
22
  value: true
23
23
  });
24
24
  exports.default = void 0;
25
25
 
26
+ require("core-js/modules/es.object.assign.js");
27
+
28
+ require("core-js/modules/es.object.get-prototype-of.js");
29
+
26
30
  var _react = _interopRequireDefault(require("react"));
27
31
 
28
32
  var _input = _interopRequireDefault(require("../../utils/decorators/input"));
@@ -39,25 +43,27 @@ require("./textbox.scss");
39
43
 
40
44
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
41
45
 
42
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
43
-
44
- 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); }
46
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
45
47
 
46
48
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
47
49
 
48
50
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
49
51
 
50
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
52
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
51
53
 
52
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
54
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
53
55
 
54
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
56
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
57
+
58
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
59
+
60
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
55
61
 
56
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
62
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
57
63
 
58
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
64
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
59
65
 
60
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
66
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
61
67
 
62
68
  /**
63
69
  * A textbox widget.
@@ -76,46 +82,27 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
76
82
  * @constructor
77
83
  * @decorators {Input,InputLabel,InputValidation}
78
84
  */
79
- var Textbox = (0, _input.default)((0, _inputLabel.default)((0, _inputValidation.default)(
80
- /*#__PURE__*/
81
- function (_React$Component) {
85
+ var Textbox = (0, _input.default)((0, _inputLabel.default)((0, _inputValidation.default)( /*#__PURE__*/function (_React$Component) {
82
86
  _inherits(Textbox, _React$Component);
83
87
 
88
+ var _super = _createSuper(Textbox);
89
+
84
90
  function Textbox() {
85
91
  _classCallCheck(this, Textbox);
86
92
 
87
- return _possibleConstructorReturn(this, _getPrototypeOf(Textbox).apply(this, arguments));
93
+ return _super.apply(this, arguments);
88
94
  }
89
95
 
90
96
  _createClass(Textbox, [{
91
- key: "render",
92
-
93
- /**
94
- * Renders the component.
95
- *
96
- * @method render
97
- * @return {Object} JSX
98
- */
99
- value: function render() {
100
- var _this = this;
101
-
102
- return _react.default.createElement("div", _extends({
103
- className: this.mainClasses,
104
- ref: function ref(comp) {
105
- _this._target = comp;
106
- }
107
- }, (0, _tags.default)('textbox', this.props)), this.labelHTML, this.inputHTML, this.validationHTML, this.fieldHelpHTML);
108
- }
109
- }, {
110
97
  key: "mainClasses",
111
-
98
+ get:
112
99
  /**
113
100
  * Main Class getter
114
101
  *
115
102
  * @method mainClasses
116
103
  * @return {void}
117
104
  */
118
- get: function get() {
105
+ function get() {
119
106
  return 'carbon-textbox';
120
107
  }
121
108
  /**
@@ -146,6 +133,25 @@ function (_React$Component) {
146
133
  props.className = this.inputClasses;
147
134
  return props;
148
135
  }
136
+ /**
137
+ * Renders the component.
138
+ *
139
+ * @method render
140
+ * @return {Object} JSX
141
+ */
142
+
143
+ }, {
144
+ key: "render",
145
+ value: function render() {
146
+ var _this = this;
147
+
148
+ return /*#__PURE__*/_react.default.createElement("div", _extends({
149
+ className: this.mainClasses,
150
+ ref: function ref(comp) {
151
+ _this._target = comp;
152
+ }
153
+ }, (0, _tags.default)('textbox', this.props)), this.labelHTML, this.inputHTML, this.validationHTML, this.fieldHelpHTML);
154
+ }
149
155
  }]);
150
156
 
151
157
  return Textbox;