labsense-ui-kit 1.4.56 → 1.4.58
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 +82 -66
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +82 -66
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12554,7 +12554,7 @@ var SidebarContainer = styled__default.div(_templateObject3$c || (_templateObjec
|
|
|
12554
12554
|
var $isMobileOpen = _ref7.$isMobileOpen;
|
|
12555
12555
|
return $isMobileOpen ? 'visible' : 'hidden';
|
|
12556
12556
|
});
|
|
12557
|
-
var SidebarLink = styled__default(reactRouterDom.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 /* Remove all transitions for instant color changes */\n * {\n transition: none !important;\n }\n\n /* Hover
|
|
12557
|
+
var SidebarLink = styled__default(reactRouterDom.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 /* Remove all transitions for instant color changes */\n * {\n transition: none !important;\n }\n\n /* Hover / active / keyboard-focus share the same highlight, so the icon\n switches color together with the fill instead of the ring appearing alone */\n &:hover,\n &.active,\n &:focus-visible {\n color: ", ";\n background: ", ";\n\n svg {\n color: ", " !important;\n }\n }\n\n &:focus {\n outline: none;\n }\n\n /* text.dark tracks the sidebar's own surface (near-black on the light\n theme, white on the dark theme) so the ring stays visible in both,\n unlike text.white which is calibrated for text sitting on the primary fill */\n &:focus-visible {\n box-shadow: inset 0 0 0 2px ", ";\n }\n"])), function (_ref8) {
|
|
12558
12558
|
var $padding = _ref8.$padding;
|
|
12559
12559
|
return $padding;
|
|
12560
12560
|
}, function (_ref9) {
|
|
@@ -12571,20 +12571,20 @@ var SidebarLink = styled__default(reactRouterDom.NavLink)(_templateObject4$9 ||
|
|
|
12571
12571
|
return theme.vms.text.white;
|
|
12572
12572
|
}, function (_ref13) {
|
|
12573
12573
|
var theme = _ref13.theme;
|
|
12574
|
-
return theme.vms.text.
|
|
12575
|
-
}, function (_ref14) {
|
|
12576
|
-
var theme = _ref14.theme;
|
|
12577
|
-
return theme.vms["default"].primary;
|
|
12578
|
-
}, function (_ref15) {
|
|
12579
|
-
var theme = _ref15.theme;
|
|
12580
|
-
return theme.vms.text.white;
|
|
12574
|
+
return theme.vms.text.dark;
|
|
12581
12575
|
});
|
|
12582
|
-
var IconWrapper$2 = styled__default.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\n /* Ensure icons inherit hover color from parent */\n svg {\n transition: none;\n }\n"])), function (
|
|
12583
|
-
var $selected =
|
|
12584
|
-
theme =
|
|
12576
|
+
var IconWrapper$2 = styled__default.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\n /* Ensure icons inherit hover color from parent */\n svg {\n transition: none;\n }\n"])), function (_ref14) {
|
|
12577
|
+
var $selected = _ref14.$selected,
|
|
12578
|
+
theme = _ref14.theme;
|
|
12585
12579
|
return $selected ? theme.vms["default"].primary : theme.vms["default"].tertiary;
|
|
12586
12580
|
});
|
|
12587
|
-
var StyledContainer = styled__default(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 (
|
|
12581
|
+
var StyledContainer = styled__default(Container)(_templateObject6$8 || (_templateObject6$8 = _taggedTemplateLiteralLoose(["\n transition: none;\n\n svg {\n transition: none;\n }\n\n /* Parent hover / active / keyboard-focus (for rows with no url of their\n own - see the tabIndex added in SidebarItem) */\n &:hover,\n &.active,\n &:focus-visible {\n svg {\n color: ", " !important;\n }\n }\n\n /* 2nd child reacts ONLY when parent is hovered or keyboard-focused */\n &:hover > div:nth-child(2),\n &:focus-visible > 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\n &:focus {\n outline: none;\n }\n\n /* Same fill + ring treatment as SidebarLink, for rows made keyboard-focusable below */\n &:focus-visible {\n background: ", ";\n color: ", ";\n box-shadow: inset 0 0 0 2px ", ";\n }\n"])), function (_ref15) {
|
|
12582
|
+
var theme = _ref15.theme;
|
|
12583
|
+
return theme.vms.text.white;
|
|
12584
|
+
}, function (_ref16) {
|
|
12585
|
+
var theme = _ref16.theme;
|
|
12586
|
+
return theme.vms.text.white;
|
|
12587
|
+
}, function (_ref17) {
|
|
12588
12588
|
var theme = _ref17.theme;
|
|
12589
12589
|
return theme.vms.text.white;
|
|
12590
12590
|
}, function (_ref18) {
|
|
@@ -12592,37 +12592,40 @@ var StyledContainer = styled__default(Container)(_templateObject6$8 || (_templat
|
|
|
12592
12592
|
return theme.vms.text.white;
|
|
12593
12593
|
}, function (_ref19) {
|
|
12594
12594
|
var theme = _ref19.theme;
|
|
12595
|
-
return theme.vms.text.
|
|
12595
|
+
return theme.vms.text.medium;
|
|
12596
12596
|
}, function (_ref20) {
|
|
12597
12597
|
var theme = _ref20.theme;
|
|
12598
|
-
return theme.vms.
|
|
12598
|
+
return theme.vms["default"].primary;
|
|
12599
12599
|
}, function (_ref21) {
|
|
12600
12600
|
var theme = _ref21.theme;
|
|
12601
|
-
return theme.vms.text.
|
|
12601
|
+
return theme.vms.text.white;
|
|
12602
|
+
}, function (_ref22) {
|
|
12603
|
+
var theme = _ref22.theme;
|
|
12604
|
+
return theme.vms.text.dark;
|
|
12602
12605
|
});
|
|
12603
12606
|
var Logo = styled__default(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"])));
|
|
12604
|
-
var TextContainer = styled__default.span(_templateObject8$5 || (_templateObject8$5 = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n opacity: 0;\n visibility: hidden;\n transform: translateX(-10px);\n transition: opacity 0.3s ease, visibility 0.3s ease, transform 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 (
|
|
12605
|
-
var $padding =
|
|
12607
|
+
var TextContainer = styled__default.span(_templateObject8$5 || (_templateObject8$5 = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n opacity: 0;\n visibility: hidden;\n transform: translateX(-10px);\n transition: opacity 0.3s ease, visibility 0.3s ease, transform 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 (_ref23) {
|
|
12608
|
+
var $padding = _ref23.$padding;
|
|
12606
12609
|
return $padding;
|
|
12607
|
-
}, function (_ref23) {
|
|
12608
|
-
var $fontSize = _ref23.$fontSize;
|
|
12609
|
-
return $fontSize || '20px';
|
|
12610
12610
|
}, function (_ref24) {
|
|
12611
|
-
var $
|
|
12611
|
+
var $fontSize = _ref24.$fontSize;
|
|
12612
|
+
return $fontSize || '20px';
|
|
12613
|
+
}, function (_ref25) {
|
|
12614
|
+
var $fontWeight = _ref25.$fontWeight;
|
|
12612
12615
|
return $fontWeight || '500';
|
|
12613
12616
|
}, SidebarContainer, MOBILE_BREAKPOINT);
|
|
12614
|
-
var NotificationBadge = styled__default.div(_templateObject9$4 || (_templateObject9$4 = _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 (
|
|
12615
|
-
var $position =
|
|
12617
|
+
var NotificationBadge = styled__default.div(_templateObject9$4 || (_templateObject9$4 = _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 (_ref26) {
|
|
12618
|
+
var $position = _ref26.$position;
|
|
12616
12619
|
return $position || 'absolute';
|
|
12617
12620
|
});
|
|
12618
|
-
var Sidebar = function Sidebar(
|
|
12619
|
-
var logo =
|
|
12620
|
-
content =
|
|
12621
|
-
background =
|
|
12622
|
-
ProfileContent =
|
|
12623
|
-
|
|
12624
|
-
isExpanded =
|
|
12625
|
-
setIsExpanded =
|
|
12621
|
+
var Sidebar = function Sidebar(_ref27) {
|
|
12622
|
+
var logo = _ref27.logo,
|
|
12623
|
+
content = _ref27.content,
|
|
12624
|
+
background = _ref27.background,
|
|
12625
|
+
ProfileContent = _ref27.ProfileContent,
|
|
12626
|
+
_ref27$isExpanded = _ref27.isExpanded,
|
|
12627
|
+
isExpanded = _ref27$isExpanded === void 0 ? false : _ref27$isExpanded,
|
|
12628
|
+
setIsExpanded = _ref27.setIsExpanded;
|
|
12626
12629
|
var location = reactRouterDom.useLocation();
|
|
12627
12630
|
var _useState = React.useState({}),
|
|
12628
12631
|
openMenus = _useState[0],
|
|
@@ -12687,9 +12690,9 @@ var Sidebar = function Sidebar(_ref26) {
|
|
|
12687
12690
|
}, []);
|
|
12688
12691
|
var toggleMenu = function toggleMenu(id) {
|
|
12689
12692
|
setOpenMenus(function (prev) {
|
|
12690
|
-
var
|
|
12693
|
+
var _ref28;
|
|
12691
12694
|
var isCurrentlyOpen = !!prev[id];
|
|
12692
|
-
return isCurrentlyOpen ? {} : (
|
|
12695
|
+
return isCurrentlyOpen ? {} : (_ref28 = {}, _ref28[id] = true, _ref28);
|
|
12693
12696
|
});
|
|
12694
12697
|
};
|
|
12695
12698
|
var getTotalNotifications = React.useCallback(function (item) {
|
|
@@ -12714,8 +12717,8 @@ var Sidebar = function Sidebar(_ref26) {
|
|
|
12714
12717
|
return currentBase === getBasePath(child.activeUrl) || currentBase === getBasePath(child.url);
|
|
12715
12718
|
}));
|
|
12716
12719
|
};
|
|
12717
|
-
var ChildLink = function ChildLink(
|
|
12718
|
-
var child =
|
|
12720
|
+
var ChildLink = function ChildLink(_ref29) {
|
|
12721
|
+
var child = _ref29.child;
|
|
12719
12722
|
var location = reactRouterDom.useLocation();
|
|
12720
12723
|
var active = getBasePath(location.pathname) === getBasePath(child.activeUrl) || getBasePath(location.pathname) === getBasePath(child.url);
|
|
12721
12724
|
var handleClick = React.useCallback(function (e) {
|
|
@@ -12762,14 +12765,14 @@ var Sidebar = function Sidebar(_ref26) {
|
|
|
12762
12765
|
});
|
|
12763
12766
|
}));
|
|
12764
12767
|
};
|
|
12765
|
-
var SidebarItem = function SidebarItem(
|
|
12766
|
-
var item =
|
|
12767
|
-
isActive =
|
|
12768
|
-
isOpen =
|
|
12769
|
-
hasChildren =
|
|
12770
|
-
isExpanded =
|
|
12771
|
-
onToggle =
|
|
12772
|
-
renderChildLinks =
|
|
12768
|
+
var SidebarItem = function SidebarItem(_ref30) {
|
|
12769
|
+
var item = _ref30.item,
|
|
12770
|
+
isActive = _ref30.isActive,
|
|
12771
|
+
isOpen = _ref30.isOpen,
|
|
12772
|
+
hasChildren = _ref30.hasChildren,
|
|
12773
|
+
isExpanded = _ref30.isExpanded,
|
|
12774
|
+
onToggle = _ref30.onToggle,
|
|
12775
|
+
renderChildLinks = _ref30.renderChildLinks;
|
|
12773
12776
|
var themeColors = styled.useTheme();
|
|
12774
12777
|
var activeClass = isActive ? 'active' : '';
|
|
12775
12778
|
var handleClick = React.useCallback(function () {
|
|
@@ -12777,6 +12780,7 @@ var Sidebar = function Sidebar(_ref26) {
|
|
|
12777
12780
|
onToggle();
|
|
12778
12781
|
}
|
|
12779
12782
|
}, [hasChildren, onToggle]);
|
|
12783
|
+
var isOwnFocusTarget = !item.url && hasChildren;
|
|
12780
12784
|
var ContentLayout = React__default.createElement(StyledContainer, {
|
|
12781
12785
|
className: activeClass,
|
|
12782
12786
|
"$alignItems": 'center',
|
|
@@ -12786,7 +12790,16 @@ var Sidebar = function Sidebar(_ref26) {
|
|
|
12786
12790
|
"$borderRadius": '4px',
|
|
12787
12791
|
"$justifyContent": 'space-between',
|
|
12788
12792
|
"$hoverBackground": themeColors.vms["default"].primary,
|
|
12789
|
-
onClick: handleClick
|
|
12793
|
+
onClick: handleClick,
|
|
12794
|
+
role: isOwnFocusTarget ? 'button' : undefined,
|
|
12795
|
+
tabIndex: isOwnFocusTarget ? 0 : undefined,
|
|
12796
|
+
"aria-expanded": isOwnFocusTarget ? isOpen : undefined,
|
|
12797
|
+
onKeyDown: isOwnFocusTarget ? function (e) {
|
|
12798
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
12799
|
+
e.preventDefault();
|
|
12800
|
+
handleClick();
|
|
12801
|
+
}
|
|
12802
|
+
} : undefined
|
|
12790
12803
|
}, React__default.createElement(Container, {
|
|
12791
12804
|
"$alignItems": 'center',
|
|
12792
12805
|
"$gap": '8px',
|
|
@@ -13412,7 +13425,7 @@ var FirstContainer = styled__default.div(_templateObject2$m || (_templateObject2
|
|
|
13412
13425
|
var $headerPadding = _ref6.$headerPadding;
|
|
13413
13426
|
return $headerPadding ? $headerPadding : '0px';
|
|
13414
13427
|
});
|
|
13415
|
-
var TabContainer = styled__default.div(_templateObject3$f || (_templateObject3$f = _taggedTemplateLiteralLoose(["\n width: auto;\n display: flex;\n align-items: center;\n cursor: ", ";\n opacity: ", ";\n gap: 8px;\n font-size: 14px;\n font-weight: 500;\n color: ", ";\n height: ", ";\n\n svg {\n cursor: ", ";\n }\n\n"])), function (_ref7) {
|
|
13428
|
+
var TabContainer = styled__default.div(_templateObject3$f || (_templateObject3$f = _taggedTemplateLiteralLoose(["\n width: auto;\n display: flex;\n align-items: center;\n cursor: ", ";\n opacity: ", ";\n gap: 8px;\n font-size: 14px;\n font-weight: 500;\n color: ", ";\n height: ", ";\n\n svg {\n cursor: ", ";\n }\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n height: 35px;\n max-height: 35px;\n border-radius: 4px;\n box-shadow: 0 0 0 2px ", ";\n\n div {\n font-size: 12px;\n }\n }\n"])), function (_ref7) {
|
|
13416
13429
|
var $disabled = _ref7.$disabled;
|
|
13417
13430
|
return $disabled ? 'not-allowed' : 'pointer';
|
|
13418
13431
|
}, function (_ref8) {
|
|
@@ -13427,36 +13440,39 @@ var TabContainer = styled__default.div(_templateObject3$f || (_templateObject3$f
|
|
|
13427
13440
|
}, function (_ref11) {
|
|
13428
13441
|
var $disabled = _ref11.$disabled;
|
|
13429
13442
|
return $disabled ? 'not-allowed' : 'pointer';
|
|
13443
|
+
}, function (_ref12) {
|
|
13444
|
+
var theme = _ref12.theme;
|
|
13445
|
+
return theme.vms["default"].primary;
|
|
13430
13446
|
});
|
|
13431
|
-
var TabItemContainer = styled__default.div(_templateObject4$c || (_templateObject4$c = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n position: relative;\n gap: 8px;\n height: 100%;\n max-height: ", ";\n\n &:after {\n content: '';\n display: ", ";\n width: 100%;\n min-height: 3px;\n background: ", ";\n position: absolute;\n bottom: -1px;\n left: 0px;\n }\n"])), function (
|
|
13432
|
-
var $headerHeight =
|
|
13447
|
+
var TabItemContainer = styled__default.div(_templateObject4$c || (_templateObject4$c = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n position: relative;\n gap: 8px;\n height: 100%;\n max-height: ", ";\n\n &:after {\n content: '';\n display: ", ";\n width: 100%;\n min-height: 3px;\n background: ", ";\n position: absolute;\n bottom: -1px;\n left: 0px;\n }\n"])), function (_ref13) {
|
|
13448
|
+
var $headerHeight = _ref13.$headerHeight;
|
|
13433
13449
|
return $headerHeight ? $headerHeight : '34px';
|
|
13434
13450
|
}, function (props) {
|
|
13435
13451
|
return props.$active ? 'block' : 'none';
|
|
13436
|
-
}, function (
|
|
13437
|
-
var theme =
|
|
13452
|
+
}, function (_ref14) {
|
|
13453
|
+
var theme = _ref14.theme;
|
|
13438
13454
|
return theme.vms["default"].primary;
|
|
13439
13455
|
});
|
|
13440
|
-
var DetailsFirstContainer = styled__default.div(_templateObject5$a || (_templateObject5$a = _taggedTemplateLiteralLoose(["\n text-align: center;\n font-size: 14px;\n line-height: 18px;\n font-weight: 500;\n height: 100%;\n display: flex;\n align-items: center;\n color: ", ";\n white-space: nowrap;\n"])), function (
|
|
13441
|
-
var $active =
|
|
13442
|
-
theme =
|
|
13456
|
+
var DetailsFirstContainer = styled__default.div(_templateObject5$a || (_templateObject5$a = _taggedTemplateLiteralLoose(["\n text-align: center;\n font-size: 14px;\n line-height: 18px;\n font-weight: 500;\n height: 100%;\n display: flex;\n align-items: center;\n color: ", ";\n white-space: nowrap;\n"])), function (_ref15) {
|
|
13457
|
+
var $active = _ref15.$active,
|
|
13458
|
+
theme = _ref15.theme;
|
|
13443
13459
|
return $active ? theme.vms["default"].primary : theme.vms.text.medium;
|
|
13444
13460
|
});
|
|
13445
13461
|
var TabItemsWrapper = styled__default.div(_templateObject6$9 || (_templateObject6$9 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 24px;\n // overflow-x: auto;\n scrollbar-width: thin;\n"])));
|
|
13446
|
-
var Tabs = function Tabs(
|
|
13447
|
-
var tabItems =
|
|
13448
|
-
|
|
13449
|
-
disabled =
|
|
13450
|
-
headerHeight =
|
|
13451
|
-
headerPadding =
|
|
13452
|
-
activeTab =
|
|
13453
|
-
border =
|
|
13454
|
-
|
|
13455
|
-
gap =
|
|
13456
|
-
overflow =
|
|
13457
|
-
scrollbarWidth =
|
|
13458
|
-
bordeBottom =
|
|
13459
|
-
tabRightNode =
|
|
13462
|
+
var Tabs = function Tabs(_ref16) {
|
|
13463
|
+
var tabItems = _ref16.tabItems,
|
|
13464
|
+
_ref16$disabled = _ref16.disabled,
|
|
13465
|
+
disabled = _ref16$disabled === void 0 ? false : _ref16$disabled,
|
|
13466
|
+
headerHeight = _ref16.headerHeight,
|
|
13467
|
+
headerPadding = _ref16.headerPadding,
|
|
13468
|
+
activeTab = _ref16.activeTab,
|
|
13469
|
+
border = _ref16.border,
|
|
13470
|
+
_ref16$gap = _ref16.gap,
|
|
13471
|
+
gap = _ref16$gap === void 0 ? '24px' : _ref16$gap,
|
|
13472
|
+
overflow = _ref16.overflow,
|
|
13473
|
+
scrollbarWidth = _ref16.scrollbarWidth,
|
|
13474
|
+
bordeBottom = _ref16.bordeBottom,
|
|
13475
|
+
tabRightNode = _ref16.tabRightNode;
|
|
13460
13476
|
var themeColors = useTheme();
|
|
13461
13477
|
return React__default.createElement(Container$4, {
|
|
13462
13478
|
"$gap": gap,
|