@ac-design/design-system 2.2.1 → 2.4.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/compat.css +421 -0
- package/dist/lib/components/AcAppSwitcher.vue.d.ts +1 -1
- package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +23 -23
- package/dist/lib/components/AcAreaChart.vue.d.ts +1 -1
- package/dist/lib/components/AcBarChart.vue.d.ts +1 -1
- package/dist/lib/components/AcButton.vue.d.ts +25 -13
- package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +122 -71
- package/dist/lib/components/AcCard.vue.d.ts +11 -5
- package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +99 -51
- package/dist/lib/components/AcCellValue.vue.d.ts +3 -3
- package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +20 -20
- package/dist/lib/components/AcCheckBox.vue.d.ts +4 -1
- package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +50 -50
- package/dist/lib/components/AcCircularProgress.vue.d.ts +1 -1
- package/dist/lib/components/AcCodeEditor.vue.d.ts +12 -0
- package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +240 -207
- package/dist/lib/components/AcColorInput.vue.d.ts +4 -4
- package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +72 -66
- package/dist/lib/components/AcCostSummary.vue.d.ts +1 -1
- package/dist/lib/components/AcDatePicker.vue.d.ts +41 -10
- package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +554 -446
- package/dist/lib/components/AcDeleteModal.vue.d.ts +1 -1
- package/dist/lib/components/AcDonutChart.vue.d.ts +2 -2
- package/dist/lib/components/AcDropdown.vue.d.ts +1 -1
- package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/lib/components/AcErrorState.vue.d.ts +1 -1
- package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/lib/components/AcGraphChart.vue.d.ts +2 -2
- package/dist/lib/components/AcHeader.vue.d.ts +1 -1
- package/dist/lib/components/AcInput.vue.d.ts +86 -44
- package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +319 -86
- package/dist/lib/components/AcKeyValueInput.vue.d.ts +34 -54
- package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +134 -106
- package/dist/lib/components/AcLineChart.vue.d.ts +1 -1
- package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +6 -0
- package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +74 -58
- package/dist/lib/components/AcMapChart.vue.d.ts +2 -2
- package/dist/lib/components/AcModal.vue.d.ts +1 -1
- package/dist/lib/components/AcNavbar.vue.d.ts +2 -0
- package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +31 -25
- package/dist/lib/components/AcNotificationMenu.vue.d.ts +1 -1
- package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +24 -24
- package/dist/lib/components/AcNumberInput.vue.d.ts +55 -45
- package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +159 -99
- package/dist/lib/components/AcRadioCard.js +5 -0
- package/dist/lib/components/AcRadioCard.vue.d.ts +55 -0
- package/dist/lib/components/AcRadioCard.vue_vue_type_script_setup_true_lang.js +135 -0
- package/dist/lib/components/AcSelect.vue.d.ts +46 -6
- package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +309 -197
- package/dist/lib/components/AcSidePanel.vue.d.ts +1 -1
- package/dist/lib/components/AcSidebar.vue.d.ts +9 -0
- package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +113 -94
- package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +19 -18
- package/dist/lib/components/AcSlider.vue.d.ts +2 -2
- package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +23 -23
- package/dist/lib/components/AcTable.vue.d.ts +50 -5
- package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +257 -129
- package/dist/lib/components/AcTagInput.vue.d.ts +23 -4
- package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +126 -114
- package/dist/lib/components/AcTaintInput.js +5 -0
- package/dist/lib/components/AcTaintInput.vue.d.ts +44 -0
- package/dist/lib/components/AcTaintInput.vue_vue_type_script_setup_true_lang.js +208 -0
- package/dist/lib/components/AcTextarea.vue.d.ts +64 -4
- package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +159 -68
- package/dist/lib/components/AcThemeMode.vue.d.ts +10 -2
- package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +53 -42
- package/dist/lib/components/AcTimePicker.vue.d.ts +36 -11
- package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +232 -168
- package/dist/lib/components/AcTooltip.vue.d.ts +3 -3
- package/dist/lib/components/AcUserMenu.vue.d.ts +8 -0
- package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +126 -109
- package/dist/lib/components/index.d.ts +2 -0
- package/dist/lib/components/types.d.ts +2 -0
- package/dist/lib/composables/useToast.d.ts +2 -2
- package/dist/lib/index.d.ts +2 -1
- package/dist/lib/index.js +51 -49
- package/package.json +1 -1
|
@@ -107,10 +107,10 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
107
107
|
title: string;
|
|
108
108
|
description: string;
|
|
109
109
|
height: number;
|
|
110
|
-
loading: boolean;
|
|
111
110
|
animation: boolean;
|
|
112
|
-
pulse: boolean | string[];
|
|
113
111
|
tooltip: boolean;
|
|
112
|
+
loading: boolean;
|
|
113
|
+
pulse: boolean | string[];
|
|
114
114
|
emptyText: string;
|
|
115
115
|
labels: boolean;
|
|
116
116
|
valueLabel: string;
|
|
@@ -49,11 +49,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
49
49
|
title: string;
|
|
50
50
|
description: string;
|
|
51
51
|
size: "xsmall" | "small" | "normal" | "medium" | "large" | "xlarge" | "full";
|
|
52
|
+
maxWidth: "xsm" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
52
53
|
bodyClass: string;
|
|
53
54
|
closable: boolean;
|
|
54
55
|
closeOnOutsideClick: boolean;
|
|
55
56
|
hideFooter: boolean;
|
|
56
|
-
maxWidth: "xsm" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
57
57
|
showCloseButton: boolean;
|
|
58
58
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
59
59
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -19,6 +19,8 @@ type __VLS_Slots = {
|
|
|
19
19
|
default?: () => unknown;
|
|
20
20
|
/** A search field, placed by `search-position`. Hidden below 640px. */
|
|
21
21
|
search?: () => unknown;
|
|
22
|
+
/** Left-hand content that fills the row up to `actions` and shrinks first when space runs out, e.g. cloud-ui's search field with its phone-only search button. Use it instead of a centred `search`. */
|
|
23
|
+
start?: () => unknown;
|
|
22
24
|
/** Right side: icon actions, notifications, theme and `AcUserMenu` last. */
|
|
23
25
|
actions?: () => unknown;
|
|
24
26
|
};
|
|
@@ -1,22 +1,28 @@
|
|
|
1
|
-
import { createCommentVNode as e, createElementBlock as t,
|
|
2
|
-
import { Menu as
|
|
1
|
+
import { createCommentVNode as e, createElementBlock as t, createVNode as n, defineComponent as r, normalizeClass as i, openBlock as a, renderSlot as o, toDisplayString as s, unref as c } from "vue";
|
|
2
|
+
import { Menu as l } from "@lucide/vue";
|
|
3
3
|
//#region src/lib/components/AcNavbar.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var u = ["aria-label"], d = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "flex shrink-0 items-center gap-2"
|
|
7
|
-
},
|
|
7
|
+
}, f = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "inline-flex items-center rounded-6 border border-primary/25 bg-primary/10 px-1.5 py-0.5 text-sm font-semibold tracking-wide text-primary-strong uppercase"
|
|
10
|
-
},
|
|
10
|
+
}, p = ["aria-label"], m = {
|
|
11
11
|
key: 3,
|
|
12
12
|
class: "hidden min-w-0 shrink sm:block sm:w-48 md:w-60 lg:w-80 xl:w-96"
|
|
13
|
-
},
|
|
13
|
+
}, h = {
|
|
14
|
+
key: 4,
|
|
15
|
+
class: "flex min-w-0 flex-1 items-center"
|
|
16
|
+
}, g = {
|
|
17
|
+
key: 5,
|
|
18
|
+
class: "flex min-w-0 flex-1 justify-center"
|
|
19
|
+
}, _ = {
|
|
14
20
|
key: 0,
|
|
15
21
|
class: "hidden w-full max-w-md sm:block"
|
|
16
22
|
}, v = {
|
|
17
|
-
key:
|
|
23
|
+
key: 6,
|
|
18
24
|
class: "flex shrink-0 items-center gap-0.5 sm:gap-3"
|
|
19
|
-
}, y = /*@__PURE__*/
|
|
25
|
+
}, y = /*@__PURE__*/ r({
|
|
20
26
|
__name: "AcNavbar",
|
|
21
27
|
props: {
|
|
22
28
|
menuButton: { default: "mobile" },
|
|
@@ -30,37 +36,37 @@ var d = ["aria-label"], f = {
|
|
|
30
36
|
searchPosition: { default: "start" }
|
|
31
37
|
},
|
|
32
38
|
emits: ["menu"],
|
|
33
|
-
setup(
|
|
39
|
+
setup(r, { emit: y }) {
|
|
34
40
|
let b = y;
|
|
35
|
-
return (y, x) => (
|
|
36
|
-
class:
|
|
41
|
+
return (y, x) => (a(), t("header", {
|
|
42
|
+
class: i(["top-0 z-30 flex h-18 shrink-0 items-center gap-2 border-b border-border/80 bg-surface/90 px-4 backdrop-blur-sm sm:gap-4 sm:px-6", r.sticky && "sticky"]),
|
|
37
43
|
"data-ac-ds": "",
|
|
38
44
|
"data-testid": "ac-navbar"
|
|
39
45
|
}, [
|
|
40
|
-
|
|
46
|
+
r.menuButton === "never" ? e("", !0) : (a(), t("button", {
|
|
41
47
|
key: 0,
|
|
42
48
|
type: "button",
|
|
43
|
-
class:
|
|
44
|
-
"md:hidden":
|
|
45
|
-
"lg:hidden":
|
|
49
|
+
class: i(["inline-flex size-9.5 shrink-0 cursor-pointer items-center justify-center rounded-10 border border-transparent text-muted transition-colors duration-200 hover:border-border hover:bg-surface-sunken/50 hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none", {
|
|
50
|
+
"md:hidden": r.menuButton === "mobile",
|
|
51
|
+
"lg:hidden": r.menuButton === "tablet"
|
|
46
52
|
}]),
|
|
47
|
-
"aria-label":
|
|
53
|
+
"aria-label": r.menuLabel,
|
|
48
54
|
"data-ac-ds": "",
|
|
49
55
|
"data-testid": "ac-navbar-menu",
|
|
50
56
|
onClick: x[0] ||= (e) => b("menu")
|
|
51
|
-
}, [
|
|
57
|
+
}, [n(c(l), {
|
|
52
58
|
class: "size-5",
|
|
53
59
|
"aria-hidden": "true"
|
|
54
|
-
})], 10,
|
|
55
|
-
y.$slots.brand ||
|
|
56
|
-
y.$slots.default ? (
|
|
60
|
+
})], 10, u)),
|
|
61
|
+
y.$slots.brand || r.productName ? (a(), t("div", d, [o(y.$slots, "brand"), r.productName ? (a(), t("span", f, s(r.productName), 1)) : e("", !0)])) : e("", !0),
|
|
62
|
+
y.$slots.default ? (a(), t("nav", {
|
|
57
63
|
key: 2,
|
|
58
|
-
"aria-label":
|
|
64
|
+
"aria-label": r.label,
|
|
59
65
|
class: "hidden items-center gap-1 md:flex"
|
|
60
|
-
}, [
|
|
61
|
-
y.$slots.search &&
|
|
62
|
-
|
|
63
|
-
y.$slots.actions ? (
|
|
66
|
+
}, [o(y.$slots, "default")], 8, p)) : e("", !0),
|
|
67
|
+
y.$slots.search && r.searchPosition === "start" ? (a(), t("div", m, [o(y.$slots, "search")])) : e("", !0),
|
|
68
|
+
y.$slots.start ? (a(), t("div", h, [o(y.$slots, "start")])) : (a(), t("div", g, [y.$slots.search && r.searchPosition === "center" ? (a(), t("div", _, [o(y.$slots, "search")])) : e("", !0)])),
|
|
69
|
+
y.$slots.actions ? (a(), t("div", v, [o(y.$slots, "actions")])) : e("", !0)
|
|
64
70
|
], 2));
|
|
65
71
|
}
|
|
66
72
|
});
|
|
@@ -71,8 +71,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
71
71
|
onViewAll?: (() => any) | undefined;
|
|
72
72
|
}>, {
|
|
73
73
|
label: string;
|
|
74
|
-
loading: boolean;
|
|
75
74
|
align: "start" | "end";
|
|
75
|
+
loading: boolean;
|
|
76
76
|
emptyText: string;
|
|
77
77
|
notifications: NotificationItem[];
|
|
78
78
|
unreadCount: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "./
|
|
2
|
-
import
|
|
1
|
+
import { fixedFrame as e } from "./fixedFrame.js";
|
|
2
|
+
import t from "./AcNavbarItem.js";
|
|
3
3
|
import n from "./AcSkeleton.js";
|
|
4
4
|
import { Fragment as r, Teleport as i, Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, getCurrentInstance as m, mergeModels as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeStyle as ee, onBeforeUnmount as te, openBlock as y, ref as b, renderList as x, renderSlot as S, resolveDynamicComponent as C, toDisplayString as w, unref as T, useId as ne, useModel as re, watch as E, withCtx as D } from "vue";
|
|
5
5
|
import { ArrowRight as ie, Bell as ae, BellOff as oe } from "@lucide/vue";
|
|
@@ -146,9 +146,9 @@ var se = {
|
|
|
146
146
|
t.length && t[(e + t.length) % t.length].focus();
|
|
147
147
|
}
|
|
148
148
|
function Y() {
|
|
149
|
-
let
|
|
150
|
-
if (!
|
|
151
|
-
let n =
|
|
149
|
+
let t = K();
|
|
150
|
+
if (!t || !L.value) return;
|
|
151
|
+
let n = t.getBoundingClientRect(), r = e(), { offsetWidth: i, offsetHeight: a } = L.value, o = r.bottom - n.bottom - 6 - 8, s = n.top - r.top - 6 - 8, c = o < a && s > o, l = (O.align === "end" ? n.right - i : n.left) - r.left;
|
|
152
152
|
z.value = !c, R.value = {
|
|
153
153
|
[c ? "bottom" : "top"]: `${c ? r.bottom - n.top + 6 : n.bottom + 6 - r.top}px`,
|
|
154
154
|
left: `${Math.max(8, Math.min(l, r.width - i - 8))}px`,
|
|
@@ -194,7 +194,7 @@ var se = {
|
|
|
194
194
|
B.value = Date.now(), await _(), Y();
|
|
195
195
|
let t = q()[0];
|
|
196
196
|
t ? t.focus() : L.value?.focus();
|
|
197
|
-
}), E(() => [O.notifications.length, O.loading], () => k.value && _(Y)), te(() => $(!1)), (
|
|
197
|
+
}), E(() => [O.notifications.length, O.loading], () => k.value && _(Y)), te(() => $(!1)), (e, o) => (y(), l("div", se, [f(t, {
|
|
198
198
|
ref_key: "trigger",
|
|
199
199
|
ref: I,
|
|
200
200
|
label: p.label,
|
|
@@ -253,44 +253,44 @@ var se = {
|
|
|
253
253
|
lines: 3,
|
|
254
254
|
height: "10px",
|
|
255
255
|
label: ""
|
|
256
|
-
})), 64))])) : p.notifications.length ? (y(), l("ul", me, [(y(!0), l(r, null, x(p.notifications, (
|
|
256
|
+
})), 64))])) : p.notifications.length ? (y(), l("ul", me, [(y(!0), l(r, null, x(p.notifications, (t) => (y(), l("li", { key: t.id }, [(y(), s(C(W(t.to, t.href)), g({ ref_for: !0 }, G(t.to, t.href), {
|
|
257
257
|
"data-notification-item": "",
|
|
258
|
-
class: ["relative block w-full cursor-pointer p-3 text-left no-underline outline-none transition-colors duration-200 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", !
|
|
258
|
+
class: ["relative block w-full cursor-pointer p-3 text-left no-underline outline-none transition-colors duration-200 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", !t.read && "bg-primary/8"],
|
|
259
259
|
"data-ac-ds": "",
|
|
260
260
|
"data-testid": "ac-notification-menu-item",
|
|
261
|
-
onClick: (
|
|
261
|
+
onClick: (e) => Le(t)
|
|
262
262
|
}), {
|
|
263
|
-
default: D(() => [S(
|
|
263
|
+
default: D(() => [S(e.$slots, "item", { item: t }, () => [
|
|
264
264
|
u("span", he, [
|
|
265
|
-
|
|
265
|
+
t.icon ? (y(), s(C(t.icon), {
|
|
266
266
|
key: 0,
|
|
267
267
|
class: "size-4 shrink-0 text-muted",
|
|
268
268
|
"aria-hidden": "true"
|
|
269
269
|
})) : c("", !0),
|
|
270
|
-
u("span", ge, w(
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
u("span", ge, w(t.title || t.msg), 1),
|
|
271
|
+
t.read ? c("", !0) : (y(), l("span", _e)),
|
|
272
|
+
t.read ? c("", !0) : (y(), l("span", ve, "(unread)"))
|
|
273
273
|
]),
|
|
274
|
-
|
|
274
|
+
t.title && t.msg ? (y(), l("span", ye, w(t.msg), 1)) : c("", !0),
|
|
275
275
|
u("span", be, [
|
|
276
|
-
|
|
276
|
+
t.status ? (y(), l("span", {
|
|
277
277
|
key: 0,
|
|
278
|
-
class: v(["font-medium", De[Me(
|
|
279
|
-
}, w(
|
|
280
|
-
|
|
278
|
+
class: v(["font-medium", De[Me(t)]])
|
|
279
|
+
}, w(t.status), 3)) : c("", !0),
|
|
280
|
+
t.status ? (y(), l("span", xe, "·")) : c("", !0),
|
|
281
281
|
u("time", {
|
|
282
|
-
datetime: Fe(
|
|
283
|
-
title: Pe(
|
|
284
|
-
}, w(Ne(
|
|
282
|
+
datetime: Fe(t.time),
|
|
283
|
+
title: Pe(t.time)
|
|
284
|
+
}, w(Ne(t.time)), 9, Se)
|
|
285
285
|
])
|
|
286
286
|
])]),
|
|
287
287
|
_: 2
|
|
288
|
-
}, 1040, ["class", "onClick"]))]))), 128))])) : (y(), l("div", de, [S(
|
|
288
|
+
}, 1040, ["class", "onClick"]))]))), 128))])) : (y(), l("div", de, [S(e.$slots, "empty", {}, () => [
|
|
289
289
|
u("span", fe, [f(T(oe), { class: "size-6" })]),
|
|
290
290
|
u("p", pe, w(p.emptyText), 1),
|
|
291
291
|
o[2] ||= u("p", { class: "max-w-64 text-base text-muted" }, "Backups, upgrades and alerts from your clusters show up here.", -1)
|
|
292
292
|
])])),
|
|
293
|
-
|
|
293
|
+
e.$slots.footer || je.value ? (y(), l("div", Ce, [S(e.$slots, "footer", { close: X }, () => [(y(), s(C(W(p.viewAllTo, p.viewAllHref)), g(G(p.viewAllTo, p.viewAllHref), {
|
|
294
294
|
class: "group/link flex h-9 w-full cursor-pointer items-center justify-center gap-1.5 rounded-8 text-base font-semibold text-primary-strong no-underline outline-none transition-colors duration-200 hover:bg-surface-sunken focus-visible:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
|
|
295
295
|
"data-ac-ds": "",
|
|
296
296
|
"data-testid": "ac-notification-menu-view-all",
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export interface Props {
|
|
1
|
+
export interface Props<K extends "null" | "undefined" = "null"> {
|
|
2
2
|
/** Label above the field. Without one, pass `aria-label` so the field still has a name. */
|
|
3
3
|
label?: string;
|
|
4
4
|
/** Native `name` attribute. */
|
|
5
5
|
name?: string;
|
|
6
|
+
/** Text shown inside the empty field, e.g. "Enter number". */
|
|
7
|
+
placeholder?: string;
|
|
6
8
|
/** Lowest allowed value. ↓, − and Home stop here, and typed values are clamped to it on blur. No limit by default. */
|
|
7
9
|
min?: number;
|
|
8
10
|
/** Highest allowed value. ↑, + and End stop here, and typed values are clamped to it on blur. No limit by default. */
|
|
@@ -21,6 +23,8 @@ export interface Props {
|
|
|
21
23
|
holdIntervalDelay?: number;
|
|
22
24
|
/** Marks the field required and adds a red asterisk. */
|
|
23
25
|
required?: boolean;
|
|
26
|
+
/** Adds the red asterisk without native `required`, for forms that run their own validation on submit. Cloud `is-required`. */
|
|
27
|
+
requiredMark?: boolean;
|
|
24
28
|
/** Disables the field and its buttons. */
|
|
25
29
|
disabled?: boolean;
|
|
26
30
|
/** Read-only field: a muted fill, "(read only)" after the label, and no stepping. */
|
|
@@ -29,51 +33,57 @@ export interface Props {
|
|
|
29
33
|
errorMsg?: string;
|
|
30
34
|
/** Help text between the label and the field. */
|
|
31
35
|
hint?: string;
|
|
32
|
-
/** `small` 36px
|
|
33
|
-
size?: "small" | "normal";
|
|
36
|
+
/** `small` 36px, `normal` 42px or `large` 46px tall (cloud-ui's default number field); the step buttons match. */
|
|
37
|
+
size?: "small" | "normal" | "large";
|
|
38
|
+
/** What an empty field puts in `v-model`: `"null"` (default) or `"undefined"`, as cloud-ui's v1 AcNumberInput did. */
|
|
39
|
+
emptyValue?: K;
|
|
40
|
+
/** Text after the label of a read-only field, e.g. "(Read Only)". */
|
|
41
|
+
readonlyText?: string;
|
|
42
|
+
/** Keeps the editable fill on a read-only field and shows no focus halo, as cloud-ui's v1 AcNumberInput did. */
|
|
43
|
+
plainReadonly?: boolean;
|
|
44
|
+
/** Cloud-ui v1 error look: the border stays grey and the message uses the base `text-danger` red instead of the AA `-strong` shade. */
|
|
45
|
+
plainError?: boolean;
|
|
46
|
+
/** No gap around `#label-icon` and `#label-extra`, for slot content that brings its own margin. */
|
|
47
|
+
flushLabelSlots?: boolean;
|
|
48
|
+
/** Replaces the built-in range message, e.g. "Value must be between {min} and {max}". It shows from a keystroke that leaves the range until a blur that commits a value, and wins over `error-msg`. */
|
|
49
|
+
rangeMessage?: string;
|
|
50
|
+
/** The value and placeholder take the page's font weight and default placeholder colour instead of the field's own. */
|
|
51
|
+
inheritFont?: boolean;
|
|
52
|
+
/** Puts the − and + buttons in the tab order and lets a click focus them, as cloud-ui's v1 AcNumberInput did. */
|
|
53
|
+
focusableStepButtons?: boolean;
|
|
54
|
+
/** Drops the root's `w-full`, so in a flex row the field sizes to its content, as cloud-ui's v1 AcNumberInput did. */
|
|
55
|
+
autoWidth?: boolean;
|
|
34
56
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
57
|
+
declare const __VLS_export: <K extends "null" | "undefined" = "null">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
58
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(Props<K> & {
|
|
59
|
+
modelValue?: number | (K extends "undefined" ? undefined : null);
|
|
60
|
+
}) & {
|
|
61
|
+
"onUpdate:modelValue"?: ((value: number | (K extends "undefined" ? undefined : null)) => any) | undefined;
|
|
62
|
+
onChange?: ((value: number | (K extends "undefined" ? undefined : null)) => any) | undefined;
|
|
63
|
+
}> & (typeof globalThis extends {
|
|
64
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
65
|
+
} ? P : {});
|
|
66
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
67
|
+
/** Moves focus to the input. */
|
|
68
|
+
focus: () => void | undefined;
|
|
69
|
+
}>) => void;
|
|
70
|
+
attrs: any;
|
|
71
|
+
slots: {
|
|
72
|
+
/** Content before the label text, such as a 14px icon. */
|
|
73
|
+
"label-icon"?: () => unknown;
|
|
74
|
+
/** Content after the label text, such as "(Optional)" or an info tooltip. */
|
|
75
|
+
"label-extra"?: () => unknown;
|
|
76
|
+
/** Content inside the field after the value, before the buttons: an icon or richer unit text. */
|
|
77
|
+
suffix?: () => unknown;
|
|
78
|
+
};
|
|
79
|
+
emit: ((evt: "change", value: number | (K extends "undefined" ? undefined : null)) => void) & ((event: "update:modelValue", value: number | (K extends "undefined" ? undefined : null)) => void);
|
|
80
|
+
}>) => import("vue").VNode & {
|
|
81
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
43
82
|
};
|
|
44
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
45
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
46
|
-
/** Moves focus to the input. */
|
|
47
|
-
focus: () => void | undefined;
|
|
48
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
49
|
-
"update:modelValue": (value: number | null) => any;
|
|
50
|
-
change: (value: number | null) => any;
|
|
51
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
52
|
-
"onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
|
|
53
|
-
onChange?: ((value: number | null) => any) | undefined;
|
|
54
|
-
}>, {
|
|
55
|
-
required: boolean;
|
|
56
|
-
label: string;
|
|
57
|
-
disabled: boolean;
|
|
58
|
-
max: number;
|
|
59
|
-
min: number;
|
|
60
|
-
name: string;
|
|
61
|
-
size: "small" | "normal";
|
|
62
|
-
step: number;
|
|
63
|
-
readonly: boolean;
|
|
64
|
-
hint: string;
|
|
65
|
-
errorMsg: string;
|
|
66
|
-
unit: string;
|
|
67
|
-
precision: number;
|
|
68
|
-
stepButtons: boolean;
|
|
69
|
-
holdDelay: number;
|
|
70
|
-
holdIntervalDelay: number;
|
|
71
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
72
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
73
83
|
declare const _default: typeof __VLS_export;
|
|
74
84
|
export default _default;
|
|
75
|
-
type
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
};
|
|
85
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
86
|
+
[K in keyof T]: T[K];
|
|
87
|
+
} : {
|
|
88
|
+
[K in keyof T as K]: T[K];
|
|
89
|
+
}) & {};
|