@licklist/design 0.78.25 → 0.78.27
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/v2/components/UserPanel/UserPanel.d.ts.map +1 -1
- package/dist/v2/components/UserPanel/UserPanel.js +5 -29
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/DashboardLayout.js +25 -1
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.js +22 -0
- package/dist/v2/navigation/DashboardLayout/ProviderSidebar.scss.js +1 -1
- package/dist/v2/navigation/DashboardLayout/TopNavigation.d.ts.map +1 -1
- package/dist/v2/navigation/DashboardLayout/TopNavigation.js +28 -136
- package/package.json +1 -1
- package/src/v2/components/UserPanel/UserPanel.tsx +6 -12
- package/src/v2/navigation/DashboardLayout/DashboardLayout.tsx +21 -2
- package/src/v2/navigation/DashboardLayout/ProviderSidebar.scss +5 -0
- package/src/v2/navigation/DashboardLayout/ProviderSidebar.tsx +16 -2
- package/src/v2/navigation/DashboardLayout/TopNavigation.tsx +17 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserPanel.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/UserPanel/UserPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"UserPanel.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/UserPanel/UserPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,kBAAkB,CAAA;AAGzB,MAAM,WAAW,cAAc;IAC3B,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;CAC7B;AAqBD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAwF9C,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
3
|
import './UserPanel.scss.js';
|
|
4
|
+
import { UserAvatar } from '../UserAvatar/UserAvatar.js';
|
|
4
5
|
|
|
5
6
|
// Icons as inline SVGs
|
|
6
7
|
var CloseIcon = function() {
|
|
@@ -64,35 +65,10 @@ var UserPanel = function(param) {
|
|
|
64
65
|
/*#__PURE__*/ jsxs("div", {
|
|
65
66
|
className: "user-panel__user-info",
|
|
66
67
|
children: [
|
|
67
|
-
/*#__PURE__*/ jsx(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
alt: "Profile"
|
|
72
|
-
}) : /*#__PURE__*/ jsxs(Fragment, {
|
|
73
|
-
children: [
|
|
74
|
-
/*#__PURE__*/ jsx("svg", {
|
|
75
|
-
width: "32",
|
|
76
|
-
height: "32",
|
|
77
|
-
viewBox: "0 0 32 32",
|
|
78
|
-
fill: "none",
|
|
79
|
-
className: "user-panel__avatar-bg",
|
|
80
|
-
children: /*#__PURE__*/ jsx("circle", {
|
|
81
|
-
cx: "16",
|
|
82
|
-
cy: "16",
|
|
83
|
-
r: "15",
|
|
84
|
-
fill: "var(--fills-main-fill-secondary, #626A90)",
|
|
85
|
-
fillOpacity: "0.2",
|
|
86
|
-
stroke: "var(--fills-main-fill-secondary, #626A90)",
|
|
87
|
-
strokeWidth: "2"
|
|
88
|
-
})
|
|
89
|
-
}),
|
|
90
|
-
/*#__PURE__*/ jsx("span", {
|
|
91
|
-
className: "user-panel__avatar-initials",
|
|
92
|
-
children: displayInitials
|
|
93
|
-
})
|
|
94
|
-
]
|
|
95
|
-
})
|
|
68
|
+
/*#__PURE__*/ jsx(UserAvatar, {
|
|
69
|
+
initials: displayInitials,
|
|
70
|
+
avatarUrl: avatarUrl || undefined,
|
|
71
|
+
size: "md"
|
|
96
72
|
}),
|
|
97
73
|
/*#__PURE__*/ jsxs("div", {
|
|
98
74
|
className: "user-panel__user-details",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardLayout.d.ts","sourceRoot":"","sources":["../../../../src/v2/navigation/DashboardLayout/DashboardLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DashboardLayout.d.ts","sourceRoot":"","sources":["../../../../src/v2/navigation/DashboardLayout/DashboardLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAE/D,OAAO,EAAmB,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAG5D,OAAO,wBAAwB,CAAA;AAE/B,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAA;AAE9D,MAAM,WAAW,oBAAoB;IAEjC,WAAW,EAAE,eAAe,CAAA;IAE5B,eAAe,CAAC,EAAE,OAAO,CAAA;IAEzB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAE5B,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,YAAY,CAAC,EAAE,OAAO,GAAG,UAAU,CAAA;IAEnC,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAErC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IAExB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IAEzB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IAExB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IAExB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;IAE3B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAE1B,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;CACvB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA0J1D,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useState } from 'react';
|
|
2
|
+
import { useState, useCallback, useEffect } from 'react';
|
|
3
3
|
import { TopNavigation } from './TopNavigation.js';
|
|
4
4
|
import { ProviderSidebar } from './ProviderSidebar.js';
|
|
5
5
|
import { AdminSidebar } from './AdminSidebar.js';
|
|
@@ -55,6 +55,28 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
55
55
|
var DashboardLayout = function(param) {
|
|
56
56
|
var destination = param.destination, sidebarExpanded = param.sidebarExpanded, onSidebarToggle = param.onSidebarToggle, providerName = param.providerName, providerId = param.providerId, providerImage = param.providerImage, _param_providerType = param.providerType, providerType = _param_providerType === void 0 ? 'venue' : _param_providerType, companyName = param.companyName, companyId = param.companyId, companyImage = param.companyImage, userInitials = param.userInitials, userName = param.userName, userEmail = param.userEmail, userId = param.userId, userRole = param.userRole, _param_inboxCount = param.inboxCount, inboxCount = _param_inboxCount === void 0 ? 0 : _param_inboxCount, _param_bellCount = param.bellCount, bellCount = _param_bellCount === void 0 ? 0 : _param_bellCount, _param_activePath = param.activePath, activePath = _param_activePath === void 0 ? '/home' : _param_activePath, onNavigation = param.onNavigation, onUserClick = param.onUserClick, onInboxClick = param.onInboxClick, onBellClick = param.onBellClick, onHelpClick = param.onHelpClick, onProfileClick = param.onProfileClick, onLogoutClick = param.onLogoutClick, _param_hasAdminAccess = param.hasAdminAccess, hasAdminAccess = _param_hasAdminAccess === void 0 ? false : _param_hasAdminAccess, children = param.children, _param_isMobile = param.isMobile, isMobile = _param_isMobile === void 0 ? false : _param_isMobile, version = param.version, _param_showFooter = param.showFooter, showFooter = _param_showFooter === void 0 ? true : _param_showFooter, _param_userPanelOpen = param.userPanelOpen, userPanelOpen = _param_userPanelOpen === void 0 ? false : _param_userPanelOpen, navItems = param.navItems;
|
|
57
57
|
var _useState = _sliced_to_array(useState(false), 2), mobileMenuOpen = _useState[0], setMobileMenuOpen = _useState[1];
|
|
58
|
+
var handleKeyDown = useCallback(function(event) {
|
|
59
|
+
var target = event.target;
|
|
60
|
+
if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (event.key === '[' && sidebarExpanded) {
|
|
64
|
+
onSidebarToggle === null || onSidebarToggle === void 0 ? void 0 : onSidebarToggle();
|
|
65
|
+
} else if (event.key === ']' && !sidebarExpanded) {
|
|
66
|
+
onSidebarToggle === null || onSidebarToggle === void 0 ? void 0 : onSidebarToggle();
|
|
67
|
+
}
|
|
68
|
+
}, [
|
|
69
|
+
sidebarExpanded,
|
|
70
|
+
onSidebarToggle
|
|
71
|
+
]);
|
|
72
|
+
useEffect(function() {
|
|
73
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
74
|
+
return function() {
|
|
75
|
+
return document.removeEventListener('keydown', handleKeyDown);
|
|
76
|
+
};
|
|
77
|
+
}, [
|
|
78
|
+
handleKeyDown
|
|
79
|
+
]);
|
|
58
80
|
var handleSidebarToggle = function() {
|
|
59
81
|
if (isMobile) {
|
|
60
82
|
setMobileMenuOpen(!mobileMenuOpen);
|
|
@@ -124,6 +146,7 @@ var DashboardLayout = function(param) {
|
|
|
124
146
|
children: renderSidebar()
|
|
125
147
|
}),
|
|
126
148
|
/*#__PURE__*/ jsxs("main", {
|
|
149
|
+
id: "scrollable",
|
|
127
150
|
className: "dashboard-layout__main",
|
|
128
151
|
style: {
|
|
129
152
|
marginLeft: isMobile ? 0 : sidebarWidth,
|
|
@@ -131,6 +154,7 @@ var DashboardLayout = function(param) {
|
|
|
131
154
|
},
|
|
132
155
|
children: [
|
|
133
156
|
/*#__PURE__*/ jsx("div", {
|
|
157
|
+
id: "main",
|
|
134
158
|
className: "dashboard-layout__content",
|
|
135
159
|
children: children
|
|
136
160
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderSidebar.d.ts","sourceRoot":"","sources":["../../../../src/v2/navigation/DashboardLayout/ProviderSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,wBAAwB,CAAA;AAI/B,MAAM,WAAW,OAAO;IACpB,EAAE,E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Aa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,YAAY,GACf,CAAA;AAgBD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAyI1D,CAAA"}
|
|
@@ -275,6 +275,17 @@ var ProviderSidebar = function(param) {
|
|
|
275
275
|
})),
|
|
276
276
|
expanded ? /*#__PURE__*/ jsx("div", {
|
|
277
277
|
className: "provider-sidebar__header",
|
|
278
|
+
onClick: function() {
|
|
279
|
+
return handleNavClick('/profile');
|
|
280
|
+
},
|
|
281
|
+
role: "button",
|
|
282
|
+
tabIndex: 0,
|
|
283
|
+
onKeyDown: function(e) {
|
|
284
|
+
return e.key === 'Enter' && handleNavClick('/profile');
|
|
285
|
+
},
|
|
286
|
+
style: {
|
|
287
|
+
cursor: 'pointer'
|
|
288
|
+
},
|
|
278
289
|
children: /*#__PURE__*/ jsx(EntityHeader, {
|
|
279
290
|
name: providerName,
|
|
280
291
|
id: providerId,
|
|
@@ -290,6 +301,17 @@ var ProviderSidebar = function(param) {
|
|
|
290
301
|
delayDuration: 100,
|
|
291
302
|
children: /*#__PURE__*/ jsx("div", {
|
|
292
303
|
className: "provider-sidebar__header provider-sidebar__header--collapsed",
|
|
304
|
+
onClick: function() {
|
|
305
|
+
return handleNavClick('/profile');
|
|
306
|
+
},
|
|
307
|
+
role: "button",
|
|
308
|
+
tabIndex: 0,
|
|
309
|
+
onKeyDown: function(e) {
|
|
310
|
+
return e.key === 'Enter' && handleNavClick('/profile');
|
|
311
|
+
},
|
|
312
|
+
style: {
|
|
313
|
+
cursor: 'pointer'
|
|
314
|
+
},
|
|
293
315
|
children: /*#__PURE__*/ jsx(EntityHeader, {
|
|
294
316
|
name: providerName,
|
|
295
317
|
id: providerId,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '/opt/atlassian/pipelines/agent/build/node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".provider-sidebar{align-items:flex-start;background:var(--surfaces-main-background-secondary,#f8f8fa);border-right:1px solid var(--borders-main-border-primary,#e8e9ef);box-sizing:border-box;display:flex;flex-direction:column;height:100%;overflow-y:auto;padding:8px;transition:width .3s ease}.provider-sidebar--expanded{width:268px}.provider-sidebar--collapsed{width:72px}@media (max-width:640px){.provider-sidebar{border-right:none;width:100%!important}}.provider-sidebar__content{display:flex;flex-direction:column;gap:4px;width:100%}.provider-sidebar__back-link{align-items:center;border-radius:8px;box-sizing:border-box;color:var(--fills-main-fill-primary,#14215a);cursor:pointer;display:flex;gap:8px;padding:8px;transition:all .2s ease;width:100%}.provider-sidebar__back-link:hover{background:var(--surfaces-main-background-secondary-hover,#f0f0f4)}.provider-sidebar__back-link:hover .provider-sidebar__icon--back .back-icon-default{display:none}.provider-sidebar__back-link:hover .provider-sidebar__icon--back .back-icon-hover{display:block}.provider-sidebar__back-link:active{background:var(--surfaces-main-background-secondary-pressed,#e8e8ec)}.provider-sidebar__back-link--collapsed{justify-content:center}.provider-sidebar__header{align-items:center;box-sizing:border-box;display:flex;width:100%}.provider-sidebar__header--collapsed{justify-content:center}.provider-sidebar__avatar{align-items:center;border-radius:50%;display:flex;flex-shrink:0;height:47px;justify-content:center;overflow:hidden;position:relative;width:47px}.provider-sidebar__avatar img{height:100%;object-fit:cover;width:100%}.provider-sidebar__avatar-placeholder{align-items:center;display:flex;height:100%;justify-content:center;position:relative;width:100%}.provider-sidebar__avatar-placeholder:before{background:#626a9033;border:2px solid var(--fills-main-fill-secondary,#626a90);border-radius:50%;content:\"\";inset:0;position:absolute}.provider-sidebar__avatar-placeholder span{color:var(--labels-main-label-secondary,#626a90);font-family:Geist,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:18px;font-weight:700;position:relative;z-index:1}.provider-sidebar__header-text{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}.provider-sidebar__title{color:var(--labels-main-label-primary,#121e52);font-family:Geist,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:15px;font-weight:600;line-height:18px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.provider-sidebar__badge{align-items:center;background:var(--surfaces-main-background-tertiary,#e8e9ef);border-radius:8px;display:inline-flex;justify-content:center;padding:4px 8px;transition:background .2s ease;width:fit-content}.provider-sidebar__header:hover .provider-sidebar__badge{background:var(--surfaces-main-background-tertiary-hover,#dcdde3)}.provider-sidebar__badge span{color:var(--labels-main-label-secondary,#626a90);font-family:Geist Mono,SF Mono,Consolas,monospace;font-size:10px;font-weight:600;line-height:12px;white-space:nowrap}.provider-sidebar__nav{display:flex;flex-direction:column;gap:4px;padding-top:8px;width:100%}.provider-sidebar__link{align-items:center;border-radius:8px;box-sizing:border-box;color:var(--fills-main-fill-primary,#14215a);cursor:pointer;display:flex;gap:8px;outline:none;padding:8px;text-decoration:none;transition:all .2s ease;width:100%}.provider-sidebar__link:hover:not(.provider-sidebar__link--active){background:var(--surfaces-main-background-secondary-hover,#f0f0f4)}.provider-sidebar__link:active:not(.provider-sidebar__link--active){background:var(--surfaces-main-background-secondary-pressed,#e8e8ec)}.provider-sidebar__link:focus-visible{outline:2px solid var(--fills-main-fill-primary,#14215a);outline-offset:2px}.provider-sidebar__link--collapsed{justify-content:center}.provider-sidebar__link--active{background:linear-gradient(to top right,var(--gradient-stop3,#0e8ce2) 0,var(--gradient-stop2,#5d5bf4) 50%,var(--gradient-stop1,#6200ee) 100%);color:#fff;cursor:default}.provider-sidebar__link--active .provider-sidebar__icon{color:#fff}.provider-sidebar__link--active .provider-sidebar__icon svg path{fill:#fff}.provider-sidebar__link--active .provider-sidebar__link-text{color:#fff}.provider-sidebar__icon{align-items:center;display:flex;flex-shrink:0;height:24px;justify-content:center;width:24px}.provider-sidebar__icon svg{height:100%;width:100%}.provider-sidebar__icon--back .back-icon-default{display:block}.provider-sidebar__icon--back .back-icon-hover{display:none}.provider-sidebar__link-text{color:var(--labels-main-label-primary,#121e52);font-family:Geist,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:13px;font-weight:500;line-height:16px;margin:0;white-space:nowrap}";
|
|
3
|
+
var css_248z = ".provider-sidebar{align-items:flex-start;background:var(--surfaces-main-background-secondary,#f8f8fa);border-right:1px solid var(--borders-main-border-primary,#e8e9ef);box-sizing:border-box;display:flex;flex-direction:column;height:100%;overflow-y:auto;padding:8px;transition:width .3s ease}.provider-sidebar--expanded{width:268px}.provider-sidebar--collapsed{width:72px}@media (max-width:640px){.provider-sidebar{border-right:none;width:100%!important}}.provider-sidebar__content{display:flex;flex-direction:column;gap:4px;width:100%}.provider-sidebar__back-link{align-items:center;border-radius:8px;box-sizing:border-box;color:var(--fills-main-fill-primary,#14215a);cursor:pointer;display:flex;gap:8px;padding:8px;transition:all .2s ease;width:100%}.provider-sidebar__back-link:hover{background:var(--surfaces-main-background-secondary-hover,#f0f0f4)}.provider-sidebar__back-link:hover .provider-sidebar__icon--back .back-icon-default{display:none}.provider-sidebar__back-link:hover .provider-sidebar__icon--back .back-icon-hover{display:block}.provider-sidebar__back-link:active{background:var(--surfaces-main-background-secondary-pressed,#e8e8ec)}.provider-sidebar__back-link--collapsed{justify-content:center}.provider-sidebar__header{align-items:center;box-sizing:border-box;display:flex;width:100%}.provider-sidebar__header--collapsed{justify-content:center}.provider-sidebar__avatar{align-items:center;border-radius:50%;display:flex;flex-shrink:0;height:47px;justify-content:center;overflow:hidden;position:relative;width:47px}.provider-sidebar__avatar img{height:100%;object-fit:cover;width:100%}.provider-sidebar__avatar-placeholder{align-items:center;display:flex;height:100%;justify-content:center;position:relative;width:100%}.provider-sidebar__avatar-placeholder:before{background:#626a9033;border:2px solid var(--fills-main-fill-secondary,#626a90);border-radius:50%;content:\"\";inset:0;position:absolute}.provider-sidebar__avatar-placeholder span{color:var(--labels-main-label-secondary,#626a90);font-family:Geist,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:18px;font-weight:700;position:relative;z-index:1}.provider-sidebar__header-text{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}.provider-sidebar__title{color:var(--labels-main-label-primary,#121e52);font-family:Geist,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:15px;font-weight:600;line-height:18px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.provider-sidebar__badge{align-items:center;background:var(--surfaces-main-background-tertiary,#e8e9ef);border-radius:8px;display:inline-flex;justify-content:center;padding:4px 8px;transition:background .2s ease;width:fit-content}.provider-sidebar__header:hover .provider-sidebar__badge{background:var(--surfaces-main-background-tertiary-hover,#dcdde3)}.provider-sidebar__badge span{color:var(--labels-main-label-secondary,#626a90);font-family:Geist Mono,SF Mono,Consolas,monospace;font-size:10px;font-weight:600;line-height:12px;white-space:nowrap}.provider-sidebar__nav{display:flex;flex-direction:column;gap:4px;padding-top:8px;width:100%}.provider-sidebar__link{align-items:center;border-radius:8px;box-sizing:border-box;color:var(--fills-main-fill-primary,#14215a);cursor:pointer;display:flex;gap:8px;outline:none;padding:8px;text-decoration:none;transition:all .2s ease;width:100%}.provider-sidebar__link:hover:not(.provider-sidebar__link--active){background:var(--surfaces-main-background-secondary-hover,#f0f0f4)}.provider-sidebar__link:active:not(.provider-sidebar__link--active){background:var(--surfaces-main-background-secondary-pressed,#e8e8ec)}.provider-sidebar__link:focus-visible{outline:2px solid var(--fills-main-fill-primary,#14215a);outline-offset:2px}.provider-sidebar__link--collapsed{justify-content:center}.provider-sidebar__link--active{background:linear-gradient(to top right,var(--gradient-stop3,#0e8ce2) 0,var(--gradient-stop2,#5d5bf4) 50%,var(--gradient-stop1,#6200ee) 100%);color:#fff;cursor:default}.provider-sidebar__link--active .provider-sidebar__icon{color:#fff}.provider-sidebar__link--active .provider-sidebar__icon svg path{fill:#fff}.provider-sidebar__link--active .provider-sidebar__link-text{color:#fff}.provider-sidebar__icon{align-items:center;color:var(--fills-main-fill-primary,#14215a);display:flex;flex-shrink:0;height:24px;justify-content:center;width:24px}.provider-sidebar__icon svg{height:100%;width:100%}.provider-sidebar__icon svg path{fill:var(--fills-main-fill-primary,#14215a)}.provider-sidebar__icon--back .back-icon-default{display:block}.provider-sidebar__icon--back .back-icon-hover{display:none}.provider-sidebar__link-text{color:var(--labels-main-label-primary,#121e52);font-family:Geist,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:13px;font-weight:500;line-height:16px;margin:0;white-space:nowrap}";
|
|
4
4
|
styleInject(css_248z);
|
|
5
5
|
|
|
6
6
|
export { css_248z as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNavigation.d.ts","sourceRoot":"","sources":["../../../../src/v2/navigation/DashboardLayout/TopNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,sBAAsB,CAAA;AAM7B,MAAM,WAAW,kBAAkB;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,kBAAk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AC,kBAAkB,CAsJtD,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import './TopNavigation.scss.js';
|
|
4
4
|
import img from './assets/BookedLogo_Mark.png.js';
|
|
@@ -110,68 +110,6 @@ var SidebarCollapsedIcon = function() {
|
|
|
110
110
|
]
|
|
111
111
|
});
|
|
112
112
|
};
|
|
113
|
-
var InboxIcon = function(param) {
|
|
114
|
-
var active = param.active, hovered = param.hovered;
|
|
115
|
-
return /*#__PURE__*/ jsxs("svg", {
|
|
116
|
-
width: "32",
|
|
117
|
-
height: "32",
|
|
118
|
-
viewBox: "0 0 32 32",
|
|
119
|
-
fill: "none",
|
|
120
|
-
children: [
|
|
121
|
-
hovered && !active && /*#__PURE__*/ jsx("path", {
|
|
122
|
-
d: "M11 10H21L22.5 18H19L18 20L16 20.5L14 20L13 18H9.5L11 10Z",
|
|
123
|
-
fill: "var(--fills-main-fill-secondary, #626A90)",
|
|
124
|
-
fillOpacity: "0.3"
|
|
125
|
-
}),
|
|
126
|
-
active && /*#__PURE__*/ jsx("path", {
|
|
127
|
-
d: "M11 10H21L22.5 18H19L18 20L16 20.5L14 20L13 18H9.5L11 10Z",
|
|
128
|
-
fill: "white",
|
|
129
|
-
fillOpacity: "0.3"
|
|
130
|
-
}),
|
|
131
|
-
/*#__PURE__*/ jsx("path", {
|
|
132
|
-
d: "M8.02381 7.78307C8.12549 7.32553 8.5313 7 9 7H23C23.4687 7 23.8745 7.32553 23.9762 7.78307L25.9762 16.7831C25.992 16.8543 26 16.927 26 17V24C26 24.5523 25.5523 25 25 25H7C6.44772 25 6 24.5523 6 24V17C6 16.927 6.00799 16.8543 6.02381 16.7831L8.02381 7.78307ZM9.80217 9L8.24662 16H13C13 17.6569 14.3431 19 16 19C17.6569 19 19 17.6569 19 16H23.7534L22.1978 9H9.80217ZM20.584 18C19.8124 19.7659 18.0503 21 16 21C13.9497 21 12.1876 19.7659 11.416 18H8V23H24V18H20.584Z",
|
|
133
|
-
fill: active ? 'white' : 'var(--fills-main-fill-secondary, #626A90)'
|
|
134
|
-
})
|
|
135
|
-
]
|
|
136
|
-
});
|
|
137
|
-
};
|
|
138
|
-
var NotificationIcon = function(param) {
|
|
139
|
-
var active = param.active, hovered = param.hovered;
|
|
140
|
-
if (active) {
|
|
141
|
-
return /*#__PURE__*/ jsx("svg", {
|
|
142
|
-
width: "32",
|
|
143
|
-
height: "32",
|
|
144
|
-
viewBox: "0 0 32 32",
|
|
145
|
-
fill: "none",
|
|
146
|
-
children: /*#__PURE__*/ jsx("path", {
|
|
147
|
-
d: "M22 14C22 10.6863 19.3137 8 16 8C12.6863 8 10 10.6863 10 14V22H22V14ZM24 22.6667L24.4 23.2C24.5657 23.4209 24.5209 23.7343 24.3 23.9C24.2135 23.9649 24.1082 24 24 24H8C7.72386 24 7.5 23.7761 7.5 23.5C7.5 23.3918 7.53509 23.2865 7.6 23.2L8 22.6667V14C8 9.58172 11.5817 6 16 6C20.4183 6 24 9.58172 24 14V22.6667ZM13.5 25H18.5C18.5 26.3807 17.3807 27.5 16 27.5C14.6193 27.5 13.5 26.3807 13.5 25Z",
|
|
148
|
-
fill: "white"
|
|
149
|
-
})
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
if (hovered) {
|
|
153
|
-
return /*#__PURE__*/ jsx("svg", {
|
|
154
|
-
width: "32",
|
|
155
|
-
height: "32",
|
|
156
|
-
viewBox: "0 0 32 32",
|
|
157
|
-
fill: "none",
|
|
158
|
-
children: /*#__PURE__*/ jsx("path", {
|
|
159
|
-
d: "M22.4874 15.5353C23.2901 12.3202 21.3346 9.06324 18.1196 8.26054C14.9045 7.45785 11.6475 9.41342 10.8448 12.6284L8.90696 20.3902L20.5496 23.297L22.4874 15.5353ZM22.3285 24.4283L22.5874 25.0426C22.6947 25.2971 22.5753 25.5903 22.3208 25.6976C22.2212 25.7396 22.1105 25.7481 22.0055 25.7219L6.48205 21.8461C6.21413 21.7792 6.05118 21.5078 6.11806 21.2399C6.14427 21.1349 6.20382 21.0413 6.28775 20.9731L6.80502 20.5525L8.9044 12.144C9.97467 7.85727 14.3173 5.24985 18.604 6.32011C22.8907 7.39038 25.4981 11.733 24.4279 16.0197L22.3285 24.4283ZM15.4569 25.1176L20.308 26.3288C19.9735 27.6683 18.6164 28.4832 17.2768 28.1487C15.9373 27.8143 15.1224 26.4572 15.4569 25.1176Z",
|
|
160
|
-
fill: "var(--fills-main-fill-secondary, #626A90)"
|
|
161
|
-
})
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
return /*#__PURE__*/ jsx("svg", {
|
|
165
|
-
width: "32",
|
|
166
|
-
height: "32",
|
|
167
|
-
viewBox: "0 0 32 32",
|
|
168
|
-
fill: "none",
|
|
169
|
-
children: /*#__PURE__*/ jsx("path", {
|
|
170
|
-
d: "M22 14C22 10.6863 19.3137 8 16 8C12.6863 8 10 10.6863 10 14V22H22V14ZM24 22.6667L24.4 23.2C24.5657 23.4209 24.5209 23.7343 24.3 23.9C24.2135 23.9649 24.1082 24 24 24H8C7.72386 24 7.5 23.7761 7.5 23.5C7.5 23.3918 7.53509 23.2865 7.6 23.2L8 22.6667V14C8 9.58172 11.5817 6 16 6C20.4183 6 24 9.58172 24 14V22.6667ZM13.5 25H18.5C18.5 26.3807 17.3807 27.5 16 27.5C14.6193 27.5 13.5 26.3807 13.5 25Z",
|
|
171
|
-
fill: "var(--fills-main-fill-secondary, #626A90)"
|
|
172
|
-
})
|
|
173
|
-
});
|
|
174
|
-
};
|
|
175
113
|
var HelpIcon = function(param) {
|
|
176
114
|
var hovered = param.hovered;
|
|
177
115
|
return /*#__PURE__*/ jsxs("svg", {
|
|
@@ -299,16 +237,12 @@ var CloseIcon = function() {
|
|
|
299
237
|
});
|
|
300
238
|
};
|
|
301
239
|
var TopNavigation = function(param) {
|
|
302
|
-
var _param_sidebarCollapsed = param.sidebarCollapsed, sidebarCollapsed = _param_sidebarCollapsed === void 0 ? false : _param_sidebarCollapsed, onSidebarToggle = param.onSidebarToggle, _param_userInitials = param.userInitials, userInitials = _param_userInitials === void 0 ? 'U' : _param_userInitials, _param_userName = param.userName, userName = _param_userName === void 0 ? 'User' : _param_userName, userEmail = param.userEmail, userAvatarUrl = param.userAvatarUrl, userId = param.userId, userRole = param.userRole
|
|
240
|
+
var _param_sidebarCollapsed = param.sidebarCollapsed, sidebarCollapsed = _param_sidebarCollapsed === void 0 ? false : _param_sidebarCollapsed, onSidebarToggle = param.onSidebarToggle, _param_userInitials = param.userInitials, userInitials = _param_userInitials === void 0 ? 'U' : _param_userInitials, _param_userName = param.userName, userName = _param_userName === void 0 ? 'User' : _param_userName, userEmail = param.userEmail, userAvatarUrl = param.userAvatarUrl, userId = param.userId, userRole = param.userRole; param.inboxCount; param.notificationCount; var onUserClick = param.onUserClick; param.onInboxClick; param.onNotificationClick; var onHelpClick = param.onHelpClick, onProfileClick = param.onProfileClick, onLogoutClick = param.onLogoutClick, _param_mobileMenuOpen = param.mobileMenuOpen, mobileMenuOpen = _param_mobileMenuOpen === void 0 ? false : _param_mobileMenuOpen, onMobileMenuToggle = param.onMobileMenuToggle, _param_sidebarToggleDisabled = param.sidebarToggleDisabled, sidebarToggleDisabled = _param_sidebarToggleDisabled === void 0 ? false : _param_sidebarToggleDisabled, _param_userPanelOpen = param.userPanelOpen, userPanelOpen = _param_userPanelOpen === void 0 ? false : _param_userPanelOpen;
|
|
303
241
|
var _useState = _sliced_to_array(useState(null), 2), hoveredItem = _useState[0], setHoveredItem = _useState[1];
|
|
304
|
-
var _useState1 = _sliced_to_array(useState(false), 2)
|
|
242
|
+
var _useState1 = _sliced_to_array(useState(false), 2); _useState1[0]; _useState1[1];
|
|
305
243
|
var handleUserClick = function() {
|
|
306
244
|
onUserClick === null || onUserClick === void 0 ? void 0 : onUserClick();
|
|
307
245
|
};
|
|
308
|
-
var handleNotificationClick = function() {
|
|
309
|
-
setIsNotificationActive(!isNotificationActive);
|
|
310
|
-
onNotificationClick === null || onNotificationClick === void 0 ? void 0 : onNotificationClick();
|
|
311
|
-
};
|
|
312
246
|
return /*#__PURE__*/ jsxs("header", {
|
|
313
247
|
className: "top-navigation",
|
|
314
248
|
children: [
|
|
@@ -322,13 +256,31 @@ var TopNavigation = function(param) {
|
|
|
322
256
|
disabled: sidebarToggleDisabled,
|
|
323
257
|
children: mobileMenuOpen ? /*#__PURE__*/ jsx(CloseIcon, {}) : /*#__PURE__*/ jsx(BurgerIcon, {})
|
|
324
258
|
}),
|
|
325
|
-
/*#__PURE__*/ jsx(
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
259
|
+
/*#__PURE__*/ jsx(Tooltip, {
|
|
260
|
+
content: sidebarCollapsed ? /*#__PURE__*/ jsxs(Fragment, {
|
|
261
|
+
children: [
|
|
262
|
+
"Expand ",
|
|
263
|
+
/*#__PURE__*/ jsx("strong", {
|
|
264
|
+
children: "]"
|
|
265
|
+
})
|
|
266
|
+
]
|
|
267
|
+
}) : /*#__PURE__*/ jsxs(Fragment, {
|
|
268
|
+
children: [
|
|
269
|
+
"Collapse ",
|
|
270
|
+
/*#__PURE__*/ jsx("strong", {
|
|
271
|
+
children: "["
|
|
272
|
+
})
|
|
273
|
+
]
|
|
274
|
+
}),
|
|
275
|
+
side: "bottom",
|
|
276
|
+
sideOffset: 8,
|
|
277
|
+
children: /*#__PURE__*/ jsx("button", {
|
|
278
|
+
className: "top-navigation__toggle top-navigation__toggle--desktop ".concat(sidebarToggleDisabled ? 'top-navigation__toggle--disabled' : ''),
|
|
279
|
+
onClick: sidebarToggleDisabled ? undefined : onSidebarToggle,
|
|
280
|
+
"aria-label": "Toggle sidebar",
|
|
281
|
+
disabled: sidebarToggleDisabled,
|
|
282
|
+
children: sidebarCollapsed ? /*#__PURE__*/ jsx(SidebarCollapsedIcon, {}) : /*#__PURE__*/ jsx(SidebarOpenIcon, {})
|
|
283
|
+
})
|
|
332
284
|
}),
|
|
333
285
|
/*#__PURE__*/ jsx("img", {
|
|
334
286
|
src: img,
|
|
@@ -364,66 +316,6 @@ var TopNavigation = function(param) {
|
|
|
364
316
|
})
|
|
365
317
|
})
|
|
366
318
|
}),
|
|
367
|
-
/*#__PURE__*/ jsx(Tooltip, {
|
|
368
|
-
content: "Inbox",
|
|
369
|
-
side: "bottom",
|
|
370
|
-
sideOffset: 8,
|
|
371
|
-
children: /*#__PURE__*/ jsxs("button", {
|
|
372
|
-
className: "top-navigation__button",
|
|
373
|
-
onMouseEnter: function() {
|
|
374
|
-
return setHoveredItem('inbox');
|
|
375
|
-
},
|
|
376
|
-
onMouseLeave: function() {
|
|
377
|
-
return setHoveredItem(null);
|
|
378
|
-
},
|
|
379
|
-
onClick: onInboxClick,
|
|
380
|
-
children: [
|
|
381
|
-
/*#__PURE__*/ jsx("div", {
|
|
382
|
-
className: "top-navigation__icon",
|
|
383
|
-
children: /*#__PURE__*/ jsx(InboxIcon, {
|
|
384
|
-
hovered: hoveredItem === 'inbox'
|
|
385
|
-
})
|
|
386
|
-
}),
|
|
387
|
-
inboxCount > 0 && /*#__PURE__*/ jsx("div", {
|
|
388
|
-
className: "top-navigation__badge top-navigation__badge--green",
|
|
389
|
-
children: /*#__PURE__*/ jsx("span", {
|
|
390
|
-
children: inboxCount
|
|
391
|
-
})
|
|
392
|
-
})
|
|
393
|
-
]
|
|
394
|
-
})
|
|
395
|
-
}),
|
|
396
|
-
/*#__PURE__*/ jsx(Tooltip, {
|
|
397
|
-
content: "Notifications",
|
|
398
|
-
side: "bottom",
|
|
399
|
-
sideOffset: 8,
|
|
400
|
-
disabled: isNotificationActive,
|
|
401
|
-
children: /*#__PURE__*/ jsxs("button", {
|
|
402
|
-
className: "top-navigation__button ".concat(isNotificationActive ? 'top-navigation__button--active' : ''),
|
|
403
|
-
onMouseEnter: function() {
|
|
404
|
-
return setHoveredItem('notifications');
|
|
405
|
-
},
|
|
406
|
-
onMouseLeave: function() {
|
|
407
|
-
return setHoveredItem(null);
|
|
408
|
-
},
|
|
409
|
-
onClick: handleNotificationClick,
|
|
410
|
-
children: [
|
|
411
|
-
/*#__PURE__*/ jsx("div", {
|
|
412
|
-
className: "top-navigation__icon",
|
|
413
|
-
children: /*#__PURE__*/ jsx(NotificationIcon, {
|
|
414
|
-
active: isNotificationActive,
|
|
415
|
-
hovered: hoveredItem === 'notifications'
|
|
416
|
-
})
|
|
417
|
-
}),
|
|
418
|
-
notificationCount > 0 && /*#__PURE__*/ jsx("div", {
|
|
419
|
-
className: "top-navigation__badge ".concat(isNotificationActive ? 'top-navigation__badge--active' : 'top-navigation__badge--orange'),
|
|
420
|
-
children: /*#__PURE__*/ jsx("span", {
|
|
421
|
-
children: notificationCount
|
|
422
|
-
})
|
|
423
|
-
})
|
|
424
|
-
]
|
|
425
|
-
})
|
|
426
|
-
}),
|
|
427
319
|
/*#__PURE__*/ jsx(Tooltip, {
|
|
428
320
|
content: "Help & FAQ's",
|
|
429
321
|
side: "bottom",
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import './UserPanel.scss'
|
|
3
|
+
import { UserAvatar } from '../UserAvatar'
|
|
3
4
|
|
|
4
5
|
export interface UserPanelProps {
|
|
5
6
|
isOpen: boolean
|
|
@@ -68,18 +69,11 @@ export const UserPanel: React.FC<UserPanelProps> = ({
|
|
|
68
69
|
{/* Header */}
|
|
69
70
|
<div className="user-panel__header">
|
|
70
71
|
<div className="user-panel__user-info">
|
|
71
|
-
<
|
|
72
|
-
{
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" className="user-panel__avatar-bg">
|
|
77
|
-
<circle cx="16" cy="16" r="15" fill="var(--fills-main-fill-secondary, #626A90)" fillOpacity="0.2" stroke="var(--fills-main-fill-secondary, #626A90)" strokeWidth="2" />
|
|
78
|
-
</svg>
|
|
79
|
-
<span className="user-panel__avatar-initials">{displayInitials}</span>
|
|
80
|
-
</>
|
|
81
|
-
)}
|
|
82
|
-
</div>
|
|
72
|
+
<UserAvatar
|
|
73
|
+
initials={displayInitials}
|
|
74
|
+
avatarUrl={avatarUrl || undefined}
|
|
75
|
+
size="md"
|
|
76
|
+
/>
|
|
83
77
|
<div className="user-panel__user-details">
|
|
84
78
|
<h2 className="user-panel__greeting">Hey {displayFirstName}</h2>
|
|
85
79
|
{email && (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
1
|
+
import React, { useState, useEffect, useCallback } from 'react'
|
|
2
2
|
import { TopNavigation } from './TopNavigation'
|
|
3
3
|
import { ProviderSidebar, NavItem } from './ProviderSidebar'
|
|
4
4
|
import { AdminSidebar } from './AdminSidebar'
|
|
@@ -111,6 +111,24 @@ export const DashboardLayout: React.FC<DashboardLayoutProps> = ({
|
|
|
111
111
|
}) => {
|
|
112
112
|
const [mobileMenuOpen, setMobileMenuOpen] = useState(false)
|
|
113
113
|
|
|
114
|
+
const handleKeyDown = useCallback((event: KeyboardEvent) => {
|
|
115
|
+
const target = event.target as HTMLElement
|
|
116
|
+
if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {
|
|
117
|
+
return
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (event.key === '[' && sidebarExpanded) {
|
|
121
|
+
onSidebarToggle?.()
|
|
122
|
+
} else if (event.key === ']' && !sidebarExpanded) {
|
|
123
|
+
onSidebarToggle?.()
|
|
124
|
+
}
|
|
125
|
+
}, [sidebarExpanded, onSidebarToggle])
|
|
126
|
+
|
|
127
|
+
useEffect(() => {
|
|
128
|
+
document.addEventListener('keydown', handleKeyDown)
|
|
129
|
+
return () => document.removeEventListener('keydown', handleKeyDown)
|
|
130
|
+
}, [handleKeyDown])
|
|
131
|
+
|
|
114
132
|
const handleSidebarToggle = () => {
|
|
115
133
|
if (isMobile) {
|
|
116
134
|
setMobileMenuOpen(!mobileMenuOpen)
|
|
@@ -188,13 +206,14 @@ export const DashboardLayout: React.FC<DashboardLayoutProps> = ({
|
|
|
188
206
|
|
|
189
207
|
|
|
190
208
|
<main
|
|
209
|
+
id="scrollable"
|
|
191
210
|
className="dashboard-layout__main"
|
|
192
211
|
style={{
|
|
193
212
|
marginLeft: isMobile ? 0 : sidebarWidth,
|
|
194
213
|
marginTop: topHatHeight
|
|
195
214
|
}}
|
|
196
215
|
>
|
|
197
|
-
<div className="dashboard-layout__content">
|
|
216
|
+
<div id="main" className="dashboard-layout__content">
|
|
198
217
|
{children}
|
|
199
218
|
</div>
|
|
200
219
|
{showFooter && <DashboardFooter version={version} />}
|
|
@@ -238,10 +238,15 @@
|
|
|
238
238
|
display: flex;
|
|
239
239
|
align-items: center;
|
|
240
240
|
justify-content: center;
|
|
241
|
+
color: var(--fills-main-fill-primary, #14215A);
|
|
241
242
|
|
|
242
243
|
svg {
|
|
243
244
|
width: 100%;
|
|
244
245
|
height: 100%;
|
|
246
|
+
|
|
247
|
+
path {
|
|
248
|
+
fill: var(--fills-main-fill-primary, #14215A);
|
|
249
|
+
}
|
|
245
250
|
}
|
|
246
251
|
|
|
247
252
|
&--back {
|
|
@@ -189,7 +189,14 @@ export const ProviderSidebar: React.FC<ProviderSidebarProps> = ({
|
|
|
189
189
|
|
|
190
190
|
|
|
191
191
|
{expanded ? (
|
|
192
|
-
<div
|
|
192
|
+
<div
|
|
193
|
+
className="provider-sidebar__header"
|
|
194
|
+
onClick={() => handleNavClick('/profile')}
|
|
195
|
+
role="button"
|
|
196
|
+
tabIndex={0}
|
|
197
|
+
onKeyDown={(e) => e.key === 'Enter' && handleNavClick('/profile')}
|
|
198
|
+
style={{ cursor: 'pointer' }}
|
|
199
|
+
>
|
|
193
200
|
<EntityHeader
|
|
194
201
|
name={providerName}
|
|
195
202
|
id={providerId}
|
|
@@ -201,7 +208,14 @@ export const ProviderSidebar: React.FC<ProviderSidebarProps> = ({
|
|
|
201
208
|
</div>
|
|
202
209
|
) : (
|
|
203
210
|
<Tooltip content={providerName} side="right" sideOffset={8} delayDuration={100}>
|
|
204
|
-
<div
|
|
211
|
+
<div
|
|
212
|
+
className="provider-sidebar__header provider-sidebar__header--collapsed"
|
|
213
|
+
onClick={() => handleNavClick('/profile')}
|
|
214
|
+
role="button"
|
|
215
|
+
tabIndex={0}
|
|
216
|
+
onKeyDown={(e) => e.key === 'Enter' && handleNavClick('/profile')}
|
|
217
|
+
style={{ cursor: 'pointer' }}
|
|
218
|
+
>
|
|
205
219
|
<EntityHeader
|
|
206
220
|
name={providerName}
|
|
207
221
|
id={providerId}
|
|
@@ -171,15 +171,20 @@ export const TopNavigation: React.FC<TopNavigationProps> = ({
|
|
|
171
171
|
{mobileMenuOpen ? <CloseIcon /> : <BurgerIcon />}
|
|
172
172
|
</button>
|
|
173
173
|
|
|
174
|
-
<
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
disabled={sidebarToggleDisabled}
|
|
179
|
-
title={sidebarCollapsed ? 'Expand sidebar' : 'Collapse sidebar'}
|
|
174
|
+
<Tooltip
|
|
175
|
+
content={sidebarCollapsed ? <>Expand <strong>]</strong></> : <>Collapse <strong>[</strong></>}
|
|
176
|
+
side="bottom"
|
|
177
|
+
sideOffset={8}
|
|
180
178
|
>
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
<button
|
|
180
|
+
className={`top-navigation__toggle top-navigation__toggle--desktop ${sidebarToggleDisabled ? 'top-navigation__toggle--disabled' : ''}`}
|
|
181
|
+
onClick={sidebarToggleDisabled ? undefined : onSidebarToggle}
|
|
182
|
+
aria-label="Toggle sidebar"
|
|
183
|
+
disabled={sidebarToggleDisabled}
|
|
184
|
+
>
|
|
185
|
+
{sidebarCollapsed ? <SidebarCollapsedIcon /> : <SidebarOpenIcon />}
|
|
186
|
+
</button>
|
|
187
|
+
</Tooltip>
|
|
183
188
|
|
|
184
189
|
<img src={BookedLogoMark} alt="Booked it" className="top-navigation__logo-mark" />
|
|
185
190
|
<BookedLogoFull className="top-navigation__logo-full" />
|
|
@@ -202,6 +207,7 @@ export const TopNavigation: React.FC<TopNavigationProps> = ({
|
|
|
202
207
|
</button>
|
|
203
208
|
</Tooltip>
|
|
204
209
|
|
|
210
|
+
{/* Inbox - temporarily hidden
|
|
205
211
|
<Tooltip content="Inbox" side="bottom" sideOffset={8}>
|
|
206
212
|
<button
|
|
207
213
|
className="top-navigation__button"
|
|
@@ -219,7 +225,9 @@ export const TopNavigation: React.FC<TopNavigationProps> = ({
|
|
|
219
225
|
)}
|
|
220
226
|
</button>
|
|
221
227
|
</Tooltip>
|
|
228
|
+
*/}
|
|
222
229
|
|
|
230
|
+
{/* Notifications - temporarily hidden
|
|
223
231
|
<Tooltip content="Notifications" side="bottom" sideOffset={8} disabled={isNotificationActive}>
|
|
224
232
|
<button
|
|
225
233
|
className={`top-navigation__button ${isNotificationActive ? 'top-navigation__button--active' : ''}`}
|
|
@@ -237,6 +245,7 @@ export const TopNavigation: React.FC<TopNavigationProps> = ({
|
|
|
237
245
|
)}
|
|
238
246
|
</button>
|
|
239
247
|
</Tooltip>
|
|
248
|
+
*/}
|
|
240
249
|
|
|
241
250
|
<Tooltip content="Help & FAQ's" side="bottom" sideOffset={8}>
|
|
242
251
|
<button
|