dishui 0.0.97 → 0.0.104
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/dist/.release-verified.json +2 -2
- package/dist/ai.js +17 -15
- package/dist/components/Card/Ticket.d.ts +52 -0
- package/dist/components/Card/Ticket2.js +218 -0
- package/dist/components/Card/Ticket2.js.map +1 -0
- package/dist/components/Card/index.d.ts +12 -0
- package/dist/components/Card/index.js +142 -139
- package/dist/components/Card/index.js.map +1 -1
- package/dist/components/ai/AgentRunCard/index.d.ts +38 -0
- package/dist/components/ai/AgentRunCard/index.js +100 -0
- package/dist/components/ai/AgentRunCard/index.js.map +1 -0
- package/dist/components/ai/IssueCard/index.d.ts +39 -0
- package/dist/components/ai/IssueCard/index.js +78 -0
- package/dist/components/ai/IssueCard/index.js.map +1 -0
- package/dist/components/ai/index.d.ts +4 -0
- package/dist/components/pro/Flow/constants.js +3 -3
- package/dist/components/pro/Flow/constants.js.map +1 -1
- package/dist/components/pro/Flow/context/FlowAIContext.d.ts +2 -0
- package/dist/components/pro/Flow/context/FlowAIContext.js +9 -4
- package/dist/components/pro/Flow/context/FlowAIContext.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaContent.d.ts +3 -2
- package/dist/components/pro/Flow/nodes/MediaContent.js +16 -16
- package/dist/components/pro/Flow/nodes/MediaContent.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaOverlay.js +25 -23
- package/dist/components/pro/Flow/nodes/MediaOverlay.js.map +1 -1
- package/dist/components/pro/Flow/nodes/shapes.js +3 -3
- package/dist/components/pro/Flow/nodes/shapes.js.map +1 -1
- package/dist/components/pro/Flow/panels/InspectorPanel.js +396 -384
- package/dist/components/pro/Flow/panels/InspectorPanel.js.map +1 -1
- package/dist/components/pro/Flow/utils/themeColor.d.ts +2 -2
- package/dist/components/pro/Flow/utils/themeColor.js +2 -2
- package/dist/components/pro/Flow/utils/themeColor.js.map +1 -1
- package/dist/components/pro/Kanban/Kanban.d.ts +3 -0
- package/dist/components/pro/Kanban/Kanban.js +339 -0
- package/dist/components/pro/Kanban/Kanban.js.map +1 -0
- package/dist/components/pro/Kanban/Swimlanes.d.ts +3 -0
- package/dist/components/pro/Kanban/Swimlanes.js +60 -0
- package/dist/components/pro/Kanban/Swimlanes.js.map +1 -0
- package/dist/components/pro/Kanban/index.d.ts +5 -0
- package/dist/components/pro/Kanban/types.d.ts +103 -0
- package/dist/components/pro/Kanban/useKanbanDrag.d.ts +17 -0
- package/dist/components/pro/Kanban/useKanbanDrag.js +69 -0
- package/dist/components/pro/Kanban/useKanbanDrag.js.map +1 -0
- package/dist/components/pro/Kanban/utils.d.ts +13 -0
- package/dist/components/pro/Kanban/utils.js +48 -0
- package/dist/components/pro/Kanban/utils.js.map +1 -0
- package/dist/components/pro/RichTextEditor/AIRewrite.js +158 -127
- package/dist/components/pro/RichTextEditor/AIRewrite.js.map +1 -1
- package/dist/components/pro/RichTextEditor/BlockHandle.d.ts +2 -0
- package/dist/components/pro/RichTextEditor/BlockHandle.js +156 -115
- package/dist/components/pro/RichTextEditor/BlockHandle.js.map +1 -1
- package/dist/components/pro/RichTextEditor/RichTextEditor.js +136 -159
- package/dist/components/pro/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/ColorPicker.js +44 -41
- package/dist/components/pro/RichTextEditor/Toolbar/ColorPicker.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/FloatingDialogMenu.js +59 -53
- package/dist/components/pro/RichTextEditor/Toolbar/FloatingDialogMenu.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/MarkdownTemplates.js +48 -44
- package/dist/components/pro/RichTextEditor/Toolbar/MarkdownTemplates.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/TableOpsMenu.js +67 -63
- package/dist/components/pro/RichTextEditor/Toolbar/TableOpsMenu.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/Toolbar.d.ts +1 -0
- package/dist/components/pro/RichTextEditor/Toolbar/Toolbar.js +182 -129
- package/dist/components/pro/RichTextEditor/Toolbar/Toolbar.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/ToolbarButton.d.ts +1 -0
- package/dist/components/pro/RichTextEditor/Toolbar/ToolbarButton.js +3 -3
- package/dist/components/pro/RichTextEditor/Toolbar/ToolbarButton.js.map +1 -1
- package/dist/components/pro/RichTextEditor/Toolbar/useAnchoredDropdown.d.ts +3 -0
- package/dist/components/pro/RichTextEditor/Toolbar/useAnchoredDropdown.js +31 -0
- package/dist/components/pro/RichTextEditor/Toolbar/useAnchoredDropdown.js.map +1 -0
- package/dist/components/pro/RichTextEditor/index.d.ts +1 -1
- package/dist/components/pro/RichTextEditor/types.d.ts +78 -11
- package/dist/components/pro/RichTextEditor/types.js +11 -0
- package/dist/components/pro/RichTextEditor/types.js.map +1 -1
- package/dist/dishui.css +1 -1
- package/dist/index-nostyled.d.ts +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +128 -122
- package/dist/kanban.js +5 -0
- package/dist/utils/i18n.js +20 -0
- package/dist/utils/i18n.js.map +1 -1
- package/dist/utils/menu.js +1 -1
- package/dist/utils/menu.js.map +1 -1
- package/package.json +5 -1
|
@@ -1,122 +1,125 @@
|
|
|
1
1
|
import { cn as e } from "../../utils/cn.js";
|
|
2
2
|
import { CardMetric as t } from "./Metric2.js";
|
|
3
|
-
import n from "
|
|
4
|
-
import r from "../ai/
|
|
5
|
-
import i from "../ai/
|
|
6
|
-
import a from "../ai/
|
|
7
|
-
import o from "../ai/
|
|
3
|
+
import { CardTicket as n } from "./Ticket2.js";
|
|
4
|
+
import r from "../ai/ApprovalCard/index.js";
|
|
5
|
+
import i from "../ai/RecommendationCard/index.js";
|
|
6
|
+
import a from "../ai/ContextCards/index.js";
|
|
7
|
+
import o from "../ai/InsightCards/index.js";
|
|
8
|
+
import s from "../ai/FineTuneCard/index.js";
|
|
9
|
+
import c from "../ai/IssueCard/index.js";
|
|
10
|
+
import l from "../ai/AgentRunCard/index.js";
|
|
8
11
|
/* empty css */
|
|
9
12
|
import "react";
|
|
10
|
-
import { jsx as
|
|
13
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
11
14
|
//#region src/components/Card/index.tsx
|
|
12
|
-
var
|
|
13
|
-
let h =
|
|
15
|
+
var f = ({ children: t, variant: n, bordered: r = !1, dash: i = !1, side: a = !1, imageFull: o = !1, compact: s = !1, hover: c = !0, glass: l = !0, glassOpacity: d, style: f, size: p = "sm", className: m = "" }) => {
|
|
16
|
+
let h = l && !n ? "dishui-card-glass" : "", g = n ? `bg-${n} text-${n}-content shadow-md` : "", _ = r ? "card-bordered" : "", v = i ? "card-dash" : "", y = a ? "card-side" : "", x = o ? "image-full" : "", S = s ? "card-compact" : "", C = c ? "hover:shadow-md transition-shadow duration-200 motion-reduce:transition-none" : "", w = p ? `card-${p}` : "";
|
|
14
17
|
m.includes("w-") || m.match(/max-w-|min-w-/);
|
|
15
|
-
let T = e("card", "", h, g, v, y,
|
|
16
|
-
return /* @__PURE__ */
|
|
18
|
+
let T = e("card", "", h, g, _, v, y, x, S, C, w, m);
|
|
19
|
+
return /* @__PURE__ */ u("div", {
|
|
17
20
|
className: T,
|
|
18
|
-
style:
|
|
21
|
+
style: b({
|
|
19
22
|
variant: n,
|
|
20
|
-
glass:
|
|
23
|
+
glass: l,
|
|
21
24
|
glassOpacity: d,
|
|
22
25
|
style: f
|
|
23
26
|
}),
|
|
24
27
|
children: t
|
|
25
28
|
});
|
|
26
|
-
},
|
|
29
|
+
}, p = ({ children: t, className: n = "" }) => {
|
|
27
30
|
let r = e("card-title", n);
|
|
28
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ u("h2", {
|
|
29
32
|
className: r,
|
|
30
33
|
children: t
|
|
31
34
|
});
|
|
32
|
-
},
|
|
35
|
+
}, m = ({ children: t, className: n = "" }) => {
|
|
33
36
|
let r = e("card-body", n);
|
|
34
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ u("div", {
|
|
35
38
|
className: r,
|
|
36
39
|
children: t
|
|
37
40
|
});
|
|
38
|
-
},
|
|
41
|
+
}, h = ({ children: t, className: n = "", justify: r = "end" }) => {
|
|
39
42
|
let i = e("card-actions", r && `justify-${r}`, n);
|
|
40
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ u("div", {
|
|
41
44
|
className: i,
|
|
42
45
|
children: t
|
|
43
46
|
});
|
|
44
|
-
},
|
|
47
|
+
}, g = {
|
|
45
48
|
cover: "[&>img]:object-cover",
|
|
46
49
|
contain: "[&>img]:object-contain",
|
|
47
50
|
fill: "[&>img]:object-fill"
|
|
48
|
-
},
|
|
49
|
-
let o = e("figure",
|
|
50
|
-
return /* @__PURE__ */
|
|
51
|
+
}, _ = (e) => typeof e == "number" ? `${e}px` : e, v = ({ children: t, className: n = "", fit: r = "cover", fill: i = !1, height: a }) => {
|
|
52
|
+
let o = e("figure", g[r], i && "w-full h-full [&>img]:h-full [&>img]:w-full", a !== void 0 && "w-full [&>img]:h-full [&>img]:w-full", n);
|
|
53
|
+
return /* @__PURE__ */ u("figure", {
|
|
51
54
|
className: o,
|
|
52
|
-
style: a === void 0 ? void 0 : { height:
|
|
55
|
+
style: a === void 0 ? void 0 : { height: _(a) },
|
|
53
56
|
children: t
|
|
54
57
|
});
|
|
55
|
-
},
|
|
58
|
+
}, y = ({ variant: t, bordered: n = !1, glass: r = !0, className: i = "" }) => {
|
|
56
59
|
let a = r && !t ? "dishui-card-glass" : "", o = t ? `bg-${t} text-${t}-content shadow-md` : "";
|
|
57
60
|
return e("card", a, o, n && "card-bordered", i);
|
|
58
|
-
},
|
|
61
|
+
}, b = ({ variant: e, glass: t = !0, glassOpacity: n = .15, style: r }) => !t || e ? r : {
|
|
59
62
|
"--dishui-card-glass-opacity": `${(Number.isFinite(n) ? Math.min(1, Math.max(0, n)) : .15) * 100}%`,
|
|
60
63
|
...r
|
|
61
|
-
},
|
|
64
|
+
}, x = ({ className: t }) => /* @__PURE__ */ d("svg", {
|
|
62
65
|
xmlns: "http://www.w3.org/2000/svg",
|
|
63
66
|
className: e("h-4 w-4", t),
|
|
64
67
|
fill: "none",
|
|
65
68
|
viewBox: "0 0 24 24",
|
|
66
69
|
stroke: "currentColor",
|
|
67
70
|
strokeWidth: 2,
|
|
68
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ u("circle", {
|
|
69
72
|
cx: "12",
|
|
70
73
|
cy: "12",
|
|
71
74
|
r: "9"
|
|
72
|
-
}), /* @__PURE__ */
|
|
75
|
+
}), /* @__PURE__ */ u("path", {
|
|
73
76
|
strokeLinecap: "round",
|
|
74
77
|
d: "M12 7v5l3 2"
|
|
75
78
|
})]
|
|
76
|
-
}),
|
|
77
|
-
let
|
|
79
|
+
}), S = ({ icon: t, title: n, description: r, layout: i = "vertical", iconShape: a, children: o, variant: s, bordered: c, glass: l = !0, glassOpacity: f, style: p, className: m = "", onClick: h }) => {
|
|
80
|
+
let g = t && /* @__PURE__ */ u("span", {
|
|
78
81
|
className: e("flex shrink-0 items-center justify-center bg-primary/10 text-primary", i === "vertical" ? "size-16" : "size-12", (a ?? (i === "vertical" ? "circle" : "square")) === "circle" ? "rounded-full" : "rounded-xl"),
|
|
79
82
|
children: t
|
|
80
83
|
});
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
-
className:
|
|
83
|
-
variant:
|
|
84
|
-
bordered:
|
|
85
|
-
glass:
|
|
84
|
+
return /* @__PURE__ */ u("div", {
|
|
85
|
+
className: y({
|
|
86
|
+
variant: s,
|
|
87
|
+
bordered: c,
|
|
88
|
+
glass: l,
|
|
86
89
|
className: m
|
|
87
90
|
}),
|
|
88
|
-
style:
|
|
89
|
-
variant:
|
|
90
|
-
glass:
|
|
91
|
+
style: b({
|
|
92
|
+
variant: s,
|
|
93
|
+
glass: l,
|
|
91
94
|
glassOpacity: f,
|
|
92
95
|
style: p
|
|
93
96
|
}),
|
|
94
97
|
onClick: h,
|
|
95
|
-
children: i === "horizontal" ? /* @__PURE__ */
|
|
98
|
+
children: i === "horizontal" ? /* @__PURE__ */ d("div", {
|
|
96
99
|
className: "card-body flex-row items-center gap-4",
|
|
97
|
-
children: [
|
|
100
|
+
children: [g, /* @__PURE__ */ d("div", {
|
|
98
101
|
className: "min-w-0 flex-1",
|
|
99
102
|
children: [
|
|
100
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ u("h3", {
|
|
101
104
|
className: "font-semibold text-base-content",
|
|
102
105
|
children: n
|
|
103
106
|
}),
|
|
104
|
-
r && /* @__PURE__ */
|
|
107
|
+
r && /* @__PURE__ */ u("p", {
|
|
105
108
|
className: "mt-0.5 text-sm text-base-content/70",
|
|
106
109
|
children: r
|
|
107
110
|
}),
|
|
108
111
|
o
|
|
109
112
|
]
|
|
110
113
|
})]
|
|
111
|
-
}) : /* @__PURE__ */
|
|
114
|
+
}) : /* @__PURE__ */ d("div", {
|
|
112
115
|
className: "card-body items-center gap-3 text-center",
|
|
113
116
|
children: [
|
|
114
|
-
|
|
115
|
-
/* @__PURE__ */
|
|
117
|
+
g,
|
|
118
|
+
/* @__PURE__ */ u("h3", {
|
|
116
119
|
className: "text-lg font-bold text-base-content",
|
|
117
120
|
children: n
|
|
118
121
|
}),
|
|
119
|
-
r && /* @__PURE__ */
|
|
122
|
+
r && /* @__PURE__ */ u("p", {
|
|
120
123
|
className: "text-sm leading-relaxed text-base-content/70",
|
|
121
124
|
children: r
|
|
122
125
|
}),
|
|
@@ -124,112 +127,112 @@ var l = ({ children: t, variant: n, bordered: r = !1, dash: i = !1, side: a = !1
|
|
|
124
127
|
]
|
|
125
128
|
})
|
|
126
129
|
});
|
|
127
|
-
},
|
|
128
|
-
className: e(
|
|
129
|
-
variant:
|
|
130
|
-
bordered:
|
|
131
|
-
glass:
|
|
130
|
+
}, C = ({ children: t, author: n, avatar: r, date: i, quoteMark: a = !0, divider: o = !0, variant: s, bordered: c, glass: l = !0, glassOpacity: f, style: p, className: m = "", onClick: h }) => /* @__PURE__ */ d("div", {
|
|
131
|
+
className: e(y({
|
|
132
|
+
variant: s,
|
|
133
|
+
bordered: c,
|
|
134
|
+
glass: l,
|
|
132
135
|
className: m
|
|
133
136
|
}), "relative overflow-hidden"),
|
|
134
|
-
style:
|
|
135
|
-
variant:
|
|
136
|
-
glass:
|
|
137
|
+
style: b({
|
|
138
|
+
variant: s,
|
|
139
|
+
glass: l,
|
|
137
140
|
glassOpacity: f,
|
|
138
141
|
style: p
|
|
139
142
|
}),
|
|
140
143
|
onClick: h,
|
|
141
|
-
children: [a && /* @__PURE__ */
|
|
144
|
+
children: [a && /* @__PURE__ */ u("span", {
|
|
142
145
|
"aria-hidden": "true",
|
|
143
146
|
className: "pointer-events-none absolute right-5 top-2 select-none font-serif text-6xl leading-none text-primary/25",
|
|
144
147
|
children: "”"
|
|
145
|
-
}), /* @__PURE__ */
|
|
148
|
+
}), /* @__PURE__ */ d("div", {
|
|
146
149
|
className: "card-body gap-0 p-6",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
150
|
+
children: [/* @__PURE__ */ u("div", {
|
|
148
151
|
className: e("relative z-10 min-w-0 wrap-anywhere text-lg text-base-content", a && "pe-10"),
|
|
149
152
|
children: t
|
|
150
|
-
}), /* @__PURE__ */
|
|
153
|
+
}), /* @__PURE__ */ d("div", {
|
|
151
154
|
className: e("mt-4 flex flex-wrap items-center justify-between gap-3", o && "border-t border-base-300 pt-3.5"),
|
|
152
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ d("div", {
|
|
153
156
|
className: "flex min-w-0 items-center gap-2.5",
|
|
154
|
-
children: [r && /* @__PURE__ */
|
|
157
|
+
children: [r && /* @__PURE__ */ u("span", {
|
|
155
158
|
className: "size-8 shrink-0 overflow-hidden rounded-full",
|
|
156
159
|
children: r
|
|
157
|
-
}), n && /* @__PURE__ */
|
|
160
|
+
}), n && /* @__PURE__ */ u("span", {
|
|
158
161
|
className: "truncate text-sm font-medium text-primary",
|
|
159
162
|
children: n
|
|
160
163
|
})]
|
|
161
|
-
}), i && /* @__PURE__ */
|
|
164
|
+
}), i && /* @__PURE__ */ d("span", {
|
|
162
165
|
className: "flex shrink-0 items-center gap-1.5 text-sm text-base-content/55",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ u(x, {}), i]
|
|
164
167
|
})]
|
|
165
168
|
})]
|
|
166
169
|
})]
|
|
167
|
-
}),
|
|
168
|
-
className:
|
|
170
|
+
}), w = ({ title: e, badge: t, children: n, footerLeft: r, footerRight: i, variant: a, bordered: o, glass: s = !0, glassOpacity: c, style: l, className: f = "", onClick: p }) => /* @__PURE__ */ u("div", {
|
|
171
|
+
className: y({
|
|
169
172
|
variant: a,
|
|
170
173
|
bordered: o,
|
|
171
|
-
glass:
|
|
174
|
+
glass: s,
|
|
172
175
|
className: f
|
|
173
176
|
}),
|
|
174
|
-
style:
|
|
177
|
+
style: b({
|
|
175
178
|
variant: a,
|
|
176
|
-
glass:
|
|
177
|
-
glassOpacity:
|
|
178
|
-
style:
|
|
179
|
+
glass: s,
|
|
180
|
+
glassOpacity: c,
|
|
181
|
+
style: l
|
|
179
182
|
}),
|
|
180
183
|
onClick: p,
|
|
181
|
-
children: /* @__PURE__ */
|
|
184
|
+
children: /* @__PURE__ */ d("div", {
|
|
182
185
|
className: "card-body gap-2.5 p-6",
|
|
183
186
|
children: [
|
|
184
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ d("div", {
|
|
185
188
|
className: "flex items-center justify-between gap-3",
|
|
186
|
-
children: [/* @__PURE__ */
|
|
189
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
187
190
|
className: "min-w-0 flex-1 truncate text-lg font-bold text-base-content",
|
|
188
191
|
children: e
|
|
189
|
-
}), t && /* @__PURE__ */
|
|
192
|
+
}), t && /* @__PURE__ */ u("span", {
|
|
190
193
|
className: "shrink-0",
|
|
191
194
|
children: t
|
|
192
195
|
})]
|
|
193
196
|
}),
|
|
194
|
-
n && /* @__PURE__ */
|
|
197
|
+
n && /* @__PURE__ */ u("div", {
|
|
195
198
|
className: "text-sm text-base-content/75",
|
|
196
199
|
children: n
|
|
197
200
|
}),
|
|
198
|
-
(r || i) && /* @__PURE__ */
|
|
201
|
+
(r || i) && /* @__PURE__ */ d("div", {
|
|
199
202
|
className: "mt-1.5 flex items-center justify-between gap-3 text-sm text-base-content/55",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ u("span", {
|
|
201
204
|
className: "min-w-0 truncate",
|
|
202
205
|
children: r
|
|
203
|
-
}), /* @__PURE__ */
|
|
206
|
+
}), /* @__PURE__ */ u("span", {
|
|
204
207
|
className: "shrink-0",
|
|
205
208
|
children: i
|
|
206
209
|
})]
|
|
207
210
|
})
|
|
208
211
|
]
|
|
209
212
|
})
|
|
210
|
-
}),
|
|
211
|
-
let T =
|
|
212
|
-
variant:
|
|
213
|
-
bordered:
|
|
214
|
-
glass:
|
|
213
|
+
}), T = ({ label: t, value: n, icon: r, iconPosition: i = "top", iconShape: a = "square", iconBoxed: o = !1, tone: s = "neutral", layout: c = "stacked", align: l = "left", children: f, footer: p, hint: m, loading: h = !1, variant: g, bordered: _ = !0, glass: v = !0, glassOpacity: x, style: S, className: C = "", onClick: w }) => {
|
|
214
|
+
let T = y({
|
|
215
|
+
variant: g,
|
|
216
|
+
bordered: _,
|
|
217
|
+
glass: v,
|
|
215
218
|
className: e("dishui-card-info", "p-4", C)
|
|
216
|
-
}), E = r != null && /* @__PURE__ */
|
|
219
|
+
}), E = r != null && /* @__PURE__ */ u("span", {
|
|
217
220
|
className: e("dishui-card-info__icon", o && (a === "circle" ? "rounded-full" : "rounded-lg"), o && "bg-base-content/5"),
|
|
218
221
|
children: r
|
|
219
222
|
});
|
|
220
|
-
return /* @__PURE__ */
|
|
223
|
+
return /* @__PURE__ */ d("div", {
|
|
221
224
|
className: T,
|
|
222
|
-
style:
|
|
223
|
-
variant:
|
|
224
|
-
glass:
|
|
225
|
+
style: b({
|
|
226
|
+
variant: g,
|
|
227
|
+
glass: v,
|
|
225
228
|
glassOpacity: x,
|
|
226
229
|
style: S
|
|
227
230
|
}),
|
|
228
|
-
"data-layout":
|
|
229
|
-
"data-align":
|
|
230
|
-
"data-tone":
|
|
231
|
-
"data-bordered":
|
|
232
|
-
"data-glass":
|
|
231
|
+
"data-layout": c,
|
|
232
|
+
"data-align": l,
|
|
233
|
+
"data-tone": g ? void 0 : s,
|
|
234
|
+
"data-bordered": _,
|
|
235
|
+
"data-glass": v,
|
|
233
236
|
role: w ? "button" : void 0,
|
|
234
237
|
tabIndex: w ? 0 : void 0,
|
|
235
238
|
"aria-busy": h || void 0,
|
|
@@ -237,76 +240,76 @@ var l = ({ children: t, variant: n, bordered: r = !1, dash: i = !1, side: a = !1
|
|
|
237
240
|
onKeyDown: w ? (e) => {
|
|
238
241
|
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.repeat || e.currentTarget.click());
|
|
239
242
|
} : void 0,
|
|
240
|
-
children: [/* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ d("div", {
|
|
241
244
|
className: "dishui-card-info__body",
|
|
242
245
|
children: [
|
|
243
246
|
i === "left" && E,
|
|
244
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ d("div", {
|
|
245
248
|
className: "dishui-card-info__content",
|
|
246
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ d("div", {
|
|
247
250
|
className: "dishui-card-info__summary",
|
|
248
|
-
children: [/* @__PURE__ */
|
|
251
|
+
children: [/* @__PURE__ */ d("div", {
|
|
249
252
|
className: "dishui-card-info__header",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ u("div", {
|
|
251
254
|
className: "dishui-card-info__label",
|
|
252
255
|
children: t
|
|
253
256
|
}), i === "top" && E]
|
|
254
|
-
}), /* @__PURE__ */
|
|
257
|
+
}), /* @__PURE__ */ d("div", {
|
|
255
258
|
className: "dishui-card-info__reading",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
259
|
+
children: [/* @__PURE__ */ u("div", {
|
|
257
260
|
className: "dishui-card-info__value",
|
|
258
|
-
children: h ? /* @__PURE__ */
|
|
261
|
+
children: h ? /* @__PURE__ */ u("span", {
|
|
259
262
|
className: "dishui-card-info__skeleton",
|
|
260
263
|
"aria-hidden": "true"
|
|
261
264
|
}) : n
|
|
262
|
-
}), m != null && /* @__PURE__ */
|
|
265
|
+
}), m != null && /* @__PURE__ */ u("div", {
|
|
263
266
|
className: "dishui-card-info__hint",
|
|
264
267
|
children: m
|
|
265
268
|
})]
|
|
266
269
|
})]
|
|
267
|
-
}), f != null && /* @__PURE__ */
|
|
270
|
+
}), f != null && /* @__PURE__ */ u("div", {
|
|
268
271
|
className: "dishui-card-info__details",
|
|
269
272
|
children: f
|
|
270
273
|
})]
|
|
271
274
|
}),
|
|
272
275
|
i === "right" && E
|
|
273
276
|
]
|
|
274
|
-
}), p != null && /* @__PURE__ */
|
|
277
|
+
}), p != null && /* @__PURE__ */ u("div", {
|
|
275
278
|
className: "dishui-card-info__footer",
|
|
276
279
|
children: p
|
|
277
280
|
})]
|
|
278
281
|
});
|
|
279
|
-
},
|
|
282
|
+
}, E = {
|
|
280
283
|
primary: "text-primary",
|
|
281
284
|
success: "text-success",
|
|
282
285
|
warning: "text-warning",
|
|
283
286
|
info: "text-info",
|
|
284
287
|
error: "text-error",
|
|
285
288
|
neutral: "text-base-content/70"
|
|
286
|
-
},
|
|
289
|
+
}, D = {
|
|
287
290
|
primary: "bg-primary text-primary-content",
|
|
288
291
|
success: "bg-success text-success-content",
|
|
289
292
|
warning: "bg-warning text-warning-content",
|
|
290
293
|
info: "bg-info text-info-content",
|
|
291
294
|
error: "bg-error text-error-content",
|
|
292
295
|
neutral: "bg-neutral text-neutral-content"
|
|
293
|
-
},
|
|
296
|
+
}, O = {
|
|
294
297
|
md: "text-2xl",
|
|
295
298
|
lg: "text-4xl",
|
|
296
299
|
xl: "text-5xl",
|
|
297
300
|
"2xl": "text-6xl"
|
|
298
|
-
},
|
|
301
|
+
}, k = (e) => e === "neutral" ? "var(--color-base-content)" : `var(--color-${e})`, A = ({ data: e, type: t, height: n }) => {
|
|
299
302
|
if (!e || e.length < 2) return null;
|
|
300
|
-
let r = Math.min(...e), i = Math.max(...e) - r || 1, a = (t) => t / (e.length - 1) * 100, o = (e) => n - 3 - (e - r) / i * (n - 6),
|
|
303
|
+
let r = Math.min(...e), i = Math.max(...e) - r || 1, a = (t) => t / (e.length - 1) * 100, o = (e) => n - 3 - (e - r) / i * (n - 6), s = e.map((e, t) => `${a(t).toFixed(2)},${o(e).toFixed(2)}`);
|
|
301
304
|
if (t === "bar") {
|
|
302
305
|
let t = 100 / e.length;
|
|
303
|
-
return /* @__PURE__ */
|
|
306
|
+
return /* @__PURE__ */ u("svg", {
|
|
304
307
|
viewBox: `0 0 100 ${n}`,
|
|
305
308
|
preserveAspectRatio: "none",
|
|
306
309
|
className: "block w-full",
|
|
307
310
|
style: { height: n },
|
|
308
311
|
"aria-hidden": "true",
|
|
309
|
-
children: e.map((e, r) => /* @__PURE__ */
|
|
312
|
+
children: e.map((e, r) => /* @__PURE__ */ u("rect", {
|
|
310
313
|
x: a(r) - t / 2,
|
|
311
314
|
y: o(e),
|
|
312
315
|
width: t * .8,
|
|
@@ -315,78 +318,78 @@ var l = ({ children: t, variant: n, bordered: r = !1, dash: i = !1, side: a = !1
|
|
|
315
318
|
}, r))
|
|
316
319
|
});
|
|
317
320
|
}
|
|
318
|
-
return t === "area" ? /* @__PURE__ */
|
|
321
|
+
return t === "area" ? /* @__PURE__ */ d("svg", {
|
|
319
322
|
viewBox: `0 0 100 ${n}`,
|
|
320
323
|
preserveAspectRatio: "none",
|
|
321
324
|
className: "block w-full",
|
|
322
325
|
style: { height: n },
|
|
323
326
|
"aria-hidden": "true",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
325
|
-
d: `M0,${n} L${
|
|
327
|
+
children: [/* @__PURE__ */ u("path", {
|
|
328
|
+
d: `M0,${n} L${s.join(" L")} L100,${n} Z`,
|
|
326
329
|
fill: "currentColor",
|
|
327
330
|
opacity: .18
|
|
328
|
-
}), /* @__PURE__ */
|
|
329
|
-
points:
|
|
331
|
+
}), /* @__PURE__ */ u("polyline", {
|
|
332
|
+
points: s.join(" "),
|
|
330
333
|
fill: "none",
|
|
331
334
|
stroke: "currentColor",
|
|
332
335
|
strokeWidth: 1.5,
|
|
333
336
|
vectorEffect: "non-scaling-stroke"
|
|
334
337
|
})]
|
|
335
|
-
}) : /* @__PURE__ */
|
|
338
|
+
}) : /* @__PURE__ */ u("svg", {
|
|
336
339
|
viewBox: `0 0 100 ${n}`,
|
|
337
340
|
preserveAspectRatio: "none",
|
|
338
341
|
className: "block w-full",
|
|
339
342
|
style: { height: n },
|
|
340
343
|
"aria-hidden": "true",
|
|
341
|
-
children: /* @__PURE__ */
|
|
342
|
-
points:
|
|
344
|
+
children: /* @__PURE__ */ u("polyline", {
|
|
345
|
+
points: s.join(" "),
|
|
343
346
|
fill: "none",
|
|
344
347
|
stroke: "currentColor",
|
|
345
348
|
strokeWidth: 1.5,
|
|
346
349
|
vectorEffect: "non-scaling-stroke"
|
|
347
350
|
})
|
|
348
351
|
});
|
|
349
|
-
},
|
|
350
|
-
let _ =
|
|
351
|
-
data:
|
|
352
|
+
}, j = ({ label: e, value: t, tone: n = "primary", loading: r = !1, className: i = "", unit: a, valueSize: o = "xl", align: s = "left", sparkline: c, sparklineData: l, sparklineType: f = "line", sparklineHeight: p = 36, indicator: m = !1, filled: h = !1, onClick: g }) => {
|
|
353
|
+
let _ = c ?? (l && l.length >= 2 ? /* @__PURE__ */ u(A, {
|
|
354
|
+
data: l,
|
|
352
355
|
type: f,
|
|
353
356
|
height: p
|
|
354
|
-
}) : null), v = h ? "" :
|
|
355
|
-
return /* @__PURE__ */
|
|
357
|
+
}) : null), v = h ? "" : E[n], y = h ? "opacity-80" : "text-base-content/60";
|
|
358
|
+
return /* @__PURE__ */ d("div", {
|
|
356
359
|
onClick: g,
|
|
357
|
-
className: `relative flex flex-col overflow-hidden rounded-lg p-3 ${h ?
|
|
360
|
+
className: `relative flex flex-col overflow-hidden rounded-lg p-3 ${h ? D[n] : "border border-base-300/60 bg-base-200"} ${g ? "cursor-pointer transition-colors hover:border-primary/40" : ""} ${i}`.trim(),
|
|
358
361
|
children: [
|
|
359
|
-
m && !h && /* @__PURE__ */
|
|
362
|
+
m && !h && /* @__PURE__ */ u("span", {
|
|
360
363
|
"aria-hidden": "true",
|
|
361
364
|
className: "absolute right-0 top-0 h-0 w-0",
|
|
362
365
|
style: {
|
|
363
|
-
borderTop: "14px solid " +
|
|
366
|
+
borderTop: "14px solid " + k(n),
|
|
364
367
|
borderLeft: "14px solid transparent"
|
|
365
368
|
}
|
|
366
369
|
}),
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
-
className: `truncate text-xs font-medium ${y} ${
|
|
370
|
+
/* @__PURE__ */ u("div", {
|
|
371
|
+
className: `truncate text-xs font-medium ${y} ${s === "center" ? "text-center" : ""}`.trim(),
|
|
369
372
|
children: e
|
|
370
373
|
}),
|
|
371
|
-
/* @__PURE__ */
|
|
372
|
-
className: `flex min-h-[3rem] flex-1 items-center py-1 ${
|
|
373
|
-
children: r ? /* @__PURE__ */
|
|
374
|
-
className: `leading-none tracking-tight ${
|
|
375
|
-
children: [t, a != null && a !== "" && /* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ u("div", {
|
|
375
|
+
className: `flex min-h-[3rem] flex-1 items-center py-1 ${s === "center" ? "justify-center" : "justify-start"}`,
|
|
376
|
+
children: r ? /* @__PURE__ */ u("span", { className: `inline-block h-8 w-16 animate-pulse rounded ${h ? "bg-white/25" : "bg-base-content/10"}` }) : /* @__PURE__ */ d("span", {
|
|
377
|
+
className: `leading-none tracking-tight ${O[o]} font-semibold ${h ? "" : v}`.trim(),
|
|
378
|
+
children: [t, a != null && a !== "" && /* @__PURE__ */ u("span", {
|
|
376
379
|
className: "ml-0.5 text-[0.45em] font-semibold",
|
|
377
380
|
children: a
|
|
378
381
|
})]
|
|
379
382
|
})
|
|
380
383
|
}),
|
|
381
|
-
_ && /* @__PURE__ */
|
|
382
|
-
className: `-mx-3 -mb-3 mt-1 ${h ? "text-white" :
|
|
384
|
+
_ && /* @__PURE__ */ u("div", {
|
|
385
|
+
className: `-mx-3 -mb-3 mt-1 ${h ? "text-white" : E[n]}`,
|
|
383
386
|
children: _
|
|
384
387
|
})
|
|
385
388
|
]
|
|
386
389
|
});
|
|
387
|
-
},
|
|
388
|
-
|
|
390
|
+
}, M = f;
|
|
391
|
+
M.Title = p, M.Body = m, M.Actions = h, M.Figure = v, M.Feature = S, M.Quote = C, M.Meta = w, M.Info = T, M.Stat = j, M.Metric = t, M.Ticket = n, M.Approval = r, M.Recommendation = i, M.Context = a, M.Insights = o, M.FineTune = s, M.Issue = c, M.Run = l;
|
|
389
392
|
//#endregion
|
|
390
|
-
export {
|
|
393
|
+
export { M as default };
|
|
391
394
|
|
|
392
395
|
//# sourceMappingURL=index.js.map
|