@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
|
@@ -5,14 +5,14 @@ var te = [
|
|
|
5
5
|
"role",
|
|
6
6
|
"aria-modal",
|
|
7
7
|
"aria-label"
|
|
8
|
-
],
|
|
8
|
+
], D = ["aria-label"], ne = {
|
|
9
9
|
role: "list",
|
|
10
|
-
class: "flex flex-col gap-
|
|
11
|
-
},
|
|
10
|
+
class: "flex flex-col gap-1"
|
|
11
|
+
}, re = {
|
|
12
12
|
key: 0,
|
|
13
13
|
role: "list",
|
|
14
|
-
class: "flex flex-col
|
|
15
|
-
},
|
|
14
|
+
class: "flex flex-col"
|
|
15
|
+
}, ie = ["aria-label", "title"], O = { key: 0 }, k = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", ae = 120, A = 180, j = /*@__PURE__*/ c({
|
|
16
16
|
inheritAttrs: !1,
|
|
17
17
|
__name: "AcSidebar",
|
|
18
18
|
props: /*@__PURE__*/ l({
|
|
@@ -49,9 +49,9 @@ var te = [
|
|
|
49
49
|
}),
|
|
50
50
|
emits: ["update:collapsed", "update:mobileOpen"],
|
|
51
51
|
setup(c, { expose: l }) {
|
|
52
|
-
let j = c, M = x(c, "collapsed"), N = x(c, "mobileOpen"), P = g(null), F = g(null), I = g(!j.contained && typeof window < "u" && window.matchMedia(
|
|
52
|
+
let j = c, M = x(c, "collapsed"), N = x(c, "mobileOpen"), P = g(null), F = g(null), I = g(!j.contained && typeof window < "u" && window.matchMedia(Y()).matches), L = null, R = null, z = null, B = g(!1), V = n(() => j.hoverExpand && M.value && !I.value && B.value), H = n(() => M.value && !I.value && !V.value), U = n(() => M.value && !I.value), W = !1, G;
|
|
53
53
|
function K(e) {
|
|
54
|
-
j.hoverExpand && (e && W || (clearTimeout(G), G = setTimeout(() => B.value = e, e ?
|
|
54
|
+
j.hoverExpand && (e && W || (clearTimeout(G), G = setTimeout(() => B.value = e, e ? ae : A)));
|
|
55
55
|
}
|
|
56
56
|
function q() {
|
|
57
57
|
W = !0, clearTimeout(G), B.value = !1, M.value = !M.value;
|
|
@@ -62,57 +62,57 @@ var te = [
|
|
|
62
62
|
function se(e) {
|
|
63
63
|
P.value?.contains(e.relatedTarget) || K(!1);
|
|
64
64
|
}
|
|
65
|
-
let J = n(() => I.value && N.value),
|
|
65
|
+
let J = n(() => I.value && N.value), ce = n(() => j.dark), le = n(() => I.value || j.contained ? void 0 : {
|
|
66
66
|
top: j.top,
|
|
67
67
|
height: `calc(100dvh - ${j.top})`
|
|
68
|
-
}),
|
|
69
|
-
let e = j.dark ? "dark border-r border-border
|
|
68
|
+
}), ue = n(() => {
|
|
69
|
+
let e = j.dark ? "dark border-r border-border bg-sidebar text-body shadow-sm" : "border-r border-border bg-sidebar-panel/95 text-body shadow-sm backdrop-blur-sm";
|
|
70
70
|
return I.value ? [
|
|
71
71
|
e,
|
|
72
72
|
j.contained ? "absolute" : "fixed",
|
|
73
|
-
"inset-y-0 left-0 z-[80] w-
|
|
73
|
+
"inset-y-0 left-0 z-[80] w-64 duration-300 ease-out-soft motion-reduce:transition-none",
|
|
74
74
|
N.value ? "visible translate-x-0 transition-[translate]" : "invisible -translate-x-full transition-[translate,visibility]"
|
|
75
75
|
] : [
|
|
76
76
|
e,
|
|
77
77
|
V.value ? [j.contained ? "absolute inset-y-0 left-0" : "fixed left-0", "z-30 shadow-xl"] : j.contained ? "relative h-full" : "sticky",
|
|
78
78
|
"transition-[width] duration-200 ease-out-soft motion-reduce:transition-none",
|
|
79
|
-
H.value ? "w-14" : "w-
|
|
79
|
+
H.value ? "w-14" : j.contained ? "w-64" : "w-64 lg:w-52 xl:w-64"
|
|
80
80
|
];
|
|
81
81
|
});
|
|
82
|
-
function
|
|
82
|
+
function Y() {
|
|
83
83
|
return `(max-width: ${j.breakpoint - .02}px)`;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function de() {
|
|
86
86
|
I.value ? N.value = !N.value : M.value = !M.value;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function fe() {
|
|
89
89
|
M.value = !1;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function pe() {
|
|
92
92
|
I.value && (N.value = !1);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function X() {
|
|
95
95
|
N.value = !1;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function me(e) {
|
|
98
98
|
if (J.value && P.value) {
|
|
99
|
-
if (e.key === "Escape") e.stopPropagation(),
|
|
99
|
+
if (e.key === "Escape") e.stopPropagation(), X();
|
|
100
100
|
else if (e.key === "Tab") {
|
|
101
|
-
let t = [...P.value.querySelectorAll(
|
|
101
|
+
let t = [...P.value.querySelectorAll(k)].filter((e) => e.offsetParent !== null);
|
|
102
102
|
if (!t.length) return;
|
|
103
103
|
let n = t[0], r = t[t.length - 1];
|
|
104
104
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Z(e) {
|
|
109
109
|
I.value = e.matches;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Q(e) {
|
|
112
112
|
let t = document.body, n = Number(t.dataset.acModals ?? 0) + (e ? 1 : -1);
|
|
113
113
|
t.dataset.acModals = String(Math.max(n, 0)), e && n === 1 ? t.style.overflow = "hidden" : !e && n <= 0 && (t.style.overflow = "");
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function $() {
|
|
116
116
|
let e = F.value, t = e?.querySelector("[aria-current=\"page\"]");
|
|
117
117
|
if (!e || !t) return;
|
|
118
118
|
let n = t.getBoundingClientRect().top - e.getBoundingClientRect().top;
|
|
@@ -121,22 +121,25 @@ var te = [
|
|
|
121
121
|
return h("ac-sidebar", {
|
|
122
122
|
rail: H,
|
|
123
123
|
isMobile: I,
|
|
124
|
-
dark:
|
|
125
|
-
expand:
|
|
126
|
-
navigate:
|
|
124
|
+
dark: ce,
|
|
125
|
+
expand: fe,
|
|
126
|
+
navigate: pe
|
|
127
127
|
}), S(J, async (e, t) => {
|
|
128
|
-
e ? (L = document.activeElement, j.contained ||
|
|
128
|
+
e ? (L = document.activeElement, j.contained || Q(!0), await ee(), (P.value?.querySelector("[aria-current=\"page\"]") ?? P.value?.querySelector(k))?.focus()) : t && (j.contained || Q(!1), L?.focus?.());
|
|
129
129
|
}), S(I, (e) => {
|
|
130
130
|
e || (N.value = !1);
|
|
131
131
|
}), p(() => {
|
|
132
132
|
if (j.contained) {
|
|
133
133
|
let e = P.value?.parentElement;
|
|
134
134
|
e && (z = new ResizeObserver(([e]) => I.value = (e?.contentRect.width ?? 0) < j.breakpoint), z.observe(e));
|
|
135
|
-
} else R = window.matchMedia(
|
|
136
|
-
|
|
135
|
+
} else R = window.matchMedia(Y()), I.value = R.matches, R.addEventListener("change", Z);
|
|
136
|
+
$();
|
|
137
137
|
}), f(() => {
|
|
138
|
-
clearTimeout(G), R?.removeEventListener("change",
|
|
139
|
-
}), l({
|
|
138
|
+
clearTimeout(G), R?.removeEventListener("change", Z), z?.disconnect(), J.value && !j.contained && Q(!1);
|
|
139
|
+
}), l({
|
|
140
|
+
toggle: de,
|
|
141
|
+
revealActive: $
|
|
142
|
+
}), (n, l) => (m(), a(e, null, [
|
|
140
143
|
s(t, {
|
|
141
144
|
"enter-active-class": "transition-opacity duration-200",
|
|
142
145
|
"enter-from-class": "opacity-0",
|
|
@@ -145,11 +148,11 @@ var te = [
|
|
|
145
148
|
}, {
|
|
146
149
|
default: C(() => [J.value ? (m(), a("div", {
|
|
147
150
|
key: 0,
|
|
148
|
-
class: d(["inset-0 z-[79] bg-overlay", c.contained ? "absolute" : "fixed"]),
|
|
151
|
+
class: d(["inset-0 z-[79] bg-overlay backdrop-blur-[2px]", c.contained ? "absolute" : "fixed"]),
|
|
149
152
|
"aria-hidden": "true",
|
|
150
153
|
"data-ac-ds": "",
|
|
151
154
|
"data-testid": "ac-sidebar-backdrop",
|
|
152
|
-
onClick:
|
|
155
|
+
onClick: X
|
|
153
156
|
}, null, 2)) : i("", !0)]),
|
|
154
157
|
_: 1
|
|
155
158
|
}),
|
|
@@ -163,14 +166,14 @@ var te = [
|
|
|
163
166
|
ref_key: "root",
|
|
164
167
|
ref: P
|
|
165
168
|
}, n.$attrs, {
|
|
166
|
-
class: ["flex shrink-0 flex-col overflow-hidden",
|
|
167
|
-
style:
|
|
169
|
+
class: ["flex shrink-0 flex-col overflow-hidden", ue.value],
|
|
170
|
+
style: le.value,
|
|
168
171
|
role: J.value ? "dialog" : void 0,
|
|
169
172
|
"aria-modal": J.value || void 0,
|
|
170
173
|
"aria-label": J.value ? c.label : void 0,
|
|
171
174
|
"data-ac-ds": "",
|
|
172
175
|
"data-testid": "ac-sidebar",
|
|
173
|
-
onKeydown:
|
|
176
|
+
onKeydown: me,
|
|
174
177
|
onMouseenter: l[0] ||= (e) => K(!0),
|
|
175
178
|
onMouseleave: oe,
|
|
176
179
|
onFocusin: l[1] ||= (e) => K(!0),
|
|
@@ -178,41 +181,48 @@ var te = [
|
|
|
178
181
|
}), [
|
|
179
182
|
n.$slots.header || I.value ? (m(), a("div", {
|
|
180
183
|
key: 0,
|
|
181
|
-
class: d(["flex h-
|
|
184
|
+
class: d(["flex min-h-17 shrink-0 items-center gap-2 overflow-hidden border-b border-border/70 pt-5 pb-4", H.value ? "mx-2 justify-center" : "mx-4 px-1"])
|
|
182
185
|
}, [o("div", { class: d(["flex min-w-0 flex-1 items-center", H.value && "justify-center"]) }, [_(n.$slots, "header", { collapsed: H.value })], 2), I.value ? (m(), a("button", {
|
|
183
186
|
key: 0,
|
|
184
187
|
type: "button",
|
|
185
|
-
class:
|
|
188
|
+
class: "-mr-1.5 inline-flex size-8.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:outline-none",
|
|
186
189
|
"aria-label": "Close navigation",
|
|
187
190
|
"data-ac-ds": "",
|
|
188
191
|
"data-testid": "ac-sidebar-close",
|
|
189
|
-
onClick:
|
|
192
|
+
onClick: X
|
|
190
193
|
}, [s(b(E), {
|
|
191
|
-
class: "size-
|
|
194
|
+
class: "size-5",
|
|
192
195
|
"aria-hidden": "true"
|
|
193
|
-
})]
|
|
196
|
+
})])) : i("", !0)], 2)) : i("", !0),
|
|
194
197
|
o("nav", {
|
|
195
198
|
ref_key: "nav",
|
|
196
199
|
ref: F,
|
|
197
200
|
"aria-label": c.label,
|
|
198
|
-
class: d(["ac-scrollbar min-h-0 flex-1 overflow-x-hidden py-
|
|
199
|
-
}, [o("ul",
|
|
201
|
+
class: d(["ac-scrollbar min-h-0 flex-1 overflow-x-hidden py-5", H.value ? "px-2" : "px-4"])
|
|
202
|
+
}, [o("ul", ne, [_(n.$slots, "default")])], 10, D),
|
|
200
203
|
n.$slots.footer || c.collapsible && !I.value ? (m(), a("div", {
|
|
201
204
|
key: 1,
|
|
202
|
-
class: d(["flex shrink-0 flex-col
|
|
203
|
-
}, [
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
205
|
+
class: d(["flex shrink-0 flex-col pb-4", H.value ? "px-2" : "px-4"])
|
|
206
|
+
}, [
|
|
207
|
+
o("div", {
|
|
208
|
+
class: d(["border-t border-muted/20", H.value ? "mb-3" : "mt-5 mb-6"]),
|
|
209
|
+
"aria-hidden": "true"
|
|
210
|
+
}, null, 2),
|
|
211
|
+
n.$slots.footer ? (m(), a("ul", re, [_(n.$slots, "footer", { collapsed: H.value })])) : i("", !0),
|
|
212
|
+
c.collapsible && !I.value ? (m(), a("button", {
|
|
213
|
+
key: 1,
|
|
214
|
+
type: "button",
|
|
215
|
+
class: d(["group 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", H.value ? "justify-center" : "px-3"]),
|
|
216
|
+
"aria-label": U.value ? "Expand sidebar" : "Collapse sidebar",
|
|
217
|
+
title: H.value ? "Expand sidebar" : void 0,
|
|
218
|
+
"data-ac-ds": "",
|
|
219
|
+
"data-testid": "ac-sidebar-collapse",
|
|
220
|
+
onClick: q
|
|
221
|
+
}, [(m(), r(v(U.value ? b(T) : b(w)), {
|
|
222
|
+
class: "size-4 shrink-0 text-muted group-hover:text-heading",
|
|
223
|
+
"aria-hidden": "true"
|
|
224
|
+
})), H.value ? i("", !0) : (m(), a("span", O, y(U.value ? "Expand" : "Collapse"), 1))], 10, ie)) : i("", !0)
|
|
225
|
+
], 2)) : i("", !0)
|
|
216
226
|
], 16, te)
|
|
217
227
|
], 64));
|
|
218
228
|
}
|
|
@@ -13,7 +13,7 @@ export interface Props {
|
|
|
13
13
|
active?: boolean;
|
|
14
14
|
/** A count or short word after the label, e.g. `3` or `"New"`. Shown as a dot in the collapsed rail. */
|
|
15
15
|
badge?: string | number;
|
|
16
|
-
/** Colour of the badge. */
|
|
16
|
+
/** Colour of the badge. Defaults to cloud-ui's solid primary chip. */
|
|
17
17
|
badgeColor?: Tone | "neutral";
|
|
18
18
|
/** Greys the item out and blocks clicks. */
|
|
19
19
|
disabled?: boolean;
|
|
@@ -6,21 +6,17 @@ var D = {
|
|
|
6
6
|
"data-ac-ds": "",
|
|
7
7
|
"data-testid": "ac-sidebar-item"
|
|
8
8
|
}, O = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "inline-flex size-4 shrink-0 items-center justify-center text-muted transition-colors group-hover:text-heading group-aria-[current=page]:text-primary-30! [&>img]:size-4",
|
|
11
|
-
"aria-hidden": "true"
|
|
12
|
-
}, k = {
|
|
13
9
|
key: 1,
|
|
14
10
|
class: "text-xs font-semibold"
|
|
15
|
-
},
|
|
11
|
+
}, k = [
|
|
16
12
|
"disabled",
|
|
17
13
|
"aria-expanded",
|
|
18
14
|
"aria-controls",
|
|
19
15
|
"title"
|
|
20
|
-
],
|
|
16
|
+
], A = {
|
|
21
17
|
key: 1,
|
|
22
18
|
class: "text-xs font-semibold"
|
|
23
|
-
},
|
|
19
|
+
}, j = ["id"], M = /*@__PURE__*/ o({
|
|
24
20
|
__name: "AcSidebarItem",
|
|
25
21
|
props: /*@__PURE__*/ l({
|
|
26
22
|
label: {},
|
|
@@ -32,7 +28,7 @@ var D = {
|
|
|
32
28
|
default: !1
|
|
33
29
|
},
|
|
34
30
|
badge: { default: void 0 },
|
|
35
|
-
badgeColor: { default: "
|
|
31
|
+
badgeColor: { default: "primary" },
|
|
36
32
|
disabled: {
|
|
37
33
|
type: Boolean,
|
|
38
34
|
default: !1
|
|
@@ -46,39 +42,39 @@ var D = {
|
|
|
46
42
|
}),
|
|
47
43
|
emits: /*@__PURE__*/ l(["click"], ["update:open"]),
|
|
48
44
|
setup(o, { emit: l }) {
|
|
49
|
-
let
|
|
50
|
-
neutral: "
|
|
51
|
-
primary: "bg-primary
|
|
52
|
-
info: "bg-
|
|
53
|
-
success: "bg-
|
|
54
|
-
warning: "bg-
|
|
55
|
-
danger: "bg-
|
|
56
|
-
},
|
|
57
|
-
neutral: "bg-
|
|
45
|
+
let M = o, N = S(o, "open"), P = l, F = C(), I = {
|
|
46
|
+
neutral: "border border-border bg-surface-sunken text-muted",
|
|
47
|
+
primary: "bg-primary text-white",
|
|
48
|
+
info: "bg-info text-white",
|
|
49
|
+
success: "bg-success text-white",
|
|
50
|
+
warning: "bg-warning text-on-warning",
|
|
51
|
+
danger: "bg-danger text-white"
|
|
52
|
+
}, L = {
|
|
53
|
+
neutral: "bg-muted",
|
|
58
54
|
primary: "bg-primary",
|
|
59
55
|
info: "bg-info",
|
|
60
56
|
success: "bg-success",
|
|
61
57
|
warning: "bg-warning",
|
|
62
58
|
danger: "bg-danger"
|
|
63
|
-
},
|
|
59
|
+
}, R = c("ac-sidebar", null), z = c("ac-sidebar-depth", 0), B = c("ac-sidebar-subgroup", !1), V = s()?.appContext.components.RouterLink, H = x(), U = g(null), W = g(!1), G = null, K = t(() => !!F.default), q = t(() => (R?.rail.value ?? !1) && z === 0), J = B || z > 0 ? "size-4 [&>img]:size-4" : "size-[17px] [&>img]:size-[17px]", Y = t(() => M.to && V && !M.disabled ? V : M.to || M.href ? "a" : "button"), X = t(() => {
|
|
64
60
|
let e = {};
|
|
65
|
-
return Y.value === V ? e.to =
|
|
66
|
-
}), Z = t(() =>
|
|
61
|
+
return Y.value === V ? e.to = M.to : Y.value === "a" ? M.disabled ? (e.role = "link", e["aria-disabled"] = "true") : e.href = M.href ?? (typeof M.to == "string" ? M.to : void 0) : (e.type = "button", e.disabled = M.disabled || void 0), M.active && (e["aria-current"] = "page"), e;
|
|
62
|
+
}), Z = t(() => M.badge === void 0 || M.badge === "" ? "" : String(M.badge));
|
|
67
63
|
function Q(e) {
|
|
68
|
-
if (
|
|
64
|
+
if (M.disabled) {
|
|
69
65
|
e.preventDefault();
|
|
70
66
|
return;
|
|
71
67
|
}
|
|
72
|
-
|
|
68
|
+
P("click", e), R?.navigate();
|
|
73
69
|
}
|
|
74
70
|
function ee() {
|
|
75
|
-
q.value ? (
|
|
71
|
+
q.value ? (R?.expand(), N.value = !0) : N.value = !N.value;
|
|
76
72
|
}
|
|
77
73
|
function $() {
|
|
78
74
|
W.value = !!U.value?.querySelector("[aria-current=\"page\"]");
|
|
79
75
|
}
|
|
80
|
-
return h("ac-sidebar-depth",
|
|
81
|
-
e && (
|
|
76
|
+
return h("ac-sidebar-depth", z + 1), w(W, (e) => {
|
|
77
|
+
e && (N.value = !0);
|
|
82
78
|
}), p(() => {
|
|
83
79
|
U.value && ($(), G = new MutationObserver($), G.observe(U.value, {
|
|
84
80
|
subtree: !0,
|
|
@@ -88,13 +84,14 @@ var D = {
|
|
|
88
84
|
}));
|
|
89
85
|
}), f(() => G?.disconnect()), (t, s) => (m(), i("li", D, [K.value ? (m(), i(e, { key: 1 }, [a("button", {
|
|
90
86
|
type: "button",
|
|
91
|
-
class: d(["group relative flex w-full items-center gap-
|
|
92
|
-
q.value ? "h-9 justify-center" : "
|
|
93
|
-
q.value && W.value ? "bg-primary
|
|
94
|
-
o.disabled ? "cursor-not-allowed opacity-50" :
|
|
87
|
+
class: d(["group relative flex w-full 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 motion-reduce:transition-none", [
|
|
88
|
+
q.value ? "h-9.5 justify-center" : "px-3",
|
|
89
|
+
q.value && W.value ? "border-primary/35 bg-primary/10 text-heading shadow-xs shadow-primary/10" : ["border-transparent", W.value ? "text-heading" : "text-heading/80"],
|
|
90
|
+
o.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
91
|
+
!o.disabled && !(q.value && W.value) && "hover:border-border hover:bg-accent-hover hover:text-heading"
|
|
95
92
|
]]),
|
|
96
93
|
disabled: o.disabled || void 0,
|
|
97
|
-
"aria-expanded": q.value ? void 0 :
|
|
94
|
+
"aria-expanded": q.value ? void 0 : N.value,
|
|
98
95
|
"aria-controls": `${b(H)}-list`,
|
|
99
96
|
title: q.value ? o.label : void 0,
|
|
100
97
|
"data-ac-ds": "",
|
|
@@ -103,48 +100,52 @@ var D = {
|
|
|
103
100
|
}, [
|
|
104
101
|
t.$slots.icon || o.icon || q.value ? (m(), i("span", {
|
|
105
102
|
key: 0,
|
|
106
|
-
class: d(["inline-flex
|
|
103
|
+
class: d(["inline-flex shrink-0 items-center justify-center transition-colors duration-200", [b(J), W.value ? "text-primary" : "text-muted group-hover:text-heading"]]),
|
|
107
104
|
"aria-hidden": "true"
|
|
108
105
|
}, [_(t.$slots, "icon", {}, () => [o.icon ? (m(), n(v(o.icon), {
|
|
109
106
|
key: 0,
|
|
110
|
-
class: "size-
|
|
111
|
-
})) : (m(), i("span",
|
|
107
|
+
class: "size-full"
|
|
108
|
+
})) : (m(), i("span", A, y(o.label.charAt(0)), 1))])], 2)) : r("", !0),
|
|
112
109
|
a("span", { class: d(q.value ? "sr-only" : "min-w-0 flex-1 truncate") }, y(o.label), 3),
|
|
113
110
|
Z.value && !q.value ? (m(), i("span", {
|
|
114
111
|
key: 1,
|
|
115
|
-
class: d(["inline-flex h-
|
|
112
|
+
class: d(["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", I[o.badgeColor]])
|
|
116
113
|
}, y(Z.value), 3)) : r("", !0),
|
|
117
114
|
q.value ? r("", !0) : (m(), n(b(E), {
|
|
118
115
|
key: 2,
|
|
119
|
-
class: d(["size-
|
|
116
|
+
class: d(["size-4 shrink-0 text-muted transition-transform duration-200 motion-reduce:transition-none", N.value && "rotate-90"]),
|
|
120
117
|
"aria-hidden": "true"
|
|
121
118
|
}, null, 8, ["class"]))
|
|
122
|
-
], 10,
|
|
119
|
+
], 10, k), a("ul", {
|
|
123
120
|
id: `${b(H)}-list`,
|
|
124
121
|
ref_key: "list",
|
|
125
122
|
ref: U,
|
|
126
123
|
role: "list",
|
|
127
|
-
class: d(["mt-
|
|
128
|
-
}, [_(t.$slots, "default")], 10,
|
|
129
|
-
class: ["group relative flex w-full items-center gap-
|
|
124
|
+
class: d(["mt-1 ml-5 flex-col gap-1 border-l border-border pl-2", N.value && !q.value ? "flex" : "hidden"])
|
|
125
|
+
}, [_(t.$slots, "default")], 10, j)], 64)) : (m(), n(v(Y.value), u({ key: 0 }, X.value, {
|
|
126
|
+
class: ["group relative flex w-full items-center gap-3 rounded-10 border border-transparent py-2 text-left text-base font-medium text-heading/80 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 aria-[current=page]:border-primary/35 aria-[current=page]:bg-primary/10 aria-[current=page]:text-heading aria-[current=page]:shadow-xs aria-[current=page]:shadow-primary/10", [q.value ? "h-9.5 justify-center" : "px-3", o.disabled ? "pointer-events-none cursor-not-allowed opacity-50" : "cursor-pointer not-aria-[current=page]:hover:border-border not-aria-[current=page]:hover:bg-accent-hover not-aria-[current=page]:hover:text-heading"]],
|
|
130
127
|
title: q.value ? Z.value ? `${o.label} (${Z.value})` : o.label : void 0,
|
|
131
128
|
"data-ac-ds": "",
|
|
132
129
|
"data-testid": "ac-sidebar-link",
|
|
133
130
|
onClick: Q
|
|
134
131
|
}), {
|
|
135
132
|
default: T(() => [
|
|
136
|
-
t.$slots.icon || o.icon || q.value ? (m(), i("span",
|
|
133
|
+
t.$slots.icon || o.icon || q.value ? (m(), i("span", {
|
|
137
134
|
key: 0,
|
|
138
|
-
class: "
|
|
139
|
-
|
|
135
|
+
class: d(["inline-flex shrink-0 items-center justify-center text-muted transition-colors duration-200 group-hover:text-heading group-aria-[current=page]:text-primary!", b(J)]),
|
|
136
|
+
"aria-hidden": "true"
|
|
137
|
+
}, [_(t.$slots, "icon", {}, () => [o.icon ? (m(), n(v(o.icon), {
|
|
138
|
+
key: 0,
|
|
139
|
+
class: "size-full"
|
|
140
|
+
})) : (m(), i("span", O, y(o.label.charAt(0)), 1))])], 2)) : r("", !0),
|
|
140
141
|
a("span", { class: d(q.value ? "sr-only" : "min-w-0 flex-1 truncate") }, y(o.label), 3),
|
|
141
142
|
Z.value ? (m(), i(e, { key: 1 }, [q.value ? (m(), i("span", {
|
|
142
143
|
key: 0,
|
|
143
|
-
class: d(["absolute top-1 right-1 size-
|
|
144
|
+
class: d(["absolute top-1 right-1 size-2 rounded-full", L[o.badgeColor]]),
|
|
144
145
|
"aria-hidden": "true"
|
|
145
146
|
}, null, 2)) : (m(), i("span", {
|
|
146
147
|
key: 1,
|
|
147
|
-
class: d(["inline-flex h-
|
|
148
|
+
class: d(["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", I[o.badgeColor]])
|
|
148
149
|
}, y(Z.value), 3))], 64)) : r("", !0)
|
|
149
150
|
]),
|
|
150
151
|
_: 3
|
|
@@ -152,4 +153,4 @@ var D = {
|
|
|
152
153
|
}
|
|
153
154
|
});
|
|
154
155
|
//#endregion
|
|
155
|
-
export {
|
|
156
|
+
export { M as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export interface Props {
|
|
2
|
-
/** Small uppercase heading above the items. Hidden in the collapsed rail, where a divider takes its place. */
|
|
2
|
+
/** Small uppercase heading above the items. Hidden in the collapsed rail, where a divider takes its place. A section inside another section is a sub-group, like cloud-ui's Networking → VPC. */
|
|
3
3
|
label?: string;
|
|
4
4
|
/** Turns the heading into a button that shows and hides the items. */
|
|
5
5
|
collapsible?: boolean;
|
|
6
6
|
}
|
|
7
7
|
type __VLS_Props = Props;
|
|
8
8
|
type __VLS_Slots = {
|
|
9
|
-
/** The section's `AcSidebarItem`s. */
|
|
9
|
+
/** The section's `AcSidebarItem`s, or nested `AcSidebarSection`s for sub-groups. */
|
|
10
10
|
default?: () => unknown;
|
|
11
11
|
};
|
|
12
12
|
type __VLS_ModelProps = {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, inject as s, mergeModels as c, normalizeClass as l, openBlock as u,
|
|
2
|
-
import {
|
|
1
|
+
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, inject as s, mergeModels as c, normalizeClass as l, openBlock as u, provide as d, renderSlot as f, toDisplayString as p, unref as m, useId as h, useModel as g } from "vue";
|
|
2
|
+
import { ChevronRight as _ } from "@lucide/vue";
|
|
3
3
|
//#region src/lib/components/AcSidebarSection.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
5
|
-
key: 1,
|
|
6
|
-
class: "h-7 truncate px-2.5 text-sm leading-7 font-medium tracking-wider text-muted uppercase"
|
|
7
|
-
}, b = ["id", "aria-label"], x = /*@__PURE__*/ o({
|
|
4
|
+
var v = ["aria-expanded", "aria-controls"], y = { class: "truncate" }, b = ["inert"], x = ["id", "aria-label"], S = /*@__PURE__*/ o({
|
|
8
5
|
__name: "AcSidebarSection",
|
|
9
6
|
props: /*@__PURE__*/ c({
|
|
10
7
|
label: { default: "" },
|
|
@@ -21,28 +18,36 @@ var _ = ["aria-expanded", "aria-controls"], v = { class: "truncate" }, y = {
|
|
|
21
18
|
}),
|
|
22
19
|
emits: ["update:open"],
|
|
23
20
|
setup(o) {
|
|
24
|
-
let c =
|
|
21
|
+
let c = g(o, "open"), S = s("ac-sidebar", null), C = s("ac-sidebar-section", !1);
|
|
22
|
+
d("ac-sidebar-section", !0), d("ac-sidebar-subgroup", C);
|
|
23
|
+
let w = h(), T = t(() => S?.rail.value ?? !1), E = t(() => c.value || T.value), D = t(() => C ? "mt-2 first:mt-0" : T.value ? "mt-2 border-t border-muted/20 pt-2 first:mt-0 first:border-0 first:pt-0" : "mt-4 first:mt-0 [[data-testid=ac-sidebar-section]+&]:mt-5 [[data-testid=ac-sidebar-section]+&]:border-t [[data-testid=ac-sidebar-section]+&]:border-muted/20 [[data-testid=ac-sidebar-section]+&]:pt-4");
|
|
25
24
|
return (t, s) => (u(), r("li", {
|
|
26
|
-
class: l(["list-none",
|
|
25
|
+
class: l(["list-none", D.value]),
|
|
27
26
|
"data-ac-ds": "",
|
|
28
27
|
"data-testid": "ac-sidebar-section"
|
|
29
|
-
}, [o.label && !
|
|
28
|
+
}, [o.label && !T.value ? (u(), r(e, { key: 0 }, [o.collapsible ? (u(), r("button", {
|
|
30
29
|
key: 0,
|
|
31
30
|
type: "button",
|
|
32
|
-
class: "
|
|
31
|
+
class: l(["flex w-full cursor-pointer items-center justify-between gap-2 rounded-8 px-1 py-0.5 text-left font-semibold tracking-[0.08em] uppercase transition-colors duration-200 hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset", m(C) ? "mb-1 text-xm text-muted/80" : "mb-2 text-sm text-muted"]),
|
|
33
32
|
"aria-expanded": c.value,
|
|
34
|
-
"aria-controls": `${
|
|
33
|
+
"aria-controls": `${m(w)}-items`,
|
|
35
34
|
onClick: s[0] ||= (e) => c.value = !c.value
|
|
36
|
-
}, [i("span",
|
|
37
|
-
class: l(["
|
|
35
|
+
}, [i("span", y, p(o.label), 1), a(m(_), {
|
|
36
|
+
class: l(["shrink-0 text-muted/70 transition-transform duration-200 ease-out motion-reduce:transition-none", [m(C) ? "size-3.5" : "size-4", c.value && "rotate-90"]]),
|
|
38
37
|
"aria-hidden": "true"
|
|
39
|
-
}, null, 8, ["class"])],
|
|
40
|
-
|
|
38
|
+
}, null, 8, ["class"])], 10, v)) : (u(), r("p", {
|
|
39
|
+
key: 1,
|
|
40
|
+
class: l(["truncate px-1 py-0.5 font-semibold tracking-[0.08em] uppercase", m(C) ? "mb-1 text-xm text-muted/80" : "mb-2 text-sm text-muted"])
|
|
41
|
+
}, p(o.label), 3))], 64)) : n("", !0), i("div", {
|
|
42
|
+
class: l(["grid transition-[grid-template-rows,opacity] duration-300 ease-out-soft motion-reduce:transition-none", E.value ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"]),
|
|
43
|
+
inert: !E.value || void 0
|
|
44
|
+
}, [i("ul", {
|
|
45
|
+
id: `${m(w)}-items`,
|
|
41
46
|
role: "list",
|
|
42
47
|
"aria-label": o.label || void 0,
|
|
43
|
-
class: l(["flex-col gap-
|
|
44
|
-
}, [
|
|
48
|
+
class: l(["flex min-h-0 flex-col gap-1 overflow-hidden", [m(C) && !T.value && "pl-1", E.value && "pb-0.5"]])
|
|
49
|
+
}, [f(t.$slots, "default")], 10, x)], 10, b)], 2));
|
|
45
50
|
}
|
|
46
51
|
});
|
|
47
52
|
//#endregion
|
|
48
|
-
export {
|
|
53
|
+
export { S as default };
|
|
@@ -8,19 +8,19 @@ var d = ["aria-busy", "aria-hidden"], f = {
|
|
|
8
8
|
key: 3,
|
|
9
9
|
class: "w-full",
|
|
10
10
|
"aria-hidden": "true"
|
|
11
|
-
}, m = { class: "flex h-
|
|
11
|
+
}, m = { class: "flex h-11 items-center gap-4 border-b border-border bg-surface-sunken/50 px-6" }, h = {
|
|
12
12
|
key: 4,
|
|
13
|
-
class: "flex size-full overflow-hidden rounded-10 border border-border bg-surface
|
|
13
|
+
class: "flex size-full overflow-hidden rounded-10 border border-border bg-surface",
|
|
14
14
|
"aria-hidden": "true"
|
|
15
|
-
}, g = { class: "flex w-11 shrink-0 flex-col items-end gap-2 border-r border-border
|
|
15
|
+
}, g = { class: "flex w-11 shrink-0 flex-col items-end gap-2 border-r border-border bg-surface-muted px-2.5 py-3" }, _ = { class: "flex min-w-0 flex-1 flex-col gap-2 px-3 py-3" }, v = {
|
|
16
16
|
key: 5,
|
|
17
|
-
class: "rounded-
|
|
17
|
+
class: "rounded-14 border border-border bg-surface p-6",
|
|
18
18
|
"aria-hidden": "true"
|
|
19
19
|
}, y = { class: "mt-5 flex flex-col gap-2" }, b = {
|
|
20
20
|
key: 6,
|
|
21
|
-
class: "rounded-
|
|
21
|
+
class: "rounded-14 border border-border bg-surface p-5",
|
|
22
22
|
"aria-hidden": "true"
|
|
23
|
-
}, x = { class: "flex items-center gap-3" }, S = { class: "min-w-0 flex-1" }, C = { class: "mt-4 grid grid-cols-2 gap-x-4 gap-y-2.5 border-t border-border
|
|
23
|
+
}, x = { class: "flex items-center gap-3" }, S = { class: "min-w-0 flex-1" }, C = { class: "mt-4 grid grid-cols-2 gap-x-4 gap-y-2.5 border-t border-border pt-4" }, w = {
|
|
24
24
|
key: 7,
|
|
25
25
|
class: "sr-only"
|
|
26
26
|
}, T = "ac-skeleton-bone block rounded-4", E = /*@__PURE__*/ a({
|
|
@@ -105,7 +105,7 @@ var d = ["aria-busy", "aria-hidden"], f = {
|
|
|
105
105
|
class: "flex-1"
|
|
106
106
|
}, [i("span", { class: o([T, "h-2.5 w-1/2 opacity-70"]) })]))), 128))]), (c(!0), r(e, null, l(a.rows, (t) => (c(), r("div", {
|
|
107
107
|
key: t,
|
|
108
|
-
class: "flex h-12 items-center gap-4 border-b border-border
|
|
108
|
+
class: "flex h-12 items-center gap-4 border-b border-border px-6 last:border-0"
|
|
109
109
|
}, [(c(!0), r(e, null, l(a.cols, (e) => (c(), r("span", {
|
|
110
110
|
key: e,
|
|
111
111
|
class: "flex-1"
|
|
@@ -130,7 +130,7 @@ var d = ["aria-busy", "aria-hidden"], f = {
|
|
|
130
130
|
i("span", { class: o([T, "h-3 w-full"]) }),
|
|
131
131
|
i("span", { class: o([T, "h-3 w-3/5"]) })
|
|
132
132
|
])
|
|
133
|
-
])) : (c(), r("div", b, [i("div", x, [i("span", { class: o([T, "size-10 shrink-0 rounded-
|
|
133
|
+
])) : (c(), r("div", b, [i("div", x, [i("span", { class: o([T, "size-10 shrink-0 rounded-10"]) }), i("div", S, [i("span", { class: o([T, "h-3.5 w-1/2"]) }), i("span", { class: o([T, "mt-2 h-2.5 w-1/3"]) })])]), i("div", C, [
|
|
134
134
|
i("span", { class: o([T, "h-2.5 w-3/5"]) }),
|
|
135
135
|
i("span", { class: o([T, "h-2.5 w-2/5 justify-self-end"]) }),
|
|
136
136
|
i("span", { class: o([T, "h-2.5 w-1/2"]) }),
|
|
@@ -33,7 +33,7 @@ export interface Props {
|
|
|
33
33
|
required?: boolean;
|
|
34
34
|
/** Error text under the slider. Turns the track red and sets `aria-invalid`. */
|
|
35
35
|
errorMsg?: string;
|
|
36
|
-
/**
|
|
36
|
+
/** Help text between the label and the slider. */
|
|
37
37
|
hint?: string;
|
|
38
38
|
}
|
|
39
39
|
type __VLS_Props = Props;
|