@oneflowui/ui 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/assets/tableWorker-CTsbCPPP.js +1 -0
- package/dist/components/ContextMenu/index.vue.d.ts +2 -1
- package/dist/components/ContextMenu/index.vue.js +7 -0
- package/dist/components/ContextMenu/index.vue2.js +92 -0
- package/dist/components/Dashboard/charts/BarChart.vue.js +7 -0
- package/dist/components/Dashboard/charts/BarChart.vue2.js +43 -0
- package/dist/components/Dashboard/charts/DoughnutChart.vue.js +23 -0
- package/dist/components/Dashboard/charts/DoughnutChart.vue2.js +4 -0
- package/dist/components/Dashboard/charts/NumberCard.vue.js +7 -0
- package/dist/components/Dashboard/charts/NumberCard.vue2.js +41 -0
- package/dist/components/Dashboard/charts/PieChart.vue.js +7 -0
- package/dist/components/Dashboard/charts/PieChart.vue2.js +53 -0
- package/dist/components/Dashboard/charts/TableChart.vue.js +7 -0
- package/dist/components/Dashboard/charts/TableChart.vue2.js +50 -0
- package/dist/components/Dashboard/index.vue.js +7 -0
- package/dist/components/Dashboard/index.vue2.js +104 -0
- package/dist/components/ai/AiMessageBubble.vue.js +7 -0
- package/dist/components/ai/AiMessageBubble.vue2.js +47 -0
- package/dist/components/ai/AiMessageList.vue.js +7 -0
- package/dist/components/ai/AiMessageList.vue2.js +78 -0
- package/dist/components/ai/AiSender.vue.js +7 -0
- package/dist/components/ai/AiSender.vue2.js +86 -0
- package/dist/components/ai/AiStreamingCursor.vue.js +7 -0
- package/dist/components/ai/AiStreamingCursor.vue2.js +16 -0
- package/dist/components/ai/AiThinking.vue.js +7 -0
- package/dist/components/ai/AiThinking.vue2.js +19 -0
- package/dist/components/ai/UserMessageBubble.vue.js +7 -0
- package/dist/components/ai/UserMessageBubble.vue2.js +34 -0
- package/dist/components/auxiliary/ColorPanel.vue.js +7 -0
- package/dist/components/auxiliary/ColorPanel.vue2.js +65 -0
- package/dist/components/auxiliary/FileUpload.vue.js +7 -0
- package/dist/components/auxiliary/FileUpload.vue2.js +90 -0
- package/dist/components/auxiliary/PersonPanel.vue.js +7 -0
- package/dist/components/auxiliary/PersonPanel.vue2.js +66 -0
- package/dist/components/base/Accordion.vue.js +7 -0
- package/dist/components/base/Accordion.vue2.js +78 -0
- package/dist/components/base/AddViewBtn.vue.js +7 -0
- package/dist/components/base/AddViewBtn.vue2.js +25 -0
- package/dist/components/base/Avatar.vue.js +7 -0
- package/dist/components/base/Avatar.vue2.js +72 -0
- package/dist/components/base/Badge.vue.js +7 -0
- package/dist/components/base/Badge.vue2.js +70 -0
- package/dist/components/base/ButtonGroup.vue.js +7 -0
- package/dist/components/base/ButtonGroup.vue2.js +40 -0
- package/dist/components/base/ChainItem.vue.js +7 -0
- package/dist/components/base/ChainItem.vue2.js +68 -0
- package/dist/components/base/DescBlock.vue.js +7 -0
- package/dist/components/base/DescBlock.vue2.js +13 -0
- package/dist/components/base/DropdownMenu.vue.js +7 -0
- package/dist/components/base/DropdownMenu.vue2.js +91 -0
- package/dist/components/base/EmptyState.vue.js +7 -0
- package/dist/components/base/EmptyState.vue2.js +38 -0
- package/dist/components/base/InfoCard.vue.js +7 -0
- package/dist/components/base/InfoCard.vue2.js +167 -0
- package/dist/components/base/MonitorItem.vue.d.ts +1 -1
- package/dist/components/base/MonitorItem.vue.js +7 -0
- package/dist/components/base/MonitorItem.vue2.js +56 -0
- package/dist/components/base/PersonaCard.vue.d.ts +2 -1
- package/dist/components/base/PersonaCard.vue.js +7 -0
- package/dist/components/base/PersonaCard.vue2.js +185 -0
- package/dist/components/base/ProgressBar.vue.js +7 -0
- package/dist/components/base/ProgressBar.vue2.js +49 -0
- package/dist/components/base/RangeSlider.vue.js +7 -0
- package/dist/components/base/RangeSlider.vue2.js +35 -0
- package/dist/components/base/RefTag.vue.d.ts +2 -2
- package/dist/components/base/RefTag.vue.js +7 -0
- package/dist/components/base/RefTag.vue2.js +52 -0
- package/dist/components/base/SearchHighlight.vue.d.ts +6 -0
- package/dist/components/base/SearchHighlight.vue.js +7 -0
- package/dist/components/base/SearchHighlight.vue2.js +21 -0
- package/dist/components/base/SectionBlock.vue.js +7 -0
- package/dist/components/base/SectionBlock.vue2.js +115 -0
- package/dist/components/base/SelectBadge.vue.js +7 -0
- package/dist/components/base/SelectBadge.vue2.js +81 -0
- package/dist/components/base/StatisticCard.vue.js +7 -0
- package/dist/components/base/StatisticCard.vue2.js +57 -0
- package/dist/components/base/StatusIndicator.vue.js +7 -0
- package/dist/components/base/StatusIndicator.vue2.js +54 -0
- package/dist/components/base/StatusSummary.vue.js +7 -0
- package/dist/components/base/StatusSummary.vue2.js +64 -0
- package/dist/components/base/Stepper.vue.js +7 -0
- package/dist/components/base/Stepper.vue2.js +70 -0
- package/dist/components/base/Switch.vue.js +7 -0
- package/dist/components/base/Switch.vue2.js +43 -0
- package/dist/components/base/ToolbarBtn.vue.d.ts +2 -1
- package/dist/components/base/ToolbarBtn.vue.js +7 -0
- package/dist/components/base/ToolbarBtn.vue2.js +30 -0
- package/dist/components/base/ViewModeGroup.vue.d.ts +2 -1
- package/dist/components/base/ViewModeGroup.vue.js +7 -0
- package/dist/components/base/ViewModeGroup.vue2.js +32 -0
- package/dist/components/base/ViewSwitcher.vue.d.ts +2 -1
- package/dist/components/base/ViewSwitcher.vue.js +7 -0
- package/dist/components/base/ViewSwitcher.vue2.js +73 -0
- package/dist/components/base/ViewTab.vue.js +7 -0
- package/dist/components/base/ViewTab.vue2.js +42 -0
- package/dist/components/base/index.d.ts +1 -0
- package/dist/components/breadcrumb/Breadcrumb.vue.js +7 -0
- package/dist/components/breadcrumb/Breadcrumb.vue2.js +52 -0
- package/dist/components/breadcrumb/BreadcrumbItem.vue.js +7 -0
- package/dist/components/breadcrumb/BreadcrumbItem.vue2.js +35 -0
- package/dist/components/detail/CommentItem.vue.js +7 -0
- package/dist/components/detail/CommentItem.vue2.js +29 -0
- package/dist/components/detail/DetailLayout.vue.js +7 -0
- package/dist/components/detail/DetailLayout.vue2.js +118 -0
- package/dist/components/detail/PropPanel.vue.js +7 -0
- package/dist/components/detail/PropPanel.vue2.js +51 -0
- package/dist/components/detail/PropRow.vue.js +7 -0
- package/dist/components/detail/PropRow.vue2.js +51 -0
- package/dist/components/editor/BlockQuote.vue.js +7 -0
- package/dist/components/editor/BlockQuote.vue2.js +45 -0
- package/dist/components/editor/CodeBlock.vue.js +7 -0
- package/dist/components/editor/CodeBlock.vue2.js +48 -0
- package/dist/components/editor/ContentBlock.vue.js +7 -0
- package/dist/components/editor/ContentBlock.vue2.js +49 -0
- package/dist/components/editor/RefLink.vue.js +7 -0
- package/dist/components/editor/RefLink.vue2.js +37 -0
- package/dist/components/editor/RichTextEditor.vue.js +7 -0
- package/dist/components/editor/RichTextEditor.vue2.js +132 -0
- package/dist/components/field/FieldAttachment.vue.d.ts +17 -0
- package/dist/components/field/FieldAttachment.vue.js +7 -0
- package/dist/components/field/FieldAttachment.vue2.js +69 -0
- package/dist/components/field/FieldAutoNumber.vue.d.ts +7 -0
- package/dist/components/field/FieldAutoNumber.vue.js +7 -0
- package/dist/components/field/FieldAutoNumber.vue2.js +15 -0
- package/dist/components/field/FieldCheckbox.vue.js +7 -0
- package/dist/{FieldCheckbox-CV3QtQ4Y.js → components/field/FieldCheckbox.vue2.js} +8 -9
- package/dist/components/field/FieldCreator.vue.d.ts +7 -0
- package/dist/components/field/FieldCreator.vue.js +7 -0
- package/dist/components/field/FieldCreator.vue2.js +24 -0
- package/dist/components/field/FieldCurrency.vue.d.ts +17 -0
- package/dist/components/field/FieldCurrency.vue.js +7 -0
- package/dist/components/field/FieldCurrency.vue2.js +42 -0
- package/dist/components/field/FieldDate.vue.js +7 -0
- package/dist/components/field/FieldDate.vue2.js +36 -0
- package/dist/components/field/FieldDatetime.vue.js +7 -0
- package/dist/{FieldDatetime-B52GfWrK.js → components/field/FieldDatetime.vue2.js} +11 -12
- package/dist/components/field/FieldEmail.vue.js +7 -0
- package/dist/{FieldEmail-UREMoue-.js → components/field/FieldEmail.vue2.js} +12 -13
- package/dist/components/field/FieldMarkdownPreview.vue.d.ts +13 -0
- package/dist/components/field/FieldMarkdownPreview.vue.js +7 -0
- package/dist/components/field/FieldMarkdownPreview.vue2.js +37 -0
- package/dist/components/field/FieldMultiSelect.vue.js +7 -0
- package/dist/{FieldMultiSelect-Dlay1Fop.js → components/field/FieldMultiSelect.vue2.js} +32 -33
- package/dist/components/field/FieldNumber.vue.js +7 -0
- package/dist/{FieldNumber-BjhfFhs6.js → components/field/FieldNumber.vue2.js} +8 -9
- package/dist/components/field/FieldPhone.vue.d.ts +17 -0
- package/dist/components/field/FieldPhone.vue.js +7 -0
- package/dist/components/field/FieldPhone.vue2.js +34 -0
- package/dist/components/field/FieldProgress.vue.d.ts +15 -0
- package/dist/components/field/FieldProgress.vue.js +7 -0
- package/dist/components/field/FieldProgress.vue2.js +40 -0
- package/dist/components/field/FieldRating.vue.js +7 -0
- package/dist/components/field/FieldRating.vue2.js +31 -0
- package/dist/components/field/FieldRelation.vue.d.ts +17 -0
- package/dist/components/field/FieldRelation.vue.js +7 -0
- package/dist/components/field/FieldRelation.vue2.js +67 -0
- package/dist/components/field/FieldRichText.vue.d.ts +17 -0
- package/dist/components/field/FieldRichText.vue.js +7 -0
- package/dist/components/field/FieldRichText.vue2.js +65 -0
- package/dist/components/field/FieldSelect.vue.js +7 -0
- package/dist/{FieldSelect-B39Ad8VH.js → components/field/FieldSelect.vue2.js} +44 -44
- package/dist/components/field/FieldText.vue.js +7 -0
- package/dist/{FieldText-Ry7f72Ug.js → components/field/FieldText.vue2.js} +13 -14
- package/dist/components/field/FieldUrl.vue.js +7 -0
- package/dist/components/field/FieldUrl.vue2.js +33 -0
- package/dist/components/form/FormDesigner.vue.js +7 -0
- package/dist/components/form/FormDesigner.vue2.js +255 -0
- package/dist/components/gallery/GalleryCard.vue.js +7 -0
- package/dist/components/gallery/GalleryCard.vue2.js +87 -0
- package/dist/components/gallery/GalleryView.vue.d.ts +6 -2
- package/dist/components/gallery/GalleryView.vue.js +7 -0
- package/dist/components/gallery/GalleryView.vue2.js +58 -0
- package/dist/components/kanban/KanbanBoard.vue.d.ts +5 -1
- package/dist/components/kanban/KanbanBoard.vue.js +7 -0
- package/dist/components/kanban/KanbanBoard.vue2.js +119 -0
- package/dist/components/kanban/KanbanCard.vue.js +7 -0
- package/dist/components/kanban/KanbanCard.vue2.js +56 -0
- package/dist/components/kanban/KanbanColumn.vue.js +7 -0
- package/dist/components/kanban/KanbanColumn.vue2.js +103 -0
- package/dist/components/kanban/QuickAddRow.vue.js +7 -0
- package/dist/components/kanban/QuickAddRow.vue2.js +58 -0
- package/dist/components/layout/AppLayout.vue.js +7 -0
- package/dist/components/layout/AppLayout.vue2.js +82 -0
- package/dist/components/layout/Navbar.vue.js +7 -0
- package/dist/components/layout/Navbar.vue2.js +70 -0
- package/dist/components/layout/Sidebar.vue.js +7 -0
- package/dist/components/layout/Sidebar.vue2.js +88 -0
- package/dist/components/layout/StatusBar.vue.js +7 -0
- package/dist/components/layout/StatusBar.vue2.js +37 -0
- package/dist/components/mermaid/MermaidChart.vue.js +7 -0
- package/dist/components/mermaid/MermaidChart.vue2.js +75 -0
- package/dist/components/overlay/Dialog.vue.js +7 -0
- package/dist/components/overlay/Dialog.vue2.js +89 -0
- package/dist/components/overlay/Drawer.vue.js +7 -0
- package/dist/components/overlay/Drawer.vue2.js +96 -0
- package/dist/components/overlay/Modal.vue.js +7 -0
- package/dist/components/overlay/Modal.vue2.js +99 -0
- package/dist/components/overlay/SidePanel.vue.js +7 -0
- package/dist/components/overlay/SidePanel.vue2.js +121 -0
- package/dist/components/split/SplitPane.vue.js +8 -0
- package/dist/components/split/SplitPane.vue2.js +68 -0
- package/dist/components/table/ColumnHeaderMenu.vue.d.ts +33 -0
- package/dist/components/table/ColumnHeaderMenu.vue.js +7 -0
- package/dist/components/table/ColumnHeaderMenu.vue2.js +153 -0
- package/dist/components/table/DataTable.vue.d.ts +116 -25
- package/dist/components/table/DataTable.vue.js +7 -0
- package/dist/components/table/DataTable.vue2.js +821 -0
- package/dist/components/table/DetailSheet.vue.d.ts +43 -0
- package/dist/components/table/DetailSheet.vue.js +7 -0
- package/dist/components/table/DetailSheet.vue2.js +140 -0
- package/dist/components/table/FieldCell.vue.d.ts +1 -1
- package/dist/components/table/FieldCell.vue.js +7 -0
- package/dist/components/table/FieldCell.vue2.js +86 -0
- package/dist/components/table/FieldTypePicker.vue.d.ts +15 -0
- package/dist/components/table/FieldTypePicker.vue.js +7 -0
- package/dist/components/table/FieldTypePicker.vue2.js +92 -0
- package/dist/components/table/MobileListView.vue.d.ts +24 -0
- package/dist/components/table/MobileListView.vue.js +7 -0
- package/dist/components/table/MobileListView.vue2.js +90 -0
- package/dist/components/table/NewRowBtn.vue.js +7 -0
- package/dist/components/table/NewRowBtn.vue2.js +22 -0
- package/dist/components/table/TableColumnManager.vue.js +7 -0
- package/dist/components/table/TableColumnManager.vue2.js +100 -0
- package/dist/components/table/TableDataRow.vue.js +7 -0
- package/dist/components/table/TableDataRow.vue2.js +115 -0
- package/dist/components/table/TableFilterPanel.vue.js +7 -0
- package/dist/components/table/TableFilterPanel.vue2.js +142 -0
- package/dist/components/table/TableGroupRow.vue.d.ts +5 -0
- package/dist/components/table/TableGroupRow.vue.js +7 -0
- package/dist/components/table/TableGroupRow.vue2.js +58 -0
- package/dist/components/table/TableHeaderRow.vue.d.ts +16 -0
- package/dist/components/table/TableHeaderRow.vue.js +7 -0
- package/dist/components/table/TableHeaderRow.vue2.js +90 -0
- package/dist/components/table/TableToolbar.vue.d.ts +118 -0
- package/dist/components/table/TableToolbar.vue.js +7 -0
- package/dist/components/table/TableToolbar.vue2.js +273 -0
- package/dist/components/table/index.d.ts +5 -0
- package/dist/components/tabs/TabPanel.vue.js +7 -0
- package/dist/components/tabs/TabPanel.vue2.js +26 -0
- package/dist/components/tabs/Tabs.vue.js +7 -0
- package/dist/components/tabs/Tabs.vue2.js +87 -0
- package/dist/components/timeline/ActivityTimeline.vue.js +7 -0
- package/dist/components/timeline/ActivityTimeline.vue2.js +104 -0
- package/dist/components/timeline/GanttRow.vue.js +7 -0
- package/dist/components/timeline/GanttRow.vue2.js +110 -0
- package/dist/components/timeline/GanttTimeline.vue.js +7 -0
- package/dist/components/timeline/GanttTimeline.vue2.js +186 -0
- package/dist/components/toast/ToastContainer.vue.js +34 -0
- package/dist/components/toast/ToastContainer.vue3.js +5 -0
- package/dist/components/toast/ToastItem.vue.js +7 -0
- package/dist/components/toast/ToastItem.vue2.js +78 -0
- package/dist/composables/index.d.ts +19 -0
- package/dist/composables/useAiChat.js +103 -0
- package/dist/composables/useBadge.js +76 -0
- package/dist/composables/useBreakpoint.d.ts +2 -1
- package/dist/composables/useBreakpoint.js +18 -0
- package/dist/composables/useColumnResize.d.ts +19 -0
- package/dist/composables/useColumnResize.js +58 -0
- package/dist/composables/useDraftRows.d.ts +33 -0
- package/dist/composables/useDraftRows.js +103 -0
- package/dist/composables/useFixedColumns.d.ts +25 -0
- package/dist/composables/useFixedColumns.js +61 -0
- package/dist/composables/useFocusTrap.d.ts +10 -0
- package/dist/composables/useFocusTrap.js +37 -0
- package/dist/composables/useInlineEdit.js +28 -0
- package/dist/composables/useKeyboardNavigation.d.ts +45 -0
- package/dist/composables/useKeyboardNavigation.js +140 -0
- package/dist/composables/useMarkdown.js +69 -0
- package/dist/composables/useRowDrag.d.ts +32 -0
- package/dist/composables/useRowDrag.js +85 -0
- package/dist/composables/useSchemaEngine.d.ts +31 -0
- package/dist/composables/useSchemaEngine.js +129 -0
- package/dist/composables/useSearch.d.ts +30 -0
- package/dist/composables/useSearch.js +59 -0
- package/dist/composables/useStream.js +80 -0
- package/dist/composables/useSupabaseProvider.d.ts +70 -0
- package/dist/composables/useSupabaseProvider.js +126 -0
- package/dist/composables/useTable.d.ts +3 -0
- package/dist/composables/useTable.js +135 -0
- package/dist/composables/useTableColumns.js +24 -0
- package/dist/composables/useTableData.js +16 -0
- package/dist/composables/useTableFilter.js +97 -0
- package/dist/composables/useTableGroup.d.ts +14 -1
- package/dist/composables/useTableGroup.js +70 -0
- package/dist/composables/useToast.js +38 -0
- package/dist/composables/useTypewriter.js +56 -0
- package/dist/composables/useViewPersistence.d.ts +98 -0
- package/dist/composables/useViewPersistence.js +141 -0
- package/dist/composables/useVirtualList.d.ts +4 -1
- package/dist/composables/useVirtualList.js +140 -0
- package/dist/composables/useWorkerSort.d.ts +14 -0
- package/dist/composables/useWorkerSort.js +61 -0
- package/dist/constants/table.js +11 -0
- package/dist/index.d.ts +28 -4
- package/dist/index.js +349 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/core.js +5 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/bash.js +377 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/css.js +923 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/go.js +151 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/java.js +240 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/javascript.js +658 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/json.js +38 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/markdown.js +216 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/plaintext.js +13 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/python.js +399 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/rust.js +305 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/sql.js +615 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/typescript.js +753 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/xml.js +219 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/yaml.js +183 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js +1063 -0
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +63 -2
- package/dist/types/index.js +94 -0
- package/dist/types/table-internal.d.ts +64 -0
- package/dist/utils/aggregation.d.ts +5 -0
- package/dist/utils/aggregation.js +38 -0
- package/dist/utils/icon.js +15 -0
- package/dist/utils/supabaseAdapter.d.ts +48 -0
- package/dist/utils/supabaseAdapter.js +76 -0
- package/dist/utils/supabaseSchema.d.ts +81 -0
- package/dist/utils/supabaseSchema.js +202 -0
- package/dist/workers/tableWorker.d.ts +31 -0
- package/package.json +13 -6
- package/dist/FieldDate-Bljx4jb7.js +0 -34
- package/dist/FieldRating-BKHUu-A1.js +0 -32
- package/dist/FieldUrl-bv0EB9sh.js +0 -34
- package/dist/index-DQph5iTq.js +0 -12936
- package/dist/oneflow-ui.js +0 -111
- package/dist/oneflow-ui.umd.cjs +0 -13
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineComponent as n, computed as d, openBlock as u, createElementBlock as f, mergeProps as l, renderSlot as c } from "vue";
|
|
2
|
+
const p = /* @__PURE__ */ n({
|
|
3
|
+
inheritAttrs: !1,
|
|
4
|
+
__name: "Badge",
|
|
5
|
+
props: {
|
|
6
|
+
color: {},
|
|
7
|
+
priority: {},
|
|
8
|
+
size: { default: "md" }
|
|
9
|
+
},
|
|
10
|
+
setup(o) {
|
|
11
|
+
const r = o, a = {
|
|
12
|
+
default: {
|
|
13
|
+
background: "var(--of-badge-gray-bg)",
|
|
14
|
+
text: "var(--of-badge-gray-text)",
|
|
15
|
+
border: "var(--of-badge-gray-border)"
|
|
16
|
+
},
|
|
17
|
+
blue: {
|
|
18
|
+
background: "var(--of-badge-blue-bg)",
|
|
19
|
+
text: "var(--of-badge-blue-text)",
|
|
20
|
+
border: "var(--of-badge-blue-border)"
|
|
21
|
+
},
|
|
22
|
+
green: {
|
|
23
|
+
background: "var(--of-badge-green-bg)",
|
|
24
|
+
text: "var(--of-badge-green-text)",
|
|
25
|
+
border: "var(--of-badge-green-border)"
|
|
26
|
+
},
|
|
27
|
+
orange: {
|
|
28
|
+
background: "var(--of-badge-orange-bg)",
|
|
29
|
+
text: "var(--of-badge-orange-text)",
|
|
30
|
+
border: "var(--of-badge-orange-border)"
|
|
31
|
+
},
|
|
32
|
+
red: {
|
|
33
|
+
background: "var(--of-badge-red-bg)",
|
|
34
|
+
text: "var(--of-badge-red-text)",
|
|
35
|
+
border: "var(--of-badge-red-border)"
|
|
36
|
+
},
|
|
37
|
+
purple: {
|
|
38
|
+
background: "var(--of-badge-purple-bg)",
|
|
39
|
+
text: "var(--of-badge-purple-text)",
|
|
40
|
+
border: "var(--of-badge-purple-border)"
|
|
41
|
+
},
|
|
42
|
+
gray: {
|
|
43
|
+
background: "var(--of-badge-gray-bg)",
|
|
44
|
+
text: "var(--of-badge-gray-text)",
|
|
45
|
+
border: "var(--of-badge-gray-border)"
|
|
46
|
+
}
|
|
47
|
+
}, t = {
|
|
48
|
+
P0: "red",
|
|
49
|
+
P1: "orange",
|
|
50
|
+
P2: "blue",
|
|
51
|
+
P3: "green"
|
|
52
|
+
}, b = d(() => r.priority ? t[r.priority] : r.color ? r.color in a ? r.color : "default" : "gray"), g = d(() => {
|
|
53
|
+
const e = a[b.value];
|
|
54
|
+
return {
|
|
55
|
+
"--one-badge-bg": e.background,
|
|
56
|
+
"--one-badge-color": e.text,
|
|
57
|
+
"--one-badge-border": e.border
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
return (e, v) => (u(), f("span", l({
|
|
61
|
+
class: ["one-badge", `one-badge--${o.size}`],
|
|
62
|
+
style: g.value
|
|
63
|
+
}, e.$attrs), [
|
|
64
|
+
c(e.$slots, "default", {}, void 0, !0)
|
|
65
|
+
], 16));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export {
|
|
69
|
+
p as default
|
|
70
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineComponent as a, computed as c, openBlock as o, createElementBlock as n, mergeProps as i, Fragment as m, renderList as p, normalizeClass as d, createBlock as f, resolveDynamicComponent as _, unref as g, createElementVNode as b, toDisplayString as u } from "vue";
|
|
2
|
+
import { resolveIcon as v } from "../../utils/icon.js";
|
|
3
|
+
const k = ["onClick"], h = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "of-button-group__item-content"
|
|
6
|
+
}, C = { key: 1 }, D = /* @__PURE__ */ a({
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
__name: "ButtonGroup",
|
|
9
|
+
props: {
|
|
10
|
+
options: {},
|
|
11
|
+
modelValue: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(l) {
|
|
15
|
+
const r = l, s = c(() => {
|
|
16
|
+
const t = r.options.length;
|
|
17
|
+
return t <= 2 ? "of-button-group--cols-2" : t <= 3 ? "of-button-group--cols-3" : "of-button-group--cols-4";
|
|
18
|
+
});
|
|
19
|
+
return (t, y) => (o(), n("div", i({
|
|
20
|
+
class: ["of-button-group", s.value]
|
|
21
|
+
}, t.$attrs), [
|
|
22
|
+
(o(!0), n(m, null, p(l.options, (e) => (o(), n("button", {
|
|
23
|
+
key: e.value,
|
|
24
|
+
onClick: (V) => t.$emit("update:modelValue", e.value),
|
|
25
|
+
class: d([
|
|
26
|
+
"of-button-group__item",
|
|
27
|
+
l.modelValue === e.value ? "of-button-group__item--active" : ""
|
|
28
|
+
])
|
|
29
|
+
}, [
|
|
30
|
+
e.icon ? (o(), n("div", h, [
|
|
31
|
+
(o(), f(_(g(v)(e.icon)), { class: "of-button-group__item-icon" })),
|
|
32
|
+
b("span", null, u(e.label), 1)
|
|
33
|
+
])) : (o(), n("div", C, u(e.label), 1))
|
|
34
|
+
], 10, k))), 128))
|
|
35
|
+
], 16));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
D as default
|
|
40
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { defineComponent as h, computed as e, openBlock as l, createElementBlock as c, mergeProps as y, createElementVNode as s, normalizeStyle as n, toDisplayString as t, createCommentVNode as u } from "vue";
|
|
2
|
+
const F = { class: "one-chain-item__header" }, B = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "one-chain-item__duration"
|
|
5
|
+
}, A = /* @__PURE__ */ h({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "ChainItem",
|
|
8
|
+
props: {
|
|
9
|
+
type: { default: "source" },
|
|
10
|
+
title: {},
|
|
11
|
+
description: {},
|
|
12
|
+
avatar: {},
|
|
13
|
+
duration: {},
|
|
14
|
+
color: {},
|
|
15
|
+
bg: {},
|
|
16
|
+
borderColor: {}
|
|
17
|
+
},
|
|
18
|
+
setup(o) {
|
|
19
|
+
const a = o, i = {
|
|
20
|
+
source: {
|
|
21
|
+
color: "var(--of-badge-purple-text, #7C3AED)",
|
|
22
|
+
bg: "var(--of-badge-purple-bg, #F9F0FF)",
|
|
23
|
+
border: "var(--of-badge-purple-border, #E9D5FF)",
|
|
24
|
+
avatarBg: "var(--of-badge-purple-border, #E9D5FF)",
|
|
25
|
+
descColor: "var(--of-badge-purple-text, #6B21A8)",
|
|
26
|
+
defaultAvatar: "A"
|
|
27
|
+
},
|
|
28
|
+
result: {
|
|
29
|
+
color: "var(--of-color-success, #22C55E)",
|
|
30
|
+
bg: "var(--of-color-success-light, #F6FFED)",
|
|
31
|
+
border: "var(--of-color-success-border, #B7EB8F)",
|
|
32
|
+
avatarBg: "var(--of-color-success-border, #B7EB8F)",
|
|
33
|
+
descColor: "var(--of-color-success-dark, #165E26)",
|
|
34
|
+
defaultAvatar: "✓"
|
|
35
|
+
}
|
|
36
|
+
}, r = e(() => i[a.type || "source"]), d = e(() => a.color || r.value.color), v = e(() => a.bg || r.value.bg), b = e(() => a.borderColor || r.value.border), p = e(() => r.value.descColor), g = e(() => a.avatar || r.value.defaultAvatar), f = e(() => ({
|
|
37
|
+
background: v.value,
|
|
38
|
+
borderColor: b.value
|
|
39
|
+
})), m = e(() => ({
|
|
40
|
+
backgroundColor: r.value.avatarBg,
|
|
41
|
+
color: d.value
|
|
42
|
+
}));
|
|
43
|
+
return (C, E) => (l(), c("div", y({
|
|
44
|
+
class: "one-chain-item",
|
|
45
|
+
style: f.value
|
|
46
|
+
}, C.$attrs), [
|
|
47
|
+
s("div", F, [
|
|
48
|
+
s("span", {
|
|
49
|
+
class: "one-chain-item__avatar",
|
|
50
|
+
style: n(m.value)
|
|
51
|
+
}, t(g.value), 5),
|
|
52
|
+
s("span", {
|
|
53
|
+
class: "one-chain-item__title",
|
|
54
|
+
style: n({ color: d.value })
|
|
55
|
+
}, t(o.title), 5),
|
|
56
|
+
o.duration ? (l(), c("span", B, t(o.duration), 1)) : u("", !0)
|
|
57
|
+
]),
|
|
58
|
+
o.description ? (l(), c("div", {
|
|
59
|
+
key: 0,
|
|
60
|
+
class: "one-chain-item__desc",
|
|
61
|
+
style: n({ color: p.value })
|
|
62
|
+
}, t(o.description), 5)) : u("", !0)
|
|
63
|
+
], 16));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
export {
|
|
67
|
+
A as default
|
|
68
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineComponent as o, openBlock as t, createElementBlock as c, renderSlot as n } from "vue";
|
|
2
|
+
const s = { class: "one-desc-block" }, _ = /* @__PURE__ */ o({
|
|
3
|
+
name: "DescBlock",
|
|
4
|
+
__name: "DescBlock",
|
|
5
|
+
setup(r) {
|
|
6
|
+
return (e, l) => (t(), c("div", s, [
|
|
7
|
+
n(e.$slots, "default", {}, void 0, !0)
|
|
8
|
+
]));
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
_ as default
|
|
13
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
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";
|
|
2
|
+
import { MoreHorizontal as D } from "lucide-vue-next";
|
|
3
|
+
import { resolveIcon as N } from "../../utils/icon.js";
|
|
4
|
+
const V = ["aria-expanded"], $ = ["onClick"], F = /* @__PURE__ */ C({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "DropdownMenu",
|
|
7
|
+
props: {
|
|
8
|
+
items: {}
|
|
9
|
+
},
|
|
10
|
+
setup(_) {
|
|
11
|
+
const n = s(!1), a = s(null), c = s(null);
|
|
12
|
+
function u(e) {
|
|
13
|
+
var o;
|
|
14
|
+
e.key === "Escape" && n.value && (n.value = !1, (o = a.value) == null || o.focus());
|
|
15
|
+
}
|
|
16
|
+
E(() => {
|
|
17
|
+
typeof document > "u" || document.removeEventListener("keydown", u);
|
|
18
|
+
});
|
|
19
|
+
function k(e) {
|
|
20
|
+
var o;
|
|
21
|
+
e.onClick(), n.value = !1, document.removeEventListener("keydown", u), (o = a.value) == null || o.focus();
|
|
22
|
+
}
|
|
23
|
+
function w() {
|
|
24
|
+
var e;
|
|
25
|
+
n.value = !n.value, n.value ? z(() => {
|
|
26
|
+
var t;
|
|
27
|
+
document.addEventListener("keydown", u);
|
|
28
|
+
const o = (t = c.value) == null ? void 0 : t.querySelector('[role="menuitem"]');
|
|
29
|
+
o == null || o.focus();
|
|
30
|
+
}) : (document.removeEventListener("keydown", u), (e = a.value) == null || e.focus());
|
|
31
|
+
}
|
|
32
|
+
function y() {
|
|
33
|
+
var e;
|
|
34
|
+
n.value = !1, document.removeEventListener("keydown", u), (e = a.value) == null || e.focus();
|
|
35
|
+
}
|
|
36
|
+
return (e, o) => (r(), l("div", h({ class: "of-dropdown-menu" }, e.$attrs), [
|
|
37
|
+
f("button", {
|
|
38
|
+
ref_key: "triggerRef",
|
|
39
|
+
ref: a,
|
|
40
|
+
class: "of-dropdown-menu__trigger",
|
|
41
|
+
"aria-haspopup": "true",
|
|
42
|
+
"aria-expanded": n.value,
|
|
43
|
+
"aria-label": "更多操作",
|
|
44
|
+
onClick: w
|
|
45
|
+
}, [
|
|
46
|
+
d(m(D), { size: 18 })
|
|
47
|
+
], 8, V),
|
|
48
|
+
d(p, { name: "of-dropdown-fade" }, {
|
|
49
|
+
default: v(() => [
|
|
50
|
+
n.value ? (r(), l("div", {
|
|
51
|
+
key: 0,
|
|
52
|
+
class: "of-dropdown-menu__backdrop",
|
|
53
|
+
onClick: y
|
|
54
|
+
})) : i("", !0)
|
|
55
|
+
]),
|
|
56
|
+
_: 1
|
|
57
|
+
}),
|
|
58
|
+
d(p, { name: "of-dropdown-slide" }, {
|
|
59
|
+
default: v(() => [
|
|
60
|
+
n.value ? (r(), l("div", {
|
|
61
|
+
key: 0,
|
|
62
|
+
ref_key: "menuRef",
|
|
63
|
+
ref: c,
|
|
64
|
+
class: "of-dropdown-menu__content",
|
|
65
|
+
role: "menu"
|
|
66
|
+
}, [
|
|
67
|
+
(r(!0), l(L, null, b(_.items, (t, g) => (r(), l("button", {
|
|
68
|
+
key: g,
|
|
69
|
+
onClick: (S) => k(t),
|
|
70
|
+
class: x([
|
|
71
|
+
"of-dropdown-menu__item",
|
|
72
|
+
`of-dropdown-menu__item--${t.variant || "default"}`
|
|
73
|
+
]),
|
|
74
|
+
role: "menuitem"
|
|
75
|
+
}, [
|
|
76
|
+
t.icon ? (r(), B(M(m(N)(t.icon)), {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: "of-dropdown-menu__item-icon"
|
|
79
|
+
})) : i("", !0),
|
|
80
|
+
f("span", null, R(t.label), 1)
|
|
81
|
+
], 10, $))), 128))
|
|
82
|
+
], 512)) : i("", !0)
|
|
83
|
+
]),
|
|
84
|
+
_: 1
|
|
85
|
+
})
|
|
86
|
+
], 16));
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
export {
|
|
90
|
+
F as default
|
|
91
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent as r, openBlock as e, createElementBlock as o, mergeProps as m, createElementVNode as s, createBlock as d, resolveDynamicComponent as f, unref as y, createCommentVNode as n, toDisplayString as i } from "vue";
|
|
2
|
+
import { resolveIcon as k } from "../../utils/icon.js";
|
|
3
|
+
const u = { class: "of-empty-state__content" }, p = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "of-empty-state__icon"
|
|
6
|
+
}, C = { class: "of-empty-state__title" }, h = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "of-empty-state__description"
|
|
9
|
+
}, B = /* @__PURE__ */ r({
|
|
10
|
+
inheritAttrs: !1,
|
|
11
|
+
__name: "EmptyState",
|
|
12
|
+
props: {
|
|
13
|
+
icon: {},
|
|
14
|
+
title: {},
|
|
15
|
+
description: {},
|
|
16
|
+
action: {}
|
|
17
|
+
},
|
|
18
|
+
setup(t) {
|
|
19
|
+
return (a, c) => (e(), o("div", m({ class: "of-empty-state" }, a.$attrs), [
|
|
20
|
+
s("div", u, [
|
|
21
|
+
t.icon ? (e(), o("div", p, [
|
|
22
|
+
(e(), d(f(y(k)(t.icon))))
|
|
23
|
+
])) : n("", !0),
|
|
24
|
+
s("h3", C, i(t.title), 1),
|
|
25
|
+
t.description ? (e(), o("p", h, i(t.description), 1)) : n("", !0),
|
|
26
|
+
t.action ? (e(), o("button", {
|
|
27
|
+
key: 2,
|
|
28
|
+
onClick: c[0] || (c[0] = //@ts-ignore
|
|
29
|
+
(...l) => t.action.onClick && t.action.onClick(...l)),
|
|
30
|
+
class: "of-empty-state__action"
|
|
31
|
+
}, i(t.action.label), 1)) : n("", !0)
|
|
32
|
+
])
|
|
33
|
+
], 16));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
B as default
|
|
38
|
+
};
|
|
@@ -0,0 +1,167 @@
|
|
|
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";
|
|
2
|
+
const P = {
|
|
3
|
+
key: 0,
|
|
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 = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "of-info-card__meta-text"
|
|
8
|
+
}, N = {
|
|
9
|
+
key: 2,
|
|
10
|
+
class: "of-info-card__meta-text"
|
|
11
|
+
}, O = { class: "of-info-card__body" }, w = { class: "of-info-card__title" }, z = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "of-info-card__notify-meta"
|
|
14
|
+
}, D = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "of-info-card__actions"
|
|
17
|
+
}, F = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "of-info-card__icon-area"
|
|
20
|
+
}, M = { class: "of-info-card__body" }, R = { class: "of-info-card__title" }, Y = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "of-info-card__subtitle"
|
|
23
|
+
}, j = {
|
|
24
|
+
key: 1,
|
|
25
|
+
class: "of-info-card__actions"
|
|
26
|
+
}, G = /* @__PURE__ */ S({
|
|
27
|
+
name: "InfoCard",
|
|
28
|
+
inheritAttrs: !1,
|
|
29
|
+
__name: "InfoCard",
|
|
30
|
+
props: {
|
|
31
|
+
variant: { default: "memo" },
|
|
32
|
+
title: {},
|
|
33
|
+
content: {},
|
|
34
|
+
contentLines: { default: 3 },
|
|
35
|
+
borderColor: {},
|
|
36
|
+
tags: {},
|
|
37
|
+
importance: { default: "normal" },
|
|
38
|
+
author: {},
|
|
39
|
+
date: {},
|
|
40
|
+
unread: { type: Boolean, default: !1 },
|
|
41
|
+
meta: {},
|
|
42
|
+
subtitle: {},
|
|
43
|
+
type: {},
|
|
44
|
+
typeColor: {}
|
|
45
|
+
},
|
|
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)"
|
|
50
|
+
}));
|
|
51
|
+
const a = o, m = y, g = {
|
|
52
|
+
模板: "var(--of-color-primary-500)",
|
|
53
|
+
template: "var(--of-color-primary-500)",
|
|
54
|
+
会话: "var(--of-color-success)",
|
|
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(() => {
|
|
57
|
+
const e = {
|
|
58
|
+
"--of-ic-border": h.value
|
|
59
|
+
};
|
|
60
|
+
return a.variant === "notify" && (e["--of-ic-unread-dot"] = a.unread ? "var(--of-color-info)" : "var(--of-color-text-tertiary)"), e;
|
|
61
|
+
}), v = b(
|
|
62
|
+
() => ({
|
|
63
|
+
"--of-ic-clamp": String(a.contentLines ?? 3)
|
|
64
|
+
})
|
|
65
|
+
);
|
|
66
|
+
function _(e) {
|
|
67
|
+
const l = [
|
|
68
|
+
{
|
|
69
|
+
bg: "var(--of-badge-blue-bg)",
|
|
70
|
+
color: "var(--of-badge-blue-text)",
|
|
71
|
+
border: "var(--of-badge-blue-border)"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
bg: "var(--of-badge-green-bg)",
|
|
75
|
+
color: "var(--of-badge-green-text)",
|
|
76
|
+
border: "var(--of-badge-green-border)"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
bg: "var(--of-badge-orange-bg)",
|
|
80
|
+
color: "var(--of-badge-orange-text)",
|
|
81
|
+
border: "var(--of-badge-orange-border)"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
bg: "var(--of-badge-purple-bg)",
|
|
85
|
+
color: "var(--of-badge-purple-text)",
|
|
86
|
+
border: "var(--of-badge-purple-border)"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
bg: "var(--of-badge-gray-bg)",
|
|
90
|
+
color: "var(--of-badge-gray-text)",
|
|
91
|
+
border: "var(--of-badge-gray-border)"
|
|
92
|
+
}
|
|
93
|
+
], d = l[e % l.length];
|
|
94
|
+
return {
|
|
95
|
+
"--of-ic-tag-bg": d.bg,
|
|
96
|
+
"--of-ic-tag-color": d.color,
|
|
97
|
+
"--of-ic-tag-border": d.border
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function C(e) {
|
|
101
|
+
m("click", e);
|
|
102
|
+
}
|
|
103
|
+
return (e, l) => (t(), r("div", L({
|
|
104
|
+
class: ["of-info-card", `of-info-card--${o.variant}`],
|
|
105
|
+
style: k.value
|
|
106
|
+
}, e.$attrs, { onClick: C }), [
|
|
107
|
+
o.variant === "memo" ? (t(), r(f, { key: 0 }, [
|
|
108
|
+
e.$slots.icon ? (t(), r("div", P, [
|
|
109
|
+
s(e.$slots, "icon", {}, void 0, !0)
|
|
110
|
+
])) : n("", !0),
|
|
111
|
+
c("div", A, [
|
|
112
|
+
c("div", T, i(o.title), 1),
|
|
113
|
+
o.content ? (t(), r("div", {
|
|
114
|
+
key: 0,
|
|
115
|
+
class: "of-info-card__content of-info-card__content--clamp",
|
|
116
|
+
style: u(v.value)
|
|
117
|
+
}, 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,
|
|
121
|
+
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)
|
|
127
|
+
])
|
|
128
|
+
])
|
|
129
|
+
], 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),
|
|
133
|
+
o.content ? (t(), r("div", {
|
|
134
|
+
key: 0,
|
|
135
|
+
class: "of-info-card__content of-info-card__content--clamp",
|
|
136
|
+
style: u(v.value)
|
|
137
|
+
}, 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)
|
|
140
|
+
]),
|
|
141
|
+
e.$slots.actions ? (t(), r("div", D, [
|
|
142
|
+
s(e.$slots, "actions", {}, void 0, !0)
|
|
143
|
+
])) : n("", !0)
|
|
144
|
+
], 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)
|
|
147
|
+
])) : n("", !0),
|
|
148
|
+
c("div", M, [
|
|
149
|
+
c("div", R, i(o.title), 1),
|
|
150
|
+
o.subtitle ? (t(), r("div", Y, i(o.subtitle), 1)) : n("", !0),
|
|
151
|
+
o.content ? (t(), r("div", {
|
|
152
|
+
key: 1,
|
|
153
|
+
class: "of-info-card__content of-info-card__content--clamp",
|
|
154
|
+
style: u(v.value)
|
|
155
|
+
}, i(o.content), 5)) : n("", !0),
|
|
156
|
+
s(e.$slots, "footer", {}, void 0, !0)
|
|
157
|
+
]),
|
|
158
|
+
e.$slots.actions ? (t(), r("div", j, [
|
|
159
|
+
s(e.$slots, "actions", {}, void 0, !0)
|
|
160
|
+
])) : n("", !0)
|
|
161
|
+
], 64)) : n("", !0)
|
|
162
|
+
], 16));
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
export {
|
|
166
|
+
G as default
|
|
167
|
+
};
|
|
@@ -11,9 +11,9 @@ declare const _default: import('vue').DefineComponent<MonitorItemProps, {}, {},
|
|
|
11
11
|
}, string, import('vue').PublicProps, Readonly<MonitorItemProps> & Readonly<{
|
|
12
12
|
onClick?: (() => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
+
count: string;
|
|
14
15
|
color: string;
|
|
15
16
|
clickable: boolean;
|
|
16
17
|
subtitle: string;
|
|
17
|
-
count: string;
|
|
18
18
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 = {
|
|
3
|
+
key: 0,
|
|
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 = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "of-monitor-item__count"
|
|
8
|
+
}, V = /* @__PURE__ */ b({
|
|
9
|
+
name: "MonitorItem",
|
|
10
|
+
inheritAttrs: !1,
|
|
11
|
+
__name: "MonitorItem",
|
|
12
|
+
props: {
|
|
13
|
+
label: {},
|
|
14
|
+
subtitle: { default: void 0 },
|
|
15
|
+
value: {},
|
|
16
|
+
count: { default: void 0 },
|
|
17
|
+
color: { default: void 0 },
|
|
18
|
+
clickable: { type: Boolean, default: !1 }
|
|
19
|
+
},
|
|
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(() => ({
|
|
25
|
+
backgroundColor: "var(--of-color-gray-100)"
|
|
26
|
+
})), v = o(() => ({
|
|
27
|
+
width: `${c.value}%`,
|
|
28
|
+
background: d.value
|
|
29
|
+
}));
|
|
30
|
+
function _() {
|
|
31
|
+
i.clickable && u("click");
|
|
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", {
|
|
40
|
+
class: "of-monitor-item__track",
|
|
41
|
+
style: r(f.value)
|
|
42
|
+
}, [
|
|
43
|
+
e("div", {
|
|
44
|
+
class: "of-monitor-item__fill",
|
|
45
|
+
style: r(v.value)
|
|
46
|
+
}, null, 4)
|
|
47
|
+
], 4)
|
|
48
|
+
]),
|
|
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));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
export {
|
|
55
|
+
V as default
|
|
56
|
+
};
|