@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,66 @@
|
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as o } from "../../../../lib/utils.js";
|
|
3
|
+
import { TitleHelp as p } from "../../feedback/title-help/title-help.js";
|
|
4
|
+
function g({
|
|
5
|
+
className: s,
|
|
6
|
+
eyebrow: t,
|
|
7
|
+
title: i,
|
|
8
|
+
description: c,
|
|
9
|
+
breadcrumbs: r,
|
|
10
|
+
meta: d,
|
|
11
|
+
actions: l,
|
|
12
|
+
children: m,
|
|
13
|
+
...n
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ a(
|
|
16
|
+
"header",
|
|
17
|
+
{
|
|
18
|
+
"data-slot": "page-header",
|
|
19
|
+
className: o("space-y-4", s),
|
|
20
|
+
...n,
|
|
21
|
+
children: [
|
|
22
|
+
r && /* @__PURE__ */ e("div", { "data-slot": "page-header-breadcrumbs", children: r }),
|
|
23
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col gap-4 md:flex-row md:items-center md:justify-between", children: [
|
|
24
|
+
/* @__PURE__ */ a("div", { className: "min-w-0 space-y-2", children: [
|
|
25
|
+
t && /* @__PURE__ */ e(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
"data-slot": "page-header-eyebrow",
|
|
29
|
+
className: "text-xs font-medium uppercase tracking-wider text-muted-foreground",
|
|
30
|
+
children: t
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ e("div", { className: "space-y-1.5", children: /* @__PURE__ */ e(
|
|
34
|
+
"h1",
|
|
35
|
+
{
|
|
36
|
+
"data-slot": "page-header-title",
|
|
37
|
+
className: "text-2xl font-semibold tracking-tight text-foreground",
|
|
38
|
+
children: /* @__PURE__ */ e(p, { help: c, children: i })
|
|
39
|
+
}
|
|
40
|
+
) }),
|
|
41
|
+
d && /* @__PURE__ */ e(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
"data-slot": "page-header-meta",
|
|
45
|
+
className: "flex flex-wrap items-center gap-2 text-sm text-muted-foreground",
|
|
46
|
+
children: d
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] }),
|
|
50
|
+
l && /* @__PURE__ */ e(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
"data-slot": "page-header-actions",
|
|
54
|
+
className: "flex shrink-0 flex-wrap items-center gap-2",
|
|
55
|
+
children: l
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
] }),
|
|
59
|
+
m
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
g as PageHeader
|
|
66
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ProfileStat {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
value: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface ProfileCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
7
|
+
name: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
image?: string;
|
|
10
|
+
fallback?: string;
|
|
11
|
+
meta?: React.ReactNode;
|
|
12
|
+
stats?: ProfileStat[];
|
|
13
|
+
actions?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
declare function ProfileCard({ className, name, description, image, fallback, meta, stats, actions, children, ...props }: ProfileCardProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { ProfileCard };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as x } from "../../../../lib/utils.js";
|
|
3
|
+
import { Avatar as p, AvatarImage as v, AvatarFallback as u } from "../../data-display/avatar/avatar.js";
|
|
4
|
+
import { Card as N, CardContent as g } from "../../data-display/card/card.js";
|
|
5
|
+
import { TitleHelp as b } from "../../feedback/title-help/title-help.js";
|
|
6
|
+
function y({ className: s, name: c, description: m, image: a, fallback: n, meta: l, stats: d, actions: i, children: o, ...f }) {
|
|
7
|
+
return /* @__PURE__ */ e(N, { "data-slot": "profile-card", className: x("card-surface", s), ...f, children: /* @__PURE__ */ r(g, { className: "space-y-4", children: [
|
|
8
|
+
/* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
|
|
9
|
+
/* @__PURE__ */ r(p, { className: "size-12", children: [
|
|
10
|
+
a && /* @__PURE__ */ e(v, { src: a, alt: "" }),
|
|
11
|
+
/* @__PURE__ */ e(u, { children: n ?? "DK" })
|
|
12
|
+
] }),
|
|
13
|
+
/* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
|
|
14
|
+
/* @__PURE__ */ e("div", { className: "font-semibold text-foreground", children: /* @__PURE__ */ e(b, { help: m, children: c }) }),
|
|
15
|
+
l && /* @__PURE__ */ e("div", { className: "mt-1 text-xs text-muted-foreground", children: l })
|
|
16
|
+
] }),
|
|
17
|
+
i && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-2", children: i })
|
|
18
|
+
] }),
|
|
19
|
+
d && /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-2", children: d.map((t, h) => /* @__PURE__ */ r("div", { className: "rounded-md bg-muted/60 p-2 text-center", children: [
|
|
20
|
+
/* @__PURE__ */ e("div", { className: "text-base font-semibold text-foreground", children: t.value }),
|
|
21
|
+
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: t.label })
|
|
22
|
+
] }, h)) }),
|
|
23
|
+
o
|
|
24
|
+
] }) });
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
y as ProfileCard
|
|
28
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ProgressCardStep {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
value: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface ProgressCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
value: number;
|
|
10
|
+
max?: number;
|
|
11
|
+
label?: React.ReactNode;
|
|
12
|
+
steps?: ProgressCardStep[];
|
|
13
|
+
footer?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
declare function ProgressCard({ className, title, description, value, max, label, steps, footer, ...props }: ProgressCardProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { ProgressCard };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as h } from "../../../../lib/utils.js";
|
|
3
|
+
import { Progress as p } from "../../data-display/progress/progress.js";
|
|
4
|
+
import { Card as x, CardContent as g } from "../../data-display/card/card.js";
|
|
5
|
+
import { TitleHelp as v } from "../../feedback/title-help/title-help.js";
|
|
6
|
+
function M({ className: i, title: l, description: c, value: o, max: t = 100, label: n, steps: d, footer: a, ...u }) {
|
|
7
|
+
const s = t > 0 ? Math.min(100, Math.max(0, o / t * 100)) : 0;
|
|
8
|
+
return /* @__PURE__ */ e(x, { "data-slot": "progress-card", className: h("card-surface", i), ...u, children: /* @__PURE__ */ r(g, { className: "space-y-4", children: [
|
|
9
|
+
/* @__PURE__ */ r("div", { className: "flex items-start justify-between gap-4", children: [
|
|
10
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: /* @__PURE__ */ e("div", { className: "font-medium text-foreground", children: /* @__PURE__ */ e(v, { help: c, children: l }) }) }),
|
|
11
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-semibold text-foreground", children: n ?? `${Math.round(s)}%` })
|
|
12
|
+
] }),
|
|
13
|
+
/* @__PURE__ */ e(p, { value: s }),
|
|
14
|
+
d && /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-2", children: d.map((m, f) => /* @__PURE__ */ r("div", { className: "rounded-md bg-muted/60 p-2", children: [
|
|
15
|
+
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: m.label }),
|
|
16
|
+
/* @__PURE__ */ e("div", { className: "mt-1 text-sm font-medium text-foreground", children: m.value })
|
|
17
|
+
] }, f)) }),
|
|
18
|
+
a && /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: a })
|
|
19
|
+
] }) });
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
M as ProgressCard
|
|
23
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ProjectCardMeta {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
value: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface ProjectCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
status?: React.ReactNode;
|
|
10
|
+
owner?: React.ReactNode;
|
|
11
|
+
dateRange?: React.ReactNode;
|
|
12
|
+
progress?: number;
|
|
13
|
+
meta?: ProjectCardMeta[];
|
|
14
|
+
actions?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare function ProjectCard({ className, title, description, status, owner, dateRange, progress, meta, actions, children, ...props }: ProjectCardProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export { ProjectCard };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { CalendarDays as h } from "lucide-react";
|
|
3
|
+
import { cn as u } from "../../../../lib/utils.js";
|
|
4
|
+
import { Badge as N } from "../../data-display/badge/badge.js";
|
|
5
|
+
import { Card as v, CardContent as g } from "../../data-display/card/card.js";
|
|
6
|
+
import { Progress as j } from "../../data-display/progress/progress.js";
|
|
7
|
+
import { TitleHelp as y } from "../../feedback/title-help/title-help.js";
|
|
8
|
+
function H({ className: c, title: m, description: n, status: l, owner: a, dateRange: s, progress: i, meta: d, actions: o, children: f, ...p }) {
|
|
9
|
+
return /* @__PURE__ */ e(v, { "data-slot": "project-card", className: u("card-surface", c), ...p, children: /* @__PURE__ */ r(g, { className: "space-y-4", children: [
|
|
10
|
+
/* @__PURE__ */ r("div", { className: "flex items-start justify-between gap-3", children: [
|
|
11
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 space-y-1", children: /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
12
|
+
/* @__PURE__ */ e("div", { className: "font-semibold text-foreground", children: /* @__PURE__ */ e(y, { help: n, children: m }) }),
|
|
13
|
+
l && /* @__PURE__ */ e(N, { appearance: "light", children: l })
|
|
14
|
+
] }) }),
|
|
15
|
+
o
|
|
16
|
+
] }),
|
|
17
|
+
(a || s) && /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-3 text-xs text-muted-foreground", children: [
|
|
18
|
+
a && /* @__PURE__ */ r("span", { children: [
|
|
19
|
+
"负责人:",
|
|
20
|
+
a
|
|
21
|
+
] }),
|
|
22
|
+
s && /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1", children: [
|
|
23
|
+
/* @__PURE__ */ e(h, { className: "size-3.5" }),
|
|
24
|
+
s
|
|
25
|
+
] })
|
|
26
|
+
] }),
|
|
27
|
+
i !== void 0 && /* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
28
|
+
/* @__PURE__ */ r("div", { className: "flex items-center justify-between text-xs", children: [
|
|
29
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "进度" }),
|
|
30
|
+
/* @__PURE__ */ r("span", { className: "font-medium text-foreground", children: [
|
|
31
|
+
i,
|
|
32
|
+
"%"
|
|
33
|
+
] })
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ e(j, { value: i })
|
|
36
|
+
] }),
|
|
37
|
+
d && /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-2", children: d.map((t, x) => /* @__PURE__ */ r("div", { className: "rounded-md bg-muted/60 p-2", children: [
|
|
38
|
+
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: t.label }),
|
|
39
|
+
/* @__PURE__ */ e("div", { className: "mt-1 text-sm font-medium text-foreground", children: t.value })
|
|
40
|
+
] }, x)) }),
|
|
41
|
+
f
|
|
42
|
+
] }) });
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
H as ProjectCard
|
|
46
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ShortcutCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
3
|
+
title: React.ReactNode;
|
|
4
|
+
description?: React.ReactNode;
|
|
5
|
+
icon?: React.ComponentType<{
|
|
6
|
+
className?: string;
|
|
7
|
+
}>;
|
|
8
|
+
badge?: React.ReactNode;
|
|
9
|
+
meta?: React.ReactNode;
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function ShortcutCard({ className, title, description, icon: Icon, badge, meta, asChild, children, ...props }: ShortcutCardProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { ShortcutCard };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { ArrowRight as p } from "lucide-react";
|
|
3
|
+
import { Slot as u } from "radix-ui";
|
|
4
|
+
import { cn as h } from "../../../../lib/utils.js";
|
|
5
|
+
import { Badge as g } from "../../data-display/badge/badge.js";
|
|
6
|
+
import { TitleHelp as f } from "../../feedback/title-help/title-help.js";
|
|
7
|
+
function j({ className: s, title: m, description: a, icon: o, badge: t, meta: i, asChild: n, children: d, ...c }) {
|
|
8
|
+
const l = n ? u.Slot : "div";
|
|
9
|
+
return /* @__PURE__ */ e(
|
|
10
|
+
l,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "shortcut-card",
|
|
13
|
+
className: h(
|
|
14
|
+
"group flex min-h-28 cursor-pointer items-center gap-3 rounded-lg border border-border bg-card p-4 transition-colors hover:border-primary/40 hover:bg-primary/5",
|
|
15
|
+
s
|
|
16
|
+
),
|
|
17
|
+
...c,
|
|
18
|
+
children: [
|
|
19
|
+
o && /* @__PURE__ */ r("div", { className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground transition-colors group-hover:bg-primary/10 group-hover:text-primary", children: /* @__PURE__ */ r(o, { className: "size-5" }) }),
|
|
20
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1 space-y-1", children: [
|
|
21
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: [
|
|
22
|
+
/* @__PURE__ */ r(f, { className: "font-medium text-foreground", help: a, children: m }),
|
|
23
|
+
t && /* @__PURE__ */ r(g, { variant: "primary", appearance: "light", size: "sm", children: t })
|
|
24
|
+
] }),
|
|
25
|
+
i && /* @__PURE__ */ r("div", { className: "text-xs text-muted-foreground", children: i }),
|
|
26
|
+
d
|
|
27
|
+
] }),
|
|
28
|
+
/* @__PURE__ */ r(p, { className: "size-4 shrink-0 text-muted-foreground transition-colors group-hover:text-primary" })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
j as ShortcutCard
|
|
35
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface SprintSummaryItem {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
value: React.ReactNode;
|
|
5
|
+
tone?: 'default' | 'primary' | 'success' | 'warning' | 'destructive';
|
|
6
|
+
}
|
|
7
|
+
export interface SprintSummaryProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
8
|
+
title: React.ReactNode;
|
|
9
|
+
description?: React.ReactNode;
|
|
10
|
+
progress?: number;
|
|
11
|
+
items: SprintSummaryItem[];
|
|
12
|
+
actions?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare function SprintSummary({ className, title, description, progress, items, actions, children, ...props }: SprintSummaryProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { SprintSummary };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { cn as s } from "../../../../lib/utils.js";
|
|
3
|
+
import { Card as f, CardContent as p } from "../../data-display/card/card.js";
|
|
4
|
+
import { Progress as x } from "../../data-display/progress/progress.js";
|
|
5
|
+
import { TitleHelp as v } from "../../feedback/title-help/title-help.js";
|
|
6
|
+
function w({ className: c, title: d, description: l, progress: a, items: n, actions: o, children: i, ...m }) {
|
|
7
|
+
return /* @__PURE__ */ e(f, { "data-slot": "sprint-summary", className: s("card-surface", c), ...m, children: /* @__PURE__ */ t(p, { className: "space-y-4", children: [
|
|
8
|
+
/* @__PURE__ */ t("div", { className: "flex items-start justify-between gap-3", children: [
|
|
9
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: /* @__PURE__ */ e("div", { className: "font-semibold text-foreground", children: /* @__PURE__ */ e(v, { help: l, children: d }) }) }),
|
|
10
|
+
o
|
|
11
|
+
] }),
|
|
12
|
+
a !== void 0 && /* @__PURE__ */ t("div", { className: "space-y-2", children: [
|
|
13
|
+
/* @__PURE__ */ t("div", { className: "flex justify-between text-xs", children: [
|
|
14
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "完成度" }),
|
|
15
|
+
/* @__PURE__ */ t("span", { className: "font-medium text-foreground", children: [
|
|
16
|
+
a,
|
|
17
|
+
"%"
|
|
18
|
+
] })
|
|
19
|
+
] }),
|
|
20
|
+
/* @__PURE__ */ e(x, { value: a })
|
|
21
|
+
] }),
|
|
22
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-2 md:grid-cols-4", children: n.map((r, u) => /* @__PURE__ */ t("div", { className: "rounded-md bg-muted/60 p-3", children: [
|
|
23
|
+
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: r.label }),
|
|
24
|
+
/* @__PURE__ */ e(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
className: s(
|
|
28
|
+
"mt-1 text-lg font-semibold text-foreground",
|
|
29
|
+
r.tone === "primary" && "text-primary",
|
|
30
|
+
r.tone === "success" && "text-[var(--color-success-accent,var(--color-green-700))]",
|
|
31
|
+
r.tone === "warning" && "text-[var(--color-warning-accent,var(--color-yellow-700))]",
|
|
32
|
+
r.tone === "destructive" && "text-destructive"
|
|
33
|
+
),
|
|
34
|
+
children: r.value
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
] }, u)) }),
|
|
38
|
+
i
|
|
39
|
+
] }) });
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
w as SprintSummary
|
|
43
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type StatePanelVariant = 'empty' | 'loading' | 'error' | 'success';
|
|
3
|
+
export interface StatePanelProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
4
|
+
variant?: StatePanelVariant;
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
action?: React.ReactNode;
|
|
9
|
+
size?: 'sm' | 'md' | 'lg';
|
|
10
|
+
}
|
|
11
|
+
declare function StatePanel({ className, variant, title, description, icon, action, size, children, ...props }: StatePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { StatePanel };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { CheckCircle2 as p, AlertCircle as g, Loader2 as h, Inbox as N } from "lucide-react";
|
|
3
|
+
import { cn as a } from "../../../../lib/utils.js";
|
|
4
|
+
import { Skeleton as i } from "../../data-display/skeleton/skeleton.js";
|
|
5
|
+
const b = {
|
|
6
|
+
empty: {
|
|
7
|
+
title: "暂无数据",
|
|
8
|
+
description: "当前没有可展示的内容。",
|
|
9
|
+
icon: /* @__PURE__ */ e(N, { className: "size-6" })
|
|
10
|
+
},
|
|
11
|
+
loading: {
|
|
12
|
+
title: "正在加载",
|
|
13
|
+
description: "数据正在准备,请稍候。",
|
|
14
|
+
icon: /* @__PURE__ */ e(h, { className: "size-6 animate-spin" })
|
|
15
|
+
},
|
|
16
|
+
error: {
|
|
17
|
+
title: "加载失败",
|
|
18
|
+
description: "请求未完成,请稍后重试。",
|
|
19
|
+
icon: /* @__PURE__ */ e(g, { className: "size-6" })
|
|
20
|
+
},
|
|
21
|
+
success: {
|
|
22
|
+
title: "处理完成",
|
|
23
|
+
description: "操作已成功完成。",
|
|
24
|
+
icon: /* @__PURE__ */ e(p, { className: "size-6" })
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
function z({
|
|
28
|
+
className: d,
|
|
29
|
+
variant: s = "empty",
|
|
30
|
+
title: m,
|
|
31
|
+
description: n,
|
|
32
|
+
icon: u,
|
|
33
|
+
action: o,
|
|
34
|
+
size: t = "md",
|
|
35
|
+
children: l,
|
|
36
|
+
...f
|
|
37
|
+
}) {
|
|
38
|
+
const r = b[s];
|
|
39
|
+
return /* @__PURE__ */ e(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "state-panel",
|
|
43
|
+
className: a(
|
|
44
|
+
"flex flex-col items-center justify-center rounded-lg border border-dashed border-border bg-card text-center",
|
|
45
|
+
t === "sm" && "min-h-36 p-5",
|
|
46
|
+
t === "md" && "min-h-52 p-8",
|
|
47
|
+
t === "lg" && "min-h-72 p-10",
|
|
48
|
+
d
|
|
49
|
+
),
|
|
50
|
+
...f,
|
|
51
|
+
children: s === "loading" && !l ? /* @__PURE__ */ c("div", { className: "w-full max-w-sm space-y-3", children: [
|
|
52
|
+
/* @__PURE__ */ e(i, { className: "mx-auto size-12 rounded-full" }),
|
|
53
|
+
/* @__PURE__ */ e(i, { className: "mx-auto h-4 w-1/3" }),
|
|
54
|
+
/* @__PURE__ */ e(i, { className: "mx-auto h-3 w-2/3" })
|
|
55
|
+
] }) : /* @__PURE__ */ c(x, { children: [
|
|
56
|
+
/* @__PURE__ */ e(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
className: a(
|
|
60
|
+
"mb-3 flex size-12 items-center justify-center rounded-full bg-muted text-muted-foreground",
|
|
61
|
+
s === "error" && "bg-destructive/10 text-destructive",
|
|
62
|
+
s === "success" && "bg-[var(--color-success-soft,var(--color-green-50))] text-[var(--color-success-accent,var(--color-green-700))]"
|
|
63
|
+
),
|
|
64
|
+
children: u ?? r.icon
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ c("div", { className: "space-y-1", children: [
|
|
68
|
+
/* @__PURE__ */ e("div", { className: "font-medium text-foreground", children: m ?? r.title }),
|
|
69
|
+
/* @__PURE__ */ e("div", { className: "max-w-sm text-sm leading-relaxed text-muted-foreground", children: n ?? r.description })
|
|
70
|
+
] }),
|
|
71
|
+
l,
|
|
72
|
+
o && /* @__PURE__ */ e("div", { className: "mt-4", children: o })
|
|
73
|
+
] })
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
z as StatePanel
|
|
79
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface SummaryField {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
value: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface SummaryCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
status?: React.ReactNode;
|
|
10
|
+
fields?: SummaryField[];
|
|
11
|
+
tags?: React.ReactNode[];
|
|
12
|
+
actions?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare function SummaryCard({ className, title, description, status, fields, tags, actions, children, ...props }: SummaryCardProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { SummaryCard };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as v } from "../../../../lib/utils.js";
|
|
3
|
+
import { Badge as n } from "../../data-display/badge/badge.js";
|
|
4
|
+
import { Card as h, CardContent as f } from "../../data-display/card/card.js";
|
|
5
|
+
import { TitleHelp as x } from "../../feedback/title-help/title-help.js";
|
|
6
|
+
function w({ className: s, title: m, description: o, status: l, fields: i, tags: c, actions: t, children: p, ...g }) {
|
|
7
|
+
return /* @__PURE__ */ e(h, { "data-slot": "summary-card", className: v("card-surface", s), ...g, children: /* @__PURE__ */ r(f, { className: "space-y-[var(--dk-card-inner-gap)]", children: [
|
|
8
|
+
/* @__PURE__ */ r("div", { className: "flex items-start justify-between gap-[var(--dk-control-gap)]", children: [
|
|
9
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 space-y-1", children: /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-[var(--dk-control-gap)]", children: [
|
|
10
|
+
/* @__PURE__ */ e("div", { className: "text-[length:var(--dk-summary-title-size)] font-semibold leading-6 text-foreground", children: /* @__PURE__ */ e(x, { help: o, children: m }) }),
|
|
11
|
+
l && /* @__PURE__ */ e(n, { appearance: "light", children: l })
|
|
12
|
+
] }) }),
|
|
13
|
+
t && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-[var(--dk-control-gap)]", children: t })
|
|
14
|
+
] }),
|
|
15
|
+
i && /* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-[var(--dk-control-gap)] md:grid-cols-4", children: i.map((a, d) => /* @__PURE__ */ r("div", { className: "rounded-[var(--dk-radius-control)] bg-muted/60 p-[var(--dk-card-field-padding)]", children: [
|
|
16
|
+
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: a.label }),
|
|
17
|
+
/* @__PURE__ */ e("div", { className: "mt-1 text-sm font-medium text-foreground", children: a.value })
|
|
18
|
+
] }, d)) }),
|
|
19
|
+
c && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-[var(--dk-control-gap)]", children: c.map((a, d) => /* @__PURE__ */ e(n, { variant: "secondary", appearance: "light", size: "sm", children: a }, d)) }),
|
|
20
|
+
p
|
|
21
|
+
] }) });
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
w as SummaryCard
|
|
25
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TaskCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
3
|
+
title: React.ReactNode;
|
|
4
|
+
description?: React.ReactNode;
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
status?: React.ReactNode;
|
|
7
|
+
priority?: React.ReactNode;
|
|
8
|
+
due?: React.ReactNode;
|
|
9
|
+
assignee?: React.ReactNode;
|
|
10
|
+
tags?: React.ReactNode[];
|
|
11
|
+
actions?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare function TaskCard({ className, title, description, checked, status, priority, due, assignee, tags, actions, children, ...props }: TaskCardProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { TaskCard };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { CalendarClock as N } from "lucide-react";
|
|
3
|
+
import { cn as m } from "../../../../lib/utils.js";
|
|
4
|
+
import { Badge as t } from "../../data-display/badge/badge.js";
|
|
5
|
+
import { Checkbox as u } from "../../form/checkbox/checkbox.js";
|
|
6
|
+
import { TitleHelp as b } from "../../feedback/title-help/title-help.js";
|
|
7
|
+
function T({
|
|
8
|
+
className: c,
|
|
9
|
+
title: d,
|
|
10
|
+
description: o,
|
|
11
|
+
checked: l,
|
|
12
|
+
status: s,
|
|
13
|
+
priority: n,
|
|
14
|
+
due: a,
|
|
15
|
+
assignee: i,
|
|
16
|
+
tags: p,
|
|
17
|
+
actions: h,
|
|
18
|
+
children: f,
|
|
19
|
+
...x
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ e("article", { "data-slot": "task-card", className: m("rounded-lg border border-border bg-card p-4 shadow-xs", c), ...x, children: /* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
|
|
22
|
+
/* @__PURE__ */ e(u, { checked: l, className: "mt-0.5" }),
|
|
23
|
+
/* @__PURE__ */ r("div", { className: "min-w-0 flex-1 space-y-2", children: [
|
|
24
|
+
/* @__PURE__ */ r("div", { className: "flex items-start justify-between gap-2", children: [
|
|
25
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: m("text-sm font-medium text-foreground", l && "text-muted-foreground line-through"), children: /* @__PURE__ */ e(b, { help: o, children: d }) }) }),
|
|
26
|
+
h
|
|
27
|
+
] }),
|
|
28
|
+
/* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
29
|
+
s && /* @__PURE__ */ e(t, { variant: "primary", appearance: "light", size: "sm", children: s }),
|
|
30
|
+
n && /* @__PURE__ */ e(t, { variant: "warning", appearance: "light", size: "sm", children: n }),
|
|
31
|
+
p?.map((g, v) => /* @__PURE__ */ e(t, { variant: "secondary", appearance: "light", size: "sm", children: g }, v))
|
|
32
|
+
] }),
|
|
33
|
+
(a || i) && /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-3 text-xs text-muted-foreground", children: [
|
|
34
|
+
a && /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1", children: [
|
|
35
|
+
/* @__PURE__ */ e(N, { className: "size-3.5" }),
|
|
36
|
+
a
|
|
37
|
+
] }),
|
|
38
|
+
i && /* @__PURE__ */ r("span", { children: [
|
|
39
|
+
"负责人:",
|
|
40
|
+
i
|
|
41
|
+
] })
|
|
42
|
+
] }),
|
|
43
|
+
f
|
|
44
|
+
] })
|
|
45
|
+
] }) });
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
T as TaskCard
|
|
49
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type TimelineItemStatus = 'done' | 'current' | 'pending' | 'error';
|
|
3
|
+
export type TimelineItemTone = 'primary' | 'success' | 'warning' | 'muted' | 'destructive';
|
|
4
|
+
export interface TimelineTab {
|
|
5
|
+
value: string;
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
count?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface TimelineItemData {
|
|
10
|
+
id: React.Key;
|
|
11
|
+
title: React.ReactNode;
|
|
12
|
+
time?: React.ReactNode;
|
|
13
|
+
actor?: React.ReactNode;
|
|
14
|
+
description?: React.ReactNode;
|
|
15
|
+
status?: TimelineItemStatus;
|
|
16
|
+
tone?: TimelineItemTone;
|
|
17
|
+
tag?: React.ReactNode;
|
|
18
|
+
meta?: React.ReactNode;
|
|
19
|
+
actions?: React.ReactNode;
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export interface TimelineProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
23
|
+
density?: 'default' | 'compact';
|
|
24
|
+
tabs?: TimelineTab[];
|
|
25
|
+
activeTab?: string;
|
|
26
|
+
defaultActiveTab?: string;
|
|
27
|
+
onTabChange?: (value: string) => void;
|
|
28
|
+
items?: TimelineItemData[];
|
|
29
|
+
renderItem?: (item: TimelineItemData, index: number) => React.ReactNode;
|
|
30
|
+
listClassName?: string;
|
|
31
|
+
empty?: React.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
export interface TimelineItemProps extends Omit<React.LiHTMLAttributes<HTMLLIElement>, 'title'> {
|
|
34
|
+
title: React.ReactNode;
|
|
35
|
+
time?: React.ReactNode;
|
|
36
|
+
actor?: React.ReactNode;
|
|
37
|
+
description?: React.ReactNode;
|
|
38
|
+
status?: TimelineItemStatus;
|
|
39
|
+
tone?: TimelineItemTone;
|
|
40
|
+
tag?: React.ReactNode;
|
|
41
|
+
meta?: React.ReactNode;
|
|
42
|
+
actions?: React.ReactNode;
|
|
43
|
+
}
|
|
44
|
+
declare function Timeline({ className, density, tabs, activeTab, defaultActiveTab, onTabChange, items, renderItem, listClassName, empty, children, ...props }: TimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
declare function TimelineItem({ className, title, time, actor, description, status, tone, tag, meta, actions, children, ...props }: TimelineItemProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export { Timeline, TimelineItem };
|