@blakesteve/roster 5.7.0 → 5.8.0
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/README.md +84 -4
- package/dist/components/atoms/Avatar/Avatar.cjs +1 -1
- package/dist/components/atoms/Avatar/Avatar.d.ts +4 -0
- package/dist/components/atoms/Avatar/Avatar.js +1 -1
- package/dist/components/atoms/AvatarStrip/AvatarStrip.cjs +1 -1
- package/dist/components/atoms/AvatarStrip/AvatarStrip.d.ts +10 -1
- package/dist/components/atoms/AvatarStrip/AvatarStrip.js +34 -30
- package/dist/components/atoms/Button/button-variants.cjs +1 -1
- package/dist/components/atoms/Button/button-variants.js +5 -3
- package/dist/components/atoms/Eyebrow/eyebrow-variants.cjs +1 -1
- package/dist/components/atoms/Eyebrow/eyebrow-variants.js +8 -4
- package/dist/components/atoms/MultiSelect/MultiSelect.cjs +1 -1
- package/dist/components/atoms/MultiSelect/MultiSelect.d.ts +3 -1
- package/dist/components/atoms/MultiSelect/MultiSelect.js +87 -89
- package/dist/components/atoms/Progress/Progress.cjs +1 -1
- package/dist/components/atoms/Progress/Progress.d.ts +1 -0
- package/dist/components/atoms/Progress/Progress.js +28 -27
- package/dist/components/atoms/Stat/Stat.cjs +1 -1
- package/dist/components/atoms/Stat/Stat.js +5 -5
- package/dist/components/atoms/Stat/stat-variants.cjs +1 -1
- package/dist/components/atoms/Stat/stat-variants.js +10 -8
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.d.ts +10 -1
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.js +31 -29
- package/dist/components/molecules/CallToAction/CallToAction.cjs +1 -1
- package/dist/components/molecules/CallToAction/CallToAction.d.ts +8 -1
- package/dist/components/molecules/CallToAction/CallToAction.js +34 -29
- package/dist/components/molecules/Carousel/Carousel.cjs +1 -1
- package/dist/components/molecules/Carousel/Carousel.d.ts +7 -0
- package/dist/components/molecules/Carousel/Carousel.js +155 -155
- package/dist/components/molecules/ErrorState/ErrorState.cjs +1 -1
- package/dist/components/molecules/ErrorState/ErrorState.d.ts +8 -1
- package/dist/components/molecules/ErrorState/ErrorState.js +44 -39
- package/dist/components/molecules/FileUpload/FileUpload.cjs +1 -1
- package/dist/components/molecules/FileUpload/FileUpload.js +23 -22
- package/dist/components/molecules/MediaPreview/MediaPreview.cjs +1 -1
- package/dist/components/molecules/MediaPreview/MediaPreview.d.ts +3 -1
- package/dist/components/molecules/MediaPreview/MediaPreview.js +13 -12
- package/dist/components/molecules/Pagination/Pagination.cjs +1 -1
- package/dist/components/molecules/Pagination/Pagination.d.ts +1 -0
- package/dist/components/molecules/Pagination/Pagination.js +47 -46
- package/dist/components/molecules/ProgressField/ProgressField.d.ts +1 -0
- package/dist/components/molecules/SkeletonPresets/SkeletonPresets.cjs +1 -1
- package/dist/components/molecules/SkeletonPresets/SkeletonPresets.d.ts +2 -2
- package/dist/components/molecules/SkeletonPresets/SkeletonPresets.js +17 -17
- package/dist/components/molecules/StepProgress/StepProgress.cjs +1 -1
- package/dist/components/molecules/StepProgress/StepProgress.d.ts +1 -0
- package/dist/components/molecules/StepProgress/StepProgress.js +9 -8
- package/dist/components/organisms/Countdown/Countdown.cjs +1 -1
- package/dist/components/organisms/Countdown/Countdown.d.ts +13 -0
- package/dist/components/organisms/Countdown/Countdown.js +54 -47
- package/dist/components/organisms/DataTable/DataTable.cjs +1 -1
- package/dist/components/organisms/DataTable/DataTable.d.ts +5 -3
- package/dist/components/organisms/DataTable/DataTable.js +27 -26
- package/dist/components/organisms/Dialog/Dialog.cjs +1 -1
- package/dist/components/organisms/Dialog/Dialog.d.ts +8 -1
- package/dist/components/organisms/Dialog/Dialog.js +25 -23
- package/dist/components/organisms/Footer/Footer.cjs +1 -1
- package/dist/components/organisms/Footer/Footer.d.ts +9 -0
- package/dist/components/organisms/Footer/Footer.js +21 -23
- package/dist/components/organisms/ModerationQueue/ModerationQueue.cjs +1 -1
- package/dist/components/organisms/ModerationQueue/ModerationQueue.d.ts +40 -1
- package/dist/components/organisms/ModerationQueue/ModerationQueue.js +262 -237
- package/dist/components/organisms/ModerationQueue/QueueEditDialog.cjs +1 -1
- package/dist/components/organisms/ModerationQueue/QueueEditDialog.d.ts +1 -1
- package/dist/components/organisms/ModerationQueue/QueueEditDialog.js +23 -21
- package/dist/components/organisms/ModerationQueue/QueueEditSheet.cjs +1 -1
- package/dist/components/organisms/ModerationQueue/QueueEditSheet.d.ts +1 -1
- package/dist/components/organisms/ModerationQueue/QueueEditSheet.js +22 -20
- package/dist/components/organisms/ModerationQueue/queue-actions.d.ts +29 -10
- package/dist/components/organisms/Navbar/Navbar.cjs +1 -1
- package/dist/components/organisms/Navbar/Navbar.d.ts +38 -3
- package/dist/components/organisms/Navbar/Navbar.js +210 -187
- package/dist/components/organisms/Navbar/navbar-variants.cjs +1 -1
- package/dist/components/organisms/Navbar/navbar-variants.js +4 -2
- package/dist/components/organisms/Sheet/Sheet.cjs +1 -1
- package/dist/components/organisms/Sheet/Sheet.d.ts +8 -1
- package/dist/components/organisms/Sheet/Sheet.js +65 -63
- package/dist/lib/labels.cjs +1 -0
- package/dist/lib/labels.d.ts +7 -0
- package/dist/lib/labels.js +12 -0
- package/dist/meta.json +3 -3
- package/dist/roster.css +1 -1
- package/package.json +1 -1
|
@@ -1,118 +1,143 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, jsxs as s, Fragment as
|
|
3
|
-
import
|
|
4
|
-
import { FontAwesomeIcon as
|
|
5
|
-
import { faInbox as
|
|
2
|
+
import { jsx as r, jsxs as s, Fragment as L } from "react/jsx-runtime";
|
|
3
|
+
import nr, { Fragment as _, useEffect as Z, useRef as ir } from "react";
|
|
4
|
+
import { FontAwesomeIcon as u } from "../../../node_modules/@fortawesome/react-fontawesome/dist/index.js";
|
|
5
|
+
import { faInbox as or, faMoon as T, faRightFromBracket as lr, faXmark as X, faBars as dr } from "../../../node_modules/@fortawesome/free-solid-svg-icons/index.js";
|
|
6
6
|
import { cn as a } from "../../../lib/utils.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
7
|
+
import { withLabels as cr } from "../../../lib/labels.js";
|
|
8
|
+
import { Button as p } from "../../atoms/Button/Button.js";
|
|
9
|
+
import { Link as k } from "../../atoms/Link/Link.js";
|
|
10
|
+
import { Badge as G } from "../../atoms/Badge/Badge.js";
|
|
11
|
+
import { Avatar as mr } from "../../atoms/Avatar/Avatar.js";
|
|
12
|
+
import { switchThumbVariants as hr, switchTrackVariants as gr } from "../../atoms/Switch/switch-variants.js";
|
|
13
|
+
import { navbarVariants as ur } from "./navbar-variants.js";
|
|
14
|
+
import { Menu as pr, MenuButton as yr, MenuItems as fr, MenuItem as F } from "../../../node_modules/@headlessui/react/dist/components/menu/menu.js";
|
|
15
|
+
import { Popover as xr, PopoverButton as J, PopoverPanel as vr } from "../../../node_modules/@headlessui/react/dist/components/popover/popover.js";
|
|
16
|
+
import { Transition as P } from "../../../node_modules/@headlessui/react/dist/components/transition/transition.js";
|
|
17
|
+
function Q({ on: e, size: n }) {
|
|
17
18
|
return /* @__PURE__ */ r(
|
|
18
19
|
"span",
|
|
19
20
|
{
|
|
20
21
|
"aria-hidden": "true",
|
|
21
22
|
"data-testid": "navbar-theme-track",
|
|
22
23
|
"data-checked": e ? "" : void 0,
|
|
23
|
-
className: a(
|
|
24
|
-
children: /* @__PURE__ */ r("span", { className: a(
|
|
24
|
+
className: a(gr({ size: n, variant: "neutral" }), "rst:pointer-events-none"),
|
|
25
|
+
children: /* @__PURE__ */ r("span", { className: a(hr({ size: n })) })
|
|
25
26
|
}
|
|
26
27
|
);
|
|
27
28
|
}
|
|
28
|
-
const
|
|
29
|
+
const kr = (e) => {
|
|
29
30
|
e?.setAttribute("role", "menuitemcheckbox");
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
}, Y = (e, n) => typeof e == "function" ? e({ close: n }) : e, br = {
|
|
32
|
+
openMainMenu: "Open main menu",
|
|
33
|
+
closeMainMenu: "Close menu",
|
|
34
|
+
openUserMenu: "Open user menu",
|
|
35
|
+
logIn: "Log In",
|
|
36
|
+
logOut: "Log Out",
|
|
37
|
+
darkMode: "Dark Mode",
|
|
38
|
+
pendingInvitations: "Pending Invitations",
|
|
39
|
+
inbox: (e) => `Inbox (${e})`
|
|
40
|
+
};
|
|
41
|
+
function Nr(e) {
|
|
42
|
+
return nr.useSyncExternalStore(
|
|
33
43
|
(n) => {
|
|
34
44
|
if (!e || typeof document > "u") return () => {
|
|
35
45
|
};
|
|
36
|
-
const
|
|
37
|
-
return
|
|
46
|
+
const i = new MutationObserver(n);
|
|
47
|
+
return i.observe(document.documentElement, {
|
|
38
48
|
attributes: !0,
|
|
39
49
|
attributeFilter: ["class"]
|
|
40
|
-
}), () =>
|
|
50
|
+
}), () => i.disconnect();
|
|
41
51
|
},
|
|
42
52
|
() => e && document.documentElement.classList.contains("dark"),
|
|
43
53
|
() => !1
|
|
44
54
|
);
|
|
45
55
|
}
|
|
46
|
-
function
|
|
47
|
-
return
|
|
48
|
-
const n = (
|
|
49
|
-
const
|
|
50
|
-
!
|
|
56
|
+
function wr({ close: e }) {
|
|
57
|
+
return Z(() => {
|
|
58
|
+
const n = (i) => {
|
|
59
|
+
const y = document.querySelector("[data-roster-mobile-panel]"), b = document.querySelector("[data-roster-hamburger]"), f = i.target;
|
|
60
|
+
!y?.contains(f) && !b?.contains(f) && e();
|
|
51
61
|
};
|
|
52
62
|
return document.addEventListener("pointerdown", n, { capture: !0 }), () => document.removeEventListener("pointerdown", n, { capture: !0 });
|
|
53
63
|
}, [e]), null;
|
|
54
64
|
}
|
|
55
|
-
function
|
|
65
|
+
function Mr({
|
|
56
66
|
activePath: e,
|
|
57
67
|
close: n
|
|
58
68
|
}) {
|
|
59
|
-
const
|
|
60
|
-
return
|
|
61
|
-
|
|
69
|
+
const i = ir(e);
|
|
70
|
+
return Z(() => {
|
|
71
|
+
i.current !== e && (i.current = e, n());
|
|
62
72
|
}, [e, n]), null;
|
|
63
73
|
}
|
|
64
|
-
const
|
|
74
|
+
const Ur = ({
|
|
65
75
|
logoSrc: e,
|
|
66
76
|
logoSize: n = "2rem",
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
77
|
+
logoHeight: i,
|
|
78
|
+
logoWidth: y,
|
|
79
|
+
logoClassName: b,
|
|
80
|
+
brandName: f,
|
|
81
|
+
items: E,
|
|
82
|
+
activePath: N,
|
|
83
|
+
routerElement: x,
|
|
84
|
+
user: o,
|
|
85
|
+
onLogin: w,
|
|
86
|
+
onLogout: M,
|
|
87
|
+
onInboxClick: j,
|
|
88
|
+
onThemeToggle: v,
|
|
89
|
+
actions: H,
|
|
90
|
+
brandElement: R,
|
|
91
|
+
navActions: W,
|
|
92
|
+
userMenuItems: C = [],
|
|
93
|
+
className: rr,
|
|
94
|
+
variant: c = "default",
|
|
95
|
+
position: tr = "sticky",
|
|
96
|
+
themeMode: z,
|
|
97
|
+
labels: sr,
|
|
98
|
+
notificationVariant: $ = "error",
|
|
99
|
+
notificationFill: q = "solid",
|
|
100
|
+
...er
|
|
88
101
|
}) => {
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
const l = cr(br, sr), S = (o?.notificationCount || 0) > 0, A = (g) => typeof g == "number" ? `${g}px` : g, K = i !== void 0 || y !== void 0, U = K ? {
|
|
103
|
+
width: y === void 0 ? "auto" : A(y),
|
|
104
|
+
height: i === void 0 ? "auto" : A(i)
|
|
105
|
+
} : { width: A(n), height: A(n) }, V = K && "rst:object-contain rst:object-left rst:rtl:object-right", ar = Nr(z === "auto"), m = (z === "auto" ? ar ? "dark" : "light" : z ?? (c === "white" || c === "default" ? "light" : "dark")) === "dark", B = c === "slate" || c === "primary" || c === "default" && m || c === "white" && m || c === "transparent" && m, I = c === "primary" ? {
|
|
106
|
+
// On primary-700, text is that fill's ink (the dimmer links at 80%),
|
|
107
|
+
// so a light primary gets dark text. The dark fill is primary-950,
|
|
108
|
+
// which the ink doesn't describe: there it stays the dark surface's
|
|
109
|
+
// white and grays.
|
|
110
|
+
brand: "rst:text-primary-700-ink rst:hover:text-primary-700-ink/80 rst:dark:text-white rst:dark:hover:text-gray-200",
|
|
111
|
+
linkBase: "rst:text-primary-700-ink/80 rst:hover:text-primary-700-ink rst:dark:text-gray-300 rst:dark:hover:text-white",
|
|
112
|
+
linkActive: "rst:text-primary-700-ink rst:font-semibold rst:hover:text-primary-700-ink/80 rst:dark:text-primary-400 rst:dark:hover:text-primary-300",
|
|
113
|
+
hamburger: "rst:text-primary-700-ink/80 rst:hover:bg-primary-700-ink/10 rst:hover:text-primary-700-ink rst:dark:text-gray-300 rst:dark:hover:bg-white/10 rst:dark:hover:text-white"
|
|
114
|
+
} : {
|
|
115
|
+
brand: B ? "rst:text-white rst:dark:text-white rst:hover:text-gray-200 rst:dark:hover:text-gray-200" : "rst:text-gray-900 rst:dark:text-gray-900 rst:hover:text-gray-600 rst:dark:hover:text-gray-600",
|
|
116
|
+
linkBase: B ? "rst:text-gray-300 rst:dark:text-gray-300 rst:hover:text-white rst:dark:hover:text-white" : "rst:text-gray-600 rst:dark:text-gray-600 rst:hover:text-gray-900 rst:dark:hover:text-gray-900",
|
|
117
|
+
linkActive: B ? "rst:text-primary-400 rst:dark:text-primary-400 rst:font-semibold rst:hover:text-primary-300 rst:dark:hover:text-primary-300" : "rst:text-primary-600 rst:dark:text-primary-600 rst:font-semibold rst:hover:text-primary-700 rst:dark:hover:text-primary-700",
|
|
118
|
+
hamburger: B ? "rst:text-gray-300 rst:dark:text-gray-300 rst:hover:bg-white/10 rst:dark:hover:bg-white/10 rst:hover:text-white rst:dark:hover:text-white" : "rst:text-gray-500 rst:dark:text-gray-500 rst:hover:bg-gray-100 rst:dark:hover:bg-gray-100 rst:hover:text-gray-700 rst:dark:hover:text-gray-700"
|
|
94
119
|
};
|
|
95
120
|
return /* @__PURE__ */ r(
|
|
96
|
-
|
|
121
|
+
xr,
|
|
97
122
|
{
|
|
98
123
|
as: "nav",
|
|
99
|
-
className: a("rst:z-50",
|
|
100
|
-
...
|
|
101
|
-
children: ({ open:
|
|
102
|
-
const
|
|
103
|
-
return /* @__PURE__ */ s(
|
|
124
|
+
className: a("rst:z-50", ur({ variant: c, position: tr }), rr),
|
|
125
|
+
...er,
|
|
126
|
+
children: ({ open: g, close: h }) => {
|
|
127
|
+
const D = Y(H, h), O = Y(W, h);
|
|
128
|
+
return /* @__PURE__ */ s(L, { children: [
|
|
104
129
|
/* @__PURE__ */ s("div", { className: "rst:container rst:mx-auto rst:flex rst:items-center rst:justify-between rst:px-4 rst:h-16", children: [
|
|
105
130
|
/* @__PURE__ */ s(
|
|
106
|
-
|
|
131
|
+
k,
|
|
107
132
|
{
|
|
108
|
-
as:
|
|
133
|
+
as: x,
|
|
109
134
|
href: "/",
|
|
110
135
|
to: "/",
|
|
111
136
|
variant: "neutral",
|
|
112
137
|
underline: "none",
|
|
113
138
|
className: a(
|
|
114
139
|
"rst:flex rst:items-center rst:gap-3 rst:transition-opacity",
|
|
115
|
-
|
|
140
|
+
I.brand
|
|
116
141
|
),
|
|
117
142
|
children: [
|
|
118
143
|
/* @__PURE__ */ r(
|
|
@@ -120,28 +145,28 @@ const Ir = ({
|
|
|
120
145
|
{
|
|
121
146
|
src: e,
|
|
122
147
|
alt: "",
|
|
123
|
-
style:
|
|
124
|
-
className: a("rst:shrink-0",
|
|
148
|
+
style: U,
|
|
149
|
+
className: a("rst:shrink-0", V, b ?? "rst:rounded-md")
|
|
125
150
|
}
|
|
126
151
|
),
|
|
127
|
-
|
|
152
|
+
R ?? /* @__PURE__ */ r("span", { className: "rst:text-xl rst:font-bold rst:tracking-tight", children: f })
|
|
128
153
|
]
|
|
129
154
|
}
|
|
130
155
|
),
|
|
131
156
|
/* @__PURE__ */ s("div", { className: "rst:hidden rst:md:flex rst:items-center rst:gap-8", children: [
|
|
132
|
-
/* @__PURE__ */ r("div", { className: "rst:flex rst:items-center rst:gap-6", children:
|
|
133
|
-
const
|
|
157
|
+
/* @__PURE__ */ r("div", { className: "rst:flex rst:items-center rst:gap-6", children: E.map((t) => {
|
|
158
|
+
const d = N === t.path;
|
|
134
159
|
return /* @__PURE__ */ s(
|
|
135
|
-
|
|
160
|
+
k,
|
|
136
161
|
{
|
|
137
|
-
as:
|
|
162
|
+
as: x,
|
|
138
163
|
href: t.path,
|
|
139
164
|
to: t.path,
|
|
140
165
|
variant: "neutral",
|
|
141
166
|
underline: "none",
|
|
142
167
|
className: a(
|
|
143
168
|
"rst:inline-flex rst:items-center rst:gap-1.5 rst:text-sm rst:transition-colors rst:duration-200",
|
|
144
|
-
|
|
169
|
+
d ? I.linkActive : I.linkBase
|
|
145
170
|
),
|
|
146
171
|
children: [
|
|
147
172
|
t.label,
|
|
@@ -151,69 +176,67 @@ const Ir = ({
|
|
|
151
176
|
t.path
|
|
152
177
|
);
|
|
153
178
|
}) }),
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
/* @__PURE__ */ s(
|
|
157
|
-
/* @__PURE__ */ r("span", { className: "rst:sr-only", children:
|
|
179
|
+
O,
|
|
180
|
+
D ?? (o ? /* @__PURE__ */ s(pr, { as: "div", className: "rst:relative rst:ml-2", children: [
|
|
181
|
+
/* @__PURE__ */ s(yr, { className: "rst:relative rst:flex rst:rounded-full rst:text-sm rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:ring-offset-background", children: [
|
|
182
|
+
/* @__PURE__ */ r("span", { className: "rst:sr-only", children: l.openUserMenu }),
|
|
158
183
|
/* @__PURE__ */ r(
|
|
159
|
-
|
|
184
|
+
mr,
|
|
160
185
|
{
|
|
161
|
-
|
|
162
|
-
|
|
186
|
+
"aria-hidden": "true",
|
|
187
|
+
alt: "",
|
|
188
|
+
initials: o.initials,
|
|
189
|
+
src: o.avatarSrc,
|
|
163
190
|
size: "sm",
|
|
164
191
|
shape: "circle",
|
|
165
|
-
colorScheme:
|
|
192
|
+
colorScheme: o.avatarColor ?? "primary"
|
|
166
193
|
}
|
|
167
194
|
),
|
|
168
|
-
|
|
169
|
-
|
|
195
|
+
S && /* @__PURE__ */ r("div", { className: "rst:absolute rst:-top-1 rst:-right-2", children: /* @__PURE__ */ r(
|
|
196
|
+
G,
|
|
170
197
|
{
|
|
171
|
-
fill:
|
|
198
|
+
fill: q,
|
|
172
199
|
size: "xs",
|
|
173
200
|
statusBadge: !0,
|
|
174
|
-
variant:
|
|
175
|
-
children:
|
|
201
|
+
variant: $,
|
|
202
|
+
children: o.notificationCount
|
|
176
203
|
}
|
|
177
204
|
) })
|
|
178
205
|
] }),
|
|
179
206
|
/* @__PURE__ */ r(
|
|
180
|
-
|
|
207
|
+
P,
|
|
181
208
|
{
|
|
182
|
-
as:
|
|
209
|
+
as: _,
|
|
183
210
|
enter: "rst:transition rst:ease-out rst:duration-100",
|
|
184
211
|
enterFrom: "rst:transform rst:opacity-0 rst:scale-95",
|
|
185
212
|
enterTo: "rst:transform rst:opacity-100 rst:scale-100",
|
|
186
213
|
leave: "rst:transition rst:ease-in rst:duration-75",
|
|
187
214
|
leaveFrom: "rst:transform rst:opacity-100 rst:scale-100",
|
|
188
215
|
leaveTo: "rst:transform rst:opacity-0 rst:scale-95",
|
|
189
|
-
children: /* @__PURE__ */ s(
|
|
216
|
+
children: /* @__PURE__ */ s(fr, { className: "rst:absolute rst:right-0 rst:z-50 rst:mt-2 rst:w-48 rst:origin-top-right rst:rounded-md rst:bg-white rst:dark:bg-gray-800 rst:py-1 rst:elevation-anchored rst:ring rst:ring-black/5 rst:dark:ring-white/10 rst:focus:outline-hidden rst:divide-y rst:divide-gray-100 rst:dark:divide-gray-700", children: [
|
|
190
217
|
/* @__PURE__ */ s("div", { className: "rst:py-1", children: [
|
|
191
|
-
|
|
192
|
-
|
|
218
|
+
S && j && /* @__PURE__ */ r(F, { children: ({ focus: t }) => /* @__PURE__ */ r(
|
|
219
|
+
p,
|
|
193
220
|
{
|
|
194
221
|
variant: "ghost",
|
|
195
222
|
colorScheme: "neutral",
|
|
196
223
|
size: "sm",
|
|
197
|
-
onClick:
|
|
224
|
+
onClick: j,
|
|
198
225
|
className: a(
|
|
199
226
|
"rst:w-full rst:justify-start rst:rounded-none rst:px-4",
|
|
200
227
|
t && "rst:bg-gray-50 rst:dark:bg-gray-700"
|
|
201
228
|
),
|
|
202
229
|
startIcon: /* @__PURE__ */ r(
|
|
203
|
-
|
|
230
|
+
u,
|
|
204
231
|
{
|
|
205
|
-
icon:
|
|
232
|
+
icon: or,
|
|
206
233
|
className: "rst:text-primary-500 rst:w-4"
|
|
207
234
|
}
|
|
208
235
|
),
|
|
209
|
-
children:
|
|
210
|
-
"Inbox (",
|
|
211
|
-
i.notificationCount,
|
|
212
|
-
")"
|
|
213
|
-
]
|
|
236
|
+
children: l.inbox(o.notificationCount ?? 0)
|
|
214
237
|
}
|
|
215
238
|
) }),
|
|
216
|
-
|
|
239
|
+
v && /* @__PURE__ */ r(F, { children: ({ focus: t }) => (
|
|
217
240
|
/* The row is the control. Headless UI keeps
|
|
218
241
|
focus on the menu and clicks the active item
|
|
219
242
|
on Enter or Space, so the row needs no key
|
|
@@ -221,10 +244,10 @@ const Ir = ({
|
|
|
221
244
|
/* @__PURE__ */ s(
|
|
222
245
|
"div",
|
|
223
246
|
{
|
|
224
|
-
ref:
|
|
225
|
-
"aria-checked":
|
|
226
|
-
onClick: (
|
|
227
|
-
|
|
247
|
+
ref: kr,
|
|
248
|
+
"aria-checked": m,
|
|
249
|
+
onClick: (d) => {
|
|
250
|
+
d.preventDefault(), v();
|
|
228
251
|
},
|
|
229
252
|
className: a(
|
|
230
253
|
"rst:flex rst:w-full rst:items-center rst:justify-between rst:px-4 rst:py-2 rst:text-sm rst:text-gray-700 rst:dark:text-gray-200 rst:cursor-pointer rst:transition-colors",
|
|
@@ -233,34 +256,34 @@ const Ir = ({
|
|
|
233
256
|
children: [
|
|
234
257
|
/* @__PURE__ */ s("div", { className: "rst:flex rst:items-center rst:gap-2", children: [
|
|
235
258
|
/* @__PURE__ */ r(
|
|
236
|
-
|
|
259
|
+
u,
|
|
237
260
|
{
|
|
238
|
-
icon:
|
|
261
|
+
icon: T,
|
|
239
262
|
className: a(
|
|
240
263
|
"rst:w-4 rst:transition-colors",
|
|
241
|
-
|
|
264
|
+
m ? "rst:text-amber-500" : "rst:text-gray-400"
|
|
242
265
|
)
|
|
243
266
|
}
|
|
244
267
|
),
|
|
245
|
-
/* @__PURE__ */ r("span", { className: "rst:font-medium", children:
|
|
268
|
+
/* @__PURE__ */ r("span", { className: "rst:font-medium", children: l.darkMode })
|
|
246
269
|
] }),
|
|
247
|
-
/* @__PURE__ */ r(
|
|
270
|
+
/* @__PURE__ */ r(Q, { on: m, size: "xs" })
|
|
248
271
|
]
|
|
249
272
|
}
|
|
250
273
|
)
|
|
251
274
|
) })
|
|
252
275
|
] }),
|
|
253
|
-
|
|
254
|
-
|
|
276
|
+
C.length > 0 && /* @__PURE__ */ r("div", { className: "rst:py-1", children: C.map((t) => /* @__PURE__ */ r(F, { children: ({ focus: d }) => /* @__PURE__ */ s(
|
|
277
|
+
k,
|
|
255
278
|
{
|
|
256
|
-
as:
|
|
279
|
+
as: x,
|
|
257
280
|
href: t.path,
|
|
258
281
|
to: t.path,
|
|
259
282
|
variant: "neutral",
|
|
260
283
|
underline: "none",
|
|
261
284
|
className: a(
|
|
262
285
|
"rst:flex rst:w-full rst:items-center rst:justify-between rst:gap-2 rst:px-4 rst:py-2 rst:text-sm rst:text-gray-700 rst:dark:text-gray-200 rst:transition-colors",
|
|
263
|
-
|
|
286
|
+
d && "rst:bg-gray-50 rst:dark:bg-gray-700"
|
|
264
287
|
),
|
|
265
288
|
children: [
|
|
266
289
|
t.label,
|
|
@@ -268,69 +291,69 @@ const Ir = ({
|
|
|
268
291
|
]
|
|
269
292
|
}
|
|
270
293
|
) }, t.path)) }),
|
|
271
|
-
|
|
272
|
-
|
|
294
|
+
M && /* @__PURE__ */ r("div", { className: "rst:py-1", children: /* @__PURE__ */ r(F, { children: ({ focus: t }) => /* @__PURE__ */ r(
|
|
295
|
+
p,
|
|
273
296
|
{
|
|
274
297
|
variant: "ghost",
|
|
275
298
|
colorScheme: "neutral",
|
|
276
299
|
size: "sm",
|
|
277
|
-
onClick:
|
|
300
|
+
onClick: M,
|
|
278
301
|
className: a(
|
|
279
302
|
"rst:w-full rst:justify-start rst:rounded-none rst:px-4",
|
|
280
303
|
t && "rst:bg-gray-50 rst:dark:bg-gray-700"
|
|
281
304
|
),
|
|
282
305
|
startIcon: /* @__PURE__ */ r(
|
|
283
|
-
|
|
306
|
+
u,
|
|
284
307
|
{
|
|
285
|
-
icon:
|
|
308
|
+
icon: lr,
|
|
286
309
|
className: "rst:text-gray-400 rst:dark:text-gray-500 rst:w-4"
|
|
287
310
|
}
|
|
288
311
|
),
|
|
289
|
-
children:
|
|
312
|
+
children: l.logOut
|
|
290
313
|
}
|
|
291
314
|
) }) })
|
|
292
315
|
] })
|
|
293
316
|
}
|
|
294
317
|
)
|
|
295
|
-
] }) : /* @__PURE__ */ r(
|
|
318
|
+
] }) : /* @__PURE__ */ r(p, { size: "sm", variant: "solid", colorScheme: "primary", onClick: w, children: l.logIn }))
|
|
296
319
|
] }),
|
|
297
320
|
/* @__PURE__ */ r("div", { "data-roster-hamburger": !0, className: "rst:flex rst:md:hidden", children: /* @__PURE__ */ s(
|
|
298
|
-
|
|
321
|
+
J,
|
|
299
322
|
{
|
|
300
323
|
className: a(
|
|
301
324
|
"rst:inline-flex rst:items-center rst:justify-center rst:rounded-md rst:p-2 rst:focus-visible:outline-hidden rst:focus-visible:ring-2 rst:focus-visible:ring-ring rst:focus-visible:ring-offset-2 rst:ring-offset-background",
|
|
302
|
-
|
|
325
|
+
I.hamburger
|
|
303
326
|
),
|
|
304
327
|
children: [
|
|
305
|
-
/* @__PURE__ */ r("span", { className: "rst:sr-only", children:
|
|
306
|
-
|
|
307
|
-
|
|
328
|
+
/* @__PURE__ */ r("span", { className: "rst:sr-only", children: l.openMainMenu }),
|
|
329
|
+
g ? /* @__PURE__ */ r(
|
|
330
|
+
u,
|
|
308
331
|
{
|
|
309
|
-
icon:
|
|
332
|
+
icon: X,
|
|
310
333
|
className: "rst:block rst:h-6 rst:w-6",
|
|
311
334
|
"aria-hidden": "true"
|
|
312
335
|
}
|
|
313
336
|
) : /* @__PURE__ */ s("div", { className: "rst:relative", children: [
|
|
314
337
|
/* @__PURE__ */ r(
|
|
315
|
-
|
|
338
|
+
u,
|
|
316
339
|
{
|
|
317
|
-
icon:
|
|
340
|
+
icon: dr,
|
|
318
341
|
className: "rst:block rst:h-6 rst:w-6",
|
|
319
342
|
"aria-hidden": "true"
|
|
320
343
|
}
|
|
321
344
|
),
|
|
322
|
-
|
|
345
|
+
S && /* @__PURE__ */ r("span", { className: "rst:absolute rst:top-0 rst:right-0 rst:block rst:h-2.5 rst:w-2.5 rst:rounded-full rst:bg-error-500 rst:ring-2 rst:ring-transparent rst:transform rst:translate-x-1/4 rst:-translate-y-1/4" })
|
|
323
346
|
] })
|
|
324
347
|
]
|
|
325
348
|
}
|
|
326
349
|
) })
|
|
327
350
|
] }),
|
|
328
|
-
|
|
329
|
-
|
|
351
|
+
g && /* @__PURE__ */ r(wr, { close: h }),
|
|
352
|
+
g && /* @__PURE__ */ r(Mr, { activePath: N, close: h }),
|
|
330
353
|
/* @__PURE__ */ r(
|
|
331
|
-
|
|
354
|
+
P,
|
|
332
355
|
{
|
|
333
|
-
as:
|
|
356
|
+
as: _,
|
|
334
357
|
enter: "rst:duration-200 rst:ease-out",
|
|
335
358
|
enterFrom: "rst:opacity-0 rst:scale-95",
|
|
336
359
|
enterTo: "rst:opacity-100 rst:scale-100",
|
|
@@ -338,7 +361,7 @@ const Ir = ({
|
|
|
338
361
|
leaveFrom: "rst:opacity-100 rst:scale-100",
|
|
339
362
|
leaveTo: "rst:opacity-0 rst:scale-95",
|
|
340
363
|
children: /* @__PURE__ */ r(
|
|
341
|
-
|
|
364
|
+
vr,
|
|
342
365
|
{
|
|
343
366
|
focus: !0,
|
|
344
367
|
className: "rst:absolute rst:top-0 rst:inset-x-0 rst:z-50 rst:origin-top-right rst:transform rst:p-2 rst:transition rst:md:hidden",
|
|
@@ -351,18 +374,18 @@ const Ir = ({
|
|
|
351
374
|
{
|
|
352
375
|
src: e,
|
|
353
376
|
alt: "",
|
|
354
|
-
style:
|
|
355
|
-
className: a("rst:shrink-0",
|
|
377
|
+
style: U,
|
|
378
|
+
className: a("rst:shrink-0", V, b ?? "rst:rounded-md")
|
|
356
379
|
}
|
|
357
380
|
),
|
|
358
|
-
|
|
381
|
+
R ?? /* @__PURE__ */ r("span", { className: "rst:font-bold rst:text-gray-900 rst:dark:text-white", children: f })
|
|
359
382
|
] }),
|
|
360
|
-
/* @__PURE__ */ r("div", { className: "rst:-mr-2", children: /* @__PURE__ */ s(
|
|
361
|
-
/* @__PURE__ */ r("span", { className: "rst:sr-only", children:
|
|
383
|
+
/* @__PURE__ */ r("div", { className: "rst:-mr-2", children: /* @__PURE__ */ s(J, { className: "rst:inline-flex rst:items-center rst:justify-center rst:rounded-md rst:p-2 rst:text-gray-400 rst:hover:bg-gray-100 rst:dark:hover:bg-gray-700 rst:hover:text-gray-500 rst:dark:hover:text-white rst:focus:outline-hidden", children: [
|
|
384
|
+
/* @__PURE__ */ r("span", { className: "rst:sr-only", children: l.closeMainMenu }),
|
|
362
385
|
/* @__PURE__ */ r(
|
|
363
|
-
|
|
386
|
+
u,
|
|
364
387
|
{
|
|
365
|
-
icon:
|
|
388
|
+
icon: X,
|
|
366
389
|
className: "rst:h-6 rst:w-6",
|
|
367
390
|
"aria-hidden": "true"
|
|
368
391
|
}
|
|
@@ -370,30 +393,30 @@ const Ir = ({
|
|
|
370
393
|
] }) })
|
|
371
394
|
] }),
|
|
372
395
|
/* @__PURE__ */ s("div", { className: "rst:mt-6", children: [
|
|
373
|
-
|
|
396
|
+
O && /* @__PURE__ */ r("div", { className: "rst:mb-4", children: O }),
|
|
374
397
|
/* @__PURE__ */ s("nav", { className: "rst:grid rst:gap-y-4", children: [
|
|
375
|
-
|
|
376
|
-
const
|
|
398
|
+
E.map((t) => {
|
|
399
|
+
const d = N === t.path;
|
|
377
400
|
return /* @__PURE__ */ r(
|
|
378
|
-
|
|
401
|
+
k,
|
|
379
402
|
{
|
|
380
|
-
as:
|
|
403
|
+
as: x,
|
|
381
404
|
href: t.path,
|
|
382
405
|
to: t.path,
|
|
383
|
-
onClick: () =>
|
|
406
|
+
onClick: () => h(),
|
|
384
407
|
variant: "neutral",
|
|
385
408
|
underline: "none",
|
|
386
409
|
className: a(
|
|
387
410
|
"rst:-m-3 rst:flex rst:items-center rst:rounded-md rst:p-3 rst:transition-colors",
|
|
388
411
|
"rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700",
|
|
389
|
-
|
|
412
|
+
d ? "rst:bg-gray-50 rst:dark:bg-gray-700" : "rst:text-gray-900 rst:dark:text-gray-100"
|
|
390
413
|
),
|
|
391
414
|
children: /* @__PURE__ */ s(
|
|
392
415
|
"span",
|
|
393
416
|
{
|
|
394
417
|
className: a(
|
|
395
418
|
"rst:ml-3 rst:inline-flex rst:items-center rst:gap-1.5 rst:text-base rst:font-medium",
|
|
396
|
-
|
|
419
|
+
d ? "rst:text-primary-600 rst:dark:text-primary-400 rst:font-bold" : "rst:text-gray-900 rst:dark:text-gray-100"
|
|
397
420
|
),
|
|
398
421
|
children: [
|
|
399
422
|
t.label,
|
|
@@ -405,23 +428,23 @@ const Ir = ({
|
|
|
405
428
|
t.path
|
|
406
429
|
);
|
|
407
430
|
}),
|
|
408
|
-
|
|
431
|
+
o && C.length > 0 && /* @__PURE__ */ s(L, { children: [
|
|
409
432
|
/* @__PURE__ */ r("hr", { className: "rst:border-gray-100 rst:dark:border-gray-700" }),
|
|
410
|
-
|
|
411
|
-
const
|
|
433
|
+
C.map((t) => {
|
|
434
|
+
const d = N === t.path;
|
|
412
435
|
return /* @__PURE__ */ s(
|
|
413
|
-
|
|
436
|
+
k,
|
|
414
437
|
{
|
|
415
|
-
as:
|
|
438
|
+
as: x,
|
|
416
439
|
href: t.path,
|
|
417
440
|
to: t.path,
|
|
418
|
-
onClick: () =>
|
|
441
|
+
onClick: () => h(),
|
|
419
442
|
variant: "neutral",
|
|
420
443
|
underline: "none",
|
|
421
444
|
className: a(
|
|
422
445
|
"rst:-m-3 rst:flex rst:items-center rst:rounded-md rst:p-3 rst:transition-colors",
|
|
423
446
|
"rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700",
|
|
424
|
-
|
|
447
|
+
d ? "rst:bg-gray-50 rst:dark:bg-gray-700" : "rst:text-gray-900 rst:dark:text-gray-100"
|
|
425
448
|
),
|
|
426
449
|
children: [
|
|
427
450
|
/* @__PURE__ */ r(
|
|
@@ -429,7 +452,7 @@ const Ir = ({
|
|
|
429
452
|
{
|
|
430
453
|
className: a(
|
|
431
454
|
"rst:ml-3 rst:text-base rst:font-medium",
|
|
432
|
-
|
|
455
|
+
d ? "rst:text-primary-600 rst:dark:text-primary-400 rst:font-bold" : "rst:text-gray-900 rst:dark:text-gray-100"
|
|
433
456
|
),
|
|
434
457
|
children: t.label
|
|
435
458
|
}
|
|
@@ -444,83 +467,83 @@ const Ir = ({
|
|
|
444
467
|
] })
|
|
445
468
|
] })
|
|
446
469
|
] }),
|
|
447
|
-
(
|
|
448
|
-
|
|
470
|
+
(o || D || w) && /* @__PURE__ */ r("div", { className: "rst:py-6 rst:px-5 rst:space-y-4", children: D || (!o && w ? /* @__PURE__ */ r(
|
|
471
|
+
p,
|
|
449
472
|
{
|
|
450
473
|
variant: "solid",
|
|
451
474
|
colorScheme: "primary",
|
|
452
475
|
className: "rst:w-full rst:justify-center",
|
|
453
476
|
onClick: () => {
|
|
454
|
-
|
|
477
|
+
w(), h();
|
|
455
478
|
},
|
|
456
|
-
children:
|
|
479
|
+
children: l.logIn
|
|
457
480
|
}
|
|
458
|
-
) : /* @__PURE__ */ s(
|
|
459
|
-
|
|
460
|
-
|
|
481
|
+
) : /* @__PURE__ */ s(L, { children: [
|
|
482
|
+
S && j && /* @__PURE__ */ r(
|
|
483
|
+
p,
|
|
461
484
|
{
|
|
462
485
|
variant: "ghost",
|
|
463
486
|
colorScheme: "neutral",
|
|
464
487
|
onClick: () => {
|
|
465
|
-
|
|
488
|
+
j?.(), h();
|
|
466
489
|
},
|
|
467
490
|
className: "rst:w-full rst:justify-between rst:px-4 rst:text-base rst:font-medium rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700 rst:text-gray-900 rst:dark:text-gray-100",
|
|
468
491
|
endIcon: /* @__PURE__ */ r(
|
|
469
|
-
|
|
492
|
+
G,
|
|
470
493
|
{
|
|
471
|
-
fill:
|
|
494
|
+
fill: q,
|
|
472
495
|
size: "xs",
|
|
473
496
|
statusBadge: !0,
|
|
474
|
-
variant:
|
|
475
|
-
children:
|
|
497
|
+
variant: $,
|
|
498
|
+
children: o?.notificationCount
|
|
476
499
|
}
|
|
477
500
|
),
|
|
478
|
-
children:
|
|
501
|
+
children: l.pendingInvitations
|
|
479
502
|
}
|
|
480
503
|
),
|
|
481
|
-
|
|
504
|
+
v && /* The row is the switch: one tab stop, its
|
|
482
505
|
state in `aria-checked`, its name from its text. */
|
|
483
506
|
/* @__PURE__ */ s(
|
|
484
507
|
"div",
|
|
485
508
|
{
|
|
486
509
|
onClick: (t) => {
|
|
487
|
-
t.preventDefault(),
|
|
510
|
+
t.preventDefault(), v();
|
|
488
511
|
},
|
|
489
512
|
role: "switch",
|
|
490
|
-
"aria-checked":
|
|
513
|
+
"aria-checked": m,
|
|
491
514
|
tabIndex: 0,
|
|
492
515
|
onKeyDown: (t) => {
|
|
493
|
-
t.repeat || (t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
516
|
+
t.repeat || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), v());
|
|
494
517
|
},
|
|
495
518
|
className: "rst:flex rst:w-full rst:items-center rst:justify-between rst:rounded-md rst:px-4 rst:py-2 rst:text-base rst:transition-colors rst:cursor-pointer rst:hover:bg-gray-50 rst:dark:hover:bg-gray-700 rst:text-gray-900 rst:dark:text-gray-100",
|
|
496
519
|
children: [
|
|
497
520
|
/* @__PURE__ */ s("div", { className: "rst:flex rst:items-center rst:gap-3 rst:font-medium", children: [
|
|
498
521
|
/* @__PURE__ */ r(
|
|
499
|
-
|
|
522
|
+
u,
|
|
500
523
|
{
|
|
501
|
-
icon:
|
|
524
|
+
icon: T,
|
|
502
525
|
className: a(
|
|
503
526
|
"rst:w-5 rst:transition-colors",
|
|
504
|
-
|
|
527
|
+
m ? "rst:text-amber-500" : "rst:text-gray-400"
|
|
505
528
|
)
|
|
506
529
|
}
|
|
507
530
|
),
|
|
508
|
-
/* @__PURE__ */ r("span", { children:
|
|
531
|
+
/* @__PURE__ */ r("span", { children: l.darkMode })
|
|
509
532
|
] }),
|
|
510
|
-
/* @__PURE__ */ r(
|
|
533
|
+
/* @__PURE__ */ r(Q, { on: m, size: "sm" })
|
|
511
534
|
]
|
|
512
535
|
}
|
|
513
536
|
),
|
|
514
|
-
|
|
515
|
-
|
|
537
|
+
M && /* @__PURE__ */ r(
|
|
538
|
+
p,
|
|
516
539
|
{
|
|
517
540
|
variant: "outline",
|
|
518
541
|
colorScheme: "error",
|
|
519
542
|
className: "rst:w-full rst:justify-center",
|
|
520
543
|
onClick: () => {
|
|
521
|
-
|
|
544
|
+
M?.(), h();
|
|
522
545
|
},
|
|
523
|
-
children:
|
|
546
|
+
children: l.logOut
|
|
524
547
|
}
|
|
525
548
|
)
|
|
526
549
|
] })) })
|
|
@@ -535,5 +558,5 @@ const Ir = ({
|
|
|
535
558
|
);
|
|
536
559
|
};
|
|
537
560
|
export {
|
|
538
|
-
|
|
561
|
+
Ur as Navbar
|
|
539
562
|
};
|