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,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.object.assign.js");
12
12
 
13
- require("core-js/modules/es.object.assign");
13
+ require("core-js/modules/es.symbol.js");
14
14
 
15
- require("core-js/modules/es.object.get-prototype-of");
15
+ require("core-js/modules/es.symbol.description.js");
16
16
 
17
- require("core-js/modules/es.object.to-string");
17
+ require("core-js/modules/es.symbol.iterator.js");
18
18
 
19
- require("core-js/modules/es.string.iterator");
19
+ require("core-js/modules/es.array.iterator.js");
20
20
 
21
- require("core-js/modules/web.dom-collections.iterator");
21
+ require("core-js/modules/es.string.iterator.js");
22
+
23
+ require("core-js/modules/web.dom-collections.iterator.js");
22
24
 
23
25
  Object.defineProperty(exports, "__esModule", {
24
26
  value: true
25
27
  });
26
28
  exports.default = void 0;
27
29
 
30
+ require("core-js/modules/es.array.concat.js");
31
+
28
32
  var _react = _interopRequireDefault(require("react"));
29
33
 
30
34
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -39,36 +43,36 @@ require("./detail.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; }
53
+
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); }
55
+
56
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
51
57
 
52
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
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); }; }
53
59
 
54
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
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
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
  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; }
63
69
 
64
- var Detail =
65
- /*#__PURE__*/
66
- function (_React$Component) {
70
+ var Detail = /*#__PURE__*/function (_React$Component) {
67
71
  _inherits(Detail, _React$Component);
68
72
 
69
- function Detail() {
70
- var _getPrototypeOf2;
73
+ var _super = _createSuper(Detail);
71
74
 
75
+ function Detail() {
72
76
  var _this;
73
77
 
74
78
  _classCallCheck(this, Detail);
@@ -77,14 +81,14 @@ function (_React$Component) {
77
81
  args[_key] = arguments[_key];
78
82
  }
79
83
 
80
- _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Detail)).call.apply(_getPrototypeOf2, [this].concat(args)));
84
+ _this = _super.call.apply(_super, [this].concat(args));
81
85
 
82
86
  _defineProperty(_assertThisInitialized(_this), "icon", function () {
83
87
  if (!_this.props.icon) {
84
88
  return null;
85
89
  }
86
90
 
87
- return _react.default.createElement(_icon.default, {
91
+ return /*#__PURE__*/_react.default.createElement(_icon.default, {
88
92
  className: "carbon-detail__icon",
89
93
  type: _this.props.icon,
90
94
  "data-element": "icon"
@@ -96,7 +100,7 @@ function (_React$Component) {
96
100
  return null;
97
101
  }
98
102
 
99
- return _react.default.createElement("div", {
103
+ return /*#__PURE__*/_react.default.createElement("div", {
100
104
  className: "carbon-detail__footnote",
101
105
  "data-element": "footnote"
102
106
  }, _this.props.footnote);
@@ -106,22 +110,15 @@ function (_React$Component) {
106
110
  }
107
111
 
108
112
  _createClass(Detail, [{
109
- key: "render",
110
-
113
+ key: "classes",
114
+ get:
111
115
  /**
112
- * @method render
113
- * @return {Object} JSX
116
+ * Returns the classes for the component.
117
+ *
118
+ * @method classes
119
+ * @return {String}
114
120
  */
115
- value: function render() {
116
- return _react.default.createElement("div", _extends({
117
- className: this.classes
118
- }, (0, _tags.default)('detail', this.props)), this.icon(), _react.default.createElement("div", {
119
- className: "carbon-detail__content"
120
- }, this.props.children), this.footnote());
121
- }
122
- }, {
123
- key: "classes",
124
- get: function get() {
121
+ function get() {
125
122
  return (0, _classnames.default)('carbon-detail', this.props.className, {
126
123
  'carbon-detail--has-icon': this.props.icon
127
124
  });
@@ -133,6 +130,20 @@ function (_React$Component) {
133
130
  * @return {Object} JSX
134
131
  */
135
132
 
133
+ }, {
134
+ key: "render",
135
+ value:
136
+ /**
137
+ * @method render
138
+ * @return {Object} JSX
139
+ */
140
+ function render() {
141
+ return /*#__PURE__*/_react.default.createElement("div", _extends({
142
+ className: this.classes
143
+ }, (0, _tags.default)('detail', this.props)), this.icon(), /*#__PURE__*/_react.default.createElement("div", {
144
+ className: "carbon-detail__content"
145
+ }, this.props.children), this.footnote());
146
+ }
136
147
  }]);
137
148
 
138
149
  return Detail;
@@ -170,13 +181,6 @@ _defineProperty(Detail, "propTypes", {
170
181
  * @type {Node}
171
182
  */
172
183
  children: _propTypes.default.node
173
- /**
174
- * Returns the classes for the component.
175
- *
176
- * @method classes
177
- * @return {String}
178
- */
179
-
180
184
  });
181
185
 
182
186
  var _default = Detail;
@@ -1,34 +1,40 @@
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.iterator");
9
+ require("core-js/modules/es.reflect.construct.js");
10
10
 
11
- require("core-js/modules/es.object.assign");
11
+ require("core-js/modules/es.reflect.get.js");
12
12
 
13
- require("core-js/modules/es.object.get-own-property-descriptor");
13
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
14
14
 
15
- require("core-js/modules/es.object.get-prototype-of");
15
+ require("core-js/modules/es.object.assign.js");
16
16
 
17
- require("core-js/modules/es.object.to-string");
17
+ require("core-js/modules/es.symbol.js");
18
18
 
19
- require("core-js/modules/es.reflect.get");
19
+ require("core-js/modules/es.symbol.description.js");
20
20
 
21
- require("core-js/modules/es.string.iterator");
21
+ require("core-js/modules/es.symbol.iterator.js");
22
22
 
23
- require("core-js/modules/es.string.match");
23
+ require("core-js/modules/es.array.iterator.js");
24
24
 
25
- require("core-js/modules/web.dom-collections.iterator");
25
+ require("core-js/modules/es.string.iterator.js");
26
+
27
+ require("core-js/modules/web.dom-collections.iterator.js");
26
28
 
27
29
  Object.defineProperty(exports, "__esModule", {
28
30
  value: true
29
31
  });
30
32
  exports.default = void 0;
31
33
 
34
+ require("core-js/modules/es.regexp.exec.js");
35
+
36
+ require("core-js/modules/es.string.match.js");
37
+
32
38
  var _react = _interopRequireDefault(require("react"));
33
39
 
34
40
  var _classnames = _interopRequireDefault(require("classnames"));
@@ -51,29 +57,31 @@ require("./dialog.scss");
51
57
 
52
58
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
53
59
 
54
- 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); }
55
-
56
- 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); }
60
+ 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); }
57
61
 
58
62
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
59
63
 
60
64
  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); } }
61
65
 
62
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
66
+ 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
67
 
64
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
68
+ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
65
69
 
66
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
70
+ function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
67
71
 
68
- function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
72
+ 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); }
69
73
 
70
- function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
74
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
75
+
76
+ 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); }; }
71
77
 
72
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
78
+ 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); }
73
79
 
74
- 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); }
80
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
75
81
 
76
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
82
+ 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; } }
83
+
84
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
77
85
 
78
86
  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; }
79
87
 
@@ -99,17 +107,17 @@ var DIALOG_OPEN_HTML_CLASS = 'carbon-dialog--open';
99
107
  * @constructor
100
108
  */
101
109
 
102
- var Dialog =
103
- /*#__PURE__*/
104
- function (_Modal) {
110
+ var Dialog = /*#__PURE__*/function (_Modal) {
105
111
  _inherits(Dialog, _Modal);
106
112
 
113
+ var _super = _createSuper(Dialog);
114
+
107
115
  function Dialog(args) {
108
116
  var _this;
109
117
 
110
118
  _classCallCheck(this, Dialog);
111
119
 
112
- _this = _possibleConstructorReturn(this, _getPrototypeOf(Dialog).call(this, args));
120
+ _this = _super.call(this, args);
113
121
 
114
122
  _defineProperty(_assertThisInitialized(_this), "centerDialog", function (animating) {
115
123
  if (!_this._dialog) {
@@ -236,43 +244,6 @@ function (_Modal) {
236
244
  * @return {Void}
237
245
  */
238
246
 
239
- }, {
240
- key: "focusDialog",
241
- value: function focusDialog() {
242
- if (!this._dialog) {
243
- return;
244
- }
245
-
246
- this._dialog.focus();
247
- }
248
- /**
249
- * Determines if the dialog should have a fixed bottom.
250
- *
251
- * @method shouldHaveFixedBottom
252
- * @return {Boolean}
253
- */
254
-
255
- }, {
256
- key: "componentTags",
257
- value: function componentTags(props) {
258
- return {
259
- 'data-component': 'dialog',
260
- 'data-element': props['data-element'],
261
- 'data-role': props['data-role']
262
- };
263
- }
264
- }, {
265
- key: "additionalContent",
266
- value: function additionalContent() {
267
- return null;
268
- }
269
- /**
270
- * Returns the computed HTML for the dialog.
271
- *
272
- * @method dialogHTML
273
- * @return {Object} JSX for dialog
274
- */
275
-
276
247
  }, {
277
248
  key: "onOpening",
278
249
  get: function get() {
@@ -315,15 +286,31 @@ function (_Modal) {
315
286
  */
316
287
 
317
288
  }, {
318
- key: "dialogTitle",
289
+ key: "focusDialog",
290
+ value: function focusDialog() {
291
+ if (!this._dialog) {
292
+ return;
293
+ }
294
+
295
+ this._dialog.focus();
296
+ }
297
+ /**
298
+ * Determines if the dialog should have a fixed bottom.
299
+ *
300
+ * @method shouldHaveFixedBottom
301
+ * @return {Boolean}
302
+ */
319
303
 
304
+ }, {
305
+ key: "dialogTitle",
306
+ get:
320
307
  /**
321
308
  * Returns HTML and text for the dialog title.
322
309
  *
323
310
  * @method dialogTitle
324
311
  * @return {String} title to display
325
312
  */
326
- get: function get() {
313
+ function get() {
327
314
  var _this2 = this;
328
315
 
329
316
  if (!this.props.title) {
@@ -336,7 +323,7 @@ function (_Modal) {
336
323
  });
337
324
 
338
325
  if (typeof title === 'string') {
339
- title = _react.default.createElement(_heading.default, {
326
+ title = /*#__PURE__*/_react.default.createElement(_heading.default, {
340
327
  title: title,
341
328
  titleId: "carbon-dialog-title",
342
329
  subheader: this.props.subtitle,
@@ -344,7 +331,7 @@ function (_Modal) {
344
331
  });
345
332
  }
346
333
 
347
- return _react.default.createElement("div", {
334
+ return /*#__PURE__*/_react.default.createElement("div", {
348
335
  className: classes,
349
336
  ref: function ref(c) {
350
337
  _this2._title = c;
@@ -383,7 +370,7 @@ function (_Modal) {
383
370
  key: "closeIcon",
384
371
  get: function get() {
385
372
  if (this.props.showCloseIcon) {
386
- return _react.default.createElement(_icon.default, {
373
+ return /*#__PURE__*/_react.default.createElement(_icon.default, {
387
374
  className: "carbon-dialog__close",
388
375
  "data-element": "close",
389
376
  onClick: this.props.onCancel,
@@ -395,6 +382,27 @@ function (_Modal) {
395
382
 
396
383
  return null;
397
384
  }
385
+ }, {
386
+ key: "componentTags",
387
+ value: function componentTags(props) {
388
+ return {
389
+ 'data-component': 'dialog',
390
+ 'data-element': props['data-element'],
391
+ 'data-role': props['data-role']
392
+ };
393
+ }
394
+ }, {
395
+ key: "additionalContent",
396
+ value: function additionalContent() {
397
+ return null;
398
+ }
399
+ /**
400
+ * Returns the computed HTML for the dialog.
401
+ *
402
+ * @method dialogHTML
403
+ * @return {Object} JSX for dialog
404
+ */
405
+
398
406
  }, {
399
407
  key: "modalHTML",
400
408
  get: function get() {
@@ -431,18 +439,18 @@ function (_Modal) {
431
439
  style.minHeight = "calc(".concat(height, " - 40px)");
432
440
  }
433
441
 
434
- return _react.default.createElement("div", _extends({
442
+ return /*#__PURE__*/_react.default.createElement("div", _extends({
435
443
  ref: function ref(d) {
436
444
  _this3._dialog = d;
437
445
  }
438
446
  }, dialogProps, this.componentTags(this.props), {
439
447
  onBlur: this.onDialogBlur
440
- }), this.dialogTitle, _react.default.createElement("div", {
448
+ }), this.dialogTitle, /*#__PURE__*/_react.default.createElement("div", {
441
449
  className: "carbon-dialog__content",
442
450
  ref: function ref(c) {
443
451
  _this3._content = c;
444
452
  }
445
- }, _react.default.createElement("div", {
453
+ }, /*#__PURE__*/_react.default.createElement("div", {
446
454
  className: "carbon-dialog__inner-content",
447
455
  ref: function ref(c) {
448
456
  _this3._innerContent = c;