@demokit-ui/demokit 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/app/demo1-shell.js +195 -188
- package/dist/app/tweak-panel.d.ts +1 -2
- package/dist/app/tweak-panel.js +20 -4
- package/dist/index.js +811 -479
- package/dist/kit/components/chart/chart/chart.examples.d.ts +24 -0
- package/dist/kit/components/chart/chart/chart.examples.js +422 -0
- package/dist/kit/components/composite/action-bar/action-bar.examples.d.ts +2 -0
- package/dist/kit/components/composite/action-bar/action-bar.examples.js +35 -0
- package/dist/kit/components/composite/action-card/action-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/action-card/action-card.examples.js +34 -0
- package/dist/kit/components/composite/activity-feed/activity-feed.examples.d.ts +2 -0
- package/dist/kit/components/composite/activity-feed/activity-feed.examples.js +44 -0
- package/dist/kit/components/composite/alert-card/alert-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/alert-card/alert-card.examples.js +18 -0
- package/dist/kit/components/composite/approval-flow/approval-flow.examples.d.ts +2 -0
- package/dist/kit/components/composite/approval-flow/approval-flow.examples.js +70 -0
- package/dist/kit/components/composite/auth-shell/auth-shell.examples.d.ts +2 -0
- package/dist/kit/components/composite/auth-shell/auth-shell.examples.js +23 -0
- package/dist/kit/components/composite/board-toolbar/board-toolbar.examples.d.ts +2 -0
- package/dist/kit/components/composite/board-toolbar/board-toolbar.examples.js +32 -0
- package/dist/kit/components/composite/chart-card/chart-card.examples.d.ts +3 -0
- package/dist/kit/components/composite/chart-card/chart-card.examples.js +58 -0
- package/dist/kit/components/composite/chart-toolbar/chart-toolbar.examples.d.ts +2 -0
- package/dist/kit/components/composite/chart-toolbar/chart-toolbar.examples.js +39 -0
- package/dist/kit/components/composite/data-section/data-section.examples.d.ts +3 -0
- package/dist/kit/components/composite/data-section/data-section.examples.js +48 -0
- package/dist/kit/components/composite/description-grid/description-grid.examples.d.ts +2 -0
- package/dist/kit/components/composite/description-grid/description-grid.examples.js +30 -0
- package/dist/kit/components/composite/detail-header/detail-header.examples.d.ts +2 -0
- package/dist/kit/components/composite/detail-header/detail-header.examples.js +37 -0
- package/dist/kit/components/composite/filter-panel/filter-panel.examples.d.ts +2 -0
- package/dist/kit/components/composite/filter-panel/filter-panel.examples.js +63 -0
- package/dist/kit/components/composite/filter-toolbar/filter-toolbar.examples.d.ts +2 -0
- package/dist/kit/components/composite/filter-toolbar/filter-toolbar.examples.js +39 -0
- package/dist/kit/components/composite/forgot-password-form/forgot-password-form.examples.d.ts +2 -0
- package/dist/kit/components/composite/forgot-password-form/forgot-password-form.examples.js +19 -0
- package/dist/kit/components/composite/form-section/form-section.examples.d.ts +2 -0
- package/dist/kit/components/composite/form-section/form-section.examples.js +40 -0
- package/dist/kit/components/composite/kanban-board/kanban-board.examples.d.ts +2 -0
- package/dist/kit/components/composite/kanban-board/kanban-board.examples.js +72 -0
- package/dist/kit/components/composite/login-card/login-card.examples.d.ts +3 -0
- package/dist/kit/components/composite/login-card/login-card.examples.js +30 -0
- package/dist/kit/components/composite/message-list-card/message-list-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/message-list-card/message-list-card.examples.js +56 -0
- package/dist/kit/components/composite/metric-card/metric-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/metric-card/metric-card.examples.js +50 -0
- package/dist/kit/components/composite/milestone-card/milestone-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/milestone-card/milestone-card.examples.js +54 -0
- package/dist/kit/components/composite/oauth-login-buttons/oauth-login-buttons.examples.d.ts +2 -0
- package/dist/kit/components/composite/oauth-login-buttons/oauth-login-buttons.examples.js +24 -0
- package/dist/kit/components/composite/page-header/page-header.examples.d.ts +3 -0
- package/dist/kit/components/composite/page-header/page-header.examples.js +56 -0
- package/dist/kit/components/composite/profile-card/profile-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/profile-card/profile-card.examples.js +45 -0
- package/dist/kit/components/composite/progress-card/progress-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/progress-card/progress-card.examples.js +42 -0
- package/dist/kit/components/composite/project-card/project-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/project-card/project-card.examples.js +48 -0
- package/dist/kit/components/composite/shortcut-card/shortcut-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/shortcut-card/shortcut-card.examples.js +18 -0
- package/dist/kit/components/composite/sprint-summary/sprint-summary.examples.d.ts +2 -0
- package/dist/kit/components/composite/sprint-summary/sprint-summary.examples.js +27 -0
- package/dist/kit/components/composite/state-panel/state-panel.examples.d.ts +2 -0
- package/dist/kit/components/composite/state-panel/state-panel.examples.js +48 -0
- package/dist/kit/components/composite/summary-card/summary-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/summary-card/summary-card.examples.js +32 -0
- package/dist/kit/components/composite/task-card/task-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/task-card/task-card.examples.js +39 -0
- package/dist/kit/components/composite/timeline/timeline.examples.d.ts +2 -0
- package/dist/kit/components/composite/timeline/timeline.examples.js +75 -0
- package/dist/kit/components/composite/todo-card/todo-card.examples.d.ts +2 -0
- package/dist/kit/components/composite/todo-card/todo-card.examples.js +42 -0
- package/dist/kit/components/data-display/avatar/avatar.examples.d.ts +7 -0
- package/dist/kit/components/data-display/avatar/avatar.examples.js +48 -0
- package/dist/kit/components/data-display/avatar-group/avatar-group.examples.d.ts +3 -0
- package/dist/kit/components/data-display/avatar-group/avatar-group.examples.js +35 -0
- package/dist/kit/components/data-display/badge/badge.examples.d.ts +9 -0
- package/dist/kit/components/data-display/badge/badge.examples.js +57 -0
- package/dist/kit/components/data-display/card/card.examples.d.ts +16 -0
- package/dist/kit/components/data-display/card/card.examples.js +72 -0
- package/dist/kit/components/data-display/data-grid/data-grid.examples.d.ts +2 -0
- package/dist/kit/components/data-display/data-grid/data-grid.examples.js +92 -0
- package/dist/kit/components/data-display/kbd/kbd.examples.d.ts +3 -0
- package/dist/kit/components/data-display/kbd/kbd.examples.js +43 -0
- package/dist/kit/components/data-display/money-amount/money-amount.examples.d.ts +1 -0
- package/dist/kit/components/data-display/money-amount/money-amount.examples.js +26 -0
- package/dist/kit/components/data-display/progress/progress.examples.d.ts +3 -0
- package/dist/kit/components/data-display/progress/progress.examples.js +45 -0
- package/dist/kit/components/data-display/skeleton/skeleton.examples.d.ts +3 -0
- package/dist/kit/components/data-display/skeleton/skeleton.examples.js +37 -0
- package/dist/kit/components/data-display/sliding-number/sliding-number.examples.d.ts +3 -0
- package/dist/kit/components/data-display/sliding-number/sliding-number.examples.js +42 -0
- package/dist/kit/components/data-display/stepper/stepper.examples.d.ts +2 -0
- package/dist/kit/components/data-display/stepper/stepper.examples.js +28 -0
- package/dist/kit/components/data-display/table/table.examples.d.ts +4 -0
- package/dist/kit/components/data-display/table/table.examples.js +78 -0
- package/dist/kit/components/decorative/aurora-background/aurora-background.examples.d.ts +2 -0
- package/dist/kit/components/decorative/aurora-background/aurora-background.examples.js +22 -0
- package/dist/kit/components/decorative/grid-background/grid-background.examples.d.ts +4 -0
- package/dist/kit/components/decorative/grid-background/grid-background.examples.js +42 -0
- package/dist/kit/components/decorative/shimmering-text/shimmering-text.examples.d.ts +4 -0
- package/dist/kit/components/decorative/shimmering-text/shimmering-text.examples.js +54 -0
- package/dist/kit/components/decorative/text-reveal/text-reveal.examples.d.ts +2 -0
- package/dist/kit/components/decorative/text-reveal/text-reveal.examples.js +46 -0
- package/dist/kit/components/feedback/alert/alert.examples.d.ts +2 -0
- package/dist/kit/components/feedback/alert/alert.examples.js +37 -0
- package/dist/kit/components/feedback/alert-dialog/alert-dialog.examples.d.ts +2 -0
- package/dist/kit/components/feedback/alert-dialog/alert-dialog.examples.js +28 -0
- package/dist/kit/components/feedback/context-menu/context-menu.examples.d.ts +2 -0
- package/dist/kit/components/feedback/context-menu/context-menu.examples.js +33 -0
- package/dist/kit/components/feedback/dialog/dialog.examples.d.ts +2 -0
- package/dist/kit/components/feedback/dialog/dialog.examples.js +51 -0
- package/dist/kit/components/feedback/drawer/drawer.examples.d.ts +2 -0
- package/dist/kit/components/feedback/drawer/drawer.examples.js +29 -0
- package/dist/kit/components/feedback/dropdown-menu/dropdown-menu.examples.d.ts +3 -0
- package/dist/kit/components/feedback/dropdown-menu/dropdown-menu.examples.js +54 -0
- package/dist/kit/components/feedback/hover-card/hover-card.examples.d.ts +2 -0
- package/dist/kit/components/feedback/hover-card/hover-card.examples.js +27 -0
- package/dist/kit/components/feedback/popover/popover.examples.d.ts +2 -0
- package/dist/kit/components/feedback/popover/popover.examples.js +42 -0
- package/dist/kit/components/feedback/sheet/sheet.examples.d.ts +2 -0
- package/dist/kit/components/feedback/sheet/sheet.examples.js +39 -0
- package/dist/kit/components/feedback/sonner/sonner.examples.d.ts +3 -0
- package/dist/kit/components/feedback/sonner/sonner.examples.js +49 -0
- package/dist/kit/components/feedback/title-help/title-help.examples.d.ts +1 -0
- package/dist/kit/components/feedback/title-help/title-help.examples.js +25 -0
- package/dist/kit/components/feedback/tooltip/tooltip.examples.d.ts +3 -0
- package/dist/kit/components/feedback/tooltip/tooltip.examples.js +44 -0
- package/dist/kit/components/form/button/button.examples.d.ts +13 -0
- package/dist/kit/components/form/button/button.examples.js +84 -0
- package/dist/kit/components/form/calendar/calendar.examples.d.ts +2 -0
- package/dist/kit/components/form/calendar/calendar.examples.js +23 -0
- package/dist/kit/components/form/checkbox/checkbox.examples.d.ts +4 -0
- package/dist/kit/components/form/checkbox/checkbox.examples.js +72 -0
- package/dist/kit/components/form/command/command.examples.d.ts +3 -0
- package/dist/kit/components/form/command/command.examples.js +52 -0
- package/dist/kit/components/form/datefield/datefield.examples.d.ts +2 -0
- package/dist/kit/components/form/datefield/datefield.examples.js +19 -0
- package/dist/kit/components/form/file-upload/file-upload.examples.d.ts +1 -0
- package/dist/kit/components/form/file-upload/file-upload.examples.js +18 -0
- package/dist/kit/components/form/form/form.examples.d.ts +2 -0
- package/dist/kit/components/form/form/form.examples.js +77 -0
- package/dist/kit/components/form/input/input.examples.d.ts +5 -0
- package/dist/kit/components/form/input/input.examples.js +64 -0
- package/dist/kit/components/form/label/label.examples.d.ts +4 -0
- package/dist/kit/components/form/label/label.examples.js +49 -0
- package/dist/kit/components/form/radio-group/radio-group.examples.d.ts +3 -0
- package/dist/kit/components/form/radio-group/radio-group.examples.js +40 -0
- package/dist/kit/components/form/select/select.examples.d.ts +3 -0
- package/dist/kit/components/form/select/select.examples.js +58 -0
- package/dist/kit/components/form/slider/slider.examples.d.ts +3 -0
- package/dist/kit/components/form/slider/slider.examples.js +46 -0
- package/dist/kit/components/form/switch/switch.examples.d.ts +3 -0
- package/dist/kit/components/form/switch/switch.examples.js +37 -0
- package/dist/kit/components/form/textarea/textarea.examples.d.ts +3 -0
- package/dist/kit/components/form/textarea/textarea.examples.js +49 -0
- package/dist/kit/components/form/toggle/toggle.examples.d.ts +3 -0
- package/dist/kit/components/form/toggle/toggle.examples.js +33 -0
- package/dist/kit/components/form/toggle-group/toggle-group.examples.d.ts +4 -0
- package/dist/kit/components/form/toggle-group/toggle-group.examples.js +46 -0
- package/dist/kit/components/index.d.ts +91 -0
- package/dist/kit/components/layout/accordion/accordion.examples.d.ts +2 -0
- package/dist/kit/components/layout/accordion/accordion.examples.js +34 -0
- package/dist/kit/components/layout/aspect-ratio/aspect-ratio.examples.d.ts +3 -0
- package/dist/kit/components/layout/aspect-ratio/aspect-ratio.examples.js +29 -0
- package/dist/kit/components/layout/collapsible/collapsible.examples.d.ts +2 -0
- package/dist/kit/components/layout/collapsible/collapsible.examples.js +28 -0
- package/dist/kit/components/layout/resizable/resizable.examples.d.ts +2 -0
- package/dist/kit/components/layout/resizable/resizable.examples.js +26 -0
- package/dist/kit/components/layout/scroll-area/scroll-area.examples.d.ts +2 -0
- package/dist/kit/components/layout/scroll-area/scroll-area.examples.js +16 -0
- package/dist/kit/components/layout/separator/separator.examples.d.ts +3 -0
- package/dist/kit/components/layout/separator/separator.examples.js +35 -0
- package/dist/kit/components/navigation/accordion-menu/accordion-menu.examples.d.ts +2 -0
- package/dist/kit/components/navigation/accordion-menu/accordion-menu.examples.js +36 -0
- package/dist/kit/components/navigation/breadcrumb/breadcrumb.examples.d.ts +3 -0
- package/dist/kit/components/navigation/breadcrumb/breadcrumb.examples.js +39 -0
- package/dist/kit/components/navigation/menubar/menubar.examples.d.ts +2 -0
- package/dist/kit/components/navigation/menubar/menubar.examples.js +54 -0
- package/dist/kit/components/navigation/navigation-menu/navigation-menu.examples.d.ts +2 -0
- package/dist/kit/components/navigation/navigation-menu/navigation-menu.examples.js +31 -0
- package/dist/kit/components/navigation/pagination/pagination.examples.d.ts +2 -0
- package/dist/kit/components/navigation/pagination/pagination.examples.js +42 -0
- package/dist/kit/components/navigation/scrollspy/scrollspy.examples.d.ts +2 -0
- package/dist/kit/components/navigation/scrollspy/scrollspy.examples.js +68 -0
- package/dist/kit/components/navigation/tabs/tabs.examples.d.ts +5 -0
- package/dist/kit/components/navigation/tabs/tabs.examples.js +43 -0
- package/dist/styles.css +29 -12
- package/package.json +7 -2
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as t, jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
import { Timeline as i } from "./timeline.js";
|
|
3
|
+
const r = [
|
|
4
|
+
{
|
|
5
|
+
id: 1,
|
|
6
|
+
title: "阶段名称",
|
|
7
|
+
time: "09/15 09:00",
|
|
8
|
+
actor: "范米花儿",
|
|
9
|
+
status: "current",
|
|
10
|
+
tag: "标签",
|
|
11
|
+
description: "阶段注释内容"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
id: 2,
|
|
15
|
+
title: "阶段名称",
|
|
16
|
+
time: "09/15 09:00",
|
|
17
|
+
actor: "范米花儿",
|
|
18
|
+
status: "current",
|
|
19
|
+
tag: "标签",
|
|
20
|
+
description: /* @__PURE__ */ e("div", { children: [
|
|
21
|
+
/* @__PURE__ */ t("p", { children: "注释标题:注释内容" }),
|
|
22
|
+
/* @__PURE__ */ t("p", { children: "负责人:范米花儿" }),
|
|
23
|
+
/* @__PURE__ */ t("p", { children: "注释标题:2024/09/31 00:00:00" }),
|
|
24
|
+
/* @__PURE__ */ t("p", { children: "注释标题:2025/02/31 00:00:00" })
|
|
25
|
+
] }),
|
|
26
|
+
actions: /* @__PURE__ */ t("button", { type: "button", children: "详情" })
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: 3,
|
|
30
|
+
title: "阶段名称",
|
|
31
|
+
time: "09/15 09:00",
|
|
32
|
+
actor: "范米花儿",
|
|
33
|
+
status: "current",
|
|
34
|
+
tag: "标签",
|
|
35
|
+
description: "阶段注释内容"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 4,
|
|
39
|
+
title: "编阶段名称",
|
|
40
|
+
time: "09/15 09:00",
|
|
41
|
+
actor: "范米花儿",
|
|
42
|
+
status: "current",
|
|
43
|
+
tag: "标签",
|
|
44
|
+
description: "阶段注释内容"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 5,
|
|
48
|
+
title: "阶段名称",
|
|
49
|
+
time: "09/15 09:00",
|
|
50
|
+
actor: "范米花儿",
|
|
51
|
+
status: "current",
|
|
52
|
+
tag: "标签",
|
|
53
|
+
description: "阶段注释内容"
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
function s() {
|
|
57
|
+
return /* @__PURE__ */ t(
|
|
58
|
+
i,
|
|
59
|
+
{
|
|
60
|
+
tabs: [
|
|
61
|
+
{ value: "records", label: "标签名" },
|
|
62
|
+
{ value: "stages", label: "标签名" }
|
|
63
|
+
],
|
|
64
|
+
defaultActiveTab: "stages",
|
|
65
|
+
items: r
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
function n() {
|
|
70
|
+
return /* @__PURE__ */ t("div", { className: "w-full", children: /* @__PURE__ */ t(s, {}) });
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
s as TimelineBasic,
|
|
74
|
+
n as TimelineShowcase
|
|
75
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { TodoCard as s } from "./todo-card.js";
|
|
3
|
+
const o = [
|
|
4
|
+
{
|
|
5
|
+
id: 1,
|
|
6
|
+
title: "李四发起的“项目审批”",
|
|
7
|
+
time: "刚刚",
|
|
8
|
+
status: "审批中",
|
|
9
|
+
statusTone: "warning"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: 2,
|
|
13
|
+
title: "张三发起的“产品调价申请”",
|
|
14
|
+
time: "1 小时前",
|
|
15
|
+
status: "已通过",
|
|
16
|
+
statusTone: "success"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: 3,
|
|
20
|
+
title: "王武发起的“公文审批”",
|
|
21
|
+
time: "刚刚",
|
|
22
|
+
status: "已撤回",
|
|
23
|
+
statusTone: "muted"
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
function e() {
|
|
27
|
+
return /* @__PURE__ */ t(
|
|
28
|
+
s,
|
|
29
|
+
{
|
|
30
|
+
className: "w-[340px] max-w-full",
|
|
31
|
+
activeTab: "cc",
|
|
32
|
+
items: o
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function r() {
|
|
37
|
+
return /* @__PURE__ */ t(e, {});
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
e as TodoCardBasic,
|
|
41
|
+
r as TodoCardShowcase
|
|
42
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** 基础:图片 + 回退首字母 */
|
|
2
|
+
export declare function AvatarBasic(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
/** 尺寸梯度 */
|
|
4
|
+
export declare function AvatarSizes(): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
/** 带状态指示器(在线 / 离线 / 忙碌 / 离开) */
|
|
6
|
+
export declare function AvatarWithStatus(): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function AvatarShowcase(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar as s, AvatarImage as i, AvatarFallback as c, AvatarIndicator as l, AvatarStatus as r } from "./avatar.js";
|
|
3
|
+
function n() {
|
|
4
|
+
return /* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
|
|
5
|
+
/* @__PURE__ */ a(s, { children: [
|
|
6
|
+
/* @__PURE__ */ e(i, { src: "/avatar.png", alt: "User" }),
|
|
7
|
+
/* @__PURE__ */ e(c, { children: "张" })
|
|
8
|
+
] }),
|
|
9
|
+
/* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(c, { children: "李" }) }),
|
|
10
|
+
/* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(c, { className: "bg-primary/10 text-primary", children: "JD" }) })
|
|
11
|
+
] });
|
|
12
|
+
}
|
|
13
|
+
function m() {
|
|
14
|
+
return /* @__PURE__ */ a("div", { className: "flex items-end gap-3", children: [
|
|
15
|
+
/* @__PURE__ */ e(s, { className: "size-6", children: /* @__PURE__ */ e(c, { className: "text-[10px] bg-muted", children: "S" }) }),
|
|
16
|
+
/* @__PURE__ */ e(s, { className: "size-8", children: /* @__PURE__ */ e(c, { className: "text-xs bg-muted", children: "M" }) }),
|
|
17
|
+
/* @__PURE__ */ e(s, { className: "size-10", children: /* @__PURE__ */ e(c, { className: "bg-muted", children: "L" }) }),
|
|
18
|
+
/* @__PURE__ */ e(s, { className: "size-14", children: /* @__PURE__ */ e(c, { className: "text-base bg-muted", children: "XL" }) })
|
|
19
|
+
] });
|
|
20
|
+
}
|
|
21
|
+
function d() {
|
|
22
|
+
return /* @__PURE__ */ e("div", { className: "flex items-center gap-4", children: ["online", "offline", "busy", "away"].map((t) => /* @__PURE__ */ a(s, { className: "size-10", children: [
|
|
23
|
+
/* @__PURE__ */ e(c, { className: "bg-muted", children: "用户" }),
|
|
24
|
+
/* @__PURE__ */ e(l, { className: "-end-1 -bottom-1", children: /* @__PURE__ */ e(r, { variant: t }) })
|
|
25
|
+
] }, t)) });
|
|
26
|
+
}
|
|
27
|
+
function N() {
|
|
28
|
+
return /* @__PURE__ */ a("div", { className: "flex flex-col gap-8", children: [
|
|
29
|
+
/* @__PURE__ */ a("section", { children: [
|
|
30
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "基础形态" }),
|
|
31
|
+
/* @__PURE__ */ e(n, {})
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ a("section", { children: [
|
|
34
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "尺寸梯度" }),
|
|
35
|
+
/* @__PURE__ */ e(m, {})
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ a("section", { children: [
|
|
38
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "状态指示器" }),
|
|
39
|
+
/* @__PURE__ */ e(d, {})
|
|
40
|
+
] })
|
|
41
|
+
] });
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
n as AvatarBasic,
|
|
45
|
+
N as AvatarShowcase,
|
|
46
|
+
m as AvatarSizes,
|
|
47
|
+
d as AvatarWithStatus
|
|
48
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { AvatarGroup as r } from "./avatar-group.js";
|
|
3
|
+
import { Avatar as s, AvatarFallback as a } from "../avatar/avatar.js";
|
|
4
|
+
function l() {
|
|
5
|
+
return /* @__PURE__ */ c(r, { children: [
|
|
6
|
+
/* @__PURE__ */ e(s, { className: "size-8", children: /* @__PURE__ */ e(a, { className: "bg-primary/10 text-primary", children: "张" }) }),
|
|
7
|
+
/* @__PURE__ */ e(s, { className: "size-8", children: /* @__PURE__ */ e(a, { className: "bg-success/10 text-success", children: "李" }) }),
|
|
8
|
+
/* @__PURE__ */ e(s, { className: "size-8", children: /* @__PURE__ */ e(a, { className: "bg-warning/10 text-warning", children: "王" }) }),
|
|
9
|
+
/* @__PURE__ */ e(s, { className: "size-8", children: /* @__PURE__ */ e(a, { className: "bg-muted text-muted-foreground", children: "+5" }) })
|
|
10
|
+
] });
|
|
11
|
+
}
|
|
12
|
+
function i() {
|
|
13
|
+
return /* @__PURE__ */ c(r, { children: [
|
|
14
|
+
/* @__PURE__ */ e(s, { className: "size-6", children: /* @__PURE__ */ e(a, { className: "text-[10px] bg-muted", children: "张" }) }),
|
|
15
|
+
/* @__PURE__ */ e(s, { className: "size-6", children: /* @__PURE__ */ e(a, { className: "text-[10px] bg-muted", children: "李" }) }),
|
|
16
|
+
/* @__PURE__ */ e(s, { className: "size-6", children: /* @__PURE__ */ e(a, { className: "text-[10px] bg-muted", children: "+3" }) })
|
|
17
|
+
] });
|
|
18
|
+
}
|
|
19
|
+
function d() {
|
|
20
|
+
return /* @__PURE__ */ c("div", { className: "flex flex-col gap-6", children: [
|
|
21
|
+
/* @__PURE__ */ c("section", { children: [
|
|
22
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "默认" }),
|
|
23
|
+
/* @__PURE__ */ e(l, {})
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ c("section", { children: [
|
|
26
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "紧凑(表格行内)" }),
|
|
27
|
+
/* @__PURE__ */ e(i, {})
|
|
28
|
+
] })
|
|
29
|
+
] });
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
l as AvatarGroupBasic,
|
|
33
|
+
i as AvatarGroupCompact,
|
|
34
|
+
d as AvatarGroupShowcase
|
|
35
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Variant x Appearance matrix */
|
|
2
|
+
export declare function BadgeVariantMatrix(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
/** Size scale */
|
|
4
|
+
export declare function BadgeSizes(): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
/** 优先级示例 */
|
|
6
|
+
export declare function BadgePriority(): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
/** 任务类型示例 */
|
|
8
|
+
export declare function BadgeTaskType(): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function BadgeShowcase(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Badge as a } from "./badge.js";
|
|
3
|
+
const t = ["primary", "secondary", "success", "warning", "destructive", "info", "outline"], c = ["default", "light", "outline", "ghost"], l = ["xs", "sm", "md", "lg"];
|
|
4
|
+
function s() {
|
|
5
|
+
return /* @__PURE__ */ e("div", { className: "space-y-3", children: c.map((n) => /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
6
|
+
/* @__PURE__ */ e("div", { className: "w-20 text-xs text-muted-foreground", children: n }),
|
|
7
|
+
t.map((r) => /* @__PURE__ */ e(a, { variant: r, appearance: n, size: "sm", children: r }, r))
|
|
8
|
+
] }, n)) });
|
|
9
|
+
}
|
|
10
|
+
function d() {
|
|
11
|
+
return /* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: l.map((n) => /* @__PURE__ */ e(a, { variant: "primary", appearance: "light", size: n, children: n }, n)) });
|
|
12
|
+
}
|
|
13
|
+
function h() {
|
|
14
|
+
return /* @__PURE__ */ i("div", { className: "flex gap-2", children: [
|
|
15
|
+
/* @__PURE__ */ e(a, { variant: "destructive", appearance: "light", children: "Critical" }),
|
|
16
|
+
/* @__PURE__ */ e(a, { variant: "warning", appearance: "light", children: "High" }),
|
|
17
|
+
/* @__PURE__ */ e(a, { variant: "info", appearance: "light", children: "Medium" }),
|
|
18
|
+
/* @__PURE__ */ e(a, { variant: "primary", appearance: "light", children: "Low" }),
|
|
19
|
+
/* @__PURE__ */ e(a, { variant: "secondary", appearance: "light", children: "None" })
|
|
20
|
+
] });
|
|
21
|
+
}
|
|
22
|
+
function m() {
|
|
23
|
+
return /* @__PURE__ */ i("div", { className: "flex gap-2", children: [
|
|
24
|
+
/* @__PURE__ */ e(a, { variant: "primary", appearance: "light", children: "Feature" }),
|
|
25
|
+
/* @__PURE__ */ e(a, { variant: "success", appearance: "light", children: "Release" }),
|
|
26
|
+
/* @__PURE__ */ e(a, { variant: "warning", appearance: "light", children: "Bug" }),
|
|
27
|
+
/* @__PURE__ */ e(a, { variant: "info", appearance: "light", children: "Chore" }),
|
|
28
|
+
/* @__PURE__ */ e(a, { variant: "destructive", appearance: "light", children: "Overdue" })
|
|
29
|
+
] });
|
|
30
|
+
}
|
|
31
|
+
function g() {
|
|
32
|
+
return /* @__PURE__ */ i("div", { className: "flex flex-col gap-8", children: [
|
|
33
|
+
/* @__PURE__ */ i("section", { children: [
|
|
34
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "Variant × Appearance" }),
|
|
35
|
+
/* @__PURE__ */ e(s, {})
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ i("section", { children: [
|
|
38
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "Sizes" }),
|
|
39
|
+
/* @__PURE__ */ e(d, {})
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ i("section", { children: [
|
|
42
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "优先级(示例映射)" }),
|
|
43
|
+
/* @__PURE__ */ e(h, {})
|
|
44
|
+
] }),
|
|
45
|
+
/* @__PURE__ */ i("section", { children: [
|
|
46
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "任务类型(示例映射)" }),
|
|
47
|
+
/* @__PURE__ */ e(m, {})
|
|
48
|
+
] })
|
|
49
|
+
] });
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
h as BadgePriority,
|
|
53
|
+
g as BadgeShowcase,
|
|
54
|
+
d as BadgeSizes,
|
|
55
|
+
m as BadgeTaskType,
|
|
56
|
+
s as BadgeVariantMatrix
|
|
57
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live examples for Card — wire these into a showcase route.
|
|
3
|
+
* Each exported function demonstrates a distinct usage pattern.
|
|
4
|
+
*/
|
|
5
|
+
/** 1. Minimal — title + content */
|
|
6
|
+
export declare function CardMinimal(): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
/** 2. With toolbar — link + action */
|
|
8
|
+
export declare function CardWithToolbar(): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
/** 3. KPI card — no header, big number */
|
|
10
|
+
export declare function CardKpi(): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
/** 4. With footer */
|
|
12
|
+
export declare function CardWithFooter(): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
/** 5. Accent — double-layer */
|
|
14
|
+
export declare function CardAccent(): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
/** Showcase composite — render all above */
|
|
16
|
+
export declare function CardShowcase(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { Link as d } from "react-router-dom";
|
|
3
|
+
import { Card as a, CardContent as t, CardHeader as n, CardTitle as c, CardDescription as l, CardFooter as s, CardToolbar as m } from "./card.js";
|
|
4
|
+
import { Badge as o } from "../badge/badge.js";
|
|
5
|
+
import { Button as i } from "../../form/button/button.js";
|
|
6
|
+
function h() {
|
|
7
|
+
return /* @__PURE__ */ r(a, { className: "card-surface w-80", children: [
|
|
8
|
+
/* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(c, { children: "基础卡片" }) }),
|
|
9
|
+
/* @__PURE__ */ e(t, { children: /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "最常见形态:标题 + 内容。" }) })
|
|
10
|
+
] });
|
|
11
|
+
}
|
|
12
|
+
function u() {
|
|
13
|
+
return /* @__PURE__ */ r(a, { className: "card-surface w-96", children: [
|
|
14
|
+
/* @__PURE__ */ r(n, { children: [
|
|
15
|
+
/* @__PURE__ */ e(c, { children: "流程中心" }),
|
|
16
|
+
/* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(
|
|
17
|
+
d,
|
|
18
|
+
{
|
|
19
|
+
to: "#",
|
|
20
|
+
className: "text-sm text-muted-foreground hover:text-primary",
|
|
21
|
+
children: "查看全部 →"
|
|
22
|
+
}
|
|
23
|
+
) })
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ e(t, { children: /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "右上角放次级动作(链接或按钮)。" }) })
|
|
26
|
+
] });
|
|
27
|
+
}
|
|
28
|
+
function f() {
|
|
29
|
+
return /* @__PURE__ */ e(a, { className: "card-surface w-72", children: /* @__PURE__ */ r(t, { className: "p-5", children: [
|
|
30
|
+
/* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: "待我审批" }),
|
|
31
|
+
/* @__PURE__ */ r("div", { className: "mt-1 flex items-baseline gap-2", children: [
|
|
32
|
+
/* @__PURE__ */ e("span", { className: "text-3xl font-semibold", children: "7" }),
|
|
33
|
+
/* @__PURE__ */ e(o, { variant: "destructive", appearance: "light", size: "sm", children: "超时 2 项" })
|
|
34
|
+
] })
|
|
35
|
+
] }) });
|
|
36
|
+
}
|
|
37
|
+
function p() {
|
|
38
|
+
return /* @__PURE__ */ r(a, { className: "card-surface w-96", children: [
|
|
39
|
+
/* @__PURE__ */ r(n, { children: [
|
|
40
|
+
/* @__PURE__ */ e(c, { children: "确认变更" }),
|
|
41
|
+
/* @__PURE__ */ e(l, { children: "此操作将同步所有订阅方" })
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ e(t, { children: "内容占位" }),
|
|
44
|
+
/* @__PURE__ */ r(s, { className: "justify-end gap-2", children: [
|
|
45
|
+
/* @__PURE__ */ e(i, { variant: "outline", size: "sm", children: "取消" }),
|
|
46
|
+
/* @__PURE__ */ e(i, { size: "sm", children: "确认" })
|
|
47
|
+
] })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
function x() {
|
|
51
|
+
return /* @__PURE__ */ e(a, { variant: "accent", className: "w-96", children: /* @__PURE__ */ r(t, { children: [
|
|
52
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-medium", children: "内嵌卡片(accent 变体)" }),
|
|
53
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground mt-1", children: "外层带浅灰底,里层仍是白卡,用于在列表中突出子卡。" })
|
|
54
|
+
] }) });
|
|
55
|
+
}
|
|
56
|
+
function b() {
|
|
57
|
+
return /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-5", children: [
|
|
58
|
+
/* @__PURE__ */ e(h, {}),
|
|
59
|
+
/* @__PURE__ */ e(u, {}),
|
|
60
|
+
/* @__PURE__ */ e(f, {}),
|
|
61
|
+
/* @__PURE__ */ e(p, {}),
|
|
62
|
+
/* @__PURE__ */ e(x, {})
|
|
63
|
+
] });
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
x as CardAccent,
|
|
67
|
+
f as CardKpi,
|
|
68
|
+
h as CardMinimal,
|
|
69
|
+
b as CardShowcase,
|
|
70
|
+
p as CardWithFooter,
|
|
71
|
+
u as CardWithToolbar
|
|
72
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as g, useMemo as m } from "react";
|
|
3
|
+
import { useReactTable as p, getPaginationRowModel as h, getSortedRowModel as w, getCoreRowModel as R, createColumnHelper as f } from "@tanstack/react-table";
|
|
4
|
+
import { Badge as s } from "../badge/badge.js";
|
|
5
|
+
import { DataGrid as x } from "./data-grid.js";
|
|
6
|
+
import { DataGridTable as v } from "./data-grid-table.js";
|
|
7
|
+
import { Button as d } from "../../form/button/button.js";
|
|
8
|
+
const P = {
|
|
9
|
+
critical: "Critical",
|
|
10
|
+
high: "High",
|
|
11
|
+
medium: "Medium",
|
|
12
|
+
low: "Low",
|
|
13
|
+
none: "None"
|
|
14
|
+
}, b = {
|
|
15
|
+
critical: "destructive",
|
|
16
|
+
high: "warning",
|
|
17
|
+
medium: "info",
|
|
18
|
+
low: "primary",
|
|
19
|
+
none: "secondary"
|
|
20
|
+
}, i = [
|
|
21
|
+
{ id: "PRJ-01", project: "Acme Dashboard", priority: "high", status: "In Progress", owner: "Alice Chen", updated: "2026-04-18" },
|
|
22
|
+
{ id: "PRJ-02", project: "Mobile App Redesign", priority: "medium", status: "In Progress", owner: "Bob Miller", updated: "2026-04-17" },
|
|
23
|
+
{ id: "PRJ-03", project: "API Gateway v2", priority: "critical", status: "Released", owner: "Carol Johnson", updated: "2026-04-10" },
|
|
24
|
+
{ id: "PRJ-04", project: "Marketing Site", priority: "low", status: "In Review", owner: "Dave Smith", updated: "2026-04-15" },
|
|
25
|
+
{ id: "PRJ-05", project: "Internal Admin", priority: "none", status: "In Progress", owner: "Eve Brown", updated: "2026-04-12" },
|
|
26
|
+
{ id: "PRJ-06", project: "Billing Service", priority: "high", status: "In Progress", owner: "Frank Lee", updated: "2026-04-08" }
|
|
27
|
+
], t = f();
|
|
28
|
+
function I() {
|
|
29
|
+
const [l, c] = g([]), u = m(
|
|
30
|
+
() => [
|
|
31
|
+
t.accessor("id", { header: "编号", cell: (e) => /* @__PURE__ */ r("span", { className: "font-mono text-[12.5px]", children: e.getValue() }) }),
|
|
32
|
+
t.accessor("project", { header: "项目", cell: (e) => /* @__PURE__ */ r("span", { className: "font-medium text-foreground", children: e.getValue() }) }),
|
|
33
|
+
t.accessor("priority", {
|
|
34
|
+
header: "优先级",
|
|
35
|
+
cell: (e) => {
|
|
36
|
+
const n = e.getValue();
|
|
37
|
+
return /* @__PURE__ */ r(s, { variant: b[n], appearance: "light", size: "sm", children: P[n] });
|
|
38
|
+
}
|
|
39
|
+
}),
|
|
40
|
+
t.accessor("status", {
|
|
41
|
+
header: "状态",
|
|
42
|
+
cell: (e) => /* @__PURE__ */ r(
|
|
43
|
+
s,
|
|
44
|
+
{
|
|
45
|
+
variant: e.getValue() === "Released" ? "success" : e.getValue() === "In Review" ? "warning" : "primary",
|
|
46
|
+
appearance: "light",
|
|
47
|
+
size: "sm",
|
|
48
|
+
children: e.getValue()
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}),
|
|
52
|
+
t.accessor("owner", { header: "负责人" }),
|
|
53
|
+
t.accessor("updated", {
|
|
54
|
+
header: "更新时间",
|
|
55
|
+
cell: (e) => /* @__PURE__ */ r("span", { className: "font-mono text-xs text-muted-foreground", children: e.getValue() })
|
|
56
|
+
})
|
|
57
|
+
],
|
|
58
|
+
[]
|
|
59
|
+
), o = p({
|
|
60
|
+
data: i,
|
|
61
|
+
columns: u,
|
|
62
|
+
state: { sorting: l },
|
|
63
|
+
onSortingChange: c,
|
|
64
|
+
getCoreRowModel: R(),
|
|
65
|
+
getSortedRowModel: w(),
|
|
66
|
+
getPaginationRowModel: h()
|
|
67
|
+
});
|
|
68
|
+
return /* @__PURE__ */ a(x, { table: o, recordCount: i.length, children: [
|
|
69
|
+
/* @__PURE__ */ r(v, {}),
|
|
70
|
+
/* @__PURE__ */ a("div", { className: "flex items-center justify-between p-3 border-t border-border text-xs text-muted-foreground", children: [
|
|
71
|
+
/* @__PURE__ */ a("span", { children: [
|
|
72
|
+
"共 ",
|
|
73
|
+
i.length,
|
|
74
|
+
" 条 · 点击表头可排序"
|
|
75
|
+
] }),
|
|
76
|
+
/* @__PURE__ */ a("div", { className: "flex gap-1", children: [
|
|
77
|
+
/* @__PURE__ */ r(d, { size: "sm", variant: "outline", onClick: () => o.previousPage(), disabled: !o.getCanPreviousPage(), children: "上一页" }),
|
|
78
|
+
/* @__PURE__ */ r(d, { size: "sm", variant: "outline", onClick: () => o.nextPage(), disabled: !o.getCanNextPage(), children: "下一页" })
|
|
79
|
+
] })
|
|
80
|
+
] })
|
|
81
|
+
] });
|
|
82
|
+
}
|
|
83
|
+
function T() {
|
|
84
|
+
return /* @__PURE__ */ a("div", { className: "flex flex-col gap-4", children: [
|
|
85
|
+
/* @__PURE__ */ r("div", { className: "text-sm text-muted-foreground", children: "基于 TanStack Table · 点击列头排序 · 内置分页逻辑。" }),
|
|
86
|
+
/* @__PURE__ */ r("div", { className: "rounded-xl border border-border overflow-hidden bg-card", children: /* @__PURE__ */ r(I, {}) })
|
|
87
|
+
] });
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
I as DataGridBasic,
|
|
91
|
+
T as DataGridShowcase
|
|
92
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Kbd as s } from "./kbd.js";
|
|
3
|
+
function l() {
|
|
4
|
+
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
5
|
+
/* @__PURE__ */ e("span", { children: "按" }),
|
|
6
|
+
/* @__PURE__ */ e(s, { children: "Cmd" }),
|
|
7
|
+
/* @__PURE__ */ e("span", { children: "+" }),
|
|
8
|
+
/* @__PURE__ */ e(s, { children: "K" }),
|
|
9
|
+
/* @__PURE__ */ e("span", { children: "打开搜索" })
|
|
10
|
+
] });
|
|
11
|
+
}
|
|
12
|
+
function i() {
|
|
13
|
+
return /* @__PURE__ */ e("table", { className: "text-sm", children: /* @__PURE__ */ e("tbody", { children: [
|
|
14
|
+
["打开命令面板", ["⌘", "K"]],
|
|
15
|
+
["新建文件", ["⌘", "N"]],
|
|
16
|
+
["关闭窗口", ["⌘", "W"]],
|
|
17
|
+
["搜索", ["⌘", "/"]],
|
|
18
|
+
["取消", ["Esc"]]
|
|
19
|
+
].map(([c, d]) => /* @__PURE__ */ n("tr", { children: [
|
|
20
|
+
/* @__PURE__ */ e("td", { className: "py-1.5 pr-8 text-muted-foreground", children: c }),
|
|
21
|
+
/* @__PURE__ */ e("td", { className: "py-1.5 space-x-1", children: d.map((t, r) => /* @__PURE__ */ n("span", { children: [
|
|
22
|
+
r > 0 && /* @__PURE__ */ e("span", { className: "mx-1 text-muted-foreground", children: "+" }),
|
|
23
|
+
/* @__PURE__ */ e(s, { children: t })
|
|
24
|
+
] }, r)) })
|
|
25
|
+
] }, c)) }) });
|
|
26
|
+
}
|
|
27
|
+
function h() {
|
|
28
|
+
return /* @__PURE__ */ n("div", { className: "flex flex-col gap-6", children: [
|
|
29
|
+
/* @__PURE__ */ n("section", { children: [
|
|
30
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "行内使用" }),
|
|
31
|
+
/* @__PURE__ */ e(l, {})
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ n("section", { children: [
|
|
34
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "快捷键表" }),
|
|
35
|
+
/* @__PURE__ */ e(i, {})
|
|
36
|
+
] })
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
l as KbdBasic,
|
|
41
|
+
h as KbdShowcase,
|
|
42
|
+
i as KbdTable
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function MoneyAmountShowcase(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as l, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { MoneyAmount as r } from "./money-amount.js";
|
|
3
|
+
const o = [
|
|
4
|
+
{ label: "小额费用", value: 1280 },
|
|
5
|
+
{ label: "项目预算", value: 128e3 },
|
|
6
|
+
{ label: "年度收入", value: 86e6 },
|
|
7
|
+
{ label: "固定万元", value: 128e3, unit: "wan" },
|
|
8
|
+
{ label: "无效值", value: null }
|
|
9
|
+
];
|
|
10
|
+
function u() {
|
|
11
|
+
return /* @__PURE__ */ l("div", { className: "grid max-w-2xl gap-3 sm:grid-cols-2", children: o.map((e) => /* @__PURE__ */ a("div", { className: "rounded-lg border border-border bg-card p-4", children: [
|
|
12
|
+
/* @__PURE__ */ l("div", { className: "text-xs text-muted-foreground", children: e.label }),
|
|
13
|
+
/* @__PURE__ */ l(
|
|
14
|
+
r,
|
|
15
|
+
{
|
|
16
|
+
value: e.value,
|
|
17
|
+
unit: e.unit,
|
|
18
|
+
precision: 1,
|
|
19
|
+
className: "mt-2 text-2xl font-semibold"
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
] }, e.label)) });
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
u as MoneyAmountShowcase
|
|
26
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Progress as n } from "./progress.js";
|
|
3
|
+
function r() {
|
|
4
|
+
return /* @__PURE__ */ s("div", { className: "w-80 space-y-3", children: [
|
|
5
|
+
/* @__PURE__ */ s("div", { children: [
|
|
6
|
+
/* @__PURE__ */ s("div", { className: "flex justify-between text-xs mb-1.5", children: [
|
|
7
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "上传进度" }),
|
|
8
|
+
/* @__PURE__ */ e("span", { className: "font-mono text-foreground", children: "60%" })
|
|
9
|
+
] }),
|
|
10
|
+
/* @__PURE__ */ e(n, { value: 60 })
|
|
11
|
+
] }),
|
|
12
|
+
/* @__PURE__ */ s("div", { children: [
|
|
13
|
+
/* @__PURE__ */ s("div", { className: "flex justify-between text-xs mb-1.5", children: [
|
|
14
|
+
/* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "本周工时" }),
|
|
15
|
+
/* @__PURE__ */ e("span", { className: "font-mono text-foreground", children: "42.5 / 45 h" })
|
|
16
|
+
] }),
|
|
17
|
+
/* @__PURE__ */ e(n, { value: 42.5 / 45 * 100 })
|
|
18
|
+
] })
|
|
19
|
+
] });
|
|
20
|
+
}
|
|
21
|
+
function l() {
|
|
22
|
+
return /* @__PURE__ */ s("div", { className: "w-80 space-y-3", children: [
|
|
23
|
+
/* @__PURE__ */ e(n, { value: 15 }),
|
|
24
|
+
/* @__PURE__ */ e(n, { value: 50 }),
|
|
25
|
+
/* @__PURE__ */ e(n, { value: 85 }),
|
|
26
|
+
/* @__PURE__ */ e(n, { value: 100 })
|
|
27
|
+
] });
|
|
28
|
+
}
|
|
29
|
+
function c() {
|
|
30
|
+
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-6", children: [
|
|
31
|
+
/* @__PURE__ */ s("section", { children: [
|
|
32
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "带标签" }),
|
|
33
|
+
/* @__PURE__ */ e(r, {})
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ s("section", { children: [
|
|
36
|
+
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold mb-3", children: "不同进度" }),
|
|
37
|
+
/* @__PURE__ */ e(l, {})
|
|
38
|
+
] })
|
|
39
|
+
] });
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
r as ProgressBasic,
|
|
43
|
+
l as ProgressLevels,
|
|
44
|
+
c as ProgressShowcase
|
|
45
|
+
};
|