labsense-ui-kit 1.3.77 → 1.3.79
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.
- package/dist/index.js +92 -66
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +92 -66
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -10806,59 +10806,58 @@ var Overlay = styled.div(_templateObject$n || (_templateObject$n = _taggedTempla
|
|
|
10806
10806
|
var $isOpen = _ref2.$isOpen;
|
|
10807
10807
|
return $isOpen ? 'visible' : 'hidden';
|
|
10808
10808
|
});
|
|
10809
|
-
var HamburgerButton = styled.button(_templateObject2$j || (_templateObject2$j = _taggedTemplateLiteralLoose(["\n display: none;\n \n @media (max-width: ", ") {\n display: flex;\n
|
|
10809
|
+
var HamburgerButton = styled.button(_templateObject2$j || (_templateObject2$j = _taggedTemplateLiteralLoose(["\n display: none;\n \n @media (max-width: ", ") {\n display: flex;\n width: max-content;\n border: none;\n padding: 8px;\n cursor: pointer;\n align-items: center;\n justify-content: center;\n // box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n transition: transform 0.2s ease;\n\n &:active {\n transform: scale(0.95);\n }\n }\n"])), MOBILE_BREAKPOINT);
|
|
10810
|
+
var SidebarContainer = styled.div(_templateObject3$c || (_templateObject3$c = _taggedTemplateLiteralLoose(["\n width: 68px;\n max-width: 68px;\n height: 100vh;\n background: ", ";\n transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n display: flex;\n flex-direction: column;\n align-items: start;\n padding: 20px;\n position: fixed;\n left: 0;\n top: 0;\n overflow: hidden;\n z-index: 998;\n justify-content: space-between;\n gap: 24px;\n\n /* Expand on hover */\n &:hover {\n width: max-content;\n max-width: 400px;\n\n /* You can also add a class for children */\n span, .expandable {\n opacity: 1;\n visibility: visible;\n transform: translateX(0);\n }\n }\n\n /* Mobile styles */\n @media (max-width: ", ") {\n transform: translateX(", ");\n transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n width: 280px;\n max-width: 280px;\n box-shadow: ", ";\n\n /* Always show text on mobile when open */\n span, .expandable {\n opacity: ", ";\n visibility: ", ";\n transform: translateX(0);\n }\n\n /* Disable hover expansion on mobile */\n &:hover {\n width: 280px;\n max-width: 280px;\n }\n }\n"])), function (_ref3) {
|
|
10810
10811
|
var $background = _ref3.$background,
|
|
10811
10812
|
theme = _ref3.theme;
|
|
10812
10813
|
return $background || theme.vms.accent.softBlue;
|
|
10813
|
-
})
|
|
10814
|
-
var
|
|
10815
|
-
var $background = _ref4.$background,
|
|
10816
|
-
theme = _ref4.theme;
|
|
10817
|
-
return $background || theme.vms.accent.softBlue;
|
|
10818
|
-
}, MOBILE_BREAKPOINT, function (_ref5) {
|
|
10819
|
-
var $isMobileOpen = _ref5.$isMobileOpen;
|
|
10814
|
+
}, MOBILE_BREAKPOINT, function (_ref4) {
|
|
10815
|
+
var $isMobileOpen = _ref4.$isMobileOpen;
|
|
10820
10816
|
return $isMobileOpen ? '0' : '-100%';
|
|
10817
|
+
}, function (_ref5) {
|
|
10818
|
+
var $isMobileOpen = _ref5.$isMobileOpen;
|
|
10819
|
+
return $isMobileOpen ? '2px 0 8px rgba(0, 0, 0, 0.15)' : 'none';
|
|
10821
10820
|
}, function (_ref6) {
|
|
10822
10821
|
var $isMobileOpen = _ref6.$isMobileOpen;
|
|
10823
|
-
return $isMobileOpen ?
|
|
10822
|
+
return $isMobileOpen ? 1 : 0;
|
|
10824
10823
|
}, function (_ref7) {
|
|
10825
10824
|
var $isMobileOpen = _ref7.$isMobileOpen;
|
|
10826
|
-
return $isMobileOpen ? 1 : 0;
|
|
10827
|
-
}, function (_ref8) {
|
|
10828
|
-
var $isMobileOpen = _ref8.$isMobileOpen;
|
|
10829
10825
|
return $isMobileOpen ? 'visible' : 'hidden';
|
|
10830
10826
|
});
|
|
10831
|
-
var SidebarLink = styled(NavLink)(_templateObject4$9 || (_templateObject4$9 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n height: 28px;\n width: 100%;\n gap: 10px;\n cursor: pointer;\n border-radius: 4px;\n text-decoration: none;\n transition: none;\n padding: ", ";\n color: ", ";\n\n /* Hover state */\n &:hover {\n color: ", ";\n background: ", ";\n \n /* Make icons white on hover */\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n\n /* Active link state */\n &.active {\n color: ", ";\n background: ", ";\n \n /* Make icons white when active */\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n"])), function (
|
|
10832
|
-
var $padding =
|
|
10827
|
+
var SidebarLink = styled(NavLink)(_templateObject4$9 || (_templateObject4$9 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n height: 28px;\n width: 100%;\n gap: 10px;\n cursor: pointer;\n border-radius: 4px;\n text-decoration: none;\n transition: none;\n padding: ", ";\n color: ", ";\n\n /* Hover state */\n &:hover {\n color: ", ";\n background: ", ";\n \n /* Make icons white on hover */\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n\n /* Active link state */\n &.active {\n color: ", ";\n background: ", ";\n \n /* Make icons white when active */\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n"])), function (_ref8) {
|
|
10828
|
+
var $padding = _ref8.$padding;
|
|
10833
10829
|
return $padding;
|
|
10830
|
+
}, function (_ref9) {
|
|
10831
|
+
var theme = _ref9.theme;
|
|
10832
|
+
return theme.vms.text.medium;
|
|
10834
10833
|
}, function (_ref10) {
|
|
10835
10834
|
var theme = _ref10.theme;
|
|
10836
|
-
return theme.vms.text.
|
|
10835
|
+
return theme.vms.text.white;
|
|
10837
10836
|
}, function (_ref11) {
|
|
10838
10837
|
var theme = _ref11.theme;
|
|
10839
|
-
return theme.vms.
|
|
10838
|
+
return theme.vms["default"].primary;
|
|
10840
10839
|
}, function (_ref12) {
|
|
10841
10840
|
var theme = _ref12.theme;
|
|
10842
|
-
return theme.vms
|
|
10841
|
+
return theme.vms.text.white;
|
|
10843
10842
|
}, function (_ref13) {
|
|
10844
10843
|
var theme = _ref13.theme;
|
|
10845
10844
|
return theme.vms.text.white;
|
|
10846
10845
|
}, function (_ref14) {
|
|
10847
10846
|
var theme = _ref14.theme;
|
|
10848
|
-
return theme.vms.
|
|
10847
|
+
return theme.vms["default"].primary;
|
|
10849
10848
|
}, function (_ref15) {
|
|
10850
10849
|
var theme = _ref15.theme;
|
|
10851
|
-
return theme.vms["default"].primary;
|
|
10852
|
-
}, function (_ref16) {
|
|
10853
|
-
var theme = _ref16.theme;
|
|
10854
10850
|
return theme.vms.text.white;
|
|
10855
10851
|
});
|
|
10856
|
-
var IconWrapper$2 = styled.div(_templateObject5$8 || (_templateObject5$8 = _taggedTemplateLiteralLoose(["\n background: ", ";\n transition: none;\n padding: 4px;\n border-radius: 4px;\n width: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (
|
|
10857
|
-
var $selected =
|
|
10858
|
-
theme =
|
|
10852
|
+
var IconWrapper$2 = styled.div(_templateObject5$8 || (_templateObject5$8 = _taggedTemplateLiteralLoose(["\n background: ", ";\n transition: none;\n padding: 4px;\n border-radius: 4px;\n width: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_ref16) {
|
|
10853
|
+
var $selected = _ref16.$selected,
|
|
10854
|
+
theme = _ref16.theme;
|
|
10859
10855
|
return $selected ? theme.vms["default"].primary : theme.vms["default"].tertiary;
|
|
10860
10856
|
});
|
|
10861
|
-
var StyledContainer = styled(Container)(_templateObject6$8 || (_templateObject6$8 = _taggedTemplateLiteralLoose(["\n transition: none;\n\n svg {\n transition: none;\n }\n\n /* Parent hover / active */\n &:hover,\n &.active {\n svg {\n color: ", " !important;\n }\n }\n\n /* 2nd child reacts ONLY when parent is hovered */\n &:hover > div:nth-child(2) {\n svg {\n color: ", " !important;\n\n path {\n stroke: ", " !important;\n }\n }\n }\n\n /* Default state for 2nd child */\n > div:nth-child(2) {\n svg {\n color: ", " !important;\n\n path {\n stroke: ", " !important;\n }\n }\n }\n"])), function (
|
|
10857
|
+
var StyledContainer = styled(Container)(_templateObject6$8 || (_templateObject6$8 = _taggedTemplateLiteralLoose(["\n transition: none;\n\n svg {\n transition: none;\n }\n\n /* Parent hover / active */\n &:hover,\n &.active {\n svg {\n color: ", " !important;\n }\n }\n\n /* 2nd child reacts ONLY when parent is hovered */\n &:hover > div:nth-child(2) {\n svg {\n color: ", " !important;\n\n path {\n stroke: ", " !important;\n }\n }\n }\n\n /* Default state for 2nd child */\n > div:nth-child(2) {\n svg {\n color: ", " !important;\n\n path {\n stroke: ", " !important;\n }\n }\n }\n"])), function (_ref17) {
|
|
10858
|
+
var theme = _ref17.theme;
|
|
10859
|
+
return theme.vms.text.white;
|
|
10860
|
+
}, function (_ref18) {
|
|
10862
10861
|
var theme = _ref18.theme;
|
|
10863
10862
|
return theme.vms.text.white;
|
|
10864
10863
|
}, function (_ref19) {
|
|
@@ -10869,34 +10868,31 @@ var StyledContainer = styled(Container)(_templateObject6$8 || (_templateObject6$
|
|
|
10869
10868
|
return theme.vms.text.white;
|
|
10870
10869
|
}, function (_ref21) {
|
|
10871
10870
|
var theme = _ref21.theme;
|
|
10872
|
-
return theme.vms.text.white;
|
|
10873
|
-
}, function (_ref22) {
|
|
10874
|
-
var theme = _ref22.theme;
|
|
10875
10871
|
return theme.vms.text.medium;
|
|
10876
10872
|
});
|
|
10877
|
-
var Logo = styled
|
|
10878
|
-
var TextContainer = styled.span(_templateObject8$5 || (_templateObject8$5 = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n opacity: 0;\n visibility: hidden;\n transform: translateX(-10px);\n transition: all 0.3s ease;\n padding: ", ";\n font-size: ", ";\n font-weight: ", ";\n\n ", ":hover & {\n opacity: 1;\n visibility: visible;\n transform: translateX(0);\n }\n\n /* Mobile: Always visible when sidebar is open */\n @media (max-width: ", ") {\n opacity: 1;\n visibility: visible;\n transform: translateX(0);\n }\n"])), function (
|
|
10879
|
-
var $padding =
|
|
10873
|
+
var Logo = styled(Container)(_templateObject7$6 || (_templateObject7$6 = _taggedTemplateLiteralLoose(["\n transition: none;\n display: flex;\n width: 100%;\n min-width: max-content;\n align-items: center;\n justify-content: center;\n gap: 10px;\n"])));
|
|
10874
|
+
var TextContainer = styled.span(_templateObject8$5 || (_templateObject8$5 = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n opacity: 0;\n visibility: hidden;\n transform: translateX(-10px);\n transition: all 0.3s ease;\n padding: ", ";\n font-size: ", ";\n font-weight: ", ";\n\n ", ":hover & {\n opacity: 1;\n visibility: visible;\n transform: translateX(0);\n }\n\n /* Mobile: Always visible when sidebar is open */\n @media (max-width: ", ") {\n opacity: 1;\n visibility: visible;\n transform: translateX(0);\n }\n"])), function (_ref22) {
|
|
10875
|
+
var $padding = _ref22.$padding;
|
|
10880
10876
|
return $padding;
|
|
10881
|
-
}, function (
|
|
10882
|
-
var $fontSize =
|
|
10877
|
+
}, function (_ref23) {
|
|
10878
|
+
var $fontSize = _ref23.$fontSize;
|
|
10883
10879
|
return $fontSize || '20px';
|
|
10884
|
-
}, function (
|
|
10885
|
-
var $fontWeight =
|
|
10880
|
+
}, function (_ref24) {
|
|
10881
|
+
var $fontWeight = _ref24.$fontWeight;
|
|
10886
10882
|
return $fontWeight || '500';
|
|
10887
10883
|
}, SidebarContainer, MOBILE_BREAKPOINT);
|
|
10888
|
-
var NotificationBadge = styled.div(_templateObject9$5 || (_templateObject9$5 = _taggedTemplateLiteralLoose(["\n position: ", ";\n // top: -4px;\n // right: 4px;\n background: red;\n color: white;\n font-size: 10px;\n font-weight: bold;\n border-radius: 50%;\n padding: 2px 5px;\n min-width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 100;\n width: max-content;\n"])), function (
|
|
10889
|
-
var $position =
|
|
10884
|
+
var NotificationBadge = styled.div(_templateObject9$5 || (_templateObject9$5 = _taggedTemplateLiteralLoose(["\n position: ", ";\n // top: -4px;\n // right: 4px;\n background: red;\n color: white;\n font-size: 10px;\n font-weight: bold;\n border-radius: 50%;\n padding: 2px 5px;\n min-width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 100;\n width: max-content;\n"])), function (_ref25) {
|
|
10885
|
+
var $position = _ref25.$position;
|
|
10890
10886
|
return $position || 'absolute';
|
|
10891
10887
|
});
|
|
10892
|
-
var Sidebar = function Sidebar(
|
|
10893
|
-
var logo =
|
|
10894
|
-
content =
|
|
10895
|
-
background =
|
|
10896
|
-
ProfileContent =
|
|
10897
|
-
|
|
10898
|
-
isExpanded =
|
|
10899
|
-
setIsExpanded =
|
|
10888
|
+
var Sidebar = function Sidebar(_ref26) {
|
|
10889
|
+
var logo = _ref26.logo,
|
|
10890
|
+
content = _ref26.content,
|
|
10891
|
+
background = _ref26.background,
|
|
10892
|
+
ProfileContent = _ref26.ProfileContent,
|
|
10893
|
+
_ref26$isExpanded = _ref26.isExpanded,
|
|
10894
|
+
isExpanded = _ref26$isExpanded === void 0 ? false : _ref26$isExpanded,
|
|
10895
|
+
setIsExpanded = _ref26.setIsExpanded;
|
|
10900
10896
|
var location = useLocation();
|
|
10901
10897
|
var _useState = useState({}),
|
|
10902
10898
|
openMenus = _useState[0],
|
|
@@ -10936,6 +10932,14 @@ var Sidebar = function Sidebar(_ref27) {
|
|
|
10936
10932
|
isExpandedRef.current = isExpanded;
|
|
10937
10933
|
if (!isExpanded) setOpenMenus({});
|
|
10938
10934
|
}, [isExpanded]);
|
|
10935
|
+
useEffect(function () {
|
|
10936
|
+
if (isMobile && !isMobileOpen) {
|
|
10937
|
+
setOpenMenus({});
|
|
10938
|
+
}
|
|
10939
|
+
if (isMobile) {
|
|
10940
|
+
setIsExpanded(true);
|
|
10941
|
+
}
|
|
10942
|
+
}, [isMobile, isMobileOpen]);
|
|
10939
10943
|
var toggleMobileMenu = useCallback(function () {
|
|
10940
10944
|
setIsMobileOpen(function (prev) {
|
|
10941
10945
|
return !prev;
|
|
@@ -10951,9 +10955,9 @@ var Sidebar = function Sidebar(_ref27) {
|
|
|
10951
10955
|
}, []);
|
|
10952
10956
|
var toggleMenu = function toggleMenu(id) {
|
|
10953
10957
|
setOpenMenus(function (prev) {
|
|
10954
|
-
var
|
|
10958
|
+
var _ref27;
|
|
10955
10959
|
var isCurrentlyOpen = !!prev[id];
|
|
10956
|
-
return isCurrentlyOpen ? {} : (
|
|
10960
|
+
return isCurrentlyOpen ? {} : (_ref27 = {}, _ref27[id] = true, _ref27);
|
|
10957
10961
|
});
|
|
10958
10962
|
};
|
|
10959
10963
|
var getTotalNotifications = useCallback(function (item) {
|
|
@@ -10978,8 +10982,8 @@ var Sidebar = function Sidebar(_ref27) {
|
|
|
10978
10982
|
return currentBase === getBasePath(child.activeUrl) || currentBase === getBasePath(child.url);
|
|
10979
10983
|
}));
|
|
10980
10984
|
};
|
|
10981
|
-
var ChildLink = function ChildLink(
|
|
10982
|
-
var child =
|
|
10985
|
+
var ChildLink = function ChildLink(_ref28) {
|
|
10986
|
+
var child = _ref28.child;
|
|
10983
10987
|
var themeColors = useTheme$1();
|
|
10984
10988
|
var location = useLocation();
|
|
10985
10989
|
var active = getBasePath(location.pathname) === getBasePath(child.activeUrl) || getBasePath(location.pathname) === getBasePath(child.url);
|
|
@@ -11026,14 +11030,14 @@ var Sidebar = function Sidebar(_ref27) {
|
|
|
11026
11030
|
});
|
|
11027
11031
|
}));
|
|
11028
11032
|
};
|
|
11029
|
-
var SidebarItem = function SidebarItem(
|
|
11030
|
-
var item =
|
|
11031
|
-
isActive =
|
|
11032
|
-
isOpen =
|
|
11033
|
-
hasChildren =
|
|
11034
|
-
isExpanded =
|
|
11035
|
-
onToggle =
|
|
11036
|
-
renderChildLinks =
|
|
11033
|
+
var SidebarItem = function SidebarItem(_ref29) {
|
|
11034
|
+
var item = _ref29.item,
|
|
11035
|
+
isActive = _ref29.isActive,
|
|
11036
|
+
isOpen = _ref29.isOpen,
|
|
11037
|
+
hasChildren = _ref29.hasChildren,
|
|
11038
|
+
isExpanded = _ref29.isExpanded,
|
|
11039
|
+
onToggle = _ref29.onToggle,
|
|
11040
|
+
renderChildLinks = _ref29.renderChildLinks;
|
|
11037
11041
|
var themeColors = useTheme$1();
|
|
11038
11042
|
var activeClass = isActive ? 'active' : '';
|
|
11039
11043
|
var handleClick = useCallback(function () {
|
|
@@ -11169,15 +11173,33 @@ var Sidebar = function Sidebar(_ref27) {
|
|
|
11169
11173
|
};
|
|
11170
11174
|
}, [content, isExpanded, getTotalNotifications]);
|
|
11171
11175
|
var themeColors = useTheme$1();
|
|
11172
|
-
return React.createElement(React.Fragment, null, React.createElement(
|
|
11173
|
-
"$
|
|
11176
|
+
return React.createElement(React.Fragment, null, React.createElement(Container, {
|
|
11177
|
+
"$width": '100%',
|
|
11178
|
+
"$background": background != null ? background : themeColors.vms.accent.softBlue,
|
|
11179
|
+
"$alignItems": 'center'
|
|
11180
|
+
}, logo && isMobile && (logo.icon ? React.createElement(Logo, {
|
|
11181
|
+
"$padding": '10px 10px 10px 46px',
|
|
11182
|
+
"$height": 'max-content'
|
|
11183
|
+
}, React.createElement(Icon, {
|
|
11184
|
+
icon: logo.icon,
|
|
11185
|
+
color: logo.iconColor
|
|
11186
|
+
}), React.createElement(TextContainer, null, logo.name)) : logo.imageDetails && React.createElement(Logo, {
|
|
11187
|
+
"$padding": '10px 10px 10px 46px',
|
|
11188
|
+
"$height": 'max-content'
|
|
11189
|
+
}, React.createElement("img", {
|
|
11190
|
+
src: logo.imageDetails.url,
|
|
11191
|
+
alt: logo.imageDetails.altText,
|
|
11192
|
+
width: logo.imageDetails.width,
|
|
11193
|
+
height: logo.imageDetails.height
|
|
11194
|
+
}))), React.createElement(HamburgerButton, {
|
|
11174
11195
|
onClick: toggleMobileMenu,
|
|
11175
|
-
"aria-label":
|
|
11196
|
+
"aria-label": 'Toggle menu'
|
|
11176
11197
|
}, React.createElement(Icon, {
|
|
11177
11198
|
icon: isMobileOpen ? 'X' : 'Hamburger',
|
|
11178
|
-
size:
|
|
11179
|
-
color: themeColors.vms.text.
|
|
11180
|
-
|
|
11199
|
+
size: 20,
|
|
11200
|
+
color: themeColors.vms.text.dark,
|
|
11201
|
+
weight: '1px'
|
|
11202
|
+
}))), React.createElement(Overlay, {
|
|
11181
11203
|
"$isOpen": isMobileOpen,
|
|
11182
11204
|
onClick: handleOverlayClick
|
|
11183
11205
|
}), React.createElement(SidebarContainer, {
|
|
@@ -11189,10 +11211,14 @@ var Sidebar = function Sidebar(_ref27) {
|
|
|
11189
11211
|
"$gap": '28px',
|
|
11190
11212
|
"$width": '100%',
|
|
11191
11213
|
"$overflow": 'hidden'
|
|
11192
|
-
}, logo && (logo.icon ? React.createElement(Logo,
|
|
11214
|
+
}, logo && (logo.icon ? React.createElement(Logo, {
|
|
11215
|
+
"$height": '32px'
|
|
11216
|
+
}, React.createElement(Icon, {
|
|
11193
11217
|
icon: logo.icon,
|
|
11194
11218
|
color: logo.iconColor
|
|
11195
|
-
}), React.createElement(TextContainer, null, logo.name)) : logo.imageDetails && React.createElement(Logo,
|
|
11219
|
+
}), React.createElement(TextContainer, null, logo.name)) : logo.imageDetails && React.createElement(Logo, {
|
|
11220
|
+
"$height": '32px'
|
|
11221
|
+
}, React.createElement("img", {
|
|
11196
11222
|
src: logo.imageDetails.url,
|
|
11197
11223
|
alt: logo.imageDetails.altText,
|
|
11198
11224
|
width: logo.imageDetails.width,
|
|
@@ -11214,7 +11240,7 @@ var Sidebar = function Sidebar(_ref27) {
|
|
|
11214
11240
|
isActive: active,
|
|
11215
11241
|
isOpen: isOpen,
|
|
11216
11242
|
hasChildren: hasChildren,
|
|
11217
|
-
isExpanded: isMobile ?
|
|
11243
|
+
isExpanded: isMobile ? true : isExpanded,
|
|
11218
11244
|
onToggle: function onToggle() {
|
|
11219
11245
|
return toggleMenu(item.id);
|
|
11220
11246
|
},
|