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,32 +1,36 @@
|
|
|
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/es.
|
|
19
|
+
require("core-js/modules/es.string.iterator.js");
|
|
20
20
|
|
|
21
|
-
require("core-js/modules/
|
|
22
|
-
|
|
23
|
-
require("core-js/modules/web.dom-collections.iterator");
|
|
21
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
24
22
|
|
|
25
23
|
Object.defineProperty(exports, "__esModule", {
|
|
26
24
|
value: true
|
|
27
25
|
});
|
|
28
26
|
exports.default = void 0;
|
|
29
27
|
|
|
28
|
+
require("core-js/modules/es.array.concat.js");
|
|
29
|
+
|
|
30
|
+
require("core-js/modules/es.object.keys.js");
|
|
31
|
+
|
|
32
|
+
require("core-js/modules/es.object.assign.js");
|
|
33
|
+
|
|
30
34
|
var _react = _interopRequireDefault(require("react"));
|
|
31
35
|
|
|
32
36
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -55,36 +59,36 @@ require("./show-edit-pod.scss");
|
|
|
55
59
|
|
|
56
60
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
57
61
|
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
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); }
|
|
62
|
+
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); }
|
|
61
63
|
|
|
62
64
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
63
65
|
|
|
64
66
|
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); } }
|
|
65
67
|
|
|
66
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
68
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
69
|
+
|
|
70
|
+
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); }
|
|
67
71
|
|
|
68
|
-
function
|
|
72
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
69
73
|
|
|
70
|
-
function
|
|
74
|
+
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); }; }
|
|
75
|
+
|
|
76
|
+
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); }
|
|
71
77
|
|
|
72
78
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
73
79
|
|
|
74
|
-
function
|
|
80
|
+
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; } }
|
|
75
81
|
|
|
76
|
-
function
|
|
82
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
77
83
|
|
|
78
84
|
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
85
|
|
|
80
|
-
var ShowEditPod =
|
|
81
|
-
/*#__PURE__*/
|
|
82
|
-
function (_React$Component) {
|
|
86
|
+
var ShowEditPod = /*#__PURE__*/function (_React$Component) {
|
|
83
87
|
_inherits(ShowEditPod, _React$Component);
|
|
84
88
|
|
|
85
|
-
|
|
86
|
-
var _getPrototypeOf2;
|
|
89
|
+
var _super = _createSuper(ShowEditPod);
|
|
87
90
|
|
|
91
|
+
function ShowEditPod() {
|
|
88
92
|
var _this;
|
|
89
93
|
|
|
90
94
|
_classCallCheck(this, ShowEditPod);
|
|
@@ -93,7 +97,7 @@ function (_React$Component) {
|
|
|
93
97
|
args[_key] = arguments[_key];
|
|
94
98
|
}
|
|
95
99
|
|
|
96
|
-
_this =
|
|
100
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
97
101
|
|
|
98
102
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
99
103
|
/**
|
|
@@ -104,13 +108,6 @@ function (_React$Component) {
|
|
|
104
108
|
*/
|
|
105
109
|
editing: false // eslint-disable-line react/no-unused-state
|
|
106
110
|
|
|
107
|
-
/**
|
|
108
|
-
* Determine if the component is controlled internally or externally
|
|
109
|
-
* If editing prop is undefined then component is controlled internally
|
|
110
|
-
*
|
|
111
|
-
* @method componentWillMount
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
111
|
});
|
|
115
112
|
|
|
116
113
|
_defineProperty(_assertThisInitialized(_this), "onEdit", function (ev) {
|
|
@@ -174,7 +171,14 @@ function (_React$Component) {
|
|
|
174
171
|
|
|
175
172
|
_createClass(ShowEditPod, [{
|
|
176
173
|
key: "componentWillMount",
|
|
177
|
-
value:
|
|
174
|
+
value:
|
|
175
|
+
/**
|
|
176
|
+
* Determine if the component is controlled internally or externally
|
|
177
|
+
* If editing prop is undefined then component is controlled internally
|
|
178
|
+
*
|
|
179
|
+
* @method componentWillMount
|
|
180
|
+
*/
|
|
181
|
+
function componentWillMount() {
|
|
178
182
|
if (typeof this.props.editing === 'undefined') {
|
|
179
183
|
this.control = 'state';
|
|
180
184
|
}
|
|
@@ -199,39 +203,16 @@ function (_React$Component) {
|
|
|
199
203
|
* @method onEdit
|
|
200
204
|
*/
|
|
201
205
|
|
|
202
|
-
}, {
|
|
203
|
-
key: "render",
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* @method render
|
|
207
|
-
*/
|
|
208
|
-
value: function render() {
|
|
209
|
-
var _this2 = this;
|
|
210
|
-
|
|
211
|
-
return _react.default.createElement(_pod.default, _extends({
|
|
212
|
-
className: this.mainClasses
|
|
213
|
-
}, this.podProps, {
|
|
214
|
-
ref: function ref(node) {
|
|
215
|
-
_this2.pod = node;
|
|
216
|
-
},
|
|
217
|
-
tabIndex: "-1"
|
|
218
|
-
}, (0, _tags.default)('show-edit-pod', this.props)), _react.default.createElement(_CSSTransitionGroup.default, {
|
|
219
|
-
component: "div",
|
|
220
|
-
transitionName: this.props.transitionName,
|
|
221
|
-
transitionEnterTimeout: 300,
|
|
222
|
-
transitionLeaveTimeout: 50
|
|
223
|
-
}, this.content));
|
|
224
|
-
}
|
|
225
206
|
}, {
|
|
226
207
|
key: "stateControlled",
|
|
227
|
-
|
|
208
|
+
get:
|
|
228
209
|
/**
|
|
229
210
|
* True if the component is controlled by state
|
|
230
211
|
*
|
|
231
212
|
* @method stateControlled
|
|
232
213
|
* @return {Boolean}
|
|
233
214
|
*/
|
|
234
|
-
|
|
215
|
+
function get() {
|
|
235
216
|
return this.control === 'state';
|
|
236
217
|
}
|
|
237
218
|
/**
|
|
@@ -254,7 +235,7 @@ function (_React$Component) {
|
|
|
254
235
|
}, {
|
|
255
236
|
key: "deleteButton",
|
|
256
237
|
get: function get() {
|
|
257
|
-
return _react.default.createElement(_link.default, {
|
|
238
|
+
return /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
258
239
|
as: "error",
|
|
259
240
|
className: "carbon-show-edit-pod__delete",
|
|
260
241
|
onClick: this.props.onDelete
|
|
@@ -271,7 +252,7 @@ function (_React$Component) {
|
|
|
271
252
|
}, {
|
|
272
253
|
key: "editContent",
|
|
273
254
|
get: function get() {
|
|
274
|
-
return _react.default.createElement(_form.default, {
|
|
255
|
+
return /*#__PURE__*/_react.default.createElement(_form.default, {
|
|
275
256
|
additionalActions: this.props.onDelete ? this.deleteButton : null,
|
|
276
257
|
afterFormValidation: this.onSaveEditForm,
|
|
277
258
|
beforeFormValidation: this.props.beforeFormValidation,
|
|
@@ -295,12 +276,12 @@ function (_React$Component) {
|
|
|
295
276
|
key: "content",
|
|
296
277
|
get: function get() {
|
|
297
278
|
if (this[this.control].editing) {
|
|
298
|
-
return _react.default.createElement("div", {
|
|
279
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
299
280
|
key: "edit"
|
|
300
281
|
}, this.editContent);
|
|
301
282
|
}
|
|
302
283
|
|
|
303
|
-
return _react.default.createElement("div", {
|
|
284
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
304
285
|
key: "show"
|
|
305
286
|
}, this.props.children);
|
|
306
287
|
}
|
|
@@ -360,6 +341,29 @@ function (_React$Component) {
|
|
|
360
341
|
* @method __focusOnPod
|
|
361
342
|
*/
|
|
362
343
|
|
|
344
|
+
}, {
|
|
345
|
+
key: "render",
|
|
346
|
+
value:
|
|
347
|
+
/**
|
|
348
|
+
* @method render
|
|
349
|
+
*/
|
|
350
|
+
function render() {
|
|
351
|
+
var _this2 = this;
|
|
352
|
+
|
|
353
|
+
return /*#__PURE__*/_react.default.createElement(_pod.default, _extends({
|
|
354
|
+
className: this.mainClasses
|
|
355
|
+
}, this.podProps, {
|
|
356
|
+
ref: function ref(node) {
|
|
357
|
+
_this2.pod = node;
|
|
358
|
+
},
|
|
359
|
+
tabIndex: "-1"
|
|
360
|
+
}, (0, _tags.default)('show-edit-pod', this.props)), /*#__PURE__*/_react.default.createElement(_CSSTransitionGroup.default, {
|
|
361
|
+
component: "div",
|
|
362
|
+
transitionName: this.props.transitionName,
|
|
363
|
+
transitionEnterTimeout: 300,
|
|
364
|
+
transitionLeaveTimeout: 50
|
|
365
|
+
}, this.content));
|
|
366
|
+
}
|
|
363
367
|
}]);
|
|
364
368
|
|
|
365
369
|
return ShowEditPod;
|
|
@@ -1,22 +1,26 @@
|
|
|
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.object.assign");
|
|
11
|
+
require("core-js/modules/es.object.assign.js");
|
|
12
12
|
|
|
13
|
-
require("core-js/modules/es.
|
|
13
|
+
require("core-js/modules/es.symbol.js");
|
|
14
14
|
|
|
15
|
-
require("core-js/modules/es.
|
|
15
|
+
require("core-js/modules/es.symbol.description.js");
|
|
16
16
|
|
|
17
|
-
require("core-js/modules/es.
|
|
17
|
+
require("core-js/modules/es.symbol.iterator.js");
|
|
18
18
|
|
|
19
|
-
require("core-js/modules/
|
|
19
|
+
require("core-js/modules/es.array.iterator.js");
|
|
20
|
+
|
|
21
|
+
require("core-js/modules/es.string.iterator.js");
|
|
22
|
+
|
|
23
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
20
24
|
|
|
21
25
|
Object.defineProperty(exports, "__esModule", {
|
|
22
26
|
value: true
|
|
@@ -35,25 +39,27 @@ require("./sidebar-header.scss");
|
|
|
35
39
|
|
|
36
40
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
41
|
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
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); }
|
|
42
|
+
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); }
|
|
41
43
|
|
|
42
44
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
43
45
|
|
|
44
46
|
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); } }
|
|
45
47
|
|
|
46
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
48
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
47
49
|
|
|
48
|
-
function
|
|
50
|
+
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); }
|
|
49
51
|
|
|
50
|
-
function
|
|
52
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
51
53
|
|
|
52
|
-
function
|
|
54
|
+
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
|
+
|
|
56
|
+
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
|
+
|
|
58
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
53
59
|
|
|
54
|
-
function
|
|
60
|
+
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; } }
|
|
55
61
|
|
|
56
|
-
function
|
|
62
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
57
63
|
|
|
58
64
|
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; }
|
|
59
65
|
|
|
@@ -80,36 +86,43 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
80
86
|
* @class SidebarHeader
|
|
81
87
|
* @constructor
|
|
82
88
|
*/
|
|
83
|
-
var SidebarHeader =
|
|
84
|
-
/*#__PURE__*/
|
|
85
|
-
function (_React$Component) {
|
|
89
|
+
var SidebarHeader = /*#__PURE__*/function (_React$Component) {
|
|
86
90
|
_inherits(SidebarHeader, _React$Component);
|
|
87
91
|
|
|
92
|
+
var _super = _createSuper(SidebarHeader);
|
|
93
|
+
|
|
88
94
|
function SidebarHeader() {
|
|
89
95
|
_classCallCheck(this, SidebarHeader);
|
|
90
96
|
|
|
91
|
-
return
|
|
97
|
+
return _super.apply(this, arguments);
|
|
92
98
|
}
|
|
93
99
|
|
|
94
100
|
_createClass(SidebarHeader, [{
|
|
95
|
-
key: "
|
|
96
|
-
|
|
101
|
+
key: "mainClasses",
|
|
102
|
+
get:
|
|
103
|
+
/**
|
|
104
|
+
* Returns classes for the component.
|
|
105
|
+
*
|
|
106
|
+
* @method mainClasses
|
|
107
|
+
* @return {String} Main className
|
|
108
|
+
*/
|
|
109
|
+
function get() {
|
|
110
|
+
return (0, _classnames.default)('carbon-sidebar-header', this.props.className);
|
|
111
|
+
}
|
|
97
112
|
/**
|
|
98
113
|
* Renders the component.
|
|
99
114
|
*
|
|
100
115
|
* @method render
|
|
101
116
|
* @return {Object} JSX
|
|
102
117
|
*/
|
|
118
|
+
|
|
119
|
+
}, {
|
|
120
|
+
key: "render",
|
|
103
121
|
value: function render() {
|
|
104
|
-
return _react.default.createElement("div", _extends({
|
|
122
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
105
123
|
className: this.mainClasses
|
|
106
124
|
}, (0, _tags.default)('sidebar-header', this.props)), this.props.children);
|
|
107
125
|
}
|
|
108
|
-
}, {
|
|
109
|
-
key: "mainClasses",
|
|
110
|
-
get: function get() {
|
|
111
|
-
return (0, _classnames.default)('carbon-sidebar-header', this.props.className);
|
|
112
|
-
}
|
|
113
126
|
}]);
|
|
114
127
|
|
|
115
128
|
return SidebarHeader;
|
|
@@ -137,13 +150,6 @@ _defineProperty(SidebarHeader, "propTypes", {
|
|
|
137
150
|
_defineProperty(SidebarHeader, "defaultProps", {
|
|
138
151
|
children: null,
|
|
139
152
|
className: ''
|
|
140
|
-
/**
|
|
141
|
-
* Returns classes for the component.
|
|
142
|
-
*
|
|
143
|
-
* @method mainClasses
|
|
144
|
-
* @return {String} Main className
|
|
145
|
-
*/
|
|
146
|
-
|
|
147
153
|
});
|
|
148
154
|
|
|
149
155
|
var _default = SidebarHeader;
|
|
@@ -1,33 +1,37 @@
|
|
|
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.object.assign");
|
|
11
|
+
require("core-js/modules/es.object.assign.js");
|
|
12
12
|
|
|
13
|
-
require("core-js/modules/es.
|
|
13
|
+
require("core-js/modules/es.symbol.js");
|
|
14
14
|
|
|
15
|
-
require("core-js/modules/es.
|
|
15
|
+
require("core-js/modules/es.symbol.description.js");
|
|
16
16
|
|
|
17
|
-
require("core-js/modules/es.
|
|
17
|
+
require("core-js/modules/es.symbol.iterator.js");
|
|
18
18
|
|
|
19
|
-
require("core-js/modules/
|
|
19
|
+
require("core-js/modules/es.array.iterator.js");
|
|
20
|
+
|
|
21
|
+
require("core-js/modules/es.string.iterator.js");
|
|
22
|
+
|
|
23
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
20
24
|
|
|
21
25
|
Object.defineProperty(exports, "__esModule", {
|
|
22
26
|
value: true
|
|
23
27
|
});
|
|
28
|
+
exports.Sidebar = void 0;
|
|
24
29
|
Object.defineProperty(exports, "SidebarHeader", {
|
|
25
30
|
enumerable: true,
|
|
26
31
|
get: function get() {
|
|
27
32
|
return _sidebarHeader.default;
|
|
28
33
|
}
|
|
29
34
|
});
|
|
30
|
-
exports.Sidebar = void 0;
|
|
31
35
|
|
|
32
36
|
var _react = _interopRequireDefault(require("react"));
|
|
33
37
|
|
|
@@ -45,25 +49,27 @@ require("./sidebar.scss");
|
|
|
45
49
|
|
|
46
50
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
47
51
|
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
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); }
|
|
52
|
+
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); }
|
|
51
53
|
|
|
52
54
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
53
55
|
|
|
54
56
|
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); } }
|
|
55
57
|
|
|
56
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
58
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
57
59
|
|
|
58
|
-
function
|
|
60
|
+
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); }
|
|
59
61
|
|
|
60
|
-
function
|
|
62
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
61
63
|
|
|
62
|
-
function
|
|
64
|
+
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
65
|
|
|
64
|
-
function
|
|
66
|
+
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
67
|
|
|
66
|
-
function
|
|
68
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
69
|
+
|
|
70
|
+
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; } }
|
|
71
|
+
|
|
72
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
67
73
|
|
|
68
74
|
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; }
|
|
69
75
|
|
|
@@ -92,36 +98,27 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
92
98
|
* @class Sidebar
|
|
93
99
|
* @constructor
|
|
94
100
|
*/
|
|
95
|
-
var Sidebar =
|
|
96
|
-
/*#__PURE__*/
|
|
97
|
-
function (_Modal) {
|
|
101
|
+
var Sidebar = /*#__PURE__*/function (_Modal) {
|
|
98
102
|
_inherits(Sidebar, _Modal);
|
|
99
103
|
|
|
104
|
+
var _super = _createSuper(Sidebar);
|
|
105
|
+
|
|
100
106
|
function Sidebar() {
|
|
101
107
|
_classCallCheck(this, Sidebar);
|
|
102
108
|
|
|
103
|
-
return
|
|
109
|
+
return _super.apply(this, arguments);
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
_createClass(Sidebar, [{
|
|
107
|
-
key: "
|
|
108
|
-
|
|
109
|
-
return {
|
|
110
|
-
'data-component': 'sidebar',
|
|
111
|
-
'data-element': props['data-element'],
|
|
112
|
-
'data-role': props['data-role']
|
|
113
|
-
};
|
|
114
|
-
}
|
|
113
|
+
key: "mainClasses",
|
|
114
|
+
get:
|
|
115
115
|
/**
|
|
116
|
-
* Returns
|
|
116
|
+
* Returns classes for the component.
|
|
117
117
|
*
|
|
118
|
-
* @method
|
|
119
|
-
* @return {
|
|
118
|
+
* @method mainClasses
|
|
119
|
+
* @return {String} Main className
|
|
120
120
|
*/
|
|
121
|
-
|
|
122
|
-
}, {
|
|
123
|
-
key: "mainClasses",
|
|
124
|
-
get: function get() {
|
|
121
|
+
function get() {
|
|
125
122
|
return (0, _classnames.default)('carbon-sidebar', this.props.className);
|
|
126
123
|
}
|
|
127
124
|
/**
|
|
@@ -147,9 +144,9 @@ function (_Modal) {
|
|
|
147
144
|
key: "closeButton",
|
|
148
145
|
get: function get() {
|
|
149
146
|
if (this.props.onCancel) {
|
|
150
|
-
return _react.default.createElement("span", {
|
|
147
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
151
148
|
className: "carbon-sidebar__close"
|
|
152
|
-
}, _react.default.createElement(_icon.default, {
|
|
149
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
153
150
|
className: "carbon-sidebar__close-icon",
|
|
154
151
|
"data-element": "close",
|
|
155
152
|
onClick: this.props.onCancel,
|
|
@@ -159,10 +156,26 @@ function (_Modal) {
|
|
|
159
156
|
|
|
160
157
|
return null;
|
|
161
158
|
}
|
|
159
|
+
}, {
|
|
160
|
+
key: "componentTags",
|
|
161
|
+
value: function componentTags(props) {
|
|
162
|
+
return {
|
|
163
|
+
'data-component': 'sidebar',
|
|
164
|
+
'data-element': props['data-element'],
|
|
165
|
+
'data-role': props['data-role']
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Returns the computed HTML for the sidebar.
|
|
170
|
+
*
|
|
171
|
+
* @method sidebarHTML
|
|
172
|
+
* @return {Object} JSX for sidebar
|
|
173
|
+
*/
|
|
174
|
+
|
|
162
175
|
}, {
|
|
163
176
|
key: "modalHTML",
|
|
164
177
|
get: function get() {
|
|
165
|
-
return _react.default.createElement("div", _extends({
|
|
178
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
166
179
|
className: this.sidebarClasses
|
|
167
180
|
}, this.componentTags(this.props)), this.closeButton, this.props.children);
|
|
168
181
|
}
|
|
@@ -229,11 +242,4 @@ _defineProperty(Sidebar, "propTypes", {
|
|
|
229
242
|
_defineProperty(Sidebar, "defaultProps", {
|
|
230
243
|
position: 'right',
|
|
231
244
|
size: 'medium'
|
|
232
|
-
/**
|
|
233
|
-
* Returns classes for the component.
|
|
234
|
-
*
|
|
235
|
-
* @method mainClasses
|
|
236
|
-
* @return {String} Main className
|
|
237
|
-
*/
|
|
238
|
-
|
|
239
245
|
});
|