@ac-design/design-system 1.0.3 → 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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface LocaleOption {
|
|
2
|
+
/** Locale code the app's i18n uses, e.g. `en`, `bn`, `de`. */
|
|
3
|
+
value: string;
|
|
4
|
+
/** The language's own name, e.g. "English", "বাংলা", "Deutsch". */
|
|
5
|
+
label: string;
|
|
6
|
+
/** A muted second line, e.g. the name in English: "Bengali". */
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface Props {
|
|
10
|
+
/** Languages to offer, each named in its own language. With fewer than two, nothing renders. */
|
|
11
|
+
locales: LocaleOption[];
|
|
12
|
+
/** `icon` is a 36px icon button for the navbar; `button` adds the current code (EN) and a chevron. */
|
|
13
|
+
variant?: "icon" | "button";
|
|
14
|
+
/** Accessible name of the trigger. The current language is added after it. */
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
/** Heading at the top of the menu. Pass an empty string to hide it. */
|
|
17
|
+
menuTitle?: string;
|
|
18
|
+
/** Which edge of the trigger the menu lines up with. `end` suits the right of a navbar. */
|
|
19
|
+
align?: "start" | "end";
|
|
20
|
+
/** Remembers the choice in localStorage under `storageKey` and restores it on load. */
|
|
21
|
+
persist?: boolean;
|
|
22
|
+
/** localStorage key for `persist`. cloud-ui uses `user-locale`. */
|
|
23
|
+
storageKey?: string;
|
|
24
|
+
}
|
|
25
|
+
type __VLS_Props = Props;
|
|
26
|
+
type __VLS_ModelProps = {
|
|
27
|
+
/** The current locale code. Bind it to your i18n instance's locale. */
|
|
28
|
+
modelValue?: string;
|
|
29
|
+
};
|
|
30
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
31
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
|
+
"update:modelValue": (value: string) => any;
|
|
33
|
+
change: (value: string) => any;
|
|
34
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
35
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
36
|
+
onChange?: ((value: string) => any) | undefined;
|
|
37
|
+
}>, {
|
|
38
|
+
variant: "icon" | "button";
|
|
39
|
+
align: "start" | "end";
|
|
40
|
+
ariaLabel: string;
|
|
41
|
+
menuTitle: string;
|
|
42
|
+
persist: boolean;
|
|
43
|
+
storageKey: string;
|
|
44
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const _default: typeof __VLS_export;
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import e from "./AcDropdown.js";
|
|
2
|
+
import t from "./AcDropdownItem.js";
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, mergeModels as u, normalizeClass as d, openBlock as f, renderList as p, toDisplayString as m, unref as h, useModel as g, withCtx as _ } from "vue";
|
|
4
|
+
import { Check as v, ChevronDown as y, Languages as b } from "@lucide/vue";
|
|
5
|
+
//#region src/lib/components/AcLocaleSwitcher.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var x = ["aria-label"], S = ["aria-label"], C = { class: "font-mono text-xs tracking-wide uppercase" }, w = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "mb-1 border-b border-border px-3 pt-1 pb-2 text-xs font-semibold text-muted",
|
|
9
|
+
"aria-hidden": "true"
|
|
10
|
+
}, T = { class: "flex items-center gap-3" }, E = ["lang"], D = /*@__PURE__*/ l({
|
|
11
|
+
__name: "AcLocaleSwitcher",
|
|
12
|
+
props: /*@__PURE__*/ u({
|
|
13
|
+
locales: {},
|
|
14
|
+
variant: { default: "icon" },
|
|
15
|
+
ariaLabel: { default: "Change language" },
|
|
16
|
+
menuTitle: { default: "Select language" },
|
|
17
|
+
align: { default: "end" },
|
|
18
|
+
persist: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: !1
|
|
21
|
+
},
|
|
22
|
+
storageKey: { default: "user-locale" }
|
|
23
|
+
}, {
|
|
24
|
+
modelValue: { default: "" },
|
|
25
|
+
modelModifiers: {}
|
|
26
|
+
}),
|
|
27
|
+
emits: /*@__PURE__*/ u(["change"], ["update:modelValue"]),
|
|
28
|
+
setup(l, { emit: u }) {
|
|
29
|
+
let D = l, O = g(l, "modelValue"), k = u, A = r(() => D.locales.find((e) => e.value === O.value)), j = r(() => A.value ? `${D.ariaLabel} (${A.value.label})` : D.ariaLabel);
|
|
30
|
+
function M() {
|
|
31
|
+
try {
|
|
32
|
+
return localStorage.getItem(D.storageKey);
|
|
33
|
+
} catch {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function N(e) {
|
|
38
|
+
if (e !== O.value && (O.value = e, k("change", e), D.persist)) try {
|
|
39
|
+
localStorage.setItem(D.storageKey, e);
|
|
40
|
+
} catch {}
|
|
41
|
+
}
|
|
42
|
+
if (D.persist && typeof window < "u") {
|
|
43
|
+
let e = M();
|
|
44
|
+
e && e !== O.value && D.locales.some((t) => t.value === e) && N(e);
|
|
45
|
+
}
|
|
46
|
+
return (r, u) => l.locales.length > 1 ? (f(), i(e, {
|
|
47
|
+
key: 0,
|
|
48
|
+
align: l.align,
|
|
49
|
+
"menu-label": l.ariaLabel,
|
|
50
|
+
"data-testid": "ac-locale-switcher"
|
|
51
|
+
}, {
|
|
52
|
+
trigger: _(({ open: e }) => [l.variant === "icon" ? (f(), o("button", {
|
|
53
|
+
key: 0,
|
|
54
|
+
type: "button",
|
|
55
|
+
"aria-label": j.value,
|
|
56
|
+
class: d(["inline-flex size-9 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", e && "bg-surface-sunken text-heading"])
|
|
57
|
+
}, [c(h(b), {
|
|
58
|
+
class: "size-5",
|
|
59
|
+
"aria-hidden": "true"
|
|
60
|
+
})], 10, x)) : (f(), o("button", {
|
|
61
|
+
key: 1,
|
|
62
|
+
type: "button",
|
|
63
|
+
"aria-label": j.value,
|
|
64
|
+
class: d(["inline-flex h-9 cursor-pointer items-center gap-1.5 rounded-10 border border-border bg-surface px-3 text-base font-medium 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", e && "bg-surface-sunken/70"])
|
|
65
|
+
}, [
|
|
66
|
+
c(h(b), {
|
|
67
|
+
class: "size-4 text-muted",
|
|
68
|
+
"aria-hidden": "true"
|
|
69
|
+
}),
|
|
70
|
+
s("span", C, m(A.value?.value ?? ""), 1),
|
|
71
|
+
c(h(y), {
|
|
72
|
+
class: d(["size-4 text-muted transition-transform duration-200 motion-reduce:transition-none", e && "rotate-180"]),
|
|
73
|
+
"aria-hidden": "true"
|
|
74
|
+
}, null, 8, ["class"])
|
|
75
|
+
], 10, S))]),
|
|
76
|
+
default: _(() => [l.menuTitle ? (f(), o("p", w, m(l.menuTitle), 1)) : a("", !0), (f(!0), o(n, null, p(l.locales, (e) => (f(), i(t, {
|
|
77
|
+
key: e.value,
|
|
78
|
+
description: e.description,
|
|
79
|
+
"aria-current": e.value === O.value ? "true" : void 0,
|
|
80
|
+
class: d(e.value === O.value && "bg-surface-sunken/50 font-medium"),
|
|
81
|
+
onClick: (t) => N(e.value)
|
|
82
|
+
}, {
|
|
83
|
+
default: _(() => [s("span", T, [s("span", {
|
|
84
|
+
class: "min-w-0 flex-1 truncate",
|
|
85
|
+
lang: e.value
|
|
86
|
+
}, m(e.label), 9, E), e.value === O.value ? (f(), i(h(v), {
|
|
87
|
+
key: 0,
|
|
88
|
+
class: "size-4 shrink-0 text-primary",
|
|
89
|
+
"aria-hidden": "true"
|
|
90
|
+
})) : a("", !0)])]),
|
|
91
|
+
_: 2
|
|
92
|
+
}, 1032, [
|
|
93
|
+
"description",
|
|
94
|
+
"aria-current",
|
|
95
|
+
"class",
|
|
96
|
+
"onClick"
|
|
97
|
+
]))), 128))]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 8, ["align", "menu-label"])) : a("", !0);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
//#endregion
|
|
103
|
+
export { D as default };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Teleport as e, Transition as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, mergeModels as c, nextTick as l, normalizeClass as u, onBeforeUnmount as d, openBlock as f, ref as p, renderSlot as m, toDisplayString as h, unref as g, useId as _, useModel as v, watch as y, withCtx as b, withModifiers as x } from "vue";
|
|
2
2
|
import { X as S } from "@lucide/vue";
|
|
3
3
|
//#region src/lib/components/AcModal.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var C = ["aria-labelledby", "aria-describedby"], w = { class: "flex shrink-0 items-start gap-4 border-b border-border
|
|
4
|
+
var C = ["aria-labelledby", "aria-describedby"], w = { class: "flex shrink-0 items-start gap-4 border-b border-border px-6 py-4" }, T = { class: "min-w-0 flex-1" }, E = ["id"], D = ["id"], O = { class: "-my-1 -mr-2 flex shrink-0 items-center gap-1" }, k = {
|
|
5
5
|
"data-modal-body": "",
|
|
6
|
-
class: "ac-scrollbar min-h-0 flex-1
|
|
6
|
+
class: "ac-scrollbar min-h-0 flex-1 p-6"
|
|
7
7
|
}, A = {
|
|
8
8
|
key: 0,
|
|
9
|
-
class: "flex shrink-0 items-center justify-between gap-3 rounded-b-
|
|
10
|
-
}, j = { class: "flex min-w-0 items-center gap-2" }, M = { class: "flex items-center gap-
|
|
9
|
+
class: "flex shrink-0 flex-wrap items-center justify-between gap-3 rounded-b-16 border-t border-border px-6 py-4"
|
|
10
|
+
}, j = { class: "flex min-w-0 items-center gap-2" }, M = { class: "ml-auto flex items-center gap-3" }, N = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", P = /*@__PURE__*/ s({
|
|
11
11
|
__name: "AcModal",
|
|
12
12
|
props: /*@__PURE__*/ c({
|
|
13
13
|
title: { default: "" },
|
|
@@ -34,19 +34,19 @@ var C = ["aria-labelledby", "aria-describedby"], w = { class: "flex shrink-0 ite
|
|
|
34
34
|
}),
|
|
35
35
|
emits: /*@__PURE__*/ c(["close"], ["update:open"]),
|
|
36
36
|
setup(s, { emit: c }) {
|
|
37
|
-
let P = s, F = c, I = v(s, "open"), L = _(), R = p(null), z = null, B = () => {
|
|
37
|
+
let P = s, F = c, I = v(s, "open"), L = _(), R = p(null), z = null, B = N.split(", ").map((e) => `[data-modal-body] ${e}`).join(", "), V = () => {
|
|
38
38
|
P.closable && (I.value = !1, F("close"));
|
|
39
|
-
},
|
|
39
|
+
}, H = (e) => {
|
|
40
40
|
if (e.key === "Escape") {
|
|
41
41
|
if (e.defaultPrevented) return;
|
|
42
|
-
e.stopPropagation(),
|
|
42
|
+
e.stopPropagation(), V();
|
|
43
43
|
} else if (e.key === "Tab" && R.value) {
|
|
44
44
|
let t = [...R.value.querySelectorAll(N)].filter((e) => e.offsetParent !== null);
|
|
45
45
|
if (!t.length) return;
|
|
46
46
|
let n = t[0], r = t[t.length - 1];
|
|
47
47
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
48
48
|
}
|
|
49
|
-
},
|
|
49
|
+
}, U = (e) => {
|
|
50
50
|
let t = document.body, n = Number(t.dataset.acModals ?? 0) + (e ? 1 : -1);
|
|
51
51
|
if (t.dataset.acModals = String(Math.max(n, 0)), e && n === 1) {
|
|
52
52
|
let e = window.innerWidth - document.documentElement.clientWidth;
|
|
@@ -55,14 +55,14 @@ var C = ["aria-labelledby", "aria-describedby"], w = { class: "flex shrink-0 ite
|
|
|
55
55
|
};
|
|
56
56
|
y(I, async (e, t) => {
|
|
57
57
|
if (e) {
|
|
58
|
-
z = document.activeElement,
|
|
58
|
+
z = document.activeElement, U(!0), await l();
|
|
59
59
|
let e = R.value?.querySelector("[autofocus]");
|
|
60
|
-
((e && (e.matches(N) ? e : e.querySelector(N))) ?? R.value?.querySelector(
|
|
61
|
-
} else t && (
|
|
60
|
+
((e && (e.matches(N) ? e : e.querySelector(N))) ?? R.value?.querySelector(B) ?? R.value)?.focus();
|
|
61
|
+
} else t && (U(!1), z?.focus?.());
|
|
62
62
|
}, { immediate: !0 }), d(() => {
|
|
63
|
-
I.value &&
|
|
63
|
+
I.value && U(!1);
|
|
64
64
|
});
|
|
65
|
-
let
|
|
65
|
+
let W = {
|
|
66
66
|
small: "max-w-110",
|
|
67
67
|
normal: "max-w-130",
|
|
68
68
|
medium: "max-w-200",
|
|
@@ -80,11 +80,11 @@ var C = ["aria-labelledby", "aria-describedby"], w = { class: "flex shrink-0 ite
|
|
|
80
80
|
class: "fixed inset-0 z-[80] overflow-y-auto bg-overlay backdrop-blur-[2px]",
|
|
81
81
|
"data-ac-ds": "",
|
|
82
82
|
"data-testid": "ac-modal",
|
|
83
|
-
onKeydown:
|
|
84
|
-
onMousedown: l[1] ||= x((e) => s.closeOnOutsideClick &&
|
|
83
|
+
onKeydown: H,
|
|
84
|
+
onMousedown: l[1] ||= x((e) => s.closeOnOutsideClick && V(), ["self"])
|
|
85
85
|
}, [a("div", {
|
|
86
86
|
class: "flex min-h-full items-start justify-center p-4 sm:items-center sm:p-8",
|
|
87
|
-
onMousedown: l[0] ||= x((e) => s.closeOnOutsideClick &&
|
|
87
|
+
onMousedown: l[0] ||= x((e) => s.closeOnOutsideClick && V(), ["self"])
|
|
88
88
|
}, [a("div", {
|
|
89
89
|
ref_key: "panel",
|
|
90
90
|
ref: R,
|
|
@@ -93,25 +93,25 @@ var C = ["aria-labelledby", "aria-describedby"], w = { class: "flex shrink-0 ite
|
|
|
93
93
|
"aria-labelledby": s.title ? `${g(L)}-title` : void 0,
|
|
94
94
|
"aria-describedby": s.description ? `${g(L)}-desc` : void 0,
|
|
95
95
|
tabindex: "-1",
|
|
96
|
-
class: u(["relative flex max-h-[calc(100dvh-32px)] w-full animate-pop-in flex-col rounded-
|
|
96
|
+
class: u(["relative flex max-h-[calc(100dvh-32px)] w-full animate-pop-in flex-col rounded-16 border border-border bg-surface shadow-xl outline-none sm:max-h-[calc(100dvh-64px)]", W[s.size]])
|
|
97
97
|
}, [
|
|
98
|
-
a("header", w, [a("div", T, [m(c.$slots, "header", {}, () => [a("
|
|
98
|
+
a("header", w, [a("div", T, [m(c.$slots, "header", {}, () => [a("h2", {
|
|
99
99
|
id: `${g(L)}-title`,
|
|
100
|
-
class: "text-xl leading-
|
|
100
|
+
class: "text-xl leading-7 font-semibold tracking-tight text-heading"
|
|
101
101
|
}, h(s.title), 9, E), s.description ? (f(), i("p", {
|
|
102
102
|
key: 0,
|
|
103
103
|
id: `${g(L)}-desc`,
|
|
104
|
-
class: "mt-
|
|
104
|
+
class: "mt-1 text-base text-muted"
|
|
105
105
|
}, h(s.description), 9, D)) : r("", !0)])]), a("div", O, [m(c.$slots, "header-actions"), s.closable ? (f(), i("button", {
|
|
106
106
|
key: 0,
|
|
107
107
|
type: "button",
|
|
108
|
-
class: "inline-flex size-
|
|
108
|
+
class: "inline-flex size-9 cursor-pointer items-center justify-center rounded-10 text-muted transition-colors hover:bg-surface-sunken hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
|
|
109
109
|
"aria-label": "Close",
|
|
110
110
|
"data-ac-ds": "",
|
|
111
111
|
"data-testid": "ac-modal-close",
|
|
112
|
-
onClick:
|
|
112
|
+
onClick: V
|
|
113
113
|
}, [o(g(S), {
|
|
114
|
-
class: "size-
|
|
114
|
+
class: "size-5",
|
|
115
115
|
"aria-hidden": "true"
|
|
116
116
|
})])) : r("", !0)])]),
|
|
117
117
|
a("div", k, [m(c.$slots, "default")]),
|
|
@@ -6,13 +6,13 @@ var d = ["aria-label"], f = {
|
|
|
6
6
|
class: "flex shrink-0 items-center gap-2"
|
|
7
7
|
}, p = {
|
|
8
8
|
key: 0,
|
|
9
|
-
class: "inline-flex
|
|
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
10
|
}, m = ["aria-label"], h = { class: "flex min-w-0 flex-1 justify-center" }, g = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "hidden w-full max-w-md sm:block"
|
|
13
13
|
}, _ = {
|
|
14
14
|
key: 3,
|
|
15
|
-
class: "flex shrink-0 items-center gap-
|
|
15
|
+
class: "flex shrink-0 items-center gap-0.5 sm:gap-2"
|
|
16
16
|
}, v = /*@__PURE__*/ i({
|
|
17
17
|
__name: "AcNavbar",
|
|
18
18
|
props: {
|
|
@@ -29,27 +29,27 @@ var d = ["aria-label"], f = {
|
|
|
29
29
|
setup(i, { emit: v }) {
|
|
30
30
|
let y = v;
|
|
31
31
|
return (v, b) => (o(), t("header", {
|
|
32
|
-
class: a(["top-0 z-30 flex h-
|
|
32
|
+
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
33
|
"data-ac-ds": "",
|
|
34
34
|
"data-testid": "ac-navbar"
|
|
35
35
|
}, [
|
|
36
36
|
i.menuButton === "never" ? e("", !0) : (o(), t("button", {
|
|
37
37
|
key: 0,
|
|
38
38
|
type: "button",
|
|
39
|
-
class: a(["-ml-1.5 inline-flex size-
|
|
39
|
+
class: a(["-ml-1.5 inline-flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-10 text-heading transition-colors duration-200 hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none", i.menuButton === "mobile" && "md:hidden"]),
|
|
40
40
|
"aria-label": i.menuLabel,
|
|
41
41
|
"data-ac-ds": "",
|
|
42
42
|
"data-testid": "ac-navbar-menu",
|
|
43
43
|
onClick: b[0] ||= (e) => y("menu")
|
|
44
44
|
}, [r(l(u), {
|
|
45
|
-
class: "size-
|
|
45
|
+
class: "size-5",
|
|
46
46
|
"aria-hidden": "true"
|
|
47
47
|
})], 10, d)),
|
|
48
48
|
v.$slots.brand || i.productName ? (o(), t("div", f, [s(v.$slots, "brand"), i.productName ? (o(), t("span", p, c(i.productName), 1)) : e("", !0)])) : e("", !0),
|
|
49
49
|
v.$slots.default ? (o(), t("nav", {
|
|
50
50
|
key: 2,
|
|
51
51
|
"aria-label": i.label,
|
|
52
|
-
class: "hidden items-center gap-
|
|
52
|
+
class: "hidden items-center gap-1 md:flex"
|
|
53
53
|
}, [s(v.$slots, "default")], 8, m)) : e("", !0),
|
|
54
54
|
n("div", h, [v.$slots.search ? (o(), t("div", g, [s(v.$slots, "search")])) : e("", !0)]),
|
|
55
55
|
v.$slots.actions ? (o(), t("div", _, [s(v.$slots, "actions")])) : e("", !0)
|
|
@@ -4,7 +4,7 @@ export interface Props {
|
|
|
4
4
|
label: string;
|
|
5
5
|
/** A Lucide icon component, e.g. `:icon="Terminal"`. */
|
|
6
6
|
icon?: Component;
|
|
7
|
-
/** Shows only the icon in a
|
|
7
|
+
/** Shows only the icon (20px) in a 36px square button, for navbar actions such as Terminal or Notifications. */
|
|
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;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createTextVNode as a, defineComponent as o, getCurrentInstance as s, mergeProps as c,
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createTextVNode as a, defineComponent as o, getCurrentInstance as s, mergeProps as c, normalizeClass as l, openBlock as u, renderSlot as d, resolveDynamicComponent as f, toDisplayString as p, withCtx as m } from "vue";
|
|
2
2
|
//#region src/lib/components/AcNavbarItem.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
3
|
+
var h = { key: 1 }, g = {
|
|
4
4
|
key: 0,
|
|
5
|
-
class: "absolute -top-
|
|
5
|
+
class: "absolute -top-1 left-5 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,
|
|
9
|
-
class: "inline-flex h-
|
|
10
|
-
},
|
|
9
|
+
class: "inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary/10 px-1.5 text-xs leading-none font-medium text-primary-strong tabular-nums"
|
|
10
|
+
}, v = /*@__PURE__*/ o({
|
|
11
11
|
__name: "AcNavbarItem",
|
|
12
12
|
props: {
|
|
13
13
|
label: {},
|
|
@@ -29,37 +29,37 @@ var m = { key: 1 }, h = {
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
emits: ["click"],
|
|
32
|
-
setup(o, { emit:
|
|
33
|
-
let
|
|
32
|
+
setup(o, { emit: v }) {
|
|
33
|
+
let y = o, b = v, x = s()?.appContext.components.RouterLink, S = t(() => y.to && x && !y.disabled ? x : y.to || y.href ? "a" : "button"), C = t(() => y.badge === void 0 || y.badge === "" || y.badge === 0 ? "" : typeof y.badge == "number" && y.badge > 999 ? "999+" : String(y.badge)), w = t(() => {
|
|
34
34
|
let e = {};
|
|
35
|
-
return
|
|
35
|
+
return S.value === x ? e.to = y.to : S.value === "a" ? y.disabled ? (e.role = "link", e["aria-disabled"] = "true") : e.href = y.href ?? (typeof y.to == "string" ? y.to : void 0) : (e.type = "button", e.disabled = y.disabled || void 0), y.active && (e["aria-current"] = "page"), y.iconOnly && (e["aria-label"] = C.value ? `${y.label} (${C.value})` : y.label), e;
|
|
36
36
|
});
|
|
37
|
-
function
|
|
38
|
-
if (
|
|
37
|
+
function T(e) {
|
|
38
|
+
if (y.disabled) {
|
|
39
39
|
e.preventDefault();
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
b("click", e);
|
|
43
43
|
}
|
|
44
|
-
return (t, s) => (
|
|
45
|
-
class: ["relative inline-flex h-
|
|
44
|
+
return (t, s) => (u(), n(f(S.value), c(w.value, {
|
|
45
|
+
class: ["relative inline-flex h-9 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 ? "w-9 text-muted" : "px-3 text-heading/80", o.disabled ? "pointer-events-none cursor-not-allowed opacity-50" : "cursor-pointer hover:bg-surface-sunken hover:text-heading"]],
|
|
46
46
|
title: o.iconOnly ? o.label : void 0,
|
|
47
47
|
"data-ac-ds": "",
|
|
48
48
|
"data-testid": "ac-navbar-item",
|
|
49
|
-
onClick:
|
|
49
|
+
onClick: T
|
|
50
50
|
}), {
|
|
51
|
-
default:
|
|
52
|
-
o.icon ? (
|
|
51
|
+
default: m(() => [
|
|
52
|
+
o.icon ? (u(), n(f(o.icon), {
|
|
53
53
|
key: 0,
|
|
54
|
-
class: "size-
|
|
54
|
+
class: l(["shrink-0", o.iconOnly ? "size-5" : "size-4"]),
|
|
55
55
|
"aria-hidden": "true"
|
|
56
|
-
})) : r("", !0),
|
|
57
|
-
o.iconOnly ? r("", !0) : (
|
|
58
|
-
|
|
56
|
+
}, null, 8, ["class"])) : r("", !0),
|
|
57
|
+
o.iconOnly ? r("", !0) : (u(), i("span", h, [d(t.$slots, "default", {}, () => [a(p(o.label), 1)])])),
|
|
58
|
+
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
59
|
]),
|
|
60
60
|
_: 3
|
|
61
61
|
}, 16, ["class", "title"]));
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
64
|
//#endregion
|
|
65
|
-
export {
|
|
65
|
+
export { v as default };
|
|
@@ -7,9 +7,9 @@ var pe = {
|
|
|
7
7
|
class: "inline-flex",
|
|
8
8
|
"data-ac-ds": "",
|
|
9
9
|
"data-testid": "ac-notification-menu"
|
|
10
|
-
}, me = { class: "flex h-
|
|
10
|
+
}, me = { class: "flex h-13 shrink-0 items-center gap-2 border-b border-border pr-2.5 pl-4" }, he = {
|
|
11
11
|
key: 0,
|
|
12
|
-
class: "inline-flex
|
|
12
|
+
class: "inline-flex items-center justify-center rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary-strong tabular-nums"
|
|
13
13
|
}, ge = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "flex flex-col gap-4 px-4 py-4",
|
|
@@ -20,17 +20,17 @@ var pe = {
|
|
|
20
20
|
key: 1,
|
|
21
21
|
class: "flex flex-col items-center gap-3 px-6 py-10 text-center"
|
|
22
22
|
}, ve = {
|
|
23
|
-
class: "inline-flex size-
|
|
23
|
+
class: "inline-flex size-12 items-center justify-center rounded-14 bg-primary/10 text-primary-strong",
|
|
24
24
|
"aria-hidden": "true"
|
|
25
|
-
}, ye = { class: "text-lg font-
|
|
25
|
+
}, ye = { class: "text-lg font-semibold text-heading" }, be = {
|
|
26
26
|
key: 2,
|
|
27
27
|
role: "list",
|
|
28
|
-
class: "ac-scrollbar min-h-0 flex-1 divide-y divide-border
|
|
28
|
+
class: "ac-scrollbar min-h-0 flex-1 divide-y divide-border",
|
|
29
29
|
"data-ac-ds": "",
|
|
30
30
|
"data-testid": "ac-notification-menu-list"
|
|
31
31
|
}, xe = { class: "min-w-0 flex-1" }, Se = {
|
|
32
32
|
key: 0,
|
|
33
|
-
class: "mt-
|
|
33
|
+
class: "mt-1 line-clamp-2 text-xs text-muted"
|
|
34
34
|
}, Ce = { class: "mt-1 flex items-center gap-1.5 text-xs text-muted" }, we = {
|
|
35
35
|
key: 1,
|
|
36
36
|
"aria-hidden": "true"
|
|
@@ -43,7 +43,7 @@ var pe = {
|
|
|
43
43
|
class: "sr-only"
|
|
44
44
|
}, Oe = {
|
|
45
45
|
key: 3,
|
|
46
|
-
class: "shrink-0 border-t border-border
|
|
46
|
+
class: "shrink-0 border-t border-border p-1.5"
|
|
47
47
|
}, ke = "[data-notification-item]", Ae = 6048e5, D = /*@__PURE__*/ f({
|
|
48
48
|
__name: "AcNotificationMenu",
|
|
49
49
|
props: /*@__PURE__*/ m({
|
|
@@ -94,27 +94,27 @@ var pe = {
|
|
|
94
94
|
}, A = {
|
|
95
95
|
success: {
|
|
96
96
|
icon: ce,
|
|
97
|
-
tile: "bg-
|
|
98
|
-
text: "text-
|
|
97
|
+
tile: "bg-success/10 text-success-strong",
|
|
98
|
+
text: "text-success-strong"
|
|
99
99
|
},
|
|
100
100
|
danger: {
|
|
101
101
|
icon: le,
|
|
102
|
-
tile: "bg-
|
|
103
|
-
text: "text-
|
|
102
|
+
tile: "bg-danger/10 text-danger-strong",
|
|
103
|
+
text: "text-danger-strong"
|
|
104
104
|
},
|
|
105
105
|
warning: {
|
|
106
106
|
icon: fe,
|
|
107
|
-
tile: "bg-
|
|
108
|
-
text: "text-
|
|
107
|
+
tile: "bg-warning/10 text-warning-strong",
|
|
108
|
+
text: "text-warning-strong"
|
|
109
109
|
},
|
|
110
110
|
info: {
|
|
111
111
|
icon: de,
|
|
112
|
-
tile: "bg-
|
|
113
|
-
text: "text-
|
|
112
|
+
tile: "bg-info/10 text-info-strong",
|
|
113
|
+
text: "text-info-strong"
|
|
114
114
|
},
|
|
115
115
|
neutral: {
|
|
116
116
|
icon: ue,
|
|
117
|
-
tile: "bg-
|
|
117
|
+
tile: "bg-surface-sunken text-muted",
|
|
118
118
|
text: "text-muted"
|
|
119
119
|
}
|
|
120
120
|
}, j = new Intl.RelativeTimeFormat(void 0, {
|
|
@@ -202,7 +202,7 @@ var pe = {
|
|
|
202
202
|
q()?.contains(t) || L.value?.contains(t) || Z(!1);
|
|
203
203
|
}
|
|
204
204
|
function Q(e) {
|
|
205
|
-
e && L.value?.contains(e.target) || X();
|
|
205
|
+
e?.target instanceof Node && L.value?.contains(e.target) || X();
|
|
206
206
|
}
|
|
207
207
|
function $(e) {
|
|
208
208
|
let t = e ? "addEventListener" : "removeEventListener";
|
|
@@ -237,7 +237,7 @@ var pe = {
|
|
|
237
237
|
"class"
|
|
238
238
|
]), (v(), o(r, { to: "body" }, [d(i, {
|
|
239
239
|
"enter-active-class": "transition duration-150 ease-out",
|
|
240
|
-
"enter-from-class":
|
|
240
|
+
"enter-from-class": "opacity-0 motion-safe:scale-95",
|
|
241
241
|
"leave-active-class": "transition duration-100 ease-in",
|
|
242
242
|
"leave-to-class": "opacity-0"
|
|
243
243
|
}, {
|
|
@@ -249,7 +249,7 @@ var pe = {
|
|
|
249
249
|
role: "dialog",
|
|
250
250
|
tabindex: "-1",
|
|
251
251
|
"aria-labelledby": F,
|
|
252
|
-
class: _(["fixed z-[90] flex w-[calc(380px*var(--ac-scale))] max-w-[calc(100vw-16px)] flex-col overflow-hidden rounded-
|
|
252
|
+
class: _(["fixed z-[90] flex w-[calc(380px*var(--ac-scale))] max-w-[calc(100vw-16px)] flex-col overflow-hidden rounded-14 border border-border bg-surface shadow-lg outline-none", z.value ? "origin-top-right" : "origin-bottom-right"]),
|
|
253
253
|
style: ee(R.value),
|
|
254
254
|
"data-ac-ds": "",
|
|
255
255
|
"data-testid": "ac-notification-menu-panel",
|
|
@@ -258,13 +258,13 @@ var pe = {
|
|
|
258
258
|
l("div", me, [
|
|
259
259
|
l("h2", {
|
|
260
260
|
id: F,
|
|
261
|
-
class: "text-lg font-semibold tracking-
|
|
261
|
+
class: "font-heading text-lg font-semibold tracking-tight text-heading"
|
|
262
262
|
}, C(f.label), 1),
|
|
263
263
|
H.value ? (v(), c("span", he, [u(C(H.value > 999 ? "999+" : H.value), 1), p[1] ||= l("span", { class: "sr-only" }, "\xA0unread", -1)])) : s("", !0),
|
|
264
264
|
Pe.value || H.value ? (v(), c("button", {
|
|
265
265
|
key: 1,
|
|
266
266
|
type: "button",
|
|
267
|
-
class: "ml-auto inline-flex h-
|
|
267
|
+
class: "ml-auto inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-8 px-2.5 text-xs font-medium text-muted transition-colors duration-200 hover:bg-surface-sunken hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
268
268
|
"data-ac-ds": "",
|
|
269
269
|
"data-testid": "ac-notification-menu-mark-all",
|
|
270
270
|
onClick: p[0] ||= (e) => k("markAllRead")
|
|
@@ -290,7 +290,7 @@ var pe = {
|
|
|
290
290
|
class: "flex-1"
|
|
291
291
|
})])), 64))])) : f.notifications.length ? (v(), c("ul", be, [(v(!0), c(n, null, b(f.notifications, (e) => (v(), c("li", { key: e.id }, [(v(), o(S(G(e.to, e.href)), h({ ref_for: !0 }, K(e.to, e.href), {
|
|
292
292
|
"data-notification-item": "",
|
|
293
|
-
class: ["relative flex w-full cursor-pointer gap-3 px-4 py-3 text-left no-underline outline-none transition-colors
|
|
293
|
+
class: ["relative flex w-full cursor-pointer gap-3 px-4 py-3 text-left no-underline outline-none transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", e.read ? "hover:bg-surface-sunken/50 focus-visible:bg-surface-sunken/50" : "bg-primary/8 hover:bg-primary/12 focus-visible:bg-primary/12"],
|
|
294
294
|
"data-ac-ds": "",
|
|
295
295
|
"data-testid": "ac-notification-menu-item",
|
|
296
296
|
onClick: (t) => Be(e)
|
|
@@ -320,25 +320,25 @@ var pe = {
|
|
|
320
320
|
])]),
|
|
321
321
|
_: 2
|
|
322
322
|
}, 1040, ["class", "onClick"]))]))), 128))])) : (v(), c("div", _e, [x(a.$slots, "empty", {}, () => [
|
|
323
|
-
l("span", ve, [d(w(oe), { class: "size-
|
|
323
|
+
l("span", ve, [d(w(oe), { class: "size-6" })]),
|
|
324
324
|
l("p", ye, C(f.emptyText), 1),
|
|
325
325
|
p[3] ||= l("p", { class: "max-w-64 text-base text-muted" }, "Backups, upgrades and alerts from your clusters show up here.", -1)
|
|
326
326
|
])])),
|
|
327
327
|
a.$slots.footer || Fe.value ? (v(), c("div", Oe, [x(a.$slots, "footer", { close: Z }, () => [(v(), o(S(G(f.viewAllTo, f.viewAllHref)), h(K(f.viewAllTo, f.viewAllHref), {
|
|
328
|
-
class: "flex h-
|
|
328
|
+
class: "group/link flex h-9 w-full cursor-pointer items-center justify-center gap-1.5 rounded-8 text-base font-semibold text-primary-strong no-underline outline-none transition-colors duration-200 hover:bg-accent-hover focus-visible:bg-accent-hover focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
|
|
329
329
|
"data-ac-ds": "",
|
|
330
330
|
"data-testid": "ac-notification-menu-view-all",
|
|
331
331
|
onClick: Ve
|
|
332
332
|
}), {
|
|
333
333
|
default: E(() => [u(C(f.viewAllLabel) + " ", 1), d(w(ie), {
|
|
334
|
-
class: "size-3.5",
|
|
334
|
+
class: "size-3.5 transition-transform duration-200 group-hover/link:translate-x-0.5 motion-reduce:transition-none",
|
|
335
335
|
"aria-hidden": "true"
|
|
336
336
|
})]),
|
|
337
337
|
_: 1
|
|
338
338
|
}, 16))])])) : s("", !0)
|
|
339
339
|
], 38)) : s("", !0)]),
|
|
340
340
|
_: 3
|
|
341
|
-
}
|
|
341
|
+
})]))]));
|
|
342
342
|
}
|
|
343
343
|
});
|
|
344
344
|
//#endregion
|