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.
- package/change_log/v8_1_4/position_date_picker.yml +1 -0
- package/change_log/v8_1_5/fix_path.yml +1 -0
- package/lib/__experimental__/components/input/input-presentation.component.js +35 -29
- package/lib/__experimental__/components/input/input.component.js +36 -28
- package/lib/__experimental__/components/input-decorator-bridge/input-decorator-bridge.component.js +45 -35
- package/lib/__experimental__/components/select/index.js +4 -4
- package/lib/__experimental__/components/select/option.component.js +6 -4
- package/lib/__experimental__/components/select/select-list.component.js +39 -35
- package/lib/__experimental__/components/select/select.component.js +45 -39
- package/lib/__experimental__/components/select-async/index.js +4 -4
- package/lib/__experimental__/components/select-async/select-async.component.js +53 -37
- package/lib/__experimental__/components/textbox/textbox.component.js +6 -4
- package/lib/__spec_helper__/index.js +1 -1
- package/lib/components/action-toolbar/action-toolbar.js +43 -37
- package/lib/components/alert/alert.js +35 -29
- package/lib/components/alert/alert.stories.js +4 -4
- package/lib/components/animated-menu-button/animated-menu-button.js +36 -32
- package/lib/components/animated-menu-button/animated-menu-button.stories.js +16 -24
- package/lib/components/app-wrapper/app-wrapper.js +29 -25
- package/lib/components/app-wrapper/app-wrapper.stories.js +1 -1
- package/lib/components/button/button.js +30 -26
- package/lib/components/button/button.stories.js +1 -1
- package/lib/components/button-toggle/button-toggle.js +52 -46
- package/lib/components/button-toggle/button-toggle.stories.js +23 -15
- package/lib/components/button-toggle-group/button-toggle-group.js +54 -48
- package/lib/components/button-toggle-group/button-toggle-group.stories.js +4 -4
- package/lib/components/carousel/carousel.js +48 -42
- package/lib/components/carousel/slide/slide.js +4 -4
- package/lib/components/checkbox/checkbox.js +68 -72
- package/lib/components/configurable-items/configurable-item-row/configurable-item-row.js +37 -33
- package/lib/components/configurable-items/configurable-items.js +38 -34
- package/lib/components/confirm/confirm.js +60 -54
- package/lib/components/content/content.js +31 -25
- package/lib/components/create/create.js +32 -24
- package/lib/components/date/date.js +216 -194
- package/lib/components/date/navbar/navbar.js +5 -5
- package/lib/components/date-range/date-range.js +97 -93
- package/lib/components/decimal/decimal.js +62 -56
- package/lib/components/detail/detail.js +51 -47
- package/lib/components/dialog/dialog.js +80 -72
- package/lib/components/dialog-full-screen/dialog-full-screen.js +53 -47
- package/lib/components/dialog-full-screen/full-screen-heading/full-screen-heading.js +9 -7
- package/lib/components/drag-and-drop/custom-drag-layer/custom-drag-layer.js +28 -24
- package/lib/components/drag-and-drop/drag-and-drop.js +6 -6
- package/lib/components/drag-and-drop/draggable-context/draggable-context.js +40 -37
- package/lib/components/drag-and-drop/with-drag/with-drag.js +26 -22
- package/lib/components/drag-and-drop/with-drop/with-drop.js +26 -20
- package/lib/components/dropdown/dropdown.js +146 -143
- package/lib/components/dropdown-filter/dropdown-filter.js +94 -88
- package/lib/components/dropdown-filter-ajax/dropdown-filter-ajax.js +54 -50
- package/lib/components/fieldset/fieldset.js +50 -42
- package/lib/components/filter/filter.js +43 -46
- package/lib/components/flash/flash.js +72 -64
- package/lib/components/form/cancel-button/cancel-button.js +11 -11
- package/lib/components/form/form-summary/form-summary.js +7 -7
- package/lib/components/form/form.js +68 -69
- package/lib/components/form/save-button/save-button.js +11 -11
- package/lib/components/grouped-character/grouped-character.js +49 -43
- package/lib/components/heading/heading.js +65 -59
- package/lib/components/help/help.js +46 -40
- package/lib/components/i18n/i18n.js +30 -22
- package/lib/components/icon/icon.js +55 -51
- package/lib/components/inline-inputs/inline-inputs.js +6 -6
- package/lib/components/link/link.js +45 -37
- package/lib/components/menu/menu-item/menu-item.js +55 -49
- package/lib/components/menu/menu.js +47 -41
- package/lib/components/menu/submenu-block/submenu-block.js +43 -37
- package/lib/components/menu-list/menu-list-item/menu-list-item.js +29 -25
- package/lib/components/menu-list/menu-list.js +49 -43
- package/lib/components/message/message.js +47 -41
- package/lib/components/modal/modal.js +77 -71
- package/lib/components/mount-in-app/mount-in-app.js +32 -26
- package/lib/components/multi-action-button/multi-action-button.js +52 -46
- package/lib/components/multi-step-wizard/multi-step-wizard.js +60 -54
- package/lib/components/multi-step-wizard/step/step.js +68 -69
- package/lib/components/navigation-bar/navigation-bar.js +44 -38
- package/lib/components/number/number.js +58 -52
- package/lib/components/pager/pager.js +75 -71
- package/lib/components/pages/page/page.js +6 -6
- package/lib/components/pages/pages.js +4 -4
- package/lib/components/pill/pill.js +33 -27
- package/lib/components/pod/pod.js +84 -80
- package/lib/components/portal/portal.js +34 -26
- package/lib/components/portrait/portrait.js +52 -48
- package/lib/components/preview/preview.js +4 -4
- package/lib/components/profile/profile.js +51 -45
- package/lib/components/radio-button/radio-button.js +51 -45
- package/lib/components/rainbow/rainbow.js +44 -38
- package/lib/components/row/column/column.js +1 -1
- package/lib/components/row/row.js +47 -41
- package/lib/components/scrollable-list/as-scrollable-list-item.wrapper.js +8 -8
- package/lib/components/scrollable-list/scrollable-list-item.component.js +27 -35
- package/lib/components/scrollable-list/scrollable-list.component.js +53 -37
- package/lib/components/scrollable-list/scrollable-list.style.js +5 -13
- package/lib/components/scrollable-list/test-utils.js +38 -28
- package/lib/components/settings-row/settings-row.js +49 -43
- package/lib/components/show-edit-pod/show-edit-pod.js +67 -63
- package/lib/components/sidebar/sidebar-header/sidebar-header.js +43 -37
- package/lib/components/sidebar/sidebar.js +54 -48
- package/lib/components/simple-color-picker/color-option/color-option.js +47 -41
- package/lib/components/simple-color-picker/simple-color-picker.js +53 -47
- package/lib/components/spinner/spinner.js +43 -37
- package/lib/components/split-button/split-button.js +69 -69
- package/lib/components/step-sequence/step-sequence-item/step-sequence-item.js +15 -13
- package/lib/components/step-sequence/step-sequence.js +4 -4
- package/lib/components/switch/switch.js +23 -21
- package/lib/components/table/draggable-table-cell/draggable-table-cell.js +4 -4
- package/lib/components/table/table-cell/table-cell.js +45 -39
- package/lib/components/table/table-header/table-header.js +107 -110
- package/lib/components/table/table-row/table-row.js +62 -58
- package/lib/components/table/table-subheader/table-subheader.js +32 -26
- package/lib/components/table/table.js +166 -169
- package/lib/components/table-ajax/table-ajax.js +67 -70
- package/lib/components/tabs/tab/tab.js +48 -44
- package/lib/components/tabs/tabs.js +73 -67
- package/lib/components/textarea/textarea.js +52 -49
- package/lib/components/textbox/textbox.js +49 -43
- package/lib/components/toast/toast.js +56 -50
- package/lib/components/tooltip/tooltip.js +47 -41
- package/lib/patterns/configurable-items/configurable-items-content/configurable-items-content.js +35 -29
- package/lib/patterns/configurable-items/configurable-items.js +55 -51
- package/lib/patterns/configurable-items/store/store.js +35 -27
- package/lib/style/index.js +1 -1
- package/lib/style/palette/index.js +4 -2
- package/lib/style/themes/base/index.js +7 -7
- package/lib/style/themes/test-utils.js +19 -21
- package/lib/style/utils/add-hex-symbols.js +4 -2
- package/lib/style/utils/at-opacity.js +10 -8
- package/lib/style/utils/merge-deep.js +15 -15
- package/lib/style/utils/mix.js +32 -20
- package/lib/utils/decorators/input/input.js +46 -42
- package/lib/utils/decorators/input-icon/input-icon.js +37 -33
- package/lib/utils/decorators/input-label/input-label.js +37 -31
- package/lib/utils/decorators/input-validation/input-validation.js +40 -36
- package/lib/utils/decorators/should-component-update/should-component-update.js +29 -23
- package/lib/utils/decorators/tooltip-decorator/tooltip-decorator.js +38 -34
- package/lib/utils/ether/ether.js +16 -14
- package/lib/utils/filter-children/filter-children.util.js +10 -8
- package/lib/utils/handlers/base-registry/base-registry.js +12 -13
- package/lib/utils/helpers/browser/browser.js +15 -13
- package/lib/utils/helpers/date/date.js +4 -2
- package/lib/utils/helpers/element-resize/element-resize.js +6 -4
- package/lib/utils/helpers/events/events.js +2 -2
- package/lib/utils/helpers/guid/guid.js +6 -6
- package/lib/utils/helpers/i18n/i18n.js +11 -9
- package/lib/utils/helpers/immutable/immutable.js +13 -13
- package/lib/utils/helpers/options-helper/options-helper.js +2 -1
- package/lib/utils/helpers/prop-types/prop-types.js +2 -2
- package/lib/utils/helpers/scrollable-parent/scrollable-parent.js +2 -0
- package/lib/utils/helpers/serialize/serialize.js +12 -12
- package/lib/utils/helpers/tags/tags-specs/tags-specs.js +6 -4
- package/lib/utils/helpers/to-array/to-array.js +8 -6
- package/lib/utils/router/router.js +2 -2
- package/lib/utils/service/service.js +34 -34
- package/lib/utils/validations/blank/blank.js +6 -2
- package/lib/utils/validations/date/date.js +6 -2
- package/lib/utils/validations/date-range/date-range.js +6 -2
- package/lib/utils/validations/date-within-range/date-within-range.js +6 -2
- package/lib/utils/validations/email/email.js +6 -2
- package/lib/utils/validations/exclusion/exclusion.js +6 -2
- package/lib/utils/validations/inclusion/inclusion.js +6 -2
- package/lib/utils/validations/length/length.js +6 -2
- package/lib/utils/validations/numeral/numeral-type/numeral-type.js +8 -2
- package/lib/utils/validations/numeral/numeral.js +6 -2
- package/lib/utils/validations/presence/presence.js +12 -4
- package/lib/utils/validations/regex/regex.js +8 -2
- package/lib/utils/validations/validator/validator.js +14 -14
- package/package.json +13 -13
- package/release_notes/v8_1_4.html.md +5 -0
- package/release_notes/v8_1_5.html.md +5 -0
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
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.
|
|
5
|
+
require("core-js/modules/es.object.get-prototype-of.js");
|
|
6
6
|
|
|
7
|
-
require("core-js/modules/es.
|
|
7
|
+
require("core-js/modules/es.object.to-string.js");
|
|
8
8
|
|
|
9
|
-
require("core-js/modules/es.
|
|
9
|
+
require("core-js/modules/es.reflect.construct.js");
|
|
10
10
|
|
|
11
|
-
require("core-js/modules/es.
|
|
11
|
+
require("core-js/modules/es.symbol.js");
|
|
12
12
|
|
|
13
|
-
require("core-js/modules/es.
|
|
13
|
+
require("core-js/modules/es.symbol.description.js");
|
|
14
14
|
|
|
15
|
-
require("core-js/modules/es.
|
|
15
|
+
require("core-js/modules/es.symbol.iterator.js");
|
|
16
16
|
|
|
17
|
-
require("core-js/modules/es.
|
|
17
|
+
require("core-js/modules/es.array.iterator.js");
|
|
18
18
|
|
|
19
|
-
require("core-js/modules/
|
|
19
|
+
require("core-js/modules/es.string.iterator.js");
|
|
20
|
+
|
|
21
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
20
22
|
|
|
21
23
|
Object.defineProperty(exports, "__esModule", {
|
|
22
24
|
value: true
|
|
23
25
|
});
|
|
24
26
|
exports.default = void 0;
|
|
25
27
|
|
|
28
|
+
require("core-js/modules/es.object.assign.js");
|
|
29
|
+
|
|
26
30
|
var _react = _interopRequireDefault(require("react"));
|
|
27
31
|
|
|
28
32
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -39,25 +43,27 @@ require("./split-button.scss");
|
|
|
39
43
|
|
|
40
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
41
45
|
|
|
42
|
-
function
|
|
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
|
|
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
|
|
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
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
|
|
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
|
|
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
|
|
|
@@ -80,17 +86,17 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
80
86
|
* @class SplitButton
|
|
81
87
|
* @constructor
|
|
82
88
|
*/
|
|
83
|
-
var SplitButton =
|
|
84
|
-
/*#__PURE__*/
|
|
85
|
-
function (_React$Component) {
|
|
89
|
+
var SplitButton = /*#__PURE__*/function (_React$Component) {
|
|
86
90
|
_inherits(SplitButton, _React$Component);
|
|
87
91
|
|
|
92
|
+
var _super = _createSuper(SplitButton);
|
|
93
|
+
|
|
88
94
|
function SplitButton(args) {
|
|
89
95
|
var _this;
|
|
90
96
|
|
|
91
97
|
_classCallCheck(this, SplitButton);
|
|
92
98
|
|
|
93
|
-
_this =
|
|
99
|
+
_this = _super.call(this, args);
|
|
94
100
|
|
|
95
101
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
96
102
|
/**
|
|
@@ -101,12 +107,6 @@ function (_React$Component) {
|
|
|
101
107
|
* @default false
|
|
102
108
|
*/
|
|
103
109
|
showAdditionalButtons: false
|
|
104
|
-
/**
|
|
105
|
-
* Shows the additional buttons.
|
|
106
|
-
*
|
|
107
|
-
* @method showButtons
|
|
108
|
-
*/
|
|
109
|
-
|
|
110
110
|
});
|
|
111
111
|
|
|
112
112
|
_defineProperty(_assertThisInitialized(_this), "showButtons", function () {
|
|
@@ -126,51 +126,15 @@ function (_React$Component) {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
_createClass(SplitButton, [{
|
|
129
|
-
key: "componentTags",
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Returns the data tags for the component.
|
|
133
|
-
*
|
|
134
|
-
* @method componentTags
|
|
135
|
-
* @return {Object}
|
|
136
|
-
*/
|
|
137
|
-
value: function componentTags() {
|
|
138
|
-
return {
|
|
139
|
-
'data-component': 'split-button',
|
|
140
|
-
'data-element': this.props['data-element'],
|
|
141
|
-
'data-role': this.props['data-role']
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Returns the HTML for the main button.
|
|
146
|
-
*
|
|
147
|
-
* @method renderMainButton
|
|
148
|
-
* @return {Object}
|
|
149
|
-
*/
|
|
150
|
-
|
|
151
|
-
}, {
|
|
152
|
-
key: "render",
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* @method render
|
|
156
|
-
* @return {Object}
|
|
157
|
-
*/
|
|
158
|
-
value: function render() {
|
|
159
|
-
return _react.default.createElement("div", _extends({
|
|
160
|
-
className: this.mainClasses,
|
|
161
|
-
onMouseLeave: this.hideButtons
|
|
162
|
-
}, this.componentTags()), this.renderMainButton, this.renderAdditionalButtons);
|
|
163
|
-
}
|
|
164
|
-
}, {
|
|
165
129
|
key: "mainClasses",
|
|
166
|
-
|
|
130
|
+
get:
|
|
167
131
|
/**
|
|
168
132
|
* Returns classes for the component.
|
|
169
133
|
*
|
|
170
134
|
* @method mainClasses
|
|
171
135
|
* @return {String} Main className
|
|
172
136
|
*/
|
|
173
|
-
|
|
137
|
+
function get() {
|
|
174
138
|
return (0, _classnames.default)('carbon-split-button', this.props.className, {
|
|
175
139
|
'carbon-split-button--open': this.state.showAdditionalButtons
|
|
176
140
|
});
|
|
@@ -243,14 +207,37 @@ function (_React$Component) {
|
|
|
243
207
|
|
|
244
208
|
return opts;
|
|
245
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* Returns the data tags for the component.
|
|
212
|
+
*
|
|
213
|
+
* @method componentTags
|
|
214
|
+
* @return {Object}
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
}, {
|
|
218
|
+
key: "componentTags",
|
|
219
|
+
value: function componentTags() {
|
|
220
|
+
return {
|
|
221
|
+
'data-component': 'split-button',
|
|
222
|
+
'data-element': this.props['data-element'],
|
|
223
|
+
'data-role': this.props['data-role']
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Returns the HTML for the main button.
|
|
228
|
+
*
|
|
229
|
+
* @method renderMainButton
|
|
230
|
+
* @return {Object}
|
|
231
|
+
*/
|
|
232
|
+
|
|
246
233
|
}, {
|
|
247
234
|
key: "renderMainButton",
|
|
248
235
|
get: function get() {
|
|
249
|
-
return _react.default.createElement("div", null, _react.default.createElement(_button.default, _extends({}, this.mainButtonProps, {
|
|
236
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_button.default, _extends({}, this.mainButtonProps, {
|
|
250
237
|
"data-element": "main-button"
|
|
251
|
-
}), this.props.text), _react.default.createElement(_button.default, _extends({}, this.toggleButtonProps, {
|
|
238
|
+
}), this.props.text), /*#__PURE__*/_react.default.createElement(_button.default, _extends({}, this.toggleButtonProps, {
|
|
252
239
|
"data-element": "open"
|
|
253
|
-
}), _react.default.createElement(_icon.default, {
|
|
240
|
+
}), /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
254
241
|
type: "dropdown"
|
|
255
242
|
})));
|
|
256
243
|
}
|
|
@@ -264,11 +251,24 @@ function (_React$Component) {
|
|
|
264
251
|
}, {
|
|
265
252
|
key: "renderAdditionalButtons",
|
|
266
253
|
get: function get() {
|
|
267
|
-
return _react.default.createElement("div", {
|
|
254
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
268
255
|
className: this.additionalButtonsClasses,
|
|
269
256
|
"data-element": "additional-buttons"
|
|
270
257
|
}, this.props.children);
|
|
271
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* @method render
|
|
261
|
+
* @return {Object}
|
|
262
|
+
*/
|
|
263
|
+
|
|
264
|
+
}, {
|
|
265
|
+
key: "render",
|
|
266
|
+
value: function render() {
|
|
267
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
268
|
+
className: this.mainClasses,
|
|
269
|
+
onMouseLeave: this.hideButtons
|
|
270
|
+
}, this.componentTags()), this.renderMainButton, this.renderAdditionalButtons);
|
|
271
|
+
}
|
|
272
272
|
}]);
|
|
273
273
|
|
|
274
274
|
return SplitButton;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.
|
|
3
|
+
require("core-js/modules/es.object.keys.js");
|
|
4
4
|
|
|
5
|
-
require("core-js/modules/es.
|
|
5
|
+
require("core-js/modules/es.symbol.js");
|
|
6
6
|
|
|
7
|
-
require("core-js/modules/es.object.assign");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.object.keys");
|
|
7
|
+
require("core-js/modules/es.object.assign.js");
|
|
10
8
|
|
|
11
9
|
Object.defineProperty(exports, "__esModule", {
|
|
12
10
|
value: true
|
|
13
11
|
});
|
|
14
12
|
exports.default = void 0;
|
|
15
13
|
|
|
14
|
+
require("core-js/modules/es.array.concat.js");
|
|
15
|
+
|
|
16
16
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
17
|
|
|
18
18
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -21,9 +21,11 @@ var _icon = _interopRequireDefault(require("../../icon"));
|
|
|
21
21
|
|
|
22
22
|
require("./step-sequence-item.scss");
|
|
23
23
|
|
|
24
|
+
var _excluded = ["children", "indicator", "status", "hiddenCompleteLabel", "hiddenCurrentLabel"];
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
|
-
function _extends() { _extends = Object.assign
|
|
28
|
+
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); }
|
|
27
29
|
|
|
28
30
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
29
31
|
|
|
@@ -36,7 +38,7 @@ var classes = function classes(status) {
|
|
|
36
38
|
};
|
|
37
39
|
|
|
38
40
|
var stepMarker = function stepMarker(status, indicator) {
|
|
39
|
-
return status === 'complete' ? _react.default.createElement(_icon.default, {
|
|
41
|
+
return status === 'complete' ? /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
40
42
|
type: "tick"
|
|
41
43
|
}) : indicator;
|
|
42
44
|
};
|
|
@@ -49,7 +51,7 @@ var ariaRoleProp = function ariaRoleProp(status) {
|
|
|
49
51
|
|
|
50
52
|
var completeLabel = function completeLabel(label, status) {
|
|
51
53
|
if (label && status === 'complete') {
|
|
52
|
-
return _react.default.createElement("span", {
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
53
55
|
className: "carbon-step-sequence-item__visually-hidden"
|
|
54
56
|
}, label);
|
|
55
57
|
}
|
|
@@ -59,7 +61,7 @@ var completeLabel = function completeLabel(label, status) {
|
|
|
59
61
|
|
|
60
62
|
var currentLabel = function currentLabel(label, status) {
|
|
61
63
|
if (label && status === 'current') {
|
|
62
|
-
return _react.default.createElement("span", {
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
63
65
|
className: "carbon-step-sequence-item__visually-hidden"
|
|
64
66
|
}, label);
|
|
65
67
|
}
|
|
@@ -73,13 +75,13 @@ var StepSequenceItem = function StepSequenceItem(_ref) {
|
|
|
73
75
|
status = _ref.status,
|
|
74
76
|
hiddenCompleteLabel = _ref.hiddenCompleteLabel,
|
|
75
77
|
hiddenCurrentLabel = _ref.hiddenCurrentLabel,
|
|
76
|
-
props = _objectWithoutProperties(_ref,
|
|
78
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
77
79
|
|
|
78
|
-
return _react.default.createElement("li", _extends({
|
|
80
|
+
return /*#__PURE__*/_react.default.createElement("li", _extends({
|
|
79
81
|
className: classes(status)
|
|
80
|
-
}, ariaRoleProp(status), props), completeLabel(hiddenCompleteLabel, status), currentLabel(hiddenCurrentLabel, status), _react.default.createElement("div", {
|
|
82
|
+
}, ariaRoleProp(status), props), completeLabel(hiddenCompleteLabel, status), currentLabel(hiddenCurrentLabel, status), /*#__PURE__*/_react.default.createElement("div", {
|
|
81
83
|
className: "carbon-step-sequence-item__label"
|
|
82
|
-
}, _react.default.createElement("span", {
|
|
84
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
83
85
|
className: "carbon-step-sequence-item__indicator"
|
|
84
86
|
}, stepMarker(status, indicator)), children));
|
|
85
87
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.array.concat");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
6
|
+
exports.StepSequence = void 0;
|
|
8
7
|
Object.defineProperty(exports, "StepSequenceItem", {
|
|
9
8
|
enumerable: true,
|
|
10
9
|
get: function get() {
|
|
11
10
|
return _stepSequenceItem.default;
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
|
-
|
|
13
|
+
|
|
14
|
+
require("core-js/modules/es.array.concat.js");
|
|
15
15
|
|
|
16
16
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
17
|
|
|
@@ -34,7 +34,7 @@ var classes = function classes(orientation) {
|
|
|
34
34
|
var StepSequence = function StepSequence(_ref) {
|
|
35
35
|
var children = _ref.children,
|
|
36
36
|
orientation = _ref.orientation;
|
|
37
|
-
return _react.default.createElement("ol", {
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement("ol", {
|
|
38
38
|
className: classes(orientation)
|
|
39
39
|
}, children);
|
|
40
40
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.
|
|
3
|
+
require("core-js/modules/es.object.keys.js");
|
|
4
4
|
|
|
5
|
-
require("core-js/modules/es.
|
|
5
|
+
require("core-js/modules/es.symbol.js");
|
|
6
6
|
|
|
7
|
-
require("core-js/modules/es.array.filter");
|
|
7
|
+
require("core-js/modules/es.array.filter.js");
|
|
8
8
|
|
|
9
|
-
require("core-js/modules/es.object.
|
|
9
|
+
require("core-js/modules/es.object.to-string.js");
|
|
10
10
|
|
|
11
|
-
require("core-js/modules/es.object.get-own-property-descriptor");
|
|
11
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
12
12
|
|
|
13
|
-
require("core-js/modules/
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/web.dom-collections.for-each");
|
|
13
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
16
14
|
|
|
17
15
|
Object.defineProperty(exports, "__esModule", {
|
|
18
16
|
value: true
|
|
19
17
|
});
|
|
20
18
|
exports.default = void 0;
|
|
21
19
|
|
|
20
|
+
require("core-js/modules/es.object.assign.js");
|
|
21
|
+
|
|
22
22
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
23
23
|
|
|
24
24
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -31,17 +31,19 @@ var _icon = _interopRequireDefault(require("../icon"));
|
|
|
31
31
|
|
|
32
32
|
require("./switch.scss");
|
|
33
33
|
|
|
34
|
+
var _excluded = ["loading"];
|
|
35
|
+
|
|
34
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
37
|
|
|
36
38
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
37
39
|
|
|
38
40
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
39
41
|
|
|
40
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys
|
|
42
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
|
41
43
|
|
|
42
44
|
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; }
|
|
43
45
|
|
|
44
|
-
function _extends() { _extends = Object.assign
|
|
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
|
var switchClasses = function switchClasses(props) {
|
|
47
49
|
var loadingClass = props.loading ? ' carbon-switch__loading' : '',
|
|
@@ -63,15 +65,15 @@ var switchClasses = function switchClasses(props) {
|
|
|
63
65
|
|
|
64
66
|
|
|
65
67
|
var Switch = function Switch(props) {
|
|
66
|
-
return _react.default.createElement(_checkbox.default, _extends({
|
|
68
|
+
return /*#__PURE__*/_react.default.createElement(_checkbox.default, _extends({
|
|
67
69
|
disabled: props.loading
|
|
68
|
-
}, propsForCheckbox(props)), _react.default.createElement("div", {
|
|
70
|
+
}, propsForCheckbox(props)), /*#__PURE__*/_react.default.createElement("div", {
|
|
69
71
|
className: "carbon-switch__switch".concat(props.loading ? ' carbon-switch__switch__loading' : '')
|
|
70
|
-
}, _react.default.createElement("span", {
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
71
73
|
className: "carbon-switch__slider"
|
|
72
|
-
}), _react.default.createElement("div", {
|
|
74
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
73
75
|
className: "carbon-switch__on"
|
|
74
|
-
}, renderIcon('tick', props.loading)), _react.default.createElement("div", {
|
|
76
|
+
}, renderIcon('tick', props.loading)), /*#__PURE__*/_react.default.createElement("div", {
|
|
75
77
|
className: "carbon-switch__off"
|
|
76
78
|
}, renderIcon('cross', props.loading))));
|
|
77
79
|
};
|
|
@@ -86,7 +88,7 @@ Switch.defaultProps = _objectSpread({}, _checkbox.default.defaultProps, {
|
|
|
86
88
|
|
|
87
89
|
function propsForCheckbox(props) {
|
|
88
90
|
var loading = props.loading,
|
|
89
|
-
checkboxProps = _objectWithoutProperties(props,
|
|
91
|
+
checkboxProps = _objectWithoutProperties(props, _excluded);
|
|
90
92
|
|
|
91
93
|
if (loading) {
|
|
92
94
|
checkboxProps.readOnly = true;
|
|
@@ -98,18 +100,18 @@ function propsForCheckbox(props) {
|
|
|
98
100
|
|
|
99
101
|
function renderIcon(icon, loading) {
|
|
100
102
|
if (loading) {
|
|
101
|
-
return _react.default.createElement("div", {
|
|
103
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
102
104
|
className: "carbon-loading-dots"
|
|
103
|
-
}, _react.default.createElement("div", {
|
|
105
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
104
106
|
className: "carbon-loading-dots__bounce carbon-loading-dots__bounce1"
|
|
105
|
-
}), _react.default.createElement("div", {
|
|
107
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
106
108
|
className: "carbon-loading-dots__bounce carbon-loading-dots__bounce2"
|
|
107
|
-
}), _react.default.createElement("div", {
|
|
109
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
108
110
|
className: "carbon-loading-dots__bounce carbon-loading-dots__bounce3"
|
|
109
111
|
}));
|
|
110
112
|
}
|
|
111
113
|
|
|
112
|
-
return _react.default.createElement(_icon.default, {
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
113
115
|
type: icon
|
|
114
116
|
});
|
|
115
117
|
}
|
|
@@ -19,7 +19,7 @@ require("./draggable-table-cell.scss");
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
-
var iconHTML = _react.default.createElement("div", null, _react.default.createElement(_icon.default, {
|
|
22
|
+
var iconHTML = /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
23
23
|
className: "draggable-table-cell__icon",
|
|
24
24
|
type: "drag_vertical"
|
|
25
25
|
}));
|
|
@@ -33,15 +33,15 @@ var iconHTML = _react.default.createElement("div", null, _react.default.createEl
|
|
|
33
33
|
var DraggableTableCell = function DraggableTableCell(props) {
|
|
34
34
|
var _canDrag = props.canDrag !== false;
|
|
35
35
|
|
|
36
|
-
var icon = _react.default.createElement(_withDrag.default, {
|
|
36
|
+
var icon = /*#__PURE__*/_react.default.createElement(_withDrag.default, {
|
|
37
37
|
identifier: props.identifier,
|
|
38
38
|
draggableNode: props.draggableNode,
|
|
39
39
|
canDrag: function canDrag() {
|
|
40
40
|
return _canDrag;
|
|
41
41
|
}
|
|
42
|
-
}, _canDrag ? iconHTML : _react.default.createElement("span", null));
|
|
42
|
+
}, _canDrag ? iconHTML : /*#__PURE__*/_react.default.createElement("span", null));
|
|
43
43
|
|
|
44
|
-
return _react.default.createElement(_tableCell.default, {
|
|
44
|
+
return /*#__PURE__*/_react.default.createElement(_tableCell.default, {
|
|
45
45
|
className: "draggable-table-cell"
|
|
46
46
|
}, icon);
|
|
47
47
|
};
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
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.
|
|
5
|
+
require("core-js/modules/es.object.get-prototype-of.js");
|
|
6
6
|
|
|
7
|
-
require("core-js/modules/es.
|
|
7
|
+
require("core-js/modules/es.object.to-string.js");
|
|
8
8
|
|
|
9
|
-
require("core-js/modules/es.
|
|
9
|
+
require("core-js/modules/es.reflect.construct.js");
|
|
10
10
|
|
|
11
|
-
require("core-js/modules/es.
|
|
11
|
+
require("core-js/modules/es.symbol.js");
|
|
12
12
|
|
|
13
|
-
require("core-js/modules/es.
|
|
13
|
+
require("core-js/modules/es.symbol.description.js");
|
|
14
14
|
|
|
15
|
-
require("core-js/modules/es.
|
|
15
|
+
require("core-js/modules/es.symbol.iterator.js");
|
|
16
16
|
|
|
17
|
-
require("core-js/modules/es.
|
|
17
|
+
require("core-js/modules/es.array.iterator.js");
|
|
18
18
|
|
|
19
|
-
require("core-js/modules/
|
|
19
|
+
require("core-js/modules/es.string.iterator.js");
|
|
20
|
+
|
|
21
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
20
22
|
|
|
21
23
|
Object.defineProperty(exports, "__esModule", {
|
|
22
24
|
value: true
|
|
23
25
|
});
|
|
24
26
|
exports.default = void 0;
|
|
25
27
|
|
|
28
|
+
require("core-js/modules/es.object.assign.js");
|
|
29
|
+
|
|
26
30
|
var _react = _interopRequireDefault(require("react"));
|
|
27
31
|
|
|
28
32
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -37,25 +41,27 @@ require("./table-cell.scss");
|
|
|
37
41
|
|
|
38
42
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
39
43
|
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
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); }
|
|
44
|
+
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); }
|
|
43
45
|
|
|
44
46
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
45
47
|
|
|
46
48
|
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); } }
|
|
47
49
|
|
|
48
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
50
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
49
51
|
|
|
50
|
-
function
|
|
52
|
+
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); }
|
|
51
53
|
|
|
52
|
-
function
|
|
54
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
53
55
|
|
|
54
|
-
function
|
|
56
|
+
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); }; }
|
|
55
57
|
|
|
56
|
-
function
|
|
58
|
+
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); }
|
|
57
59
|
|
|
58
|
-
function
|
|
60
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
61
|
+
|
|
62
|
+
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; } }
|
|
63
|
+
|
|
64
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
59
65
|
|
|
60
66
|
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; }
|
|
61
67
|
|
|
@@ -75,31 +81,27 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
75
81
|
* @class TableCell
|
|
76
82
|
* @constructor
|
|
77
83
|
*/
|
|
78
|
-
var TableCell =
|
|
79
|
-
/*#__PURE__*/
|
|
80
|
-
function (_React$Component) {
|
|
84
|
+
var TableCell = /*#__PURE__*/function (_React$Component) {
|
|
81
85
|
_inherits(TableCell, _React$Component);
|
|
82
86
|
|
|
87
|
+
var _super = _createSuper(TableCell);
|
|
88
|
+
|
|
83
89
|
function TableCell() {
|
|
84
90
|
_classCallCheck(this, TableCell);
|
|
85
91
|
|
|
86
|
-
return
|
|
92
|
+
return _super.apply(this, arguments);
|
|
87
93
|
}
|
|
88
94
|
|
|
89
95
|
_createClass(TableCell, [{
|
|
90
|
-
key: "
|
|
91
|
-
|
|
96
|
+
key: "tableCellClasses",
|
|
97
|
+
get:
|
|
92
98
|
/**
|
|
93
|
-
*
|
|
99
|
+
* Returns classes to be used on the TD element.
|
|
94
100
|
*
|
|
95
|
-
* @method
|
|
101
|
+
* @method tableCellClasses
|
|
102
|
+
* @return {String}
|
|
96
103
|
*/
|
|
97
|
-
|
|
98
|
-
return _react.default.createElement("td", _extends({}, this.tableCellProps, (0, _tags.default)('table-cell', this.props)), this.props.children);
|
|
99
|
-
}
|
|
100
|
-
}, {
|
|
101
|
-
key: "tableCellClasses",
|
|
102
|
-
get: function get() {
|
|
104
|
+
function get() {
|
|
103
105
|
return (0, _classnames.default)('carbon-table-cell', this.props.className, _defineProperty({}, "carbon-table-cell--align-".concat(this.props.align), this.props.align), {
|
|
104
106
|
'carbon-table-cell--action': this.props.action
|
|
105
107
|
});
|
|
@@ -121,6 +123,17 @@ function (_React$Component) {
|
|
|
121
123
|
props.className = this.tableCellClasses;
|
|
122
124
|
return props;
|
|
123
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Renders the component.
|
|
128
|
+
*
|
|
129
|
+
* @method render
|
|
130
|
+
*/
|
|
131
|
+
|
|
132
|
+
}, {
|
|
133
|
+
key: "render",
|
|
134
|
+
value: function render() {
|
|
135
|
+
return /*#__PURE__*/_react.default.createElement("td", _extends({}, this.tableCellProps, (0, _tags.default)('table-cell', this.props)), this.props.children);
|
|
136
|
+
}
|
|
124
137
|
}]);
|
|
125
138
|
|
|
126
139
|
return TableCell;
|
|
@@ -158,13 +171,6 @@ _defineProperty(TableCell, "propTypes", {
|
|
|
158
171
|
* @type {String}
|
|
159
172
|
*/
|
|
160
173
|
className: _propTypes.default.string
|
|
161
|
-
/**
|
|
162
|
-
* Returns classes to be used on the TD element.
|
|
163
|
-
*
|
|
164
|
-
* @method tableCellClasses
|
|
165
|
-
* @return {String}
|
|
166
|
-
*/
|
|
167
|
-
|
|
168
174
|
});
|
|
169
175
|
|
|
170
176
|
var _default = TableCell;
|