@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,176 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as b from "react";
|
|
3
|
+
import { cn as p } from "../../../../lib/utils.js";
|
|
4
|
+
import { Badge as N } from "../../data-display/badge/badge.js";
|
|
5
|
+
const j = {
|
|
6
|
+
done: "primary",
|
|
7
|
+
current: "primary",
|
|
8
|
+
pending: "muted",
|
|
9
|
+
error: "destructive"
|
|
10
|
+
}, z = {
|
|
11
|
+
primary: "bg-primary",
|
|
12
|
+
success: "bg-success",
|
|
13
|
+
warning: "bg-warning",
|
|
14
|
+
muted: "bg-muted-foreground",
|
|
15
|
+
destructive: "bg-destructive"
|
|
16
|
+
};
|
|
17
|
+
function P({
|
|
18
|
+
className: s,
|
|
19
|
+
density: i = "default",
|
|
20
|
+
tabs: a,
|
|
21
|
+
activeTab: t,
|
|
22
|
+
defaultActiveTab: r,
|
|
23
|
+
onTabChange: g,
|
|
24
|
+
items: d,
|
|
25
|
+
renderItem: o,
|
|
26
|
+
listClassName: c,
|
|
27
|
+
empty: m,
|
|
28
|
+
children: l,
|
|
29
|
+
...x
|
|
30
|
+
}) {
|
|
31
|
+
const [f, h] = b.useState(() => r ?? a?.[0]?.value), w = t ?? f;
|
|
32
|
+
function k(u) {
|
|
33
|
+
h(u), g?.(u);
|
|
34
|
+
}
|
|
35
|
+
return /* @__PURE__ */ n(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
"data-slot": "timeline",
|
|
39
|
+
className: p(
|
|
40
|
+
"flex w-full flex-col bg-card text-card-foreground",
|
|
41
|
+
i === "compact" ? "gap-1 p-3" : "gap-2 p-[var(--dk-card-padding)]",
|
|
42
|
+
s
|
|
43
|
+
),
|
|
44
|
+
...x,
|
|
45
|
+
children: [
|
|
46
|
+
a && a.length > 0 && /* @__PURE__ */ e(B, { tabs: a, activeTab: w, onTabChange: k }),
|
|
47
|
+
/* @__PURE__ */ n(
|
|
48
|
+
"ol",
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "timeline-list",
|
|
51
|
+
className: p(
|
|
52
|
+
"flex min-w-0 flex-col",
|
|
53
|
+
i === "compact" && "[&_[data-slot=timeline-item-content]]:pb-3",
|
|
54
|
+
c
|
|
55
|
+
),
|
|
56
|
+
children: [
|
|
57
|
+
l,
|
|
58
|
+
!l && d?.map((u, y) => {
|
|
59
|
+
const { id: v, ...T } = u;
|
|
60
|
+
return o ? /* @__PURE__ */ e(b.Fragment, { children: o(u, y) }, v) : /* @__PURE__ */ e(C, { ...T }, v);
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
!l && (!d || d.length === 0) && /* @__PURE__ */ e("div", { className: "rounded-[var(--dk-radius-control)] bg-muted p-4 text-center text-sm text-muted-foreground", children: m ?? "暂无时间线记录" })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
function B({
|
|
71
|
+
tabs: s,
|
|
72
|
+
activeTab: i,
|
|
73
|
+
onTabChange: a
|
|
74
|
+
}) {
|
|
75
|
+
return /* @__PURE__ */ e(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
role: "tablist",
|
|
79
|
+
"aria-label": "时间线分类",
|
|
80
|
+
className: "flex min-h-12 w-full items-center gap-5 overflow-x-auto border-b border-border bg-card",
|
|
81
|
+
children: s.map((t) => {
|
|
82
|
+
const r = t.value === i;
|
|
83
|
+
return /* @__PURE__ */ n(
|
|
84
|
+
"button",
|
|
85
|
+
{
|
|
86
|
+
type: "button",
|
|
87
|
+
role: "tab",
|
|
88
|
+
"aria-selected": r,
|
|
89
|
+
onClick: () => a(t.value),
|
|
90
|
+
className: p(
|
|
91
|
+
"relative flex h-12 shrink-0 items-center gap-1 text-sm leading-[22px] transition-colors",
|
|
92
|
+
r ? "font-medium text-foreground" : "font-normal text-muted-foreground hover:text-primary"
|
|
93
|
+
),
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ e("span", { children: t.label }),
|
|
96
|
+
t.count !== void 0 && /* @__PURE__ */ e(N, { variant: "primary", appearance: "light", size: "xs", shape: "circle", children: t.count }),
|
|
97
|
+
r && /* @__PURE__ */ e("span", { className: "absolute inset-x-0 bottom-0 h-0.5 bg-primary" })
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
t.value
|
|
101
|
+
);
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
function C({
|
|
107
|
+
className: s,
|
|
108
|
+
title: i,
|
|
109
|
+
time: a,
|
|
110
|
+
actor: t,
|
|
111
|
+
description: r,
|
|
112
|
+
status: g = "pending",
|
|
113
|
+
tone: d,
|
|
114
|
+
tag: o,
|
|
115
|
+
meta: c,
|
|
116
|
+
actions: m,
|
|
117
|
+
children: l,
|
|
118
|
+
...x
|
|
119
|
+
}) {
|
|
120
|
+
const f = d ?? j[g], h = !!(r || c || l || m);
|
|
121
|
+
return /* @__PURE__ */ n(
|
|
122
|
+
"li",
|
|
123
|
+
{
|
|
124
|
+
"data-slot": "timeline-item",
|
|
125
|
+
className: p("group relative flex min-w-0 gap-3 last:[&_[data-slot=timeline-line]]:hidden", s),
|
|
126
|
+
...x,
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ n("div", { className: "relative flex w-3 shrink-0 justify-center self-stretch pt-4", children: [
|
|
129
|
+
/* @__PURE__ */ e(
|
|
130
|
+
"span",
|
|
131
|
+
{
|
|
132
|
+
"data-slot": "timeline-line",
|
|
133
|
+
className: "absolute bottom-0 left-1/2 top-5 w-px -translate-x-1/2 bg-border"
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ e(
|
|
137
|
+
"span",
|
|
138
|
+
{
|
|
139
|
+
"data-slot": "timeline-marker",
|
|
140
|
+
className: p("relative z-10 mt-0.5 size-1.5 rounded-full ring-4 ring-card", z[f])
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
] }),
|
|
144
|
+
/* @__PURE__ */ n("div", { "data-slot": "timeline-item-content", className: "min-w-0 flex-1 pb-[var(--dk-card-inner-gap)] pt-2", children: [
|
|
145
|
+
(a || t) && /* @__PURE__ */ n("div", { className: "flex min-w-0 items-center justify-between gap-3 text-xs leading-5 text-muted-foreground", children: [
|
|
146
|
+
a && /* @__PURE__ */ e("time", { className: "min-w-0 truncate", children: a }),
|
|
147
|
+
t && /* @__PURE__ */ e("span", { className: "shrink-0 truncate", children: t })
|
|
148
|
+
] }),
|
|
149
|
+
/* @__PURE__ */ n("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
150
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 truncate text-sm font-medium leading-[22px] text-foreground", children: i }),
|
|
151
|
+
o && /* @__PURE__ */ e(
|
|
152
|
+
N,
|
|
153
|
+
{
|
|
154
|
+
variant: "primary",
|
|
155
|
+
appearance: "light",
|
|
156
|
+
size: "sm",
|
|
157
|
+
className: "h-5 shrink-0 rounded-[var(--dk-radius-control)] px-1.5 text-xs leading-5",
|
|
158
|
+
children: o
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
] }),
|
|
162
|
+
h && /* @__PURE__ */ n("div", { className: "mt-1 min-w-0 rounded-[var(--dk-radius-control)] bg-muted p-2 text-[13px] leading-[22px] text-muted-foreground", children: [
|
|
163
|
+
r && /* @__PURE__ */ e("div", { className: "min-w-0", children: r }),
|
|
164
|
+
c && /* @__PURE__ */ e("div", { className: "min-w-0", children: c }),
|
|
165
|
+
l,
|
|
166
|
+
m && /* @__PURE__ */ e("div", { className: "mt-0.5 text-primary", children: m })
|
|
167
|
+
] })
|
|
168
|
+
] })
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
export {
|
|
174
|
+
P as Timeline,
|
|
175
|
+
C as TimelineItem
|
|
176
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type TodoCardStatusTone = 'primary' | 'success' | 'warning' | 'info' | 'muted';
|
|
3
|
+
export interface TodoCardTab {
|
|
4
|
+
value: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
count?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface TodoCardItem {
|
|
9
|
+
id: React.Key;
|
|
10
|
+
title: React.ReactNode;
|
|
11
|
+
time?: React.ReactNode;
|
|
12
|
+
status?: React.ReactNode;
|
|
13
|
+
statusTone?: TodoCardStatusTone;
|
|
14
|
+
action?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export interface TodoCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
17
|
+
tabs?: TodoCardTab[];
|
|
18
|
+
activeTab?: string;
|
|
19
|
+
onTabChange?: (value: string) => void;
|
|
20
|
+
items?: TodoCardItem[];
|
|
21
|
+
renderItem?: (item: TodoCardItem) => React.ReactNode;
|
|
22
|
+
footer?: React.ReactNode;
|
|
23
|
+
empty?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
declare function TodoCard({ className, tabs, activeTab, onTabChange, items, renderItem, footer, empty, children, ...props }: TodoCardProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { TodoCard };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import * as h from "react";
|
|
3
|
+
import { ChevronRight as g } from "lucide-react";
|
|
4
|
+
import { cn as c } from "../../../../lib/utils.js";
|
|
5
|
+
import { Badge as d } from "../../data-display/badge/badge.js";
|
|
6
|
+
import { Card as v, CardContent as N } from "../../data-display/card/card.js";
|
|
7
|
+
import { Button as k } from "../../form/button/button.js";
|
|
8
|
+
const y = {
|
|
9
|
+
primary: "primary",
|
|
10
|
+
success: "success",
|
|
11
|
+
warning: "warning",
|
|
12
|
+
info: "info",
|
|
13
|
+
muted: "secondary"
|
|
14
|
+
}, w = [
|
|
15
|
+
{ value: "todo", label: "待办" },
|
|
16
|
+
{ value: "cc", label: "抄送我" },
|
|
17
|
+
{ value: "started", label: "已发起" },
|
|
18
|
+
{ value: "apply", label: "发起申请" }
|
|
19
|
+
];
|
|
20
|
+
function M({
|
|
21
|
+
className: r,
|
|
22
|
+
tabs: n = w,
|
|
23
|
+
activeTab: m = "cc",
|
|
24
|
+
onTabChange: p,
|
|
25
|
+
items: l = [],
|
|
26
|
+
renderItem: s,
|
|
27
|
+
footer: u,
|
|
28
|
+
empty: f,
|
|
29
|
+
children: o,
|
|
30
|
+
...x
|
|
31
|
+
}) {
|
|
32
|
+
return /* @__PURE__ */ e(v, { "data-slot": "todo-card", className: c("card-surface overflow-hidden", r), ...x, children: /* @__PURE__ */ t(N, { className: "flex flex-col gap-[var(--dk-card-inner-gap)] p-[var(--dk-card-padding)]", children: [
|
|
33
|
+
n.length > 0 && /* @__PURE__ */ e(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
role: "tablist",
|
|
37
|
+
"aria-label": "待办分类",
|
|
38
|
+
className: "flex min-h-6 items-center gap-[calc(var(--dk-control-gap)*2.5)] overflow-x-auto",
|
|
39
|
+
children: n.map((a) => {
|
|
40
|
+
const i = a.value === m;
|
|
41
|
+
return /* @__PURE__ */ t(
|
|
42
|
+
"button",
|
|
43
|
+
{
|
|
44
|
+
type: "button",
|
|
45
|
+
role: "tab",
|
|
46
|
+
"aria-selected": i,
|
|
47
|
+
onClick: () => p?.(a.value),
|
|
48
|
+
className: c(
|
|
49
|
+
"relative flex h-6 shrink-0 items-center gap-1 pb-0.5 text-sm leading-[22px] transition-colors",
|
|
50
|
+
i ? "font-medium text-primary" : "font-normal text-foreground hover:text-primary"
|
|
51
|
+
),
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ e("span", { children: a.label }),
|
|
54
|
+
a.count !== void 0 && /* @__PURE__ */ e(d, { variant: "primary", appearance: "light", size: "xs", shape: "circle", children: a.count }),
|
|
55
|
+
i && /* @__PURE__ */ e("span", { className: "absolute inset-x-0 bottom-0 h-0.5 bg-primary" })
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
a.value
|
|
59
|
+
);
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ t("div", { className: "min-w-0", children: [
|
|
64
|
+
o,
|
|
65
|
+
!o && l.length === 0 && /* @__PURE__ */ e("div", { className: "p-[calc(var(--dk-card-padding)*2)] text-center text-sm text-muted-foreground", children: f ?? "暂无待办" }),
|
|
66
|
+
!o && l.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-col gap-[calc(var(--dk-card-inner-gap)-0.125rem)]", children: l.map(
|
|
67
|
+
(a) => s ? /* @__PURE__ */ e(h.Fragment, { children: s(a) }, a.id) : /* @__PURE__ */ e(b, { item: a }, a.id)
|
|
68
|
+
) })
|
|
69
|
+
] }),
|
|
70
|
+
/* @__PURE__ */ e("div", { className: "flex items-center justify-start", children: u ?? /* @__PURE__ */ e(C, {}) })
|
|
71
|
+
] }) });
|
|
72
|
+
}
|
|
73
|
+
function b({ item: r }) {
|
|
74
|
+
const n = r.statusTone ?? "warning";
|
|
75
|
+
return /* @__PURE__ */ t("div", { className: "group flex min-w-0 flex-col gap-0.5", children: [
|
|
76
|
+
/* @__PURE__ */ t("div", { className: "flex min-h-[22px] min-w-0 items-center gap-[var(--dk-control-gap)]", children: [
|
|
77
|
+
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1 truncate text-sm font-medium leading-[22px] text-foreground", children: r.title }),
|
|
78
|
+
r.status && /* @__PURE__ */ e(
|
|
79
|
+
d,
|
|
80
|
+
{
|
|
81
|
+
variant: y[n],
|
|
82
|
+
appearance: "light",
|
|
83
|
+
size: "sm",
|
|
84
|
+
className: "shrink-0 font-normal",
|
|
85
|
+
children: r.status
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
r.action && /* @__PURE__ */ e("div", { className: "shrink-0 text-muted-foreground", children: r.action })
|
|
89
|
+
] }),
|
|
90
|
+
r.time && /* @__PURE__ */ e("div", { className: "truncate text-[13px] font-normal leading-[22px] text-muted-foreground", children: r.time })
|
|
91
|
+
] });
|
|
92
|
+
}
|
|
93
|
+
function C() {
|
|
94
|
+
return /* @__PURE__ */ t(k, { mode: "link", variant: "primary", size: "sm", className: "h-5 px-0 text-xs leading-5", children: [
|
|
95
|
+
"查看更多",
|
|
96
|
+
/* @__PURE__ */ e(g, { className: "size-3.5", strokeWidth: 1.8 })
|
|
97
|
+
] });
|
|
98
|
+
}
|
|
99
|
+
export {
|
|
100
|
+
M as TodoCard
|
|
101
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Avatar as AvatarPrimitive } from 'radix-ui';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
declare const avatarStatusVariants: (props?: ({
|
|
5
|
+
variant?: "online" | "offline" | "busy" | "away" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function AvatarIndicator({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function AvatarStatus({ className, variant, ...props }: React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof avatarStatusVariants>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { Avatar, AvatarFallback, AvatarImage, AvatarIndicator, AvatarStatus, avatarStatusVariants };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
3
|
+
import { cva as o } from "class-variance-authority";
|
|
4
|
+
import { Avatar as l } from "radix-ui";
|
|
5
|
+
const s = o("flex items-center rounded-full size-2 border-2 border-background", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
online: "bg-green-600",
|
|
9
|
+
offline: "bg-zinc-600",
|
|
10
|
+
busy: "bg-yellow-600",
|
|
11
|
+
away: "bg-blue-600"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
variant: "online"
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
function d({ className: a, ...t }) {
|
|
19
|
+
return /* @__PURE__ */ r(l.Root, { "data-slot": "avatar", className: e("relative flex shrink-0 size-10", a), ...t });
|
|
20
|
+
}
|
|
21
|
+
function v({ className: a, ...t }) {
|
|
22
|
+
return /* @__PURE__ */ r("div", { className: e("relative overflow-hidden rounded-full", a), children: /* @__PURE__ */ r(l.Image, { "data-slot": "avatar-image", className: e("aspect-square h-full w-full"), ...t }) });
|
|
23
|
+
}
|
|
24
|
+
function m({ className: a, ...t }) {
|
|
25
|
+
return /* @__PURE__ */ r(
|
|
26
|
+
l.Fallback,
|
|
27
|
+
{
|
|
28
|
+
"data-slot": "avatar-fallback",
|
|
29
|
+
className: e(
|
|
30
|
+
"flex h-full w-full items-center justify-center rounded-full border border-border bg-accent text-accent-foreground text-xs",
|
|
31
|
+
a
|
|
32
|
+
),
|
|
33
|
+
...t
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
function b({ className: a, ...t }) {
|
|
38
|
+
return /* @__PURE__ */ r(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
"data-slot": "avatar-indicator",
|
|
42
|
+
className: e("absolute flex size-6 items-center justify-center", a),
|
|
43
|
+
...t
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function g({
|
|
48
|
+
className: a,
|
|
49
|
+
variant: t,
|
|
50
|
+
...n
|
|
51
|
+
}) {
|
|
52
|
+
return /* @__PURE__ */ r("div", { "data-slot": "avatar-status", className: e(s({ variant: t }), a), ...n });
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
d as Avatar,
|
|
56
|
+
m as AvatarFallback,
|
|
57
|
+
v as AvatarImage,
|
|
58
|
+
b as AvatarIndicator,
|
|
59
|
+
g as AvatarStatus,
|
|
60
|
+
s as avatarStatusVariants
|
|
61
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type AnimationType = 'default' | 'flip' | 'reveal';
|
|
3
|
+
interface AvatarGroupProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
tooltipClassName?: string;
|
|
7
|
+
animation?: AnimationType;
|
|
8
|
+
}
|
|
9
|
+
interface AvatarGroupItemProps {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
tooltipClassName?: string;
|
|
13
|
+
animation?: AnimationType;
|
|
14
|
+
}
|
|
15
|
+
interface AvatarGroupTooltipProps {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function AvatarGroup({ children, className, tooltipClassName, animation }: AvatarGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function AvatarGroupItem({ children, className, tooltipClassName, animation: itemAnimation, }: AvatarGroupItemProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function AvatarGroupTooltip({ children, className }: AvatarGroupTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { jsx as t, jsxs as v } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { useMotionValue as z, useSpring as h, useTransform as g, AnimatePresence as E, motion as o } from "motion/react";
|
|
4
|
+
import { cn as p } from "../../../../lib/utils.js";
|
|
5
|
+
const b = a.createContext(null), O = ({ content: e }) => {
|
|
6
|
+
const n = a.Children.toArray(e);
|
|
7
|
+
return /* @__PURE__ */ t(
|
|
8
|
+
o.div,
|
|
9
|
+
{
|
|
10
|
+
initial: "initial",
|
|
11
|
+
animate: "animate",
|
|
12
|
+
exit: "exit",
|
|
13
|
+
variants: {
|
|
14
|
+
animate: { transition: { staggerChildren: 0.08 } }
|
|
15
|
+
},
|
|
16
|
+
children: n.map((r, s) => /* @__PURE__ */ t(
|
|
17
|
+
o.div,
|
|
18
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
initial: { opacity: 0, y: 20 },
|
|
21
|
+
animate: { opacity: 1, y: 0, transition: { duration: 0.3, ease: "easeOut" } },
|
|
22
|
+
exit: { opacity: 0, y: -20, transition: { duration: 0.2, ease: "easeIn" } }
|
|
23
|
+
},
|
|
24
|
+
children: r
|
|
25
|
+
},
|
|
26
|
+
s
|
|
27
|
+
))
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
function k({ children: e, className: n, tooltipClassName: r, animation: s = "default" }) {
|
|
32
|
+
const l = {
|
|
33
|
+
tooltipClassName: r,
|
|
34
|
+
animation: s
|
|
35
|
+
};
|
|
36
|
+
return /* @__PURE__ */ t(b.Provider, { value: l, children: /* @__PURE__ */ t("div", { className: p("flex -space-x-2.5", n), children: e }) });
|
|
37
|
+
}
|
|
38
|
+
function H({
|
|
39
|
+
children: e,
|
|
40
|
+
className: n,
|
|
41
|
+
tooltipClassName: r,
|
|
42
|
+
animation: s
|
|
43
|
+
}) {
|
|
44
|
+
const l = a.useContext(b), [w, y] = a.useState(!1), x = { stiffness: 100, damping: 5 }, d = z(0), c = s || l?.animation || "default", N = r || l?.tooltipClassName, A = h(g(d, [-100, 100], [-45, 45]), x), I = h(g(d, [-100, 100], [-50, 50]), x), m = a.Children.toArray(e).find(
|
|
45
|
+
(i) => a.isValidElement(i) && i.type === C
|
|
46
|
+
), V = a.Children.toArray(e).filter(
|
|
47
|
+
(i) => !(a.isValidElement(i) && i.type === C)
|
|
48
|
+
), u = m && a.isValidElement(m) ? m.props.children : null, M = (i) => {
|
|
49
|
+
const X = i.target.offsetWidth / 2;
|
|
50
|
+
d.set(i.nativeEvent.offsetX - X);
|
|
51
|
+
}, f = {
|
|
52
|
+
default: {
|
|
53
|
+
initial: { opacity: 0, y: 20, scale: 0.6 },
|
|
54
|
+
animate: {
|
|
55
|
+
opacity: 1,
|
|
56
|
+
y: 0,
|
|
57
|
+
scale: 1,
|
|
58
|
+
transition: {
|
|
59
|
+
type: "spring",
|
|
60
|
+
stiffness: 260,
|
|
61
|
+
damping: 10
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
exit: {
|
|
65
|
+
opacity: 0,
|
|
66
|
+
y: 20,
|
|
67
|
+
scale: 0.6,
|
|
68
|
+
transition: {
|
|
69
|
+
duration: 0.2,
|
|
70
|
+
ease: "easeInOut"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
flip: {
|
|
75
|
+
initial: { opacity: 0, rotateX: -90 },
|
|
76
|
+
animate: {
|
|
77
|
+
opacity: 1,
|
|
78
|
+
rotateX: 0,
|
|
79
|
+
transition: {
|
|
80
|
+
type: "spring",
|
|
81
|
+
stiffness: 180,
|
|
82
|
+
damping: 25
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
exit: {
|
|
86
|
+
opacity: 0,
|
|
87
|
+
rotateX: -90,
|
|
88
|
+
transition: {
|
|
89
|
+
duration: 0.3,
|
|
90
|
+
ease: "easeInOut"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
reveal: {
|
|
95
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
96
|
+
animate: { opacity: 1, scale: 1, transition: { duration: 0.15, ease: "easeOut" } },
|
|
97
|
+
exit: { opacity: 0, scale: 0.95, transition: { duration: 0.1, ease: "easeIn" } }
|
|
98
|
+
}
|
|
99
|
+
}[c];
|
|
100
|
+
return /* @__PURE__ */ v(
|
|
101
|
+
"div",
|
|
102
|
+
{
|
|
103
|
+
className: p("group relative", n),
|
|
104
|
+
onMouseEnter: () => y(!0),
|
|
105
|
+
onMouseLeave: () => y(!1),
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ t(E, { mode: "wait", children: w && u && /* @__PURE__ */ v(
|
|
108
|
+
o.div,
|
|
109
|
+
{
|
|
110
|
+
initial: f.initial,
|
|
111
|
+
animate: f.animate,
|
|
112
|
+
exit: f.exit,
|
|
113
|
+
style: {
|
|
114
|
+
translateX: c === "reveal" ? 0 : I,
|
|
115
|
+
rotate: c === "reveal" ? 0 : A,
|
|
116
|
+
whiteSpace: "nowrap",
|
|
117
|
+
transformOrigin: "center"
|
|
118
|
+
},
|
|
119
|
+
className: p(
|
|
120
|
+
"absolute -top-16 left-1/2 z-50 flex -translate-x-1/2 flex-col items-center justify-center rounded-md bg-black px-4 py-2 text-xs font-medium text-white shadow-xl",
|
|
121
|
+
N
|
|
122
|
+
),
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ t(
|
|
125
|
+
o.div,
|
|
126
|
+
{
|
|
127
|
+
className: "absolute inset-x-10 -bottom-px z-30 h-px w-[20%] bg-gradient-to-r from-transparent via-emerald-500 to-transparent",
|
|
128
|
+
initial: { opacity: 0 },
|
|
129
|
+
animate: { opacity: 1 },
|
|
130
|
+
exit: { opacity: 0 },
|
|
131
|
+
transition: { duration: 0.15 }
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
/* @__PURE__ */ t(
|
|
135
|
+
o.div,
|
|
136
|
+
{
|
|
137
|
+
className: "absolute -bottom-px left-10 z-30 h-px w-[40%] bg-gradient-to-r from-transparent via-sky-500 to-transparent",
|
|
138
|
+
initial: { opacity: 0 },
|
|
139
|
+
animate: { opacity: 1 },
|
|
140
|
+
exit: { opacity: 0 },
|
|
141
|
+
transition: { duration: 0.15 }
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
c === "reveal" ? /* @__PURE__ */ t(O, { content: u }) : u
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
) }),
|
|
148
|
+
/* @__PURE__ */ t(
|
|
149
|
+
o.div,
|
|
150
|
+
{
|
|
151
|
+
className: "relative cursor-pointer",
|
|
152
|
+
whileHover: {
|
|
153
|
+
zIndex: 30
|
|
154
|
+
},
|
|
155
|
+
whileTap: { scale: 0.95 },
|
|
156
|
+
transition: {
|
|
157
|
+
duration: 0.5
|
|
158
|
+
},
|
|
159
|
+
onMouseMove: M,
|
|
160
|
+
children: V
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
function C({ children: e, className: n }) {
|
|
168
|
+
return /* @__PURE__ */ t(
|
|
169
|
+
o.div,
|
|
170
|
+
{
|
|
171
|
+
initial: { opacity: 0, y: 20, scale: 0.6 },
|
|
172
|
+
animate: { opacity: 1 },
|
|
173
|
+
exit: { opacity: 0 },
|
|
174
|
+
transition: { duration: 0.15 },
|
|
175
|
+
className: p("hidden relative z-30", n),
|
|
176
|
+
children: e
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
export {
|
|
181
|
+
k as AvatarGroup,
|
|
182
|
+
H as AvatarGroupItem,
|
|
183
|
+
C as AvatarGroupTooltip
|
|
184
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
dotClassName?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface BadgeButtonProps extends React.ButtonHTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeButtonVariants> {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export type BadgeDotProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
12
|
+
declare const badgeVariants: (props?: ({
|
|
13
|
+
variant?: "primary" | "destructive" | "secondary" | "outline" | "success" | "warning" | "info" | null | undefined;
|
|
14
|
+
appearance?: "default" | "light" | "outline" | "ghost" | null | undefined;
|
|
15
|
+
disabled?: boolean | null | undefined;
|
|
16
|
+
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
17
|
+
shape?: "default" | "circle" | null | undefined;
|
|
18
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
19
|
+
declare const badgeButtonVariants: (props?: ({
|
|
20
|
+
variant?: "default" | null | undefined;
|
|
21
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
22
|
+
declare function Badge({ className, variant, size, appearance, shape, asChild, disabled, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
23
|
+
asChild?: boolean;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function BadgeButton({ className, variant, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof badgeButtonVariants> & {
|
|
26
|
+
asChild?: boolean;
|
|
27
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare function BadgeDot({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export { Badge, BadgeButton, BadgeDot, badgeVariants };
|