@oneflowui/ui 0.5.9 → 0.7.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.
Files changed (134) hide show
  1. package/README.en.md +19 -0
  2. package/README.md +23 -0
  3. package/dist/components/Dashboard/charts/BarChart.vue.js +2 -2
  4. package/dist/components/Dashboard/charts/BarChart.vue2.js +56 -23
  5. package/dist/components/Dashboard/charts/NumberCard.vue.js +2 -2
  6. package/dist/components/Dashboard/charts/NumberCard.vue2.js +14 -14
  7. package/dist/components/Dashboard/charts/PieChart.vue.js +1 -1
  8. package/dist/components/Dashboard/charts/PieChart.vue2.js +49 -23
  9. package/dist/components/Dashboard/charts/TableChart.vue.js +1 -1
  10. package/dist/components/Dashboard/index.vue.d.ts +3 -1
  11. package/dist/components/Dashboard/index.vue.js +2 -2
  12. package/dist/components/Dashboard/index.vue2.js +59 -30
  13. package/dist/components/ai/AiMessageBubble.vue.js +3 -3
  14. package/dist/components/ai/AiSender.vue.js +2 -2
  15. package/dist/components/ai/AiThinking.vue.js +1 -1
  16. package/dist/components/ai/UserMessageBubble.vue.js +3 -3
  17. package/dist/components/auxiliary/ColorPanel.vue.js +3 -3
  18. package/dist/components/auxiliary/ColorPanel.vue2.js +9 -9
  19. package/dist/components/auxiliary/FileUpload.vue.js +2 -2
  20. package/dist/components/auxiliary/PersonPanel.vue.js +1 -1
  21. package/dist/components/auxiliary/PersonPanel.vue2.js +10 -10
  22. package/dist/components/base/Accordion.vue.js +1 -1
  23. package/dist/components/base/Avatar.vue.js +3 -3
  24. package/dist/components/base/Avatar.vue2.js +43 -43
  25. package/dist/components/base/Badge.vue.js +1 -1
  26. package/dist/components/base/Badge.vue2.js +35 -35
  27. package/dist/components/base/ButtonGroup.vue.js +2 -2
  28. package/dist/components/base/ChainItem.vue.js +2 -2
  29. package/dist/components/base/ChainItem.vue2.js +30 -30
  30. package/dist/components/base/DescBlock.vue.js +3 -3
  31. package/dist/components/base/DropdownMenu.vue.js +2 -2
  32. package/dist/components/base/EmptyState.vue.js +1 -1
  33. package/dist/components/base/InfoCard.vue.js +2 -2
  34. package/dist/components/base/InfoCard.vue2.js +66 -66
  35. package/dist/components/base/MonitorItem.vue.js +1 -1
  36. package/dist/components/base/MonitorItem.vue2.js +16 -16
  37. package/dist/components/base/PersonaCard.vue.js +1 -1
  38. package/dist/components/base/PersonaCard.vue2.js +81 -81
  39. package/dist/components/base/ProgressBar.vue.js +2 -2
  40. package/dist/components/base/ProgressBar.vue2.js +16 -16
  41. package/dist/components/base/RangeSlider.vue.js +1 -1
  42. package/dist/components/base/RefTag.vue.js +2 -2
  43. package/dist/components/base/RefTag.vue2.js +20 -20
  44. package/dist/components/base/SearchHighlight.vue.js +1 -1
  45. package/dist/components/base/SectionBlock.vue.js +1 -1
  46. package/dist/components/base/SectionBlock.vue2.js +44 -44
  47. package/dist/components/base/StatisticCard.vue.js +2 -2
  48. package/dist/components/base/StatisticCard.vue2.js +24 -24
  49. package/dist/components/base/StatusIndicator.vue.js +2 -2
  50. package/dist/components/base/StatusIndicator.vue2.js +30 -30
  51. package/dist/components/base/StatusSummary.vue.js +2 -2
  52. package/dist/components/base/StatusSummary.vue2.js +23 -23
  53. package/dist/components/base/Stepper.vue.js +2 -2
  54. package/dist/components/base/Switch.vue.js +2 -2
  55. package/dist/components/base/ToolbarBtn.vue.js +1 -1
  56. package/dist/components/base/ViewModeGroup.vue.js +3 -3
  57. package/dist/components/base/ViewSwitcher.vue.js +2 -2
  58. package/dist/components/base/ViewTab.vue.js +4 -4
  59. package/dist/components/breadcrumb/Breadcrumb.vue.js +2 -2
  60. package/dist/components/breadcrumb/BreadcrumbItem.vue.js +1 -1
  61. package/dist/components/database/DatabaseView.vue.js +2 -2
  62. package/dist/components/database/DatabaseView.vue2.js +482 -412
  63. package/dist/components/detail/CommentItem.vue.js +2 -2
  64. package/dist/components/detail/CommentItem.vue2.js +8 -8
  65. package/dist/components/detail/DetailLayout.vue.d.ts +12 -1
  66. package/dist/components/detail/DetailLayout.vue.js +2 -2
  67. package/dist/components/detail/DetailLayout.vue2.js +115 -68
  68. package/dist/components/editor/BlockQuote.vue.js +2 -2
  69. package/dist/components/editor/CodeBlock.vue.js +2 -2
  70. package/dist/components/editor/ContentBlock.vue.js +2 -2
  71. package/dist/components/editor/RefLink.vue.js +2 -2
  72. package/dist/components/editor/RichTextEditor.vue.js +1 -1
  73. package/dist/components/field/FieldAttachment.vue.js +1 -1
  74. package/dist/components/field/FieldCreator.vue.js +1 -1
  75. package/dist/components/field/FieldCurrency.vue.js +2 -2
  76. package/dist/components/field/FieldMarkdownPreview.vue.js +2 -2
  77. package/dist/components/field/FieldMultiSelect.vue.js +2 -2
  78. package/dist/components/field/FieldProgress.vue.js +2 -2
  79. package/dist/components/field/FieldRating.vue.js +2 -2
  80. package/dist/components/field/FieldRelation.vue.js +1 -1
  81. package/dist/components/field/FieldRichText.vue.js +1 -1
  82. package/dist/components/field/FieldSelect.vue.js +2 -2
  83. package/dist/components/gallery/GalleryCard.vue.js +2 -2
  84. package/dist/components/gallery/GalleryCard.vue2.js +34 -30
  85. package/dist/components/gallery/GalleryView.vue.d.ts +3 -1
  86. package/dist/components/gallery/GalleryView.vue.js +1 -1
  87. package/dist/components/gallery/GalleryView.vue2.js +51 -27
  88. package/dist/components/kanban/KanbanBoard.vue.js +4 -4
  89. package/dist/components/kanban/KanbanCard.vue.js +2 -2
  90. package/dist/components/kanban/KanbanColumn.vue.js +2 -2
  91. package/dist/components/kanban/KanbanColumn.vue2.js +16 -16
  92. package/dist/components/kanban/QuickAddRow.vue.js +1 -1
  93. package/dist/components/layout/AppLayout.vue.js +2 -2
  94. package/dist/components/layout/Navbar.vue.js +3 -3
  95. package/dist/components/layout/Sidebar.vue.js +2 -2
  96. package/dist/components/layout/StatusBar.vue.js +2 -2
  97. package/dist/components/mermaid/MermaidChart.vue.js +2 -2
  98. package/dist/components/overlay/Dialog.vue.js +2 -2
  99. package/dist/components/overlay/Drawer.vue.d.ts +2 -0
  100. package/dist/components/overlay/Drawer.vue.js +2 -2
  101. package/dist/components/overlay/Drawer.vue2.js +25 -24
  102. package/dist/components/overlay/Modal.vue.js +1 -1
  103. package/dist/components/overlay/SidePanel.vue.js +2 -2
  104. package/dist/components/overlay/SidePanel.vue2.js +3 -2
  105. package/dist/components/split/SplitPane.vue.js +2 -2
  106. package/dist/components/table/ColumnHeaderMenu.vue.js +1 -1
  107. package/dist/components/table/DataTable.vue.d.ts +26 -2
  108. package/dist/components/table/DataTable.vue.js +2 -2
  109. package/dist/components/table/DataTable.vue2.js +738 -603
  110. package/dist/components/table/DetailSheet.vue.js +1 -1
  111. package/dist/components/table/FieldCell.vue.js +2 -2
  112. package/dist/components/table/FieldCell.vue2.js +26 -24
  113. package/dist/components/table/FieldTypePicker.vue.js +4 -4
  114. package/dist/components/table/MobileListView.vue.js +2 -2
  115. package/dist/components/table/NewRowBtn.vue.js +2 -2
  116. package/dist/components/table/TableColumnManager.vue.js +2 -2
  117. package/dist/components/table/TableDataRow.vue.d.ts +19 -0
  118. package/dist/components/table/TableDataRow.vue.js +1 -1
  119. package/dist/components/table/TableDataRow.vue2.js +110 -73
  120. package/dist/components/table/TableFilterPanel.vue.js +2 -2
  121. package/dist/components/table/TableGroupRow.vue.js +2 -2
  122. package/dist/components/table/TableHeaderRow.vue.js +2 -2
  123. package/dist/components/table/TableToolbar.vue.js +2 -2
  124. package/dist/components/tabs/Tabs.vue.js +1 -1
  125. package/dist/components/timeline/ActivityTimeline.vue.js +1 -1
  126. package/dist/components/timeline/ActivityTimeline.vue2.js +27 -27
  127. package/dist/components/timeline/GanttRow.vue.js +2 -2
  128. package/dist/components/timeline/GanttRow.vue2.js +21 -18
  129. package/dist/components/timeline/GanttTimeline.vue.js +2 -2
  130. package/dist/components/toast/ToastItem.vue.js +2 -2
  131. package/dist/components/toast/ToastItem.vue2.js +39 -39
  132. package/dist/plugin.js +5 -3
  133. package/dist/style.css +1 -1
  134. package/package.json +1 -1
@@ -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 n, normalizeStyle as u, renderSlot as h, toDisplayString as a } from "vue";
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" }, w = { class: "of-activity-timeline__header" }, z = { class: "of-activity-timeline__action" }, D = {
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
- }, A = { class: "of-activity-timeline__progress-track" }, F = { class: "of-activity-timeline__progress-value" }, I = {
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
- }, P = /* @__PURE__ */ k({
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(r) {
31
- const p = r, d = [0, 1, 2], v = g(
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 y(i) {
38
- return i === "done" ? "var(--of-color-success)" : i === "start" ? "var(--of-color-warning)" : "var(--of-color-info)";
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": r.loading
45
+ "aria-busy": c.loading
46
46
  }, [
47
- r.loading ? (s(), o("div", C, [
48
- (s(), o(f, null, m(d, (t) => e("div", {
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 < d.length - 1 ? (s(), o("span", $)) : n("", !0)
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(v.value, (t, c) => (s(), o("div", {
63
- key: `${t.action}-${t.time ?? c}-${c}`,
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: y(t.status) })
69
+ style: u({ backgroundColor: v(t.status) })
70
70
  }, null, 4),
71
- c < v.value.length - 1 ? (s(), o("span", S)) : n("", !0)
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: c
76
+ index: r
77
77
  }, () => [
78
- e("div", w, [
79
- e("span", z, a(t.action), 1),
80
- t.actor ? (s(), o("span", D, a(t.actor), 1)) : n("", !0)
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, a(t.detail), 1)) : n("", !0),
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", A, [
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: y(t.status)
89
+ backgroundColor: v(t.status)
90
90
  })
91
91
  }, null, 4)
92
92
  ]),
93
- e("span", F, a(_(t.progress)) + "% ", 1)
94
- ])) : n("", !0),
95
- t.time ? (s(), o("p", I, a(t.time), 1)) : n("", !0)
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
- P as default
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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-27ccf798"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dd4c6c6a"]]);
5
5
  export {
6
- f as default
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 ? { background: t.item.barColor, color: "var(--of-color-gray-800)" } : {
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 e = h(
31
+ const a = h(
29
32
  t.item.status || "",
30
33
  M(X, t.statusColorMap)
31
34
  );
32
- return e.dot ?? e.style.color;
35
+ return a.dot ?? a.style.color;
33
36
  }), L = n(() => {
34
- const e = (a) => {
35
- const o = /* @__PURE__ */ new Date(`${a}T00:00:00`);
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 `${e(t.item.startDate)} - ${e(t.item.endDate)}`;
41
+ return `${a(t.item.startDate)} - ${a(t.item.endDate)}`;
39
42
  });
40
- function v(e, a) {
41
- t.readonly || (e.preventDefault(), e.stopPropagation(), s.value = !0, u.value = a, g = e.clientX, f = t.offsetDays, c = t.durationDays, window.addEventListener("mousemove", p), window.addEventListener("mouseup", w));
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(e) {
46
+ function p(a) {
44
47
  if (!s.value || !u.value) return;
45
- const a = Math.round((e.clientX - g) / t.dayWidth);
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 + a, t.totalDays - 1));
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 + a), W = Math.max(1, t.totalDays - t.offsetDays);
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(e) {
70
- e.key !== "Enter" && e.key !== " " || (e.preventDefault(), d("click", t.item));
72
+ function P(a) {
73
+ a.key !== "Enter" && a.key !== " " || (a.preventDefault(), d("click", t.item));
71
74
  }
72
- return (e, a) => (A(), R("div", {
75
+ return (a, e) => (A(), R("div", {
73
76
  class: "gantt-row",
74
77
  role: "button",
75
78
  tabindex: "0",
76
- onClick: a[2] || (a[2] = (o) => d("click", i.item)),
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: a[0] || (a[0] = (o) => v(o, "move"))
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: a[1] || (a[1] = z((o) => v(o, "resize-end"), ["stop"]))
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 a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-2d350e85"]]);
4
+ const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-44d8d394"]]);
5
5
  export {
6
- a as default
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 p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1b04945c"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2c0c8e01"]]);
5
5
  export {
6
- p as default
6
+ c as default
7
7
  };
@@ -1,76 +1,76 @@
1
- import { defineComponent as m, computed as a, openBlock as l, createElementBlock as s, normalizeStyle as g, normalizeClass as C, createElementVNode as r, createBlock as _, resolveDynamicComponent as p, toDisplayString as n, createCommentVNode as y, createVNode as k, unref as h } from "vue";
2
- import { XCircle as L, AlertTriangle as z, CheckCircle2 as $, Info as B, X as I } from "lucide-vue-next";
3
- const N = ["role", "aria-label"], V = { class: "of-toast__icon" }, w = { class: "of-toast__content" }, x = {
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__ */ m({
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: f }) {
13
- const t = o, i = f, d = {
14
- info: B,
15
- success: $,
16
- warning: z,
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
- }, b = {
18
+ }, d = {
19
19
  info: {
20
- icon: "var(--of-color-blue-500, #3b82f6)",
21
- border: "var(--of-color-blue-200, #bfdbfe)",
22
- borderLeft: "var(--of-color-blue-500, #3b82f6)",
23
- bg: "var(--of-color-blue-50, #eff6ff)"
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-green-500, #22c55e)",
27
- border: "var(--of-color-green-200, #bbf7d0)",
28
- borderLeft: "var(--of-color-green-500, #22c55e)",
29
- bg: "var(--of-color-green-50, #f0fdf4)"
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-orange-500, #f97316)",
33
- border: "var(--of-color-orange-200, #fed7aa)",
34
- borderLeft: "var(--of-color-orange-500, #f97316)",
35
- bg: "var(--of-color-orange-50, #fff7ed)"
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-red-500, #ef4444)",
39
- border: "var(--of-color-red-200, #fecaca)",
40
- borderLeft: "var(--of-color-red-500, #ef4444)",
41
- bg: "var(--of-color-red-50, #fef2f2)"
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
- }, v = a(() => d[t.toast.type]), e = a(() => b[t.toast.type]), u = a(() => t.toast.type === "error" ? "alertdialog" : "alert");
44
- return (E, c) => (l(), s("div", {
45
- class: C(["of-toast", `of-toast--${o.toast.type}`]),
46
- style: g({
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: u.value,
51
+ role: b.value,
52
52
  "aria-label": `${o.toast.type}: ${o.toast.message}`
53
53
  }, [
54
- r("div", V, [
55
- (l(), _(p(v.value), {
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", w, [
62
- o.toast.title ? (l(), s("p", x, n(o.toast.title), 1)) : y("", !0),
63
- r("p", D, n(o.toast.message), 1)
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: c[0] || (c[0] = (M) => i("close"))
69
+ onClick: l[0] || (l[0] = (M) => i("close"))
70
70
  }, [
71
- k(h(I), { size: 16 })
71
+ k(h(B), { size: 16 })
72
72
  ])
73
- ], 14, N));
73
+ ], 14, I));
74
74
  }
75
75
  });
76
76
  export {
package/dist/plugin.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import { defineAsyncComponent as i } from "vue";
2
2
  /* empty css */
3
+ /* empty css */
4
+ /* empty css */
3
5
  /* empty css */
4
6
  function t(n, r) {
5
7
  const o = i(() => n().then((e) => e.default));
@@ -253,7 +255,7 @@ const a = t(() => import("./components/base/ViewTab.vue.js"), "ViewTab"), s = t(
253
255
  G,
254
256
  f,
255
257
  F
256
- ], qt = {
258
+ ], Wt = {
257
259
  install(n) {
258
260
  _t.forEach((r) => {
259
261
  const o = r;
@@ -262,6 +264,6 @@ const a = t(() => import("./components/base/ViewTab.vue.js"), "ViewTab"), s = t(
262
264
  }
263
265
  };
264
266
  export {
265
- qt as OneflowUI,
266
- qt as default
267
+ Wt as OneflowUI,
268
+ Wt as default
267
269
  };