@oneflowui/ui 0.5.6 → 0.5.8

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 (213) hide show
  1. package/README.md +11 -0
  2. package/dist/components/ContextMenu/index.vue.js +2 -2
  3. package/dist/components/Dashboard/charts/BarChart.vue.js +2 -2
  4. package/dist/components/Dashboard/charts/PieChart.vue.js +2 -2
  5. package/dist/components/Dashboard/index.vue.d.ts +3 -2
  6. package/dist/components/Dashboard/index.vue.js +2 -2
  7. package/dist/components/ai/AiSender.vue.js +2 -2
  8. package/dist/components/ai/AiSender.vue2.js +8 -7
  9. package/dist/components/auxiliary/ColorPanel.vue.js +2 -2
  10. package/dist/components/auxiliary/ColorPanel.vue2.js +25 -23
  11. package/dist/components/auxiliary/FileUpload.vue.js +2 -2
  12. package/dist/components/auxiliary/FileUpload.vue2.js +1 -0
  13. package/dist/components/auxiliary/PersonPanel.vue.js +1 -1
  14. package/dist/components/auxiliary/PersonPanel.vue2.js +2 -1
  15. package/dist/components/base/Accordion.vue.js +1 -1
  16. package/dist/components/base/Avatar.vue.d.ts +3 -0
  17. package/dist/components/base/Avatar.vue.js +4 -4
  18. package/dist/components/base/Avatar.vue2.js +8 -8
  19. package/dist/components/base/Badge.vue.d.ts +2 -0
  20. package/dist/components/base/Badge.vue.js +2 -2
  21. package/dist/components/base/Badge.vue2.js +2 -2
  22. package/dist/components/base/ButtonGroup.vue.js +2 -2
  23. package/dist/components/base/ButtonGroup.vue2.js +2 -2
  24. package/dist/components/base/ChainItem.vue.d.ts +6 -0
  25. package/dist/components/base/ChainItem.vue.js +2 -2
  26. package/dist/components/base/ChainItem.vue2.js +17 -17
  27. package/dist/components/base/DropdownMenu.vue.js +2 -2
  28. package/dist/components/base/DropdownMenu.vue2.js +22 -20
  29. package/dist/components/base/EmptyState.vue.js +2 -2
  30. package/dist/components/base/EmptyState.vue2.js +2 -2
  31. package/dist/components/base/InfoCard.vue.d.ts +9 -0
  32. package/dist/components/base/InfoCard.vue.js +2 -2
  33. package/dist/components/base/InfoCard.vue2.js +65 -57
  34. package/dist/components/base/MonitorItem.vue.js +2 -2
  35. package/dist/components/base/MonitorItem.vue2.js +33 -25
  36. package/dist/components/base/PersonaCard.vue.d.ts +5 -0
  37. package/dist/components/base/PersonaCard.vue.js +3 -3
  38. package/dist/components/base/PersonaCard.vue2.js +56 -50
  39. package/dist/components/base/ProgressBar.vue.d.ts +1 -0
  40. package/dist/components/base/ProgressBar.vue.js +2 -2
  41. package/dist/components/base/ProgressBar.vue2.js +10 -10
  42. package/dist/components/base/RangeSlider.vue.d.ts +15 -0
  43. package/dist/components/base/RangeSlider.vue.js +1 -1
  44. package/dist/components/base/RangeSlider.vue2.js +22 -15
  45. package/dist/components/base/RefTag.vue.d.ts +4 -0
  46. package/dist/components/base/RefTag.vue.js +3 -3
  47. package/dist/components/base/RefTag.vue2.js +14 -14
  48. package/dist/components/base/SearchHighlight.vue.js +1 -1
  49. package/dist/components/base/SectionBlock.vue.js +2 -2
  50. package/dist/components/base/SectionBlock.vue2.js +54 -48
  51. package/dist/components/base/SelectBadge.vue.d.ts +5 -0
  52. package/dist/components/base/SelectBadge.vue.js +3 -3
  53. package/dist/components/base/SelectBadge.vue2.js +36 -28
  54. package/dist/components/base/StatisticCard.vue.js +1 -1
  55. package/dist/components/base/StatusIndicator.vue.js +2 -2
  56. package/dist/components/base/StatusIndicator.vue2.js +2 -2
  57. package/dist/components/base/StatusSummary.vue.js +2 -2
  58. package/dist/components/base/Stepper.vue.js +2 -2
  59. package/dist/components/base/Switch.vue.js +2 -2
  60. package/dist/components/base/ToolbarBtn.vue.js +2 -2
  61. package/dist/components/base/ViewModeGroup.vue.js +1 -1
  62. package/dist/components/base/ViewModeGroup.vue2.js +3 -3
  63. package/dist/components/base/ViewSwitcher.vue.js +1 -1
  64. package/dist/components/base/ViewSwitcher.vue2.js +3 -3
  65. package/dist/components/base/ViewTab.vue.js +1 -1
  66. package/dist/components/base/ViewTab.vue2.js +5 -6
  67. package/dist/components/breadcrumb/Breadcrumb.vue.js +2 -2
  68. package/dist/components/breadcrumb/BreadcrumbItem.vue.js +2 -2
  69. package/dist/components/database/DatabaseView.vue.d.ts +6 -1
  70. package/dist/components/database/DatabaseView.vue.js +2 -2
  71. package/dist/components/database/DatabaseView.vue2.js +438 -293
  72. package/dist/components/detail/PropPanel.vue.js +2 -2
  73. package/dist/components/detail/PropPanel.vue2.js +34 -30
  74. package/dist/components/detail/PropRow.vue.d.ts +6 -0
  75. package/dist/components/detail/PropRow.vue.js +2 -2
  76. package/dist/components/detail/PropRow.vue2.js +24 -24
  77. package/dist/components/editor/BlockQuote.vue.d.ts +2 -1
  78. package/dist/components/editor/BlockQuote.vue.js +1 -1
  79. package/dist/components/editor/BlockQuote.vue2.js +43 -29
  80. package/dist/components/editor/ContentBlock.vue.d.ts +4 -2
  81. package/dist/components/editor/ContentBlock.vue.js +2 -2
  82. package/dist/components/editor/ContentBlock.vue2.js +54 -33
  83. package/dist/components/editor/RichTextEditor.vue.js +2 -2
  84. package/dist/components/editor/RichTextEditor.vue2.js +10 -14
  85. package/dist/components/field/FieldAttachment.vue.js +2 -2
  86. package/dist/components/field/FieldAttachment.vue2.js +30 -32
  87. package/dist/components/field/FieldAutoNumber.vue.js +2 -2
  88. package/dist/components/field/FieldCheckbox.vue.js +2 -2
  89. package/dist/components/field/FieldCheckbox.vue2.js +13 -11
  90. package/dist/components/field/FieldCreator.vue.js +2 -2
  91. package/dist/components/field/FieldCurrency.vue.js +2 -2
  92. package/dist/components/field/FieldCurrency.vue2.js +15 -14
  93. package/dist/components/field/FieldDate.vue.js +1 -1
  94. package/dist/components/field/FieldDate.vue2.js +14 -16
  95. package/dist/components/field/FieldDatetime.vue.js +1 -1
  96. package/dist/components/field/FieldDatetime.vue2.js +12 -11
  97. package/dist/components/field/FieldEmail.vue.js +2 -2
  98. package/dist/components/field/FieldEmail.vue2.js +14 -13
  99. package/dist/components/field/FieldMarkdownPreview.vue.js +2 -2
  100. package/dist/components/field/FieldMultiSelect.vue.d.ts +2 -2
  101. package/dist/components/field/FieldMultiSelect.vue.js +2 -2
  102. package/dist/components/field/FieldMultiSelect.vue2.js +80 -75
  103. package/dist/components/field/FieldNumber.vue.js +3 -3
  104. package/dist/components/field/FieldNumber.vue2.js +19 -18
  105. package/dist/components/field/FieldPhone.vue.js +2 -2
  106. package/dist/components/field/FieldPhone.vue2.js +12 -11
  107. package/dist/components/field/FieldProgress.vue.js +1 -1
  108. package/dist/components/field/FieldProgress.vue2.js +18 -17
  109. package/dist/components/field/FieldRating.vue.js +2 -2
  110. package/dist/components/field/FieldRating.vue2.js +22 -16
  111. package/dist/components/field/FieldRelation.vue.js +1 -1
  112. package/dist/components/field/FieldRelation.vue2.js +25 -22
  113. package/dist/components/field/FieldRichText.vue.js +1 -1
  114. package/dist/components/field/FieldRichText.vue2.js +10 -7
  115. package/dist/components/field/FieldSelect.vue.js +2 -2
  116. package/dist/components/field/FieldSelect.vue2.js +81 -63
  117. package/dist/components/field/FieldText.vue.js +2 -2
  118. package/dist/components/field/FieldText.vue2.js +17 -16
  119. package/dist/components/field/FieldUrl.vue.js +2 -2
  120. package/dist/components/field/FieldUrl.vue2.js +17 -16
  121. package/dist/components/form/FormDesigner.vue.js +2 -2
  122. package/dist/components/form/FormDesigner.vue2.js +83 -78
  123. package/dist/components/gallery/GalleryCard.vue.d.ts +1 -1
  124. package/dist/components/gallery/GalleryCard.vue.js +2 -2
  125. package/dist/components/gallery/GalleryCard.vue2.js +2 -1
  126. package/dist/components/kanban/KanbanCard.vue.d.ts +3 -1
  127. package/dist/components/kanban/KanbanCard.vue.js +1 -1
  128. package/dist/components/kanban/KanbanCard.vue2.js +15 -14
  129. package/dist/components/kanban/KanbanColumn.vue.d.ts +2 -0
  130. package/dist/components/kanban/KanbanColumn.vue.js +2 -2
  131. package/dist/components/kanban/KanbanColumn.vue2.js +9 -9
  132. package/dist/components/kanban/QuickAddRow.vue.js +2 -2
  133. package/dist/components/kanban/QuickAddRow.vue2.js +15 -14
  134. package/dist/components/layout/Navbar.vue.js +3 -3
  135. package/dist/components/layout/Navbar.vue2.js +5 -4
  136. package/dist/components/layout/Sidebar.vue.js +2 -2
  137. package/dist/components/layout/Sidebar.vue2.js +1 -1
  138. package/dist/components/mermaid/MermaidChart.vue.js +2 -2
  139. package/dist/components/mermaid/MermaidChart.vue2.js +17 -17
  140. package/dist/components/overlay/Dialog.vue.d.ts +1 -0
  141. package/dist/components/overlay/Dialog.vue.js +1 -1
  142. package/dist/components/overlay/Dialog.vue2.js +9 -9
  143. package/dist/components/overlay/Drawer.vue.d.ts +2 -1
  144. package/dist/components/overlay/Drawer.vue.js +2 -2
  145. package/dist/components/overlay/Drawer.vue2.js +35 -29
  146. package/dist/components/overlay/Modal.vue.d.ts +2 -1
  147. package/dist/components/overlay/Modal.vue.js +1 -1
  148. package/dist/components/overlay/Modal.vue2.js +34 -28
  149. package/dist/components/overlay/SidePanel.vue.d.ts +1 -0
  150. package/dist/components/overlay/SidePanel.vue.js +1 -1
  151. package/dist/components/overlay/SidePanel.vue2.js +6 -6
  152. package/dist/components/split/SplitPane.vue.js +2 -2
  153. package/dist/components/split/SplitPane.vue2.js +11 -9
  154. package/dist/components/table/ColumnHeaderMenu.vue.d.ts +4 -2
  155. package/dist/components/table/ColumnHeaderMenu.vue.js +1 -1
  156. package/dist/components/table/ColumnHeaderMenu.vue2.js +42 -36
  157. package/dist/components/table/DataTable.vue.d.ts +9 -6
  158. package/dist/components/table/DataTable.vue.js +2 -2
  159. package/dist/components/table/DataTable.vue2.js +643 -521
  160. package/dist/components/table/DetailSheet.vue.d.ts +2 -0
  161. package/dist/components/table/DetailSheet.vue.js +2 -2
  162. package/dist/components/table/DetailSheet.vue2.js +154 -70
  163. package/dist/components/table/FieldCell.vue.d.ts +2 -1
  164. package/dist/components/table/FieldCell.vue.js +1 -1
  165. package/dist/components/table/FieldCell.vue2.js +57 -48
  166. package/dist/components/table/FieldTypePicker.vue.d.ts +1 -0
  167. package/dist/components/table/FieldTypePicker.vue.js +4 -4
  168. package/dist/components/table/FieldTypePicker.vue2.js +1 -1
  169. package/dist/components/table/MobileListView.vue.d.ts +3 -2
  170. package/dist/components/table/MobileListView.vue.js +2 -2
  171. package/dist/components/table/MobileListView.vue2.js +57 -50
  172. package/dist/components/table/TableColumnManager.vue.js +1 -1
  173. package/dist/components/table/TableColumnManager.vue2.js +29 -28
  174. package/dist/components/table/TableDataRow.vue.d.ts +5 -1
  175. package/dist/components/table/TableDataRow.vue.js +3 -3
  176. package/dist/components/table/TableDataRow.vue2.js +102 -63
  177. package/dist/components/table/TableFilterPanel.vue.js +2 -2
  178. package/dist/components/table/TableFilterPanel.vue2.js +3 -0
  179. package/dist/components/table/TableGroupRow.vue.d.ts +2 -0
  180. package/dist/components/table/TableGroupRow.vue.js +2 -2
  181. package/dist/components/table/TableGroupRow.vue2.js +35 -30
  182. package/dist/components/table/TableHeaderRow.vue.d.ts +3 -1
  183. package/dist/components/table/TableHeaderRow.vue.js +1 -1
  184. package/dist/components/table/TableHeaderRow.vue2.js +111 -58
  185. package/dist/components/table/TableToolbar.vue.js +1 -1
  186. package/dist/components/table/TableToolbar.vue2.js +2 -2
  187. package/dist/components/tabs/TabPanel.vue.js +4 -4
  188. package/dist/components/tabs/TabPanel.vue2.js +1 -1
  189. package/dist/components/tabs/Tabs.vue.js +2 -2
  190. package/dist/components/tabs/Tabs.vue2.js +2 -2
  191. package/dist/components/timeline/GanttRow.vue.d.ts +2 -0
  192. package/dist/components/timeline/GanttRow.vue.js +2 -2
  193. package/dist/components/timeline/GanttRow.vue2.js +68 -52
  194. package/dist/components/timeline/GanttTimeline.vue.d.ts +6 -0
  195. package/dist/components/timeline/GanttTimeline.vue.js +2 -2
  196. package/dist/components/timeline/GanttTimeline.vue2.js +24 -24
  197. package/dist/composables/useColumnResize.d.ts +4 -1
  198. package/dist/composables/useColumnResize.js +114 -45
  199. package/dist/composables/useKeyboardNavigation.d.ts +1 -1
  200. package/dist/composables/useRowDrag.d.ts +7 -5
  201. package/dist/composables/useRowDrag.js +24 -24
  202. package/dist/composables/useSupabaseProvider.d.ts +8 -1
  203. package/dist/composables/useTableData.d.ts +5 -3
  204. package/dist/composables/useTableGroup.d.ts +2 -2
  205. package/dist/composables/useViewPersistence.d.ts +32 -3
  206. package/dist/composables/useVirtualList.d.ts +1 -0
  207. package/dist/composables/useVirtualList.js +94 -81
  208. package/dist/plugin.js +103 -102
  209. package/dist/style.css +1 -1
  210. package/dist/types/index.d.ts +2 -1
  211. package/dist/utils/echarts.d.ts +1 -0
  212. package/dist/utils/supabaseSchema.d.ts +12 -0
  213. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as C, ref as s, onBeforeUnmount as E, openBlock as r, createElementBlock as l, mergeProps as h, createElementVNode as f, createVNode as d, unref as m, Transition as p, withCtx as v, createCommentVNode as i, Fragment as L, renderList as b, normalizeClass as x, createBlock as B, resolveDynamicComponent as M, toDisplayString as R, nextTick as z } from "vue";
1
+ import { defineComponent as C, ref as s, onBeforeUnmount as b, openBlock as r, createElementBlock as l, mergeProps as E, createElementVNode as f, createVNode as i, unref as m, Transition as p, withCtx as v, createCommentVNode as c, Fragment as h, renderList as L, normalizeClass as x, createBlock as B, resolveDynamicComponent as M, toDisplayString as R, nextTick as z } from "vue";
2
2
  import { MoreHorizontal as D } from "lucide-vue-next";
3
3
  import { resolveIcon as N } from "../../utils/icon.js";
4
4
  const V = ["aria-expanded"], $ = ["onClick"], F = /* @__PURE__ */ C({
@@ -8,32 +8,32 @@ const V = ["aria-expanded"], $ = ["onClick"], F = /* @__PURE__ */ C({
8
8
  items: {}
9
9
  },
10
10
  setup(_) {
11
- const n = s(!1), a = s(null), c = s(null);
11
+ const n = s(!1), a = s(null), d = s(null);
12
12
  function u(e) {
13
13
  var o;
14
14
  e.key === "Escape" && n.value && (n.value = !1, (o = a.value) == null || o.focus());
15
15
  }
16
- E(() => {
16
+ b(() => {
17
17
  typeof document > "u" || document.removeEventListener("keydown", u);
18
18
  });
19
19
  function k(e) {
20
20
  var o;
21
21
  e.onClick(), n.value = !1, document.removeEventListener("keydown", u), (o = a.value) == null || o.focus();
22
22
  }
23
- function w() {
23
+ function y() {
24
24
  var e;
25
25
  n.value = !n.value, n.value ? z(() => {
26
26
  var t;
27
27
  document.addEventListener("keydown", u);
28
- const o = (t = c.value) == null ? void 0 : t.querySelector('[role="menuitem"]');
28
+ const o = (t = d.value) == null ? void 0 : t.querySelector('[role="menuitem"]');
29
29
  o == null || o.focus();
30
30
  }) : (document.removeEventListener("keydown", u), (e = a.value) == null || e.focus());
31
31
  }
32
- function y() {
32
+ function w() {
33
33
  var e;
34
34
  n.value = !1, document.removeEventListener("keydown", u), (e = a.value) == null || e.focus();
35
35
  }
36
- return (e, o) => (r(), l("div", h({ class: "of-dropdown-menu" }, e.$attrs), [
36
+ return (e, o) => (r(), l("div", E({ class: "of-dropdown-menu" }, e.$attrs), [
37
37
  f("button", {
38
38
  ref_key: "triggerRef",
39
39
  ref: a,
@@ -41,45 +41,47 @@ const V = ["aria-expanded"], $ = ["onClick"], F = /* @__PURE__ */ C({
41
41
  "aria-haspopup": "true",
42
42
  "aria-expanded": n.value,
43
43
  "aria-label": "更多操作",
44
- onClick: w
44
+ onClick: y
45
45
  }, [
46
- d(m(D), { size: 18 })
46
+ i(m(D), { size: 18 })
47
47
  ], 8, V),
48
- d(p, { name: "of-dropdown-fade" }, {
48
+ i(p, { name: "of-dropdown-fade" }, {
49
49
  default: v(() => [
50
- n.value ? (r(), l("div", {
50
+ n.value ? (r(), l("button", {
51
51
  key: 0,
52
+ type: "button",
52
53
  class: "of-dropdown-menu__backdrop",
53
- onClick: y
54
- })) : i("", !0)
54
+ "aria-label": "关闭菜单",
55
+ onClick: w
56
+ })) : c("", !0)
55
57
  ]),
56
58
  _: 1
57
59
  }),
58
- d(p, { name: "of-dropdown-slide" }, {
60
+ i(p, { name: "of-dropdown-slide" }, {
59
61
  default: v(() => [
60
62
  n.value ? (r(), l("div", {
61
63
  key: 0,
62
64
  ref_key: "menuRef",
63
- ref: c,
65
+ ref: d,
64
66
  class: "of-dropdown-menu__content",
65
67
  role: "menu"
66
68
  }, [
67
- (r(!0), l(L, null, b(_.items, (t, g) => (r(), l("button", {
69
+ (r(!0), l(h, null, L(_.items, (t, g) => (r(), l("button", {
68
70
  key: g,
69
- onClick: (S) => k(t),
70
71
  class: x([
71
72
  "of-dropdown-menu__item",
72
73
  `of-dropdown-menu__item--${t.variant || "default"}`
73
74
  ]),
74
- role: "menuitem"
75
+ role: "menuitem",
76
+ onClick: (S) => k(t)
75
77
  }, [
76
78
  t.icon ? (r(), B(M(m(N)(t.icon)), {
77
79
  key: 0,
78
80
  class: "of-dropdown-menu__item-icon"
79
- })) : i("", !0),
81
+ })) : c("", !0),
80
82
  f("span", null, R(t.label), 1)
81
83
  ], 10, $))), 128))
82
- ], 512)) : i("", !0)
84
+ ], 512)) : c("", !0)
83
85
  ]),
84
86
  _: 1
85
87
  })
@@ -1,7 +1,7 @@
1
1
  import t from "./EmptyState.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-7d70479e"]]);
4
+ const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-a4f8b1ed"]]);
5
5
  export {
6
- a as default
6
+ r as default
7
7
  };
@@ -25,9 +25,9 @@ const u = { class: "of-empty-state__content" }, p = {
25
25
  t.description ? (e(), o("p", h, i(t.description), 1)) : n("", !0),
26
26
  t.action ? (e(), o("button", {
27
27
  key: 2,
28
+ class: "of-empty-state__action",
28
29
  onClick: c[0] || (c[0] = //@ts-ignore
29
- (...l) => t.action.onClick && t.action.onClick(...l)),
30
- class: "of-empty-state__action"
30
+ (...l) => t.action.onClick && t.action.onClick(...l))
31
31
  }, i(t.action.label), 1)) : n("", !0)
32
32
  ])
33
33
  ], 16));
@@ -35,10 +35,19 @@ declare const __VLS_component: import('vue').DefineComponent<InfoCardProps, {},
35
35
  }, string, import('vue').PublicProps, Readonly<InfoCardProps> & Readonly<{
36
36
  onClick?: ((e: MouseEvent) => any) | undefined;
37
37
  }>, {
38
+ date: string;
39
+ tags: string[];
40
+ type: string;
41
+ meta: string;
42
+ borderColor: string;
38
43
  variant: "memo" | "notify" | "history";
44
+ content: string;
39
45
  contentLines: number;
40
46
  importance: "normal" | "high";
47
+ author: string;
41
48
  unread: boolean;
49
+ subtitle: string;
50
+ typeColor: string;
42
51
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
43
52
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
44
53
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import o from "./InfoCard.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-79431801"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-e865ef8d"]]);
5
5
  export {
6
- m as default
6
+ e as default
7
7
  };
@@ -1,61 +1,61 @@
1
- import { defineComponent as S, useCssVars as E, computed as b, openBlock as t, createElementBlock as r, mergeProps as L, Fragment as f, renderSlot as s, createCommentVNode as n, createElementVNode as c, toDisplayString as i, normalizeStyle as u, renderList as B } from "vue";
1
+ import { defineComponent as E, useCssVars as L, computed as b, openBlock as t, createElementBlock as r, mergeProps as w, Fragment as f, renderSlot as c, createCommentVNode as n, createElementVNode as d, toDisplayString as i, normalizeStyle as u, renderList as B } from "vue";
2
2
  const P = {
3
3
  key: 0,
4
4
  class: "of-info-card__icon-area"
5
- }, A = { class: "of-info-card__body" }, T = { class: "of-info-card__title" }, V = { class: "of-info-card__footer" }, I = {
5
+ }, A = { class: "of-info-card__body" }, T = { class: "of-info-card__title" }, V = { class: "of-info-card__footer" }, D = {
6
6
  key: 1,
7
7
  class: "of-info-card__meta-text"
8
- }, N = {
8
+ }, I = {
9
9
  key: 2,
10
10
  class: "of-info-card__meta-text"
11
- }, O = { class: "of-info-card__body" }, w = { class: "of-info-card__title" }, z = {
11
+ }, K = { class: "of-info-card__body" }, M = { class: "of-info-card__title" }, N = {
12
12
  key: 1,
13
13
  class: "of-info-card__notify-meta"
14
- }, D = {
14
+ }, O = {
15
15
  key: 0,
16
16
  class: "of-info-card__actions"
17
- }, F = {
17
+ }, z = {
18
18
  key: 0,
19
19
  class: "of-info-card__icon-area"
20
- }, M = { class: "of-info-card__body" }, R = { class: "of-info-card__title" }, Y = {
20
+ }, F = { class: "of-info-card__body" }, R = { class: "of-info-card__title" }, Y = {
21
21
  key: 0,
22
22
  class: "of-info-card__subtitle"
23
23
  }, j = {
24
24
  key: 1,
25
25
  class: "of-info-card__actions"
26
- }, G = /* @__PURE__ */ S({
26
+ }, G = /* @__PURE__ */ E({
27
27
  name: "InfoCard",
28
28
  inheritAttrs: !1,
29
29
  __name: "InfoCard",
30
30
  props: {
31
31
  variant: { default: "memo" },
32
32
  title: {},
33
- content: {},
33
+ content: { default: void 0 },
34
34
  contentLines: { default: 3 },
35
- borderColor: {},
36
- tags: {},
35
+ borderColor: { default: void 0 },
36
+ tags: { default: void 0 },
37
37
  importance: { default: "normal" },
38
- author: {},
39
- date: {},
38
+ author: { default: void 0 },
39
+ date: { default: void 0 },
40
40
  unread: { type: Boolean, default: !1 },
41
- meta: {},
42
- subtitle: {},
43
- type: {},
44
- typeColor: {}
41
+ meta: { default: void 0 },
42
+ subtitle: { default: void 0 },
43
+ type: { default: void 0 },
44
+ typeColor: { default: void 0 }
45
45
  },
46
46
  emits: ["click"],
47
- setup(o, { emit: y }) {
48
- E((e) => ({
49
- v4daa9b0a: e.unread ? "var(--of-color-warning-light)" : "var(--of-color-bg-elevated)"
47
+ setup(o, { emit: m }) {
48
+ L((e) => ({
49
+ e6754980: e.unread ? "var(--of-color-warning-light)" : "var(--of-color-bg-elevated)"
50
50
  }));
51
- const a = o, m = y, g = {
51
+ const a = o, h = m, g = {
52
52
  模板: "var(--of-color-primary-500)",
53
53
  template: "var(--of-color-primary-500)",
54
54
  会话: "var(--of-color-success)",
55
55
  session: "var(--of-color-success)"
56
- }, h = b(() => a.variant === "memo" ? a.importance === "high" ? "var(--of-color-error)" : a.borderColor ?? "var(--of-color-info)" : a.variant === "history" ? a.typeColor ? a.typeColor : a.type && g[a.type] ? g[a.type] : a.borderColor ?? "var(--of-color-primary-500)" : "transparent"), k = b(() => {
56
+ }, k = b(() => a.variant === "memo" ? a.importance === "high" ? "var(--of-color-error)" : a.borderColor ?? "var(--of-color-info)" : a.variant === "history" ? a.typeColor ? a.typeColor : a.type && g[a.type] ? g[a.type] : a.borderColor ?? "var(--of-color-primary-500)" : "transparent"), _ = b(() => {
57
57
  const e = {
58
- "--of-ic-border": h.value
58
+ "--of-ic-border": k.value
59
59
  };
60
60
  return a.variant === "notify" && (e["--of-ic-unread-dot"] = a.unread ? "var(--of-color-info)" : "var(--of-color-text-tertiary)"), e;
61
61
  }), v = b(
@@ -63,7 +63,7 @@ const P = {
63
63
  "--of-ic-clamp": String(a.contentLines ?? 3)
64
64
  })
65
65
  );
66
- function _(e) {
66
+ function C(e) {
67
67
  const l = [
68
68
  {
69
69
  bg: "var(--of-badge-blue-bg)",
@@ -90,73 +90,81 @@ const P = {
90
90
  color: "var(--of-badge-gray-text)",
91
91
  border: "var(--of-badge-gray-border)"
92
92
  }
93
- ], d = l[e % l.length];
93
+ ], s = l[e % l.length];
94
94
  return {
95
- "--of-ic-tag-bg": d.bg,
96
- "--of-ic-tag-color": d.color,
97
- "--of-ic-tag-border": d.border
95
+ "--of-ic-tag-bg": s.bg,
96
+ "--of-ic-tag-color": s.color,
97
+ "--of-ic-tag-border": s.border
98
98
  };
99
99
  }
100
- function C(e) {
101
- m("click", e);
100
+ function y(e) {
101
+ h("click", e);
102
+ }
103
+ function $(e) {
104
+ e.key !== "Enter" && e.key !== " " || (e.preventDefault(), y(new MouseEvent("click")));
102
105
  }
103
- return (e, l) => (t(), r("div", L({
106
+ return (e, l) => (t(), r("div", w({
104
107
  class: ["of-info-card", `of-info-card--${o.variant}`],
105
- style: k.value
106
- }, e.$attrs, { onClick: C }), [
108
+ style: _.value,
109
+ role: "button",
110
+ tabindex: "0"
111
+ }, e.$attrs, {
112
+ onClick: y,
113
+ onKeydown: $
114
+ }), [
107
115
  o.variant === "memo" ? (t(), r(f, { key: 0 }, [
108
116
  e.$slots.icon ? (t(), r("div", P, [
109
- s(e.$slots, "icon", {}, void 0, !0)
117
+ c(e.$slots, "icon", {}, void 0, !0)
110
118
  ])) : n("", !0),
111
- c("div", A, [
112
- c("div", T, i(o.title), 1),
119
+ d("div", A, [
120
+ d("div", T, i(o.title), 1),
113
121
  o.content ? (t(), r("div", {
114
122
  key: 0,
115
123
  class: "of-info-card__content of-info-card__content--clamp",
116
124
  style: u(v.value)
117
125
  }, i(o.content), 5)) : n("", !0),
118
- c("div", V, [
119
- o.tags && o.tags.length ? (t(!0), r(f, { key: 0 }, B(o.tags, (d, $) => (t(), r("span", {
120
- key: d,
126
+ d("div", V, [
127
+ o.tags && o.tags.length ? (t(!0), r(f, { key: 0 }, B(o.tags, (s, S) => (t(), r("span", {
128
+ key: s,
121
129
  class: "of-info-card__tag",
122
- style: u(_($))
123
- }, i(d), 5))), 128)) : n("", !0),
124
- o.author ? (t(), r("span", I, i(o.author), 1)) : n("", !0),
125
- o.date ? (t(), r("span", N, i(o.date), 1)) : n("", !0),
126
- s(e.$slots, "footer", {}, void 0, !0)
130
+ style: u(C(S))
131
+ }, i(s), 5))), 128)) : n("", !0),
132
+ o.author ? (t(), r("span", D, i(o.author), 1)) : n("", !0),
133
+ o.date ? (t(), r("span", I, i(o.date), 1)) : n("", !0),
134
+ c(e.$slots, "footer", {}, void 0, !0)
127
135
  ])
128
136
  ])
129
137
  ], 64)) : o.variant === "notify" ? (t(), r(f, { key: 1 }, [
130
- l[0] || (l[0] = c("span", { class: "of-info-card__dot" }, null, -1)),
131
- c("div", O, [
132
- c("div", w, i(o.title), 1),
138
+ l[0] || (l[0] = d("span", { class: "of-info-card__dot" }, null, -1)),
139
+ d("div", K, [
140
+ d("div", M, i(o.title), 1),
133
141
  o.content ? (t(), r("div", {
134
142
  key: 0,
135
143
  class: "of-info-card__content of-info-card__content--clamp",
136
144
  style: u(v.value)
137
145
  }, i(o.content), 5)) : n("", !0),
138
- o.meta ? (t(), r("div", z, i(o.meta), 1)) : n("", !0),
139
- s(e.$slots, "footer", {}, void 0, !0)
146
+ o.meta ? (t(), r("div", N, i(o.meta), 1)) : n("", !0),
147
+ c(e.$slots, "footer", {}, void 0, !0)
140
148
  ]),
141
- e.$slots.actions ? (t(), r("div", D, [
142
- s(e.$slots, "actions", {}, void 0, !0)
149
+ e.$slots.actions ? (t(), r("div", O, [
150
+ c(e.$slots, "actions", {}, void 0, !0)
143
151
  ])) : n("", !0)
144
152
  ], 64)) : o.variant === "history" ? (t(), r(f, { key: 2 }, [
145
- e.$slots.icon ? (t(), r("div", F, [
146
- s(e.$slots, "icon", {}, void 0, !0)
153
+ e.$slots.icon ? (t(), r("div", z, [
154
+ c(e.$slots, "icon", {}, void 0, !0)
147
155
  ])) : n("", !0),
148
- c("div", M, [
149
- c("div", R, i(o.title), 1),
156
+ d("div", F, [
157
+ d("div", R, i(o.title), 1),
150
158
  o.subtitle ? (t(), r("div", Y, i(o.subtitle), 1)) : n("", !0),
151
159
  o.content ? (t(), r("div", {
152
160
  key: 1,
153
161
  class: "of-info-card__content of-info-card__content--clamp",
154
162
  style: u(v.value)
155
163
  }, i(o.content), 5)) : n("", !0),
156
- s(e.$slots, "footer", {}, void 0, !0)
164
+ c(e.$slots, "footer", {}, void 0, !0)
157
165
  ]),
158
166
  e.$slots.actions ? (t(), r("div", j, [
159
- s(e.$slots, "actions", {}, void 0, !0)
167
+ c(e.$slots, "actions", {}, void 0, !0)
160
168
  ])) : n("", !0)
161
169
  ], 64)) : n("", !0)
162
170
  ], 16));
@@ -1,7 +1,7 @@
1
1
  import o from "./MonitorItem.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-ce396706"]]);
4
+ const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-264421cd"]]);
5
5
  export {
6
- p as default
6
+ _ as default
7
7
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as b, computed as o, openBlock as a, createElementBlock as n, mergeProps as h, toDisplayString as l, createCommentVNode as s, createElementVNode as e, normalizeStyle as r } from "vue";
2
- const y = {
1
+ import { defineComponent as y, computed as o, openBlock as a, createElementBlock as s, mergeProps as p, withKeys as r, withModifiers as m, toDisplayString as i, createCommentVNode as d, createElementVNode as t, normalizeStyle as u } from "vue";
2
+ const g = ["onKeydown"], C = {
3
3
  key: 0,
4
4
  class: "of-monitor-item__subtitle"
5
- }, g = { class: "of-monitor-item__label" }, p = { class: "of-monitor-item__progress" }, C = { class: "of-monitor-item__percentage" }, M = {
5
+ }, w = { class: "of-monitor-item__label" }, M = { class: "of-monitor-item__progress" }, S = { class: "of-monitor-item__percentage" }, x = {
6
6
  key: 1,
7
7
  class: "of-monitor-item__count"
8
- }, V = /* @__PURE__ */ b({
8
+ }, V = /* @__PURE__ */ y({
9
9
  name: "MonitorItem",
10
10
  inheritAttrs: !1,
11
11
  __name: "MonitorItem",
@@ -18,37 +18,45 @@ const y = {
18
18
  clickable: { type: Boolean, default: !1 }
19
19
  },
20
20
  emits: ["click"],
21
- setup(t, { emit: m }) {
22
- const i = t, u = m, c = o(() => Math.min(100, Math.max(0, i.value))), d = o(
23
- () => c.value === 100 ? "var(--of-color-success)" : i.color ?? "var(--of-color-primary-500)"
24
- ), f = o(() => ({
21
+ setup(e, { emit: f }) {
22
+ const l = e, v = f, c = o(() => Math.min(100, Math.max(0, l.value))), _ = o(
23
+ () => c.value === 100 ? "var(--of-color-success)" : l.color ?? "var(--of-color-primary-500)"
24
+ ), k = o(() => ({
25
25
  backgroundColor: "var(--of-color-gray-100)"
26
- })), v = o(() => ({
26
+ })), b = o(() => ({
27
27
  width: `${c.value}%`,
28
- background: d.value
28
+ background: _.value
29
29
  }));
30
- function _() {
31
- i.clickable && u("click");
30
+ function n() {
31
+ l.clickable && v("click");
32
32
  }
33
- return (k, S) => (a(), n("div", h({
34
- class: ["of-monitor-item", { "of-monitor-item--clickable": t.clickable }]
35
- }, k.$attrs, { onClick: _ }), [
36
- t.subtitle !== void 0 ? (a(), n("div", y, l(t.subtitle), 1)) : s("", !0),
37
- e("div", g, l(t.label), 1),
38
- e("div", p, [
39
- e("div", {
33
+ return (h, B) => (a(), s("div", p({
34
+ class: ["of-monitor-item", { "of-monitor-item--clickable": e.clickable }],
35
+ role: "button",
36
+ tabindex: "0"
37
+ }, h.$attrs, {
38
+ onClick: n,
39
+ onKeydown: [
40
+ r(m(n, ["prevent"]), ["enter"]),
41
+ r(m(n, ["prevent"]), ["space"])
42
+ ]
43
+ }), [
44
+ e.subtitle !== void 0 ? (a(), s("div", C, i(e.subtitle), 1)) : d("", !0),
45
+ t("div", w, i(e.label), 1),
46
+ t("div", M, [
47
+ t("div", {
40
48
  class: "of-monitor-item__track",
41
- style: r(f.value)
49
+ style: u(k.value)
42
50
  }, [
43
- e("div", {
51
+ t("div", {
44
52
  class: "of-monitor-item__fill",
45
- style: r(v.value)
53
+ style: u(b.value)
46
54
  }, null, 4)
47
55
  ], 4)
48
56
  ]),
49
- e("div", C, l(c.value) + "%", 1),
50
- t.count !== void 0 ? (a(), n("div", M, l(t.count), 1)) : s("", !0)
51
- ], 16));
57
+ t("div", S, i(c.value) + "%", 1),
58
+ e.count !== void 0 ? (a(), s("div", x, i(e.count), 1)) : d("", !0)
59
+ ], 16, g));
52
60
  }
53
61
  });
54
62
  export {
@@ -30,10 +30,15 @@ declare const __VLS_component: import('vue').DefineComponent<PersonaCardProps, {
30
30
  onClick?: (() => any) | undefined;
31
31
  "onUpdate:expanded"?: ((value: boolean) => any) | undefined;
32
32
  }>, {
33
+ title: string;
34
+ tags: string[];
33
35
  done: boolean;
34
36
  size: "sm" | "md";
37
+ color: string;
38
+ icon: string | Component;
35
39
  active: boolean;
36
40
  disabled: boolean;
41
+ subtitle: string;
37
42
  expanded: boolean;
38
43
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
39
44
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,7 +1,7 @@
1
1
  import o from "./PersonaCard.vue2.js";
2
2
  /* empty css */
3
- import a from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-0c8a7d5a"]]);
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-b283c2cd"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };