@ac-design/design-system 2.6.1 → 2.8.0

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.
Files changed (78) hide show
  1. package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +2 -2
  2. package/dist/lib/charts/graph.d.ts +9 -15
  3. package/dist/lib/charts/graph.js +79 -75
  4. package/dist/lib/charts/index.d.ts +4 -2
  5. package/dist/lib/charts/index.js +2 -1
  6. package/dist/lib/charts/nodeSymbol.d.ts +15 -0
  7. package/dist/lib/charts/nodeSymbol.js +27 -0
  8. package/dist/lib/charts/tree.d.ts +15 -0
  9. package/dist/lib/charts/tree.js +89 -0
  10. package/dist/lib/compat.css +162 -10
  11. package/dist/lib/components/AcAccordionItem.vue.d.ts +3 -1
  12. package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +35 -26
  13. package/dist/lib/components/AcAlert.vue.d.ts +1 -1
  14. package/dist/lib/components/AcBadge.vue.d.ts +1 -1
  15. package/dist/lib/components/AcBanner.vue.d.ts +1 -1
  16. package/dist/lib/components/AcCard.vue.d.ts +1 -1
  17. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +2 -2
  18. package/dist/lib/components/AcCellValue.vue.d.ts +1 -1
  19. package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +46 -43
  20. package/dist/lib/components/AcCheckList.vue.d.ts +1 -1
  21. package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +3 -3
  22. package/dist/lib/components/AcColorInput.vue.d.ts +4 -0
  23. package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +12 -2
  24. package/dist/lib/components/AcConfirmModal.vue.d.ts +1 -1
  25. package/dist/lib/components/AcDatePicker.vue.d.ts +3 -0
  26. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +12 -2
  27. package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
  28. package/dist/lib/components/AcFeatureCard.vue.d.ts +1 -1
  29. package/dist/lib/components/AcGraphChart.vue.d.ts +53 -3
  30. package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +401 -233
  31. package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +1 -1
  32. package/dist/lib/components/AcInput.vue.d.ts +2 -0
  33. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +18 -8
  34. package/dist/lib/components/AcList.js +5 -0
  35. package/dist/lib/components/AcList.vue.d.ts +56 -0
  36. package/dist/lib/components/AcList.vue_vue_type_script_setup_true_lang.js +74 -0
  37. package/dist/lib/components/AcListItem.js +5 -0
  38. package/dist/lib/components/AcListItem.vue.d.ts +53 -0
  39. package/dist/lib/components/AcListItem.vue_vue_type_script_setup_true_lang.js +105 -0
  40. package/dist/lib/components/AcMapChart.vue.d.ts +66 -3
  41. package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +403 -201
  42. package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +12 -8
  43. package/dist/lib/components/AcMonthPicker.js +5 -0
  44. package/dist/lib/components/AcMonthPicker.vue.d.ts +105 -0
  45. package/dist/lib/components/AcMonthPicker.vue_vue_type_script_setup_true_lang.js +605 -0
  46. package/dist/lib/components/AcNavbarItem.vue.d.ts +1 -1
  47. package/dist/lib/components/AcNumberInput.vue.d.ts +3 -0
  48. package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +11 -1
  49. package/dist/lib/components/AcResourceCard.vue.d.ts +1 -1
  50. package/dist/lib/components/AcSelect.vue.d.ts +3 -0
  51. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +241 -218
  52. package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +11 -7
  53. package/dist/lib/components/AcSideTabs.vue.d.ts +3 -1
  54. package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +53 -33
  55. package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +1 -1
  56. package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
  57. package/dist/lib/components/AcStatCard.vue.d.ts +1 -1
  58. package/dist/lib/components/AcSteps.vue.d.ts +3 -0
  59. package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +33 -29
  60. package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +1 -1
  61. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +83 -72
  62. package/dist/lib/components/AcTextarea.vue.d.ts +3 -0
  63. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +11 -1
  64. package/dist/lib/components/AcTimePicker.vue.d.ts +3 -0
  65. package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +12 -2
  66. package/dist/lib/components/AcToaster.vue.d.ts +3 -0
  67. package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +71 -68
  68. package/dist/lib/components/AcTreeChart.js +5 -0
  69. package/dist/lib/components/AcTreeChart.vue.d.ts +135 -0
  70. package/dist/lib/components/AcTreeChart.vue_vue_type_script_setup_true_lang.js +809 -0
  71. package/dist/lib/components/AcUsageCard.vue.d.ts +1 -1
  72. package/dist/lib/components/index.d.ts +5 -2
  73. package/dist/lib/composables/copyText.d.ts +5 -1
  74. package/dist/lib/composables/copyText.js +15 -3
  75. package/dist/lib/index.d.ts +3 -0
  76. package/dist/lib/index.js +85 -81
  77. package/dist/lib/theme.css +11 -0
  78. package/package.json +1 -1
@@ -6,30 +6,30 @@ var E = { class: "flex flex-col gap-3" }, D = ["for"], O = [
6
6
  "name",
7
7
  "value",
8
8
  "disabled"
9
- ], k = { class: "flex min-w-0 flex-col gap-1" }, A = { class: "font-normal" }, j = {
9
+ ], k = { class: "font-normal" }, A = {
10
10
  key: 0,
11
11
  class: "text-xs text-muted"
12
- }, M = {
12
+ }, j = {
13
13
  key: 0,
14
14
  class: "mt-1 text-base text-danger-strong",
15
15
  role: "alert"
16
- }, N = [
16
+ }, M = [
17
17
  "name",
18
18
  "checked",
19
19
  "indeterminate",
20
20
  "disabled",
21
21
  "aria-invalid",
22
22
  "aria-describedby"
23
- ], P = {
23
+ ], N = {
24
24
  key: 0,
25
- class: "flex min-w-0 flex-col gap-1"
26
- }, F = { key: 0 }, I = {
25
+ class: "font-medium"
26
+ }, P = {
27
27
  key: 1,
28
28
  class: "font-medium"
29
- }, L = {
29
+ }, F = {
30
30
  key: 2,
31
31
  class: "text-xs text-muted"
32
- }, R = ["id"], z = /*@__PURE__*/ o({
32
+ }, I = ["id"], L = /*@__PURE__*/ o({
33
33
  inheritAttrs: !1,
34
34
  __name: "AcCheckBox",
35
35
  props: /*@__PURE__*/ s({
@@ -58,75 +58,78 @@ var E = { class: "flex flex-col gap-3" }, D = ["for"], O = [
58
58
  }),
59
59
  emits: ["update:modelValue", "update:checked"],
60
60
  setup(o) {
61
- let s = o, z = y(o, "modelValue"), B = y(o, "checked"), V = b(), H = v(), U = _(), W = f(null), G = t(() => s.size === "small"), K = t(() => s.indeterminate && !B.value), q = t(() => s.options ? U : {
62
- class: U.class,
63
- style: U.style
64
- }), J = t(() => {
65
- let { class: e, style: t, ...n } = U;
66
- return s.label || V.label || n["aria-label"] || n["aria-labelledby"] ? n : {
61
+ let s = o, L = y(o, "modelValue"), R = y(o, "checked"), z = b(), B = v(), V = _(), H = f(null), U = t(() => s.size === "small"), W = t(() => s.indeterminate && !R.value), G = t(() => s.options ? V : {
62
+ class: V.class,
63
+ style: V.style
64
+ }), K = t(() => {
65
+ let { class: e, style: t, ...n } = V;
66
+ return s.label || z.label || n["aria-label"] || n["aria-labelledby"] ? n : {
67
67
  "aria-label": "Select",
68
68
  ...n
69
69
  };
70
- }), Y = t(() => G.value ? "size-[18px]" : "size-6"), X = t(() => [
70
+ }), q = t(() => !!(s.label || z.label || s.description)), J = t(() => U.value ? "size-[18px]" : "size-6"), Y = t(() => [
71
71
  "peer cursor-pointer appearance-none rounded-4 border border-muted/70 transition-colors duration-200 group-hover:enabled:not-checked:not-indeterminate:border-primary/60 checked:border-primary checked:bg-primary indeterminate:border-primary indeterminate:bg-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none disabled:cursor-not-allowed disabled:not-checked:not-indeterminate:bg-surface-sunken",
72
- Y.value,
73
- G.value ? "bg-background" : "bg-transparent"
74
- ]), Z = t(() => ["pointer-events-none absolute inset-0 m-auto text-white opacity-0 transition-opacity duration-150 motion-reduce:transition-none", G.value ? "size-3.5" : "size-5"]), Q = t(() => ["cursor-not-allowed", G.value ? "opacity-40" : "opacity-50"]);
75
- async function $(e) {
76
- B.value = e.target.checked, await l(), W.value && (W.value.checked = B.value, W.value.indeterminate = K.value);
72
+ J.value,
73
+ U.value ? "bg-background" : "bg-transparent"
74
+ ]), X = t(() => ["pointer-events-none absolute inset-0 m-auto text-white opacity-0 transition-opacity duration-150 motion-reduce:transition-none", U.value ? "size-3.5" : "size-5"]), Z = t(() => U.value ? "" : "pt-0.5"), Q = t(() => U.value ? "mt-px" : ""), $ = t(() => ["cursor-not-allowed", U.value ? "opacity-40" : "opacity-50"]);
75
+ async function ee(e) {
76
+ R.value = e.target.checked, await l(), H.value && (H.value.checked = R.value, H.value.indeterminate = W.value);
77
77
  }
78
78
  return (t, s) => o.options ? (d(), r("div", c({
79
79
  key: 0,
80
80
  "data-ac-ds": "",
81
81
  "data-testid": "ac-checkbox"
82
- }, q.value), [i("div", E, [(d(!0), r(e, null, p(o.options, (e, t) => (d(), r("label", {
82
+ }, G.value), [i("div", E, [(d(!0), r(e, null, p(o.options, (e, t) => (d(), r("label", {
83
83
  key: e.label,
84
- for: `${g(H)}-${t}`,
85
- class: u(["group inline-flex w-fit cursor-pointer items-start text-base text-heading select-none", [e.disabled && Q.value, G.value ? "gap-2.5" : "gap-3"]])
86
- }, [i("span", { class: u(["relative inline-flex shrink-0", Y.value]) }, [S(i("input", {
87
- id: `${g(H)}-${t}`,
88
- "onUpdate:modelValue": s[0] ||= (e) => z.value = e,
84
+ for: `${g(B)}-${t}`,
85
+ class: u(["group inline-flex w-fit cursor-pointer items-start text-base font-normal text-heading select-none", [e.disabled && $.value, U.value ? "gap-2.5" : "gap-3"]])
86
+ }, [i("span", { class: u(["relative inline-flex shrink-0", [J.value, Q.value]]) }, [S(i("input", {
87
+ id: `${g(B)}-${t}`,
88
+ "onUpdate:modelValue": s[0] ||= (e) => L.value = e,
89
89
  type: "checkbox",
90
90
  name: o.name,
91
91
  value: e.value,
92
92
  disabled: e.disabled,
93
- class: u(X.value)
94
- }, null, 10, O), [[x, z.value]]), a(g(w), {
95
- class: u([Z.value, "peer-checked:opacity-100"]),
93
+ class: u(Y.value)
94
+ }, null, 10, O), [[x, L.value]]), a(g(w), {
95
+ class: u([X.value, "peer-checked:opacity-100"]),
96
96
  "aria-hidden": "true"
97
- }, null, 8, ["class"])], 2), i("span", k, [i("span", A, h(e.label), 1), e.description ? (d(), r("span", j, h(e.description), 1)) : n("", !0)])], 10, D))), 128))]), o.errorMsg ? (d(), r("p", M, h(o.errorMsg), 1)) : n("", !0)], 16)) : (d(), r("div", c({
97
+ }, null, 8, ["class"])], 2), i("span", { class: u(["flex min-w-0 flex-col gap-1", Z.value]) }, [i("span", k, h(e.label), 1), e.description ? (d(), r("span", A, h(e.description), 1)) : n("", !0)], 2)], 10, D))), 128))]), o.errorMsg ? (d(), r("p", j, h(o.errorMsg), 1)) : n("", !0)], 16)) : (d(), r("div", c({
98
98
  key: 1,
99
99
  class: "inline-flex flex-col",
100
100
  "data-ac-ds": "",
101
101
  "data-testid": "ac-checkbox"
102
- }, q.value, { onClick: s[1] ||= C(() => {}, ["stop"]) }), [i("label", { class: u(["group inline-flex w-fit cursor-pointer items-start text-base text-heading select-none", [o.disabled && Q.value, G.value ? "gap-2.5" : "gap-3"]]) }, [i("span", { class: u(["relative inline-flex shrink-0", Y.value]) }, [
102
+ }, G.value, { onClick: s[1] ||= C(() => {}, ["stop"]) }), [i("label", { class: u(["group inline-flex w-fit cursor-pointer items-start text-base font-normal text-heading select-none", [o.disabled && $.value, U.value ? "gap-2.5" : "gap-3"]]) }, [i("span", { class: u(["relative inline-flex shrink-0", [J.value, q.value && Q.value]]) }, [
103
103
  i("input", c({
104
104
  ref_key: "single",
105
- ref: W,
105
+ ref: H,
106
106
  type: "checkbox",
107
107
  name: o.name,
108
- checked: B.value,
109
- indeterminate: K.value,
108
+ checked: R.value,
109
+ indeterminate: W.value,
110
110
  disabled: o.disabled,
111
111
  "aria-invalid": o.errorMsg ? !0 : void 0,
112
- "aria-describedby": o.errorMsg ? `${g(H)}-error` : void 0,
113
- class: X.value
114
- }, J.value, { onChange: $ }), null, 16, N),
112
+ "aria-describedby": o.errorMsg ? `${g(B)}-error` : void 0,
113
+ class: Y.value
114
+ }, K.value, { onChange: ee }), null, 16, M),
115
115
  a(g(w), {
116
- class: u([Z.value, "peer-checked:opacity-100"]),
116
+ class: u([X.value, "peer-checked:opacity-100"]),
117
117
  "aria-hidden": "true"
118
118
  }, null, 8, ["class"]),
119
119
  a(g(T), {
120
- class: u([Z.value, "peer-indeterminate:opacity-100"]),
120
+ class: u([X.value, "peer-indeterminate:opacity-100"]),
121
121
  "aria-hidden": "true"
122
122
  }, null, 8, ["class"])
123
- ], 2), o.label || t.$slots.label || o.description ? (d(), r("span", P, [t.$slots.label ? (d(), r("span", F, [m(t.$slots, "label")])) : o.label ? (d(), r("span", I, h(o.label), 1)) : n("", !0), o.description ? (d(), r("span", L, h(o.description), 1)) : n("", !0)])) : n("", !0)], 2), o.errorMsg ? (d(), r("p", {
123
+ ], 2), q.value ? (d(), r("span", {
124
+ key: 0,
125
+ class: u(["flex min-w-0 flex-col gap-1", Z.value])
126
+ }, [t.$slots.label ? (d(), r("span", N, [m(t.$slots, "label")])) : o.label ? (d(), r("span", P, h(o.label), 1)) : n("", !0), o.description ? (d(), r("span", F, h(o.description), 1)) : n("", !0)], 2)) : n("", !0)], 2), o.errorMsg ? (d(), r("p", {
124
127
  key: 0,
125
- id: `${g(H)}-error`,
128
+ id: `${g(B)}-error`,
126
129
  class: "mt-1 text-base text-danger-strong",
127
130
  role: "alert"
128
- }, h(o.errorMsg), 9, R)) : n("", !0)], 16));
131
+ }, h(o.errorMsg), 9, I)) : n("", !0)], 16));
129
132
  }
130
133
  });
131
134
  //#endregion
132
- export { z as default };
135
+ export { L as default };
@@ -28,8 +28,8 @@ type __VLS_Slots = {
28
28
  }) => unknown;
29
29
  };
30
30
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
31
- icon: Component;
32
31
  color: Tone | "muted";
32
+ icon: Component;
33
33
  size: "small" | "normal";
34
34
  items: (string | CheckListItem)[];
35
35
  muted: boolean;
@@ -66,8 +66,8 @@ var w = {
66
66
  return (n, _) => (d(), a("div", w, [o("div", { class: u(c.cards ? ["grid gap-3", !L.value && "sm:grid-cols-2"] : c.row ? "flex flex-row flex-wrap gap-x-6 gap-y-3" : "flex flex-col gap-3") }, [(d(!0), a(e, null, f(c.options, (e, f) => (d(), r(m(L.value ? "div" : "label"), {
67
67
  key: e.label,
68
68
  for: L.value ? void 0 : `${g(I)}-${f}`,
69
- class: u(["group flex cursor-pointer gap-3 text-base text-heading select-none", [
70
- c.cards ? "relative items-start rounded-14 border border-border bg-surface p-3 transition-[border-color,background-color,box-shadow] duration-200 ease-out 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-background motion-reduce:transition-none" : L.value ? "relative items-center" : "w-fit items-center",
69
+ class: u(["group flex cursor-pointer gap-3 text-base font-normal text-heading select-none", [
70
+ c.cards ? "relative items-start rounded-14 border border-border bg-surface px-4 py-3 transition-[border-color,background-color,box-shadow] duration-200 ease-out 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-background motion-reduce:transition-none" : L.value ? "relative items-center" : "w-fit items-center",
71
71
  e.disabled && ["cursor-not-allowed", c.cards ? "opacity-60" : "opacity-50"],
72
72
  L.value && "flex-wrap",
73
73
  c.cards && !e.disabled && "hover:border-primary/40 hover:bg-accent-hover has-checked:hover:border-primary has-checked:hover:bg-primary/5"
@@ -77,7 +77,7 @@ var w = {
77
77
  (d(), r(m(L.value ? "label" : "span"), {
78
78
  for: L.value ? `${g(I)}-${f}` : void 0,
79
79
  class: u(L.value ? [
80
- "flex min-w-0 flex-1 basis-[240px] gap-3 after:absolute after:inset-0",
80
+ "flex min-w-0 flex-1 basis-[240px] gap-3 font-normal after:absolute after:inset-0",
81
81
  c.cards ? "items-start" : "items-center",
82
82
  e.disabled ? "cursor-not-allowed" : "cursor-pointer"
83
83
  ] : "contents")
@@ -1,3 +1,4 @@
1
+ import type { HTMLAttributes } from "vue";
1
2
  export interface ColorPreset {
2
3
  /** Hex colour, `#rgb` or `#rrggbb`. */
3
4
  value: string;
@@ -7,6 +8,8 @@ export interface ColorPreset {
7
8
  export interface Props {
8
9
  /** Label above the field. Without one, pass `aria-label` so the field still has a name. */
9
10
  label?: string;
11
+ /** Classes for the label above the field, e.g. `@min-[401px]:sr-only` to hide it on wide layouts while screen readers still read it. */
12
+ labelClass?: HTMLAttributes["class"];
10
13
  /** Native `name` attribute of the hex field. */
11
14
  name?: string;
12
15
  /** Quick-pick swatches under the field: hex strings or `{ value, label }`. */
@@ -50,6 +53,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
50
53
  hint: string;
51
54
  readonly: boolean;
52
55
  errorMsg: string;
56
+ labelClass: string | false | Record<string, any> | import("vue").ClassValue[] | null;
53
57
  presets: (string | ColorPreset)[];
54
58
  swatchOnly: boolean;
55
59
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -40,6 +40,16 @@ var b = ["for"], x = {
40
40
  __name: "AcColorInput",
41
41
  props: /*@__PURE__*/ o({
42
42
  label: { default: "" },
43
+ labelClass: {
44
+ type: [
45
+ Boolean,
46
+ null,
47
+ String,
48
+ Object,
49
+ Array
50
+ ],
51
+ default: void 0
52
+ },
43
53
  name: { default: "" },
44
54
  presets: { default: () => [] },
45
55
  required: {
@@ -124,12 +134,12 @@ var b = ["for"], x = {
124
134
  a.label ? (u(), r("label", {
125
135
  key: 0,
126
136
  for: a.swatchOnly ? `${m(P)}-picker` : m(P),
127
- class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
137
+ class: c(["mb-2 flex items-center gap-1 text-base font-medium text-heading", a.labelClass])
128
138
  }, [
129
139
  i("span", null, p(a.label), 1),
130
140
  a.readonly ? (u(), r("span", x, "(read only)")) : n("", !0),
131
141
  a.required ? (u(), r("span", S, "*")) : n("", !0)
132
- ], 8, b)) : n("", !0),
142
+ ], 10, b)) : n("", !0),
133
143
  a.hint ? (u(), r("p", {
134
144
  key: 1,
135
145
  id: `${m(P)}-hint`,
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
39
39
  }>, {
40
40
  title: string;
41
41
  description: string;
42
- icon: Component;
43
42
  color: Tone;
43
+ icon: Component;
44
44
  loading: boolean;
45
45
  confirmLabel: string;
46
46
  confirmText: string;
@@ -10,6 +10,8 @@ export interface DatePickerPreset {
10
10
  export interface Props {
11
11
  /** Label above the field. Doubles as the accessible name of the trigger and the popover. */
12
12
  label?: string;
13
+ /** Classes for the label above the field, e.g. `@min-[401px]:sr-only` to hide it on wide layouts while screen readers still read it. */
14
+ labelClass?: HTMLAttributes["class"];
13
15
  /** Text shown in the field while there's no value. Defaults to "Choose date" (or "Choose duration"). */
14
16
  placeholder?: string;
15
17
  /** `date` for a calendar day (`YYYY-MM-DD`), `datetime` for an instant with hours and minutes (UTC ISO 8601), or `duration` for a Go/Kubernetes duration such as `26h30m`. */
@@ -94,6 +96,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
94
96
  placeholder: string;
95
97
  errorMsg: string;
96
98
  range: boolean;
99
+ labelClass: string | false | Record<string, any> | import("vue").ClassValue[] | null;
97
100
  clearable: boolean;
98
101
  presets: DatePickerPreset[];
99
102
  locale: string;
@@ -112,6 +112,16 @@ var be = ["for"], xe = { key: 0 }, Se = {
112
112
  __name: "AcDatePicker",
113
113
  props: /*@__PURE__*/ te({
114
114
  label: { default: "" },
115
+ labelClass: {
116
+ type: [
117
+ Boolean,
118
+ null,
119
+ String,
120
+ Object,
121
+ Array
122
+ ],
123
+ default: void 0
124
+ },
115
125
  placeholder: { default: "" },
116
126
  mode: { default: "date" },
117
127
  range: {
@@ -844,13 +854,13 @@ var be = ["for"], xe = { key: 0 }, Se = {
844
854
  key: 0,
845
855
  id: vt,
846
856
  for: d.inline ? void 0 : `${v(x)}-trigger`,
847
- class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
857
+ class: p(["mb-2 flex items-center gap-1 text-base font-medium text-heading", d.labelClass])
848
858
  }, [
849
859
  oe(e.$slots, "label-icon"),
850
860
  d.label ? (m(), c("span", xe, _(d.label), 1)) : s("", !0),
851
861
  oe(e.$slots, "label-extra"),
852
862
  d.required ? (m(), c("span", Se, "*")) : s("", !0)
853
- ], 8, be)) : s("", !0),
863
+ ], 10, be)) : s("", !0),
854
864
  d.hint ? (m(), c("p", {
855
865
  key: 1,
856
866
  id: St,
@@ -33,10 +33,10 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
33
33
  label: string;
34
34
  description: string;
35
35
  disabled: boolean;
36
- icon: Component;
37
36
  target: string;
38
37
  href: string;
39
38
  to: string | Record<string, unknown>;
39
+ icon: Component;
40
40
  danger: boolean;
41
41
  shortcut: string;
42
42
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -66,10 +66,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
66
66
  required: boolean;
67
67
  description: string;
68
68
  disabled: boolean;
69
- icon: Component;
70
69
  target: string;
71
70
  href: string;
72
71
  to: string | Record<string, unknown>;
72
+ icon: Component;
73
73
  status: string;
74
74
  subtitle: string;
75
75
  hoverable: boolean;
@@ -11,6 +11,8 @@ export interface GraphNode {
11
11
  label: string;
12
12
  /** Resource type, e.g. "Load balancer". Shown under the label, in the legend and in the tooltip. */
13
13
  kind?: string;
14
+ /** Second line under the name in place of the kind, e.g. `10.0.1.0/24` or "in public-a". The kind stays in the tooltip and legend. */
15
+ sublabel?: string;
14
16
  /** A Lucide icon component, or 1–3 characters of text, drawn in the node. Overrides `kindIcons`. */
15
17
  icon?: Component | string;
16
18
  /** Colours the ring. `warning` and `danger` also add a `!` badge. */
@@ -19,9 +21,26 @@ export interface GraphNode {
19
21
  statusText?: string;
20
22
  /** A sentence for the tooltip, e.g. the CIDR or the instance size. */
21
23
  description?: string;
22
- /** Nodes with the same group are drawn inside one labelled box, e.g. a subnet. */
24
+ /** Nodes with the same group are drawn inside one labelled box, e.g. a subnet. Name, colour and nesting come from the `groups` prop. */
23
25
  group?: string;
24
26
  }
27
+ /** Line pattern of a link. */
28
+ export type GraphLinkStyle = "solid" | "dashed" | "dotted";
29
+ /** What a selected or hovered node lights up: its direct links, or the whole path through it. */
30
+ export type GraphHighlight = "neighbors" | "path";
31
+ /** A labelled box around the nodes whose `group` is its `id`, e.g. a VPC or a subnet. */
32
+ export interface GraphGroup {
33
+ /** Matches `GraphNode.group`, and other groups' `parent`. */
34
+ id: string;
35
+ /** Name in the box's top-left corner. Defaults to the id. */
36
+ label?: string;
37
+ /** Short text after the name, e.g. the CIDR `10.0.0.0/16`. */
38
+ description?: string;
39
+ /** Tints the box's edge and fill, e.g. `success` for the network you own. Without it the box is grey. */
40
+ color?: ChartColor;
41
+ /** Id of the group this box sits inside, e.g. a subnet's VPC. A group needs at least one node inside it, directly or in a nested group. */
42
+ parent?: string;
43
+ }
25
44
  /** A connection between two nodes, drawn from `source` to `target`. */
26
45
  export interface GraphLink {
27
46
  /** Id of the node the link starts at. */
@@ -34,6 +53,12 @@ export interface GraphLink {
34
53
  status?: GraphStatus;
35
54
  /** Draws the line dashed, e.g. for a tunnel or a standby path. */
36
55
  dashed?: boolean;
56
+ /** Line pattern: `solid`, `dashed` or `dotted`. Wins over `dashed`. */
57
+ style?: GraphLinkStyle;
58
+ /** Colours the line by its kind of connection, e.g. `chart-2` for routes. `status` wins when set; a lit link keeps this colour. */
59
+ color?: ChartColor;
60
+ /** Draws or drops this link's arrowhead, whatever `arrows` says, e.g. `false` for a "contains" link. */
61
+ arrow?: boolean;
37
62
  }
38
63
  /** What the `tooltip` slot gets for the hovered node. */
39
64
  export interface GraphTooltipSlotProps {
@@ -49,6 +74,12 @@ export interface Props {
49
74
  nodes: GraphNode[];
50
75
  /** Connections between nodes by id. Links to an unknown id are skipped. */
51
76
  links?: GraphLink[];
77
+ /** Name, description, colour and nesting of the boxes drawn around grouped nodes. A node's `group` that isn't listed gets a grey box named after it. */
78
+ groups?: GraphGroup[];
79
+ /** What the selected (or hovered) node lights up: `neighbors`, its direct links; or `path`, everything upstream and downstream of it along the links' direction. */
80
+ highlight?: GraphHighlight;
81
+ /** Lights up a node's or link's connections, as `highlight` says, while the pointer is over it. */
82
+ highlightOnHover?: boolean;
52
83
  /** Layout direction: `LR` (left to right, like a network path) or `TB` (top to bottom, like a hierarchy). */
53
84
  direction?: "LR" | "TB";
54
85
  /** Plot height in px. The diagram is fitted inside it. */
@@ -85,12 +116,28 @@ type __VLS_Slots = {
85
116
  /** Replaces the tooltip body for the hovered node. */
86
117
  tooltip?: (props: GraphTooltipSlotProps) => unknown;
87
118
  };
119
+ declare function zoomIn(): void;
120
+ declare function zoomOut(): void;
121
+ declare function fit(): void;
122
+ /** Zooms to a percentage of life size about the middle of the plot, e.g. `zoomTo(100)`. Clamped to 25%–150%. */
123
+ declare function zoomTo(percent: number): void;
124
+ /**
125
+ * Selects a node and pans it to the middle of the plot, e.g. from a list of problems beside the diagram.
126
+ * Shows its kind again if the legend hid it. Resolves to `false` for an unknown id.
127
+ */
128
+ declare function focusNode(id: string): Promise<boolean>;
88
129
  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. */
130
+ /** Id of the selected node: it and its links (or its whole path, with `highlight="path"`) are highlighted and the rest fade. Clicking a node selects it; clicking it again, the background or pressing Escape clears it. */
90
131
  "selected"?: string | null;
91
132
  };
92
133
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
93
- declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
134
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
135
+ focusNode: typeof focusNode;
136
+ fit: typeof fit;
137
+ zoomIn: typeof zoomIn;
138
+ zoomOut: typeof zoomOut;
139
+ zoomTo: typeof zoomTo;
140
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
94
141
  "update:selected": (value: string | null) => any;
95
142
  "node-click": (node: GraphNode, event: MouseEvent) => any;
96
143
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
@@ -106,10 +153,13 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
106
153
  tooltip: boolean;
107
154
  loading: boolean;
108
155
  shape: "circle" | "square";
156
+ highlight: GraphHighlight;
109
157
  emptyText: string;
158
+ groups: GraphGroup[];
110
159
  links: GraphLink[];
111
160
  renderer: ChartRenderer;
112
161
  zoom: boolean;
162
+ highlightOnHover: boolean;
113
163
  kindColors: Record<string, ChartColor>;
114
164
  kindIcons: Record<string, Component | string>;
115
165
  arrows: boolean;