@oneflowui/ui 0.1.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 (127) hide show
  1. package/README.md +161 -0
  2. package/dist/FieldCheckbox-B1eVag_x.js +30 -0
  3. package/dist/FieldDate-BCitHPQn.js +34 -0
  4. package/dist/FieldDatetime-BGeyZJl-.js +34 -0
  5. package/dist/FieldEmail-Ds8lTvNh.js +34 -0
  6. package/dist/FieldMultiSelect-_cY4aZuE.js +145 -0
  7. package/dist/FieldNumber-DayaF31C.js +43 -0
  8. package/dist/FieldRating-Dw9rvhUe.js +32 -0
  9. package/dist/FieldSelect-DEVkjnNY.js +122 -0
  10. package/dist/FieldText-LzCqM7jk.js +34 -0
  11. package/dist/FieldUrl-zqYEJCPK.js +34 -0
  12. package/dist/components/ContextMenu/index.d.ts +2 -0
  13. package/dist/components/ContextMenu/index.vue.d.ts +27 -0
  14. package/dist/components/Dashboard/charts/BarChart.vue.d.ts +17 -0
  15. package/dist/components/Dashboard/charts/DoughnutChart.vue.d.ts +12 -0
  16. package/dist/components/Dashboard/charts/NumberCard.vue.d.ts +17 -0
  17. package/dist/components/Dashboard/charts/PieChart.vue.d.ts +21 -0
  18. package/dist/components/Dashboard/charts/TableChart.vue.d.ts +20 -0
  19. package/dist/components/Dashboard/index.d.ts +6 -0
  20. package/dist/components/Dashboard/index.vue.d.ts +23 -0
  21. package/dist/components/ai/AiMessageBubble.vue.d.ts +11 -0
  22. package/dist/components/ai/AiMessageList.vue.d.ts +19 -0
  23. package/dist/components/ai/AiSender.vue.d.ts +33 -0
  24. package/dist/components/ai/AiStreamingCursor.vue.d.ts +5 -0
  25. package/dist/components/ai/AiThinking.vue.d.ts +5 -0
  26. package/dist/components/ai/UserMessageBubble.vue.d.ts +7 -0
  27. package/dist/components/ai/index.d.ts +7 -0
  28. package/dist/components/auxiliary/ColorPanel.vue.d.ts +19 -0
  29. package/dist/components/auxiliary/FileUpload.vue.d.ts +24 -0
  30. package/dist/components/auxiliary/PersonPanel.vue.d.ts +24 -0
  31. package/dist/components/auxiliary/index.d.ts +3 -0
  32. package/dist/components/base/AddViewBtn.vue.d.ts +6 -0
  33. package/dist/components/base/ButtonGroup.vue.d.ts +30 -0
  34. package/dist/components/base/DropdownMenu.vue.d.ts +25 -0
  35. package/dist/components/base/EmptyState.vue.d.ts +26 -0
  36. package/dist/components/base/RangeSlider.vue.d.ts +29 -0
  37. package/dist/components/base/StatisticCard.vue.d.ts +22 -0
  38. package/dist/components/base/ToolbarBtn.vue.d.ts +11 -0
  39. package/dist/components/base/ViewTab.vue.d.ts +11 -0
  40. package/dist/components/base/index.d.ts +11 -0
  41. package/dist/components/breadcrumb/Breadcrumb.vue.d.ts +48 -0
  42. package/dist/components/breadcrumb/BreadcrumbItem.vue.d.ts +42 -0
  43. package/dist/components/breadcrumb/index.d.ts +3 -0
  44. package/dist/components/detail/CommentItem.vue.d.ts +6 -0
  45. package/dist/components/detail/DetailLayout.vue.d.ts +37 -0
  46. package/dist/components/detail/PropPanel.vue.d.ts +26 -0
  47. package/dist/components/detail/PropRow.vue.d.ts +44 -0
  48. package/dist/components/detail/index.d.ts +4 -0
  49. package/dist/components/editor/BlockQuote.vue.d.ts +13 -0
  50. package/dist/components/editor/CodeBlock.vue.d.ts +10 -0
  51. package/dist/components/editor/ContentBlock.vue.d.ts +27 -0
  52. package/dist/components/editor/RefLink.vue.d.ts +11 -0
  53. package/dist/components/editor/RichTextEditor.vue.d.ts +186 -0
  54. package/dist/components/editor/index.d.ts +5 -0
  55. package/dist/components/field/FieldCheckbox.vue.d.ts +14 -0
  56. package/dist/components/field/FieldDate.vue.d.ts +17 -0
  57. package/dist/components/field/FieldDatetime.vue.d.ts +17 -0
  58. package/dist/components/field/FieldEmail.vue.d.ts +17 -0
  59. package/dist/components/field/FieldMultiSelect.vue.d.ts +18 -0
  60. package/dist/components/field/FieldNumber.vue.d.ts +17 -0
  61. package/dist/components/field/FieldRating.vue.d.ts +15 -0
  62. package/dist/components/field/FieldSelect.vue.d.ts +18 -0
  63. package/dist/components/field/FieldText.vue.d.ts +17 -0
  64. package/dist/components/field/FieldUrl.vue.d.ts +17 -0
  65. package/dist/components/form/FormDesigner.vue.d.ts +17 -0
  66. package/dist/components/form/index.d.ts +1 -0
  67. package/dist/components/gallery/GalleryCard.vue.d.ts +10 -0
  68. package/dist/components/gallery/GalleryView.vue.d.ts +24 -0
  69. package/dist/components/gallery/index.d.ts +2 -0
  70. package/dist/components/kanban/KanbanBoard.vue.d.ts +26 -0
  71. package/dist/components/kanban/KanbanCard.vue.d.ts +23 -0
  72. package/dist/components/kanban/KanbanColumn.vue.d.ts +25 -0
  73. package/dist/components/kanban/QuickAddRow.vue.d.ts +13 -0
  74. package/dist/components/kanban/index.d.ts +4 -0
  75. package/dist/components/layout/AppLayout.vue.d.ts +20 -0
  76. package/dist/components/layout/Navbar.vue.d.ts +34 -0
  77. package/dist/components/layout/Sidebar.vue.d.ts +26 -0
  78. package/dist/components/layout/StatusBar.vue.d.ts +11 -0
  79. package/dist/components/layout/index.d.ts +4 -0
  80. package/dist/components/mermaid/MermaidChart.vue.d.ts +46 -0
  81. package/dist/components/mermaid/index.d.ts +1 -0
  82. package/dist/components/overlay/Dialog.vue.d.ts +69 -0
  83. package/dist/components/overlay/Modal.vue.d.ts +59 -0
  84. package/dist/components/overlay/index.d.ts +2 -0
  85. package/dist/components/split/SplitPane.vue.d.ts +41 -0
  86. package/dist/components/split/index.d.ts +1 -0
  87. package/dist/components/table/DataTable.vue.d.ts +43 -0
  88. package/dist/components/table/FieldCell.vue.d.ts +33 -0
  89. package/dist/components/table/NewRowBtn.vue.d.ts +6 -0
  90. package/dist/components/table/TableColumnManager.vue.d.ts +13 -0
  91. package/dist/components/table/TableDataRow.vue.d.ts +47 -0
  92. package/dist/components/table/TableFilterPanel.vue.d.ts +24 -0
  93. package/dist/components/table/TableHeaderRow.vue.d.ts +23 -0
  94. package/dist/components/table/index.d.ts +8 -0
  95. package/dist/components/tabs/TabPanel.vue.d.ts +38 -0
  96. package/dist/components/tabs/Tabs.vue.d.ts +60 -0
  97. package/dist/components/tabs/index.d.ts +3 -0
  98. package/dist/components/timeline/GanttRow.vue.d.ts +42 -0
  99. package/dist/components/timeline/GanttTimeline.vue.d.ts +46 -0
  100. package/dist/components/timeline/index.d.ts +2 -0
  101. package/dist/components/toast/ToastContainer.vue.d.ts +2 -0
  102. package/dist/components/toast/ToastItem.vue.d.ts +16 -0
  103. package/dist/components/toast/index.d.ts +2 -0
  104. package/dist/composables/index.d.ts +16 -0
  105. package/dist/composables/useAiChat.d.ts +45 -0
  106. package/dist/composables/useBadge.d.ts +27 -0
  107. package/dist/composables/useInlineEdit.d.ts +17 -0
  108. package/dist/composables/useMarkdown.d.ts +16 -0
  109. package/dist/composables/useStream.d.ts +15 -0
  110. package/dist/composables/useTable.d.ts +62 -0
  111. package/dist/composables/useTableFilter.d.ts +36 -0
  112. package/dist/composables/useToast.d.ts +63 -0
  113. package/dist/composables/useTypewriter.d.ts +11 -0
  114. package/dist/dev/App.vue.d.ts +2 -0
  115. package/dist/dev/main.d.ts +0 -0
  116. package/dist/index-B9LF7Kv4.js +10661 -0
  117. package/dist/index.d.ts +45 -0
  118. package/dist/oneflow-ui.js +84 -0
  119. package/dist/oneflow-ui.umd.cjs +13 -0
  120. package/dist/style.css +1 -0
  121. package/dist/tests/gantt.integration.spec.d.ts +1 -0
  122. package/dist/tests/table-detail.integration.spec.d.ts +1 -0
  123. package/dist/tests/three-layer-model.integration.spec.d.ts +1 -0
  124. package/dist/types/index.d.ts +161 -0
  125. package/dist/utils/icon.d.ts +7 -0
  126. package/dist/utils/index.d.ts +1 -0
  127. package/package.json +62 -0
@@ -0,0 +1,23 @@
1
+ import { Task, ColorMap } from '../../types';
2
+ type __VLS_Props = {
3
+ task: Task;
4
+ dragging?: boolean;
5
+ /**
6
+ * 优先级颜色映射,会与内置默认映射合并(传入优先)
7
+ * 例:{ urgent: { text: '#DC2626', bg: '#FEE2E2', label: '紧急' } }
8
+ */
9
+ priorityColorMap?: ColorMap;
10
+ /**
11
+ * 状态颜色映射,会与内置默认映射合并(传入优先)
12
+ * 例:{ in_review: { text: '#7C3AED', bg: '#EDE9FE', label: '审核中' } }
13
+ */
14
+ statusColorMap?: ColorMap;
15
+ };
16
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
+ click: (task: Task) => any;
18
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ onClick?: ((task: Task) => any) | undefined;
20
+ }>, {
21
+ dragging: boolean;
22
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
23
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import { KanbanColumnData, Task, ColorMap } from '../../types';
2
+ type __VLS_Props = {
3
+ column: KanbanColumnData;
4
+ ghostClass?: string;
5
+ /**
6
+ * 卡片优先级颜色映射(透传给 KanbanCard)
7
+ */
8
+ priorityColorMap?: ColorMap;
9
+ /**
10
+ * 卡片状态颜色映射(透传给 KanbanCard,同时用于列头圆点颜色)
11
+ */
12
+ statusColorMap?: ColorMap;
13
+ };
14
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
+ "card-click": (task: Task) => any;
16
+ "add-card": (columnId: string) => any;
17
+ "update:column": (column: KanbanColumnData) => any;
18
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ "onCard-click"?: ((task: Task) => any) | undefined;
20
+ "onAdd-card"?: ((columnId: string) => any) | undefined;
21
+ "onUpdate:column"?: ((column: KanbanColumnData) => any) | undefined;
22
+ }>, {
23
+ ghostClass: string;
24
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
25
+ export default _default;
@@ -0,0 +1,13 @@
1
+ type __VLS_Props = {
2
+ placeholder?: string;
3
+ };
4
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
+ submit: (title: string) => any;
6
+ cancel: () => any;
7
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onSubmit?: ((title: string) => any) | undefined;
9
+ onCancel?: (() => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
11
+ inputRef: HTMLInputElement;
12
+ }, HTMLDivElement>;
13
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export { default as KanbanBoard } from './KanbanBoard.vue';
2
+ export { default as KanbanColumn } from './KanbanColumn.vue';
3
+ export { default as KanbanCard } from './KanbanCard.vue';
4
+ export { default as QuickAddRow } from './QuickAddRow.vue';
@@ -0,0 +1,20 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ navbar?(_: {}): any;
5
+ sidebar?(_: {}): any;
6
+ default?(_: {}): any;
7
+ statusbar?(_: {}): any;
8
+ };
9
+ refs: {};
10
+ rootEl: HTMLDivElement;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
14
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
+ export default _default;
16
+ type __VLS_WithTemplateSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,34 @@
1
+ type __VLS_Props = {
2
+ username?: string;
3
+ searchPlaceholder?: string;
4
+ notifyCount?: number;
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ logo?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: HTMLElement;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
16
+ search: (value: string) => any;
17
+ "notify-click": () => any;
18
+ "avatar-click": () => any;
19
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
20
+ onSearch?: ((value: string) => any) | undefined;
21
+ "onNotify-click"?: (() => any) | undefined;
22
+ "onAvatar-click"?: (() => any) | undefined;
23
+ }>, {
24
+ username: string;
25
+ searchPlaceholder: string;
26
+ notifyCount: number;
27
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
28
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
29
+ export default _default;
30
+ type __VLS_WithTemplateSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -0,0 +1,26 @@
1
+ import { SidebarItem } from '../../types';
2
+ type __VLS_Props = {
3
+ items: SidebarItem[];
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ header?(_: {}): any;
9
+ footer?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: HTMLDivElement;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
16
+ "item-click": (item: SidebarItem) => any;
17
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ "onItem-click"?: ((item: SidebarItem) => any) | undefined;
19
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
+ export default _default;
22
+ type __VLS_WithTemplateSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,11 @@
1
+ type __VLS_Props = {
2
+ synced?: boolean;
3
+ shortcuts?: string;
4
+ version?: string;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
7
+ version: string;
8
+ synced: boolean;
9
+ shortcuts: string;
10
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
11
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export { default as AppLayout } from './AppLayout.vue';
2
+ export { default as Navbar } from './Navbar.vue';
3
+ export { default as Sidebar } from './Sidebar.vue';
4
+ export { default as StatusBar } from './StatusBar.vue';
@@ -0,0 +1,46 @@
1
+ /**
2
+ * MermaidChart 组件 - Mermaid 图表渲染
3
+ *
4
+ * 注意:需要在页面中引入 mermaid.js 或安装 mermaid 依赖
5
+ * CDN: <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"><\/script>
6
+ * NPM: npm install mermaid
7
+ *
8
+ * @example
9
+ * <MermaidChart
10
+ * :code="'graph TD\n A --> B'"
11
+ * theme="default"
12
+ * width="100%"
13
+ * />
14
+ */
15
+ type __VLS_Props = {
16
+ /** Mermaid 图表代码 */
17
+ code: string;
18
+ /** 图表主题,默认 'default' */
19
+ theme?: "default" | "dark" | "neutral" | "forest";
20
+ /** 容器宽度,默认 '100%' */
21
+ width?: string;
22
+ };
23
+ declare function __VLS_template(): {
24
+ attrs: Partial<{}>;
25
+ slots: {
26
+ loading?(_: {}): any;
27
+ error?(_: {
28
+ message: string;
29
+ }): any;
30
+ };
31
+ refs: {
32
+ containerRef: HTMLDivElement;
33
+ };
34
+ rootEl: HTMLDivElement;
35
+ };
36
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
37
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
38
+ containerRef: HTMLDivElement;
39
+ }, HTMLDivElement>;
40
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
41
+ export default _default;
42
+ type __VLS_WithTemplateSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
@@ -0,0 +1 @@
1
+ export { default as MermaidChart } from './MermaidChart.vue';
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Dialog 组件 - 确认/提示对话框
3
+ *
4
+ * 基于 Modal 封装,提供带类型图标的确认/取消交互。
5
+ * 支持 info / warning / danger / success 四种类型。
6
+ *
7
+ * @example
8
+ * <Dialog
9
+ * v-model="showDialog"
10
+ * type="danger"
11
+ * title="删除确认"
12
+ * content="确定要删除这条记录吗?此操作不可撤销。"
13
+ * confirm-text="删除"
14
+ * @confirm="handleDelete"
15
+ * />
16
+ */
17
+ type __VLS_Props = {
18
+ /** v-model 控制显示/隐藏 */
19
+ modelValue: boolean;
20
+ /** 对话框标题,默认 '提示' */
21
+ title?: string;
22
+ /** 正文内容 */
23
+ content?: string;
24
+ /** 确认按钮文字,默认 '确认' */
25
+ confirmText?: string;
26
+ /** 取消按钮文字,默认 '取消' */
27
+ cancelText?: string;
28
+ /** 对话框类型,影响图标和确认按钮颜色 */
29
+ type?: "info" | "warning" | "danger" | "success";
30
+ /** 确认按钮加载状态 */
31
+ loading?: boolean;
32
+ /** 弹窗宽度,默认 '420px' */
33
+ width?: string;
34
+ /** 是否隐藏取消按钮 */
35
+ hideCancel?: boolean;
36
+ };
37
+ declare function __VLS_template(): {
38
+ attrs: Partial<{}>;
39
+ slots: {
40
+ default?(_: {}): any;
41
+ };
42
+ refs: {};
43
+ rootEl: any;
44
+ };
45
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
46
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
47
+ "update:modelValue": (value: boolean) => any;
48
+ cancel: () => any;
49
+ confirm: () => any;
50
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
51
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
52
+ onCancel?: (() => any) | undefined;
53
+ onConfirm?: (() => any) | undefined;
54
+ }>, {
55
+ title: string;
56
+ type: "info" | "warning" | "danger" | "success";
57
+ width: string;
58
+ confirmText: string;
59
+ cancelText: string;
60
+ loading: boolean;
61
+ hideCancel: boolean;
62
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
63
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
64
+ export default _default;
65
+ type __VLS_WithTemplateSlots<T, S> = T & {
66
+ new (): {
67
+ $slots: S;
68
+ };
69
+ };
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Modal 组件 - 通用弹窗
3
+ *
4
+ * 支持自定义宽度、标题、关闭按钮、遮罩关闭、垂直居中、z-index 等配置。
5
+ * 使用 Teleport 将弹窗挂载到 body,避免层叠上下文问题。
6
+ *
7
+ * @example
8
+ * <Modal v-model="showModal" title="标题" width="600px">
9
+ * <p>内容</p>
10
+ * <template #footer>
11
+ * <button @click="showModal = false">关闭</button>
12
+ * </template>
13
+ * </Modal>
14
+ */
15
+ type __VLS_Props = {
16
+ /** v-model 控制显示/隐藏(必填) */
17
+ modelValue: boolean;
18
+ /** 弹窗宽度,默认 '500px' */
19
+ width?: string;
20
+ /** 弹窗标题(可选) */
21
+ title?: string;
22
+ /** 是否显示右上角关闭按钮,默认 true */
23
+ closable?: boolean;
24
+ /** 点击遮罩是否关闭,默认 true */
25
+ maskClosable?: boolean;
26
+ /** 是否垂直居中,默认 true */
27
+ centered?: boolean;
28
+ /** z-index,默认 1000 */
29
+ zIndex?: number;
30
+ };
31
+ declare function __VLS_template(): {
32
+ attrs: Partial<{}>;
33
+ slots: {
34
+ header?(_: {}): any;
35
+ default?(_: {}): any;
36
+ footer?(_: {}): any;
37
+ };
38
+ refs: {};
39
+ rootEl: any;
40
+ };
41
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
42
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
43
+ "update:modelValue": (value: boolean) => any;
44
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
45
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
46
+ }>, {
47
+ width: string;
48
+ closable: boolean;
49
+ maskClosable: boolean;
50
+ centered: boolean;
51
+ zIndex: number;
52
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
53
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
54
+ export default _default;
55
+ type __VLS_WithTemplateSlots<T, S> = T & {
56
+ new (): {
57
+ $slots: S;
58
+ };
59
+ };
@@ -0,0 +1,2 @@
1
+ export { default as Modal } from './Modal.vue';
2
+ export { default as Dialog } from './Dialog.vue';
@@ -0,0 +1,41 @@
1
+ /**
2
+ * SplitPane 组件 - 可拖拽分栏布局
3
+ *
4
+ * @example
5
+ * <SplitPane direction="horizontal" :default-size="30">
6
+ * <template #first>左侧内容</template>
7
+ * <template #second>右侧内容</template>
8
+ * </SplitPane>
9
+ */
10
+ type __VLS_Props = {
11
+ /** 分割方向,horizontal 为左右分栏,vertical 为上下分栏 */
12
+ direction?: "horizontal" | "vertical";
13
+ /** 第一个面板的初始比例(0-100),默认 50 */
14
+ defaultSize?: number;
15
+ /** 最小尺寸百分比,默认 10 */
16
+ minSize?: number;
17
+ /** 最大尺寸百分比,默认 90 */
18
+ maxSize?: number;
19
+ };
20
+ declare function __VLS_template(): {
21
+ attrs: Partial<{}>;
22
+ slots: {
23
+ first?(_: {}): any;
24
+ second?(_: {}): any;
25
+ };
26
+ refs: {
27
+ containerRef: HTMLDivElement;
28
+ };
29
+ rootEl: HTMLDivElement;
30
+ };
31
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
32
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
33
+ containerRef: HTMLDivElement;
34
+ }, HTMLDivElement>;
35
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
36
+ export default _default;
37
+ type __VLS_WithTemplateSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -0,0 +1 @@
1
+ export { default as SplitPane } from './SplitPane.vue';
@@ -0,0 +1,43 @@
1
+ import { FieldDef as CellFieldDef } from './FieldCell.vue';
2
+ import { Task, TableColumn, ColorMap, DataRecord, TableSchema, ViewConfig } from '../../types';
3
+ type __VLS_Props = {
4
+ tasks?: Task[];
5
+ records?: DataRecord[];
6
+ schema?: TableSchema;
7
+ view?: ViewConfig;
8
+ columns?: TableColumn[];
9
+ fieldDefs?: CellFieldDef[];
10
+ rowKey?: string;
11
+ selectable?: boolean;
12
+ addable?: boolean;
13
+ /** 优先级颜色映射,透传给每一行 */
14
+ priorityColorMap?: ColorMap;
15
+ /** 状态颜色映射,透传给每一行 */
16
+ statusColorMap?: ColorMap;
17
+ };
18
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
+ "row-click": (row: Task | DataRecord) => any;
20
+ "row-click-record": (record: DataRecord) => any;
21
+ "add-row": () => any;
22
+ "selection-change": (ids: string[]) => any;
23
+ "cell-edit": (payload: {
24
+ rowId: string;
25
+ fieldId: string;
26
+ value: unknown;
27
+ }) => any;
28
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
29
+ "onRow-click"?: ((row: Task | DataRecord) => any) | undefined;
30
+ "onRow-click-record"?: ((record: DataRecord) => any) | undefined;
31
+ "onAdd-row"?: (() => any) | undefined;
32
+ "onSelection-change"?: ((ids: string[]) => any) | undefined;
33
+ "onCell-edit"?: ((payload: {
34
+ rowId: string;
35
+ fieldId: string;
36
+ value: unknown;
37
+ }) => any) | undefined;
38
+ }>, {
39
+ selectable: boolean;
40
+ rowKey: string;
41
+ addable: boolean;
42
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
43
+ export default _default;
@@ -0,0 +1,33 @@
1
+ export type FieldType = 'text' | 'number' | 'checkbox' | 'select' | 'multiselect' | 'date' | 'datetime' | 'rating' | 'url' | 'email';
2
+ export interface FieldOption {
3
+ label: string;
4
+ value: string;
5
+ color?: string;
6
+ }
7
+ export interface FieldDef {
8
+ id: string;
9
+ type: FieldType;
10
+ label: string;
11
+ options?: FieldOption[];
12
+ max?: number;
13
+ readonly?: boolean;
14
+ }
15
+ export type CellValue = string | number | boolean | string[] | null | undefined;
16
+ type __VLS_Props = {
17
+ rowId: string;
18
+ field: FieldDef;
19
+ value?: CellValue;
20
+ readonly?: boolean;
21
+ };
22
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
+ commit: (rowId: string, fieldId: string, value: CellValue) => any;
24
+ cancel: () => any;
25
+ tabNext: () => any;
26
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
27
+ onCommit?: ((rowId: string, fieldId: string, value: CellValue) => any) | undefined;
28
+ onCancel?: (() => any) | undefined;
29
+ onTabNext?: (() => any) | undefined;
30
+ }>, {
31
+ readonly: boolean;
32
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
33
+ export default _default;
@@ -0,0 +1,6 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
+ click: () => any;
3
+ }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
+ onClick?: (() => any) | undefined;
5
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
6
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { TableColumn } from '../../types';
2
+ type __VLS_Props = {
3
+ columns: TableColumn[];
4
+ visible?: boolean;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ close: () => any;
8
+ "update:columns": (columns: TableColumn[]) => any;
9
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ onClose?: (() => any) | undefined;
11
+ "onUpdate:columns"?: ((columns: TableColumn[]) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,47 @@
1
+ import { TableColumn, ColorMap } from '../../types';
2
+ type TableRow = Record<string, unknown> & {
3
+ id: string;
4
+ };
5
+ type __VLS_Props = {
6
+ row: TableRow;
7
+ rowKey?: string;
8
+ selected?: boolean;
9
+ columns?: TableColumn[];
10
+ /**
11
+ * 优先级颜色映射,与内置默认映射合并(传入优先)
12
+ */
13
+ priorityColorMap?: ColorMap;
14
+ /**
15
+ * 状态颜色映射,与内置默认映射合并(传入优先)
16
+ */
17
+ statusColorMap?: ColorMap;
18
+ };
19
+ declare function __VLS_template(): {
20
+ attrs: Partial<{}>;
21
+ slots: {
22
+ cell?(_: {
23
+ row: TableRow;
24
+ col: TableColumn;
25
+ }): any;
26
+ };
27
+ refs: {};
28
+ rootEl: HTMLDivElement;
29
+ };
30
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
31
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
32
+ select: (id: string) => any;
33
+ click: (row: TableRow) => any;
34
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
35
+ onSelect?: ((id: string) => any) | undefined;
36
+ onClick?: ((row: TableRow) => any) | undefined;
37
+ }>, {
38
+ rowKey: string;
39
+ selected: boolean;
40
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
41
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
42
+ export default _default;
43
+ type __VLS_WithTemplateSlots<T, S> = T & {
44
+ new (): {
45
+ $slots: S;
46
+ };
47
+ };
@@ -0,0 +1,24 @@
1
+ import { TableColumn } from '../../types';
2
+ import { FilterCondition, FilterLogic } from '../../composables/useTableFilter';
3
+ type __VLS_Props = {
4
+ columns: TableColumn[];
5
+ conditions: readonly FilterCondition[];
6
+ logic: FilterLogic;
7
+ visible?: boolean;
8
+ };
9
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
+ clear: () => any;
11
+ close: () => any;
12
+ "add-condition": () => any;
13
+ "remove-condition": (id: string) => any;
14
+ "update-condition": (id: string, update: Partial<FilterCondition>) => any;
15
+ "update:logic": (logic: FilterLogic) => any;
16
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ onClear?: (() => any) | undefined;
18
+ onClose?: (() => any) | undefined;
19
+ "onAdd-condition"?: (() => any) | undefined;
20
+ "onRemove-condition"?: ((id: string) => any) | undefined;
21
+ "onUpdate-condition"?: ((id: string, update: Partial<FilterCondition>) => any) | undefined;
22
+ "onUpdate:logic"?: ((logic: FilterLogic) => any) | undefined;
23
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
24
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import { TableColumn } from '../../types';
2
+ type __VLS_Props = {
3
+ columns?: TableColumn[];
4
+ selectable?: boolean;
5
+ sortKey?: string;
6
+ sortOrder?: "asc" | "desc";
7
+ allSelected?: boolean;
8
+ indeterminate?: boolean;
9
+ };
10
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ sort: (key: string) => any;
12
+ "select-all": () => any;
13
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ onSort?: ((key: string) => any) | undefined;
15
+ "onSelect-all"?: (() => any) | undefined;
16
+ }>, {
17
+ selectable: boolean;
18
+ sortKey: string;
19
+ sortOrder: "asc" | "desc";
20
+ allSelected: boolean;
21
+ indeterminate: boolean;
22
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
23
+ export default _default;
@@ -0,0 +1,8 @@
1
+ export { default as DataTable } from './DataTable.vue';
2
+ export { default as TableHeaderRow } from './TableHeaderRow.vue';
3
+ export { default as TableDataRow } from './TableDataRow.vue';
4
+ export { default as NewRowBtn } from './NewRowBtn.vue';
5
+ export { default as TableFilterPanel } from './TableFilterPanel.vue';
6
+ export { default as TableColumnManager } from './TableColumnManager.vue';
7
+ export { default as FieldCell } from './FieldCell.vue';
8
+ export type { FieldDef, FieldType, FieldOption, CellValue } from './FieldCell.vue';
@@ -0,0 +1,38 @@
1
+ /**
2
+ * TabPanel 组件 - Tab 内容面板
3
+ *
4
+ * 必须嵌套在 Tabs 组件内部使用,通过 inject 获取当前激活的 tab。
5
+ *
6
+ * @example
7
+ * <Tabs v-model="active" :tabs="tabs">
8
+ * <TabPanel name="tab1">面板1的内容</TabPanel>
9
+ * <TabPanel name="tab2" :keep-alive="true">面板2(保留DOM)</TabPanel>
10
+ * </Tabs>
11
+ */
12
+ type __VLS_Props = {
13
+ /** 对应 TabItem.key,用于匹配激活状态 */
14
+ name: string;
15
+ /**
16
+ * 是否保留 DOM
17
+ * - false(默认):切换时销毁组件,节省内存
18
+ * - true:保留 DOM,切换时仅隐藏,适合有状态组件
19
+ */
20
+ keepAlive?: boolean;
21
+ };
22
+ declare function __VLS_template(): {
23
+ attrs: Partial<{}>;
24
+ slots: {
25
+ default?(_: {}): any;
26
+ };
27
+ refs: {};
28
+ rootEl: any;
29
+ };
30
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
31
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
32
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
33
+ export default _default;
34
+ type __VLS_WithTemplateSlots<T, S> = T & {
35
+ new (): {
36
+ $slots: S;
37
+ };
38
+ };