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.js
CHANGED
|
@@ -9274,86 +9274,71 @@ var ProgressBar = function ProgressBar(_ref3) {
|
|
|
9274
9274
|
};
|
|
9275
9275
|
|
|
9276
9276
|
var _templateObject$n, _templateObject2$j, _templateObject3$c, _templateObject4$9, _templateObject5$8, _templateObject6$7, _templateObject7$5;
|
|
9277
|
-
var SidebarContainer = styled__default.div(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n width:
|
|
9278
|
-
var $
|
|
9279
|
-
|
|
9280
|
-
}, function (_ref2) {
|
|
9281
|
-
var $isExpanded = _ref2.$isExpanded;
|
|
9282
|
-
return $isExpanded ? '400px' : '68px';
|
|
9283
|
-
}, function (_ref3) {
|
|
9284
|
-
var $background = _ref3.$background,
|
|
9285
|
-
theme = _ref3.theme;
|
|
9277
|
+
var SidebarContainer = styled__default.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) {
|
|
9278
|
+
var $background = _ref.$background,
|
|
9279
|
+
theme = _ref.theme;
|
|
9286
9280
|
return $background || theme.vms.accent.softBlue;
|
|
9287
9281
|
});
|
|
9288
|
-
var SidebarLink = styled__default(reactRouterDom.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 (
|
|
9289
|
-
var $padding =
|
|
9282
|
+
var SidebarLink = styled__default(reactRouterDom.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) {
|
|
9283
|
+
var $padding = _ref2.$padding;
|
|
9290
9284
|
return $padding;
|
|
9285
|
+
}, function (_ref3) {
|
|
9286
|
+
var theme = _ref3.theme;
|
|
9287
|
+
return theme.vms.text.medium;
|
|
9288
|
+
}, function (_ref4) {
|
|
9289
|
+
var theme = _ref4.theme;
|
|
9290
|
+
return theme.vms.text.white;
|
|
9291
9291
|
}, function (_ref5) {
|
|
9292
9292
|
var theme = _ref5.theme;
|
|
9293
|
-
return theme.vms.
|
|
9293
|
+
return theme.vms["default"].primary;
|
|
9294
9294
|
}, function (_ref6) {
|
|
9295
9295
|
var theme = _ref6.theme;
|
|
9296
9296
|
return theme.vms.text.white;
|
|
9297
9297
|
}, function (_ref7) {
|
|
9298
9298
|
var theme = _ref7.theme;
|
|
9299
|
-
return theme.vms
|
|
9299
|
+
return theme.vms.text.white;
|
|
9300
9300
|
}, function (_ref8) {
|
|
9301
9301
|
var theme = _ref8.theme;
|
|
9302
|
-
return theme.vms.
|
|
9302
|
+
return theme.vms["default"].primary;
|
|
9303
9303
|
}, function (_ref9) {
|
|
9304
9304
|
var theme = _ref9.theme;
|
|
9305
9305
|
return theme.vms.text.white;
|
|
9306
|
-
}, function (_ref10) {
|
|
9307
|
-
var theme = _ref10.theme;
|
|
9308
|
-
return theme.vms["default"].primary;
|
|
9309
|
-
}, function (_ref11) {
|
|
9310
|
-
var theme = _ref11.theme;
|
|
9311
|
-
return theme.vms.text.white;
|
|
9312
9306
|
});
|
|
9313
|
-
var IconWrapper$2 = styled__default.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 (
|
|
9314
|
-
var $selected =
|
|
9315
|
-
theme =
|
|
9307
|
+
var IconWrapper$2 = styled__default.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) {
|
|
9308
|
+
var $selected = _ref10.$selected,
|
|
9309
|
+
theme = _ref10.theme;
|
|
9316
9310
|
return $selected ? theme.vms["default"].primary : theme.vms["default"].tertiary;
|
|
9317
9311
|
});
|
|
9318
|
-
var StyledContainer = styled__default(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 (
|
|
9319
|
-
var theme =
|
|
9312
|
+
var StyledContainer = styled__default(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) {
|
|
9313
|
+
var theme = _ref11.theme;
|
|
9320
9314
|
return theme.vms.text.white;
|
|
9321
|
-
}, function (
|
|
9322
|
-
var theme =
|
|
9315
|
+
}, function (_ref12) {
|
|
9316
|
+
var theme = _ref12.theme;
|
|
9323
9317
|
return theme.vms.text.white;
|
|
9324
9318
|
});
|
|
9325
9319
|
var Logo = styled__default.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"])));
|
|
9326
|
-
var TextContainer = styled__default.span(_templateObject6$7 || (_templateObject6$7 = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n padding: ", ";\n font-size: ", ";\n font-weight: ", ";\n
|
|
9327
|
-
var $padding =
|
|
9320
|
+
var TextContainer = styled__default.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) {
|
|
9321
|
+
var $padding = _ref13.$padding;
|
|
9328
9322
|
return $padding;
|
|
9329
|
-
}, function (
|
|
9330
|
-
var $fontSize =
|
|
9323
|
+
}, function (_ref14) {
|
|
9324
|
+
var $fontSize = _ref14.$fontSize;
|
|
9331
9325
|
return $fontSize || '20px';
|
|
9332
|
-
}, function (
|
|
9333
|
-
var $fontWeight =
|
|
9326
|
+
}, function (_ref15) {
|
|
9327
|
+
var $fontWeight = _ref15.$fontWeight;
|
|
9334
9328
|
return $fontWeight || '500';
|
|
9335
|
-
},
|
|
9336
|
-
|
|
9337
|
-
|
|
9338
|
-
}, function (_ref19) {
|
|
9339
|
-
var $isExpanded = _ref19.$isExpanded;
|
|
9340
|
-
return $isExpanded ? 'visible' : 'hidden';
|
|
9341
|
-
}, function (_ref20) {
|
|
9342
|
-
var $isExpanded = _ref20.$isExpanded;
|
|
9343
|
-
return $isExpanded ? 'translateX(0)' : 'translateX(-10px)';
|
|
9344
|
-
});
|
|
9345
|
-
var NotificationBadge = styled__default.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) {
|
|
9346
|
-
var $position = _ref21.$position;
|
|
9329
|
+
}, SidebarContainer);
|
|
9330
|
+
var NotificationBadge = styled__default.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) {
|
|
9331
|
+
var $position = _ref16.$position;
|
|
9347
9332
|
return $position || 'absolute';
|
|
9348
9333
|
});
|
|
9349
|
-
var Sidebar = function Sidebar(
|
|
9350
|
-
var logo =
|
|
9351
|
-
content =
|
|
9352
|
-
background =
|
|
9353
|
-
ProfileContent =
|
|
9354
|
-
|
|
9355
|
-
isExpanded =
|
|
9356
|
-
setIsExpanded =
|
|
9334
|
+
var Sidebar = function Sidebar(_ref17) {
|
|
9335
|
+
var logo = _ref17.logo,
|
|
9336
|
+
content = _ref17.content,
|
|
9337
|
+
background = _ref17.background,
|
|
9338
|
+
ProfileContent = _ref17.ProfileContent,
|
|
9339
|
+
_ref17$isExpanded = _ref17.isExpanded,
|
|
9340
|
+
isExpanded = _ref17$isExpanded === void 0 ? false : _ref17$isExpanded,
|
|
9341
|
+
setIsExpanded = _ref17.setIsExpanded;
|
|
9357
9342
|
var location = reactRouterDom.useLocation();
|
|
9358
9343
|
var _useState = React.useState({}),
|
|
9359
9344
|
openMenus = _useState[0],
|
|
@@ -9391,9 +9376,8 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9391
9376
|
return currentBase === getBasePath(child.activeUrl) || currentBase === getBasePath(child.url);
|
|
9392
9377
|
}));
|
|
9393
9378
|
};
|
|
9394
|
-
var ChildLink = React__default.memo(function (
|
|
9395
|
-
var child =
|
|
9396
|
-
isExpanded = _ref23.isExpanded;
|
|
9379
|
+
var ChildLink = React__default.memo(function (_ref18) {
|
|
9380
|
+
var child = _ref18.child;
|
|
9397
9381
|
var themeColors = styled.useTheme();
|
|
9398
9382
|
var location = reactRouterDom.useLocation();
|
|
9399
9383
|
var active = getBasePath(location.pathname) === getBasePath(child.activeUrl) || getBasePath(location.pathname) === getBasePath(child.url);
|
|
@@ -9421,7 +9405,6 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9421
9405
|
"$justifyContent": 'space-between',
|
|
9422
9406
|
"$gap": '5px'
|
|
9423
9407
|
}, React__default.createElement(TextContainer, {
|
|
9424
|
-
"$isExpanded": isExpanded,
|
|
9425
9408
|
"$fontSize": '12px'
|
|
9426
9409
|
}, child.label), _getTotalNotifications(child) > 0 && React__default.createElement(NotificationBadge, {
|
|
9427
9410
|
"$position": 'unset'
|
|
@@ -9440,14 +9423,14 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9440
9423
|
});
|
|
9441
9424
|
}));
|
|
9442
9425
|
};
|
|
9443
|
-
var SidebarItem = React__default.memo(function (
|
|
9444
|
-
var item =
|
|
9445
|
-
isActive =
|
|
9446
|
-
isOpen =
|
|
9447
|
-
hasChildren =
|
|
9448
|
-
isExpanded =
|
|
9449
|
-
onToggle =
|
|
9450
|
-
renderChildLinks =
|
|
9426
|
+
var SidebarItem = React__default.memo(function (_ref19) {
|
|
9427
|
+
var item = _ref19.item,
|
|
9428
|
+
isActive = _ref19.isActive,
|
|
9429
|
+
isOpen = _ref19.isOpen,
|
|
9430
|
+
hasChildren = _ref19.hasChildren,
|
|
9431
|
+
isExpanded = _ref19.isExpanded,
|
|
9432
|
+
onToggle = _ref19.onToggle,
|
|
9433
|
+
renderChildLinks = _ref19.renderChildLinks;
|
|
9451
9434
|
var themeColors = styled.useTheme();
|
|
9452
9435
|
var activeClass = isActive ? 'active' : '';
|
|
9453
9436
|
var handleClick = React__default.useCallback(function () {
|
|
@@ -9482,7 +9465,6 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9482
9465
|
weight: item.iconWeight,
|
|
9483
9466
|
color: isActive ? themeColors.vms.text.white : themeColors.vms.text.medium
|
|
9484
9467
|
})), _getTotalNotifications(item) > 0 && React__default.createElement(NotificationBadge, null, _getTotalNotifications(item) > 99 ? '99+' : _getTotalNotifications(item))), React__default.createElement(TextContainer, {
|
|
9485
|
-
"$isExpanded": isExpanded,
|
|
9486
9468
|
"$fontSize": '14px'
|
|
9487
9469
|
}, item.label)), hasChildren && React__default.createElement(Container, {
|
|
9488
9470
|
"$padding": '9px',
|
|
@@ -9526,7 +9508,6 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9526
9508
|
}, [setIsExpanded]);
|
|
9527
9509
|
return React__default.createElement(SidebarContainer, {
|
|
9528
9510
|
"$background": background,
|
|
9529
|
-
"$isExpanded": isExpanded,
|
|
9530
9511
|
onMouseEnter: function onMouseEnter() {
|
|
9531
9512
|
return handleSidebarExpansion(true);
|
|
9532
9513
|
},
|
|
@@ -9536,14 +9517,12 @@ var Sidebar = function Sidebar(_ref22) {
|
|
|
9536
9517
|
}, React__default.createElement(Container, {
|
|
9537
9518
|
"$flexDirection": 'column',
|
|
9538
9519
|
"$gap": '28px',
|
|
9539
|
-
"$width": '100%'
|
|
9520
|
+
"$width": '100%',
|
|
9521
|
+
"$overflow": 'hidden'
|
|
9540
9522
|
}, logo && (logo.icon ? React__default.createElement(Logo, null, React__default.createElement(Icon, {
|
|
9541
9523
|
icon: logo.icon,
|
|
9542
9524
|
color: logo.iconColor
|
|
9543
|
-
}), React__default.createElement(TextContainer, {
|
|
9544
|
-
"$isExpanded": isExpanded,
|
|
9545
|
-
"$fontWeight": '700'
|
|
9546
|
-
}, logo.name)) : logo.imageDetails && React__default.createElement(Logo, null, React__default.createElement("img", {
|
|
9525
|
+
}), React__default.createElement(TextContainer, null, logo.name)) : logo.imageDetails && React__default.createElement(Logo, null, React__default.createElement("img", {
|
|
9547
9526
|
src: logo.imageDetails.url,
|
|
9548
9527
|
alt: logo.imageDetails.altText,
|
|
9549
9528
|
width: logo.imageDetails.width,
|