@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,54 @@
|
|
|
1
|
+
import { defineComponent as d, computed as e, openBlock as f, createElementBlock as v, mergeProps as p, createElementVNode as c, normalizeStyle as m, renderSlot as _, toDisplayString as g } from "vue";
|
|
2
|
+
const y = { class: "of-status-indicator__label" }, h = /* @__PURE__ */ d({
|
|
3
|
+
inheritAttrs: !1,
|
|
4
|
+
__name: "StatusIndicator",
|
|
5
|
+
props: {
|
|
6
|
+
status: {},
|
|
7
|
+
label: { default: void 0 },
|
|
8
|
+
size: { default: "md" },
|
|
9
|
+
color: { default: void 0 }
|
|
10
|
+
},
|
|
11
|
+
setup(t) {
|
|
12
|
+
const n = {
|
|
13
|
+
in_progress: "var(--of-color-info)",
|
|
14
|
+
executing: "var(--of-color-info)",
|
|
15
|
+
analysing: "var(--of-color-info)",
|
|
16
|
+
completed: "var(--of-color-success)",
|
|
17
|
+
resolved: "var(--of-color-success)",
|
|
18
|
+
closed: "var(--of-color-success)",
|
|
19
|
+
reviewing: "var(--of-color-warning)",
|
|
20
|
+
blocked: "var(--of-color-error)",
|
|
21
|
+
cancelled: "var(--of-color-error)",
|
|
22
|
+
open: "var(--of-color-gray-300)",
|
|
23
|
+
idle: "var(--of-color-gray-400)",
|
|
24
|
+
draft: "var(--of-color-gray-400)"
|
|
25
|
+
}, i = {
|
|
26
|
+
sm: "6px",
|
|
27
|
+
md: "8px"
|
|
28
|
+
}, o = t, u = e(() => o.status.trim().toLowerCase()), r = e(() => o.label ?? o.status), a = e(
|
|
29
|
+
() => o.color ?? n[u.value] ?? "var(--of-color-gray-300)"
|
|
30
|
+
), s = e(() => i[o.size]);
|
|
31
|
+
return (l, S) => (f(), v("span", p({
|
|
32
|
+
class: "of-status-indicator",
|
|
33
|
+
style: { "--of-status-dot-color": a.value }
|
|
34
|
+
}, l.$attrs), [
|
|
35
|
+
c("span", {
|
|
36
|
+
class: "of-status-indicator__dot",
|
|
37
|
+
style: m({
|
|
38
|
+
width: s.value,
|
|
39
|
+
height: s.value
|
|
40
|
+
})
|
|
41
|
+
}, null, 4),
|
|
42
|
+
_(l.$slots, "default", {
|
|
43
|
+
status: t.status,
|
|
44
|
+
label: r.value,
|
|
45
|
+
color: a.value
|
|
46
|
+
}, () => [
|
|
47
|
+
c("span", y, g(r.value), 1)
|
|
48
|
+
], !0)
|
|
49
|
+
], 16));
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
h as default
|
|
54
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineComponent as _, computed as i, openBlock as e, createElementBlock as a, mergeProps as g, Fragment as f, renderList as S, createCommentVNode as d, createElementVNode as r, normalizeStyle as n, toDisplayString as y, renderSlot as z } from "vue";
|
|
2
|
+
const v = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "of-status-summary__sep",
|
|
5
|
+
"aria-hidden": "true"
|
|
6
|
+
}, k = { class: "of-status-summary__item" }, x = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "of-status-summary__extra"
|
|
9
|
+
}, b = /* @__PURE__ */ _({
|
|
10
|
+
name: "StatusSummary",
|
|
11
|
+
inheritAttrs: !1,
|
|
12
|
+
__name: "StatusSummary",
|
|
13
|
+
props: {
|
|
14
|
+
items: {},
|
|
15
|
+
size: { default: "md" },
|
|
16
|
+
separator: { type: Boolean, default: !1 }
|
|
17
|
+
},
|
|
18
|
+
setup(o) {
|
|
19
|
+
const l = o, u = i(() => l.size === "sm" ? "6px" : "7px"), m = i(() => l.size === "sm" ? "10px" : "11px");
|
|
20
|
+
function c(t) {
|
|
21
|
+
return t.color ?? "var(--of-color-gray-300)";
|
|
22
|
+
}
|
|
23
|
+
function p(t) {
|
|
24
|
+
return t.highlight ? c(t) : "var(--of-color-text-primary)";
|
|
25
|
+
}
|
|
26
|
+
return (t, C) => (e(), a("div", g({
|
|
27
|
+
class: ["of-status-summary", `of-status-summary--${o.size}`]
|
|
28
|
+
}, t.$attrs), [
|
|
29
|
+
(e(!0), a(f, null, S(o.items, (s, h) => (e(), a(f, {
|
|
30
|
+
key: s.key
|
|
31
|
+
}, [
|
|
32
|
+
o.separator && h > 0 ? (e(), a("span", v)) : d("", !0),
|
|
33
|
+
r("span", k, [
|
|
34
|
+
r("span", {
|
|
35
|
+
class: "of-status-summary__dot",
|
|
36
|
+
style: n({
|
|
37
|
+
width: u.value,
|
|
38
|
+
height: u.value,
|
|
39
|
+
backgroundColor: c(s)
|
|
40
|
+
})
|
|
41
|
+
}, null, 4),
|
|
42
|
+
r("span", {
|
|
43
|
+
class: "of-status-summary__label",
|
|
44
|
+
style: n({ fontSize: m.value })
|
|
45
|
+
}, y(s.label), 5),
|
|
46
|
+
r("span", {
|
|
47
|
+
class: "of-status-summary__count",
|
|
48
|
+
style: n({
|
|
49
|
+
fontSize: m.value,
|
|
50
|
+
color: p(s),
|
|
51
|
+
fontWeight: s.highlight ? "700" : "600"
|
|
52
|
+
})
|
|
53
|
+
}, y(s.count), 5)
|
|
54
|
+
])
|
|
55
|
+
], 64))), 128)),
|
|
56
|
+
t.$slots.extra ? (e(), a("span", x, [
|
|
57
|
+
z(t.$slots, "extra", {}, void 0, !0)
|
|
58
|
+
])) : d("", !0)
|
|
59
|
+
], 16));
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
b as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineComponent as h, computed as v, openBlock as r, createElementBlock as s, mergeProps as m, Fragment as u, renderList as k, createElementVNode as a, normalizeClass as l, createBlock as g, unref as z, toDisplayString as _, renderSlot as $, createCommentVNode as f } from "vue";
|
|
2
|
+
import { Check as y } from "lucide-vue-next";
|
|
3
|
+
const S = ["aria-current"], C = { key: 1 }, b = { class: "of-stepper__content" }, B = { class: "of-stepper__label" }, E = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "of-stepper__description"
|
|
6
|
+
}, w = /* @__PURE__ */ h({
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
__name: "Stepper",
|
|
9
|
+
props: {
|
|
10
|
+
steps: {},
|
|
11
|
+
current: {},
|
|
12
|
+
direction: { default: "horizontal" }
|
|
13
|
+
},
|
|
14
|
+
setup(c) {
|
|
15
|
+
const p = c, i = v(() => p.direction === "horizontal");
|
|
16
|
+
function o(t) {
|
|
17
|
+
return t < p.current ? "done" : t === p.current ? "active" : "pending";
|
|
18
|
+
}
|
|
19
|
+
function d(t) {
|
|
20
|
+
return t < p.current ? "done" : "pending";
|
|
21
|
+
}
|
|
22
|
+
return (t, L) => (r(), s("div", m({
|
|
23
|
+
class: ["of-stepper", i.value ? "of-stepper--horizontal" : "of-stepper--vertical"]
|
|
24
|
+
}, t.$attrs), [
|
|
25
|
+
(r(!0), s(u, null, k(c.steps, (n, e) => (r(), s(u, {
|
|
26
|
+
key: `${n.label}-${e}`
|
|
27
|
+
}, [
|
|
28
|
+
a("div", {
|
|
29
|
+
class: l([
|
|
30
|
+
"of-stepper__step",
|
|
31
|
+
`of-stepper__step--${o(e)}`,
|
|
32
|
+
i.value ? "of-stepper__step--horizontal" : "of-stepper__step--vertical"
|
|
33
|
+
])
|
|
34
|
+
}, [
|
|
35
|
+
a("div", {
|
|
36
|
+
class: l(["of-stepper__indicator", `of-stepper__indicator--${o(e)}`]),
|
|
37
|
+
"aria-current": o(e) === "active" ? "step" : void 0
|
|
38
|
+
}, [
|
|
39
|
+
o(e) === "done" ? (r(), g(z(y), {
|
|
40
|
+
key: 0,
|
|
41
|
+
size: 14,
|
|
42
|
+
"stroke-width": 3
|
|
43
|
+
})) : (r(), s("span", C, _(e + 1), 1))
|
|
44
|
+
], 10, S),
|
|
45
|
+
a("div", b, [
|
|
46
|
+
$(t.$slots, "step-content", {
|
|
47
|
+
item: n,
|
|
48
|
+
index: e,
|
|
49
|
+
status: o(e)
|
|
50
|
+
}, () => [
|
|
51
|
+
a("p", B, _(n.label), 1),
|
|
52
|
+
n.description ? (r(), s("p", E, _(n.description), 1)) : f("", !0)
|
|
53
|
+
], !0)
|
|
54
|
+
])
|
|
55
|
+
], 2),
|
|
56
|
+
e < c.steps.length - 1 ? (r(), s("div", {
|
|
57
|
+
key: 0,
|
|
58
|
+
class: l([
|
|
59
|
+
"of-stepper__line",
|
|
60
|
+
`of-stepper__line--${d(e)}`,
|
|
61
|
+
i.value ? "of-stepper__line--horizontal" : "of-stepper__line--vertical"
|
|
62
|
+
])
|
|
63
|
+
}, null, 2)) : f("", !0)
|
|
64
|
+
], 64))), 128))
|
|
65
|
+
], 16));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export {
|
|
69
|
+
w as default
|
|
70
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent as m, computed as r, openBlock as i, createElementBlock as d, mergeProps as f, withKeys as h, withModifiers as b, createElementVNode as n, toDisplayString as w, createCommentVNode as V } from "vue";
|
|
2
|
+
const k = ["aria-checked", "aria-label", "disabled", "onKeydown"], p = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "of-switch__label"
|
|
5
|
+
}, g = /* @__PURE__ */ m({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "Switch",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { type: Boolean },
|
|
10
|
+
disabled: { type: Boolean, default: !1 },
|
|
11
|
+
size: { default: "md" },
|
|
12
|
+
label: { default: void 0 }
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:modelValue", "change"],
|
|
15
|
+
setup(e, { emit: c }) {
|
|
16
|
+
const a = e, l = c, u = r(() => `of-switch--${a.size}`);
|
|
17
|
+
function s() {
|
|
18
|
+
if (a.disabled)
|
|
19
|
+
return;
|
|
20
|
+
const t = !a.modelValue;
|
|
21
|
+
l("update:modelValue", t), l("change", t);
|
|
22
|
+
}
|
|
23
|
+
return (t, o) => (i(), d("button", f({
|
|
24
|
+
type: "button",
|
|
25
|
+
class: ["of-switch", [u.value, { "of-switch--checked": e.modelValue, "of-switch--disabled": e.disabled }]],
|
|
26
|
+
role: "switch",
|
|
27
|
+
"aria-checked": e.modelValue,
|
|
28
|
+
"aria-label": e.label,
|
|
29
|
+
disabled: e.disabled
|
|
30
|
+
}, t.$attrs, {
|
|
31
|
+
onClick: s,
|
|
32
|
+
onKeydown: h(b(s, ["prevent"]), ["space"])
|
|
33
|
+
}), [
|
|
34
|
+
o[0] || (o[0] = n("span", { class: "of-switch__track" }, [
|
|
35
|
+
n("span", { class: "of-switch__thumb" })
|
|
36
|
+
], -1)),
|
|
37
|
+
e.label ? (i(), d("span", p, w(e.label), 1)) : V("", !0)
|
|
38
|
+
], 16, k));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
g as default
|
|
43
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as r, computed as s, openBlock as t, createElementBlock as m, mergeProps as b, createBlock as p, resolveDynamicComponent as f, createElementVNode as u, toDisplayString as k } from "vue";
|
|
2
|
+
import { resolveIcon as _ } from "../../utils/icon.js";
|
|
3
|
+
const d = { class: "of-toolbar-btn__label" }, h = /* @__PURE__ */ r({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "ToolbarBtn",
|
|
6
|
+
props: {
|
|
7
|
+
icon: {},
|
|
8
|
+
label: {},
|
|
9
|
+
active: { type: Boolean }
|
|
10
|
+
},
|
|
11
|
+
emits: ["click"],
|
|
12
|
+
setup(o, { emit: n }) {
|
|
13
|
+
const c = o, l = n, a = s(() => _(c.icon));
|
|
14
|
+
function i(e) {
|
|
15
|
+
l("click", e);
|
|
16
|
+
}
|
|
17
|
+
return (e, v) => (t(), m("button", b({
|
|
18
|
+
class: ["of-toolbar-btn", { "of-toolbar-btn--active": o.active }]
|
|
19
|
+
}, e.$attrs, { onClick: i }), [
|
|
20
|
+
(t(), p(f(a.value), {
|
|
21
|
+
class: "of-toolbar-btn__icon",
|
|
22
|
+
size: 13
|
|
23
|
+
})),
|
|
24
|
+
u("span", d, k(o.label), 1)
|
|
25
|
+
], 16));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
h as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineComponent as s, computed as u, openBlock as o, createElementBlock as l, mergeProps as m, Fragment as c, renderList as d, normalizeClass as p, createBlock as v, resolveDynamicComponent as _, unref as f } from "vue";
|
|
2
|
+
import { resolveIcon as b } from "../../utils/icon.js";
|
|
3
|
+
const g = ["title", "onClick"], h = /* @__PURE__ */ s({
|
|
4
|
+
name: "ViewModeGroup",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "ViewModeGroup",
|
|
7
|
+
props: {
|
|
8
|
+
options: { default: void 0 },
|
|
9
|
+
modelValue: {}
|
|
10
|
+
},
|
|
11
|
+
emits: ["update:modelValue"],
|
|
12
|
+
setup(n) {
|
|
13
|
+
const a = [
|
|
14
|
+
{ value: "side", icon: "panel-right", label: "侧边面板" },
|
|
15
|
+
{ value: "modal", icon: "maximize-2", label: "弹窗" },
|
|
16
|
+
{ value: "fullscreen", icon: "maximize", label: "全屏" }
|
|
17
|
+
], i = n, r = u(() => i.options ?? a);
|
|
18
|
+
return (t, k) => (o(), l("div", m({ class: "one-view-mode-group" }, t.$attrs), [
|
|
19
|
+
(o(!0), l(c, null, d(r.value, (e) => (o(), l("button", {
|
|
20
|
+
key: e.value,
|
|
21
|
+
class: p(["one-view-mode-group__btn", { "one-view-mode-group__btn--active": n.modelValue === e.value }]),
|
|
22
|
+
title: e.label,
|
|
23
|
+
onClick: (w) => t.$emit("update:modelValue", e.value)
|
|
24
|
+
}, [
|
|
25
|
+
(o(), v(_(f(b)(e.icon)), { class: "one-view-mode-group__icon" }))
|
|
26
|
+
], 10, g))), 128))
|
|
27
|
+
], 16));
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export {
|
|
31
|
+
h as default
|
|
32
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { defineComponent as b, computed as f, openBlock as o, createElementBlock as n, mergeProps as p, createElementVNode as r, Fragment as k, renderList as y, normalizeClass as $, createBlock as u, resolveDynamicComponent as c, unref as d, createCommentVNode as a, toDisplayString as i, renderSlot as C } from "vue";
|
|
2
|
+
import { resolveIcon as v } from "../../utils/icon.js";
|
|
3
|
+
const g = { class: "one-view-switcher__tabs" }, B = ["onClick"], L = {
|
|
4
|
+
key: 3,
|
|
5
|
+
class: "one-view-switcher__search"
|
|
6
|
+
}, S = ["placeholder"], D = /* @__PURE__ */ b({
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
__name: "ViewSwitcher",
|
|
9
|
+
props: {
|
|
10
|
+
tabs: { default: void 0 },
|
|
11
|
+
modelValue: { default: "table" },
|
|
12
|
+
showFilter: { type: Boolean, default: !0 },
|
|
13
|
+
showGroup: { type: Boolean, default: !0 },
|
|
14
|
+
showSort: { type: Boolean, default: !0 },
|
|
15
|
+
showSearch: { type: Boolean, default: !0 },
|
|
16
|
+
filterLabel: { default: "筛选" },
|
|
17
|
+
groupLabel: { default: "分组" },
|
|
18
|
+
sortLabel: { default: "排序" },
|
|
19
|
+
searchPlaceholder: { default: "搜索..." }
|
|
20
|
+
},
|
|
21
|
+
emits: ["update:modelValue", "filter", "group", "sort", "search"],
|
|
22
|
+
setup(l) {
|
|
23
|
+
const w = [
|
|
24
|
+
{ value: "table", label: "表格", icon: "table-2" },
|
|
25
|
+
{ value: "kanban", label: "看板", icon: "columns-3" },
|
|
26
|
+
{ value: "timeline", label: "时间线", icon: "calendar" }
|
|
27
|
+
], h = l, m = f(() => h.tabs ?? w);
|
|
28
|
+
return (s, e) => (o(), n("div", p({ class: "one-view-switcher" }, s.$attrs), [
|
|
29
|
+
r("div", g, [
|
|
30
|
+
(o(!0), n(k, null, y(m.value, (t) => (o(), n("button", {
|
|
31
|
+
key: t.value,
|
|
32
|
+
class: $(["one-view-switcher__tab", { "one-view-switcher__tab--active": l.modelValue === t.value }]),
|
|
33
|
+
onClick: (V) => s.$emit("update:modelValue", t.value)
|
|
34
|
+
}, [
|
|
35
|
+
t.icon ? (o(), u(c(d(v)(t.icon)), {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: "one-view-switcher__tab-icon"
|
|
38
|
+
})) : a("", !0),
|
|
39
|
+
r("span", null, i(t.label), 1)
|
|
40
|
+
], 10, B))), 128))
|
|
41
|
+
]),
|
|
42
|
+
e[4] || (e[4] = r("div", { class: "one-view-switcher__sep" }, null, -1)),
|
|
43
|
+
l.showFilter ? (o(), n("button", {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: "one-view-switcher__tool-btn",
|
|
46
|
+
onClick: e[0] || (e[0] = (t) => s.$emit("filter"))
|
|
47
|
+
}, i(l.filterLabel), 1)) : a("", !0),
|
|
48
|
+
l.showGroup ? (o(), n("button", {
|
|
49
|
+
key: 1,
|
|
50
|
+
class: "one-view-switcher__tool-btn",
|
|
51
|
+
onClick: e[1] || (e[1] = (t) => s.$emit("group"))
|
|
52
|
+
}, i(l.groupLabel), 1)) : a("", !0),
|
|
53
|
+
l.showSort ? (o(), n("button", {
|
|
54
|
+
key: 2,
|
|
55
|
+
class: "one-view-switcher__tool-btn",
|
|
56
|
+
onClick: e[2] || (e[2] = (t) => s.$emit("sort"))
|
|
57
|
+
}, i(l.sortLabel), 1)) : a("", !0),
|
|
58
|
+
e[5] || (e[5] = r("div", { class: "one-view-switcher__spacer" }, null, -1)),
|
|
59
|
+
l.showSearch ? (o(), n("div", L, [
|
|
60
|
+
(o(), u(c(d(v)("search")), { class: "one-view-switcher__search-icon" })),
|
|
61
|
+
r("input", {
|
|
62
|
+
class: "one-view-switcher__search-input",
|
|
63
|
+
placeholder: l.searchPlaceholder,
|
|
64
|
+
onInput: e[3] || (e[3] = (t) => s.$emit("search", t.target.value))
|
|
65
|
+
}, null, 40, S)
|
|
66
|
+
])) : a("", !0),
|
|
67
|
+
C(s.$slots, "default", {}, void 0, !0)
|
|
68
|
+
], 16));
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
export {
|
|
72
|
+
D as default
|
|
73
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineComponent as m, openBlock as o, createElementBlock as n, mergeProps as u, Fragment as _, renderList as d, normalizeClass as b, createBlock as f, resolveDynamicComponent as p, createElementVNode as k, toDisplayString as v } from "vue";
|
|
2
|
+
import { GanttChartIcon as y, LayoutGridIcon as C, KanbanIcon as h, Table2Icon as w } from "lucide-vue-next";
|
|
3
|
+
const I = ["onClick"], V = { class: "of-view-tab__label" }, D = /* @__PURE__ */ m({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "ViewTab",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {},
|
|
8
|
+
items: {}
|
|
9
|
+
},
|
|
10
|
+
emits: ["update:modelValue"],
|
|
11
|
+
setup(a, { emit: l }) {
|
|
12
|
+
const s = {
|
|
13
|
+
"table-2": w,
|
|
14
|
+
kanban: h,
|
|
15
|
+
"layout-grid": C,
|
|
16
|
+
"gantt-chart": y
|
|
17
|
+
};
|
|
18
|
+
function c(e) {
|
|
19
|
+
return s[e];
|
|
20
|
+
}
|
|
21
|
+
const i = l;
|
|
22
|
+
function r(e) {
|
|
23
|
+
i("update:modelValue", e);
|
|
24
|
+
}
|
|
25
|
+
return (e, g) => (o(), n("div", u({ class: "of-view-tab" }, e.$attrs), [
|
|
26
|
+
(o(!0), n(_, null, d(a.items, (t) => (o(), n("button", {
|
|
27
|
+
key: t.key,
|
|
28
|
+
class: b(["of-view-tab__item", { "of-view-tab__item--active": a.modelValue === t.key }]),
|
|
29
|
+
onClick: (B) => r(t.key)
|
|
30
|
+
}, [
|
|
31
|
+
(o(), f(p(c(t.icon)), {
|
|
32
|
+
class: "of-view-tab__icon",
|
|
33
|
+
size: 14
|
|
34
|
+
})),
|
|
35
|
+
k("span", V, v(t.label), 1)
|
|
36
|
+
], 10, I))), 128))
|
|
37
|
+
], 16));
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
D as default
|
|
42
|
+
};
|
|
@@ -44,3 +44,4 @@ export { default as MonitorItem } from './MonitorItem.vue';
|
|
|
44
44
|
export type { MonitorItemProps } from './MonitorItem.vue';
|
|
45
45
|
export { default as PersonaCard } from './PersonaCard.vue';
|
|
46
46
|
export type { PersonaCardProps } from './PersonaCard.vue';
|
|
47
|
+
export { default as SearchHighlight } from './SearchHighlight.vue';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineComponent as f, openBlock as t, createElementBlock as n, createElementVNode as h, Fragment as k, renderList as _, normalizeClass as c, createBlock as l, resolveDynamicComponent as s, withModifiers as C, withCtx as v, unref as p, createCommentVNode as i, createTextVNode as m, toDisplayString as u, renderSlot as d } from "vue";
|
|
2
|
+
import { resolveIcon as y } from "../../utils/icon.js";
|
|
3
|
+
const g = {
|
|
4
|
+
class: "of-breadcrumb",
|
|
5
|
+
"aria-label": "breadcrumb"
|
|
6
|
+
}, B = { class: "of-breadcrumb__list" }, N = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "of-breadcrumb__separator",
|
|
9
|
+
"aria-hidden": "true"
|
|
10
|
+
}, E = /* @__PURE__ */ f({
|
|
11
|
+
__name: "Breadcrumb",
|
|
12
|
+
props: {
|
|
13
|
+
items: {},
|
|
14
|
+
separator: {}
|
|
15
|
+
},
|
|
16
|
+
setup(e) {
|
|
17
|
+
function b(a) {
|
|
18
|
+
a.onClick && a.onClick();
|
|
19
|
+
}
|
|
20
|
+
return (a, V) => (t(), n("nav", g, [
|
|
21
|
+
h("ol", B, [
|
|
22
|
+
e.items && e.items.length ? (t(!0), n(k, { key: 0 }, _(e.items, (r, o) => (t(), n("li", {
|
|
23
|
+
key: o,
|
|
24
|
+
class: c(["of-breadcrumb__item", { "of-breadcrumb__item--active": o === e.items.length - 1 }])
|
|
25
|
+
}, [
|
|
26
|
+
(t(), l(s(r.path ? "a" : "span"), {
|
|
27
|
+
href: r.path,
|
|
28
|
+
class: c(["of-breadcrumb__link", { "of-breadcrumb__link--active": o === e.items.length - 1 }]),
|
|
29
|
+
onClick: C(($) => r.onClick ? b(r) : null, ["prevent"])
|
|
30
|
+
}, {
|
|
31
|
+
default: v(() => [
|
|
32
|
+
r.icon ? (t(), l(s(p(y)(r.icon)), {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "of-breadcrumb__icon"
|
|
35
|
+
})) : i("", !0),
|
|
36
|
+
m(" " + u(r.label), 1)
|
|
37
|
+
]),
|
|
38
|
+
_: 2
|
|
39
|
+
}, 1032, ["href", "class", "onClick"])),
|
|
40
|
+
o < e.items.length - 1 ? (t(), n("span", N, [
|
|
41
|
+
d(a.$slots, "separator", {}, () => [
|
|
42
|
+
m(u(e.separator || "/"), 1)
|
|
43
|
+
], !0)
|
|
44
|
+
])) : i("", !0)
|
|
45
|
+
], 2))), 128)) : d(a.$slots, "default", { key: 1 }, void 0, !0)
|
|
46
|
+
])
|
|
47
|
+
]));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
E as default
|
|
52
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent as s, openBlock as t, createElementBlock as f, normalizeClass as o, createBlock as a, resolveDynamicComponent as r, withModifiers as u, withCtx as d, unref as b, createCommentVNode as k, renderSlot as v } from "vue";
|
|
2
|
+
import { resolveIcon as h } from "../../utils/icon.js";
|
|
3
|
+
const B = /* @__PURE__ */ s({
|
|
4
|
+
__name: "BreadcrumbItem",
|
|
5
|
+
props: {
|
|
6
|
+
path: {},
|
|
7
|
+
icon: {},
|
|
8
|
+
active: { type: Boolean }
|
|
9
|
+
},
|
|
10
|
+
emits: ["click"],
|
|
11
|
+
setup(e, { emit: i }) {
|
|
12
|
+
const n = i;
|
|
13
|
+
return (m, c) => (t(), f("li", {
|
|
14
|
+
class: o(["of-breadcrumb__item", { "of-breadcrumb__item--active": e.active }])
|
|
15
|
+
}, [
|
|
16
|
+
(t(), a(r(e.path ? "a" : "span"), {
|
|
17
|
+
href: e.path,
|
|
18
|
+
class: o(["of-breadcrumb__link", { "of-breadcrumb__link--active": e.active }]),
|
|
19
|
+
onClick: c[0] || (c[0] = u((l) => n("click", l), ["prevent"]))
|
|
20
|
+
}, {
|
|
21
|
+
default: d(() => [
|
|
22
|
+
e.icon ? (t(), a(r(b(h)(e.icon)), {
|
|
23
|
+
key: 0,
|
|
24
|
+
class: "of-breadcrumb__icon"
|
|
25
|
+
})) : k("", !0),
|
|
26
|
+
v(m.$slots, "default", {}, void 0, !0)
|
|
27
|
+
]),
|
|
28
|
+
_: 3
|
|
29
|
+
}, 8, ["href", "class"]))
|
|
30
|
+
], 2));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
B as default
|
|
35
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineComponent as c, openBlock as o, createElementBlock as n, createElementVNode as e, normalizeStyle as a, toDisplayString as m, createCommentVNode as i } from "vue";
|
|
2
|
+
const s = { class: "comment-item" }, _ = { class: "comment-item__content" }, l = { class: "comment-item__header" }, r = { class: "comment-item__author" }, d = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "comment-item__action"
|
|
5
|
+
}, h = { class: "comment-item__time" }, u = { class: "comment-item__text" }, C = /* @__PURE__ */ c({
|
|
6
|
+
__name: "CommentItem",
|
|
7
|
+
props: {
|
|
8
|
+
comment: {}
|
|
9
|
+
},
|
|
10
|
+
setup(t) {
|
|
11
|
+
return (v, f) => (o(), n("div", s, [
|
|
12
|
+
e("div", {
|
|
13
|
+
class: "comment-item__avatar",
|
|
14
|
+
style: a({ backgroundColor: t.comment.avatarColor ?? "var(--of-color-primary-500)" })
|
|
15
|
+
}, m(t.comment.authorInitial), 5),
|
|
16
|
+
e("div", _, [
|
|
17
|
+
e("div", l, [
|
|
18
|
+
e("span", r, m(t.comment.author), 1),
|
|
19
|
+
t.comment.action ? (o(), n("span", d, m(t.comment.action), 1)) : i("", !0),
|
|
20
|
+
e("span", h, m(t.comment.time), 1)
|
|
21
|
+
]),
|
|
22
|
+
e("div", u, m(t.comment.content), 1)
|
|
23
|
+
])
|
|
24
|
+
]));
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
C as default
|
|
29
|
+
};
|