@oneflowui/ui 0.5.8 → 0.6.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.en.md +19 -0
- package/README.md +23 -0
- package/dist/components/ContextMenu/index.vue.js +2 -2
- package/dist/components/Dashboard/charts/BarChart.vue.js +2 -2
- package/dist/components/Dashboard/charts/BarChart.vue2.js +56 -23
- package/dist/components/Dashboard/charts/NumberCard.vue.js +2 -2
- package/dist/components/Dashboard/charts/NumberCard.vue2.js +14 -14
- package/dist/components/Dashboard/charts/PieChart.vue.js +1 -1
- package/dist/components/Dashboard/charts/PieChart.vue2.js +49 -23
- package/dist/components/Dashboard/charts/TableChart.vue.js +1 -1
- package/dist/components/Dashboard/index.vue.js +3 -3
- package/dist/components/ai/AiMessageBubble.vue.js +3 -3
- package/dist/components/ai/AiSender.vue.js +2 -2
- package/dist/components/ai/AiThinking.vue.js +1 -1
- package/dist/components/ai/UserMessageBubble.vue.js +3 -3
- package/dist/components/auxiliary/ColorPanel.vue.js +3 -3
- package/dist/components/auxiliary/ColorPanel.vue2.js +9 -9
- package/dist/components/auxiliary/FileUpload.vue.js +2 -2
- package/dist/components/auxiliary/PersonPanel.vue.js +1 -1
- package/dist/components/auxiliary/PersonPanel.vue2.js +10 -10
- package/dist/components/base/Accordion.vue.js +1 -1
- package/dist/components/base/Avatar.vue.js +3 -3
- package/dist/components/base/Avatar.vue2.js +43 -43
- package/dist/components/base/Badge.vue.js +1 -1
- package/dist/components/base/Badge.vue2.js +35 -35
- package/dist/components/base/ButtonGroup.vue.js +2 -2
- package/dist/components/base/ChainItem.vue.js +2 -2
- package/dist/components/base/ChainItem.vue2.js +30 -30
- package/dist/components/base/DescBlock.vue.js +3 -3
- package/dist/components/base/DropdownMenu.vue.js +2 -2
- package/dist/components/base/EmptyState.vue.js +1 -1
- package/dist/components/base/InfoCard.vue.js +2 -2
- package/dist/components/base/InfoCard.vue2.js +66 -66
- package/dist/components/base/MonitorItem.vue.js +1 -1
- package/dist/components/base/MonitorItem.vue2.js +16 -16
- package/dist/components/base/PersonaCard.vue.js +1 -1
- package/dist/components/base/PersonaCard.vue2.js +81 -81
- package/dist/components/base/ProgressBar.vue.js +2 -2
- package/dist/components/base/ProgressBar.vue2.js +16 -16
- package/dist/components/base/RangeSlider.vue.js +1 -1
- package/dist/components/base/RefTag.vue.js +2 -2
- package/dist/components/base/RefTag.vue2.js +20 -20
- package/dist/components/base/SearchHighlight.vue.js +1 -1
- package/dist/components/base/SectionBlock.vue.js +1 -1
- package/dist/components/base/SectionBlock.vue2.js +44 -44
- package/dist/components/base/StatisticCard.vue.js +2 -2
- package/dist/components/base/StatisticCard.vue2.js +24 -24
- package/dist/components/base/StatusIndicator.vue.js +2 -2
- package/dist/components/base/StatusIndicator.vue2.js +30 -30
- package/dist/components/base/StatusSummary.vue.js +2 -2
- package/dist/components/base/StatusSummary.vue2.js +23 -23
- package/dist/components/base/Stepper.vue.js +2 -2
- package/dist/components/base/Switch.vue.js +2 -2
- package/dist/components/base/ToolbarBtn.vue.js +1 -1
- package/dist/components/base/ViewModeGroup.vue.js +3 -3
- package/dist/components/base/ViewSwitcher.vue.js +2 -2
- package/dist/components/base/ViewTab.vue.js +4 -4
- package/dist/components/breadcrumb/Breadcrumb.vue.js +2 -2
- package/dist/components/breadcrumb/BreadcrumbItem.vue.js +1 -1
- package/dist/components/database/DatabaseView.vue.js +4 -4
- package/dist/components/detail/CommentItem.vue.js +2 -2
- package/dist/components/detail/CommentItem.vue2.js +8 -8
- package/dist/components/detail/DetailLayout.vue.js +1 -1
- package/dist/components/editor/BlockQuote.vue.js +2 -2
- package/dist/components/editor/CodeBlock.vue.js +2 -2
- package/dist/components/editor/ContentBlock.vue.js +2 -2
- package/dist/components/editor/RefLink.vue.js +2 -2
- package/dist/components/editor/RichTextEditor.vue.js +1 -1
- package/dist/components/field/FieldAttachment.vue.js +1 -1
- package/dist/components/field/FieldCreator.vue.js +1 -1
- package/dist/components/field/FieldCurrency.vue.js +2 -2
- package/dist/components/field/FieldMarkdownPreview.vue.js +2 -2
- package/dist/components/field/FieldMultiSelect.vue.js +2 -2
- package/dist/components/field/FieldProgress.vue.js +2 -2
- package/dist/components/field/FieldRating.vue.js +2 -2
- package/dist/components/field/FieldRelation.vue.js +1 -1
- package/dist/components/field/FieldRichText.vue.js +1 -1
- package/dist/components/field/FieldSelect.vue.js +2 -2
- package/dist/components/gallery/GalleryCard.vue.js +2 -2
- package/dist/components/gallery/GalleryCard.vue2.js +34 -30
- package/dist/components/gallery/GalleryView.vue.js +2 -2
- package/dist/components/kanban/KanbanBoard.vue.js +4 -4
- package/dist/components/kanban/KanbanCard.vue.js +2 -2
- package/dist/components/kanban/KanbanColumn.vue.js +2 -2
- package/dist/components/kanban/KanbanColumn.vue2.js +16 -16
- package/dist/components/kanban/QuickAddRow.vue.js +1 -1
- package/dist/components/layout/AppLayout.vue.js +2 -2
- package/dist/components/layout/Navbar.vue.js +3 -3
- package/dist/components/layout/Sidebar.vue.js +2 -2
- package/dist/components/layout/StatusBar.vue.js +2 -2
- package/dist/components/mermaid/MermaidChart.vue.js +2 -2
- package/dist/components/overlay/Dialog.vue.js +2 -2
- package/dist/components/overlay/Drawer.vue.js +2 -2
- package/dist/components/overlay/Modal.vue.js +1 -1
- package/dist/components/overlay/SidePanel.vue.js +2 -2
- package/dist/components/split/SplitPane.vue.js +2 -2
- package/dist/components/table/ColumnHeaderMenu.vue.js +1 -1
- package/dist/components/table/DataTable.vue.js +4 -4
- package/dist/components/table/DetailSheet.vue.js +1 -1
- package/dist/components/table/FieldCell.vue.js +1 -1
- package/dist/components/table/FieldTypePicker.vue.js +4 -4
- package/dist/components/table/MobileListView.vue.js +2 -2
- package/dist/components/table/NewRowBtn.vue.js +2 -2
- package/dist/components/table/TableColumnManager.vue.js +2 -2
- package/dist/components/table/TableDataRow.vue.js +3 -3
- package/dist/components/table/TableFilterPanel.vue.js +2 -2
- package/dist/components/table/TableGroupRow.vue.js +2 -2
- package/dist/components/table/TableHeaderRow.vue.js +2 -2
- package/dist/components/table/TableToolbar.vue.js +2 -2
- package/dist/components/tabs/Tabs.vue.js +1 -1
- package/dist/components/timeline/ActivityTimeline.vue.js +1 -1
- package/dist/components/timeline/ActivityTimeline.vue2.js +27 -27
- package/dist/components/timeline/GanttRow.vue.js +2 -2
- package/dist/components/timeline/GanttRow.vue2.js +21 -18
- package/dist/components/timeline/GanttTimeline.vue.js +2 -2
- package/dist/components/toast/ToastItem.vue.js +2 -2
- package/dist/components/toast/ToastItem.vue2.js +39 -39
- package/dist/plugin.js +242 -171
- package/dist/style.css +1 -1
- package/dist/utils/icon.js +25 -68
- package/dist/utils/iconRegistry.d.ts +7 -0
- package/dist/utils/iconRegistry.js +60 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableToolbar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import a from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ a(o, [["__scopeId", "data-v-8aa06fe0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Tabs.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-43719fd1"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./ActivityTimeline.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-98deb1a5"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as k, computed as g, openBlock as s, createElementBlock as o, Fragment as f, renderList as m, createElementVNode as e, createCommentVNode as
|
|
1
|
+
import { defineComponent as k, computed as g, openBlock as s, createElementBlock as o, Fragment as f, renderList as m, createElementVNode as e, createCommentVNode as a, normalizeStyle as u, renderSlot as h, toDisplayString as n } from "vue";
|
|
2
2
|
const b = ["aria-busy"], C = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "of-activity-timeline__skeleton",
|
|
@@ -9,7 +9,7 @@ const b = ["aria-busy"], C = {
|
|
|
9
9
|
}, B = { class: "of-activity-timeline__rail" }, S = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "of-activity-timeline__line"
|
|
12
|
-
}, V = { class: "of-activity-timeline__content" },
|
|
12
|
+
}, V = { class: "of-activity-timeline__content" }, x = { class: "of-activity-timeline__header" }, z = { class: "of-activity-timeline__action" }, D = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "of-activity-timeline__actor"
|
|
15
15
|
}, E = {
|
|
@@ -18,40 +18,40 @@ const b = ["aria-busy"], C = {
|
|
|
18
18
|
}, M = {
|
|
19
19
|
key: 1,
|
|
20
20
|
class: "of-activity-timeline__progress"
|
|
21
|
-
},
|
|
21
|
+
}, w = { class: "of-activity-timeline__progress-track" }, A = { class: "of-activity-timeline__progress-value" }, F = {
|
|
22
22
|
key: 2,
|
|
23
23
|
class: "of-activity-timeline__time"
|
|
24
|
-
},
|
|
24
|
+
}, L = /* @__PURE__ */ k({
|
|
25
25
|
__name: "ActivityTimeline",
|
|
26
26
|
props: {
|
|
27
27
|
items: {},
|
|
28
28
|
loading: { type: Boolean, default: !1 }
|
|
29
29
|
},
|
|
30
|
-
setup(
|
|
31
|
-
const p =
|
|
30
|
+
setup(c) {
|
|
31
|
+
const p = c, y = [0, 1, 2], d = g(
|
|
32
32
|
() => p.items.map((i) => ({
|
|
33
33
|
...i,
|
|
34
34
|
status: i.status ?? "default"
|
|
35
35
|
}))
|
|
36
36
|
);
|
|
37
|
-
function
|
|
38
|
-
return i === "done" ? "var(--of-color-
|
|
37
|
+
function v(i) {
|
|
38
|
+
return i === "done" ? "var(--of-text-primary, var(--of-color-gray-700))" : i === "start" ? "var(--of-text-secondary, var(--of-color-gray-500))" : "var(--of-text-tertiary, var(--of-color-gray-400))";
|
|
39
39
|
}
|
|
40
40
|
function _(i) {
|
|
41
41
|
return typeof i != "number" || Number.isNaN(i) ? null : Math.min(100, Math.max(0, i));
|
|
42
42
|
}
|
|
43
43
|
return (i, l) => (s(), o("div", {
|
|
44
44
|
class: "of-activity-timeline",
|
|
45
|
-
"aria-busy":
|
|
45
|
+
"aria-busy": c.loading
|
|
46
46
|
}, [
|
|
47
|
-
|
|
48
|
-
(s(), o(f, null, m(
|
|
47
|
+
c.loading ? (s(), o("div", C, [
|
|
48
|
+
(s(), o(f, null, m(y, (t) => e("div", {
|
|
49
49
|
key: t,
|
|
50
50
|
class: "of-activity-timeline__item of-activity-timeline__item--skeleton"
|
|
51
51
|
}, [
|
|
52
52
|
e("div", N, [
|
|
53
53
|
l[0] || (l[0] = e("span", { class: "of-activity-timeline__dot of-activity-timeline__dot--skeleton" }, null, -1)),
|
|
54
|
-
t <
|
|
54
|
+
t < y.length - 1 ? (s(), o("span", $)) : a("", !0)
|
|
55
55
|
]),
|
|
56
56
|
l[1] || (l[1] = e("div", { class: "of-activity-timeline__content" }, [
|
|
57
57
|
e("span", { class: "of-activity-timeline__skeleton-bar of-activity-timeline__skeleton-bar--lg" }),
|
|
@@ -59,40 +59,40 @@ const b = ["aria-busy"], C = {
|
|
|
59
59
|
e("span", { class: "of-activity-timeline__skeleton-bar of-activity-timeline__skeleton-bar--sm" })
|
|
60
60
|
], -1))
|
|
61
61
|
])), 64))
|
|
62
|
-
])) : (s(!0), o(f, { key: 1 }, m(
|
|
63
|
-
key: `${t.action}-${t.time ??
|
|
62
|
+
])) : (s(!0), o(f, { key: 1 }, m(d.value, (t, r) => (s(), o("div", {
|
|
63
|
+
key: `${t.action}-${t.time ?? r}-${r}`,
|
|
64
64
|
class: "of-activity-timeline__item"
|
|
65
65
|
}, [
|
|
66
66
|
e("div", B, [
|
|
67
67
|
e("span", {
|
|
68
68
|
class: "of-activity-timeline__dot",
|
|
69
|
-
style: u({ backgroundColor:
|
|
69
|
+
style: u({ backgroundColor: v(t.status) })
|
|
70
70
|
}, null, 4),
|
|
71
|
-
|
|
71
|
+
r < d.value.length - 1 ? (s(), o("span", S)) : a("", !0)
|
|
72
72
|
]),
|
|
73
73
|
e("div", V, [
|
|
74
74
|
h(i.$slots, "item", {
|
|
75
75
|
item: t,
|
|
76
|
-
index:
|
|
76
|
+
index: r
|
|
77
77
|
}, () => [
|
|
78
|
-
e("div",
|
|
79
|
-
e("span", z,
|
|
80
|
-
t.actor ? (s(), o("span", D,
|
|
78
|
+
e("div", x, [
|
|
79
|
+
e("span", z, n(t.action), 1),
|
|
80
|
+
t.actor ? (s(), o("span", D, n(t.actor), 1)) : a("", !0)
|
|
81
81
|
]),
|
|
82
|
-
t.detail ? (s(), o("p", E,
|
|
82
|
+
t.detail ? (s(), o("p", E, n(t.detail), 1)) : a("", !0),
|
|
83
83
|
_(t.progress) !== null ? (s(), o("div", M, [
|
|
84
|
-
e("div",
|
|
84
|
+
e("div", w, [
|
|
85
85
|
e("div", {
|
|
86
86
|
class: "of-activity-timeline__progress-fill",
|
|
87
87
|
style: u({
|
|
88
88
|
width: `${_(t.progress)}%`,
|
|
89
|
-
backgroundColor:
|
|
89
|
+
backgroundColor: v(t.status)
|
|
90
90
|
})
|
|
91
91
|
}, null, 4)
|
|
92
92
|
]),
|
|
93
|
-
e("span",
|
|
94
|
-
])) :
|
|
95
|
-
t.time ? (s(), o("p",
|
|
93
|
+
e("span", A, n(_(t.progress)) + "% ", 1)
|
|
94
|
+
])) : a("", !0),
|
|
95
|
+
t.time ? (s(), o("p", F, n(t.time), 1)) : a("", !0)
|
|
96
96
|
], !0)
|
|
97
97
|
])
|
|
98
98
|
]))), 128))
|
|
@@ -100,5 +100,5 @@ const b = ["aria-busy"], C = {
|
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
102
|
export {
|
|
103
|
-
|
|
103
|
+
L as default
|
|
104
104
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./GanttRow.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dd4c6c6a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -21,30 +21,33 @@ const F = { class: "gantt-row__label" }, I = { class: "gantt-row__title" }, K =
|
|
|
21
21
|
t.item.priority || "",
|
|
22
22
|
M(U, t.priorityColorMap)
|
|
23
23
|
)
|
|
24
|
-
), D = n(() => t.item.barColor ? {
|
|
24
|
+
), D = n(() => t.item.barColor ? {
|
|
25
|
+
background: t.item.barColor,
|
|
26
|
+
color: "var(--of-text-primary, var(--of-color-gray-800))"
|
|
27
|
+
} : {
|
|
25
28
|
background: y.value.style.background,
|
|
26
29
|
color: y.value.style.color
|
|
27
30
|
}), E = n(() => y.value.style), $ = n(() => {
|
|
28
|
-
const
|
|
31
|
+
const a = h(
|
|
29
32
|
t.item.status || "",
|
|
30
33
|
M(X, t.statusColorMap)
|
|
31
34
|
);
|
|
32
|
-
return
|
|
35
|
+
return a.dot ?? a.style.color;
|
|
33
36
|
}), L = n(() => {
|
|
34
|
-
const
|
|
35
|
-
const o = /* @__PURE__ */ new Date(`${
|
|
37
|
+
const a = (e) => {
|
|
38
|
+
const o = /* @__PURE__ */ new Date(`${e}T00:00:00`);
|
|
36
39
|
return `${String(o.getMonth() + 1).padStart(2, "0")}/${String(o.getDate()).padStart(2, "0")}`;
|
|
37
40
|
};
|
|
38
|
-
return `${
|
|
41
|
+
return `${a(t.item.startDate)} - ${a(t.item.endDate)}`;
|
|
39
42
|
});
|
|
40
|
-
function v(
|
|
41
|
-
t.readonly || (
|
|
43
|
+
function v(a, e) {
|
|
44
|
+
t.readonly || (a.preventDefault(), a.stopPropagation(), s.value = !0, u.value = e, g = a.clientX, f = t.offsetDays, c = t.durationDays, window.addEventListener("mousemove", p), window.addEventListener("mouseup", w));
|
|
42
45
|
}
|
|
43
|
-
function p(
|
|
46
|
+
function p(a) {
|
|
44
47
|
if (!s.value || !u.value) return;
|
|
45
|
-
const
|
|
48
|
+
const e = Math.round((a.clientX - g) / t.dayWidth);
|
|
46
49
|
if (u.value === "move") {
|
|
47
|
-
const B = Math.max(0, Math.min(f +
|
|
50
|
+
const B = Math.max(0, Math.min(f + e, t.totalDays - 1));
|
|
48
51
|
d("change", {
|
|
49
52
|
id: t.item.id,
|
|
50
53
|
offsetDays: B,
|
|
@@ -54,7 +57,7 @@ const F = { class: "gantt-row__label" }, I = { class: "gantt-row__title" }, K =
|
|
|
54
57
|
});
|
|
55
58
|
return;
|
|
56
59
|
}
|
|
57
|
-
const o = Math.max(1, c +
|
|
60
|
+
const o = Math.max(1, c + e), W = Math.max(1, t.totalDays - t.offsetDays);
|
|
58
61
|
d("change", {
|
|
59
62
|
id: t.item.id,
|
|
60
63
|
offsetDays: t.offsetDays,
|
|
@@ -66,14 +69,14 @@ const F = { class: "gantt-row__label" }, I = { class: "gantt-row__title" }, K =
|
|
|
66
69
|
function w() {
|
|
67
70
|
s.value = !1, u.value = null, window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", w);
|
|
68
71
|
}
|
|
69
|
-
function P(
|
|
70
|
-
|
|
72
|
+
function P(a) {
|
|
73
|
+
a.key !== "Enter" && a.key !== " " || (a.preventDefault(), d("click", t.item));
|
|
71
74
|
}
|
|
72
|
-
return (
|
|
75
|
+
return (a, e) => (A(), R("div", {
|
|
73
76
|
class: "gantt-row",
|
|
74
77
|
role: "button",
|
|
75
78
|
tabindex: "0",
|
|
76
|
-
onClick:
|
|
79
|
+
onClick: e[2] || (e[2] = (o) => d("click", i.item)),
|
|
77
80
|
onKeydown: P
|
|
78
81
|
}, [
|
|
79
82
|
r("div", F, [
|
|
@@ -106,7 +109,7 @@ const F = { class: "gantt-row__label" }, I = { class: "gantt-row__title" }, K =
|
|
|
106
109
|
color: D.value.color
|
|
107
110
|
}),
|
|
108
111
|
"aria-label": "拖动时间条",
|
|
109
|
-
onMousedown:
|
|
112
|
+
onMousedown: e[0] || (e[0] = (o) => v(o, "move"))
|
|
110
113
|
}, [
|
|
111
114
|
r("span", K, m(L.value), 1)
|
|
112
115
|
], 38),
|
|
@@ -114,7 +117,7 @@ const F = { class: "gantt-row__label" }, I = { class: "gantt-row__title" }, K =
|
|
|
114
117
|
type: "button",
|
|
115
118
|
class: "gantt-row__handle",
|
|
116
119
|
"aria-label": "调整结束时间",
|
|
117
|
-
onMousedown:
|
|
120
|
+
onMousedown: e[1] || (e[1] = z((o) => v(o, "resize-end"), ["stop"]))
|
|
118
121
|
}, null, 32)
|
|
119
122
|
], 6)
|
|
120
123
|
], 4)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./GanttTimeline.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-44d8d394"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ToastItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2c0c8e01"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { XCircle as L, AlertTriangle as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as g, computed as a, openBlock as c, createElementBlock as f, normalizeStyle as m, normalizeClass as p, createElementVNode as r, createBlock as y, resolveDynamicComponent as C, toDisplayString as s, createCommentVNode as _, createVNode as k, unref as h } from "vue";
|
|
2
|
+
import { XCircle as L, AlertTriangle as w, CheckCircle2 as z, Info as $, X as B } from "lucide-vue-next";
|
|
3
|
+
const I = ["role", "aria-label"], N = { class: "of-toast__icon" }, V = { class: "of-toast__content" }, x = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "of-toast__title"
|
|
6
|
-
}, D = { class: "of-toast__message" }, X = /* @__PURE__ */
|
|
6
|
+
}, D = { class: "of-toast__message" }, X = /* @__PURE__ */ g({
|
|
7
7
|
__name: "ToastItem",
|
|
8
8
|
props: {
|
|
9
9
|
toast: {}
|
|
10
10
|
},
|
|
11
11
|
emits: ["close"],
|
|
12
|
-
setup(o, { emit:
|
|
13
|
-
const t = o, i =
|
|
14
|
-
info:
|
|
15
|
-
success:
|
|
16
|
-
warning:
|
|
12
|
+
setup(o, { emit: n }) {
|
|
13
|
+
const t = o, i = n, v = {
|
|
14
|
+
info: $,
|
|
15
|
+
success: z,
|
|
16
|
+
warning: w,
|
|
17
17
|
error: L
|
|
18
|
-
},
|
|
18
|
+
}, d = {
|
|
19
19
|
info: {
|
|
20
|
-
icon: "var(--of-color-
|
|
21
|
-
border: "var(--of-color-
|
|
22
|
-
borderLeft: "var(--of-color-
|
|
23
|
-
bg: "var(--of-color-
|
|
20
|
+
icon: "var(--of-color-info, var(--of-accent-default, #334155))",
|
|
21
|
+
border: "var(--of-border-subtle, var(--of-color-gray-200, #e5e7eb))",
|
|
22
|
+
borderLeft: "var(--of-color-info, var(--of-accent-default, #334155))",
|
|
23
|
+
bg: "var(--of-surface-panel, var(--of-color-bg-elevated, #ffffff))"
|
|
24
24
|
},
|
|
25
25
|
success: {
|
|
26
|
-
icon: "var(--of-color-
|
|
27
|
-
border: "var(--of-color-
|
|
28
|
-
borderLeft: "var(--of-color-
|
|
29
|
-
bg: "var(--of-color-
|
|
26
|
+
icon: "var(--of-color-success, var(--of-accent-default, #334155))",
|
|
27
|
+
border: "var(--of-border-subtle, var(--of-color-gray-200, #e5e7eb))",
|
|
28
|
+
borderLeft: "var(--of-color-success, var(--of-accent-default, #334155))",
|
|
29
|
+
bg: "var(--of-surface-panel, var(--of-color-bg-elevated, #ffffff))"
|
|
30
30
|
},
|
|
31
31
|
warning: {
|
|
32
|
-
icon: "var(--of-color-
|
|
33
|
-
border: "var(--of-color-
|
|
34
|
-
borderLeft: "var(--of-color-
|
|
35
|
-
bg: "var(--of-color-
|
|
32
|
+
icon: "var(--of-color-warning, var(--of-accent-default, #334155))",
|
|
33
|
+
border: "var(--of-border-subtle, var(--of-color-gray-200, #e5e7eb))",
|
|
34
|
+
borderLeft: "var(--of-color-warning, var(--of-accent-default, #334155))",
|
|
35
|
+
bg: "var(--of-surface-panel, var(--of-color-bg-elevated, #ffffff))"
|
|
36
36
|
},
|
|
37
37
|
error: {
|
|
38
|
-
icon: "var(--of-color-
|
|
39
|
-
border: "var(--of-color-
|
|
40
|
-
borderLeft: "var(--of-color-
|
|
41
|
-
bg: "var(--of-color-
|
|
38
|
+
icon: "var(--of-color-error, var(--of-accent-default, #334155))",
|
|
39
|
+
border: "var(--of-border-subtle, var(--of-color-gray-200, #e5e7eb))",
|
|
40
|
+
borderLeft: "var(--of-color-error, var(--of-accent-default, #334155))",
|
|
41
|
+
bg: "var(--of-surface-panel, var(--of-color-bg-elevated, #ffffff))"
|
|
42
42
|
}
|
|
43
|
-
},
|
|
44
|
-
return (E,
|
|
45
|
-
class:
|
|
46
|
-
style:
|
|
43
|
+
}, u = a(() => v[t.toast.type]), e = a(() => d[t.toast.type]), b = a(() => t.toast.type === "error" ? "alertdialog" : "alert");
|
|
44
|
+
return (E, l) => (c(), f("div", {
|
|
45
|
+
class: p(["of-toast", `of-toast--${o.toast.type}`]),
|
|
46
|
+
style: m({
|
|
47
47
|
borderColor: e.value.border,
|
|
48
48
|
borderLeftColor: e.value.borderLeft,
|
|
49
49
|
backgroundColor: e.value.bg
|
|
50
50
|
}),
|
|
51
|
-
role:
|
|
51
|
+
role: b.value,
|
|
52
52
|
"aria-label": `${o.toast.type}: ${o.toast.message}`
|
|
53
53
|
}, [
|
|
54
|
-
r("div",
|
|
55
|
-
(
|
|
54
|
+
r("div", N, [
|
|
55
|
+
(c(), y(C(u.value), {
|
|
56
56
|
size: 20,
|
|
57
57
|
color: e.value.icon,
|
|
58
58
|
"aria-hidden": "true"
|
|
59
59
|
}, null, 8, ["color"]))
|
|
60
60
|
]),
|
|
61
|
-
r("div",
|
|
62
|
-
o.toast.title ? (
|
|
63
|
-
r("p", D,
|
|
61
|
+
r("div", V, [
|
|
62
|
+
o.toast.title ? (c(), f("p", x, s(o.toast.title), 1)) : _("", !0),
|
|
63
|
+
r("p", D, s(o.toast.message), 1)
|
|
64
64
|
]),
|
|
65
65
|
r("button", {
|
|
66
66
|
class: "of-toast__close",
|
|
67
67
|
type: "button",
|
|
68
68
|
"aria-label": "关闭通知",
|
|
69
|
-
onClick:
|
|
69
|
+
onClick: l[0] || (l[0] = (M) => i("close"))
|
|
70
70
|
}, [
|
|
71
|
-
k(h(
|
|
71
|
+
k(h(B), { size: 16 })
|
|
72
72
|
])
|
|
73
|
-
], 14,
|
|
73
|
+
], 14, I));
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
export {
|