@coreui/react 2.5.4 → 2.5.8

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/css/scrollbar.css +18 -0
  3. package/es/Aside.js +29 -37
  4. package/es/AsideToggler.js +36 -44
  5. package/es/Breadcrumb.js +51 -58
  6. package/es/Breadcrumb2.js +52 -60
  7. package/es/Footer.js +24 -32
  8. package/es/Header.js +23 -35
  9. package/es/HeaderDropdown.js +23 -27
  10. package/es/NavbarBrand.js +32 -39
  11. package/es/Shared/classes.js +0 -3
  12. package/es/Shared/element-closest.js +2 -0
  13. package/es/Shared/index.js +0 -1
  14. package/es/Shared/layout/layout.js +75 -16
  15. package/es/Shared/toggle-classes.js +2 -0
  16. package/es/Sidebar.js +43 -53
  17. package/es/SidebarFooter.js +19 -29
  18. package/es/SidebarForm.js +19 -29
  19. package/es/SidebarHeader.js +19 -29
  20. package/es/SidebarMinimizer.js +30 -35
  21. package/es/SidebarNav.js +128 -162
  22. package/es/SidebarNav2.js +249 -174
  23. package/es/SidebarToggler.js +35 -36
  24. package/es/Switch.js +59 -62
  25. package/lib/Aside.js +51 -60
  26. package/lib/AsideToggler.js +58 -67
  27. package/lib/Breadcrumb.js +71 -77
  28. package/lib/Breadcrumb2.js +72 -79
  29. package/lib/Footer.js +40 -47
  30. package/lib/Header.js +39 -50
  31. package/lib/HeaderDropdown.js +36 -37
  32. package/lib/NavbarBrand.js +50 -56
  33. package/lib/Shared/classes.js +8 -6
  34. package/lib/Shared/element-closest.js +3 -1
  35. package/lib/Shared/index.js +2 -3
  36. package/lib/Shared/layout/layout.js +82 -19
  37. package/lib/Shared/toggle-classes.js +6 -2
  38. package/lib/Sidebar.js +69 -81
  39. package/lib/SidebarFooter.js +33 -42
  40. package/lib/SidebarForm.js +33 -42
  41. package/lib/SidebarHeader.js +33 -42
  42. package/lib/SidebarMinimizer.js +51 -55
  43. package/lib/SidebarNav.js +154 -187
  44. package/lib/SidebarNav2.js +275 -198
  45. package/lib/SidebarToggler.js +56 -58
  46. package/lib/Switch.js +90 -92
  47. package/lib/index.js +36 -55
  48. package/package.json +21 -20
  49. package/umd/main.d0f057e5.css +5 -0
  50. package/umd/main.d0f057e5.css.map +1 -0
  51. package/umd/react.js +6069 -0
  52. package/umd/react.min.js +38 -0
  53. package/umd/react.min.js.map +1 -0
  54. package/umd/@coreui/react.js +0 -11849
  55. package/umd/@coreui/react.min.js +0 -77
  56. package/umd/@coreui/react.min.js.map +0 -1
  57. package/umd/main.a25994ba.css +0 -129
  58. package/umd/main.a25994ba.css.map +0 -1
package/lib/Sidebar.js CHANGED
@@ -1,56 +1,48 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ exports["default"] = void 0;
4
5
 
5
- var _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; };
6
+ var _react = _interopRequireWildcard(require("react"));
6
7
 
7
- var _react = require('react');
8
+ var _classnames = _interopRequireDefault(require("classnames"));
8
9
 
9
- var _react2 = _interopRequireDefault(_react);
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
10
11
 
11
- var _classnames = require('classnames');
12
+ var _Shared = require("./Shared");
12
13
 
13
- var _classnames2 = _interopRequireDefault(_classnames);
14
+ var _reactOnclickout = _interopRequireDefault(require("react-onclickout"));
14
15
 
15
- var _propTypes = require('prop-types');
16
+ require("./Shared/element-closest");
16
17
 
17
- var _propTypes2 = _interopRequireDefault(_propTypes);
18
+ var _layout = _interopRequireDefault(require("./Shared/layout/layout"));
18
19
 
19
- var _Shared = require('./Shared');
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
20
21
 
21
- var _reactOnclickout = require('react-onclickout');
22
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
22
23
 
23
- var _reactOnclickout2 = _interopRequireDefault(_reactOnclickout);
24
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
24
25
 
25
- require('./Shared/element-closest');
26
+ 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); }
26
27
 
27
- var _layout = require('./Shared/layout/layout');
28
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
28
29
 
29
- var _layout2 = _interopRequireDefault(_layout);
30
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
30
31
 
31
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
32
-
33
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
34
-
35
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
36
-
37
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
38
-
39
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
40
-
41
- var propTypes = {
42
- children: _propTypes2.default.node,
43
- className: _propTypes2.default.string,
44
- compact: _propTypes2.default.bool,
45
- display: _propTypes2.default.string,
46
- fixed: _propTypes2.default.bool,
47
- minimized: _propTypes2.default.bool,
48
- isOpen: _propTypes2.default.bool,
49
- offCanvas: _propTypes2.default.bool,
50
- staticContext: _propTypes2.default.any,
51
- tag: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string])
52
- };
32
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
53
33
 
34
+ var propTypes = process.env.NODE_ENV !== "production" ? {
35
+ children: _propTypes["default"].node,
36
+ className: _propTypes["default"].string,
37
+ compact: _propTypes["default"].bool,
38
+ display: _propTypes["default"].string,
39
+ fixed: _propTypes["default"].bool,
40
+ minimized: _propTypes["default"].bool,
41
+ isOpen: _propTypes["default"].bool,
42
+ offCanvas: _propTypes["default"].bool,
43
+ staticContext: _propTypes["default"].any,
44
+ tag: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].string])
45
+ } : {};
54
46
  var defaultProps = {
55
47
  tag: 'div',
56
48
  compact: false,
@@ -61,24 +53,25 @@ var defaultProps = {
61
53
  offCanvas: false
62
54
  };
63
55
 
64
- var AppSidebar = function (_Component) {
65
- _inherits(AppSidebar, _Component);
56
+ var AppSidebar = /*#__PURE__*/function (_Component) {
57
+ _inheritsLoose(AppSidebar, _Component);
66
58
 
67
59
  function AppSidebar(props) {
68
- _classCallCheck(this, AppSidebar);
69
-
70
- var _this = _possibleConstructorReturn(this, _Component.call(this, props));
71
-
72
- _this.isCompact = _this.isCompact.bind(_this);
73
- _this.isFixed = _this.isFixed.bind(_this);
74
- _this.isMinimized = _this.isMinimized.bind(_this);
75
- _this.isOffCanvas = _this.isOffCanvas.bind(_this);
76
- _this.displayBreakpoint = _this.displayBreakpoint.bind(_this);
77
- _this.hideMobile = _this.hideMobile.bind(_this);
60
+ var _this;
61
+
62
+ _this = _Component.call(this, props) || this;
63
+ _this.isCompact = _this.isCompact.bind(_assertThisInitialized(_this));
64
+ _this.isFixed = _this.isFixed.bind(_assertThisInitialized(_this));
65
+ _this.isMinimized = _this.isMinimized.bind(_assertThisInitialized(_this));
66
+ _this.isOffCanvas = _this.isOffCanvas.bind(_assertThisInitialized(_this));
67
+ _this.displayBreakpoint = _this.displayBreakpoint.bind(_assertThisInitialized(_this));
68
+ _this.hideMobile = _this.hideMobile.bind(_assertThisInitialized(_this));
78
69
  return _this;
79
70
  }
80
71
 
81
- AppSidebar.prototype.componentDidMount = function componentDidMount() {
72
+ var _proto = AppSidebar.prototype;
73
+
74
+ _proto.componentDidMount = function componentDidMount() {
82
75
  this.displayBreakpoint(this.props.display);
83
76
  this.isCompact(this.props.compact);
84
77
  this.isFixed(this.props.fixed);
@@ -86,46 +79,47 @@ var AppSidebar = function (_Component) {
86
79
  this.isOffCanvas(this.props.offCanvas);
87
80
  };
88
81
 
89
- AppSidebar.prototype.isCompact = function isCompact(compact) {
82
+ _proto.isCompact = function isCompact(compact) {
90
83
  if (compact) {
91
84
  document.body.classList.add('sidebar-compact');
92
85
  }
93
86
  };
94
87
 
95
- AppSidebar.prototype.isFixed = function isFixed(fixed) {
88
+ _proto.isFixed = function isFixed(fixed) {
96
89
  if (fixed) {
97
90
  document.body.classList.add('sidebar-fixed');
98
91
  }
99
92
  };
100
93
 
101
- AppSidebar.prototype.isMinimized = function isMinimized(minimized) {
102
- _layout2.default.sidebarToggle(minimized);
94
+ _proto.isMinimized = function isMinimized(minimized) {
95
+ _layout["default"].sidebarToggle(minimized);
103
96
  };
104
97
 
105
- AppSidebar.prototype.isOffCanvas = function isOffCanvas(offCanvas) {
98
+ _proto.isOffCanvas = function isOffCanvas(offCanvas) {
106
99
  if (offCanvas) {
107
100
  document.body.classList.add('sidebar-off-canvas');
108
101
  }
109
102
  };
110
103
 
111
- AppSidebar.prototype.displayBreakpoint = function displayBreakpoint(display) {
112
- var cssTemplate = 'sidebar-' + display + '-show';
104
+ _proto.displayBreakpoint = function displayBreakpoint(display) {
105
+ var cssTemplate = "sidebar-" + display + "-show";
113
106
  var _sidebarCssClasses$ = _Shared.sidebarCssClasses[0],
114
107
  cssClass = _sidebarCssClasses$[0];
115
108
 
116
109
  if (display && _Shared.sidebarCssClasses.indexOf(cssTemplate) > -1) {
117
110
  cssClass = cssTemplate;
118
111
  }
112
+
119
113
  document.body.classList.add(cssClass);
120
114
  };
121
115
 
122
- AppSidebar.prototype.hideMobile = function hideMobile() {
116
+ _proto.hideMobile = function hideMobile() {
123
117
  if (document.body.classList.contains('sidebar-show')) {
124
118
  document.body.classList.remove('sidebar-show');
125
119
  }
126
120
  };
127
121
 
128
- AppSidebar.prototype.onClickOut = function onClickOut(e) {
122
+ _proto.onClickOut = function onClickOut(e) {
129
123
  if (typeof window !== 'undefined' && document.body.classList.contains('sidebar-show')) {
130
124
  if (!e.target.closest('[data-sidebar-toggler]')) {
131
125
  this.hideMobile();
@@ -133,14 +127,14 @@ var AppSidebar = function (_Component) {
133
127
  }
134
128
  };
135
129
 
136
- AppSidebar.prototype.render = function render() {
130
+ _proto.render = function render() {
137
131
  var _this2 = this;
138
132
 
139
- var _props = this.props,
140
- className = _props.className,
141
- children = _props.children,
142
- Tag = _props.tag,
143
- attributes = _objectWithoutProperties(_props, ['className', 'children', 'tag']);
133
+ var _this$props = this.props,
134
+ className = _this$props.className,
135
+ children = _this$props.children,
136
+ Tag = _this$props.tag,
137
+ attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "children", "tag"]);
144
138
 
145
139
  delete attributes.compact;
146
140
  delete attributes.display;
@@ -149,21 +143,15 @@ var AppSidebar = function (_Component) {
149
143
  delete attributes.offCanvas;
150
144
  delete attributes.isOpen;
151
145
  delete attributes.staticContext;
146
+ var classes = (0, _classnames["default"])(className, 'sidebar'); // sidebar-nav root
152
147
 
153
- var classes = (0, _classnames2.default)(className, 'sidebar');
154
-
155
- // sidebar-nav root
156
- return _react2.default.createElement(
157
- _reactOnclickout2.default,
158
- { onClickOut: function onClickOut(e) {
159
- _this2.onClickOut(e);
160
- } },
161
- _react2.default.createElement(
162
- Tag,
163
- _extends({ className: classes }, attributes),
164
- children
165
- )
166
- );
148
+ return /*#__PURE__*/_react["default"].createElement(_reactOnclickout["default"], {
149
+ onClickOut: function onClickOut(e) {
150
+ _this2.onClickOut(e);
151
+ }
152
+ }, /*#__PURE__*/_react["default"].createElement(Tag, _extends({
153
+ className: classes
154
+ }, attributes), children));
167
155
  };
168
156
 
169
157
  return AppSidebar;
@@ -171,6 +159,6 @@ var AppSidebar = function (_Component) {
171
159
 
172
160
  AppSidebar.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
173
161
  AppSidebar.defaultProps = defaultProps;
174
-
175
- exports.default = AppSidebar;
176
- module.exports = exports['default'];
162
+ var _default = AppSidebar;
163
+ exports["default"] = _default;
164
+ module.exports = exports.default;
@@ -1,64 +1,55 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ exports["default"] = void 0;
4
5
 
5
- var _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; };
6
+ var _react = _interopRequireWildcard(require("react"));
6
7
 
7
- var _react = require('react');
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
8
9
 
9
- var _react2 = _interopRequireDefault(_react);
10
+ var _classnames = _interopRequireDefault(require("classnames"));
10
11
 
11
- var _propTypes = require('prop-types');
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
13
 
13
- var _propTypes2 = _interopRequireDefault(_propTypes);
14
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
14
15
 
15
- var _classnames = require('classnames');
16
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
17
 
17
- var _classnames2 = _interopRequireDefault(_classnames);
18
+ 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); }
18
19
 
19
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
20
21
 
21
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
22
-
23
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
24
-
25
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
26
-
27
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
28
-
29
- var propTypes = {
30
- children: _propTypes2.default.node,
31
- className: _propTypes2.default.string,
32
- tag: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string])
33
- };
22
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
34
23
 
24
+ var propTypes = process.env.NODE_ENV !== "production" ? {
25
+ children: _propTypes["default"].node,
26
+ className: _propTypes["default"].string,
27
+ tag: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].string])
28
+ } : {};
35
29
  var defaultProps = {
36
30
  tag: 'div'
37
31
  };
38
32
 
39
- var AppSidebarFooter = function (_Component) {
40
- _inherits(AppSidebarFooter, _Component);
33
+ var AppSidebarFooter = /*#__PURE__*/function (_Component) {
34
+ _inheritsLoose(AppSidebarFooter, _Component);
41
35
 
42
36
  function AppSidebarFooter() {
43
- _classCallCheck(this, AppSidebarFooter);
44
-
45
- return _possibleConstructorReturn(this, _Component.apply(this, arguments));
37
+ return _Component.apply(this, arguments) || this;
46
38
  }
47
39
 
48
- AppSidebarFooter.prototype.render = function render() {
49
- var _props = this.props,
50
- className = _props.className,
51
- children = _props.children,
52
- Tag = _props.tag,
53
- attributes = _objectWithoutProperties(_props, ['className', 'children', 'tag']);
40
+ var _proto = AppSidebarFooter.prototype;
54
41
 
55
- var classes = (0, _classnames2.default)(className, 'sidebar-footer');
56
- var footer = children ? _react2.default.createElement(
57
- Tag,
58
- _extends({ className: classes }, attributes),
59
- children
60
- ) : null;
42
+ _proto.render = function render() {
43
+ var _this$props = this.props,
44
+ className = _this$props.className,
45
+ children = _this$props.children,
46
+ Tag = _this$props.tag,
47
+ attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "children", "tag"]);
61
48
 
49
+ var classes = (0, _classnames["default"])(className, 'sidebar-footer');
50
+ var footer = children ? /*#__PURE__*/_react["default"].createElement(Tag, _extends({
51
+ className: classes
52
+ }, attributes), children) : null;
62
53
  return footer;
63
54
  };
64
55
 
@@ -67,6 +58,6 @@ var AppSidebarFooter = function (_Component) {
67
58
 
68
59
  AppSidebarFooter.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
69
60
  AppSidebarFooter.defaultProps = defaultProps;
70
-
71
- exports.default = AppSidebarFooter;
72
- module.exports = exports['default'];
61
+ var _default = AppSidebarFooter;
62
+ exports["default"] = _default;
63
+ module.exports = exports.default;
@@ -1,64 +1,55 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ exports["default"] = void 0;
4
5
 
5
- var _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; };
6
+ var _react = _interopRequireWildcard(require("react"));
6
7
 
7
- var _react = require('react');
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
8
9
 
9
- var _react2 = _interopRequireDefault(_react);
10
+ var _classnames = _interopRequireDefault(require("classnames"));
10
11
 
11
- var _propTypes = require('prop-types');
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
13
 
13
- var _propTypes2 = _interopRequireDefault(_propTypes);
14
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
14
15
 
15
- var _classnames = require('classnames');
16
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
17
 
17
- var _classnames2 = _interopRequireDefault(_classnames);
18
+ 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); }
18
19
 
19
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
20
21
 
21
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
22
-
23
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
24
-
25
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
26
-
27
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
28
-
29
- var propTypes = {
30
- children: _propTypes2.default.node,
31
- className: _propTypes2.default.string,
32
- tag: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string])
33
- };
22
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
34
23
 
24
+ var propTypes = process.env.NODE_ENV !== "production" ? {
25
+ children: _propTypes["default"].node,
26
+ className: _propTypes["default"].string,
27
+ tag: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].string])
28
+ } : {};
35
29
  var defaultProps = {
36
30
  tag: 'div'
37
31
  };
38
32
 
39
- var AppSidebarForm = function (_Component) {
40
- _inherits(AppSidebarForm, _Component);
33
+ var AppSidebarForm = /*#__PURE__*/function (_Component) {
34
+ _inheritsLoose(AppSidebarForm, _Component);
41
35
 
42
36
  function AppSidebarForm() {
43
- _classCallCheck(this, AppSidebarForm);
44
-
45
- return _possibleConstructorReturn(this, _Component.apply(this, arguments));
37
+ return _Component.apply(this, arguments) || this;
46
38
  }
47
39
 
48
- AppSidebarForm.prototype.render = function render() {
49
- var _props = this.props,
50
- className = _props.className,
51
- children = _props.children,
52
- Tag = _props.tag,
53
- attributes = _objectWithoutProperties(_props, ['className', 'children', 'tag']);
40
+ var _proto = AppSidebarForm.prototype;
54
41
 
55
- var classes = (0, _classnames2.default)(className, 'sidebar-form');
56
- var form = children ? _react2.default.createElement(
57
- Tag,
58
- _extends({ className: classes }, attributes),
59
- children
60
- ) : null;
42
+ _proto.render = function render() {
43
+ var _this$props = this.props,
44
+ className = _this$props.className,
45
+ children = _this$props.children,
46
+ Tag = _this$props.tag,
47
+ attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "children", "tag"]);
61
48
 
49
+ var classes = (0, _classnames["default"])(className, 'sidebar-form');
50
+ var form = children ? /*#__PURE__*/_react["default"].createElement(Tag, _extends({
51
+ className: classes
52
+ }, attributes), children) : null;
62
53
  return form;
63
54
  };
64
55
 
@@ -67,6 +58,6 @@ var AppSidebarForm = function (_Component) {
67
58
 
68
59
  AppSidebarForm.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
69
60
  AppSidebarForm.defaultProps = defaultProps;
70
-
71
- exports.default = AppSidebarForm;
72
- module.exports = exports['default'];
61
+ var _default = AppSidebarForm;
62
+ exports["default"] = _default;
63
+ module.exports = exports.default;
@@ -1,64 +1,55 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ exports["default"] = void 0;
4
5
 
5
- var _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; };
6
+ var _react = _interopRequireWildcard(require("react"));
6
7
 
7
- var _react = require('react');
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
8
9
 
9
- var _react2 = _interopRequireDefault(_react);
10
+ var _classnames = _interopRequireDefault(require("classnames"));
10
11
 
11
- var _propTypes = require('prop-types');
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
13
 
13
- var _propTypes2 = _interopRequireDefault(_propTypes);
14
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
14
15
 
15
- var _classnames = require('classnames');
16
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
17
 
17
- var _classnames2 = _interopRequireDefault(_classnames);
18
+ 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); }
18
19
 
19
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
20
21
 
21
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
22
-
23
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
24
-
25
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
26
-
27
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
28
-
29
- var propTypes = {
30
- children: _propTypes2.default.node,
31
- className: _propTypes2.default.string,
32
- tag: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string])
33
- };
22
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
34
23
 
24
+ var propTypes = process.env.NODE_ENV !== "production" ? {
25
+ children: _propTypes["default"].node,
26
+ className: _propTypes["default"].string,
27
+ tag: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].string])
28
+ } : {};
35
29
  var defaultProps = {
36
30
  tag: 'div'
37
31
  };
38
32
 
39
- var AppSidebarHeader = function (_Component) {
40
- _inherits(AppSidebarHeader, _Component);
33
+ var AppSidebarHeader = /*#__PURE__*/function (_Component) {
34
+ _inheritsLoose(AppSidebarHeader, _Component);
41
35
 
42
36
  function AppSidebarHeader() {
43
- _classCallCheck(this, AppSidebarHeader);
44
-
45
- return _possibleConstructorReturn(this, _Component.apply(this, arguments));
37
+ return _Component.apply(this, arguments) || this;
46
38
  }
47
39
 
48
- AppSidebarHeader.prototype.render = function render() {
49
- var _props = this.props,
50
- className = _props.className,
51
- children = _props.children,
52
- Tag = _props.tag,
53
- attributes = _objectWithoutProperties(_props, ['className', 'children', 'tag']);
40
+ var _proto = AppSidebarHeader.prototype;
54
41
 
55
- var classes = (0, _classnames2.default)(className, 'sidebar-header');
56
- var header = children ? _react2.default.createElement(
57
- Tag,
58
- _extends({ className: classes }, attributes),
59
- children
60
- ) : null;
42
+ _proto.render = function render() {
43
+ var _this$props = this.props,
44
+ className = _this$props.className,
45
+ children = _this$props.children,
46
+ Tag = _this$props.tag,
47
+ attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "children", "tag"]);
61
48
 
49
+ var classes = (0, _classnames["default"])(className, 'sidebar-header');
50
+ var header = children ? /*#__PURE__*/_react["default"].createElement(Tag, _extends({
51
+ className: classes
52
+ }, attributes), children) : null;
62
53
  return header;
63
54
  };
64
55
 
@@ -67,6 +58,6 @@ var AppSidebarHeader = function (_Component) {
67
58
 
68
59
  AppSidebarHeader.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
69
60
  AppSidebarHeader.defaultProps = defaultProps;
70
-
71
- exports.default = AppSidebarHeader;
72
- module.exports = exports['default'];
61
+ var _default = AppSidebarHeader;
62
+ exports["default"] = _default;
63
+ module.exports = exports.default;