@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
@@ -1,71 +1,67 @@
1
- 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; };
1
+ 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); }
2
2
 
3
- 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; }
3
+ 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; }
4
4
 
5
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6
6
 
7
- 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; }
8
-
9
- 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; }
7
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
10
8
 
11
9
  import React, { Component } from 'react';
12
10
  import PropTypes from 'prop-types';
13
11
  import classNames from 'classnames';
14
-
15
12
  import LayoutHelper from './Shared/layout/layout';
16
-
17
- var propTypes = {
13
+ var propTypes = process.env.NODE_ENV !== "production" ? {
18
14
  children: PropTypes.node,
19
15
  className: PropTypes.string,
20
16
  tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
21
17
  type: PropTypes.string
22
- };
23
-
18
+ } : {};
24
19
  var defaultProps = {
25
20
  tag: 'button',
26
21
  type: 'button'
27
22
  };
28
23
 
29
- var AppSidebarMinimizer = function (_Component) {
30
- _inherits(AppSidebarMinimizer, _Component);
24
+ var AppSidebarMinimizer = /*#__PURE__*/function (_Component) {
25
+ _inheritsLoose(AppSidebarMinimizer, _Component);
31
26
 
32
27
  function AppSidebarMinimizer(props) {
33
- _classCallCheck(this, AppSidebarMinimizer);
28
+ var _this;
34
29
 
35
- var _this = _possibleConstructorReturn(this, _Component.call(this, props));
36
-
37
- _this.handleClick = _this.handleClick.bind(_this);
30
+ _this = _Component.call(this, props) || this;
31
+ _this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
38
32
  return _this;
39
33
  }
40
34
 
41
- AppSidebarMinimizer.prototype.componentDidMount = function componentDidMount() {
35
+ var _proto = AppSidebarMinimizer.prototype;
36
+
37
+ _proto.componentDidMount = function componentDidMount() {
42
38
  var isMinimized = document.body.classList.contains('sidebar-minimized');
43
39
  LayoutHelper.sidebarPSToggle(!isMinimized);
44
40
  };
45
41
 
46
- AppSidebarMinimizer.prototype.handleClick = function handleClick() {
42
+ _proto.handleClick = function handleClick() {
47
43
  LayoutHelper.sidebarToggle();
48
44
  };
49
45
 
50
- AppSidebarMinimizer.prototype.render = function render() {
46
+ _proto.render = function render() {
51
47
  var _this2 = this;
52
48
 
53
- var _props = this.props,
54
- className = _props.className,
55
- children = _props.children,
56
- Tag = _props.tag,
57
- type = _props.type,
58
- attributes = _objectWithoutProperties(_props, ['className', 'children', 'tag', 'type']);
49
+ var _this$props = this.props,
50
+ className = _this$props.className,
51
+ children = _this$props.children,
52
+ Tag = _this$props.tag,
53
+ type = _this$props.type,
54
+ attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "children", "tag", "type"]);
59
55
 
60
56
  var classes = classNames(className, 'sidebar-minimizer', 'mt-auto');
61
-
62
- return React.createElement(
63
- Tag,
64
- _extends({ className: classes, type: type }, attributes, { onClick: function onClick(event) {
65
- return _this2.handleClick(event);
66
- } }),
67
- children
68
- );
57
+ return /*#__PURE__*/React.createElement(Tag, _extends({
58
+ className: classes,
59
+ type: type
60
+ }, attributes, {
61
+ onClick: function onClick(event) {
62
+ return _this2.handleClick(event);
63
+ }
64
+ }), children);
69
65
  };
70
66
 
71
67
  return AppSidebarMinimizer;
@@ -73,5 +69,4 @@ var AppSidebarMinimizer = function (_Component) {
73
69
 
74
70
  AppSidebarMinimizer.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
75
71
  AppSidebarMinimizer.defaultProps = defaultProps;
76
-
77
72
  export default AppSidebarMinimizer;
package/es/SidebarNav.js CHANGED
@@ -1,12 +1,10 @@
1
- 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; };
1
+ 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; }
2
2
 
3
- 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; }
3
+ 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); }
4
4
 
5
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6
6
 
7
- 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; }
8
-
9
- 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; }
7
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
10
8
 
11
9
  import React, { Component } from 'react';
12
10
  import { NavLink } from 'react-router-dom';
@@ -15,8 +13,7 @@ import classNames from 'classnames';
15
13
  import PropTypes from 'prop-types';
16
14
  import PerfectScrollbar from 'react-perfect-scrollbar';
17
15
  import 'react-perfect-scrollbar/dist/css/styles.css';
18
-
19
- var propTypes = {
16
+ var propTypes = process.env.NODE_ENV !== "production" ? {
20
17
  children: PropTypes.node,
21
18
  className: PropTypes.string,
22
19
  navConfig: PropTypes.any,
@@ -24,8 +21,7 @@ var propTypes = {
24
21
  isOpen: PropTypes.bool,
25
22
  staticContext: PropTypes.any,
26
23
  tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
27
- };
28
-
24
+ } : {};
29
25
  var defaultProps = {
30
26
  tag: 'nav',
31
27
  navConfig: {
@@ -33,216 +29,187 @@ var defaultProps = {
33
29
  name: 'Dashboard',
34
30
  url: '/dashboard',
35
31
  icon: 'icon-speedometer',
36
- badge: { variant: 'info', text: 'NEW' }
32
+ badge: {
33
+ variant: 'info',
34
+ text: 'NEW'
35
+ }
37
36
  }]
38
37
  },
39
38
  isOpen: false
40
39
  };
41
40
 
42
- var AppSidebarNav = function (_Component) {
43
- _inherits(AppSidebarNav, _Component);
41
+ var AppSidebarNav = /*#__PURE__*/function (_Component) {
42
+ _inheritsLoose(AppSidebarNav, _Component);
44
43
 
45
44
  function AppSidebarNav(props) {
46
- _classCallCheck(this, AppSidebarNav);
47
-
48
- var _this = _possibleConstructorReturn(this, _Component.call(this, props));
45
+ var _this;
49
46
 
50
- _this.handleClick = _this.handleClick.bind(_this);
51
- _this.activeRoute = _this.activeRoute.bind(_this);
52
- _this.hideMobile = _this.hideMobile.bind(_this);
47
+ _this = _Component.call(this, props) || this;
48
+ _this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
49
+ _this.activeRoute = _this.activeRoute.bind(_assertThisInitialized(_this));
50
+ _this.hideMobile = _this.hideMobile.bind(_assertThisInitialized(_this));
53
51
  return _this;
54
52
  }
55
53
 
56
- AppSidebarNav.prototype.handleClick = function handleClick(e) {
54
+ var _proto = AppSidebarNav.prototype;
55
+
56
+ _proto.handleClick = function handleClick(e) {
57
57
  e.preventDefault();
58
58
  e.currentTarget.parentElement.classList.toggle('open');
59
59
  };
60
60
 
61
- AppSidebarNav.prototype.activeRoute = function activeRoute(routeName, props) {
61
+ _proto.activeRoute = function activeRoute(routeName, props) {
62
62
  return props.location.pathname.indexOf(routeName) > -1 ? 'nav-item nav-dropdown open' : 'nav-item nav-dropdown';
63
63
  };
64
64
 
65
- AppSidebarNav.prototype.hideMobile = function hideMobile() {
65
+ _proto.hideMobile = function hideMobile() {
66
66
  if (document.body.classList.contains('sidebar-show')) {
67
67
  document.body.classList.toggle('sidebar-show');
68
68
  }
69
- };
70
-
71
- // nav list
72
-
69
+ } // nav list
70
+ ;
73
71
 
74
- AppSidebarNav.prototype.navList = function navList(items) {
72
+ _proto.navList = function navList(items) {
75
73
  var _this2 = this;
76
74
 
77
75
  return items.map(function (item, index) {
78
76
  return _this2.navType(item, index);
79
77
  });
80
- };
81
-
82
- // nav type
83
-
78
+ } // nav type
79
+ ;
84
80
 
85
- AppSidebarNav.prototype.navType = function navType(item, idx) {
81
+ _proto.navType = function navType(item, idx) {
86
82
  return item.title ? this.navTitle(item, idx) : item.divider ? this.navDivider(item, idx) : item.label ? this.navLabel(item, idx) : item.children ? this.navDropdown(item, idx) : this.navItem(item, idx);
87
- };
88
-
89
- // nav list section title
90
-
91
-
92
- AppSidebarNav.prototype.navTitle = function navTitle(title, key) {
93
- var classes = classNames('nav-title', title.class);
94
- return React.createElement(
95
- 'li',
96
- { key: key, className: classes },
97
- this.navWrapper(title),
98
- ' '
99
- );
100
- };
101
-
102
- // simple wrapper for nav-title item
103
-
104
-
105
- AppSidebarNav.prototype.navWrapper = function navWrapper(item) {
83
+ } // nav list section title
84
+ ;
85
+
86
+ _proto.navTitle = function navTitle(title, key) {
87
+ var classes = classNames('nav-title', title["class"]);
88
+ return /*#__PURE__*/React.createElement("li", {
89
+ key: key,
90
+ className: classes
91
+ }, this.navWrapper(title), " ");
92
+ } // simple wrapper for nav-title item
93
+ ;
94
+
95
+ _proto.navWrapper = function navWrapper(item) {
106
96
  return item.wrapper && item.wrapper.element ? React.createElement(item.wrapper.element, item.wrapper.attributes, item.name) : item.name;
107
- };
108
-
109
- // nav list divider
110
-
111
-
112
- AppSidebarNav.prototype.navDivider = function navDivider(divider, key) {
113
- var classes = classNames('divider', divider.class);
114
- return React.createElement('li', { key: key, className: classes });
115
- };
116
-
117
- // nav label with nav link
118
-
97
+ } // nav list divider
98
+ ;
99
+
100
+ _proto.navDivider = function navDivider(divider, key) {
101
+ var classes = classNames('divider', divider["class"]);
102
+ return /*#__PURE__*/React.createElement("li", {
103
+ key: key,
104
+ className: classes
105
+ });
106
+ } // nav label with nav link
107
+ ;
119
108
 
120
- AppSidebarNav.prototype.navLabel = function navLabel(item, key) {
109
+ _proto.navLabel = function navLabel(item, key) {
121
110
  var classes = {
122
- item: classNames('hidden-cn', item.class),
123
- link: classNames('nav-label', item.class ? item.class : ''),
124
- icon: classNames('nav-icon', !item.icon ? 'fa fa-circle' : item.icon, item.label.variant ? 'text-' + item.label.variant : '', item.label.class ? item.label.class : '')
111
+ item: classNames('hidden-cn', item["class"]),
112
+ link: classNames('nav-label', item["class"] ? item["class"] : ''),
113
+ icon: classNames('nav-icon', !item.icon ? 'fa fa-circle' : item.icon, item.label.variant ? "text-" + item.label.variant : '', item.label["class"] ? item.label["class"] : '')
125
114
  };
126
115
  return this.navLink(item, key, classes);
127
- };
116
+ } // nav dropdown
117
+ ;
128
118
 
129
- // nav dropdown
130
-
131
-
132
- AppSidebarNav.prototype.navDropdown = function navDropdown(item, key) {
119
+ _proto.navDropdown = function navDropdown(item, key) {
133
120
  var classIcon = classNames('nav-icon', item.icon);
134
121
  var attributes = JSON.parse(JSON.stringify(item.attributes || {}));
135
- var classes = classNames('nav-link', 'nav-dropdown-toggle', item.class, attributes.class);
136
- delete attributes.class;
137
- return React.createElement(
138
- 'li',
139
- { key: key, className: this.activeRoute(item.url, this.props) },
140
- React.createElement(
141
- 'a',
142
- _extends({ className: classes, href: '#', onClick: this.handleClick }, attributes),
143
- React.createElement('i', { className: classIcon }),
144
- item.name,
145
- this.navBadge(item.badge)
146
- ),
147
- React.createElement(
148
- 'ul',
149
- { className: 'nav-dropdown-items' },
150
- this.navList(item.children)
151
- )
152
- );
153
- };
154
-
155
- // nav item with nav link
156
-
157
-
158
- AppSidebarNav.prototype.navItem = function navItem(item, key) {
122
+ var classes = classNames('nav-link', 'nav-dropdown-toggle', item["class"], attributes["class"]);
123
+ delete attributes["class"];
124
+ return /*#__PURE__*/React.createElement("li", {
125
+ key: key,
126
+ className: this.activeRoute(item.url, this.props)
127
+ }, /*#__PURE__*/React.createElement("a", _extends({
128
+ className: classes,
129
+ href: "#",
130
+ onClick: this.handleClick
131
+ }, attributes), /*#__PURE__*/React.createElement("i", {
132
+ className: classIcon
133
+ }), item.name, this.navBadge(item.badge)), /*#__PURE__*/React.createElement("ul", {
134
+ className: "nav-dropdown-items"
135
+ }, this.navList(item.children)));
136
+ } // nav item with nav link
137
+ ;
138
+
139
+ _proto.navItem = function navItem(item, key) {
159
140
  var classes = {
160
- item: classNames(item.class),
161
- link: classNames('nav-link', item.variant ? 'nav-link-' + item.variant : ''),
141
+ item: classNames(item["class"]),
142
+ link: classNames('nav-link', item.variant ? "nav-link-" + item.variant : ''),
162
143
  icon: classNames('nav-icon', item.icon)
163
144
  };
164
145
  return this.navLink(item, key, classes);
165
- };
166
-
167
- // nav link
168
-
146
+ } // nav link
147
+ ;
169
148
 
170
- AppSidebarNav.prototype.navLink = function navLink(item, key, classes) {
149
+ _proto.navLink = function navLink(item, key, classes) {
171
150
  var url = item.url || '';
172
- var itemIcon = React.createElement('i', { className: classes.icon });
151
+ var itemIcon = /*#__PURE__*/React.createElement("i", {
152
+ className: classes.icon
153
+ });
173
154
  var itemBadge = this.navBadge(item.badge);
174
155
  var attributes = item.attributes || {};
175
- return React.createElement(
176
- NavItem,
177
- { key: key, className: classes.item },
178
- attributes.disabled ? React.createElement(
179
- RsNavLink,
180
- _extends({ href: '', className: classes.link }, attributes),
181
- itemIcon,
182
- item.name,
183
- itemBadge
184
- ) : this.isExternal(url) ? React.createElement(
185
- RsNavLink,
186
- _extends({ href: url, className: classes.link, active: true }, attributes),
187
- itemIcon,
188
- item.name,
189
- itemBadge
190
- ) : React.createElement(
191
- NavLink,
192
- _extends({ to: url, className: classes.link, activeClassName: 'active', onClick: this.hideMobile }, attributes),
193
- itemIcon,
194
- item.name,
195
- itemBadge
196
- )
197
- );
198
- };
199
-
200
- // badge addon to NavItem
201
-
202
-
203
- AppSidebarNav.prototype.navBadge = function navBadge(badge) {
156
+ return /*#__PURE__*/React.createElement(NavItem, {
157
+ key: key,
158
+ className: classes.item
159
+ }, attributes.disabled ? /*#__PURE__*/React.createElement(RsNavLink, _extends({
160
+ href: '',
161
+ className: classes.link
162
+ }, attributes), itemIcon, item.name, itemBadge) : this.isExternal(url) ? /*#__PURE__*/React.createElement(RsNavLink, _extends({
163
+ href: url,
164
+ className: classes.link,
165
+ active: true
166
+ }, attributes), itemIcon, item.name, itemBadge) : /*#__PURE__*/React.createElement(NavLink, _extends({
167
+ to: url,
168
+ className: classes.link,
169
+ activeClassName: "active",
170
+ onClick: this.hideMobile
171
+ }, attributes), itemIcon, item.name, itemBadge));
172
+ } // badge addon to NavItem
173
+ ;
174
+
175
+ _proto.navBadge = function navBadge(badge) {
204
176
  if (badge) {
205
- var classes = classNames(badge.class);
206
- return React.createElement(
207
- Badge,
208
- { className: classes, color: badge.variant },
209
- badge.text
210
- );
177
+ var classes = classNames(badge["class"]);
178
+ return /*#__PURE__*/React.createElement(Badge, {
179
+ className: classes,
180
+ color: badge.variant
181
+ }, badge.text);
211
182
  }
183
+
212
184
  return null;
213
185
  };
214
186
 
215
- AppSidebarNav.prototype.isExternal = function isExternal(url) {
187
+ _proto.isExternal = function isExternal(url) {
216
188
  var link = url ? url.substring(0, 4) : '';
217
189
  return link === 'http';
218
190
  };
219
191
 
220
- AppSidebarNav.prototype.render = function render() {
221
- var _props = this.props,
222
- className = _props.className,
223
- children = _props.children,
224
- navConfig = _props.navConfig,
225
- attributes = _objectWithoutProperties(_props, ['className', 'children', 'navConfig']);
192
+ _proto.render = function render() {
193
+ var _this$props = this.props,
194
+ className = _this$props.className,
195
+ children = _this$props.children,
196
+ navConfig = _this$props.navConfig,
197
+ attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "children", "navConfig"]);
226
198
 
227
199
  delete attributes.isOpen;
228
200
  delete attributes.staticContext;
229
201
  delete attributes.Tag;
202
+ var navClasses = classNames(className, 'sidebar-nav'); // ToDo: find better rtl fix
230
203
 
231
- var navClasses = classNames(className, 'sidebar-nav');
232
-
233
- // ToDo: find better rtl fix
234
- var isRtl = getComputedStyle(document.documentElement).direction === 'rtl';
235
-
236
- // sidebar-nav root
237
- return React.createElement(
238
- PerfectScrollbar,
239
- _extends({ className: navClasses }, attributes, { options: { suppressScrollX: !isRtl } }),
240
- React.createElement(
241
- Nav,
242
- null,
243
- children || this.navList(navConfig.items)
244
- )
245
- );
204
+ var isRtl = getComputedStyle(document.documentElement).direction === 'rtl'; // sidebar-nav root
205
+
206
+ return /*#__PURE__*/React.createElement(PerfectScrollbar, _extends({
207
+ className: navClasses
208
+ }, attributes, {
209
+ options: {
210
+ suppressScrollX: !isRtl
211
+ }
212
+ }), /*#__PURE__*/React.createElement(Nav, null, children || this.navList(navConfig.items)));
246
213
  };
247
214
 
248
215
  return AppSidebarNav;
@@ -250,5 +217,4 @@ var AppSidebarNav = function (_Component) {
250
217
 
251
218
  AppSidebarNav.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
252
219
  AppSidebarNav.defaultProps = defaultProps;
253
-
254
220
  export default AppSidebarNav;