@demokit-ui/demokit 0.1.0 → 0.1.2
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 +3 -0
- package/dist/app/demo1-shell.js +195 -188
- package/dist/app/tweak-panel.d.ts +1 -2
- package/dist/app/tweak-panel.js +20 -4
- package/dist/index.js +811 -479
- package/dist/kit/components/chart/chart/chart.examples.d.ts +24 -0
- package/dist/kit/components/chart/chart/chart.examples.js +422 -0
- package/dist/kit/components/composite/action-bar/action-bar.examples.d.ts +2 -0
- package/dist/kit/components/composite/action-bar/action-bar.examples.js +35 -0
- package/dist/kit/components/composite/action-card/action-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/action-card/action-card.examples.js +34 -0
- package/dist/kit/components/composite/activity-feed/activity-feed.examples.d.ts +2 -0
- package/dist/kit/components/composite/activity-feed/activity-feed.examples.js +44 -0
- package/dist/kit/components/composite/alert-card/alert-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/alert-card/alert-card.examples.js +18 -0
- package/dist/kit/components/composite/approval-flow/approval-flow.examples.d.ts +2 -0
- package/dist/kit/components/composite/approval-flow/approval-flow.examples.js +70 -0
- package/dist/kit/components/composite/auth-shell/auth-shell.examples.d.ts +2 -0
- package/dist/kit/components/composite/auth-shell/auth-shell.examples.js +23 -0
- package/dist/kit/components/composite/board-toolbar/board-toolbar.examples.d.ts +2 -0
- package/dist/kit/components/composite/board-toolbar/board-toolbar.examples.js +32 -0
- package/dist/kit/components/composite/chart-card/chart-card.examples.d.ts +3 -0
- package/dist/kit/components/composite/chart-card/chart-card.examples.js +58 -0
- package/dist/kit/components/composite/chart-toolbar/chart-toolbar.examples.d.ts +2 -0
- package/dist/kit/components/composite/chart-toolbar/chart-toolbar.examples.js +39 -0
- package/dist/kit/components/composite/data-section/data-section.examples.d.ts +3 -0
- package/dist/kit/components/composite/data-section/data-section.examples.js +48 -0
- package/dist/kit/components/composite/description-grid/description-grid.examples.d.ts +2 -0
- package/dist/kit/components/composite/description-grid/description-grid.examples.js +30 -0
- package/dist/kit/components/composite/detail-header/detail-header.examples.d.ts +2 -0
- package/dist/kit/components/composite/detail-header/detail-header.examples.js +37 -0
- package/dist/kit/components/composite/filter-panel/filter-panel.examples.d.ts +2 -0
- package/dist/kit/components/composite/filter-panel/filter-panel.examples.js +63 -0
- package/dist/kit/components/composite/filter-toolbar/filter-toolbar.examples.d.ts +2 -0
- package/dist/kit/components/composite/filter-toolbar/filter-toolbar.examples.js +39 -0
- package/dist/kit/components/composite/forgot-password-form/forgot-password-form.examples.d.ts +2 -0
- package/dist/kit/components/composite/forgot-password-form/forgot-password-form.examples.js +19 -0
- package/dist/kit/components/composite/form-section/form-section.examples.d.ts +2 -0
- package/dist/kit/components/composite/form-section/form-section.examples.js +40 -0
- package/dist/kit/components/composite/kanban-board/kanban-board.examples.d.ts +2 -0
- package/dist/kit/components/composite/kanban-board/kanban-board.examples.js +72 -0
- package/dist/kit/components/composite/login-card/login-card.examples.d.ts +3 -0
- package/dist/kit/components/composite/login-card/login-card.examples.js +30 -0
- package/dist/kit/components/composite/message-list-card/message-list-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/message-list-card/message-list-card.examples.js +56 -0
- package/dist/kit/components/composite/metric-card/metric-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/metric-card/metric-card.examples.js +50 -0
- package/dist/kit/components/composite/milestone-card/milestone-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/milestone-card/milestone-card.examples.js +54 -0
- package/dist/kit/components/composite/oauth-login-buttons/oauth-login-buttons.examples.d.ts +2 -0
- package/dist/kit/components/composite/oauth-login-buttons/oauth-login-buttons.examples.js +24 -0
- package/dist/kit/components/composite/page-header/page-header.examples.d.ts +3 -0
- package/dist/kit/components/composite/page-header/page-header.examples.js +56 -0
- package/dist/kit/components/composite/profile-card/profile-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/profile-card/profile-card.examples.js +45 -0
- package/dist/kit/components/composite/progress-card/progress-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/progress-card/progress-card.examples.js +42 -0
- package/dist/kit/components/composite/project-card/project-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/project-card/project-card.examples.js +48 -0
- package/dist/kit/components/composite/shortcut-card/shortcut-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/shortcut-card/shortcut-card.examples.js +18 -0
- package/dist/kit/components/composite/sprint-summary/sprint-summary.examples.d.ts +2 -0
- package/dist/kit/components/composite/sprint-summary/sprint-summary.examples.js +27 -0
- package/dist/kit/components/composite/state-panel/state-panel.examples.d.ts +2 -0
- package/dist/kit/components/composite/state-panel/state-panel.examples.js +48 -0
- package/dist/kit/components/composite/summary-card/summary-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/summary-card/summary-card.examples.js +32 -0
- package/dist/kit/components/composite/task-card/task-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/task-card/task-card.examples.js +39 -0
- package/dist/kit/components/composite/timeline/timeline.examples.d.ts +2 -0
- package/dist/kit/components/composite/timeline/timeline.examples.js +75 -0
- package/dist/kit/components/composite/todo-card/todo-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/todo-card/todo-card.examples.js +42 -0
- package/dist/kit/components/data-display/avatar/avatar.examples.d.ts +7 -0
- package/dist/kit/components/data-display/avatar/avatar.examples.js +48 -0
- package/dist/kit/components/data-display/avatar-group/avatar-group.examples.d.ts +3 -0
- package/dist/kit/components/data-display/avatar-group/avatar-group.examples.js +35 -0
- package/dist/kit/components/data-display/badge/badge.examples.d.ts +9 -0
- package/dist/kit/components/data-display/badge/badge.examples.js +57 -0
- package/dist/kit/components/data-display/card/card.examples.d.ts +16 -0
- package/dist/kit/components/data-display/card/card.examples.js +72 -0
- package/dist/kit/components/data-display/data-grid/data-grid.examples.d.ts +2 -0
- package/dist/kit/components/data-display/data-grid/data-grid.examples.js +92 -0
- package/dist/kit/components/data-display/kbd/kbd.examples.d.ts +3 -0
- package/dist/kit/components/data-display/kbd/kbd.examples.js +43 -0
- package/dist/kit/components/data-display/money-amount/money-amount.examples.d.ts +1 -0
- package/dist/kit/components/data-display/money-amount/money-amount.examples.js +26 -0
- package/dist/kit/components/data-display/progress/progress.examples.d.ts +3 -0
- package/dist/kit/components/data-display/progress/progress.examples.js +45 -0
- package/dist/kit/components/data-display/skeleton/skeleton.examples.d.ts +3 -0
- package/dist/kit/components/data-display/skeleton/skeleton.examples.js +37 -0
- package/dist/kit/components/data-display/sliding-number/sliding-number.examples.d.ts +3 -0
- package/dist/kit/components/data-display/sliding-number/sliding-number.examples.js +42 -0
- package/dist/kit/components/data-display/stepper/stepper.examples.d.ts +2 -0
- package/dist/kit/components/data-display/stepper/stepper.examples.js +28 -0
- package/dist/kit/components/data-display/table/table.examples.d.ts +4 -0
- package/dist/kit/components/data-display/table/table.examples.js +78 -0
- package/dist/kit/components/decorative/aurora-background/aurora-background.examples.d.ts +2 -0
- package/dist/kit/components/decorative/aurora-background/aurora-background.examples.js +22 -0
- package/dist/kit/components/decorative/grid-background/grid-background.examples.d.ts +4 -0
- package/dist/kit/components/decorative/grid-background/grid-background.examples.js +42 -0
- package/dist/kit/components/decorative/shimmering-text/shimmering-text.examples.d.ts +4 -0
- package/dist/kit/components/decorative/shimmering-text/shimmering-text.examples.js +54 -0
- package/dist/kit/components/decorative/text-reveal/text-reveal.examples.d.ts +2 -0
- package/dist/kit/components/decorative/text-reveal/text-reveal.examples.js +46 -0
- package/dist/kit/components/feedback/alert/alert.examples.d.ts +2 -0
- package/dist/kit/components/feedback/alert/alert.examples.js +37 -0
- package/dist/kit/components/feedback/alert-dialog/alert-dialog.examples.d.ts +2 -0
- package/dist/kit/components/feedback/alert-dialog/alert-dialog.examples.js +28 -0
- package/dist/kit/components/feedback/context-menu/context-menu.examples.d.ts +2 -0
- package/dist/kit/components/feedback/context-menu/context-menu.examples.js +33 -0
- package/dist/kit/components/feedback/dialog/dialog.examples.d.ts +2 -0
- package/dist/kit/components/feedback/dialog/dialog.examples.js +51 -0
- package/dist/kit/components/feedback/drawer/drawer.examples.d.ts +2 -0
- package/dist/kit/components/feedback/drawer/drawer.examples.js +29 -0
- package/dist/kit/components/feedback/dropdown-menu/dropdown-menu.examples.d.ts +3 -0
- package/dist/kit/components/feedback/dropdown-menu/dropdown-menu.examples.js +54 -0
- package/dist/kit/components/feedback/hover-card/hover-card.examples.d.ts +2 -0
- package/dist/kit/components/feedback/hover-card/hover-card.examples.js +27 -0
- package/dist/kit/components/feedback/popover/popover.examples.d.ts +2 -0
- package/dist/kit/components/feedback/popover/popover.examples.js +42 -0
- package/dist/kit/components/feedback/sheet/sheet.examples.d.ts +2 -0
- package/dist/kit/components/feedback/sheet/sheet.examples.js +39 -0
- package/dist/kit/components/feedback/sonner/sonner.examples.d.ts +3 -0
- package/dist/kit/components/feedback/sonner/sonner.examples.js +49 -0
- package/dist/kit/components/feedback/title-help/title-help.examples.d.ts +1 -0
- package/dist/kit/components/feedback/title-help/title-help.examples.js +25 -0
- package/dist/kit/components/feedback/tooltip/tooltip.examples.d.ts +3 -0
- package/dist/kit/components/feedback/tooltip/tooltip.examples.js +44 -0
- package/dist/kit/components/form/button/button.examples.d.ts +13 -0
- package/dist/kit/components/form/button/button.examples.js +84 -0
- package/dist/kit/components/form/calendar/calendar.examples.d.ts +2 -0
- package/dist/kit/components/form/calendar/calendar.examples.js +23 -0
- package/dist/kit/components/form/checkbox/checkbox.examples.d.ts +4 -0
- package/dist/kit/components/form/checkbox/checkbox.examples.js +72 -0
- package/dist/kit/components/form/command/command.examples.d.ts +3 -0
- package/dist/kit/components/form/command/command.examples.js +52 -0
- package/dist/kit/components/form/datefield/datefield.examples.d.ts +2 -0
- package/dist/kit/components/form/datefield/datefield.examples.js +19 -0
- package/dist/kit/components/form/file-upload/file-upload.examples.d.ts +1 -0
- package/dist/kit/components/form/file-upload/file-upload.examples.js +18 -0
- package/dist/kit/components/form/form/form.examples.d.ts +2 -0
- package/dist/kit/components/form/form/form.examples.js +77 -0
- package/dist/kit/components/form/input/input.examples.d.ts +5 -0
- package/dist/kit/components/form/input/input.examples.js +64 -0
- package/dist/kit/components/form/label/label.examples.d.ts +4 -0
- package/dist/kit/components/form/label/label.examples.js +49 -0
- package/dist/kit/components/form/radio-group/radio-group.examples.d.ts +3 -0
- package/dist/kit/components/form/radio-group/radio-group.examples.js +40 -0
- package/dist/kit/components/form/select/select.examples.d.ts +3 -0
- package/dist/kit/components/form/select/select.examples.js +58 -0
- package/dist/kit/components/form/slider/slider.examples.d.ts +3 -0
- package/dist/kit/components/form/slider/slider.examples.js +46 -0
- package/dist/kit/components/form/switch/switch.examples.d.ts +3 -0
- package/dist/kit/components/form/switch/switch.examples.js +37 -0
- package/dist/kit/components/form/textarea/textarea.examples.d.ts +3 -0
- package/dist/kit/components/form/textarea/textarea.examples.js +49 -0
- package/dist/kit/components/form/toggle/toggle.examples.d.ts +3 -0
- package/dist/kit/components/form/toggle/toggle.examples.js +33 -0
- package/dist/kit/components/form/toggle-group/toggle-group.examples.d.ts +4 -0
- package/dist/kit/components/form/toggle-group/toggle-group.examples.js +46 -0
- package/dist/kit/components/index.d.ts +91 -0
- package/dist/kit/components/layout/accordion/accordion.examples.d.ts +2 -0
- package/dist/kit/components/layout/accordion/accordion.examples.js +34 -0
- package/dist/kit/components/layout/aspect-ratio/aspect-ratio.examples.d.ts +3 -0
- package/dist/kit/components/layout/aspect-ratio/aspect-ratio.examples.js +29 -0
- package/dist/kit/components/layout/collapsible/collapsible.examples.d.ts +2 -0
- package/dist/kit/components/layout/collapsible/collapsible.examples.js +28 -0
- package/dist/kit/components/layout/resizable/resizable.examples.d.ts +2 -0
- package/dist/kit/components/layout/resizable/resizable.examples.js +26 -0
- package/dist/kit/components/layout/scroll-area/scroll-area.examples.d.ts +2 -0
- package/dist/kit/components/layout/scroll-area/scroll-area.examples.js +16 -0
- package/dist/kit/components/layout/separator/separator.examples.d.ts +3 -0
- package/dist/kit/components/layout/separator/separator.examples.js +35 -0
- package/dist/kit/components/navigation/accordion-menu/accordion-menu.examples.d.ts +2 -0
- package/dist/kit/components/navigation/accordion-menu/accordion-menu.examples.js +36 -0
- package/dist/kit/components/navigation/breadcrumb/breadcrumb.examples.d.ts +3 -0
- package/dist/kit/components/navigation/breadcrumb/breadcrumb.examples.js +39 -0
- package/dist/kit/components/navigation/menubar/menubar.examples.d.ts +2 -0
- package/dist/kit/components/navigation/menubar/menubar.examples.js +54 -0
- package/dist/kit/components/navigation/navigation-menu/navigation-menu.examples.d.ts +2 -0
- package/dist/kit/components/navigation/navigation-menu/navigation-menu.examples.js +31 -0
- package/dist/kit/components/navigation/pagination/pagination.examples.d.ts +2 -0
- package/dist/kit/components/navigation/pagination/pagination.examples.js +42 -0
- package/dist/kit/components/navigation/scrollspy/scrollspy.examples.d.ts +2 -0
- package/dist/kit/components/navigation/scrollspy/scrollspy.examples.js +68 -0
- package/dist/kit/components/navigation/tabs/tabs.examples.d.ts +5 -0
- package/dist/kit/components/navigation/tabs/tabs.examples.js +43 -0
- package/dist/styles.css +29 -12
- package/package.json +7 -2
package/dist/app/demo1-shell.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { jsxs as t, Fragment as Z, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import { ThemeToggle as
|
|
4
|
-
import { RiApps2Line as ce, RiMenuLine as de, RiSearchLine as me, RiNotification3Line as ue, RiCheckDoubleLine as he, RiArrowRightSLine as
|
|
2
|
+
import { useEffect as p, useState as z, useMemo as le, useCallback as ae } from "react";
|
|
3
|
+
import { ThemeToggle as ie } from "../kit/themes/theme-toggle.js";
|
|
4
|
+
import { RiApps2Line as ce, RiMenuLine as de, RiSearchLine as me, RiNotification3Line as ue, RiCheckDoubleLine as he, RiArrowRightSLine as U, RiUserLine as pe, RiFileTextLine as H, RiSettings4Line as fe, RiShieldUserLine as ge, RiLogoutBoxRLine as xe } from "@remixicon/react";
|
|
5
5
|
import { ChevronFirst as be } from "lucide-react";
|
|
6
|
-
import { useLocation as
|
|
7
|
-
import { toast as
|
|
6
|
+
import { useLocation as F, Outlet as Ne, useNavigate as ve, Link as T } from "react-router-dom";
|
|
7
|
+
import { toast as h } from "sonner";
|
|
8
8
|
import { cn as v } from "../lib/utils.js";
|
|
9
9
|
import { useSettings as ee } from "../providers/settings-provider.js";
|
|
10
10
|
import { BackgroundDecor as ye } from "./background-decor.js";
|
|
11
11
|
import { Container as te } from "./container.js";
|
|
12
12
|
import { Sheet as we, SheetTrigger as Ce, SheetContent as Se, SheetHeader as Me, SheetBody as ke } from "../kit/components/feedback/sheet/sheet.js";
|
|
13
|
-
import { Button as
|
|
14
|
-
import { Popover as
|
|
13
|
+
import { Button as D } from "../kit/components/form/button/button.js";
|
|
14
|
+
import { Popover as De, PopoverTrigger as ze, PopoverContent as Le } from "../kit/components/feedback/popover/popover.js";
|
|
15
15
|
import { Badge as P } from "../kit/components/data-display/badge/badge.js";
|
|
16
|
-
import { DropdownMenu as Ie, DropdownMenuTrigger as
|
|
17
|
-
import { Avatar as
|
|
18
|
-
import { Dialog as
|
|
19
|
-
import { Command as
|
|
20
|
-
import { AccordionMenu as
|
|
16
|
+
import { DropdownMenu as Ie, DropdownMenuTrigger as Ae, DropdownMenuContent as Te, DropdownMenuSeparator as E, DropdownMenuLabel as Re, DropdownMenuItem as k } from "../kit/components/feedback/dropdown-menu/dropdown-menu.js";
|
|
17
|
+
import { Avatar as O, AvatarFallback as _, AvatarImage as Ee } from "../kit/components/data-display/avatar/avatar.js";
|
|
18
|
+
import { Dialog as $e, DialogContent as Pe, DialogHeader as Oe, DialogTitle as _e, DialogDescription as je } from "../kit/components/feedback/dialog/dialog.js";
|
|
19
|
+
import { Command as Fe, CommandInput as Be, CommandList as Ke, CommandEmpty as Ue, CommandGroup as V, CommandItem as W, CommandSeparator as He } from "../kit/components/form/command/command.js";
|
|
20
|
+
import { AccordionMenu as Ve, AccordionMenuLabel as We, AccordionMenuItem as A, AccordionMenuSub as G, AccordionMenuSubTrigger as Y, AccordionMenuSubContent as Q, AccordionMenuGroup as q } from "../kit/components/navigation/accordion-menu/accordion-menu.js";
|
|
21
21
|
const J = 992, X = {
|
|
22
22
|
title: "DemoKit",
|
|
23
23
|
shortTitle: "D",
|
|
24
24
|
href: "/",
|
|
25
25
|
logoIcon: ce
|
|
26
|
-
},
|
|
26
|
+
}, Ge = {
|
|
27
27
|
name: "张建国",
|
|
28
28
|
description: "软件中心 · 项目经理",
|
|
29
29
|
initials: "张"
|
|
30
|
-
},
|
|
30
|
+
}, Ye = {
|
|
31
31
|
root: "lg:ps-1 space-y-3",
|
|
32
32
|
group: "gap-px",
|
|
33
33
|
label: "uppercase text-xs font-medium text-muted-foreground/70 pt-2.25 pb-px",
|
|
@@ -39,46 +39,46 @@ const J = 992, X = {
|
|
|
39
39
|
indicator: ""
|
|
40
40
|
};
|
|
41
41
|
function re() {
|
|
42
|
-
const [
|
|
43
|
-
return
|
|
44
|
-
const
|
|
42
|
+
const [o, l] = z(void 0);
|
|
43
|
+
return p(() => {
|
|
44
|
+
const a = window.matchMedia(
|
|
45
45
|
`(max-width: ${J - 1}px)`
|
|
46
|
-
), c = () =>
|
|
47
|
-
return
|
|
48
|
-
}, []), !!
|
|
46
|
+
), c = () => l(window.innerWidth < J);
|
|
47
|
+
return a.addEventListener("change", c), c(), () => a.removeEventListener("change", c);
|
|
48
|
+
}, []), !!o;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
const [
|
|
52
|
-
return
|
|
53
|
-
const
|
|
54
|
-
return window.addEventListener("scroll",
|
|
55
|
-
}, []),
|
|
50
|
+
function Qe() {
|
|
51
|
+
const [o, l] = z(0);
|
|
52
|
+
return p(() => {
|
|
53
|
+
const a = () => l(window.scrollY);
|
|
54
|
+
return window.addEventListener("scroll", a), a(), () => window.removeEventListener("scroll", a);
|
|
55
|
+
}, []), o;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
return
|
|
57
|
+
function qe(o, l) {
|
|
58
|
+
return l ? l === "/" ? l === o : o.startsWith(l) : !1;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
for (const
|
|
62
|
-
if (
|
|
63
|
-
return
|
|
64
|
-
if (
|
|
65
|
-
const c =
|
|
60
|
+
function j(o, l) {
|
|
61
|
+
for (const a of o) {
|
|
62
|
+
if (a.path && qe(l, a.path))
|
|
63
|
+
return a.children?.length ? j(a.children, l) ?? a : a;
|
|
64
|
+
if (a.children?.length) {
|
|
65
|
+
const c = j(a.children, l);
|
|
66
66
|
if (c) return c;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function $(
|
|
71
|
-
const
|
|
72
|
-
return
|
|
70
|
+
function $(o) {
|
|
71
|
+
const l = o.icon;
|
|
72
|
+
return l ? /* @__PURE__ */ e(l, { "data-slot": "accordion-menu-icon" }) : null;
|
|
73
73
|
}
|
|
74
74
|
function ne({
|
|
75
|
-
menu:
|
|
76
|
-
disabledBadgeLabel:
|
|
75
|
+
menu: o,
|
|
76
|
+
disabledBadgeLabel: l
|
|
77
77
|
}) {
|
|
78
|
-
const { pathname:
|
|
79
|
-
(r) => r ===
|
|
80
|
-
[
|
|
81
|
-
),
|
|
78
|
+
const { pathname: a } = F(), c = ae(
|
|
79
|
+
(r) => r === a || r.length > 1 && a.startsWith(r),
|
|
80
|
+
[a]
|
|
81
|
+
), x = (r) => r.map((s, i) => s.heading ? b(s, i) : s.disabled ? w(s, i) : y(s, i)), y = (r, s) => r.children ? /* @__PURE__ */ t(G, { value: r.path || `root-${s}`, children: [
|
|
82
82
|
/* @__PURE__ */ t(Y, { className: "text-sm font-medium", children: [
|
|
83
83
|
$(r),
|
|
84
84
|
/* @__PURE__ */ e("span", { "data-slot": "accordion-menu-title", children: r.title })
|
|
@@ -88,38 +88,38 @@ function ne({
|
|
|
88
88
|
{
|
|
89
89
|
type: "single",
|
|
90
90
|
collapsible: !0,
|
|
91
|
-
parentValue: r.path || `root-${
|
|
91
|
+
parentValue: r.path || `root-${s}`,
|
|
92
92
|
className: "ps-6",
|
|
93
|
-
children: /* @__PURE__ */ e(q, { children:
|
|
93
|
+
children: /* @__PURE__ */ e(q, { children: f(r.children, 1) })
|
|
94
94
|
}
|
|
95
95
|
)
|
|
96
|
-
] },
|
|
97
|
-
|
|
96
|
+
] }, s) : /* @__PURE__ */ e(
|
|
97
|
+
A,
|
|
98
98
|
{
|
|
99
99
|
value: r.path || "",
|
|
100
100
|
className: "text-sm font-medium",
|
|
101
|
-
children: /* @__PURE__ */ t(
|
|
101
|
+
children: /* @__PURE__ */ t(T, { to: r.path || "#", className: "flex items-center grow gap-2", children: [
|
|
102
102
|
$(r),
|
|
103
103
|
/* @__PURE__ */ e("span", { "data-slot": "accordion-menu-title", children: r.title })
|
|
104
104
|
] })
|
|
105
105
|
},
|
|
106
|
-
|
|
107
|
-
), w = (r,
|
|
108
|
-
|
|
106
|
+
s
|
|
107
|
+
), w = (r, s) => /* @__PURE__ */ t(
|
|
108
|
+
A,
|
|
109
109
|
{
|
|
110
|
-
value: `disabled-${
|
|
110
|
+
value: `disabled-${s}`,
|
|
111
111
|
className: "text-sm font-medium",
|
|
112
112
|
children: [
|
|
113
113
|
$(r),
|
|
114
114
|
/* @__PURE__ */ e("span", { "data-slot": "accordion-menu-title", children: r.title }),
|
|
115
|
-
/* @__PURE__ */ e(P, { variant: "secondary", size: "sm", className: "ms-auto me-[-10px]", children:
|
|
115
|
+
/* @__PURE__ */ e(P, { variant: "secondary", size: "sm", className: "ms-auto me-[-10px]", children: l })
|
|
116
116
|
]
|
|
117
117
|
},
|
|
118
|
-
|
|
119
|
-
),
|
|
118
|
+
s
|
|
119
|
+
), f = (r, s = 0) => r.map((i, m) => i.disabled ? C(i, m, s) : d(i, m, s)), d = (r, s, i = 0) => r.children ? /* @__PURE__ */ t(
|
|
120
120
|
G,
|
|
121
121
|
{
|
|
122
|
-
value: r.path || `child-${
|
|
122
|
+
value: r.path || `child-${i}-${s}`,
|
|
123
123
|
children: [
|
|
124
124
|
/* @__PURE__ */ e(Y, { className: "text-[13px]", children: r.collapse ? /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: [
|
|
125
125
|
/* @__PURE__ */ e("span", { className: "hidden [[data-state=open]>span>&]:inline", children: r.collapseTitle }),
|
|
@@ -130,141 +130,148 @@ function ne({
|
|
|
130
130
|
{
|
|
131
131
|
type: "single",
|
|
132
132
|
collapsible: !0,
|
|
133
|
-
parentValue: r.path || `child-${
|
|
133
|
+
parentValue: r.path || `child-${i}-${s}`,
|
|
134
134
|
className: v("ps-4", !r.collapse && "relative"),
|
|
135
|
-
children: /* @__PURE__ */ e(q, { children:
|
|
135
|
+
children: /* @__PURE__ */ e(q, { children: f(
|
|
136
136
|
r.children,
|
|
137
|
-
r.collapse ?
|
|
137
|
+
r.collapse ? i : i + 1
|
|
138
138
|
) })
|
|
139
139
|
}
|
|
140
140
|
)
|
|
141
141
|
]
|
|
142
142
|
},
|
|
143
|
-
|
|
143
|
+
s
|
|
144
144
|
) : /* @__PURE__ */ e(
|
|
145
|
-
|
|
145
|
+
A,
|
|
146
146
|
{
|
|
147
147
|
value: r.path || "",
|
|
148
148
|
className: "text-[13px]",
|
|
149
|
-
children: /* @__PURE__ */ e(
|
|
149
|
+
children: /* @__PURE__ */ e(T, { to: r.path || "#", children: r.title })
|
|
150
150
|
},
|
|
151
|
-
|
|
152
|
-
), C = (r,
|
|
153
|
-
|
|
151
|
+
s
|
|
152
|
+
), C = (r, s, i = 0) => /* @__PURE__ */ t(
|
|
153
|
+
A,
|
|
154
154
|
{
|
|
155
|
-
value: `disabled-child-${
|
|
155
|
+
value: `disabled-child-${i}-${s}`,
|
|
156
156
|
className: "text-[13px]",
|
|
157
157
|
children: [
|
|
158
158
|
/* @__PURE__ */ e("span", { "data-slot": "accordion-menu-title", children: r.title }),
|
|
159
|
-
/* @__PURE__ */ e(P, { variant: "secondary", size: "sm", className: "ms-auto me-[-10px]", children:
|
|
159
|
+
/* @__PURE__ */ e(P, { variant: "secondary", size: "sm", className: "ms-auto me-[-10px]", children: l })
|
|
160
160
|
]
|
|
161
161
|
},
|
|
162
|
-
|
|
163
|
-
), b = (r,
|
|
162
|
+
s
|
|
163
|
+
), b = (r, s) => /* @__PURE__ */ e(We, { children: r.heading }, s);
|
|
164
164
|
return /* @__PURE__ */ e("div", { className: "kt-scrollable-y-hover flex-1 min-h-0 overflow-y-auto py-5 px-5", children: /* @__PURE__ */ e(
|
|
165
|
-
|
|
165
|
+
Ve,
|
|
166
166
|
{
|
|
167
|
-
selectedValue:
|
|
167
|
+
selectedValue: a,
|
|
168
168
|
matchPath: c,
|
|
169
169
|
type: "single",
|
|
170
170
|
collapsible: !0,
|
|
171
|
-
classNames:
|
|
172
|
-
children:
|
|
171
|
+
classNames: Ye,
|
|
172
|
+
children: x(o)
|
|
173
173
|
}
|
|
174
174
|
) });
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
const { settings:
|
|
178
|
-
|
|
176
|
+
function Je({ brand: o }) {
|
|
177
|
+
const { settings: l, storeOption: a } = ee(), c = () => {
|
|
178
|
+
a(
|
|
179
179
|
"layouts.demo1.sidebarCollapse",
|
|
180
|
-
!
|
|
180
|
+
!l.layouts.demo1.sidebarCollapse
|
|
181
181
|
);
|
|
182
182
|
};
|
|
183
183
|
return /* @__PURE__ */ t("div", { className: "sidebar-header hidden lg:flex items-center relative justify-between px-3 lg:px-6 shrink-0", children: [
|
|
184
|
-
/* @__PURE__ */ t(
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
src: s.logoSrc,
|
|
189
|
-
alt: s.logoAlt ?? s.title,
|
|
190
|
-
className: "size-7 rounded-md"
|
|
191
|
-
}
|
|
192
|
-
) : c ? /* @__PURE__ */ e("span", { className: "size-7 rounded-md inline-flex items-center justify-center bg-primary/10 text-primary", children: /* @__PURE__ */ e(c, { className: "size-4" }) }) : /* @__PURE__ */ e("span", { className: "size-7 rounded-md inline-flex items-center justify-center bg-primary/10 text-primary text-xs font-semibold", children: s.shortTitle ?? s.title.slice(0, 1) }),
|
|
193
|
-
/* @__PURE__ */ e("span", { className: "font-semibold text-[15px] text-foreground default-logo", children: s.title }),
|
|
194
|
-
/* @__PURE__ */ e("span", { className: "font-semibold text-[15px] text-foreground small-logo hidden", children: s.shortTitle ?? s.title.slice(0, 1) })
|
|
184
|
+
/* @__PURE__ */ t(T, { to: o.href ?? "/", className: "flex items-center gap-2", children: [
|
|
185
|
+
/* @__PURE__ */ e(Xe, { brand: o }),
|
|
186
|
+
/* @__PURE__ */ e("span", { className: "font-semibold text-[15px] text-foreground default-logo", children: o.title }),
|
|
187
|
+
/* @__PURE__ */ e("span", { className: "font-semibold text-[15px] text-foreground small-logo hidden", children: o.shortTitle ?? o.title.slice(0, 1) })
|
|
195
188
|
] }),
|
|
196
189
|
/* @__PURE__ */ e(
|
|
197
|
-
|
|
190
|
+
D,
|
|
198
191
|
{
|
|
199
|
-
onClick:
|
|
192
|
+
onClick: c,
|
|
200
193
|
size: "sm",
|
|
201
194
|
mode: "icon",
|
|
202
195
|
variant: "outline",
|
|
203
196
|
className: v(
|
|
204
197
|
"size-7 absolute start-full top-2/4 rtl:translate-x-2/4 -translate-x-2/4 -translate-y-2/4",
|
|
205
|
-
|
|
198
|
+
l.layouts.demo1.sidebarCollapse ? "ltr:rotate-180" : "rtl:rotate-180"
|
|
206
199
|
),
|
|
207
200
|
children: /* @__PURE__ */ e(be, { className: "size-4!" })
|
|
208
201
|
}
|
|
209
202
|
)
|
|
210
203
|
] });
|
|
211
204
|
}
|
|
212
|
-
function
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
205
|
+
function Xe({ brand: o }) {
|
|
206
|
+
const l = o.logoIcon;
|
|
207
|
+
return /* @__PURE__ */ t(O, { className: "size-7 rounded-md", children: [
|
|
208
|
+
o.logoSrc && /* @__PURE__ */ e(
|
|
209
|
+
Ee,
|
|
210
|
+
{
|
|
211
|
+
src: o.logoSrc,
|
|
212
|
+
alt: o.logoAlt ?? o.title,
|
|
213
|
+
className: "rounded-md"
|
|
214
|
+
}
|
|
215
|
+
),
|
|
216
|
+
/* @__PURE__ */ e(_, { className: "rounded-md border-0 bg-primary/10 text-primary text-xs font-semibold", children: l ? /* @__PURE__ */ e(l, { className: "size-4" }) : o.shortTitle ?? o.title.slice(0, 1) })
|
|
217
|
+
] });
|
|
218
|
+
}
|
|
219
|
+
function Ze({
|
|
220
|
+
brand: o,
|
|
221
|
+
menu: l,
|
|
222
|
+
disabledBadgeLabel: a
|
|
216
223
|
}) {
|
|
217
224
|
return /* @__PURE__ */ t("div", { className: "sidebar bg-background lg:border-e lg:border-border lg:fixed lg:top-0 lg:bottom-0 lg:z-20 lg:flex flex-col items-stretch shrink-0", children: [
|
|
218
|
-
/* @__PURE__ */ e(
|
|
225
|
+
/* @__PURE__ */ e(Je, { brand: o }),
|
|
219
226
|
/* @__PURE__ */ e("div", { className: "w-full overflow-hidden flex-1 flex flex-col min-h-0", children: /* @__PURE__ */ t("div", { className: "w-(--sidebar-default-width) flex-1 flex flex-col min-h-0", children: [
|
|
220
227
|
/* @__PURE__ */ e(
|
|
221
228
|
ne,
|
|
222
229
|
{
|
|
223
|
-
menu:
|
|
224
|
-
disabledBadgeLabel:
|
|
230
|
+
menu: l,
|
|
231
|
+
disabledBadgeLabel: a
|
|
225
232
|
}
|
|
226
233
|
),
|
|
227
|
-
/* @__PURE__ */ e("div", { className: "mt-auto shrink-0", children: /* @__PURE__ */ e(
|
|
234
|
+
/* @__PURE__ */ e("div", { className: "mt-auto shrink-0", children: /* @__PURE__ */ e(ie, {}) })
|
|
228
235
|
] }) })
|
|
229
236
|
] });
|
|
230
237
|
}
|
|
231
|
-
function
|
|
232
|
-
brand:
|
|
233
|
-
menu:
|
|
234
|
-
title:
|
|
238
|
+
function et({
|
|
239
|
+
brand: o,
|
|
240
|
+
menu: l,
|
|
241
|
+
title: a,
|
|
235
242
|
disabledBadgeLabel: c,
|
|
236
|
-
searchPlaceholder:
|
|
243
|
+
searchPlaceholder: x,
|
|
237
244
|
searchQuickNav: y,
|
|
238
245
|
searchRecent: w,
|
|
239
|
-
notifications:
|
|
246
|
+
notifications: f,
|
|
240
247
|
user: d
|
|
241
248
|
}) {
|
|
242
|
-
const [C, b] =
|
|
243
|
-
() =>
|
|
244
|
-
[
|
|
249
|
+
const [C, b] = z(!1), [r, s] = z(!1), [i, m] = z(f), { pathname: L } = F(), S = ve(), I = re(), g = Qe() > 0, N = le(
|
|
250
|
+
() => i.filter((n) => n.unread).length,
|
|
251
|
+
[i]
|
|
245
252
|
);
|
|
246
|
-
|
|
253
|
+
p(() => {
|
|
247
254
|
b(!1);
|
|
248
|
-
}, [L]),
|
|
249
|
-
m(
|
|
250
|
-
}, [
|
|
255
|
+
}, [L]), p(() => {
|
|
256
|
+
m(f);
|
|
257
|
+
}, [f]), p(() => {
|
|
251
258
|
const n = (u) => {
|
|
252
|
-
(u.metaKey || u.ctrlKey) && u.key.toLowerCase() === "k" && (u.preventDefault(),
|
|
259
|
+
(u.metaKey || u.ctrlKey) && u.key.toLowerCase() === "k" && (u.preventDefault(), s((M) => !M));
|
|
253
260
|
};
|
|
254
261
|
return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
|
|
255
262
|
}, []);
|
|
256
|
-
const
|
|
257
|
-
S(n),
|
|
258
|
-
},
|
|
263
|
+
const K = (n) => {
|
|
264
|
+
S(n), s(!1);
|
|
265
|
+
}, oe = () => m(
|
|
259
266
|
(n) => n.map((u) => ({ ...u, unread: !1 }))
|
|
260
|
-
),
|
|
267
|
+
), se = (n) => {
|
|
261
268
|
m(
|
|
262
269
|
(M) => M.map(
|
|
263
270
|
(R) => R.id === n ? { ...R, unread: !1 } : R
|
|
264
271
|
)
|
|
265
272
|
);
|
|
266
|
-
const u =
|
|
267
|
-
u &&
|
|
273
|
+
const u = i.find((M) => M.id === n);
|
|
274
|
+
u && h.info(u.title, { description: u.desc });
|
|
268
275
|
};
|
|
269
276
|
return /* @__PURE__ */ t(Z, { children: [
|
|
270
277
|
/* @__PURE__ */ e(
|
|
@@ -272,16 +279,16 @@ function Xe({
|
|
|
272
279
|
{
|
|
273
280
|
className: v(
|
|
274
281
|
"header fixed top-0 z-10 start-0 flex items-stretch shrink-0 end-0 pe-[var(--removed-body-scroll-bar-size,0px)] transition-[background-color,border-color,backdrop-filter] duration-200",
|
|
275
|
-
|
|
282
|
+
g ? "bg-background/80 backdrop-blur-xl border-b border-border" : "bg-transparent border-b border-transparent"
|
|
276
283
|
),
|
|
277
284
|
children: /* @__PURE__ */ t(te, { className: "flex justify-between items-stretch lg:gap-4", children: [
|
|
278
285
|
/* @__PURE__ */ t("div", { className: "flex gap-2.5 lg:hidden items-center", children: [
|
|
279
286
|
/* @__PURE__ */ e(
|
|
280
|
-
|
|
287
|
+
T,
|
|
281
288
|
{
|
|
282
|
-
to:
|
|
289
|
+
to: o.href ?? "/",
|
|
283
290
|
className: "shrink-0 font-semibold text-base text-foreground",
|
|
284
|
-
children:
|
|
291
|
+
children: o.title
|
|
285
292
|
}
|
|
286
293
|
),
|
|
287
294
|
I && /* @__PURE__ */ t(
|
|
@@ -290,7 +297,7 @@ function Xe({
|
|
|
290
297
|
open: C,
|
|
291
298
|
onOpenChange: b,
|
|
292
299
|
children: [
|
|
293
|
-
/* @__PURE__ */ e(Ce, { asChild: !0, children: /* @__PURE__ */ e(
|
|
300
|
+
/* @__PURE__ */ e(Ce, { asChild: !0, children: /* @__PURE__ */ e(D, { variant: "ghost", mode: "icon", children: /* @__PURE__ */ e(de, { className: "text-muted-foreground" }) }) }),
|
|
294
301
|
/* @__PURE__ */ t(
|
|
295
302
|
Se,
|
|
296
303
|
{
|
|
@@ -302,7 +309,7 @@ function Xe({
|
|
|
302
309
|
/* @__PURE__ */ e(ke, { className: "p-0 overflow-y-auto", children: /* @__PURE__ */ e(
|
|
303
310
|
ne,
|
|
304
311
|
{
|
|
305
|
-
menu:
|
|
312
|
+
menu: l,
|
|
306
313
|
disabledBadgeLabel: c
|
|
307
314
|
}
|
|
308
315
|
) })
|
|
@@ -313,23 +320,23 @@ function Xe({
|
|
|
313
320
|
}
|
|
314
321
|
)
|
|
315
322
|
] }),
|
|
316
|
-
/* @__PURE__ */ e("div", { className: "flex items-center grow lg:ms-0 ms-2", children: /* @__PURE__ */ e("h1", { className: "text-sm font-medium hidden lg:block text-foreground", children:
|
|
323
|
+
/* @__PURE__ */ e("div", { className: "flex items-center grow lg:ms-0 ms-2", children: /* @__PURE__ */ e("h1", { className: "text-sm font-medium hidden lg:block text-foreground", children: a }) }),
|
|
317
324
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
318
325
|
/* @__PURE__ */ e(
|
|
319
|
-
|
|
326
|
+
D,
|
|
320
327
|
{
|
|
321
328
|
variant: "ghost",
|
|
322
329
|
mode: "icon",
|
|
323
330
|
shape: "circle",
|
|
324
|
-
onClick: () =>
|
|
331
|
+
onClick: () => s(!0),
|
|
325
332
|
title: "搜索 (⌘K)",
|
|
326
333
|
className: "size-9 [&_svg]:text-muted-foreground hover:bg-primary/10 hover:[&_svg]:text-primary",
|
|
327
334
|
children: /* @__PURE__ */ e(me, { className: "size-4.5!" })
|
|
328
335
|
}
|
|
329
336
|
),
|
|
330
|
-
/* @__PURE__ */ t(
|
|
331
|
-
/* @__PURE__ */ e(
|
|
332
|
-
|
|
337
|
+
/* @__PURE__ */ t(De, { children: [
|
|
338
|
+
/* @__PURE__ */ e(ze, { asChild: !0, children: /* @__PURE__ */ t(
|
|
339
|
+
D,
|
|
333
340
|
{
|
|
334
341
|
variant: "ghost",
|
|
335
342
|
mode: "icon",
|
|
@@ -352,13 +359,13 @@ function Xe({
|
|
|
352
359
|
] })
|
|
353
360
|
] }),
|
|
354
361
|
/* @__PURE__ */ t(
|
|
355
|
-
|
|
362
|
+
D,
|
|
356
363
|
{
|
|
357
364
|
variant: "ghost",
|
|
358
365
|
size: "sm",
|
|
359
366
|
className: "h-6 px-2 text-xs",
|
|
360
367
|
disabled: N === 0,
|
|
361
|
-
onClick:
|
|
368
|
+
onClick: oe,
|
|
362
369
|
children: [
|
|
363
370
|
/* @__PURE__ */ e(he, { className: "size-3.5" }),
|
|
364
371
|
"全部已读"
|
|
@@ -366,11 +373,11 @@ function Xe({
|
|
|
366
373
|
}
|
|
367
374
|
)
|
|
368
375
|
] }),
|
|
369
|
-
/* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto", children:
|
|
376
|
+
/* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto", children: i.map((n) => /* @__PURE__ */ t(
|
|
370
377
|
"button",
|
|
371
378
|
{
|
|
372
379
|
type: "button",
|
|
373
|
-
onClick: () =>
|
|
380
|
+
onClick: () => se(n.id),
|
|
374
381
|
className: v(
|
|
375
382
|
"w-full text-left px-3 py-2.5 border-b border-border last:border-0 hover:bg-muted/60 transition-colors flex gap-2.5",
|
|
376
383
|
n.unread && "bg-primary/[0.03]"
|
|
@@ -412,31 +419,31 @@ function Xe({
|
|
|
412
419
|
"button",
|
|
413
420
|
{
|
|
414
421
|
type: "button",
|
|
415
|
-
onClick: () =>
|
|
422
|
+
onClick: () => h.info("跳转到通知中心(示例)"),
|
|
416
423
|
className: "text-xs text-primary hover:underline inline-flex items-center gap-0.5",
|
|
417
424
|
children: [
|
|
418
425
|
"查看全部通知 ",
|
|
419
|
-
/* @__PURE__ */ e(
|
|
426
|
+
/* @__PURE__ */ e(U, { className: "size-3.5" })
|
|
420
427
|
]
|
|
421
428
|
}
|
|
422
429
|
) })
|
|
423
430
|
] })
|
|
424
431
|
] }),
|
|
425
432
|
/* @__PURE__ */ t(Ie, { children: [
|
|
426
|
-
/* @__PURE__ */ e(
|
|
433
|
+
/* @__PURE__ */ e(Ae, { asChild: !0, children: /* @__PURE__ */ t(
|
|
427
434
|
"button",
|
|
428
435
|
{
|
|
429
436
|
type: "button",
|
|
430
437
|
className: "ms-1 flex items-center gap-2 px-2 py-1 rounded-full cursor-pointer hover:bg-muted/60 transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
431
438
|
children: [
|
|
432
|
-
/* @__PURE__ */ e(
|
|
439
|
+
/* @__PURE__ */ e(O, { className: "size-8", children: /* @__PURE__ */ e(_, { className: "bg-primary text-primary-foreground text-xs font-semibold", children: d.initials ?? d.name.slice(0, 1) }) }),
|
|
433
440
|
/* @__PURE__ */ e("span", { className: "text-sm hidden md:inline text-foreground", children: d.name })
|
|
434
441
|
]
|
|
435
442
|
}
|
|
436
443
|
) }),
|
|
437
|
-
/* @__PURE__ */ t(
|
|
444
|
+
/* @__PURE__ */ t(Te, { align: "end", className: "w-56", children: [
|
|
438
445
|
/* @__PURE__ */ t("div", { className: "px-2 py-2 flex items-center gap-2.5", children: [
|
|
439
|
-
/* @__PURE__ */ e(
|
|
446
|
+
/* @__PURE__ */ e(O, { className: "size-10", children: /* @__PURE__ */ e(_, { className: "bg-primary text-primary-foreground font-semibold", children: d.initials ?? d.name.slice(0, 1) }) }),
|
|
440
447
|
/* @__PURE__ */ t("div", { className: "min-w-0", children: [
|
|
441
448
|
/* @__PURE__ */ e("div", { className: "text-sm font-semibold text-foreground truncate", children: d.name }),
|
|
442
449
|
d.description && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground truncate", children: d.description })
|
|
@@ -447,7 +454,7 @@ function Xe({
|
|
|
447
454
|
/* @__PURE__ */ t(
|
|
448
455
|
k,
|
|
449
456
|
{
|
|
450
|
-
onSelect: () =>
|
|
457
|
+
onSelect: () => h.info("打开个人主页(示例)"),
|
|
451
458
|
children: [
|
|
452
459
|
/* @__PURE__ */ e(pe, { className: "size-3.5" }),
|
|
453
460
|
"个人主页"
|
|
@@ -457,9 +464,9 @@ function Xe({
|
|
|
457
464
|
/* @__PURE__ */ t(
|
|
458
465
|
k,
|
|
459
466
|
{
|
|
460
|
-
onSelect: () =>
|
|
467
|
+
onSelect: () => h.info("打开我的任务(示例)"),
|
|
461
468
|
children: [
|
|
462
|
-
/* @__PURE__ */ e(
|
|
469
|
+
/* @__PURE__ */ e(H, { className: "size-3.5" }),
|
|
463
470
|
"我的任务"
|
|
464
471
|
]
|
|
465
472
|
}
|
|
@@ -467,7 +474,7 @@ function Xe({
|
|
|
467
474
|
/* @__PURE__ */ t(
|
|
468
475
|
k,
|
|
469
476
|
{
|
|
470
|
-
onSelect: () =>
|
|
477
|
+
onSelect: () => h.info("打开账户设置(示例)"),
|
|
471
478
|
children: [
|
|
472
479
|
/* @__PURE__ */ e(fe, { className: "size-3.5" }),
|
|
473
480
|
"账户设置"
|
|
@@ -478,7 +485,7 @@ function Xe({
|
|
|
478
485
|
/* @__PURE__ */ t(
|
|
479
486
|
k,
|
|
480
487
|
{
|
|
481
|
-
onSelect: () => d.permissionsPath ? S(d.permissionsPath) :
|
|
488
|
+
onSelect: () => d.permissionsPath ? S(d.permissionsPath) : h.info("打开权限与角色(示例)"),
|
|
482
489
|
children: [
|
|
483
490
|
/* @__PURE__ */ e(ge, { className: "size-3.5" }),
|
|
484
491
|
"权限与角色"
|
|
@@ -490,7 +497,7 @@ function Xe({
|
|
|
490
497
|
k,
|
|
491
498
|
{
|
|
492
499
|
variant: "destructive",
|
|
493
|
-
onSelect: () =>
|
|
500
|
+
onSelect: () => h.success("已退出登录(示例)"),
|
|
494
501
|
children: [
|
|
495
502
|
/* @__PURE__ */ e(xe, { className: "size-3.5" }),
|
|
496
503
|
"退出登录"
|
|
@@ -503,34 +510,34 @@ function Xe({
|
|
|
503
510
|
] })
|
|
504
511
|
}
|
|
505
512
|
),
|
|
506
|
-
/* @__PURE__ */ e(
|
|
507
|
-
/* @__PURE__ */ t(
|
|
508
|
-
/* @__PURE__ */ e(
|
|
509
|
-
/* @__PURE__ */ e(je, { children:
|
|
513
|
+
/* @__PURE__ */ e($e, { open: r, onOpenChange: s, children: /* @__PURE__ */ t(Pe, { className: "p-0 gap-0 sm:max-w-lg overflow-hidden", children: [
|
|
514
|
+
/* @__PURE__ */ t(Oe, { className: "sr-only", children: [
|
|
515
|
+
/* @__PURE__ */ e(_e, { children: "全局搜索" }),
|
|
516
|
+
/* @__PURE__ */ e(je, { children: x })
|
|
510
517
|
] }),
|
|
511
|
-
/* @__PURE__ */ t(
|
|
512
|
-
/* @__PURE__ */ e(
|
|
518
|
+
/* @__PURE__ */ t(Fe, { children: [
|
|
519
|
+
/* @__PURE__ */ e(Be, { placeholder: x }),
|
|
513
520
|
/* @__PURE__ */ t(Ke, { children: [
|
|
514
|
-
/* @__PURE__ */ e(
|
|
521
|
+
/* @__PURE__ */ e(Ue, { children: "没有匹配结果" }),
|
|
515
522
|
/* @__PURE__ */ e(V, { heading: "快速跳转", children: y.map((n) => /* @__PURE__ */ t(
|
|
516
523
|
W,
|
|
517
524
|
{
|
|
518
|
-
onSelect: () => n.path ?
|
|
525
|
+
onSelect: () => n.path ? K(n.path) : h.info("打开:" + n.title),
|
|
519
526
|
children: [
|
|
520
|
-
/* @__PURE__ */ e(
|
|
527
|
+
/* @__PURE__ */ e(U, { className: "size-3.5 text-muted-foreground" }),
|
|
521
528
|
/* @__PURE__ */ e("span", { children: n.title }),
|
|
522
529
|
n.hint && /* @__PURE__ */ e("span", { className: "ml-auto text-[10px] font-mono text-muted-foreground", children: n.hint })
|
|
523
530
|
]
|
|
524
531
|
},
|
|
525
532
|
`${n.title}-${n.path ?? n.hint}`
|
|
526
533
|
)) }),
|
|
527
|
-
/* @__PURE__ */ e(
|
|
534
|
+
/* @__PURE__ */ e(He, {}),
|
|
528
535
|
/* @__PURE__ */ e(V, { heading: "最近访问", children: w.map((n) => /* @__PURE__ */ t(
|
|
529
536
|
W,
|
|
530
537
|
{
|
|
531
|
-
onSelect: () => n.path ?
|
|
538
|
+
onSelect: () => n.path ? K(n.path) : h.info("打开:" + n.title),
|
|
532
539
|
children: [
|
|
533
|
-
/* @__PURE__ */ e(
|
|
540
|
+
/* @__PURE__ */ e(H, { className: "size-3.5 text-muted-foreground" }),
|
|
534
541
|
/* @__PURE__ */ e("span", { className: "truncate", children: n.title }),
|
|
535
542
|
n.hint && /* @__PURE__ */ e("span", { className: "ml-auto text-[10px] text-muted-foreground shrink-0", children: n.hint })
|
|
536
543
|
]
|
|
@@ -542,36 +549,36 @@ function Xe({
|
|
|
542
549
|
] }) })
|
|
543
550
|
] });
|
|
544
551
|
}
|
|
545
|
-
function
|
|
546
|
-
return /* @__PURE__ */ e("footer", { className: "footer", children: /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e("div", { className: "flex flex-col md:flex-row justify-center md:justify-between items-center gap-3 py-5", children: /* @__PURE__ */ e("div", { className: "text-muted-foreground text-sm", children:
|
|
552
|
+
function tt({ footer: o }) {
|
|
553
|
+
return /* @__PURE__ */ e("footer", { className: "footer", children: /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e("div", { className: "flex flex-col md:flex-row justify-center md:justify-between items-center gap-3 py-5", children: /* @__PURE__ */ e("div", { className: "text-muted-foreground text-sm", children: o }) }) }) });
|
|
547
554
|
}
|
|
548
|
-
function
|
|
549
|
-
menu:
|
|
550
|
-
brand:
|
|
551
|
-
titleFallback:
|
|
555
|
+
function wt({
|
|
556
|
+
menu: o,
|
|
557
|
+
brand: l = X,
|
|
558
|
+
titleFallback: a = "个人工作台",
|
|
552
559
|
footer: c,
|
|
553
|
-
disabledBadgeLabel:
|
|
560
|
+
disabledBadgeLabel: x = "Soon",
|
|
554
561
|
searchPlaceholder: y = "搜索页面、缺陷、凭证、成员...",
|
|
555
562
|
searchQuickNav: w = [],
|
|
556
|
-
searchRecent:
|
|
563
|
+
searchRecent: f = [],
|
|
557
564
|
notifications: d = [],
|
|
558
|
-
user: C =
|
|
565
|
+
user: C = Ge,
|
|
559
566
|
children: b
|
|
560
567
|
}) {
|
|
561
|
-
const r = re(), { pathname:
|
|
562
|
-
return
|
|
563
|
-
const
|
|
564
|
-
L.layouts.demo1.sidebarCollapse ?
|
|
565
|
-
}, [L.layouts.demo1.sidebarCollapse]),
|
|
568
|
+
const r = re(), { pathname: s } = F(), m = j(o, s)?.title ?? a, { settings: L, setOption: S } = ee(), I = { ...X, ...l }, B = c ?? `${(/* @__PURE__ */ new Date()).getFullYear()} © DemoKit · Demo design system`;
|
|
569
|
+
return p(() => {
|
|
570
|
+
const g = document.body.classList;
|
|
571
|
+
L.layouts.demo1.sidebarCollapse ? g.add("sidebar-collapse") : g.remove("sidebar-collapse");
|
|
572
|
+
}, [L.layouts.demo1.sidebarCollapse]), p(() => {
|
|
566
573
|
S("layout", "demo1");
|
|
567
|
-
}, [S]),
|
|
568
|
-
const
|
|
569
|
-
|
|
574
|
+
}, [S]), p(() => {
|
|
575
|
+
const g = document.body.classList;
|
|
576
|
+
g.add("demo1", "sidebar-fixed", "header-fixed");
|
|
570
577
|
const N = window.setTimeout(() => {
|
|
571
|
-
|
|
578
|
+
g.add("layout-initialized");
|
|
572
579
|
}, 1e3);
|
|
573
580
|
return () => {
|
|
574
|
-
|
|
581
|
+
g.remove(
|
|
575
582
|
"demo1",
|
|
576
583
|
"sidebar-fixed",
|
|
577
584
|
"sidebar-collapse",
|
|
@@ -579,38 +586,38 @@ function vt({
|
|
|
579
586
|
"layout-initialized"
|
|
580
587
|
), window.clearTimeout(N);
|
|
581
588
|
};
|
|
582
|
-
}, []),
|
|
589
|
+
}, []), p(() => {
|
|
583
590
|
document.title = m;
|
|
584
591
|
}, [m]), /* @__PURE__ */ t(Z, { children: [
|
|
585
592
|
/* @__PURE__ */ e(ye, {}),
|
|
586
593
|
!r && /* @__PURE__ */ e(
|
|
587
|
-
|
|
594
|
+
Ze,
|
|
588
595
|
{
|
|
589
596
|
brand: I,
|
|
590
|
-
menu:
|
|
591
|
-
disabledBadgeLabel:
|
|
597
|
+
menu: o,
|
|
598
|
+
disabledBadgeLabel: x
|
|
592
599
|
}
|
|
593
600
|
),
|
|
594
601
|
/* @__PURE__ */ t("div", { className: "wrapper flex grow flex-col", children: [
|
|
595
602
|
/* @__PURE__ */ e(
|
|
596
|
-
|
|
603
|
+
et,
|
|
597
604
|
{
|
|
598
605
|
brand: I,
|
|
599
|
-
menu:
|
|
606
|
+
menu: o,
|
|
600
607
|
title: m,
|
|
601
|
-
disabledBadgeLabel:
|
|
608
|
+
disabledBadgeLabel: x,
|
|
602
609
|
searchPlaceholder: y,
|
|
603
610
|
searchQuickNav: w,
|
|
604
|
-
searchRecent:
|
|
611
|
+
searchRecent: f,
|
|
605
612
|
notifications: d,
|
|
606
613
|
user: C
|
|
607
614
|
}
|
|
608
615
|
),
|
|
609
616
|
/* @__PURE__ */ e("main", { className: "grow pt-5", role: "content", children: b ?? /* @__PURE__ */ e(Ne, {}) }),
|
|
610
|
-
/* @__PURE__ */ e(
|
|
617
|
+
/* @__PURE__ */ e(tt, { footer: B })
|
|
611
618
|
] })
|
|
612
619
|
] });
|
|
613
620
|
}
|
|
614
621
|
export {
|
|
615
|
-
|
|
622
|
+
wt as Demo1Shell
|
|
616
623
|
};
|