labsense-ui-kit 1.3.77 → 1.3.78
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 +83 -65
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +83 -65
- 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],
|
|
@@ -10951,9 +10947,9 @@ var Sidebar = function Sidebar(_ref27) {
|
|
|
10951
10947
|
}, []);
|
|
10952
10948
|
var toggleMenu = function toggleMenu(id) {
|
|
10953
10949
|
setOpenMenus(function (prev) {
|
|
10954
|
-
var
|
|
10950
|
+
var _ref27;
|
|
10955
10951
|
var isCurrentlyOpen = !!prev[id];
|
|
10956
|
-
return isCurrentlyOpen ? {} : (
|
|
10952
|
+
return isCurrentlyOpen ? {} : (_ref27 = {}, _ref27[id] = true, _ref27);
|
|
10957
10953
|
});
|
|
10958
10954
|
};
|
|
10959
10955
|
var getTotalNotifications = useCallback(function (item) {
|
|
@@ -10978,8 +10974,8 @@ var Sidebar = function Sidebar(_ref27) {
|
|
|
10978
10974
|
return currentBase === getBasePath(child.activeUrl) || currentBase === getBasePath(child.url);
|
|
10979
10975
|
}));
|
|
10980
10976
|
};
|
|
10981
|
-
var ChildLink = function ChildLink(
|
|
10982
|
-
var child =
|
|
10977
|
+
var ChildLink = function ChildLink(_ref28) {
|
|
10978
|
+
var child = _ref28.child;
|
|
10983
10979
|
var themeColors = useTheme$1();
|
|
10984
10980
|
var location = useLocation();
|
|
10985
10981
|
var active = getBasePath(location.pathname) === getBasePath(child.activeUrl) || getBasePath(location.pathname) === getBasePath(child.url);
|
|
@@ -11026,14 +11022,14 @@ var Sidebar = function Sidebar(_ref27) {
|
|
|
11026
11022
|
});
|
|
11027
11023
|
}));
|
|
11028
11024
|
};
|
|
11029
|
-
var SidebarItem = function SidebarItem(
|
|
11030
|
-
var item =
|
|
11031
|
-
isActive =
|
|
11032
|
-
isOpen =
|
|
11033
|
-
hasChildren =
|
|
11034
|
-
isExpanded =
|
|
11035
|
-
onToggle =
|
|
11036
|
-
renderChildLinks =
|
|
11025
|
+
var SidebarItem = function SidebarItem(_ref29) {
|
|
11026
|
+
var item = _ref29.item,
|
|
11027
|
+
isActive = _ref29.isActive,
|
|
11028
|
+
isOpen = _ref29.isOpen,
|
|
11029
|
+
hasChildren = _ref29.hasChildren,
|
|
11030
|
+
isExpanded = _ref29.isExpanded,
|
|
11031
|
+
onToggle = _ref29.onToggle,
|
|
11032
|
+
renderChildLinks = _ref29.renderChildLinks;
|
|
11037
11033
|
var themeColors = useTheme$1();
|
|
11038
11034
|
var activeClass = isActive ? 'active' : '';
|
|
11039
11035
|
var handleClick = useCallback(function () {
|
|
@@ -11169,15 +11165,33 @@ var Sidebar = function Sidebar(_ref27) {
|
|
|
11169
11165
|
};
|
|
11170
11166
|
}, [content, isExpanded, getTotalNotifications]);
|
|
11171
11167
|
var themeColors = useTheme$1();
|
|
11172
|
-
return React.createElement(React.Fragment, null, React.createElement(
|
|
11173
|
-
"$
|
|
11168
|
+
return React.createElement(React.Fragment, null, React.createElement(Container, {
|
|
11169
|
+
"$width": '100%',
|
|
11170
|
+
"$background": background != null ? background : themeColors.vms.accent.softBlue,
|
|
11171
|
+
"$alignItems": 'center'
|
|
11172
|
+
}, logo && isMobile && (logo.icon ? React.createElement(Logo, {
|
|
11173
|
+
"$padding": '10px 10px 10px 46px',
|
|
11174
|
+
"$height": 'max-content'
|
|
11175
|
+
}, React.createElement(Icon, {
|
|
11176
|
+
icon: logo.icon,
|
|
11177
|
+
color: logo.iconColor
|
|
11178
|
+
}), React.createElement(TextContainer, null, logo.name)) : logo.imageDetails && React.createElement(Logo, {
|
|
11179
|
+
"$padding": '10px 10px 10px 46px',
|
|
11180
|
+
"$height": 'max-content'
|
|
11181
|
+
}, React.createElement("img", {
|
|
11182
|
+
src: logo.imageDetails.url,
|
|
11183
|
+
alt: logo.imageDetails.altText,
|
|
11184
|
+
width: logo.imageDetails.width,
|
|
11185
|
+
height: logo.imageDetails.height
|
|
11186
|
+
}))), React.createElement(HamburgerButton, {
|
|
11174
11187
|
onClick: toggleMobileMenu,
|
|
11175
|
-
"aria-label":
|
|
11188
|
+
"aria-label": 'Toggle menu'
|
|
11176
11189
|
}, React.createElement(Icon, {
|
|
11177
11190
|
icon: isMobileOpen ? 'X' : 'Hamburger',
|
|
11178
|
-
size:
|
|
11179
|
-
color: themeColors.vms.text.
|
|
11180
|
-
|
|
11191
|
+
size: 20,
|
|
11192
|
+
color: themeColors.vms.text.dark,
|
|
11193
|
+
weight: '1px'
|
|
11194
|
+
}))), React.createElement(Overlay, {
|
|
11181
11195
|
"$isOpen": isMobileOpen,
|
|
11182
11196
|
onClick: handleOverlayClick
|
|
11183
11197
|
}), React.createElement(SidebarContainer, {
|
|
@@ -11189,10 +11203,14 @@ var Sidebar = function Sidebar(_ref27) {
|
|
|
11189
11203
|
"$gap": '28px',
|
|
11190
11204
|
"$width": '100%',
|
|
11191
11205
|
"$overflow": 'hidden'
|
|
11192
|
-
}, logo && (logo.icon ? React.createElement(Logo,
|
|
11206
|
+
}, logo && (logo.icon ? React.createElement(Logo, {
|
|
11207
|
+
"$height": '32px'
|
|
11208
|
+
}, React.createElement(Icon, {
|
|
11193
11209
|
icon: logo.icon,
|
|
11194
11210
|
color: logo.iconColor
|
|
11195
|
-
}), React.createElement(TextContainer, null, logo.name)) : logo.imageDetails && React.createElement(Logo,
|
|
11211
|
+
}), React.createElement(TextContainer, null, logo.name)) : logo.imageDetails && React.createElement(Logo, {
|
|
11212
|
+
"$height": '32px'
|
|
11213
|
+
}, React.createElement("img", {
|
|
11196
11214
|
src: logo.imageDetails.url,
|
|
11197
11215
|
alt: logo.imageDetails.altText,
|
|
11198
11216
|
width: logo.imageDetails.width,
|