@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
|
@@ -1,18 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { X as
|
|
1
|
+
import { Fragment as e, Teleport as t, Transition as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, mergeModels as l, nextTick as u, normalizeClass as d, onBeforeUnmount as f, openBlock as p, ref as m, renderSlot as h, toDisplayString as g, unref as _, useId as v, useModel as y, watch as b, withCtx as x, withModifiers as S } from "vue";
|
|
2
|
+
import { X as C } from "@lucide/vue";
|
|
3
3
|
//#region src/lib/components/AcModal.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var w = ["aria-labelledby", "aria-describedby"], T = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "mb-4 shrink-0"
|
|
7
|
+
}, E = ["id"], D = ["id"], O = {
|
|
8
|
+
"data-modal-body": "",
|
|
9
|
+
class: "ac-scrollbar -m-1 min-h-0 flex-1 p-1"
|
|
10
|
+
}, k = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "mt-6 flex shrink-0 flex-wrap items-center justify-between gap-3"
|
|
13
|
+
}, A = { class: "flex min-w-0 items-center gap-2" }, j = { class: "ml-auto flex items-center gap-3" }, M = { class: "flex shrink-0 items-start gap-4 border-b border-border p-6" }, N = { class: "min-w-0 flex-1" }, P = ["id"], F = ["id"], I = { class: "flex h-7 shrink-0 items-center gap-3" }, L = {
|
|
5
14
|
"data-modal-body": "",
|
|
6
15
|
class: "ac-scrollbar min-h-0 flex-1 p-6"
|
|
7
|
-
},
|
|
16
|
+
}, R = {
|
|
8
17
|
key: 0,
|
|
9
|
-
class: "flex shrink-0 flex-wrap items-center justify-between gap-3 rounded-b-16 border-t border-border
|
|
10
|
-
},
|
|
18
|
+
class: "flex shrink-0 flex-wrap items-center justify-between gap-3 rounded-b-16 border-t border-border p-6"
|
|
19
|
+
}, z = { class: "flex min-w-0 items-center gap-2" }, B = { class: "ml-auto flex items-center gap-3" }, V = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", H = /*@__PURE__*/ c({
|
|
11
20
|
__name: "AcModal",
|
|
12
|
-
props: /*@__PURE__*/
|
|
21
|
+
props: /*@__PURE__*/ l({
|
|
13
22
|
title: { default: "" },
|
|
14
23
|
description: { default: "" },
|
|
15
24
|
size: { default: "normal" },
|
|
25
|
+
variant: { default: "framed" },
|
|
16
26
|
closable: {
|
|
17
27
|
type: Boolean,
|
|
18
28
|
default: !0
|
|
@@ -32,94 +42,108 @@ var C = ["aria-labelledby", "aria-describedby"], w = { class: "flex shrink-0 ite
|
|
|
32
42
|
},
|
|
33
43
|
openModifiers: {}
|
|
34
44
|
}),
|
|
35
|
-
emits: /*@__PURE__*/
|
|
36
|
-
setup(
|
|
37
|
-
let
|
|
38
|
-
|
|
39
|
-
|
|
45
|
+
emits: /*@__PURE__*/ l(["close"], ["update:open"]),
|
|
46
|
+
setup(c, { emit: l }) {
|
|
47
|
+
let H = c, U = y(c, "open"), W = l, G = V.split(", ").map((e) => `[data-modal-body] ${e}`).join(", "), K = {
|
|
48
|
+
xsmall: "max-w-sm",
|
|
49
|
+
small: "max-w-md",
|
|
50
|
+
normal: "max-w-xl",
|
|
51
|
+
medium: "max-w-200",
|
|
52
|
+
large: "max-w-250",
|
|
53
|
+
xlarge: "max-w-6xl",
|
|
54
|
+
full: "max-w-[calc(100vw-64px)]"
|
|
55
|
+
}, q = v(), J = m(null), Y = null;
|
|
56
|
+
function X() {
|
|
57
|
+
H.closable && (U.value = !1, W("close"));
|
|
58
|
+
}
|
|
59
|
+
function Z(e) {
|
|
40
60
|
if (e.key === "Escape") {
|
|
41
61
|
if (e.defaultPrevented) return;
|
|
42
|
-
e.stopPropagation(),
|
|
43
|
-
} else if (e.key === "Tab" &&
|
|
44
|
-
let t = [...
|
|
62
|
+
e.stopPropagation(), X();
|
|
63
|
+
} else if (e.key === "Tab" && J.value) {
|
|
64
|
+
let t = [...J.value.querySelectorAll(V)].filter((e) => e.offsetParent !== null);
|
|
45
65
|
if (!t.length) return;
|
|
46
66
|
let n = t[0], r = t[t.length - 1];
|
|
47
67
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
48
68
|
}
|
|
49
|
-
}
|
|
69
|
+
}
|
|
70
|
+
function Q(e) {
|
|
50
71
|
let t = document.body, n = Number(t.dataset.acModals ?? 0) + (e ? 1 : -1);
|
|
51
72
|
if (t.dataset.acModals = String(Math.max(n, 0)), e && n === 1) {
|
|
52
73
|
let e = window.innerWidth - document.documentElement.clientWidth;
|
|
53
74
|
t.style.overflow = "hidden", e > 0 && (t.style.paddingRight = `${e}px`);
|
|
54
75
|
} else !e && n <= 0 && (t.style.overflow = "", t.style.paddingRight = "");
|
|
55
|
-
}
|
|
56
|
-
|
|
76
|
+
}
|
|
77
|
+
return b(U, async (e, t) => {
|
|
57
78
|
if (e) {
|
|
58
|
-
|
|
59
|
-
let e =
|
|
60
|
-
((e && (e.matches(
|
|
61
|
-
} else t && (
|
|
62
|
-
}, { immediate: !0 }),
|
|
63
|
-
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
small: "max-w-110",
|
|
67
|
-
normal: "max-w-130",
|
|
68
|
-
medium: "max-w-200",
|
|
69
|
-
large: "max-w-250",
|
|
70
|
-
full: "max-w-[calc(100vw-64px)]"
|
|
71
|
-
};
|
|
72
|
-
return (c, l) => (f(), n(e, { to: "body" }, [o(t, {
|
|
73
|
-
"enter-active-class": "transition duration-200 ease-out",
|
|
79
|
+
Y = document.activeElement, Q(!0), await u();
|
|
80
|
+
let e = J.value?.querySelector("[autofocus]");
|
|
81
|
+
((e && (e.matches(V) ? e : e.querySelector(V))) ?? J.value?.querySelector(G) ?? J.value)?.focus();
|
|
82
|
+
} else t && (Q(!1), Y?.focus?.());
|
|
83
|
+
}, { immediate: !0 }), f(() => {
|
|
84
|
+
U.value && Q(!1);
|
|
85
|
+
}), (l, u) => (p(), r(t, { to: "body" }, [s(n, {
|
|
86
|
+
"enter-active-class": "transition-opacity duration-200 ease-out",
|
|
74
87
|
"enter-from-class": "opacity-0",
|
|
75
|
-
"leave-active-class": "transition duration-150 ease-in",
|
|
88
|
+
"leave-active-class": "transition-opacity duration-150 ease-in",
|
|
76
89
|
"leave-to-class": "opacity-0"
|
|
77
90
|
}, {
|
|
78
|
-
default:
|
|
91
|
+
default: x(() => [U.value ? (p(), a("div", {
|
|
79
92
|
key: 0,
|
|
80
|
-
class: "fixed inset-0 z-[80] overflow-y-auto bg-
|
|
93
|
+
class: d(["fixed inset-0 z-[80] overflow-y-auto", c.variant === "plain" ? "bg-black/50" : "bg-black/80"]),
|
|
81
94
|
"data-ac-ds": "",
|
|
82
95
|
"data-testid": "ac-modal",
|
|
83
|
-
onKeydown:
|
|
84
|
-
onMousedown:
|
|
85
|
-
}, [
|
|
96
|
+
onKeydown: Z,
|
|
97
|
+
onMousedown: u[1] ||= S((e) => c.closeOnOutsideClick && X(), ["self"])
|
|
98
|
+
}, [o("div", {
|
|
86
99
|
class: "flex min-h-full items-start justify-center p-4 sm:items-center sm:p-8",
|
|
87
|
-
onMousedown:
|
|
88
|
-
}, [
|
|
100
|
+
onMousedown: u[0] ||= S((e) => c.closeOnOutsideClick && X(), ["self"])
|
|
101
|
+
}, [o("div", {
|
|
89
102
|
ref_key: "panel",
|
|
90
|
-
ref:
|
|
103
|
+
ref: J,
|
|
91
104
|
role: "dialog",
|
|
92
105
|
"aria-modal": "true",
|
|
93
|
-
"aria-labelledby":
|
|
94
|
-
"aria-describedby":
|
|
106
|
+
"aria-labelledby": c.title ? `${_(q)}-title` : void 0,
|
|
107
|
+
"aria-describedby": c.description ? `${_(q)}-desc` : void 0,
|
|
95
108
|
tabindex: "-1",
|
|
96
|
-
class:
|
|
97
|
-
}, [
|
|
98
|
-
|
|
99
|
-
id: `${
|
|
100
|
-
class: "text-xl leading-7 font-semibold
|
|
101
|
-
},
|
|
109
|
+
class: d(["relative flex max-h-[calc(100dvh-32px)] w-full flex-col rounded-16 border border-border bg-surface shadow-xl outline-none sm:max-h-[calc(100dvh-64px)]", [K[c.size], c.variant === "plain" && "p-6"]])
|
|
110
|
+
}, [c.variant === "plain" ? (p(), a(e, { key: 0 }, [
|
|
111
|
+
c.title || c.description || l.$slots.header ? (p(), a("header", T, [h(l.$slots, "header", {}, () => [o("h2", {
|
|
112
|
+
id: `${_(q)}-title`,
|
|
113
|
+
class: "text-xl leading-7 font-semibold text-heading"
|
|
114
|
+
}, g(c.title), 9, E), c.description ? (p(), a("p", {
|
|
115
|
+
key: 0,
|
|
116
|
+
id: `${_(q)}-desc`,
|
|
117
|
+
class: "mt-1 text-base text-muted"
|
|
118
|
+
}, g(c.description), 9, D)) : i("", !0)])])) : i("", !0),
|
|
119
|
+
o("div", O, [h(l.$slots, "default")]),
|
|
120
|
+
!c.hideFooter && (l.$slots.footer || l.$slots["footer-left"]) ? (p(), a("footer", k, [o("div", A, [h(l.$slots, "footer-left")]), o("div", j, [h(l.$slots, "footer")])])) : i("", !0)
|
|
121
|
+
], 64)) : (p(), a(e, { key: 1 }, [
|
|
122
|
+
o("header", M, [o("div", N, [h(l.$slots, "header", {}, () => [o("h2", {
|
|
123
|
+
id: `${_(q)}-title`,
|
|
124
|
+
class: "text-xl leading-7 font-semibold text-heading"
|
|
125
|
+
}, g(c.title), 9, P), c.description ? (p(), a("p", {
|
|
102
126
|
key: 0,
|
|
103
|
-
id: `${
|
|
127
|
+
id: `${_(q)}-desc`,
|
|
104
128
|
class: "mt-1 text-base text-muted"
|
|
105
|
-
},
|
|
129
|
+
}, g(c.description), 9, F)) : i("", !0)])]), o("div", I, [h(l.$slots, "header-actions"), c.closable ? (p(), a("button", {
|
|
106
130
|
key: 0,
|
|
107
131
|
type: "button",
|
|
108
|
-
class: "inline-flex
|
|
132
|
+
class: "-m-0.5 inline-flex cursor-pointer items-center justify-center rounded-6 p-0.5 text-muted transition-colors hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
|
|
109
133
|
"aria-label": "Close",
|
|
110
134
|
"data-ac-ds": "",
|
|
111
135
|
"data-testid": "ac-modal-close",
|
|
112
|
-
onClick:
|
|
113
|
-
}, [
|
|
136
|
+
onClick: X
|
|
137
|
+
}, [s(_(C), {
|
|
114
138
|
class: "size-5",
|
|
115
139
|
"aria-hidden": "true"
|
|
116
|
-
})])) :
|
|
117
|
-
|
|
118
|
-
!
|
|
119
|
-
], 10,
|
|
140
|
+
})])) : i("", !0)])]),
|
|
141
|
+
o("div", L, [h(l.$slots, "default")]),
|
|
142
|
+
!c.hideFooter && (l.$slots.footer || l.$slots["footer-left"]) ? (p(), a("footer", R, [o("div", z, [h(l.$slots, "footer-left")]), o("div", B, [h(l.$slots, "footer")])])) : i("", !0)
|
|
143
|
+
], 64))], 10, w)], 32)], 34)) : i("", !0)]),
|
|
120
144
|
_: 3
|
|
121
145
|
})]));
|
|
122
146
|
}
|
|
123
147
|
});
|
|
124
148
|
//#endregion
|
|
125
|
-
export {
|
|
149
|
+
export { H as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface Props {
|
|
2
|
-
/** When the menu button shows: `mobile` below 768px, `always`, or `never`. It emits `menu`; wire it to the sidebar's `v-model:mobile-open` or its `toggle()`. */
|
|
3
|
-
menuButton?: "mobile" | "always" | "never";
|
|
2
|
+
/** When the menu button shows: `mobile` below 768px, `tablet` below 1024px (cloud-ui's sidebar breakpoint), `always`, or `never`. It emits `menu`; wire it to the sidebar's `v-model:mobile-open` or its `toggle()`. */
|
|
3
|
+
menuButton?: "mobile" | "tablet" | "always" | "never";
|
|
4
4
|
/** Accessible name of the menu button. */
|
|
5
5
|
menuLabel?: string;
|
|
6
6
|
/** Short product tag after the logo, e.g. `"Console"` or `"DB"`. */
|
|
@@ -9,13 +9,15 @@ export interface Props {
|
|
|
9
9
|
sticky?: boolean;
|
|
10
10
|
/** Accessible name of the navigation that holds the default slot. */
|
|
11
11
|
label?: string;
|
|
12
|
+
/** Where the `search` slot sits: `start` after the menu button and links, 240px wide from 768px, 320px from 1024px and 384px from 1280px (cloud-ui's navbar); `center` in the middle, up to 448px. */
|
|
13
|
+
searchPosition?: "start" | "center";
|
|
12
14
|
}
|
|
13
15
|
type __VLS_Slots = {
|
|
14
16
|
/** The logo, usually a link home. */
|
|
15
17
|
brand?: () => unknown;
|
|
16
18
|
/** Top-level links (`AcNavbarItem`). Hidden below 768px; put them in the sidebar for phones. */
|
|
17
19
|
default?: () => unknown;
|
|
18
|
-
/** A search field,
|
|
20
|
+
/** A search field, placed by `search-position`. Hidden below 640px. */
|
|
19
21
|
search?: () => unknown;
|
|
20
22
|
/** Right side: icon actions, notifications, theme and `AcUserMenu` last. */
|
|
21
23
|
actions?: () => unknown;
|
|
@@ -26,10 +28,11 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
26
28
|
onMenu?: (() => any) | undefined;
|
|
27
29
|
}>, {
|
|
28
30
|
label: string;
|
|
29
|
-
menuLabel: string;
|
|
30
31
|
sticky: boolean;
|
|
31
|
-
|
|
32
|
+
menuLabel: string;
|
|
33
|
+
menuButton: "mobile" | "tablet" | "always" | "never";
|
|
32
34
|
productName: string;
|
|
35
|
+
searchPosition: "start" | "center";
|
|
33
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
37
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
38
|
declare const _default: typeof __VLS_export;
|
|
@@ -7,13 +7,16 @@ var d = ["aria-label"], f = {
|
|
|
7
7
|
}, p = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "inline-flex items-center rounded-6 border border-primary/25 bg-primary/10 px-1.5 py-0.5 text-sm font-semibold tracking-wide text-primary-strong uppercase"
|
|
10
|
-
}, m = ["aria-label"], h = {
|
|
10
|
+
}, m = ["aria-label"], h = {
|
|
11
|
+
key: 3,
|
|
12
|
+
class: "hidden min-w-0 shrink sm:block sm:w-48 md:w-60 lg:w-80 xl:w-96"
|
|
13
|
+
}, g = { class: "flex min-w-0 flex-1 justify-center" }, _ = {
|
|
11
14
|
key: 0,
|
|
12
15
|
class: "hidden w-full max-w-md sm:block"
|
|
13
|
-
},
|
|
14
|
-
key:
|
|
15
|
-
class: "flex shrink-0 items-center gap-0.5 sm:gap-
|
|
16
|
-
},
|
|
16
|
+
}, v = {
|
|
17
|
+
key: 4,
|
|
18
|
+
class: "flex shrink-0 items-center gap-0.5 sm:gap-3"
|
|
19
|
+
}, y = /*@__PURE__*/ i({
|
|
17
20
|
__name: "AcNavbar",
|
|
18
21
|
props: {
|
|
19
22
|
menuButton: { default: "mobile" },
|
|
@@ -23,12 +26,13 @@ var d = ["aria-label"], f = {
|
|
|
23
26
|
type: Boolean,
|
|
24
27
|
default: !0
|
|
25
28
|
},
|
|
26
|
-
label: { default: "Primary" }
|
|
29
|
+
label: { default: "Primary" },
|
|
30
|
+
searchPosition: { default: "start" }
|
|
27
31
|
},
|
|
28
32
|
emits: ["menu"],
|
|
29
|
-
setup(i, { emit:
|
|
30
|
-
let
|
|
31
|
-
return (
|
|
33
|
+
setup(i, { emit: y }) {
|
|
34
|
+
let b = y;
|
|
35
|
+
return (y, x) => (o(), t("header", {
|
|
32
36
|
class: a(["top-0 z-30 flex h-18 shrink-0 items-center gap-2 border-b border-border/80 bg-surface/90 px-4 backdrop-blur-sm sm:gap-4 sm:px-6", i.sticky && "sticky"]),
|
|
33
37
|
"data-ac-ds": "",
|
|
34
38
|
"data-testid": "ac-navbar"
|
|
@@ -36,25 +40,29 @@ var d = ["aria-label"], f = {
|
|
|
36
40
|
i.menuButton === "never" ? e("", !0) : (o(), t("button", {
|
|
37
41
|
key: 0,
|
|
38
42
|
type: "button",
|
|
39
|
-
class: a(["
|
|
43
|
+
class: a(["inline-flex size-9.5 shrink-0 cursor-pointer items-center justify-center rounded-10 border border-transparent text-muted transition-colors duration-200 hover:border-border hover:bg-surface-sunken/50 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", {
|
|
44
|
+
"md:hidden": i.menuButton === "mobile",
|
|
45
|
+
"lg:hidden": i.menuButton === "tablet"
|
|
46
|
+
}]),
|
|
40
47
|
"aria-label": i.menuLabel,
|
|
41
48
|
"data-ac-ds": "",
|
|
42
49
|
"data-testid": "ac-navbar-menu",
|
|
43
|
-
onClick:
|
|
50
|
+
onClick: x[0] ||= (e) => b("menu")
|
|
44
51
|
}, [r(l(u), {
|
|
45
52
|
class: "size-5",
|
|
46
53
|
"aria-hidden": "true"
|
|
47
54
|
})], 10, d)),
|
|
48
|
-
|
|
49
|
-
|
|
55
|
+
y.$slots.brand || i.productName ? (o(), t("div", f, [s(y.$slots, "brand"), i.productName ? (o(), t("span", p, c(i.productName), 1)) : e("", !0)])) : e("", !0),
|
|
56
|
+
y.$slots.default ? (o(), t("nav", {
|
|
50
57
|
key: 2,
|
|
51
58
|
"aria-label": i.label,
|
|
52
59
|
class: "hidden items-center gap-1 md:flex"
|
|
53
|
-
}, [s(
|
|
54
|
-
|
|
55
|
-
|
|
60
|
+
}, [s(y.$slots, "default")], 8, m)) : e("", !0),
|
|
61
|
+
y.$slots.search && i.searchPosition === "start" ? (o(), t("div", h, [s(y.$slots, "search")])) : e("", !0),
|
|
62
|
+
n("div", g, [y.$slots.search && i.searchPosition === "center" ? (o(), t("div", _, [s(y.$slots, "search")])) : e("", !0)]),
|
|
63
|
+
y.$slots.actions ? (o(), t("div", v, [s(y.$slots, "actions")])) : e("", !0)
|
|
56
64
|
], 2));
|
|
57
65
|
}
|
|
58
66
|
});
|
|
59
67
|
//#endregion
|
|
60
|
-
export {
|
|
68
|
+
export { y as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Component } from "vue";
|
|
2
2
|
export interface Props {
|
|
3
|
-
/** Text of the item. With `iconOnly` it becomes the
|
|
3
|
+
/** Text of the item. With `iconOnly` it becomes the accessible name. */
|
|
4
4
|
label: string;
|
|
5
5
|
/** A Lucide icon component, e.g. `:icon="Terminal"`. */
|
|
6
6
|
icon?: Component;
|
|
7
|
-
/** Shows only the icon (20px) in a
|
|
7
|
+
/** Shows only the icon (20px) in a 38px button with 10px corners, like cloud-ui's navbar actions: Help, Notifications, Terminal. */
|
|
8
8
|
iconOnly?: boolean;
|
|
9
9
|
/** Route to link to. Renders `RouterLink` when vue-router is installed in the app, otherwise a plain link (string routes only). */
|
|
10
10
|
to?: string | object;
|
|
@@ -2,7 +2,7 @@ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r
|
|
|
2
2
|
//#region src/lib/components/AcNavbarItem.vue?vue&type=script&setup=true&lang.ts
|
|
3
3
|
var h = { key: 1 }, g = {
|
|
4
4
|
key: 0,
|
|
5
|
-
class: "absolute -top-1
|
|
5
|
+
class: "absolute -top-1 -right-1 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-danger px-1 text-xs leading-none font-medium text-white tabular-nums",
|
|
6
6
|
"aria-hidden": "true"
|
|
7
7
|
}, _ = {
|
|
8
8
|
key: 1,
|
|
@@ -42,8 +42,7 @@ var h = { key: 1 }, g = {
|
|
|
42
42
|
b("click", e);
|
|
43
43
|
}
|
|
44
44
|
return (t, s) => (u(), n(f(S.value), c(w.value, {
|
|
45
|
-
class: ["relative inline-flex
|
|
46
|
-
title: o.iconOnly ? o.label : void 0,
|
|
45
|
+
class: ["relative inline-flex shrink-0 items-center justify-center gap-2 rounded-10 text-base font-medium whitespace-nowrap no-underline transition-colors duration-200 select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none aria-[current=page]:bg-primary/10 aria-[current=page]:text-primary-strong", [o.iconOnly ? ["size-9.5 border border-transparent text-muted", !o.disabled && "hover:border-border hover:bg-surface-sunken/50"] : ["h-9 px-3 text-heading/80", !o.disabled && "hover:bg-surface-sunken"], o.disabled ? "pointer-events-none cursor-not-allowed opacity-50" : "cursor-pointer hover:text-heading"]],
|
|
47
46
|
"data-ac-ds": "",
|
|
48
47
|
"data-testid": "ac-navbar-item",
|
|
49
48
|
onClick: T
|
|
@@ -58,7 +57,7 @@ var h = { key: 1 }, g = {
|
|
|
58
57
|
C.value ? (u(), i(e, { key: 2 }, [o.iconOnly ? (u(), i("span", g, p(C.value), 1)) : (u(), i("span", _, p(C.value), 1))], 64)) : r("", !0)
|
|
59
58
|
]),
|
|
60
59
|
_: 3
|
|
61
|
-
}, 16, ["class"
|
|
60
|
+
}, 16, ["class"]));
|
|
62
61
|
}
|
|
63
62
|
});
|
|
64
63
|
//#endregion
|
|
@@ -8,17 +8,17 @@ export interface NotificationItem {
|
|
|
8
8
|
title?: string;
|
|
9
9
|
/** The message. Old `msg`. */
|
|
10
10
|
msg?: string;
|
|
11
|
-
/** Event status, e.g. `Success`, `Failed`, `Running`, `Pending`. Shown
|
|
11
|
+
/** Event status, e.g. `Success`, `Failed`, `Running`, `Pending`. Shown before the time, in its colour. */
|
|
12
12
|
status?: string;
|
|
13
13
|
/** Overrides the tone that `status` picks. */
|
|
14
14
|
type?: "success" | "danger" | "warning" | "info" | "neutral";
|
|
15
|
-
/** Read items lose the unread dot and the
|
|
15
|
+
/** Read items lose the unread dot and the primary tint. */
|
|
16
16
|
read?: boolean;
|
|
17
17
|
/** Plain URL to open. */
|
|
18
18
|
href?: string;
|
|
19
19
|
/** Route to open; rendered as `RouterLink` when vue-router is installed. */
|
|
20
20
|
to?: string | object;
|
|
21
|
-
/** A Lucide icon
|
|
21
|
+
/** A 16px Lucide icon shown before the title. */
|
|
22
22
|
icon?: Component;
|
|
23
23
|
}
|
|
24
24
|
export interface Props {
|