labsense-ui-kit 1.2.93 → 1.2.94
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 +51 -72
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +51 -72
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -9270,86 +9270,71 @@ var ProgressBar = function ProgressBar(_ref3) {
|
|
|
9270
9270
|
};
|
|
9271
9271
|
|
|
9272
9272
|
var _templateObject$n, _templateObject2$j, _templateObject3$c, _templateObject4$9, _templateObject5$8, _templateObject6$7, _templateObject7$5;
|
|
9273
|
-
var SidebarContainer = styled.div(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n width:
|
|
9274
|
-
var $
|
|
9275
|
-
|
|
9276
|
-
}, function (_ref2) {
|
|
9277
|
-
var $isExpanded = _ref2.$isExpanded;
|
|
9278
|
-
return $isExpanded ? '400px' : '68px';
|
|
9279
|
-
}, function (_ref3) {
|
|
9280
|
-
var $background = _ref3.$background,
|
|
9281
|
-
theme = _ref3.theme;
|
|
9273
|
+
var SidebarContainer = styled.div(_templateObject$n || (_templateObject$n = _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: 10;\n justify-content: space-between;\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"])), function (_ref) {
|
|
9274
|
+
var $background = _ref.$background,
|
|
9275
|
+
theme = _ref.theme;
|
|
9282
9276
|
return $background || theme.vms.accent.softBlue;
|
|
9283
9277
|
});
|
|
9284
|
-
var SidebarLink = styled(NavLink)(_templateObject2$j || (_templateObject2$j = _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 (
|
|
9285
|
-
var $padding =
|
|
9278
|
+
var SidebarLink = styled(NavLink)(_templateObject2$j || (_templateObject2$j = _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 (_ref2) {
|
|
9279
|
+
var $padding = _ref2.$padding;
|
|
9286
9280
|
return $padding;
|
|
9281
|
+
}, function (_ref3) {
|
|
9282
|
+
var theme = _ref3.theme;
|
|
9283
|
+
return theme.vms.text.medium;
|
|
9284
|
+
}, function (_ref4) {
|
|
9285
|
+
var theme = _ref4.theme;
|
|
9286
|
+
return theme.vms.text.white;
|
|
9287
9287
|
}, function (_ref5) {
|
|
9288
9288
|
var theme = _ref5.theme;
|
|
9289
|
-
return theme.vms.
|
|
9289
|
+
return theme.vms["default"].primary;
|
|
9290
9290
|
}, function (_ref6) {
|
|
9291
9291
|
var theme = _ref6.theme;
|
|
9292
9292
|
return theme.vms.text.white;
|
|
9293
9293
|
}, function (_ref7) {
|
|
9294
9294
|
var theme = _ref7.theme;
|
|
9295
|
-
return theme.vms
|
|
9295
|
+
return theme.vms.text.white;
|
|
9296
9296
|
}, function (_ref8) {
|
|
9297
9297
|
var theme = _ref8.theme;
|
|
9298
|
-
return theme.vms.
|
|
9298
|
+
return theme.vms["default"].primary;
|
|
9299
9299
|
}, function (_ref9) {
|
|
9300
9300
|
var theme = _ref9.theme;
|
|
9301
9301
|
return theme.vms.text.white;
|
|
9302
|
-
}, function (_ref10) {
|
|
9303
|
-
var theme = _ref10.theme;
|
|
9304
|
-
return theme.vms["default"].primary;
|
|
9305
|
-
}, function (_ref11) {
|
|
9306
|
-
var theme = _ref11.theme;
|
|
9307
|
-
return theme.vms.text.white;
|
|
9308
9302
|
});
|
|
9309
|
-
var IconWrapper$2 = styled.div(_templateObject3$c || (_templateObject3$c = _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 (
|
|
9310
|
-
var $selected =
|
|
9311
|
-
theme =
|
|
9303
|
+
var IconWrapper$2 = styled.div(_templateObject3$c || (_templateObject3$c = _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 (_ref10) {
|
|
9304
|
+
var $selected = _ref10.$selected,
|
|
9305
|
+
theme = _ref10.theme;
|
|
9312
9306
|
return $selected ? theme.vms["default"].primary : theme.vms["default"].tertiary;
|
|
9313
9307
|
});
|
|
9314
|
-
var StyledContainer = styled(Container)(_templateObject4$9 || (_templateObject4$9 = _taggedTemplateLiteralLoose(["\n transition: none;\n \n &:hover {\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n \n &.active {\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n"])), function (
|
|
9315
|
-
var theme =
|
|
9308
|
+
var StyledContainer = styled(Container)(_templateObject4$9 || (_templateObject4$9 = _taggedTemplateLiteralLoose(["\n transition: none;\n \n &:hover {\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n \n &.active {\n svg {\n color: ", " !important;\n transition: none;\n }\n }\n"])), function (_ref11) {
|
|
9309
|
+
var theme = _ref11.theme;
|
|
9316
9310
|
return theme.vms.text.white;
|
|
9317
|
-
}, function (
|
|
9318
|
-
var theme =
|
|
9311
|
+
}, function (_ref12) {
|
|
9312
|
+
var theme = _ref12.theme;
|
|
9319
9313
|
return theme.vms.text.white;
|
|
9320
9314
|
});
|
|
9321
9315
|
var Logo = styled.div(_templateObject5$8 || (_templateObject5$8 = _taggedTemplateLiteralLoose(["\n transition: none;\n display: flex;\n width: 100%;\n min-width: max-content;\n height: 32px;\n align-items: center;\n justify-content: center;\n gap: 10px;\n"])));
|
|
9322
|
-
var TextContainer = styled.span(_templateObject6$7 || (_templateObject6$7 = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n padding: ", ";\n font-size: ", ";\n font-weight: ", ";\n
|
|
9323
|
-
var $padding =
|
|
9316
|
+
var TextContainer = styled.span(_templateObject6$7 || (_templateObject6$7 = _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"])), function (_ref13) {
|
|
9317
|
+
var $padding = _ref13.$padding;
|
|
9324
9318
|
return $padding;
|
|
9325
|
-
}, function (
|
|
9326
|
-
var $fontSize =
|
|
9319
|
+
}, function (_ref14) {
|
|
9320
|
+
var $fontSize = _ref14.$fontSize;
|
|
9327
9321
|
return $fontSize || '20px';
|
|
9328
|
-
}, function (
|
|
9329
|
-
var $fontWeight =
|
|
9322
|
+
}, function (_ref15) {
|
|
9323
|
+
var $fontWeight = _ref15.$fontWeight;
|
|
9330
9324
|
return $fontWeight || '500';
|
|
9331
|
-
},
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
}, function (_ref19) {
|
|
9335
|
-
var $isExpanded = _ref19.$isExpanded;
|
|
9336
|
-
return $isExpanded ? 'visible' : 'hidden';
|
|
9337
|
-
}, function (_ref20) {
|
|
9338
|
-
var $isExpanded = _ref20.$isExpanded;
|
|
9339
|
-
return $isExpanded ? 'translateX(0)' : 'translateX(-10px)';
|
|
9340
|
-
});
|
|
9341
|
-
var NotificationBadge = styled.div(_templateObject7$5 || (_templateObject7$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"])), function (_ref21) {
|
|
9342
|
-
var $position = _ref21.$position;
|
|
9325
|
+
}, SidebarContainer);
|
|
9326
|
+
var NotificationBadge = styled.div(_templateObject7$5 || (_templateObject7$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"])), function (_ref16) {
|
|
9327
|
+
var $position = _ref16.$position;
|
|
9343
9328
|
return $position || 'absolute';
|
|
9344
9329
|
});
|
|
9345
|
-
var Sidebar = function Sidebar(
|
|
9346
|
-
var logo =
|
|
9347
|
-
content =
|
|
9348
|
-
background =
|
|
9349
|
-
ProfileContent =
|
|
9350
|
-
|
|
9351
|
-
isExpanded =
|
|
9352
|
-
setIsExpanded =
|
|
9330
|
+
var Sidebar = function Sidebar(_ref17) {
|
|
9331
|
+
var logo = _ref17.logo,
|
|
9332
|
+
content = _ref17.content,
|
|
9333
|
+
background = _ref17.background,
|
|
9334
|
+
ProfileContent = _ref17.ProfileContent,
|
|
9335
|
+
_ref17$isExpanded = _ref17.isExpanded,
|
|
9336
|
+
isExpanded = _ref17$isExpanded === void 0 ? false : _ref17$isExpanded,
|
|
9337
|
+
setIsExpanded = _ref17.setIsExpanded;
|
|
9353
9338
|
var location = useLocation();
|
|
9354
9339
|
var _useState = useState({}),
|
|
9355
9340
|
openMenus = _useState[0],
|
|
@@ -9387,9 +9372,8 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9387
9372
|
return currentBase === getBasePath(child.activeUrl) || currentBase === getBasePath(child.url);
|
|
9388
9373
|
}));
|
|
9389
9374
|
};
|
|
9390
|
-
var ChildLink = React.memo(function (
|
|
9391
|
-
var child =
|
|
9392
|
-
isExpanded = _ref23.isExpanded;
|
|
9375
|
+
var ChildLink = React.memo(function (_ref18) {
|
|
9376
|
+
var child = _ref18.child;
|
|
9393
9377
|
var themeColors = useTheme$1();
|
|
9394
9378
|
var location = useLocation();
|
|
9395
9379
|
var active = getBasePath(location.pathname) === getBasePath(child.activeUrl) || getBasePath(location.pathname) === getBasePath(child.url);
|
|
@@ -9417,7 +9401,6 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9417
9401
|
"$justifyContent": 'space-between',
|
|
9418
9402
|
"$gap": '5px'
|
|
9419
9403
|
}, React.createElement(TextContainer, {
|
|
9420
|
-
"$isExpanded": isExpanded,
|
|
9421
9404
|
"$fontSize": '12px'
|
|
9422
9405
|
}, child.label), _getTotalNotifications(child) > 0 && React.createElement(NotificationBadge, {
|
|
9423
9406
|
"$position": 'unset'
|
|
@@ -9436,14 +9419,14 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9436
9419
|
});
|
|
9437
9420
|
}));
|
|
9438
9421
|
};
|
|
9439
|
-
var SidebarItem = React.memo(function (
|
|
9440
|
-
var item =
|
|
9441
|
-
isActive =
|
|
9442
|
-
isOpen =
|
|
9443
|
-
hasChildren =
|
|
9444
|
-
isExpanded =
|
|
9445
|
-
onToggle =
|
|
9446
|
-
renderChildLinks =
|
|
9422
|
+
var SidebarItem = React.memo(function (_ref19) {
|
|
9423
|
+
var item = _ref19.item,
|
|
9424
|
+
isActive = _ref19.isActive,
|
|
9425
|
+
isOpen = _ref19.isOpen,
|
|
9426
|
+
hasChildren = _ref19.hasChildren,
|
|
9427
|
+
isExpanded = _ref19.isExpanded,
|
|
9428
|
+
onToggle = _ref19.onToggle,
|
|
9429
|
+
renderChildLinks = _ref19.renderChildLinks;
|
|
9447
9430
|
var themeColors = useTheme$1();
|
|
9448
9431
|
var activeClass = isActive ? 'active' : '';
|
|
9449
9432
|
var handleClick = React.useCallback(function () {
|
|
@@ -9478,7 +9461,6 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9478
9461
|
weight: item.iconWeight,
|
|
9479
9462
|
color: isActive ? themeColors.vms.text.white : themeColors.vms.text.medium
|
|
9480
9463
|
})), _getTotalNotifications(item) > 0 && React.createElement(NotificationBadge, null, _getTotalNotifications(item) > 99 ? '99+' : _getTotalNotifications(item))), React.createElement(TextContainer, {
|
|
9481
|
-
"$isExpanded": isExpanded,
|
|
9482
9464
|
"$fontSize": '14px'
|
|
9483
9465
|
}, item.label)), hasChildren && React.createElement(Container, {
|
|
9484
9466
|
"$padding": '9px',
|
|
@@ -9522,7 +9504,6 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9522
9504
|
}, [setIsExpanded]);
|
|
9523
9505
|
return React.createElement(SidebarContainer, {
|
|
9524
9506
|
"$background": background,
|
|
9525
|
-
"$isExpanded": isExpanded,
|
|
9526
9507
|
onMouseEnter: function onMouseEnter() {
|
|
9527
9508
|
return handleSidebarExpansion(true);
|
|
9528
9509
|
},
|
|
@@ -9532,14 +9513,12 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9532
9513
|
}, React.createElement(Container, {
|
|
9533
9514
|
"$flexDirection": 'column',
|
|
9534
9515
|
"$gap": '28px',
|
|
9535
|
-
"$width": '100%'
|
|
9516
|
+
"$width": '100%',
|
|
9517
|
+
"$overflow": 'hidden'
|
|
9536
9518
|
}, logo && (logo.icon ? React.createElement(Logo, null, React.createElement(Icon, {
|
|
9537
9519
|
icon: logo.icon,
|
|
9538
9520
|
color: logo.iconColor
|
|
9539
|
-
}), React.createElement(TextContainer, {
|
|
9540
|
-
"$isExpanded": isExpanded,
|
|
9541
|
-
"$fontWeight": '700'
|
|
9542
|
-
}, logo.name)) : logo.imageDetails && React.createElement(Logo, null, React.createElement("img", {
|
|
9521
|
+
}), React.createElement(TextContainer, null, logo.name)) : logo.imageDetails && React.createElement(Logo, null, React.createElement("img", {
|
|
9543
9522
|
src: logo.imageDetails.url,
|
|
9544
9523
|
alt: logo.imageDetails.altText,
|
|
9545
9524
|
width: logo.imageDetails.width,
|