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.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.object.
|
|
15
|
+
require("core-js/modules/es.object.assign.js");
|
|
16
16
|
|
|
17
|
-
require("core-js/modules/es.
|
|
17
|
+
require("core-js/modules/es.symbol.description.js");
|
|
18
18
|
|
|
19
|
-
require("core-js/modules/es.
|
|
19
|
+
require("core-js/modules/es.symbol.iterator.js");
|
|
20
20
|
|
|
21
|
-
require("core-js/modules/es.
|
|
21
|
+
require("core-js/modules/es.array.iterator.js");
|
|
22
22
|
|
|
23
|
-
require("core-js/modules/
|
|
23
|
+
require("core-js/modules/es.string.iterator.js");
|
|
24
|
+
|
|
25
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
24
26
|
|
|
25
27
|
Object.defineProperty(exports, "__esModule", {
|
|
26
28
|
value: true
|
|
27
29
|
});
|
|
28
30
|
exports.default = void 0;
|
|
29
31
|
|
|
32
|
+
require("core-js/modules/es.array.concat.js");
|
|
33
|
+
|
|
30
34
|
var _react = _interopRequireDefault(require("react"));
|
|
31
35
|
|
|
32
36
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -41,11 +45,11 @@ var _tags = _interopRequireDefault(require("../../utils/helpers/tags"));
|
|
|
41
45
|
|
|
42
46
|
require("./action-toolbar.scss");
|
|
43
47
|
|
|
44
|
-
|
|
48
|
+
var _excluded = ["onClick", "className", "text"];
|
|
45
49
|
|
|
46
|
-
function
|
|
50
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
47
51
|
|
|
48
|
-
function _extends() { _extends = Object.assign
|
|
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); }
|
|
49
53
|
|
|
50
54
|
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; }
|
|
51
55
|
|
|
@@ -55,17 +59,21 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
55
59
|
|
|
56
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); } }
|
|
57
61
|
|
|
58
|
-
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); }
|
|
65
|
+
|
|
66
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
59
67
|
|
|
60
|
-
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); }; }
|
|
61
69
|
|
|
62
|
-
function
|
|
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); }
|
|
63
71
|
|
|
64
72
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
65
73
|
|
|
66
|
-
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; } }
|
|
67
75
|
|
|
68
|
-
function
|
|
76
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
69
77
|
|
|
70
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; }
|
|
71
79
|
|
|
@@ -100,16 +108,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
100
108
|
* @class ActionToolbar
|
|
101
109
|
* @constructor
|
|
102
110
|
*/
|
|
103
|
-
var ActionToolbar =
|
|
104
|
-
/*#__PURE__*/
|
|
105
|
-
function (_React$Component) {
|
|
111
|
+
var ActionToolbar = /*#__PURE__*/function (_React$Component) {
|
|
106
112
|
_inherits(ActionToolbar, _React$Component);
|
|
107
113
|
|
|
114
|
+
var _super = _createSuper(ActionToolbar);
|
|
115
|
+
|
|
108
116
|
// TODO This component needs to be freestanding - we need to provide an api that allows it be used independently.
|
|
109
117
|
// https://github.com/Sage/carbon/issues/1070
|
|
110
118
|
function ActionToolbar() {
|
|
111
|
-
var _getPrototypeOf2;
|
|
112
|
-
|
|
113
119
|
var _this;
|
|
114
120
|
|
|
115
121
|
_classCallCheck(this, ActionToolbar);
|
|
@@ -118,7 +124,7 @@ function (_React$Component) {
|
|
|
118
124
|
args[_key] = arguments[_key];
|
|
119
125
|
}
|
|
120
126
|
|
|
121
|
-
_this =
|
|
127
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
122
128
|
|
|
123
129
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
124
130
|
/**
|
|
@@ -161,12 +167,12 @@ function (_React$Component) {
|
|
|
161
167
|
|
|
162
168
|
_createClass(ActionToolbar, [{
|
|
163
169
|
key: "componentWillMount",
|
|
164
|
-
|
|
170
|
+
value:
|
|
165
171
|
/**
|
|
166
172
|
* @method componentWillMount
|
|
167
173
|
* @return {Void}
|
|
168
174
|
*/
|
|
169
|
-
|
|
175
|
+
function componentWillMount() {
|
|
170
176
|
if (this.context.attachActionToolbar) {
|
|
171
177
|
this.context.attachActionToolbar(this);
|
|
172
178
|
}
|
|
@@ -207,12 +213,12 @@ function (_React$Component) {
|
|
|
207
213
|
|
|
208
214
|
}, {
|
|
209
215
|
key: "isActive",
|
|
210
|
-
|
|
216
|
+
value:
|
|
211
217
|
/**
|
|
212
218
|
* @method isActive
|
|
213
219
|
* @return {Boolean}
|
|
214
220
|
*/
|
|
215
|
-
|
|
221
|
+
function isActive() {
|
|
216
222
|
return this.state.total > 0;
|
|
217
223
|
}
|
|
218
224
|
/**
|
|
@@ -246,9 +252,9 @@ function (_React$Component) {
|
|
|
246
252
|
var onClick = action.onClick,
|
|
247
253
|
className = action.className,
|
|
248
254
|
text = action.text,
|
|
249
|
-
props = _objectWithoutProperties(action,
|
|
255
|
+
props = _objectWithoutProperties(action, _excluded);
|
|
250
256
|
|
|
251
|
-
return _react.default.createElement(_link.default, _extends({
|
|
257
|
+
return /*#__PURE__*/_react.default.createElement(_link.default, _extends({
|
|
252
258
|
className: this.linkClasses(className),
|
|
253
259
|
"data-element": "action",
|
|
254
260
|
disabled: !this.isActive(),
|
|
@@ -258,21 +264,21 @@ function (_React$Component) {
|
|
|
258
264
|
}
|
|
259
265
|
}, {
|
|
260
266
|
key: "render",
|
|
261
|
-
|
|
267
|
+
value:
|
|
262
268
|
/**
|
|
263
269
|
* @method render
|
|
264
270
|
* @return {Object} JSX
|
|
265
271
|
*/
|
|
266
|
-
|
|
267
|
-
return _react.default.createElement("div", _extends({
|
|
272
|
+
function render() {
|
|
273
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
268
274
|
className: this.mainClasses()
|
|
269
|
-
}, (0, _tags.default)('action-toolbar', this.props)), _react.default.createElement("div", {
|
|
275
|
+
}, (0, _tags.default)('action-toolbar', this.props)), /*#__PURE__*/_react.default.createElement("div", {
|
|
270
276
|
className: "carbon-action-toolbar__total"
|
|
271
|
-
}, _react.default.createElement("strong", {
|
|
277
|
+
}, /*#__PURE__*/_react.default.createElement("strong", {
|
|
272
278
|
"data-element": "total"
|
|
273
279
|
}, this.state.total), "\xA0", _i18nJs.default.t('action_toolbar.selected', {
|
|
274
280
|
defaultValue: 'Selected'
|
|
275
|
-
})), _react.default.createElement("div", {
|
|
281
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
276
282
|
className: "carbon-action-toolbar__actions"
|
|
277
283
|
}, this.actions(), this.props.children && this.props.children(this.propsForChildren())));
|
|
278
284
|
}
|
|
@@ -1,24 +1,28 @@
|
|
|
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.reflect.get.js");
|
|
12
12
|
|
|
13
|
-
require("core-js/modules/es.object.get-
|
|
13
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
14
14
|
|
|
15
|
-
require("core-js/modules/es.
|
|
15
|
+
require("core-js/modules/es.symbol.js");
|
|
16
16
|
|
|
17
|
-
require("core-js/modules/es.
|
|
17
|
+
require("core-js/modules/es.symbol.description.js");
|
|
18
18
|
|
|
19
|
-
require("core-js/modules/es.
|
|
19
|
+
require("core-js/modules/es.symbol.iterator.js");
|
|
20
20
|
|
|
21
|
-
require("core-js/modules/
|
|
21
|
+
require("core-js/modules/es.array.iterator.js");
|
|
22
|
+
|
|
23
|
+
require("core-js/modules/es.string.iterator.js");
|
|
24
|
+
|
|
25
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
22
26
|
|
|
23
27
|
Object.defineProperty(exports, "__esModule", {
|
|
24
28
|
value: true
|
|
@@ -33,27 +37,29 @@ var _dialog = _interopRequireDefault(require("../dialog"));
|
|
|
33
37
|
|
|
34
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
39
|
|
|
36
|
-
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); }
|
|
37
|
-
|
|
38
40
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
39
41
|
|
|
40
42
|
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); } }
|
|
41
43
|
|
|
42
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
44
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
43
45
|
|
|
44
|
-
function
|
|
46
|
+
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
45
47
|
|
|
46
|
-
function
|
|
48
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
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); }
|
|
53
|
+
|
|
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); }; }
|
|
51
55
|
|
|
52
|
-
function
|
|
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); }
|
|
53
57
|
|
|
54
|
-
function
|
|
58
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
55
59
|
|
|
56
|
-
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; } }
|
|
61
|
+
|
|
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
|
|
|
@@ -77,17 +83,17 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
77
83
|
* @class Alert
|
|
78
84
|
* @constructor
|
|
79
85
|
*/
|
|
80
|
-
var Alert =
|
|
81
|
-
/*#__PURE__*/
|
|
82
|
-
function (_Dialog) {
|
|
86
|
+
var Alert = /*#__PURE__*/function (_Dialog) {
|
|
83
87
|
_inherits(Alert, _Dialog);
|
|
84
88
|
|
|
89
|
+
var _super = _createSuper(Alert);
|
|
90
|
+
|
|
85
91
|
function Alert(props) {
|
|
86
92
|
var _this;
|
|
87
93
|
|
|
88
94
|
_classCallCheck(this, Alert);
|
|
89
95
|
|
|
90
|
-
_this =
|
|
96
|
+
_this = _super.call(this, props); // focusDialog is called via setTimeout in onDialogBlur,
|
|
91
97
|
// so it needs binding to this
|
|
92
98
|
// From the React docs: "Generally, if you refer to a method without () after
|
|
93
99
|
// it, such as onClick={this.handleClick}, you should bind that method."
|
|
@@ -103,6 +109,11 @@ function (_Dialog) {
|
|
|
103
109
|
|
|
104
110
|
|
|
105
111
|
_createClass(Alert, [{
|
|
112
|
+
key: "dialogClasses",
|
|
113
|
+
get: function get() {
|
|
114
|
+
return (0, _classnames.default)(_get(_getPrototypeOf(Alert.prototype), "dialogClasses", this), 'carbon-alert__alert');
|
|
115
|
+
}
|
|
116
|
+
}, {
|
|
106
117
|
key: "componentTags",
|
|
107
118
|
value: function componentTags(props) {
|
|
108
119
|
return {
|
|
@@ -134,11 +145,6 @@ function (_Dialog) {
|
|
|
134
145
|
setTimeout(this.focusDialog);
|
|
135
146
|
}
|
|
136
147
|
}
|
|
137
|
-
}, {
|
|
138
|
-
key: "dialogClasses",
|
|
139
|
-
get: function get() {
|
|
140
|
-
return (0, _classnames.default)(_get(_getPrototypeOf(Alert.prototype), "dialogClasses", this), 'carbon-alert__alert');
|
|
141
|
-
}
|
|
142
148
|
}]);
|
|
143
149
|
|
|
144
150
|
return Alert;
|
|
@@ -50,7 +50,7 @@ var handleOpen = function handleOpen() {
|
|
|
50
50
|
var size = (0, _addonKnobs.select)('size', _optionsHelper.default.sizesFull, _optionsHelper.default.sizesFull[0]);
|
|
51
51
|
var stickyFormFooter = (0, _addonKnobs.boolean)('stickyFormFooter', false);
|
|
52
52
|
var open = (0, _addonKnobs.boolean)('open', false);
|
|
53
|
-
return _react.default.createElement(_alert.default, {
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement(_alert.default, {
|
|
54
54
|
onCancel: handleCancel,
|
|
55
55
|
title: title,
|
|
56
56
|
enableBackgroundUI: enableBackgroundUI,
|
|
@@ -78,12 +78,12 @@ var handleOpen = function handleOpen() {
|
|
|
78
78
|
var showCloseIcon = (0, _addonKnobs.boolean)('showCloseIcon', true);
|
|
79
79
|
var size = (0, _addonKnobs.select)('size', _optionsHelper.default.sizesFull, _optionsHelper.default.sizesFull[0]);
|
|
80
80
|
var stickyFormFooter = (0, _addonKnobs.boolean)('stickyFormFooter', false);
|
|
81
|
-
return _react.default.createElement(_storybookState.State, {
|
|
81
|
+
return /*#__PURE__*/_react.default.createElement(_storybookState.State, {
|
|
82
82
|
store: store
|
|
83
|
-
}, _react.default.createElement(_button.default, {
|
|
83
|
+
}, /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
84
84
|
key: "button",
|
|
85
85
|
onClick: handleOpen
|
|
86
|
-
}, "Open Preview"), _react.default.createElement(_alert.default, {
|
|
86
|
+
}, "Open Preview"), /*#__PURE__*/_react.default.createElement(_alert.default, {
|
|
87
87
|
key: "alert",
|
|
88
88
|
onCancel: handleCancel,
|
|
89
89
|
title: title,
|
|
@@ -1,30 +1,34 @@
|
|
|
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.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.assign.js");
|
|
31
|
+
|
|
28
32
|
var _react = _interopRequireDefault(require("react"));
|
|
29
33
|
|
|
30
34
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -45,25 +49,27 @@ require("./animated-menu-button.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; }
|
|
59
|
+
|
|
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); }
|
|
57
61
|
|
|
58
|
-
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); }
|
|
59
63
|
|
|
60
|
-
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); }; }
|
|
65
|
+
|
|
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); }
|
|
61
67
|
|
|
62
68
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
63
69
|
|
|
64
|
-
function
|
|
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; } }
|
|
65
71
|
|
|
66
|
-
function
|
|
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
|
|
|
@@ -90,14 +96,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
90
96
|
* @class AnimatedMenuButton
|
|
91
97
|
* @constructor
|
|
92
98
|
*/
|
|
93
|
-
var AnimatedMenuButton =
|
|
94
|
-
/*#__PURE__*/
|
|
95
|
-
function (_React$Component) {
|
|
99
|
+
var AnimatedMenuButton = /*#__PURE__*/function (_React$Component) {
|
|
96
100
|
_inherits(AnimatedMenuButton, _React$Component);
|
|
97
101
|
|
|
98
|
-
|
|
99
|
-
var _getPrototypeOf2;
|
|
102
|
+
var _super = _createSuper(AnimatedMenuButton);
|
|
100
103
|
|
|
104
|
+
function AnimatedMenuButton() {
|
|
101
105
|
var _this;
|
|
102
106
|
|
|
103
107
|
_classCallCheck(this, AnimatedMenuButton);
|
|
@@ -106,7 +110,7 @@ function (_React$Component) {
|
|
|
106
110
|
args[_key] = arguments[_key];
|
|
107
111
|
}
|
|
108
112
|
|
|
109
|
-
_this =
|
|
113
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
110
114
|
/**
|
|
111
115
|
* Determines if the blur event should be prevented.
|
|
112
116
|
*
|
|
@@ -147,16 +151,16 @@ function (_React$Component) {
|
|
|
147
151
|
|
|
148
152
|
_createClass(AnimatedMenuButton, [{
|
|
149
153
|
key: "labelHTML",
|
|
150
|
-
|
|
154
|
+
value:
|
|
151
155
|
/**
|
|
152
156
|
* Getter for label HTML
|
|
153
157
|
*
|
|
154
158
|
* @method labelHTML
|
|
155
159
|
* @return {HTML} HTML for label.
|
|
156
160
|
*/
|
|
157
|
-
|
|
161
|
+
function labelHTML() {
|
|
158
162
|
if (this.props.label) {
|
|
159
|
-
return _react.default.createElement("span", {
|
|
163
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
160
164
|
className: "carbon-animated-menu-button__label",
|
|
161
165
|
"data-element": "label",
|
|
162
166
|
key: "label"
|
|
@@ -183,7 +187,7 @@ function (_React$Component) {
|
|
|
183
187
|
|
|
184
188
|
contents.push(this.labelHTML());
|
|
185
189
|
contents.push(this.props.children);
|
|
186
|
-
return _react.default.createElement("div", {
|
|
190
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
187
191
|
className: "carbon-animated-menu-button__content"
|
|
188
192
|
}, contents);
|
|
189
193
|
}
|
|
@@ -241,7 +245,7 @@ function (_React$Component) {
|
|
|
241
245
|
value: function closeIcon() {
|
|
242
246
|
var _this3 = this;
|
|
243
247
|
|
|
244
|
-
return _react.default.createElement("button", {
|
|
248
|
+
return /*#__PURE__*/_react.default.createElement("button", {
|
|
245
249
|
className: "carbon-animated-menu-button__close-button",
|
|
246
250
|
"data-element": "close",
|
|
247
251
|
key: "close",
|
|
@@ -250,7 +254,7 @@ function (_React$Component) {
|
|
|
250
254
|
_this3._closeIcon = comp;
|
|
251
255
|
},
|
|
252
256
|
type: "button"
|
|
253
|
-
}, _react.default.createElement(_icon.default, {
|
|
257
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
254
258
|
type: "close"
|
|
255
259
|
}));
|
|
256
260
|
}
|
|
@@ -316,10 +320,10 @@ function (_React$Component) {
|
|
|
316
320
|
content = this.innerHTML();
|
|
317
321
|
}
|
|
318
322
|
|
|
319
|
-
return _react.default.createElement("div", _extends({}, this.componentProps(), (0, _tags.default)('animated-menu-button', this.props)), _react.default.createElement(_icon.default, {
|
|
323
|
+
return /*#__PURE__*/_react.default.createElement("div", _extends({}, this.componentProps(), (0, _tags.default)('animated-menu-button', this.props)), /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
320
324
|
type: "add",
|
|
321
325
|
"data-element": "open"
|
|
322
|
-
}), _react.default.createElement(_CSSTransitionGroup.default, {
|
|
326
|
+
}), /*#__PURE__*/_react.default.createElement(_CSSTransitionGroup.default, {
|
|
323
327
|
component: "div",
|
|
324
328
|
transitionEnterTimeout: 500,
|
|
325
329
|
transitionLeaveTimeout: 500,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.
|
|
3
|
+
require("core-js/modules/es.array.slice.js");
|
|
4
4
|
|
|
5
|
-
require("core-js/modules/es.
|
|
5
|
+
require("core-js/modules/es.object.freeze.js");
|
|
6
6
|
|
|
7
|
-
require("core-js/modules/es.
|
|
7
|
+
require("core-js/modules/es.object.keys.js");
|
|
8
8
|
|
|
9
|
-
require("core-js/modules/es.
|
|
9
|
+
require("core-js/modules/es.symbol.js");
|
|
10
10
|
|
|
11
|
-
require("core-js/modules/es.
|
|
11
|
+
require("core-js/modules/es.array.filter.js");
|
|
12
12
|
|
|
13
|
-
require("core-js/modules/es.object.
|
|
13
|
+
require("core-js/modules/es.object.to-string.js");
|
|
14
14
|
|
|
15
|
-
require("core-js/modules/es.object.
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
16
|
|
|
17
|
-
require("core-js/modules/web.dom-collections.for-each");
|
|
17
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
18
18
|
|
|
19
19
|
var _react = _interopRequireDefault(require("react"));
|
|
20
20
|
|
|
@@ -34,25 +34,17 @@ var _row = require("../row/row");
|
|
|
34
34
|
|
|
35
35
|
var _link = _interopRequireDefault(require("../link/link"));
|
|
36
36
|
|
|
37
|
+
var _templateObject;
|
|
38
|
+
|
|
37
39
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
38
40
|
|
|
39
|
-
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
|
|
41
|
+
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; }
|
|
40
42
|
|
|
41
43
|
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; }
|
|
42
44
|
|
|
43
|
-
function _templateObject() {
|
|
44
|
-
var data = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n"]);
|
|
45
|
-
|
|
46
|
-
_templateObject = function _templateObject() {
|
|
47
|
-
return data;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
return data;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
45
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
54
46
|
|
|
55
|
-
var Container = _styledComponents.default.div(_templateObject());
|
|
47
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n"])));
|
|
56
48
|
|
|
57
49
|
var Wrapper = function Wrapper(_ref) {
|
|
58
50
|
var direction = _ref.direction,
|
|
@@ -61,14 +53,14 @@ var Wrapper = function Wrapper(_ref) {
|
|
|
61
53
|
children = _ref.children;
|
|
62
54
|
|
|
63
55
|
if (direction === _optionsHelper.default.alignBinary[0]) {
|
|
64
|
-
return _react.default.createElement(Container, null, _react.default.createElement(_animatedMenuButton.default, {
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_animatedMenuButton.default, {
|
|
65
57
|
direction: direction,
|
|
66
58
|
label: label,
|
|
67
59
|
size: size
|
|
68
60
|
}, children));
|
|
69
61
|
}
|
|
70
62
|
|
|
71
|
-
return _react.default.createElement(_animatedMenuButton.default, {
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_animatedMenuButton.default, {
|
|
72
64
|
direction: direction,
|
|
73
65
|
label: label,
|
|
74
66
|
size: size
|
|
@@ -86,11 +78,11 @@ Wrapper.displayName = 'AnimatedMenuButton';
|
|
|
86
78
|
var direction = (0, _addonKnobs.select)('direction', _optionsHelper.default.alignBinary, _optionsHelper.default.alignBinary[1]);
|
|
87
79
|
var label = (0, _addonKnobs.text)('label', '');
|
|
88
80
|
var size = (0, _addonKnobs.select)('size', _optionsHelper.default.sizesFull, _optionsHelper.default.sizesFull[3]);
|
|
89
|
-
return _react.default.createElement(Wrapper, {
|
|
81
|
+
return /*#__PURE__*/_react.default.createElement(Wrapper, {
|
|
90
82
|
direction: direction,
|
|
91
83
|
label: label,
|
|
92
84
|
size: size
|
|
93
|
-
}, _react.default.createElement(_row.Row, null, _react.default.createElement("div", null, _react.default.createElement("h2", null, "1st Category"), _react.default.createElement("p", null, _react.default.createElement(_link.default, null, "First Option")), _react.default.createElement("p", null, _react.default.createElement(_link.default, null, "Another Option"))), _react.default.createElement("div", null, _react.default.createElement("h2", null, "2nd Category"), _react.default.createElement("p", null, _react.default.createElement(_link.default, null, "First Option")), _react.default.createElement("p", null, _react.default.createElement(_link.default, null, "Another Option"))), _react.default.createElement("div", null, _react.default.createElement("h2", null, "3rd Category"), _react.default.createElement("p", null, _react.default.createElement(_link.default, null, "First Option")), _react.default.createElement("p", null, _react.default.createElement(_link.default, null, "Another Option")))));
|
|
85
|
+
}, /*#__PURE__*/_react.default.createElement(_row.Row, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h2", null, "1st Category"), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_link.default, null, "First Option")), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_link.default, null, "Another Option"))), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h2", null, "2nd Category"), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_link.default, null, "First Option")), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_link.default, null, "Another Option"))), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h2", null, "3rd Category"), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_link.default, null, "First Option")), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_link.default, null, "Another Option")))));
|
|
94
86
|
}, {
|
|
95
87
|
notes: {
|
|
96
88
|
markdown: _notes.default
|