@ac-design/design-system 2.0.0 → 2.1.1
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/lib/charts/ChartFrame.vue.d.ts +2 -0
- package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +42 -37
- package/dist/lib/charts/cartesian.d.ts +324 -0
- package/dist/lib/charts/cartesian.js +137 -0
- package/dist/lib/charts/echarts.d.ts +86 -0
- package/dist/lib/charts/echarts.js +173 -0
- package/dist/lib/charts/graph.d.ts +77 -0
- package/dist/lib/charts/graph.js +155 -0
- package/dist/lib/charts/index.d.ts +4 -0
- package/dist/lib/charts/index.js +3 -1
- package/dist/lib/charts/shared.d.ts +0 -7
- package/dist/lib/charts/shared.js +1 -19
- package/dist/lib/charts/xy.d.ts +11 -7
- package/dist/lib/charts/xy.js +53 -72
- package/dist/lib/compat.css +1322 -278
- package/dist/lib/components/AcAlert.vue.d.ts +9 -0
- package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +121 -21
- package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcAreaChart.vue.d.ts +3 -0
- package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +132 -142
- package/dist/lib/components/AcAvatar.vue.d.ts +7 -4
- package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +59 -54
- package/dist/lib/components/AcBadge.vue.d.ts +7 -3
- package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +35 -28
- package/dist/lib/components/AcBarChart.vue.d.ts +3 -0
- package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +142 -146
- package/dist/lib/components/AcBreadcrumb.vue.d.ts +4 -1
- package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +18 -17
- package/dist/lib/components/AcBulkActionBar.vue.d.ts +2 -0
- package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcButton.vue.d.ts +12 -6
- package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +85 -47
- package/dist/lib/components/AcCard.vue.d.ts +34 -3
- package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +169 -34
- package/dist/lib/components/AcCellValue.vue.d.ts +3 -3
- package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +171 -165
- package/dist/lib/components/AcCheckBox.vue.d.ts +1 -1
- package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +58 -72
- package/dist/lib/components/AcCheckList.js +5 -0
- package/dist/lib/components/AcCheckList.vue.d.ts +45 -0
- package/dist/lib/components/AcCheckList.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/lib/components/AcCheckRadio.vue.d.ts +30 -5
- package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +100 -36
- package/dist/lib/components/AcCircularProgress.vue.d.ts +4 -4
- package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +12 -9
- package/dist/lib/components/AcColorInput.vue.d.ts +5 -2
- package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +127 -97
- package/dist/lib/components/AcCommandBlock.js +5 -0
- package/dist/lib/components/AcCommandBlock.vue.d.ts +34 -0
- package/dist/lib/components/AcCommandBlock.vue_vue_type_script_setup_true_lang.js +88 -0
- package/dist/lib/components/AcConfirmModal.vue.d.ts +1 -1
- package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +7 -3
- package/dist/lib/components/AcCopyButton.vue.d.ts +2 -2
- package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcCostSummary.js +5 -0
- package/dist/lib/components/AcCostSummary.vue.d.ts +102 -0
- package/dist/lib/components/AcCostSummary.vue_vue_type_script_setup_true_lang.js +179 -0
- package/dist/lib/components/AcDatePicker.vue.d.ts +3 -3
- package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +606 -380
- package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +47 -41
- package/dist/lib/components/AcDonutChart.vue.d.ts +10 -0
- package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +116 -89
- package/dist/lib/components/AcDropdown.vue.d.ts +5 -2
- package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +88 -75
- package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +11 -10
- package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
- package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/lib/components/AcEmptyState.vue.d.ts +1 -1
- package/dist/lib/components/AcErrorState.js +5 -0
- package/dist/lib/components/AcErrorState.vue.d.ts +46 -0
- package/dist/lib/components/AcErrorState.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/lib/components/AcFeatureCard.vue.d.ts +6 -0
- package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +136 -114
- package/dist/lib/components/AcFooter.vue.d.ts +1 -1
- package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcFormFooter.vue.d.ts +1 -1
- package/dist/lib/components/AcFormSection.vue.d.ts +1 -1
- package/dist/lib/components/AcGraphChart.js +5 -0
- package/dist/lib/components/AcGraphChart.vue.d.ts +124 -0
- package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +578 -0
- package/dist/lib/components/AcHeader.vue.d.ts +20 -2
- package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +84 -26
- package/dist/lib/components/AcInfoTable.vue.d.ts +1 -1
- package/dist/lib/components/AcInput.vue.d.ts +1 -1
- package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +76 -79
- package/dist/lib/components/AcKeyValueInput.vue.d.ts +4 -4
- package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +199 -183
- package/dist/lib/components/AcLineChart.vue.d.ts +6 -0
- package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +113 -125
- package/dist/lib/components/AcLoader.js +5 -0
- package/dist/lib/components/AcLoader.vue.d.ts +15 -0
- package/dist/lib/components/AcLoader.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +3 -1
- package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +44 -36
- package/dist/lib/components/AcMapChart.js +5 -0
- package/dist/lib/components/AcMapChart.vue.d.ts +136 -0
- package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +518 -0
- package/dist/lib/components/AcModal.vue.d.ts +6 -3
- package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +85 -61
- package/dist/lib/components/AcNavbar.vue.d.ts +8 -5
- package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +25 -17
- package/dist/lib/components/AcNavbarItem.vue.d.ts +2 -2
- package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/lib/components/AcNotificationMenu.vue.d.ts +3 -3
- package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +133 -168
- package/dist/lib/components/AcNumberInput.vue.d.ts +2 -2
- package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +137 -147
- package/dist/lib/components/AcPage.vue.d.ts +2 -2
- package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcPagination.vue.d.ts +5 -5
- package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +59 -56
- package/dist/lib/components/AcPreloader.vue.d.ts +3 -3
- package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +15 -16
- package/dist/lib/components/AcProductHero.js +5 -0
- package/dist/lib/components/AcProductHero.vue.d.ts +56 -0
- package/dist/lib/components/AcProductHero.vue_vue_type_script_setup_true_lang.js +95 -0
- package/dist/lib/components/AcProgress.vue.d.ts +17 -2
- package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +83 -29
- package/dist/lib/components/AcResourceCard.vue.d.ts +1 -1
- package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
- package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +8 -4
- package/dist/lib/components/AcSelect.vue.d.ts +3 -3
- package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +232 -243
- package/dist/lib/components/AcSettingsRow.js +5 -0
- package/dist/lib/components/AcSettingsRow.vue.d.ts +29 -0
- package/dist/lib/components/AcSettingsRow.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
- package/dist/lib/components/AcSidebar.vue.d.ts +4 -1
- package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +104 -94
- package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
- package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +42 -42
- package/dist/lib/components/AcSidebarSection.vue.d.ts +2 -2
- package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +23 -18
- package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcSwitch.vue.d.ts +3 -0
- package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +46 -39
- package/dist/lib/components/AcSwitchCard.vue.d.ts +3 -3
- package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +65 -65
- package/dist/lib/components/AcTabs.vue.d.ts +9 -2
- package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +42 -27
- package/dist/lib/components/AcTag.vue.d.ts +1 -1
- package/dist/lib/components/AcTagInput.vue.d.ts +5 -5
- package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +140 -142
- package/dist/lib/components/AcTextarea.vue.d.ts +1 -1
- package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +69 -72
- package/dist/lib/components/AcThemeMode.vue.d.ts +3 -3
- package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +54 -22
- package/dist/lib/components/AcTimePicker.vue.d.ts +1 -1
- package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +177 -185
- package/dist/lib/components/AcToaster.vue.d.ts +6 -3
- package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +103 -64
- package/dist/lib/components/AcTooltip.vue.d.ts +34 -14
- package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +184 -70
- package/dist/lib/components/AcUserMenu.vue.d.ts +23 -1
- package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +181 -138
- package/dist/lib/components/index.d.ts +7 -0
- package/dist/lib/components/status.d.ts +3 -1
- package/dist/lib/components/status.js +20 -5
- package/dist/lib/composables/useToast.d.ts +17 -1
- package/dist/lib/composables/useToast.js +10 -2
- package/dist/lib/index.d.ts +7 -3
- package/dist/lib/index.js +80 -73
- package/dist/lib/theme.css +39 -54
- package/package.json +12 -3
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
import e from "./AcTooltip.js";
|
|
2
|
+
import t from "../charts/ChartFrame.js";
|
|
3
|
+
import { bindItemHover as n, useEChart as r } from "../charts/echarts.js";
|
|
4
|
+
import { chartColor as i } from "../charts/shared.js";
|
|
5
|
+
import { LABEL_DETAILS as a, labelDetail as o, layoutGraph as s, nodeImage as c, nodeKind as l, nodeName as u, overhang as d, truncate as ee } from "../charts/graph.js";
|
|
6
|
+
import { Fragment as f, computed as p, createBlock as te, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createSlots as ne, createTextVNode as re, createVNode as ie, defineComponent as _, guardReactiveProps as ae, mergeModels as v, normalizeClass as oe, normalizeProps as se, normalizeStyle as ce, openBlock as y, ref as b, renderList as le, renderSlot as ue, resolveDynamicComponent as de, toDisplayString as x, unref as fe, useModel as pe, watch as me, withCtx as S } from "vue";
|
|
7
|
+
import { Box as he, Maximize as ge, Network as _e, ZoomIn as ve, ZoomOut as ye } from "@lucide/vue";
|
|
8
|
+
import { graphic as C, use as be } from "echarts/core";
|
|
9
|
+
import { GraphChart as xe } from "echarts/charts";
|
|
10
|
+
//#region src/lib/components/AcGraphChart.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
+
var Se = { class: "font-medium text-heading" }, Ce = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "mt-0.5 flex items-center gap-1.5 text-muted"
|
|
14
|
+
}, we = {
|
|
15
|
+
key: 2,
|
|
16
|
+
class: "mt-1.5 border-t border-border pt-1.5 text-muted"
|
|
17
|
+
}, Te = {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "w-10 text-center text-xs text-muted tabular-nums",
|
|
20
|
+
"aria-hidden": "true"
|
|
21
|
+
}, Ee = ["aria-label", "onClick"], w = "graph", De = 1.25, T = 16, Oe = 48, ke = .2, Ae = 4, E = "", D = /*@__PURE__*/ _({
|
|
22
|
+
__name: "AcGraphChart",
|
|
23
|
+
props: /*@__PURE__*/ v({
|
|
24
|
+
nodes: {},
|
|
25
|
+
links: { default: () => [] },
|
|
26
|
+
direction: { default: "LR" },
|
|
27
|
+
height: { default: 480 },
|
|
28
|
+
shape: { default: "circle" },
|
|
29
|
+
kindColors: { default: void 0 },
|
|
30
|
+
kindIcons: { default: void 0 },
|
|
31
|
+
arrows: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !0
|
|
34
|
+
},
|
|
35
|
+
zoom: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !0
|
|
38
|
+
},
|
|
39
|
+
legend: { default: "bottom" },
|
|
40
|
+
tooltip: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !0
|
|
43
|
+
},
|
|
44
|
+
loading: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: !1
|
|
47
|
+
},
|
|
48
|
+
emptyText: { default: "No resources to show yet" },
|
|
49
|
+
title: { default: "" },
|
|
50
|
+
description: { default: "" },
|
|
51
|
+
renderer: { default: "canvas" },
|
|
52
|
+
animation: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: !0
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
selected: { default: null },
|
|
58
|
+
selectedModifiers: {}
|
|
59
|
+
}),
|
|
60
|
+
emits: /*@__PURE__*/ v(["node-click"], ["update:selected"]),
|
|
61
|
+
setup(_, { emit: v }) {
|
|
62
|
+
be([xe]);
|
|
63
|
+
let D = _, O = pe(_, "selected"), je = v, Me = [.25, 1.5], Ne = [
|
|
64
|
+
["wheel", ut],
|
|
65
|
+
["mousewheel", ut],
|
|
66
|
+
["touchstart", dt],
|
|
67
|
+
["touchmove", dt],
|
|
68
|
+
["touchend", dt]
|
|
69
|
+
], k = {
|
|
70
|
+
success: "var(--color-success)",
|
|
71
|
+
info: "var(--color-info)",
|
|
72
|
+
warning: "var(--color-warning)",
|
|
73
|
+
danger: "var(--color-danger)",
|
|
74
|
+
neutral: void 0
|
|
75
|
+
}, Pe = {
|
|
76
|
+
success: "Healthy",
|
|
77
|
+
info: "Info",
|
|
78
|
+
warning: "Warning",
|
|
79
|
+
danger: "Critical",
|
|
80
|
+
neutral: ""
|
|
81
|
+
}, Fe = {
|
|
82
|
+
success: "text-success-strong",
|
|
83
|
+
info: "text-info-strong",
|
|
84
|
+
warning: "text-warning-strong",
|
|
85
|
+
danger: "text-danger-strong",
|
|
86
|
+
neutral: "text-muted"
|
|
87
|
+
}, Ie = {
|
|
88
|
+
success: "bg-success",
|
|
89
|
+
info: "bg-info",
|
|
90
|
+
warning: "bg-warning",
|
|
91
|
+
danger: "bg-danger",
|
|
92
|
+
neutral: "bg-border-dark"
|
|
93
|
+
}, A = b(), j = b([]), M = b(0), N = b(null), Le = b(), P = b(null), F = null, I = null, L = !1, R = null, Re = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map(), B = p(() => new Map(D.nodes.map((e) => [e.id, e]))), ze = p(() => [...new Set(D.nodes.map((e) => e.kind ?? E).filter((e) => e !== E))]), Be = p(() => new Map(ze.value.map((e, t) => [e, i(D.kindColors?.[e], t)])));
|
|
94
|
+
function Ve(e) {
|
|
95
|
+
return Be.value.get(e.kind ?? E) ?? "var(--color-muted)";
|
|
96
|
+
}
|
|
97
|
+
function V(e) {
|
|
98
|
+
return e ?? "neutral";
|
|
99
|
+
}
|
|
100
|
+
function H(e) {
|
|
101
|
+
return e.statusText || Pe[V(e.status)];
|
|
102
|
+
}
|
|
103
|
+
function U(e) {
|
|
104
|
+
return e.status === "warning" || e.status === "danger";
|
|
105
|
+
}
|
|
106
|
+
function He(e) {
|
|
107
|
+
return e.icon ?? D.kindIcons?.[e.kind ?? E] ?? he;
|
|
108
|
+
}
|
|
109
|
+
let W = p(() => D.nodes.filter((e) => !j.value.includes(e.kind ?? E))), G = p(() => new Set(W.value.map((e) => e.id))), K = p(() => D.links.filter((e) => B.value.has(e.source) && B.value.has(e.target))), Ue = p(() => K.value.filter((e) => G.value.has(e.source) && G.value.has(e.target))), We = p(() => s(W.value.map((e) => ({
|
|
110
|
+
id: e.id,
|
|
111
|
+
label: e.label,
|
|
112
|
+
kind: e.kind ?? E,
|
|
113
|
+
group: e.group,
|
|
114
|
+
badge: U(e)
|
|
115
|
+
})), Ue.value.map((e) => ({
|
|
116
|
+
source: e.source,
|
|
117
|
+
target: e.target,
|
|
118
|
+
label: e.label ?? ""
|
|
119
|
+
})), D.direction)), q = p(() => {
|
|
120
|
+
let e = We.value, { centers: t } = e, n = Math.max(t.maxX - t.minX, 2), r = Math.max(t.maxY - t.minY, 2), i = Math.max(M.value - 32, 1), s = Math.max(D.height - T - (D.zoom ? Oe : T), 1), c = 1, l = "full", u = d(e, c, l);
|
|
121
|
+
for (l of a) {
|
|
122
|
+
u = d(e, c, l);
|
|
123
|
+
for (let t = 0; t < 4; t++) c = Math.max(Math.min(1, (i - u.left - u.right) / n, (s - u.top - u.bottom) / r), .05), u = d(e, c, l);
|
|
124
|
+
if (a.indexOf(o(c)) <= a.indexOf(l)) break;
|
|
125
|
+
}
|
|
126
|
+
let ee = n * c + u.left + u.right, f = r * c + u.top + u.bottom;
|
|
127
|
+
return {
|
|
128
|
+
layout: e,
|
|
129
|
+
scale: c,
|
|
130
|
+
detail: l,
|
|
131
|
+
left: T + (i - ee) / 2 + u.left,
|
|
132
|
+
top: T + (s - f) / 2 + u.top,
|
|
133
|
+
width: n * c,
|
|
134
|
+
height: r * c,
|
|
135
|
+
center: [(t.minX + t.maxX) / 2, (t.minY + t.maxY) / 2]
|
|
136
|
+
};
|
|
137
|
+
}), Ge = p(() => O.value && G.value.has(O.value) ? O.value : void 0), Ke = p(() => {
|
|
138
|
+
let e = Ge.value;
|
|
139
|
+
if (!e) return null;
|
|
140
|
+
let t = /* @__PURE__ */ new Set([e]);
|
|
141
|
+
for (let n of K.value) n.source === e && t.add(n.target), n.target === e && t.add(n.source);
|
|
142
|
+
return t;
|
|
143
|
+
}), qe = p(() => Math.round((P.value ?? q.value.scale) * 100)), J = p(() => P.value === null ? q.value.detail : o(P.value));
|
|
144
|
+
function Y(e) {
|
|
145
|
+
return e.replace(/[{}]/g, "");
|
|
146
|
+
}
|
|
147
|
+
function Je(e, t, n) {
|
|
148
|
+
let r = V(t.status), i = He(t), a = n ? e.primary : k[r] ? e.color(k[r]) : e.borderDark, o = e.color(Ve(t)), s = n ? 3 : 2, l = [
|
|
149
|
+
typeof i == "string" ? `t:${i}` : `c:${Ye(i)}`,
|
|
150
|
+
o,
|
|
151
|
+
a,
|
|
152
|
+
s,
|
|
153
|
+
e.surface,
|
|
154
|
+
D.shape
|
|
155
|
+
].join("|"), u = Re.get(l);
|
|
156
|
+
return u || (u = c({
|
|
157
|
+
icon: i,
|
|
158
|
+
iconColor: o,
|
|
159
|
+
fill: e.surface,
|
|
160
|
+
ring: a,
|
|
161
|
+
ringWidth: s,
|
|
162
|
+
shape: D.shape,
|
|
163
|
+
font: e.font
|
|
164
|
+
}), Re.set(l, u)), u;
|
|
165
|
+
}
|
|
166
|
+
function Ye(e) {
|
|
167
|
+
let t = z.get(e);
|
|
168
|
+
return t === void 0 && (t = z.size, z.set(e, t)), t;
|
|
169
|
+
}
|
|
170
|
+
function Xe(e) {
|
|
171
|
+
let t = U(e) ? `{${e.status}|!}` : "";
|
|
172
|
+
if (J.value === "badge") return t;
|
|
173
|
+
let n = `${t ? `${t} ` : ""}{name|${Y(u(e.label))}}`;
|
|
174
|
+
return e.kind && J.value === "full" ? `${n}\n{kind|${Y(l(e.kind))}}` : n;
|
|
175
|
+
}
|
|
176
|
+
function Ze(e) {
|
|
177
|
+
let t = q.value, n = F?.frame === t ? F : null, r = Ke.value, i = Ge.value, a = new Map(W.value.map((e, t) => [e.id, t])), o = (t, n) => ({
|
|
178
|
+
backgroundColor: e.color(t),
|
|
179
|
+
color: e.color(n),
|
|
180
|
+
width: 14,
|
|
181
|
+
height: 14,
|
|
182
|
+
lineHeight: 14,
|
|
183
|
+
borderRadius: 7,
|
|
184
|
+
align: "center",
|
|
185
|
+
fontSize: 10,
|
|
186
|
+
fontWeight: 700
|
|
187
|
+
});
|
|
188
|
+
return {
|
|
189
|
+
id: w,
|
|
190
|
+
type: "graph",
|
|
191
|
+
layout: "none",
|
|
192
|
+
left: t.left,
|
|
193
|
+
top: t.top,
|
|
194
|
+
width: t.width,
|
|
195
|
+
height: t.height,
|
|
196
|
+
roam: !0,
|
|
197
|
+
roamTrigger: "global",
|
|
198
|
+
scaleLimit: {
|
|
199
|
+
min: Math.min(1, Me[0] / t.scale),
|
|
200
|
+
max: Math.max(1, Me[1] / t.scale)
|
|
201
|
+
},
|
|
202
|
+
zoom: n?.zoom ?? 1,
|
|
203
|
+
center: n?.center ?? t.center,
|
|
204
|
+
nodeScaleRatio: 1,
|
|
205
|
+
cursor: "pointer",
|
|
206
|
+
emphasis: { disabled: !0 },
|
|
207
|
+
edgeSymbol: D.arrows ? ["none", "arrow"] : ["none", "none"],
|
|
208
|
+
edgeSymbolSize: [0, 8],
|
|
209
|
+
label: {
|
|
210
|
+
show: !0,
|
|
211
|
+
position: "bottom",
|
|
212
|
+
distance: 6,
|
|
213
|
+
fontFamily: e.font,
|
|
214
|
+
rich: {
|
|
215
|
+
name: {
|
|
216
|
+
fontSize: 12,
|
|
217
|
+
lineHeight: 16,
|
|
218
|
+
fontWeight: 500,
|
|
219
|
+
color: e.heading,
|
|
220
|
+
fontFamily: e.font
|
|
221
|
+
},
|
|
222
|
+
kind: {
|
|
223
|
+
fontSize: 11,
|
|
224
|
+
lineHeight: 14,
|
|
225
|
+
color: e.muted,
|
|
226
|
+
fontFamily: e.font
|
|
227
|
+
},
|
|
228
|
+
warning: o("var(--color-warning)", "var(--color-on-warning)"),
|
|
229
|
+
danger: o("var(--color-danger)", "var(--color-white)")
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
edgeLabel: {
|
|
233
|
+
show: !1,
|
|
234
|
+
fontSize: 11,
|
|
235
|
+
fontFamily: e.font,
|
|
236
|
+
color: e.muted,
|
|
237
|
+
backgroundColor: e.sunken,
|
|
238
|
+
padding: [2, 6],
|
|
239
|
+
borderRadius: 6
|
|
240
|
+
},
|
|
241
|
+
data: W.value.map((n) => {
|
|
242
|
+
let [a, o] = t.layout.positions.get(n.id), s = r && !r.has(n.id) ? ke : 1;
|
|
243
|
+
return {
|
|
244
|
+
id: n.id,
|
|
245
|
+
name: n.id,
|
|
246
|
+
x: a,
|
|
247
|
+
y: o,
|
|
248
|
+
symbol: Je(e, n, n.id === i),
|
|
249
|
+
symbolSize: 40 * t.scale,
|
|
250
|
+
itemStyle: { opacity: s },
|
|
251
|
+
label: {
|
|
252
|
+
formatter: Xe(n),
|
|
253
|
+
opacity: s
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
}),
|
|
257
|
+
links: Ue.value.map((t) => {
|
|
258
|
+
let n = !!i && (t.source === i || t.target === i), r = V(t.status), o = n ? e.primary : k[r] ? e.color(k[r]) : e.borderDark, s = i && !n ? ke : 1;
|
|
259
|
+
return {
|
|
260
|
+
source: a.get(t.source),
|
|
261
|
+
target: a.get(t.target),
|
|
262
|
+
lineStyle: {
|
|
263
|
+
color: o,
|
|
264
|
+
width: n ? 2.5 : 1.5,
|
|
265
|
+
type: t.dashed ? "dashed" : "solid",
|
|
266
|
+
opacity: s,
|
|
267
|
+
curveness: 0
|
|
268
|
+
},
|
|
269
|
+
label: t.label && J.value === "full" ? {
|
|
270
|
+
show: !0,
|
|
271
|
+
formatter: Y(t.label),
|
|
272
|
+
opacity: s
|
|
273
|
+
} : void 0
|
|
274
|
+
};
|
|
275
|
+
})
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
let X = r({
|
|
279
|
+
host: A,
|
|
280
|
+
renderer: () => D.renderer,
|
|
281
|
+
option: (e) => ({
|
|
282
|
+
animation: D.animation && !e.reducedMotion,
|
|
283
|
+
animationDurationUpdate: 300,
|
|
284
|
+
textStyle: { fontFamily: e.font },
|
|
285
|
+
series: [Ze(e)]
|
|
286
|
+
}),
|
|
287
|
+
setup: Qe
|
|
288
|
+
});
|
|
289
|
+
function Qe(e) {
|
|
290
|
+
let t = e.getZr();
|
|
291
|
+
R = {
|
|
292
|
+
root: new C.Group({ silent: !0 }),
|
|
293
|
+
items: /* @__PURE__ */ new Map()
|
|
294
|
+
}, t.add(R.root), n(e, st, ct), t.on("mousedown", (e) => {
|
|
295
|
+
I = [e.offsetX, e.offsetY];
|
|
296
|
+
}), t.on("click", (e) => {
|
|
297
|
+
!e.target && !$e(e) && (O.value = null);
|
|
298
|
+
}), e.on("click", (e) => {
|
|
299
|
+
let t = e, n = t.data?.id ? B.value.get(t.data.id) : void 0;
|
|
300
|
+
t.dataType === "node" && n && t.event?.event && !$e(t.event) && lt(n, t.event.event);
|
|
301
|
+
}), e.on("graphroam", () => tt(e)), e.on("rendered", () => et(e));
|
|
302
|
+
}
|
|
303
|
+
function $e(e) {
|
|
304
|
+
return !!I && Math.hypot(e.offsetX - I[0], e.offsetY - I[1]) > Ae;
|
|
305
|
+
}
|
|
306
|
+
function Z(e, t) {
|
|
307
|
+
return e.convertToPixel({ seriesId: w }, t);
|
|
308
|
+
}
|
|
309
|
+
function et(e) {
|
|
310
|
+
let t = X.theme.value;
|
|
311
|
+
if (!R || !t) return;
|
|
312
|
+
let n = /* @__PURE__ */ new Set();
|
|
313
|
+
for (let r of q.value.layout.groups) {
|
|
314
|
+
let i = Z(e, [r.x, r.y]), a = Z(e, [r.x + r.width, r.y + r.height]);
|
|
315
|
+
if (!i || !a) continue;
|
|
316
|
+
n.add(r.name);
|
|
317
|
+
let o = (a[0] - i[0]) / r.width, s = {
|
|
318
|
+
x: i[0],
|
|
319
|
+
y: i[1],
|
|
320
|
+
width: a[0] - i[0],
|
|
321
|
+
height: a[1] - i[1],
|
|
322
|
+
r: 10 * o
|
|
323
|
+
}, c = i[1] + 15 * o, l = [
|
|
324
|
+
s.x,
|
|
325
|
+
s.y,
|
|
326
|
+
s.width,
|
|
327
|
+
s.height,
|
|
328
|
+
t.surface,
|
|
329
|
+
t.borderDark,
|
|
330
|
+
t.muted
|
|
331
|
+
].map(String).join("|"), u = R.items.get(r.name);
|
|
332
|
+
u || (u = {
|
|
333
|
+
rect: new C.Rect({
|
|
334
|
+
z: 1,
|
|
335
|
+
silent: !0
|
|
336
|
+
}),
|
|
337
|
+
text: new C.Text({
|
|
338
|
+
z: 1,
|
|
339
|
+
silent: !0
|
|
340
|
+
}),
|
|
341
|
+
sig: ""
|
|
342
|
+
}, R.root.add(u.rect), R.root.add(u.text), R.items.set(r.name, u)), u.sig !== l && (u.sig = l, u.rect.setShape(s), u.rect.setStyle({
|
|
343
|
+
fill: t.color("var(--color-surface-muted)"),
|
|
344
|
+
stroke: t.borderDark,
|
|
345
|
+
lineWidth: 1
|
|
346
|
+
}), u.text.setStyle({
|
|
347
|
+
text: ee(r.name, 40),
|
|
348
|
+
x: i[0] + 10 * o,
|
|
349
|
+
y: c,
|
|
350
|
+
fill: t.muted,
|
|
351
|
+
font: `500 11px ${t.font}`,
|
|
352
|
+
verticalAlign: "middle"
|
|
353
|
+
}));
|
|
354
|
+
}
|
|
355
|
+
for (let [e, t] of R.items) n.has(e) || (R.root.remove(t.rect), R.root.remove(t.text), R.items.delete(e));
|
|
356
|
+
}
|
|
357
|
+
function tt(e) {
|
|
358
|
+
N.value = null, et(e);
|
|
359
|
+
let t = q.value, n = e.convertFromPixel({ seriesId: w }, [t.left + t.width / 2, t.top + t.height / 2]), r = Z(e, [0, 0]), i = Z(e, [100, 0]);
|
|
360
|
+
if (!n || !r || !i) return;
|
|
361
|
+
let a = (i[0] - r[0]) / 100;
|
|
362
|
+
F = {
|
|
363
|
+
frame: t,
|
|
364
|
+
zoom: a / t.scale,
|
|
365
|
+
center: n
|
|
366
|
+
}, P.value = Math.round(a * 1e3) / 1e3;
|
|
367
|
+
}
|
|
368
|
+
let nt = p(() => ze.value.map((e) => ({
|
|
369
|
+
key: e,
|
|
370
|
+
name: e,
|
|
371
|
+
color: Be.value.get(e)
|
|
372
|
+
})));
|
|
373
|
+
function rt(e) {
|
|
374
|
+
let t = (e) => B.value.get(e)?.label ?? e;
|
|
375
|
+
return {
|
|
376
|
+
targets: K.value.filter((t) => t.source === e).map((e) => t(e.target)),
|
|
377
|
+
sources: K.value.filter((t) => t.target === e).map((e) => t(e.source))
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
let it = p(() => ({
|
|
381
|
+
columns: [
|
|
382
|
+
"Resource",
|
|
383
|
+
"Kind",
|
|
384
|
+
"Status",
|
|
385
|
+
"Connects to",
|
|
386
|
+
"Connected from"
|
|
387
|
+
],
|
|
388
|
+
rows: D.nodes.map((e) => {
|
|
389
|
+
let { targets: t, sources: n } = rt(e.id);
|
|
390
|
+
return [
|
|
391
|
+
e.label,
|
|
392
|
+
e.kind ?? "",
|
|
393
|
+
H(e),
|
|
394
|
+
t.join(", ") || "None",
|
|
395
|
+
n.join(", ") || "None"
|
|
396
|
+
];
|
|
397
|
+
})
|
|
398
|
+
}));
|
|
399
|
+
function at(e, t) {
|
|
400
|
+
return `${e} ${t}${e === 1 ? "" : "s"}`;
|
|
401
|
+
}
|
|
402
|
+
let ot = p(() => {
|
|
403
|
+
let e = D.nodes.filter(U).length, t = `Topology: ${at(D.nodes.length, "resource")}, ${at(K.value.length, "connection")}${e ? `, ${e} with problems` : ""}.`;
|
|
404
|
+
return [D.title, D.description || t].filter(Boolean).join(". ");
|
|
405
|
+
}), Q = p(() => N.value ? B.value.get(String(N.value.datum.id)) : void 0), $ = p(() => Q.value ? {
|
|
406
|
+
node: Q.value,
|
|
407
|
+
...rt(Q.value.id)
|
|
408
|
+
} : void 0);
|
|
409
|
+
function st(e) {
|
|
410
|
+
let t = e.dataType === "node" ? B.value.get(String(e.data?.id)) : void 0;
|
|
411
|
+
if (!t || !D.tooltip) return ct();
|
|
412
|
+
N.value = {
|
|
413
|
+
clientX: e.clientX,
|
|
414
|
+
clientY: e.clientY,
|
|
415
|
+
title: t.label,
|
|
416
|
+
items: [],
|
|
417
|
+
datum: t,
|
|
418
|
+
index: e.dataIndex
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
function ct() {
|
|
422
|
+
N.value = null;
|
|
423
|
+
}
|
|
424
|
+
function lt(e, t) {
|
|
425
|
+
O.value = O.value === e.id ? null : e.id, Le.value?.focus({ preventScroll: !0 }), je("node-click", e, t);
|
|
426
|
+
}
|
|
427
|
+
function ut(e) {
|
|
428
|
+
let t = e;
|
|
429
|
+
!t.ctrlKey && !t.metaKey && e.stopPropagation();
|
|
430
|
+
}
|
|
431
|
+
function dt(e) {
|
|
432
|
+
let t = e;
|
|
433
|
+
t.type === "touchstart" && t.touches.length > 1 && (L = !0), L || e.stopPropagation(), t.type === "touchend" && !t.touches.length && (L = !1);
|
|
434
|
+
}
|
|
435
|
+
function ft(e) {
|
|
436
|
+
let t = X.chart.value;
|
|
437
|
+
t && t.dispatchAction({
|
|
438
|
+
type: "graphRoam",
|
|
439
|
+
seriesId: w,
|
|
440
|
+
zoom: e,
|
|
441
|
+
originX: t.getWidth() / 2,
|
|
442
|
+
originY: t.getHeight() / 2
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
function pt() {
|
|
446
|
+
ft(De);
|
|
447
|
+
}
|
|
448
|
+
function mt() {
|
|
449
|
+
ft(1 / De);
|
|
450
|
+
}
|
|
451
|
+
function ht() {
|
|
452
|
+
let e = X.chart.value, t = q.value;
|
|
453
|
+
if (!e) return;
|
|
454
|
+
let n = F?.frame === t ? F.zoom : 1, r = Z(e, t.center);
|
|
455
|
+
r && (e.dispatchAction({
|
|
456
|
+
type: "graphRoam",
|
|
457
|
+
seriesId: w,
|
|
458
|
+
zoom: 1 / n,
|
|
459
|
+
originX: r[0],
|
|
460
|
+
originY: r[1]
|
|
461
|
+
}), e.dispatchAction({
|
|
462
|
+
type: "graphRoam",
|
|
463
|
+
seriesId: w,
|
|
464
|
+
dx: t.left + t.width / 2 - r[0],
|
|
465
|
+
dy: t.top + t.height / 2 - r[1]
|
|
466
|
+
}), P.value = null);
|
|
467
|
+
}
|
|
468
|
+
let gt = [
|
|
469
|
+
{
|
|
470
|
+
label: "Zoom out",
|
|
471
|
+
icon: ye,
|
|
472
|
+
action: mt
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
label: "Zoom in",
|
|
476
|
+
icon: ve,
|
|
477
|
+
action: pt
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
label: "Fit to view",
|
|
481
|
+
icon: ge,
|
|
482
|
+
action: ht
|
|
483
|
+
}
|
|
484
|
+
];
|
|
485
|
+
function _t(e) {
|
|
486
|
+
e.key === "Escape" && !e.defaultPrevented && O.value && (e.preventDefault(), O.value = null);
|
|
487
|
+
}
|
|
488
|
+
return me(q, () => P.value = null), me(A, (e, t) => {
|
|
489
|
+
for (let [n, r] of Ne) t?.removeEventListener(n, r, { capture: !0 }), e?.addEventListener(n, r, {
|
|
490
|
+
capture: !0,
|
|
491
|
+
passive: !0
|
|
492
|
+
});
|
|
493
|
+
}), (n, r) => (y(), te(t, {
|
|
494
|
+
hidden: j.value,
|
|
495
|
+
"onUpdate:hidden": r[0] ||= (e) => j.value = e,
|
|
496
|
+
width: M.value,
|
|
497
|
+
"onUpdate:width": r[1] ||= (e) => M.value = e,
|
|
498
|
+
testid: "ac-graph-chart",
|
|
499
|
+
height: _.height,
|
|
500
|
+
loading: _.loading,
|
|
501
|
+
empty: !_.nodes.length,
|
|
502
|
+
"empty-text": _.emptyText,
|
|
503
|
+
"empty-icon": fe(_e),
|
|
504
|
+
legend: _.legend,
|
|
505
|
+
"legend-items": nt.value,
|
|
506
|
+
summary: ot.value,
|
|
507
|
+
title: _.title,
|
|
508
|
+
description: _.description,
|
|
509
|
+
table: it.value,
|
|
510
|
+
tip: N.value,
|
|
511
|
+
tooltip: _.tooltip,
|
|
512
|
+
onKeydown: _t
|
|
513
|
+
}, ne({
|
|
514
|
+
tooltip: S(() => [$.value ? ue(n.$slots, "tooltip", se(ae($.value)), () => [
|
|
515
|
+
g("p", Se, x($.value.node.label), 1),
|
|
516
|
+
$.value.node.kind ? (y(), h("p", Ce, [g("span", {
|
|
517
|
+
class: "size-2 shrink-0 rounded-full",
|
|
518
|
+
style: ce({ backgroundColor: Ve($.value.node) }),
|
|
519
|
+
"aria-hidden": "true"
|
|
520
|
+
}, null, 4), re(" " + x($.value.node.kind), 1)])) : m("", !0),
|
|
521
|
+
H($.value.node) ? (y(), h("p", {
|
|
522
|
+
key: 1,
|
|
523
|
+
class: oe(["mt-1 flex items-center gap-1.5", Fe[V($.value.node.status)]])
|
|
524
|
+
}, [g("span", {
|
|
525
|
+
class: oe(["size-2 shrink-0 rounded-full", Ie[V($.value.node.status)]]),
|
|
526
|
+
"aria-hidden": "true"
|
|
527
|
+
}, null, 2), re(" " + x(H($.value.node)), 1)], 2)) : m("", !0),
|
|
528
|
+
$.value.node.description ? (y(), h("p", we, x($.value.node.description), 1)) : m("", !0)
|
|
529
|
+
], void 0, 0) : m("", !0)]),
|
|
530
|
+
default: S(() => [g("div", {
|
|
531
|
+
ref_key: "host",
|
|
532
|
+
ref: A,
|
|
533
|
+
class: "size-full"
|
|
534
|
+
}, null, 512)]),
|
|
535
|
+
_: 2
|
|
536
|
+
}, [_.zoom ? {
|
|
537
|
+
name: "controls",
|
|
538
|
+
fn: S(() => [g("div", {
|
|
539
|
+
ref_key: "controls",
|
|
540
|
+
ref: Le,
|
|
541
|
+
class: "absolute right-3 bottom-3 flex items-center gap-0.5 rounded-full border border-border bg-surface/90 p-1 shadow-sm backdrop-blur focus:outline-none",
|
|
542
|
+
role: "group",
|
|
543
|
+
"aria-label": "Zoom",
|
|
544
|
+
tabindex: "-1"
|
|
545
|
+
}, [(y(), h(f, null, le(gt, (t) => (y(), h(f, { key: t.label }, [t.label === "Zoom in" ? (y(), h("span", Te, x(qe.value) + "%", 1)) : m("", !0), ie(e, { content: t.label }, {
|
|
546
|
+
default: S(() => [g("button", {
|
|
547
|
+
type: "button",
|
|
548
|
+
class: "inline-flex size-7 cursor-pointer items-center justify-center rounded-full text-muted transition-colors hover:bg-surface-sunken hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",
|
|
549
|
+
"aria-label": t.label,
|
|
550
|
+
onClick: t.action
|
|
551
|
+
}, [(y(), te(de(t.icon), {
|
|
552
|
+
class: "size-4",
|
|
553
|
+
"aria-hidden": "true"
|
|
554
|
+
}))], 8, Ee)]),
|
|
555
|
+
_: 2
|
|
556
|
+
}, 1032, ["content"])], 64))), 64))], 512)]),
|
|
557
|
+
key: "0"
|
|
558
|
+
} : void 0]), 1032, [
|
|
559
|
+
"hidden",
|
|
560
|
+
"width",
|
|
561
|
+
"height",
|
|
562
|
+
"loading",
|
|
563
|
+
"empty",
|
|
564
|
+
"empty-text",
|
|
565
|
+
"empty-icon",
|
|
566
|
+
"legend",
|
|
567
|
+
"legend-items",
|
|
568
|
+
"summary",
|
|
569
|
+
"title",
|
|
570
|
+
"description",
|
|
571
|
+
"table",
|
|
572
|
+
"tip",
|
|
573
|
+
"tooltip"
|
|
574
|
+
]));
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
//#endregion
|
|
578
|
+
export { D as default };
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
import type { Component } from "vue";
|
|
1
2
|
export interface Props {
|
|
2
3
|
/** Page title. */
|
|
3
4
|
title?: string;
|
|
4
5
|
/** Line under the title. */
|
|
5
6
|
subtitle?: string;
|
|
7
|
+
/** `bar` is a full-width strip with a bottom border, for detail pages. `plain` sits on the page with no frame, like cloud-ui's list pages. `hero` is a card with a primary wash, a dot grid and the icon as a watermark, for create pages. */
|
|
8
|
+
variant?: "bar" | "plain" | "hero";
|
|
9
|
+
/** A Lucide icon for the tile before the title (and the `hero` watermark). The `icon` slot replaces it. */
|
|
10
|
+
icon?: Component;
|
|
11
|
+
/** A green pill after the title, e.g. "12 databases". */
|
|
12
|
+
countLabel?: string;
|
|
13
|
+
/** Adds a "Documentation" link before the actions, opening in a new tab. */
|
|
14
|
+
docsHref?: string;
|
|
6
15
|
/** Shows a back button that emits `back`. */
|
|
7
16
|
backButton?: boolean;
|
|
8
17
|
/** Sticks to the top while the page scrolls. */
|
|
@@ -11,16 +20,20 @@ export interface Props {
|
|
|
11
20
|
top?: string;
|
|
12
21
|
/** `normal` suits a page's main header: a 20px title, 24px from 768px. `compact` has a 16px title and less padding, for dense pages and forms. */
|
|
13
22
|
size?: "normal" | "compact";
|
|
23
|
+
/** Heading level of the title. Use `h1` for the page's main title; the default `h4` keeps older pages' outline. */
|
|
24
|
+
titleTag?: "h1" | "h2" | "h3" | "h4";
|
|
14
25
|
}
|
|
15
26
|
type __VLS_Slots = {
|
|
16
27
|
/** A logo or icon before the title, shown in a 44px tile: a Lucide icon gets a solid primary tile, an `<img>` (e.g. the database engine's logo) a bordered white one. */
|
|
17
28
|
icon?: () => unknown;
|
|
18
|
-
/** Breadcrumb above the title. */
|
|
29
|
+
/** Breadcrumb above the title (above the card for `hero`). */
|
|
19
30
|
breadcrumb?: () => unknown;
|
|
20
31
|
/** Replaces the title and subtitle. */
|
|
21
32
|
title?: () => unknown;
|
|
22
|
-
/** Next to the title, e.g. a status badge. */
|
|
33
|
+
/** Next to the title and count, e.g. a status badge. */
|
|
23
34
|
"title-extra"?: () => unknown;
|
|
35
|
+
/** Under the subtitle, e.g. the region, created date and owner. */
|
|
36
|
+
meta?: () => unknown;
|
|
24
37
|
/** Right side: the page's actions. The primary action goes last. */
|
|
25
38
|
default?: () => unknown;
|
|
26
39
|
};
|
|
@@ -29,11 +42,16 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
29
42
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
30
43
|
onBack?: (() => any) | undefined;
|
|
31
44
|
}>, {
|
|
45
|
+
variant: "bar" | "plain" | "hero";
|
|
32
46
|
title: string;
|
|
47
|
+
icon: Component;
|
|
33
48
|
size: "normal" | "compact";
|
|
34
49
|
top: string;
|
|
35
50
|
subtitle: string;
|
|
36
51
|
sticky: boolean;
|
|
52
|
+
titleTag: "h1" | "h2" | "h3" | "h4";
|
|
53
|
+
countLabel: string;
|
|
54
|
+
docsHref: string;
|
|
37
55
|
backButton: boolean;
|
|
38
56
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
57
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|