@ac-design/design-system 1.0.3 → 2.1.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 +71 -0
- package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +173 -0
- 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 +11 -0
- package/dist/lib/charts/index.js +7 -0
- package/dist/lib/charts/shared.d.ts +53 -0
- package/dist/lib/charts/shared.js +96 -0
- package/dist/lib/charts/xy.d.ts +69 -0
- package/dist/lib/charts/xy.js +73 -0
- package/dist/lib/compat.css +2770 -1061
- 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 +10 -1
- package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +139 -45
- 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 +47 -0
- package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +205 -0
- package/dist/lib/components/AcAvatar.vue.d.ts +7 -4
- package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +66 -61
- package/dist/lib/components/AcBadge.vue.d.ts +20 -7
- package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +67 -44
- 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 +46 -0
- package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +213 -0
- package/dist/lib/components/AcBreadcrumb.vue.d.ts +4 -1
- package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +36 -34
- package/dist/lib/components/AcBulkActionBar.js +5 -0
- package/dist/lib/components/AcBulkActionBar.vue.d.ts +45 -0
- package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +84 -0
- package/dist/lib/components/AcButton.vue.d.ts +13 -7
- package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +93 -47
- package/dist/lib/components/AcButtons.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcCard.vue.d.ts +42 -3
- package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +175 -14
- package/dist/lib/components/AcCellValue.vue.d.ts +6 -3
- package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +219 -178
- package/dist/lib/components/AcCheckBox.vue.d.ts +17 -3
- package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +113 -30
- 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 +102 -26
- 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 +114 -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 +57 -0
- package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +217 -0
- 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.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 +96 -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/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 +8 -8
- package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +634 -417
- package/dist/lib/components/AcDeleteModal.vue.d.ts +4 -4
- package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +57 -60
- package/dist/lib/components/AcDonutChart.js +5 -0
- package/dist/lib/components/AcDonutChart.vue.d.ts +83 -0
- package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +237 -0
- package/dist/lib/components/AcDropdown.vue.d.ts +5 -2
- package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +91 -78
- package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +11 -10
- package/dist/lib/components/AcDropdownItem.vue.d.ts +2 -2
- package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +18 -18
- 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/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 +139 -116
- 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 +3 -3
- package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/components/AcFormSection.vue.d.ts +8 -1
- package/dist/lib/components/AcFormSection.vue_vue_type_script_setup_true_lang.js +31 -21
- 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 -5
- package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +82 -28
- package/dist/lib/components/AcInfoTable.vue.d.ts +1 -1
- package/dist/lib/components/AcInfoTable.vue_vue_type_script_setup_true_lang.js +17 -13
- package/dist/lib/components/AcInput.vue.d.ts +4 -4
- package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +99 -91
- 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 +336 -0
- package/dist/lib/components/AcLineChart.js +5 -0
- package/dist/lib/components/AcLineChart.vue.d.ts +44 -0
- package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +175 -0
- 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.js +5 -0
- package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +48 -0
- package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +111 -0
- 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 +88 -64
- package/dist/lib/components/AcNavbar.vue.d.ts +8 -5
- package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +29 -21
- package/dist/lib/components/AcNavbarItem.vue.d.ts +2 -2
- package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +23 -24
- package/dist/lib/components/AcNotificationMenu.vue.d.ts +3 -3
- package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +139 -174
- 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 +241 -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 +22 -5
- package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +87 -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 +19 -4
- package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +85 -31
- package/dist/lib/components/AcResourceCard.vue.d.ts +3 -3
- package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
- package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +14 -9
- 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 +6 -6
- package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +246 -254
- 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 +32 -32
- package/dist/lib/components/AcSideTabs.vue.d.ts +2 -2
- package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +37 -37
- package/dist/lib/components/AcSidebar.vue.d.ts +6 -3
- package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +67 -57
- package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
- package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +46 -45
- 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/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.d.ts +3 -0
- package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +31 -19
- 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 +121 -0
- package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +97 -97
- package/dist/lib/components/AcTabs.vue.d.ts +9 -2
- package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +43 -28
- package/dist/lib/components/AcTag.vue.d.ts +2 -2
- 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 +289 -0
- package/dist/lib/components/AcTextarea.vue.d.ts +4 -4
- package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +85 -63
- package/dist/lib/components/AcThemeMode.vue.d.ts +3 -3
- package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +56 -24
- 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 +455 -0
- package/dist/lib/components/AcToaster.vue.d.ts +6 -3
- package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +115 -82
- package/dist/lib/components/AcTooltip.vue.d.ts +34 -14
- package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +203 -79
- package/dist/lib/components/AcUsageCard.vue_vue_type_script_setup_true_lang.js +27 -27
- package/dist/lib/components/AcUserMenu.vue.d.ts +23 -1
- package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +166 -115
- package/dist/lib/components/index.d.ts +21 -2
- package/dist/lib/components/status.d.ts +28 -0
- package/dist/lib/components/status.js +125 -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/composables/useToast.d.ts +17 -1
- package/dist/lib/composables/useToast.js +10 -2
- package/dist/lib/editor/theme.js +65 -62
- package/dist/lib/index.d.ts +21 -3
- package/dist/lib/index.js +99 -75
- package/dist/lib/theme.css +377 -273
- package/package.json +20 -4
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface Props {
|
|
2
|
+
/** What the setting is, in a few words: "Destroy", "Recovery console". */
|
|
3
|
+
title: string;
|
|
4
|
+
/** One or two sentences on what it does or what happens, e.g. "The VM is destroyed and its data can't be recovered." */
|
|
5
|
+
description?: string;
|
|
6
|
+
/** Dims the row and adds a "Coming soon" tag, for a setting that isn't wired up yet. Disable its action too. */
|
|
7
|
+
comingSoon?: boolean;
|
|
8
|
+
/** Text of the tag after the title. Defaults to "Coming soon" when `coming-soon` is set. */
|
|
9
|
+
tag?: string;
|
|
10
|
+
}
|
|
11
|
+
type __VLS_Slots = {
|
|
12
|
+
/** Extra content under the description, e.g. a field or a list of details. */
|
|
13
|
+
default?: () => unknown;
|
|
14
|
+
/** The control on the right: a button, a switch or a select. It moves under the text below 640px. */
|
|
15
|
+
action?: () => unknown;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
18
|
+
description: string;
|
|
19
|
+
tag: string;
|
|
20
|
+
comingSoon: boolean;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, openBlock as a, renderSlot as o, toDisplayString as s } from "vue";
|
|
2
|
+
//#region src/lib/components/AcSettingsRow.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var c = { class: "min-w-0" }, l = { class: "flex flex-wrap items-center gap-2" }, u = { class: "text-base font-medium text-heading" }, d = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "rounded-full bg-surface-sunken px-1.5 py-0.5 text-xm leading-none font-medium text-muted"
|
|
6
|
+
}, f = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "mt-0.5 text-xs leading-relaxed text-muted"
|
|
9
|
+
}, p = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "shrink-0"
|
|
12
|
+
}, m = /*@__PURE__*/ r({
|
|
13
|
+
__name: "AcSettingsRow",
|
|
14
|
+
props: {
|
|
15
|
+
title: {},
|
|
16
|
+
description: { default: "" },
|
|
17
|
+
comingSoon: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
21
|
+
tag: { default: "" }
|
|
22
|
+
},
|
|
23
|
+
setup(r) {
|
|
24
|
+
let m = r;
|
|
25
|
+
return (h, g) => (a(), t("div", {
|
|
26
|
+
class: i(["flex flex-col gap-3 border-t border-border/60 py-3.5 first:border-t-0 first:pt-0 last:pb-0 sm:flex-row sm:items-center sm:justify-between sm:gap-4", r.comingSoon && "opacity-60"]),
|
|
27
|
+
"data-ac-ds": "",
|
|
28
|
+
"data-testid": "ac-settings-row"
|
|
29
|
+
}, [n("div", c, [
|
|
30
|
+
n("div", l, [n("h4", u, s(r.title), 1), r.tag || r.comingSoon ? (a(), t("span", d, s(m.tag || "Coming soon"), 1)) : e("", !0)]),
|
|
31
|
+
r.description ? (a(), t("p", f, s(r.description), 1)) : e("", !0),
|
|
32
|
+
o(h.$slots, "default")
|
|
33
|
+
]), h.$slots.action ? (a(), t("div", p, [o(h.$slots, "action")])) : e("", !0)], 2));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
export { m 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/AcSidePanel.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 p-6" }, T = { class: "min-w-0 flex-1" }, E = ["id"], D = ["id"], O = { class: "flex h-7 shrink-0 items-center gap-3" }, k = {
|
|
5
5
|
"data-panel-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 flex-wrap items-center justify-between gap-3 border-t border-border
|
|
10
|
-
}, j = { class: "flex min-w-0 items-center gap-2" }, M = { class: "ml-auto flex items-center gap-
|
|
9
|
+
class: "flex shrink-0 flex-wrap items-center justify-between gap-3 border-t border-border p-6"
|
|
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: "AcSidePanel",
|
|
12
12
|
props: /*@__PURE__*/ c({
|
|
13
13
|
title: { default: "" },
|
|
@@ -35,27 +35,27 @@ var C = ["aria-labelledby", "aria-describedby"], w = { class: "flex shrink-0 ite
|
|
|
35
35
|
}),
|
|
36
36
|
emits: /*@__PURE__*/ c(["close"], ["update:open"]),
|
|
37
37
|
setup(s, { emit: c }) {
|
|
38
|
-
let P = s, F = v(s, "open"), I = c, L = {
|
|
38
|
+
let P = s, F = v(s, "open"), I = c, L = N.split(", ").map((e) => `[data-panel-body] ${e}`).join(", "), R = {
|
|
39
39
|
small: "sm:max-w-100",
|
|
40
40
|
normal: "sm:max-w-130",
|
|
41
41
|
large: "sm:max-w-200",
|
|
42
42
|
full: ""
|
|
43
|
-
},
|
|
44
|
-
function
|
|
43
|
+
}, z = _(), B = p(null), V = null;
|
|
44
|
+
function H() {
|
|
45
45
|
P.closable && (F.value = !1, I("close"));
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function U(e) {
|
|
48
48
|
if (e.key === "Escape") {
|
|
49
49
|
if (e.defaultPrevented) return;
|
|
50
|
-
e.stopPropagation(),
|
|
51
|
-
} else if (e.key === "Tab" &&
|
|
52
|
-
let t = [...
|
|
50
|
+
e.stopPropagation(), H();
|
|
51
|
+
} else if (e.key === "Tab" && B.value) {
|
|
52
|
+
let t = [...B.value.querySelectorAll(N)].filter((e) => e.offsetParent !== null);
|
|
53
53
|
if (!t.length) return;
|
|
54
54
|
let n = t[0], r = t[t.length - 1];
|
|
55
55
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function W(e) {
|
|
59
59
|
let t = document.body, n = Number(t.dataset.acModals ?? 0) + (e ? 1 : -1);
|
|
60
60
|
if (t.dataset.acModals = String(Math.max(n, 0)), e && n === 1) {
|
|
61
61
|
let e = window.innerWidth - document.documentElement.clientWidth;
|
|
@@ -64,12 +64,12 @@ var C = ["aria-labelledby", "aria-describedby"], w = { class: "flex shrink-0 ite
|
|
|
64
64
|
}
|
|
65
65
|
return y(F, async (e, t) => {
|
|
66
66
|
if (e) {
|
|
67
|
-
|
|
68
|
-
let e =
|
|
69
|
-
((e && (e.matches(N) ? e : e.querySelector(N))) ??
|
|
70
|
-
} else t && (
|
|
67
|
+
V = document.activeElement, W(!0), await l();
|
|
68
|
+
let e = B.value?.querySelector("[autofocus]");
|
|
69
|
+
((e && (e.matches(N) ? e : e.querySelector(N))) ?? B.value?.querySelector(L) ?? B.value)?.focus();
|
|
70
|
+
} else t && (W(!1), V?.focus?.());
|
|
71
71
|
}, { immediate: !0 }), d(() => {
|
|
72
|
-
F.value &&
|
|
72
|
+
F.value && W(!1);
|
|
73
73
|
}), (c, l) => (f(), n(e, { to: "body" }, [o(t, {
|
|
74
74
|
"enter-active-class": "transition-opacity duration-300 ease-out",
|
|
75
75
|
"enter-from-class": s.side === "right" ? "opacity-0 [&_[data-panel]]:translate-x-full" : "opacity-0 [&_[data-panel]]:-translate-x-full",
|
|
@@ -78,43 +78,43 @@ var C = ["aria-labelledby", "aria-describedby"], w = { class: "flex shrink-0 ite
|
|
|
78
78
|
}, {
|
|
79
79
|
default: b(() => [F.value ? (f(), i("div", {
|
|
80
80
|
key: 0,
|
|
81
|
-
class: "fixed inset-0 z-[80] bg-
|
|
81
|
+
class: "fixed inset-0 z-[80] bg-black/50",
|
|
82
82
|
"data-ac-ds": "",
|
|
83
83
|
"data-testid": "ac-side-panel",
|
|
84
|
-
onKeydown:
|
|
85
|
-
onMousedown: l[0] ||= x((e) => s.closeOnOutsideClick &&
|
|
84
|
+
onKeydown: U,
|
|
85
|
+
onMousedown: l[0] ||= x((e) => s.closeOnOutsideClick && H(), ["self"])
|
|
86
86
|
}, [a("div", {
|
|
87
87
|
ref_key: "panel",
|
|
88
|
-
ref:
|
|
88
|
+
ref: B,
|
|
89
89
|
"data-panel": "",
|
|
90
90
|
role: "dialog",
|
|
91
91
|
"aria-modal": "true",
|
|
92
|
-
"aria-labelledby": s.title ? `${g(
|
|
93
|
-
"aria-describedby": s.description ? `${g(
|
|
92
|
+
"aria-labelledby": s.title ? `${g(z)}-title` : void 0,
|
|
93
|
+
"aria-describedby": s.description ? `${g(z)}-desc` : void 0,
|
|
94
94
|
tabindex: "-1",
|
|
95
95
|
class: u(["absolute inset-y-0 flex w-full flex-col bg-surface shadow-xl outline-none transition-transform duration-300 ease-out-soft motion-reduce:transition-none", [
|
|
96
96
|
s.side === "right" ? "right-0" : "left-0",
|
|
97
97
|
s.size !== "full" && (s.side === "right" ? "border-border sm:border-l" : "border-border sm:border-r"),
|
|
98
|
-
|
|
98
|
+
R[s.size]
|
|
99
99
|
]])
|
|
100
100
|
}, [
|
|
101
|
-
a("header", w, [a("div", T, [m(c.$slots, "header", {}, () => [a("
|
|
102
|
-
id: `${g(
|
|
103
|
-
class: "text-
|
|
101
|
+
a("header", w, [a("div", T, [m(c.$slots, "header", {}, () => [a("h2", {
|
|
102
|
+
id: `${g(z)}-title`,
|
|
103
|
+
class: "text-xl leading-7 font-semibold text-heading"
|
|
104
104
|
}, h(s.title), 9, E), s.description ? (f(), i("p", {
|
|
105
105
|
key: 0,
|
|
106
|
-
id: `${g(
|
|
107
|
-
class: "mt-
|
|
106
|
+
id: `${g(z)}-desc`,
|
|
107
|
+
class: "mt-1 text-base text-muted"
|
|
108
108
|
}, h(s.description), 9, D)) : r("", !0)])]), a("div", O, [m(c.$slots, "header-actions"), s.closable ? (f(), i("button", {
|
|
109
109
|
key: 0,
|
|
110
110
|
type: "button",
|
|
111
|
-
class: "inline-flex
|
|
111
|
+
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",
|
|
112
112
|
"aria-label": "Close",
|
|
113
113
|
"data-ac-ds": "",
|
|
114
114
|
"data-testid": "ac-side-panel-close",
|
|
115
|
-
onClick:
|
|
115
|
+
onClick: H
|
|
116
116
|
}, [o(g(S), {
|
|
117
|
-
class: "size-
|
|
117
|
+
class: "size-5",
|
|
118
118
|
"aria-hidden": "true"
|
|
119
119
|
})])) : r("", !0)])]),
|
|
120
120
|
a("div", k, [m(c.$slots, "default")]),
|
|
@@ -31,7 +31,7 @@ export interface Props {
|
|
|
31
31
|
label?: string;
|
|
32
32
|
/** Sticks the list to the top while the page scrolls. */
|
|
33
33
|
sticky?: boolean;
|
|
34
|
-
/** Sticky offset from the top of the scroll area, e.g. `"
|
|
34
|
+
/** Sticky offset from the top of the scroll area, e.g. `"72px"` under the navbar. */
|
|
35
35
|
top?: string;
|
|
36
36
|
/** Space kept free at the bottom while sticky, e.g. `"28px"` above a status bar. */
|
|
37
37
|
bottom?: string;
|
|
@@ -77,8 +77,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
77
77
|
bottom: string;
|
|
78
78
|
top: string;
|
|
79
79
|
mobile: "select" | "scroll";
|
|
80
|
-
collapsible: boolean;
|
|
81
80
|
sticky: boolean;
|
|
81
|
+
collapsible: boolean;
|
|
82
82
|
breakpoint: number;
|
|
83
83
|
offsetSelectors: string[];
|
|
84
84
|
hideTabs: boolean;
|
|
@@ -4,16 +4,16 @@ import { ChevronRight as se, PanelLeftClose as ce, PanelLeftOpen as le } from "@
|
|
|
4
4
|
//#region src/lib/components/AcSideTabs.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var ue = {
|
|
6
6
|
key: 0,
|
|
7
|
-
class: "border-b border-border
|
|
7
|
+
class: "border-b border-border bg-surface px-4 py-3"
|
|
8
8
|
}, de = ["aria-label"], fe = ["aria-label"], pe = {
|
|
9
9
|
key: 0,
|
|
10
|
-
class: "mb-
|
|
10
|
+
class: "mb-2 truncate px-1 pt-1 text-sm font-semibold tracking-[0.08em] text-muted uppercase"
|
|
11
11
|
}, me = {
|
|
12
12
|
key: 1,
|
|
13
|
-
class: "mx-
|
|
13
|
+
class: "mx-1 mb-2 h-px bg-muted/20",
|
|
14
14
|
"aria-hidden": "true"
|
|
15
15
|
}, he = {
|
|
16
|
-
class: "flex flex-col gap-
|
|
16
|
+
class: "flex flex-col gap-1",
|
|
17
17
|
role: "list"
|
|
18
18
|
}, ge = {
|
|
19
19
|
key: 1,
|
|
@@ -69,24 +69,24 @@ var ue = {
|
|
|
69
69
|
emits: /*@__PURE__*/ l(["select"], ["update:modelValue", "update:collapsed"]),
|
|
70
70
|
setup(s, { emit: l }) {
|
|
71
71
|
let C = s, w = b(s, "modelValue"), T = b(s, "collapsed"), E = l, D = {
|
|
72
|
-
neutral: "bg-surface-sunken text-
|
|
73
|
-
primary: "bg-primary
|
|
74
|
-
info: "bg-
|
|
75
|
-
success: "bg-
|
|
76
|
-
warning: "bg-
|
|
77
|
-
danger: "bg-
|
|
72
|
+
neutral: "border border-border bg-surface-sunken text-muted",
|
|
73
|
+
primary: "bg-primary text-white",
|
|
74
|
+
info: "bg-info text-white",
|
|
75
|
+
success: "bg-success text-white",
|
|
76
|
+
warning: "bg-warning text-on-warning",
|
|
77
|
+
danger: "bg-danger text-white"
|
|
78
78
|
}, we = {
|
|
79
|
-
neutral: "bg-
|
|
79
|
+
neutral: "bg-muted",
|
|
80
80
|
primary: "bg-primary",
|
|
81
81
|
info: "bg-info",
|
|
82
82
|
success: "bg-success",
|
|
83
83
|
warning: "bg-warning",
|
|
84
84
|
danger: "bg-danger"
|
|
85
85
|
}, Te = {
|
|
86
|
-
none: ["text-
|
|
87
|
-
danger: ["text-
|
|
88
|
-
warning: ["text-
|
|
89
|
-
success: ["text-
|
|
86
|
+
none: ["border-transparent text-heading/80 hover:border-border hover:bg-accent-hover hover:text-heading", "border-primary/35 bg-primary/10 text-heading shadow-xs shadow-primary/10"],
|
|
87
|
+
danger: ["border-transparent text-danger-strong hover:border-danger/25 hover:bg-danger/10", "border-danger/25 bg-danger/10 text-danger-strong"],
|
|
88
|
+
warning: ["border-transparent text-warning-strong hover:border-warning/30 hover:bg-warning/10", "border-warning/30 bg-warning/10 text-warning-strong"],
|
|
89
|
+
success: ["border-transparent text-success-strong hover:border-success/25 hover:bg-success/10", "border-success/25 bg-success/10 text-success-strong"]
|
|
90
90
|
}, O = ae(), Ee = oe(), k = c()?.appContext, A = k?.components.RouterLink, j = k?.config.globalProperties.$router, M = h(null), N = h(null), P = h(!1), F = h(0), I = h({}), L = null, R = null, z = n(() => !!Ee.default), B = n(() => T.value && !P.value), V = n(() => C.items.flatMap((e) => e.children?.length ? e.children : [e])), De = n(() => {
|
|
91
91
|
let e = [];
|
|
92
92
|
for (let t of C.items) {
|
|
@@ -228,7 +228,7 @@ var ue = {
|
|
|
228
228
|
])])) : P.value ? (m(), a("nav", {
|
|
229
229
|
key: 1,
|
|
230
230
|
"aria-label": s.label,
|
|
231
|
-
class: "border-b border-border
|
|
231
|
+
class: "border-b border-border bg-surface"
|
|
232
232
|
}, [o("ul", {
|
|
233
233
|
ref_key: "scroller",
|
|
234
234
|
ref: N,
|
|
@@ -239,35 +239,35 @@ var ue = {
|
|
|
239
239
|
class: "shrink-0"
|
|
240
240
|
}, [(m(), r(_(K(e)), u({ ref_for: !0 }, q(e), {
|
|
241
241
|
"data-side-tab": "",
|
|
242
|
-
class: ["inline-flex h-
|
|
242
|
+
class: ["inline-flex h-9 items-center gap-2 rounded-10 border px-3 text-base font-medium whitespace-nowrap no-underline transition-all duration-200 select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset motion-reduce:transition-none", J(e)],
|
|
243
243
|
onClick: (t) => Y(e, t)
|
|
244
244
|
}), {
|
|
245
245
|
default: S(() => [
|
|
246
246
|
e.icon ? (m(), r(_(e.icon), {
|
|
247
247
|
key: 0,
|
|
248
|
-
class: "size-4 shrink-0
|
|
248
|
+
class: f(["size-4 shrink-0", !e.tone && (U(e) ? "text-primary" : "text-muted")]),
|
|
249
249
|
"aria-hidden": "true"
|
|
250
|
-
})) : i("", !0),
|
|
250
|
+
}, null, 8, ["class"])) : i("", !0),
|
|
251
251
|
ee(" " + v(e.label) + " ", 1),
|
|
252
252
|
e.badge !== void 0 && e.badge !== "" ? (m(), a("span", {
|
|
253
253
|
key: 1,
|
|
254
|
-
class: f(["inline-flex h-
|
|
254
|
+
class: f(["inline-flex h-5 min-w-5 items-center justify-center rounded-6 px-2 text-xs leading-none font-medium tabular-nums", D[e.badgeColor ?? "neutral"]])
|
|
255
255
|
}, v(e.badge), 3)) : i("", !0)
|
|
256
256
|
]),
|
|
257
257
|
_: 2
|
|
258
258
|
}, 1040, ["class", "onClick"]))]))), 128))], 544)], 8, de)) : (m(), a("div", {
|
|
259
259
|
key: 2,
|
|
260
|
-
class: "shrink-0 border-r border-border
|
|
260
|
+
class: "shrink-0 border-r border-border bg-surface transition-[width] duration-200 ease-out-soft motion-reduce:transition-none",
|
|
261
261
|
style: p(je.value)
|
|
262
262
|
}, [o("nav", {
|
|
263
263
|
"aria-label": s.label,
|
|
264
|
-
class: f(["ac-scrollbar flex flex-col gap-
|
|
264
|
+
class: f(["ac-scrollbar flex flex-col gap-4", [s.sticky && "sticky", B.value ? "p-2" : "p-3"]]),
|
|
265
265
|
style: p(Ae.value),
|
|
266
266
|
onKeydown: X
|
|
267
267
|
}, [(m(!0), a(t, null, g(De.value, (e, n) => (m(), a("div", { key: e.name || `section-${n}` }, [e.name && !B.value ? (m(), a("p", pe, v(e.name), 1)) : e.name && n > 0 ? (m(), a("div", me)) : i("", !0), o("ul", he, [(m(!0), a(t, null, g(e.items, (e) => (m(), a("li", { key: e.key }, [e.children?.length ? (m(), a(t, { key: 1 }, [o("button", {
|
|
268
268
|
type: "button",
|
|
269
269
|
"data-side-tab": "",
|
|
270
|
-
class: f(["group flex
|
|
270
|
+
class: f(["group flex w-full cursor-pointer items-center gap-3 rounded-10 border py-2 text-left text-base font-medium transition-all duration-200 select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none", [B.value ? "h-9.5 justify-center" : "px-3", B.value && W(e) ? "border-primary/35 bg-primary/10 text-heading shadow-xs shadow-primary/10" : ["border-transparent hover:border-border hover:bg-accent-hover hover:text-heading", W(e) ? "text-heading" : "text-heading/80"]]]),
|
|
271
271
|
disabled: e.disabled || void 0,
|
|
272
272
|
"aria-expanded": B.value ? void 0 : G(e),
|
|
273
273
|
"aria-controls": `${y(O)}-${e.key}`,
|
|
@@ -276,7 +276,7 @@ var ue = {
|
|
|
276
276
|
}, [
|
|
277
277
|
e.icon || B.value ? (m(), a("span", {
|
|
278
278
|
key: 0,
|
|
279
|
-
class: f(["inline-flex size-4 shrink-0 items-center justify-center", W(e) ? "text-primary
|
|
279
|
+
class: f(["inline-flex size-4 shrink-0 items-center justify-center", W(e) ? "text-primary" : "text-muted group-hover:text-heading"]),
|
|
280
280
|
"aria-hidden": "true"
|
|
281
281
|
}, [e.icon ? (m(), r(_(e.icon), {
|
|
282
282
|
key: 0,
|
|
@@ -285,32 +285,32 @@ var ue = {
|
|
|
285
285
|
o("span", { class: f(B.value ? "sr-only" : "min-w-0 flex-1 truncate") }, v(e.label), 3),
|
|
286
286
|
!B.value && e.badge !== void 0 && e.badge !== "" ? (m(), a("span", {
|
|
287
287
|
key: 1,
|
|
288
|
-
class: f(["inline-flex h-
|
|
288
|
+
class: f(["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-6 px-2 text-xs leading-none font-medium tabular-nums", D[e.badgeColor ?? "neutral"]])
|
|
289
289
|
}, v(e.badge), 3)) : i("", !0),
|
|
290
290
|
B.value ? i("", !0) : (m(), r(y(se), {
|
|
291
291
|
key: 2,
|
|
292
|
-
class: f(["size-
|
|
292
|
+
class: f(["size-4 shrink-0 text-muted transition-transform duration-200 motion-reduce:transition-none", G(e) && "rotate-90"]),
|
|
293
293
|
"aria-hidden": "true"
|
|
294
294
|
}, null, 8, ["class"]))
|
|
295
295
|
], 10, _e), o("ul", {
|
|
296
296
|
id: `${y(O)}-${e.key}`,
|
|
297
297
|
role: "list",
|
|
298
|
-
class: f(["mt-
|
|
298
|
+
class: f(["mt-1 ml-5 flex-col gap-1 border-l border-border pl-2", G(e) && !B.value ? "flex" : "hidden"])
|
|
299
299
|
}, [(m(!0), a(t, null, g(e.children, (e) => (m(), a("li", { key: e.key }, [(m(), r(_(K(e)), u({ ref_for: !0 }, q(e), {
|
|
300
300
|
"data-side-tab": "",
|
|
301
|
-
class: ["group flex
|
|
301
|
+
class: ["group flex w-full items-center gap-3 rounded-10 border px-3 py-2 text-left text-base font-medium no-underline transition-all duration-200 select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset motion-reduce:transition-none", J(e)],
|
|
302
302
|
onClick: (t) => Y(e, t)
|
|
303
303
|
}), {
|
|
304
304
|
default: S(() => [
|
|
305
305
|
e.icon ? (m(), r(_(e.icon), {
|
|
306
306
|
key: 0,
|
|
307
|
-
class: f(["size-4 shrink-0", !e.tone &&
|
|
307
|
+
class: f(["size-4 shrink-0", !e.tone && (U(e) ? "text-primary" : "text-muted group-hover:text-heading")]),
|
|
308
308
|
"aria-hidden": "true"
|
|
309
309
|
}, null, 8, ["class"])) : i("", !0),
|
|
310
310
|
o("span", be, v(e.label), 1),
|
|
311
311
|
e.badge !== void 0 && e.badge !== "" ? (m(), a("span", {
|
|
312
312
|
key: 1,
|
|
313
|
-
class: f(["inline-flex h-
|
|
313
|
+
class: f(["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-6 px-2 text-xs leading-none font-medium tabular-nums", D[e.badgeColor ?? "neutral"]])
|
|
314
314
|
}, v(e.badge), 3)) : i("", !0)
|
|
315
315
|
]),
|
|
316
316
|
_: 2
|
|
@@ -319,14 +319,14 @@ var ue = {
|
|
|
319
319
|
ref_for: !0
|
|
320
320
|
}, q(e), {
|
|
321
321
|
"data-side-tab": "",
|
|
322
|
-
class: ["group relative flex
|
|
322
|
+
class: ["group relative flex w-full items-center gap-3 rounded-10 border py-2 text-left text-base font-medium no-underline transition-all duration-200 select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset motion-reduce:transition-none", [J(e), B.value ? "h-9.5 justify-center" : "px-3"]],
|
|
323
323
|
title: B.value ? e.label : void 0,
|
|
324
324
|
onClick: (t) => Y(e, t)
|
|
325
325
|
}), {
|
|
326
326
|
default: S(() => [
|
|
327
327
|
e.icon || B.value ? (m(), a("span", {
|
|
328
328
|
key: 0,
|
|
329
|
-
class: f(["inline-flex size-4 shrink-0 items-center justify-center", !e.tone &&
|
|
329
|
+
class: f(["inline-flex size-4 shrink-0 items-center justify-center", !e.tone && (U(e) ? "text-primary" : "text-muted group-hover:text-heading")]),
|
|
330
330
|
"aria-hidden": "true"
|
|
331
331
|
}, [e.icon ? (m(), r(_(e.icon), {
|
|
332
332
|
key: 0,
|
|
@@ -335,11 +335,11 @@ var ue = {
|
|
|
335
335
|
o("span", { class: f(B.value ? "sr-only" : "min-w-0 flex-1 truncate") }, v(e.label), 3),
|
|
336
336
|
e.badge !== void 0 && e.badge !== "" ? (m(), a(t, { key: 1 }, [B.value ? (m(), a("span", {
|
|
337
337
|
key: 0,
|
|
338
|
-
class: f(["absolute top-1 right-1 size-
|
|
338
|
+
class: f(["absolute top-1 right-1 size-2 rounded-full", we[e.badgeColor ?? "neutral"]]),
|
|
339
339
|
"aria-hidden": "true"
|
|
340
340
|
}, null, 2)) : (m(), a("span", {
|
|
341
341
|
key: 1,
|
|
342
|
-
class: f(["inline-flex h-
|
|
342
|
+
class: f(["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-6 px-2 text-xs leading-none font-medium tabular-nums", D[e.badgeColor ?? "neutral"]])
|
|
343
343
|
}, v(e.badge), 3))], 64)) : i("", !0)
|
|
344
344
|
]),
|
|
345
345
|
_: 2
|
|
@@ -350,18 +350,18 @@ var ue = {
|
|
|
350
350
|
]))]))), 128))])]))), 128)), s.collapsible ? (m(), a("button", {
|
|
351
351
|
key: 0,
|
|
352
352
|
type: "button",
|
|
353
|
-
class: f(["mt-auto flex
|
|
353
|
+
class: f(["group mt-auto flex w-full cursor-pointer items-center gap-3 rounded-10 border border-transparent py-2 text-base font-medium text-heading/80 transition-all duration-200 hover:border-border hover:bg-accent-hover hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset motion-reduce:transition-none", B.value ? "h-9.5 justify-center" : "px-3"]),
|
|
354
354
|
"aria-label": B.value ? `Expand ${s.label}` : `Collapse ${s.label}`,
|
|
355
355
|
"aria-expanded": !T.value,
|
|
356
356
|
title: B.value ? "Expand" : void 0,
|
|
357
357
|
onClick: c[0] ||= (e) => T.value = !T.value
|
|
358
358
|
}, [B.value ? (m(), r(y(le), {
|
|
359
359
|
key: 0,
|
|
360
|
-
class: "size-4 shrink-0",
|
|
360
|
+
class: "size-4 shrink-0 text-muted group-hover:text-heading",
|
|
361
361
|
"aria-hidden": "true"
|
|
362
362
|
})) : (m(), r(y(ce), {
|
|
363
363
|
key: 1,
|
|
364
|
-
class: "size-4 shrink-0",
|
|
364
|
+
class: "size-4 shrink-0 text-muted group-hover:text-heading",
|
|
365
365
|
"aria-hidden": "true"
|
|
366
366
|
})), B.value ? i("", !0) : (m(), a("span", Se, "Collapse"))], 10, xe)) : i("", !0)], 46, fe)], 4))], 64)), z.value ? (m(), a("div", Ce, [ie(n.$slots, "default", {
|
|
367
367
|
active: w.value,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface Props {
|
|
2
2
|
/** Accessible name of the navigation landmark. */
|
|
3
3
|
label?: string;
|
|
4
|
-
/** Dark sidebar on `bg-sidebar` in both themes, like
|
|
4
|
+
/** Dark sidebar on `bg-sidebar` (#171717) in both themes, like cloud-ui's dark theme. Everything inside uses the dark tokens. In the app's dark theme the sidebar uses this colour anyway. */
|
|
5
5
|
dark?: boolean;
|
|
6
6
|
/** Shows a Collapse button at the bottom that toggles `v-model:collapsed`. It's hidden in the mobile drawer. */
|
|
7
7
|
collapsible?: boolean;
|
|
@@ -11,12 +11,12 @@ export interface Props {
|
|
|
11
11
|
breakpoint?: number;
|
|
12
12
|
/** With the sidebar collapsed to the rail, opens it to full width over the page while the pointer or keyboard focus is inside, then folds it back. The page doesn't shift. */
|
|
13
13
|
hoverExpand?: boolean;
|
|
14
|
-
/** Offset from the top of the viewport on desktop, e.g. `"
|
|
14
|
+
/** Offset from the top of the viewport on desktop, e.g. `"72px"` under a full-width navbar. The height shrinks to match. */
|
|
15
15
|
top?: string;
|
|
16
16
|
}
|
|
17
17
|
type __VLS_Props = Props;
|
|
18
18
|
type __VLS_Slots = {
|
|
19
|
-
/** The
|
|
19
|
+
/** The 72px top bar, level with the navbar: logo or cluster switcher. Receives `collapsed` so you can show a small logo in the rail. */
|
|
20
20
|
header?: (props: {
|
|
21
21
|
collapsed: boolean;
|
|
22
22
|
}) => unknown;
|
|
@@ -29,6 +29,7 @@ type __VLS_Slots = {
|
|
|
29
29
|
};
|
|
30
30
|
/** Collapses or expands on desktop, and opens or closes the drawer on mobile. Wire it to a navbar menu button. */
|
|
31
31
|
declare function toggle(): void;
|
|
32
|
+
declare function revealActive(): void;
|
|
32
33
|
type __VLS_ModelProps = {
|
|
33
34
|
/** Icon-only 56px rail on desktop. Bind with `v-model:collapsed`. */
|
|
34
35
|
"collapsed"?: boolean;
|
|
@@ -38,6 +39,8 @@ type __VLS_ModelProps = {
|
|
|
38
39
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
39
40
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
40
41
|
toggle: typeof toggle;
|
|
42
|
+
/** Scrolls the current page's item into view when it's outside the visible list. Call it after the route changes. */
|
|
43
|
+
revealActive: typeof revealActive;
|
|
41
44
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
42
45
|
"update:collapsed": (value: boolean) => any;
|
|
43
46
|
"update:mobileOpen": (value: boolean) => any;
|