@ac-design/design-system 2.2.0 → 2.3.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_vue_type_script_setup_true_lang.js +89 -88
- package/dist/lib/compat.css +210 -0
- package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +74 -73
- package/dist/lib/components/AcButton.vue.d.ts +18 -12
- package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +62 -32
- 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/AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js +151 -150
- package/dist/lib/components/AcColorInput.vue.d.ts +1 -1
- package/dist/lib/components/AcDatePicker.vue.d.ts +27 -3
- package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +518 -454
- package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +56 -55
- package/dist/lib/components/AcErrorState.vue.d.ts +1 -1
- package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +39 -38
- package/dist/lib/components/AcHeader.vue.d.ts +1 -1
- package/dist/lib/components/AcInput.vue.d.ts +28 -7
- package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +149 -80
- package/dist/lib/components/AcKeyValueInput.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/AcModal.vue_vue_type_script_setup_true_lang.js +3 -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_vue_type_script_setup_true_lang.js +90 -89
- package/dist/lib/components/AcNumberInput.vue.d.ts +1 -1
- 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 +12 -1
- package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +237 -220
- package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/lib/components/AcSideTabs.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 +1 -1
- package/dist/lib/components/AcTable.vue.d.ts +13 -1
- package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +106 -86
- package/dist/lib/components/AcTagInput.vue.d.ts +1 -1
- package/dist/lib/components/AcTextarea.vue.d.ts +30 -4
- package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +92 -61
- 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 +21 -3
- package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +234 -201
- package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +73 -72
- package/dist/lib/components/AcUserMenu.vue.d.ts +8 -0
- package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +125 -107
- package/dist/lib/components/fixedFrame.d.ts +11 -0
- package/dist/lib/components/fixedFrame.js +24 -0
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/types.d.ts +2 -0
- package/dist/lib/index.js +34 -33
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import e from "./AcCellValue.js";
|
|
2
2
|
import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, mergeModels as u, normalizeClass as d, normalizeStyle as f, openBlock as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, useId as ee, useModel as y, withModifiers as b } from "vue";
|
|
3
|
-
import { Check as x, ChevronDown as
|
|
3
|
+
import { Check as x, ChevronDown as te, ChevronRight as ne, ChevronUp as re, Minus as S } from "@lucide/vue";
|
|
4
4
|
//#region src/lib/components/AcTable.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var C = { class: "ac-scrollbar" }, w = { class: "w-full border-separate border-spacing-0 text-base" }, T = { class: "relative flex size-[18px]" }, E = [
|
|
6
6
|
"checked",
|
|
7
7
|
"indeterminate",
|
|
8
8
|
"disabled"
|
|
9
|
-
],
|
|
9
|
+
], ie = ["aria-sort", "onClick"], ae = { class: "inline-flex items-center gap-2" }, oe = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "h-11 border-b border-border pl-4 [tr:last-child_&]:border-0"
|
|
12
|
-
},
|
|
12
|
+
}, se = {
|
|
13
13
|
key: 1,
|
|
14
14
|
class: "h-11 border-b border-border pl-4 [tr:last-child_&]:border-0"
|
|
15
|
-
},
|
|
15
|
+
}, ce = [
|
|
16
16
|
"aria-current",
|
|
17
17
|
"aria-disabled",
|
|
18
18
|
"onClick"
|
|
@@ -21,19 +21,19 @@ var ne = { class: "ac-scrollbar" }, re = { class: "w-full border-separate border
|
|
|
21
21
|
"aria-controls",
|
|
22
22
|
"aria-label",
|
|
23
23
|
"onClick"
|
|
24
|
-
], ue = { class: "relative flex size-[18px]" },
|
|
24
|
+
], ue = { class: "relative flex size-[18px]" }, de = [
|
|
25
25
|
"checked",
|
|
26
26
|
"disabled",
|
|
27
27
|
"aria-label",
|
|
28
28
|
"onChange"
|
|
29
|
-
],
|
|
29
|
+
], fe = {
|
|
30
30
|
key: 0,
|
|
31
31
|
class: "group",
|
|
32
32
|
"data-testid": "ac-table-detail"
|
|
33
|
-
},
|
|
33
|
+
}, pe = ["colspan"], me = ["id", "aria-label"], he = {
|
|
34
34
|
key: 0,
|
|
35
35
|
class: "px-6 py-12 text-center text-muted"
|
|
36
|
-
},
|
|
36
|
+
}, D = "border-border", O = "peer size-[18px] cursor-pointer appearance-none rounded-4 border border-muted/70 bg-background align-middle transition-colors duration-150 hover:border-primary/60 checked:border-primary checked:bg-primary indeterminate:border-primary indeterminate:bg-primary focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50", k = /*@__PURE__*/ l({
|
|
37
37
|
__name: "AcTable",
|
|
38
38
|
props: /*@__PURE__*/ u({
|
|
39
39
|
columns: {},
|
|
@@ -69,6 +69,14 @@ var ne = { class: "ac-scrollbar" }, re = { class: "w-full border-separate border
|
|
|
69
69
|
type: Function,
|
|
70
70
|
default: void 0
|
|
71
71
|
},
|
|
72
|
+
rowSelectable: {
|
|
73
|
+
type: Function,
|
|
74
|
+
default: void 0
|
|
75
|
+
},
|
|
76
|
+
rowClass: {
|
|
77
|
+
type: Function,
|
|
78
|
+
default: void 0
|
|
79
|
+
},
|
|
72
80
|
manualSort: {
|
|
73
81
|
type: Boolean,
|
|
74
82
|
default: !1
|
|
@@ -77,6 +85,10 @@ var ne = { class: "ac-scrollbar" }, re = { class: "w-full border-separate border
|
|
|
77
85
|
type: Boolean,
|
|
78
86
|
default: !1
|
|
79
87
|
},
|
|
88
|
+
expandedBare: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: !1
|
|
91
|
+
},
|
|
80
92
|
resolveLink: {
|
|
81
93
|
type: Function,
|
|
82
94
|
default: void 0
|
|
@@ -95,70 +107,70 @@ var ne = { class: "ac-scrollbar" }, re = { class: "w-full border-separate border
|
|
|
95
107
|
"update:sortBy"
|
|
96
108
|
]),
|
|
97
109
|
setup(l, { emit: u }) {
|
|
98
|
-
let
|
|
110
|
+
let k = l, A = y(l, "selected"), j = y(l, "expanded"), M = u, N = ee(), P = y(l, "sortBy"), F = n(() => P.value?.key ?? ""), I = n(() => P.value?.mode ?? "asc"), L = (e) => {
|
|
99
111
|
if (!e.sortable) return;
|
|
100
|
-
let t =
|
|
101
|
-
|
|
112
|
+
let t = F.value === e.key && I.value === "asc" ? "desc" : "asc";
|
|
113
|
+
P.value = {
|
|
102
114
|
key: e.key,
|
|
103
115
|
mode: t
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
if (!
|
|
107
|
-
let e =
|
|
108
|
-
return [...
|
|
116
|
+
}, M("sort", e.key, t);
|
|
117
|
+
}, ge = n(() => {
|
|
118
|
+
if (!F.value || k.manualSort) return k.rows;
|
|
119
|
+
let e = F.value, t = I.value === "asc" ? 1 : -1;
|
|
120
|
+
return [...k.rows].sort((n, r) => String(z(n[e]) ?? "").localeCompare(String(z(r[e]) ?? ""), void 0, { numeric: !0 }) * t);
|
|
109
121
|
});
|
|
110
|
-
function
|
|
122
|
+
function R(e) {
|
|
111
123
|
return typeof e == "object" && !!e && !Array.isArray(e) && "data" in e;
|
|
112
124
|
}
|
|
113
|
-
function
|
|
114
|
-
return
|
|
125
|
+
function z(e) {
|
|
126
|
+
return R(e) ? e.sort ?? e.data : e;
|
|
115
127
|
}
|
|
116
|
-
let
|
|
117
|
-
function
|
|
118
|
-
let e = new Set(
|
|
119
|
-
|
|
128
|
+
let B = (e) => !!k.rowDisabled?.(e), V = (e) => !B(e) && (!k.rowSelectable || k.rowSelectable(e)), H = n(() => k.rows.filter(V).map((e) => e[k.rowKey])), U = n(() => new Set(A.value)), W = n(() => H.value.length > 0 && H.value.every((e) => U.value.has(e))), G = n(() => !W.value && H.value.some((e) => U.value.has(e)));
|
|
129
|
+
function _e() {
|
|
130
|
+
let e = new Set(H.value);
|
|
131
|
+
A.value = W.value ? A.value.filter((t) => !e.has(t)) : [...A.value, ...H.value.filter((e) => !U.value.has(e))];
|
|
120
132
|
}
|
|
121
|
-
function
|
|
122
|
-
let t = e[
|
|
123
|
-
|
|
133
|
+
function ve(e) {
|
|
134
|
+
let t = e[k.rowKey];
|
|
135
|
+
A.value = U.value.has(t) ? A.value.filter((e) => e !== t) : [...A.value, t];
|
|
124
136
|
}
|
|
125
|
-
let
|
|
126
|
-
function
|
|
127
|
-
let t = e[
|
|
128
|
-
|
|
137
|
+
let K = n(() => new Set(j.value)), q = (e) => k.expandable && K.value.has(e[k.rowKey]), J = (e) => !k.canExpand || k.canExpand(e), Y = (e) => `${N}-detail-${String(e[k.rowKey])}`, ye = n(() => k.columns.length + +!!k.selectable + +!!k.expandable);
|
|
138
|
+
function X(e) {
|
|
139
|
+
let t = e[k.rowKey];
|
|
140
|
+
j.value = K.value.has(t) ? j.value.filter((e) => e !== t) : [...j.value, t];
|
|
129
141
|
}
|
|
130
|
-
function
|
|
131
|
-
let t = e[
|
|
132
|
-
return typeof n == "string" || typeof n == "number" ? n : String(e[
|
|
142
|
+
function Z(e) {
|
|
143
|
+
let t = e[k.columns[0]?.key ?? ""], n = R(t) ? t.data : t;
|
|
144
|
+
return typeof n == "string" || typeof n == "number" ? n : String(e[k.rowKey]);
|
|
133
145
|
}
|
|
134
|
-
let
|
|
146
|
+
let Q = (e) => ({
|
|
135
147
|
left: "text-left",
|
|
136
148
|
center: "text-center",
|
|
137
149
|
right: "text-right"
|
|
138
|
-
})[e.align ?? "left"];
|
|
150
|
+
})[e.align ?? "left"], $ = (e) => e.compact ? "px-2" : "px-6";
|
|
139
151
|
return (n, u) => (p(), a("div", {
|
|
140
152
|
class: d(["w-full overflow-hidden bg-surface", !l.flat && "rounded-10 border border-border"]),
|
|
141
153
|
"data-ac-ds": "",
|
|
142
154
|
"data-testid": "ac-table"
|
|
143
|
-
}, [o("div",
|
|
155
|
+
}, [o("div", C, [o("table", w, [o("thead", null, [o("tr", null, [
|
|
144
156
|
l.expandable ? (p(), a("th", {
|
|
145
157
|
key: 0,
|
|
146
158
|
scope: "col",
|
|
147
|
-
class: d(["h-11 w-10 border-b bg-surface-sunken/50 pr-0 pl-4", [
|
|
159
|
+
class: d(["h-11 w-10 border-b bg-surface-sunken/50 pr-0 pl-4", [D, !l.flat && "first:rounded-tl-10"]])
|
|
148
160
|
}, [...u[2] ||= [o("span", { class: "sr-only" }, "Expand", -1)]], 2)) : i("", !0),
|
|
149
161
|
l.selectable ? (p(), a("th", {
|
|
150
162
|
key: 1,
|
|
151
163
|
scope: "col",
|
|
152
|
-
class: d(["h-11 w-10 border-b bg-surface-sunken/50 pr-1 pl-4", [
|
|
153
|
-
}, [o("span",
|
|
164
|
+
class: d(["h-11 w-10 border-b bg-surface-sunken/50 pr-1 pl-4", [D, !l.flat && "first:rounded-tl-10"]])
|
|
165
|
+
}, [o("span", T, [o("input", {
|
|
154
166
|
type: "checkbox",
|
|
155
|
-
class: d(
|
|
156
|
-
checked:
|
|
157
|
-
indeterminate:
|
|
158
|
-
disabled: l.loading || !
|
|
167
|
+
class: d(O),
|
|
168
|
+
checked: W.value,
|
|
169
|
+
indeterminate: G.value,
|
|
170
|
+
disabled: l.loading || !H.value.length,
|
|
159
171
|
"aria-label": "Select all rows",
|
|
160
|
-
onChange:
|
|
161
|
-
}, null, 40,
|
|
172
|
+
onChange: _e
|
|
173
|
+
}, null, 40, E), (p(), r(g(G.value ? v(S) : v(x)), {
|
|
162
174
|
class: "pointer-events-none absolute inset-0 m-auto size-3.5 text-white opacity-0 peer-checked:opacity-100 peer-indeterminate:opacity-100",
|
|
163
175
|
"stroke-width": 3,
|
|
164
176
|
"aria-hidden": "true"
|
|
@@ -166,57 +178,60 @@ var ne = { class: "ac-scrollbar" }, re = { class: "w-full border-separate border
|
|
|
166
178
|
(p(!0), a(t, null, m(l.columns, (e) => (p(), a("th", {
|
|
167
179
|
key: e.key,
|
|
168
180
|
scope: "col",
|
|
169
|
-
class: d(["h-11 border-b bg-surface-sunken/50
|
|
170
|
-
|
|
181
|
+
class: d(["h-11 border-b bg-surface-sunken/50 text-base font-semibold whitespace-nowrap text-muted", [
|
|
182
|
+
D,
|
|
171
183
|
!l.flat && "first:rounded-tl-10 last:rounded-tr-10",
|
|
172
184
|
$(e),
|
|
185
|
+
Q(e),
|
|
186
|
+
e.class,
|
|
173
187
|
e.sortable && "cursor-pointer select-none transition-colors hover:text-heading"
|
|
174
188
|
]]),
|
|
175
189
|
style: f(e.width ? { width: e.width } : void 0),
|
|
176
|
-
"aria-sort":
|
|
177
|
-
onClick: (t) =>
|
|
178
|
-
}, [o("span",
|
|
190
|
+
"aria-sort": F.value === e.key ? I.value === "asc" ? "ascending" : "descending" : void 0,
|
|
191
|
+
onClick: (t) => L(e)
|
|
192
|
+
}, [o("span", ae, [h(n.$slots, `header-${e.key}`, { column: e }, () => [s(_(e.label), 1)]), e.sortable ? (p(), r(g(F.value === e.key && I.value === "asc" ? v(re) : v(te)), {
|
|
179
193
|
key: 0,
|
|
180
|
-
class: d(["size-4 shrink-0",
|
|
194
|
+
class: d(["size-4 shrink-0", F.value === e.key ? "text-primary-strong" : "text-muted"]),
|
|
181
195
|
"aria-hidden": "true"
|
|
182
|
-
}, null, 8, ["class"])) : i("", !0)])], 14,
|
|
196
|
+
}, null, 8, ["class"])) : i("", !0)])], 14, ie))), 128))
|
|
183
197
|
])]), o("tbody", null, [l.loading ? (p(!0), a(t, { key: 0 }, m(l.loaderRows, (e) => (p(), a("tr", { key: `loader-${e}` }, [
|
|
184
|
-
l.expandable ? (p(), a("td",
|
|
185
|
-
l.selectable ? (p(), a("td",
|
|
198
|
+
l.expandable ? (p(), a("td", oe)) : i("", !0),
|
|
199
|
+
l.selectable ? (p(), a("td", se)) : i("", !0),
|
|
186
200
|
(p(!0), a(t, null, m(l.columns, (t, n) => (p(), a("td", {
|
|
187
201
|
key: t.key,
|
|
188
|
-
class: "h-11 border-b border-border
|
|
202
|
+
class: d(["h-11 border-b border-border [tr:last-child_&]:border-0", [$(t), t.class]])
|
|
189
203
|
}, [o("span", {
|
|
190
204
|
class: "block h-2.5 animate-pulse rounded-full bg-surface-sunken",
|
|
191
205
|
style: f({ width: `${50 + (e * 17 + n * 23) % 40}%` })
|
|
192
|
-
}, null, 4)]))), 128))
|
|
193
|
-
]))), 128)) : (p(!0), a(t, { key: 1 }, m(
|
|
206
|
+
}, null, 4)], 2))), 128))
|
|
207
|
+
]))), 128)) : (p(!0), a(t, { key: 1 }, m(ge.value, (f, g) => (p(), a(t, { key: String(f[l.rowKey] ?? g) }, [o("tr", {
|
|
194
208
|
"data-testid": "ac-table-row",
|
|
195
209
|
class: d(["group transition-colors duration-150", [
|
|
196
210
|
l.clickable && "cursor-pointer hover:bg-surface-sunken/40",
|
|
197
|
-
(l.rowActive?.(f) || l.selectable &&
|
|
211
|
+
(l.rowActive?.(f) || l.selectable && U.value.has(f[l.rowKey])) && "bg-primary/5",
|
|
198
212
|
l.rowActive?.(f) && "shadow-[inset_0_0_0_1px_var(--color-primary)]",
|
|
199
|
-
|
|
213
|
+
B(f) && "pointer-events-none cursor-not-allowed opacity-50",
|
|
214
|
+
l.rowClass?.(f)
|
|
200
215
|
]]),
|
|
201
216
|
"aria-current": l.rowActive?.(f) ? "true" : void 0,
|
|
202
|
-
"aria-disabled":
|
|
203
|
-
onClick: (e) => l.clickable && !
|
|
217
|
+
"aria-disabled": B(f) || void 0,
|
|
218
|
+
onClick: (e) => l.clickable && !B(f) && M("row-click", f)
|
|
204
219
|
}, [
|
|
205
220
|
l.expandable ? (p(), a("td", {
|
|
206
221
|
key: 0,
|
|
207
222
|
class: "h-11 w-10 border-b border-border pr-0 pl-4 group-last:border-0",
|
|
208
223
|
onClick: u[0] ||= b(() => {}, ["stop"])
|
|
209
|
-
}, [
|
|
224
|
+
}, [J(f) ? (p(), a("button", {
|
|
210
225
|
key: 0,
|
|
211
226
|
type: "button",
|
|
212
227
|
class: "inline-flex size-7 cursor-pointer items-center justify-center rounded-8 text-muted transition-colors hover:bg-surface-sunken hover:text-heading focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
|
|
213
|
-
"aria-expanded":
|
|
214
|
-
"aria-controls":
|
|
215
|
-
"aria-label": `${
|
|
228
|
+
"aria-expanded": q(f),
|
|
229
|
+
"aria-controls": Y(f),
|
|
230
|
+
"aria-label": `${q(f) ? "Collapse" : "Expand"} ${Z(f)}`,
|
|
216
231
|
"data-testid": "ac-table-expand",
|
|
217
|
-
onClick: (e) =>
|
|
218
|
-
}, [c(v(
|
|
219
|
-
class: d(["size-4 transition-transform duration-150 motion-reduce:transition-none",
|
|
232
|
+
onClick: (e) => X(f)
|
|
233
|
+
}, [c(v(ne), {
|
|
234
|
+
class: d(["size-4 transition-transform duration-150 motion-reduce:transition-none", q(f) && "rotate-90"]),
|
|
220
235
|
"aria-hidden": "true"
|
|
221
236
|
}, null, 8, ["class"])], 8, le)) : i("", !0)])) : i("", !0),
|
|
222
237
|
l.selectable ? (p(), a("td", {
|
|
@@ -225,26 +240,31 @@ var ne = { class: "ac-scrollbar" }, re = { class: "w-full border-separate border
|
|
|
225
240
|
onClick: u[1] ||= b(() => {}, ["stop"])
|
|
226
241
|
}, [o("span", ue, [o("input", {
|
|
227
242
|
type: "checkbox",
|
|
228
|
-
class: d(
|
|
229
|
-
checked:
|
|
230
|
-
disabled:
|
|
231
|
-
"aria-label": `Select ${
|
|
232
|
-
onChange: (e) =>
|
|
233
|
-
}, null, 40,
|
|
243
|
+
class: d(O),
|
|
244
|
+
checked: U.value.has(f[l.rowKey]),
|
|
245
|
+
disabled: !V(f),
|
|
246
|
+
"aria-label": `Select ${Z(f)}`,
|
|
247
|
+
onChange: (e) => ve(f)
|
|
248
|
+
}, null, 40, de), c(v(x), {
|
|
234
249
|
class: "pointer-events-none absolute inset-0 m-auto size-3.5 text-white opacity-0 peer-checked:opacity-100",
|
|
235
250
|
"stroke-width": 3,
|
|
236
251
|
"aria-hidden": "true"
|
|
237
252
|
})])])) : i("", !0),
|
|
238
253
|
(p(!0), a(t, null, m(l.columns, (i) => (p(), a("td", {
|
|
239
254
|
key: i.key,
|
|
240
|
-
class: d(["h-11 border-b border-border
|
|
255
|
+
class: d(["h-11 border-b border-border text-body tabular-nums group-last:border-0", [
|
|
256
|
+
$(i),
|
|
257
|
+
i.wrap ? "whitespace-normal" : "whitespace-nowrap",
|
|
258
|
+
Q(i),
|
|
259
|
+
i.class
|
|
260
|
+
]])
|
|
241
261
|
}, [h(n.$slots, `cell-${i.key}`, {
|
|
242
262
|
row: f,
|
|
243
263
|
value: f[i.key]
|
|
244
264
|
}, () => [i.type || i.descriptor ? (p(), r(e, {
|
|
245
265
|
key: 0,
|
|
246
|
-
value:
|
|
247
|
-
cell:
|
|
266
|
+
value: R(f[i.key]) ? void 0 : f[i.key],
|
|
267
|
+
cell: R(f[i.key]) ? f[i.key] : void 0,
|
|
248
268
|
column: i.descriptor,
|
|
249
269
|
type: i.type,
|
|
250
270
|
title: i.label,
|
|
@@ -257,16 +277,16 @@ var ne = { class: "ac-scrollbar" }, re = { class: "w-full border-separate border
|
|
|
257
277
|
"title",
|
|
258
278
|
"resolve-link"
|
|
259
279
|
])) : (p(), a(t, { key: 1 }, [s(_(f[i.key]), 1)], 64))])], 2))), 128))
|
|
260
|
-
], 10,
|
|
261
|
-
colspan:
|
|
262
|
-
class: "border-b border-border
|
|
280
|
+
], 10, ce), q(f) && J(f) ? (p(), a("tr", fe, [o("td", {
|
|
281
|
+
colspan: ye.value,
|
|
282
|
+
class: d(["border-b border-border p-0 group-last:border-0", !l.expandedBare && "bg-surface-muted"])
|
|
263
283
|
}, [o("div", {
|
|
264
|
-
id:
|
|
284
|
+
id: Y(f),
|
|
265
285
|
role: "region",
|
|
266
|
-
"aria-label": `Details for ${
|
|
267
|
-
class: "px-6 py-4
|
|
268
|
-
}, [h(n.$slots, "expanded", { row: f })],
|
|
286
|
+
"aria-label": `Details for ${Z(f)}`,
|
|
287
|
+
class: d(["text-body", !l.expandedBare && "px-6 py-4"])
|
|
288
|
+
}, [h(n.$slots, "expanded", { row: f })], 10, me)], 10, pe)])) : i("", !0)], 64))), 128))])])]), !l.loading && !l.rows.length ? (p(), a("div", he, [h(n.$slots, "empty", {}, () => [s(_(l.emptyText), 1)])])) : i("", !0)], 2));
|
|
269
289
|
}
|
|
270
290
|
});
|
|
271
291
|
//#endregion
|
|
272
|
-
export {
|
|
292
|
+
export { k as default };
|
|
@@ -59,9 +59,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
59
59
|
name: string;
|
|
60
60
|
transform: (value: string) => string;
|
|
61
61
|
size: "small" | "normal";
|
|
62
|
+
hint: string;
|
|
62
63
|
maxItems: number;
|
|
63
64
|
readonly: boolean;
|
|
64
|
-
hint: string;
|
|
65
65
|
validate: (value: string, values: string[]) => string | void | null | undefined;
|
|
66
66
|
placeholder: string;
|
|
67
67
|
errorMsg: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "vue";
|
|
1
2
|
export interface Props {
|
|
2
|
-
/** Label above the field. Pass `placeholder` for an example value inside it. */
|
|
3
|
-
label
|
|
3
|
+
/** Label above the field. Pass `placeholder` for an example value inside it. Without a label, pass `aria-label`; the placeholder is the accessible name otherwise. */
|
|
4
|
+
label?: string;
|
|
4
5
|
/** Native `name` attribute. */
|
|
5
6
|
name?: string;
|
|
6
7
|
/** Visible height in lines. Unset, the field is 160px tall (about 6 lines). With `autoResize` it's the starting (minimum) height. */
|
|
@@ -15,21 +16,35 @@ export interface Props {
|
|
|
15
16
|
mono?: boolean;
|
|
16
17
|
/** Marks the field required and adds a red asterisk. */
|
|
17
18
|
required?: boolean;
|
|
19
|
+
/** Adds the red asterisk without native `required`, for forms that run their own validation on submit. */
|
|
20
|
+
requiredMark?: boolean;
|
|
18
21
|
/** Disables the field. */
|
|
19
22
|
disabled?: boolean;
|
|
20
23
|
/** Read-only field: a muted fill, and "(read only)" after the label. */
|
|
21
24
|
readonly?: boolean;
|
|
22
25
|
/** Error text under the field. Turns the border and label red and sets `aria-invalid`. */
|
|
23
26
|
errorMsg?: string;
|
|
27
|
+
/** Turns the border red and sets `aria-invalid` without a message, for forms that print their own. */
|
|
28
|
+
invalid?: boolean;
|
|
24
29
|
/** Help text between the label and the field. */
|
|
25
30
|
hint?: string;
|
|
31
|
+
/** Inner spacing: `xsmall` 12px × 6px, `small` 16px × 8px or `normal` 20px × 10px. Set the height with `rows` or `input-class`. */
|
|
32
|
+
size?: "xsmall" | "small" | "normal";
|
|
33
|
+
/** Classes for the `<textarea>` element itself, e.g. `h-30` for a fixed 120px height; they replace the 160px default height. `class` goes on the wrapper. */
|
|
34
|
+
inputClass?: HTMLAttributes["class"];
|
|
26
35
|
}
|
|
27
36
|
type __VLS_Props = Props;
|
|
37
|
+
type __VLS_Slots = {
|
|
38
|
+
/** Content before the label text, such as a 14px icon. */
|
|
39
|
+
"label-icon"?: () => unknown;
|
|
40
|
+
/** Content after the label text, such as "(Optional)" or an info tooltip. */
|
|
41
|
+
"label-extra"?: () => unknown;
|
|
42
|
+
};
|
|
28
43
|
type __VLS_ModelProps = {
|
|
29
44
|
modelValue?: string;
|
|
30
45
|
};
|
|
31
46
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
32
|
-
declare const
|
|
47
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
33
48
|
/** Moves focus to the textarea. */
|
|
34
49
|
focus: () => void | undefined;
|
|
35
50
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -38,16 +53,27 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
38
53
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
39
54
|
}>, {
|
|
40
55
|
required: boolean;
|
|
56
|
+
label: string;
|
|
41
57
|
disabled: boolean;
|
|
42
58
|
name: string;
|
|
59
|
+
size: "xsmall" | "small" | "normal";
|
|
60
|
+
hint: string;
|
|
61
|
+
invalid: boolean;
|
|
43
62
|
rows: number;
|
|
44
63
|
readonly: boolean;
|
|
45
|
-
hint: string;
|
|
46
64
|
errorMsg: string;
|
|
47
65
|
mono: boolean;
|
|
48
66
|
maxlength: number;
|
|
67
|
+
requiredMark: boolean;
|
|
68
|
+
inputClass: string | false | Record<string, any> | import("vue").ClassValue[] | null;
|
|
49
69
|
autoResize: boolean;
|
|
50
70
|
maxRows: number;
|
|
51
71
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
72
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
52
73
|
declare const _default: typeof __VLS_export;
|
|
53
74
|
export default _default;
|
|
75
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
76
|
+
new (): {
|
|
77
|
+
$slots: S;
|
|
78
|
+
};
|
|
79
|
+
};
|