@coreui/react 2.5.7 → 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 (56) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/es/Aside.js +29 -37
  3. package/es/AsideToggler.js +36 -44
  4. package/es/Breadcrumb.js +51 -58
  5. package/es/Breadcrumb2.js +52 -60
  6. package/es/Footer.js +24 -32
  7. package/es/Header.js +23 -35
  8. package/es/HeaderDropdown.js +23 -27
  9. package/es/NavbarBrand.js +32 -39
  10. package/es/Shared/classes.js +0 -3
  11. package/es/Shared/element-closest.js +2 -0
  12. package/es/Shared/index.js +0 -1
  13. package/es/Shared/layout/layout.js +24 -16
  14. package/es/Shared/toggle-classes.js +2 -0
  15. package/es/Sidebar.js +43 -53
  16. package/es/SidebarFooter.js +19 -29
  17. package/es/SidebarForm.js +19 -29
  18. package/es/SidebarHeader.js +19 -29
  19. package/es/SidebarMinimizer.js +30 -35
  20. package/es/SidebarNav.js +128 -162
  21. package/es/SidebarNav2.js +178 -202
  22. package/es/SidebarToggler.js +35 -36
  23. package/es/Switch.js +59 -62
  24. package/lib/Aside.js +51 -60
  25. package/lib/AsideToggler.js +58 -67
  26. package/lib/Breadcrumb.js +71 -77
  27. package/lib/Breadcrumb2.js +72 -79
  28. package/lib/Footer.js +40 -47
  29. package/lib/Header.js +39 -50
  30. package/lib/HeaderDropdown.js +36 -37
  31. package/lib/NavbarBrand.js +50 -56
  32. package/lib/Shared/classes.js +8 -6
  33. package/lib/Shared/element-closest.js +3 -1
  34. package/lib/Shared/index.js +2 -3
  35. package/lib/Shared/layout/layout.js +31 -19
  36. package/lib/Shared/toggle-classes.js +6 -2
  37. package/lib/Sidebar.js +69 -81
  38. package/lib/SidebarFooter.js +33 -42
  39. package/lib/SidebarForm.js +33 -42
  40. package/lib/SidebarHeader.js +33 -42
  41. package/lib/SidebarMinimizer.js +51 -55
  42. package/lib/SidebarNav.js +154 -187
  43. package/lib/SidebarNav2.js +211 -236
  44. package/lib/SidebarToggler.js +56 -58
  45. package/lib/Switch.js +90 -92
  46. package/lib/index.js +36 -55
  47. package/package.json +14 -14
  48. package/umd/main.d0f057e5.css +5 -0
  49. package/umd/main.d0f057e5.css.map +1 -0
  50. package/umd/{@coreui/react.js → react.js} +918 -1076
  51. package/umd/react.min.js +38 -0
  52. package/umd/react.min.js.map +1 -0
  53. package/umd/@coreui/react.min.js +0 -44
  54. package/umd/@coreui/react.min.js.map +0 -1
  55. package/umd/main.a93373b7.css +0 -148
  56. package/umd/main.a93373b7.css.map +0 -1
@@ -1,21 +1,19 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
+ exports["default"] = void 0;
4
5
 
5
- var _class, _temp;
6
+ 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; }
6
7
 
7
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
-
9
- var LayoutHelper = (_temp = _class = function () {
10
- function LayoutHelper() {
11
- _classCallCheck(this, LayoutHelper);
12
- }
8
+ var LayoutHelper = /*#__PURE__*/function () {
9
+ function LayoutHelper() {}
13
10
 
14
11
  LayoutHelper.sidebarToggle = function sidebarToggle(toggle) {
15
12
  var minimize = arguments.length ? toggle : !this.elClassList.contains('sidebar-minimized');
16
13
  this.sidebarMinimize(minimize);
17
14
  this.brandMinimize(minimize);
18
- this.sidebarPSToggle(!minimize); /*remove PS on sidebar minimized*/
15
+ this.sidebarPSToggle(!minimize);
16
+ /*remove PS on sidebar minimized*/
19
17
  };
20
18
 
21
19
  LayoutHelper.sidebarMinimize = function sidebarMinimize(force) {
@@ -24,13 +22,10 @@ var LayoutHelper = (_temp = _class = function () {
24
22
 
25
23
  LayoutHelper.brandMinimize = function brandMinimize(force) {
26
24
  this.toggleClass('brand-minimized', force);
27
- };
28
-
29
- // sidebar perfect scrollbar ugly hack
30
-
25
+ } // sidebar perfect scrollbar ugly hack
26
+ ;
31
27
 
32
28
  LayoutHelper.sidebarPSToggle = function sidebarPSToggle(toggle) {
33
-
34
29
  if (this.isOnMobile()) {
35
30
  toggle = true;
36
31
  } else {
@@ -38,18 +33,25 @@ var LayoutHelper = (_temp = _class = function () {
38
33
  toggle = !isSidebarMinimized;
39
34
  }
40
35
 
41
- var ps = { y: { rail: {}, thumb: {} } };
36
+ var ps = {
37
+ y: {
38
+ rail: {},
39
+ thumb: {}
40
+ }
41
+ };
42
42
  var isRtl = getComputedStyle(document.documentElement).direction === 'rtl';
43
43
  var sidebar = document.querySelector('.sidebar-nav');
44
44
  ps.y.rail.on = document.querySelector('.sidebar-nav .ps__rail-y');
45
45
  ps.y.rail.off = document.querySelector('.sidebar-nav .ps__rail-y-off');
46
46
  ps.y.thumb.on = document.querySelector('.sidebar-nav .ps__thumb-y');
47
47
  ps.y.thumb.off = document.querySelector('.sidebar-nav .ps__thumb-y-off');
48
+
48
49
  if (sidebar) {
49
50
  if (toggle) {
50
51
  sidebar.classList.add('ps');
51
52
  sidebar.classList.add('ps-container');
52
53
  sidebar.classList.add('ps--active-y');
54
+
53
55
  if (ps.y.rail.off) {
54
56
  ps.y.rail.off.classList.add('ps__rail-y');
55
57
  ps.y.rail.off.removeAttribute('style');
@@ -57,6 +59,7 @@ var LayoutHelper = (_temp = _class = function () {
57
59
  ps.y.rail.off.style.right = isRtl ? 'unset' : '0px';
58
60
  ps.y.rail.off.classList.remove('ps__rail-y-off');
59
61
  }
62
+
60
63
  if (ps.y.thumb.off) {
61
64
  ps.y.thumb.off.removeAttribute('style');
62
65
  ps.y.thumb.off.classList.add('ps__thumb-y');
@@ -68,11 +71,13 @@ var LayoutHelper = (_temp = _class = function () {
68
71
  ps.y.rail.on.removeAttribute('style');
69
72
  ps.y.rail.on.classList.remove('ps__rail-y');
70
73
  }
74
+
71
75
  if (ps.y.thumb.on) {
72
76
  ps.y.thumb.on.classList.add('ps__thumb-y-off');
73
77
  ps.y.thumb.on.removeAttribute('style');
74
78
  ps.y.thumb.on.classList.remove('ps__thumb-y');
75
79
  }
80
+
76
81
  sidebar.classList.remove('ps');
77
82
  sidebar.classList.remove('ps-container');
78
83
  sidebar.classList.remove('ps--active-y');
@@ -81,7 +86,6 @@ var LayoutHelper = (_temp = _class = function () {
81
86
  };
82
87
 
83
88
  LayoutHelper.toggleClass = function toggleClass(className, force) {
84
-
85
89
  if (force === true) {
86
90
  this.elClassList.add(className);
87
91
  } else if (force === false) {
@@ -89,13 +93,16 @@ var LayoutHelper = (_temp = _class = function () {
89
93
  } else {
90
94
  this.elClassList.toggle(className);
91
95
  }
96
+
92
97
  return this.elClassList.contains(className);
93
98
  };
94
99
 
95
100
  LayoutHelper.isOnMobile = function isOnMobile() {
96
101
  var onMobile = false;
102
+
97
103
  try {
98
104
  var minimizerElement = document.querySelector('.sidebar-minimizer');
105
+
99
106
  if (minimizerElement) {
100
107
  onMobile = getComputedStyle(minimizerElement).getPropertyValue('display') === 'none';
101
108
  } else {
@@ -106,10 +113,15 @@ var LayoutHelper = (_temp = _class = function () {
106
113
  // eslint-disable-next-line
107
114
  console.warn('CoreUI isOnMobile failed to getComputedStyle', ignore);
108
115
  }
116
+
109
117
  return onMobile;
110
118
  };
111
119
 
112
120
  return LayoutHelper;
113
- }(), _class.elClassList = document.body.classList, _temp);
114
- exports.default = LayoutHelper;
115
- module.exports = exports['default'];
121
+ }();
122
+
123
+ _defineProperty(LayoutHelper, "elClassList", document.body.classList);
124
+
125
+ var _default = LayoutHelper;
126
+ exports["default"] = _default;
127
+ module.exports = exports.default;
@@ -1,13 +1,15 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = toggleClasses;
4
+ exports["default"] = toggleClasses;
5
+
5
6
  function toggleClasses(toggleClass, classList, force) {
6
7
  var level = classList.indexOf(toggleClass);
7
8
  var removeClassList = classList.slice(0, level);
8
9
  removeClassList.map(function (className) {
9
10
  return document.body.classList.remove(className);
10
11
  });
12
+
11
13
  if (force === true) {
12
14
  document.body.classList.add(toggleClass);
13
15
  } else if (force === false) {
@@ -15,6 +17,8 @@ function toggleClasses(toggleClass, classList, force) {
15
17
  } else {
16
18
  document.body.classList.toggle(toggleClass);
17
19
  }
20
+
18
21
  return document.body.classList.contains(toggleClass);
19
22
  }
20
- module.exports = exports["default"];
23
+
24
+ module.exports = exports.default;
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;