@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,185 @@
|
|
|
1
|
+
import { defineComponent as w, computed as r, openBlock as t, createElementBlock as n, mergeProps as A, createElementVNode as c, normalizeStyle as f, createBlock as E, resolveDynamicComponent as F, Fragment as y, createTextVNode as N, toDisplayString as l, renderSlot as b, createCommentVNode as i, renderList as T } from "vue";
|
|
2
|
+
import { resolveIcon as V } from "../../utils/icon.js";
|
|
3
|
+
const D = { class: "of-persona-card__body" }, I = { class: "of-persona-card__name-row" }, L = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "of-persona-card__title-badge"
|
|
6
|
+
}, H = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "of-persona-card__tags"
|
|
9
|
+
}, M = { class: "of-persona-card__right" }, j = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "of-persona-card__done-mark"
|
|
12
|
+
}, q = { class: "of-persona-card__chevron" }, G = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "of-persona-card__detail"
|
|
15
|
+
}, O = /* @__PURE__ */ w({
|
|
16
|
+
name: "PersonaCard",
|
|
17
|
+
inheritAttrs: !1,
|
|
18
|
+
__name: "PersonaCard",
|
|
19
|
+
props: {
|
|
20
|
+
name: {},
|
|
21
|
+
title: {},
|
|
22
|
+
icon: {},
|
|
23
|
+
color: {},
|
|
24
|
+
subtitle: {},
|
|
25
|
+
tags: {},
|
|
26
|
+
expanded: { type: Boolean, default: !1 },
|
|
27
|
+
active: { type: Boolean, default: !1 },
|
|
28
|
+
done: { type: Boolean, default: !1 },
|
|
29
|
+
disabled: { type: Boolean, default: !1 },
|
|
30
|
+
size: { default: "md" }
|
|
31
|
+
},
|
|
32
|
+
emits: ["update:expanded", "click"],
|
|
33
|
+
setup(o, { emit: _ }) {
|
|
34
|
+
const e = o, v = _, u = [
|
|
35
|
+
{
|
|
36
|
+
accent: "var(--of-color-warning)",
|
|
37
|
+
bg: "var(--of-color-warning-light)",
|
|
38
|
+
border: "var(--of-badge-orange-border)",
|
|
39
|
+
tagBg: "var(--of-badge-orange-bg)"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
accent: "var(--of-color-primary-500)",
|
|
43
|
+
bg: "var(--of-color-primary-50)",
|
|
44
|
+
border: "var(--of-color-primary-200)",
|
|
45
|
+
tagBg: "var(--of-color-primary-100)"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
accent: "var(--of-role-pm-text)",
|
|
49
|
+
bg: "var(--of-role-pm-bg)",
|
|
50
|
+
border: "var(--of-badge-red-border)",
|
|
51
|
+
tagBg: "var(--of-badge-red-bg)"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
accent: "var(--of-color-success)",
|
|
55
|
+
bg: "var(--of-color-success-light)",
|
|
56
|
+
border: "var(--of-badge-green-border)",
|
|
57
|
+
tagBg: "var(--of-badge-green-bg)"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
accent: "var(--of-color-info)",
|
|
61
|
+
bg: "var(--of-color-info-light)",
|
|
62
|
+
border: "var(--of-badge-blue-border)",
|
|
63
|
+
tagBg: "var(--of-badge-blue-bg)"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
accent: "var(--of-role-arch-text)",
|
|
67
|
+
bg: "var(--of-role-arch-bg)",
|
|
68
|
+
border: "var(--of-badge-purple-border)",
|
|
69
|
+
tagBg: "var(--of-badge-purple-bg)"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
accent: "var(--of-color-error)",
|
|
73
|
+
bg: "var(--of-color-error-light)",
|
|
74
|
+
border: "var(--of-badge-red-border)",
|
|
75
|
+
tagBg: "var(--of-badge-red-bg)"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
accent: "var(--of-role-fe-text)",
|
|
79
|
+
bg: "var(--of-role-fe-bg)",
|
|
80
|
+
border: "var(--of-badge-green-border)",
|
|
81
|
+
tagBg: "var(--of-badge-green-bg)"
|
|
82
|
+
}
|
|
83
|
+
];
|
|
84
|
+
function B(a) {
|
|
85
|
+
let s = 0;
|
|
86
|
+
for (let d = 0; d < a.length; d++)
|
|
87
|
+
s = (s << 5) - s + a.charCodeAt(d), s |= 0;
|
|
88
|
+
return Math.abs(s);
|
|
89
|
+
}
|
|
90
|
+
const g = r(() => {
|
|
91
|
+
if (e.color) {
|
|
92
|
+
const a = e.color.replace("#", "");
|
|
93
|
+
return {
|
|
94
|
+
accent: e.color,
|
|
95
|
+
bg: `#${a}24`,
|
|
96
|
+
border: `#${a}52`,
|
|
97
|
+
tagBg: `#${a}1a`
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
return u[B(e.name) % u.length];
|
|
101
|
+
}), p = r(() => e.size === "sm" ? 24 : 32), m = r(() => e.size === "sm" ? 12 : 16), k = r(() => e.size === "sm" ? 12 : 13), x = r(() => e.size === "sm" ? 11 : 12), h = r(() => {
|
|
102
|
+
if (e.icon)
|
|
103
|
+
return V(e.icon);
|
|
104
|
+
}), z = r(() => {
|
|
105
|
+
if (e.icon && typeof e.icon == "string") return e.icon;
|
|
106
|
+
if (e.icon) return "";
|
|
107
|
+
const a = e.name.trim();
|
|
108
|
+
return a ? a.charAt(0) : "?";
|
|
109
|
+
}), S = r(() => [
|
|
110
|
+
"of-persona-card",
|
|
111
|
+
`of-persona-card--${e.size}`,
|
|
112
|
+
{
|
|
113
|
+
"of-persona-card--active": e.active,
|
|
114
|
+
"of-persona-card--done": e.done,
|
|
115
|
+
"of-persona-card--disabled": e.disabled,
|
|
116
|
+
"of-persona-card--expanded": e.expanded
|
|
117
|
+
}
|
|
118
|
+
]), $ = r(() => ({
|
|
119
|
+
"--pc-accent": g.value.accent,
|
|
120
|
+
"--pc-accent-bg": g.value.bg,
|
|
121
|
+
"--pc-accent-border": g.value.border,
|
|
122
|
+
"--pc-accent-tag-bg": g.value.tagBg
|
|
123
|
+
})), C = r(() => ({
|
|
124
|
+
width: `${p.value}px`,
|
|
125
|
+
height: `${p.value}px`,
|
|
126
|
+
fontSize: `${m.value}px`
|
|
127
|
+
}));
|
|
128
|
+
function P() {
|
|
129
|
+
e.disabled || (v("update:expanded", !e.expanded), v("click"));
|
|
130
|
+
}
|
|
131
|
+
return (a, s) => (t(), n("div", A({
|
|
132
|
+
class: S.value,
|
|
133
|
+
style: $.value
|
|
134
|
+
}, a.$attrs), [
|
|
135
|
+
c("div", {
|
|
136
|
+
class: "of-persona-card__header",
|
|
137
|
+
onClick: P
|
|
138
|
+
}, [
|
|
139
|
+
c("span", {
|
|
140
|
+
class: "of-persona-card__avatar",
|
|
141
|
+
style: f(C.value)
|
|
142
|
+
}, [
|
|
143
|
+
h.value ? (t(), E(F(h.value), {
|
|
144
|
+
key: 0,
|
|
145
|
+
size: m.value
|
|
146
|
+
}, null, 8, ["size"])) : (t(), n(y, { key: 1 }, [
|
|
147
|
+
N(l(z.value), 1)
|
|
148
|
+
], 64))
|
|
149
|
+
], 4),
|
|
150
|
+
c("div", D, [
|
|
151
|
+
c("div", I, [
|
|
152
|
+
c("span", {
|
|
153
|
+
class: "of-persona-card__name",
|
|
154
|
+
style: f({ fontSize: `${k.value}px` })
|
|
155
|
+
}, l(o.name), 5),
|
|
156
|
+
b(a.$slots, "badge", {}, void 0, !0),
|
|
157
|
+
o.title ? (t(), n("span", L, l(o.title), 1)) : i("", !0)
|
|
158
|
+
]),
|
|
159
|
+
o.subtitle ? (t(), n("span", {
|
|
160
|
+
key: 0,
|
|
161
|
+
class: "of-persona-card__subtitle",
|
|
162
|
+
style: f({ fontSize: `${x.value}px` })
|
|
163
|
+
}, l(o.subtitle), 5)) : i("", !0),
|
|
164
|
+
o.tags && o.tags.length > 0 ? (t(), n("div", H, [
|
|
165
|
+
(t(!0), n(y, null, T(o.tags, (d) => (t(), n("span", {
|
|
166
|
+
key: d,
|
|
167
|
+
class: "of-persona-card__tag"
|
|
168
|
+
}, l(d), 1))), 128))
|
|
169
|
+
])) : i("", !0)
|
|
170
|
+
]),
|
|
171
|
+
c("div", M, [
|
|
172
|
+
b(a.$slots, "actions", {}, void 0, !0),
|
|
173
|
+
o.done ? (t(), n("span", j, "✓")) : i("", !0),
|
|
174
|
+
c("span", q, l(o.expanded ? "▲" : "▼"), 1)
|
|
175
|
+
])
|
|
176
|
+
]),
|
|
177
|
+
o.expanded ? (t(), n("div", G, [
|
|
178
|
+
b(a.$slots, "default", {}, void 0, !0)
|
|
179
|
+
])) : i("", !0)
|
|
180
|
+
], 16));
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
export {
|
|
184
|
+
O as default
|
|
185
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent as p, computed as r, openBlock as t, createElementBlock as c, mergeProps as f, createElementVNode as a, normalizeStyle as d, normalizeClass as b, renderSlot as v, toDisplayString as m, createCommentVNode as _ } from "vue";
|
|
2
|
+
const g = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "of-progress-bar__label"
|
|
5
|
+
}, h = { class: "of-progress-bar__slot" }, y = { class: "of-progress-bar__value" }, $ = /* @__PURE__ */ p({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "ProgressBar",
|
|
8
|
+
props: {
|
|
9
|
+
value: {},
|
|
10
|
+
height: { default: 4 },
|
|
11
|
+
color: {},
|
|
12
|
+
bgColor: { default: "var(--of-color-gray-100)" },
|
|
13
|
+
showLabel: { type: Boolean, default: !1 },
|
|
14
|
+
borderRadius: { default: 2 }
|
|
15
|
+
},
|
|
16
|
+
setup(s) {
|
|
17
|
+
const e = s, o = r(() => Math.min(100, Math.max(0, e.value))), u = r(
|
|
18
|
+
() => o.value === 100 ? "var(--of-color-success)" : e.color ?? "var(--of-color-primary-500)"
|
|
19
|
+
), n = r(() => ({
|
|
20
|
+
height: `${e.height}px`,
|
|
21
|
+
backgroundColor: e.bgColor,
|
|
22
|
+
borderRadius: `${e.borderRadius}px`
|
|
23
|
+
})), i = r(() => ({
|
|
24
|
+
width: `${o.value}%`,
|
|
25
|
+
background: u.value,
|
|
26
|
+
borderRadius: `${e.borderRadius}px`
|
|
27
|
+
}));
|
|
28
|
+
return (l, k) => (t(), c("div", f({ class: "of-progress-bar" }, l.$attrs), [
|
|
29
|
+
a("div", {
|
|
30
|
+
class: "of-progress-bar__track pb",
|
|
31
|
+
style: d(n.value)
|
|
32
|
+
}, [
|
|
33
|
+
a("div", {
|
|
34
|
+
class: b(["of-progress-bar__fill pf", { dn: o.value === 100 }]),
|
|
35
|
+
style: d(i.value)
|
|
36
|
+
}, null, 6)
|
|
37
|
+
], 4),
|
|
38
|
+
s.showLabel ? (t(), c("div", g, [
|
|
39
|
+
a("div", h, [
|
|
40
|
+
v(l.$slots, "default", {}, void 0, !0)
|
|
41
|
+
]),
|
|
42
|
+
a("span", y, m(o.value) + "%", 1)
|
|
43
|
+
])) : _("", !0)
|
|
44
|
+
], 16));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
$ as default
|
|
49
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent as r, openBlock as l, createElementBlock as n, mergeProps as m, createElementVNode as i, toDisplayString as s, createCommentVNode as d } from "vue";
|
|
2
|
+
const u = { class: "of-range-slider__label" }, c = ["value", "min", "max", "step"], p = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "of-range-slider__description"
|
|
5
|
+
}, g = /* @__PURE__ */ r({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "RangeSlider",
|
|
8
|
+
props: {
|
|
9
|
+
label: {},
|
|
10
|
+
modelValue: {},
|
|
11
|
+
min: {},
|
|
12
|
+
max: {},
|
|
13
|
+
step: {},
|
|
14
|
+
description: {}
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:modelValue"],
|
|
17
|
+
setup(e) {
|
|
18
|
+
return (t, a) => (l(), n("div", m({ class: "of-range-slider" }, t.$attrs), [
|
|
19
|
+
i("label", u, s(e.label), 1),
|
|
20
|
+
i("input", {
|
|
21
|
+
value: e.modelValue,
|
|
22
|
+
onInput: a[0] || (a[0] = (o) => t.$emit("update:modelValue", Number(o.target.value))),
|
|
23
|
+
type: "range",
|
|
24
|
+
min: e.min,
|
|
25
|
+
max: e.max,
|
|
26
|
+
step: e.step ?? 1,
|
|
27
|
+
class: "of-range-slider__input"
|
|
28
|
+
}, null, 40, c),
|
|
29
|
+
e.description ? (l(), n("p", p, s(e.description), 1)) : d("", !0)
|
|
30
|
+
], 16));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
g as default
|
|
35
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineComponent as g, computed as n, openBlock as l, createBlock as s, resolveDynamicComponent as f, mergeProps as m, withCtx as p, createCommentVNode as u, createElementVNode as v, renderSlot as d } from "vue";
|
|
2
|
+
import { resolveIcon as h } from "../../utils/icon.js";
|
|
3
|
+
const b = { class: "one-ref-tag__text" }, S = /* @__PURE__ */ g({
|
|
4
|
+
name: "RefTag",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "RefTag",
|
|
7
|
+
props: {
|
|
8
|
+
type: { default: "spec" },
|
|
9
|
+
icon: {},
|
|
10
|
+
color: {},
|
|
11
|
+
bg: {},
|
|
12
|
+
href: {}
|
|
13
|
+
},
|
|
14
|
+
setup(e) {
|
|
15
|
+
const a = {
|
|
16
|
+
spec: {
|
|
17
|
+
icon: "file-text",
|
|
18
|
+
color: "var(--of-color-primary-700)",
|
|
19
|
+
bg: "var(--of-color-primary-50)"
|
|
20
|
+
},
|
|
21
|
+
wiki: { icon: "book-open", color: "var(--of-color-green-600)", bg: "var(--of-color-green-50)" },
|
|
22
|
+
task: { icon: "link", color: "var(--of-color-orange-600)", bg: "var(--of-color-orange-50)" }
|
|
23
|
+
}, o = e, t = n(() => a[o.type ?? ""] ?? a.spec), c = n(() => {
|
|
24
|
+
const r = o.icon ?? t.value.icon;
|
|
25
|
+
return h(r);
|
|
26
|
+
}), i = n(() => ({
|
|
27
|
+
"--one-ref-tag-color": o.color ?? t.value.color,
|
|
28
|
+
"--one-ref-tag-bg": o.bg ?? t.value.bg
|
|
29
|
+
}));
|
|
30
|
+
return (r, y) => (l(), s(f(e.href ? "a" : "span"), m({
|
|
31
|
+
class: "one-ref-tag",
|
|
32
|
+
style: i.value,
|
|
33
|
+
href: e.href ?? void 0,
|
|
34
|
+
target: e.href ? "_blank" : void 0,
|
|
35
|
+
rel: e.href ? "noopener noreferrer" : void 0
|
|
36
|
+
}, r.$attrs), {
|
|
37
|
+
default: p(() => [
|
|
38
|
+
c.value ? (l(), s(f(c.value), {
|
|
39
|
+
key: 0,
|
|
40
|
+
class: "one-ref-tag__icon"
|
|
41
|
+
})) : u("", !0),
|
|
42
|
+
v("span", b, [
|
|
43
|
+
d(r.$slots, "default", {}, void 0, !0)
|
|
44
|
+
])
|
|
45
|
+
]),
|
|
46
|
+
_: 3
|
|
47
|
+
}, 16, ["style", "href", "target", "rel"]));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
S as default
|
|
52
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SearchHighlight } from '../../composables/useSearch';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
segments: SearchHighlight[];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: 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>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as h, openBlock as e, createElementBlock as t, mergeProps as l, Fragment as s, renderList as m, toDisplayString as n } from "vue";
|
|
2
|
+
const i = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "of-search-hl__match"
|
|
5
|
+
}, p = { key: 1 }, u = /* @__PURE__ */ h({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "SearchHighlight",
|
|
8
|
+
props: {
|
|
9
|
+
segments: {}
|
|
10
|
+
},
|
|
11
|
+
setup(a) {
|
|
12
|
+
return (o, _) => (e(), t("span", l({ class: "of-search-hl" }, o.$attrs), [
|
|
13
|
+
(e(!0), t(s, null, m(a.segments, (r, c) => (e(), t(s, { key: c }, [
|
|
14
|
+
r.match ? (e(), t("mark", i, n(r.text), 1)) : (e(), t("span", p, n(r.text), 1))
|
|
15
|
+
], 64))), 128))
|
|
16
|
+
], 16));
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export {
|
|
20
|
+
u as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { defineComponent as E, computed as s, openBlock as l, createElementBlock as n, mergeProps as T, createElementVNode as t, createBlock as A, resolveDynamicComponent as L, createCommentVNode as d, toDisplayString as k, normalizeStyle as w, withModifiers as $, renderSlot as u, normalizeClass as v } from "vue";
|
|
2
|
+
import { resolveIcon as z } from "../../utils/icon.js";
|
|
3
|
+
const D = { class: "of-section-block__header-left" }, N = { class: "of-section-block__title" }, U = ["aria-expanded", "aria-label"], M = { class: "of-section-block__body" }, F = /* @__PURE__ */ E({
|
|
4
|
+
name: "SectionBlock",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "SectionBlock",
|
|
7
|
+
props: {
|
|
8
|
+
title: {},
|
|
9
|
+
icon: { default: void 0 },
|
|
10
|
+
status: { default: void 0 },
|
|
11
|
+
collapsed: { type: Boolean, default: !1 },
|
|
12
|
+
editable: { type: Boolean, default: !1 },
|
|
13
|
+
statusLabels: { default: void 0 }
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:collapsed", "edit", "save"],
|
|
16
|
+
setup(e, { emit: g }) {
|
|
17
|
+
const o = e, c = g, m = {
|
|
18
|
+
pending: { background: "var(--of-color-gray-100)", text: "var(--of-color-gray-400)" },
|
|
19
|
+
updating: { background: "var(--of-color-primary-50)", text: "var(--of-color-primary-500)" },
|
|
20
|
+
done: { background: "var(--of-color-success-light)", text: "var(--of-badge-green-text)" },
|
|
21
|
+
editing: { background: "var(--of-color-primary-50)", text: "var(--of-color-primary-500)" }
|
|
22
|
+
}, y = {
|
|
23
|
+
pending: "待处理",
|
|
24
|
+
updating: "更新中",
|
|
25
|
+
done: "已完成",
|
|
26
|
+
editing: "编辑中"
|
|
27
|
+
}, i = s(() => o.status ? m[o.status] ?? null : null), _ = s(() => {
|
|
28
|
+
var a;
|
|
29
|
+
return o.status ? ((a = o.statusLabels) == null ? void 0 : a[o.status]) ?? y[o.status] ?? o.status : null;
|
|
30
|
+
}), h = s(() => i.value ? {
|
|
31
|
+
backgroundColor: i.value.background,
|
|
32
|
+
color: i.value.text
|
|
33
|
+
} : {}), C = s(() => o.status === "editing" ? {
|
|
34
|
+
borderColor: "var(--of-color-primary-500)",
|
|
35
|
+
boxShadow: "0 0 0 3px color-mix(in srgb, var(--of-color-primary-500) 8%, transparent)"
|
|
36
|
+
} : o.status === "done" ? { borderColor: "var(--of-color-success-light)" } : {}), r = s(() => o.status === "editing"), S = s(() => o.editable && o.status === "done"), f = s(() => z(o.icon));
|
|
37
|
+
function b() {
|
|
38
|
+
c("update:collapsed", !o.collapsed);
|
|
39
|
+
}
|
|
40
|
+
function x() {
|
|
41
|
+
c("edit");
|
|
42
|
+
}
|
|
43
|
+
function B() {
|
|
44
|
+
c("save");
|
|
45
|
+
}
|
|
46
|
+
return (a, p) => (l(), n("div", T({
|
|
47
|
+
class: ["of-section-block", {
|
|
48
|
+
"of-section-block--collapsed": e.collapsed,
|
|
49
|
+
"of-section-block--editing": r.value,
|
|
50
|
+
"of-section-block--done": e.status === "done"
|
|
51
|
+
}],
|
|
52
|
+
style: C.value
|
|
53
|
+
}, a.$attrs), [
|
|
54
|
+
t("div", {
|
|
55
|
+
class: "of-section-block__header",
|
|
56
|
+
onClick: b
|
|
57
|
+
}, [
|
|
58
|
+
t("div", D, [
|
|
59
|
+
f.value ? (l(), A(L(f.value), {
|
|
60
|
+
key: 0,
|
|
61
|
+
class: "of-section-block__icon",
|
|
62
|
+
size: 14,
|
|
63
|
+
"aria-hidden": "true"
|
|
64
|
+
})) : d("", !0),
|
|
65
|
+
t("span", N, k(e.title), 1),
|
|
66
|
+
e.status ? (l(), n("span", {
|
|
67
|
+
key: 1,
|
|
68
|
+
class: "of-section-block__status-badge",
|
|
69
|
+
style: w(h.value)
|
|
70
|
+
}, k(_.value), 5)) : d("", !0)
|
|
71
|
+
]),
|
|
72
|
+
t("div", {
|
|
73
|
+
class: "of-section-block__header-right",
|
|
74
|
+
onClick: p[0] || (p[0] = $(() => {
|
|
75
|
+
}, ["stop"]))
|
|
76
|
+
}, [
|
|
77
|
+
u(a.$slots, "header-extra", {}, void 0, !0),
|
|
78
|
+
r.value ? (l(), n("button", {
|
|
79
|
+
key: 0,
|
|
80
|
+
type: "button",
|
|
81
|
+
class: "of-section-block__action-btn of-section-block__action-btn--save",
|
|
82
|
+
onClick: B
|
|
83
|
+
}, " 保存 ")) : S.value ? (l(), n("button", {
|
|
84
|
+
key: 1,
|
|
85
|
+
type: "button",
|
|
86
|
+
class: "of-section-block__action-btn",
|
|
87
|
+
onClick: x
|
|
88
|
+
}, " 编辑 ")) : d("", !0),
|
|
89
|
+
t("button", {
|
|
90
|
+
type: "button",
|
|
91
|
+
class: "of-section-block__collapse-btn",
|
|
92
|
+
"aria-expanded": !e.collapsed,
|
|
93
|
+
"aria-label": e.collapsed ? "展开" : "折叠",
|
|
94
|
+
onClick: b
|
|
95
|
+
}, [
|
|
96
|
+
t("span", {
|
|
97
|
+
class: v(["of-section-block__collapse-icon", { "of-section-block__collapse-icon--collapsed": e.collapsed }]),
|
|
98
|
+
"aria-hidden": "true"
|
|
99
|
+
}, "▾", 2)
|
|
100
|
+
], 8, U)
|
|
101
|
+
])
|
|
102
|
+
]),
|
|
103
|
+
t("div", {
|
|
104
|
+
class: v(["of-section-block__body-wrapper", { "of-section-block__body-wrapper--collapsed": e.collapsed }])
|
|
105
|
+
}, [
|
|
106
|
+
t("div", M, [
|
|
107
|
+
r.value ? u(a.$slots, "editor", { key: 0 }, void 0, !0) : u(a.$slots, "default", { key: 1 }, void 0, !0)
|
|
108
|
+
])
|
|
109
|
+
], 2)
|
|
110
|
+
], 16));
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
export {
|
|
114
|
+
F as default
|
|
115
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { defineComponent as x, computed as o, openBlock as l, createElementBlock as d, mergeProps as m, normalizeStyle as y, createCommentVNode as c, createElementVNode as k, renderSlot as B, unref as g, createBlock as _, resolveDynamicComponent as h } from "vue";
|
|
2
|
+
import { resolveIcon as S } from "../../utils/icon.js";
|
|
3
|
+
const w = { class: "one-select-badge__text" }, N = /* @__PURE__ */ x({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "SelectBadge",
|
|
6
|
+
props: {
|
|
7
|
+
color: {},
|
|
8
|
+
dot: { type: Boolean, default: !1 },
|
|
9
|
+
dotColor: {},
|
|
10
|
+
textColor: {},
|
|
11
|
+
bgColor: {},
|
|
12
|
+
borderColor: {},
|
|
13
|
+
clickable: { type: Boolean, default: !0 }
|
|
14
|
+
},
|
|
15
|
+
emits: ["click"],
|
|
16
|
+
setup(t, { emit: s }) {
|
|
17
|
+
const e = t, u = s, r = {
|
|
18
|
+
red: {
|
|
19
|
+
text: "var(--of-badge-red-text)",
|
|
20
|
+
bg: "var(--of-badge-red-bg)",
|
|
21
|
+
border: "var(--of-badge-red-border)"
|
|
22
|
+
},
|
|
23
|
+
orange: {
|
|
24
|
+
text: "var(--of-badge-orange-text)",
|
|
25
|
+
bg: "var(--of-badge-orange-bg)",
|
|
26
|
+
border: "var(--of-badge-orange-border)"
|
|
27
|
+
},
|
|
28
|
+
green: {
|
|
29
|
+
text: "var(--of-badge-green-text)",
|
|
30
|
+
bg: "var(--of-badge-green-bg)",
|
|
31
|
+
border: "var(--of-badge-green-border)"
|
|
32
|
+
},
|
|
33
|
+
blue: {
|
|
34
|
+
text: "var(--of-badge-blue-text)",
|
|
35
|
+
bg: "var(--of-badge-blue-bg)",
|
|
36
|
+
border: "var(--of-badge-blue-border)"
|
|
37
|
+
},
|
|
38
|
+
purple: {
|
|
39
|
+
text: "var(--of-badge-purple-text)",
|
|
40
|
+
bg: "var(--of-badge-purple-bg)",
|
|
41
|
+
border: "var(--of-badge-purple-border)"
|
|
42
|
+
},
|
|
43
|
+
gray: {
|
|
44
|
+
text: "var(--of-badge-gray-text)",
|
|
45
|
+
bg: "var(--of-badge-gray-bg)",
|
|
46
|
+
border: "var(--of-badge-gray-border)"
|
|
47
|
+
}
|
|
48
|
+
}, n = o(() => e.textColor ? e.textColor : e.color && r[e.color] ? r[e.color].text : r.gray.text), f = o(() => e.bgColor ? e.bgColor : e.color && r[e.color] ? r[e.color].bg : r.gray.bg), v = o(() => e.borderColor ? e.borderColor : e.color && r[e.color] ? r[e.color].border : r.gray.border), i = o(
|
|
49
|
+
() => ({
|
|
50
|
+
"--one-sb-text": n.value,
|
|
51
|
+
"--one-sb-bg": f.value,
|
|
52
|
+
"--one-sb-border": v.value
|
|
53
|
+
})
|
|
54
|
+
), C = o(() => ({
|
|
55
|
+
backgroundColor: e.dotColor || n.value
|
|
56
|
+
})), b = S("chevron-down");
|
|
57
|
+
function p(a) {
|
|
58
|
+
u("click", a);
|
|
59
|
+
}
|
|
60
|
+
return (a, A) => (l(), d("span", m({
|
|
61
|
+
class: ["one-select-badge", { "one-select-badge--clickable": t.clickable }],
|
|
62
|
+
style: i.value
|
|
63
|
+
}, a.$attrs, { onClick: p }), [
|
|
64
|
+
t.dot ? (l(), d("span", {
|
|
65
|
+
key: 0,
|
|
66
|
+
class: "one-select-badge__dot",
|
|
67
|
+
style: y(C.value)
|
|
68
|
+
}, null, 4)) : c("", !0),
|
|
69
|
+
k("span", w, [
|
|
70
|
+
B(a.$slots, "default", {}, void 0, !0)
|
|
71
|
+
]),
|
|
72
|
+
t.clickable && g(b) ? (l(), _(h(g(b)), {
|
|
73
|
+
key: 1,
|
|
74
|
+
class: "one-select-badge__arrow"
|
|
75
|
+
})) : c("", !0)
|
|
76
|
+
], 16));
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
export {
|
|
80
|
+
N as default
|
|
81
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { defineComponent as i, computed as f, openBlock as l, createElementBlock as u, mergeProps as d, createElementVNode as e, normalizeStyle as a, createBlock as v, resolveDynamicComponent as p, unref as b, toDisplayString as s } from "vue";
|
|
2
|
+
import { resolveIcon as g } from "../../utils/icon.js";
|
|
3
|
+
const _ = { class: "of-statistic-card__content" }, m = { class: "of-statistic-card__value" }, x = { class: "of-statistic-card__label" }, k = /* @__PURE__ */ i({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "StatisticCard",
|
|
6
|
+
props: {
|
|
7
|
+
icon: {},
|
|
8
|
+
iconColor: {},
|
|
9
|
+
value: {},
|
|
10
|
+
label: {}
|
|
11
|
+
},
|
|
12
|
+
setup(o) {
|
|
13
|
+
const n = o, r = {
|
|
14
|
+
blue: {
|
|
15
|
+
bg: "var(--of-color-blue-50)",
|
|
16
|
+
text: "var(--of-color-blue-600)"
|
|
17
|
+
},
|
|
18
|
+
green: {
|
|
19
|
+
bg: "var(--of-color-green-50)",
|
|
20
|
+
text: "var(--of-color-green-600)"
|
|
21
|
+
},
|
|
22
|
+
orange: {
|
|
23
|
+
bg: "var(--of-color-orange-50)",
|
|
24
|
+
text: "var(--of-color-orange-600)"
|
|
25
|
+
},
|
|
26
|
+
red: {
|
|
27
|
+
bg: "var(--of-color-red-50)",
|
|
28
|
+
text: "var(--of-color-red-600)"
|
|
29
|
+
},
|
|
30
|
+
purple: {
|
|
31
|
+
bg: "var(--of-color-purple-50)",
|
|
32
|
+
text: "var(--of-color-purple-600)"
|
|
33
|
+
}
|
|
34
|
+
}, c = f(() => {
|
|
35
|
+
const t = n.iconColor || "blue";
|
|
36
|
+
return r[t] || r.blue;
|
|
37
|
+
});
|
|
38
|
+
return (t, C) => (l(), u("div", d({ class: "of-statistic-card" }, t.$attrs), [
|
|
39
|
+
e("div", {
|
|
40
|
+
class: "of-statistic-card__icon-container",
|
|
41
|
+
style: a({ backgroundColor: c.value.bg })
|
|
42
|
+
}, [
|
|
43
|
+
(l(), v(p(b(g)(o.icon)), {
|
|
44
|
+
class: "of-statistic-card__icon",
|
|
45
|
+
style: a({ color: c.value.text })
|
|
46
|
+
}, null, 8, ["style"]))
|
|
47
|
+
], 4),
|
|
48
|
+
e("div", _, [
|
|
49
|
+
e("p", m, s(o.value), 1),
|
|
50
|
+
e("p", x, s(o.label), 1)
|
|
51
|
+
])
|
|
52
|
+
], 16));
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
export {
|
|
56
|
+
k as default
|
|
57
|
+
};
|