@ac-design/design-system 1.0.2 → 2.0.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.
- package/README.md +27 -18
- package/dist/lib/charts/ChartFrame.js +5 -0
- package/dist/lib/charts/ChartFrame.vue.d.ts +69 -0
- package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +168 -0
- package/dist/lib/charts/index.d.ts +7 -0
- package/dist/lib/charts/index.js +5 -0
- package/dist/lib/charts/shared.d.ts +60 -0
- package/dist/lib/charts/shared.js +114 -0
- package/dist/lib/charts/xy.d.ts +65 -0
- package/dist/lib/charts/xy.js +92 -0
- package/dist/lib/compat.css +1707 -1042
- package/dist/lib/components/AcAccordion.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcAccordionItem.vue.d.ts +1 -1
- package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/lib/components/AcAlert.vue.d.ts +1 -1
- package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +19 -25
- package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +19 -19
- package/dist/lib/components/AcAreaChart.js +5 -0
- package/dist/lib/components/AcAreaChart.vue.d.ts +44 -0
- package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +215 -0
- package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/lib/components/AcBadge.vue.d.ts +16 -7
- package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +59 -43
- package/dist/lib/components/AcBanner.vue.d.ts +1 -1
- package/dist/lib/components/AcBanner.vue_vue_type_script_setup_true_lang.js +30 -30
- package/dist/lib/components/AcBarChart.js +5 -0
- package/dist/lib/components/AcBarChart.vue.d.ts +43 -0
- package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +217 -0
- package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +27 -26
- package/dist/lib/components/AcBulkActionBar.js +5 -0
- package/dist/lib/components/AcBulkActionBar.vue.d.ts +43 -0
- package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +84 -0
- package/dist/lib/components/AcButton.vue.d.ts +3 -3
- package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +42 -34
- package/dist/lib/components/AcButtons.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcCard.vue.d.ts +10 -2
- package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +37 -11
- package/dist/lib/components/AcCellValue.vue.d.ts +4 -1
- package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +214 -179
- package/dist/lib/components/AcCheckBox.vue.d.ts +17 -3
- package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +126 -29
- package/dist/lib/components/AcCheckRadio.vue.d.ts +1 -1
- package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +33 -21
- package/dist/lib/components/AcCircularProgress.js +5 -0
- package/dist/lib/components/AcCircularProgress.vue.d.ts +44 -0
- package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +111 -0
- package/dist/lib/components/AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js +142 -167
- package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/lib/components/AcColorInput.js +5 -0
- package/dist/lib/components/AcColorInput.vue.d.ts +54 -0
- package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/lib/components/AcConfirmModal.js +5 -0
- package/dist/lib/components/AcConfirmModal.vue.d.ts +56 -0
- package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/lib/components/AcContentHeader.vue.d.ts +1 -1
- package/dist/lib/components/AcContentHeader.vue_vue_type_script_setup_true_lang.js +5 -4
- package/dist/lib/components/AcContentLayout.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcCopyButton.js +5 -0
- package/dist/lib/components/AcCopyButton.vue.d.ts +43 -0
- package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/lib/components/AcDatePicker.vue.d.ts +5 -5
- package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +204 -213
- package/dist/lib/components/AcDeleteModal.vue.d.ts +4 -4
- package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +37 -46
- package/dist/lib/components/AcDonutChart.js +5 -0
- package/dist/lib/components/AcDonutChart.vue.d.ts +73 -0
- package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +210 -0
- package/dist/lib/components/AcDropdown.vue.d.ts +1 -1
- package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
- package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/lib/components/AcEmptyState.vue.d.ts +4 -1
- package/dist/lib/components/AcEmptyState.vue_vue_type_script_setup_true_lang.js +50 -39
- package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +14 -13
- package/dist/lib/components/AcFileEditor.vue_vue_type_script_setup_true_lang.js +16 -16
- package/dist/lib/components/AcFileUpload.vue.d.ts +2 -2
- package/dist/lib/components/AcFileUpload.vue_vue_type_script_setup_true_lang.js +55 -53
- package/dist/lib/components/AcFontScale.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcFooter.js +5 -0
- package/dist/lib/components/AcFooter.vue.d.ts +37 -0
- package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +107 -0
- package/dist/lib/components/AcForm.vue.d.ts +3 -0
- package/dist/lib/components/AcForm.vue_vue_type_script_setup_true_lang.js +4 -2
- package/dist/lib/components/AcFormArray.vue.d.ts +2 -2
- package/dist/lib/components/AcFormArray.vue_vue_type_script_setup_true_lang.js +149 -147
- package/dist/lib/components/AcFormFooter.vue.d.ts +2 -2
- package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcFormSection.vue.d.ts +7 -0
- package/dist/lib/components/AcFormSection.vue_vue_type_script_setup_true_lang.js +31 -21
- package/dist/lib/components/AcHeader.vue.d.ts +3 -3
- package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +22 -22
- package/dist/lib/components/AcInfoTable.vue_vue_type_script_setup_true_lang.js +17 -13
- package/dist/lib/components/AcInput.vue.d.ts +3 -3
- package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +98 -87
- package/dist/lib/components/AcKbd.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcKeyValueInput.js +5 -0
- package/dist/lib/components/AcKeyValueInput.vue.d.ts +114 -0
- package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +320 -0
- package/dist/lib/components/AcLineChart.js +5 -0
- package/dist/lib/components/AcLineChart.vue.d.ts +38 -0
- package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/lib/components/AcLocaleSwitcher.js +5 -0
- package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +46 -0
- package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +23 -23
- package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/lib/components/AcNavbarItem.vue.d.ts +1 -1
- package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +22 -22
- package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +26 -26
- package/dist/lib/components/AcNumberInput.js +5 -0
- package/dist/lib/components/AcNumberInput.vue.d.ts +79 -0
- package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +251 -0
- package/dist/lib/components/AcPage.vue.d.ts +2 -2
- package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcPagination.vue.d.ts +20 -3
- package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +81 -53
- package/dist/lib/components/AcPreloader.vue.d.ts +1 -1
- package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/lib/components/AcProgress.vue.d.ts +2 -2
- package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcResourceCard.vue.d.ts +2 -2
- package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
- package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +9 -8
- package/dist/lib/components/AcSectionContent.vue.d.ts +2 -2
- package/dist/lib/components/AcSectionContent.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/lib/components/AcSegmentedControl.vue.d.ts +1 -1
- package/dist/lib/components/AcSegmentedControl.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcSelect.vue.d.ts +4 -4
- package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +230 -227
- package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +31 -31
- package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
- package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +37 -37
- package/dist/lib/components/AcSidebar.vue.d.ts +3 -3
- package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +75 -75
- package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +33 -32
- package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/lib/components/AcSkeleton.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/lib/components/AcSlider.vue.d.ts +1 -1
- package/dist/lib/components/AcSlider.vue_vue_type_script_setup_true_lang.js +174 -172
- package/dist/lib/components/AcStatCard.vue.d.ts +3 -3
- package/dist/lib/components/AcStatCard.vue_vue_type_script_setup_true_lang.js +90 -85
- package/dist/lib/components/AcStatusBar.vue.d.ts +1 -1
- package/dist/lib/components/AcStatusBar.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +28 -28
- package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +39 -34
- package/dist/lib/components/AcSwitchCard.js +5 -0
- package/dist/lib/components/AcSwitchCard.vue.d.ts +59 -0
- package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +119 -0
- package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +87 -87
- package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcTag.vue.d.ts +1 -1
- package/dist/lib/components/AcTag.vue_vue_type_script_setup_true_lang.js +22 -22
- package/dist/lib/components/AcTagInput.js +5 -0
- package/dist/lib/components/AcTagInput.vue.d.ts +74 -0
- package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +291 -0
- package/dist/lib/components/AcTextarea.vue.d.ts +3 -3
- package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +89 -64
- package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/lib/components/AcTimePicker.js +5 -0
- package/dist/lib/components/AcTimePicker.vue.d.ts +65 -0
- package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +463 -0
- package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +65 -71
- package/dist/lib/components/AcTooltip.vue.d.ts +1 -1
- package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +77 -67
- package/dist/lib/components/AcUsageCard.vue_vue_type_script_setup_true_lang.js +27 -27
- package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +111 -103
- package/dist/lib/components/index.d.ts +14 -2
- package/dist/lib/components/status.d.ts +26 -0
- package/dist/lib/components/status.js +110 -0
- package/dist/lib/composables/copyText.d.ts +2 -1
- package/dist/lib/composables/copyText.js +2 -2
- package/dist/lib/composables/useApiPagination.d.ts +55 -0
- package/dist/lib/composables/useApiPagination.js +58 -0
- package/dist/lib/composables/useBulkSelection.d.ts +44 -0
- package/dist/lib/composables/useBulkSelection.js +41 -0
- package/dist/lib/composables/useFormValidation.d.ts +65 -0
- package/dist/lib/composables/useFormValidation.js +148 -0
- package/dist/lib/composables/useTablePagination.d.ts +49 -0
- package/dist/lib/composables/useTablePagination.js +41 -0
- package/dist/lib/editor/theme.js +65 -62
- package/dist/lib/index.d.ts +14 -0
- package/dist/lib/index.js +95 -78
- package/dist/lib/theme.css +391 -272
- package/package.json +11 -4
|
@@ -23,16 +23,16 @@ var d = { class: "max-w-80 text-base text-muted" }, f = /*@__PURE__*/ o({
|
|
|
23
23
|
}, [i("div", s(f.$attrs, {
|
|
24
24
|
role: "status",
|
|
25
25
|
"aria-live": "polite",
|
|
26
|
-
class: ["flex flex-col items-center justify-center gap-
|
|
26
|
+
class: ["flex flex-col items-center justify-center gap-4 px-4 text-center", o.fullPage ? "fixed inset-0 z-[80] bg-background" : "size-full"],
|
|
27
27
|
style: o.fullPage ? void 0 : { minHeight: o.minHeight },
|
|
28
28
|
"data-ac-ds": "",
|
|
29
29
|
"data-testid": "ac-preloader"
|
|
30
30
|
}), [o.showSpinner ? (c(), n(e, {
|
|
31
31
|
key: 0,
|
|
32
|
-
size: "normal",
|
|
32
|
+
size: o.fullPage ? "large" : "normal",
|
|
33
33
|
class: "text-primary",
|
|
34
34
|
label: ""
|
|
35
|
-
})) : r("", !0), i("div", d, [l(f.$slots, "default", {}, () => [a(u(o.message), 1)])])], 16)], 8, ["disabled"]));
|
|
35
|
+
}, null, 8, ["size"])) : r("", !0), i("div", d, [l(f.$slots, "default", {}, () => [a(u(o.message), 1)])])], 16)], 8, ["disabled"]));
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
//#endregion
|
|
@@ -23,9 +23,9 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
|
|
|
23
23
|
color: Tone | "auto";
|
|
24
24
|
max: number;
|
|
25
25
|
size: "small" | "normal" | "large";
|
|
26
|
-
showValue: boolean;
|
|
27
|
-
valueText: string;
|
|
28
26
|
indeterminate: boolean;
|
|
27
|
+
valueText: string;
|
|
28
|
+
showValue: boolean;
|
|
29
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
declare const _default: typeof __VLS_export;
|
|
31
31
|
export default _default;
|
|
@@ -6,7 +6,7 @@ var d = {
|
|
|
6
6
|
"data-testid": "ac-progress"
|
|
7
7
|
}, f = {
|
|
8
8
|
key: 0,
|
|
9
|
-
class: "mb-
|
|
9
|
+
class: "mb-2 flex items-baseline justify-between gap-3 text-base"
|
|
10
10
|
}, p = ["id"], m = [
|
|
11
11
|
"aria-labelledby",
|
|
12
12
|
"aria-label",
|
|
@@ -47,10 +47,10 @@ var d = {
|
|
|
47
47
|
return (e, u) => (s(), n("div", d, [S.value ? (s(), n("div", f, [i.label ? (s(), n("span", {
|
|
48
48
|
key: 0,
|
|
49
49
|
id: `${l(v)}-label`,
|
|
50
|
-
class: "min-w-0 truncate font-medium text-
|
|
50
|
+
class: "min-w-0 truncate font-medium text-heading"
|
|
51
51
|
}, c(i.label), 9, p)) : t("", !0), i.showValue && !i.indeterminate ? (s(), n("span", {
|
|
52
52
|
key: 1,
|
|
53
|
-
class: a(["ml-auto shrink-0 tabular-nums", i.color === "auto" && b.value !== "primary" ? b.value === "danger" ? "text-
|
|
53
|
+
class: a(["ml-auto shrink-0 text-xs tabular-nums", i.color === "auto" && b.value !== "primary" ? b.value === "danger" ? "font-medium text-danger-strong" : "font-medium text-warning-strong" : "text-muted"]),
|
|
54
54
|
"aria-hidden": "true"
|
|
55
55
|
}, c(x.value), 3)) : t("", !0)])) : t("", !0), r("div", {
|
|
56
56
|
role: "progressbar",
|
|
@@ -61,7 +61,7 @@ var d = {
|
|
|
61
61
|
"aria-valuenow": i.indeterminate ? void 0 : Math.min(i.max, Math.max(0, i.value)),
|
|
62
62
|
"aria-valuetext": i.indeterminate ? void 0 : x.value,
|
|
63
63
|
"aria-busy": i.indeterminate || void 0,
|
|
64
|
-
class: a(["relative w-full overflow-hidden rounded-full bg-
|
|
64
|
+
class: a(["relative w-full overflow-hidden rounded-full bg-surface-sunken", _[i.size]])
|
|
65
65
|
}, [i.indeterminate ? (s(), n("div", {
|
|
66
66
|
key: 0,
|
|
67
67
|
class: a(["ac-progress-indeterminate absolute inset-y-0 left-0 w-2/5 rounded-full motion-reduce:w-full motion-reduce:opacity-40", g[b.value]])
|
|
@@ -17,7 +17,7 @@ export interface ResourceDetail {
|
|
|
17
17
|
value?: string | number;
|
|
18
18
|
/** Slot name for a custom value: `#detail-<key>`. */
|
|
19
19
|
key?: string;
|
|
20
|
-
/** Sets the value in
|
|
20
|
+
/** Sets the value in the monospace font, for versions, IPs and IDs. */
|
|
21
21
|
mono?: boolean;
|
|
22
22
|
}
|
|
23
23
|
export interface Props {
|
|
@@ -43,7 +43,7 @@ export interface Props {
|
|
|
43
43
|
details?: ResourceDetail[];
|
|
44
44
|
/** Columns of the details grid. Three and four drop to two on phones. */
|
|
45
45
|
columns?: 1 | 2 | 3 | 4;
|
|
46
|
-
/** Sets `name` in
|
|
46
|
+
/** Sets `name` in the monospace font, for Kubernetes object names. */
|
|
47
47
|
mono?: boolean;
|
|
48
48
|
/** Shows a skeleton card while the resource loads. */
|
|
49
49
|
loading?: boolean;
|
|
@@ -5,19 +5,19 @@ import r from "./AcTag.js";
|
|
|
5
5
|
import i from "./AcDropdown.js";
|
|
6
6
|
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createTextVNode as f, createVNode as p, defineComponent as m, getCurrentInstance as h, mergeProps as g, normalizeClass as _, openBlock as v, renderList as y, renderSlot as b, resolveDynamicComponent as x, toDisplayString as S, unref as C, useId as w, useSlots as T, withCtx as E } from "vue";
|
|
7
7
|
//#region src/lib/components/AcResourceCard.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var D = ["aria-labelledby", "aria-disabled"], O = { class: "flex min-w-0 items-start gap-3 p-
|
|
8
|
+
var D = ["aria-labelledby", "aria-disabled"], O = { class: "flex min-w-0 items-start gap-3 p-5" }, k = ["aria-hidden"], A = ["src", "alt"], j = { class: "min-w-0 flex-1" }, M = ["id", "title"], N = ["title"], P = {
|
|
9
9
|
key: 1,
|
|
10
|
-
class: "mt-2 flex flex-wrap items-center gap-1.5"
|
|
10
|
+
class: "mt-2.5 flex flex-wrap items-center gap-1.5"
|
|
11
11
|
}, F = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "relative z-10 -mt-1 -mr-1.5 flex shrink-0 items-center gap-1.5"
|
|
14
|
-
}, I = { class: "truncate text-xs text-muted" }, L = { class: "mt-
|
|
14
|
+
}, I = { class: "truncate text-xs font-medium text-muted" }, L = { class: "mt-1 flex min-w-0 flex-wrap items-center gap-1.5 text-base font-semibold text-heading" }, R = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "text-muted",
|
|
17
17
|
"aria-label": "Not set"
|
|
18
18
|
}, z = {
|
|
19
19
|
key: 2,
|
|
20
|
-
class: "relative z-10 mt-auto flex min-w-0 flex-wrap items-center justify-between gap-x-3 gap-y-1.5 border-t border-border
|
|
20
|
+
class: "relative z-10 mt-auto flex min-w-0 flex-wrap items-center justify-between gap-x-3 gap-y-1.5 border-t border-border px-5 py-3 text-xs text-muted"
|
|
21
21
|
}, B = /*@__PURE__*/ m({
|
|
22
22
|
__name: "AcResourceCard",
|
|
23
23
|
props: {
|
|
@@ -89,7 +89,7 @@ var D = ["aria-labelledby", "aria-disabled"], O = { class: "flex min-w-0 items-s
|
|
|
89
89
|
"data-testid": "ac-resource-card"
|
|
90
90
|
}, null, 8, ["label"])) : (v(), l("article", {
|
|
91
91
|
key: 1,
|
|
92
|
-
class: _(["group relative flex min-w-0 flex-col rounded-
|
|
92
|
+
class: _(["group relative flex min-w-0 flex-col rounded-14 border border-border bg-surface 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", [(Y.value || X()) && "hover:-translate-y-0.5 hover:border-primary/30 hover:bg-accent-hover/60 hover:shadow-card motion-reduce:hover:translate-y-0", m.disabled && "opacity-60"]]),
|
|
93
93
|
"aria-labelledby": `${C(q)}-name`,
|
|
94
94
|
"aria-disabled": m.disabled || void 0,
|
|
95
95
|
"data-ac-ds": "",
|
|
@@ -98,7 +98,7 @@ var D = ["aria-labelledby", "aria-disabled"], O = { class: "flex min-w-0 items-s
|
|
|
98
98
|
u("div", O, [
|
|
99
99
|
U.logo || m.logo || m.icon ? (v(), l("span", {
|
|
100
100
|
key: 0,
|
|
101
|
-
class: _(["inline-flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-
|
|
101
|
+
class: _(["inline-flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-10 border", m.logo ? "border-border bg-surface-muted p-1.5" : "border-primary/25 bg-primary/10 text-primary-strong [&_svg]:size-5"]),
|
|
102
102
|
"aria-hidden": m.logo && m.logoAlt ? void 0 : "true"
|
|
103
103
|
}, [b(o.$slots, "logo", {}, () => [m.logo ? (v(), l("img", {
|
|
104
104
|
key: 0,
|
|
@@ -109,14 +109,14 @@ var D = ["aria-labelledby", "aria-disabled"], O = { class: "flex min-w-0 items-s
|
|
|
109
109
|
u("div", j, [
|
|
110
110
|
u("h3", {
|
|
111
111
|
id: `${C(q)}-name`,
|
|
112
|
-
class: _(["truncate text-lg leading-6 font-semibold tracking-
|
|
112
|
+
class: _(["truncate text-lg leading-6 font-semibold tracking-tight text-heading", m.mono ? "font-mono text-base" : "font-heading"]),
|
|
113
113
|
title: m.name
|
|
114
114
|
}, [Y.value ? (v(), s(x(Y.value.is), g({ key: 0 }, {
|
|
115
115
|
...Y.value,
|
|
116
116
|
is: void 0
|
|
117
117
|
}, {
|
|
118
118
|
"data-ac-card-link": "",
|
|
119
|
-
class: "outline-none after:absolute after:inset-0 after:rounded-
|
|
119
|
+
class: "outline-none after:absolute after:inset-0 after:rounded-14",
|
|
120
120
|
onClick: Q
|
|
121
121
|
}), {
|
|
122
122
|
default: E(() => [f(S(m.name), 1)]),
|
|
@@ -125,12 +125,12 @@ var D = ["aria-labelledby", "aria-disabled"], O = { class: "flex min-w-0 items-s
|
|
|
125
125
|
key: 1,
|
|
126
126
|
type: "button",
|
|
127
127
|
"data-ac-card-link": "",
|
|
128
|
-
class: "max-w-full cursor-pointer truncate text-left outline-none after:absolute after:inset-0 after:rounded-
|
|
128
|
+
class: "max-w-full cursor-pointer truncate text-left outline-none after:absolute after:inset-0 after:rounded-14",
|
|
129
129
|
onClick: Q
|
|
130
130
|
}, S(m.name), 1)) : (v(), l(a, { key: 2 }, [f(S(m.name), 1)], 64))], 10, M),
|
|
131
131
|
m.subtitle ? (v(), l("p", {
|
|
132
132
|
key: 0,
|
|
133
|
-
class: "line-clamp-2 text-xs text-muted",
|
|
133
|
+
class: "mt-0.5 line-clamp-2 text-xs text-muted",
|
|
134
134
|
title: m.subtitle
|
|
135
135
|
}, S(m.subtitle), 9, N)) : c("", !0),
|
|
136
136
|
U.tags || m.status || m.statusLoading || J.value.length ? (v(), l("div", P, [b(o.$slots, "tags", {}, () => [m.statusLoading ? (v(), s(t, {
|
|
@@ -183,17 +183,17 @@ var D = ["aria-labelledby", "aria-disabled"], O = { class: "flex min-w-0 items-s
|
|
|
183
183
|
]),
|
|
184
184
|
m.details.length ? (v(), l("dl", {
|
|
185
185
|
key: 0,
|
|
186
|
-
class: _(["grid gap-x-
|
|
186
|
+
class: _(["grid gap-x-6 gap-y-4 border-t border-border px-5 py-4", W[m.columns]])
|
|
187
187
|
}, [(v(!0), l(a, null, y(m.details, (e, t) => (v(), l("div", {
|
|
188
188
|
key: e.key ?? `${e.label}${t}`,
|
|
189
189
|
class: "min-w-0"
|
|
190
190
|
}, [u("dt", I, S(e.label), 1), u("dd", L, [b(o.$slots, `detail-${e.key}`, { detail: e }, () => [Z(e.value) ? (v(), l("span", R, "—")) : (v(), l("span", {
|
|
191
191
|
key: 1,
|
|
192
|
-
class: _(["min-w-0 break-words", e.mono && "font-mono text-
|
|
192
|
+
class: _(["min-w-0 break-words", e.mono && "font-mono text-xs"])
|
|
193
193
|
}, S(e.value), 3))])])]))), 128))], 2)) : c("", !0),
|
|
194
194
|
U.default ? (v(), l("div", {
|
|
195
195
|
key: 1,
|
|
196
|
-
class: _(["border-t border-border
|
|
196
|
+
class: _(["border-t border-border px-5 py-4 text-base text-body", m.details.length > 0 && "border-t-0 pt-0"])
|
|
197
197
|
}, [b(o.$slots, "default")], 2)) : c("", !0),
|
|
198
198
|
U.footer ? (v(), l("div", z, [b(o.$slots, "footer")])) : c("", !0)
|
|
199
199
|
], 10, D));
|
|
@@ -7,7 +7,7 @@ export interface Props {
|
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
/** Milliseconds to wait after typing before emitting `search`. `0` emits on every key. */
|
|
9
9
|
debounce?: number;
|
|
10
|
-
/** `small`
|
|
10
|
+
/** `small` 36px or `normal` 40px tall. */
|
|
11
11
|
size?: "small" | "normal";
|
|
12
12
|
/** Options for a filter select attached to the right of the field, such as cluster status. Bind the choice with `v-model:filter`. No options, no filter. */
|
|
13
13
|
filterOptions?: SearchFilterOption[];
|
|
@@ -2,6 +2,7 @@ import { Fragment as e, computed as t, createCommentVNode as n, createElementBlo
|
|
|
2
2
|
import { ChevronDown as x, Search as S, X as C } from "@lucide/vue";
|
|
3
3
|
//#region src/lib/components/AcSearchBar.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var w = {
|
|
5
|
+
role: "search",
|
|
5
6
|
class: "flex w-full",
|
|
6
7
|
"data-ac-ds": "",
|
|
7
8
|
"data-testid": "ac-search-bar"
|
|
@@ -13,7 +14,7 @@ var w = {
|
|
|
13
14
|
props: /*@__PURE__*/ s({
|
|
14
15
|
placeholder: { default: "Search" },
|
|
15
16
|
debounce: { default: 300 },
|
|
16
|
-
size: { default: "
|
|
17
|
+
size: { default: "normal" },
|
|
17
18
|
filterOptions: { default: () => [] },
|
|
18
19
|
filterLabel: { default: "Filter" }
|
|
19
20
|
}, {
|
|
@@ -24,7 +25,7 @@ var w = {
|
|
|
24
25
|
}),
|
|
25
26
|
emits: /*@__PURE__*/ s(["search"], ["update:modelValue", "update:filter"]),
|
|
26
27
|
setup(o, { emit: s }) {
|
|
27
|
-
let A = o, j = h(o, "modelValue"), M = h(o, "filter"), N = s, P = d(null), F = t(() => A.filterOptions.length > 0), I = t(() => A.size === "small" ? "h-
|
|
28
|
+
let A = o, j = h(o, "modelValue"), M = h(o, "filter"), N = s, P = d(null), F = t(() => A.filterOptions.length > 0), I = t(() => A.size === "small" ? "h-9" : "h-10"), L;
|
|
28
29
|
function R() {
|
|
29
30
|
j.value = "", P.value?.focus();
|
|
30
31
|
}
|
|
@@ -34,7 +35,7 @@ var w = {
|
|
|
34
35
|
e.length && !e.some((e) => e.value === M.value) && (M.value = e[0].value);
|
|
35
36
|
}, { immediate: !0 }), l(() => clearTimeout(L)), (t, s) => (u(), r("div", w, [i("div", T, [
|
|
36
37
|
a(m(S), {
|
|
37
|
-
class: "pointer-events-none absolute top-1/2 left-
|
|
38
|
+
class: "pointer-events-none absolute top-1/2 left-3.5 z-20 size-4 -translate-y-1/2 text-muted",
|
|
38
39
|
"aria-hidden": "true"
|
|
39
40
|
}),
|
|
40
41
|
y(i("input", {
|
|
@@ -44,30 +45,30 @@ var w = {
|
|
|
44
45
|
type: "search",
|
|
45
46
|
placeholder: o.placeholder,
|
|
46
47
|
"aria-label": o.placeholder,
|
|
47
|
-
class: c(["relative block w-full border border-border bg-
|
|
48
|
+
class: c(["relative block w-full border border-border bg-background pr-10 pl-10 text-base font-normal text-heading transition-[color,background-color,border-color,box-shadow] duration-200 outline-none placeholder:text-muted/80 hover:border-accent-active focus:z-10 focus:focus-ring [&::-webkit-search-cancel-button]:hidden", [I.value, F.value ? "rounded-l-10" : "rounded-10"]]),
|
|
48
49
|
onKeydown: s[1] ||= b((e) => j.value && (R(), e.stopPropagation()), ["esc"])
|
|
49
50
|
}, null, 42, E), [[_, j.value]]),
|
|
50
51
|
j.value ? (u(), r("button", {
|
|
51
52
|
key: 0,
|
|
52
53
|
type: "button",
|
|
53
|
-
class: "absolute top-1/2 right-1.5 z-20 inline-flex size-
|
|
54
|
+
class: "absolute top-1/2 right-1.5 z-20 inline-flex size-7 -translate-y-1/2 cursor-pointer items-center justify-center rounded-8 text-muted transition-colors hover:bg-surface-sunken hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
|
|
54
55
|
"aria-label": "Clear search",
|
|
55
56
|
onClick: R
|
|
56
57
|
}, [a(m(C), {
|
|
57
|
-
class: "size-
|
|
58
|
+
class: "size-4",
|
|
58
59
|
"aria-hidden": "true"
|
|
59
60
|
})])) : n("", !0)
|
|
60
61
|
]), F.value ? (u(), r("div", D, [y(i("select", {
|
|
61
62
|
"onUpdate:modelValue": s[2] ||= (e) => M.value = e,
|
|
62
63
|
"aria-label": o.filterLabel,
|
|
63
|
-
class: c(["relative block max-w-48 cursor-pointer appearance-none truncate rounded-r-
|
|
64
|
+
class: c(["relative block max-w-48 cursor-pointer appearance-none truncate rounded-r-10 border border-border bg-surface pr-9 pl-4 text-base font-medium text-heading transition-[color,background-color,border-color,box-shadow] duration-200 outline-none hover:bg-surface-sunken/70 focus:z-10 focus:focus-ring", I.value]),
|
|
64
65
|
"data-ac-ds": "",
|
|
65
66
|
"data-testid": "ac-search-bar-filter"
|
|
66
67
|
}, [(u(!0), r(e, null, f(o.filterOptions, (e) => (u(), r("option", {
|
|
67
68
|
key: e.value,
|
|
68
69
|
value: e.value
|
|
69
70
|
}, p(e.label), 9, k))), 128))], 10, O), [[g, M.value]]), a(m(x), {
|
|
70
|
-
class: "pointer-events-none absolute top-1/2 right-
|
|
71
|
+
class: "pointer-events-none absolute top-1/2 right-3 z-20 size-4 -translate-y-1/2 text-muted",
|
|
71
72
|
"aria-hidden": "true"
|
|
72
73
|
})])) : n("", !0)]));
|
|
73
74
|
}
|
|
@@ -11,7 +11,7 @@ export interface Props {
|
|
|
11
11
|
padded?: boolean;
|
|
12
12
|
/** Drops the card surface so the section blends into its parent. */
|
|
13
13
|
plain?: boolean;
|
|
14
|
-
/** `danger` draws a red border and title, for irreversible actions like deleting a database. */
|
|
14
|
+
/** `danger` draws a red-tinted border and title, for irreversible actions like deleting a database. */
|
|
15
15
|
tone?: "default" | "danger";
|
|
16
16
|
}
|
|
17
17
|
type __VLS_Props = Props;
|
|
@@ -41,9 +41,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
41
41
|
tone: "default" | "danger";
|
|
42
42
|
subtitle: string;
|
|
43
43
|
padded: boolean;
|
|
44
|
+
plain: boolean;
|
|
44
45
|
collapsible: boolean;
|
|
45
46
|
backButton: boolean;
|
|
46
|
-
plain: boolean;
|
|
47
47
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
48
48
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
49
49
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, createVNode as r, defineComponent as i, mergeModels as a, normalizeClass as o, openBlock as s, renderSlot as c, toDisplayString as l, unref as u, useId as d, useModel as f, vShow as p, withDirectives as m } from "vue";
|
|
2
2
|
import { ArrowLeft as h, ChevronDown as g } from "@lucide/vue";
|
|
3
3
|
//#region src/lib/components/AcSectionContent.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var _ = { class: "flex min-w-0 items-center gap-
|
|
4
|
+
var _ = { class: "flex min-w-0 items-center gap-3" }, v = { class: "min-w-0" }, y = { class: "flex items-center gap-2" }, b = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "mt-0.5 truncate text-xs text-muted"
|
|
7
7
|
}, x = { class: "flex shrink-0 items-center gap-2" }, S = [
|
|
@@ -41,32 +41,32 @@ var _ = { class: "flex min-w-0 items-center gap-2.5" }, v = { class: "min-w-0" }
|
|
|
41
41
|
setup(i, { emit: a }) {
|
|
42
42
|
let w = a, T = f(i, "open"), E = d();
|
|
43
43
|
return (a, d) => (s(), t("section", {
|
|
44
|
-
class: o(!i.plain && ["rounded-
|
|
44
|
+
class: o(!i.plain && ["rounded-14 border bg-surface text-body", i.tone === "danger" ? "border-danger/25" : "border-border"]),
|
|
45
45
|
"data-ac-ds": "",
|
|
46
46
|
"data-testid": "ac-section-content"
|
|
47
|
-
}, [n("header", { class: o(["flex items-center justify-between gap-4", [i.plain ? "mb-
|
|
47
|
+
}, [n("header", { class: o(["flex items-center justify-between gap-4", [i.plain ? "mb-4" : ["px-6", T.value ? "pt-5 pb-3" : "py-4"], !i.plain && T.value && (i.tone === "danger" ? "border-b border-danger/25" : "border-b border-border")]]) }, [n("div", _, [i.backButton ? (s(), t("button", {
|
|
48
48
|
key: 0,
|
|
49
49
|
type: "button",
|
|
50
|
-
class: "inline-flex size-
|
|
50
|
+
class: "-ml-1.5 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-10 text-muted transition-colors duration-200 hover:bg-surface-sunken hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none",
|
|
51
51
|
"aria-label": "Back",
|
|
52
52
|
onClick: d[0] ||= (e) => w("back")
|
|
53
53
|
}, [r(u(h), {
|
|
54
54
|
class: "size-4",
|
|
55
55
|
"aria-hidden": "true"
|
|
56
|
-
})])) : e("", !0), n("div", v, [c(a.$slots, "header", {}, () => [n("div", y, [n("h5", { class: o(["truncate", i.tone === "danger"
|
|
56
|
+
})])) : e("", !0), n("div", v, [c(a.$slots, "header", {}, () => [n("div", y, [n("h5", { class: o(["truncate font-heading text-lg leading-tight font-semibold tracking-tight", i.tone === "danger" ? "text-danger-strong" : "text-heading"]) }, l(i.title), 3), c(a.$slots, "title-extra")]), i.subtitle ? (s(), t("p", b, l(i.subtitle), 1)) : e("", !0)])])]), n("div", x, [c(a.$slots, "actions"), i.collapsible ? (s(), t("button", {
|
|
57
57
|
key: 0,
|
|
58
58
|
type: "button",
|
|
59
|
-
class: "inline-flex size-
|
|
59
|
+
class: "inline-flex size-8 cursor-pointer items-center justify-center rounded-10 border border-border bg-surface text-heading transition-colors duration-200 hover:bg-surface-sunken/70 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none",
|
|
60
60
|
"aria-expanded": T.value,
|
|
61
61
|
"aria-controls": u(E),
|
|
62
62
|
"aria-label": T.value ? "Collapse section" : "Expand section",
|
|
63
63
|
onClick: d[1] ||= (e) => T.value = !T.value
|
|
64
64
|
}, [r(u(g), {
|
|
65
|
-
class: o(["size-4 transition-transform duration-200", !T.value && "-rotate-90"]),
|
|
65
|
+
class: o(["size-4 transition-transform duration-200 motion-reduce:transition-none", !T.value && "-rotate-90"]),
|
|
66
66
|
"aria-hidden": "true"
|
|
67
67
|
}, null, 8, ["class"])], 8, S)) : e("", !0)])], 2), m(n("div", {
|
|
68
68
|
id: u(E),
|
|
69
|
-
class: o(i.plain ? void 0 : i.padded ? "p-
|
|
69
|
+
class: o(i.plain ? void 0 : i.padded ? "p-6" : "overflow-hidden rounded-b-14")
|
|
70
70
|
}, [c(a.$slots, "default")], 10, C), [[p, T.value]])], 2));
|
|
71
71
|
}
|
|
72
72
|
});
|
|
@@ -11,7 +11,7 @@ export interface Props<T extends string | number> {
|
|
|
11
11
|
options: (SegmentedOption<T> | T)[];
|
|
12
12
|
/** Accessible name for the group, e.g. "Chart range". Required when nothing nearby labels it. */
|
|
13
13
|
label?: string;
|
|
14
|
-
/** Height: `small`
|
|
14
|
+
/** Height: `small` 36px (toolbars, cards) or `normal` 40px, matching fields of the same size. */
|
|
15
15
|
size?: "small" | "normal";
|
|
16
16
|
/** Shows only the icons; each option's `label` becomes its accessible name and hover title. */
|
|
17
17
|
iconOnly?: boolean;
|
|
@@ -69,7 +69,7 @@ var m = ["aria-label", "aria-disabled"], h = [
|
|
|
69
69
|
role: "radiogroup",
|
|
70
70
|
"aria-label": a.label || void 0,
|
|
71
71
|
"aria-disabled": a.disabled || void 0,
|
|
72
|
-
class: s(["items-center gap-
|
|
72
|
+
class: s(["items-center gap-1 rounded-10 bg-surface-sunken p-1", [a.block ? "flex w-full" : "inline-flex max-w-full", a.disabled && "opacity-50"]]),
|
|
73
73
|
"data-ac-ds": "",
|
|
74
74
|
"data-testid": "ac-segmented-control"
|
|
75
75
|
}, [(c(!0), i(e, null, u(x.value, (e, t) => (c(), i("button", {
|
|
@@ -84,12 +84,12 @@ var m = ["aria-label", "aria-disabled"], h = [
|
|
|
84
84
|
title: a.iconOnly ? e.label : void 0,
|
|
85
85
|
tabindex: t === S.value ? 0 : -1,
|
|
86
86
|
disabled: a.disabled || e.disabled,
|
|
87
|
-
class: s(["inline-flex min-w-0 cursor-pointer items-center justify-center gap-1.5 rounded-
|
|
88
|
-
a.size === "small" ? "h-
|
|
87
|
+
class: s(["inline-flex min-w-0 cursor-pointer items-center justify-center gap-1.5 rounded-8 text-base font-medium whitespace-nowrap transition-[background-color,color,box-shadow] duration-200 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset focus-visible:outline-none disabled:cursor-not-allowed [&_svg]:size-4", [
|
|
88
|
+
a.size === "small" ? "h-7" : "h-8",
|
|
89
89
|
a.iconOnly ? a.size === "small" ? "w-7" : "w-8" : a.size === "small" ? "px-2.5" : "px-3",
|
|
90
90
|
a.block && "flex-1",
|
|
91
91
|
e.disabled && !a.disabled && "opacity-50",
|
|
92
|
-
e.value === v.value ? "bg-surface text-heading shadow-sm
|
|
92
|
+
e.value === v.value ? "bg-surface text-heading shadow-sm" : "text-muted enabled:hover:text-heading"
|
|
93
93
|
]]),
|
|
94
94
|
onClick: (t) => C(e),
|
|
95
95
|
onKeydown: (e) => E(e, t)
|
|
@@ -4,9 +4,9 @@ export interface Props<T> {
|
|
|
4
4
|
options: SelectOption<T>[];
|
|
5
5
|
/** How to tell whether two values are the same, for option values that are objects. A property name (`"id"`) or a function `(a, b) => boolean`. Without it values are compared with `===`, which is right for strings and numbers. */
|
|
6
6
|
by?: string | ((a: T, b: T) => boolean);
|
|
7
|
-
/**
|
|
7
|
+
/** Label above the field. Also the accessible name of the select. */
|
|
8
8
|
label?: string;
|
|
9
|
-
/** Text shown in the field
|
|
9
|
+
/** Text shown in the field while nothing is selected, e.g. "Select a version". */
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
/** Allow several values; `v-model` becomes an array. */
|
|
12
12
|
multiple?: boolean;
|
|
@@ -28,9 +28,9 @@ export interface Props<T> {
|
|
|
28
28
|
required?: boolean;
|
|
29
29
|
/** Error text under the field. */
|
|
30
30
|
errorMsg?: string;
|
|
31
|
-
/**
|
|
31
|
+
/** Help text between the label and the field. */
|
|
32
32
|
hint?: string;
|
|
33
|
-
/** `compact` 32px (toolbars and filters
|
|
33
|
+
/** `compact` 32px (toolbars and filters), `small` 36px or `normal` 40px tall. */
|
|
34
34
|
size?: "compact" | "small" | "normal";
|
|
35
35
|
/** Text shown when no option matches the search. */
|
|
36
36
|
noResultText?: string;
|