@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
package/es/Footer.js CHANGED
@@ -1,67 +1,60 @@
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
- var propTypes = {
12
+ var propTypes = process.env.NODE_ENV !== "production" ? {
16
13
  children: PropTypes.node,
17
14
  className: PropTypes.string,
18
15
  fixed: PropTypes.bool,
19
16
  tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
20
- };
21
-
17
+ } : {};
22
18
  var defaultProps = {
23
19
  tag: 'footer',
24
20
  fixed: false
25
21
  };
26
22
 
27
- var AppFooter = function (_Component) {
28
- _inherits(AppFooter, _Component);
23
+ var AppFooter = /*#__PURE__*/function (_Component) {
24
+ _inheritsLoose(AppFooter, _Component);
29
25
 
30
26
  function AppFooter(props) {
31
- _classCallCheck(this, AppFooter);
32
-
33
- var _this = _possibleConstructorReturn(this, _Component.call(this, props));
27
+ var _this;
34
28
 
35
- _this.isFixed = _this.isFixed.bind(_this);
29
+ _this = _Component.call(this, props) || this;
30
+ _this.isFixed = _this.isFixed.bind(_assertThisInitialized(_this));
36
31
  return _this;
37
32
  }
38
33
 
39
- AppFooter.prototype.componentDidMount = function componentDidMount() {
34
+ var _proto = AppFooter.prototype;
35
+
36
+ _proto.componentDidMount = function componentDidMount() {
40
37
  this.isFixed(this.props.fixed);
41
38
  };
42
39
 
43
- AppFooter.prototype.isFixed = function isFixed(fixed) {
40
+ _proto.isFixed = function isFixed(fixed) {
44
41
  if (fixed) {
45
42
  document.body.classList.add('footer-fixed');
46
43
  }
47
44
  };
48
45
 
49
- AppFooter.prototype.render = function render() {
50
- var _props = this.props,
51
- className = _props.className,
52
- children = _props.children,
53
- Tag = _props.tag,
54
- attributes = _objectWithoutProperties(_props, ['className', 'children', 'tag']);
46
+ _proto.render = function render() {
47
+ var _this$props = this.props,
48
+ className = _this$props.className,
49
+ children = _this$props.children,
50
+ Tag = _this$props.tag,
51
+ attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "children", "tag"]);
55
52
 
56
53
  delete attributes.fixed;
57
-
58
54
  var classes = classNames(className, 'app-footer');
59
-
60
- return React.createElement(
61
- Tag,
62
- _extends({ className: classes }, attributes),
63
- children
64
- );
55
+ return /*#__PURE__*/React.createElement(Tag, _extends({
56
+ className: classes
57
+ }, attributes), children);
65
58
  };
66
59
 
67
60
  return AppFooter;
@@ -69,5 +62,4 @@ var AppFooter = function (_Component) {
69
62
 
70
63
  AppFooter.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
71
64
  AppFooter.defaultProps = defaultProps;
72
-
73
65
  export default AppFooter;
package/es/Header.js CHANGED
@@ -1,68 +1,57 @@
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"); } }
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; }
5
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
10
6
 
11
7
  import React, { Component } from 'react';
12
8
  import PropTypes from 'prop-types';
13
9
  import classNames from 'classnames';
14
-
15
- var propTypes = {
10
+ var propTypes = process.env.NODE_ENV !== "production" ? {
16
11
  children: PropTypes.node,
17
12
  className: PropTypes.string,
18
13
  fixed: PropTypes.bool,
19
14
  tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
20
- };
21
-
15
+ } : {};
22
16
  var defaultProps = {
23
17
  tag: 'header',
24
18
  fixed: false
25
19
  };
26
20
 
27
- var AppHeader = function (_Component) {
28
- _inherits(AppHeader, _Component);
21
+ var AppHeader = /*#__PURE__*/function (_Component) {
22
+ _inheritsLoose(AppHeader, _Component);
29
23
 
30
24
  function AppHeader() {
31
- _classCallCheck(this, AppHeader);
32
-
33
- return _possibleConstructorReturn(this, _Component.apply(this, arguments));
25
+ return _Component.apply(this, arguments) || this;
34
26
  }
35
27
 
36
- AppHeader.prototype.componentDidMount = function componentDidMount() {
28
+ var _proto = AppHeader.prototype;
29
+
30
+ _proto.componentDidMount = function componentDidMount() {
37
31
  this.isFixed(this.props.fixed);
38
32
  };
39
33
 
40
- AppHeader.prototype.isFixed = function isFixed(fixed) {
34
+ _proto.isFixed = function isFixed(fixed) {
41
35
  if (fixed) {
42
36
  document.body.classList.add('header-fixed');
43
37
  }
44
- };
45
-
46
- // breakpoint(breakpoint) {
38
+ } // breakpoint(breakpoint) {
47
39
  // return breakpoint || '';
48
40
  // }
41
+ ;
49
42
 
50
- AppHeader.prototype.render = function render() {
51
- var _props = this.props,
52
- className = _props.className,
53
- children = _props.children,
54
- Tag = _props.tag,
55
- attributes = _objectWithoutProperties(_props, ['className', 'children', 'tag']);
43
+ _proto.render = function render() {
44
+ var _this$props = this.props,
45
+ className = _this$props.className,
46
+ children = _this$props.children,
47
+ Tag = _this$props.tag,
48
+ attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "children", "tag"]);
56
49
 
57
50
  delete attributes.fixed;
58
-
59
51
  var classes = classNames(className, 'app-header', 'navbar');
60
-
61
- return React.createElement(
62
- Tag,
63
- _extends({ className: classes }, attributes),
64
- children
65
- );
52
+ return /*#__PURE__*/React.createElement(Tag, _extends({
53
+ className: classes
54
+ }, attributes), children);
66
55
  };
67
56
 
68
57
  return AppHeader;
@@ -70,5 +59,4 @@ var AppHeader = function (_Component) {
70
59
 
71
60
  AppHeader.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
72
61
  AppHeader.defaultProps = defaultProps;
73
-
74
62
  export default AppHeader;
@@ -1,57 +1,54 @@
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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
4
4
 
5
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
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 _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); }
10
8
 
11
9
  import React, { Component } from 'react';
12
10
  import { Dropdown } from 'reactstrap';
13
11
  import PropTypes from 'prop-types';
14
-
15
- var propTypes = _extends({
12
+ var propTypes = process.env.NODE_ENV !== "production" ? _extends({
16
13
  children: PropTypes.node,
17
14
  direction: PropTypes.string
18
- }, Dropdown.propTypes);
19
-
15
+ }, Dropdown.propTypes) : {};
20
16
  var defaultProps = {
21
17
  direction: 'down'
22
18
  };
23
19
 
24
- var AppHeaderDropdown = function (_Component) {
25
- _inherits(AppHeaderDropdown, _Component);
20
+ var AppHeaderDropdown = /*#__PURE__*/function (_Component) {
21
+ _inheritsLoose(AppHeaderDropdown, _Component);
26
22
 
27
23
  function AppHeaderDropdown(props) {
28
- _classCallCheck(this, AppHeaderDropdown);
24
+ var _this;
29
25
 
30
- var _this = _possibleConstructorReturn(this, _Component.call(this, props));
31
-
32
- _this.toggle = _this.toggle.bind(_this);
26
+ _this = _Component.call(this, props) || this;
27
+ _this.toggle = _this.toggle.bind(_assertThisInitialized(_this));
33
28
  _this.state = {
34
29
  dropdownOpen: false
35
30
  };
36
31
  return _this;
37
32
  }
38
33
 
39
- AppHeaderDropdown.prototype.toggle = function toggle() {
34
+ var _proto = AppHeaderDropdown.prototype;
35
+
36
+ _proto.toggle = function toggle() {
40
37
  this.setState({
41
38
  dropdownOpen: !this.state.dropdownOpen
42
39
  });
43
40
  };
44
41
 
45
- AppHeaderDropdown.prototype.render = function render() {
46
- var _props = this.props,
47
- children = _props.children,
48
- attributes = _objectWithoutProperties(_props, ['children']);
42
+ _proto.render = function render() {
43
+ var _this$props = this.props,
44
+ children = _this$props.children,
45
+ attributes = _objectWithoutPropertiesLoose(_this$props, ["children"]);
49
46
 
50
- return React.createElement(
51
- Dropdown,
52
- _extends({ nav: true, isOpen: this.state.dropdownOpen, toggle: this.toggle }, attributes),
53
- children
54
- );
47
+ return /*#__PURE__*/React.createElement(Dropdown, _extends({
48
+ nav: true,
49
+ isOpen: this.state.dropdownOpen,
50
+ toggle: this.toggle
51
+ }, attributes), children);
55
52
  };
56
53
 
57
54
  return AppHeaderDropdown;
@@ -59,5 +56,4 @@ var AppHeaderDropdown = function (_Component) {
59
56
 
60
57
  AppHeaderDropdown.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
61
58
  AppHeaderDropdown.defaultProps = defaultProps;
62
-
63
59
  export default AppHeaderDropdown;
package/es/NavbarBrand.js CHANGED
@@ -1,57 +1,51 @@
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"); } }
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; }
5
+ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
10
6
 
11
7
  import React, { Component } from 'react';
12
8
  import PropTypes from 'prop-types';
13
9
  import classNames from 'classnames';
14
-
15
- var propTypes = {
10
+ var propTypes = process.env.NODE_ENV !== "production" ? {
16
11
  tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
17
12
  children: PropTypes.node,
18
13
  className: PropTypes.string,
19
14
  brand: PropTypes.any,
20
15
  full: PropTypes.any,
21
16
  minimized: PropTypes.any
22
- };
23
-
17
+ } : {};
24
18
  var defaultProps = {
25
19
  tag: 'a'
26
20
  };
27
21
 
28
- var AppNavbarBrand = function (_Component) {
29
- _inherits(AppNavbarBrand, _Component);
22
+ var AppNavbarBrand = /*#__PURE__*/function (_Component) {
23
+ _inheritsLoose(AppNavbarBrand, _Component);
30
24
 
31
25
  function AppNavbarBrand() {
32
- _classCallCheck(this, AppNavbarBrand);
33
-
34
- return _possibleConstructorReturn(this, _Component.apply(this, arguments));
26
+ return _Component.apply(this, arguments) || this;
35
27
  }
36
28
 
37
- AppNavbarBrand.prototype.imgSrc = function imgSrc(brand) {
29
+ var _proto = AppNavbarBrand.prototype;
30
+
31
+ _proto.imgSrc = function imgSrc(brand) {
38
32
  return brand.src ? brand.src : '';
39
33
  };
40
34
 
41
- AppNavbarBrand.prototype.imgWidth = function imgWidth(brand) {
35
+ _proto.imgWidth = function imgWidth(brand) {
42
36
  return brand.width ? brand.width : 'auto';
43
37
  };
44
38
 
45
- AppNavbarBrand.prototype.imgHeight = function imgHeight(brand) {
39
+ _proto.imgHeight = function imgHeight(brand) {
46
40
  return brand.height ? brand.height : 'auto';
47
41
  };
48
42
 
49
- AppNavbarBrand.prototype.imgAlt = function imgAlt(brand) {
43
+ _proto.imgAlt = function imgAlt(brand) {
50
44
  return brand.alt ? brand.alt : '';
51
45
  };
52
46
 
53
- AppNavbarBrand.prototype.navbarBrandImg = function navbarBrandImg(props, classBrand, key) {
54
- return React.createElement('img', {
47
+ _proto.navbarBrandImg = function navbarBrandImg(props, classBrand, key) {
48
+ return /*#__PURE__*/React.createElement("img", {
55
49
  src: this.imgSrc(props),
56
50
  width: this.imgWidth(props),
57
51
  height: this.imgHeight(props),
@@ -61,37 +55,37 @@ var AppNavbarBrand = function (_Component) {
61
55
  });
62
56
  };
63
57
 
64
- AppNavbarBrand.prototype.render = function render() {
65
- var _props = this.props,
66
- className = _props.className,
67
- children = _props.children,
68
- Tag = _props.tag,
69
- attributes = _objectWithoutProperties(_props, ['className', 'children', 'tag']);
58
+ _proto.render = function render() {
59
+ var _this$props = this.props,
60
+ className = _this$props.className,
61
+ children = _this$props.children,
62
+ Tag = _this$props.tag,
63
+ attributes = _objectWithoutPropertiesLoose(_this$props, ["className", "children", "tag"]);
70
64
 
71
65
  var classes = classNames(className, 'navbar-brand');
72
-
73
66
  var img = [];
67
+
74
68
  if (this.props.brand) {
75
69
  var props = this.props.brand;
76
70
  var classBrand = 'navbar-brand';
77
71
  img.push(this.navbarBrandImg(props, classBrand, img.length + 1));
78
72
  }
73
+
79
74
  if (this.props.full) {
80
- var _props2 = this.props.full;
75
+ var _props = this.props.full;
81
76
  var _classBrand = 'navbar-brand-full';
82
- img.push(this.navbarBrandImg(_props2, _classBrand, img.length + 1));
77
+ img.push(this.navbarBrandImg(_props, _classBrand, img.length + 1));
83
78
  }
79
+
84
80
  if (this.props.minimized) {
85
- var _props3 = this.props.minimized;
81
+ var _props2 = this.props.minimized;
86
82
  var _classBrand2 = 'navbar-brand-minimized';
87
- img.push(this.navbarBrandImg(_props3, _classBrand2, img.length + 1));
83
+ img.push(this.navbarBrandImg(_props2, _classBrand2, img.length + 1));
88
84
  }
89
85
 
90
- return React.createElement(
91
- Tag,
92
- _extends({}, attributes, { className: classes }),
93
- children || img
94
- );
86
+ return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {
87
+ className: classes
88
+ }), children || img);
95
89
  };
96
90
 
97
91
  return AppNavbarBrand;
@@ -99,5 +93,4 @@ var AppNavbarBrand = function (_Component) {
99
93
 
100
94
  AppNavbarBrand.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
101
95
  AppNavbarBrand.defaultProps = defaultProps;
102
-
103
96
  export default AppNavbarBrand;
@@ -1,9 +1,6 @@
1
1
  export var sidebarCssClasses = ['sidebar-show', 'sidebar-sm-show', 'sidebar-md-show', 'sidebar-lg-show', 'sidebar-xl-show'];
2
-
3
2
  export var asideMenuCssClasses = ['aside-menu-show', 'aside-menu-sm-show', 'aside-menu-md-show', 'aside-menu-lg-show', 'aside-menu-xl-show'];
4
-
5
3
  export var validBreakpoints = ['sm', 'md', 'lg', 'xl'];
6
-
7
4
  export function checkBreakpoint(breakpoint, list) {
8
5
  return list.indexOf(breakpoint) > -1;
9
6
  }
@@ -2,6 +2,7 @@
2
2
  if (!ElementProto) {
3
3
  return;
4
4
  }
5
+
5
6
  if (typeof ElementProto.matches !== 'function') {
6
7
  ElementProto.matches = ElementProto.msMatchesSelector || ElementProto.mozMatchesSelector || ElementProto.webkitMatchesSelector || function matches(selector) {
7
8
  var element = this;
@@ -24,6 +25,7 @@
24
25
  if (element.matches(selector)) {
25
26
  return element;
26
27
  }
28
+
27
29
  element = element.parentNode;
28
30
  }
29
31
 
@@ -1,3 +1,2 @@
1
1
  import { sidebarCssClasses, asideMenuCssClasses, validBreakpoints, checkBreakpoint } from './classes';
2
-
3
2
  export { sidebarCssClasses, asideMenuCssClasses, validBreakpoints, checkBreakpoint };
@@ -1,17 +1,14 @@
1
- var _class, _temp;
1
+ 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; }
2
2
 
3
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
-
5
- var LayoutHelper = (_temp = _class = function () {
6
- function LayoutHelper() {
7
- _classCallCheck(this, LayoutHelper);
8
- }
3
+ var LayoutHelper = /*#__PURE__*/function () {
4
+ function LayoutHelper() {}
9
5
 
10
6
  LayoutHelper.sidebarToggle = function sidebarToggle(toggle) {
11
7
  var minimize = arguments.length ? toggle : !this.elClassList.contains('sidebar-minimized');
12
8
  this.sidebarMinimize(minimize);
13
9
  this.brandMinimize(minimize);
14
- this.sidebarPSToggle(!minimize); /*remove PS on sidebar minimized*/
10
+ this.sidebarPSToggle(!minimize);
11
+ /*remove PS on sidebar minimized*/
15
12
  };
16
13
 
17
14
  LayoutHelper.sidebarMinimize = function sidebarMinimize(force) {
@@ -20,13 +17,10 @@ var LayoutHelper = (_temp = _class = function () {
20
17
 
21
18
  LayoutHelper.brandMinimize = function brandMinimize(force) {
22
19
  this.toggleClass('brand-minimized', force);
23
- };
24
-
25
- // sidebar perfect scrollbar ugly hack
26
-
20
+ } // sidebar perfect scrollbar ugly hack
21
+ ;
27
22
 
28
23
  LayoutHelper.sidebarPSToggle = function sidebarPSToggle(toggle) {
29
-
30
24
  if (this.isOnMobile()) {
31
25
  toggle = true;
32
26
  } else {
@@ -34,18 +28,25 @@ var LayoutHelper = (_temp = _class = function () {
34
28
  toggle = !isSidebarMinimized;
35
29
  }
36
30
 
37
- var ps = { y: { rail: {}, thumb: {} } };
31
+ var ps = {
32
+ y: {
33
+ rail: {},
34
+ thumb: {}
35
+ }
36
+ };
38
37
  var isRtl = getComputedStyle(document.documentElement).direction === 'rtl';
39
38
  var sidebar = document.querySelector('.sidebar-nav');
40
39
  ps.y.rail.on = document.querySelector('.sidebar-nav .ps__rail-y');
41
40
  ps.y.rail.off = document.querySelector('.sidebar-nav .ps__rail-y-off');
42
41
  ps.y.thumb.on = document.querySelector('.sidebar-nav .ps__thumb-y');
43
42
  ps.y.thumb.off = document.querySelector('.sidebar-nav .ps__thumb-y-off');
43
+
44
44
  if (sidebar) {
45
45
  if (toggle) {
46
46
  sidebar.classList.add('ps');
47
47
  sidebar.classList.add('ps-container');
48
48
  sidebar.classList.add('ps--active-y');
49
+
49
50
  if (ps.y.rail.off) {
50
51
  ps.y.rail.off.classList.add('ps__rail-y');
51
52
  ps.y.rail.off.removeAttribute('style');
@@ -53,6 +54,7 @@ var LayoutHelper = (_temp = _class = function () {
53
54
  ps.y.rail.off.style.right = isRtl ? 'unset' : '0px';
54
55
  ps.y.rail.off.classList.remove('ps__rail-y-off');
55
56
  }
57
+
56
58
  if (ps.y.thumb.off) {
57
59
  ps.y.thumb.off.removeAttribute('style');
58
60
  ps.y.thumb.off.classList.add('ps__thumb-y');
@@ -64,11 +66,13 @@ var LayoutHelper = (_temp = _class = function () {
64
66
  ps.y.rail.on.removeAttribute('style');
65
67
  ps.y.rail.on.classList.remove('ps__rail-y');
66
68
  }
69
+
67
70
  if (ps.y.thumb.on) {
68
71
  ps.y.thumb.on.classList.add('ps__thumb-y-off');
69
72
  ps.y.thumb.on.removeAttribute('style');
70
73
  ps.y.thumb.on.classList.remove('ps__thumb-y');
71
74
  }
75
+
72
76
  sidebar.classList.remove('ps');
73
77
  sidebar.classList.remove('ps-container');
74
78
  sidebar.classList.remove('ps--active-y');
@@ -77,7 +81,6 @@ var LayoutHelper = (_temp = _class = function () {
77
81
  };
78
82
 
79
83
  LayoutHelper.toggleClass = function toggleClass(className, force) {
80
-
81
84
  if (force === true) {
82
85
  this.elClassList.add(className);
83
86
  } else if (force === false) {
@@ -85,13 +88,16 @@ var LayoutHelper = (_temp = _class = function () {
85
88
  } else {
86
89
  this.elClassList.toggle(className);
87
90
  }
91
+
88
92
  return this.elClassList.contains(className);
89
93
  };
90
94
 
91
95
  LayoutHelper.isOnMobile = function isOnMobile() {
92
96
  var onMobile = false;
97
+
93
98
  try {
94
99
  var minimizerElement = document.querySelector('.sidebar-minimizer');
100
+
95
101
  if (minimizerElement) {
96
102
  onMobile = getComputedStyle(minimizerElement).getPropertyValue('display') === 'none';
97
103
  } else {
@@ -102,11 +108,13 @@ var LayoutHelper = (_temp = _class = function () {
102
108
  // eslint-disable-next-line
103
109
  console.warn('CoreUI isOnMobile failed to getComputedStyle', ignore);
104
110
  }
111
+
105
112
  return onMobile;
106
113
  };
107
114
 
108
115
  return LayoutHelper;
109
- }(), _class.elClassList = document.body.classList, _temp);
116
+ }();
110
117
 
118
+ _defineProperty(LayoutHelper, "elClassList", document.body.classList);
111
119
 
112
120
  export default LayoutHelper;
@@ -4,6 +4,7 @@ export default function toggleClasses(toggleClass, classList, force) {
4
4
  removeClassList.map(function (className) {
5
5
  return document.body.classList.remove(className);
6
6
  });
7
+
7
8
  if (force === true) {
8
9
  document.body.classList.add(toggleClass);
9
10
  } else if (force === false) {
@@ -11,5 +12,6 @@ export default function toggleClasses(toggleClass, classList, force) {
11
12
  } else {
12
13
  document.body.classList.toggle(toggleClass);
13
14
  }
15
+
14
16
  return document.body.classList.contains(toggleClass);
15
17
  }