@oneflowui/ui 0.4.2 → 0.4.3

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 (233) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -0
  2. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  3. package/dist/components/ContextMenu/index.vue.js +7 -0
  4. package/dist/components/ContextMenu/index.vue2.js +91 -0
  5. package/dist/components/Dashboard/charts/BarChart.vue.js +7 -0
  6. package/dist/components/Dashboard/charts/BarChart.vue2.js +43 -0
  7. package/dist/components/Dashboard/charts/DoughnutChart.vue.js +23 -0
  8. package/dist/components/Dashboard/charts/DoughnutChart.vue2.js +4 -0
  9. package/dist/components/Dashboard/charts/NumberCard.vue.js +7 -0
  10. package/dist/components/Dashboard/charts/NumberCard.vue2.js +41 -0
  11. package/dist/components/Dashboard/charts/PieChart.vue.js +7 -0
  12. package/dist/components/Dashboard/charts/PieChart.vue2.js +53 -0
  13. package/dist/components/Dashboard/charts/TableChart.vue.js +7 -0
  14. package/dist/components/Dashboard/charts/TableChart.vue2.js +50 -0
  15. package/dist/components/Dashboard/index.vue.js +7 -0
  16. package/dist/components/Dashboard/index.vue2.js +104 -0
  17. package/dist/components/ai/AiMessageBubble.vue.js +7 -0
  18. package/dist/components/ai/AiMessageBubble.vue2.js +47 -0
  19. package/dist/components/ai/AiMessageList.vue.js +7 -0
  20. package/dist/components/ai/AiMessageList.vue2.js +78 -0
  21. package/dist/components/ai/AiSender.vue.js +7 -0
  22. package/dist/components/ai/AiSender.vue2.js +86 -0
  23. package/dist/components/ai/AiStreamingCursor.vue.js +7 -0
  24. package/dist/components/ai/AiStreamingCursor.vue2.js +16 -0
  25. package/dist/components/ai/AiThinking.vue.js +7 -0
  26. package/dist/components/ai/AiThinking.vue2.js +19 -0
  27. package/dist/components/ai/UserMessageBubble.vue.js +7 -0
  28. package/dist/components/ai/UserMessageBubble.vue2.js +34 -0
  29. package/dist/components/auxiliary/ColorPanel.vue.js +7 -0
  30. package/dist/components/auxiliary/ColorPanel.vue2.js +65 -0
  31. package/dist/components/auxiliary/FileUpload.vue.js +7 -0
  32. package/dist/components/auxiliary/FileUpload.vue2.js +90 -0
  33. package/dist/components/auxiliary/PersonPanel.vue.js +7 -0
  34. package/dist/components/auxiliary/PersonPanel.vue2.js +66 -0
  35. package/dist/components/base/Accordion.vue.js +7 -0
  36. package/dist/components/base/Accordion.vue2.js +78 -0
  37. package/dist/components/base/AddViewBtn.vue.js +7 -0
  38. package/dist/components/base/AddViewBtn.vue2.js +25 -0
  39. package/dist/components/base/Avatar.vue.js +7 -0
  40. package/dist/components/base/Avatar.vue2.js +72 -0
  41. package/dist/components/base/Badge.vue.js +7 -0
  42. package/dist/components/base/Badge.vue2.js +70 -0
  43. package/dist/components/base/ButtonGroup.vue.js +7 -0
  44. package/dist/components/base/ButtonGroup.vue2.js +40 -0
  45. package/dist/components/base/ChainItem.vue.js +7 -0
  46. package/dist/components/base/ChainItem.vue2.js +68 -0
  47. package/dist/components/base/DescBlock.vue.js +7 -0
  48. package/dist/components/base/DescBlock.vue2.js +13 -0
  49. package/dist/components/base/DropdownMenu.vue.js +7 -0
  50. package/dist/components/base/DropdownMenu.vue2.js +92 -0
  51. package/dist/components/base/EmptyState.vue.js +7 -0
  52. package/dist/components/base/EmptyState.vue2.js +38 -0
  53. package/dist/components/base/InfoCard.vue.js +7 -0
  54. package/dist/components/base/InfoCard.vue2.js +167 -0
  55. package/dist/components/base/MonitorItem.vue.js +7 -0
  56. package/dist/components/base/MonitorItem.vue2.js +56 -0
  57. package/dist/components/base/PersonaCard.vue.js +7 -0
  58. package/dist/components/base/PersonaCard.vue2.js +173 -0
  59. package/dist/components/base/ProgressBar.vue.js +7 -0
  60. package/dist/components/base/ProgressBar.vue2.js +49 -0
  61. package/dist/components/base/RangeSlider.vue.js +7 -0
  62. package/dist/components/base/RangeSlider.vue2.js +35 -0
  63. package/dist/components/base/RefTag.vue.js +7 -0
  64. package/dist/components/base/RefTag.vue2.js +52 -0
  65. package/dist/components/base/SectionBlock.vue.js +7 -0
  66. package/dist/components/base/SectionBlock.vue2.js +115 -0
  67. package/dist/components/base/SelectBadge.vue.js +7 -0
  68. package/dist/components/base/SelectBadge.vue2.js +81 -0
  69. package/dist/components/base/StatisticCard.vue.js +7 -0
  70. package/dist/components/base/StatisticCard.vue2.js +57 -0
  71. package/dist/components/base/StatusIndicator.vue.js +7 -0
  72. package/dist/components/base/StatusIndicator.vue2.js +54 -0
  73. package/dist/components/base/StatusSummary.vue.js +7 -0
  74. package/dist/components/base/StatusSummary.vue2.js +64 -0
  75. package/dist/components/base/Stepper.vue.js +7 -0
  76. package/dist/components/base/Stepper.vue2.js +70 -0
  77. package/dist/components/base/Switch.vue.js +7 -0
  78. package/dist/components/base/Switch.vue2.js +43 -0
  79. package/dist/components/base/ToolbarBtn.vue.js +7 -0
  80. package/dist/components/base/ToolbarBtn.vue2.js +30 -0
  81. package/dist/components/base/ViewModeGroup.vue.js +7 -0
  82. package/dist/components/base/ViewModeGroup.vue2.js +32 -0
  83. package/dist/components/base/ViewSwitcher.vue.js +7 -0
  84. package/dist/components/base/ViewSwitcher.vue2.js +73 -0
  85. package/dist/components/base/ViewTab.vue.js +7 -0
  86. package/dist/components/base/ViewTab.vue2.js +42 -0
  87. package/dist/components/breadcrumb/Breadcrumb.vue.js +7 -0
  88. package/dist/components/breadcrumb/Breadcrumb.vue2.js +52 -0
  89. package/dist/components/breadcrumb/BreadcrumbItem.vue.js +7 -0
  90. package/dist/components/breadcrumb/BreadcrumbItem.vue2.js +35 -0
  91. package/dist/components/detail/CommentItem.vue.js +7 -0
  92. package/dist/components/detail/CommentItem.vue2.js +29 -0
  93. package/dist/components/detail/DetailLayout.vue.js +7 -0
  94. package/dist/components/detail/DetailLayout.vue2.js +118 -0
  95. package/dist/components/detail/PropPanel.vue.js +7 -0
  96. package/dist/components/detail/PropPanel.vue2.js +51 -0
  97. package/dist/components/detail/PropRow.vue.js +7 -0
  98. package/dist/components/detail/PropRow.vue2.js +51 -0
  99. package/dist/components/editor/BlockQuote.vue.js +7 -0
  100. package/dist/components/editor/BlockQuote.vue2.js +45 -0
  101. package/dist/components/editor/CodeBlock.vue.js +7 -0
  102. package/dist/components/editor/CodeBlock.vue2.js +48 -0
  103. package/dist/components/editor/ContentBlock.vue.js +7 -0
  104. package/dist/components/editor/ContentBlock.vue2.js +49 -0
  105. package/dist/components/editor/RefLink.vue.js +7 -0
  106. package/dist/components/editor/RefLink.vue2.js +37 -0
  107. package/dist/components/editor/RichTextEditor.vue.js +7 -0
  108. package/dist/components/editor/RichTextEditor.vue2.js +132 -0
  109. package/dist/components/field/FieldCheckbox.vue.js +7 -0
  110. package/dist/{FieldCheckbox-CV3QtQ4Y.js → components/field/FieldCheckbox.vue2.js} +8 -9
  111. package/dist/components/field/FieldDate.vue.js +7 -0
  112. package/dist/{FieldDate-Bljx4jb7.js → components/field/FieldDate.vue2.js} +9 -10
  113. package/dist/components/field/FieldDatetime.vue.js +7 -0
  114. package/dist/{FieldDatetime-B52GfWrK.js → components/field/FieldDatetime.vue2.js} +11 -12
  115. package/dist/components/field/FieldEmail.vue.js +7 -0
  116. package/dist/{FieldEmail-UREMoue-.js → components/field/FieldEmail.vue2.js} +12 -13
  117. package/dist/components/field/FieldMultiSelect.vue.js +7 -0
  118. package/dist/{FieldMultiSelect-Dlay1Fop.js → components/field/FieldMultiSelect.vue2.js} +32 -33
  119. package/dist/components/field/FieldNumber.vue.js +7 -0
  120. package/dist/{FieldNumber-BjhfFhs6.js → components/field/FieldNumber.vue2.js} +8 -9
  121. package/dist/components/field/FieldRating.vue.js +7 -0
  122. package/dist/components/field/FieldRating.vue2.js +31 -0
  123. package/dist/components/field/FieldSelect.vue.js +7 -0
  124. package/dist/{FieldSelect-B39Ad8VH.js → components/field/FieldSelect.vue2.js} +34 -35
  125. package/dist/components/field/FieldText.vue.js +7 -0
  126. package/dist/{FieldText-Ry7f72Ug.js → components/field/FieldText.vue2.js} +13 -14
  127. package/dist/components/field/FieldUrl.vue.js +7 -0
  128. package/dist/components/field/FieldUrl.vue2.js +33 -0
  129. package/dist/components/form/FormDesigner.vue.js +7 -0
  130. package/dist/components/form/FormDesigner.vue2.js +245 -0
  131. package/dist/components/gallery/GalleryCard.vue.js +7 -0
  132. package/dist/components/gallery/GalleryCard.vue2.js +87 -0
  133. package/dist/components/gallery/GalleryView.vue.js +7 -0
  134. package/dist/components/gallery/GalleryView.vue2.js +48 -0
  135. package/dist/components/kanban/KanbanBoard.vue.js +7 -0
  136. package/dist/components/kanban/KanbanBoard.vue2.js +86 -0
  137. package/dist/components/kanban/KanbanCard.vue.js +7 -0
  138. package/dist/components/kanban/KanbanCard.vue2.js +56 -0
  139. package/dist/components/kanban/KanbanColumn.vue.js +7 -0
  140. package/dist/components/kanban/KanbanColumn.vue2.js +103 -0
  141. package/dist/components/kanban/QuickAddRow.vue.js +7 -0
  142. package/dist/components/kanban/QuickAddRow.vue2.js +58 -0
  143. package/dist/components/layout/AppLayout.vue.js +7 -0
  144. package/dist/components/layout/AppLayout.vue2.js +98 -0
  145. package/dist/components/layout/Navbar.vue.js +7 -0
  146. package/dist/components/layout/Navbar.vue2.js +70 -0
  147. package/dist/components/layout/Sidebar.vue.js +7 -0
  148. package/dist/components/layout/Sidebar.vue2.js +88 -0
  149. package/dist/components/layout/StatusBar.vue.js +7 -0
  150. package/dist/components/layout/StatusBar.vue2.js +37 -0
  151. package/dist/components/mermaid/MermaidChart.vue.js +7 -0
  152. package/dist/components/mermaid/MermaidChart.vue2.js +75 -0
  153. package/dist/components/overlay/Dialog.vue.js +7 -0
  154. package/dist/components/overlay/Dialog.vue2.js +89 -0
  155. package/dist/components/overlay/Drawer.vue.js +7 -0
  156. package/dist/components/overlay/Drawer.vue2.js +112 -0
  157. package/dist/components/overlay/Modal.vue.js +7 -0
  158. package/dist/components/overlay/Modal.vue2.js +115 -0
  159. package/dist/components/overlay/SidePanel.vue.js +7 -0
  160. package/dist/components/overlay/SidePanel.vue2.js +137 -0
  161. package/dist/components/split/SplitPane.vue.js +8 -0
  162. package/dist/components/split/SplitPane.vue2.js +68 -0
  163. package/dist/components/table/DataTable.vue.js +7 -0
  164. package/dist/components/table/DataTable.vue2.js +234 -0
  165. package/dist/components/table/FieldCell.vue.js +7 -0
  166. package/dist/components/table/FieldCell.vue2.js +71 -0
  167. package/dist/components/table/NewRowBtn.vue.js +7 -0
  168. package/dist/components/table/NewRowBtn.vue2.js +22 -0
  169. package/dist/components/table/TableColumnManager.vue.js +7 -0
  170. package/dist/components/table/TableColumnManager.vue2.js +100 -0
  171. package/dist/components/table/TableDataRow.vue.js +7 -0
  172. package/dist/components/table/TableDataRow.vue2.js +115 -0
  173. package/dist/components/table/TableFilterPanel.vue.js +7 -0
  174. package/dist/components/table/TableFilterPanel.vue2.js +142 -0
  175. package/dist/components/table/TableGroupRow.vue.js +7 -0
  176. package/dist/components/table/TableGroupRow.vue2.js +48 -0
  177. package/dist/components/table/TableHeaderRow.vue.js +7 -0
  178. package/dist/components/table/TableHeaderRow.vue2.js +69 -0
  179. package/dist/components/tabs/TabPanel.vue.js +7 -0
  180. package/dist/components/tabs/TabPanel.vue2.js +26 -0
  181. package/dist/components/tabs/Tabs.vue.js +7 -0
  182. package/dist/components/tabs/Tabs.vue2.js +87 -0
  183. package/dist/components/timeline/ActivityTimeline.vue.js +7 -0
  184. package/dist/components/timeline/ActivityTimeline.vue2.js +104 -0
  185. package/dist/components/timeline/GanttRow.vue.js +7 -0
  186. package/dist/components/timeline/GanttRow.vue2.js +110 -0
  187. package/dist/components/timeline/GanttTimeline.vue.js +7 -0
  188. package/dist/components/timeline/GanttTimeline.vue2.js +185 -0
  189. package/dist/components/toast/ToastContainer.vue.js +34 -0
  190. package/dist/components/toast/ToastContainer.vue3.js +5 -0
  191. package/dist/components/toast/ToastItem.vue.js +7 -0
  192. package/dist/components/toast/ToastItem.vue2.js +78 -0
  193. package/dist/composables/useAiChat.js +103 -0
  194. package/dist/composables/useBadge.js +76 -0
  195. package/dist/composables/useBreakpoint.js +16 -0
  196. package/dist/composables/useInlineEdit.js +28 -0
  197. package/dist/composables/useMarkdown.js +69 -0
  198. package/dist/composables/useStream.js +80 -0
  199. package/dist/composables/useTable.js +115 -0
  200. package/dist/composables/useTableColumns.js +24 -0
  201. package/dist/composables/useTableData.js +16 -0
  202. package/dist/composables/useTableFilter.js +97 -0
  203. package/dist/composables/useTableGroup.js +46 -0
  204. package/dist/composables/useToast.js +38 -0
  205. package/dist/composables/useTypewriter.js +56 -0
  206. package/dist/composables/useVirtualList.js +117 -0
  207. package/dist/constants/table.js +11 -0
  208. package/dist/index.js +301 -0
  209. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/core.js +5 -0
  210. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/bash.js +377 -0
  211. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/css.js +923 -0
  212. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/go.js +151 -0
  213. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/java.js +240 -0
  214. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/javascript.js +658 -0
  215. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/json.js +38 -0
  216. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/markdown.js +216 -0
  217. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/plaintext.js +13 -0
  218. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/python.js +399 -0
  219. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/rust.js +305 -0
  220. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/sql.js +615 -0
  221. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/typescript.js +753 -0
  222. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/xml.js +219 -0
  223. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/yaml.js +183 -0
  224. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js +1063 -0
  225. package/dist/style.css +1 -1
  226. package/dist/types/index.js +77 -0
  227. package/dist/utils/icon.js +15 -0
  228. package/package.json +13 -6
  229. package/dist/FieldRating-BKHUu-A1.js +0 -32
  230. package/dist/FieldUrl-bv0EB9sh.js +0 -34
  231. package/dist/index-DQph5iTq.js +0 -12936
  232. package/dist/oneflow-ui.js +0 -111
  233. package/dist/oneflow-ui.umd.cjs +0 -13
@@ -0,0 +1,89 @@
1
+ import { defineComponent as p, computed as d, openBlock as t, createBlock as c, withCtx as f, createElementVNode as o, normalizeClass as u, resolveDynamicComponent as v, toDisplayString as n, createElementBlock as r, createCommentVNode as s, renderSlot as x, unref as V, createTextVNode as w } from "vue";
2
+ import { CheckCircle2 as B, AlertCircle as T, AlertTriangle as z, Info as D, Loader2 as N } from "lucide-vue-next";
3
+ import A from "./Modal.vue.js";
4
+ const E = { class: "of-dialog" }, I = { class: "of-dialog__content" }, M = { class: "of-dialog__title" }, S = {
5
+ key: 0,
6
+ class: "of-dialog__text"
7
+ }, $ = ["disabled"], L = ["disabled"], G = /* @__PURE__ */ p({
8
+ __name: "Dialog",
9
+ props: {
10
+ modelValue: { type: Boolean },
11
+ title: { default: "提示" },
12
+ content: {},
13
+ confirmText: { default: "确认" },
14
+ cancelText: { default: "取消" },
15
+ type: { default: "info" },
16
+ loading: { type: Boolean, default: !1 },
17
+ width: { default: "420px" },
18
+ hideCancel: { type: Boolean, default: !1 }
19
+ },
20
+ emits: ["update:modelValue", "confirm", "cancel"],
21
+ setup(e, { emit: m }) {
22
+ const l = e, a = m, g = {
23
+ info: D,
24
+ warning: z,
25
+ danger: T,
26
+ success: B
27
+ }, h = d(() => `of-dialog__icon--${l.type}`), C = d(() => g[l.type]), b = d(
28
+ () => l.type === "danger" ? "of-dialog__btn--danger" : "of-dialog__btn--primary"
29
+ );
30
+ function y(i) {
31
+ a("update:modelValue", i);
32
+ }
33
+ function _() {
34
+ l.loading || a("confirm");
35
+ }
36
+ function k() {
37
+ a("cancel"), a("update:modelValue", !1);
38
+ }
39
+ return (i, U) => (t(), c(A, {
40
+ "model-value": e.modelValue,
41
+ width: e.width,
42
+ closable: !1,
43
+ "mask-closable": !e.loading,
44
+ class: "of-dialog-modal",
45
+ "onUpdate:modelValue": y
46
+ }, {
47
+ footer: f(() => [
48
+ e.hideCancel ? s("", !0) : (t(), r("button", {
49
+ key: 0,
50
+ class: "of-dialog__btn of-dialog__btn--cancel",
51
+ disabled: e.loading,
52
+ type: "button",
53
+ onClick: k
54
+ }, n(e.cancelText), 9, $)),
55
+ o("button", {
56
+ class: u(["of-dialog__btn", b.value]),
57
+ disabled: e.loading,
58
+ type: "button",
59
+ onClick: _
60
+ }, [
61
+ e.loading ? (t(), c(V(N), {
62
+ key: 0,
63
+ size: 14,
64
+ class: "of-dialog__spinner"
65
+ })) : s("", !0),
66
+ w(" " + n(e.confirmText), 1)
67
+ ], 10, L)
68
+ ]),
69
+ default: f(() => [
70
+ o("div", E, [
71
+ o("div", {
72
+ class: u(["of-dialog__icon-wrap", h.value])
73
+ }, [
74
+ (t(), c(v(C.value), { size: 28 }))
75
+ ], 2),
76
+ o("div", I, [
77
+ o("h3", M, n(e.title), 1),
78
+ e.content ? (t(), r("p", S, n(e.content), 1)) : s("", !0),
79
+ x(i.$slots, "default", {}, void 0, !0)
80
+ ])
81
+ ])
82
+ ]),
83
+ _: 3
84
+ }, 8, ["model-value", "width", "mask-closable"]));
85
+ }
86
+ });
87
+ export {
88
+ G as default
89
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./Drawer.vue2.js";
2
+ /* empty css */
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-1f5095d4"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,112 @@
1
+ import { defineComponent as V, useSlots as _, computed as B, ref as g, onMounted as S, watch as z, nextTick as D, onBeforeUnmount as L, openBlock as l, createBlock as T, Teleport as $, createVNode as v, Transition as I, withCtx as N, createElementBlock as d, normalizeStyle as b, createElementVNode as a, withModifiers as A, unref as h, renderSlot as k, toDisplayString as K, createCommentVNode as r } from "vue";
2
+ import { X as M } from "lucide-vue-next";
3
+ const R = ["aria-label"], q = { class: "of-drawer__inner" }, F = {
4
+ key: 0,
5
+ class: "of-drawer__header"
6
+ }, U = { class: "of-drawer__title" }, X = {
7
+ key: 0,
8
+ class: "of-drawer__title-text"
9
+ }, j = { class: "of-drawer__body" }, J = /* @__PURE__ */ V({
10
+ __name: "Drawer",
11
+ props: {
12
+ modelValue: { type: Boolean },
13
+ width: { default: 390 },
14
+ title: {},
15
+ showClose: { type: Boolean, default: !0 },
16
+ maskClosable: { type: Boolean, default: !0 },
17
+ zIndex: { default: 1e3 }
18
+ },
19
+ emits: ["update:modelValue"],
20
+ setup(o, { emit: C }) {
21
+ const i = o, E = C, p = _(), x = B(() => ({
22
+ width: `${i.width}px`
23
+ })), s = g(null);
24
+ let n = null;
25
+ function m() {
26
+ return s.value ? Array.from(
27
+ s.value.querySelectorAll(
28
+ 'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), a[href]'
29
+ )
30
+ ).filter((e) => !e.closest('[aria-hidden="true"]')) : [];
31
+ }
32
+ function u(e) {
33
+ if (e.key !== "Tab") return;
34
+ const t = m();
35
+ if (t.length === 0) {
36
+ e.preventDefault();
37
+ return;
38
+ }
39
+ const c = t[0], w = t[t.length - 1];
40
+ e.shiftKey ? document.activeElement === c && (e.preventDefault(), w.focus()) : document.activeElement === w && (e.preventDefault(), c.focus());
41
+ }
42
+ function f() {
43
+ E("update:modelValue", !1);
44
+ }
45
+ function y(e) {
46
+ e.key === "Escape" && i.modelValue && f();
47
+ }
48
+ return S(() => {
49
+ typeof document > "u" || document.addEventListener("keydown", y);
50
+ }), z(
51
+ () => i.modelValue,
52
+ (e) => {
53
+ typeof document > "u" || (document.body.style.overflow = e ? "hidden" : "", e ? (n = document.activeElement, D(() => {
54
+ const t = m();
55
+ t.length && t[0].focus(), document.addEventListener("keydown", u);
56
+ })) : (document.removeEventListener("keydown", u), n == null || n.focus(), n = null));
57
+ },
58
+ { immediate: !0 }
59
+ ), L(() => {
60
+ typeof document > "u" || (document.removeEventListener("keydown", y), document.removeEventListener("keydown", u), document.body.style.overflow = "");
61
+ }), (e, t) => (l(), T($, { to: "body" }, [
62
+ v(I, { name: "of-drawer" }, {
63
+ default: N(() => [
64
+ o.modelValue ? (l(), d("div", {
65
+ key: 0,
66
+ class: "of-drawer-overlay",
67
+ style: b({ zIndex: o.zIndex }),
68
+ onClick: t[1] || (t[1] = (c) => o.maskClosable && f())
69
+ }, [
70
+ a("aside", {
71
+ ref_key: "drawerRef",
72
+ ref: s,
73
+ class: "of-drawer",
74
+ role: "dialog",
75
+ "aria-modal": "true",
76
+ "aria-label": o.title,
77
+ style: b(x.value),
78
+ onClick: t[0] || (t[0] = A(() => {
79
+ }, ["stop"]))
80
+ }, [
81
+ a("div", q, [
82
+ h(p).title || o.title || o.showClose ? (l(), d("div", F, [
83
+ a("div", U, [
84
+ k(e.$slots, "title", {}, () => [
85
+ o.title ? (l(), d("h3", X, K(o.title), 1)) : r("", !0)
86
+ ], !0)
87
+ ]),
88
+ o.showClose ? (l(), d("button", {
89
+ key: 0,
90
+ class: "of-drawer__close",
91
+ type: "button",
92
+ "aria-label": "关闭",
93
+ onClick: f
94
+ }, [
95
+ v(h(M), { size: 18 })
96
+ ])) : r("", !0)
97
+ ])) : r("", !0),
98
+ a("div", j, [
99
+ k(e.$slots, "default", {}, void 0, !0)
100
+ ])
101
+ ])
102
+ ], 12, R)
103
+ ], 4)) : r("", !0)
104
+ ]),
105
+ _: 3
106
+ })
107
+ ]));
108
+ }
109
+ });
110
+ export {
111
+ J as default
112
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./Modal.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4d50e8f4"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,115 @@
1
+ import { defineComponent as C, ref as V, watch as x, nextTick as B, onUnmounted as _, openBlock as l, createBlock as g, Teleport as z, createVNode as b, Transition as L, withCtx as $, createElementBlock as n, withModifiers as D, normalizeStyle as h, createElementVNode as k, normalizeClass as S, renderSlot as f, toDisplayString as T, unref as A, createCommentVNode as d } from "vue";
2
+ import { X as I } from "lucide-vue-next";
3
+ const M = ["aria-label"], N = {
4
+ key: 0,
5
+ class: "of-modal__header"
6
+ }, K = {
7
+ key: 0,
8
+ class: "of-modal__title"
9
+ }, R = {
10
+ key: 1,
11
+ class: "of-modal__title-placeholder"
12
+ }, q = { class: "of-modal__body" }, F = {
13
+ key: 1,
14
+ class: "of-modal__footer"
15
+ }, X = /* @__PURE__ */ C({
16
+ inheritAttrs: !1,
17
+ __name: "Modal",
18
+ props: {
19
+ modelValue: { type: Boolean },
20
+ width: { default: "500px" },
21
+ title: {},
22
+ closable: { type: Boolean, default: !0 },
23
+ maskClosable: { type: Boolean, default: !0 },
24
+ centered: { type: Boolean, default: !0 },
25
+ zIndex: { default: 1e3 }
26
+ },
27
+ emits: ["update:modelValue"],
28
+ setup(t, { emit: w }) {
29
+ const i = t, E = w, s = V(null);
30
+ let a = null;
31
+ function m() {
32
+ return s.value ? Array.from(
33
+ s.value.querySelectorAll(
34
+ 'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), a[href]'
35
+ )
36
+ ).filter((e) => !e.closest('[aria-hidden="true"]')) : [];
37
+ }
38
+ function r(e) {
39
+ if (e.key !== "Tab") return;
40
+ const o = m();
41
+ if (o.length === 0) {
42
+ e.preventDefault();
43
+ return;
44
+ }
45
+ const y = o[0], v = o[o.length - 1];
46
+ e.shiftKey ? document.activeElement === y && (e.preventDefault(), v.focus()) : document.activeElement === v && (e.preventDefault(), y.focus());
47
+ }
48
+ function u() {
49
+ E("update:modelValue", !1);
50
+ }
51
+ function p() {
52
+ i.maskClosable && u();
53
+ }
54
+ function c(e) {
55
+ e.key === "Escape" && i.modelValue && u();
56
+ }
57
+ return x(
58
+ () => i.modelValue,
59
+ (e) => {
60
+ typeof document > "u" || (e ? (document.body.style.overflow = "hidden", a = document.activeElement, document.addEventListener("keydown", c), B(() => {
61
+ const o = m();
62
+ o.length && o[0].focus(), document.addEventListener("keydown", r);
63
+ })) : (document.body.style.overflow = "", document.removeEventListener("keydown", c), document.removeEventListener("keydown", r), a == null || a.focus(), a = null));
64
+ }
65
+ ), _(() => {
66
+ typeof document > "u" || (document.body.style.overflow = "", document.removeEventListener("keydown", c), document.removeEventListener("keydown", r));
67
+ }), (e, o) => (l(), g(z, { to: "body" }, [
68
+ b(L, { name: "of-modal" }, {
69
+ default: $(() => [
70
+ t.modelValue ? (l(), n("div", {
71
+ key: 0,
72
+ class: "of-modal-backdrop",
73
+ style: h({ zIndex: t.zIndex }),
74
+ onClick: D(p, ["self"])
75
+ }, [
76
+ k("div", {
77
+ ref_key: "modalRef",
78
+ ref: s,
79
+ class: S(["of-modal", { "of-modal--centered": t.centered }]),
80
+ style: h({ width: t.width, maxWidth: "90vw" }),
81
+ role: "dialog",
82
+ "aria-modal": "true",
83
+ "aria-label": t.title
84
+ }, [
85
+ e.$slots.header || t.title || t.closable ? (l(), n("div", N, [
86
+ f(e.$slots, "header", {}, () => [
87
+ t.title ? (l(), n("h3", K, T(t.title), 1)) : (l(), n("div", R))
88
+ ], !0),
89
+ t.closable ? (l(), n("button", {
90
+ key: 0,
91
+ class: "of-modal__close",
92
+ onClick: u,
93
+ "aria-label": "关闭",
94
+ type: "button"
95
+ }, [
96
+ b(A(I), { size: 18 })
97
+ ])) : d("", !0)
98
+ ])) : d("", !0),
99
+ k("div", q, [
100
+ f(e.$slots, "default", {}, void 0, !0)
101
+ ]),
102
+ e.$slots.footer ? (l(), n("div", F, [
103
+ f(e.$slots, "footer", {}, void 0, !0)
104
+ ])) : d("", !0)
105
+ ], 14, M)
106
+ ], 4)) : d("", !0)
107
+ ]),
108
+ _: 3
109
+ })
110
+ ]));
111
+ }
112
+ });
113
+ export {
114
+ X as default
115
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./SidePanel.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a021fd10"]]);
5
+ export {
6
+ f as default
7
+ };
@@ -0,0 +1,137 @@
1
+ import { defineComponent as g, computed as S, ref as $, onMounted as B, watch as D, nextTick as L, onBeforeUnmount as z, openBlock as l, createBlock as P, Teleport as N, createElementBlock as o, Fragment as R, normalizeStyle as b, renderSlot as i, toDisplayString as k, createVNode as w, unref as p, createCommentVNode as d, createElementVNode as E, withDirectives as T, vShow as A } from "vue";
2
+ import { X as _ } from "lucide-vue-next";
3
+ const F = ["aria-label"], K = {
4
+ key: 0,
5
+ class: "of-side-panel__header"
6
+ }, q = {
7
+ key: 0,
8
+ class: "of-side-panel__title"
9
+ }, x = {
10
+ key: 1,
11
+ class: "of-side-panel__title-placeholder"
12
+ }, M = { class: "of-side-panel__body" }, U = ["aria-label"], X = {
13
+ key: 0,
14
+ class: "of-side-panel__header"
15
+ }, j = {
16
+ key: 0,
17
+ class: "of-side-panel__title"
18
+ }, G = {
19
+ key: 1,
20
+ class: "of-side-panel__title-placeholder"
21
+ }, H = { class: "of-side-panel__body" }, O = /* @__PURE__ */ g({
22
+ __name: "SidePanel",
23
+ props: {
24
+ modelValue: { type: Boolean },
25
+ width: { default: 500 },
26
+ title: {},
27
+ showClose: { type: Boolean, default: !0 },
28
+ mode: { default: "persistent" }
29
+ },
30
+ emits: ["update:modelValue"],
31
+ setup(t, { emit: V }) {
32
+ const u = t, C = V, f = S(() => ({
33
+ width: `${u.width}px`
34
+ })), s = $(null);
35
+ let a = null;
36
+ function m() {
37
+ return s.value ? Array.from(
38
+ s.value.querySelectorAll(
39
+ 'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), a[href]'
40
+ )
41
+ ).filter((e) => !e.closest('[aria-hidden="true"]')) : [];
42
+ }
43
+ function r(e) {
44
+ if (e.key !== "Tab") return;
45
+ const n = m();
46
+ if (n.length === 0) {
47
+ e.preventDefault();
48
+ return;
49
+ }
50
+ const h = n[0], v = n[n.length - 1];
51
+ e.shiftKey ? document.activeElement === h && (e.preventDefault(), v.focus()) : document.activeElement === v && (e.preventDefault(), h.focus());
52
+ }
53
+ function y(e) {
54
+ e.key === "Escape" && u.modelValue && c();
55
+ }
56
+ B(() => {
57
+ typeof document > "u" || document.addEventListener("keydown", y);
58
+ }), D(
59
+ () => u.modelValue,
60
+ (e) => {
61
+ typeof document > "u" || (document.body.style.overflow = e ? "hidden" : "", e ? (a = document.activeElement, L(() => {
62
+ const n = m();
63
+ n.length && n[0].focus(), document.addEventListener("keydown", r);
64
+ })) : (document.removeEventListener("keydown", r), a == null || a.focus(), a = null));
65
+ }
66
+ ), z(() => {
67
+ typeof document > "u" || (document.removeEventListener("keydown", y), document.removeEventListener("keydown", r), document.body.style.overflow = "");
68
+ });
69
+ function c() {
70
+ C("update:modelValue", !1);
71
+ }
72
+ return (e, n) => (l(), P(N, { to: "body" }, [
73
+ t.mode === "lazy" ? (l(), o(R, { key: 0 }, [
74
+ t.modelValue ? (l(), o("aside", {
75
+ key: 0,
76
+ ref_key: "sidePanelRef",
77
+ ref: s,
78
+ class: "of-side-panel",
79
+ style: b(f.value),
80
+ role: "dialog",
81
+ "aria-modal": "true",
82
+ "aria-label": t.title
83
+ }, [
84
+ e.$slots.header || t.title || t.showClose ? (l(), o("div", K, [
85
+ i(e.$slots, "header", {}, () => [
86
+ t.title ? (l(), o("h3", q, k(t.title), 1)) : (l(), o("div", x))
87
+ ], !0),
88
+ t.showClose ? (l(), o("button", {
89
+ key: 0,
90
+ class: "of-side-panel__close",
91
+ type: "button",
92
+ "aria-label": "关闭",
93
+ onClick: c
94
+ }, [
95
+ w(p(_), { size: 18 })
96
+ ])) : d("", !0)
97
+ ])) : d("", !0),
98
+ E("div", M, [
99
+ i(e.$slots, "default", {}, void 0, !0)
100
+ ])
101
+ ], 12, F)) : d("", !0)
102
+ ], 64)) : T((l(), o("aside", {
103
+ key: 1,
104
+ ref_key: "sidePanelRef",
105
+ ref: s,
106
+ class: "of-side-panel",
107
+ style: b(f.value),
108
+ role: "dialog",
109
+ "aria-modal": "true",
110
+ "aria-label": t.title
111
+ }, [
112
+ e.$slots.header || t.title || t.showClose ? (l(), o("div", X, [
113
+ i(e.$slots, "header", {}, () => [
114
+ t.title ? (l(), o("h3", j, k(t.title), 1)) : (l(), o("div", G))
115
+ ], !0),
116
+ t.showClose ? (l(), o("button", {
117
+ key: 0,
118
+ class: "of-side-panel__close",
119
+ type: "button",
120
+ "aria-label": "关闭",
121
+ onClick: c
122
+ }, [
123
+ w(p(_), { size: 18 })
124
+ ])) : d("", !0)
125
+ ])) : d("", !0),
126
+ E("div", H, [
127
+ i(e.$slots, "default", {}, void 0, !0)
128
+ ])
129
+ ], 12, U)), [
130
+ [A, t.modelValue]
131
+ ])
132
+ ]));
133
+ }
134
+ });
135
+ export {
136
+ O as default
137
+ };
@@ -0,0 +1,8 @@
1
+ import o from "./SplitPane.vue2.js";
2
+ /* empty css */
3
+ /* empty css */
4
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
5
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-860f90a3"]]);
6
+ export {
7
+ f as default
8
+ };
@@ -0,0 +1,68 @@
1
+ import { defineComponent as g, ref as h, onUnmounted as S, openBlock as L, createElementBlock as M, normalizeClass as _, createElementVNode as c, normalizeStyle as w, renderSlot as z, withModifiers as x } from "vue";
2
+ const B = { class: "of-split-pane__second" }, D = /* @__PURE__ */ g({
3
+ __name: "SplitPane",
4
+ props: {
5
+ direction: {},
6
+ defaultSize: {},
7
+ minSize: {},
8
+ maxSize: {}
9
+ },
10
+ setup(d) {
11
+ const n = d, u = h(n.defaultSize ?? 50), s = h(!1), r = h(null);
12
+ function p(e) {
13
+ e.preventDefault(), s.value = !0, document.addEventListener("mousemove", m), document.addEventListener("mouseup", o), document.addEventListener("touchmove", v, { passive: !1 }), document.addEventListener("touchend", o);
14
+ }
15
+ function m(e) {
16
+ if (!s.value || !r.value) return;
17
+ const t = r.value.getBoundingClientRect(), i = (n.direction || "horizontal") === "horizontal";
18
+ let a;
19
+ i ? a = (e.clientX - t.left) / t.width * 100 : a = (e.clientY - t.top) / t.height * 100;
20
+ const l = n.minSize ?? 10, f = n.maxSize ?? 90;
21
+ u.value = Math.min(f, Math.max(l, a));
22
+ }
23
+ function v(e) {
24
+ if (!s.value || !r.value) return;
25
+ e.preventDefault();
26
+ const t = e.touches[0], i = r.value.getBoundingClientRect(), a = (n.direction || "horizontal") === "horizontal";
27
+ let l;
28
+ a ? l = (t.clientX - i.left) / i.width * 100 : l = (t.clientY - i.top) / i.height * 100;
29
+ const f = n.minSize ?? 10, E = n.maxSize ?? 90;
30
+ u.value = Math.min(E, Math.max(f, l));
31
+ }
32
+ function o() {
33
+ s.value = !1, document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", o), document.removeEventListener("touchmove", v), document.removeEventListener("touchend", o);
34
+ }
35
+ return S(() => {
36
+ document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", o), document.removeEventListener("touchmove", v), document.removeEventListener("touchend", o);
37
+ }), (e, t) => (L(), M("div", {
38
+ ref_key: "containerRef",
39
+ ref: r,
40
+ class: _(["of-split-pane", [
41
+ `of-split-pane--${d.direction || "horizontal"}`,
42
+ { "of-split-pane--dragging": s.value }
43
+ ]])
44
+ }, [
45
+ c("div", {
46
+ class: "of-split-pane__first",
47
+ style: w(
48
+ (d.direction || "horizontal") === "vertical" ? { height: u.value + "%" } : { width: u.value + "%" }
49
+ )
50
+ }, [
51
+ z(e.$slots, "first", {}, void 0, !0)
52
+ ], 4),
53
+ c("div", {
54
+ class: "of-split-pane__divider",
55
+ onMousedown: p,
56
+ onTouchstart: x(p, ["prevent"])
57
+ }, [...t[0] || (t[0] = [
58
+ c("div", { class: "of-split-pane__divider-inner" }, null, -1)
59
+ ])], 32),
60
+ c("div", B, [
61
+ z(e.$slots, "second", {}, void 0, !0)
62
+ ])
63
+ ], 2));
64
+ }
65
+ });
66
+ export {
67
+ D as default
68
+ };
@@ -0,0 +1,7 @@
1
+ import a from "./DataTable.vue2.js";
2
+ /* empty css */
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ o(a, [["__scopeId", "data-v-85a23061"]]);
5
+ export {
6
+ p as default
7
+ };