@demokit-ui/demokit 0.1.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 +128 -0
- package/dist/app/background-decor.d.ts +1 -0
- package/dist/app/background-decor.js +38 -0
- package/dist/app/container.d.ts +12 -0
- package/dist/app/container.js +29 -0
- package/dist/app/demo1-shell.d.ts +43 -0
- package/dist/app/demo1-shell.js +616 -0
- package/dist/app/tweak-panel.d.ts +22 -0
- package/dist/app/tweak-panel.js +182 -0
- package/dist/components/apexcharts.css +101 -0
- package/dist/components/scrollable.css +120 -0
- package/dist/config/settings.config.d.ts +2 -0
- package/dist/config/settings.config.js +33 -0
- package/dist/config/types.d.ts +50 -0
- package/dist/config.reui.css +337 -0
- package/dist/demos/demo1.css +176 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +484 -0
- package/dist/kit/components/chart/chart/chart.d.ts +57 -0
- package/dist/kit/components/chart/chart/chart.js +206 -0
- package/dist/kit/components/composite/action-bar/action-bar.d.ts +10 -0
- package/dist/kit/components/composite/action-bar/action-bar.js +38 -0
- package/dist/kit/components/composite/action-card/action-card.d.ts +13 -0
- package/dist/kit/components/composite/action-card/action-card.js +35 -0
- package/dist/kit/components/composite/activity-feed/activity-feed.d.ts +17 -0
- package/dist/kit/components/composite/activity-feed/activity-feed.js +26 -0
- package/dist/kit/components/composite/alert-card/alert-card.d.ts +10 -0
- package/dist/kit/components/composite/alert-card/alert-card.js +37 -0
- package/dist/kit/components/composite/approval-flow/approval-flow.d.ts +51 -0
- package/dist/kit/components/composite/approval-flow/approval-flow.js +185 -0
- package/dist/kit/components/composite/auth-shell/auth-shell.d.ts +10 -0
- package/dist/kit/components/composite/auth-shell/auth-shell.js +32 -0
- package/dist/kit/components/composite/board-toolbar/board-toolbar.d.ts +12 -0
- package/dist/kit/components/composite/board-toolbar/board-toolbar.js +44 -0
- package/dist/kit/components/composite/chart-card/chart-card.d.ts +14 -0
- package/dist/kit/components/composite/chart-card/chart-card.js +64 -0
- package/dist/kit/components/composite/chart-toolbar/chart-toolbar.d.ts +17 -0
- package/dist/kit/components/composite/chart-toolbar/chart-toolbar.js +48 -0
- package/dist/kit/components/composite/data-section/data-section.d.ts +17 -0
- package/dist/kit/components/composite/data-section/data-section.js +73 -0
- package/dist/kit/components/composite/description-grid/description-grid.d.ts +12 -0
- package/dist/kit/components/composite/description-grid/description-grid.js +36 -0
- package/dist/kit/components/composite/detail-header/detail-header.d.ts +19 -0
- package/dist/kit/components/composite/detail-header/detail-header.js +43 -0
- package/dist/kit/components/composite/filter-panel/filter-panel.d.ts +18 -0
- package/dist/kit/components/composite/filter-panel/filter-panel.js +86 -0
- package/dist/kit/components/composite/filter-toolbar/filter-toolbar.d.ts +14 -0
- package/dist/kit/components/composite/filter-toolbar/filter-toolbar.js +59 -0
- package/dist/kit/components/composite/forgot-password-form/forgot-password-form.d.ts +9 -0
- package/dist/kit/components/composite/forgot-password-form/forgot-password-form.js +34 -0
- package/dist/kit/components/composite/form-section/form-section.d.ts +9 -0
- package/dist/kit/components/composite/form-section/form-section.js +16 -0
- package/dist/kit/components/composite/kanban-board/kanban-board.d.ts +50 -0
- package/dist/kit/components/composite/kanban-board/kanban-board.js +55 -0
- package/dist/kit/components/composite/login-card/login-card.d.ts +33 -0
- package/dist/kit/components/composite/login-card/login-card.js +138 -0
- package/dist/kit/components/composite/message-list-card/message-list-card.d.ts +20 -0
- package/dist/kit/components/composite/message-list-card/message-list-card.js +83 -0
- package/dist/kit/components/composite/metric-card/metric-card.d.ts +18 -0
- package/dist/kit/components/composite/metric-card/metric-card.js +37 -0
- package/dist/kit/components/composite/milestone-card/milestone-card.d.ts +12 -0
- package/dist/kit/components/composite/milestone-card/milestone-card.js +33 -0
- package/dist/kit/components/composite/oauth-login-buttons/oauth-login-buttons.d.ts +14 -0
- package/dist/kit/components/composite/oauth-login-buttons/oauth-login-buttons.js +32 -0
- package/dist/kit/components/composite/page-header/page-header.d.ts +12 -0
- package/dist/kit/components/composite/page-header/page-header.js +66 -0
- package/dist/kit/components/composite/profile-card/profile-card.d.ts +16 -0
- package/dist/kit/components/composite/profile-card/profile-card.js +28 -0
- package/dist/kit/components/composite/progress-card/progress-card.d.ts +16 -0
- package/dist/kit/components/composite/progress-card/progress-card.js +23 -0
- package/dist/kit/components/composite/project-card/project-card.d.ts +17 -0
- package/dist/kit/components/composite/project-card/project-card.js +46 -0
- package/dist/kit/components/composite/shortcut-card/shortcut-card.d.ts +13 -0
- package/dist/kit/components/composite/shortcut-card/shortcut-card.js +35 -0
- package/dist/kit/components/composite/sprint-summary/sprint-summary.d.ts +15 -0
- package/dist/kit/components/composite/sprint-summary/sprint-summary.js +43 -0
- package/dist/kit/components/composite/state-panel/state-panel.d.ts +12 -0
- package/dist/kit/components/composite/state-panel/state-panel.js +79 -0
- package/dist/kit/components/composite/summary-card/summary-card.d.ts +15 -0
- package/dist/kit/components/composite/summary-card/summary-card.js +25 -0
- package/dist/kit/components/composite/task-card/task-card.d.ts +14 -0
- package/dist/kit/components/composite/task-card/task-card.js +49 -0
- package/dist/kit/components/composite/timeline/timeline.d.ts +46 -0
- package/dist/kit/components/composite/timeline/timeline.js +176 -0
- package/dist/kit/components/composite/todo-card/todo-card.d.ts +26 -0
- package/dist/kit/components/composite/todo-card/todo-card.js +101 -0
- package/dist/kit/components/data-display/avatar/avatar.d.ts +12 -0
- package/dist/kit/components/data-display/avatar/avatar.js +61 -0
- package/dist/kit/components/data-display/avatar-group/avatar-group.d.ts +22 -0
- package/dist/kit/components/data-display/avatar-group/avatar-group.js +184 -0
- package/dist/kit/components/data-display/badge/badge.d.ts +29 -0
- package/dist/kit/components/data-display/badge/badge.js +203 -0
- package/dist/kit/components/data-display/card/card.d.ts +15 -0
- package/dist/kit/components/data-display/card/card.js +119 -0
- package/dist/kit/components/data-display/data-grid/data-grid-column-filter.d.ts +15 -0
- package/dist/kit/components/data-display/data-grid/data-grid-column-filter.js +74 -0
- package/dist/kit/components/data-display/data-grid/data-grid-column-header.d.ts +12 -0
- package/dist/kit/components/data-display/data-grid/data-grid-column-header.js +171 -0
- package/dist/kit/components/data-display/data-grid/data-grid-column-visibility.d.ts +7 -0
- package/dist/kit/components/data-display/data-grid/data-grid-column-visibility.js +24 -0
- package/dist/kit/components/data-display/data-grid/data-grid-pagination.d.ts +15 -0
- package/dist/kit/components/data-display/data-grid/data-grid-pagination.js +132 -0
- package/dist/kit/components/data-display/data-grid/data-grid-table-dnd-rows.d.ts +9 -0
- package/dist/kit/components/data-display/data-grid/data-grid-table-dnd-rows.js +61 -0
- package/dist/kit/components/data-display/data-grid/data-grid-table-dnd.d.ts +5 -0
- package/dist/kit/components/data-display/data-grid/data-grid-table-dnd.js +86 -0
- package/dist/kit/components/data-display/data-grid/data-grid-table.d.ts +59 -0
- package/dist/kit/components/data-display/data-grid/data-grid-table.js +356 -0
- package/dist/kit/components/data-display/data-grid/data-grid.d.ts +87 -0
- package/dist/kit/components/data-display/data-grid/data-grid.js +87 -0
- package/dist/kit/components/data-display/kbd/kbd.d.ts +8 -0
- package/dist/kit/components/data-display/kbd/kbd.js +27 -0
- package/dist/kit/components/data-display/money-amount/money-amount.d.ts +27 -0
- package/dist/kit/components/data-display/money-amount/money-amount.js +91 -0
- package/dist/kit/components/data-display/progress/progress.d.ts +6 -0
- package/dist/kit/components/data-display/progress/progress.js +29 -0
- package/dist/kit/components/data-display/skeleton/skeleton.d.ts +3 -0
- package/dist/kit/components/data-display/skeleton/skeleton.js +8 -0
- package/dist/kit/components/data-display/sliding-number/sliding-number.d.ts +7 -0
- package/dist/kit/components/data-display/sliding-number/sliding-number.js +41 -0
- package/dist/kit/components/data-display/stepper/stepper.d.ts +61 -0
- package/dist/kit/components/data-display/stepper/stepper.js +230 -0
- package/dist/kit/components/data-display/table/table.d.ts +28 -0
- package/dist/kit/components/data-display/table/table.js +156 -0
- package/dist/kit/components/decorative/aurora-background/aurora-background.d.ts +7 -0
- package/dist/kit/components/decorative/aurora-background/aurora-background.js +60 -0
- package/dist/kit/components/decorative/grid-background/grid-background.d.ts +22 -0
- package/dist/kit/components/decorative/grid-background/grid-background.js +46 -0
- package/dist/kit/components/decorative/shimmering-text/shimmering-text.d.ts +29 -0
- package/dist/kit/components/decorative/shimmering-text/shimmering-text.js +64 -0
- package/dist/kit/components/decorative/text-reveal/text-reveal.d.ts +17 -0
- package/dist/kit/components/decorative/text-reveal/text-reveal.js +277 -0
- package/dist/kit/components/feedback/alert/alert.d.ts +21 -0
- package/dist/kit/components/feedback/alert/alert.js +236 -0
- package/dist/kit/components/feedback/alert-dialog/alert-dialog.d.ts +16 -0
- package/dist/kit/components/feedback/alert-dialog/alert-dialog.js +117 -0
- package/dist/kit/components/feedback/context-menu/context-menu.d.ts +24 -0
- package/dist/kit/components/feedback/context-menu/context-menu.js +183 -0
- package/dist/kit/components/feedback/dialog/dialog.d.ts +22 -0
- package/dist/kit/components/feedback/dialog/dialog.js +120 -0
- package/dist/kit/components/feedback/drawer/drawer.d.ts +13 -0
- package/dist/kit/components/feedback/drawer/drawer.js +76 -0
- package/dist/kit/components/feedback/dropdown-menu/dropdown-menu.d.ts +25 -0
- package/dist/kit/components/feedback/dropdown-menu/dropdown-menu.js +200 -0
- package/dist/kit/components/feedback/hover-card/hover-card.d.ts +6 -0
- package/dist/kit/components/feedback/hover-card/hover-card.js +34 -0
- package/dist/kit/components/feedback/popover/popover.d.ts +6 -0
- package/dist/kit/components/feedback/popover/popover.js +34 -0
- package/dist/kit/components/feedback/sheet/sheet.d.ts +22 -0
- package/dist/kit/components/feedback/sheet/sheet.js +128 -0
- package/dist/kit/components/feedback/sonner/sonner.d.ts +5 -0
- package/dist/kit/components/feedback/sonner/sonner.js +21 -0
- package/dist/kit/components/feedback/title-help/title-help.d.ts +10 -0
- package/dist/kit/components/feedback/title-help/title-help.js +44 -0
- package/dist/kit/components/feedback/tooltip/tooltip.d.ts +11 -0
- package/dist/kit/components/feedback/tooltip/tooltip.js +49 -0
- package/dist/kit/components/form/button/button.d.ts +23 -0
- package/dist/kit/components/form/button/button.js +380 -0
- package/dist/kit/components/form/calendar/calendar.d.ts +4 -0
- package/dist/kit/components/form/calendar/calendar.js +47 -0
- package/dist/kit/components/form/checkbox/checkbox.d.ts +8 -0
- package/dist/kit/components/form/checkbox/checkbox.js +39 -0
- package/dist/kit/components/form/command/command.d.ts +21 -0
- package/dist/kit/components/form/command/command.js +116 -0
- package/dist/kit/components/form/datefield/datefield.d.ts +14 -0
- package/dist/kit/components/form/datefield/datefield.js +74 -0
- package/dist/kit/components/form/file-upload/file-upload.d.ts +56 -0
- package/dist/kit/components/form/file-upload/file-upload.js +338 -0
- package/dist/kit/components/form/form/form.d.ts +24 -0
- package/dist/kit/components/form/form/form.js +86 -0
- package/dist/kit/components/form/input/input.d.ts +22 -0
- package/dist/kit/components/form/input/input.js +182 -0
- package/dist/kit/components/form/label/label.d.ts +8 -0
- package/dist/kit/components/form/label/label.js +28 -0
- package/dist/kit/components/form/radio-group/radio-group.d.ts +13 -0
- package/dist/kit/components/form/radio-group/radio-group.js +79 -0
- package/dist/kit/components/form/select/select.d.ts +25 -0
- package/dist/kit/components/form/select/select.js +194 -0
- package/dist/kit/components/form/slider/slider.d.ts +5 -0
- package/dist/kit/components/form/slider/slider.js +34 -0
- package/dist/kit/components/form/switch/switch.d.ts +20 -0
- package/dist/kit/components/form/switch/switch.js +158 -0
- package/dist/kit/components/form/textarea/textarea.d.ts +7 -0
- package/dist/kit/components/form/textarea/textarea.js +34 -0
- package/dist/kit/components/form/toggle/toggle.d.ts +9 -0
- package/dist/kit/components/form/toggle/toggle.js +36 -0
- package/dist/kit/components/form/toggle-group/toggle-group.d.ts +7 -0
- package/dist/kit/components/form/toggle-group/toggle-group.js +62 -0
- package/dist/kit/components/index.d.ts +108 -0
- package/dist/kit/components/layout/accordion/accordion.d.ts +13 -0
- package/dist/kit/components/layout/accordion/accordion.js +124 -0
- package/dist/kit/components/layout/aspect-ratio/aspect-ratio.d.ts +4 -0
- package/dist/kit/components/layout/aspect-ratio/aspect-ratio.js +8 -0
- package/dist/kit/components/layout/collapsible/collapsible.d.ts +6 -0
- package/dist/kit/components/layout/collapsible/collapsible.js +32 -0
- package/dist/kit/components/layout/resizable/resizable.d.ts +24 -0
- package/dist/kit/components/layout/resizable/resizable.js +32 -0
- package/dist/kit/components/layout/scroll-area/scroll-area.d.ts +8 -0
- package/dist/kit/components/layout/scroll-area/scroll-area.js +48 -0
- package/dist/kit/components/layout/separator/separator.d.ts +4 -0
- package/dist/kit/components/layout/separator/separator.js +23 -0
- package/dist/kit/components/navigation/accordion-menu/accordion-menu.d.ts +51 -0
- package/dist/kit/components/navigation/accordion-menu/accordion-menu.js +290 -0
- package/dist/kit/components/navigation/breadcrumb/breadcrumb.d.ts +13 -0
- package/dist/kit/components/navigation/breadcrumb/breadcrumb.js +76 -0
- package/dist/kit/components/navigation/menubar/menubar.d.ts +25 -0
- package/dist/kit/components/navigation/menubar/menubar.js +218 -0
- package/dist/kit/components/navigation/navigation-menu/navigation-menu.d.ts +14 -0
- package/dist/kit/components/navigation/navigation-menu/navigation-menu.js +137 -0
- package/dist/kit/components/navigation/pagination/pagination.d.ts +6 -0
- package/dist/kit/components/navigation/pagination/pagination.js +38 -0
- package/dist/kit/components/navigation/scrollspy/scrollspy.d.ts +14 -0
- package/dist/kit/components/navigation/scrollspy/scrollspy.js +84 -0
- package/dist/kit/components/navigation/tabs/tabs.d.ts +16 -0
- package/dist/kit/components/navigation/tabs/tabs.js +172 -0
- package/dist/kit/themes/theme-toggle.d.ts +1 -0
- package/dist/kit/themes/theme-toggle.js +56 -0
- package/dist/kit/tokens/chart-palette.d.ts +1 -0
- package/dist/kit/tokens/chart-palette.js +12 -0
- package/dist/lib/utils.d.ts +8 -0
- package/dist/lib/utils.js +8 -0
- package/dist/providers/demokit-provider.d.ts +4 -0
- package/dist/providers/demokit-provider.js +9 -0
- package/dist/providers/settings-provider.d.ts +15 -0
- package/dist/providers/settings-provider.js +78 -0
- package/dist/providers/theme-provider.d.ts +4 -0
- package/dist/providers/theme-provider.js +9 -0
- package/dist/providers/tooltips-provider.d.ts +4 -0
- package/dist/providers/tooltips-provider.js +8 -0
- package/dist/styles.css +237 -0
- package/package.json +72 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { ShieldCheck as o, Mail as c } from "lucide-react";
|
|
3
|
+
import { cn as n } from "../../../../lib/utils.js";
|
|
4
|
+
import { Button as p } from "../../form/button/button.js";
|
|
5
|
+
import { InputWrapper as d, Input as f } from "../../form/input/input.js";
|
|
6
|
+
import { Label as h } from "../../form/label/label.js";
|
|
7
|
+
import { TitleHelp as u } from "../../feedback/title-help/title-help.js";
|
|
8
|
+
function w({
|
|
9
|
+
className: l,
|
|
10
|
+
title: i = "找回密码",
|
|
11
|
+
description: s = "输入账号邮箱,我们会发送重置密码链接。",
|
|
12
|
+
submitText: m = "发送重置链接",
|
|
13
|
+
backAction: t,
|
|
14
|
+
...a
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */ r("form", { "data-slot": "forgot-password-form", className: n("space-y-5", l), ...a, children: [
|
|
17
|
+
/* @__PURE__ */ r("div", { className: "space-y-1 text-center", children: [
|
|
18
|
+
/* @__PURE__ */ e("div", { className: "mx-auto flex size-11 items-center justify-center rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ e(o, { className: "size-5" }) }),
|
|
19
|
+
/* @__PURE__ */ e("h2", { className: "flex justify-center pt-2 text-xl font-semibold tracking-tight text-foreground", children: /* @__PURE__ */ e(u, { help: s, children: i }) })
|
|
20
|
+
] }),
|
|
21
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
22
|
+
/* @__PURE__ */ e(h, { children: "邮箱" }),
|
|
23
|
+
/* @__PURE__ */ r(d, { children: [
|
|
24
|
+
/* @__PURE__ */ e(c, { className: "size-4" }),
|
|
25
|
+
/* @__PURE__ */ e(f, { type: "email", placeholder: "name@example.com" })
|
|
26
|
+
] })
|
|
27
|
+
] }),
|
|
28
|
+
/* @__PURE__ */ e(p, { type: "submit", className: "w-full", children: m }),
|
|
29
|
+
t && /* @__PURE__ */ e("div", { className: "text-center", children: t })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
w as ForgotPasswordForm
|
|
34
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface FormSectionProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
|
|
3
|
+
title: React.ReactNode;
|
|
4
|
+
description?: React.ReactNode;
|
|
5
|
+
actions?: React.ReactNode;
|
|
6
|
+
footer?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare function FormSection({ className, title, description, actions, footer, children, ...props }: FormSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { FormSection };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as m } from "../../../../lib/utils.js";
|
|
3
|
+
import { TitleHelp as n } from "../../feedback/title-help/title-help.js";
|
|
4
|
+
function p({ className: o, title: i, description: l, actions: r, footer: d, children: t, ...c }) {
|
|
5
|
+
return /* @__PURE__ */ s("section", { "data-slot": "form-section", className: m("rounded-lg border border-border bg-card", o), ...c, children: [
|
|
6
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col gap-3 border-b border-border p-5 md:flex-row md:items-center md:justify-between", children: [
|
|
7
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: /* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: /* @__PURE__ */ e(n, { help: l, children: i }) }) }),
|
|
8
|
+
r && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-2", children: r })
|
|
9
|
+
] }),
|
|
10
|
+
/* @__PURE__ */ e("div", { className: "p-5", children: t }),
|
|
11
|
+
d && /* @__PURE__ */ e("div", { className: "flex items-center justify-end gap-2 border-t border-border p-4", children: d })
|
|
12
|
+
] });
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
p as FormSection
|
|
16
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface KanbanColumnDef {
|
|
3
|
+
id: string;
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface KanbanSwimlaneDef {
|
|
8
|
+
id: string;
|
|
9
|
+
title: React.ReactNode;
|
|
10
|
+
description?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface KanbanItemDef {
|
|
13
|
+
id: React.Key;
|
|
14
|
+
title: React.ReactNode;
|
|
15
|
+
description?: React.ReactNode;
|
|
16
|
+
columnId: string;
|
|
17
|
+
swimlaneId?: string;
|
|
18
|
+
meta?: React.ReactNode;
|
|
19
|
+
assignee?: React.ReactNode;
|
|
20
|
+
priority?: React.ReactNode;
|
|
21
|
+
tags?: React.ReactNode[];
|
|
22
|
+
}
|
|
23
|
+
export interface KanbanBoardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
24
|
+
columns?: KanbanColumnDef[];
|
|
25
|
+
swimlanes?: KanbanSwimlaneDef[];
|
|
26
|
+
items?: KanbanItemDef[];
|
|
27
|
+
renderItem?: (item: KanbanItemDef) => React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
declare function KanbanBoard({ className, columns, swimlanes, items, renderItem, children, ...props }: KanbanBoardProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export interface KanbanSwimlaneProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
31
|
+
title?: React.ReactNode;
|
|
32
|
+
description?: React.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
declare function KanbanSwimlane({ className, title, description, children, ...props }: KanbanSwimlaneProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export interface KanbanColumnProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
36
|
+
title: React.ReactNode;
|
|
37
|
+
description?: React.ReactNode;
|
|
38
|
+
count?: number;
|
|
39
|
+
}
|
|
40
|
+
declare function KanbanColumn({ className, title, description, count, children, ...props }: KanbanColumnProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export interface KanbanCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
42
|
+
title: React.ReactNode;
|
|
43
|
+
description?: React.ReactNode;
|
|
44
|
+
meta?: React.ReactNode;
|
|
45
|
+
assignee?: React.ReactNode;
|
|
46
|
+
priority?: React.ReactNode;
|
|
47
|
+
tags?: React.ReactNode[];
|
|
48
|
+
}
|
|
49
|
+
declare function KanbanCard({ className, title, description, meta, assignee, priority, tags, children, ...props }: KanbanCardProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export { KanbanBoard, KanbanCard, KanbanColumn, KanbanSwimlane };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import * as N from "react";
|
|
3
|
+
import { cn as p } from "../../../../lib/utils.js";
|
|
4
|
+
import { Badge as f } from "../../data-display/badge/badge.js";
|
|
5
|
+
import { TitleHelp as g } from "../../feedback/title-help/title-help.js";
|
|
6
|
+
function B({ className: t, columns: r, swimlanes: a, items: n = [], renderItem: d, children: i, ...o }) {
|
|
7
|
+
if (i)
|
|
8
|
+
return /* @__PURE__ */ e("div", { "data-slot": "kanban-board", className: p("space-y-4 overflow-x-auto", t), ...o, children: i });
|
|
9
|
+
const u = r ?? [], h = a?.length ? a : [{ id: "__default", title: null }];
|
|
10
|
+
return /* @__PURE__ */ e("div", { "data-slot": "kanban-board", className: p("space-y-4 overflow-x-auto", t), ...o, children: h.map((l) => /* @__PURE__ */ e(y, { title: l.title, description: l.description, children: /* @__PURE__ */ e("div", { className: "grid min-w-[760px] gap-3", style: { gridTemplateColumns: `repeat(${u.length}, minmax(220px, 1fr))` }, children: u.map((s) => {
|
|
11
|
+
const x = n.filter(
|
|
12
|
+
(m) => m.columnId === s.id && (l.id === "__default" || m.swimlaneId === l.id)
|
|
13
|
+
);
|
|
14
|
+
return /* @__PURE__ */ e(w, { title: s.title, description: s.description, count: x.length, children: x.map((m) => {
|
|
15
|
+
const { id: b, columnId: k, swimlaneId: I, ...v } = m;
|
|
16
|
+
return d ? /* @__PURE__ */ e(N.Fragment, { children: d(m) }, b) : /* @__PURE__ */ e(j, { ...v }, b);
|
|
17
|
+
}) }, s.id);
|
|
18
|
+
}) }) }, l.id)) });
|
|
19
|
+
}
|
|
20
|
+
function y({ className: t, title: r, description: a, children: n, ...d }) {
|
|
21
|
+
return /* @__PURE__ */ c("section", { "data-slot": "kanban-swimlane", className: p("space-y-3", t), ...d, children: [
|
|
22
|
+
(r || a) && /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: r && /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-foreground", children: /* @__PURE__ */ e(g, { help: a, children: r }) }) }),
|
|
23
|
+
n
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
26
|
+
function w({ className: t, title: r, description: a, count: n, children: d, ...i }) {
|
|
27
|
+
return /* @__PURE__ */ c("div", { "data-slot": "kanban-column", className: p("rounded-lg border border-border bg-muted/40", t), ...i, children: [
|
|
28
|
+
/* @__PURE__ */ c("div", { className: "flex items-start justify-between gap-3 border-b border-border px-3 py-2.5", children: [
|
|
29
|
+
/* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e("div", { className: "text-sm font-medium text-foreground", children: /* @__PURE__ */ e(g, { help: a, children: r }) }) }),
|
|
30
|
+
n !== void 0 && /* @__PURE__ */ e(f, { variant: "secondary", appearance: "light", size: "sm", children: n })
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: d })
|
|
33
|
+
] });
|
|
34
|
+
}
|
|
35
|
+
function j({ className: t, title: r, description: a, meta: n, assignee: d, priority: i, tags: o, children: u, ...h }) {
|
|
36
|
+
return /* @__PURE__ */ e("article", { "data-slot": "kanban-card", className: p("rounded-md border border-border bg-card p-3 shadow-xs", t), ...h, children: /* @__PURE__ */ c("div", { className: "space-y-2", children: [
|
|
37
|
+
/* @__PURE__ */ c("div", { className: "flex items-start justify-between gap-2", children: [
|
|
38
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-medium leading-snug text-foreground", children: r }),
|
|
39
|
+
i && /* @__PURE__ */ e(f, { variant: "warning", appearance: "light", size: "sm", children: i })
|
|
40
|
+
] }),
|
|
41
|
+
a && /* @__PURE__ */ e("div", { className: "text-xs leading-relaxed text-muted-foreground", children: a }),
|
|
42
|
+
o && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: o.map((l, s) => /* @__PURE__ */ e(f, { variant: "secondary", appearance: "light", size: "xs", children: l }, s)) }),
|
|
43
|
+
(n || d) && /* @__PURE__ */ c("div", { className: "flex items-center justify-between gap-2 text-xs text-muted-foreground", children: [
|
|
44
|
+
/* @__PURE__ */ e("span", { children: n }),
|
|
45
|
+
/* @__PURE__ */ e("span", { children: d })
|
|
46
|
+
] }),
|
|
47
|
+
u
|
|
48
|
+
] }) });
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
B as KanbanBoard,
|
|
52
|
+
j as KanbanCard,
|
|
53
|
+
w as KanbanColumn,
|
|
54
|
+
y as KanbanSwimlane
|
|
55
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface LoginCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
3
|
+
title?: React.ReactNode;
|
|
4
|
+
description?: React.ReactNode;
|
|
5
|
+
footer?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare function LoginCard({ className, title, description, footer, children, ...props }: LoginCardProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export interface AuthMethodTabsProps {
|
|
9
|
+
password?: React.ReactNode;
|
|
10
|
+
sms?: React.ReactNode;
|
|
11
|
+
qrcode?: React.ReactNode;
|
|
12
|
+
sso?: React.ReactNode;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
}
|
|
15
|
+
declare function AuthMethodTabs({ password, sms, qrcode, sso, defaultValue }: AuthMethodTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export interface LoginFormProps extends React.FormHTMLAttributes<HTMLFormElement> {
|
|
17
|
+
submitText?: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
declare function PasswordLoginForm({ className, submitText, ...props }: LoginFormProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function SmsLoginForm({ className, submitText, ...props }: LoginFormProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function QrCodeLoginPanel({ className, title, description }: React.HTMLAttributes<HTMLDivElement> & {
|
|
22
|
+
title?: React.ReactNode;
|
|
23
|
+
description?: React.ReactNode;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function SsoLoginPanel({ className, providers, title }: React.HTMLAttributes<HTMLDivElement> & {
|
|
26
|
+
providers?: React.ReactNode[];
|
|
27
|
+
title?: React.ReactNode;
|
|
28
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare function MfaVerifyForm({ className, submitText, ...props }: LoginFormProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare function TenantSelector({ className, tenants, ...props }: React.HTMLAttributes<HTMLDivElement> & {
|
|
31
|
+
tenants?: React.ReactNode[];
|
|
32
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export { AuthMethodTabs, LoginCard, MfaVerifyForm, PasswordLoginForm, QrCodeLoginPanel, SmsLoginForm, SsoLoginPanel, TenantSelector, };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { ShieldCheck as x, KeyRound as N, Mail as b, LockKeyhole as v, QrCode as g, Smartphone as y, Building2 as f } from "lucide-react";
|
|
3
|
+
import { cn as n } from "../../../../lib/utils.js";
|
|
4
|
+
import { Button as c } from "../../form/button/button.js";
|
|
5
|
+
import { Checkbox as w } from "../../form/checkbox/checkbox.js";
|
|
6
|
+
import { InputWrapper as h, Input as o } from "../../form/input/input.js";
|
|
7
|
+
import { Label as p } from "../../form/label/label.js";
|
|
8
|
+
import { Tabs as z, TabsList as L, TabsTrigger as m, TabsContent as u } from "../../navigation/tabs/tabs.js";
|
|
9
|
+
import { TitleHelp as T } from "../../feedback/title-help/title-help.js";
|
|
10
|
+
function I({ className: t, title: l = "登录", description: s, footer: i, children: a, ...d }) {
|
|
11
|
+
return /* @__PURE__ */ r("div", { "data-slot": "login-card", className: n("rounded-xl border border-border bg-card p-6 shadow-sm", t), ...d, children: [
|
|
12
|
+
/* @__PURE__ */ e("div", { className: "mb-6 space-y-1 text-center", children: /* @__PURE__ */ e("h2", { className: "flex justify-center text-xl font-semibold tracking-tight text-foreground", children: /* @__PURE__ */ e(T, { help: s, children: l }) }) }),
|
|
13
|
+
a,
|
|
14
|
+
i && /* @__PURE__ */ e("div", { className: "mt-5 text-center text-xs text-muted-foreground", children: i })
|
|
15
|
+
] });
|
|
16
|
+
}
|
|
17
|
+
function K({ password: t, sms: l, qrcode: s, sso: i, defaultValue: a = "password" }) {
|
|
18
|
+
return /* @__PURE__ */ r(z, { defaultValue: a, children: [
|
|
19
|
+
/* @__PURE__ */ r(L, { className: "mb-5 grid w-full grid-cols-4", size: "sm", children: [
|
|
20
|
+
t && /* @__PURE__ */ e(m, { value: "password", children: "密码" }),
|
|
21
|
+
l && /* @__PURE__ */ e(m, { value: "sms", children: "短信" }),
|
|
22
|
+
s && /* @__PURE__ */ e(m, { value: "qrcode", children: "扫码" }),
|
|
23
|
+
i && /* @__PURE__ */ e(m, { value: "sso", children: "SSO" })
|
|
24
|
+
] }),
|
|
25
|
+
t && /* @__PURE__ */ e(u, { value: "password", children: t }),
|
|
26
|
+
l && /* @__PURE__ */ e(u, { value: "sms", children: l }),
|
|
27
|
+
s && /* @__PURE__ */ e(u, { value: "qrcode", children: s }),
|
|
28
|
+
i && /* @__PURE__ */ e(u, { value: "sso", children: i })
|
|
29
|
+
] });
|
|
30
|
+
}
|
|
31
|
+
function Q({ className: t, submitText: l = "登录", ...s }) {
|
|
32
|
+
return /* @__PURE__ */ r("form", { className: n("space-y-4", t), ...s, children: [
|
|
33
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
34
|
+
/* @__PURE__ */ e(p, { children: "账号" }),
|
|
35
|
+
/* @__PURE__ */ r(h, { children: [
|
|
36
|
+
/* @__PURE__ */ e(b, { className: "size-4" }),
|
|
37
|
+
/* @__PURE__ */ e(o, { placeholder: "name@example.com" })
|
|
38
|
+
] })
|
|
39
|
+
] }),
|
|
40
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
41
|
+
/* @__PURE__ */ e(p, { children: "密码" }),
|
|
42
|
+
/* @__PURE__ */ r(h, { children: [
|
|
43
|
+
/* @__PURE__ */ e(v, { className: "size-4" }),
|
|
44
|
+
/* @__PURE__ */ e(o, { type: "password", placeholder: "输入密码" })
|
|
45
|
+
] })
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
|
|
48
|
+
/* @__PURE__ */ r("label", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
49
|
+
/* @__PURE__ */ e(w, { size: "sm" }),
|
|
50
|
+
"记住登录状态"
|
|
51
|
+
] }),
|
|
52
|
+
/* @__PURE__ */ e(c, { type: "button", mode: "link", variant: "primary", size: "sm", children: "忘记密码" })
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ e(c, { type: "submit", className: "w-full", children: l })
|
|
55
|
+
] });
|
|
56
|
+
}
|
|
57
|
+
function H({ className: t, submitText: l = "验证码登录", ...s }) {
|
|
58
|
+
return /* @__PURE__ */ r("form", { className: n("space-y-4", t), ...s, children: [
|
|
59
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
60
|
+
/* @__PURE__ */ e(p, { children: "手机号" }),
|
|
61
|
+
/* @__PURE__ */ r(h, { children: [
|
|
62
|
+
/* @__PURE__ */ e(y, { className: "size-4" }),
|
|
63
|
+
/* @__PURE__ */ e(o, { placeholder: "输入手机号" })
|
|
64
|
+
] })
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
67
|
+
/* @__PURE__ */ e(p, { children: "验证码" }),
|
|
68
|
+
/* @__PURE__ */ r("div", { className: "flex gap-2", children: [
|
|
69
|
+
/* @__PURE__ */ e(o, { placeholder: "6 位验证码" }),
|
|
70
|
+
/* @__PURE__ */ e(c, { type: "button", variant: "outline", className: "shrink-0", children: "获取验证码" })
|
|
71
|
+
] })
|
|
72
|
+
] }),
|
|
73
|
+
/* @__PURE__ */ e(c, { type: "submit", className: "w-full", children: l })
|
|
74
|
+
] });
|
|
75
|
+
}
|
|
76
|
+
function O({ className: t, title: l = "扫码登录", description: s = "使用企业 App 扫描二维码完成登录。" }) {
|
|
77
|
+
return /* @__PURE__ */ r("div", { className: n("flex flex-col items-center gap-4 text-center", t), children: [
|
|
78
|
+
/* @__PURE__ */ e("div", { className: "flex size-44 items-center justify-center rounded-xl border border-border bg-muted/40", children: /* @__PURE__ */ e(g, { className: "size-24 text-muted-foreground" }) }),
|
|
79
|
+
/* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
80
|
+
/* @__PURE__ */ e("div", { className: "font-medium text-foreground", children: l }),
|
|
81
|
+
/* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: s })
|
|
82
|
+
] })
|
|
83
|
+
] });
|
|
84
|
+
}
|
|
85
|
+
function R({ className: t, providers: l, title: s = "企业单点登录" }) {
|
|
86
|
+
const i = l ?? ["飞书工作台", "企业微信", "统一身份认证"];
|
|
87
|
+
return /* @__PURE__ */ r("div", { className: n("space-y-3", t), children: [
|
|
88
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-foreground", children: s }),
|
|
89
|
+
i.map((a, d) => /* @__PURE__ */ r(c, { type: "button", variant: "outline", className: "w-full justify-start", children: [
|
|
90
|
+
/* @__PURE__ */ e(f, { className: "size-4" }),
|
|
91
|
+
a
|
|
92
|
+
] }, d))
|
|
93
|
+
] });
|
|
94
|
+
}
|
|
95
|
+
function V({ className: t, submitText: l = "验证并继续", ...s }) {
|
|
96
|
+
return /* @__PURE__ */ r("form", { className: n("space-y-4", t), ...s, children: [
|
|
97
|
+
/* @__PURE__ */ r("div", { className: "flex items-start gap-3 rounded-lg bg-muted/60 p-3", children: [
|
|
98
|
+
/* @__PURE__ */ e(x, { className: "mt-0.5 size-5 text-primary" }),
|
|
99
|
+
/* @__PURE__ */ r("div", { children: [
|
|
100
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-foreground", children: "二次验证" }),
|
|
101
|
+
/* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: "输入身份验证器中的 6 位动态码。" })
|
|
102
|
+
] })
|
|
103
|
+
] }),
|
|
104
|
+
/* @__PURE__ */ r(h, { children: [
|
|
105
|
+
/* @__PURE__ */ e(N, { className: "size-4" }),
|
|
106
|
+
/* @__PURE__ */ e(o, { placeholder: "000000", inputMode: "numeric" })
|
|
107
|
+
] }),
|
|
108
|
+
/* @__PURE__ */ e(c, { type: "submit", className: "w-full", children: l })
|
|
109
|
+
] });
|
|
110
|
+
}
|
|
111
|
+
function W({ className: t, tenants: l, ...s }) {
|
|
112
|
+
const i = l ?? ["华东运营中心", "数字化研发部", "集团总部"];
|
|
113
|
+
return /* @__PURE__ */ r("div", { className: n("space-y-2", t), ...s, children: [
|
|
114
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-foreground", children: "选择组织" }),
|
|
115
|
+
i.map((a, d) => /* @__PURE__ */ r(
|
|
116
|
+
"button",
|
|
117
|
+
{
|
|
118
|
+
type: "button",
|
|
119
|
+
className: "flex w-full items-center justify-between rounded-lg border border-border bg-card px-3 py-2 text-left text-sm transition-colors hover:border-primary/40 hover:bg-primary/5",
|
|
120
|
+
children: [
|
|
121
|
+
a,
|
|
122
|
+
/* @__PURE__ */ e(f, { className: "size-4 text-muted-foreground" })
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
d
|
|
126
|
+
))
|
|
127
|
+
] });
|
|
128
|
+
}
|
|
129
|
+
export {
|
|
130
|
+
K as AuthMethodTabs,
|
|
131
|
+
I as LoginCard,
|
|
132
|
+
V as MfaVerifyForm,
|
|
133
|
+
Q as PasswordLoginForm,
|
|
134
|
+
O as QrCodeLoginPanel,
|
|
135
|
+
H as SmsLoginForm,
|
|
136
|
+
R as SsoLoginPanel,
|
|
137
|
+
W as TenantSelector
|
|
138
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type MessageListCardTone = 'primary' | 'success' | 'warning' | 'info' | 'muted';
|
|
3
|
+
export interface MessageListCardItem {
|
|
4
|
+
id: React.Key;
|
|
5
|
+
type?: React.ReactNode;
|
|
6
|
+
title: React.ReactNode;
|
|
7
|
+
date?: React.ReactNode;
|
|
8
|
+
tone?: MessageListCardTone;
|
|
9
|
+
action?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface MessageListCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
12
|
+
title?: React.ReactNode;
|
|
13
|
+
description?: React.ReactNode;
|
|
14
|
+
actions?: React.ReactNode;
|
|
15
|
+
items?: MessageListCardItem[];
|
|
16
|
+
renderItem?: (item: MessageListCardItem) => React.ReactNode;
|
|
17
|
+
empty?: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
declare function MessageListCard({ className, title, description, actions, items, renderItem, empty, children, ...props }: MessageListCardProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export { MessageListCard };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import { ChevronRight as g } from "lucide-react";
|
|
4
|
+
import { cn as f } from "../../../../lib/utils.js";
|
|
5
|
+
import { Badge as u } from "../../data-display/badge/badge.js";
|
|
6
|
+
import { TitleHelp as x } from "../../feedback/title-help/title-help.js";
|
|
7
|
+
const h = {
|
|
8
|
+
primary: "primary",
|
|
9
|
+
success: "success",
|
|
10
|
+
warning: "warning",
|
|
11
|
+
info: "info",
|
|
12
|
+
muted: "secondary"
|
|
13
|
+
};
|
|
14
|
+
function j({
|
|
15
|
+
className: r,
|
|
16
|
+
title: t = "消息中心",
|
|
17
|
+
description: c,
|
|
18
|
+
actions: i,
|
|
19
|
+
items: d = [],
|
|
20
|
+
renderItem: o,
|
|
21
|
+
empty: l,
|
|
22
|
+
children: s,
|
|
23
|
+
...m
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ a(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
"data-slot": "message-list-card",
|
|
29
|
+
className: f(
|
|
30
|
+
"card-surface flex w-full flex-col gap-[var(--dk-card-inner-gap)] overflow-hidden rounded-[var(--dk-radius-card)] border border-border bg-card p-[var(--dk-card-padding)] text-card-foreground",
|
|
31
|
+
r
|
|
32
|
+
),
|
|
33
|
+
...m,
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ a("div", { className: "flex min-h-6 items-center justify-between gap-[var(--dk-control-gap)]", children: [
|
|
36
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 truncate text-base font-medium leading-6 text-foreground", children: /* @__PURE__ */ e(x, { help: c, children: t }) }),
|
|
37
|
+
/* @__PURE__ */ e("div", { className: "shrink-0", children: i ?? /* @__PURE__ */ e(N, {}) })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ a("div", { className: "min-w-0", children: [
|
|
40
|
+
s,
|
|
41
|
+
!s && d.length === 0 && /* @__PURE__ */ e("div", { className: "p-[calc(var(--dk-card-padding)*2)] text-center text-sm text-muted-foreground", children: l ?? "暂无消息" }),
|
|
42
|
+
!s && d.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-col gap-[calc(var(--dk-card-inner-gap)-0.125rem)]", children: d.map(
|
|
43
|
+
(n) => o ? /* @__PURE__ */ e(p.Fragment, { children: o(n) }, n.id) : /* @__PURE__ */ e(v, { item: n }, n.id)
|
|
44
|
+
) })
|
|
45
|
+
] })
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function v({ item: r }) {
|
|
51
|
+
const t = r.tone ?? "primary";
|
|
52
|
+
return /* @__PURE__ */ a("div", { className: "group flex min-h-[22px] w-full items-center gap-[calc(var(--dk-control-gap)+0.25rem)]", children: [
|
|
53
|
+
/* @__PURE__ */ e(
|
|
54
|
+
u,
|
|
55
|
+
{
|
|
56
|
+
variant: h[t],
|
|
57
|
+
appearance: "light",
|
|
58
|
+
size: "sm",
|
|
59
|
+
className: "shrink-0 font-normal",
|
|
60
|
+
children: r.type ?? "类型"
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-sm font-normal leading-[22px] text-foreground", children: r.title }),
|
|
64
|
+
r.date && /* @__PURE__ */ e("span", { className: "shrink-0 text-[13px] font-normal leading-[22px] text-muted-foreground", children: r.date }),
|
|
65
|
+
r.action && /* @__PURE__ */ e("span", { className: "shrink-0 text-muted-foreground", children: r.action })
|
|
66
|
+
] });
|
|
67
|
+
}
|
|
68
|
+
function N() {
|
|
69
|
+
return /* @__PURE__ */ a(
|
|
70
|
+
"button",
|
|
71
|
+
{
|
|
72
|
+
type: "button",
|
|
73
|
+
className: "flex h-[22px] items-center gap-[calc(var(--dk-control-gap)/2)] text-[13px] font-normal leading-[22px] text-muted-foreground transition-colors hover:text-primary",
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ e("span", { children: "更多" }),
|
|
76
|
+
/* @__PURE__ */ e(g, { className: "size-3.5", strokeWidth: 1.8 })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
j as MessageListCard
|
|
83
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type MetricTrend = 'up' | 'down' | 'flat';
|
|
3
|
+
export interface MetricCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
value: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
icon?: React.ComponentType<{
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
10
|
+
trend?: {
|
|
11
|
+
value: React.ReactNode;
|
|
12
|
+
direction?: MetricTrend;
|
|
13
|
+
label?: React.ReactNode;
|
|
14
|
+
};
|
|
15
|
+
footer?: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
declare function MetricCard({ className, label, value, description, icon: Icon, trend, footer, ...props }: MetricCardProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export { MetricCard };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { ArrowDownRight as m, Minus as u, ArrowUpRight as f } from "lucide-react";
|
|
3
|
+
import { cn as g } from "../../../../lib/utils.js";
|
|
4
|
+
import { Badge as v } from "../../data-display/badge/badge.js";
|
|
5
|
+
import { Card as p, CardContent as x } from "../../data-display/card/card.js";
|
|
6
|
+
function y({ className: c, label: d, value: n, description: t, icon: i, trend: e, footer: s, ...o }) {
|
|
7
|
+
const l = e?.direction === "down" ? m : e?.direction === "flat" ? u : f;
|
|
8
|
+
return /* @__PURE__ */ r(p, { "data-slot": "metric-card", className: g("card-surface", c), ...o, children: /* @__PURE__ */ a(x, { className: "space-y-[var(--dk-card-inner-gap)]", children: [
|
|
9
|
+
/* @__PURE__ */ a("div", { className: "flex items-start justify-between gap-[var(--dk-control-gap)]", children: [
|
|
10
|
+
/* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
11
|
+
/* @__PURE__ */ r("div", { className: "text-sm text-muted-foreground", children: d }),
|
|
12
|
+
/* @__PURE__ */ r("div", { className: "text-[length:var(--dk-metric-value-size)] font-semibold leading-none tracking-tight text-foreground", children: n })
|
|
13
|
+
] }),
|
|
14
|
+
i && /* @__PURE__ */ r("div", { className: "flex size-[var(--dk-metric-icon-size)] items-center justify-center rounded-[var(--dk-radius-control)] bg-primary/10 text-primary", children: /* @__PURE__ */ r(i, { className: "size-5" }) })
|
|
15
|
+
] }),
|
|
16
|
+
(t || e) && /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-[var(--dk-control-gap)]", children: [
|
|
17
|
+
e && /* @__PURE__ */ a(
|
|
18
|
+
v,
|
|
19
|
+
{
|
|
20
|
+
variant: e.direction === "down" ? "destructive" : e.direction === "flat" ? "secondary" : "success",
|
|
21
|
+
appearance: "light",
|
|
22
|
+
size: "sm",
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ r(l, { className: "size-3" }),
|
|
25
|
+
e.value
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
t && /* @__PURE__ */ r("div", { className: "text-sm text-muted-foreground", children: t }),
|
|
30
|
+
e?.label && /* @__PURE__ */ r("div", { className: "text-sm text-muted-foreground", children: e.label })
|
|
31
|
+
] }),
|
|
32
|
+
s && /* @__PURE__ */ r("div", { className: "border-t border-border pt-[var(--dk-card-inner-gap)] text-sm text-muted-foreground", children: s })
|
|
33
|
+
] }) });
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
y as MetricCard
|
|
37
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface MilestoneCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
3
|
+
title: React.ReactNode;
|
|
4
|
+
description?: React.ReactNode;
|
|
5
|
+
date?: React.ReactNode;
|
|
6
|
+
status?: 'done' | 'current' | 'pending' | 'risk';
|
|
7
|
+
progress?: number;
|
|
8
|
+
owner?: React.ReactNode;
|
|
9
|
+
actions?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare function MilestoneCard({ className, title, description, date, status, progress, owner, actions, children, ...props }: MilestoneCardProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { MilestoneCard };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { Flag as x } from "lucide-react";
|
|
3
|
+
import { cn as h } from "../../../../lib/utils.js";
|
|
4
|
+
import { Badge as g } from "../../data-display/badge/badge.js";
|
|
5
|
+
import { Progress as v } from "../../data-display/progress/progress.js";
|
|
6
|
+
import { TitleHelp as u } from "../../feedback/title-help/title-help.js";
|
|
7
|
+
function z({ className: d, title: l, description: n, date: a, status: r = "pending", progress: c, owner: s, actions: t, children: m, ...o }) {
|
|
8
|
+
const p = r === "risk" ? "destructive" : r === "done" ? "success" : r === "current" ? "primary" : "secondary", f = r === "risk" ? "有风险" : r === "done" ? "已完成" : r === "current" ? "进行中" : "待开始";
|
|
9
|
+
return /* @__PURE__ */ e("article", { "data-slot": "milestone-card", className: h("rounded-lg border border-border bg-card p-4 shadow-xs", d), ...o, children: /* @__PURE__ */ i("div", { className: "flex items-start gap-3", children: [
|
|
10
|
+
/* @__PURE__ */ e("div", { className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", children: /* @__PURE__ */ e(x, { className: "size-5" }) }),
|
|
11
|
+
/* @__PURE__ */ i("div", { className: "min-w-0 flex-1 space-y-3", children: [
|
|
12
|
+
/* @__PURE__ */ i("div", { className: "flex items-start justify-between gap-3", children: [
|
|
13
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
14
|
+
/* @__PURE__ */ e("div", { className: "font-medium text-foreground", children: /* @__PURE__ */ e(u, { help: n, children: l }) }),
|
|
15
|
+
/* @__PURE__ */ e(g, { variant: p, appearance: "light", size: "sm", children: f })
|
|
16
|
+
] }) }),
|
|
17
|
+
t
|
|
18
|
+
] }),
|
|
19
|
+
(a || s) && /* @__PURE__ */ i("div", { className: "flex flex-wrap items-center gap-3 text-xs text-muted-foreground", children: [
|
|
20
|
+
a && /* @__PURE__ */ e("span", { children: a }),
|
|
21
|
+
s && /* @__PURE__ */ i("span", { children: [
|
|
22
|
+
"负责人:",
|
|
23
|
+
s
|
|
24
|
+
] })
|
|
25
|
+
] }),
|
|
26
|
+
c !== void 0 && /* @__PURE__ */ e(v, { value: c }),
|
|
27
|
+
m
|
|
28
|
+
] })
|
|
29
|
+
] }) });
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
z as MilestoneCard
|
|
33
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface OAuthProvider {
|
|
3
|
+
id: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface OAuthLoginButtonsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
providers: OAuthProvider[];
|
|
10
|
+
onProviderClick?: (provider: OAuthProvider) => void;
|
|
11
|
+
columns?: 1 | 2;
|
|
12
|
+
}
|
|
13
|
+
declare function OAuthLoginButtons({ className, providers, onProviderClick, columns, ...props }: OAuthLoginButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { OAuthLoginButtons };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { Building2 as u } from "lucide-react";
|
|
3
|
+
import { cn as c } from "../../../../lib/utils.js";
|
|
4
|
+
import { Button as e } from "../../form/button/button.js";
|
|
5
|
+
function b({ className: o, providers: s, onProviderClick: a, columns: n = 1, ...l }) {
|
|
6
|
+
return /* @__PURE__ */ i(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
"data-slot": "oauth-login-buttons",
|
|
10
|
+
className: c("grid gap-2", n === 2 && "grid-cols-2", o),
|
|
11
|
+
...l,
|
|
12
|
+
children: s.map((t) => /* @__PURE__ */ m(
|
|
13
|
+
e,
|
|
14
|
+
{
|
|
15
|
+
type: "button",
|
|
16
|
+
variant: "outline",
|
|
17
|
+
className: "justify-start",
|
|
18
|
+
disabled: t.disabled,
|
|
19
|
+
onClick: () => a?.(t),
|
|
20
|
+
children: [
|
|
21
|
+
t.icon ?? /* @__PURE__ */ i(u, { className: "size-4" }),
|
|
22
|
+
t.label
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
t.id
|
|
26
|
+
))
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
b as OAuthLoginButtons
|
|
32
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
|
|
3
|
+
eyebrow?: React.ReactNode;
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
breadcrumbs?: React.ReactNode;
|
|
7
|
+
meta?: React.ReactNode;
|
|
8
|
+
actions?: React.ReactNode;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare function PageHeader({ className, eyebrow, title, description, breadcrumbs, meta, actions, children, ...props }: PageHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { PageHeader };
|