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,30 +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.reflect.construct.js");
|
|
8
8
|
|
|
9
|
-
require("core-js/modules/es.
|
|
9
|
+
require("core-js/modules/es.object.assign.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.string.iterator");
|
|
19
|
+
require("core-js/modules/es.string.iterator.js");
|
|
20
20
|
|
|
21
|
-
require("core-js/modules/web.dom-collections.iterator");
|
|
21
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
22
22
|
|
|
23
23
|
Object.defineProperty(exports, "__esModule", {
|
|
24
24
|
value: true
|
|
25
25
|
});
|
|
26
26
|
exports.default = void 0;
|
|
27
27
|
|
|
28
|
+
require("core-js/modules/es.array.concat.js");
|
|
29
|
+
|
|
30
|
+
require("core-js/modules/es.object.to-string.js");
|
|
31
|
+
|
|
32
|
+
require("core-js/modules/es.promise.js");
|
|
33
|
+
|
|
28
34
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
29
35
|
|
|
30
36
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -41,29 +47,31 @@ var _tags = _interopRequireDefault(require("../../utils/helpers/tags"));
|
|
|
41
47
|
|
|
42
48
|
require("./button-toggle-group.scss");
|
|
43
49
|
|
|
44
|
-
var _class
|
|
50
|
+
var _class;
|
|
45
51
|
|
|
46
52
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
47
53
|
|
|
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); }
|
|
54
|
+
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
55
|
|
|
52
56
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
53
57
|
|
|
54
58
|
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
59
|
|
|
56
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
60
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
61
|
+
|
|
62
|
+
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
|
+
|
|
64
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
57
65
|
|
|
58
|
-
function
|
|
66
|
+
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
67
|
|
|
60
|
-
function
|
|
68
|
+
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); }
|
|
61
69
|
|
|
62
70
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
63
71
|
|
|
64
|
-
function
|
|
72
|
+
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; } }
|
|
65
73
|
|
|
66
|
-
function
|
|
74
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
67
75
|
|
|
68
76
|
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
77
|
|
|
@@ -86,14 +94,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
86
94
|
* @constructor
|
|
87
95
|
* @decorators {InputLabel,InputValidation}
|
|
88
96
|
*/
|
|
89
|
-
var ButtonToggleGroup = (0, _inputLabel.default)((0, _inputValidation.default)((
|
|
90
|
-
/*#__PURE__*/
|
|
91
|
-
function (_React$Component) {
|
|
97
|
+
var ButtonToggleGroup = (0, _inputLabel.default)((0, _inputValidation.default)((_class = /*#__PURE__*/function (_React$Component) {
|
|
92
98
|
_inherits(ButtonToggleGroup, _React$Component);
|
|
93
99
|
|
|
94
|
-
|
|
95
|
-
var _getPrototypeOf2;
|
|
100
|
+
var _super = _createSuper(ButtonToggleGroup);
|
|
96
101
|
|
|
102
|
+
function ButtonToggleGroup() {
|
|
97
103
|
var _this;
|
|
98
104
|
|
|
99
105
|
_classCallCheck(this, ButtonToggleGroup);
|
|
@@ -102,7 +108,7 @@ function (_React$Component) {
|
|
|
102
108
|
args[_key] = arguments[_key];
|
|
103
109
|
}
|
|
104
110
|
|
|
105
|
-
_this =
|
|
111
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
106
112
|
|
|
107
113
|
_defineProperty(_assertThisInitialized(_this), "_handleGroupBlur", function () {
|
|
108
114
|
if (!_this.blockBlur) {
|
|
@@ -128,14 +134,14 @@ function (_React$Component) {
|
|
|
128
134
|
|
|
129
135
|
_createClass(ButtonToggleGroup, [{
|
|
130
136
|
key: "componentWillReceiveProps",
|
|
131
|
-
|
|
137
|
+
value:
|
|
132
138
|
/**
|
|
133
139
|
* A lifecycle method for when the component has re-rendered.
|
|
134
140
|
*
|
|
135
141
|
* @method componentWillReceiveProps
|
|
136
142
|
* @return {void}
|
|
137
143
|
*/
|
|
138
|
-
|
|
144
|
+
function componentWillReceiveProps(nextProps) {
|
|
139
145
|
// manually trigger change as this wrapper doesn't actually have an input to trigger it itself
|
|
140
146
|
if (nextProps.value !== this.props.value) {
|
|
141
147
|
this._handleContentChange();
|
|
@@ -148,25 +154,6 @@ function (_React$Component) {
|
|
|
148
154
|
* @return {void}
|
|
149
155
|
*/
|
|
150
156
|
|
|
151
|
-
}, {
|
|
152
|
-
key: "render",
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Renders the component.
|
|
156
|
-
*
|
|
157
|
-
* @method render
|
|
158
|
-
* @return {Object} JSX
|
|
159
|
-
*/
|
|
160
|
-
value: function render() {
|
|
161
|
-
var _this2 = this;
|
|
162
|
-
|
|
163
|
-
return _react.default.createElement("div", _extends({
|
|
164
|
-
className: this.mainClasses,
|
|
165
|
-
ref: function ref(comp) {
|
|
166
|
-
_this2._target = comp;
|
|
167
|
-
}
|
|
168
|
-
}, (0, _tags.default)('button-toggle-group', this.props)), this.labelHTML, this.inputHTML, this.validationHTML, this.fieldHelpHTML);
|
|
169
|
-
}
|
|
170
157
|
}, {
|
|
171
158
|
key: "mainClasses",
|
|
172
159
|
get: function get() {
|
|
@@ -219,7 +206,7 @@ function (_React$Component) {
|
|
|
219
206
|
}, {
|
|
220
207
|
key: "inputHTML",
|
|
221
208
|
get: function get() {
|
|
222
|
-
return _react.default.createElement("div", this.fieldProps, this.props.children);
|
|
209
|
+
return /*#__PURE__*/_react.default.createElement("div", this.fieldProps, this.props.children);
|
|
223
210
|
}
|
|
224
211
|
/**
|
|
225
212
|
* On blur of the input we want to validate the field.
|
|
@@ -228,6 +215,25 @@ function (_React$Component) {
|
|
|
228
215
|
* @return {void}
|
|
229
216
|
*/
|
|
230
217
|
|
|
218
|
+
}, {
|
|
219
|
+
key: "render",
|
|
220
|
+
value:
|
|
221
|
+
/**
|
|
222
|
+
* Renders the component.
|
|
223
|
+
*
|
|
224
|
+
* @method render
|
|
225
|
+
* @return {Object} JSX
|
|
226
|
+
*/
|
|
227
|
+
function render() {
|
|
228
|
+
var _this2 = this;
|
|
229
|
+
|
|
230
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
231
|
+
className: this.mainClasses,
|
|
232
|
+
ref: function ref(comp) {
|
|
233
|
+
_this2._target = comp;
|
|
234
|
+
}
|
|
235
|
+
}, (0, _tags.default)('button-toggle-group', this.props)), this.labelHTML, this.inputHTML, this.validationHTML, this.fieldHelpHTML);
|
|
236
|
+
}
|
|
231
237
|
}]);
|
|
232
238
|
|
|
233
239
|
return ButtonToggleGroup;
|
|
@@ -255,6 +261,6 @@ function (_React$Component) {
|
|
|
255
261
|
* @type {String}
|
|
256
262
|
*/
|
|
257
263
|
value: _propTypes.default.string
|
|
258
|
-
}),
|
|
264
|
+
}), _class)));
|
|
259
265
|
var _default = ButtonToggleGroup;
|
|
260
266
|
exports.default = _default;
|
|
@@ -29,7 +29,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
29
29
|
var labelInline = (0, _addonKnobs.boolean)('labelInline', false);
|
|
30
30
|
var labelWidth = labelInline ? (0, _addonKnobs.text)('labelWidth', '') : undefined;
|
|
31
31
|
var labelAlign = labelInline ? (0, _addonKnobs.text)('labelAlign', '') : undefined;
|
|
32
|
-
return _react.default.createElement(_buttonToggleGroup.default, {
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_buttonToggleGroup.default, {
|
|
33
33
|
timeToDisappear: timeToDisappear,
|
|
34
34
|
label: label,
|
|
35
35
|
labelInline: labelInline,
|
|
@@ -39,15 +39,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
39
39
|
inputWidth: inputWidth,
|
|
40
40
|
fieldHelp: fieldHelp,
|
|
41
41
|
fieldHelpInline: fieldHelpInline
|
|
42
|
-
}, _react.default.createElement(_buttonToggle.default, {
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement(_buttonToggle.default, {
|
|
43
43
|
name: "grouped",
|
|
44
44
|
id: "foo",
|
|
45
45
|
value: "foo"
|
|
46
|
-
}, "Foo"), _react.default.createElement(_buttonToggle.default, {
|
|
46
|
+
}, "Foo"), /*#__PURE__*/_react.default.createElement(_buttonToggle.default, {
|
|
47
47
|
name: "grouped",
|
|
48
48
|
id: "bar",
|
|
49
49
|
value: "bar"
|
|
50
|
-
}, "Bar"), _react.default.createElement(_buttonToggle.default, {
|
|
50
|
+
}, "Bar"), /*#__PURE__*/_react.default.createElement(_buttonToggle.default, {
|
|
51
51
|
name: "grouped",
|
|
52
52
|
id: "baz",
|
|
53
53
|
value: "baz"
|
|
@@ -1,37 +1,43 @@
|
|
|
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.reflect.construct.js");
|
|
8
8
|
|
|
9
|
-
require("core-js/modules/es.
|
|
9
|
+
require("core-js/modules/es.object.assign.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
|
});
|
|
26
|
+
exports.Carousel = void 0;
|
|
28
27
|
Object.defineProperty(exports, "Slide", {
|
|
29
28
|
enumerable: true,
|
|
30
29
|
get: function get() {
|
|
31
30
|
return _slide.default;
|
|
32
31
|
}
|
|
33
32
|
});
|
|
34
|
-
|
|
33
|
+
|
|
34
|
+
require("core-js/modules/es.array.concat.js");
|
|
35
|
+
|
|
36
|
+
require("core-js/modules/es.number.constructor.js");
|
|
37
|
+
|
|
38
|
+
require("core-js/modules/es.object.to-string.js");
|
|
39
|
+
|
|
40
|
+
require("core-js/modules/es.promise.js");
|
|
35
41
|
|
|
36
42
|
var _react = _interopRequireDefault(require("react"));
|
|
37
43
|
|
|
@@ -53,25 +59,27 @@ require("./carousel.scss");
|
|
|
53
59
|
|
|
54
60
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
55
61
|
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
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); }
|
|
59
63
|
|
|
60
64
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
61
65
|
|
|
62
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); } }
|
|
63
67
|
|
|
64
|
-
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); }
|
|
71
|
+
|
|
72
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
65
73
|
|
|
66
|
-
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); }; }
|
|
67
75
|
|
|
68
|
-
function
|
|
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); }
|
|
69
77
|
|
|
70
78
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
71
79
|
|
|
72
|
-
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; } }
|
|
73
81
|
|
|
74
|
-
function
|
|
82
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
75
83
|
|
|
76
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; }
|
|
77
85
|
|
|
@@ -79,14 +87,12 @@ var NEXT = 'next';
|
|
|
79
87
|
var PREVIOUS = 'previous';
|
|
80
88
|
var TRANSITION_TIME = 750;
|
|
81
89
|
|
|
82
|
-
var Carousel =
|
|
83
|
-
/*#__PURE__*/
|
|
84
|
-
function (_React$Component) {
|
|
90
|
+
var Carousel = /*#__PURE__*/function (_React$Component) {
|
|
85
91
|
_inherits(Carousel, _React$Component);
|
|
86
92
|
|
|
87
|
-
|
|
88
|
-
var _getPrototypeOf2;
|
|
93
|
+
var _super = _createSuper(Carousel);
|
|
89
94
|
|
|
95
|
+
function Carousel() {
|
|
90
96
|
var _this;
|
|
91
97
|
|
|
92
98
|
_classCallCheck(this, Carousel);
|
|
@@ -95,7 +101,7 @@ function (_React$Component) {
|
|
|
95
101
|
args[_key] = arguments[_key];
|
|
96
102
|
}
|
|
97
103
|
|
|
98
|
-
_this =
|
|
104
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
99
105
|
/**
|
|
100
106
|
* Direction of animation
|
|
101
107
|
*
|
|
@@ -131,14 +137,14 @@ function (_React$Component) {
|
|
|
131
137
|
|
|
132
138
|
_createClass(Carousel, [{
|
|
133
139
|
key: "componentWillMount",
|
|
134
|
-
|
|
140
|
+
value:
|
|
135
141
|
/**
|
|
136
142
|
* A lifecycle method that is called after before initial render.
|
|
137
143
|
* Can set up state of component without causing a re-render
|
|
138
144
|
*
|
|
139
145
|
* @method componentWillMount
|
|
140
146
|
*/
|
|
141
|
-
|
|
147
|
+
function componentWillMount() {
|
|
142
148
|
var selectedIndex = Number(this.props.slideIndex) || Number(this.props.initialSlideIndex);
|
|
143
149
|
this.setState({
|
|
144
150
|
selectedSlideIndex: selectedIndex
|
|
@@ -427,11 +433,11 @@ function (_React$Component) {
|
|
|
427
433
|
var buttons = [];
|
|
428
434
|
|
|
429
435
|
for (var i = 0; i < this.numOfSlides(); i++) {
|
|
430
|
-
buttons.push(_react.default.createElement("span", {
|
|
436
|
+
buttons.push( /*#__PURE__*/_react.default.createElement("span", {
|
|
431
437
|
className: "carbon-carousel__selector-inputs",
|
|
432
438
|
key: i,
|
|
433
439
|
"data-element": "selector-inputs"
|
|
434
|
-
}, _react.default.createElement("input", {
|
|
440
|
+
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
435
441
|
disabled: this.state.disabled,
|
|
436
442
|
className: "carbon-carousel__selector-input",
|
|
437
443
|
"data-element": "selector-input",
|
|
@@ -441,14 +447,14 @@ function (_React$Component) {
|
|
|
441
447
|
value: i,
|
|
442
448
|
onChange: this.onSlideSelection,
|
|
443
449
|
checked: this.state.selectedSlideIndex === i
|
|
444
|
-
}), _react.default.createElement("label", {
|
|
450
|
+
}), /*#__PURE__*/_react.default.createElement("label", {
|
|
445
451
|
className: "carbon-carousel__selector-label",
|
|
446
452
|
"data-element": "selector-label",
|
|
447
453
|
htmlFor: "carousel-slide-".concat(i)
|
|
448
454
|
})));
|
|
449
455
|
}
|
|
450
456
|
|
|
451
|
-
return _react.default.createElement("div", {
|
|
457
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
452
458
|
className: this.slideSelectorClasses()
|
|
453
459
|
}, buttons);
|
|
454
460
|
}
|
|
@@ -465,12 +471,12 @@ function (_React$Component) {
|
|
|
465
471
|
return null;
|
|
466
472
|
}
|
|
467
473
|
|
|
468
|
-
return _react.default.createElement("div", {
|
|
474
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
469
475
|
className: this.previousClasses()
|
|
470
|
-
}, _react.default.createElement("button", _extends({}, this.previousButtonProps(), {
|
|
476
|
+
}, /*#__PURE__*/_react.default.createElement("button", _extends({}, this.previousButtonProps(), {
|
|
471
477
|
"data-element": "previous",
|
|
472
478
|
type: "button"
|
|
473
|
-
}), _react.default.createElement(_icon.default, {
|
|
479
|
+
}), /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
474
480
|
className: "carbon-carousel__previous-arrow",
|
|
475
481
|
type: "dropdown"
|
|
476
482
|
})));
|
|
@@ -488,12 +494,12 @@ function (_React$Component) {
|
|
|
488
494
|
return null;
|
|
489
495
|
}
|
|
490
496
|
|
|
491
|
-
return _react.default.createElement("div", {
|
|
497
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
492
498
|
className: this.nextClasses()
|
|
493
|
-
}, _react.default.createElement("button", _extends({}, this.nextButtonProps(), {
|
|
499
|
+
}, /*#__PURE__*/_react.default.createElement("button", _extends({}, this.nextButtonProps(), {
|
|
494
500
|
"data-element": "next",
|
|
495
501
|
type: "button"
|
|
496
|
-
}), _react.default.createElement(_icon.default, {
|
|
502
|
+
}), /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
497
503
|
className: "carbon-carousel__next-arrow",
|
|
498
504
|
type: "dropdown"
|
|
499
505
|
})));
|
|
@@ -522,11 +528,11 @@ function (_React$Component) {
|
|
|
522
528
|
}, {
|
|
523
529
|
key: "render",
|
|
524
530
|
value: function render() {
|
|
525
|
-
return _react.default.createElement("div", _extends({
|
|
531
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
526
532
|
className: this.mainClasses()
|
|
527
|
-
}, (0, _tags.default)('carousel', this.props)), _react.default.createElement("div", {
|
|
533
|
+
}, (0, _tags.default)('carousel', this.props)), /*#__PURE__*/_react.default.createElement("div", {
|
|
528
534
|
className: "carbon-carousel__content"
|
|
529
|
-
}, this.previousButton(), _react.default.createElement(_CSSTransitionGroup.default, {
|
|
535
|
+
}, this.previousButton(), /*#__PURE__*/_react.default.createElement(_CSSTransitionGroup.default, {
|
|
530
536
|
component: "div",
|
|
531
537
|
className: "carbon-carousel__transition",
|
|
532
538
|
transitionName: this.transitionName(),
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.assign");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
7
|
|
|
8
|
+
require("core-js/modules/es.object.assign.js");
|
|
9
|
+
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
12
|
var _tags = _interopRequireDefault(require("../../../utils/helpers/tags"));
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
function _extends() { _extends = Object.assign
|
|
16
|
+
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); }
|
|
17
17
|
|
|
18
18
|
var _default = function _default(props) {
|
|
19
|
-
return _react.default.createElement("div", _extends({}, props, (0, _tags.default)('slide', props)));
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, (0, _tags.default)('slide', props)));
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
exports.default = _default;
|