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,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
|
|
@@ -43,25 +47,27 @@ require("./dialog-full-screen.scss");
|
|
|
43
47
|
|
|
44
48
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
45
49
|
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
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); }
|
|
50
|
+
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); }
|
|
49
51
|
|
|
50
52
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
51
53
|
|
|
52
54
|
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); } }
|
|
53
55
|
|
|
54
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
56
|
+
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
|
+
|
|
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 } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
59
|
+
|
|
60
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
55
61
|
|
|
56
|
-
function
|
|
62
|
+
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); }; }
|
|
57
63
|
|
|
58
|
-
function
|
|
64
|
+
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); }
|
|
59
65
|
|
|
60
66
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
61
67
|
|
|
62
|
-
function
|
|
68
|
+
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
69
|
|
|
64
|
-
function
|
|
70
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
65
71
|
|
|
66
72
|
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; }
|
|
67
73
|
|
|
@@ -87,17 +93,17 @@ var DIALOG_OPEN_HTML_CLASS = 'carbon-dialog-full-screen--open';
|
|
|
87
93
|
* @constructor
|
|
88
94
|
*/
|
|
89
95
|
|
|
90
|
-
var DialogFullScreen =
|
|
91
|
-
/*#__PURE__*/
|
|
92
|
-
function (_Modal) {
|
|
96
|
+
var DialogFullScreen = /*#__PURE__*/function (_Modal) {
|
|
93
97
|
_inherits(DialogFullScreen, _Modal);
|
|
94
98
|
|
|
99
|
+
var _super = _createSuper(DialogFullScreen);
|
|
100
|
+
|
|
95
101
|
function DialogFullScreen(props) {
|
|
96
102
|
var _this;
|
|
97
103
|
|
|
98
104
|
_classCallCheck(this, DialogFullScreen);
|
|
99
105
|
|
|
100
|
-
_this =
|
|
106
|
+
_this = _super.call(this, props);
|
|
101
107
|
/**
|
|
102
108
|
* Caches a reference to the document.
|
|
103
109
|
*/
|
|
@@ -106,7 +112,7 @@ function (_Modal) {
|
|
|
106
112
|
var title = _this.props.title;
|
|
107
113
|
|
|
108
114
|
if (typeof title === 'string') {
|
|
109
|
-
title = _react.default.createElement(_heading.default, {
|
|
115
|
+
title = /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
110
116
|
title: title,
|
|
111
117
|
titleId: "carbon-dialog-title",
|
|
112
118
|
subheader: _this.props.subtitle,
|
|
@@ -114,7 +120,7 @@ function (_Modal) {
|
|
|
114
120
|
});
|
|
115
121
|
}
|
|
116
122
|
|
|
117
|
-
return _react.default.createElement(_fullScreenHeading.default, null, _react.default.createElement(_icon.default, {
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement(_fullScreenHeading.default, null, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
118
124
|
className: "carbon-dialog-full-screen__close",
|
|
119
125
|
"data-element": "close",
|
|
120
126
|
onClick: _this.props.onCancel,
|
|
@@ -127,24 +133,14 @@ function (_Modal) {
|
|
|
127
133
|
}
|
|
128
134
|
|
|
129
135
|
_createClass(DialogFullScreen, [{
|
|
130
|
-
key: "
|
|
131
|
-
|
|
132
|
-
return {
|
|
133
|
-
'data-component': 'dialog-full-screen',
|
|
134
|
-
'data-element': props['data-element'],
|
|
135
|
-
'data-role': props['data-role']
|
|
136
|
-
};
|
|
137
|
-
}
|
|
136
|
+
key: "dialogClasses",
|
|
137
|
+
get:
|
|
138
138
|
/**
|
|
139
|
-
* Returns
|
|
140
|
-
* @override
|
|
139
|
+
* Returns classes for the dialog.
|
|
141
140
|
*
|
|
142
|
-
* @return {
|
|
141
|
+
* @return {String} dialog className
|
|
143
142
|
*/
|
|
144
|
-
|
|
145
|
-
}, {
|
|
146
|
-
key: "dialogClasses",
|
|
147
|
-
get: function get() {
|
|
143
|
+
function get() {
|
|
148
144
|
return 'carbon-dialog-full-screen__dialog';
|
|
149
145
|
}
|
|
150
146
|
/**
|
|
@@ -159,20 +155,36 @@ function (_Modal) {
|
|
|
159
155
|
get: function get() {
|
|
160
156
|
return (0, _classnames.default)(this.props.className, 'carbon-dialog-full-screen');
|
|
161
157
|
}
|
|
158
|
+
}, {
|
|
159
|
+
key: "componentTags",
|
|
160
|
+
value: function componentTags(props) {
|
|
161
|
+
return {
|
|
162
|
+
'data-component': 'dialog-full-screen',
|
|
163
|
+
'data-element': props['data-element'],
|
|
164
|
+
'data-role': props['data-role']
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Returns the computed HTML for the dialog.
|
|
169
|
+
* @override
|
|
170
|
+
*
|
|
171
|
+
* @return {Object} JSX for dialog
|
|
172
|
+
*/
|
|
173
|
+
|
|
162
174
|
}, {
|
|
163
175
|
key: "modalHTML",
|
|
164
176
|
get: function get() {
|
|
165
177
|
var _this2 = this;
|
|
166
178
|
|
|
167
|
-
return _react.default.createElement("div", _extends({
|
|
179
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
168
180
|
ref: function ref(d) {
|
|
169
181
|
_this2._dialog = d;
|
|
170
182
|
},
|
|
171
183
|
className: this.dialogClasses
|
|
172
|
-
}, this.componentTags(this.props)), this.dialogTitle(), _react.default.createElement("div", {
|
|
184
|
+
}, this.componentTags(this.props)), this.dialogTitle(), /*#__PURE__*/_react.default.createElement("div", {
|
|
173
185
|
className: "carbon-dialog-full-screen__content",
|
|
174
186
|
"data-element": "content"
|
|
175
|
-
}, _react.default.createElement(_appWrapper.default, null, this.props.children)));
|
|
187
|
+
}, /*#__PURE__*/_react.default.createElement(_appWrapper.default, null, this.props.children)));
|
|
176
188
|
}
|
|
177
189
|
/**
|
|
178
190
|
* Overrides the original function to disable the document's scroll.
|
|
@@ -207,12 +219,6 @@ function (_Modal) {
|
|
|
207
219
|
_defineProperty(DialogFullScreen, "defaultProps", {
|
|
208
220
|
open: false,
|
|
209
221
|
enableBackgroundUI: true
|
|
210
|
-
/**
|
|
211
|
-
* Returns classes for the dialog.
|
|
212
|
-
*
|
|
213
|
-
* @return {String} dialog className
|
|
214
|
-
*/
|
|
215
|
-
|
|
216
222
|
});
|
|
217
223
|
|
|
218
224
|
var _default = DialogFullScreen;
|
|
@@ -1,10 +1,10 @@
|
|
|
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.
|
|
7
|
+
require("core-js/modules/es.object.assign.js");
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", {
|
|
10
10
|
value: true
|
|
@@ -23,9 +23,11 @@ var _tags = _interopRequireDefault(require("../../../utils/helpers/tags"));
|
|
|
23
23
|
|
|
24
24
|
require("./full-screen-heading.scss");
|
|
25
25
|
|
|
26
|
+
var _excluded = ["children"];
|
|
27
|
+
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
29
|
|
|
28
|
-
function _extends() { _extends = Object.assign
|
|
30
|
+
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); }
|
|
29
31
|
|
|
30
32
|
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; }
|
|
31
33
|
|
|
@@ -37,11 +39,11 @@ var fullScreenHeadingClasses = function fullScreenHeadingClasses(props) {
|
|
|
37
39
|
|
|
38
40
|
var FullScreenHeading = function FullScreenHeading(props) {
|
|
39
41
|
var children = props.children,
|
|
40
|
-
otherProps = _objectWithoutProperties(props,
|
|
42
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
41
43
|
|
|
42
|
-
return _react.default.createElement("div", _extends({}, otherProps, {
|
|
44
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({}, otherProps, {
|
|
43
45
|
className: fullScreenHeadingClasses(props)
|
|
44
|
-
}, (0, _tags.default)('full-screen-heading', props)), _react.default.createElement(_appWrapper.default, null, children));
|
|
46
|
+
}, (0, _tags.default)('full-screen-heading', props)), /*#__PURE__*/_react.default.createElement(_appWrapper.default, null, children));
|
|
45
47
|
};
|
|
46
48
|
|
|
47
49
|
FullScreenHeading.propTypes = {
|
|
@@ -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 = exports.collect = exports.UndecoratedCustomDragLayer = void 0;
|
|
25
27
|
|
|
28
|
+
require("core-js/modules/es.array.concat.js");
|
|
29
|
+
|
|
26
30
|
var _react = _interopRequireDefault(require("react"));
|
|
27
31
|
|
|
28
32
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -35,23 +39,25 @@ require("./custom-drag-layer.scss");
|
|
|
35
39
|
|
|
36
40
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
41
|
|
|
38
|
-
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); }
|
|
39
|
-
|
|
40
42
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
41
43
|
|
|
42
44
|
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); } }
|
|
43
45
|
|
|
44
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
46
|
+
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
|
+
|
|
48
|
+
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); }
|
|
45
49
|
|
|
46
|
-
function
|
|
50
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
47
51
|
|
|
48
|
-
function
|
|
52
|
+
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
|
+
|
|
54
|
+
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); }
|
|
49
55
|
|
|
50
56
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
51
57
|
|
|
52
|
-
function
|
|
58
|
+
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; } }
|
|
53
59
|
|
|
54
|
-
function
|
|
60
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
55
61
|
|
|
56
62
|
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; }
|
|
57
63
|
|
|
@@ -67,14 +73,12 @@ var collect = function collect(monitor) {
|
|
|
67
73
|
|
|
68
74
|
exports.collect = collect;
|
|
69
75
|
|
|
70
|
-
var CustomDragLayer =
|
|
71
|
-
/*#__PURE__*/
|
|
72
|
-
function (_React$Component) {
|
|
76
|
+
var CustomDragLayer = /*#__PURE__*/function (_React$Component) {
|
|
73
77
|
_inherits(CustomDragLayer, _React$Component);
|
|
74
78
|
|
|
75
|
-
|
|
76
|
-
var _getPrototypeOf2;
|
|
79
|
+
var _super = _createSuper(CustomDragLayer);
|
|
77
80
|
|
|
81
|
+
function CustomDragLayer() {
|
|
78
82
|
var _this;
|
|
79
83
|
|
|
80
84
|
_classCallCheck(this, CustomDragLayer);
|
|
@@ -83,7 +87,7 @@ function (_React$Component) {
|
|
|
83
87
|
args[_key] = arguments[_key];
|
|
84
88
|
}
|
|
85
89
|
|
|
86
|
-
_this =
|
|
90
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
87
91
|
|
|
88
92
|
_defineProperty(_assertThisInitialized(_this), "getClassName", function (props) {
|
|
89
93
|
return (0, _classnames.default)('custom-drag-layer', props.className);
|
|
@@ -152,9 +156,9 @@ function (_React$Component) {
|
|
|
152
156
|
value: function render() {
|
|
153
157
|
var _this2 = this;
|
|
154
158
|
|
|
155
|
-
return _react.default.createElement("div", {
|
|
159
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
156
160
|
className: this.getClassName(this.props)
|
|
157
|
-
}, _react.default.createElement("div", {
|
|
161
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
158
162
|
className: "custom-drag-layer__container",
|
|
159
163
|
ref: function ref(node) {
|
|
160
164
|
_this2._container = node;
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "CustomDragLayer", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _customDragLayer.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "DraggableContext", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
|
@@ -21,12 +27,6 @@ Object.defineProperty(exports, "WithDrop", {
|
|
|
21
27
|
return _withDrop.default;
|
|
22
28
|
}
|
|
23
29
|
});
|
|
24
|
-
Object.defineProperty(exports, "CustomDragLayer", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _customDragLayer.default;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
30
|
|
|
31
31
|
var _draggableContext = _interopRequireDefault(require("./draggable-context"));
|
|
32
32
|
|
|
@@ -1,30 +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.object.keys.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.array.filter.js");
|
|
16
16
|
|
|
17
|
-
require("core-js/modules/es.object.get-
|
|
17
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
18
18
|
|
|
19
|
-
require("core-js/modules/
|
|
19
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
20
20
|
|
|
21
|
-
require("core-js/modules/es.
|
|
21
|
+
require("core-js/modules/es.symbol.description.js");
|
|
22
22
|
|
|
23
|
-
require("core-js/modules/es.
|
|
23
|
+
require("core-js/modules/es.symbol.iterator.js");
|
|
24
24
|
|
|
25
|
-
require("core-js/modules/
|
|
25
|
+
require("core-js/modules/es.array.iterator.js");
|
|
26
26
|
|
|
27
|
-
require("core-js/modules/
|
|
27
|
+
require("core-js/modules/es.string.iterator.js");
|
|
28
|
+
|
|
29
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
28
30
|
|
|
29
31
|
Object.defineProperty(exports, "__esModule", {
|
|
30
32
|
value: true
|
|
@@ -51,25 +53,27 @@ var _scrollableParent = _interopRequireDefault(require("../../../utils/helpers/s
|
|
|
51
53
|
|
|
52
54
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
53
55
|
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
-
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 = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
|
|
56
|
+
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; }
|
|
57
57
|
|
|
58
58
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
59
59
|
|
|
60
60
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
61
61
|
|
|
62
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
62
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
63
|
+
|
|
64
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
63
65
|
|
|
64
|
-
function
|
|
66
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
65
67
|
|
|
66
|
-
function
|
|
68
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
69
|
+
|
|
70
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
67
71
|
|
|
68
72
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
69
73
|
|
|
70
|
-
function
|
|
74
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
71
75
|
|
|
72
|
-
function
|
|
76
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
73
77
|
|
|
74
78
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
75
79
|
|
|
@@ -104,17 +108,24 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
104
108
|
* @class DraggableContext
|
|
105
109
|
* @constructor
|
|
106
110
|
*/
|
|
107
|
-
var DraggableContext =
|
|
108
|
-
/*#__PURE__*/
|
|
109
|
-
function (_React$Component) {
|
|
111
|
+
var DraggableContext = /*#__PURE__*/function (_React$Component) {
|
|
110
112
|
_inherits(DraggableContext, _React$Component);
|
|
111
113
|
|
|
114
|
+
var _super = _createSuper(DraggableContext);
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Defines a context object for child components of the draggable context component.
|
|
118
|
+
* https://facebook.github.io/react/docs/context.html
|
|
119
|
+
*
|
|
120
|
+
* @property childContextTypes
|
|
121
|
+
* @type {Object}
|
|
122
|
+
*/
|
|
112
123
|
function DraggableContext(_props) {
|
|
113
124
|
var _this;
|
|
114
125
|
|
|
115
126
|
_classCallCheck(this, DraggableContext);
|
|
116
127
|
|
|
117
|
-
_this =
|
|
128
|
+
_this = _super.call(this, _props); // Default speed of auto scrolling
|
|
118
129
|
|
|
119
130
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
120
131
|
activeIndex: null // {Number} tracks the currently dragged index
|
|
@@ -239,12 +250,12 @@ function (_React$Component) {
|
|
|
239
250
|
|
|
240
251
|
}, {
|
|
241
252
|
key: "render",
|
|
242
|
-
|
|
253
|
+
value:
|
|
243
254
|
/**
|
|
244
255
|
* Renders the component
|
|
245
256
|
*/
|
|
246
|
-
|
|
247
|
-
return _react.default.createElement("div", {
|
|
257
|
+
function render() {
|
|
258
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
248
259
|
className: "carbon-draggable-context",
|
|
249
260
|
onMouseMove: this.props.autoScroll && this.state.activeIndex !== null ? this.checkAutoScroll : undefined
|
|
250
261
|
}, this.props.children, this.props.customDragLayer);
|
|
@@ -285,14 +296,6 @@ _defineProperty(DraggableContext, "propTypes", {
|
|
|
285
296
|
* @type {Bool}
|
|
286
297
|
*/
|
|
287
298
|
autoScroll: _propTypes.default.bool
|
|
288
|
-
/**
|
|
289
|
-
* Defines a context object for child components of the draggable context component.
|
|
290
|
-
* https://facebook.github.io/react/docs/context.html
|
|
291
|
-
*
|
|
292
|
-
* @property childContextTypes
|
|
293
|
-
* @type {Object}
|
|
294
|
-
*/
|
|
295
|
-
|
|
296
299
|
});
|
|
297
300
|
|
|
298
301
|
_defineProperty(DraggableContext, "childContextTypes", {
|
|
@@ -309,7 +312,7 @@ _defineProperty(DraggableContext, "childContextTypes", {
|
|
|
309
312
|
});
|
|
310
313
|
|
|
311
314
|
_defineProperty(DraggableContext, "defaultProps", {
|
|
312
|
-
customDragLayer: _react.default.createElement(_customDragLayer.default, null),
|
|
315
|
+
customDragLayer: /*#__PURE__*/_react.default.createElement(_customDragLayer.default, null),
|
|
313
316
|
autoScroll: false
|
|
314
317
|
});
|
|
315
318
|
|