@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
|
@@ -5,22 +5,30 @@ import { ArrowRight as w, ArrowUpRight as T, Check as E } from "@lucide/vue";
|
|
|
5
5
|
var D = ["aria-hidden"], O = ["src", "alt"], k = ["id"], A = ["aria-describedby"], j = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "relative z-10 -my-0.5 flex shrink-0 items-center gap-2"
|
|
8
|
-
}, M = ["id", "title"],
|
|
8
|
+
}, M = ["id"], N = ["id", "title"], P = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "mt-2 text-base text-body"
|
|
11
|
-
},
|
|
11
|
+
}, F = {
|
|
12
12
|
key: 2,
|
|
13
13
|
class: "mt-2 flex flex-wrap justify-center gap-2"
|
|
14
|
-
},
|
|
14
|
+
}, I = [
|
|
15
15
|
"id",
|
|
16
16
|
"disabled",
|
|
17
17
|
"aria-labelledby",
|
|
18
18
|
"aria-describedby"
|
|
19
|
-
],
|
|
19
|
+
], L = ["id", "title"], R = {
|
|
20
|
+
key: 1,
|
|
21
|
+
class: "mt-2 text-base text-body"
|
|
22
|
+
}, z = /*@__PURE__*/ l({
|
|
20
23
|
__name: "AcFeatureCard",
|
|
21
24
|
props: /*@__PURE__*/ d({
|
|
22
25
|
title: {},
|
|
26
|
+
subtitle: { default: "" },
|
|
23
27
|
description: { default: "" },
|
|
28
|
+
hoverable: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: !1
|
|
31
|
+
},
|
|
24
32
|
icon: { default: void 0 },
|
|
25
33
|
logo: { default: "" },
|
|
26
34
|
logoAlt: { default: "" },
|
|
@@ -58,77 +66,121 @@ var D = ["aria-hidden"], O = ["src", "alt"], k = ["id"], A = ["aria-describedby"
|
|
|
58
66
|
}),
|
|
59
67
|
emits: /*@__PURE__*/ d(["click"], ["update:checked"]),
|
|
60
68
|
setup(l, { emit: d }) {
|
|
61
|
-
let
|
|
62
|
-
if (
|
|
63
|
-
if (
|
|
64
|
-
is:
|
|
65
|
-
to:
|
|
69
|
+
let z = l, B = b(l, "checked"), V = d, H = u(), U = H?.appContext.components.RouterLink, W = y(), G = n(() => !!z.subtitle && !z.centered), K = n(() => [z.subtitle && `${W}-sub`, z.description && `${W}-desc`].filter(Boolean).join(" ") || void 0), q = n(() => {
|
|
70
|
+
if (z.disabled || z.selectable) return null;
|
|
71
|
+
if (z.to !== void 0 && U) return {
|
|
72
|
+
is: U,
|
|
73
|
+
to: z.to
|
|
66
74
|
};
|
|
67
|
-
let e =
|
|
75
|
+
let e = z.href ?? (typeof z.to == "string" ? z.to : void 0);
|
|
68
76
|
return e ? {
|
|
69
77
|
is: "a",
|
|
70
78
|
href: e,
|
|
71
|
-
target:
|
|
72
|
-
rel:
|
|
79
|
+
target: z.target,
|
|
80
|
+
rel: z.target === "_blank" ? "noopener noreferrer" : void 0
|
|
73
81
|
} : null;
|
|
74
82
|
});
|
|
75
|
-
function
|
|
76
|
-
return !
|
|
83
|
+
function J() {
|
|
84
|
+
return !q.value && !z.disabled && !z.selectable && !!H?.vnode.props?.onClick;
|
|
77
85
|
}
|
|
78
|
-
function
|
|
79
|
-
return !!
|
|
86
|
+
function Y() {
|
|
87
|
+
return !!q.value || J() || z.selectable && !z.disabled;
|
|
80
88
|
}
|
|
81
|
-
function
|
|
82
|
-
|
|
89
|
+
function X(e) {
|
|
90
|
+
V("click", e);
|
|
83
91
|
}
|
|
84
92
|
return (n, u) => (m(), r(g(l.selectable ? "label" : "div"), {
|
|
85
|
-
for: l.selectable ? `${v(
|
|
93
|
+
for: l.selectable ? `${v(W)}-input` : void 0,
|
|
86
94
|
class: p(["group relative flex min-w-0 flex-col rounded-14 border border-border bg-surface p-5 transition-[background-color,border-color,box-shadow,translate] duration-200 has-[[data-ac-card-link]:focus-visible]:ring-2 has-[[data-ac-card-link]:focus-visible]:ring-ring has-[[data-ac-card-link]:focus-visible]:ring-offset-2 has-[[data-ac-card-link]:focus-visible]:ring-offset-surface motion-reduce:transition-none", [
|
|
87
95
|
l.centered && "items-center text-center",
|
|
88
|
-
|
|
96
|
+
Y() && !l.selectable && "cursor-pointer hover:-translate-y-0.5 hover:border-primary/30 hover:bg-accent-hover/60 hover:shadow-card motion-reduce:hover:translate-y-0",
|
|
89
97
|
l.selectable && !l.disabled && "cursor-pointer hover:border-primary/40 hover:bg-accent-hover",
|
|
90
98
|
l.selectable && "has-checked:border-primary has-checked:bg-primary/5 has-checked:shadow-[inset_0_0_0_1px_var(--color-primary)] has-focus-visible:ring-2 has-focus-visible:ring-ring has-focus-visible:ring-offset-2 has-focus-visible:ring-offset-surface",
|
|
99
|
+
l.hoverable && !Y() && !l.selectable && "hover:border-primary/45 hover:shadow-sm",
|
|
91
100
|
l.disabled && "cursor-not-allowed opacity-60"
|
|
92
101
|
]]),
|
|
93
102
|
"data-ac-ds": "",
|
|
94
103
|
"data-testid": "ac-feature-card"
|
|
95
104
|
}, {
|
|
96
|
-
default: S(() => [
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
o("div", { class: p(["
|
|
109
|
-
o("div", { class: p(["flex min-w-0
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
105
|
+
default: S(() => [
|
|
106
|
+
o("div", { class: p(["flex w-full min-w-0 gap-3", l.centered ? "flex-col items-center" : "items-start"]) }, [
|
|
107
|
+
n.$slots.icon || l.logo || l.icon ? (m(), a("span", {
|
|
108
|
+
key: 0,
|
|
109
|
+
class: p(["inline-flex shrink-0 items-center justify-center overflow-hidden border", [l.centered ? "size-12 rounded-14" : "size-10 rounded-10", l.logo ? "border-border bg-surface-muted p-1.5" : "border-primary/25 bg-primary/10 text-primary-strong [&_svg]:size-5"]]),
|
|
110
|
+
"aria-hidden": l.logo && l.logoAlt ? void 0 : "true"
|
|
111
|
+
}, [h(n.$slots, "icon", {}, () => [l.logo ? (m(), a("img", {
|
|
112
|
+
key: 0,
|
|
113
|
+
src: l.logo,
|
|
114
|
+
alt: l.logoAlt,
|
|
115
|
+
class: "size-full object-contain"
|
|
116
|
+
}, null, 8, O)) : (m(), r(g(l.icon), { key: 1 }))])], 10, D)) : i("", !0),
|
|
117
|
+
o("div", { class: p(["min-w-0 flex-1", l.centered && "w-full"]) }, [
|
|
118
|
+
o("div", { class: p(["flex min-w-0 items-start gap-2", l.centered ? "justify-center" : "justify-between"]) }, [
|
|
119
|
+
o("div", { class: p(["flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1", l.centered && "justify-center"]) }, [o("h3", {
|
|
120
|
+
id: `${v(W)}-title`,
|
|
121
|
+
class: "min-w-0 font-heading text-lg leading-6 font-semibold tracking-tight text-heading"
|
|
122
|
+
}, [q.value ? (m(), r(g(q.value.is), f({ key: 0 }, {
|
|
123
|
+
...q.value,
|
|
124
|
+
is: void 0
|
|
125
|
+
}, {
|
|
126
|
+
"aria-describedby": K.value,
|
|
127
|
+
"data-ac-card-link": "",
|
|
128
|
+
class: "outline-none after:absolute after:inset-0 after:rounded-14",
|
|
129
|
+
onClick: X
|
|
130
|
+
}), {
|
|
131
|
+
default: S(() => [s(_(l.title), 1)]),
|
|
132
|
+
_: 1
|
|
133
|
+
}, 16, ["aria-describedby"])) : J() ? (m(), a("button", {
|
|
134
|
+
key: 1,
|
|
135
|
+
type: "button",
|
|
136
|
+
"aria-describedby": K.value,
|
|
137
|
+
"data-ac-card-link": "",
|
|
138
|
+
class: "cursor-pointer text-left outline-none after:absolute after:inset-0 after:rounded-14",
|
|
139
|
+
onClick: X
|
|
140
|
+
}, _(l.title), 9, A)) : (m(), a(t, { key: 2 }, [s(_(l.title), 1)], 64))], 8, k), l.centered ? i("", !0) : (m(), a(t, { key: 0 }, [
|
|
141
|
+
h(n.$slots, "title-extra"),
|
|
142
|
+
l.required ? (m(), r(e, {
|
|
143
|
+
key: 0,
|
|
144
|
+
label: "Required",
|
|
145
|
+
color: "warning",
|
|
146
|
+
variant: "light",
|
|
147
|
+
rounded: ""
|
|
148
|
+
})) : i("", !0),
|
|
149
|
+
l.recommended ? (m(), r(e, {
|
|
150
|
+
key: 1,
|
|
151
|
+
label: "Recommended",
|
|
152
|
+
color: "info",
|
|
153
|
+
variant: "light",
|
|
154
|
+
rounded: ""
|
|
155
|
+
})) : i("", !0),
|
|
156
|
+
h(n.$slots, "status", {}, () => [l.status ? (m(), r(e, {
|
|
157
|
+
key: 0,
|
|
158
|
+
label: l.status,
|
|
159
|
+
color: l.statusColor,
|
|
160
|
+
variant: "light",
|
|
161
|
+
rounded: "",
|
|
162
|
+
dot: ""
|
|
163
|
+
}, null, 8, ["label", "color"])) : i("", !0)])
|
|
164
|
+
], 64))], 2),
|
|
165
|
+
n.$slots.actions && !l.centered ? (m(), a("div", j, [h(n.$slots, "actions")])) : i("", !0),
|
|
166
|
+
!l.centered && (q.value || J()) ? (m(), r(g(l.target === "_blank" ? v(T) : v(w)), {
|
|
167
|
+
key: 1,
|
|
168
|
+
class: "mt-1 size-4 shrink-0 text-muted transition-[color,transform] duration-200 group-hover:text-primary-strong motion-safe:group-hover:translate-x-0.5",
|
|
169
|
+
"aria-hidden": "true"
|
|
170
|
+
})) : i("", !0)
|
|
171
|
+
], 2),
|
|
172
|
+
l.subtitle ? (m(), a("p", {
|
|
173
|
+
key: 0,
|
|
174
|
+
id: `${v(W)}-sub`,
|
|
175
|
+
class: "mt-0.5 text-xs text-muted"
|
|
176
|
+
}, _(l.subtitle), 9, M)) : i("", !0),
|
|
177
|
+
G.value ? i("", !0) : (m(), a(t, { key: 1 }, [l.description ? (m(), a("p", {
|
|
178
|
+
key: 0,
|
|
179
|
+
id: `${v(W)}-desc`,
|
|
180
|
+
class: "mt-1 line-clamp-3 text-base leading-relaxed text-muted",
|
|
181
|
+
title: l.description
|
|
182
|
+
}, _(l.description), 9, N)) : i("", !0), n.$slots.default ? (m(), a("div", P, [h(n.$slots, "default")])) : i("", !0)], 64)),
|
|
183
|
+
l.centered && (l.required || l.recommended || l.status || n.$slots.status) ? (m(), a("div", F, [
|
|
132
184
|
l.required ? (m(), r(e, {
|
|
133
185
|
key: 0,
|
|
134
186
|
label: "Required",
|
|
@@ -151,69 +203,39 @@ var D = ["aria-hidden"], O = ["src", "alt"], k = ["id"], A = ["aria-describedby"
|
|
|
151
203
|
rounded: "",
|
|
152
204
|
dot: ""
|
|
153
205
|
}, null, 8, ["label", "color"])) : i("", !0)])
|
|
154
|
-
]
|
|
155
|
-
n.$slots.actions && !l.centered ? (m(), a("div", j, [h(n.$slots, "actions")])) : i("", !0),
|
|
156
|
-
!l.centered && (H.value || U()) ? (m(), r(g(l.target === "_blank" ? v(T) : v(w)), {
|
|
157
|
-
key: 1,
|
|
158
|
-
class: "mt-1 size-4 shrink-0 text-muted transition-[color,transform] duration-200 group-hover:text-primary-strong motion-safe:group-hover:translate-x-0.5",
|
|
159
|
-
"aria-hidden": "true"
|
|
160
|
-
})) : i("", !0)
|
|
206
|
+
])) : i("", !0)
|
|
161
207
|
], 2),
|
|
162
|
-
l.
|
|
163
|
-
key:
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
key: 1,
|
|
179
|
-
label: "Recommended",
|
|
180
|
-
color: "info",
|
|
181
|
-
variant: "light",
|
|
182
|
-
rounded: ""
|
|
183
|
-
})) : i("", !0),
|
|
184
|
-
h(n.$slots, "status", {}, () => [l.status ? (m(), r(e, {
|
|
185
|
-
key: 0,
|
|
186
|
-
label: l.status,
|
|
187
|
-
color: l.statusColor,
|
|
188
|
-
variant: "light",
|
|
189
|
-
rounded: "",
|
|
190
|
-
dot: ""
|
|
191
|
-
}, null, 8, ["label", "color"])) : i("", !0)])
|
|
192
|
-
])) : i("", !0)
|
|
208
|
+
l.selectable ? (m(), a("span", {
|
|
209
|
+
key: 1,
|
|
210
|
+
class: p(["relative inline-flex size-5 shrink-0", l.centered ? "absolute! top-3 right-3" : "mt-0.5"])
|
|
211
|
+
}, [C(o("input", {
|
|
212
|
+
id: `${v(W)}-input`,
|
|
213
|
+
"onUpdate:modelValue": u[0] ||= (e) => B.value = e,
|
|
214
|
+
type: "checkbox",
|
|
215
|
+
disabled: l.disabled,
|
|
216
|
+
"aria-labelledby": `${v(W)}-title`,
|
|
217
|
+
"aria-describedby": K.value,
|
|
218
|
+
class: "peer size-5 cursor-pointer appearance-none rounded-4 border border-muted/70 bg-surface transition-colors duration-200 outline-none checked:border-primary checked:bg-primary disabled:cursor-not-allowed disabled:bg-surface-sunken"
|
|
219
|
+
}, null, 8, I), [[x, B.value]]), c(v(E), {
|
|
220
|
+
class: "pointer-events-none absolute inset-0 m-auto size-4 scale-75 text-white opacity-0 transition duration-150 peer-checked:scale-100 peer-checked:opacity-100 motion-reduce:transition-none",
|
|
221
|
+
"stroke-width": 3,
|
|
222
|
+
"aria-hidden": "true"
|
|
223
|
+
})], 2)) : i("", !0)
|
|
193
224
|
], 2),
|
|
194
|
-
l.
|
|
225
|
+
G.value ? (m(), a(t, { key: 0 }, [l.description ? (m(), a("p", {
|
|
226
|
+
key: 0,
|
|
227
|
+
id: `${v(W)}-desc`,
|
|
228
|
+
class: "mt-3 line-clamp-3 text-base leading-relaxed text-muted",
|
|
229
|
+
title: l.description
|
|
230
|
+
}, _(l.description), 9, L)) : i("", !0), n.$slots.default ? (m(), a("div", R, [h(n.$slots, "default")])) : i("", !0)], 64)) : i("", !0),
|
|
231
|
+
n.$slots.footer ? (m(), a("div", {
|
|
195
232
|
key: 1,
|
|
196
|
-
class: p(["
|
|
197
|
-
}, [
|
|
198
|
-
|
|
199
|
-
"onUpdate:modelValue": u[0] ||= (e) => L.value = e,
|
|
200
|
-
type: "checkbox",
|
|
201
|
-
disabled: l.disabled,
|
|
202
|
-
"aria-labelledby": `${v(V)}-title`,
|
|
203
|
-
"aria-describedby": l.description ? `${v(V)}-desc` : void 0,
|
|
204
|
-
class: "peer size-5 cursor-pointer appearance-none rounded-4 border border-muted/70 bg-surface transition-colors duration-200 outline-none checked:border-primary checked:bg-primary disabled:cursor-not-allowed disabled:bg-surface-sunken"
|
|
205
|
-
}, null, 8, F), [[x, L.value]]), c(v(E), {
|
|
206
|
-
class: "pointer-events-none absolute inset-0 m-auto size-4 scale-75 text-white opacity-0 transition duration-150 peer-checked:scale-100 peer-checked:opacity-100 motion-reduce:transition-none",
|
|
207
|
-
"stroke-width": 3,
|
|
208
|
-
"aria-hidden": "true"
|
|
209
|
-
})], 2)) : i("", !0)
|
|
210
|
-
], 2), n.$slots.footer ? (m(), a("div", {
|
|
211
|
-
key: 0,
|
|
212
|
-
class: p(["mt-auto flex w-full min-w-0 flex-wrap items-center gap-x-3 gap-y-1 pt-4 text-xs text-muted", l.centered ? "justify-center" : "justify-between"])
|
|
213
|
-
}, [h(n.$slots, "footer")], 2)) : i("", !0)]),
|
|
233
|
+
class: p(["mt-auto flex w-full min-w-0 flex-wrap items-center gap-x-3 gap-y-1 pt-4 text-xs text-muted", l.centered ? "justify-center" : "justify-between"])
|
|
234
|
+
}, [h(n.$slots, "footer")], 2)) : i("", !0)
|
|
235
|
+
]),
|
|
214
236
|
_: 3
|
|
215
237
|
}, 8, ["for", "class"]));
|
|
216
238
|
}
|
|
217
239
|
});
|
|
218
240
|
//#endregion
|
|
219
|
-
export {
|
|
241
|
+
export { z as default };
|
|
@@ -11,7 +11,7 @@ export interface FooterLink {
|
|
|
11
11
|
export interface Props {
|
|
12
12
|
/** Links in the footer row. Defaults to AppsCode's support, docs, blog, pricing and legal pages. */
|
|
13
13
|
links?: FooterLink[];
|
|
14
|
-
/** Line under the links.
|
|
14
|
+
/** Line under the links, e.g. "© 2026 AppsCode Inc.". Empty by default, like cloud-ui's footer. */
|
|
15
15
|
copyright?: string;
|
|
16
16
|
/** App version shown after the copyright in mono text, e.g. "v2026.10.1". */
|
|
17
17
|
version?: string;
|
|
@@ -34,9 +34,9 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
34
34
|
disabled: boolean;
|
|
35
35
|
loading: boolean;
|
|
36
36
|
cancelLabel: string;
|
|
37
|
+
sticky: "container" | "viewport" | "none";
|
|
37
38
|
submitLabel: string;
|
|
38
39
|
hideCancel: boolean;
|
|
39
|
-
sticky: "container" | "viewport" | "none";
|
|
40
40
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
41
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
42
42
|
declare const _default: typeof __VLS_export;
|
|
@@ -26,8 +26,8 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
26
26
|
title: string;
|
|
27
27
|
description: string;
|
|
28
28
|
icon: Component;
|
|
29
|
-
layout: "stacked" | "aside";
|
|
30
29
|
columns: 1 | 2;
|
|
30
|
+
layout: "stacked" | "aside";
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { Component } from "vue";
|
|
2
|
+
import type { ChartRenderer } from "../charts/echarts";
|
|
3
|
+
import type { ChartColor } from "../charts/shared";
|
|
4
|
+
/** A node's or link's health: drawn as the ring colour, and counted as a problem when `warning` or `danger`. */
|
|
5
|
+
export type GraphStatus = "success" | "info" | "warning" | "danger" | "neutral";
|
|
6
|
+
/** One resource in the diagram. */
|
|
7
|
+
export interface GraphNode {
|
|
8
|
+
/** Unique id; links refer to it. */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Name under the node, e.g. `demo-postgres`. */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Resource type, e.g. "Load balancer". Shown under the label, in the legend and in the tooltip. */
|
|
13
|
+
kind?: string;
|
|
14
|
+
/** A Lucide icon component, or 1–3 characters of text, drawn in the node. Overrides `kindIcons`. */
|
|
15
|
+
icon?: Component | string;
|
|
16
|
+
/** Colours the ring. `warning` and `danger` also add a `!` badge. */
|
|
17
|
+
status?: GraphStatus;
|
|
18
|
+
/** Status in words for the tooltip and data table, e.g. "NotReady". Defaults to the status name. */
|
|
19
|
+
statusText?: string;
|
|
20
|
+
/** A sentence for the tooltip, e.g. the CIDR or the instance size. */
|
|
21
|
+
description?: string;
|
|
22
|
+
/** Nodes with the same group are drawn inside one labelled box, e.g. a subnet. */
|
|
23
|
+
group?: string;
|
|
24
|
+
}
|
|
25
|
+
/** A connection between two nodes, drawn from `source` to `target`. */
|
|
26
|
+
export interface GraphLink {
|
|
27
|
+
/** Id of the node the link starts at. */
|
|
28
|
+
source: string;
|
|
29
|
+
/** Id of the node the link ends at. */
|
|
30
|
+
target: string;
|
|
31
|
+
/** Short text on the line, e.g. `10.0.1.0/24` or `:5432`. */
|
|
32
|
+
label?: string;
|
|
33
|
+
/** Colours the line: `warning` or `danger` for a broken or degraded path. */
|
|
34
|
+
status?: GraphStatus;
|
|
35
|
+
/** Draws the line dashed, e.g. for a tunnel or a standby path. */
|
|
36
|
+
dashed?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/** What the `tooltip` slot gets for the hovered node. */
|
|
39
|
+
export interface GraphTooltipSlotProps {
|
|
40
|
+
/** The hovered node, as passed in `nodes`. */
|
|
41
|
+
node: GraphNode;
|
|
42
|
+
/** Labels of the nodes it links to. */
|
|
43
|
+
targets: string[];
|
|
44
|
+
/** Labels of the nodes that link to it. */
|
|
45
|
+
sources: string[];
|
|
46
|
+
}
|
|
47
|
+
export interface Props {
|
|
48
|
+
/** The resources to draw. Each needs a unique `id`; `kind`, `status`, `icon` and `group` are optional. */
|
|
49
|
+
nodes: GraphNode[];
|
|
50
|
+
/** Connections between nodes by id. Links to an unknown id are skipped. */
|
|
51
|
+
links?: GraphLink[];
|
|
52
|
+
/** Layout direction: `LR` (left to right, like a network path) or `TB` (top to bottom, like a hierarchy). */
|
|
53
|
+
direction?: "LR" | "TB";
|
|
54
|
+
/** Plot height in px. The diagram is fitted inside it. */
|
|
55
|
+
height?: number;
|
|
56
|
+
/** Node shape: `circle` or `square` (rounded). */
|
|
57
|
+
shape?: "circle" | "square";
|
|
58
|
+
/** Colour per kind: `{ "Load balancer": "chart-2" }`. Without it, kinds take `chart-1`, `chart-2`… in order of first appearance. */
|
|
59
|
+
kindColors?: Record<string, ChartColor>;
|
|
60
|
+
/** Icon per kind, so node data can stay plain JSON: `{ Database: DatabaseIcon }`. A node's own `icon` wins. */
|
|
61
|
+
kindIcons?: Record<string, Component | string>;
|
|
62
|
+
/** Draws an arrowhead on each link to show its direction. */
|
|
63
|
+
arrows?: boolean;
|
|
64
|
+
/** Shows zoom in, zoom out and fit buttons in the bottom-right corner. */
|
|
65
|
+
zoom?: boolean;
|
|
66
|
+
/** Legend of kinds `top`, `bottom`, or `none`. Clicking a kind hides or shows its nodes. */
|
|
67
|
+
legend?: "top" | "bottom" | "none";
|
|
68
|
+
/** Shows a tooltip with the node's label, kind, status and description on hover. */
|
|
69
|
+
tooltip?: boolean;
|
|
70
|
+
/** Shows a skeleton of the same height while data loads. */
|
|
71
|
+
loading?: boolean;
|
|
72
|
+
/** Text shown in place of the diagram when `nodes` is empty. */
|
|
73
|
+
emptyText?: string;
|
|
74
|
+
/** Accessible name, e.g. "Topology of demo-vpc". Show the visible title in the surrounding card. */
|
|
75
|
+
title?: string;
|
|
76
|
+
/** A sentence for screen readers on what the diagram shows. Defaults to the number of resources, connections and problems. */
|
|
77
|
+
description?: string;
|
|
78
|
+
/** `canvas` (default) stays fast with hundreds of nodes; `svg` is crisper when printed and lighter for a few dozen. */
|
|
79
|
+
renderer?: ChartRenderer;
|
|
80
|
+
/** Animates the first draw and layout changes. Off when the viewer asks for reduced motion. */
|
|
81
|
+
animation?: boolean;
|
|
82
|
+
}
|
|
83
|
+
type __VLS_Props = Props;
|
|
84
|
+
type __VLS_Slots = {
|
|
85
|
+
/** Replaces the tooltip body for the hovered node. */
|
|
86
|
+
tooltip?: (props: GraphTooltipSlotProps) => unknown;
|
|
87
|
+
};
|
|
88
|
+
type __VLS_ModelProps = {
|
|
89
|
+
/** Id of the selected node: it and its links are highlighted and the rest fade. Clicking a node selects it; clicking it again, the background or pressing Escape clears it. */
|
|
90
|
+
"selected"?: string | null;
|
|
91
|
+
};
|
|
92
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
93
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
94
|
+
"update:selected": (value: string | null) => any;
|
|
95
|
+
"node-click": (node: GraphNode, event: MouseEvent) => any;
|
|
96
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
97
|
+
"onUpdate:selected"?: ((value: string | null) => any) | undefined;
|
|
98
|
+
"onNode-click"?: ((node: GraphNode, event: MouseEvent) => any) | undefined;
|
|
99
|
+
}>, {
|
|
100
|
+
legend: "top" | "bottom" | "none";
|
|
101
|
+
title: string;
|
|
102
|
+
description: string;
|
|
103
|
+
height: number;
|
|
104
|
+
direction: "LR" | "TB";
|
|
105
|
+
loading: boolean;
|
|
106
|
+
animation: boolean;
|
|
107
|
+
shape: "circle" | "square";
|
|
108
|
+
tooltip: boolean;
|
|
109
|
+
emptyText: string;
|
|
110
|
+
links: GraphLink[];
|
|
111
|
+
renderer: ChartRenderer;
|
|
112
|
+
zoom: boolean;
|
|
113
|
+
kindColors: Record<string, ChartColor>;
|
|
114
|
+
kindIcons: Record<string, Component | string>;
|
|
115
|
+
arrows: boolean;
|
|
116
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
117
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
118
|
+
declare const _default: typeof __VLS_export;
|
|
119
|
+
export default _default;
|
|
120
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
121
|
+
new (): {
|
|
122
|
+
$slots: S;
|
|
123
|
+
};
|
|
124
|
+
};
|