@ac-design/design-system 2.0.0 → 2.1.1
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 +20 -2
- package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +84 -26
- 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
|
@@ -4,28 +4,28 @@ var b = {
|
|
|
4
4
|
"data-ac-ds": "",
|
|
5
5
|
"data-testid": "ac-tabs"
|
|
6
6
|
}, x = {
|
|
7
|
-
role: "tablist",
|
|
8
|
-
class: "flex gap-6 overflow-x-auto overflow-y-hidden border-b border-border px-1 text-base font-medium [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
|
9
|
-
}, S = {
|
|
10
7
|
key: 0,
|
|
11
8
|
role: "tabpanel",
|
|
12
9
|
class: "pt-6"
|
|
13
|
-
},
|
|
10
|
+
}, S = /*@__PURE__*/ s({
|
|
14
11
|
__name: "AcTabs",
|
|
15
|
-
props: /*@__PURE__*/ l({
|
|
12
|
+
props: /*@__PURE__*/ l({
|
|
13
|
+
items: {},
|
|
14
|
+
variant: { default: "soft" }
|
|
15
|
+
}, {
|
|
16
16
|
modelValue: { default: "" },
|
|
17
17
|
modelModifiers: {}
|
|
18
18
|
}),
|
|
19
19
|
emits: ["update:modelValue"],
|
|
20
20
|
setup(s) {
|
|
21
|
-
let l = s,
|
|
22
|
-
if (!
|
|
23
|
-
let e =
|
|
21
|
+
let l = s, S = _(s, "modelValue"), C = c()?.appContext, w = C?.components.RouterLink, T = C?.config.globalProperties.$router, E = t(() => {
|
|
22
|
+
if (!T) return "";
|
|
23
|
+
let e = T.currentRoute.value.path, t = "", n = -1;
|
|
24
24
|
for (let r of l.items) {
|
|
25
25
|
if (r.to === void 0 || r.disabled) continue;
|
|
26
26
|
let i;
|
|
27
27
|
try {
|
|
28
|
-
i =
|
|
28
|
+
i = T.resolve(r.to).path;
|
|
29
29
|
} catch {
|
|
30
30
|
continue;
|
|
31
31
|
}
|
|
@@ -35,38 +35,53 @@ var b = {
|
|
|
35
35
|
}
|
|
36
36
|
return t;
|
|
37
37
|
});
|
|
38
|
-
v(
|
|
39
|
-
function
|
|
40
|
-
return e.to !== void 0 &&
|
|
38
|
+
v(E, (e) => e && (S.value = e), { immediate: !0 });
|
|
39
|
+
function D(e) {
|
|
40
|
+
return e.to !== void 0 && w && !e.disabled ? w : e.href || typeof e.to == "string" ? "a" : "button";
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
let t =
|
|
44
|
-
return t ===
|
|
42
|
+
function O(e) {
|
|
43
|
+
let t = D(e), n = { "data-testid": e.testid };
|
|
44
|
+
return t === w ? n.to = e.to : t === "a" ? e.disabled ? n["aria-disabled"] = "true" : n.href = e.href ?? e.to : (n.type = "button", n.disabled = e.disabled || void 0), n;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function k(e, t) {
|
|
47
47
|
if (e.disabled) {
|
|
48
48
|
t.preventDefault();
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
S.value = e.key;
|
|
52
|
+
}
|
|
53
|
+
function A(e) {
|
|
54
|
+
let t = S.value === e.key;
|
|
55
|
+
return l.variant === "soft" ? ["rounded-t-8 px-3 py-2", t ? "border-primary bg-primary/4 text-primary-strong" : "border-transparent text-muted hover:bg-accent/60 hover:text-heading"] : ["pt-1 pb-3", t ? "border-primary text-primary-strong" : "border-transparent text-muted hover:border-border hover:text-heading"];
|
|
52
56
|
}
|
|
53
|
-
return (t, c) => (f(), i("div", b, [a("div",
|
|
57
|
+
return (t, c) => (f(), i("div", b, [a("div", {
|
|
58
|
+
role: "tablist",
|
|
59
|
+
class: d(["flex border-b border-border px-1 text-base font-medium", s.variant === "soft" ? "flex-wrap gap-1" : "gap-6 overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"])
|
|
60
|
+
}, [(f(!0), i(e, null, p(s.items, (e) => (f(), n(h(D(e)), u({ key: e.key }, { ref_for: !0 }, O(e), {
|
|
54
61
|
role: "tab",
|
|
55
|
-
"aria-selected":
|
|
56
|
-
class: ["relative inline-flex shrink-0 cursor-pointer items-center gap-2 border-b-2
|
|
57
|
-
onClick: (t) =>
|
|
62
|
+
"aria-selected": S.value === e.key,
|
|
63
|
+
class: ["relative inline-flex shrink-0 cursor-pointer items-center gap-2 border-b-2 whitespace-nowrap no-underline transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset disabled:cursor-not-allowed disabled:opacity-40 aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-40", A(e)],
|
|
64
|
+
onClick: (t) => k(e, t)
|
|
58
65
|
}), {
|
|
59
|
-
default: y(() => [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
66
|
+
default: y(() => [
|
|
67
|
+
e.icon ? (f(), n(h(e.icon), {
|
|
68
|
+
key: 0,
|
|
69
|
+
class: "-mr-0.5 size-3.5 shrink-0",
|
|
70
|
+
"aria-hidden": "true"
|
|
71
|
+
})) : r("", !0),
|
|
72
|
+
o(" " + g(e.label) + " ", 1),
|
|
73
|
+
e.count === void 0 ? r("", !0) : (f(), i("span", {
|
|
74
|
+
key: 1,
|
|
75
|
+
class: d(["inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs leading-none font-medium tabular-nums", S.value === e.key ? "bg-primary/10 text-primary-strong" : "bg-surface-sunken text-muted"])
|
|
76
|
+
}, g(e.count), 3))
|
|
77
|
+
]),
|
|
63
78
|
_: 2
|
|
64
79
|
}, 1040, [
|
|
65
80
|
"aria-selected",
|
|
66
81
|
"class",
|
|
67
82
|
"onClick"
|
|
68
|
-
]))), 128))]), t.$slots.default ? (f(), i("div",
|
|
83
|
+
]))), 128))], 2), t.$slots.default ? (f(), i("div", x, [m(t.$slots, "default", { active: S.value })])) : r("", !0)]));
|
|
69
84
|
}
|
|
70
85
|
});
|
|
71
86
|
//#endregion
|
|
72
|
-
export {
|
|
87
|
+
export { S as default };
|
|
@@ -27,9 +27,9 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
27
27
|
label: string;
|
|
28
28
|
color: Tone | "neutral";
|
|
29
29
|
rounded: boolean;
|
|
30
|
-
removable: boolean;
|
|
31
30
|
keyLabel: string;
|
|
32
31
|
valueLabel: string;
|
|
32
|
+
removable: boolean;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
@@ -3,15 +3,15 @@ export interface Props {
|
|
|
3
3
|
label: string;
|
|
4
4
|
/** Native `name` attribute of the text input. */
|
|
5
5
|
name?: string;
|
|
6
|
-
/** Example value shown in the empty input, e.g. "e.g. 10.0.0.0/16". */
|
|
6
|
+
/** Example value shown in the empty input, e.g. "e.g. 10.0.0.0/16". Defaults to "Add item and press Enter". */
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
/** Help text between the label and the field. */
|
|
9
9
|
hint?: string;
|
|
10
10
|
/** Error text under the field. Turns the border red and sets `aria-invalid`. A rejected value's own message shows first. */
|
|
11
11
|
errorMsg?: string;
|
|
12
|
-
/** `small` 36px or `normal`
|
|
12
|
+
/** Field height: `small` 36px or `normal` 42px. Values show as chips under it. */
|
|
13
13
|
size?: "small" | "normal";
|
|
14
|
-
/** Most values allowed.
|
|
14
|
+
/** Most values allowed. A “N / max items” count shows under the values, amber from 80% and red at the limit; adding more shows an error. */
|
|
15
15
|
maxItems?: number;
|
|
16
16
|
/** Lets the same value be added twice. Off by default: a repeat shows “… is already added”. */
|
|
17
17
|
allowDuplicates?: boolean;
|
|
@@ -23,13 +23,13 @@ export interface Props {
|
|
|
23
23
|
showClear?: boolean;
|
|
24
24
|
/** Adds the typed text when the input loses focus, so a value isn't lost when people click Save. */
|
|
25
25
|
addOnBlur?: boolean;
|
|
26
|
-
/** Shows
|
|
26
|
+
/** Shows the chips and the input in the monospace font, for IPs, CIDRs and resource names. */
|
|
27
27
|
mono?: boolean;
|
|
28
28
|
/** Marks the field required and adds a red asterisk. Pass `error-msg` when the list is empty on submit. Was `is-required` in cloud-ui. */
|
|
29
29
|
required?: boolean;
|
|
30
30
|
/** Disables the field. Was `is-disabled` in cloud-ui. */
|
|
31
31
|
disabled?: boolean;
|
|
32
|
-
/** Shows the
|
|
32
|
+
/** Shows the input on a muted fill and the chips without remove buttons. Was `is-read-only` in cloud-ui. */
|
|
33
33
|
readonly?: boolean;
|
|
34
34
|
}
|
|
35
35
|
type __VLS_Props = Props;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i,
|
|
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, mergeModels as s, mergeProps as c, nextTick as l, normalizeClass as u, openBlock as d, ref as f, renderList as p, toDisplayString as m, unref as h, useAttrs as g, useId as _, useModel as v, vModelText as y, watch as ee, withDirectives as te, withModifiers as ne } from "vue";
|
|
2
|
+
import { Plus as re, X as b } from "@lucide/vue";
|
|
3
3
|
//#region src/lib/components/AcTagInput.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var ie = ["for"], x = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "font-normal text-muted"
|
|
7
|
-
},
|
|
7
|
+
}, ae = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "text-danger",
|
|
10
10
|
"aria-hidden": "true"
|
|
11
|
-
},
|
|
12
|
-
"aria-label",
|
|
13
|
-
"onClick",
|
|
14
|
-
"onKeydown"
|
|
15
|
-
], C = [
|
|
11
|
+
}, S = [
|
|
16
12
|
"id",
|
|
17
13
|
"name",
|
|
18
14
|
"placeholder",
|
|
@@ -21,19 +17,25 @@ var ce = ["for"], y = {
|
|
|
21
17
|
"aria-invalid",
|
|
22
18
|
"aria-required",
|
|
23
19
|
"aria-describedby"
|
|
24
|
-
],
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
], C = [
|
|
21
|
+
"disabled",
|
|
22
|
+
"aria-label",
|
|
23
|
+
"title"
|
|
24
|
+
], oe = ["aria-label"], se = ["title"], ce = [
|
|
25
|
+
"aria-label",
|
|
26
|
+
"title",
|
|
27
|
+
"onClick",
|
|
28
|
+
"onKeydown"
|
|
29
|
+
], le = {
|
|
30
|
+
key: 3,
|
|
31
|
+
class: "mt-2 flex items-center justify-between gap-3 text-xs text-muted tabular-nums"
|
|
32
|
+
}, w = { key: 0 }, T = {
|
|
31
33
|
class: "sr-only",
|
|
32
34
|
"aria-live": "polite"
|
|
33
|
-
},
|
|
35
|
+
}, E = /*@__PURE__*/ o({
|
|
34
36
|
inheritAttrs: !1,
|
|
35
37
|
__name: "AcTagInput",
|
|
36
|
-
props: /*@__PURE__*/
|
|
38
|
+
props: /*@__PURE__*/ s({
|
|
37
39
|
label: {},
|
|
38
40
|
name: { default: "" },
|
|
39
41
|
placeholder: { default: "" },
|
|
@@ -81,34 +83,34 @@ var ce = ["for"], y = {
|
|
|
81
83
|
modelValue: { default: () => [] },
|
|
82
84
|
modelModifiers: {}
|
|
83
85
|
}),
|
|
84
|
-
emits: /*@__PURE__*/
|
|
86
|
+
emits: /*@__PURE__*/ s([
|
|
85
87
|
"add",
|
|
86
88
|
"remove",
|
|
87
89
|
"clear"
|
|
88
90
|
], ["update:modelValue"]),
|
|
89
|
-
setup(
|
|
90
|
-
let
|
|
91
|
-
class:
|
|
92
|
-
style:
|
|
93
|
-
})),
|
|
94
|
-
let { class: e, style: t, ...n } =
|
|
91
|
+
setup(o, { expose: s, emit: E }) {
|
|
92
|
+
let D = o, O = v(o, "modelValue"), k = E, A = /[\s,;]+/, ue = /[,\n]+/, j = _(), M = `${j}-hint`, N = `${j}-msg`, P = `${j}-count`, F = `${j}-help`, I = g(), L = t(() => ({
|
|
93
|
+
class: I.class,
|
|
94
|
+
style: I.style
|
|
95
|
+
})), R = t(() => {
|
|
96
|
+
let { class: e, style: t, ...n } = I;
|
|
95
97
|
return n;
|
|
96
|
-
}),
|
|
97
|
-
|
|
98
|
-
J.value &&
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
].filter(Boolean).join(" ") || void 0),
|
|
98
|
+
}), z = f(null), B = f(null), V = f(""), H = f(""), U = f(!1), W = f(""), G = t(() => O.value ?? []), K = t(() => !D.disabled && !D.readonly), q = t(() => D.maxItems !== void 0 && G.value.length >= D.maxItems), de = t(() => D.maxItems !== void 0 && G.value.length >= D.maxItems * .8), J = t(() => H.value || D.errorMsg), fe = t(() => [
|
|
99
|
+
D.hint && M,
|
|
100
|
+
J.value && N,
|
|
101
|
+
D.maxItems !== void 0 && P,
|
|
102
|
+
K.value && F
|
|
103
|
+
].filter(Boolean).join(" ") || void 0), pe = t(() => K.value ? q.value ? `Maximum ${D.maxItems} items reached` : D.placeholder || "Add item and press Enter" : ""), me = t(() => K.value && !q.value && !!V.value.trim());
|
|
102
104
|
function Y(e) {
|
|
103
|
-
|
|
105
|
+
W.value = "", l(() => W.value = e);
|
|
104
106
|
}
|
|
105
107
|
function he(e, t) {
|
|
106
|
-
return
|
|
108
|
+
return D.maxItems !== void 0 && t.length >= D.maxItems ? `You can add up to ${D.maxItems} ${D.maxItems === 1 ? "value" : "values"}. Remove one first.` : !D.allowDuplicates && t.includes(e) ? `“${e}” is already added.` : D.validate?.(e, t) || "";
|
|
107
109
|
}
|
|
108
110
|
function X(e, t) {
|
|
109
|
-
let n = [...
|
|
111
|
+
let n = [...G.value], r = [], i = [], a = "";
|
|
110
112
|
for (let o of e.split(t)) {
|
|
111
|
-
let e =
|
|
113
|
+
let e = D.transform(o);
|
|
112
114
|
if (!e) continue;
|
|
113
115
|
let t = he(e, n);
|
|
114
116
|
if (t) {
|
|
@@ -117,175 +119,171 @@ var ce = ["for"], y = {
|
|
|
117
119
|
}
|
|
118
120
|
n.push(e), r.push(e);
|
|
119
121
|
}
|
|
120
|
-
return r.length && (
|
|
122
|
+
return r.length && (O.value = n, r.forEach((e) => k("add", e)), Y(r.length === 1 ? `Added ${r[0]}.` : `Added ${r.length} values.`)), V.value = i.join(", "), l(() => H.value = a), i.length > 0;
|
|
121
123
|
}
|
|
122
124
|
function Z() {
|
|
123
|
-
return !
|
|
125
|
+
return !K.value || !V.value.trim() ? !1 : X(V.value, ue);
|
|
124
126
|
}
|
|
125
127
|
function Q(e, t = !0) {
|
|
126
|
-
if (!
|
|
127
|
-
let n =
|
|
128
|
+
if (!K.value) return;
|
|
129
|
+
let n = G.value[e];
|
|
128
130
|
if (n === void 0) return;
|
|
129
|
-
let r =
|
|
130
|
-
|
|
131
|
+
let r = G.value.filter((t, n) => n !== e);
|
|
132
|
+
O.value = r, U.value = !1, H.value = "", k("remove", n, e), Y(`Removed ${n}.`), t && l(() => {
|
|
131
133
|
let t = $();
|
|
132
|
-
(t[Math.min(e, t.length - 1)] ??
|
|
134
|
+
(t[Math.min(e, t.length - 1)] ?? z.value)?.focus();
|
|
133
135
|
});
|
|
134
136
|
}
|
|
135
137
|
function ge() {
|
|
136
|
-
|
|
138
|
+
K.value && G.value.length && (O.value = [], U.value = !1, k("clear"), Y("Removed every value."), z.value?.focus());
|
|
137
139
|
}
|
|
138
140
|
function $() {
|
|
139
|
-
return Array.from(
|
|
141
|
+
return Array.from(B.value?.querySelectorAll("[data-remove]") ?? []);
|
|
140
142
|
}
|
|
141
143
|
function _e(e) {
|
|
142
|
-
if (!
|
|
144
|
+
if (!K.value || e.isComposing) return;
|
|
143
145
|
let t = e.target, n = t.selectionStart === 0 && t.selectionEnd === 0;
|
|
144
|
-
e.key === "Enter" || e.key === "," ? (e.preventDefault(), Z()) : e.key === "Tab" && !e.shiftKey &&
|
|
146
|
+
e.key === "Enter" || e.key === "," ? (e.preventDefault(), Z()) : e.key === "Tab" && !e.shiftKey && V.value.trim() ? Z() : e.key === "Backspace" && !V.value && G.value.length ? (e.preventDefault(), U.value ? Q(G.value.length - 1, !1) : (U.value = !0, Y(`${G.value[G.value.length - 1]} selected. Press Backspace again to remove it.`))) : e.key === "ArrowLeft" && n && G.value.length ? (e.preventDefault(), U.value = !1, $().at(-1)?.focus()) : e.key === "Escape" && (V.value || H.value) ? (e.preventDefault(), V.value = "", H.value = "") : U.value = !1;
|
|
145
147
|
}
|
|
146
148
|
function ve(e, t) {
|
|
147
149
|
let n = $();
|
|
148
|
-
e.key === "Backspace" || e.key === "Delete" ? (e.preventDefault(), Q(t)) : e.key === "ArrowLeft" ? (e.preventDefault(), n[Math.max(t - 1, 0)]?.focus()) : e.key === "ArrowRight" ? (e.preventDefault(), (n[t + 1] ??
|
|
150
|
+
e.key === "Backspace" || e.key === "Delete" ? (e.preventDefault(), Q(t)) : e.key === "ArrowLeft" ? (e.preventDefault(), n[Math.max(t - 1, 0)]?.focus()) : e.key === "ArrowRight" ? (e.preventDefault(), (n[t + 1] ?? z.value)?.focus()) : e.key === "Home" ? (e.preventDefault(), n[0]?.focus()) : e.key === "End" && (e.preventDefault(), z.value?.focus());
|
|
149
151
|
}
|
|
150
152
|
function ye(e) {
|
|
151
|
-
if (!
|
|
153
|
+
if (!K.value) return;
|
|
152
154
|
let t = e.clipboardData?.getData("text") ?? "";
|
|
153
|
-
if (!
|
|
155
|
+
if (!A.test(t.trim())) return;
|
|
154
156
|
e.preventDefault();
|
|
155
|
-
let n =
|
|
156
|
-
X(
|
|
157
|
+
let n = z.value, r = n?.selectionStart ?? V.value.length, i = n?.selectionEnd ?? V.value.length;
|
|
158
|
+
X(V.value.slice(0, r) + t + V.value.slice(i), A);
|
|
157
159
|
}
|
|
158
160
|
function be() {
|
|
159
|
-
|
|
161
|
+
U.value = !1, D.addOnBlur && Z();
|
|
160
162
|
}
|
|
161
163
|
function xe(e) {
|
|
162
|
-
e.target.closest("button") ||
|
|
164
|
+
D.disabled || e.target.closest("button") || z.value?.focus();
|
|
163
165
|
}
|
|
164
|
-
return
|
|
165
|
-
|
|
166
|
-
}),
|
|
167
|
-
focus: () =>
|
|
166
|
+
return ee(V, () => {
|
|
167
|
+
H.value = "", U.value = !1;
|
|
168
|
+
}), s({
|
|
169
|
+
focus: () => z.value?.focus(),
|
|
168
170
|
commit: () => !Z()
|
|
169
|
-
}), (t,
|
|
170
|
-
class: ["w-full",
|
|
171
|
+
}), (t, s) => (d(), r("div", c(L.value, {
|
|
172
|
+
class: ["w-full", o.disabled && "opacity-50"],
|
|
171
173
|
"data-ac-ds": "",
|
|
172
174
|
"data-testid": "ac-tag-input"
|
|
173
175
|
}), [
|
|
174
176
|
i("label", {
|
|
175
|
-
for:
|
|
177
|
+
for: h(j),
|
|
176
178
|
class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
|
|
177
179
|
}, [
|
|
178
|
-
i("span", null,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
], 8,
|
|
182
|
-
|
|
180
|
+
i("span", null, m(o.label), 1),
|
|
181
|
+
o.readonly ? (d(), r("span", x, "(read only)")) : n("", !0),
|
|
182
|
+
o.required ? (d(), r("span", ae, "*")) : n("", !0)
|
|
183
|
+
], 8, ie),
|
|
184
|
+
o.hint ? (d(), r("p", {
|
|
183
185
|
key: 0,
|
|
184
|
-
id:
|
|
186
|
+
id: M,
|
|
185
187
|
class: "mb-2 text-base text-muted"
|
|
186
|
-
},
|
|
188
|
+
}, m(o.hint), 1)) : n("", !0),
|
|
187
189
|
i("div", {
|
|
188
|
-
class:
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
J.value ? "border-danger/
|
|
190
|
+
class: u(["flex w-full items-center rounded-10 border transition-[border-color,box-shadow,background-color] duration-200", [
|
|
191
|
+
o.size === "small" ? "h-9" : "h-10.5",
|
|
192
|
+
o.readonly ? "bg-surface-muted" : "bg-background",
|
|
193
|
+
o.disabled ? "cursor-not-allowed" : "cursor-text",
|
|
194
|
+
J.value ? "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", !o.disabled && "hover:border-accent-active"]
|
|
193
195
|
]]),
|
|
194
196
|
onClick: xe
|
|
195
|
-
}, [
|
|
196
|
-
|
|
197
|
-
ref_key: "list",
|
|
198
|
-
ref: V,
|
|
199
|
-
role: "list",
|
|
200
|
-
"aria-label": s.label,
|
|
201
|
-
class: "contents"
|
|
202
|
-
}, [(f(!0), r(e, null, m(K.value, (e, t) => (f(), r("li", {
|
|
203
|
-
key: `${t}-${e}`,
|
|
204
|
-
class: d(["inline-flex h-6 max-w-full min-w-0 items-center gap-1 rounded-10 text-xs text-heading transition-colors duration-150", [
|
|
205
|
-
s.mono && "font-mono",
|
|
206
|
-
q.value ? "pr-0.5 pl-2.5" : "px-2.5",
|
|
207
|
-
W.value && t === K.value.length - 1 ? "bg-accent-active ring-2 ring-ring" : "bg-accent"
|
|
208
|
-
]]),
|
|
209
|
-
"data-testid": "ac-tag-input-chip"
|
|
210
|
-
}, [i("span", {
|
|
211
|
-
class: "truncate",
|
|
212
|
-
title: e
|
|
213
|
-
}, h(e), 9, S), q.value ? (f(), r("button", {
|
|
214
|
-
key: 0,
|
|
215
|
-
type: "button",
|
|
216
|
-
"data-remove": "",
|
|
217
|
-
class: "inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted transition-colors hover:bg-accent-hover hover:text-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
|
|
218
|
-
"aria-label": `Remove ${e}`,
|
|
219
|
-
onClick: (e) => Q(t),
|
|
220
|
-
onKeydown: (e) => ve(e, t)
|
|
221
|
-
}, [o(g(v), {
|
|
222
|
-
class: "size-3.5",
|
|
223
|
-
"aria-hidden": "true"
|
|
224
|
-
})], 40, le)) : n("", !0)], 2))), 128))], 8, x)) : n("", !0), i("div", { class: d(s.readonly && K.value.length ? "contents" : "flex min-w-[64px] flex-1 items-center gap-1") }, [ie(i("input", l({
|
|
225
|
-
id: g(M),
|
|
197
|
+
}, [te(i("input", c({
|
|
198
|
+
id: h(j),
|
|
226
199
|
ref_key: "input",
|
|
227
|
-
ref:
|
|
228
|
-
},
|
|
229
|
-
"onUpdate:modelValue":
|
|
200
|
+
ref: z
|
|
201
|
+
}, R.value, {
|
|
202
|
+
"onUpdate:modelValue": s[0] ||= (e) => V.value = e,
|
|
230
203
|
type: "text",
|
|
231
|
-
name:
|
|
232
|
-
placeholder:
|
|
233
|
-
disabled:
|
|
234
|
-
readonly:
|
|
204
|
+
name: o.name,
|
|
205
|
+
placeholder: pe.value,
|
|
206
|
+
disabled: o.disabled,
|
|
207
|
+
readonly: o.readonly,
|
|
235
208
|
"aria-invalid": !!J.value || void 0,
|
|
236
|
-
"aria-required":
|
|
237
|
-
"aria-describedby":
|
|
209
|
+
"aria-required": o.required || void 0,
|
|
210
|
+
"aria-describedby": fe.value,
|
|
238
211
|
autocomplete: "off",
|
|
239
212
|
autocapitalize: "off",
|
|
240
213
|
spellcheck: "false",
|
|
241
|
-
class: ["h-
|
|
214
|
+
class: ["h-full min-w-0 flex-1 rounded-10 bg-transparent pr-2 text-base font-normal text-heading outline-none placeholder:text-muted/80 disabled:cursor-not-allowed", [o.mono && "font-mono", o.size === "small" ? "pl-4" : "pl-5"]],
|
|
242
215
|
onKeydown: _e,
|
|
243
216
|
onPaste: ye,
|
|
244
217
|
onBlur: be
|
|
245
|
-
}), null, 16,
|
|
218
|
+
}), null, 16, S), [[y, V.value]]), i("span", { class: u(["flex shrink-0 items-center text-heading", o.size === "small" ? "mr-1" : "mr-3"]) }, [K.value && o.showClear && G.value.length ? (d(), r("button", {
|
|
246
219
|
key: 0,
|
|
247
220
|
type: "button",
|
|
248
|
-
class: "inline-flex
|
|
249
|
-
"aria-label":
|
|
250
|
-
title:
|
|
221
|
+
class: u(["inline-flex cursor-pointer items-center justify-center rounded-full transition-colors hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none", o.size === "small" ? "size-7" : "size-8"]),
|
|
222
|
+
"aria-label": "Clear all values",
|
|
223
|
+
title: "Clear all items",
|
|
224
|
+
onClick: ge
|
|
225
|
+
}, [a(h(b), {
|
|
226
|
+
class: "size-4",
|
|
227
|
+
"aria-hidden": "true"
|
|
228
|
+
})], 2)) : n("", !0), i("button", {
|
|
229
|
+
type: "button",
|
|
230
|
+
class: u(["inline-flex items-center justify-center rounded-full transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none enabled:cursor-pointer enabled:hover:bg-surface-sunken disabled:cursor-not-allowed disabled:opacity-40", o.size === "small" ? "size-7" : "size-8"]),
|
|
231
|
+
disabled: !me.value,
|
|
232
|
+
"aria-label": V.value.trim() ? `Add ${V.value.trim()}` : "Add item",
|
|
233
|
+
title: V.value.trim() ? `Add “${V.value.trim()}”` : "Add item",
|
|
251
234
|
tabindex: "-1",
|
|
252
|
-
onMousedown:
|
|
235
|
+
onMousedown: s[1] ||= ne(() => {}, ["prevent"]),
|
|
253
236
|
onClick: Z
|
|
254
|
-
}, [
|
|
237
|
+
}, [a(h(re), {
|
|
255
238
|
class: "size-4",
|
|
256
239
|
"aria-hidden": "true"
|
|
257
|
-
})],
|
|
240
|
+
})], 42, C)], 2)], 2),
|
|
241
|
+
J.value ? (d(), r("p", {
|
|
258
242
|
key: 1,
|
|
243
|
+
id: N,
|
|
244
|
+
class: "mt-1 text-base text-danger-strong",
|
|
245
|
+
role: "alert"
|
|
246
|
+
}, m(J.value), 1)) : n("", !0),
|
|
247
|
+
G.value.length ? (d(), r("ul", {
|
|
248
|
+
key: 2,
|
|
249
|
+
ref_key: "list",
|
|
250
|
+
ref: B,
|
|
251
|
+
role: "list",
|
|
252
|
+
"aria-label": o.label,
|
|
253
|
+
class: "mt-3 flex w-full flex-wrap gap-2"
|
|
254
|
+
}, [(d(!0), r(e, null, p(G.value, (e, t) => (d(), r("li", {
|
|
255
|
+
key: `${t}-${e}`,
|
|
256
|
+
class: u(["inline-flex h-8 max-w-full min-w-0 items-center justify-between gap-2 rounded-10 border px-3 text-base text-heading transition-all duration-300 hover:shadow-sm motion-reduce:transition-none", [o.mono && "font-mono", U.value && t === G.value.length - 1 ? "border-primary bg-accent-active ring-2 ring-ring" : "border-border bg-background"]]),
|
|
257
|
+
"data-testid": "ac-tag-input-chip"
|
|
258
|
+
}, [i("span", {
|
|
259
|
+
class: "truncate",
|
|
260
|
+
title: e
|
|
261
|
+
}, m(e), 9, se), K.value ? (d(), r("button", {
|
|
262
|
+
key: 0,
|
|
259
263
|
type: "button",
|
|
260
|
-
|
|
261
|
-
"
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
264
|
+
"data-remove": "",
|
|
265
|
+
class: "inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-full transition-colors hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
|
|
266
|
+
"aria-label": `Remove ${e}`,
|
|
267
|
+
title: `Remove ${e}`,
|
|
268
|
+
onClick: (e) => Q(t),
|
|
269
|
+
onKeydown: (e) => ve(e, t)
|
|
270
|
+
}, [a(h(b), {
|
|
265
271
|
class: "size-4",
|
|
266
272
|
"aria-hidden": "true"
|
|
267
|
-
})])) : n("", !0)])) : n("", !0)
|
|
268
|
-
|
|
269
|
-
key: 0,
|
|
270
|
-
id: P,
|
|
271
|
-
class: "flex min-w-0 flex-1 items-center gap-1.5 text-base text-danger-strong",
|
|
272
|
-
role: "alert"
|
|
273
|
-
}, [o(g(oe), {
|
|
274
|
-
class: "size-4 shrink-0",
|
|
275
|
-
"aria-hidden": "true"
|
|
276
|
-
}), a(" " + h(J.value), 1)])) : n("", !0), s.maxItems === void 0 ? n("", !0) : (f(), r("p", {
|
|
273
|
+
})], 40, ce)) : n("", !0)], 2))), 128))], 8, oe)) : n("", !0),
|
|
274
|
+
G.value.length || o.maxItems !== void 0 ? (d(), r("div", le, [G.value.length ? (d(), r("span", w, m(G.value.length) + " " + m(G.value.length === 1 ? "item" : "items"), 1)) : n("", !0), o.maxItems === void 0 ? n("", !0) : (d(), r("span", {
|
|
277
275
|
key: 1,
|
|
276
|
+
id: P,
|
|
277
|
+
class: u(["ml-auto", q.value ? "text-danger-strong" : de.value && "text-warning-strong"])
|
|
278
|
+
}, m(G.value.length) + " / " + m(o.maxItems) + " items ", 3))])) : n("", !0),
|
|
279
|
+
K.value ? (d(), r("p", {
|
|
280
|
+
key: 4,
|
|
278
281
|
id: F,
|
|
279
|
-
class: d(["ml-auto shrink-0 text-xs leading-5 tabular-nums", fe.value ? "font-medium text-heading" : "text-muted"])
|
|
280
|
-
}, h(K.value.length) + " of " + h(s.maxItems) + " added ", 3))])) : n("", !0),
|
|
281
|
-
q.value ? (f(), r("p", {
|
|
282
|
-
key: 2,
|
|
283
|
-
id: I,
|
|
284
282
|
class: "sr-only"
|
|
285
283
|
}, "Press Enter or comma to add a value. Backspace in the empty input removes the last one.")) : n("", !0),
|
|
286
|
-
i("p",
|
|
284
|
+
i("p", T, m(W.value), 1)
|
|
287
285
|
], 16));
|
|
288
286
|
}
|
|
289
287
|
});
|
|
290
288
|
//#endregion
|
|
291
|
-
export {
|
|
289
|
+
export { E as default };
|
|
@@ -3,7 +3,7 @@ export interface Props {
|
|
|
3
3
|
label: string;
|
|
4
4
|
/** Native `name` attribute. */
|
|
5
5
|
name?: string;
|
|
6
|
-
/** Visible height in lines. With `autoResize` it's the starting (minimum) height. */
|
|
6
|
+
/** Visible height in lines. Unset, the field is 160px tall (about 6 lines). With `autoResize` it's the starting (minimum) height. */
|
|
7
7
|
rows?: number;
|
|
8
8
|
/** Grows the field with its content instead of showing a scrollbar. */
|
|
9
9
|
autoResize?: boolean;
|