@ac-design/design-system 2.0.0 → 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/dist/lib/charts/ChartFrame.vue.d.ts +2 -0
- package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +42 -37
- package/dist/lib/charts/cartesian.d.ts +324 -0
- package/dist/lib/charts/cartesian.js +137 -0
- package/dist/lib/charts/echarts.d.ts +86 -0
- package/dist/lib/charts/echarts.js +173 -0
- package/dist/lib/charts/graph.d.ts +77 -0
- package/dist/lib/charts/graph.js +155 -0
- package/dist/lib/charts/index.d.ts +4 -0
- package/dist/lib/charts/index.js +3 -1
- package/dist/lib/charts/shared.d.ts +0 -7
- package/dist/lib/charts/shared.js +1 -19
- package/dist/lib/charts/xy.d.ts +11 -7
- package/dist/lib/charts/xy.js +53 -72
- package/dist/lib/compat.css +1322 -278
- package/dist/lib/components/AcAlert.vue.d.ts +9 -0
- package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +121 -21
- package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcAreaChart.vue.d.ts +3 -0
- package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +132 -142
- package/dist/lib/components/AcAvatar.vue.d.ts +7 -4
- package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +59 -54
- package/dist/lib/components/AcBadge.vue.d.ts +7 -3
- package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +35 -28
- package/dist/lib/components/AcBarChart.vue.d.ts +3 -0
- package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +142 -146
- package/dist/lib/components/AcBreadcrumb.vue.d.ts +4 -1
- package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +18 -17
- package/dist/lib/components/AcBulkActionBar.vue.d.ts +2 -0
- package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcButton.vue.d.ts +12 -6
- package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +85 -47
- package/dist/lib/components/AcCard.vue.d.ts +34 -3
- package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +169 -34
- package/dist/lib/components/AcCellValue.vue.d.ts +3 -3
- package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +171 -165
- package/dist/lib/components/AcCheckBox.vue.d.ts +1 -1
- package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +58 -72
- package/dist/lib/components/AcCheckList.js +5 -0
- package/dist/lib/components/AcCheckList.vue.d.ts +45 -0
- package/dist/lib/components/AcCheckList.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/lib/components/AcCheckRadio.vue.d.ts +30 -5
- package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +100 -36
- package/dist/lib/components/AcCircularProgress.vue.d.ts +4 -4
- package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +12 -9
- package/dist/lib/components/AcColorInput.vue.d.ts +5 -2
- package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +127 -97
- package/dist/lib/components/AcCommandBlock.js +5 -0
- package/dist/lib/components/AcCommandBlock.vue.d.ts +34 -0
- package/dist/lib/components/AcCommandBlock.vue_vue_type_script_setup_true_lang.js +88 -0
- package/dist/lib/components/AcConfirmModal.vue.d.ts +1 -1
- package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +7 -3
- package/dist/lib/components/AcCopyButton.vue.d.ts +2 -2
- package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcCostSummary.js +5 -0
- package/dist/lib/components/AcCostSummary.vue.d.ts +102 -0
- package/dist/lib/components/AcCostSummary.vue_vue_type_script_setup_true_lang.js +179 -0
- package/dist/lib/components/AcDatePicker.vue.d.ts +3 -3
- package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +606 -380
- package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +47 -41
- package/dist/lib/components/AcDonutChart.vue.d.ts +10 -0
- package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +116 -89
- package/dist/lib/components/AcDropdown.vue.d.ts +5 -2
- package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +88 -75
- package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +11 -10
- package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
- package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/lib/components/AcEmptyState.vue.d.ts +1 -1
- package/dist/lib/components/AcErrorState.js +5 -0
- package/dist/lib/components/AcErrorState.vue.d.ts +46 -0
- package/dist/lib/components/AcErrorState.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/lib/components/AcFeatureCard.vue.d.ts +6 -0
- package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +136 -114
- package/dist/lib/components/AcFooter.vue.d.ts +1 -1
- package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcFormFooter.vue.d.ts +1 -1
- package/dist/lib/components/AcFormSection.vue.d.ts +1 -1
- package/dist/lib/components/AcGraphChart.js +5 -0
- package/dist/lib/components/AcGraphChart.vue.d.ts +124 -0
- package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +578 -0
- package/dist/lib/components/AcHeader.vue.d.ts +17 -2
- package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +79 -25
- package/dist/lib/components/AcInfoTable.vue.d.ts +1 -1
- package/dist/lib/components/AcInput.vue.d.ts +1 -1
- package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +76 -79
- package/dist/lib/components/AcKeyValueInput.vue.d.ts +4 -4
- package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +199 -183
- package/dist/lib/components/AcLineChart.vue.d.ts +6 -0
- package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +113 -125
- package/dist/lib/components/AcLoader.js +5 -0
- package/dist/lib/components/AcLoader.vue.d.ts +15 -0
- package/dist/lib/components/AcLoader.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +3 -1
- package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +44 -36
- package/dist/lib/components/AcMapChart.js +5 -0
- package/dist/lib/components/AcMapChart.vue.d.ts +136 -0
- package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +518 -0
- package/dist/lib/components/AcModal.vue.d.ts +6 -3
- package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +85 -61
- package/dist/lib/components/AcNavbar.vue.d.ts +8 -5
- package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +25 -17
- package/dist/lib/components/AcNavbarItem.vue.d.ts +2 -2
- package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +3 -4
- package/dist/lib/components/AcNotificationMenu.vue.d.ts +3 -3
- package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +133 -168
- package/dist/lib/components/AcNumberInput.vue.d.ts +2 -2
- package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +137 -147
- package/dist/lib/components/AcPage.vue.d.ts +2 -2
- package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcPagination.vue.d.ts +5 -5
- package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +59 -56
- package/dist/lib/components/AcPreloader.vue.d.ts +3 -3
- package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +15 -16
- package/dist/lib/components/AcProductHero.js +5 -0
- package/dist/lib/components/AcProductHero.vue.d.ts +56 -0
- package/dist/lib/components/AcProductHero.vue_vue_type_script_setup_true_lang.js +95 -0
- package/dist/lib/components/AcProgress.vue.d.ts +17 -2
- package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +83 -29
- package/dist/lib/components/AcResourceCard.vue.d.ts +1 -1
- package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
- package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +8 -4
- package/dist/lib/components/AcSelect.vue.d.ts +3 -3
- package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +232 -243
- package/dist/lib/components/AcSettingsRow.js +5 -0
- package/dist/lib/components/AcSettingsRow.vue.d.ts +29 -0
- package/dist/lib/components/AcSettingsRow.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +5 -5
- package/dist/lib/components/AcSideTabs.vue.d.ts +1 -1
- package/dist/lib/components/AcSidebar.vue.d.ts +4 -1
- package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +104 -94
- package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
- package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +42 -42
- package/dist/lib/components/AcSidebarSection.vue.d.ts +2 -2
- package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +23 -18
- package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/lib/components/AcSwitch.vue.d.ts +3 -0
- package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +46 -39
- package/dist/lib/components/AcSwitchCard.vue.d.ts +3 -3
- package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +9 -7
- package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +65 -65
- package/dist/lib/components/AcTabs.vue.d.ts +9 -2
- package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +42 -27
- package/dist/lib/components/AcTag.vue.d.ts +1 -1
- package/dist/lib/components/AcTagInput.vue.d.ts +5 -5
- package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +140 -142
- package/dist/lib/components/AcTextarea.vue.d.ts +1 -1
- package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +69 -72
- package/dist/lib/components/AcThemeMode.vue.d.ts +3 -3
- package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +54 -22
- package/dist/lib/components/AcTimePicker.vue.d.ts +1 -1
- package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +177 -185
- package/dist/lib/components/AcToaster.vue.d.ts +6 -3
- package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +103 -64
- package/dist/lib/components/AcTooltip.vue.d.ts +34 -14
- package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +184 -70
- package/dist/lib/components/AcUserMenu.vue.d.ts +23 -1
- package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +181 -138
- package/dist/lib/components/index.d.ts +7 -0
- package/dist/lib/components/status.d.ts +3 -1
- package/dist/lib/components/status.js +20 -5
- package/dist/lib/composables/useToast.d.ts +17 -1
- package/dist/lib/composables/useToast.js +10 -2
- package/dist/lib/index.d.ts +7 -3
- package/dist/lib/index.js +80 -73
- package/dist/lib/theme.css +39 -54
- package/package.json +12 -3
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ArrowLeft as
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, normalizeStyle as u, openBlock as d, renderSlot as f, resolveDynamicComponent as p, toDisplayString as m, unref as h } from "vue";
|
|
2
|
+
import { ArrowLeft as g, BookOpen as _, SquareArrowOutUpRight as v } from "@lucide/vue";
|
|
3
3
|
//#region src/lib/components/AcHeader.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var y = {
|
|
5
5
|
key: 0,
|
|
6
|
-
class: "mb-
|
|
7
|
-
},
|
|
6
|
+
class: "mb-4"
|
|
7
|
+
}, b = { class: "min-w-0" }, x = {
|
|
8
8
|
key: 0,
|
|
9
|
-
class: "
|
|
10
|
-
},
|
|
9
|
+
class: "mb-2"
|
|
10
|
+
}, S = { class: "flex min-w-0 flex-wrap items-center gap-2.5" }, C = {
|
|
11
11
|
key: 0,
|
|
12
|
-
class: "flex
|
|
13
|
-
|
|
12
|
+
class: "inline-flex items-center rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium whitespace-nowrap text-primary-strong",
|
|
13
|
+
"data-testid": "ac-header-count"
|
|
14
|
+
}, w = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "mt-2"
|
|
17
|
+
}, T = ["href"], E = /*@__PURE__*/ c({
|
|
14
18
|
__name: "AcHeader",
|
|
15
19
|
props: {
|
|
16
20
|
title: { default: "" },
|
|
17
21
|
subtitle: { default: "" },
|
|
22
|
+
variant: { default: "bar" },
|
|
23
|
+
icon: { default: void 0 },
|
|
24
|
+
countLabel: { default: "" },
|
|
25
|
+
docsHref: { default: "" },
|
|
18
26
|
backButton: {
|
|
19
27
|
type: Boolean,
|
|
20
28
|
default: !1
|
|
@@ -27,34 +35,80 @@ var p = { class: "flex min-w-0 items-center gap-3.5" }, m = { class: "min-w-0" }
|
|
|
27
35
|
size: { default: "normal" }
|
|
28
36
|
},
|
|
29
37
|
emits: ["back"],
|
|
30
|
-
setup(
|
|
31
|
-
let
|
|
32
|
-
return (
|
|
33
|
-
class:
|
|
34
|
-
style:
|
|
38
|
+
setup(c, { emit: E }) {
|
|
39
|
+
let D = c, O = E, k = t(() => D.size === "compact"), A = t(() => D.variant === "hero"), j = t(() => D.variant === "bar" ? ["z-20 border-b border-border/80 bg-surface/90 backdrop-blur-sm", D.sticky && "sticky"] : D.sticky && "sticky z-20 bg-background/90 backdrop-blur-sm"), M = t(() => D.variant === "bar" ? ["flex-wrap items-center gap-x-6 gap-y-4", k.value ? "px-4 py-3 sm:px-6" : "px-4 py-5 sm:px-6"] : ["flex-col gap-4 sm:flex-row sm:items-center", D.variant === "plain" && k.value && "py-2"]), N = t(() => A.value ? "size-12 rounded-14 border border-primary/25 bg-surface text-primary-strong shadow-sm ring-4 ring-primary/5 [&_svg]:size-6" : ["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", k.value ? "size-9 rounded-10 [&_svg]:size-5" : "size-11 rounded-14 [&_svg]:size-6"]), P = t(() => A.value ? "text-3xl text-balance sm:text-[28px]" : ["truncate", k.value ? "text-lg" : "text-2xl md:text-3xl"]);
|
|
40
|
+
return (t, E) => (d(), i("header", {
|
|
41
|
+
class: l(j.value),
|
|
42
|
+
style: u(c.sticky ? { top: c.top } : void 0),
|
|
35
43
|
"data-ac-ds": "",
|
|
36
44
|
"data-testid": "ac-header"
|
|
37
|
-
}, [
|
|
38
|
-
|
|
45
|
+
}, [A.value && t.$slots.breadcrumb ? (d(), i("div", y, [f(t.$slots, "breadcrumb")])) : r("", !0), a("div", { class: l(A.value && "relative isolate overflow-hidden rounded-16 border border-border bg-surface px-5 py-5 shadow-xs sm:px-7 sm:py-6") }, [A.value ? (d(), i(e, { key: 0 }, [
|
|
46
|
+
E[1] ||= a("div", {
|
|
47
|
+
class: "absolute inset-0 -z-10 bg-linear-to-br from-primary/10 via-primary/3 to-transparent",
|
|
48
|
+
"aria-hidden": "true"
|
|
49
|
+
}, null, -1),
|
|
50
|
+
E[2] ||= a("div", {
|
|
51
|
+
class: "absolute inset-0 -z-10 bg-[radial-gradient(circle_at_1px_1px,var(--color-border)_1px,transparent_0)] bg-size-[18px_18px] [mask-image:linear-gradient(to_left,black,transparent_60%)]",
|
|
52
|
+
"aria-hidden": "true"
|
|
53
|
+
}, null, -1),
|
|
54
|
+
c.icon ? (d(), n(p(c.icon), {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: "absolute -right-8 -bottom-12 -z-10 size-48 text-primary/6",
|
|
57
|
+
"aria-hidden": "true"
|
|
58
|
+
})) : r("", !0)
|
|
59
|
+
], 64)) : r("", !0), a("div", { class: l(["flex justify-between", M.value]) }, [a("div", { class: l(["flex min-w-0 items-center gap-3.5", A.value && "gap-4"]) }, [
|
|
60
|
+
c.backButton ? (d(), i("button", {
|
|
39
61
|
key: 0,
|
|
40
62
|
type: "button",
|
|
41
63
|
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",
|
|
42
64
|
"aria-label": "Back",
|
|
43
65
|
"data-ac-ds": "",
|
|
44
66
|
"data-testid": "ac-header-back",
|
|
45
|
-
onClick:
|
|
46
|
-
}, [
|
|
67
|
+
onClick: E[0] ||= (e) => O("back")
|
|
68
|
+
}, [s(h(g), {
|
|
47
69
|
class: "size-4",
|
|
48
70
|
"aria-hidden": "true"
|
|
49
|
-
})])) :
|
|
50
|
-
|
|
71
|
+
})])) : r("", !0),
|
|
72
|
+
t.$slots.icon || c.icon ? (d(), i("span", {
|
|
51
73
|
key: 1,
|
|
52
|
-
class:
|
|
74
|
+
class: l(["inline-flex shrink-0 items-center justify-center overflow-hidden", N.value]),
|
|
75
|
+
"aria-hidden": "true"
|
|
76
|
+
}, [f(t.$slots, "icon", {}, () => [(d(), n(p(c.icon)))])], 2)) : r("", !0),
|
|
77
|
+
a("div", b, [
|
|
78
|
+
!A.value && t.$slots.breadcrumb ? (d(), i("div", x, [f(t.$slots, "breadcrumb")])) : r("", !0),
|
|
79
|
+
f(t.$slots, "title", {}, () => [a("div", S, [
|
|
80
|
+
a("h4", { class: l(["font-heading font-semibold tracking-tight text-heading", P.value]) }, m(c.title), 3),
|
|
81
|
+
c.countLabel ? (d(), i("span", C, m(c.countLabel), 1)) : r("", !0),
|
|
82
|
+
f(t.$slots, "title-extra")
|
|
83
|
+
]), c.subtitle ? (d(), i("p", {
|
|
84
|
+
key: 0,
|
|
85
|
+
class: l(["mt-1 max-w-prose text-base text-muted", c.variant === "bar" ? "truncate" : "leading-relaxed"])
|
|
86
|
+
}, m(c.subtitle), 3)) : r("", !0)]),
|
|
87
|
+
t.$slots.meta ? (d(), i("div", w, [f(t.$slots, "meta")])) : r("", !0)
|
|
88
|
+
])
|
|
89
|
+
], 2), t.$slots.default || c.docsHref ? (d(), i("div", {
|
|
90
|
+
key: 0,
|
|
91
|
+
class: l(["flex shrink-0 flex-wrap items-center gap-2", A.value && "self-start sm:self-center"])
|
|
92
|
+
}, [c.docsHref ? (d(), i("a", {
|
|
93
|
+
key: 0,
|
|
94
|
+
href: c.docsHref,
|
|
95
|
+
target: "_blank",
|
|
96
|
+
rel: "noopener noreferrer",
|
|
97
|
+
class: "inline-flex h-8 items-center gap-2 rounded-10 border border-border bg-background/80 px-3 text-base font-medium text-heading shadow-xs backdrop-blur-sm transition-colors duration-200 hover:border-primary/40 hover:text-primary-strong focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none",
|
|
98
|
+
"data-testid": "ac-header-docs"
|
|
99
|
+
}, [
|
|
100
|
+
s(h(_), {
|
|
101
|
+
class: "size-4",
|
|
102
|
+
"aria-hidden": "true"
|
|
103
|
+
}),
|
|
104
|
+
E[3] ||= o(" Documentation ", -1),
|
|
105
|
+
s(h(v), {
|
|
106
|
+
class: "size-3 text-muted",
|
|
53
107
|
"aria-hidden": "true"
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
]
|
|
108
|
+
}),
|
|
109
|
+
E[4] ||= a("span", { class: "sr-only" }, "(opens in a new tab)", -1)
|
|
110
|
+
], 8, T)) : r("", !0), f(t.$slots, "default")], 2)) : r("", !0)], 2)], 2)], 6));
|
|
57
111
|
}
|
|
58
112
|
});
|
|
59
113
|
//#endregion
|
|
60
|
-
export {
|
|
114
|
+
export { E as default };
|
|
@@ -46,8 +46,8 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
46
46
|
loading: boolean;
|
|
47
47
|
items: InfoItem[];
|
|
48
48
|
emptyText: string;
|
|
49
|
-
layout: "horizontal" | "stacked";
|
|
50
49
|
columns: 1 | 2;
|
|
50
|
+
layout: "horizontal" | "stacked";
|
|
51
51
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
52
52
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
53
53
|
declare const _default: typeof __VLS_export;
|
|
@@ -16,7 +16,7 @@ export interface Props {
|
|
|
16
16
|
errorMsg?: string;
|
|
17
17
|
/** Help text between the label and the field. */
|
|
18
18
|
hint?: string;
|
|
19
|
-
/** `small` 36px or `normal`
|
|
19
|
+
/** `small` 36px or `normal` 42px tall. */
|
|
20
20
|
size?: "small" | "normal";
|
|
21
21
|
/** Text of a button attached to the right edge, such as "Copy", "Generate" or "Browse". It emits `addon` when clicked. Also its accessible name when `addon-icon-only` is set. */
|
|
22
22
|
addonLabel?: string;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i,
|
|
2
|
-
import {
|
|
1
|
+
import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, mergeModels as o, mergeProps as s, normalizeClass as c, openBlock as l, ref as u, renderSlot as d, resolveDynamicComponent as f, toDisplayString as p, unref as m, useAttrs as h, useId as g, useModel as _, useSlots as v, vModelDynamic as y, withDirectives as b } from "vue";
|
|
2
|
+
import { Eye as x, EyeOff as S } from "@lucide/vue";
|
|
3
3
|
//#region src/lib/components/AcInput.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var C = ["for"], w = {
|
|
5
5
|
key: 0,
|
|
6
|
-
class: "
|
|
7
|
-
},
|
|
6
|
+
class: "text-muted"
|
|
7
|
+
}, T = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "text-danger",
|
|
10
10
|
"aria-hidden": "true"
|
|
11
|
-
},
|
|
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 = [
|
|
11
|
+
}, E = ["id"], D = { class: "flex" }, O = [
|
|
15
12
|
"id",
|
|
16
13
|
"name",
|
|
17
14
|
"type",
|
|
@@ -20,14 +17,14 @@ var E = ["for"], D = {
|
|
|
20
17
|
"required",
|
|
21
18
|
"aria-invalid",
|
|
22
19
|
"aria-describedby"
|
|
23
|
-
],
|
|
20
|
+
], k = ["aria-label", "aria-pressed"], A = [
|
|
24
21
|
"disabled",
|
|
25
22
|
"aria-label",
|
|
26
23
|
"title"
|
|
27
|
-
],
|
|
24
|
+
], j = { key: 1 }, M = ["id"], N = /*@__PURE__*/ a({
|
|
28
25
|
inheritAttrs: !1,
|
|
29
26
|
__name: "AcInput",
|
|
30
|
-
props: /*@__PURE__*/
|
|
27
|
+
props: /*@__PURE__*/ o({
|
|
31
28
|
label: {},
|
|
32
29
|
name: { default: "" },
|
|
33
30
|
type: { default: "text" },
|
|
@@ -56,99 +53,99 @@ var E = ["for"], D = {
|
|
|
56
53
|
modelValue: { default: "" },
|
|
57
54
|
modelModifiers: {}
|
|
58
55
|
}),
|
|
59
|
-
emits: /*@__PURE__*/
|
|
60
|
-
setup(
|
|
61
|
-
let
|
|
62
|
-
class:
|
|
63
|
-
style:
|
|
64
|
-
})),
|
|
65
|
-
let { class: e, style: t, ...n } =
|
|
56
|
+
emits: /*@__PURE__*/ o(["addon"], ["update:modelValue"]),
|
|
57
|
+
setup(a, { expose: o, emit: N }) {
|
|
58
|
+
let P = a, F = _(a, "modelValue"), I = N, L = g(), R = h(), z = v(), B = e(() => ({
|
|
59
|
+
class: R.class,
|
|
60
|
+
style: R.style
|
|
61
|
+
})), V = e(() => {
|
|
62
|
+
let { class: e, style: t, ...n } = R;
|
|
66
63
|
return n;
|
|
67
|
-
}),
|
|
68
|
-
function
|
|
69
|
-
|
|
64
|
+
}), H = u(null), U = u(!1), W = e(() => P.type === "password" && U.value ? "text" : P.type), G = e(() => [P.hint && `${L}-hint`, P.errorMsg && `${L}-msg`].filter(Boolean).join(" ") || void 0), K = e(() => !!P.addonLabel || !!P.addonIcon), q = e(() => !!z.suffix || P.type === "password");
|
|
65
|
+
function J(e) {
|
|
66
|
+
P.disabled || I("addon", e);
|
|
70
67
|
}
|
|
71
|
-
return
|
|
72
|
-
class: ["w-full",
|
|
68
|
+
return o({ focus: () => H.value?.focus() }), (e, o) => (l(), r("div", s(B.value, {
|
|
69
|
+
class: ["w-full", a.disabled && "opacity-50"],
|
|
73
70
|
"data-ac-ds": "",
|
|
74
71
|
"data-testid": "ac-input"
|
|
75
72
|
}), [
|
|
76
73
|
i("label", {
|
|
77
|
-
for:
|
|
74
|
+
for: m(L),
|
|
78
75
|
class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
|
|
79
76
|
}, [
|
|
80
|
-
i("span", null,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
], 8,
|
|
84
|
-
|
|
77
|
+
i("span", null, p(a.label), 1),
|
|
78
|
+
a.readonly ? (l(), r("span", w, "(read only)")) : n("", !0),
|
|
79
|
+
a.required ? (l(), r("span", T, "*")) : n("", !0)
|
|
80
|
+
], 8, C),
|
|
81
|
+
a.hint ? (l(), r("p", {
|
|
85
82
|
key: 0,
|
|
86
|
-
id: `${
|
|
83
|
+
id: `${m(L)}-hint`,
|
|
87
84
|
class: "mb-2 text-base text-muted"
|
|
88
|
-
},
|
|
89
|
-
i("div",
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
85
|
+
}, p(a.hint), 9, E)) : n("", !0),
|
|
86
|
+
i("div", D, [i("div", { class: c(["relative flex min-w-0 flex-1 items-center border transition-[border-color,box-shadow,background-color] duration-200", [
|
|
87
|
+
a.size === "small" ? "h-9" : "h-10.5",
|
|
88
|
+
K.value ? "rounded-l-10" : "rounded-10",
|
|
89
|
+
a.readonly ? "bg-surface-muted" : "bg-background",
|
|
90
|
+
a.errorMsg ? "border-danger/50 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", !a.disabled && "hover:border-accent-active"]
|
|
94
91
|
]]) }, [
|
|
95
|
-
e.$slots.prefix ? (
|
|
96
|
-
|
|
97
|
-
|
|
92
|
+
e.$slots.prefix ? (l(), r("span", {
|
|
93
|
+
key: 0,
|
|
94
|
+
class: c(["flex h-full shrink-0 items-center text-base whitespace-nowrap text-muted select-none [&_svg]:size-4", a.size === "small" ? "pl-3" : "pl-4"])
|
|
95
|
+
}, [d(e.$slots, "prefix")], 2)) : n("", !0),
|
|
96
|
+
b(i("input", s({
|
|
97
|
+
id: m(L),
|
|
98
98
|
ref_key: "input",
|
|
99
|
-
ref:
|
|
100
|
-
},
|
|
101
|
-
"onUpdate:modelValue":
|
|
102
|
-
name:
|
|
103
|
-
type:
|
|
104
|
-
disabled:
|
|
105
|
-
readonly:
|
|
106
|
-
required:
|
|
107
|
-
"aria-invalid": !!
|
|
108
|
-
"aria-describedby":
|
|
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" :
|
|
110
|
-
}), null, 16,
|
|
111
|
-
e.$slots.suffix ? (
|
|
99
|
+
ref: H
|
|
100
|
+
}, V.value, {
|
|
101
|
+
"onUpdate:modelValue": o[0] ||= (e) => F.value = e,
|
|
102
|
+
name: a.name,
|
|
103
|
+
type: W.value,
|
|
104
|
+
disabled: a.disabled,
|
|
105
|
+
readonly: a.readonly,
|
|
106
|
+
required: a.required,
|
|
107
|
+
"aria-invalid": !!a.errorMsg || void 0,
|
|
108
|
+
"aria-describedby": G.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" : a.size === "small" ? "pl-4" : "pl-5", q.value ? "pr-2" : a.size === "small" ? "pr-4" : "pr-5"]]
|
|
110
|
+
}), null, 16, O), [[y, F.value]]),
|
|
111
|
+
e.$slots.suffix ? (l(), r("span", {
|
|
112
112
|
key: 1,
|
|
113
|
-
class:
|
|
114
|
-
}, [
|
|
115
|
-
|
|
113
|
+
class: c(["relative flex h-full shrink-0 items-center text-base whitespace-nowrap text-muted select-none [&_svg]:size-4", a.type === "password" ? "pr-2" : a.size === "small" ? "pr-3" : "pr-4"])
|
|
114
|
+
}, [d(e.$slots, "suffix")], 2)) : n("", !0),
|
|
115
|
+
a.type === "password" ? (l(), r("button", {
|
|
116
116
|
key: 2,
|
|
117
117
|
type: "button",
|
|
118
|
-
class: "relative
|
|
119
|
-
"aria-label":
|
|
120
|
-
"aria-pressed":
|
|
121
|
-
onClick:
|
|
122
|
-
}, [(
|
|
123
|
-
class: "size-4",
|
|
118
|
+
class: c(["relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-4 text-muted transition-colors hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none", a.size === "small" ? "mr-3" : "mr-4"]),
|
|
119
|
+
"aria-label": U.value ? "Hide value" : "Show value",
|
|
120
|
+
"aria-pressed": U.value,
|
|
121
|
+
onClick: o[1] ||= (e) => U.value = !U.value
|
|
122
|
+
}, [(l(), t(f(U.value ? m(S) : m(x)), {
|
|
123
|
+
class: c(a.size === "small" ? "size-4" : "size-5"),
|
|
124
124
|
"aria-hidden": "true"
|
|
125
|
-
}))],
|
|
126
|
-
], 2),
|
|
125
|
+
}, null, 8, ["class"]))], 10, k)) : n("", !0)
|
|
126
|
+
], 2), K.value ? (l(), r("button", {
|
|
127
127
|
key: 0,
|
|
128
128
|
type: "button",
|
|
129
|
-
class:
|
|
130
|
-
disabled:
|
|
131
|
-
"aria-label":
|
|
132
|
-
title:
|
|
129
|
+
class: c(["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", [a.size === "small" ? "h-9" : "h-10.5", a.addonIconOnly ? a.size === "small" ? "w-9" : "w-10.5" : "px-4"]]),
|
|
130
|
+
disabled: a.disabled,
|
|
131
|
+
"aria-label": a.addonIconOnly ? a.addonLabel : void 0,
|
|
132
|
+
title: a.addonIconOnly ? a.addonLabel : void 0,
|
|
133
133
|
"data-ac-ds": "",
|
|
134
134
|
"data-testid": "ac-input-addon",
|
|
135
|
-
onClick:
|
|
136
|
-
}, [
|
|
135
|
+
onClick: J
|
|
136
|
+
}, [a.addonIcon ? (l(), t(f(a.addonIcon), {
|
|
137
137
|
key: 0,
|
|
138
138
|
class: "size-4 text-muted",
|
|
139
139
|
"aria-hidden": "true"
|
|
140
|
-
})) : n("", !0),
|
|
141
|
-
|
|
140
|
+
})) : n("", !0), a.addonIconOnly ? n("", !0) : (l(), r("span", j, p(a.addonLabel), 1))], 10, A)) : n("", !0)]),
|
|
141
|
+
a.errorMsg ? (l(), r("p", {
|
|
142
142
|
key: 1,
|
|
143
|
-
id: `${
|
|
144
|
-
class: "mt-1
|
|
143
|
+
id: `${m(L)}-msg`,
|
|
144
|
+
class: "mt-1 text-base text-danger-strong",
|
|
145
145
|
role: "alert"
|
|
146
|
-
},
|
|
147
|
-
class: "size-4 shrink-0",
|
|
148
|
-
"aria-hidden": "true"
|
|
149
|
-
}), a(" " + h(s.errorMsg), 1)], 8, I)) : n("", !0)
|
|
146
|
+
}, p(a.errorMsg), 9, M)) : n("", !0)
|
|
150
147
|
], 16));
|
|
151
148
|
}
|
|
152
149
|
});
|
|
153
150
|
//#endregion
|
|
154
|
-
export {
|
|
151
|
+
export { N as default };
|
|
@@ -26,9 +26,9 @@ export interface Props {
|
|
|
26
26
|
keyPlaceholder?: string;
|
|
27
27
|
/** Example value shown in empty value fields. */
|
|
28
28
|
valuePlaceholder?: string;
|
|
29
|
-
/** Singular name of one row, used in “
|
|
29
|
+
/** Singular name of one row, used in “Remove <item-name> app” and announcements. */
|
|
30
30
|
itemName?: string;
|
|
31
|
-
/** Text of the Add button. Defaults to “Add
|
|
31
|
+
/** Text of the Add button. Defaults to “Add new”, as in cloud-ui. */
|
|
32
32
|
addLabel?: string;
|
|
33
33
|
/** Choices for a third column, such as taint effects. Each row then gets a small select bound to `option`. */
|
|
34
34
|
options?: SelectOption<string>[];
|
|
@@ -87,8 +87,6 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
87
87
|
disabled: boolean;
|
|
88
88
|
max: number;
|
|
89
89
|
size: "small" | "normal";
|
|
90
|
-
keyLabel: string;
|
|
91
|
-
valueLabel: string;
|
|
92
90
|
readonly: boolean;
|
|
93
91
|
options: SelectOption<string>[];
|
|
94
92
|
hint: string;
|
|
@@ -96,6 +94,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
96
94
|
mono: boolean;
|
|
97
95
|
itemName: string;
|
|
98
96
|
addLabel: string;
|
|
97
|
+
keyLabel: string;
|
|
98
|
+
valueLabel: string;
|
|
99
99
|
keyPlaceholder: string;
|
|
100
100
|
valuePlaceholder: string;
|
|
101
101
|
optionLabel: string;
|