@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
|
@@ -1,38 +1,48 @@
|
|
|
1
|
-
import { computed as e,
|
|
1
|
+
import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, inject as s, normalizeClass as c, openBlock as l, renderSlot as u, resolveDynamicComponent as d, toDisplayString as f, unref as p, useId as m } from "vue";
|
|
2
2
|
//#region src/lib/components/AcFormSection.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
3
|
+
var h = ["aria-labelledby", "aria-describedby"], g = {
|
|
4
4
|
key: 0,
|
|
5
|
+
class: "flex size-7 shrink-0 items-center justify-center rounded-8 border border-primary/20 bg-primary/8 text-primary",
|
|
6
|
+
"aria-hidden": "true"
|
|
7
|
+
}, _ = { class: "min-w-0 flex-1" }, v = ["id"], y = ["id"], b = {
|
|
8
|
+
key: 1,
|
|
5
9
|
class: "flex shrink-0 items-center gap-2"
|
|
6
|
-
},
|
|
10
|
+
}, x = /*@__PURE__*/ o({
|
|
7
11
|
__name: "AcFormSection",
|
|
8
12
|
props: {
|
|
9
13
|
title: { default: "" },
|
|
10
14
|
description: { default: "" },
|
|
15
|
+
icon: { default: void 0 },
|
|
11
16
|
layout: { default: void 0 },
|
|
17
|
+
variant: { default: void 0 },
|
|
12
18
|
columns: { default: 1 }
|
|
13
19
|
},
|
|
14
|
-
setup(
|
|
15
|
-
let
|
|
16
|
-
return (e,
|
|
20
|
+
setup(o) {
|
|
21
|
+
let x = o, S = s("ac-form", null), C = m(), w = e(() => x.layout ?? S?.layout.value ?? "stacked"), T = e(() => x.variant ?? S?.variant?.value ?? "card");
|
|
22
|
+
return (e, s) => (l(), r("div", {
|
|
17
23
|
role: "group",
|
|
18
|
-
"aria-labelledby":
|
|
19
|
-
"aria-describedby":
|
|
20
|
-
class:
|
|
24
|
+
"aria-labelledby": o.title ? `${p(C)}-title` : void 0,
|
|
25
|
+
"aria-describedby": o.description || e.$slots.description ? `${p(C)}-desc` : void 0,
|
|
26
|
+
class: c([T.value === "card" ? "rounded-14 border border-border bg-surface p-5" : "border-t border-border py-7 first:border-t-0 first:pt-0", w.value === "aside" && "md:grid md:grid-cols-[minmax(0,1fr)_minmax(0,2fr)] md:gap-10"]),
|
|
21
27
|
"data-ac-ds": "",
|
|
22
28
|
"data-testid": "ac-form-section"
|
|
23
|
-
}, [
|
|
29
|
+
}, [o.title || o.description || o.icon || e.$slots.description || e.$slots.actions ? (l(), r("div", {
|
|
24
30
|
key: 0,
|
|
25
|
-
class:
|
|
26
|
-
}, [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
class: c(["mb-5 flex items-start gap-3", w.value === "aside" && "md:mb-0"])
|
|
32
|
+
}, [
|
|
33
|
+
o.icon ? (l(), r("span", g, [(l(), t(d(o.icon), { class: "size-3.5" }))])) : n("", !0),
|
|
34
|
+
i("div", _, [o.title ? (l(), r("h3", {
|
|
35
|
+
key: 0,
|
|
36
|
+
id: `${p(C)}-title`,
|
|
37
|
+
class: c(["font-heading font-semibold tracking-tight text-heading", T.value === "card" ? "text-base" : "text-lg"])
|
|
38
|
+
}, f(o.title), 11, v)) : n("", !0), o.description || e.$slots.description ? (l(), r("div", {
|
|
39
|
+
key: 1,
|
|
40
|
+
id: `${p(C)}-desc`,
|
|
41
|
+
class: c([T.value === "card" ? "mt-0.5 text-xs leading-relaxed" : "mt-1 text-base", "text-muted [&_a]:font-medium [&_a]:text-primary-strong [&_a]:underline [&_a]:underline-offset-2"])
|
|
42
|
+
}, [u(e.$slots, "description", {}, () => [a(f(o.description), 1)])], 10, y)) : n("", !0)]),
|
|
43
|
+
e.$slots.actions && w.value === "stacked" ? (l(), r("div", b, [u(e.$slots, "actions")])) : n("", !0)
|
|
44
|
+
], 2)) : n("", !0), i("div", { class: c(["grid min-w-0 gap-5", [o.columns === 2 && "sm:grid-cols-2", w.value === "aside" && "md:col-start-2"]]) }, [u(e.$slots, "default")], 2)], 10, h));
|
|
35
45
|
}
|
|
36
46
|
});
|
|
37
47
|
//#endregion
|
|
38
|
-
export {
|
|
48
|
+
export { x as default };
|
|
@@ -7,13 +7,13 @@ export interface Props {
|
|
|
7
7
|
backButton?: boolean;
|
|
8
8
|
/** Sticks to the top while the page scrolls. */
|
|
9
9
|
sticky?: boolean;
|
|
10
|
-
/** Distance from the top when sticky, e.g. `"
|
|
10
|
+
/** Distance from the top when sticky, e.g. `"72px"` under an app navbar. */
|
|
11
11
|
top?: string;
|
|
12
|
-
/** `normal` suits a page's main header. `compact` has a
|
|
12
|
+
/** `normal` suits a page's main header: a 20px title, 24px from 768px. `compact` has a 16px title and less padding, for dense pages and forms. */
|
|
13
13
|
size?: "normal" | "compact";
|
|
14
14
|
}
|
|
15
15
|
type __VLS_Slots = {
|
|
16
|
-
/** A logo or icon before the title, e.g. the database engine's logo
|
|
16
|
+
/** A logo or icon before the title, shown in a 44px tile: a Lucide icon gets a solid primary tile, an `<img>` (e.g. the database engine's logo) a bordered white one. */
|
|
17
17
|
icon?: () => unknown;
|
|
18
18
|
/** Breadcrumb above the title. */
|
|
19
19
|
breadcrumb?: () => unknown;
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, normalizeClass as o, normalizeStyle as s, openBlock as c, renderSlot as l, toDisplayString as u, unref as d } from "vue";
|
|
2
2
|
import { ArrowLeft as f } from "@lucide/vue";
|
|
3
3
|
//#region src/lib/components/AcHeader.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var p = { class: "flex min-w-0 items-center gap-3.5" }, m = {
|
|
5
|
-
key: 1,
|
|
6
|
-
class: "inline-flex size-11 shrink-0 items-center justify-center overflow-hidden rounded-10 border border-border-light bg-surface p-2 text-label shadow-xs ring-1 ring-black/[0.02] [&_img]:size-full [&_img]:object-contain [&_svg]:size-5",
|
|
7
|
-
"aria-hidden": "true"
|
|
8
|
-
}, h = { class: "min-w-0" }, g = {
|
|
4
|
+
var p = { class: "flex min-w-0 items-center gap-3.5" }, m = { class: "min-w-0" }, h = {
|
|
9
5
|
key: 0,
|
|
10
|
-
class: "mb-
|
|
11
|
-
},
|
|
6
|
+
class: "mb-2"
|
|
7
|
+
}, g = { class: "flex min-w-0 flex-wrap items-center gap-2.5" }, _ = {
|
|
12
8
|
key: 0,
|
|
13
|
-
class: "mt-
|
|
14
|
-
},
|
|
9
|
+
class: "mt-1 max-w-prose truncate text-base text-muted"
|
|
10
|
+
}, v = {
|
|
15
11
|
key: 0,
|
|
16
|
-
class: "flex flex-wrap items-center gap-2"
|
|
17
|
-
},
|
|
12
|
+
class: "flex shrink-0 flex-wrap items-center gap-2"
|
|
13
|
+
}, y = /*@__PURE__*/ a({
|
|
18
14
|
__name: "AcHeader",
|
|
19
15
|
props: {
|
|
20
16
|
title: { default: "" },
|
|
@@ -31,30 +27,34 @@ var p = { class: "flex min-w-0 items-center gap-3.5" }, m = {
|
|
|
31
27
|
size: { default: "normal" }
|
|
32
28
|
},
|
|
33
29
|
emits: ["back"],
|
|
34
|
-
setup(a, { emit:
|
|
35
|
-
let
|
|
36
|
-
return (e,
|
|
37
|
-
class: o(["z-20 border-b border-border
|
|
30
|
+
setup(a, { emit: y }) {
|
|
31
|
+
let b = a, x = e(() => b.size === "compact"), S = y;
|
|
32
|
+
return (e, y) => (c(), n("header", {
|
|
33
|
+
class: o(["z-20 border-b border-border/80 bg-surface/90 backdrop-blur-sm", a.sticky && "sticky"]),
|
|
38
34
|
style: s(a.sticky ? { top: a.top } : void 0),
|
|
39
35
|
"data-ac-ds": "",
|
|
40
36
|
"data-testid": "ac-header"
|
|
41
|
-
}, [r("div", { class: o(["flex flex-wrap items-center justify-between gap-x-6 gap-y-
|
|
37
|
+
}, [r("div", { class: o(["flex flex-wrap items-center justify-between gap-x-6 gap-y-4", x.value ? "px-4 py-3 sm:px-6" : "px-4 py-5 sm:px-6"]) }, [r("div", p, [
|
|
42
38
|
a.backButton ? (c(), n("button", {
|
|
43
39
|
key: 0,
|
|
44
40
|
type: "button",
|
|
45
|
-
class: "inline-flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-
|
|
41
|
+
class: "inline-flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-10 border border-border bg-surface text-heading transition-[color,background-color,border-color,box-shadow,transform] 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 active:translate-y-px motion-reduce:active:translate-y-0",
|
|
46
42
|
"aria-label": "Back",
|
|
47
43
|
"data-ac-ds": "",
|
|
48
44
|
"data-testid": "ac-header-back",
|
|
49
|
-
onClick:
|
|
45
|
+
onClick: y[0] ||= (e) => S("back")
|
|
50
46
|
}, [i(d(f), {
|
|
51
47
|
class: "size-4",
|
|
52
48
|
"aria-hidden": "true"
|
|
53
49
|
})])) : t("", !0),
|
|
54
|
-
e.$slots.icon ? (c(), n("span",
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
e.$slots.icon ? (c(), n("span", {
|
|
51
|
+
key: 1,
|
|
52
|
+
class: o(["inline-flex shrink-0 items-center justify-center overflow-hidden bg-primary text-white has-[img]:border has-[img]:border-border has-[img]:bg-surface has-[img]:p-2 [&_img]:size-full [&_img]:object-contain", x.value ? "size-9 rounded-10 [&_svg]:size-5" : "size-11 rounded-14 [&_svg]:size-6"]),
|
|
53
|
+
"aria-hidden": "true"
|
|
54
|
+
}, [l(e.$slots, "icon")], 2)) : t("", !0),
|
|
55
|
+
r("div", m, [e.$slots.breadcrumb ? (c(), n("div", h, [l(e.$slots, "breadcrumb")])) : t("", !0), l(e.$slots, "title", {}, () => [r("div", g, [r("h4", { class: o(["truncate font-heading font-semibold tracking-tight text-heading", x.value ? "text-lg" : "text-2xl md:text-3xl"]) }, u(a.title), 3), l(e.$slots, "title-extra")]), a.subtitle ? (c(), n("p", _, u(a.subtitle), 1)) : t("", !0)])])
|
|
56
|
+
]), e.$slots.default ? (c(), n("div", v, [l(e.$slots, "default")])) : t("", !0)], 2)], 6));
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
//#endregion
|
|
60
|
-
export {
|
|
60
|
+
export { y as default };
|
|
@@ -5,7 +5,7 @@ import { Check as b, Copy as x, Eye as S, EyeOff as C } from "@lucide/vue";
|
|
|
5
5
|
//#region src/lib/components/AcInfoTable.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var w = {
|
|
7
7
|
key: 0,
|
|
8
|
-
class: "text-lg leading-
|
|
8
|
+
class: "font-heading text-lg leading-tight font-semibold tracking-tight text-heading"
|
|
9
9
|
}, T = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "ml-auto flex shrink-0 items-center gap-2"
|
|
@@ -48,10 +48,14 @@ var w = {
|
|
|
48
48
|
item: e,
|
|
49
49
|
key: e.key ?? e.label
|
|
50
50
|
}))), z = r(() => [
|
|
51
|
-
"min-w-0 border-t border-border
|
|
51
|
+
"min-w-0 border-t border-border py-3.5 first:border-t-0",
|
|
52
52
|
N.columns === 2 && "md:[&:nth-child(2)]:border-t-0",
|
|
53
|
-
N.layout === "horizontal" ? "flex flex-col gap-
|
|
54
|
-
]), B = r(() => [
|
|
53
|
+
N.layout === "horizontal" ? "flex flex-col gap-1 sm:flex-row sm:items-baseline sm:gap-4" : "flex flex-col gap-1"
|
|
54
|
+
]), B = r(() => [
|
|
55
|
+
"flex items-center gap-2 text-muted",
|
|
56
|
+
N.layout === "stacked" ? "text-xs font-medium" : "text-base",
|
|
57
|
+
N.layout === "horizontal" && (N.columns === 2 ? "sm:w-36 sm:shrink-0" : "sm:w-48 sm:shrink-0")
|
|
58
|
+
]);
|
|
55
59
|
function V(e) {
|
|
56
60
|
return e == null || e === "";
|
|
57
61
|
}
|
|
@@ -65,34 +69,34 @@ var w = {
|
|
|
65
69
|
} catch {}
|
|
66
70
|
}
|
|
67
71
|
return d(() => clearTimeout(L)), (t, r) => (f(), o("div", {
|
|
68
|
-
class: u(l.bordered && "rounded-
|
|
72
|
+
class: u(l.bordered && "rounded-14 border border-border bg-surface"),
|
|
69
73
|
"data-ac-ds": "",
|
|
70
74
|
"data-testid": "ac-info-table"
|
|
71
75
|
}, [l.title || t.$slots.actions ? (f(), o("div", {
|
|
72
76
|
key: 0,
|
|
73
|
-
class: u(["flex items-center justify-between gap-4", l.bordered ? "border-b border-border
|
|
77
|
+
class: u(["flex items-center justify-between gap-4", l.bordered ? "border-b border-border px-6 pt-5 pb-3" : "mb-2"])
|
|
74
78
|
}, [l.title ? (f(), o("h3", w, _(l.title), 1)) : a("", !0), t.$slots.actions ? (f(), o("div", T, [h(t.$slots, "actions")])) : a("", !0)], 2)) : a("", !0), !l.loading && !l.items.length ? (f(), o("p", {
|
|
75
79
|
key: 1,
|
|
76
|
-
class: u(["py-
|
|
80
|
+
class: u(["py-10 text-center text-base text-muted", l.bordered && "px-6"])
|
|
77
81
|
}, _(l.emptyText), 3)) : (f(), o("dl", {
|
|
78
82
|
key: 2,
|
|
79
|
-
class: u(["grid", [l.columns === 2 && "md:grid-cols-2 md:gap-x-10", l.bordered ? "px-
|
|
83
|
+
class: u(["grid", [l.columns === 2 && "md:grid-cols-2 md:gap-x-10", l.bordered ? "px-6 py-1" : ""]]),
|
|
80
84
|
"aria-busy": l.loading || void 0
|
|
81
85
|
}, [l.loading && !l.items.length ? (f(), o(n, { key: 0 }, m(P, (e, t) => s("div", {
|
|
82
86
|
key: t,
|
|
83
87
|
class: u(z.value)
|
|
84
|
-
}, [s("dt", { class: u(B.value) }, [...r[0] ||= [s("span", { class: "h-3 w-20 animate-pulse rounded-
|
|
88
|
+
}, [s("dt", { class: u(B.value) }, [...r[0] ||= [s("span", { class: "h-3 w-20 animate-pulse rounded-full bg-surface-sunken" }, null, -1)]], 2), s("dd", D, [s("span", { class: u(["h-3 animate-pulse rounded-full bg-surface-sunken", e]) }, null, 2)])], 2)), 64)) : a("", !0), (f(!0), o(n, null, m(R.value, ({ item: n, key: r }, d) => (f(), o("div", {
|
|
85
89
|
key: r,
|
|
86
90
|
class: u(z.value)
|
|
87
91
|
}, [s("dt", { class: u(B.value) }, [h(t.$slots, `label-${r}`, { item: n }, () => [c(_(n.label), 1)])], 2), s("dd", O, [l.loading ? (f(), o("span", {
|
|
88
92
|
key: 0,
|
|
89
|
-
class: u(["h-3 animate-pulse rounded-
|
|
93
|
+
class: u(["h-3 animate-pulse rounded-full bg-surface-sunken", P[d % P.length]])
|
|
90
94
|
}, null, 2)) : h(t.$slots, `value-${r}`, { item: n }, () => [V(n.value) ? (f(), o("span", k, "—")) : (f(), o("span", A, [
|
|
91
95
|
s("span", { class: u(["min-w-0 [overflow-wrap:anywhere]", (n.mono || n.secret) && "font-mono text-xs leading-5"]) }, _(n.secret && !I.value.has(r) ? "••••••••••••" : n.value), 3),
|
|
92
96
|
n.secret ? (f(), o("button", {
|
|
93
97
|
key: 0,
|
|
94
98
|
type: "button",
|
|
95
|
-
class: "-my-0.5 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-
|
|
99
|
+
class: "-my-0.5 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-8 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",
|
|
96
100
|
"aria-label": I.value.has(r) ? `Hide ${n.label}` : `Show ${n.label}`,
|
|
97
101
|
"aria-pressed": I.value.has(r),
|
|
98
102
|
onClick: (e) => H(r)
|
|
@@ -106,12 +110,12 @@ var w = {
|
|
|
106
110
|
}, {
|
|
107
111
|
default: y(() => [s("button", {
|
|
108
112
|
type: "button",
|
|
109
|
-
class: "-my-0.5 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-
|
|
113
|
+
class: "-my-0.5 inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-8 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",
|
|
110
114
|
"aria-label": F.value === r ? `${n.label} copied` : `Copy ${n.label}`,
|
|
111
115
|
onClick: (e) => U(r, n.value)
|
|
112
116
|
}, [F.value === r ? (f(), i(v(b), {
|
|
113
117
|
key: 0,
|
|
114
|
-
class: "size-3.5 text-success",
|
|
118
|
+
class: "size-3.5 text-success-strong",
|
|
115
119
|
"aria-hidden": "true"
|
|
116
120
|
})) : (f(), i(v(x), {
|
|
117
121
|
key: 1,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Component } from "vue";
|
|
2
2
|
export interface Props {
|
|
3
|
-
/**
|
|
3
|
+
/** Label above the field. Pass `placeholder` for an example value inside it. */
|
|
4
4
|
label: string;
|
|
5
5
|
/** Native `name` attribute. */
|
|
6
6
|
name?: string;
|
|
@@ -10,11 +10,11 @@ export interface Props {
|
|
|
10
10
|
required?: boolean;
|
|
11
11
|
/** Disables the field. */
|
|
12
12
|
disabled?: boolean;
|
|
13
|
-
/** Read-only field
|
|
13
|
+
/** Read-only field: a muted fill, and "(read only)" after the label. */
|
|
14
14
|
readonly?: boolean;
|
|
15
15
|
/** Error text under the field. Turns the border and label red and sets `aria-invalid`. */
|
|
16
16
|
errorMsg?: string;
|
|
17
|
-
/**
|
|
17
|
+
/** Help text between the label and the field. */
|
|
18
18
|
hint?: string;
|
|
19
19
|
/** `small` 36px or `normal` 40px tall. */
|
|
20
20
|
size?: "small" | "normal";
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, mergeModels as c, mergeProps as l, normalizeClass as u, openBlock as d, ref as f, renderSlot as p, resolveDynamicComponent as m, toDisplayString as h, unref as g, useAttrs as _, useId as v, useModel as y, useSlots as b, vModelDynamic as x, withDirectives as S } from "vue";
|
|
2
2
|
import { CircleAlert as C, Eye as w, EyeOff as T } from "@lucide/vue";
|
|
3
3
|
//#region src/lib/components/AcInput.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var E =
|
|
4
|
+
var E = ["for"], D = {
|
|
5
5
|
key: 0,
|
|
6
|
-
class: "
|
|
7
|
-
}, O =
|
|
6
|
+
class: "font-normal text-muted"
|
|
7
|
+
}, O = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "text-danger",
|
|
10
|
+
"aria-hidden": "true"
|
|
11
|
+
}, k = ["id"], A = { class: "flex" }, j = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "flex h-full shrink-0 items-center pl-3.5 text-base whitespace-nowrap text-muted select-none [&_svg]:size-4"
|
|
14
|
+
}, M = [
|
|
8
15
|
"id",
|
|
9
16
|
"name",
|
|
10
17
|
"type",
|
|
@@ -13,15 +20,11 @@ var E = { class: "flex" }, D = {
|
|
|
13
20
|
"required",
|
|
14
21
|
"aria-invalid",
|
|
15
22
|
"aria-describedby"
|
|
16
|
-
],
|
|
17
|
-
key: 0,
|
|
18
|
-
class: "text-danger",
|
|
19
|
-
"aria-hidden": "true"
|
|
20
|
-
}, j = ["aria-label"], M = [
|
|
23
|
+
], N = ["aria-label", "aria-pressed"], P = [
|
|
21
24
|
"disabled",
|
|
22
25
|
"aria-label",
|
|
23
26
|
"title"
|
|
24
|
-
],
|
|
27
|
+
], F = { key: 1 }, I = ["id"], L = /*@__PURE__*/ s({
|
|
25
28
|
inheritAttrs: !1,
|
|
26
29
|
__name: "AcInput",
|
|
27
30
|
props: /*@__PURE__*/ c({
|
|
@@ -42,7 +45,7 @@ var E = { class: "flex" }, D = {
|
|
|
42
45
|
},
|
|
43
46
|
errorMsg: { default: "" },
|
|
44
47
|
hint: { default: "" },
|
|
45
|
-
size: { default: "
|
|
48
|
+
size: { default: "normal" },
|
|
46
49
|
addonLabel: { default: "" },
|
|
47
50
|
addonIcon: { default: void 0 },
|
|
48
51
|
addonIconOnly: {
|
|
@@ -54,90 +57,98 @@ var E = { class: "flex" }, D = {
|
|
|
54
57
|
modelModifiers: {}
|
|
55
58
|
}),
|
|
56
59
|
emits: /*@__PURE__*/ c(["addon"], ["update:modelValue"]),
|
|
57
|
-
setup(s, { expose: c, emit:
|
|
58
|
-
let
|
|
59
|
-
class:
|
|
60
|
-
style:
|
|
61
|
-
})),
|
|
62
|
-
let { class: e, style: t, ...n } =
|
|
60
|
+
setup(s, { expose: c, emit: L }) {
|
|
61
|
+
let R = s, z = y(s, "modelValue"), B = L, V = v(), H = _(), U = b(), W = e(() => ({
|
|
62
|
+
class: H.class,
|
|
63
|
+
style: H.style
|
|
64
|
+
})), G = e(() => {
|
|
65
|
+
let { class: e, style: t, ...n } = H;
|
|
63
66
|
return n;
|
|
64
|
-
}),
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
+
}), K = f(null), q = f(!1), J = e(() => R.type === "password" && q.value ? "text" : R.type), Y = e(() => [R.hint && `${V}-hint`, R.errorMsg && `${V}-msg`].filter(Boolean).join(" ") || void 0), X = e(() => !!R.addonLabel || !!R.addonIcon), Z = e(() => !!U.suffix || R.type === "password");
|
|
68
|
+
function Q(e) {
|
|
69
|
+
R.disabled || B("addon", e);
|
|
67
70
|
}
|
|
68
|
-
return c({ focus: () =>
|
|
69
|
-
class: ["w-full", s.disabled && "opacity-
|
|
71
|
+
return c({ focus: () => K.value?.focus() }), (e, c) => (d(), r("div", l(W.value, {
|
|
72
|
+
class: ["w-full", s.disabled && "opacity-50"],
|
|
70
73
|
"data-ac-ds": "",
|
|
71
74
|
"data-testid": "ac-input"
|
|
72
|
-
}), [
|
|
73
|
-
s.size === "small" ? "h-9" : "h-10",
|
|
74
|
-
Y.value ? "rounded-l-6" : "rounded-6",
|
|
75
|
-
s.disabled || s.readonly ? "bg-surface-muted" : "bg-surface",
|
|
76
|
-
s.readonly && "shadow-none",
|
|
77
|
-
s.errorMsg ? "border-red-60 focus-within:border-danger focus-within:shadow-[0_0_0_3px_var(--color-red-90)]" : "border-border hover:border-border-dark focus-within:focus-ring"
|
|
78
|
-
]]) }, [
|
|
79
|
-
e.$slots.prefix ? (d(), r("span", D, [p(e.$slots, "prefix")])) : n("", !0),
|
|
80
|
-
S(i("input", l({
|
|
81
|
-
id: g(B),
|
|
82
|
-
ref_key: "input",
|
|
83
|
-
ref: G
|
|
84
|
-
}, W.value, {
|
|
85
|
-
"onUpdate:modelValue": c[0] ||= (e) => R.value = e,
|
|
86
|
-
name: s.name,
|
|
87
|
-
type: q.value,
|
|
88
|
-
disabled: s.disabled,
|
|
89
|
-
readonly: s.readonly,
|
|
90
|
-
required: s.required,
|
|
91
|
-
"aria-invalid": !!s.errorMsg || void 0,
|
|
92
|
-
"aria-describedby": J.value,
|
|
93
|
-
placeholder: " ",
|
|
94
|
-
class: ["peer block h-full w-full min-w-0 flex-1 rounded-6 bg-transparent text-base text-heading outline-none placeholder:text-transparent disabled:cursor-not-allowed", [e.$slots.prefix ? "pl-1" : "pl-3", X.value ? "pr-1.5" : "pr-3"]]
|
|
95
|
-
}), null, 16, O), [[x, R.value]]),
|
|
75
|
+
}), [
|
|
96
76
|
i("label", {
|
|
97
|
-
for: g(
|
|
98
|
-
class:
|
|
99
|
-
}, [
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
s.
|
|
105
|
-
key:
|
|
77
|
+
for: g(V),
|
|
78
|
+
class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
|
|
79
|
+
}, [
|
|
80
|
+
i("span", null, h(s.label), 1),
|
|
81
|
+
s.readonly ? (d(), r("span", D, "(read only)")) : n("", !0),
|
|
82
|
+
s.required ? (d(), r("span", O, "*")) : n("", !0)
|
|
83
|
+
], 8, E),
|
|
84
|
+
s.hint ? (d(), r("p", {
|
|
85
|
+
key: 0,
|
|
86
|
+
id: `${g(V)}-hint`,
|
|
87
|
+
class: "mb-2 text-base text-muted"
|
|
88
|
+
}, h(s.hint), 9, k)) : n("", !0),
|
|
89
|
+
i("div", A, [i("div", { class: u(["relative flex min-w-0 flex-1 items-center border transition-[border-color,box-shadow,background-color] duration-200", [
|
|
90
|
+
s.size === "small" ? "h-9" : "h-10",
|
|
91
|
+
X.value ? "rounded-l-10" : "rounded-10",
|
|
92
|
+
s.readonly ? "bg-surface-muted" : "bg-background",
|
|
93
|
+
s.errorMsg ? "border-danger/60 focus-within:border-danger focus-within:shadow-[0_0_0_2px_color-mix(in_srgb,var(--color-danger)_20%,transparent)]" : ["border-border focus-within:focus-ring", !s.disabled && "hover:border-accent-active"]
|
|
94
|
+
]]) }, [
|
|
95
|
+
e.$slots.prefix ? (d(), r("span", j, [p(e.$slots, "prefix")])) : n("", !0),
|
|
96
|
+
S(i("input", l({
|
|
97
|
+
id: g(V),
|
|
98
|
+
ref_key: "input",
|
|
99
|
+
ref: K
|
|
100
|
+
}, G.value, {
|
|
101
|
+
"onUpdate:modelValue": c[0] ||= (e) => z.value = e,
|
|
102
|
+
name: s.name,
|
|
103
|
+
type: J.value,
|
|
104
|
+
disabled: s.disabled,
|
|
105
|
+
readonly: s.readonly,
|
|
106
|
+
required: s.required,
|
|
107
|
+
"aria-invalid": !!s.errorMsg || void 0,
|
|
108
|
+
"aria-describedby": Y.value,
|
|
109
|
+
class: ["block h-full w-full min-w-0 flex-1 rounded-10 bg-transparent text-base font-normal text-heading outline-none placeholder:text-muted/80 disabled:cursor-not-allowed", [e.$slots.prefix ? "pl-2" : s.size === "small" ? "pl-3" : "pl-4", Z.value ? "pr-2" : s.size === "small" ? "pr-3" : "pr-4"]]
|
|
110
|
+
}), null, 16, M), [[x, z.value]]),
|
|
111
|
+
e.$slots.suffix ? (d(), r("span", {
|
|
112
|
+
key: 1,
|
|
113
|
+
class: u(["relative flex h-full shrink-0 items-center text-base whitespace-nowrap text-muted select-none [&_svg]:size-4", s.type === "password" ? "pr-1" : "pr-3.5"])
|
|
114
|
+
}, [p(e.$slots, "suffix")], 2)) : n("", !0),
|
|
115
|
+
s.type === "password" ? (d(), r("button", {
|
|
116
|
+
key: 2,
|
|
117
|
+
type: "button",
|
|
118
|
+
class: "relative mr-1.5 inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-8 text-muted transition-colors hover:bg-surface-sunken hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
|
|
119
|
+
"aria-label": q.value ? "Hide value" : "Show value",
|
|
120
|
+
"aria-pressed": q.value,
|
|
121
|
+
onClick: c[1] ||= (e) => q.value = !q.value
|
|
122
|
+
}, [(d(), t(m(q.value ? g(T) : g(w)), {
|
|
123
|
+
class: "size-4",
|
|
124
|
+
"aria-hidden": "true"
|
|
125
|
+
}))], 8, N)) : n("", !0)
|
|
126
|
+
], 2), X.value ? (d(), r("button", {
|
|
127
|
+
key: 0,
|
|
106
128
|
type: "button",
|
|
107
|
-
class: "relative
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
129
|
+
class: u(["relative -ml-px inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-r-10 border border-border bg-surface text-base font-medium whitespace-nowrap text-heading transition-colors duration-200 hover:bg-surface-sunken/70 focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none disabled:cursor-not-allowed disabled:hover:bg-surface", [s.size === "small" ? "h-9" : "h-10", s.addonIconOnly ? s.size === "small" ? "w-9" : "w-10" : "px-4"]]),
|
|
130
|
+
disabled: s.disabled,
|
|
131
|
+
"aria-label": s.addonIconOnly ? s.addonLabel : void 0,
|
|
132
|
+
title: s.addonIconOnly ? s.addonLabel : void 0,
|
|
133
|
+
"data-ac-ds": "",
|
|
134
|
+
"data-testid": "ac-input-addon",
|
|
135
|
+
onClick: Q
|
|
136
|
+
}, [s.addonIcon ? (d(), t(m(s.addonIcon), {
|
|
137
|
+
key: 0,
|
|
138
|
+
class: "size-4 text-muted",
|
|
112
139
|
"aria-hidden": "true"
|
|
113
|
-
}))],
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
"
|
|
123
|
-
|
|
124
|
-
}, [s.addonIcon ? (d(), t(m(s.addonIcon), {
|
|
125
|
-
key: 0,
|
|
126
|
-
class: "size-4 text-label",
|
|
127
|
-
"aria-hidden": "true"
|
|
128
|
-
})) : n("", !0), s.addonIconOnly ? n("", !0) : (d(), r("span", N, h(s.addonLabel), 1))], 10, M)) : n("", !0)]), s.errorMsg ? (d(), r("p", {
|
|
129
|
-
key: 0,
|
|
130
|
-
id: `${g(B)}-msg`,
|
|
131
|
-
class: "mt-1.5 flex items-center gap-1 text-xs text-red-30"
|
|
132
|
-
}, [o(g(C), {
|
|
133
|
-
class: "size-3.5 shrink-0",
|
|
134
|
-
"aria-hidden": "true"
|
|
135
|
-
}), a(" " + h(s.errorMsg), 1)], 8, P)) : s.hint ? (d(), r("p", {
|
|
136
|
-
key: 1,
|
|
137
|
-
id: `${g(B)}-msg`,
|
|
138
|
-
class: "mt-1.5 text-xs text-muted"
|
|
139
|
-
}, h(s.hint), 9, F)) : n("", !0)], 16));
|
|
140
|
+
})) : n("", !0), s.addonIconOnly ? n("", !0) : (d(), r("span", F, h(s.addonLabel), 1))], 10, P)) : n("", !0)]),
|
|
141
|
+
s.errorMsg ? (d(), r("p", {
|
|
142
|
+
key: 1,
|
|
143
|
+
id: `${g(V)}-msg`,
|
|
144
|
+
class: "mt-1.5 flex items-center gap-1.5 text-base text-danger-strong",
|
|
145
|
+
role: "alert"
|
|
146
|
+
}, [o(g(C), {
|
|
147
|
+
class: "size-4 shrink-0",
|
|
148
|
+
"aria-hidden": "true"
|
|
149
|
+
}), a(" " + h(s.errorMsg), 1)], 8, I)) : n("", !0)
|
|
150
|
+
], 16));
|
|
140
151
|
}
|
|
141
152
|
});
|
|
142
153
|
//#endregion
|
|
143
|
-
export {
|
|
154
|
+
export { L as default };
|
|
@@ -8,7 +8,7 @@ var f = {
|
|
|
8
8
|
}, p = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "px-px text-xs text-muted"
|
|
11
|
-
}, m = { "aria-hidden": "true" }, h = { class: "sr-only" }, g = "inline-flex items-center justify-center border border-border
|
|
11
|
+
}, m = { "aria-hidden": "true" }, h = { class: "sr-only" }, g = "inline-flex items-center justify-center border border-border bg-surface-muted font-mono font-medium text-muted select-none", _ = /*@__PURE__*/ o({
|
|
12
12
|
__name: "AcKbd",
|
|
13
13
|
props: {
|
|
14
14
|
keys: { default: () => [] },
|