@byline/host-tanstack-start 3.11.2 → 3.11.3
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/admin-shell/chrome/admin-app-bar.js +2 -0
- package/dist/admin-shell/chrome/admin-app-bar_module.css +4 -2
- package/dist/admin-shell/chrome/{drawer-toggle.d.ts → admin-drawer-toggle.d.ts} +1 -1
- package/dist/admin-shell/chrome/{drawer-toggle.js → admin-drawer-toggle.js} +8 -8
- package/dist/admin-shell/chrome/admin-drawer-toggle.module.js +8 -0
- package/dist/admin-shell/chrome/admin-drawer-toggle_module.css +21 -0
- package/dist/admin-shell/chrome/{menu-drawer.js → admin-menu-drawer.js} +11 -10
- package/dist/admin-shell/chrome/admin-menu-drawer.module.js +12 -0
- package/dist/admin-shell/chrome/{menu-drawer_module.css → admin-menu-drawer_module.css} +37 -28
- package/dist/admin-shell/chrome/content.js +1 -1
- package/dist/admin-shell/chrome/hamburger.js +1 -1
- package/dist/admin-shell/chrome/preview-toggle.js +1 -0
- package/dist/routes/create-admin-layout-route.js +2 -4
- package/package.json +8 -8
- package/src/admin-shell/chrome/admin-app-bar.module.css +4 -2
- package/src/admin-shell/chrome/admin-app-bar.tsx +2 -0
- package/src/admin-shell/chrome/{drawer-toggle.module.css → admin-drawer-toggle.module.css} +2 -2
- package/src/admin-shell/chrome/{drawer-toggle.tsx → admin-drawer-toggle.tsx} +3 -3
- package/src/admin-shell/chrome/{menu-drawer.module.css → admin-menu-drawer.module.css} +19 -4
- package/src/admin-shell/chrome/{menu-drawer.tsx → admin-menu-drawer.tsx} +5 -5
- package/src/admin-shell/chrome/content.tsx +1 -1
- package/src/admin-shell/chrome/hamburger.tsx +1 -1
- package/src/admin-shell/chrome/preview-toggle.tsx +1 -1
- package/src/routes/create-admin-layout-route.tsx +2 -4
- package/dist/admin-shell/chrome/drawer-toggle.module.js +0 -8
- package/dist/admin-shell/chrome/drawer-toggle_module.css +0 -21
- package/dist/admin-shell/chrome/menu-drawer.module.js +0 -12
- /package/dist/admin-shell/chrome/{menu-drawer.d.ts → admin-menu-drawer.d.ts} +0 -0
- /package/dist/admin-shell/chrome/{menu-provider.d.ts → admin-menu-provider.d.ts} +0 -0
- /package/dist/admin-shell/chrome/{menu-provider.js → admin-menu-provider.js} +0 -0
- /package/src/admin-shell/chrome/{menu-provider.tsx → admin-menu-provider.tsx} +0 -0
|
@@ -6,6 +6,7 @@ import { Button } from "@byline/ui/react";
|
|
|
6
6
|
import classnames from "classnames";
|
|
7
7
|
import { adminSignOut } from "../../server-fns/auth/index.js";
|
|
8
8
|
import admin_app_bar_module from "./admin-app-bar.module.js";
|
|
9
|
+
import { AdminDrawerToggle } from "./admin-drawer-toggle.js";
|
|
9
10
|
import { Branding } from "./branding.js";
|
|
10
11
|
import { Breadcrumbs } from "./breadcrumbs/breadcrumbs.js";
|
|
11
12
|
import { useBreadcrumbs } from "./breadcrumbs/breadcrumbs-provider.js";
|
|
@@ -36,6 +37,7 @@ function AdminAppBar({ user }) {
|
|
|
36
37
|
/*#__PURE__*/ jsxs("div", {
|
|
37
38
|
className: classnames('byline-admin-app-bar-left', admin_app_bar_module.left),
|
|
38
39
|
children: [
|
|
40
|
+
/*#__PURE__*/ jsx(AdminDrawerToggle, {}),
|
|
39
41
|
/*#__PURE__*/ jsx(Branding, {}),
|
|
40
42
|
/*#__PURE__*/ jsx(Breadcrumbs, {
|
|
41
43
|
homePath: breadCrumbSettings.homePath,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
:is(.header-_gfkGu, .byline-admin-app-bar) {
|
|
2
2
|
z-index: 50;
|
|
3
|
+
border-bottom: var(--border-width-thin) var(--border-style-solid) var(--gray-50);
|
|
3
4
|
background-color: #fff;
|
|
4
5
|
justify-content: space-between;
|
|
5
6
|
align-items: center;
|
|
6
7
|
width: 100%;
|
|
7
8
|
max-width: 100%;
|
|
8
9
|
height: 45px;
|
|
9
|
-
padding: 1rem;
|
|
10
|
+
padding: 1rem 1rem 1rem .75rem;
|
|
10
11
|
font-size: 1.125rem;
|
|
11
12
|
font-weight: 600;
|
|
12
13
|
line-height: 1.75rem;
|
|
@@ -17,12 +18,13 @@
|
|
|
17
18
|
|
|
18
19
|
:is(:is([data-theme="dark"], .dark) .header-_gfkGu, :is([data-theme="dark"], .dark) .byline-admin-app-bar) {
|
|
19
20
|
background-color: var(--canvas-800);
|
|
21
|
+
border-bottom-color: var(--canvas-700);
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
:is(.left-wd7pIB, .byline-admin-app-bar-left) {
|
|
23
25
|
flex: auto;
|
|
24
26
|
align-items: center;
|
|
25
|
-
gap:
|
|
27
|
+
gap: .5em;
|
|
26
28
|
min-width: 0;
|
|
27
29
|
display: flex;
|
|
28
30
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { IconButton, Tooltip } from "@byline/ui/react";
|
|
3
3
|
import classnames from "classnames";
|
|
4
|
-
import
|
|
5
|
-
import { useAdminMenu } from "./menu-provider.js";
|
|
6
|
-
function
|
|
4
|
+
import admin_drawer_toggle_module from "./admin-drawer-toggle.module.js";
|
|
5
|
+
import { useAdminMenu } from "./admin-menu-provider.js";
|
|
6
|
+
function AdminDrawerToggle() {
|
|
7
7
|
const { toggleDrawer, drawerOpen } = useAdminMenu();
|
|
8
8
|
return /*#__PURE__*/ jsx("div", {
|
|
9
|
-
className: classnames('byline-admin-drawer-toggle',
|
|
9
|
+
className: classnames('byline-admin-drawer-toggle', admin_drawer_toggle_module.root, {
|
|
10
10
|
'byline-admin-drawer-toggle-open': drawerOpen,
|
|
11
|
-
[
|
|
11
|
+
[admin_drawer_toggle_module.rootOpen]: drawerOpen,
|
|
12
12
|
'byline-admin-drawer-toggle-closed': !drawerOpen,
|
|
13
|
-
[
|
|
13
|
+
[admin_drawer_toggle_module.rootClosed]: !drawerOpen
|
|
14
14
|
}),
|
|
15
15
|
children: /*#__PURE__*/ jsx(Tooltip, {
|
|
16
16
|
text: drawerOpen ? 'Collapse sidebar' : 'Expand sidebar',
|
|
@@ -18,7 +18,7 @@ function DrawerToggle() {
|
|
|
18
18
|
sideOffset: 8,
|
|
19
19
|
children: /*#__PURE__*/ jsx(IconButton, {
|
|
20
20
|
type: "button",
|
|
21
|
-
className: classnames('byline-admin-drawer-toggle-button',
|
|
21
|
+
className: classnames('byline-admin-drawer-toggle-button', admin_drawer_toggle_module.button),
|
|
22
22
|
variant: "text",
|
|
23
23
|
intent: "noeffect",
|
|
24
24
|
square: true,
|
|
@@ -54,4 +54,4 @@ function DrawerToggle() {
|
|
|
54
54
|
})
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
export {
|
|
57
|
+
export { AdminDrawerToggle };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
:is(.root-aOHtxA, .byline-admin-drawer-toggle) {
|
|
2
|
+
z-index: 50;
|
|
3
|
+
transition: all .3s ease-in-out;
|
|
4
|
+
position: static;
|
|
5
|
+
top: 38px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:is(.rootClosed-KEQczC, .byline-admin-drawer-toggle-closed) {
|
|
9
|
+
left: 8px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:is(.rootOpen-FN2fv5, .byline-admin-drawer-toggle-open) {
|
|
13
|
+
left: 160px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:is(.button-cm8F79, .byline-admin-drawer-toggle-button) {
|
|
17
|
+
outline: none;
|
|
18
|
+
min-width: 36px;
|
|
19
|
+
height: 36px;
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -9,9 +9,9 @@ import { ActivityIcon, HomeIcon, RolesIcon, SettingsSlidersIcon, Tooltip, UserIc
|
|
|
9
9
|
import classnames from "classnames";
|
|
10
10
|
import { useSwipeable } from "react-swipeable";
|
|
11
11
|
import { useAbilities } from "../../integrations/abilities.js";
|
|
12
|
+
import admin_menu_drawer_module from "./admin-menu-drawer.module.js";
|
|
13
|
+
import { useAdminMenu } from "./admin-menu-provider.js";
|
|
12
14
|
import { Link } from "./loose-router.js";
|
|
13
|
-
import menu_drawer_module from "./menu-drawer.module.js";
|
|
14
|
-
import { useAdminMenu } from "./menu-provider.js";
|
|
15
15
|
import { PreviewToggle } from "./preview-toggle.js";
|
|
16
16
|
const isActive = (currentPath, linkHref)=>{
|
|
17
17
|
if ('/admin' === linkHref) return '/admin' === currentPath;
|
|
@@ -33,6 +33,7 @@ function MenuItem({ to, label, icon, pathname, compact }) {
|
|
|
33
33
|
compact ? /*#__PURE__*/ jsx(Tooltip, {
|
|
34
34
|
text: label,
|
|
35
35
|
side: "right",
|
|
36
|
+
delay: 0,
|
|
36
37
|
children: iconSpan
|
|
37
38
|
}) : iconSpan,
|
|
38
39
|
/*#__PURE__*/ jsx("span", {
|
|
@@ -63,23 +64,23 @@ function AdminMenuDrawer() {
|
|
|
63
64
|
const compact = false === mobile && false === drawerOpen;
|
|
64
65
|
return /*#__PURE__*/ jsx("aside", {
|
|
65
66
|
id: "admin-menu",
|
|
66
|
-
className: classnames('byline-admin-menu-drawer-aside',
|
|
67
|
+
className: classnames('byline-admin-menu-drawer-aside', admin_menu_drawer_module.aside, {
|
|
67
68
|
'byline-admin-menu-drawer-aside-mobile': true === mobile,
|
|
68
|
-
[
|
|
69
|
+
[admin_menu_drawer_module.asideMobile]: true === mobile,
|
|
69
70
|
'byline-admin-menu-drawer-aside-mobile-open': true === mobile && true === drawerOpen,
|
|
70
|
-
[
|
|
71
|
+
[admin_menu_drawer_module.asideMobileOpen]: true === mobile && true === drawerOpen,
|
|
71
72
|
'byline-admin-menu-drawer-aside-mobile-closed': true === mobile && false === drawerOpen,
|
|
72
|
-
[
|
|
73
|
+
[admin_menu_drawer_module.asideMobileClosed]: true === mobile && false === drawerOpen,
|
|
73
74
|
'byline-admin-menu-drawer-aside-desktop': false === mobile,
|
|
74
|
-
[
|
|
75
|
+
[admin_menu_drawer_module.asideDesktop]: false === mobile,
|
|
75
76
|
'byline-admin-menu-drawer-aside-desktop-open': false === mobile && true === drawerOpen,
|
|
76
|
-
[
|
|
77
|
+
[admin_menu_drawer_module.asideDesktopOpen]: false === mobile && true === drawerOpen,
|
|
77
78
|
'byline-admin-menu-drawer-aside-desktop-closed': false === mobile && false === drawerOpen,
|
|
78
|
-
[
|
|
79
|
+
[admin_menu_drawer_module.asideDesktopClosed]: false === mobile && false === drawerOpen
|
|
79
80
|
}),
|
|
80
81
|
...handlers,
|
|
81
82
|
children: /*#__PURE__*/ jsx("nav", {
|
|
82
|
-
className: classnames('byline-admin-menu-drawer admin-menu-drawer',
|
|
83
|
+
className: classnames('byline-admin-menu-drawer admin-menu-drawer', admin_menu_drawer_module.nav),
|
|
83
84
|
children: /*#__PURE__*/ jsxs("ul", {
|
|
84
85
|
children: [
|
|
85
86
|
/*#__PURE__*/ jsx(MenuItem, {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./admin-menu-drawer_module.css";
|
|
2
|
+
const admin_menu_drawer_module = {
|
|
3
|
+
aside: "aside-S0dz74",
|
|
4
|
+
asideMobile: "asideMobile-sXoUdL",
|
|
5
|
+
asideMobileOpen: "asideMobileOpen-Hz1NlP",
|
|
6
|
+
asideMobileClosed: "asideMobileClosed-YCzvQ4",
|
|
7
|
+
asideDesktop: "asideDesktop-uFlpwO",
|
|
8
|
+
asideDesktopOpen: "asideDesktopOpen-kPyJOg",
|
|
9
|
+
asideDesktopClosed: "asideDesktopClosed-OPSSfT",
|
|
10
|
+
nav: "nav-dDjqu7"
|
|
11
|
+
};
|
|
12
|
+
export default admin_menu_drawer_module;
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
:is(.aside-
|
|
1
|
+
:is(.aside-S0dz74, .byline-admin-menu-drawer-aside) {
|
|
2
2
|
border-right: var(--border-width-thin) var(--border-style-solid) var(--gray-50);
|
|
3
3
|
background-color: var(--canvas-25);
|
|
4
4
|
z-index: 40;
|
|
5
5
|
flex-direction: column;
|
|
6
|
-
transition: all .
|
|
6
|
+
transition: all .2s ease-in-out;
|
|
7
7
|
display: flex;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
:is(:is([data-theme="dark"], .dark) .aside-
|
|
10
|
+
:is(:is([data-theme="dark"], .dark) .aside-S0dz74, :is([data-theme="dark"], .dark) .byline-admin-menu-drawer-aside) {
|
|
11
11
|
border-right-color: var(--canvas-700);
|
|
12
12
|
background-color: var(--canvas-800);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
:is(.asideMobile-
|
|
15
|
+
:is(.asideMobile-sXoUdL, .byline-admin-menu-drawer-aside-mobile) {
|
|
16
16
|
position: fixed;
|
|
17
|
-
top:
|
|
17
|
+
top: 42px;
|
|
18
18
|
bottom: 0;
|
|
19
19
|
left: 0;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
:is(.asideMobileOpen-
|
|
22
|
+
:is(.asideMobileOpen-Hz1NlP, .byline-admin-menu-drawer-aside-mobile-open) {
|
|
23
23
|
width: 210px;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
:is(.asideMobileClosed-
|
|
26
|
+
:is(.asideMobileClosed-YCzvQ4, .byline-admin-menu-drawer-aside-mobile-closed) {
|
|
27
27
|
width: 0;
|
|
28
28
|
overflow: hidden;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
:is(.asideDesktop-
|
|
31
|
+
:is(.asideDesktop-uFlpwO, .byline-admin-menu-drawer-aside-desktop) {
|
|
32
32
|
flex-shrink: 0;
|
|
33
33
|
align-self: stretch;
|
|
34
34
|
position: relative;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
:is(.asideDesktopOpen-
|
|
37
|
+
:is(.asideDesktopOpen-kPyJOg, .byline-admin-menu-drawer-aside-desktop-open) {
|
|
38
38
|
width: 210px;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
:is(.asideDesktopClosed-
|
|
41
|
+
:is(.asideDesktopClosed-OPSSfT, .byline-admin-menu-drawer-aside-desktop-closed) {
|
|
42
42
|
width: 60px;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
:is(.nav-
|
|
45
|
+
:is(.nav-dDjqu7, .byline-admin-menu-drawer) {
|
|
46
46
|
max-height: calc(100vh - 60px);
|
|
47
47
|
margin: 0;
|
|
48
48
|
position: sticky;
|
|
49
|
-
top:
|
|
49
|
+
top: 0;
|
|
50
50
|
overflow-y: auto;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
:is(.nav-
|
|
54
|
-
margin:
|
|
53
|
+
:is(.nav-dDjqu7 ul, .byline-admin-menu-drawer ul) {
|
|
54
|
+
margin: .75rem .5rem .5rem;
|
|
55
55
|
padding: 0;
|
|
56
56
|
list-style: none;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
:is(.nav-
|
|
59
|
+
:is(.nav-dDjqu7 ul li.menu-item, .byline-admin-menu-drawer ul li.menu-item) {
|
|
60
60
|
border-radius: 4px;
|
|
61
61
|
margin: 0;
|
|
62
62
|
transition: all .2s;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
:is(.nav-
|
|
65
|
+
:is(.nav-dDjqu7 ul li.menu-item .icon, .byline-admin-menu-drawer ul li.menu-item .icon) {
|
|
66
66
|
justify-content: center;
|
|
67
67
|
align-items: center;
|
|
68
68
|
width: 24px;
|
|
69
69
|
display: flex;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
:is(.nav-
|
|
72
|
+
:is(.nav-dDjqu7 ul li.menu-item .label, .byline-admin-menu-drawer ul li.menu-item .label) {
|
|
73
73
|
line-height: 0;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
:is(.nav-
|
|
76
|
+
:is(.nav-dDjqu7 ul li.menu-item.compact .label, .byline-admin-menu-drawer ul li.menu-item.compact .label) {
|
|
77
77
|
display: none;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
:is(.nav-
|
|
80
|
+
:is(.nav-dDjqu7 ul li.menu-item.active, .nav-dDjqu7 ul li.menu-item:hover, .byline-admin-menu-drawer ul li.menu-item.active, .byline-admin-menu-drawer ul li.menu-item:hover) {
|
|
81
81
|
background-color: var(--canvas-50);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
:is(.nav-
|
|
84
|
+
:is(.nav-dDjqu7 ul li.menu-item :is(a, button), .byline-admin-menu-drawer ul li.menu-item :is(a, button)) {
|
|
85
85
|
color: #111;
|
|
86
86
|
cursor: pointer;
|
|
87
87
|
text-align: left;
|
|
@@ -98,40 +98,49 @@
|
|
|
98
98
|
display: flex;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
:is(.nav-
|
|
101
|
+
:is(.nav-dDjqu7 ul li.menu-item :is(a, button):disabled, .byline-admin-menu-drawer ul li.menu-item :is(a, button):disabled) {
|
|
102
102
|
cursor: not-allowed;
|
|
103
103
|
opacity: .6;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
:is(.nav-
|
|
106
|
+
:is(.nav-dDjqu7 ul li.menu-item.compact, .byline-admin-menu-drawer ul li.menu-item.compact) {
|
|
107
|
+
width: 34px;
|
|
108
|
+
height: 34px;
|
|
109
|
+
margin-left: auto;
|
|
110
|
+
margin-right: auto;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:is(.nav-dDjqu7 ul li.menu-item.compact :is(a, button), .byline-admin-menu-drawer ul li.menu-item.compact :is(a, button)) {
|
|
107
114
|
justify-content: center;
|
|
115
|
+
height: 100%;
|
|
116
|
+
padding: 0;
|
|
108
117
|
}
|
|
109
118
|
|
|
110
|
-
:is(.nav-
|
|
119
|
+
:is(.nav-dDjqu7 ul li.menu-item.active :is(a, button), .byline-admin-menu-drawer ul li.menu-item.active :is(a, button)) {
|
|
111
120
|
color: #111;
|
|
112
121
|
text-decoration: none;
|
|
113
122
|
}
|
|
114
123
|
|
|
115
|
-
:is(.nav-
|
|
124
|
+
:is(.nav-dDjqu7 ul li.menu-separator, .byline-admin-menu-drawer ul li.menu-separator) {
|
|
116
125
|
background-color: #ddd;
|
|
117
126
|
width: 90%;
|
|
118
127
|
margin: .75rem auto;
|
|
119
128
|
padding-top: .5px;
|
|
120
129
|
}
|
|
121
130
|
|
|
122
|
-
:is(:is([data-theme="dark"], .dark) .nav-
|
|
131
|
+
:is(:is([data-theme="dark"], .dark) .nav-dDjqu7 ul li.menu-item :is(a, button), :is([data-theme="dark"], .dark) .byline-admin-menu-drawer ul li.menu-item :is(a, button)) {
|
|
123
132
|
color: #ddd;
|
|
124
133
|
}
|
|
125
134
|
|
|
126
|
-
:is(:is([data-theme="dark"], .dark) .nav-
|
|
135
|
+
:is(:is([data-theme="dark"], .dark) .nav-dDjqu7 ul li.menu-item.active :is(a, button), :is([data-theme="dark"], .dark) .byline-admin-menu-drawer ul li.menu-item.active :is(a, button)) {
|
|
127
136
|
color: #fff;
|
|
128
137
|
}
|
|
129
138
|
|
|
130
|
-
:is(:is([data-theme="dark"], .dark) .nav-
|
|
139
|
+
:is(:is([data-theme="dark"], .dark) .nav-dDjqu7 ul li.menu-item.active, :is([data-theme="dark"], .dark) .nav-dDjqu7 ul li.menu-item:hover, :is([data-theme="dark"], .dark) .byline-admin-menu-drawer ul li.menu-item.active, :is([data-theme="dark"], .dark) .byline-admin-menu-drawer ul li.menu-item:hover) {
|
|
131
140
|
background-color: oklch(from var(--canvas-700) calc(l * .95) c h);
|
|
132
141
|
}
|
|
133
142
|
|
|
134
|
-
:is(:is([data-theme="dark"], .dark) .nav-
|
|
143
|
+
:is(:is([data-theme="dark"], .dark) .nav-dDjqu7 ul li.menu-separator, :is([data-theme="dark"], .dark) .byline-admin-menu-drawer ul li.menu-separator) {
|
|
135
144
|
background-color: #444;
|
|
136
145
|
}
|
|
137
146
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect } from "react";
|
|
4
4
|
import classnames from "classnames";
|
|
5
|
+
import { useAdminMenu } from "./admin-menu-provider.js";
|
|
5
6
|
import content_module from "./content.module.js";
|
|
6
|
-
import { useAdminMenu } from "./menu-provider.js";
|
|
7
7
|
function Content({ children }) {
|
|
8
8
|
const { mobile, closeDrawer } = useAdminMenu();
|
|
9
9
|
useEffect(()=>{
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useTranslation } from "@byline/i18n/react";
|
|
4
4
|
import classnames from "classnames";
|
|
5
|
+
import { useAdminMenu } from "./admin-menu-provider.js";
|
|
5
6
|
import hamburger_module from "./hamburger.module.js";
|
|
6
|
-
import { useAdminMenu } from "./menu-provider.js";
|
|
7
7
|
function Hamburger({ className, color = 'bg-white before:bg-white after:bg-white', activeBorderColor: _activeBorderColor, ...other }) {
|
|
8
8
|
const { toggleDrawer } = useAdminMenu();
|
|
9
9
|
const { t } = useTranslation('byline-admin');
|
|
@@ -7,10 +7,9 @@ import { I18nProvider } from "@byline/i18n/react";
|
|
|
7
7
|
import classnames from "classnames";
|
|
8
8
|
import { AdminAppBar } from "../admin-shell/chrome/admin-app-bar.js";
|
|
9
9
|
import admin_layout_module from "../admin-shell/chrome/admin-layout.module.js";
|
|
10
|
+
import { AdminMenuDrawer } from "../admin-shell/chrome/admin-menu-drawer.js";
|
|
11
|
+
import { AdminMenuProvider } from "../admin-shell/chrome/admin-menu-provider.js";
|
|
10
12
|
import { Content } from "../admin-shell/chrome/content.js";
|
|
11
|
-
import { DrawerToggle } from "../admin-shell/chrome/drawer-toggle.js";
|
|
12
|
-
import { AdminMenuDrawer } from "../admin-shell/chrome/menu-drawer.js";
|
|
13
|
-
import { AdminMenuProvider } from "../admin-shell/chrome/menu-provider.js";
|
|
14
13
|
import { RouteError, RouteNotFound } from "../admin-shell/chrome/route-error.js";
|
|
15
14
|
import { RouteProgressBar } from "../admin-shell/chrome/route-progress-bar.js";
|
|
16
15
|
import { buildLocaleDefinitions } from "../i18n/locale-definitions.js";
|
|
@@ -71,7 +70,6 @@ function createAdminLayoutRoute(path, opts = {}) {
|
|
|
71
70
|
/*#__PURE__*/ jsxs("main", {
|
|
72
71
|
className: classnames('byline-admin-layout-main', admin_layout_module.main),
|
|
73
72
|
children: [
|
|
74
|
-
/*#__PURE__*/ jsx(DrawerToggle, {}),
|
|
75
73
|
/*#__PURE__*/ jsx(AdminMenuDrawer, {}),
|
|
76
74
|
/*#__PURE__*/ jsx(Content, {
|
|
77
75
|
children: /*#__PURE__*/ jsx(Outlet, {})
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": false,
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
|
-
"version": "3.11.
|
|
6
|
+
"version": "3.11.3",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=20.9.0"
|
|
9
9
|
},
|
|
@@ -119,13 +119,13 @@
|
|
|
119
119
|
"react-swipeable": "^7.0.2",
|
|
120
120
|
"uuid": "^14.0.0",
|
|
121
121
|
"zod": "^4.4.3",
|
|
122
|
-
"@byline/
|
|
123
|
-
"@byline/
|
|
124
|
-
"@byline/
|
|
125
|
-
"@byline/
|
|
126
|
-
"@byline/
|
|
127
|
-
"@byline/
|
|
128
|
-
"@byline/
|
|
122
|
+
"@byline/admin": "3.11.3",
|
|
123
|
+
"@byline/auth": "3.11.3",
|
|
124
|
+
"@byline/ai": "3.11.3",
|
|
125
|
+
"@byline/ui": "3.11.3",
|
|
126
|
+
"@byline/client": "3.11.3",
|
|
127
|
+
"@byline/i18n": "3.11.3",
|
|
128
|
+
"@byline/core": "3.11.3"
|
|
129
129
|
},
|
|
130
130
|
"peerDependencies": {
|
|
131
131
|
"@tanstack/react-router": "^1.167.0",
|
|
@@ -19,24 +19,26 @@
|
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
21
|
justify-content: space-between;
|
|
22
|
-
padding: 1rem;
|
|
22
|
+
padding: 1rem 1rem 1rem 0.75rem;
|
|
23
23
|
background-color: #ffffff;
|
|
24
24
|
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
25
25
|
font-size: 1.125rem;
|
|
26
26
|
line-height: 1.75rem;
|
|
27
27
|
font-weight: 600;
|
|
28
|
+
border-bottom: var(--border-width-thin) var(--border-style-solid) var(--gray-50);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
:is([data-theme="dark"], :global(.dark)) .header,
|
|
31
32
|
:is([data-theme="dark"], :global(.dark)) :global(.byline-admin-app-bar) {
|
|
32
33
|
background-color: var(--canvas-800);
|
|
34
|
+
border-bottom-color: var(--canvas-700);
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
.left,
|
|
36
38
|
:global(.byline-admin-app-bar-left) {
|
|
37
39
|
display: flex;
|
|
38
40
|
align-items: center;
|
|
39
|
-
gap:
|
|
41
|
+
gap: 0.5em;
|
|
40
42
|
flex: 1 1 auto;
|
|
41
43
|
min-width: 0;
|
|
42
44
|
}
|
|
@@ -16,6 +16,7 @@ import cx from 'classnames'
|
|
|
16
16
|
|
|
17
17
|
import { adminSignOut, type CurrentAdminUser } from '../../server-fns/auth/index.js'
|
|
18
18
|
import styles from './admin-app-bar.module.css'
|
|
19
|
+
import { AdminDrawerToggle } from './admin-drawer-toggle.js'
|
|
19
20
|
import { Branding } from './branding.js'
|
|
20
21
|
import { Breadcrumbs } from './breadcrumbs/breadcrumbs.js'
|
|
21
22
|
import { useBreadcrumbs } from './breadcrumbs/breadcrumbs-provider.js'
|
|
@@ -53,6 +54,7 @@ export function AdminAppBar({ user }: AdminAppBarProps) {
|
|
|
53
54
|
return (
|
|
54
55
|
<header className={cx('byline-admin-app-bar', styles.header)}>
|
|
55
56
|
<div className={cx('byline-admin-app-bar-left', styles.left)}>
|
|
57
|
+
<AdminDrawerToggle />
|
|
56
58
|
<Branding />
|
|
57
59
|
<Breadcrumbs
|
|
58
60
|
homePath={breadCrumbSettings.homePath}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
.root,
|
|
8
8
|
:global(.byline-admin-drawer-toggle) {
|
|
9
|
-
position:
|
|
9
|
+
position: static;
|
|
10
10
|
top: 38px;
|
|
11
11
|
z-index: 50;
|
|
12
12
|
transition: all 300ms ease-in-out;
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
.button,
|
|
26
26
|
:global(.byline-admin-drawer-toggle-button) {
|
|
27
27
|
outline: none;
|
|
28
|
-
min-width:
|
|
28
|
+
min-width: 36px;
|
|
29
29
|
height: 36px;
|
|
30
30
|
}
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
import { IconButton, Tooltip } from '@byline/ui/react'
|
|
10
10
|
import cx from 'classnames'
|
|
11
11
|
|
|
12
|
-
import styles from './drawer-toggle.module.css'
|
|
13
|
-
import { useAdminMenu } from './menu-provider.
|
|
12
|
+
import styles from './admin-drawer-toggle.module.css'
|
|
13
|
+
import { useAdminMenu } from './admin-menu-provider.jsx'
|
|
14
14
|
|
|
15
|
-
export function
|
|
15
|
+
export function AdminDrawerToggle() {
|
|
16
16
|
const { toggleDrawer, drawerOpen } = useAdminMenu()
|
|
17
17
|
|
|
18
18
|
return (
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
border-right: var(--border-width-thin) var(--border-style-solid) var(--gray-50);
|
|
20
20
|
background-color: var(--canvas-25);
|
|
21
21
|
z-index: 40;
|
|
22
|
-
transition: all
|
|
22
|
+
transition: all 200ms ease-in-out;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
:is([data-theme="dark"], :global(.dark)) .aside,
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
.asideMobile,
|
|
32
32
|
:global(.byline-admin-menu-drawer-aside-mobile) {
|
|
33
33
|
position: fixed;
|
|
34
|
-
top:
|
|
34
|
+
top: 42px;
|
|
35
35
|
bottom: 0;
|
|
36
36
|
left: 0;
|
|
37
37
|
}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
.nav,
|
|
68
68
|
:global(.byline-admin-menu-drawer) {
|
|
69
69
|
position: sticky;
|
|
70
|
-
top:
|
|
70
|
+
top: 0;
|
|
71
71
|
margin: 0;
|
|
72
72
|
max-height: calc(100vh - 60px);
|
|
73
73
|
overflow-y: auto;
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
|
|
76
76
|
.nav ul,
|
|
77
77
|
:global(.byline-admin-menu-drawer) ul {
|
|
78
|
-
margin:
|
|
78
|
+
margin: 0.75rem 0.5rem 0.5rem;
|
|
79
79
|
padding: 0;
|
|
80
80
|
list-style: none;
|
|
81
81
|
list-style-position: outside;
|
|
@@ -137,9 +137,24 @@
|
|
|
137
137
|
opacity: 0.6;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
+
/* Compact items render as a centered square so the hover/active background
|
|
141
|
+
(applied to the <li>) reads as a square icon button rather than a wide
|
|
142
|
+
rectangle. The <li> is the hover target, so it must carry the square size. */
|
|
143
|
+
.nav ul :global(li.menu-item.compact),
|
|
144
|
+
:global(.byline-admin-menu-drawer) ul :global(li.menu-item.compact) {
|
|
145
|
+
width: 34px;
|
|
146
|
+
height: 34px;
|
|
147
|
+
margin-left: auto;
|
|
148
|
+
margin-right: auto;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Fill the square and drop the default 7px padding so the icon centers
|
|
152
|
+
exactly within the <li> hover area. */
|
|
140
153
|
.nav ul :global(li.menu-item.compact) :is(a, button),
|
|
141
154
|
:global(.byline-admin-menu-drawer) ul :global(li.menu-item.compact) :is(a, button) {
|
|
142
155
|
justify-content: center;
|
|
156
|
+
padding: 0;
|
|
157
|
+
height: 100%;
|
|
143
158
|
}
|
|
144
159
|
|
|
145
160
|
.nav ul :global(li.menu-item.active) :is(a, button),
|
|
@@ -26,11 +26,11 @@ import {
|
|
|
26
26
|
import cx from 'classnames'
|
|
27
27
|
import { useSwipeable } from 'react-swipeable'
|
|
28
28
|
|
|
29
|
-
import { useAbilities } from '../../integrations/abilities.
|
|
29
|
+
import { useAbilities } from '../../integrations/abilities.jsx'
|
|
30
|
+
import styles from './admin-menu-drawer.module.css'
|
|
31
|
+
import { useAdminMenu } from './admin-menu-provider.jsx'
|
|
30
32
|
import { Link } from './loose-router.js'
|
|
31
|
-
import
|
|
32
|
-
import { useAdminMenu } from './menu-provider.js'
|
|
33
|
-
import { PreviewToggle } from './preview-toggle.js'
|
|
33
|
+
import { PreviewToggle } from './preview-toggle.jsx'
|
|
34
34
|
|
|
35
35
|
const isActive = (currentPath: string, linkHref: string): boolean => {
|
|
36
36
|
// Root admin highlights only on exact match so it doesn't stay lit on
|
|
@@ -58,7 +58,7 @@ function MenuItem({ to, label, icon, pathname, compact }: MenuItemProps) {
|
|
|
58
58
|
<li className={cx('menu-item', { active: isActive(pathname, to), compact })}>
|
|
59
59
|
<Link to={to}>
|
|
60
60
|
{compact ? (
|
|
61
|
-
<Tooltip text={label} side="right">
|
|
61
|
+
<Tooltip text={label} side="right" delay={0}>
|
|
62
62
|
{iconSpan}
|
|
63
63
|
</Tooltip>
|
|
64
64
|
) : (
|
|
@@ -13,8 +13,8 @@ import { useEffect } from 'react'
|
|
|
13
13
|
|
|
14
14
|
import cx from 'classnames'
|
|
15
15
|
|
|
16
|
+
import { useAdminMenu } from './admin-menu-provider.jsx'
|
|
16
17
|
import styles from './content.module.css'
|
|
17
|
-
import { useAdminMenu } from './menu-provider.js'
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Wrapper for the main content area of the admin shell.
|
|
@@ -5,8 +5,8 @@ import type React from 'react'
|
|
|
5
5
|
import { useTranslation } from '@byline/i18n/react'
|
|
6
6
|
import cx from 'classnames'
|
|
7
7
|
|
|
8
|
+
import { useAdminMenu } from './admin-menu-provider.jsx'
|
|
8
9
|
import styles from './hamburger.module.css'
|
|
9
|
-
import { useAdminMenu } from './menu-provider.js'
|
|
10
10
|
|
|
11
11
|
interface HamburgerProps {
|
|
12
12
|
className?: string
|
|
@@ -30,10 +30,9 @@ import cx from 'classnames'
|
|
|
30
30
|
|
|
31
31
|
import { AdminAppBar } from '../admin-shell/chrome/admin-app-bar.js'
|
|
32
32
|
import layoutStyles from '../admin-shell/chrome/admin-layout.module.css'
|
|
33
|
+
import { AdminMenuDrawer } from '../admin-shell/chrome/admin-menu-drawer.jsx'
|
|
34
|
+
import { AdminMenuProvider } from '../admin-shell/chrome/admin-menu-provider.jsx'
|
|
33
35
|
import { Content } from '../admin-shell/chrome/content.js'
|
|
34
|
-
import { DrawerToggle } from '../admin-shell/chrome/drawer-toggle.js'
|
|
35
|
-
import { AdminMenuDrawer } from '../admin-shell/chrome/menu-drawer.js'
|
|
36
|
-
import { AdminMenuProvider } from '../admin-shell/chrome/menu-provider.js'
|
|
37
36
|
import { RouteError, RouteNotFound } from '../admin-shell/chrome/route-error.js'
|
|
38
37
|
import { RouteProgressBar } from '../admin-shell/chrome/route-progress-bar.js'
|
|
39
38
|
import { buildLocaleDefinitions } from '../i18n/locale-definitions.js'
|
|
@@ -107,7 +106,6 @@ export function createAdminLayoutRoute(path: string, opts: AdminLayoutOpts = {})
|
|
|
107
106
|
<RouteProgressBar />
|
|
108
107
|
<AdminAppBar user={user} />
|
|
109
108
|
<main className={cx('byline-admin-layout-main', layoutStyles.main)}>
|
|
110
|
-
<DrawerToggle />
|
|
111
109
|
<AdminMenuDrawer />
|
|
112
110
|
<Content>
|
|
113
111
|
<Outlet />
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
:is(.root-sFPc6W, .byline-admin-drawer-toggle) {
|
|
2
|
-
z-index: 50;
|
|
3
|
-
transition: all .3s ease-in-out;
|
|
4
|
-
position: fixed;
|
|
5
|
-
top: 38px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:is(.rootClosed-Imq2hs, .byline-admin-drawer-toggle-closed) {
|
|
9
|
-
left: 8px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
:is(.rootOpen-TiUCD2, .byline-admin-drawer-toggle-open) {
|
|
13
|
-
left: 160px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
:is(.button-VMHDrJ, .byline-admin-drawer-toggle-button) {
|
|
17
|
-
outline: none;
|
|
18
|
-
min-width: 42px;
|
|
19
|
-
height: 36px;
|
|
20
|
-
}
|
|
21
|
-
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import "./menu-drawer_module.css";
|
|
2
|
-
const menu_drawer_module = {
|
|
3
|
-
aside: "aside-zO2mZZ",
|
|
4
|
-
asideMobile: "asideMobile-k64Dd_",
|
|
5
|
-
asideMobileOpen: "asideMobileOpen-PL5eF1",
|
|
6
|
-
asideMobileClosed: "asideMobileClosed-GnS1qX",
|
|
7
|
-
asideDesktop: "asideDesktop-Enrzwp",
|
|
8
|
-
asideDesktopOpen: "asideDesktopOpen-aaA0E_",
|
|
9
|
-
asideDesktopClosed: "asideDesktopClosed-S8clHP",
|
|
10
|
-
nav: "nav-_d0pIg"
|
|
11
|
-
};
|
|
12
|
-
export default menu_drawer_module;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|