@bigbinary/neeto-molecules 1.0.77-beta → 1.0.78-beta

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.
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var neetoIcons = require('@bigbinary/neeto-icons');
5
4
  var neetoui = require('@bigbinary/neetoui');
6
5
  var ramda = require('ramda');
7
6
  var reactI18next = require('react-i18next');
8
7
  var reactRouterDom = require('react-router-dom');
9
8
  var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
9
+ var neetoIcons = require('@bigbinary/neeto-icons');
10
10
  var pure = require('@bigbinary/neeto-commons-frontend/pure');
11
11
  var AppIcons = require('@bigbinary/neeto-icons/app-icons');
12
12
  var i18next = require('i18next');
@@ -31743,7 +31743,18 @@ var AppSwitcher = function AppSwitcher(_ref) {
31743
31743
  })))));
31744
31744
  };
31745
31745
 
31746
- var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-z-index:99998}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100));border-right:1px solid rgb(var(--neeto-ui-gray-100));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{left:calc(100% + 4px);position:absolute;top:32px;z-index:99996;z-index:calc(var(--neeto-molecules-sidebar-z-index) - 2)}.neeto-molecules-sidebar__header{margin:12px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:20px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-gray-800));gap:10px;padding:8px 24px;position:relative;text-decoration:none!important;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__link:not(:first-child){margin-top:10px}.neeto-molecules-sidebar__link-icon{flex-shrink:0;transition:var(--neeto-ui-transition)}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;min-width:0;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-label{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{background-color:rgb(var(--neeto-ui-white));padding:4px 0}.neeto-molecules-sidebar__sublink{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-gray-700));cursor:pointer;padding:8px 24px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:not(:last-child){margin-bottom:4px}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-name{flex-grow:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));text-decoration:none}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile:focus,.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile:focus-visible,.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none;text-decoration:none}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:var(--neeto-ui-shadow-xs)!important}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}";
31746
+ var Chevron = function Chevron() {
31747
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
31748
+ height: "16",
31749
+ viewBox: "0 0 16 16",
31750
+ width: "16"
31751
+ }, /*#__PURE__*/React__default["default"].createElement("path", {
31752
+ d: "M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z",
31753
+ fill: "currentColor"
31754
+ }));
31755
+ };
31756
+
31757
+ var css = ":root{--neeto-molecules-sidebar-width:240px;--neeto-molecules-sidebar-z-index:99998}.neeto-molecules-sidebar__wrapper{display:flex;max-width:240px;max-width:var(--neeto-molecules-sidebar-width);position:relative;transition:all .15s;width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{transform:scale(-1)}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-gray-100));border-right:1px solid rgb(var(--neeto-ui-gray-100));height:100vh;padding:24px 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar__no-shrinkable{max-width:240px;max-width:var(--neeto-molecules-sidebar-width);width:240px;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar::-webkit-scrollbar{height:0;width:0}.neeto-molecules-sidebar::-webkit-scrollbar-thumb{background:rgb(var(--neeto-ui-gray-300));border-radius:50px}.neeto-molecules-sidebar::-webkit-scrollbar-track{background:\"transparent\"}.neeto-molecules-sidebar__toggler{left:calc(100% + 4px);position:absolute;top:32px;z-index:99996;z-index:calc(var(--neeto-molecules-sidebar-z-index) - 2)}.neeto-molecules-sidebar__header{margin:12px 0 28px;padding:0 24px}.neeto-molecules-sidebar__logo svg{height:20px;max-width:100%;width:auto}.neeto-molecules-sidebar__links{margin-bottom:40px}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-gray-800));gap:10px;padding:8px 24px;position:relative;text-decoration:none!important;transition:var(--neeto-ui-transition);width:100%}.neeto-molecules-sidebar__link:not(:first-child){margin-top:10px}.neeto-molecules-sidebar__link-icon{flex-shrink:0;transition:var(--neeto-ui-transition)}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--rotate{transform:scale(-1)}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{flex-grow:1;text-align:left}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-label{font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{background-color:rgb(var(--neeto-ui-white));padding:4px 0}.neeto-molecules-sidebar__sublink{background-color:rgb(var(--neeto-ui-white));color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:8px;padding:8px 24px 8px 58px;text-decoration:none;transition:all .3s}.neeto-molecules-sidebar__sublink:not(:last-child){margin-bottom:4px}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{opacity:.75}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-gray-800));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-gray-800));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-top:auto}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile-name{flex-grow:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));text-decoration:none}.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile:focus,.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile:focus-visible,.neeto-molecules-sidebar__footer .neeto-molecules-sidebar__profile[aria-expanded=true]{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black));outline:none;text-decoration:none}.sidebar-featured-tooltip__content{border-radius:8px!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:12px;width:150px}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:8px;height:40px;margin-bottom:8px;margin-left:auto;margin-right:auto;width:40px}.sidebar-featured-tooltip__title{margin-bottom:4px}.neeto-molecules-help-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;box-shadow:var(--neeto-ui-shadow-xs)!important}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-sublist{border-top:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding:4px 0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}";
31747
31758
  n(css,{});
31748
31759
 
31749
31760
  var AppSwitcherButton = function AppSwitcherButton(_ref) {
@@ -32160,15 +32171,6 @@ var Header = function Header() {
32160
32171
  };
32161
32172
  var Header$1 = /*#__PURE__*/React__default["default"].memo(Header);
32162
32173
 
32163
- var getMaxLabelLength = function getMaxLabelLength(_ref) {
32164
- var isSubItem = _ref.isSubItem,
32165
- hasSubItems = _ref.hasSubItems,
32166
- hasCount = _ref.hasCount;
32167
- if (hasCount) return 14;
32168
- if (isSubItem) return 20;
32169
- if (hasSubItems) return 16;
32170
- return 20;
32171
- };
32172
32174
  var isSubRouteActive = function isSubRouteActive(subRoute, location) {
32173
32175
  var currentBrowserUrl = new URL(location.pathname + location.search, window.location.origin);
32174
32176
  var targetUrl = new URL(subRoute, window.location.origin);
@@ -32181,30 +32183,6 @@ var isSubRouteActive = function isSubRouteActive(subRoute, location) {
32181
32183
  return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
32182
32184
  }, targetSearchKeys);
32183
32185
  };
32184
- var optimizeLabel = function optimizeLabel(_ref2) {
32185
- var _ref2$label = _ref2.label,
32186
- label = _ref2$label === void 0 ? "" : _ref2$label,
32187
- _ref2$hasSubItems = _ref2.hasSubItems,
32188
- hasSubItems = _ref2$hasSubItems === void 0 ? false : _ref2$hasSubItems,
32189
- _ref2$isSubItem = _ref2.isSubItem,
32190
- isSubItem = _ref2$isSubItem === void 0 ? false : _ref2$isSubItem,
32191
- _ref2$hasCount = _ref2.hasCount,
32192
- hasCount = _ref2$hasCount === void 0 ? false : _ref2$hasCount;
32193
- var maxLength = getMaxLabelLength({
32194
- isSubItem: isSubItem,
32195
- hasSubItems: hasSubItems,
32196
- hasCount: hasCount
32197
- });
32198
- if (label.length <= maxLength) return {
32199
- label: label,
32200
- isLabelPristine: true
32201
- };
32202
- var optimizedLabel = label.substring(0, maxLength).trim();
32203
- return {
32204
- label: "".concat(optimizedLabel, "..."),
32205
- isLabelPristine: false
32206
- };
32207
- };
32208
32186
 
32209
32187
  var _excluded = ["label", "to", "icon", "items"],
32210
32188
  _excluded2 = ["label", "to", "count"];
@@ -32213,6 +32191,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
32213
32191
  var Links = function Links(_ref) {
32214
32192
  var navLinks = _ref.navLinks;
32215
32193
  var location = reactRouterDom.useLocation();
32194
+ var _useState = React.useState(true),
32195
+ _useState2 = _slicedToArray(_useState, 2),
32196
+ isActiveLinkExpanded = _useState2[0],
32197
+ setIsActiveLinkExpanded = _useState2[1];
32216
32198
  var filterByPermissions = ramda.curry(function (_ref2) {
32217
32199
  var permissions = _ref2.permissions;
32218
32200
  if (permissions) {
@@ -32220,6 +32202,15 @@ var Links = function Links(_ref) {
32220
32202
  }
32221
32203
  return true;
32222
32204
  });
32205
+ var handleNavLinkClick = function handleNavLinkClick(event, isActive, items) {
32206
+ if (pure.isNotPresent(items)) return;
32207
+ if (isActive()) {
32208
+ setIsActiveLinkExpanded(ramda.not);
32209
+ event.preventDefault();
32210
+ return;
32211
+ }
32212
+ setIsActiveLinkExpanded(true);
32213
+ };
32223
32214
  return /*#__PURE__*/React__default["default"].createElement("div", {
32224
32215
  className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__no-shrinkable"
32225
32216
  }, navLinks.filter(filterByPermissions).map(function (_ref3, mainIndex) {
@@ -32233,67 +32224,52 @@ var Links = function Links(_ref) {
32233
32224
  var isActive = function isActive() {
32234
32225
  return ramda.is(Function, otherProps.isActive) ? otherProps.isActive() : location.pathname.startsWith(url.pathname);
32235
32226
  };
32236
- var _optimizeLabel = optimizeLabel({
32237
- label: label,
32238
- hasSubItems: pure.isPresent(items) && pure.isNotEmpty(items)
32239
- }),
32240
- optimizedLabel = _optimizeLabel.label,
32241
- isLabelPristine = _optimizeLabel.isLabelPristine;
32227
+ var isMenuExpanded = isActive() && isActiveLinkExpanded;
32242
32228
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
32243
32229
  key: mainIndex
32244
32230
  }, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends({
32245
32231
  activeClassName: "active",
32246
- className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link"
32232
+ className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-ui-select-none neeto-molecules-sidebar__link",
32233
+ onClick: function onClick(event) {
32234
+ return handleNavLinkClick(event, isActive, items);
32235
+ }
32247
32236
  }, _objectSpread({
32248
32237
  isActive: isActive,
32249
32238
  to: to
32250
32239
  }, otherProps)), icon && /*#__PURE__*/React__default["default"].createElement("span", {
32251
32240
  className: "neeto-molecules-sidebar__link-icon",
32252
32241
  "data-testid": label
32253
- }, /*#__PURE__*/React__default["default"].createElement(IconSVG, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, {
32254
- content: label,
32255
- disabled: isLabelPristine
32256
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
32242
+ }, /*#__PURE__*/React__default["default"].createElement(IconSVG, null)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
32257
32243
  className: "neeto-molecules-sidebar__link-label",
32258
32244
  component: "span",
32259
32245
  style: "body2",
32260
32246
  weight: "normal"
32261
- }, optimizedLabel)), items && /*#__PURE__*/React__default["default"].createElement("span", {
32247
+ }, label), items && /*#__PURE__*/React__default["default"].createElement("span", {
32262
32248
  className: classnames("neeto-molecules-sidebar__link-icon", {
32263
- "neeto-molecules-sidebar__link-icon--rotate": isActive()
32249
+ "neeto-molecules-sidebar__link-icon--rotate": isMenuExpanded
32264
32250
  })
32265
32251
  }, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Down, {
32266
32252
  size: 16
32267
- }))), items && isActive() && /*#__PURE__*/React__default["default"].createElement("div", {
32253
+ }))), items && isMenuExpanded && /*#__PURE__*/React__default["default"].createElement("div", {
32268
32254
  className: "neeto-molecules-sidebar__sublink-wrapper"
32269
32255
  }, items.filter(filterByPermissions).map(function (_ref4, subIndex) {
32270
32256
  var subLabel = _ref4.label,
32271
32257
  subRoute = _ref4.to,
32272
32258
  count = _ref4.count,
32273
32259
  otherProps = _objectWithoutProperties(_ref4, _excluded2);
32274
- var _optimizeLabel2 = optimizeLabel({
32275
- label: subLabel,
32276
- isSubItem: true,
32277
- hasCount: pure.isPresent(count)
32278
- }),
32279
- optimizedLabel = _optimizeLabel2.label,
32280
- isSubLabelPristine = _optimizeLabel2.isLabelPristine;
32281
32260
  return /*#__PURE__*/React__default["default"].createElement(reactRouterDom.NavLink, _extends({
32282
32261
  activeClassName: "active",
32283
32262
  className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
32284
- key: subIndex,
32285
- to: subRoute,
32286
32263
  isActive: function isActive() {
32287
32264
  return isSubRouteActive(subRoute, location);
32288
- }
32289
- }, otherProps), /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, {
32290
- content: subLabel,
32291
- disabled: isSubLabelPristine
32292
- }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
32265
+ },
32266
+ key: subIndex,
32267
+ to: subRoute
32268
+ }, otherProps), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
32293
32269
  className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
32294
32270
  component: "span",
32295
32271
  style: "body2"
32296
- }, optimizedLabel)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
32272
+ }, subLabel), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
32297
32273
  className: "neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0",
32298
32274
  component: "span",
32299
32275
  style: "body2"
@@ -32347,7 +32323,7 @@ var Sidebar = function Sidebar(_ref) {
32347
32323
  }
32348
32324
  })), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
32349
32325
  className: "neeto-molecules-sidebar__toggler",
32350
- icon: isSidebarCollapsed ? neetoIcons.SidebarOpen : neetoIcons.SidebarClose,
32326
+ icon: Chevron,
32351
32327
  style: "text",
32352
32328
  tooltipProps: {
32353
32329
  content: isSidebarCollapsed ? t("neetoMolecules.sidebar.showMenu") : t("neetoMolecules.sidebar.hideMenu"),