labsense-ui-kit 1.4.57 → 1.4.59

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.
@@ -12549,7 +12549,7 @@ var SidebarContainer = styled.div(_templateObject3$c || (_templateObject3$c = _t
12549
12549
  var $isMobileOpen = _ref7.$isMobileOpen;
12550
12550
  return $isMobileOpen ? 'visible' : 'hidden';
12551
12551
  });
12552
- 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 /* Remove all transitions for instant color changes */\n * {\n transition: none !important;\n }\n\n /* Hover state */\n &:hover {\n color: ", ";\n background: ", ";\n \n /* Make icons white on hover */\n svg {\n color: ", " !important;\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 }\n }\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n box-shadow: inset 0 0 0 2px ", ";\n }\n"])), function (_ref8) {
12552
+ 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 /* 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) {
12553
12553
  var $padding = _ref8.$padding;
12554
12554
  return $padding;
12555
12555
  }, function (_ref9) {
@@ -12566,37 +12566,37 @@ var SidebarLink = styled(NavLink)(_templateObject4$9 || (_templateObject4$9 = _t
12566
12566
  return theme.vms.text.white;
12567
12567
  }, function (_ref13) {
12568
12568
  var theme = _ref13.theme;
12569
- return theme.vms.text.white;
12570
- }, function (_ref14) {
12571
- var theme = _ref14.theme;
12572
- return theme.vms["default"].primary;
12573
- }, function (_ref15) {
12569
+ return theme.vms.text.dark;
12570
+ });
12571
+ 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\n /* Ensure icons inherit hover color from parent */\n svg {\n transition: none;\n }\n"])), function (_ref14) {
12572
+ var $selected = _ref14.$selected,
12573
+ theme = _ref14.theme;
12574
+ return $selected ? theme.vms["default"].primary : theme.vms["default"].tertiary;
12575
+ });
12576
+ var StyledContainer = styled(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) {
12574
12577
  var theme = _ref15.theme;
12575
12578
  return theme.vms.text.white;
12576
12579
  }, function (_ref16) {
12577
12580
  var theme = _ref16.theme;
12578
12581
  return theme.vms.text.white;
12579
- });
12580
- 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\n /* Ensure icons inherit hover color from parent */\n svg {\n transition: none;\n }\n"])), function (_ref17) {
12581
- var $selected = _ref17.$selected,
12582
- theme = _ref17.theme;
12583
- return $selected ? theme.vms["default"].primary : theme.vms["default"].tertiary;
12584
- });
12585
- 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 (_ref18) {
12582
+ }, function (_ref17) {
12583
+ var theme = _ref17.theme;
12584
+ return theme.vms.text.white;
12585
+ }, function (_ref18) {
12586
12586
  var theme = _ref18.theme;
12587
12587
  return theme.vms.text.white;
12588
12588
  }, function (_ref19) {
12589
12589
  var theme = _ref19.theme;
12590
- return theme.vms.text.white;
12590
+ return theme.vms.text.medium;
12591
12591
  }, function (_ref20) {
12592
12592
  var theme = _ref20.theme;
12593
- return theme.vms.text.white;
12593
+ return theme.vms["default"].primary;
12594
12594
  }, function (_ref21) {
12595
12595
  var theme = _ref21.theme;
12596
12596
  return theme.vms.text.white;
12597
12597
  }, function (_ref22) {
12598
12598
  var theme = _ref22.theme;
12599
- return theme.vms.text.medium;
12599
+ return theme.vms.text.dark;
12600
12600
  });
12601
12601
  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"])));
12602
12602
  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: 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) {
@@ -12775,6 +12775,7 @@ var Sidebar = function Sidebar(_ref27) {
12775
12775
  onToggle();
12776
12776
  }
12777
12777
  }, [hasChildren, onToggle]);
12778
+ var isOwnFocusTarget = !item.url && hasChildren;
12778
12779
  var ContentLayout = React.createElement(StyledContainer, {
12779
12780
  className: activeClass,
12780
12781
  "$alignItems": 'center',
@@ -12784,7 +12785,16 @@ var Sidebar = function Sidebar(_ref27) {
12784
12785
  "$borderRadius": '4px',
12785
12786
  "$justifyContent": 'space-between',
12786
12787
  "$hoverBackground": themeColors.vms["default"].primary,
12787
- onClick: handleClick
12788
+ onClick: handleClick,
12789
+ role: isOwnFocusTarget ? 'button' : undefined,
12790
+ tabIndex: isOwnFocusTarget ? 0 : undefined,
12791
+ "aria-expanded": isOwnFocusTarget ? isOpen : undefined,
12792
+ onKeyDown: isOwnFocusTarget ? function (e) {
12793
+ if (e.key === 'Enter' || e.key === ' ') {
12794
+ e.preventDefault();
12795
+ handleClick();
12796
+ }
12797
+ } : undefined
12788
12798
  }, React.createElement(Container, {
12789
12799
  "$alignItems": 'center',
12790
12800
  "$gap": '8px',
@@ -13427,7 +13437,7 @@ var TabContainer = styled.div(_templateObject3$f || (_templateObject3$f = _tagge
13427
13437
  return $disabled ? 'not-allowed' : 'pointer';
13428
13438
  }, function (_ref12) {
13429
13439
  var theme = _ref12.theme;
13430
- return theme.vms["default"].primary;
13440
+ return theme.vms.text.dark;
13431
13441
  });
13432
13442
  var TabItemContainer = styled.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) {
13433
13443
  var $headerHeight = _ref13.$headerHeight;