@db-ux/v-core-components 4.7.0-tabs-34782eb → 4.7.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/CHANGELOG.md +5 -0
- package/agent/Tabs.md +20 -23
- package/dist/components/tab-item/model.d.ts +11 -28
- package/dist/components/tab-item/tab-item.vue.d.ts +10 -5
- package/dist/components/tab-list/model.d.ts +5 -15
- package/dist/components/tab-list/tab-list.vue.d.ts +2 -5
- package/dist/components/tab-panel/model.d.ts +3 -13
- package/dist/components/tab-panel/tab-panel.vue.d.ts +7 -1
- package/dist/components/tabs/model.d.ts +17 -51
- package/dist/components/tabs/tabs.vue.d.ts +8 -10
- package/dist/db-ux.es.js +1150 -1346
- package/dist/db-ux.umd.js +1 -1
- package/dist/shared/model.d.ts +5 -5
- package/package.json +3 -3
package/dist/db-ux.es.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { Fragment as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, normalizeClass as c, onMounted as l, onUnmounted as u,
|
|
1
|
+
import { Fragment as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, normalizeClass as c, onMounted as l, onUnmounted as u, openBlock as d, ref as f, renderList as p, renderSlot as m, toDisplayString as h, unref as g, useId as _, watch as v, withCtx as y } from "vue";
|
|
2
2
|
//#region src/utils/index.ts
|
|
3
|
-
var
|
|
3
|
+
var b = () => {
|
|
4
4
|
if (typeof window < "u") {
|
|
5
5
|
if (window.crypto?.randomUUID) return window.crypto.randomUUID();
|
|
6
6
|
if (window.crypto?.getRandomValues) return window.crypto.getRandomValues(new Uint32Array(3)).join("-");
|
|
7
7
|
}
|
|
8
8
|
return Math.random().toString().substring(2);
|
|
9
|
-
},
|
|
9
|
+
}, x = (e, t) => {
|
|
10
10
|
let n = e.children;
|
|
11
11
|
Object.values(n).forEach((e) => {
|
|
12
|
-
e.setAttribute(t.key, t.value), e.children.length > 0 &&
|
|
12
|
+
e.setAttribute(t.key, t.value), e.children.length > 0 && x(e, t);
|
|
13
13
|
});
|
|
14
|
-
},
|
|
14
|
+
}, S = (...e) => {
|
|
15
15
|
let t = "";
|
|
16
16
|
for (let n of e) if (n) if (typeof n == "string") t += `${n} `;
|
|
17
17
|
else for (let e in n) n[e] && (t += `${e} `);
|
|
18
18
|
return t.trim();
|
|
19
|
-
},
|
|
19
|
+
}, C = (e) => Array.isArray(e) && e.every((e) => typeof e == "string"), w = [
|
|
20
20
|
"Mac",
|
|
21
21
|
"iPhone",
|
|
22
22
|
"iPad",
|
|
23
23
|
"iPod"
|
|
24
|
-
],
|
|
24
|
+
], T = () => typeof window < "u" && w.some((e) => window.navigator.userAgent.includes(e)), E = () => {
|
|
25
25
|
if (typeof window > "u" || typeof navigator > "u") return !1;
|
|
26
26
|
let e = navigator.userAgent, t = /iP(ad|hone|od)/.test(e), n = !!e.match(/Safari/) && !e.match(/CriOS|FxiOS|OPiOS|EdgiOS/);
|
|
27
27
|
return t && n;
|
|
28
|
-
},
|
|
28
|
+
}, D = (e, t) => new Promise(() => setTimeout(e, t)), O = (e) => {
|
|
29
29
|
if (e != null) return String(typeof e == "string" ? e === "true" : e);
|
|
30
|
-
},
|
|
30
|
+
}, k = (e, t) => {
|
|
31
31
|
if (e != null) return typeof e == "string" ? t === e || e === "true" : !!e;
|
|
32
|
-
},
|
|
32
|
+
}, A = (e, t) => {
|
|
33
33
|
if (!(e == null && t == null)) return Number(e ?? t);
|
|
34
|
-
},
|
|
34
|
+
}, j = (e) => {
|
|
35
35
|
if (e != null) return e === "any" ? "any" : Number(e);
|
|
36
|
-
},
|
|
37
|
-
if (e != null) return
|
|
38
|
-
},
|
|
36
|
+
}, M = (e, t) => t && ["number", "range"].includes(t) ? A(e) : e, N = (e) => typeof e == "string" ? e === "true" : e, P = (e) => {
|
|
37
|
+
if (e != null) return O(!N(e));
|
|
38
|
+
}, F = (e, t) => (t === void 0 || N(t)) && !!e, I = (e) => e.querySelector("input[type=\"search\"]"), L = (e, t) => `${t}${e.id ?? e.value ?? b()}`, R = (e) => e.key !== void 0, z = ({ semantic: e, role: t, ariaLive: n }) => {
|
|
39
39
|
if (t) return t;
|
|
40
40
|
if (n) return "article";
|
|
41
41
|
switch (e) {
|
|
@@ -45,11 +45,11 @@ var x = () => {
|
|
|
45
45
|
case "successful": return "status";
|
|
46
46
|
default: return "article";
|
|
47
47
|
}
|
|
48
|
-
},
|
|
48
|
+
}, B = ["id"], V = [
|
|
49
49
|
"aria-disabled",
|
|
50
50
|
"name",
|
|
51
51
|
"open"
|
|
52
|
-
],
|
|
52
|
+
], H = /* @__PURE__ */ s({
|
|
53
53
|
name: "DBAccordionItem",
|
|
54
54
|
__name: "accordion-item",
|
|
55
55
|
props: {
|
|
@@ -78,37 +78,37 @@ var x = () => {
|
|
|
78
78
|
name: { default: void 0 }
|
|
79
79
|
},
|
|
80
80
|
setup(t) {
|
|
81
|
-
let o = t, s =
|
|
81
|
+
let o = t, s = f(!1), u = f(void 0), p = f(!1), _ = f(null);
|
|
82
82
|
l(() => {
|
|
83
|
-
o.defaultOpen && (s.value = o.defaultOpen),
|
|
84
|
-
}),
|
|
85
|
-
|
|
83
|
+
o.defaultOpen && (s.value = o.defaultOpen), p.value = !0;
|
|
84
|
+
}), v(() => [_.value, p.value], () => {
|
|
85
|
+
_.value && p.value;
|
|
86
86
|
}, {
|
|
87
87
|
immediate: !0,
|
|
88
88
|
flush: "post"
|
|
89
|
-
}),
|
|
89
|
+
}), v(() => [o.name], () => {
|
|
90
90
|
o.name && (u.value = o.name);
|
|
91
91
|
}, {
|
|
92
92
|
immediate: !0,
|
|
93
93
|
flush: "post"
|
|
94
94
|
});
|
|
95
|
-
function
|
|
95
|
+
function y(e) {
|
|
96
96
|
e?.preventDefault();
|
|
97
97
|
let t = !s.value;
|
|
98
98
|
o.onToggle && o.onToggle(t), s.value = t;
|
|
99
99
|
}
|
|
100
|
-
return (l,
|
|
100
|
+
return (l, f) => (d(), r("li", {
|
|
101
101
|
id: t.id ?? t.propOverrides?.id,
|
|
102
|
-
class: c(
|
|
102
|
+
class: c(g(S)("db-accordion-item", o.class))
|
|
103
103
|
}, [i("details", {
|
|
104
|
-
"aria-disabled":
|
|
104
|
+
"aria-disabled": g(O)(t.disabled),
|
|
105
105
|
ref_key: "_ref",
|
|
106
|
-
ref:
|
|
106
|
+
ref: _,
|
|
107
107
|
name: u.value,
|
|
108
108
|
open: s.value
|
|
109
|
-
}, [i("summary", { onClick:
|
|
109
|
+
}, [i("summary", { onClick: f[0] ||= async (e) => y(e) }, [t.headlinePlain ? (d(), r(e, { key: 0 }, [a(h(t.headlinePlain), 1)], 64)) : n("", !0), t.headlinePlain ? n("", !0) : m(l.$slots, "headline", { key: 1 })]), i("div", null, [t.text ? (d(), r(e, { key: 0 }, [a(h(t.text), 1)], 64)) : m(l.$slots, "default", { key: 1 })])], 8, V)], 10, B));
|
|
110
110
|
}
|
|
111
|
-
}),
|
|
111
|
+
}), ee = ["id", "data-variant"], U = /* @__PURE__ */ s({
|
|
112
112
|
name: "DBAccordion",
|
|
113
113
|
__name: "accordion",
|
|
114
114
|
props: {
|
|
@@ -126,10 +126,10 @@ var x = () => {
|
|
|
126
126
|
propOverrides: { default: void 0 }
|
|
127
127
|
},
|
|
128
128
|
setup(i) {
|
|
129
|
-
let a =
|
|
129
|
+
let a = _(), o = i, s = f(""), u = f(!1), h = f(!1), y = f(null);
|
|
130
130
|
l(() => {
|
|
131
|
-
u.value = !0,
|
|
132
|
-
}),
|
|
131
|
+
u.value = !0, h.value = !0;
|
|
132
|
+
}), v(() => [
|
|
133
133
|
u.value,
|
|
134
134
|
o.name,
|
|
135
135
|
o.behavior
|
|
@@ -138,22 +138,22 @@ var x = () => {
|
|
|
138
138
|
}, {
|
|
139
139
|
immediate: !0,
|
|
140
140
|
flush: "post"
|
|
141
|
-
}),
|
|
142
|
-
if (
|
|
143
|
-
let e =
|
|
141
|
+
}), v(() => [y.value, s.value], () => {
|
|
142
|
+
if (y.value) {
|
|
143
|
+
let e = y.value.getElementsByTagName("details");
|
|
144
144
|
if (e) for (let t of Array.from(e)) s.value === "" ? t.removeAttribute("name") : t.name = s.value ?? "";
|
|
145
145
|
}
|
|
146
146
|
}, {
|
|
147
147
|
immediate: !0,
|
|
148
148
|
flush: "post"
|
|
149
|
-
}),
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
}), v(() => [
|
|
150
|
+
y.value,
|
|
151
|
+
h.value,
|
|
152
152
|
o.initOpenIndex
|
|
153
153
|
], () => {
|
|
154
|
-
if (
|
|
154
|
+
if (y.value && h.value) {
|
|
155
155
|
if (o.initOpenIndex && o.initOpenIndex.length > 0) {
|
|
156
|
-
let e =
|
|
156
|
+
let e = y.value.getElementsByTagName("details");
|
|
157
157
|
if (e) {
|
|
158
158
|
let t = o.behavior === "single" && o.initOpenIndex.length > 1 ? [o.initOpenIndex[0]] : o.initOpenIndex;
|
|
159
159
|
Array.from(e).forEach((e, n) => {
|
|
@@ -161,7 +161,7 @@ var x = () => {
|
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
|
|
164
|
+
h.value = !1;
|
|
165
165
|
}
|
|
166
166
|
}, {
|
|
167
167
|
immediate: !0,
|
|
@@ -175,13 +175,13 @@ var x = () => {
|
|
|
175
175
|
}
|
|
176
176
|
return [];
|
|
177
177
|
}
|
|
178
|
-
return (a, s) => (
|
|
178
|
+
return (a, s) => (d(), r("ul", {
|
|
179
179
|
ref_key: "_ref",
|
|
180
|
-
ref:
|
|
180
|
+
ref: y,
|
|
181
181
|
id: i.id ?? i.propOverrides?.id,
|
|
182
|
-
class: c(
|
|
182
|
+
class: c(g(S)("db-accordion", o.class)),
|
|
183
183
|
"data-variant": i.variant
|
|
184
|
-
}, [i.items ? n("", !0) :
|
|
184
|
+
}, [i.items ? n("", !0) : m(a.$slots, "default", { key: 0 }), i.items ? (d(!0), r(e, { key: 1 }, p(b(), (e, n) => (d(), t(H, {
|
|
185
185
|
key: `accordion-item-${n}`,
|
|
186
186
|
headlinePlain: e.headlinePlain,
|
|
187
187
|
disabled: e.disabled,
|
|
@@ -190,15 +190,15 @@ var x = () => {
|
|
|
190
190
|
"headlinePlain",
|
|
191
191
|
"disabled",
|
|
192
192
|
"text"
|
|
193
|
-
]))), 128)) : n("", !0)], 10,
|
|
193
|
+
]))), 128)) : n("", !0)], 10, ee));
|
|
194
194
|
}
|
|
195
|
-
}),
|
|
195
|
+
}), te = ["divider", "card"], W = ["multiple", "single"], ne = "OVERWRITE_DEFAULT_ID", re = "LABEL SHOULD BE SET", G = " ", ie = "MESSAGE SHOULD BE SET", ae = "-label", oe = "-select", K = "-message", q = "-valid-message", J = "-invalid-message", se = "-placeholder", ce = "-datalist", le = "TODO: Add a validMessage", Y = "TODO: Add an invalidMessage", ue = "Remove", de = "Back", fe = "Selected", pe = "BurgerMenu", me = "brand", he = 4, ge = "Close", _e = "density", ve = "color", ye = /* @__PURE__ */ function(e) {
|
|
196
196
|
return e.FUNCTIONAL = "functional", e.REGULAR = "regular", e.EXPRESSIVE = "expressive", e;
|
|
197
|
-
}({}), be = Object.entries(ye).map(([, e]) => e),
|
|
197
|
+
}({}), be = Object.entries(ye).map(([, e]) => e), xe = /* @__PURE__ */ function(e) {
|
|
198
198
|
return e.PRIMARY = "primary", e;
|
|
199
|
-
}({}),
|
|
199
|
+
}({}), X = /* @__PURE__ */ function(e) {
|
|
200
200
|
return e.NEUTRAL_BG_LEVEL_1 = "neutral-bg-basic-level-1", e.NEUTRAL_BG_LEVEL_2 = "neutral-bg-basic-level-2", e.NEUTRAL_BG_LEVEL_3 = "neutral-bg-basic-level-3", e.NEUTRAL_BG_TRANSPARENT_SEMI = "neutral-bg-basic-transparent-semi", e.NEUTRAL_BG_TRANSPARENT_FULL = "neutral-bg-basic-transparent-full", e.BRAND_BG_LEVEL_1 = "brand-bg-basic-level-1", e.BRAND_BG_LEVEL_2 = "brand-bg-basic-level-2", e.BRAND_BG_LEVEL_3 = "brand-bg-basic-level-3", e.BRAND_BG_TRANSPARENT_SEMI = "brand-bg-basic-transparent-semi", e.BRAND_BG_TRANSPARENT_FULL = "brand-bg-basic-transparent-full", e.SUCCESSFUL_BG_LEVEL_1 = "successful-bg-basic-level-1", e.SUCCESSFUL_BG_LEVEL_2 = "successful-bg-basic-level-2", e.SUCCESSFUL_BG_LEVEL_3 = "successful-bg-basic-level-3", e.SUCCESSFUL_BG_TRANSPARENT_SEMI = "successful-bg-basic-transparent-semi", e.SUCCESSFUL_BG_TRANSPARENT_FULL = "successful-bg-basic-transparent-full", e.CRITICAL_BG_LEVEL_1 = "critical-bg-basic-level-1", e.CRITICAL_BG_LEVEL_2 = "critical-bg-basic-level-2", e.CRITICAL_BG_LEVEL_3 = "critical-bg-basic-level-3", e.CRITICAL_BG_TRANSPARENT_SEMI = "critical-bg-basic-transparent-semi", e.CRITICAL_BG_TRANSPARENT_Full = "critical-bg-basic-transparent-full", e.WARNING_BG_LEVEL_1 = "warning-bg-basic-level-1", e.WARNING_BG_LEVEL_2 = "warning-bg-basic-level-2", e.WARNING_BG_LEVEL_3 = "warning-bg-basic-level-3", e.WARNING_BG_TRANSPARENT_SEMI = "warning-bg-basic-transparent-semi", e.WARNING_BG_TRANSPARENT_FULL = "warning-bg-basic-transparent-full", e.INFORMATIONAL_BG_LEVEL_1 = "informational-bg-basic-level-1", e.INFORMATIONAL_BG_LEVEL_2 = "informational-bg-basic-level-2", e.INFORMATIONAL_BG_LEVEL_3 = "informational-bg-basic-level-3", e.INFORMATIONAL_BG_TRANSPARENT_SEMI = "informational-bg-basic-transparent-semi", e.INFORMATIONAL_BG_TRANSPARENT_FULL = "informational-bg-basic-transparent-full", e;
|
|
201
|
-
}({}),
|
|
201
|
+
}({}), Z = Object.entries(X).map(([, e]) => e), Se = Object.entries(xe).map(([, e]) => e), Ce = /* @__PURE__ */ function(e) {
|
|
202
202
|
return e.CRITICAL = "critical", e.INFORMATIONAL = "informational", e.WARNING = "warning", e.SUCCESSFUL = "successful", e;
|
|
203
203
|
}({}), we = Object.entries(Ce).map(([, e]) => e), Te = {
|
|
204
204
|
width: 390,
|
|
@@ -250,10 +250,10 @@ var x = () => {
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
setup(t) {
|
|
253
|
-
let n = t, i =
|
|
253
|
+
let n = t, i = f(!1), o = f(null);
|
|
254
254
|
return l(() => {
|
|
255
255
|
i.value = !0;
|
|
256
|
-
}),
|
|
256
|
+
}), v(() => [o.value, i.value], () => {
|
|
257
257
|
if (o.value && i.value && n.placement?.startsWith("corner")) {
|
|
258
258
|
let e = o.value.parentElement;
|
|
259
259
|
e && e.localName.includes("badge") && (e = e.parentElement), e && (e.dataset.hasBadge = "true");
|
|
@@ -261,18 +261,18 @@ var x = () => {
|
|
|
261
261
|
}, {
|
|
262
262
|
immediate: !0,
|
|
263
263
|
flush: "post"
|
|
264
|
-
}), (i, s) => (
|
|
264
|
+
}), (i, s) => (d(), r("span", {
|
|
265
265
|
ref_key: "_ref",
|
|
266
266
|
ref: o,
|
|
267
267
|
id: t.id ?? t.propOverrides?.id,
|
|
268
|
-
class: c(
|
|
268
|
+
class: c(g(S)("db-badge", n.class)),
|
|
269
269
|
"data-semantic": t.semantic,
|
|
270
270
|
"data-size": t.size,
|
|
271
271
|
"data-emphasis": t.emphasis,
|
|
272
272
|
"data-placement": t.placement,
|
|
273
|
-
"data-wrap":
|
|
274
|
-
"data-label": t.placement?.startsWith("corner") && (t.label ??
|
|
275
|
-
}, [t.text ? (
|
|
273
|
+
"data-wrap": g(O)(t.wrap),
|
|
274
|
+
"data-label": t.placement?.startsWith("corner") && (t.label ?? g("LABEL SHOULD BE SET"))
|
|
275
|
+
}, [t.text ? (d(), r(e, { key: 0 }, [a(h(t.text), 1)], 64)) : m(i.$slots, "default", { key: 1 })], 10, Ae));
|
|
276
276
|
}
|
|
277
277
|
}), Me = [
|
|
278
278
|
"inline",
|
|
@@ -308,15 +308,15 @@ var x = () => {
|
|
|
308
308
|
text: { default: void 0 }
|
|
309
309
|
},
|
|
310
310
|
setup(t) {
|
|
311
|
-
let n = t, i =
|
|
312
|
-
return (o, s) => (
|
|
311
|
+
let n = t, i = f(null);
|
|
312
|
+
return (o, s) => (d(), r("div", {
|
|
313
313
|
ref_key: "_ref",
|
|
314
314
|
ref: i,
|
|
315
|
-
"data-icon": t.hideLogo ? "none" : t.icon ??
|
|
316
|
-
"data-show-icon":
|
|
315
|
+
"data-icon": t.hideLogo ? "none" : t.icon ?? g("brand"),
|
|
316
|
+
"data-show-icon": g(O)(t.showIcon),
|
|
317
317
|
id: t.id ?? t.propOverrides?.id,
|
|
318
|
-
class: c(
|
|
319
|
-
}, [t.text ? (
|
|
318
|
+
class: c(g(S)("db-brand", n.class))
|
|
319
|
+
}, [t.text ? (d(), r(e, { key: 0 }, [a(h(t.text), 1)], 64)) : m(o.$slots, "default", { key: 1 })], 10, Ne));
|
|
320
320
|
}
|
|
321
321
|
}), Fe = [
|
|
322
322
|
"id",
|
|
@@ -386,34 +386,34 @@ var x = () => {
|
|
|
386
386
|
}
|
|
387
387
|
},
|
|
388
388
|
setup(t) {
|
|
389
|
-
let n = t, i =
|
|
389
|
+
let n = t, i = f(null);
|
|
390
390
|
function o() {
|
|
391
391
|
return n.type ? n.type : n.onClick ? "button" : "submit";
|
|
392
392
|
}
|
|
393
393
|
function s(e) {
|
|
394
394
|
n.onClick && n.onClick(e);
|
|
395
395
|
}
|
|
396
|
-
return (l, u) => (
|
|
396
|
+
return (l, u) => (d(), r("button", {
|
|
397
397
|
ref_key: "_ref",
|
|
398
398
|
ref: i,
|
|
399
399
|
id: t.id ?? t.propOverrides?.id,
|
|
400
|
-
class: c(
|
|
400
|
+
class: c(g(S)("db-button", n.class)),
|
|
401
401
|
type: o(),
|
|
402
|
-
disabled:
|
|
402
|
+
disabled: g(k)(t.disabled, "disabled"),
|
|
403
403
|
"data-icon": t.iconLeading ?? t.icon,
|
|
404
|
-
"data-show-icon":
|
|
404
|
+
"data-show-icon": g(O)(t.showIconLeading ?? t.showIcon),
|
|
405
405
|
"data-icon-trailing": t.iconTrailing,
|
|
406
|
-
"data-show-icon-trailing":
|
|
406
|
+
"data-show-icon-trailing": g(O)(t.showIconTrailing),
|
|
407
407
|
"data-size": t.size,
|
|
408
408
|
"data-width": t.width,
|
|
409
409
|
"data-variant": t.variant,
|
|
410
|
-
"data-wrap":
|
|
411
|
-
"data-no-text":
|
|
410
|
+
"data-wrap": g(O)(t.wrap),
|
|
411
|
+
"data-no-text": g(O)(t.noText),
|
|
412
412
|
name: t.name,
|
|
413
413
|
form: t.form,
|
|
414
414
|
value: t.value,
|
|
415
415
|
onClick: u[0] ||= async (e) => s(e)
|
|
416
|
-
}, [t.text ? (
|
|
416
|
+
}, [t.text ? (d(), r(e, { key: 0 }, [a(h(t.text), 1)], 64)) : m(l.$slots, "default", { key: 1 })], 10, Fe));
|
|
417
417
|
}
|
|
418
418
|
}), Le = [
|
|
419
419
|
"outlined",
|
|
@@ -449,34 +449,34 @@ var x = () => {
|
|
|
449
449
|
spacing: { default: void 0 }
|
|
450
450
|
},
|
|
451
451
|
setup(e) {
|
|
452
|
-
let t = e, n =
|
|
452
|
+
let t = e, n = f(null);
|
|
453
453
|
function i(e) {
|
|
454
454
|
t.onClick && t.onClick(e);
|
|
455
455
|
}
|
|
456
|
-
return (a, o) => (
|
|
456
|
+
return (a, o) => (d(), r("div", {
|
|
457
457
|
ref_key: "_ref",
|
|
458
458
|
ref: n,
|
|
459
459
|
id: e.id ?? e.propOverrides?.id,
|
|
460
|
-
class: c(
|
|
460
|
+
class: c(g(S)("db-card", t.class)),
|
|
461
461
|
"data-behavior": e.behavior,
|
|
462
462
|
"data-elevation-level": e.elevationLevel,
|
|
463
463
|
"data-spacing": e.spacing,
|
|
464
464
|
onClick: o[0] ||= async (e) => i(e)
|
|
465
|
-
}, [
|
|
465
|
+
}, [m(a.$slots, "default")], 10, ze));
|
|
466
466
|
}
|
|
467
467
|
}), Ve = ["static", "interactive"], He = [
|
|
468
468
|
"1",
|
|
469
469
|
"2",
|
|
470
470
|
"3"
|
|
471
|
-
],
|
|
471
|
+
], Q = (e, t, n = "value") => {
|
|
472
472
|
e(`update:${n}`, t.target[n]);
|
|
473
|
-
},
|
|
473
|
+
}, Ue = (e, t, n) => {
|
|
474
474
|
e.form && !e._dbFormResetListenerAdded && (e.form.addEventListener("reset", (e) => {
|
|
475
475
|
t(e);
|
|
476
476
|
}, { signal: n }), e._dbFormResetListenerAdded = !0);
|
|
477
|
-
},
|
|
478
|
-
|
|
479
|
-
|
|
477
|
+
}, We = (e, t, n, r) => {
|
|
478
|
+
Ue(e, (r) => {
|
|
479
|
+
D(() => {
|
|
480
480
|
let i = t.checked ? t.checked : t.defaultChecked ? t.defaultChecked : e.checked;
|
|
481
481
|
n({
|
|
482
482
|
...r,
|
|
@@ -487,9 +487,9 @@ var x = () => {
|
|
|
487
487
|
});
|
|
488
488
|
}, 1);
|
|
489
489
|
}, r);
|
|
490
|
-
},
|
|
491
|
-
|
|
492
|
-
|
|
490
|
+
}, Ge = (e, t, n, r) => {
|
|
491
|
+
Ue(e, (r) => {
|
|
492
|
+
D(() => {
|
|
493
493
|
let i = t.value ? t.value : t.defaultValue ? t.defaultValue : e.value;
|
|
494
494
|
n({
|
|
495
495
|
...r,
|
|
@@ -500,7 +500,7 @@ var x = () => {
|
|
|
500
500
|
});
|
|
501
501
|
}, 1);
|
|
502
502
|
}, r);
|
|
503
|
-
},
|
|
503
|
+
}, Ke = [
|
|
504
504
|
"id",
|
|
505
505
|
"data-icon",
|
|
506
506
|
"data-semantic",
|
|
@@ -531,24 +531,24 @@ var x = () => {
|
|
|
531
531
|
}
|
|
532
532
|
},
|
|
533
533
|
setup(t) {
|
|
534
|
-
let n = t, i =
|
|
535
|
-
return (o, s) => (
|
|
534
|
+
let n = t, i = f(null);
|
|
535
|
+
return (o, s) => (d(), r("span", {
|
|
536
536
|
ref_key: "_ref",
|
|
537
537
|
ref: i,
|
|
538
538
|
id: t.id ?? t.propOverrides?.id,
|
|
539
|
-
class: c(
|
|
539
|
+
class: c(g(S)("db-infotext", n.class)),
|
|
540
540
|
"data-icon": t.icon,
|
|
541
541
|
"data-semantic": t.semantic,
|
|
542
542
|
"data-size": t.size,
|
|
543
|
-
"data-wrap":
|
|
544
|
-
"data-show-icon-leading":
|
|
545
|
-
}, [t.text ? (
|
|
543
|
+
"data-wrap": g(O)(t.wrap),
|
|
544
|
+
"data-show-icon-leading": g(O)(t.showIcon ?? !0)
|
|
545
|
+
}, [t.text ? (d(), r(e, { key: 0 }, [a(h(t.text), 1)], 64)) : m(o.$slots, "default", { key: 1 })], 10, Ke));
|
|
546
546
|
}
|
|
547
|
-
}),
|
|
547
|
+
}), qe = [
|
|
548
548
|
"data-size",
|
|
549
549
|
"data-hide-asterisk",
|
|
550
550
|
"data-hide-label"
|
|
551
|
-
],
|
|
551
|
+
], Je = ["for"], Ye = [
|
|
552
552
|
"aria-invalid",
|
|
553
553
|
"data-custom-validity",
|
|
554
554
|
"id",
|
|
@@ -558,10 +558,10 @@ var x = () => {
|
|
|
558
558
|
"value",
|
|
559
559
|
"required",
|
|
560
560
|
"aria-describedby"
|
|
561
|
-
],
|
|
561
|
+
], Xe = {
|
|
562
562
|
"data-visually-hidden": "true",
|
|
563
563
|
role: "status"
|
|
564
|
-
},
|
|
564
|
+
}, Ze = /* @__PURE__ */ s({
|
|
565
565
|
name: "DBCheckbox",
|
|
566
566
|
__name: "checkbox",
|
|
567
567
|
props: {
|
|
@@ -630,53 +630,53 @@ var x = () => {
|
|
|
630
630
|
size: { default: void 0 }
|
|
631
631
|
},
|
|
632
632
|
emits: ["update:checked"],
|
|
633
|
-
setup(s, { emit:
|
|
634
|
-
let
|
|
633
|
+
setup(s, { emit: p }) {
|
|
634
|
+
let b = _(), x = p, C = s, w = f(!1), E = f(void 0), O = f(void 0), A = f(void 0), j = f(void 0), M = f(void 0), N = f(void 0), I = f(""), L = f(void 0), R = f(null);
|
|
635
635
|
l(() => {
|
|
636
|
-
w.value = !0,
|
|
636
|
+
w.value = !0, U(), M.value = C.invalidMessage || "TODO: Add an invalidMessage";
|
|
637
637
|
}), u(() => {
|
|
638
638
|
L.value?.abort();
|
|
639
|
-
}),
|
|
640
|
-
(
|
|
639
|
+
}), v(() => [C.id, C.propOverrides?.id], () => {
|
|
640
|
+
(C.id ?? C.propOverrides?.id) && U();
|
|
641
641
|
}, {
|
|
642
642
|
immediate: !0,
|
|
643
643
|
flush: "post"
|
|
644
|
-
}),
|
|
645
|
-
M.value =
|
|
644
|
+
}), v(() => [R.value, C.invalidMessage], () => {
|
|
645
|
+
M.value = C.invalidMessage || R.value?.validationMessage || "TODO: Add an invalidMessage";
|
|
646
646
|
}, {
|
|
647
647
|
immediate: !0,
|
|
648
648
|
flush: "post"
|
|
649
|
-
}),
|
|
650
|
-
if (
|
|
651
|
-
let e =
|
|
652
|
-
|
|
649
|
+
}), v(() => [E.value], () => {
|
|
650
|
+
if (E.value) {
|
|
651
|
+
let e = E.value + K;
|
|
652
|
+
O.value = e, A.value = E.value + q, j.value = E.value + J, F(C.message, C.showMessage) && (N.value = e), B();
|
|
653
653
|
}
|
|
654
654
|
}, {
|
|
655
655
|
immediate: !0,
|
|
656
656
|
flush: "post"
|
|
657
|
-
}),
|
|
657
|
+
}), v(() => [
|
|
658
658
|
w.value,
|
|
659
659
|
R.value,
|
|
660
|
-
|
|
660
|
+
C.indeterminate
|
|
661
661
|
], () => {
|
|
662
|
-
R.value &&
|
|
662
|
+
R.value && C.indeterminate !== void 0 && (R.value.indeterminate = !!k(C.indeterminate));
|
|
663
663
|
}, {
|
|
664
664
|
immediate: !0,
|
|
665
665
|
flush: "post"
|
|
666
|
-
}),
|
|
666
|
+
}), v(() => [
|
|
667
667
|
w.value,
|
|
668
668
|
R.value,
|
|
669
|
-
|
|
669
|
+
C.checked
|
|
670
670
|
], () => {
|
|
671
|
-
w.value && R.value && (
|
|
671
|
+
w.value && R.value && (C.checked != null && (R.value.checked = !!k(C.checked)), w.value = !1);
|
|
672
672
|
}, {
|
|
673
673
|
immediate: !0,
|
|
674
674
|
flush: "post"
|
|
675
|
-
}),
|
|
675
|
+
}), v(() => [R.value], () => {
|
|
676
676
|
if (R.value) {
|
|
677
677
|
let e = L.value;
|
|
678
|
-
e || (e = new AbortController(), L.value = e),
|
|
679
|
-
checked:
|
|
678
|
+
e || (e = new AbortController(), L.value = e), We(R.value, {
|
|
679
|
+
checked: C.checked,
|
|
680
680
|
defaultChecked: void 0
|
|
681
681
|
}, (e) => {
|
|
682
682
|
V(e, !0);
|
|
@@ -687,63 +687,63 @@ var x = () => {
|
|
|
687
687
|
flush: "post"
|
|
688
688
|
});
|
|
689
689
|
function z() {
|
|
690
|
-
return !!(
|
|
690
|
+
return !!(C.validMessage ?? C.validation === "valid");
|
|
691
691
|
}
|
|
692
692
|
function B() {
|
|
693
|
-
!R.value?.validity.valid ||
|
|
693
|
+
!R.value?.validity.valid || C.validation === "invalid" ? (N.value = j.value, M.value = C.invalidMessage || R.value?.validationMessage || "TODO: Add an invalidMessage", T() && (I.value = M.value, D(() => I.value = "", 1e3))) : z() && R.value?.validity.valid && C.required ? (N.value = A.value, T() && (I.value = C.validMessage ?? "TODO: Add a validMessage", D(() => I.value = "", 1e3))) : F(C.message, C.showMessage) ? N.value = O.value : N.value = void 0;
|
|
694
694
|
}
|
|
695
695
|
function V(e, t) {
|
|
696
|
-
|
|
696
|
+
C.onChange && C.onChange(e), Q(x, e, "checked"), B();
|
|
697
697
|
}
|
|
698
698
|
function H(e) {
|
|
699
|
-
|
|
699
|
+
C.onBlur && C.onBlur(e);
|
|
700
700
|
}
|
|
701
|
-
function
|
|
702
|
-
|
|
701
|
+
function ee(e) {
|
|
702
|
+
C.onFocus && C.onFocus(e);
|
|
703
703
|
}
|
|
704
|
-
function
|
|
705
|
-
let e =
|
|
706
|
-
|
|
704
|
+
function U() {
|
|
705
|
+
let e = C.id ?? C.propOverrides?.id ?? `checkbox-${b}`;
|
|
706
|
+
E.value = e, O.value = e + K, A.value = e + q, j.value = e + J;
|
|
707
707
|
}
|
|
708
|
-
return (l, u) => (
|
|
709
|
-
class: c(
|
|
708
|
+
return (l, u) => (d(), r("div", {
|
|
709
|
+
class: c(g(S)("db-checkbox", C.class)),
|
|
710
710
|
"data-size": s.size,
|
|
711
|
-
"data-hide-asterisk":
|
|
712
|
-
"data-hide-label":
|
|
711
|
+
"data-hide-asterisk": g(P)(s.showRequiredAsterisk),
|
|
712
|
+
"data-hide-label": g(P)(s.showLabel)
|
|
713
713
|
}, [
|
|
714
|
-
i("label", { for:
|
|
714
|
+
i("label", { for: E.value }, [i("input", {
|
|
715
715
|
type: "checkbox",
|
|
716
716
|
"aria-invalid": s.validation === "invalid",
|
|
717
717
|
"data-custom-validity": s.validation,
|
|
718
718
|
ref_key: "_ref",
|
|
719
719
|
ref: R,
|
|
720
|
-
id:
|
|
720
|
+
id: E.value,
|
|
721
721
|
name: s.name,
|
|
722
|
-
checked:
|
|
723
|
-
disabled:
|
|
722
|
+
checked: g(k)(s.checked, "checked"),
|
|
723
|
+
disabled: g(k)(s.disabled, "disabled"),
|
|
724
724
|
value: s.value,
|
|
725
|
-
required:
|
|
725
|
+
required: g(k)(s.required, "required"),
|
|
726
726
|
onChange: u[0] ||= async (e) => V(e),
|
|
727
727
|
onBlur: u[1] ||= async (e) => H(e),
|
|
728
|
-
onFocus: u[2] ||= async (e) =>
|
|
728
|
+
onFocus: u[2] ||= async (e) => ee(e),
|
|
729
729
|
"aria-describedby": s.ariaDescribedBy ?? N.value
|
|
730
|
-
}, null, 40,
|
|
731
|
-
|
|
730
|
+
}, null, 40, Ye), s.label ? (d(), r(e, { key: 0 }, [a(h(s.label), 1)], 64)) : m(l.$slots, "default", { key: 1 })], 8, Je),
|
|
731
|
+
g(F)(s.message, s.showMessage) ? (d(), t($, {
|
|
732
732
|
key: 0,
|
|
733
733
|
size: "small",
|
|
734
734
|
icon: s.messageIcon,
|
|
735
|
-
id:
|
|
735
|
+
id: O.value
|
|
736
736
|
}, {
|
|
737
|
-
default:
|
|
737
|
+
default: y(() => [a(h(s.message), 1)]),
|
|
738
738
|
_: 1
|
|
739
739
|
}, 8, ["icon", "id"])) : n("", !0),
|
|
740
|
-
z() ? (
|
|
740
|
+
z() ? (d(), t($, {
|
|
741
741
|
key: 1,
|
|
742
742
|
size: "small",
|
|
743
743
|
semantic: "successful",
|
|
744
|
-
id:
|
|
744
|
+
id: A.value
|
|
745
745
|
}, {
|
|
746
|
-
default:
|
|
746
|
+
default: y(() => [a(h(s.validMessage || g("TODO: Add a validMessage")), 1)]),
|
|
747
747
|
_: 1
|
|
748
748
|
}, 8, ["id"])) : n("", !0),
|
|
749
749
|
o($, {
|
|
@@ -751,13 +751,13 @@ var x = () => {
|
|
|
751
751
|
semantic: "critical",
|
|
752
752
|
id: j.value
|
|
753
753
|
}, {
|
|
754
|
-
default:
|
|
754
|
+
default: y(() => [a(h(M.value), 1)]),
|
|
755
755
|
_: 1
|
|
756
756
|
}, 8, ["id"]),
|
|
757
|
-
i("span",
|
|
758
|
-
], 10,
|
|
757
|
+
i("span", Xe, h(I.value), 1)
|
|
758
|
+
], 10, qe));
|
|
759
759
|
}
|
|
760
|
-
}),
|
|
760
|
+
}), Qe = [
|
|
761
761
|
"id",
|
|
762
762
|
"data-icon",
|
|
763
763
|
"data-show-icon",
|
|
@@ -767,7 +767,7 @@ var x = () => {
|
|
|
767
767
|
"data-width",
|
|
768
768
|
"data-variant",
|
|
769
769
|
"data-no-text"
|
|
770
|
-
],
|
|
770
|
+
], $e = /* @__PURE__ */ s({
|
|
771
771
|
name: "DBCustomButton",
|
|
772
772
|
__name: "custom-button",
|
|
773
773
|
props: {
|
|
@@ -802,23 +802,23 @@ var x = () => {
|
|
|
802
802
|
wrap: { type: [Boolean, String] }
|
|
803
803
|
},
|
|
804
804
|
setup(e) {
|
|
805
|
-
let t = e, n =
|
|
806
|
-
return (i, a) => (
|
|
805
|
+
let t = e, n = f(null);
|
|
806
|
+
return (i, a) => (d(), r("div", {
|
|
807
807
|
ref_key: "_ref",
|
|
808
808
|
ref: n,
|
|
809
809
|
id: e.id ?? e.propOverrides?.id,
|
|
810
|
-
class: c(
|
|
810
|
+
class: c(g(S)("db-custom-button", t.class)),
|
|
811
811
|
"data-icon": e.iconLeading ?? e.icon,
|
|
812
|
-
"data-show-icon":
|
|
812
|
+
"data-show-icon": g(O)(e.showIconLeading ?? e.showIcon),
|
|
813
813
|
"data-icon-trailing": e.iconTrailing,
|
|
814
|
-
"data-show-icon-trailing":
|
|
814
|
+
"data-show-icon-trailing": g(O)(e.showIconTrailing),
|
|
815
815
|
"data-size": e.size,
|
|
816
816
|
"data-width": e.width,
|
|
817
817
|
"data-variant": e.variant,
|
|
818
|
-
"data-no-text":
|
|
819
|
-
}, [
|
|
818
|
+
"data-no-text": g(O)(e.noText)
|
|
819
|
+
}, [m(i.$slots, "default")], 10, Qe));
|
|
820
820
|
}
|
|
821
|
-
}),
|
|
821
|
+
}), et = class e {
|
|
822
822
|
static callbacks = {};
|
|
823
823
|
static _instance = null;
|
|
824
824
|
static runCallbacks(t) {
|
|
@@ -829,13 +829,13 @@ var x = () => {
|
|
|
829
829
|
e._instance = this, self.document && self.document.addEventListener("click", (t) => e.runCallbacks(t));
|
|
830
830
|
}
|
|
831
831
|
addCallback(t) {
|
|
832
|
-
let n =
|
|
832
|
+
let n = b();
|
|
833
833
|
return e.callbacks[n] = t, n;
|
|
834
834
|
}
|
|
835
835
|
removeCallback(t) {
|
|
836
836
|
delete e.callbacks[t];
|
|
837
837
|
}
|
|
838
|
-
},
|
|
838
|
+
}, tt = class e {
|
|
839
839
|
static callbacks = {};
|
|
840
840
|
static _instance = null;
|
|
841
841
|
static runCallbacks(t) {
|
|
@@ -851,13 +851,13 @@ var x = () => {
|
|
|
851
851
|
}, !0);
|
|
852
852
|
}
|
|
853
853
|
addCallback(t) {
|
|
854
|
-
let n =
|
|
854
|
+
let n = b();
|
|
855
855
|
return e.callbacks[n] = t, n;
|
|
856
856
|
}
|
|
857
857
|
removeCallback(t) {
|
|
858
858
|
delete e.callbacks[t];
|
|
859
859
|
}
|
|
860
|
-
},
|
|
860
|
+
}, nt = (e) => {
|
|
861
861
|
let { top: t, bottom: n, left: r, right: i } = e.getBoundingClientRect(), { innerHeight: a, innerWidth: o } = window, s = t < 0, c = n > a, l = r < 0, u = i > o, d = e.dataset.outsideVy, f = e.dataset.outsideVx, p = e?.parentElement?.getBoundingClientRect();
|
|
862
862
|
return p && (d && (e.dataset.outsideVy === "top" ? s = p.top - (n - p.bottom) < 0 : c = p.bottom + (p.top - t) > a), f && (e.dataset.outsideVx === "left" ? l = p.left - (i - p.right) < 0 : u = p.right + (p.left - r) > o)), {
|
|
863
863
|
outTop: s,
|
|
@@ -865,17 +865,17 @@ var x = () => {
|
|
|
865
865
|
outLeft: l,
|
|
866
866
|
outRight: u
|
|
867
867
|
};
|
|
868
|
-
},
|
|
869
|
-
let { outTop: t, outBottom: n, outLeft: r, outRight: i } =
|
|
868
|
+
}, rt = (e) => {
|
|
869
|
+
let { outTop: t, outBottom: n, outLeft: r, outRight: i } = nt(e), a = {};
|
|
870
870
|
return t || n ? (a = { vy: t ? "top" : "bottom" }, e.dataset.outsideVy = a.vy) : delete e.dataset.outsideVy, r || i ? (a = {
|
|
871
871
|
...a,
|
|
872
872
|
vx: i ? "right" : "left"
|
|
873
873
|
}, e.dataset.outsideVx = a.vx) : delete e.dataset.outsideVx, a;
|
|
874
|
-
},
|
|
874
|
+
}, it = (e, t, n) => {
|
|
875
875
|
if (!e || !t || getComputedStyle(e).zIndex === "9999") return;
|
|
876
|
-
let { top: r, bottom: i, childHeight: a, childWidth: o, width: s, right: c, left: l, correctedPlacement: u } =
|
|
876
|
+
let { top: r, bottom: i, childHeight: a, childWidth: o, width: s, right: c, left: l, correctedPlacement: u } = at(e, t, n);
|
|
877
877
|
e.dataset.width === "full" && (e.style.inlineSize = `${s}px`), u === "top" || u === "bottom" || u === "top-start" || u === "bottom-start" ? e.style.insetInlineStart = `${l}px` : (u === "top-end" || u === "bottom-end") && (e.style.insetInlineStart = `${c - o}px`), u?.startsWith("top") ? e.style.insetBlockStart = `${r - a}px` : u?.startsWith("bottom") && (e.style.insetBlockStart = `${i}px`), e.style.position = "fixed";
|
|
878
|
-
},
|
|
878
|
+
}, at = (e, t, n) => {
|
|
879
879
|
if (!e || !t) return {
|
|
880
880
|
top: 0,
|
|
881
881
|
bottom: 0,
|
|
@@ -905,17 +905,17 @@ var x = () => {
|
|
|
905
905
|
innerWidth: d,
|
|
906
906
|
innerHeight: u
|
|
907
907
|
};
|
|
908
|
-
},
|
|
909
|
-
if (
|
|
908
|
+
}, ot = 10, st = /* @__PURE__ */ new WeakMap(), ct = (e) => {
|
|
909
|
+
if (st.has(e)) return st.get(e);
|
|
910
910
|
let t = e.parentElement, n = 0;
|
|
911
|
-
for (; t && n <
|
|
912
|
-
if (t.dataset.correctedPlacement) return
|
|
911
|
+
for (; t && n < ot;) {
|
|
912
|
+
if (t.dataset.correctedPlacement) return st.set(e, t), t;
|
|
913
913
|
t = t.parentElement, n += 1;
|
|
914
914
|
}
|
|
915
|
-
return
|
|
916
|
-
},
|
|
915
|
+
return st.set(e, null), null;
|
|
916
|
+
}, lt = (e, t, n) => {
|
|
917
917
|
if (!e || !t) return;
|
|
918
|
-
let r = getComputedStyle(t), i = ["absolute", "fixed"].includes(r.position), a =
|
|
918
|
+
let r = getComputedStyle(t), i = ["absolute", "fixed"].includes(r.position), a = ct(e), o = !a && !i, s = getComputedStyle(e)?.getPropertyValue("--db-popover-distance") ?? "0px", { top: c, height: l, width: u, childHeight: d, childWidth: f, right: p, left: m, bottom: h, correctedPlacement: g, innerWidth: _, innerHeight: v } = at(e, t, n);
|
|
919
919
|
if (a) {
|
|
920
920
|
let e = a.getBoundingClientRect();
|
|
921
921
|
m = Math.abs(m - e.left), p = (u + Math.abs(p - e.right)) * 1.5, c = Math.abs(c - e.top), h = (l + Math.abs(h - e.bottom)) * 1.5;
|
|
@@ -961,7 +961,7 @@ var x = () => {
|
|
|
961
961
|
e.style.insetBlockStart = `calc(${i ? t : h}px + ${s})`, e.style.insetBlockEnd = `calc(${o && t > v ? v : t}px + ${s})`;
|
|
962
962
|
}
|
|
963
963
|
e.style.position = "fixed", e.dataset.correctedPlacement = g;
|
|
964
|
-
},
|
|
964
|
+
}, ut = ["id", "data-width"], dt = /* @__PURE__ */ s({
|
|
965
965
|
name: "DBCustomSelectDropdown",
|
|
966
966
|
__name: "custom-select-dropdown",
|
|
967
967
|
props: {
|
|
@@ -974,28 +974,28 @@ var x = () => {
|
|
|
974
974
|
propOverrides: { default: void 0 }
|
|
975
975
|
},
|
|
976
976
|
setup(e) {
|
|
977
|
-
let t = e, n =
|
|
978
|
-
return (i, a) => (
|
|
977
|
+
let t = e, n = f(null);
|
|
978
|
+
return (i, a) => (d(), r("article", {
|
|
979
979
|
"data-spacing": "none",
|
|
980
980
|
ref_key: "_ref",
|
|
981
981
|
ref: n,
|
|
982
982
|
id: e.id ?? e.propOverrides?.id,
|
|
983
|
-
class: c(
|
|
983
|
+
class: c(g(S)("db-custom-select-dropdown db-card", t.class)),
|
|
984
984
|
"data-width": e.width
|
|
985
|
-
}, [
|
|
985
|
+
}, [m(i.$slots, "default")], 10, ut));
|
|
986
986
|
}
|
|
987
|
-
}),
|
|
987
|
+
}), ft = ["id", "data-divider"], pt = [
|
|
988
988
|
"data-icon",
|
|
989
989
|
"data-show-icon",
|
|
990
990
|
"data-icon-trailing"
|
|
991
|
-
],
|
|
991
|
+
], mt = [
|
|
992
992
|
"type",
|
|
993
993
|
"name",
|
|
994
994
|
"form",
|
|
995
995
|
"checked",
|
|
996
996
|
"disabled",
|
|
997
997
|
"value"
|
|
998
|
-
],
|
|
998
|
+
], ht = { key: 1 }, gt = /* @__PURE__ */ s({
|
|
999
999
|
name: "DBCustomSelectListItem",
|
|
1000
1000
|
__name: "custom-select-list-item",
|
|
1001
1001
|
props: {
|
|
@@ -1039,50 +1039,50 @@ var x = () => {
|
|
|
1039
1039
|
},
|
|
1040
1040
|
emits: ["update:checked"],
|
|
1041
1041
|
setup(t, { emit: n }) {
|
|
1042
|
-
let o = n, s = t, l =
|
|
1043
|
-
|
|
1042
|
+
let o = n, s = t, l = f(!1), u = f(null);
|
|
1043
|
+
v(() => [s.isGroupTitle, s.showDivider], () => {
|
|
1044
1044
|
l.value = !!(s.isGroupTitle || s.showDivider);
|
|
1045
1045
|
}, {
|
|
1046
1046
|
immediate: !0,
|
|
1047
1047
|
flush: "post"
|
|
1048
1048
|
});
|
|
1049
|
-
function
|
|
1050
|
-
e.stopPropagation(), s.onChange && s.onChange(e),
|
|
1049
|
+
function p(e) {
|
|
1050
|
+
e.stopPropagation(), s.onChange && s.onChange(e), Q(o, e, "checked");
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1053
|
-
if (!(s.isGroupTitle || s.type === "checkbox")) return
|
|
1052
|
+
function _() {
|
|
1053
|
+
if (!(s.isGroupTitle || s.type === "checkbox")) return k(s.checked, "checked") ? "check" : "x_placeholder";
|
|
1054
1054
|
}
|
|
1055
|
-
return (n, o) => (
|
|
1055
|
+
return (n, o) => (d(), r("li", {
|
|
1056
1056
|
ref_key: "_ref",
|
|
1057
1057
|
ref: u,
|
|
1058
1058
|
id: t.id ?? t.propOverrides?.id,
|
|
1059
|
-
class: c(
|
|
1059
|
+
class: c(g(S)("db-custom-select-list-item", s.class, {
|
|
1060
1060
|
"db-checkbox": t.type === "checkbox" && !t.isGroupTitle,
|
|
1061
1061
|
"db-radio": t.type !== "checkbox" && !t.isGroupTitle
|
|
1062
1062
|
})),
|
|
1063
|
-
"data-divider":
|
|
1064
|
-
}, [t.isGroupTitle ? (
|
|
1063
|
+
"data-divider": g(O)(l.value)
|
|
1064
|
+
}, [t.isGroupTitle ? (d(), r("span", ht, h(t.groupTitle), 1)) : (d(), r("label", {
|
|
1065
1065
|
key: 0,
|
|
1066
1066
|
"data-icon": t.type !== "checkbox" && t.icon ? t.icon : void 0,
|
|
1067
|
-
"data-show-icon":
|
|
1068
|
-
"data-icon-trailing":
|
|
1067
|
+
"data-show-icon": g(O)(t.showIcon),
|
|
1068
|
+
"data-icon-trailing": _()
|
|
1069
1069
|
}, [i("input", {
|
|
1070
1070
|
class: "db-custom-select-list-item-checkbox",
|
|
1071
1071
|
"data-disable-focus": "true",
|
|
1072
1072
|
type: t.type,
|
|
1073
1073
|
name: t.name,
|
|
1074
1074
|
form: t.name,
|
|
1075
|
-
checked:
|
|
1076
|
-
disabled:
|
|
1075
|
+
checked: g(k)(t.checked, "checked"),
|
|
1076
|
+
disabled: g(k)(t.disabled, "disabled"),
|
|
1077
1077
|
value: t.value,
|
|
1078
|
-
onChange: o[0] ||= async (e) =>
|
|
1079
|
-
}, null, 40,
|
|
1078
|
+
onChange: o[0] ||= async (e) => p(e)
|
|
1079
|
+
}, null, 40, mt), t.label ? (d(), r(e, { key: 0 }, [a(h(t.label), 1)], 64)) : m(n.$slots, "default", { key: 1 })], 8, pt))], 10, ft));
|
|
1080
1080
|
}
|
|
1081
|
-
}),
|
|
1081
|
+
}), _t = [
|
|
1082
1082
|
"role",
|
|
1083
1083
|
"aria-label",
|
|
1084
1084
|
"id"
|
|
1085
|
-
],
|
|
1085
|
+
], vt = /* @__PURE__ */ s({
|
|
1086
1086
|
name: "DBCustomSelectList",
|
|
1087
1087
|
__name: "custom-select-list",
|
|
1088
1088
|
props: {
|
|
@@ -1099,17 +1099,17 @@ var x = () => {
|
|
|
1099
1099
|
propOverrides: { default: void 0 }
|
|
1100
1100
|
},
|
|
1101
1101
|
setup(e) {
|
|
1102
|
-
let t = e, n =
|
|
1103
|
-
return (a, o) => (
|
|
1102
|
+
let t = e, n = f(null);
|
|
1103
|
+
return (a, o) => (d(), r("div", {
|
|
1104
1104
|
role: e.multiple ? "group" : "radiogroup",
|
|
1105
1105
|
"aria-label": e.label,
|
|
1106
1106
|
ref_key: "_ref",
|
|
1107
1107
|
ref: n,
|
|
1108
1108
|
id: e.id ?? e.propOverrides?.id,
|
|
1109
|
-
class: c(
|
|
1110
|
-
}, [i("ul", null, [
|
|
1109
|
+
class: c(g(S)("db-custom-select-list", t.class))
|
|
1110
|
+
}, [i("ul", null, [m(a.$slots, "default")])], 10, _t));
|
|
1111
1111
|
}
|
|
1112
|
-
}),
|
|
1112
|
+
}), yt = [
|
|
1113
1113
|
"data-variant",
|
|
1114
1114
|
"data-hide-label",
|
|
1115
1115
|
"data-show-icon",
|
|
@@ -1117,10 +1117,10 @@ var x = () => {
|
|
|
1117
1117
|
"data-icon-trailing",
|
|
1118
1118
|
"data-hide-asterisk",
|
|
1119
1119
|
"data-show-icon-trailing"
|
|
1120
|
-
],
|
|
1120
|
+
], bt = ["for"], xt = /* @__PURE__ */ "aria-invalid.data-custom-validity.data-field-sizing.id.name.type.multiple.accept.placeholder.disabled.required.step.value.maxLength.minLength.max.min.readOnly.form.pattern.size.autoComplete.autoFocus.enterKeyHint.inputMode.list.aria-describedby.role".split("."), St = ["id"], Ct = ["value"], wt = {
|
|
1121
1121
|
"data-visually-hidden": "true",
|
|
1122
1122
|
role: "status"
|
|
1123
|
-
},
|
|
1123
|
+
}, Tt = /* @__PURE__ */ s({
|
|
1124
1124
|
name: "DBInput",
|
|
1125
1125
|
__name: "input",
|
|
1126
1126
|
props: {
|
|
@@ -1237,121 +1237,121 @@ var x = () => {
|
|
|
1237
1237
|
size: { default: void 0 }
|
|
1238
1238
|
},
|
|
1239
1239
|
emits: ["update:value"],
|
|
1240
|
-
setup(s, { emit:
|
|
1241
|
-
let x =
|
|
1240
|
+
setup(s, { emit: b }) {
|
|
1241
|
+
let x = _(), w = b, N = s, I = f(void 0), L = f(void 0), R = f(void 0), z = f(void 0), B = f(void 0), V = f(void 0), H = f(void 0), ee = f(""), U = f(""), te = f(void 0), W = f(null);
|
|
1242
1242
|
l(() => {
|
|
1243
|
-
|
|
1243
|
+
le(), B.value = N.invalidMessage || "TODO: Add an invalidMessage";
|
|
1244
1244
|
}), u(() => {
|
|
1245
|
-
|
|
1246
|
-
}),
|
|
1247
|
-
(
|
|
1245
|
+
te.value?.abort();
|
|
1246
|
+
}), v(() => [N.id, N.propOverrides?.id], () => {
|
|
1247
|
+
(N.id ?? N.propOverrides?.id) && le();
|
|
1248
1248
|
}, {
|
|
1249
1249
|
immediate: !0,
|
|
1250
1250
|
flush: "post"
|
|
1251
|
-
}),
|
|
1252
|
-
B.value =
|
|
1251
|
+
}), v(() => [W.value, N.invalidMessage], () => {
|
|
1252
|
+
B.value = N.invalidMessage || W.value?.validationMessage || "TODO: Add an invalidMessage";
|
|
1253
1253
|
}, {
|
|
1254
1254
|
immediate: !0,
|
|
1255
1255
|
flush: "post"
|
|
1256
|
-
}),
|
|
1257
|
-
if (
|
|
1258
|
-
let e =
|
|
1259
|
-
L.value = e, R.value =
|
|
1256
|
+
}), v(() => [I.value], () => {
|
|
1257
|
+
if (I.value) {
|
|
1258
|
+
let e = I.value + K;
|
|
1259
|
+
L.value = e, R.value = I.value + q, z.value = I.value + J, V.value = N.dataListId ?? I.value + "-datalist", F(N.message, N.showMessage) && (H.value = e), re();
|
|
1260
1260
|
}
|
|
1261
1261
|
}, {
|
|
1262
1262
|
immediate: !0,
|
|
1263
1263
|
flush: "post"
|
|
1264
|
-
}),
|
|
1265
|
-
|
|
1264
|
+
}), v(() => [N.value], () => {
|
|
1265
|
+
ee.value = N.value;
|
|
1266
1266
|
}, {
|
|
1267
1267
|
immediate: !0,
|
|
1268
1268
|
flush: "post"
|
|
1269
|
-
}),
|
|
1270
|
-
if (
|
|
1271
|
-
let e =
|
|
1272
|
-
e || (e = new AbortController(),
|
|
1273
|
-
value:
|
|
1269
|
+
}), v(() => [W.value], () => {
|
|
1270
|
+
if (W.value) {
|
|
1271
|
+
let e = te.value;
|
|
1272
|
+
e || (e = new AbortController(), te.value = e), Ge(W.value, {
|
|
1273
|
+
value: N.value,
|
|
1274
1274
|
defaultValue: void 0
|
|
1275
1275
|
}, (e) => {
|
|
1276
|
-
|
|
1276
|
+
ie(e, !0), G(e, !0);
|
|
1277
1277
|
}, e.signal);
|
|
1278
1278
|
}
|
|
1279
1279
|
}, {
|
|
1280
1280
|
immediate: !0,
|
|
1281
1281
|
flush: "post"
|
|
1282
1282
|
});
|
|
1283
|
-
function
|
|
1284
|
-
return !!(
|
|
1283
|
+
function ne() {
|
|
1284
|
+
return !!(N.validMessage ?? N.validation === "valid");
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1287
|
-
!
|
|
1286
|
+
function re() {
|
|
1287
|
+
!W.value?.validity.valid || N.validation === "invalid" ? (H.value = z.value, B.value = N.invalidMessage || W.value?.validationMessage || "TODO: Add an invalidMessage", T() && (U.value = B.value, D(() => U.value = "", 1e3))) : ne() && W.value?.validity.valid && (N.required || N.minLength || N.maxLength || N.pattern) ? (H.value = R.value, T() && (U.value = N.validMessage ?? "TODO: Add a validMessage", D(() => U.value = "", 1e3))) : F(N.message, N.showMessage) ? H.value = L.value : H.value = void 0;
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1290
|
-
|
|
1289
|
+
function G(e, t) {
|
|
1290
|
+
N.input && N.input(e), ee.value = e.target.value, N.onInput && N.onInput(e), Q(w, e), re();
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1293
|
-
|
|
1292
|
+
function ie(e, t) {
|
|
1293
|
+
N.onChange && N.onChange(e), Q(w, e), re();
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1296
|
-
|
|
1295
|
+
function ae(e) {
|
|
1296
|
+
N.onBlur && N.onBlur(e);
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1299
|
-
|
|
1298
|
+
function oe(e) {
|
|
1299
|
+
N.onFocus && N.onFocus(e);
|
|
1300
1300
|
}
|
|
1301
|
-
function
|
|
1302
|
-
let e =
|
|
1303
|
-
return Array.from((
|
|
1301
|
+
function se() {
|
|
1302
|
+
let e = N.dataList;
|
|
1303
|
+
return Array.from((C(e) ? e?.map((e) => ({
|
|
1304
1304
|
value: e,
|
|
1305
1305
|
label: void 0
|
|
1306
1306
|
})) : e) || []);
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1309
|
-
let e =
|
|
1310
|
-
|
|
1308
|
+
function le() {
|
|
1309
|
+
let e = N.id ?? N.propOverrides?.id ?? `input-${x}`;
|
|
1310
|
+
I.value = e, L.value = e + K, R.value = e + q, z.value = e + J, V.value = e + ce;
|
|
1311
1311
|
}
|
|
1312
|
-
return (l, u) => (
|
|
1313
|
-
class: c(
|
|
1312
|
+
return (l, u) => (d(), r("div", {
|
|
1313
|
+
class: c(g(S)("db-input", N.class)),
|
|
1314
1314
|
"data-variant": s.variant,
|
|
1315
|
-
"data-hide-label":
|
|
1316
|
-
"data-show-icon":
|
|
1315
|
+
"data-hide-label": g(P)(s.showLabel),
|
|
1316
|
+
"data-show-icon": g(O)(s.showIconLeading ?? s.showIcon),
|
|
1317
1317
|
"data-icon": s.iconLeading ?? s.icon,
|
|
1318
1318
|
"data-icon-trailing": s.iconTrailing,
|
|
1319
|
-
"data-hide-asterisk":
|
|
1320
|
-
"data-show-icon-trailing":
|
|
1319
|
+
"data-hide-asterisk": g(P)(s.showRequiredAsterisk),
|
|
1320
|
+
"data-show-icon-trailing": g(O)(s.showIconTrailing)
|
|
1321
1321
|
}, [
|
|
1322
|
-
i("label", { for:
|
|
1322
|
+
i("label", { for: I.value }, h(s.label ?? g("LABEL SHOULD BE SET")), 9, bt),
|
|
1323
1323
|
i("input", {
|
|
1324
1324
|
"aria-invalid": s.validation === "invalid",
|
|
1325
1325
|
"data-custom-validity": s.validation,
|
|
1326
1326
|
"data-field-sizing": s.fieldSizing,
|
|
1327
1327
|
ref_key: "_ref",
|
|
1328
|
-
ref:
|
|
1329
|
-
id:
|
|
1328
|
+
ref: W,
|
|
1329
|
+
id: I.value,
|
|
1330
1330
|
name: s.name,
|
|
1331
1331
|
type: s.type || "text",
|
|
1332
|
-
multiple:
|
|
1332
|
+
multiple: g(k)(s.multiple, "multiple"),
|
|
1333
1333
|
accept: s.accept,
|
|
1334
|
-
placeholder: s.placeholder ??
|
|
1335
|
-
disabled:
|
|
1336
|
-
required:
|
|
1337
|
-
step:
|
|
1338
|
-
value: s.value ??
|
|
1339
|
-
maxLength:
|
|
1340
|
-
minLength:
|
|
1341
|
-
max:
|
|
1342
|
-
min:
|
|
1343
|
-
readOnly:
|
|
1334
|
+
placeholder: s.placeholder ?? g(" "),
|
|
1335
|
+
disabled: g(k)(s.disabled, "disabled"),
|
|
1336
|
+
required: g(k)(s.required, "required"),
|
|
1337
|
+
step: g(j)(s.step),
|
|
1338
|
+
value: s.value ?? ee.value ?? "",
|
|
1339
|
+
maxLength: g(A)(s.maxLength, s.maxlength),
|
|
1340
|
+
minLength: g(A)(s.minLength, s.minlength),
|
|
1341
|
+
max: g(M)(s.max, s.type),
|
|
1342
|
+
min: g(M)(s.min, s.type),
|
|
1343
|
+
readOnly: g(k)(s.readOnly, "readOnly") || g(k)(s.readonly, "readonly"),
|
|
1344
1344
|
form: s.form,
|
|
1345
1345
|
pattern: s.pattern,
|
|
1346
1346
|
size: s.size,
|
|
1347
1347
|
autoComplete: s.autocomplete,
|
|
1348
|
-
autoFocus:
|
|
1348
|
+
autoFocus: g(k)(s.autofocus, "autofocus"),
|
|
1349
1349
|
enterKeyHint: s.enterkeyhint,
|
|
1350
1350
|
inputMode: s.inputmode,
|
|
1351
|
-
onInput: u[0] ||= async (e) =>
|
|
1352
|
-
onChange: u[1] ||= async (e) =>
|
|
1353
|
-
onBlur: u[2] ||= async (e) =>
|
|
1354
|
-
onFocus: u[3] ||= async (e) =>
|
|
1351
|
+
onInput: u[0] ||= async (e) => G(e),
|
|
1352
|
+
onChange: u[1] ||= async (e) => ie(e),
|
|
1353
|
+
onBlur: u[2] ||= async (e) => ae(e),
|
|
1354
|
+
onFocus: u[3] ||= async (e) => oe(e),
|
|
1355
1355
|
list: s.dataList && V.value,
|
|
1356
1356
|
"aria-describedby": s.ariaDescribedBy ?? H.value,
|
|
1357
1357
|
role: [
|
|
@@ -1361,36 +1361,36 @@ var x = () => {
|
|
|
1361
1361
|
"week",
|
|
1362
1362
|
"month",
|
|
1363
1363
|
"color"
|
|
1364
|
-
].includes(s.type ?? "") &&
|
|
1365
|
-
}, null, 40,
|
|
1366
|
-
s.dataList ? (
|
|
1364
|
+
].includes(s.type ?? "") && g(E)() ? "textbox" : void 0
|
|
1365
|
+
}, null, 40, xt),
|
|
1366
|
+
s.dataList ? (d(), r("datalist", {
|
|
1367
1367
|
key: 0,
|
|
1368
1368
|
id: V.value
|
|
1369
|
-
}, [(
|
|
1369
|
+
}, [(d(!0), r(e, null, p(se(), (e) => (d(), r("option", {
|
|
1370
1370
|
key: V.value + "-option-" + e.value,
|
|
1371
1371
|
value: e.value
|
|
1372
|
-
},
|
|
1373
|
-
|
|
1374
|
-
|
|
1372
|
+
}, h(e.label), 9, Ct))), 128))], 8, St)) : n("", !0),
|
|
1373
|
+
m(l.$slots, "default"),
|
|
1374
|
+
g(F)(s.message, s.showMessage) ? (d(), t($, {
|
|
1375
1375
|
key: 1,
|
|
1376
1376
|
size: s.messageSize || "small",
|
|
1377
1377
|
icon: s.messageIcon,
|
|
1378
1378
|
id: L.value
|
|
1379
1379
|
}, {
|
|
1380
|
-
default:
|
|
1380
|
+
default: y(() => [a(h(s.message), 1)]),
|
|
1381
1381
|
_: 1
|
|
1382
1382
|
}, 8, [
|
|
1383
1383
|
"size",
|
|
1384
1384
|
"icon",
|
|
1385
1385
|
"id"
|
|
1386
1386
|
])) : n("", !0),
|
|
1387
|
-
|
|
1387
|
+
ne() ? (d(), t($, {
|
|
1388
1388
|
key: 2,
|
|
1389
1389
|
semantic: "successful",
|
|
1390
1390
|
id: R.value,
|
|
1391
1391
|
size: s.validMessageSize || "small"
|
|
1392
1392
|
}, {
|
|
1393
|
-
default:
|
|
1393
|
+
default: y(() => [a(h(s.validMessage || g("TODO: Add a validMessage")), 1)]),
|
|
1394
1394
|
_: 1
|
|
1395
1395
|
}, 8, ["id", "size"])) : n("", !0),
|
|
1396
1396
|
o($, {
|
|
@@ -1398,13 +1398,13 @@ var x = () => {
|
|
|
1398
1398
|
id: z.value,
|
|
1399
1399
|
size: s.invalidMessageSize || "small"
|
|
1400
1400
|
}, {
|
|
1401
|
-
default:
|
|
1401
|
+
default: y(() => [a(h(B.value), 1)]),
|
|
1402
1402
|
_: 1
|
|
1403
1403
|
}, 8, ["id", "size"]),
|
|
1404
|
-
i("span",
|
|
1405
|
-
], 10,
|
|
1404
|
+
i("span", wt, h(U.value), 1)
|
|
1405
|
+
], 10, yt));
|
|
1406
1406
|
}
|
|
1407
|
-
}),
|
|
1407
|
+
}), Et = [
|
|
1408
1408
|
"id",
|
|
1409
1409
|
"data-emphasis",
|
|
1410
1410
|
"data-wrap",
|
|
@@ -1413,7 +1413,7 @@ var x = () => {
|
|
|
1413
1413
|
"data-width",
|
|
1414
1414
|
"data-show-arrow",
|
|
1415
1415
|
"data-placement"
|
|
1416
|
-
],
|
|
1416
|
+
], Dt = /* @__PURE__ */ s({
|
|
1417
1417
|
name: "DBTooltip",
|
|
1418
1418
|
__name: "tooltip",
|
|
1419
1419
|
props: {
|
|
@@ -1442,80 +1442,80 @@ var x = () => {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
},
|
|
1444
1444
|
setup(e) {
|
|
1445
|
-
let t =
|
|
1445
|
+
let t = _(), n = e, i = f(ne), a = f(!1), o = f(void 0), s = f(void 0), u = f(null);
|
|
1446
1446
|
l(() => {
|
|
1447
1447
|
T(), a.value = !0;
|
|
1448
|
-
}),
|
|
1448
|
+
}), v(() => [n.id, n.propOverrides?.id], () => {
|
|
1449
1449
|
(n.id ?? n.propOverrides?.id) && T();
|
|
1450
1450
|
}, {
|
|
1451
1451
|
immediate: !0,
|
|
1452
1452
|
flush: "post"
|
|
1453
|
-
}),
|
|
1453
|
+
}), v(() => [
|
|
1454
1454
|
u.value,
|
|
1455
1455
|
a.value,
|
|
1456
1456
|
i.value
|
|
1457
1457
|
], () => {
|
|
1458
1458
|
if (u.value && a.value && i.value) {
|
|
1459
|
-
let e =
|
|
1459
|
+
let e = y();
|
|
1460
1460
|
e && (b(e), ["mouseenter", "focusin"].forEach((t) => {
|
|
1461
1461
|
e.addEventListener(t, () => w(e));
|
|
1462
|
-
}), e.addEventListener("keydown", (e) =>
|
|
1463
|
-
e.addEventListener(t, () =>
|
|
1462
|
+
}), e.addEventListener("keydown", (e) => h(e)), ["mouseleave", "focusout"].forEach((t) => {
|
|
1463
|
+
e.addEventListener(t, () => C());
|
|
1464
1464
|
}), e.dataset.hasTooltip = "true", n.variant === "label" ? e.setAttribute("aria-labelledby", i.value) : e.setAttribute("aria-describedby", i.value)), typeof window < "u" && "IntersectionObserver" in window && (s.value = new IntersectionObserver((e) => {
|
|
1465
|
-
let t = e.find(({ target: e }) => e ===
|
|
1466
|
-
t && !t.isIntersecting &&
|
|
1465
|
+
let t = e.find(({ target: e }) => e === y());
|
|
1466
|
+
t && !t.isIntersecting && h(!1);
|
|
1467
1467
|
})), a.value = !1;
|
|
1468
1468
|
}
|
|
1469
1469
|
}, {
|
|
1470
1470
|
immediate: !0,
|
|
1471
1471
|
flush: "post"
|
|
1472
1472
|
});
|
|
1473
|
-
function
|
|
1473
|
+
function p(e) {
|
|
1474
1474
|
e.stopPropagation();
|
|
1475
1475
|
}
|
|
1476
|
-
function
|
|
1477
|
-
(!e || e.key === "Escape") && u.value && getComputedStyle(u.value).visibility === "visible" &&
|
|
1476
|
+
function h(e) {
|
|
1477
|
+
(!e || e.key === "Escape") && u.value && getComputedStyle(u.value).visibility === "visible" && y().blur();
|
|
1478
1478
|
}
|
|
1479
|
-
function
|
|
1479
|
+
function y() {
|
|
1480
1480
|
let e = u.value.parentElement;
|
|
1481
1481
|
return e && e.localName.includes("tooltip") && (e = e.parentElement), e;
|
|
1482
1482
|
}
|
|
1483
1483
|
function b(e) {
|
|
1484
|
-
e && u.value &&
|
|
1485
|
-
u.value &&
|
|
1484
|
+
e && u.value && D(() => {
|
|
1485
|
+
u.value && lt(u.value, e, n.placement ?? "bottom");
|
|
1486
1486
|
}, 1);
|
|
1487
1487
|
}
|
|
1488
1488
|
function x(e, t) {
|
|
1489
1489
|
e?.target?.contains && e?.target?.contains(u.value) && b(t);
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1492
|
-
o.value && new
|
|
1491
|
+
function C() {
|
|
1492
|
+
o.value && new tt().removeCallback(o.value), s.value?.unobserve(y());
|
|
1493
1493
|
}
|
|
1494
1494
|
function w(e) {
|
|
1495
|
-
o.value = new
|
|
1495
|
+
o.value = new tt().addCallback((t) => x(t, e)), b(e), s.value?.observe(y());
|
|
1496
1496
|
}
|
|
1497
1497
|
function T() {
|
|
1498
1498
|
i.value = n.id ?? n.propOverrides?.id ?? "tooltip-" + t;
|
|
1499
1499
|
}
|
|
1500
|
-
return (t, a) => (
|
|
1500
|
+
return (t, a) => (d(), r("i", {
|
|
1501
1501
|
role: "tooltip",
|
|
1502
1502
|
"aria-hidden": "true",
|
|
1503
1503
|
"data-gap": "true",
|
|
1504
1504
|
ref_key: "_ref",
|
|
1505
1505
|
ref: u,
|
|
1506
|
-
class: c(
|
|
1506
|
+
class: c(g(S)("db-tooltip", n.class)),
|
|
1507
1507
|
id: i.value,
|
|
1508
1508
|
"data-emphasis": e.emphasis,
|
|
1509
|
-
"data-wrap":
|
|
1510
|
-
"data-animation":
|
|
1509
|
+
"data-wrap": g(O)(e.wrap),
|
|
1510
|
+
"data-animation": g(O)(e.animation ?? !0),
|
|
1511
1511
|
"data-delay": e.delay,
|
|
1512
1512
|
"data-width": e.width,
|
|
1513
|
-
"data-show-arrow":
|
|
1513
|
+
"data-show-arrow": g(O)(e.showArrow ?? !0),
|
|
1514
1514
|
"data-placement": e.placement,
|
|
1515
|
-
onClick: a[0] ||= async (e) =>
|
|
1516
|
-
}, [
|
|
1515
|
+
onClick: a[0] ||= async (e) => p(e)
|
|
1516
|
+
}, [m(t.$slots, "default")], 10, Et));
|
|
1517
1517
|
}
|
|
1518
|
-
}),
|
|
1518
|
+
}), Ot = [
|
|
1519
1519
|
"id",
|
|
1520
1520
|
"data-semantic",
|
|
1521
1521
|
"data-emphasis",
|
|
@@ -1524,7 +1524,7 @@ var x = () => {
|
|
|
1524
1524
|
"data-show-icon",
|
|
1525
1525
|
"data-no-text",
|
|
1526
1526
|
"data-overflow"
|
|
1527
|
-
],
|
|
1527
|
+
], kt = /* @__PURE__ */ s({
|
|
1528
1528
|
name: "DBTag",
|
|
1529
1529
|
__name: "tag",
|
|
1530
1530
|
props: {
|
|
@@ -1565,30 +1565,30 @@ var x = () => {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
},
|
|
1567
1567
|
setup(t) {
|
|
1568
|
-
let i = t, s =
|
|
1568
|
+
let i = t, s = f(null);
|
|
1569
1569
|
function l(e) {
|
|
1570
1570
|
e && (e.stopPropagation(), i.onRemove && i.onRemove(e));
|
|
1571
1571
|
}
|
|
1572
1572
|
function u() {
|
|
1573
1573
|
return i.removeButton ? i.removeButton : ue;
|
|
1574
1574
|
}
|
|
1575
|
-
return (
|
|
1575
|
+
return (f, p) => (d(), r("div", {
|
|
1576
1576
|
ref_key: "_ref",
|
|
1577
1577
|
ref: s,
|
|
1578
1578
|
id: t.id ?? t.propOverrides?.id,
|
|
1579
|
-
class: c(
|
|
1579
|
+
class: c(g(S)("db-tag", i.class)),
|
|
1580
1580
|
"data-semantic": t.semantic,
|
|
1581
1581
|
"data-emphasis": t.emphasis,
|
|
1582
1582
|
"data-icon": t.icon,
|
|
1583
|
-
"data-show-check-state":
|
|
1584
|
-
"data-show-icon":
|
|
1585
|
-
"data-no-text":
|
|
1586
|
-
"data-overflow":
|
|
1583
|
+
"data-show-check-state": g(O)(t.showCheckState ?? !0),
|
|
1584
|
+
"data-show-icon": g(O)(t.showIcon),
|
|
1585
|
+
"data-no-text": g(O)(t.noText),
|
|
1586
|
+
"data-overflow": g(O)(t.overflow)
|
|
1587
1587
|
}, [
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
t.text ? (
|
|
1591
|
-
t.behavior === "removable" ? (
|
|
1588
|
+
m(f.$slots, "content"),
|
|
1589
|
+
m(f.$slots, "default"),
|
|
1590
|
+
t.text ? (d(), r(e, { key: 0 }, [a(h(t.text), 1)], 64)) : n("", !0),
|
|
1591
|
+
t.behavior === "removable" ? (d(), r("button", {
|
|
1592
1592
|
key: 1,
|
|
1593
1593
|
class: "db-button db-tab-remove-button",
|
|
1594
1594
|
"data-icon": "cross",
|
|
@@ -1597,13 +1597,13 @@ var x = () => {
|
|
|
1597
1597
|
"data-variant": "ghost",
|
|
1598
1598
|
type: "button",
|
|
1599
1599
|
onClick: p[0] ||= async (e) => l(e)
|
|
1600
|
-
}, [o(
|
|
1601
|
-
default:
|
|
1600
|
+
}, [o(Dt, { variant: "label" }, {
|
|
1601
|
+
default: y(() => [a(h(u()), 1)]),
|
|
1602
1602
|
_: 1
|
|
1603
1603
|
})])) : n("", !0)
|
|
1604
|
-
], 10,
|
|
1604
|
+
], 10, Ot));
|
|
1605
1605
|
}
|
|
1606
|
-
}),
|
|
1606
|
+
}), At = [
|
|
1607
1607
|
"id",
|
|
1608
1608
|
"aria-invalid",
|
|
1609
1609
|
"data-custom-validity",
|
|
@@ -1616,7 +1616,7 @@ var x = () => {
|
|
|
1616
1616
|
"data-hide-label",
|
|
1617
1617
|
"data-icon",
|
|
1618
1618
|
"data-show-icon"
|
|
1619
|
-
],
|
|
1619
|
+
], jt = ["id"], Mt = [
|
|
1620
1620
|
"id",
|
|
1621
1621
|
"form",
|
|
1622
1622
|
"name",
|
|
@@ -1624,18 +1624,18 @@ var x = () => {
|
|
|
1624
1624
|
"multiple",
|
|
1625
1625
|
"disabled",
|
|
1626
1626
|
"required"
|
|
1627
|
-
],
|
|
1627
|
+
], Nt = ["disabled", "value"], Pt = ["open"], Ft = [
|
|
1628
1628
|
"id",
|
|
1629
1629
|
"aria-disabled",
|
|
1630
1630
|
"tabIndex",
|
|
1631
1631
|
"aria-labelledby"
|
|
1632
|
-
],
|
|
1632
|
+
], It = ["data-visually-hidden", "id"], Lt = {
|
|
1633
1633
|
key: 0,
|
|
1634
1634
|
"data-visually-hidden": "true"
|
|
1635
|
-
},
|
|
1635
|
+
}, Rt = { key: 1 }, zt = { key: 0 }, Bt = { key: 0 }, Vt = { class: "db-checkbox db-custom-select-list-item" }, Ht = ["form", "checked"], Ut = ["aria-hidden", "id"], Wt = {
|
|
1636
1636
|
"data-visually-hidden": "true",
|
|
1637
1637
|
role: "status"
|
|
1638
|
-
},
|
|
1638
|
+
}, Gt = /* @__PURE__ */ s({
|
|
1639
1639
|
name: "DBCustomSelect",
|
|
1640
1640
|
__name: "custom-select",
|
|
1641
1641
|
props: {
|
|
@@ -1759,204 +1759,204 @@ var x = () => {
|
|
|
1759
1759
|
}
|
|
1760
1760
|
},
|
|
1761
1761
|
emits: ["update:values"],
|
|
1762
|
-
setup(s, { emit:
|
|
1763
|
-
let x =
|
|
1762
|
+
setup(s, { emit: b }) {
|
|
1763
|
+
let x = _(), C = b, w = s, E = f(void 0), A = f(void 0), j = f(void 0), M = f(void 0), N = f(void 0), L = f(void 0), R = f(void 0), z = f(void 0), B = f(void 0), V = f(void 0), H = f("no-validation"), ee = f(!1), U = f(void 0), te = f(void 0), W = f(""), ne = f(void 0), re = f(""), G = f([]), ie = f(!1), ce = f(!1), le = f(0), Y = f([]), de = f([]), pe = f(!1), me = f(void 0), he = f(0), ge = f(void 0), _e = f(void 0), ve = f(void 0), ye = f(!1), be = f(!1), xe = f(null), X = f(null), Z = f(null), Se = f(null), Ce = f(null);
|
|
1764
1764
|
l(() => {
|
|
1765
|
-
Xe(), N.value = w.invalidMessage || "TODO: Add an invalidMessage", typeof window < "u" && "IntersectionObserver" in window && (
|
|
1766
|
-
if (
|
|
1767
|
-
let t = e.find(({ target: e }) => e ===
|
|
1768
|
-
t && !t.isIntersecting &&
|
|
1765
|
+
Xe(), N.value = w.invalidMessage || "TODO: Add an invalidMessage", typeof window < "u" && "IntersectionObserver" in window && (_e.value = new IntersectionObserver((e) => {
|
|
1766
|
+
if (X.value) {
|
|
1767
|
+
let t = e.find(({ target: e }) => e === X.value);
|
|
1768
|
+
t && !t.isIntersecting && X.value.open && (X.value.open = !1);
|
|
1769
1769
|
}
|
|
1770
1770
|
}));
|
|
1771
1771
|
}), u(() => {
|
|
1772
|
-
|
|
1773
|
-
}),
|
|
1772
|
+
U.value?.abort();
|
|
1773
|
+
}), v(() => [w.id, w.propOverrides?.id], () => {
|
|
1774
1774
|
(w.id ?? w.propOverrides?.id) && Xe();
|
|
1775
1775
|
}, {
|
|
1776
1776
|
immediate: !0,
|
|
1777
1777
|
flush: "post"
|
|
1778
|
-
}),
|
|
1779
|
-
|
|
1778
|
+
}), v(() => [X.value], () => {
|
|
1779
|
+
X.value && X.value.addEventListener("focusout", (e) => ze(e));
|
|
1780
1780
|
}, {
|
|
1781
1781
|
immediate: !0,
|
|
1782
1782
|
flush: "post"
|
|
1783
|
-
}),
|
|
1784
|
-
if (
|
|
1785
|
-
let e =
|
|
1786
|
-
R.value =
|
|
1783
|
+
}), v(() => [E.value], () => {
|
|
1784
|
+
if (E.value) {
|
|
1785
|
+
let e = E.value + K;
|
|
1786
|
+
R.value = E.value + ae, L.value = E.value + oe, j.value = E.value + q, M.value = E.value + J, B.value = E.value + se, F(w.message, w.showMessage) ? ke(e) : ke();
|
|
1787
1787
|
}
|
|
1788
1788
|
}, {
|
|
1789
1789
|
immediate: !0,
|
|
1790
1790
|
flush: "post"
|
|
1791
|
-
}),
|
|
1792
|
-
if (
|
|
1793
|
-
let e =
|
|
1794
|
-
e && e.setAttribute("aria-describedby", w.ariaDescribedBy ?? (
|
|
1791
|
+
}), v(() => [X.value, te.value], () => {
|
|
1792
|
+
if (X.value) {
|
|
1793
|
+
let e = X.value.querySelector("summary");
|
|
1794
|
+
e && e.setAttribute("aria-describedby", w.ariaDescribedBy ?? (te.value || ""));
|
|
1795
1795
|
}
|
|
1796
1796
|
}, {
|
|
1797
1797
|
immediate: !0,
|
|
1798
1798
|
flush: "post"
|
|
1799
|
-
}),
|
|
1799
|
+
}), v(() => [
|
|
1800
1800
|
w.showNoResults,
|
|
1801
1801
|
w.showLoading,
|
|
1802
|
-
|
|
1802
|
+
de.value
|
|
1803
1803
|
], () => {
|
|
1804
|
-
w.showNoResults === void 0 ?
|
|
1804
|
+
w.showNoResults === void 0 ? de.value && (pe.value = de.value.length === 0) : pe.value = w.showNoResults;
|
|
1805
1805
|
}, {
|
|
1806
1806
|
immediate: !0,
|
|
1807
1807
|
flush: "post"
|
|
1808
|
-
}),
|
|
1808
|
+
}), v(() => [
|
|
1809
1809
|
w.showSelectAll,
|
|
1810
|
-
|
|
1810
|
+
le.value,
|
|
1811
1811
|
w.multiple
|
|
1812
1812
|
], () => {
|
|
1813
|
-
|
|
1813
|
+
ie.value = !!(w.multiple && (w.showSelectAll ?? le.value > 5));
|
|
1814
1814
|
}, {
|
|
1815
1815
|
immediate: !0,
|
|
1816
1816
|
flush: "post"
|
|
1817
|
-
}),
|
|
1818
|
-
|
|
1817
|
+
}), v(() => [w.showSearch, le.value], () => {
|
|
1818
|
+
ce.value = w.showSearch ?? le.value > 9;
|
|
1819
1819
|
}, {
|
|
1820
1820
|
immediate: !0,
|
|
1821
1821
|
flush: "post"
|
|
1822
|
-
}),
|
|
1822
|
+
}), v(() => [w.values], () => {
|
|
1823
1823
|
let e = w.values;
|
|
1824
|
-
Array.isArray(e) ?
|
|
1824
|
+
Array.isArray(e) ? Y.value !== e && (Y.value = e) : e == null && Y.value?.length !== 0 && (Y.value = []);
|
|
1825
1825
|
}, {
|
|
1826
1826
|
immediate: !0,
|
|
1827
1827
|
flush: "post"
|
|
1828
|
-
}),
|
|
1829
|
-
|
|
1828
|
+
}), v(() => [Y.value, Z.value], () => {
|
|
1829
|
+
Z.value && Ee();
|
|
1830
1830
|
}, {
|
|
1831
1831
|
immediate: !0,
|
|
1832
1832
|
flush: "post"
|
|
1833
|
-
}),
|
|
1834
|
-
if (
|
|
1835
|
-
let e =
|
|
1836
|
-
e || (e = new AbortController(),
|
|
1833
|
+
}), v(() => [Z.value], () => {
|
|
1834
|
+
if (Z.value) {
|
|
1835
|
+
let e = U.value;
|
|
1836
|
+
e || (e = new AbortController(), U.value = e);
|
|
1837
1837
|
let t = w.values;
|
|
1838
|
-
|
|
1839
|
-
|
|
1838
|
+
Ue(Z.value, () => {
|
|
1839
|
+
Ve(t || (Z.value.value ? [Z.value.value] : [])), Ee();
|
|
1840
1840
|
}, e.signal);
|
|
1841
1841
|
}
|
|
1842
1842
|
}, {
|
|
1843
1843
|
immediate: !0,
|
|
1844
1844
|
flush: "post"
|
|
1845
|
-
}),
|
|
1845
|
+
}), v(() => [w.validation], () => {
|
|
1846
1846
|
H.value = w.validation;
|
|
1847
1847
|
}, {
|
|
1848
1848
|
immediate: !0,
|
|
1849
1849
|
flush: "post"
|
|
1850
|
-
}),
|
|
1851
|
-
|
|
1850
|
+
}), v(() => [Y.value, le.value], () => {
|
|
1851
|
+
Y.value?.length === 0 ? (ye.value = !1, be.value = !1) : Y.value?.length === le.value ? (be.value = !1, ye.value = !0) : Y.value && (be.value = !0);
|
|
1852
1852
|
}, {
|
|
1853
1853
|
immediate: !0,
|
|
1854
1854
|
flush: "post"
|
|
1855
|
-
}),
|
|
1856
|
-
|
|
1855
|
+
}), v(() => [w.options], () => {
|
|
1856
|
+
de.value = w.options, le.value = w.options?.filter((e) => !e.isGroupTitle).length ?? 0;
|
|
1857
1857
|
}, {
|
|
1858
1858
|
immediate: !0,
|
|
1859
1859
|
flush: "post"
|
|
1860
|
-
}),
|
|
1861
|
-
if (
|
|
1860
|
+
}), v(() => [w.searchValue], () => {
|
|
1861
|
+
if (ve.value = w.searchValue, w.searchValue) {
|
|
1862
1862
|
let e = w.searchValue;
|
|
1863
1863
|
qe(e);
|
|
1864
1864
|
}
|
|
1865
1865
|
}, {
|
|
1866
1866
|
immediate: !0,
|
|
1867
1867
|
flush: "post"
|
|
1868
|
-
}),
|
|
1869
|
-
w.options?.length && (
|
|
1868
|
+
}), v(() => [w.options, Y.value], () => {
|
|
1869
|
+
w.options?.length && (G.value = w.options?.filter((e) => !e.value || !Y.value?.includes ? !1 : !e.isGroupTitle && Y.value?.includes(e.value)));
|
|
1870
1870
|
}, {
|
|
1871
1871
|
immediate: !0,
|
|
1872
1872
|
flush: "post"
|
|
1873
|
-
}),
|
|
1874
|
-
|
|
1873
|
+
}), v(() => [
|
|
1874
|
+
G.value,
|
|
1875
1875
|
w.selectedType,
|
|
1876
1876
|
w.amountText,
|
|
1877
1877
|
w.selectedLabels,
|
|
1878
1878
|
w.transformSelectedLabels
|
|
1879
1879
|
], () => {
|
|
1880
1880
|
if (w.selectedLabels) {
|
|
1881
|
-
|
|
1881
|
+
W.value = w.selectedLabels;
|
|
1882
1882
|
return;
|
|
1883
1883
|
}
|
|
1884
|
-
if (
|
|
1884
|
+
if (G.value?.length) {
|
|
1885
1885
|
if (w.transformSelectedLabels) {
|
|
1886
|
-
let e =
|
|
1887
|
-
|
|
1886
|
+
let e = G.value, t = w.transformSelectedLabels;
|
|
1887
|
+
W.value = t(e);
|
|
1888
1888
|
return;
|
|
1889
1889
|
}
|
|
1890
|
-
w.selectedType === "amount" ?
|
|
1891
|
-
} else
|
|
1890
|
+
w.selectedType === "amount" ? W.value = w.amountText ? w.amountText : `${G.value?.length} ${fe}` : W.value = G.value?.map((e) => je(e)).join(", ");
|
|
1891
|
+
} else W.value = "";
|
|
1892
1892
|
}, {
|
|
1893
1893
|
immediate: !0,
|
|
1894
1894
|
flush: "post"
|
|
1895
|
-
}),
|
|
1896
|
-
w.onAmountChange && w.onAmountChange(
|
|
1895
|
+
}), v(() => [G.value], () => {
|
|
1896
|
+
w.onAmountChange && w.onAmountChange(G.value?.length ?? 0);
|
|
1897
1897
|
}, {
|
|
1898
1898
|
immediate: !0,
|
|
1899
1899
|
flush: "post"
|
|
1900
|
-
}),
|
|
1901
|
-
|
|
1900
|
+
}), v(() => [be.value, Se.value], () => {
|
|
1901
|
+
Se.value && (Se.value.indeterminate = !!be.value);
|
|
1902
1902
|
}, {
|
|
1903
1903
|
immediate: !0,
|
|
1904
1904
|
flush: "post"
|
|
1905
|
-
}),
|
|
1906
|
-
N.value = w.invalidMessage ||
|
|
1905
|
+
}), v(() => [Z.value, w.invalidMessage], () => {
|
|
1906
|
+
N.value = w.invalidMessage || Z.value?.validationMessage || "TODO: Add an invalidMessage";
|
|
1907
1907
|
}, {
|
|
1908
1908
|
immediate: !0,
|
|
1909
1909
|
flush: "post"
|
|
1910
1910
|
});
|
|
1911
|
-
function
|
|
1912
|
-
e?.target?.contains && e?.target?.contains(
|
|
1911
|
+
function we(e) {
|
|
1912
|
+
e?.target?.contains && e?.target?.contains(X.value) && Fe();
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function Te() {
|
|
1915
1915
|
return !!(w.validMessage ?? w.validation === "valid");
|
|
1916
1916
|
}
|
|
1917
|
-
function
|
|
1918
|
-
|
|
1917
|
+
function Ee() {
|
|
1918
|
+
Z.value && (Z.value.value = Oe()), !Z.value?.validity.valid || w.validation === "invalid" ? (ke(M.value), N.value = w.invalidMessage || Z.value?.validationMessage || "TODO: Add an invalidMessage", T() && (re.value = N.value, D(() => re.value = "", 1e3)), ee.value && (H.value = w.validation ?? "invalid")) : Te() && Z.value?.validity.valid && w.required ? (ke(j.value), T() && (re.value = w.validMessage ?? "TODO: Add a validMessage", D(() => re.value = "", 1e3)), H.value = w.validation ?? "valid") : F(w.message, w.showMessage) ? (ke(A.value), H.value = w.validation ?? "no-validation") : (ke(B.value), H.value = w.validation ?? "no-validation");
|
|
1919
1919
|
}
|
|
1920
|
-
function
|
|
1921
|
-
w.onDropdownToggle && (e.stopPropagation(), w.onDropdownToggle(e)), e.target instanceof HTMLDetailsElement && e.target.open ? (
|
|
1920
|
+
function De(e) {
|
|
1921
|
+
w.onDropdownToggle && (e.stopPropagation(), w.onDropdownToggle(e)), e.target instanceof HTMLDetailsElement && e.target.open ? (me.value = new et().addCallback((e) => Be(e)), ge.value = new tt().addCallback((e) => we(e)), Fe(), _e.value?.observe(X.value), e.target.dataset.test || Ke()) : (me.value && new et().removeCallback(me.value), ge.value && new tt().removeCallback(ge.value), _e.value?.unobserve(X.value));
|
|
1922
1922
|
}
|
|
1923
|
-
function
|
|
1924
|
-
return
|
|
1923
|
+
function Oe() {
|
|
1924
|
+
return Y.value?.length ? Y.value.at(0) ?? "" : "";
|
|
1925
1925
|
}
|
|
1926
|
-
function
|
|
1926
|
+
function ke(e) {
|
|
1927
1927
|
let t = [];
|
|
1928
|
-
e && t.push(e),
|
|
1928
|
+
e && t.push(e), ne.value && W.value?.length && t.push(ne.value), te.value = t.join(" ");
|
|
1929
1929
|
}
|
|
1930
|
-
function
|
|
1930
|
+
function Ae() {
|
|
1931
1931
|
return w.selectAllLabel ?? "LABEL SHOULD BE SET";
|
|
1932
1932
|
}
|
|
1933
|
-
function Ae(e) {
|
|
1934
|
-
return e.label ?? e.value?.toString() ?? "";
|
|
1935
|
-
}
|
|
1936
1933
|
function je(e) {
|
|
1937
|
-
return e
|
|
1934
|
+
return e.label ?? e.value?.toString() ?? "";
|
|
1938
1935
|
}
|
|
1939
1936
|
function Me(e) {
|
|
1937
|
+
return e && Y.value?.includes ? Y.value?.includes(e) : !1;
|
|
1938
|
+
}
|
|
1939
|
+
function Ne(e) {
|
|
1940
1940
|
let t = w.removeTagsTexts, n = w.options;
|
|
1941
1941
|
if (t && n) {
|
|
1942
1942
|
let r = n.findIndex((t) => t.value === e.value);
|
|
1943
1943
|
if (r >= 0 && r < t.length) return t[r];
|
|
1944
1944
|
}
|
|
1945
|
-
return `${ue} ${
|
|
1945
|
+
return `${ue} ${je(e)}`;
|
|
1946
1946
|
}
|
|
1947
|
-
function
|
|
1948
|
-
t && t.stopPropagation(),
|
|
1947
|
+
function Pe(e, t) {
|
|
1948
|
+
t && t.stopPropagation(), He(e.value), Ye();
|
|
1949
1949
|
}
|
|
1950
|
-
function
|
|
1951
|
-
if (
|
|
1952
|
-
let e =
|
|
1953
|
-
e &&
|
|
1954
|
-
|
|
1950
|
+
function Fe() {
|
|
1951
|
+
if (X.value) {
|
|
1952
|
+
let e = X.value.querySelector("article");
|
|
1953
|
+
e && D(() => {
|
|
1954
|
+
it(e, X.value, w.placement ?? "bottom");
|
|
1955
1955
|
}, 1);
|
|
1956
1956
|
}
|
|
1957
1957
|
}
|
|
1958
|
-
function
|
|
1959
|
-
if (
|
|
1958
|
+
function Le(e) {
|
|
1959
|
+
if (X.value?.open) {
|
|
1960
1960
|
if (self.document) {
|
|
1961
1961
|
let t = self.document.activeElement;
|
|
1962
1962
|
if (t) if (t.getAttribute("type") === "checkbox" || t.getAttribute("type") === "radio") {
|
|
@@ -1983,81 +1983,81 @@ var x = () => {
|
|
|
1983
1983
|
e = e.previousElementSibling;
|
|
1984
1984
|
}
|
|
1985
1985
|
if (!e) {
|
|
1986
|
-
let e =
|
|
1986
|
+
let e = X.value.querySelector("input[type=\"checkbox\"]");
|
|
1987
1987
|
if (e && e !== t) Ge(t);
|
|
1988
1988
|
else {
|
|
1989
|
-
let e =
|
|
1990
|
-
if (e)
|
|
1989
|
+
let e = I(X.value);
|
|
1990
|
+
if (e) D(() => {
|
|
1991
1991
|
e.focus();
|
|
1992
1992
|
}, 100);
|
|
1993
1993
|
else {
|
|
1994
|
-
let e = Array.from(
|
|
1994
|
+
let e = Array.from(X.value?.querySelectorAll("input[type=\"checkbox\"],input[type=\"radio\"]"));
|
|
1995
1995
|
e.length && e.at(-1)?.focus();
|
|
1996
1996
|
}
|
|
1997
1997
|
}
|
|
1998
1998
|
}
|
|
1999
1999
|
}
|
|
2000
|
-
} else t.getAttribute("type") === "search" && (e.key === "ArrowUp" || e.key === "ArrowLeft") ? (
|
|
2000
|
+
} else t.getAttribute("type") === "search" && (e.key === "ArrowUp" || e.key === "ArrowLeft") ? (ze(void 0, !0), Ye()) : Ge(t);
|
|
2001
2001
|
}
|
|
2002
|
-
} else (e.key === "ArrowDown" || e.key === "ArrowRight") && (
|
|
2002
|
+
} else (e.key === "ArrowDown" || e.key === "ArrowRight") && (Fe(), X.value && (X.value.open = !0), Ke());
|
|
2003
2003
|
e.stopPropagation(), e.preventDefault();
|
|
2004
2004
|
}
|
|
2005
|
-
function
|
|
2006
|
-
if (e.stopPropagation(), e.key === "Escape" &&
|
|
2007
|
-
else if (e.key === "Enter" &&
|
|
2005
|
+
function Re(e) {
|
|
2006
|
+
if (e.stopPropagation(), e.key === "Escape" && X.value?.open) ze(void 0, !0), Ye();
|
|
2007
|
+
else if (e.key === "Enter" && X.value?.open) {
|
|
2008
2008
|
if (self.document) {
|
|
2009
2009
|
let t = self.document.activeElement;
|
|
2010
2010
|
if (["checkbox", "radio"].includes(t.getAttribute("type") || "")) t.click(), e.preventDefault();
|
|
2011
2011
|
else if (t.getAttribute("type") === "search") {
|
|
2012
|
-
let t =
|
|
2013
|
-
t?.value && (
|
|
2012
|
+
let t = de.value?.find((e) => !e.isGroupTitle && !e.disabled);
|
|
2013
|
+
t?.value && (He(t.value), e.preventDefault());
|
|
2014
2014
|
}
|
|
2015
2015
|
}
|
|
2016
|
-
} else (e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "ArrowLeft" || e.key === "ArrowRight") &&
|
|
2016
|
+
} else (e.key === "ArrowDown" || e.key === "ArrowUp" || e.key === "ArrowLeft" || e.key === "ArrowRight") && Le(e);
|
|
2017
2017
|
}
|
|
2018
|
-
function
|
|
2019
|
-
if (
|
|
2020
|
-
if (t)
|
|
2021
|
-
else if (
|
|
2018
|
+
function ze(e, t) {
|
|
2019
|
+
if (X.value) {
|
|
2020
|
+
if (t) X.value.open = !1, Ye();
|
|
2021
|
+
else if (X.value.open && e && e.relatedTarget) {
|
|
2022
2022
|
let t = e.relatedTarget;
|
|
2023
|
-
!
|
|
2023
|
+
!X.value.contains(t) && t.localName !== "dialog" && D(() => X.value.open = !1, 1);
|
|
2024
2024
|
}
|
|
2025
2025
|
}
|
|
2026
2026
|
}
|
|
2027
|
-
function
|
|
2027
|
+
function Be(e) {
|
|
2028
2028
|
if (e) {
|
|
2029
2029
|
let t = e.target;
|
|
2030
|
-
|
|
2030
|
+
X.value?.open && !X.value.contains(t) && (X.value.open = !1);
|
|
2031
2031
|
}
|
|
2032
2032
|
}
|
|
2033
|
-
function Be(e) {
|
|
2034
|
-
(/* @__PURE__ */ new Date()).getTime() - me.value < 200 || (X.value = e, U.value = !0, w.onOptionSelected && w.onOptionSelected(e ?? []), Ue(S, { target: { values: e } }, "values"), me.value = (/* @__PURE__ */ new Date()).getTime());
|
|
2035
|
-
}
|
|
2036
2033
|
function Ve(e) {
|
|
2037
|
-
|
|
2034
|
+
(/* @__PURE__ */ new Date()).getTime() - he.value < 200 || (Y.value = e, ee.value = !0, w.onOptionSelected && w.onOptionSelected(e ?? []), Q(C, { target: { values: e } }, "values"), he.value = (/* @__PURE__ */ new Date()).getTime());
|
|
2038
2035
|
}
|
|
2039
2036
|
function He(e) {
|
|
2040
|
-
|
|
2037
|
+
e && (w.multiple ? Y.value?.includes(e) ? Ve(Y.value.filter((t) => t !== e)) : Ve([...Y.value || [], e]) : (Ve([e]), ze(void 0, !0)));
|
|
2038
|
+
}
|
|
2039
|
+
function We(e) {
|
|
2040
|
+
if (e.stopPropagation(), Y.value?.length === le.value) Ve([]);
|
|
2041
2041
|
else {
|
|
2042
|
-
let e =
|
|
2043
|
-
|
|
2042
|
+
let e = ce.value && Ce.value ? Ce.value.value : void 0;
|
|
2043
|
+
Ve(w.options ? w.options.filter((t) => !t.isGroupTitle && (!e || t.value?.toLowerCase().includes(e.toLowerCase()))).map((e) => e.value ?? "") : []);
|
|
2044
2044
|
}
|
|
2045
2045
|
}
|
|
2046
2046
|
function Ge(e) {
|
|
2047
|
-
if (
|
|
2048
|
-
let t = Array.from(
|
|
2047
|
+
if (X.value) {
|
|
2048
|
+
let t = Array.from(X.value.querySelectorAll("input[type=\"checkbox\"],input[type=\"radio\"]"));
|
|
2049
2049
|
if (t.length) {
|
|
2050
2050
|
let n = t.at(0), r = n === e && t.length > 1 ? t.at(1) : n;
|
|
2051
|
-
r &&
|
|
2051
|
+
r && D(() => {
|
|
2052
2052
|
r.focus();
|
|
2053
2053
|
}, 1);
|
|
2054
2054
|
}
|
|
2055
2055
|
}
|
|
2056
2056
|
}
|
|
2057
2057
|
function Ke() {
|
|
2058
|
-
if (
|
|
2059
|
-
let e =
|
|
2060
|
-
e ?
|
|
2058
|
+
if (X.value) {
|
|
2059
|
+
let e = I(X.value);
|
|
2060
|
+
e ? D(() => {
|
|
2061
2061
|
e.focus();
|
|
2062
2062
|
}, 1) : Ge();
|
|
2063
2063
|
}
|
|
@@ -2068,97 +2068,97 @@ var x = () => {
|
|
|
2068
2068
|
if (typeof e == "string") t = e;
|
|
2069
2069
|
else {
|
|
2070
2070
|
let n = e;
|
|
2071
|
-
n.stopPropagation(), w.onSearch && w.onSearch(n), t = n.target.value,
|
|
2071
|
+
n.stopPropagation(), w.onSearch && w.onSearch(n), t = n.target.value, ve.value = t;
|
|
2072
2072
|
}
|
|
2073
|
-
!w.options || !t || t.length === 0 ?
|
|
2073
|
+
!w.options || !t || t.length === 0 ? de.value = w.options : w.searchFilter ? de.value = w.options.filter((e) => w.searchFilter(e, t)) : de.value = w.options.filter((e) => !e.isGroupTitle && je(e).toLowerCase().includes(t.toLowerCase()));
|
|
2074
2074
|
}
|
|
2075
2075
|
function Je(e) {
|
|
2076
|
-
e.stopPropagation(),
|
|
2076
|
+
e.stopPropagation(), Ve([]), Ye();
|
|
2077
2077
|
}
|
|
2078
2078
|
function Ye() {
|
|
2079
|
-
|
|
2079
|
+
X.value && X.value.querySelector("summary")?.focus();
|
|
2080
2080
|
}
|
|
2081
2081
|
function Xe() {
|
|
2082
2082
|
let e = w.id ?? w.propOverrides?.id ?? `custom-select-${x}`;
|
|
2083
|
-
|
|
2083
|
+
E.value = e, A.value = e + K, j.value = e + q, M.value = e + J, L.value = e + oe, R.value = e + ae, z.value = e + "-summary", B.value = e + se, ne.value = e + "-selected-labels", V.value = e + "-info";
|
|
2084
2084
|
}
|
|
2085
2085
|
function Ze(e) {
|
|
2086
2086
|
e.stopPropagation();
|
|
2087
2087
|
}
|
|
2088
|
-
return (l, u) => (
|
|
2089
|
-
id:
|
|
2088
|
+
return (l, u) => (d(), r("div", {
|
|
2089
|
+
id: E.value,
|
|
2090
2090
|
ref_key: "_ref",
|
|
2091
|
-
ref:
|
|
2092
|
-
class: c(
|
|
2091
|
+
ref: xe,
|
|
2092
|
+
class: c(g(S)("db-custom-select", w.class)),
|
|
2093
2093
|
"aria-invalid": H.value === "invalid",
|
|
2094
2094
|
"data-custom-validity": H.value,
|
|
2095
2095
|
"data-width": s.formFieldWidth,
|
|
2096
2096
|
"data-variant": s.variant === "floating" && s.selectedType === "tag" && s.multiple ? "above" : s.variant,
|
|
2097
|
-
"data-required":
|
|
2098
|
-
"data-hide-asterisk":
|
|
2097
|
+
"data-required": g(O)(s.required),
|
|
2098
|
+
"data-hide-asterisk": g(P)(s.showRequiredAsterisk),
|
|
2099
2099
|
"data-placement": s.placement,
|
|
2100
2100
|
"data-selected-type": s.multiple ? s.selectedType : "text",
|
|
2101
|
-
"data-hide-label":
|
|
2101
|
+
"data-hide-label": g(P)(s.showLabel),
|
|
2102
2102
|
"data-icon": s.icon,
|
|
2103
|
-
"data-show-icon":
|
|
2103
|
+
"data-show-icon": g(O)(s.showIcon)
|
|
2104
2104
|
}, [
|
|
2105
|
-
i("label", { id: R.value }, [a(
|
|
2105
|
+
i("label", { id: R.value }, [a(h(s.label ?? g("LABEL SHOULD BE SET")), 1), i("select", {
|
|
2106
2106
|
role: "none",
|
|
2107
2107
|
hidden: !0,
|
|
2108
|
-
id:
|
|
2108
|
+
id: L.value,
|
|
2109
2109
|
tabIndex: -1,
|
|
2110
2110
|
ref_key: "selectRef",
|
|
2111
|
-
ref:
|
|
2111
|
+
ref: Z,
|
|
2112
2112
|
form: s.form,
|
|
2113
2113
|
name: s.name,
|
|
2114
2114
|
"data-custom-validity": H.value,
|
|
2115
|
-
multiple:
|
|
2116
|
-
disabled:
|
|
2117
|
-
required:
|
|
2115
|
+
multiple: g(k)(s.multiple, "multiple"),
|
|
2116
|
+
disabled: g(k)(s.disabled, "disabled"),
|
|
2117
|
+
required: g(k)(s.required, "required"),
|
|
2118
2118
|
onChange: u[0] ||= async (e) => Ze(e)
|
|
2119
|
-
}, [s.options?.length ? (
|
|
2119
|
+
}, [s.options?.length ? (d(!0), r(e, { key: 0 }, p(s.options, (e, t) => (d(), r("option", {
|
|
2120
2120
|
key: t,
|
|
2121
2121
|
disabled: e.disabled,
|
|
2122
2122
|
value: e.value
|
|
2123
|
-
},
|
|
2123
|
+
}, h(je(e)), 9, Nt))), 128)) : n("", !0)], 40, Mt)], 8, jt),
|
|
2124
2124
|
i("details", {
|
|
2125
2125
|
ref_key: "detailsRef",
|
|
2126
|
-
ref:
|
|
2126
|
+
ref: X,
|
|
2127
2127
|
open: s.open,
|
|
2128
|
-
onToggle: u[2] ||= async (e) =>
|
|
2129
|
-
onKeydown: u[3] ||= async (e) =>
|
|
2130
|
-
}, [
|
|
2128
|
+
onToggle: u[2] ||= async (e) => De(e),
|
|
2129
|
+
onKeydown: u[3] ||= async (e) => Re(e)
|
|
2130
|
+
}, [m(l.$slots, "default"), s.options ? (d(), r(e, { key: 0 }, [i("summary", {
|
|
2131
2131
|
class: "db-custom-select-form-field",
|
|
2132
2132
|
id: z.value,
|
|
2133
|
-
"aria-disabled":
|
|
2133
|
+
"aria-disabled": g(O)(s.disabled),
|
|
2134
2134
|
tabIndex: s.disabled ? -1 : void 0,
|
|
2135
2135
|
"aria-labelledby": R.value
|
|
2136
|
-
}, [
|
|
2136
|
+
}, [W.value?.length ? (d(), r("span", {
|
|
2137
2137
|
key: 0,
|
|
2138
|
-
"data-visually-hidden":
|
|
2139
|
-
id:
|
|
2140
|
-
}, [s.selectedPrefix ? (
|
|
2138
|
+
"data-visually-hidden": g(O)(s.selectedType === "tag"),
|
|
2139
|
+
id: ne.value
|
|
2140
|
+
}, [s.selectedPrefix ? (d(), r("span", Lt, h(s.selectedPrefix), 1)) : n("", !0), a(" " + h(W.value), 1)], 8, It)) : n("", !0), s.selectedType === "tag" ? (d(), r("div", Rt, [(d(!0), r(e, null, p(G.value, (e, n) => (d(), t(kt, {
|
|
2141
2141
|
key: n,
|
|
2142
2142
|
emphasis: "strong",
|
|
2143
2143
|
behavior: "removable",
|
|
2144
|
-
removeButton:
|
|
2145
|
-
onRemove: (t) =>
|
|
2144
|
+
removeButton: Ne(e),
|
|
2145
|
+
onRemove: (t) => Pe(e, t)
|
|
2146
2146
|
}, {
|
|
2147
|
-
default:
|
|
2147
|
+
default: y(() => [a(h(je(e)), 1)]),
|
|
2148
2148
|
_: 2
|
|
2149
|
-
}, 1032, ["removeButton", "onRemove"]))), 128))])) : n("", !0)], 8,
|
|
2150
|
-
default:
|
|
2151
|
-
|
|
2149
|
+
}, 1032, ["removeButton", "onRemove"]))), 128))])) : n("", !0)], 8, Ft), o(dt, { width: s.dropdownWidth }, {
|
|
2150
|
+
default: y(() => [
|
|
2151
|
+
ce.value ? (d(), r("div", zt, [o(Tt, {
|
|
2152
2152
|
type: "search",
|
|
2153
2153
|
ref_key: "searchInputRef",
|
|
2154
|
-
ref:
|
|
2155
|
-
name:
|
|
2156
|
-
form:
|
|
2154
|
+
ref: Ce,
|
|
2155
|
+
name: E.value,
|
|
2156
|
+
form: E.value,
|
|
2157
2157
|
showLabel: !1,
|
|
2158
|
-
value:
|
|
2159
|
-
label: s.searchLabel ??
|
|
2158
|
+
value: ve.value,
|
|
2159
|
+
label: s.searchLabel ?? g("LABEL SHOULD BE SET"),
|
|
2160
2160
|
placeholder: s.searchPlaceholder ?? s.searchLabel,
|
|
2161
|
-
ariaDescribedBy:
|
|
2161
|
+
ariaDescribedBy: pe.value || s.showLoading ? V.value : void 0,
|
|
2162
2162
|
onInput: (e) => qe(e)
|
|
2163
2163
|
}, null, 8, [
|
|
2164
2164
|
"name",
|
|
@@ -2169,44 +2169,44 @@ var x = () => {
|
|
|
2169
2169
|
"ariaDescribedBy",
|
|
2170
2170
|
"onInput"
|
|
2171
2171
|
])])) : n("", !0),
|
|
2172
|
-
|
|
2172
|
+
pe.value || s.showLoading ? (d(), t($, {
|
|
2173
2173
|
key: 1,
|
|
2174
2174
|
id: V.value,
|
|
2175
2175
|
icon: s.showLoading ? "circular_arrows" : void 0,
|
|
2176
2176
|
semantic: s.showLoading ? "informational" : "warning"
|
|
2177
2177
|
}, {
|
|
2178
|
-
default:
|
|
2178
|
+
default: y(() => [a(h((s.showLoading ? s.loadingText : s.noResultsText) ?? g("MESSAGE SHOULD BE SET")), 1)]),
|
|
2179
2179
|
_: 1
|
|
2180
2180
|
}, 8, [
|
|
2181
2181
|
"id",
|
|
2182
2182
|
"icon",
|
|
2183
2183
|
"semantic"
|
|
2184
|
-
])) : (
|
|
2184
|
+
])) : (d(), r(e, { key: 2 }, [ie.value ? (d(), r("div", Bt, [i("div", Vt, [i("label", null, [i("input", {
|
|
2185
2185
|
type: "checkbox",
|
|
2186
2186
|
value: "select-all",
|
|
2187
2187
|
ref_key: "selectAllRef",
|
|
2188
|
-
ref:
|
|
2189
|
-
form:
|
|
2190
|
-
checked:
|
|
2191
|
-
onChange: u[1] ||= async (e) =>
|
|
2192
|
-
}, null, 40,
|
|
2193
|
-
multiple:
|
|
2194
|
-
label: s.listLabel ?? s.label ??
|
|
2188
|
+
ref: Se,
|
|
2189
|
+
form: E.value,
|
|
2190
|
+
checked: ye.value,
|
|
2191
|
+
onChange: u[1] ||= async (e) => We(e)
|
|
2192
|
+
}, null, 40, Ht), a(h(Ae()), 1)])])])) : n("", !0), o(vt, {
|
|
2193
|
+
multiple: g(k)(s.multiple, "multiple"),
|
|
2194
|
+
label: s.listLabel ?? s.label ?? g("LABEL SHOULD BE SET")
|
|
2195
2195
|
}, {
|
|
2196
|
-
default:
|
|
2196
|
+
default: y(() => [(d(!0), r(e, null, p(de.value, (i, o) => (d(), t(gt, {
|
|
2197
2197
|
key: o,
|
|
2198
2198
|
type: s.multiple ? "checkbox" : "radio",
|
|
2199
2199
|
showDivider: i.showDivider,
|
|
2200
2200
|
icon: i.icon,
|
|
2201
2201
|
isGroupTitle: i.isGroupTitle,
|
|
2202
|
-
groupTitle:
|
|
2203
|
-
name:
|
|
2204
|
-
checked:
|
|
2202
|
+
groupTitle: je(i),
|
|
2203
|
+
name: E.value,
|
|
2204
|
+
checked: Me(i.value),
|
|
2205
2205
|
disabled: i.disabled,
|
|
2206
2206
|
value: i.value,
|
|
2207
|
-
onChange: (e) =>
|
|
2207
|
+
onChange: (e) => He(i.value)
|
|
2208
2208
|
}, {
|
|
2209
|
-
default:
|
|
2209
|
+
default: y(() => [i.isGroupTitle ? n("", !0) : (d(), r(e, { key: 0 }, [a(h(je(i)), 1)], 64))]),
|
|
2210
2210
|
_: 2
|
|
2211
2211
|
}, 1032, [
|
|
2212
2212
|
"type",
|
|
@@ -2227,11 +2227,11 @@ var x = () => {
|
|
|
2227
2227
|
width: "full",
|
|
2228
2228
|
icon: "cross",
|
|
2229
2229
|
size: "small",
|
|
2230
|
-
name:
|
|
2231
|
-
form:
|
|
2232
|
-
onClick: (e) =>
|
|
2230
|
+
name: E.value,
|
|
2231
|
+
form: E.value,
|
|
2232
|
+
onClick: (e) => ze(void 0, !0)
|
|
2233
2233
|
}, {
|
|
2234
|
-
default:
|
|
2234
|
+
default: y(() => [a(h(s.mobileCloseButtonText ?? g("Close")), 1)]),
|
|
2235
2235
|
_: 1
|
|
2236
2236
|
}, 8, [
|
|
2237
2237
|
"name",
|
|
@@ -2240,20 +2240,20 @@ var x = () => {
|
|
|
2240
2240
|
])])
|
|
2241
2241
|
]),
|
|
2242
2242
|
_: 1
|
|
2243
|
-
}, 8, ["width"])], 64)) : n("", !0)], 40,
|
|
2244
|
-
(s.showClearSelection ?? !0) &&
|
|
2243
|
+
}, 8, ["width"])], 64)) : n("", !0)], 40, Pt),
|
|
2244
|
+
(s.showClearSelection ?? !0) && Y.value?.length ? (d(), t(Ie, {
|
|
2245
2245
|
key: 0,
|
|
2246
2246
|
icon: "cross",
|
|
2247
2247
|
variant: "ghost",
|
|
2248
2248
|
size: "small",
|
|
2249
2249
|
noText: !0,
|
|
2250
|
-
name:
|
|
2251
|
-
form:
|
|
2252
|
-
disabled:
|
|
2250
|
+
name: E.value,
|
|
2251
|
+
form: E.value,
|
|
2252
|
+
disabled: g(k)(s.disabled, "disabled"),
|
|
2253
2253
|
onClick: (e) => Je(e)
|
|
2254
2254
|
}, {
|
|
2255
|
-
default:
|
|
2256
|
-
default:
|
|
2255
|
+
default: y(() => [a(h(s.clearSelectionText), 1), o(Dt, { placement: "top" }, {
|
|
2256
|
+
default: y(() => [a(h(s.clearSelectionText), 1)]),
|
|
2257
2257
|
_: 1
|
|
2258
2258
|
})]),
|
|
2259
2259
|
_: 1
|
|
@@ -2265,25 +2265,25 @@ var x = () => {
|
|
|
2265
2265
|
])) : n("", !0),
|
|
2266
2266
|
i("span", {
|
|
2267
2267
|
class: "db-custom-select-placeholder",
|
|
2268
|
-
"aria-hidden":
|
|
2268
|
+
"aria-hidden": g(O)(!0),
|
|
2269
2269
|
id: B.value
|
|
2270
|
-
},
|
|
2271
|
-
|
|
2270
|
+
}, h(s.placeholder ?? s.label), 9, Ut),
|
|
2271
|
+
g(F)(s.message, s.showMessage) ? (d(), t($, {
|
|
2272
2272
|
key: 1,
|
|
2273
2273
|
size: "small",
|
|
2274
2274
|
icon: s.messageIcon,
|
|
2275
|
-
id:
|
|
2275
|
+
id: A.value
|
|
2276
2276
|
}, {
|
|
2277
|
-
default:
|
|
2277
|
+
default: y(() => [a(h(s.message), 1)]),
|
|
2278
2278
|
_: 1
|
|
2279
2279
|
}, 8, ["icon", "id"])) : n("", !0),
|
|
2280
|
-
|
|
2280
|
+
Te() ? (d(), t($, {
|
|
2281
2281
|
key: 2,
|
|
2282
2282
|
size: "small",
|
|
2283
2283
|
semantic: "successful",
|
|
2284
2284
|
id: j.value
|
|
2285
2285
|
}, {
|
|
2286
|
-
default:
|
|
2286
|
+
default: y(() => [a(h(s.validMessage || g("TODO: Add a validMessage")), 1)]),
|
|
2287
2287
|
_: 1
|
|
2288
2288
|
}, 8, ["id"])) : n("", !0),
|
|
2289
2289
|
o($, {
|
|
@@ -2291,17 +2291,17 @@ var x = () => {
|
|
|
2291
2291
|
semantic: "critical",
|
|
2292
2292
|
id: M.value
|
|
2293
2293
|
}, {
|
|
2294
|
-
default:
|
|
2294
|
+
default: y(() => [a(h(N.value), 1)]),
|
|
2295
2295
|
_: 1
|
|
2296
2296
|
}, 8, ["id"]),
|
|
2297
|
-
i("span",
|
|
2298
|
-
], 10,
|
|
2297
|
+
i("span", Wt, h(re.value), 1)
|
|
2298
|
+
], 10, At));
|
|
2299
2299
|
}
|
|
2300
|
-
}),
|
|
2300
|
+
}), Kt = [
|
|
2301
2301
|
"fixed",
|
|
2302
2302
|
"auto",
|
|
2303
2303
|
"full"
|
|
2304
|
-
],
|
|
2304
|
+
], qt = ["id"], Jt = /* @__PURE__ */ s({
|
|
2305
2305
|
name: "DBCustomSelectFormField",
|
|
2306
2306
|
__name: "custom-select-form-field",
|
|
2307
2307
|
props: {
|
|
@@ -2313,25 +2313,25 @@ var x = () => {
|
|
|
2313
2313
|
propOverrides: { default: void 0 }
|
|
2314
2314
|
},
|
|
2315
2315
|
setup(e) {
|
|
2316
|
-
let t = e, n =
|
|
2317
|
-
return (i, a) => (
|
|
2316
|
+
let t = e, n = f(null);
|
|
2317
|
+
return (i, a) => (d(), r("summary", {
|
|
2318
2318
|
ref_key: "_ref",
|
|
2319
2319
|
ref: n,
|
|
2320
2320
|
id: e.id ?? e.propOverrides?.id,
|
|
2321
|
-
class: c(
|
|
2322
|
-
}, [
|
|
2321
|
+
class: c(g(S)("db-custom-select-form-field", t.class))
|
|
2322
|
+
}, [m(i.$slots, "default")], 10, qt));
|
|
2323
2323
|
}
|
|
2324
|
-
}),
|
|
2324
|
+
}), Yt = ["checkbox", "radio"], Xt = [
|
|
2325
2325
|
"amount",
|
|
2326
2326
|
"text",
|
|
2327
2327
|
"tag"
|
|
2328
|
-
],
|
|
2328
|
+
], Zt = [
|
|
2329
2329
|
"id",
|
|
2330
2330
|
"data-margin",
|
|
2331
2331
|
"data-variant",
|
|
2332
2332
|
"data-emphasis",
|
|
2333
2333
|
"data-width"
|
|
2334
|
-
],
|
|
2334
|
+
], Qt = /* @__PURE__ */ s({
|
|
2335
2335
|
name: "DBDivider",
|
|
2336
2336
|
__name: "divider",
|
|
2337
2337
|
props: {
|
|
@@ -2347,8 +2347,8 @@ var x = () => {
|
|
|
2347
2347
|
width: { default: void 0 }
|
|
2348
2348
|
},
|
|
2349
2349
|
setup(e) {
|
|
2350
|
-
let t = e, n =
|
|
2351
|
-
return (i, a) => (
|
|
2350
|
+
let t = e, n = f(null);
|
|
2351
|
+
return (i, a) => (d(), r("div", {
|
|
2352
2352
|
ref_key: "_ref",
|
|
2353
2353
|
ref: n,
|
|
2354
2354
|
id: e.id ?? e.propOverrides?.id,
|
|
@@ -2356,21 +2356,21 @@ var x = () => {
|
|
|
2356
2356
|
"data-variant": e.variant,
|
|
2357
2357
|
"data-emphasis": e.emphasis,
|
|
2358
2358
|
"data-width": e.width,
|
|
2359
|
-
class: c(
|
|
2360
|
-
}, null, 10,
|
|
2359
|
+
class: c(g(S)("db-divider", t.class))
|
|
2360
|
+
}, null, 10, Zt));
|
|
2361
2361
|
}
|
|
2362
|
-
}),
|
|
2362
|
+
}), $t = ["none", "_"], en = ["horizontal", "vertical"], tn = [
|
|
2363
2363
|
"id",
|
|
2364
2364
|
"data-position",
|
|
2365
2365
|
"data-backdrop",
|
|
2366
2366
|
"data-direction",
|
|
2367
2367
|
"data-variant"
|
|
2368
|
-
],
|
|
2368
|
+
], nn = [
|
|
2369
2369
|
"data-spacing",
|
|
2370
2370
|
"data-width",
|
|
2371
2371
|
"data-direction",
|
|
2372
2372
|
"data-rounded"
|
|
2373
|
-
],
|
|
2373
|
+
], rn = { class: "db-drawer-header" }, an = { class: "db-drawer-header-text" }, on = { class: "db-drawer-content" }, sn = /* @__PURE__ */ s({
|
|
2374
2374
|
name: "DBDrawer",
|
|
2375
2375
|
__name: "drawer",
|
|
2376
2376
|
props: {
|
|
@@ -2404,15 +2404,15 @@ var x = () => {
|
|
|
2404
2404
|
spacing: { default: void 0 }
|
|
2405
2405
|
},
|
|
2406
2406
|
setup(e) {
|
|
2407
|
-
let t = e, n =
|
|
2407
|
+
let t = e, n = f(!1), s = f(null), u = f(null);
|
|
2408
2408
|
l(() => {
|
|
2409
|
-
|
|
2410
|
-
}),
|
|
2411
|
-
|
|
2409
|
+
_(), n.value = !0;
|
|
2410
|
+
}), v(() => [t.open], () => {
|
|
2411
|
+
_();
|
|
2412
2412
|
}, {
|
|
2413
2413
|
immediate: !0,
|
|
2414
2414
|
flush: "post"
|
|
2415
|
-
}),
|
|
2415
|
+
}), v(() => [
|
|
2416
2416
|
s.value,
|
|
2417
2417
|
n.value,
|
|
2418
2418
|
t.position
|
|
@@ -2425,26 +2425,26 @@ var x = () => {
|
|
|
2425
2425
|
immediate: !0,
|
|
2426
2426
|
flush: "post"
|
|
2427
2427
|
});
|
|
2428
|
-
function
|
|
2429
|
-
e && (
|
|
2428
|
+
function p(e, n) {
|
|
2429
|
+
e && (R(e) ? e.key === "Escape" && (e.preventDefault(), t.onClose && t.onClose(e)) : (n && (e.stopPropagation(), t.onClose && t.onClose(e)), e.target?.nodeName === "DIALOG" && e.type === "click" && t.backdrop !== "none" && t.onClose && t.onClose(e)));
|
|
2430
2430
|
}
|
|
2431
|
-
function
|
|
2431
|
+
function _() {
|
|
2432
2432
|
if (s.value) {
|
|
2433
2433
|
let e = !!t.open;
|
|
2434
|
-
e && !s.value.open && (u.value && u.value.removeAttribute("data-transition"), t.position === "absolute" || t.backdrop === "none" || t.variant === "inside" ? s.value.show() : s.value.showModal(),
|
|
2434
|
+
e && !s.value.open && (u.value && u.value.removeAttribute("data-transition"), t.position === "absolute" || t.backdrop === "none" || t.variant === "inside" ? s.value.show() : s.value.showModal(), D(() => {
|
|
2435
2435
|
u.value && (u.value.dataset.transition = "open");
|
|
2436
|
-
}, 1)), !e && s.value.open && (u.value && (u.value.dataset.transition = "close"),
|
|
2436
|
+
}, 1)), !e && s.value.open && (u.value && (u.value.dataset.transition = "close"), D(() => {
|
|
2437
2437
|
s.value?.close();
|
|
2438
2438
|
}, 401));
|
|
2439
2439
|
}
|
|
2440
2440
|
}
|
|
2441
|
-
return (n, l) => (
|
|
2441
|
+
return (n, l) => (d(), r("dialog", {
|
|
2442
2442
|
class: "db-drawer",
|
|
2443
2443
|
id: e.id ?? e.propOverrides?.id,
|
|
2444
2444
|
ref_key: "_ref",
|
|
2445
2445
|
ref: s,
|
|
2446
|
-
onClick: l[0] ||= async (e) =>
|
|
2447
|
-
onKeydown: l[1] ||= async (e) =>
|
|
2446
|
+
onClick: l[0] ||= async (e) => p(e),
|
|
2447
|
+
onKeydown: l[1] ||= async (e) => p(e),
|
|
2448
2448
|
"data-position": e.position,
|
|
2449
2449
|
"data-backdrop": e.backdrop,
|
|
2450
2450
|
"data-direction": e.direction,
|
|
@@ -2452,37 +2452,37 @@ var x = () => {
|
|
|
2452
2452
|
}, [i("article", {
|
|
2453
2453
|
ref_key: "dialogContainerRef",
|
|
2454
2454
|
ref: u,
|
|
2455
|
-
class: c(
|
|
2455
|
+
class: c(g(S)("db-drawer-container", t.class)),
|
|
2456
2456
|
"data-spacing": e.spacing,
|
|
2457
2457
|
"data-width": e.width,
|
|
2458
2458
|
"data-direction": e.direction,
|
|
2459
|
-
"data-rounded":
|
|
2460
|
-
}, [i("header",
|
|
2459
|
+
"data-rounded": g(O)(e.rounded)
|
|
2460
|
+
}, [i("header", rn, [i("div", an, [m(n.$slots, "drawer-header")]), o(Ie, {
|
|
2461
2461
|
class: "button-close-drawer",
|
|
2462
2462
|
icon: "cross",
|
|
2463
2463
|
variant: "ghost",
|
|
2464
2464
|
id: e.closeButtonId,
|
|
2465
2465
|
noText: !0,
|
|
2466
|
-
onClick: (e) =>
|
|
2466
|
+
onClick: (e) => p(e, !0)
|
|
2467
2467
|
}, {
|
|
2468
|
-
default:
|
|
2468
|
+
default: y(() => [a(h(e.closeButtonText ?? g("Close")), 1)]),
|
|
2469
2469
|
_: 1
|
|
2470
|
-
}, 8, ["id", "onClick"])]), i("div",
|
|
2470
|
+
}, 8, ["id", "onClick"])]), i("div", on, [m(n.$slots, "default")])], 10, nn)], 40, tn));
|
|
2471
2471
|
}
|
|
2472
|
-
}),
|
|
2472
|
+
}), cn = [
|
|
2473
2473
|
"none",
|
|
2474
2474
|
"strong",
|
|
2475
2475
|
"weak",
|
|
2476
2476
|
"invisible"
|
|
2477
|
-
],
|
|
2477
|
+
], ln = [
|
|
2478
2478
|
"left",
|
|
2479
2479
|
"right",
|
|
2480
2480
|
"up",
|
|
2481
2481
|
"down"
|
|
2482
|
-
],
|
|
2482
|
+
], un = ["modal", "inside"], dn = ["fixed", "absolute"], fn = (e) => {
|
|
2483
2483
|
let { target: t } = e;
|
|
2484
2484
|
return !!(!t?.classList?.contains("db-navigation-item-expand-button") && t?.parentElement?.classList.contains("db-navigation-item"));
|
|
2485
|
-
},
|
|
2485
|
+
}, pn = class {
|
|
2486
2486
|
element;
|
|
2487
2487
|
subNavigation;
|
|
2488
2488
|
parentSubNavigation = null;
|
|
@@ -2499,7 +2499,7 @@ var x = () => {
|
|
|
2499
2499
|
}
|
|
2500
2500
|
enableFollow() {
|
|
2501
2501
|
if (!this.initialized || this.triangleData || !this.element || !this.subNavigation) return;
|
|
2502
|
-
let e =
|
|
2502
|
+
let e = rt(this.subNavigation), t = this.element.getBoundingClientRect(), n = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;
|
|
2503
2503
|
this.triangleData = {
|
|
2504
2504
|
itemRect: t,
|
|
2505
2505
|
parentElementWidth: n,
|
|
@@ -2550,11 +2550,11 @@ var x = () => {
|
|
|
2550
2550
|
let t = this.hasMouseEnteredSubNavigation(), n = this.getTriangleCoordinates(t ? "fill-gap" : "safe-triangle");
|
|
2551
2551
|
n && (this.element.style.setProperty("--db-navigation-item-clip-path", `polygon(${n.lb}, ${n.lt}, ${n.rt}, ${n.rb})`), t && (this.triangleData = void 0));
|
|
2552
2552
|
}
|
|
2553
|
-
},
|
|
2553
|
+
}, mn = [
|
|
2554
2554
|
"id",
|
|
2555
2555
|
"data-width",
|
|
2556
2556
|
"data-on-forcing-mobile"
|
|
2557
|
-
],
|
|
2557
|
+
], hn = { class: "db-header-drawer-navigation" }, gn = { class: "db-header-meta-navigation" }, _n = { class: "db-header-secondary-action" }, vn = { class: "db-header-meta-navigation" }, yn = { class: "db-header-navigation-bar" }, bn = { class: "db-header-brand-container" }, xn = { class: "db-header-navigation-container" }, Sn = { class: "db-header-navigation" }, Cn = { class: "db-header-primary-action" }, wn = { class: "db-header-action-container" }, Tn = { class: "db-header-burger-menu-container" }, En = { class: "db-header-secondary-action" }, Dn = /* @__PURE__ */ s({
|
|
2558
2558
|
name: "DBHeader",
|
|
2559
2559
|
__name: "header",
|
|
2560
2560
|
props: {
|
|
@@ -2587,11 +2587,11 @@ var x = () => {
|
|
|
2587
2587
|
width: { default: void 0 }
|
|
2588
2588
|
},
|
|
2589
2589
|
setup(e) {
|
|
2590
|
-
let t = e, n =
|
|
2590
|
+
let t = e, n = f(!1), s = f(!1), u = f(null);
|
|
2591
2591
|
l(() => {
|
|
2592
2592
|
n.value = !0;
|
|
2593
|
-
}),
|
|
2594
|
-
n.value && u.value && t.forceMobile && (
|
|
2593
|
+
}), v(() => [n.value, u.value], () => {
|
|
2594
|
+
n.value && u.value && t.forceMobile && (x(u.value, {
|
|
2595
2595
|
key: "data-force-mobile",
|
|
2596
2596
|
value: "true"
|
|
2597
2597
|
}), s.value = !0);
|
|
@@ -2599,35 +2599,35 @@ var x = () => {
|
|
|
2599
2599
|
immediate: !0,
|
|
2600
2600
|
flush: "post"
|
|
2601
2601
|
});
|
|
2602
|
-
function
|
|
2602
|
+
function p(e) {
|
|
2603
2603
|
e && e.stopPropagation && e.stopPropagation();
|
|
2604
|
-
let n = !
|
|
2604
|
+
let n = !k(t.drawerOpen, "drawerOpen");
|
|
2605
2605
|
t.onToggle && t.onToggle(n);
|
|
2606
2606
|
}
|
|
2607
|
-
function
|
|
2608
|
-
|
|
2607
|
+
function _(e) {
|
|
2608
|
+
fn(e) && p();
|
|
2609
2609
|
}
|
|
2610
|
-
return (n, l) => (
|
|
2610
|
+
return (n, l) => (d(), r("header", {
|
|
2611
2611
|
ref_key: "_ref",
|
|
2612
2612
|
ref: u,
|
|
2613
|
-
class: c(
|
|
2613
|
+
class: c(g(S)("db-header", t.class)),
|
|
2614
2614
|
id: e.id ?? e.propOverrides?.id,
|
|
2615
2615
|
"data-width": e.width,
|
|
2616
2616
|
"data-on-forcing-mobile": e.forceMobile && !s.value
|
|
2617
2617
|
}, [
|
|
2618
|
-
o(
|
|
2618
|
+
o(sn, {
|
|
2619
2619
|
class: "db-header-drawer",
|
|
2620
2620
|
spacing: "small",
|
|
2621
2621
|
rounded: !0,
|
|
2622
2622
|
closeButtonId: e.closeButtonId,
|
|
2623
2623
|
closeButtonText: e.closeButtonText,
|
|
2624
|
-
open:
|
|
2625
|
-
onClose: (e) =>
|
|
2624
|
+
open: g(k)(e.drawerOpen),
|
|
2625
|
+
onClose: (e) => p()
|
|
2626
2626
|
}, {
|
|
2627
|
-
default:
|
|
2627
|
+
default: y(() => [i("div", hn, [i("div", {
|
|
2628
2628
|
class: "db-header-navigation",
|
|
2629
|
-
onClick: l[0] ||= async (e) =>
|
|
2630
|
-
}, [
|
|
2629
|
+
onClick: l[0] ||= async (e) => _(e)
|
|
2630
|
+
}, [m(n.$slots, "default")]), i("div", gn, [m(n.$slots, "meta-navigation")])]), i("div", _n, [m(n.$slots, "secondary-action")])]),
|
|
2631
2631
|
_: 3
|
|
2632
2632
|
}, 8, [
|
|
2633
2633
|
"closeButtonId",
|
|
@@ -2635,28 +2635,28 @@ var x = () => {
|
|
|
2635
2635
|
"open",
|
|
2636
2636
|
"onClose"
|
|
2637
2637
|
]),
|
|
2638
|
-
i("div",
|
|
2639
|
-
i("div",
|
|
2640
|
-
i("div",
|
|
2641
|
-
i("div",
|
|
2642
|
-
i("div",
|
|
2638
|
+
i("div", vn, [m(n.$slots, "meta-navigation")]),
|
|
2639
|
+
i("div", yn, [
|
|
2640
|
+
i("div", bn, [m(n.$slots, "brand")]),
|
|
2641
|
+
i("div", xn, [i("div", Sn, [m(n.$slots, "default")]), i("div", Cn, [m(n.$slots, "primary-action")])]),
|
|
2642
|
+
i("div", wn, [i("div", Tn, [o(Ie, {
|
|
2643
2643
|
icon: "menu",
|
|
2644
2644
|
variant: "ghost",
|
|
2645
2645
|
noText: !0,
|
|
2646
|
-
onClick: (e) =>
|
|
2646
|
+
onClick: (e) => p()
|
|
2647
2647
|
}, {
|
|
2648
|
-
default:
|
|
2648
|
+
default: y(() => [a(h(e.burgerMenuLabel ?? g("BurgerMenu")), 1)]),
|
|
2649
2649
|
_: 1
|
|
2650
|
-
}, 8, ["onClick"])]), i("div",
|
|
2650
|
+
}, 8, ["onClick"])]), i("div", En, [m(n.$slots, "secondary-action")])])
|
|
2651
2651
|
])
|
|
2652
|
-
], 10,
|
|
2652
|
+
], 10, mn));
|
|
2653
2653
|
}
|
|
2654
|
-
}),
|
|
2654
|
+
}), On = [
|
|
2655
2655
|
"id",
|
|
2656
2656
|
"data-icon",
|
|
2657
2657
|
"data-icon-weight",
|
|
2658
2658
|
"data-icon-variant"
|
|
2659
|
-
],
|
|
2659
|
+
], kn = /* @__PURE__ */ s({
|
|
2660
2660
|
name: "DBIcon",
|
|
2661
2661
|
__name: "icon",
|
|
2662
2662
|
props: {
|
|
@@ -2672,26 +2672,26 @@ var x = () => {
|
|
|
2672
2672
|
text: { default: void 0 }
|
|
2673
2673
|
},
|
|
2674
2674
|
setup(t) {
|
|
2675
|
-
let n = t, i =
|
|
2676
|
-
return (o, s) => (
|
|
2675
|
+
let n = t, i = f(null);
|
|
2676
|
+
return (o, s) => (d(), r("span", {
|
|
2677
2677
|
"aria-hidden": "true",
|
|
2678
2678
|
ref_key: "_ref",
|
|
2679
2679
|
ref: i,
|
|
2680
2680
|
id: t.id ?? t.propOverrides?.id,
|
|
2681
|
-
class: c(
|
|
2681
|
+
class: c(g(S)("db-icon", n.class)),
|
|
2682
2682
|
"data-icon": t.icon,
|
|
2683
2683
|
"data-icon-weight": t.weight,
|
|
2684
2684
|
"data-icon-variant": t.variant
|
|
2685
|
-
}, [t.text ? (
|
|
2685
|
+
}, [t.text ? (d(), r(e, { key: 0 }, [a(h(t.text), 1)], 64)) : m(o.$slots, "default", { key: 1 })], 10, On));
|
|
2686
2686
|
}
|
|
2687
|
-
}),
|
|
2687
|
+
}), An = [
|
|
2688
2688
|
"16",
|
|
2689
2689
|
"20",
|
|
2690
2690
|
"24",
|
|
2691
2691
|
"32",
|
|
2692
2692
|
"48",
|
|
2693
2693
|
"64"
|
|
2694
|
-
],
|
|
2694
|
+
], jn = [
|
|
2695
2695
|
"color",
|
|
2696
2696
|
"date",
|
|
2697
2697
|
"datetime-local",
|
|
@@ -2708,7 +2708,7 @@ var x = () => {
|
|
|
2708
2708
|
"time",
|
|
2709
2709
|
"url",
|
|
2710
2710
|
"week"
|
|
2711
|
-
],
|
|
2711
|
+
], Mn = [
|
|
2712
2712
|
"id",
|
|
2713
2713
|
"href",
|
|
2714
2714
|
"target",
|
|
@@ -2723,7 +2723,7 @@ var x = () => {
|
|
|
2723
2723
|
"data-variant",
|
|
2724
2724
|
"data-content",
|
|
2725
2725
|
"data-wrap"
|
|
2726
|
-
],
|
|
2726
|
+
], Nn = /* @__PURE__ */ s({
|
|
2727
2727
|
name: "DBLink",
|
|
2728
2728
|
__name: "link",
|
|
2729
2729
|
props: {
|
|
@@ -2763,36 +2763,36 @@ var x = () => {
|
|
|
2763
2763
|
}
|
|
2764
2764
|
},
|
|
2765
2765
|
setup(t) {
|
|
2766
|
-
let n = t, i =
|
|
2766
|
+
let n = t, i = f(null);
|
|
2767
2767
|
function o(e) {
|
|
2768
2768
|
n.onClick && n.onClick(e);
|
|
2769
2769
|
}
|
|
2770
|
-
return (s, l) => (
|
|
2770
|
+
return (s, l) => (d(), r("a", {
|
|
2771
2771
|
ref_key: "_ref",
|
|
2772
2772
|
ref: i,
|
|
2773
2773
|
id: t.id ?? t.propOverrides?.id,
|
|
2774
|
-
class: c(
|
|
2774
|
+
class: c(g(S)("db-link", n.class)),
|
|
2775
2775
|
href: t.href,
|
|
2776
2776
|
target: t.target,
|
|
2777
2777
|
rel: t.rel,
|
|
2778
2778
|
role: t.role,
|
|
2779
2779
|
referrerPolicy: t.referrerpolicy ?? t.referrerPolicy,
|
|
2780
2780
|
hrefLang: t.hreflang,
|
|
2781
|
-
"aria-disabled":
|
|
2781
|
+
"aria-disabled": g(O)(t.disabled),
|
|
2782
2782
|
tabIndex: t.disabled ? -1 : 0,
|
|
2783
2783
|
"data-size": t.size,
|
|
2784
|
-
"data-show-icon-trailing":
|
|
2784
|
+
"data-show-icon-trailing": g(O)(t.showIcon ?? !0),
|
|
2785
2785
|
"data-variant": t.variant,
|
|
2786
2786
|
"data-content": t.content || "internal",
|
|
2787
|
-
"data-wrap":
|
|
2787
|
+
"data-wrap": g(O)(t.wrap),
|
|
2788
2788
|
onClick: l[0] ||= async (e) => o(e)
|
|
2789
|
-
}, [t.text ? (
|
|
2789
|
+
}, [t.text ? (d(), r(e, { key: 0 }, [a(h(t.text), 1)], 64)) : m(s.$slots, "default", { key: 1 })], 10, Mn));
|
|
2790
2790
|
}
|
|
2791
|
-
}),
|
|
2791
|
+
}), Pn = [
|
|
2792
2792
|
"adaptive",
|
|
2793
2793
|
"brand",
|
|
2794
2794
|
"inline"
|
|
2795
|
-
],
|
|
2795
|
+
], Fn = ["medium", "small"], In = ["external", "internal"], Ln = ["id"], Rn = /* @__PURE__ */ s({
|
|
2796
2796
|
name: "DBNavigation",
|
|
2797
2797
|
__name: "navigation",
|
|
2798
2798
|
props: {
|
|
@@ -2804,15 +2804,15 @@ var x = () => {
|
|
|
2804
2804
|
propOverrides: { default: void 0 }
|
|
2805
2805
|
},
|
|
2806
2806
|
setup(e) {
|
|
2807
|
-
let t = e, n =
|
|
2808
|
-
return (a, o) => (
|
|
2807
|
+
let t = e, n = f(null);
|
|
2808
|
+
return (a, o) => (d(), r("nav", {
|
|
2809
2809
|
ref_key: "_ref",
|
|
2810
2810
|
ref: n,
|
|
2811
2811
|
id: e.id ?? e.propOverrides?.id,
|
|
2812
|
-
class: c(
|
|
2813
|
-
}, [i("menu", null, [
|
|
2812
|
+
class: c(g(S)("db-navigation", t.class))
|
|
2813
|
+
}, [i("menu", null, [m(a.$slots, "default")])], 10, Ln));
|
|
2814
2814
|
}
|
|
2815
|
-
}),
|
|
2815
|
+
}), zn = [
|
|
2816
2816
|
"id",
|
|
2817
2817
|
"data-width",
|
|
2818
2818
|
"data-icon",
|
|
@@ -2820,20 +2820,20 @@ var x = () => {
|
|
|
2820
2820
|
"data-active",
|
|
2821
2821
|
"data-wrap",
|
|
2822
2822
|
"aria-disabled"
|
|
2823
|
-
],
|
|
2823
|
+
], Bn = [
|
|
2824
2824
|
"id",
|
|
2825
2825
|
"aria-haspopup",
|
|
2826
2826
|
"aria-expanded",
|
|
2827
2827
|
"aria-controls",
|
|
2828
2828
|
"disabled"
|
|
2829
|
-
],
|
|
2829
|
+
], Vn = [
|
|
2830
2830
|
"id",
|
|
2831
2831
|
"aria-labelledby",
|
|
2832
2832
|
"data-force-close"
|
|
2833
|
-
],
|
|
2833
|
+
], Hn = {
|
|
2834
2834
|
key: 0,
|
|
2835
2835
|
class: "db-mobile-navigation-back"
|
|
2836
|
-
},
|
|
2836
|
+
}, Un = /* @__PURE__ */ s({
|
|
2837
2837
|
name: "DBNavigationItem",
|
|
2838
2838
|
__name: "navigation-item",
|
|
2839
2839
|
props: {
|
|
@@ -2876,75 +2876,75 @@ var x = () => {
|
|
|
2876
2876
|
text: { default: void 0 }
|
|
2877
2877
|
},
|
|
2878
2878
|
setup(t) {
|
|
2879
|
-
let s =
|
|
2879
|
+
let s = _(), u = t, p = f(!1), b = f(!1), x = f(!0), C = f(!1), w = f(!1), T = f(void 0), E = f(void 0), A = f(void 0), j = f(null);
|
|
2880
2880
|
l(() => {
|
|
2881
|
-
|
|
2881
|
+
p.value = !0;
|
|
2882
2882
|
let e = `sub-nav-${u.id ?? s}`;
|
|
2883
|
-
E.value = e,
|
|
2884
|
-
}),
|
|
2885
|
-
u.subNavigationExpanded !== void 0 && (
|
|
2883
|
+
E.value = e, A.value = `${e}-toggle`;
|
|
2884
|
+
}), v(() => [u.subNavigationExpanded], () => {
|
|
2885
|
+
u.subNavigationExpanded !== void 0 && (C.value = !!k(u.subNavigationExpanded, "subNavigationExpanded"));
|
|
2886
2886
|
}, {
|
|
2887
2887
|
immediate: !0,
|
|
2888
2888
|
flush: "post"
|
|
2889
|
-
}),
|
|
2890
|
-
if (
|
|
2889
|
+
}), v(() => [p.value, j.value], () => {
|
|
2890
|
+
if (p.value && j.value) {
|
|
2891
2891
|
let e = j.value.querySelector("menu");
|
|
2892
|
-
e && (e.children?.length > 0 ? (
|
|
2892
|
+
e && (e.children?.length > 0 ? (b.value = !0, T.value ||= new pn(j.value, e)) : x.value = !1);
|
|
2893
2893
|
}
|
|
2894
2894
|
}, {
|
|
2895
2895
|
immediate: !0,
|
|
2896
2896
|
flush: "post"
|
|
2897
2897
|
});
|
|
2898
2898
|
function M(e) {
|
|
2899
|
-
e?.target?.nodeName === "A" && (w.value = !0,
|
|
2899
|
+
e?.target?.nodeName === "A" && (w.value = !0, D(() => {
|
|
2900
2900
|
w.value = !1;
|
|
2901
2901
|
}, 1e3));
|
|
2902
2902
|
}
|
|
2903
2903
|
function N(e) {
|
|
2904
|
-
u.onClick && (e.stopPropagation(), u.onClick(e)),
|
|
2904
|
+
u.onClick && (e.stopPropagation(), u.onClick(e)), b.value && (C.value = !0);
|
|
2905
2905
|
}
|
|
2906
2906
|
function P(e) {
|
|
2907
|
-
e.stopPropagation(),
|
|
2907
|
+
e.stopPropagation(), C.value = !1;
|
|
2908
2908
|
}
|
|
2909
|
-
return (s, l) => (
|
|
2909
|
+
return (s, l) => (d(), r("li", {
|
|
2910
2910
|
ref_key: "_ref",
|
|
2911
2911
|
ref: j,
|
|
2912
2912
|
id: t.id ?? t.propOverrides?.id,
|
|
2913
2913
|
onMouseover: l[2] ||= async (e) => T.value?.enableFollow(),
|
|
2914
2914
|
onMouseleave: l[3] ||= async (e) => T.value?.disableFollow(),
|
|
2915
2915
|
onMousemove: l[4] ||= async (e) => T.value?.followByMouseEvent(e),
|
|
2916
|
-
class: c(
|
|
2916
|
+
class: c(g(S)("db-navigation-item", u.class)),
|
|
2917
2917
|
"data-width": t.width,
|
|
2918
2918
|
"data-icon": t.icon,
|
|
2919
|
-
"data-show-icon":
|
|
2919
|
+
"data-show-icon": g(O)(t.showIcon),
|
|
2920
2920
|
"data-active": t.active,
|
|
2921
|
-
"data-wrap":
|
|
2922
|
-
"aria-disabled":
|
|
2923
|
-
}, [x.value ? n("", !0) : (
|
|
2921
|
+
"data-wrap": g(O)(t.wrap),
|
|
2922
|
+
"aria-disabled": g(O)(t.disabled)
|
|
2923
|
+
}, [x.value ? n("", !0) : (d(), r(e, { key: 0 }, [t.text ? (d(), r(e, { key: 0 }, [a(h(t.text), 1)], 64)) : m(s.$slots, "default", { key: 1 })], 64)), x.value ? (d(), r(e, { key: 1 }, [i("button", {
|
|
2924
2924
|
class: "db-navigation-item-expand-button",
|
|
2925
|
-
id:
|
|
2926
|
-
"aria-haspopup":
|
|
2927
|
-
"aria-expanded":
|
|
2925
|
+
id: A.value,
|
|
2926
|
+
"aria-haspopup": b.value ? "true" : void 0,
|
|
2927
|
+
"aria-expanded": C.value,
|
|
2928
2928
|
"aria-controls": E.value,
|
|
2929
|
-
disabled:
|
|
2929
|
+
disabled: g(k)(t.disabled, "disabled"),
|
|
2930
2930
|
onClick: l[0] ||= async (e) => N(e)
|
|
2931
|
-
}, [t.text ? (
|
|
2931
|
+
}, [t.text ? (d(), r(e, { key: 0 }, [a(h(t.text), 1)], 64)) : m(s.$slots, "default", { key: 1 })], 8, Bn), i("menu", {
|
|
2932
2932
|
class: "db-sub-navigation",
|
|
2933
2933
|
id: E.value,
|
|
2934
|
-
"aria-labelledby":
|
|
2934
|
+
"aria-labelledby": A.value,
|
|
2935
2935
|
"data-force-close": w.value,
|
|
2936
2936
|
onClick: l[1] ||= async (e) => M(e)
|
|
2937
|
-
}, [
|
|
2937
|
+
}, [b.value ? (d(), r("div", Hn, [o(Ie, {
|
|
2938
2938
|
icon: "arrow_left",
|
|
2939
2939
|
variant: "ghost",
|
|
2940
2940
|
id: t.backButtonId,
|
|
2941
2941
|
onClick: (e) => P(e)
|
|
2942
2942
|
}, {
|
|
2943
|
-
default:
|
|
2943
|
+
default: y(() => [a(h(t.backButtonText ?? g("Back")), 1)]),
|
|
2944
2944
|
_: 1
|
|
2945
|
-
}, 8, ["id", "onClick"])])) : n("", !0),
|
|
2945
|
+
}, 8, ["id", "onClick"])])) : n("", !0), m(s.$slots, "sub-navigation")], 8, Vn)], 64)) : n("", !0)], 42, zn));
|
|
2946
2946
|
}
|
|
2947
|
-
}),
|
|
2947
|
+
}), Wn = [
|
|
2948
2948
|
"id",
|
|
2949
2949
|
"role",
|
|
2950
2950
|
"aria-live",
|
|
@@ -2953,7 +2953,7 @@ var x = () => {
|
|
|
2953
2953
|
"data-icon",
|
|
2954
2954
|
"data-show-icon",
|
|
2955
2955
|
"data-link-variant"
|
|
2956
|
-
],
|
|
2956
|
+
], Gn = { key: 0 }, Kn = { "data-area": "content" }, qn = { key: 1 }, Jn = /* @__PURE__ */ s({
|
|
2957
2957
|
name: "DBNotification",
|
|
2958
2958
|
__name: "notification",
|
|
2959
2959
|
props: {
|
|
@@ -2999,16 +2999,16 @@ var x = () => {
|
|
|
2999
2999
|
text: { default: void 0 }
|
|
3000
3000
|
},
|
|
3001
3001
|
setup(o) {
|
|
3002
|
-
let s = o, l =
|
|
3002
|
+
let s = o, l = f(null);
|
|
3003
3003
|
function u(e) {
|
|
3004
3004
|
e && (e.stopPropagation(), s.onClose && s.onClose(e));
|
|
3005
3005
|
}
|
|
3006
|
-
return (
|
|
3006
|
+
return (f, p) => (d(), r("div", {
|
|
3007
3007
|
ref_key: "_ref",
|
|
3008
3008
|
ref: l,
|
|
3009
3009
|
id: o.id ?? o.propOverrides?.id,
|
|
3010
|
-
class: c(
|
|
3011
|
-
role:
|
|
3010
|
+
class: c(g(S)("db-notification", s.class)),
|
|
3011
|
+
role: g(z)({
|
|
3012
3012
|
semantic: o.semantic,
|
|
3013
3013
|
role: o.role,
|
|
3014
3014
|
ariaLive: o.ariaLive
|
|
@@ -3016,16 +3016,16 @@ var x = () => {
|
|
|
3016
3016
|
"aria-live": o.ariaLive,
|
|
3017
3017
|
"data-semantic": o.semantic,
|
|
3018
3018
|
"data-variant": o.variant,
|
|
3019
|
-
"data-icon":
|
|
3020
|
-
"data-show-icon":
|
|
3019
|
+
"data-icon": g(k)(o.showIcon) === !1 ? void 0 : o.icon,
|
|
3020
|
+
"data-show-icon": g(O)(o.showIcon),
|
|
3021
3021
|
"data-link-variant": o.linkVariant
|
|
3022
3022
|
}, [
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
i("div",
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3023
|
+
m(f.$slots, "image"),
|
|
3024
|
+
g(F)(o.headline, o.showHeadline) ? (d(), r("header", Gn, h(o.headline), 1)) : n("", !0),
|
|
3025
|
+
i("div", Kn, [o.text ? (d(), r(e, { key: 0 }, [a(h(o.text), 1)], 64)) : m(f.$slots, "default", { key: 1 })]),
|
|
3026
|
+
g(F)(o.timestamp, o.showTimestamp) ? (d(), r("span", qn, h(o.timestamp), 1)) : n("", !0),
|
|
3027
|
+
m(f.$slots, "link"),
|
|
3028
|
+
g(k)(o.closeable, "closeable") ? (d(), t(Ie, {
|
|
3029
3029
|
key: 2,
|
|
3030
3030
|
icon: "cross",
|
|
3031
3031
|
variant: "ghost",
|
|
@@ -3034,25 +3034,25 @@ var x = () => {
|
|
|
3034
3034
|
noText: !0,
|
|
3035
3035
|
onClick: (e) => u(e)
|
|
3036
3036
|
}, {
|
|
3037
|
-
default:
|
|
3037
|
+
default: y(() => [a(h(o.closeButtonText ?? g("Close")), 1)]),
|
|
3038
3038
|
_: 1
|
|
3039
3039
|
}, 8, ["id", "onClick"])) : n("", !0)
|
|
3040
|
-
], 10,
|
|
3040
|
+
], 10, Wn));
|
|
3041
3041
|
}
|
|
3042
|
-
}),
|
|
3042
|
+
}), Yn = [
|
|
3043
3043
|
"docked",
|
|
3044
3044
|
"standalone",
|
|
3045
3045
|
"overlay"
|
|
3046
|
-
],
|
|
3046
|
+
], Xn = ["block", "inline"], Zn = [
|
|
3047
3047
|
"assertive",
|
|
3048
3048
|
"polite",
|
|
3049
3049
|
"off"
|
|
3050
|
-
],
|
|
3050
|
+
], Qn = [
|
|
3051
3051
|
"id",
|
|
3052
3052
|
"data-variant",
|
|
3053
3053
|
"data-fade-in",
|
|
3054
3054
|
"data-fonts-loaded"
|
|
3055
|
-
],
|
|
3055
|
+
], $n = /* @__PURE__ */ s({
|
|
3056
3056
|
name: "DBPage",
|
|
3057
3057
|
__name: "page",
|
|
3058
3058
|
props: {
|
|
@@ -3073,28 +3073,28 @@ var x = () => {
|
|
|
3073
3073
|
propOverrides: { default: void 0 }
|
|
3074
3074
|
},
|
|
3075
3075
|
setup(e) {
|
|
3076
|
-
let t = e, n =
|
|
3076
|
+
let t = e, n = f(!1), a = f(null);
|
|
3077
3077
|
return typeof window < "u" && document && (t.documentOverflow === "hidden" || t.variant === "fixed" && t.documentOverflow !== "auto") && document.documentElement.classList.add("db-page-document"), l(() => {
|
|
3078
3078
|
n.value = !t.fadeIn, document && t.fadeIn ? document.fonts.ready.then(() => {
|
|
3079
3079
|
n.value = !0;
|
|
3080
3080
|
}) : n.value = !0;
|
|
3081
3081
|
}), u(() => {
|
|
3082
3082
|
typeof window < "u" && document.documentElement.classList.contains("db-page-document") && document.documentElement.classList.remove("db-page-document");
|
|
3083
|
-
}), (o, s) => (
|
|
3083
|
+
}), (o, s) => (d(), r("div", {
|
|
3084
3084
|
ref_key: "_ref",
|
|
3085
3085
|
ref: a,
|
|
3086
3086
|
id: e.id ?? e.propOverrides?.id,
|
|
3087
|
-
class: c(
|
|
3087
|
+
class: c(g(S)("db-page", t.class)),
|
|
3088
3088
|
"data-variant": e.variant,
|
|
3089
|
-
"data-fade-in":
|
|
3090
|
-
"data-fonts-loaded":
|
|
3089
|
+
"data-fade-in": g(O)(e.fadeIn),
|
|
3090
|
+
"data-fonts-loaded": g(O)(n.value)
|
|
3091
3091
|
}, [
|
|
3092
|
-
|
|
3093
|
-
i("main", { class: c(
|
|
3094
|
-
|
|
3095
|
-
], 10,
|
|
3092
|
+
m(o.$slots, "header"),
|
|
3093
|
+
i("main", { class: c(g(S)("db-main", e.mainClass)) }, [m(o.$slots, "default")], 2),
|
|
3094
|
+
m(o.$slots, "footer")
|
|
3095
|
+
], 10, Qn));
|
|
3096
3096
|
}
|
|
3097
|
-
}),
|
|
3097
|
+
}), er = ["auto", "fixed"], tr = ["hidden", "auto"], nr = ["id"], rr = [
|
|
3098
3098
|
"data-spacing",
|
|
3099
3099
|
"data-gap",
|
|
3100
3100
|
"data-animation",
|
|
@@ -3102,7 +3102,7 @@ var x = () => {
|
|
|
3102
3102
|
"data-delay",
|
|
3103
3103
|
"data-width",
|
|
3104
3104
|
"data-placement"
|
|
3105
|
-
],
|
|
3105
|
+
], ir = /* @__PURE__ */ s({
|
|
3106
3106
|
name: "DBPopover",
|
|
3107
3107
|
__name: "popover",
|
|
3108
3108
|
props: {
|
|
@@ -3131,26 +3131,26 @@ var x = () => {
|
|
|
3131
3131
|
width: { default: void 0 }
|
|
3132
3132
|
},
|
|
3133
3133
|
setup(e) {
|
|
3134
|
-
let t = e, n =
|
|
3134
|
+
let t = e, n = f(!1), a = f(!1), o = f(void 0), s = f(void 0), u = f(null);
|
|
3135
3135
|
l(() => {
|
|
3136
3136
|
n.value = !0;
|
|
3137
|
-
}),
|
|
3137
|
+
}), v(() => [u.value, n.value], () => {
|
|
3138
3138
|
if (u.value && n.value) {
|
|
3139
3139
|
n.value = !1;
|
|
3140
3140
|
let e = x();
|
|
3141
|
-
e && (e.ariaHasPopup = "true"),
|
|
3142
|
-
u.value.addEventListener(e, () =>
|
|
3141
|
+
e && (e.ariaHasPopup = "true"), h(), u.value.addEventListener("keydown", (e) => p(e)), ["mouseenter", "focusin"].forEach((e) => {
|
|
3142
|
+
u.value.addEventListener(e, () => y());
|
|
3143
3143
|
}), ["mouseleave", "focusout"].forEach((e) => {
|
|
3144
3144
|
u.value.addEventListener(e, () => b());
|
|
3145
3145
|
}), typeof window < "u" && "IntersectionObserver" in window && (s.value = new IntersectionObserver((e) => {
|
|
3146
3146
|
let t = e.find(({ target: e }) => e === x());
|
|
3147
|
-
t && !t.isIntersecting &&
|
|
3147
|
+
t && !t.isIntersecting && p(!1);
|
|
3148
3148
|
}));
|
|
3149
3149
|
}
|
|
3150
3150
|
}, {
|
|
3151
3151
|
immediate: !0,
|
|
3152
3152
|
flush: "post"
|
|
3153
|
-
}),
|
|
3153
|
+
}), v(() => [u.value, a.value], () => {
|
|
3154
3154
|
if (u.value) {
|
|
3155
3155
|
let e = x();
|
|
3156
3156
|
e && (e.ariaExpanded = (!!a.value).toString());
|
|
@@ -3159,28 +3159,28 @@ var x = () => {
|
|
|
3159
3159
|
immediate: !0,
|
|
3160
3160
|
flush: "post"
|
|
3161
3161
|
});
|
|
3162
|
-
function
|
|
3162
|
+
function p(e) {
|
|
3163
3163
|
if (!e || e.key === "Escape") for (let e of Array.from(u.value.children)) e.blur();
|
|
3164
3164
|
}
|
|
3165
|
-
function
|
|
3165
|
+
function h() {
|
|
3166
3166
|
if (!u.value) return;
|
|
3167
3167
|
let e = u.value.querySelector("article");
|
|
3168
|
-
e &&
|
|
3169
|
-
|
|
3168
|
+
e && D(() => {
|
|
3169
|
+
lt(e, u.value, t.placement ?? "bottom");
|
|
3170
3170
|
}, 1);
|
|
3171
3171
|
}
|
|
3172
|
-
function
|
|
3173
|
-
e?.target?.contains && e?.target?.contains(u.value) &&
|
|
3172
|
+
function _(e) {
|
|
3173
|
+
e?.target?.contains && e?.target?.contains(u.value) && h();
|
|
3174
3174
|
}
|
|
3175
|
-
function
|
|
3176
|
-
a.value = !0, o.value = new
|
|
3175
|
+
function y() {
|
|
3176
|
+
a.value = !0, o.value = new tt().addCallback((e) => _(e)), h();
|
|
3177
3177
|
let e = x();
|
|
3178
3178
|
e && s.value?.observe(e);
|
|
3179
3179
|
}
|
|
3180
3180
|
function b(e) {
|
|
3181
3181
|
let t = e?.target;
|
|
3182
3182
|
if (!t?.parentNode || t.parentNode.querySelector(":focus") !== t && t.parentNode.querySelector(":focus-within") !== t && t.parentNode.querySelector(":hover") !== t) {
|
|
3183
|
-
a.value = !1, o.value && new
|
|
3183
|
+
a.value = !1, o.value && new tt().removeCallback(o.value);
|
|
3184
3184
|
let e = x();
|
|
3185
3185
|
e && s.value?.unobserve(e);
|
|
3186
3186
|
}
|
|
@@ -3195,28 +3195,28 @@ var x = () => {
|
|
|
3195
3195
|
}
|
|
3196
3196
|
return null;
|
|
3197
3197
|
}
|
|
3198
|
-
return (n, a) => (
|
|
3198
|
+
return (n, a) => (d(), r("div", {
|
|
3199
3199
|
ref_key: "_ref",
|
|
3200
3200
|
ref: u,
|
|
3201
3201
|
id: e.id ?? e.propOverrides?.id,
|
|
3202
|
-
class: c(
|
|
3203
|
-
}, [
|
|
3202
|
+
class: c(g(S)("db-popover", t.class))
|
|
3203
|
+
}, [m(n.$slots, "trigger"), i("article", {
|
|
3204
3204
|
class: "db-popover-content",
|
|
3205
3205
|
"data-spacing": e.spacing,
|
|
3206
|
-
"data-gap":
|
|
3207
|
-
"data-animation":
|
|
3208
|
-
"data-open":
|
|
3206
|
+
"data-gap": g(O)(e.gap),
|
|
3207
|
+
"data-animation": g(O)(e.animation ?? !0),
|
|
3208
|
+
"data-open": g(O)(e.open),
|
|
3209
3209
|
"data-delay": e.delay,
|
|
3210
3210
|
"data-width": e.width,
|
|
3211
3211
|
"data-placement": e.placement
|
|
3212
|
-
}, [
|
|
3212
|
+
}, [m(n.$slots, "default")], 8, rr)], 10, nr));
|
|
3213
3213
|
}
|
|
3214
|
-
}),
|
|
3214
|
+
}), ar = [
|
|
3215
3215
|
"data-size",
|
|
3216
3216
|
"data-hide-label",
|
|
3217
3217
|
"data-hide-asterisk",
|
|
3218
3218
|
"for"
|
|
3219
|
-
],
|
|
3219
|
+
], or = [
|
|
3220
3220
|
"aria-invalid",
|
|
3221
3221
|
"data-custom-validity",
|
|
3222
3222
|
"id",
|
|
@@ -3225,7 +3225,7 @@ var x = () => {
|
|
|
3225
3225
|
"disabled",
|
|
3226
3226
|
"value",
|
|
3227
3227
|
"required"
|
|
3228
|
-
],
|
|
3228
|
+
], sr = /* @__PURE__ */ s({
|
|
3229
3229
|
name: "DBRadio",
|
|
3230
3230
|
__name: "radio",
|
|
3231
3231
|
props: {
|
|
@@ -3288,31 +3288,31 @@ var x = () => {
|
|
|
3288
3288
|
},
|
|
3289
3289
|
emits: ["update:value"],
|
|
3290
3290
|
setup(t, { emit: n }) {
|
|
3291
|
-
let o =
|
|
3291
|
+
let o = _(), s = n, p = t, y = f(!1), b = f(void 0), x = f(void 0), C = f(null);
|
|
3292
3292
|
l(() => {
|
|
3293
|
-
|
|
3293
|
+
y.value = !0, A();
|
|
3294
3294
|
}), u(() => {
|
|
3295
3295
|
x.value?.abort();
|
|
3296
|
-
}),
|
|
3297
|
-
(
|
|
3296
|
+
}), v(() => [p.id, p.propOverrides?.id], () => {
|
|
3297
|
+
(p.id ?? p.propOverrides?.id) && A();
|
|
3298
3298
|
}, {
|
|
3299
3299
|
immediate: !0,
|
|
3300
3300
|
flush: "post"
|
|
3301
|
-
}),
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3301
|
+
}), v(() => [
|
|
3302
|
+
y.value,
|
|
3303
|
+
C.value,
|
|
3304
|
+
p.checked
|
|
3305
3305
|
], () => {
|
|
3306
|
-
|
|
3306
|
+
p.checked && y.value && C.value && (C.value.checked = !0);
|
|
3307
3307
|
}, {
|
|
3308
3308
|
immediate: !0,
|
|
3309
3309
|
flush: "post"
|
|
3310
|
-
}),
|
|
3311
|
-
if (
|
|
3310
|
+
}), v(() => [C.value], () => {
|
|
3311
|
+
if (C.value) {
|
|
3312
3312
|
let e = x.value;
|
|
3313
|
-
e || (e = new AbortController(), x.value = e),
|
|
3314
|
-
|
|
3315
|
-
let t =
|
|
3313
|
+
e || (e = new AbortController(), x.value = e), Ue(C.value, (e) => {
|
|
3314
|
+
D(() => {
|
|
3315
|
+
let t = p.checked ? p.checked : C.value.checked, n = {
|
|
3316
3316
|
...e,
|
|
3317
3317
|
target: {
|
|
3318
3318
|
...e.target,
|
|
@@ -3329,49 +3329,49 @@ var x = () => {
|
|
|
3329
3329
|
flush: "post"
|
|
3330
3330
|
});
|
|
3331
3331
|
function w(e, t) {
|
|
3332
|
-
|
|
3332
|
+
p.input && p.input(e), p.onInput && p.onInput(e), Q(s, e);
|
|
3333
3333
|
}
|
|
3334
3334
|
function T(e, t) {
|
|
3335
|
-
|
|
3335
|
+
p.onChange && p.onChange(e), Q(s, e);
|
|
3336
3336
|
}
|
|
3337
3337
|
function E(e) {
|
|
3338
|
-
|
|
3338
|
+
p.onBlur && p.onBlur(e);
|
|
3339
3339
|
}
|
|
3340
|
-
function
|
|
3341
|
-
|
|
3340
|
+
function O(e) {
|
|
3341
|
+
p.onFocus && p.onFocus(e);
|
|
3342
3342
|
}
|
|
3343
|
-
function
|
|
3344
|
-
b.value =
|
|
3343
|
+
function A() {
|
|
3344
|
+
b.value = p.id ?? p.propOverrides?.id ?? `radio-${o}`;
|
|
3345
3345
|
}
|
|
3346
|
-
return (n, o) => (
|
|
3346
|
+
return (n, o) => (d(), r("label", {
|
|
3347
3347
|
"data-size": t.size,
|
|
3348
|
-
"data-hide-label":
|
|
3349
|
-
"data-hide-asterisk":
|
|
3350
|
-
class: c(
|
|
3348
|
+
"data-hide-label": g(P)(t.showLabel),
|
|
3349
|
+
"data-hide-asterisk": g(P)(t.showRequiredAsterisk),
|
|
3350
|
+
class: c(g(S)("db-radio", p.class)),
|
|
3351
3351
|
for: b.value
|
|
3352
3352
|
}, [i("input", {
|
|
3353
3353
|
type: "radio",
|
|
3354
3354
|
"aria-invalid": t.validation === "invalid",
|
|
3355
3355
|
"data-custom-validity": t.validation,
|
|
3356
3356
|
ref_key: "_ref",
|
|
3357
|
-
ref:
|
|
3357
|
+
ref: C,
|
|
3358
3358
|
id: b.value,
|
|
3359
3359
|
name: t.name,
|
|
3360
|
-
checked:
|
|
3361
|
-
disabled:
|
|
3360
|
+
checked: g(k)(t.checked, "checked"),
|
|
3361
|
+
disabled: g(k)(t.disabled, "disabled"),
|
|
3362
3362
|
value: t.value,
|
|
3363
|
-
required:
|
|
3363
|
+
required: g(k)(t.required, "required"),
|
|
3364
3364
|
onInput: o[0] ||= async (e) => w(e),
|
|
3365
3365
|
onChange: o[1] ||= async (e) => T(e),
|
|
3366
3366
|
onBlur: o[2] ||= async (e) => E(e),
|
|
3367
|
-
onFocus: o[3] ||= async (e) =>
|
|
3368
|
-
}, null, 40,
|
|
3367
|
+
onFocus: o[3] ||= async (e) => O(e)
|
|
3368
|
+
}, null, 40, or), t.label ? (d(), r(e, { key: 0 }, [a(h(t.label), 1)], 64)) : m(n.$slots, "default", { key: 1 })], 10, ar));
|
|
3369
3369
|
}
|
|
3370
|
-
}),
|
|
3370
|
+
}), cr = [
|
|
3371
3371
|
"id",
|
|
3372
3372
|
"data-spacing",
|
|
3373
3373
|
"data-width"
|
|
3374
|
-
],
|
|
3374
|
+
], lr = /* @__PURE__ */ s({
|
|
3375
3375
|
name: "DBSection",
|
|
3376
3376
|
__name: "section",
|
|
3377
3377
|
props: {
|
|
@@ -3385,23 +3385,23 @@ var x = () => {
|
|
|
3385
3385
|
width: { default: void 0 }
|
|
3386
3386
|
},
|
|
3387
3387
|
setup(e) {
|
|
3388
|
-
let t = e, n =
|
|
3389
|
-
return (i, a) => (
|
|
3388
|
+
let t = e, n = f(null);
|
|
3389
|
+
return (i, a) => (d(), r("section", {
|
|
3390
3390
|
ref_key: "_ref",
|
|
3391
3391
|
ref: n,
|
|
3392
3392
|
id: e.id ?? e.propOverrides?.id,
|
|
3393
|
-
class: c(
|
|
3393
|
+
class: c(g(S)("db-section", t.class)),
|
|
3394
3394
|
"data-spacing": e.spacing || "medium",
|
|
3395
3395
|
"data-width": e.width
|
|
3396
|
-
}, [
|
|
3396
|
+
}, [m(i.$slots, "default")], 10, cr));
|
|
3397
3397
|
}
|
|
3398
|
-
}),
|
|
3398
|
+
}), ur = [
|
|
3399
3399
|
"data-variant",
|
|
3400
3400
|
"data-hide-label",
|
|
3401
3401
|
"data-hide-asterisk",
|
|
3402
3402
|
"data-icon",
|
|
3403
3403
|
"data-show-icon"
|
|
3404
|
-
],
|
|
3404
|
+
], dr = ["for"], fr = [
|
|
3405
3405
|
"aria-invalid",
|
|
3406
3406
|
"data-custom-validity",
|
|
3407
3407
|
"required",
|
|
@@ -3413,18 +3413,18 @@ var x = () => {
|
|
|
3413
3413
|
"autocomplete",
|
|
3414
3414
|
"multiple",
|
|
3415
3415
|
"aria-describedby"
|
|
3416
|
-
],
|
|
3416
|
+
], pr = ["data-show-empty-option"], mr = ["label"], hr = [
|
|
3417
3417
|
"value",
|
|
3418
3418
|
"selected",
|
|
3419
3419
|
"disabled"
|
|
3420
|
-
],
|
|
3420
|
+
], gr = [
|
|
3421
3421
|
"value",
|
|
3422
3422
|
"disabled",
|
|
3423
3423
|
"selected"
|
|
3424
|
-
],
|
|
3424
|
+
], _r = ["id"], vr = {
|
|
3425
3425
|
"data-visually-hidden": "true",
|
|
3426
3426
|
role: "status"
|
|
3427
|
-
},
|
|
3427
|
+
}, yr = /* @__PURE__ */ s({
|
|
3428
3428
|
name: "DBSelect",
|
|
3429
3429
|
__name: "select",
|
|
3430
3430
|
props: {
|
|
@@ -3512,148 +3512,148 @@ var x = () => {
|
|
|
3512
3512
|
size: { default: void 0 }
|
|
3513
3513
|
},
|
|
3514
3514
|
emits: ["update:value"],
|
|
3515
|
-
setup(s, { emit:
|
|
3516
|
-
let x =
|
|
3515
|
+
setup(s, { emit: b }) {
|
|
3516
|
+
let x = _(), C = b, w = s, E = f(void 0), A = f(void 0), j = f(void 0), M = f(void 0), N = f(void 0), I = f(""), L = f(void 0), R = f(""), z = f(!1), B = f(""), V = f(void 0), H = f(null);
|
|
3517
3517
|
l(() => {
|
|
3518
|
-
z.value = !0,
|
|
3518
|
+
z.value = !0, oe(), N.value = w.invalidMessage || "TODO: Add an invalidMessage";
|
|
3519
3519
|
}), u(() => {
|
|
3520
3520
|
V.value?.abort();
|
|
3521
|
-
}),
|
|
3522
|
-
(w.id ?? w.propOverrides?.id) &&
|
|
3521
|
+
}), v(() => [w.id, w.propOverrides?.id], () => {
|
|
3522
|
+
(w.id ?? w.propOverrides?.id) && oe();
|
|
3523
3523
|
}, {
|
|
3524
3524
|
immediate: !0,
|
|
3525
3525
|
flush: "post"
|
|
3526
|
-
}),
|
|
3526
|
+
}), v(() => [H.value, w.invalidMessage], () => {
|
|
3527
3527
|
N.value = w.invalidMessage || H.value?.validationMessage || "TODO: Add an invalidMessage";
|
|
3528
3528
|
}, {
|
|
3529
3529
|
immediate: !0,
|
|
3530
3530
|
flush: "post"
|
|
3531
|
-
}),
|
|
3532
|
-
if (
|
|
3533
|
-
let e =
|
|
3534
|
-
|
|
3531
|
+
}), v(() => [E.value, z.value], () => {
|
|
3532
|
+
if (E.value && z.value) {
|
|
3533
|
+
let e = E.value + K, t = E.value + se;
|
|
3534
|
+
A.value = e, j.value = E.value + q, M.value = E.value + J, I.value = t, F(w.message, w.showMessage) ? L.value = e : w.placeholder ? L.value = t : L.value = void 0, U(), z.value = !1;
|
|
3535
3535
|
}
|
|
3536
3536
|
}, {
|
|
3537
3537
|
immediate: !0,
|
|
3538
3538
|
flush: "post"
|
|
3539
|
-
}),
|
|
3539
|
+
}), v(() => [w.value], () => {
|
|
3540
3540
|
R.value = w.value;
|
|
3541
3541
|
}, {
|
|
3542
3542
|
immediate: !0,
|
|
3543
3543
|
flush: "post"
|
|
3544
|
-
}),
|
|
3544
|
+
}), v(() => [H.value], () => {
|
|
3545
3545
|
if (H.value) {
|
|
3546
3546
|
let e = V.value;
|
|
3547
|
-
e || (e = new AbortController(), V.value = e),
|
|
3547
|
+
e || (e = new AbortController(), V.value = e), Ge(H.value, {
|
|
3548
3548
|
value: w.value,
|
|
3549
3549
|
defaultValue: void 0
|
|
3550
3550
|
}, (e) => {
|
|
3551
|
-
|
|
3551
|
+
ne(e, !0), W(e, !0);
|
|
3552
3552
|
}, e.signal);
|
|
3553
3553
|
}
|
|
3554
3554
|
}, {
|
|
3555
3555
|
immediate: !0,
|
|
3556
3556
|
flush: "post"
|
|
3557
3557
|
});
|
|
3558
|
-
function
|
|
3558
|
+
function ee() {
|
|
3559
3559
|
return !!(w.validMessage ?? w.validation === "valid");
|
|
3560
3560
|
}
|
|
3561
|
-
function
|
|
3562
|
-
!H.value?.validity.valid || w.validation === "invalid" ? (L.value = M.value, N.value = w.invalidMessage || H.value?.validationMessage || "TODO: Add an invalidMessage",
|
|
3561
|
+
function U() {
|
|
3562
|
+
!H.value?.validity.valid || w.validation === "invalid" ? (L.value = M.value, N.value = w.invalidMessage || H.value?.validationMessage || "TODO: Add an invalidMessage", T() && (B.value = N.value, D(() => B.value = "", 1e3))) : ee() && H.value?.validity.valid && w.required ? (L.value = j.value, T() && (B.value = w.validMessage ?? "TODO: Add a validMessage", D(() => B.value = "", 1e3))) : F(w.message, w.showMessage) ? L.value = A.value : w.placeholder ? L.value = I.value : L.value = void 0;
|
|
3563
3563
|
}
|
|
3564
|
-
function
|
|
3564
|
+
function te(e) {
|
|
3565
3565
|
w.onClick && w.onClick(e);
|
|
3566
3566
|
}
|
|
3567
|
-
function
|
|
3568
|
-
w.input && w.input(e), R.value = e.target.value, w.onInput && w.onInput(e),
|
|
3567
|
+
function W(e, t) {
|
|
3568
|
+
w.input && w.input(e), R.value = e.target.value, w.onInput && w.onInput(e), Q(C, e), U();
|
|
3569
3569
|
}
|
|
3570
|
-
function
|
|
3571
|
-
w.onChange && w.onChange(e),
|
|
3570
|
+
function ne(e, t) {
|
|
3571
|
+
w.onChange && w.onChange(e), Q(C, e), U();
|
|
3572
3572
|
}
|
|
3573
|
-
function
|
|
3573
|
+
function re(e) {
|
|
3574
3574
|
w.onBlur && w.onBlur(e);
|
|
3575
3575
|
}
|
|
3576
|
-
function
|
|
3576
|
+
function G(e) {
|
|
3577
3577
|
w.onFocus && w.onFocus(e);
|
|
3578
3578
|
}
|
|
3579
|
-
function
|
|
3579
|
+
function ie(e) {
|
|
3580
3580
|
return e.label ?? e.value?.toString();
|
|
3581
3581
|
}
|
|
3582
|
-
function
|
|
3582
|
+
function ae() {
|
|
3583
3583
|
return w.variant === "floating" || w.placeholder ? w.showEmptyOption === void 0 ? !w.required : w.showEmptyOption : !1;
|
|
3584
3584
|
}
|
|
3585
|
-
function
|
|
3585
|
+
function oe() {
|
|
3586
3586
|
let e = w.id ?? w.propOverrides?.id ?? `select-${x}`;
|
|
3587
|
-
|
|
3587
|
+
E.value = e, A.value = e + K, j.value = e + q, M.value = e + J, I.value = e + se;
|
|
3588
3588
|
}
|
|
3589
|
-
return (l, u) => (
|
|
3590
|
-
class: c(
|
|
3589
|
+
return (l, u) => (d(), r("div", {
|
|
3590
|
+
class: c(g(S)("db-select", w.class)),
|
|
3591
3591
|
"data-variant": s.variant,
|
|
3592
|
-
"data-hide-label":
|
|
3593
|
-
"data-hide-asterisk":
|
|
3592
|
+
"data-hide-label": g(P)(s.showLabel),
|
|
3593
|
+
"data-hide-asterisk": g(P)(s.showRequiredAsterisk),
|
|
3594
3594
|
"data-icon": s.icon,
|
|
3595
|
-
"data-show-icon":
|
|
3595
|
+
"data-show-icon": g(O)(s.showIcon)
|
|
3596
3596
|
}, [
|
|
3597
|
-
i("label", { for:
|
|
3597
|
+
i("label", { for: E.value }, h(s.label ?? g("LABEL SHOULD BE SET")), 9, dr),
|
|
3598
3598
|
i("select", {
|
|
3599
3599
|
"aria-invalid": s.validation === "invalid",
|
|
3600
3600
|
"data-custom-validity": s.validation,
|
|
3601
3601
|
ref_key: "_ref",
|
|
3602
3602
|
ref: H,
|
|
3603
|
-
required:
|
|
3604
|
-
disabled:
|
|
3605
|
-
id:
|
|
3603
|
+
required: g(k)(s.required, "required"),
|
|
3604
|
+
disabled: g(k)(s.disabled, "disabled"),
|
|
3605
|
+
id: E.value,
|
|
3606
3606
|
name: s.name,
|
|
3607
3607
|
size: s.size,
|
|
3608
3608
|
value: s.value ?? R.value ?? "",
|
|
3609
3609
|
autocomplete: s.autocomplete,
|
|
3610
3610
|
multiple: s.multiple,
|
|
3611
|
-
onInput: u[0] ||= async (e) =>
|
|
3612
|
-
onClick: u[1] ||= async (e) =>
|
|
3613
|
-
onChange: u[2] ||= async (e) =>
|
|
3614
|
-
onBlur: u[3] ||= async (e) =>
|
|
3615
|
-
onFocus: u[4] ||= async (e) =>
|
|
3611
|
+
onInput: u[0] ||= async (e) => W(e),
|
|
3612
|
+
onClick: u[1] ||= async (e) => te(e),
|
|
3613
|
+
onChange: u[2] ||= async (e) => ne(e),
|
|
3614
|
+
onBlur: u[3] ||= async (e) => re(e),
|
|
3615
|
+
onFocus: u[4] ||= async (e) => G(e),
|
|
3616
3616
|
"aria-describedby": s.ariaDescribedBy ?? L.value
|
|
3617
|
-
}, [s.variant === "floating" || s.placeholder ? (
|
|
3617
|
+
}, [s.variant === "floating" || s.placeholder ? (d(), r("option", {
|
|
3618
3618
|
key: 0,
|
|
3619
3619
|
class: "placeholder",
|
|
3620
3620
|
value: "",
|
|
3621
|
-
"data-show-empty-option":
|
|
3622
|
-
}, null, 8,
|
|
3621
|
+
"data-show-empty-option": g(O)(ae())
|
|
3622
|
+
}, null, 8, pr)) : n("", !0), s.options?.length ? (d(!0), r(e, { key: 1 }, p(s.options, (t, n) => (d(), r(e, { key: n }, [t.options ? (d(), r("optgroup", {
|
|
3623
3623
|
key: 0,
|
|
3624
|
-
label:
|
|
3625
|
-
}, [(
|
|
3624
|
+
label: ie(t)
|
|
3625
|
+
}, [(d(!0), r(e, null, p(t.options, (e, t) => (d(), r("option", {
|
|
3626
3626
|
key: t,
|
|
3627
3627
|
value: e.value,
|
|
3628
3628
|
selected: e.selected,
|
|
3629
3629
|
disabled: e.disabled
|
|
3630
|
-
},
|
|
3630
|
+
}, h(ie(e)), 9, hr))), 128))], 8, mr)) : (d(), r("option", {
|
|
3631
3631
|
key: 1,
|
|
3632
3632
|
value: t.value,
|
|
3633
3633
|
disabled: t.disabled,
|
|
3634
3634
|
selected: t.selected
|
|
3635
|
-
},
|
|
3636
|
-
s.placeholder ? (
|
|
3635
|
+
}, h(ie(t)), 9, gr))], 64))), 128)) : m(l.$slots, "default", { key: 2 })], 40, fr),
|
|
3636
|
+
s.placeholder ? (d(), r("span", {
|
|
3637
3637
|
key: 0,
|
|
3638
3638
|
class: "db-select-placeholder",
|
|
3639
|
-
id:
|
|
3640
|
-
},
|
|
3641
|
-
|
|
3639
|
+
id: I.value
|
|
3640
|
+
}, h(s.placeholder), 9, _r)) : n("", !0),
|
|
3641
|
+
g(F)(s.message, s.showMessage) ? (d(), t($, {
|
|
3642
3642
|
key: 1,
|
|
3643
3643
|
size: "small",
|
|
3644
3644
|
icon: s.messageIcon,
|
|
3645
|
-
id:
|
|
3645
|
+
id: A.value
|
|
3646
3646
|
}, {
|
|
3647
|
-
default:
|
|
3647
|
+
default: y(() => [a(h(s.message), 1)]),
|
|
3648
3648
|
_: 1
|
|
3649
3649
|
}, 8, ["icon", "id"])) : n("", !0),
|
|
3650
|
-
|
|
3650
|
+
ee() ? (d(), t($, {
|
|
3651
3651
|
key: 2,
|
|
3652
3652
|
size: "small",
|
|
3653
3653
|
semantic: "successful",
|
|
3654
3654
|
id: j.value
|
|
3655
3655
|
}, {
|
|
3656
|
-
default:
|
|
3656
|
+
default: y(() => [a(h(s.validMessage || g("TODO: Add a validMessage")), 1)]),
|
|
3657
3657
|
_: 1
|
|
3658
3658
|
}, 8, ["id"])) : n("", !0),
|
|
3659
3659
|
o($, {
|
|
@@ -3661,13 +3661,13 @@ var x = () => {
|
|
|
3661
3661
|
semantic: "critical",
|
|
3662
3662
|
id: M.value
|
|
3663
3663
|
}, {
|
|
3664
|
-
default:
|
|
3664
|
+
default: y(() => [a(h(N.value), 1)]),
|
|
3665
3665
|
_: 1
|
|
3666
3666
|
}, 8, ["id"]),
|
|
3667
|
-
i("span",
|
|
3668
|
-
], 10,
|
|
3667
|
+
i("span", vr, h(B.value), 1)
|
|
3668
|
+
], 10, ur));
|
|
3669
3669
|
}
|
|
3670
|
-
}),
|
|
3670
|
+
}), br = [
|
|
3671
3671
|
"id",
|
|
3672
3672
|
"data-gap",
|
|
3673
3673
|
"data-variant",
|
|
@@ -3675,7 +3675,7 @@ var x = () => {
|
|
|
3675
3675
|
"data-alignment",
|
|
3676
3676
|
"data-justify-content",
|
|
3677
3677
|
"data-wrap"
|
|
3678
|
-
],
|
|
3678
|
+
], xr = /* @__PURE__ */ s({
|
|
3679
3679
|
name: "DBStack",
|
|
3680
3680
|
__name: "stack",
|
|
3681
3681
|
props: {
|
|
@@ -3696,38 +3696,38 @@ var x = () => {
|
|
|
3696
3696
|
gap: { default: void 0 }
|
|
3697
3697
|
},
|
|
3698
3698
|
setup(e) {
|
|
3699
|
-
let t = e, n =
|
|
3700
|
-
return (i, a) => (
|
|
3699
|
+
let t = e, n = f(null);
|
|
3700
|
+
return (i, a) => (d(), r("div", {
|
|
3701
3701
|
ref_key: "_ref",
|
|
3702
3702
|
ref: n,
|
|
3703
3703
|
id: e.id ?? e.propOverrides?.id,
|
|
3704
|
-
class: c(
|
|
3704
|
+
class: c(g(S)("db-stack", t.class)),
|
|
3705
3705
|
"data-gap": e.gap,
|
|
3706
3706
|
"data-variant": e.variant,
|
|
3707
3707
|
"data-direction": e.direction,
|
|
3708
3708
|
"data-alignment": e.alignment,
|
|
3709
3709
|
"data-justify-content": e.justifyContent,
|
|
3710
|
-
"data-wrap":
|
|
3711
|
-
}, [
|
|
3710
|
+
"data-wrap": g(O)(e.wrap)
|
|
3711
|
+
}, [m(i.$slots, "default")], 10, br));
|
|
3712
3712
|
}
|
|
3713
|
-
}),
|
|
3713
|
+
}), Sr = ["simple", "divider"], Cr = ["row", "column"], wr = [
|
|
3714
3714
|
"stretch",
|
|
3715
3715
|
"start",
|
|
3716
3716
|
"end",
|
|
3717
3717
|
"center"
|
|
3718
|
-
],
|
|
3718
|
+
], Tr = [
|
|
3719
3719
|
"space-between",
|
|
3720
3720
|
"start",
|
|
3721
3721
|
"end",
|
|
3722
3722
|
"center"
|
|
3723
|
-
],
|
|
3723
|
+
], Er = [
|
|
3724
3724
|
"data-visual-aid",
|
|
3725
3725
|
"data-size",
|
|
3726
3726
|
"data-hide-label",
|
|
3727
3727
|
"data-variant",
|
|
3728
3728
|
"data-hide-asterisk",
|
|
3729
3729
|
"data-custom-validity"
|
|
3730
|
-
],
|
|
3730
|
+
], Dr = ["for"], Or = [
|
|
3731
3731
|
"id",
|
|
3732
3732
|
"checked",
|
|
3733
3733
|
"value",
|
|
@@ -3738,10 +3738,10 @@ var x = () => {
|
|
|
3738
3738
|
"required",
|
|
3739
3739
|
"data-aid-icon",
|
|
3740
3740
|
"data-aid-icon-trailing"
|
|
3741
|
-
],
|
|
3741
|
+
], kr = {
|
|
3742
3742
|
"data-visually-hidden": "true",
|
|
3743
3743
|
role: "status"
|
|
3744
|
-
},
|
|
3744
|
+
}, Ar = /* @__PURE__ */ s({
|
|
3745
3745
|
name: "DBSwitch",
|
|
3746
3746
|
__name: "switch",
|
|
3747
3747
|
props: {
|
|
@@ -3813,40 +3813,40 @@ var x = () => {
|
|
|
3813
3813
|
variant: { default: void 0 }
|
|
3814
3814
|
},
|
|
3815
3815
|
emits: ["update:checked"],
|
|
3816
|
-
setup(s, { emit:
|
|
3817
|
-
let
|
|
3816
|
+
setup(s, { emit: p }) {
|
|
3817
|
+
let b = _(), x = p, C = s, w = f(void 0), E = f(void 0), A = f(void 0), j = f(void 0), M = f(void 0), N = f(void 0), I = f(""), L = f(void 0), R = f(null);
|
|
3818
3818
|
l(() => {
|
|
3819
|
-
|
|
3819
|
+
te(), B(), M.value = C.invalidMessage || "TODO: Add an invalidMessage";
|
|
3820
3820
|
}), u(() => {
|
|
3821
3821
|
L.value?.abort();
|
|
3822
|
-
}),
|
|
3823
|
-
(
|
|
3822
|
+
}), v(() => [C.id, C.propOverrides?.id], () => {
|
|
3823
|
+
(C.id ?? C.propOverrides?.id) && te();
|
|
3824
3824
|
}, {
|
|
3825
3825
|
immediate: !0,
|
|
3826
3826
|
flush: "post"
|
|
3827
|
-
}),
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3827
|
+
}), v(() => [
|
|
3828
|
+
C.validation,
|
|
3829
|
+
C.required,
|
|
3830
|
+
C.message,
|
|
3831
|
+
C.showMessage,
|
|
3832
|
+
C.validMessage,
|
|
3833
|
+
C.invalidMessage,
|
|
3834
|
+
C.checked
|
|
3835
3835
|
], () => {
|
|
3836
3836
|
B();
|
|
3837
3837
|
}, {
|
|
3838
3838
|
immediate: !0,
|
|
3839
3839
|
flush: "post"
|
|
3840
|
-
}),
|
|
3841
|
-
M.value =
|
|
3840
|
+
}), v(() => [R.value, C.invalidMessage], () => {
|
|
3841
|
+
M.value = C.invalidMessage || R.value?.validationMessage || "TODO: Add an invalidMessage";
|
|
3842
3842
|
}, {
|
|
3843
3843
|
immediate: !0,
|
|
3844
3844
|
flush: "post"
|
|
3845
|
-
}),
|
|
3845
|
+
}), v(() => [R.value], () => {
|
|
3846
3846
|
if (R.value) {
|
|
3847
3847
|
let e = L.value;
|
|
3848
|
-
e || (e = new AbortController(), L.value = e),
|
|
3849
|
-
checked:
|
|
3848
|
+
e || (e = new AbortController(), L.value = e), We(R.value, {
|
|
3849
|
+
checked: C.checked,
|
|
3850
3850
|
defaultChecked: void 0
|
|
3851
3851
|
}, (e) => {
|
|
3852
3852
|
V(e, !0);
|
|
@@ -3857,51 +3857,51 @@ var x = () => {
|
|
|
3857
3857
|
flush: "post"
|
|
3858
3858
|
});
|
|
3859
3859
|
function z() {
|
|
3860
|
-
return !!(
|
|
3860
|
+
return !!(C.validMessage ?? C.validation === "valid");
|
|
3861
3861
|
}
|
|
3862
3862
|
function B() {
|
|
3863
|
-
if (!R.value?.validity?.valid ||
|
|
3864
|
-
N.value = j.value, M.value =
|
|
3865
|
-
|
|
3863
|
+
if (!R.value?.validity?.valid || C.validation === "invalid") {
|
|
3864
|
+
N.value = j.value, M.value = C.invalidMessage || R.value?.validationMessage || "TODO: Add an invalidMessage", T() && (I.value = M.value || "TODO: Add an invalidMessage", D(() => {
|
|
3865
|
+
I.value = "";
|
|
3866
3866
|
}, 1e3));
|
|
3867
3867
|
return;
|
|
3868
3868
|
}
|
|
3869
|
-
if (z() && R.value?.validity?.valid &&
|
|
3870
|
-
N.value =
|
|
3871
|
-
|
|
3869
|
+
if (z() && R.value?.validity?.valid && C.required) {
|
|
3870
|
+
N.value = A.value, T() && (I.value = C.validMessage ?? "TODO: Add a validMessage", D(() => {
|
|
3871
|
+
I.value = "";
|
|
3872
3872
|
}, 1e3));
|
|
3873
3873
|
return;
|
|
3874
3874
|
}
|
|
3875
|
-
if (
|
|
3876
|
-
N.value =
|
|
3875
|
+
if (F(C.message, C.showMessage)) {
|
|
3876
|
+
N.value = E.value;
|
|
3877
3877
|
return;
|
|
3878
3878
|
}
|
|
3879
3879
|
N.value = void 0;
|
|
3880
3880
|
}
|
|
3881
3881
|
function V(e, t) {
|
|
3882
|
-
|
|
3882
|
+
C.onChange && C.onChange(e), B(), Q(x, e, "checked");
|
|
3883
3883
|
}
|
|
3884
3884
|
function H(e) {
|
|
3885
|
-
|
|
3885
|
+
C.onBlur && C.onBlur(e);
|
|
3886
3886
|
}
|
|
3887
|
-
function
|
|
3888
|
-
|
|
3887
|
+
function ee(e) {
|
|
3888
|
+
C.onFocus && C.onFocus(e);
|
|
3889
3889
|
}
|
|
3890
|
-
function
|
|
3891
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
3890
|
+
function U(e) {
|
|
3891
|
+
e.key === "Enter" && (e.preventDefault(), C.disabled || R.value?.click());
|
|
3892
3892
|
}
|
|
3893
|
-
function
|
|
3894
|
-
let e =
|
|
3895
|
-
w.value = e,
|
|
3893
|
+
function te() {
|
|
3894
|
+
let e = C.id ?? C.propOverrides?.id ?? `switch-${b}`;
|
|
3895
|
+
w.value = e, E.value = `${e}${K}`, A.value = `${e}${q}`, j.value = `${e}${J}`;
|
|
3896
3896
|
}
|
|
3897
|
-
return (l, u) => (
|
|
3898
|
-
"data-visual-aid":
|
|
3897
|
+
return (l, u) => (d(), r("div", {
|
|
3898
|
+
"data-visual-aid": g(O)(s.visualAid),
|
|
3899
3899
|
"data-size": s.size,
|
|
3900
|
-
"data-hide-label":
|
|
3900
|
+
"data-hide-label": g(P)(s.showLabel),
|
|
3901
3901
|
"data-variant": s.variant,
|
|
3902
|
-
"data-hide-asterisk":
|
|
3902
|
+
"data-hide-asterisk": g(P)(s.showRequiredAsterisk),
|
|
3903
3903
|
"data-custom-validity": s.validation,
|
|
3904
|
-
class: c(
|
|
3904
|
+
class: c(g(S)("db-switch", C.class))
|
|
3905
3905
|
}, [
|
|
3906
3906
|
i("label", { for: w.value }, [i("input", {
|
|
3907
3907
|
type: "checkbox",
|
|
@@ -3909,37 +3909,37 @@ var x = () => {
|
|
|
3909
3909
|
id: w.value,
|
|
3910
3910
|
ref_key: "_ref",
|
|
3911
3911
|
ref: R,
|
|
3912
|
-
checked:
|
|
3912
|
+
checked: g(k)(s.checked, "checked"),
|
|
3913
3913
|
value: s.value,
|
|
3914
|
-
disabled:
|
|
3914
|
+
disabled: g(k)(s.disabled, "disabled"),
|
|
3915
3915
|
"aria-invalid": s.validation === "invalid" ? "true" : void 0,
|
|
3916
3916
|
"aria-describedby": N.value,
|
|
3917
3917
|
name: s.name,
|
|
3918
|
-
required:
|
|
3918
|
+
required: g(k)(s.required, "required"),
|
|
3919
3919
|
"data-aid-icon": s.iconLeading ?? s.icon,
|
|
3920
3920
|
"data-aid-icon-trailing": s.iconTrailing,
|
|
3921
3921
|
onChange: u[0] ||= async (e) => V(e),
|
|
3922
3922
|
onBlur: u[1] ||= async (e) => H(e),
|
|
3923
|
-
onFocus: u[2] ||= async (e) =>
|
|
3924
|
-
onKeydown: u[3] ||= async (e) =>
|
|
3925
|
-
}, null, 40,
|
|
3926
|
-
|
|
3923
|
+
onFocus: u[2] ||= async (e) => ee(e),
|
|
3924
|
+
onKeydown: u[3] ||= async (e) => U(e)
|
|
3925
|
+
}, null, 40, Or), s.label ? (d(), r(e, { key: 0 }, [a(h(s.label), 1)], 64)) : m(l.$slots, "default", { key: 1 })], 8, Dr),
|
|
3926
|
+
g(F)(s.message, s.showMessage) ? (d(), t($, {
|
|
3927
3927
|
key: 0,
|
|
3928
3928
|
size: "small",
|
|
3929
3929
|
semantic: "adaptive",
|
|
3930
|
-
id:
|
|
3930
|
+
id: E.value,
|
|
3931
3931
|
icon: s.messageIcon
|
|
3932
3932
|
}, {
|
|
3933
|
-
default:
|
|
3933
|
+
default: y(() => [a(h(s.message), 1)]),
|
|
3934
3934
|
_: 1
|
|
3935
3935
|
}, 8, ["id", "icon"])) : n("", !0),
|
|
3936
|
-
z() ? (
|
|
3936
|
+
z() ? (d(), t($, {
|
|
3937
3937
|
key: 1,
|
|
3938
3938
|
size: "small",
|
|
3939
3939
|
semantic: "successful",
|
|
3940
|
-
id:
|
|
3940
|
+
id: A.value
|
|
3941
3941
|
}, {
|
|
3942
|
-
default:
|
|
3942
|
+
default: y(() => [a(h(s.validMessage ?? g("TODO: Add a validMessage")), 1)]),
|
|
3943
3943
|
_: 1
|
|
3944
3944
|
}, 8, ["id"])) : n("", !0),
|
|
3945
3945
|
o($, {
|
|
@@ -3947,26 +3947,39 @@ var x = () => {
|
|
|
3947
3947
|
semantic: "critical",
|
|
3948
3948
|
id: j.value
|
|
3949
3949
|
}, {
|
|
3950
|
-
default:
|
|
3950
|
+
default: y(() => [a(h(M.value), 1)]),
|
|
3951
3951
|
_: 1
|
|
3952
3952
|
}, 8, ["id"]),
|
|
3953
|
-
i("span",
|
|
3954
|
-
], 10,
|
|
3953
|
+
i("span", kr, h(I.value), 1)
|
|
3954
|
+
], 10, Er));
|
|
3955
3955
|
}
|
|
3956
|
-
}),
|
|
3957
|
-
"
|
|
3958
|
-
"
|
|
3959
|
-
"
|
|
3956
|
+
}), jr = [
|
|
3957
|
+
"for",
|
|
3958
|
+
"data-icon",
|
|
3959
|
+
"data-icon-trailing",
|
|
3960
|
+
"data-show-icon",
|
|
3961
|
+
"data-show-icon-trailing",
|
|
3962
|
+
"data-no-text"
|
|
3963
|
+
], Mr = [
|
|
3960
3964
|
"disabled",
|
|
3961
|
-
"
|
|
3962
|
-
"
|
|
3963
|
-
"
|
|
3964
|
-
"
|
|
3965
|
-
|
|
3966
|
-
], Nr = ["data-icon", "data-icon-trailing"], Pr = ["data-icon"], Fr = /* @__PURE__ */ s({
|
|
3965
|
+
"aria-selected",
|
|
3966
|
+
"checked",
|
|
3967
|
+
"name",
|
|
3968
|
+
"id"
|
|
3969
|
+
], Nr = /* @__PURE__ */ s({
|
|
3967
3970
|
name: "DBTabItem",
|
|
3968
3971
|
__name: "tab-item",
|
|
3969
3972
|
props: {
|
|
3973
|
+
children: { default: void 0 },
|
|
3974
|
+
className: { default: void 0 },
|
|
3975
|
+
class: {},
|
|
3976
|
+
id: { default: void 0 },
|
|
3977
|
+
autofocus: { type: [Boolean, String] },
|
|
3978
|
+
propOverrides: { default: void 0 },
|
|
3979
|
+
checked: {
|
|
3980
|
+
type: [Boolean, String],
|
|
3981
|
+
default: void 0
|
|
3982
|
+
},
|
|
3970
3983
|
disabled: {
|
|
3971
3984
|
type: [Boolean, String],
|
|
3972
3985
|
default: void 0
|
|
@@ -3976,227 +3989,145 @@ var x = () => {
|
|
|
3976
3989
|
type: [Boolean, String],
|
|
3977
3990
|
default: void 0
|
|
3978
3991
|
},
|
|
3979
|
-
tabIndex: { default: void 0 },
|
|
3980
|
-
ariaControls: { default: void 0 },
|
|
3981
|
-
value: { default: void 0 },
|
|
3982
|
-
children: {},
|
|
3983
|
-
className: { default: void 0 },
|
|
3984
|
-
class: {},
|
|
3985
|
-
id: { default: void 0 },
|
|
3986
|
-
autofocus: { type: [Boolean, String] },
|
|
3987
|
-
propOverrides: {},
|
|
3988
|
-
onClick: {
|
|
3989
|
-
type: Function,
|
|
3990
|
-
default: void 0
|
|
3991
|
-
},
|
|
3992
|
-
click: {},
|
|
3993
3992
|
icon: { default: void 0 },
|
|
3994
|
-
|
|
3993
|
+
iconTrailing: { default: void 0 },
|
|
3994
|
+
iconLeading: { default: void 0 },
|
|
3995
|
+
showIconLeading: {
|
|
3995
3996
|
type: [Boolean, String],
|
|
3996
3997
|
default: void 0
|
|
3997
3998
|
},
|
|
3998
|
-
iconTrailing: { default: void 0 },
|
|
3999
|
-
iconLeading: { default: void 0 },
|
|
4000
3999
|
showIconTrailing: {
|
|
4001
4000
|
type: [Boolean, String],
|
|
4002
4001
|
default: void 0
|
|
4003
4002
|
},
|
|
4004
|
-
|
|
4003
|
+
active: {
|
|
4005
4004
|
type: [Boolean, String],
|
|
4006
4005
|
default: void 0
|
|
4007
4006
|
},
|
|
4008
|
-
|
|
4007
|
+
change: {},
|
|
4008
|
+
onChange: {
|
|
4009
|
+
type: Function,
|
|
4010
|
+
default: void 0
|
|
4011
|
+
},
|
|
4012
|
+
showIcon: {
|
|
4009
4013
|
type: [Boolean, String],
|
|
4010
4014
|
default: void 0
|
|
4011
4015
|
},
|
|
4012
|
-
|
|
4016
|
+
name: { default: void 0 }
|
|
4013
4017
|
},
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
p(!1);
|
|
4017
|
-
let s = p(!1), m = p(-1), v = p(!1), x = p(""), S = p(null), w = p(null), T = p(null), E = p(null);
|
|
4018
|
+
emits: ["update:checked"],
|
|
4019
|
+
setup(t, { emit: o }) {
|
|
4020
|
+
let s = o, p = t, _ = f(!1), y = f(void 0), b = f(!1), x = f(!1), C = f(void 0), w = f(null);
|
|
4018
4021
|
l(() => {
|
|
4019
|
-
|
|
4020
|
-
let e = () => {
|
|
4021
|
-
requestAnimationFrame(() => {
|
|
4022
|
-
k();
|
|
4023
|
-
let e = E.value;
|
|
4024
|
-
if (e && !e.dataset.label && (e.dataset.label = o.label || e.innerText || e.textContent || ""), E.value) {
|
|
4025
|
-
let e = new ResizeObserver(() => {
|
|
4026
|
-
requestAnimationFrame(() => {
|
|
4027
|
-
k();
|
|
4028
|
-
});
|
|
4029
|
-
});
|
|
4030
|
-
e.observe(E.value), S.value = e;
|
|
4031
|
-
}
|
|
4032
|
-
});
|
|
4033
|
-
};
|
|
4034
|
-
o.showIcon && o.icon && document.fonts?.ready ? document.fonts.ready.then(e) : e();
|
|
4035
|
-
}
|
|
4036
|
-
if (T.value) {
|
|
4037
|
-
let e = (e) => {
|
|
4038
|
-
s.value = e.detail.selected, o.tabIndex === void 0 && (e.detail.tabIndex === void 0 ? m.value = e.detail.selected ? 0 : -1 : m.value = e.detail.tabIndex);
|
|
4039
|
-
};
|
|
4040
|
-
w.value = { fn: e }, T.value.addEventListener("aria-selected-changed", e);
|
|
4041
|
-
}
|
|
4022
|
+
C.value = T, b.value = !0;
|
|
4042
4023
|
}), u(() => {
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4024
|
+
x.value && w.value && C.value && (w.value.closest("[role=tablist]")?.removeEventListener("change", C.value), x.value = !1);
|
|
4025
|
+
}), v(() => [
|
|
4026
|
+
w.value,
|
|
4027
|
+
b.value,
|
|
4028
|
+
C.value
|
|
4029
|
+
], () => {
|
|
4030
|
+
w.value && b.value && C.value && (b.value = !1, x.value ||= (w.value.closest("[role=tablist]")?.addEventListener("change", C.value), !0), (p.active || w.value.checked) && (_.value = !0, w.value.click()));
|
|
4031
|
+
}, {
|
|
4032
|
+
immediate: !0,
|
|
4033
|
+
flush: "post"
|
|
4034
|
+
}), v(() => [p.name], () => {
|
|
4035
|
+
p.name && (y.value = p.name);
|
|
4053
4036
|
}, {
|
|
4054
4037
|
immediate: !0,
|
|
4055
4038
|
flush: "post"
|
|
4056
4039
|
});
|
|
4057
|
-
function
|
|
4058
|
-
|
|
4059
|
-
}
|
|
4060
|
-
function O(e) {
|
|
4061
|
-
e && e.preventDefault && e.preventDefault(), !A(o.disabled) && o.onClick && o.onClick(e);
|
|
4040
|
+
function T(e) {
|
|
4041
|
+
e.stopPropagation(), _.value = e.target === w.value;
|
|
4062
4042
|
}
|
|
4063
|
-
function
|
|
4064
|
-
|
|
4065
|
-
let e = Math.ceil(E.value.scrollWidth) > Math.ceil(E.value.clientWidth) + 1;
|
|
4066
|
-
v.value !== e && (v.value = e, !e && T.value && (T.value.hasAttribute("data-has-tooltip") && T.value.removeAttribute("data-has-tooltip"), T.value.hasAttribute("aria-describedby") && T.value.removeAttribute("aria-describedby"))), x.value = e && (o.label || E.value.innerText || E.value.textContent) || "";
|
|
4067
|
-
}
|
|
4043
|
+
function E(e) {
|
|
4044
|
+
p.onChange && p.onChange(e), Q(s, e, "checked");
|
|
4068
4045
|
}
|
|
4069
|
-
return (
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
"
|
|
4077
|
-
"
|
|
4078
|
-
"
|
|
4079
|
-
disabled: _(A)(i.disabled) ? !0 : void 0,
|
|
4080
|
-
tabIndex: D(),
|
|
4081
|
-
id: i.id,
|
|
4082
|
-
"data-active": i.active === void 0 ? s.value : _(A)(i.active),
|
|
4083
|
-
"data-no-text": _(A)(i.noText) ? "true" : void 0,
|
|
4084
|
-
"data-value": i.value,
|
|
4085
|
-
onClick: u[0] ||= async (e) => O(e)
|
|
4046
|
+
return (o, s) => (d(), r("li", {
|
|
4047
|
+
role: "none",
|
|
4048
|
+
class: c(g(S)("db-tab-item", p.class))
|
|
4049
|
+
}, [i("label", {
|
|
4050
|
+
for: t.id ?? t.propOverrides?.id,
|
|
4051
|
+
"data-icon": t.iconLeading ?? t.icon,
|
|
4052
|
+
"data-icon-trailing": t.iconTrailing,
|
|
4053
|
+
"data-show-icon": g(O)(t.showIconLeading ?? t.showIcon),
|
|
4054
|
+
"data-show-icon-trailing": g(O)(t.showIconTrailing),
|
|
4055
|
+
"data-no-text": g(O)(t.noText)
|
|
4086
4056
|
}, [
|
|
4087
|
-
i
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
"
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
v.value && x.value ? (f(), t(Ot, {
|
|
4103
|
-
key: 2,
|
|
4104
|
-
placement: "right"
|
|
4105
|
-
}, {
|
|
4106
|
-
default: b(() => [a(g(x.value), 1)]),
|
|
4107
|
-
_: 1
|
|
4108
|
-
})) : n("", !0)
|
|
4109
|
-
], 10, Mr));
|
|
4057
|
+
i("input", {
|
|
4058
|
+
type: "radio",
|
|
4059
|
+
role: "tab",
|
|
4060
|
+
disabled: g(k)(t.disabled, "disabled"),
|
|
4061
|
+
"aria-selected": _.value,
|
|
4062
|
+
checked: g(k)(t.checked, "checked"),
|
|
4063
|
+
ref_key: "_ref",
|
|
4064
|
+
ref: w,
|
|
4065
|
+
name: y.value,
|
|
4066
|
+
id: t.id ?? t.propOverrides?.id,
|
|
4067
|
+
onInput: s[0] ||= async (e) => E(e)
|
|
4068
|
+
}, null, 40, Mr),
|
|
4069
|
+
t.label ? (d(), r(e, { key: 0 }, [a(h(t.label), 1)], 64)) : n("", !0),
|
|
4070
|
+
m(o.$slots, "default")
|
|
4071
|
+
], 8, jr)], 2));
|
|
4110
4072
|
}
|
|
4111
|
-
}), Ir =
|
|
4112
|
-
"id",
|
|
4113
|
-
"aria-orientation",
|
|
4114
|
-
"aria-label",
|
|
4115
|
-
"aria-labelledby"
|
|
4116
|
-
], Lr = /* @__PURE__ */ s({
|
|
4073
|
+
}), Pr = ["id"], Fr = { role: "tablist" }, Ir = /* @__PURE__ */ s({
|
|
4117
4074
|
name: "DBTabList",
|
|
4118
4075
|
__name: "tab-list",
|
|
4119
4076
|
props: {
|
|
4120
|
-
ariaLabel: { default: void 0 },
|
|
4121
|
-
ariaLabelledby: { default: void 0 },
|
|
4122
4077
|
children: { default: void 0 },
|
|
4123
4078
|
className: { default: void 0 },
|
|
4124
4079
|
class: {},
|
|
4125
4080
|
id: { default: void 0 },
|
|
4126
4081
|
autofocus: { type: [Boolean, String] },
|
|
4127
|
-
propOverrides: {}
|
|
4128
|
-
orientation: { default: void 0 }
|
|
4082
|
+
propOverrides: { default: void 0 }
|
|
4129
4083
|
},
|
|
4130
4084
|
setup(e) {
|
|
4131
|
-
let t =
|
|
4132
|
-
return
|
|
4133
|
-
i.value = n.id || "tab-list-" + t;
|
|
4134
|
-
}), (t, o) => (f(), r("div", {
|
|
4135
|
-
role: "tablist",
|
|
4085
|
+
let t = e, n = f(null);
|
|
4086
|
+
return (a, o) => (d(), r("div", {
|
|
4136
4087
|
ref_key: "_ref",
|
|
4137
|
-
ref:
|
|
4138
|
-
id:
|
|
4139
|
-
class: c(
|
|
4140
|
-
|
|
4141
|
-
"aria-label": e.ariaLabelledby ? void 0 : e.ariaLabel,
|
|
4142
|
-
"aria-labelledby": e.ariaLabelledby
|
|
4143
|
-
}, [h(t.$slots, "default")], 10, Ir));
|
|
4088
|
+
ref: n,
|
|
4089
|
+
id: e.id ?? e.propOverrides?.id,
|
|
4090
|
+
class: c(g(S)("db-tab-list", t.class))
|
|
4091
|
+
}, [i("ul", Fr, [m(a.$slots, "default")])], 10, Pr));
|
|
4144
4092
|
}
|
|
4145
|
-
}), Rr =
|
|
4146
|
-
"id",
|
|
4147
|
-
"tabIndex",
|
|
4148
|
-
"hidden",
|
|
4149
|
-
"aria-label",
|
|
4150
|
-
"aria-labelledby"
|
|
4151
|
-
], zr = /* @__PURE__ */ s({
|
|
4093
|
+
}), Lr = ["id"], Rr = /* @__PURE__ */ s({
|
|
4152
4094
|
name: "DBTabPanel",
|
|
4153
4095
|
__name: "tab-panel",
|
|
4154
4096
|
props: {
|
|
4155
|
-
content: {},
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
ariaLabel: {},
|
|
4159
|
-
children: {},
|
|
4160
|
-
className: {},
|
|
4097
|
+
content: { default: void 0 },
|
|
4098
|
+
children: { default: void 0 },
|
|
4099
|
+
className: { default: void 0 },
|
|
4161
4100
|
class: {},
|
|
4162
|
-
id: {},
|
|
4101
|
+
id: { default: void 0 },
|
|
4163
4102
|
autofocus: { type: [Boolean, String] },
|
|
4164
|
-
propOverrides: {}
|
|
4103
|
+
propOverrides: { default: void 0 }
|
|
4165
4104
|
},
|
|
4166
4105
|
setup(t) {
|
|
4167
|
-
let i = t, o =
|
|
4168
|
-
return (s, l) => (
|
|
4106
|
+
let i = t, o = f(null);
|
|
4107
|
+
return l(() => {}), (s, l) => (d(), r("section", {
|
|
4169
4108
|
role: "tabpanel",
|
|
4170
4109
|
ref_key: "_ref",
|
|
4171
4110
|
ref: o,
|
|
4172
|
-
class: c(
|
|
4173
|
-
id: t.id ?? t.propOverrides?.id
|
|
4174
|
-
|
|
4175
|
-
hidden: t.hidden,
|
|
4176
|
-
"aria-label": t.ariaLabel,
|
|
4177
|
-
"aria-labelledby": t.ariaLabel ? void 0 : t.ariaLabelledby
|
|
4178
|
-
}, [t.content ? (f(), r(e, { key: 0 }, [a(g(t.content), 1)], 64)) : n("", !0), h(s.$slots, "default")], 10, Rr));
|
|
4111
|
+
class: c(g(S)("db-tab-panel", i.class)),
|
|
4112
|
+
id: t.id ?? t.propOverrides?.id
|
|
4113
|
+
}, [t.content ? (d(), r(e, { key: 0 }, [a(h(t.content), 1)], 64)) : n("", !0), m(s.$slots, "default")], 10, Lr));
|
|
4179
4114
|
}
|
|
4180
|
-
}),
|
|
4115
|
+
}), zr = [
|
|
4181
4116
|
"id",
|
|
4182
4117
|
"data-orientation",
|
|
4183
4118
|
"data-scroll-behavior",
|
|
4184
|
-
"data-
|
|
4185
|
-
"data-
|
|
4186
|
-
],
|
|
4119
|
+
"data-alignment",
|
|
4120
|
+
"data-width"
|
|
4121
|
+
], Br = /* @__PURE__ */ s({
|
|
4187
4122
|
name: "DBTabs",
|
|
4188
4123
|
__name: "tabs",
|
|
4189
4124
|
props: {
|
|
4190
4125
|
arrowScrollDistance: { default: void 0 },
|
|
4191
4126
|
behavior: { default: void 0 },
|
|
4192
4127
|
initialSelectedIndex: { default: void 0 },
|
|
4193
|
-
activeIndex: { default: void 0 },
|
|
4194
4128
|
initialSelectedMode: { default: void 0 },
|
|
4195
4129
|
name: { default: void 0 },
|
|
4196
4130
|
tabs: { default: void 0 },
|
|
4197
|
-
tabItemWidth: { default: "auto" },
|
|
4198
|
-
scrollStartLabel: { default: "Scroll start" },
|
|
4199
|
-
scrollEndLabel: { default: "Scroll end" },
|
|
4200
4131
|
children: { default: void 0 },
|
|
4201
4132
|
className: { default: void 0 },
|
|
4202
4133
|
class: {},
|
|
@@ -4204,306 +4135,183 @@ var x = () => {
|
|
|
4204
4135
|
autofocus: { type: [Boolean, String] },
|
|
4205
4136
|
propOverrides: { default: void 0 },
|
|
4206
4137
|
orientation: { default: void 0 },
|
|
4207
|
-
|
|
4138
|
+
width: { default: void 0 },
|
|
4139
|
+
alignment: { default: void 0 },
|
|
4208
4140
|
indexChange: {},
|
|
4209
4141
|
onIndexChange: {
|
|
4210
4142
|
type: Function,
|
|
4211
4143
|
default: void 0
|
|
4212
4144
|
},
|
|
4213
|
-
|
|
4145
|
+
onTabSelect: {
|
|
4214
4146
|
type: Function,
|
|
4215
4147
|
default: void 0
|
|
4216
|
-
}
|
|
4148
|
+
},
|
|
4149
|
+
tabSelect: {}
|
|
4217
4150
|
},
|
|
4218
4151
|
setup(i) {
|
|
4219
|
-
let s =
|
|
4152
|
+
let s = _(), b = i, x = f(""), C = f(!1), w = f(!1), T = f(!1), E = f(null), D = f(void 0), O = f(null);
|
|
4220
4153
|
l(() => {
|
|
4221
|
-
|
|
4222
|
-
if (d.initialSelectedIndex !== void 0) {
|
|
4223
|
-
let t = Number(d.initialSelectedIndex);
|
|
4224
|
-
e = isNaN(t) ? 0 : t;
|
|
4225
|
-
} else d.initialSelectedMode === "manually" && (e = -1);
|
|
4226
|
-
if (typeof window < "u" && window.location.hash) {
|
|
4227
|
-
let t = window.location.hash.substring(1), n = `${d.name ? "tabs-" + d.name : F()}-tab-`;
|
|
4228
|
-
if (t.startsWith(n)) {
|
|
4229
|
-
let r = t.replace(n, ""), i = parseInt(r, 10);
|
|
4230
|
-
isNaN(i) || (e = i);
|
|
4231
|
-
}
|
|
4232
|
-
}
|
|
4233
|
-
if (w.value = e, T.value = !0, U(), typeof window < "u" && requestAnimationFrame(() => {
|
|
4234
|
-
K(), q(e);
|
|
4235
|
-
}), N.value) {
|
|
4236
|
-
let e = N.value.querySelector("[role=\"tablist\"]");
|
|
4237
|
-
if (e) {
|
|
4238
|
-
let t = new MutationObserver(() => {
|
|
4239
|
-
let e = A.value;
|
|
4240
|
-
e !== null && cancelAnimationFrame(e), A.value = requestAnimationFrame(() => {
|
|
4241
|
-
A.value = null, K(), q(w.value);
|
|
4242
|
-
});
|
|
4243
|
-
});
|
|
4244
|
-
t.observe(e, {
|
|
4245
|
-
childList: !0,
|
|
4246
|
-
subtree: !0
|
|
4247
|
-
}), k.value = t;
|
|
4248
|
-
}
|
|
4249
|
-
}
|
|
4154
|
+
x.value = `tabs-${b.name || s}`, C.value = !0;
|
|
4250
4155
|
}), u(() => {
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4156
|
+
D.value?.disconnect(), D.value = void 0;
|
|
4157
|
+
}), v(() => [O.value, C.value], () => {
|
|
4158
|
+
if (O.value && C.value) {
|
|
4159
|
+
M(), N(!0);
|
|
4160
|
+
let e = O.value.querySelector(".db-tab-list");
|
|
4161
|
+
e && new MutationObserver((e) => {
|
|
4162
|
+
e.forEach((e) => {
|
|
4163
|
+
(e.removedNodes.length || e.addedNodes.length) && (M(), N());
|
|
4164
|
+
});
|
|
4165
|
+
}).observe(e, {
|
|
4166
|
+
childList: !0,
|
|
4167
|
+
subtree: !0
|
|
4168
|
+
}), C.value = !1;
|
|
4264
4169
|
}
|
|
4265
4170
|
}, {
|
|
4266
4171
|
immediate: !0,
|
|
4267
4172
|
flush: "post"
|
|
4268
4173
|
});
|
|
4269
|
-
function
|
|
4270
|
-
return d.id || x.value;
|
|
4271
|
-
}
|
|
4272
|
-
function F() {
|
|
4273
|
-
return "tabs-" + (d.name || S.value);
|
|
4274
|
-
}
|
|
4275
|
-
function I(e) {
|
|
4276
|
-
return `${F()}-tab-${e}`;
|
|
4277
|
-
}
|
|
4278
|
-
function L(e) {
|
|
4279
|
-
return `${F()}-tab-panel-${e}`;
|
|
4280
|
-
}
|
|
4281
|
-
function R(e) {
|
|
4282
|
-
if (N.value) {
|
|
4283
|
-
let t = N.value.querySelector("[role=\"tablist\"]");
|
|
4284
|
-
if (t) {
|
|
4285
|
-
let n = Array.from(t.querySelectorAll("[role=\"tab\"]"))[e];
|
|
4286
|
-
if (n?.disabled || n?.getAttribute("aria-disabled") === "true") return;
|
|
4287
|
-
}
|
|
4288
|
-
}
|
|
4289
|
-
if (w.value !== e) {
|
|
4290
|
-
if (w.value = e, d.onIndexChange && d.onIndexChange(e), d.onValueChange) {
|
|
4291
|
-
let t = N.value?.querySelector("[role=\"tablist\"]"), n = (t ? Array.from(t.querySelectorAll("[role=\"tab\"]")) : [])[e]?.dataset?.value;
|
|
4292
|
-
d.onValueChange(n);
|
|
4293
|
-
}
|
|
4294
|
-
q(e);
|
|
4295
|
-
}
|
|
4296
|
-
}
|
|
4297
|
-
function z(e) {
|
|
4298
|
-
if (d.tabs) return;
|
|
4299
|
-
let t = e.target.closest("[role=\"tab\"]");
|
|
4300
|
-
if (!t || !N.value) return;
|
|
4301
|
-
let n = N.value?.querySelector("[role=\"tablist\"]");
|
|
4302
|
-
if (!n) return;
|
|
4303
|
-
let r = Array.from(n.querySelectorAll("[role=\"tab\"]")).indexOf(t);
|
|
4304
|
-
r !== -1 && (e.preventDefault(), R(r));
|
|
4305
|
-
}
|
|
4306
|
-
function B(e) {
|
|
4307
|
-
if (!N.value) return;
|
|
4308
|
-
let t = e.key;
|
|
4309
|
-
if (![
|
|
4310
|
-
"ArrowRight",
|
|
4311
|
-
"ArrowDown",
|
|
4312
|
-
"ArrowLeft",
|
|
4313
|
-
"ArrowUp",
|
|
4314
|
-
"Home",
|
|
4315
|
-
"End",
|
|
4316
|
-
"Enter",
|
|
4317
|
-
" "
|
|
4318
|
-
].includes(t)) return;
|
|
4319
|
-
let n = N.value.querySelector("[role=\"tablist\"]");
|
|
4320
|
-
if (!n) return;
|
|
4321
|
-
let r = Array.from(n.querySelectorAll("[role=\"tab\"]")), i = -1;
|
|
4322
|
-
if (typeof document < "u") {
|
|
4323
|
-
let e = document.activeElement;
|
|
4324
|
-
for (; e?.shadowRoot?.activeElement;) e = e.shadowRoot.activeElement;
|
|
4325
|
-
if (e) {
|
|
4326
|
-
let t = e.closest("[role=\"tab\"]");
|
|
4327
|
-
t && (i = r.indexOf(t));
|
|
4328
|
-
}
|
|
4329
|
-
}
|
|
4330
|
-
if (i === -1 && (i = w.value), r.length > 0) {
|
|
4331
|
-
if (t === "Enter" || t === " ") {
|
|
4332
|
-
e.preventDefault(), R(i);
|
|
4333
|
-
return;
|
|
4334
|
-
}
|
|
4335
|
-
let n, a = r.length;
|
|
4336
|
-
if (t === "ArrowRight" || t === "ArrowDown" ? n = (i + 1) % a : t === "ArrowLeft" || t === "ArrowUp" ? n = (i - 1 + a) % a : t === "Home" ? n = 0 : t === "End" && (n = a - 1), n !== void 0) {
|
|
4337
|
-
e.preventDefault();
|
|
4338
|
-
let i = t === "ArrowRight" || t === "ArrowDown", o = a;
|
|
4339
|
-
for (let e = 0; e < o; e++) {
|
|
4340
|
-
let e = r[n];
|
|
4341
|
-
if (!e?.disabled && e?.getAttribute("aria-disabled") !== "true") break;
|
|
4342
|
-
n = i ? (n + 1) % a : (n - 1 + a) % a;
|
|
4343
|
-
}
|
|
4344
|
-
let s = r[n];
|
|
4345
|
-
s && !s.disabled && s.getAttribute("aria-disabled") !== "true" && s.focus();
|
|
4346
|
-
}
|
|
4347
|
-
}
|
|
4348
|
-
}
|
|
4349
|
-
function V(e) {
|
|
4350
|
-
return w.value === Number(e);
|
|
4351
|
-
}
|
|
4352
|
-
function H(e) {
|
|
4353
|
-
let t = Number(e);
|
|
4354
|
-
return w.value === t || w.value === -1 && t === 0 ? 0 : -1;
|
|
4355
|
-
}
|
|
4356
|
-
function U() {
|
|
4174
|
+
function k() {
|
|
4357
4175
|
try {
|
|
4358
|
-
typeof
|
|
4176
|
+
return typeof b.tabs == "string" ? JSON.parse(b.tabs) : b.tabs;
|
|
4359
4177
|
} catch (e) {
|
|
4360
|
-
console.error(e)
|
|
4178
|
+
console.error(e);
|
|
4361
4179
|
}
|
|
4180
|
+
return [];
|
|
4362
4181
|
}
|
|
4363
|
-
function
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
function ee() {
|
|
4367
|
-
let e = W();
|
|
4368
|
-
return !!e && typeof getComputedStyle < "u" && getComputedStyle(e).direction === "rtl";
|
|
4369
|
-
}
|
|
4370
|
-
function G(e) {
|
|
4371
|
-
if (!(e.scrollWidth > e.clientWidth)) {
|
|
4372
|
-
E.value = !1, D.value = !1;
|
|
4373
|
-
return;
|
|
4374
|
-
}
|
|
4375
|
-
let t = Math.abs(e.scrollLeft), n = e.scrollWidth - e.clientWidth;
|
|
4376
|
-
E.value = t > 2, D.value = t < n - 2;
|
|
4182
|
+
function A(e) {
|
|
4183
|
+
let t = e.scrollWidth > e.clientWidth;
|
|
4184
|
+
w.value = t && e.scrollLeft > 1, T.value = t && e.scrollLeft < e.scrollWidth - e.clientWidth;
|
|
4377
4185
|
}
|
|
4378
|
-
function
|
|
4379
|
-
let t =
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
left: n,
|
|
4186
|
+
function j(e) {
|
|
4187
|
+
let t = Number(b.arrowScrollDistance) || 100;
|
|
4188
|
+
e && (t *= -1), E.value?.scrollBy({
|
|
4189
|
+
top: 0,
|
|
4190
|
+
left: t,
|
|
4384
4191
|
behavior: "smooth"
|
|
4385
4192
|
});
|
|
4386
4193
|
}
|
|
4387
|
-
function
|
|
4388
|
-
if (
|
|
4389
|
-
let e =
|
|
4194
|
+
function M() {
|
|
4195
|
+
if (O.value) {
|
|
4196
|
+
let e = O.value.querySelector(".db-tab-list");
|
|
4390
4197
|
if (e) {
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
let
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4198
|
+
let t = e.querySelector("[role=\"tablist\"]");
|
|
4199
|
+
if (t && (t.setAttribute("aria-orientation", b.orientation || "horizontal"), b.behavior === "arrows" && (E.value = t, A(t), t.addEventListener("scroll", () => {
|
|
4200
|
+
A(t);
|
|
4201
|
+
}), !D.value))) {
|
|
4202
|
+
let e = new ResizeObserver(() => {
|
|
4203
|
+
A(t);
|
|
4204
|
+
});
|
|
4205
|
+
e.observe(t), D.value = e;
|
|
4206
|
+
}
|
|
4207
|
+
}
|
|
4208
|
+
}
|
|
4209
|
+
}
|
|
4210
|
+
function N(e) {
|
|
4211
|
+
if (O.value) {
|
|
4212
|
+
let t = Array.from(O.value.getElementsByClassName("db-tab-item")), n = Array.from(O.value.querySelectorAll(":is(:scope > .db-tab-panel, :scope > db-tab-panel > .db-tab-panel)"));
|
|
4213
|
+
for (let r of t) {
|
|
4214
|
+
let i = t.indexOf(r), a = r.querySelector("label"), o = r.querySelector("input");
|
|
4215
|
+
if (o && a) {
|
|
4216
|
+
if (!o.id) {
|
|
4217
|
+
let e = `${x.value}-tab-${i}`;
|
|
4218
|
+
a.setAttribute("for", e), o.id = e, o.setAttribute("name", x.value), n.length > i && o.setAttribute("aria-controls", `${x.value}-tab-panel-${i}`);
|
|
4219
|
+
}
|
|
4220
|
+
if (e) {
|
|
4221
|
+
let e = !b.initialSelectedMode || b.initialSelectedMode === "auto", t = b.initialSelectedIndex == null && i === 0 || Number(b.initialSelectedIndex) === i;
|
|
4222
|
+
e && t && o.click();
|
|
4401
4223
|
}
|
|
4402
4224
|
}
|
|
4403
|
-
|
|
4225
|
+
}
|
|
4226
|
+
for (let e of n) {
|
|
4227
|
+
if (e.id) continue;
|
|
4228
|
+
let t = n.indexOf(e);
|
|
4229
|
+
e.id = `${x.value}-tab-panel-${t}`, e.setAttribute("aria-labelledby", `${x.value}-tab-${t}`);
|
|
4404
4230
|
}
|
|
4405
4231
|
}
|
|
4406
4232
|
}
|
|
4407
|
-
function
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4233
|
+
function P(e) {
|
|
4234
|
+
if (e.stopPropagation(), e.target) {
|
|
4235
|
+
let t = e.target.parentElement;
|
|
4236
|
+
if (t && t.parentElement && t.parentElement?.nodeName === "LI") {
|
|
4237
|
+
let n = t.parentElement;
|
|
4238
|
+
if (n) {
|
|
4239
|
+
let t = n.parentElement;
|
|
4240
|
+
if (t) {
|
|
4241
|
+
let r = Array.from(t.children).indexOf(n);
|
|
4242
|
+
b.onIndexChange && b.onIndexChange(r), b.onTabSelect && b.onTabSelect(e);
|
|
4243
|
+
}
|
|
4244
|
+
}
|
|
4245
|
+
}
|
|
4419
4246
|
}
|
|
4420
4247
|
}
|
|
4421
|
-
return (s, l) => (
|
|
4248
|
+
return (s, l) => (d(), r("div", {
|
|
4422
4249
|
ref_key: "_ref",
|
|
4423
|
-
ref:
|
|
4424
|
-
id: i.id ?? i.propOverrides?.id
|
|
4425
|
-
class: c(
|
|
4250
|
+
ref: O,
|
|
4251
|
+
id: i.id ?? i.propOverrides?.id,
|
|
4252
|
+
class: c(g(S)("db-tabs", b.class)),
|
|
4426
4253
|
"data-orientation": i.orientation,
|
|
4427
4254
|
"data-scroll-behavior": i.behavior,
|
|
4428
|
-
"data-
|
|
4429
|
-
"data-
|
|
4430
|
-
|
|
4431
|
-
|
|
4255
|
+
"data-alignment": i.alignment ?? "start",
|
|
4256
|
+
"data-width": i.width ?? "auto",
|
|
4257
|
+
onInput: l[0] ||= async (e) => P(e),
|
|
4258
|
+
onChange: l[1] ||= async (e) => P(e)
|
|
4432
4259
|
}, [
|
|
4433
|
-
|
|
4260
|
+
w.value ? (d(), t(Ie, {
|
|
4434
4261
|
key: 0,
|
|
4435
|
-
class: "tabs-scroll-
|
|
4262
|
+
class: "tabs-scroll-left",
|
|
4436
4263
|
variant: "ghost",
|
|
4437
4264
|
icon: "chevron_left",
|
|
4438
4265
|
type: "button",
|
|
4439
4266
|
noText: !0,
|
|
4440
|
-
onClick: (e) =>
|
|
4267
|
+
onClick: (e) => j(!0)
|
|
4441
4268
|
}, {
|
|
4442
|
-
default:
|
|
4269
|
+
default: y(() => [...l[2] ||= [a(" Scroll left ", -1)]]),
|
|
4443
4270
|
_: 1
|
|
4444
4271
|
}, 8, ["onClick"])) : n("", !0),
|
|
4445
|
-
i.tabs ? (
|
|
4446
|
-
|
|
4447
|
-
ariaLabel: i.name
|
|
4448
|
-
}, {
|
|
4449
|
-
default: b(() => [(f(!0), r(e, null, m(M.value, (e, n) => (f(), t(Fr, {
|
|
4272
|
+
i.tabs ? (d(), r(e, { key: 1 }, [o(Ir, null, {
|
|
4273
|
+
default: y(() => [(d(!0), r(e, null, p(k(), (e, n) => (d(), t(Nr, {
|
|
4450
4274
|
key: i.name + "tab-item" + n,
|
|
4451
|
-
|
|
4452
|
-
ariaControls: L(n),
|
|
4453
|
-
active: V(n),
|
|
4454
|
-
tabIndex: H(n),
|
|
4275
|
+
active: e.active,
|
|
4455
4276
|
label: e.label,
|
|
4456
4277
|
iconTrailing: e.iconTrailing,
|
|
4457
4278
|
icon: e.icon,
|
|
4458
|
-
noText: e.noText
|
|
4459
|
-
onClick: (e) => R(n)
|
|
4279
|
+
noText: e.noText
|
|
4460
4280
|
}, null, 8, [
|
|
4461
|
-
"id",
|
|
4462
|
-
"ariaControls",
|
|
4463
4281
|
"active",
|
|
4464
|
-
"tabIndex",
|
|
4465
4282
|
"label",
|
|
4466
4283
|
"iconTrailing",
|
|
4467
4284
|
"icon",
|
|
4468
|
-
"noText"
|
|
4469
|
-
"onClick"
|
|
4285
|
+
"noText"
|
|
4470
4286
|
]))), 128))]),
|
|
4471
4287
|
_: 1
|
|
4472
|
-
}
|
|
4288
|
+
}), (d(!0), r(e, null, p(k(), (e, n) => (d(), t(Rr, {
|
|
4473
4289
|
key: i.name + "tab-panel" + n,
|
|
4474
|
-
|
|
4475
|
-
ariaLabelledby: I(n),
|
|
4476
|
-
content: e.content,
|
|
4477
|
-
hidden: !V(n)
|
|
4290
|
+
content: e.content
|
|
4478
4291
|
}, {
|
|
4479
|
-
default:
|
|
4292
|
+
default: y(() => [a(h(e.children), 1)]),
|
|
4480
4293
|
_: 2
|
|
4481
|
-
}, 1032, [
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
"
|
|
4485
|
-
"hidden"
|
|
4486
|
-
]))), 128))], 64)) : n("", !0),
|
|
4487
|
-
i.tabs ? n("", !0) : h(s.$slots, "default", { key: 2 }),
|
|
4488
|
-
D.value ? (f(), t(Ie, {
|
|
4489
|
-
key: 3,
|
|
4490
|
-
class: "tabs-scroll-end",
|
|
4294
|
+
}, 1032, ["content"]))), 128))], 64)) : n("", !0),
|
|
4295
|
+
T.value ? (d(), t(Ie, {
|
|
4296
|
+
key: 2,
|
|
4297
|
+
class: "tabs-scroll-right",
|
|
4491
4298
|
variant: "ghost",
|
|
4492
4299
|
icon: "chevron_right",
|
|
4493
4300
|
type: "button",
|
|
4494
4301
|
noText: !0,
|
|
4495
|
-
onClick: (e) =>
|
|
4302
|
+
onClick: (e) => j()
|
|
4496
4303
|
}, {
|
|
4497
|
-
default:
|
|
4304
|
+
default: y(() => [...l[3] ||= [a(" Scroll right ", -1)]]),
|
|
4498
4305
|
_: 1
|
|
4499
|
-
}, 8, ["onClick"])) : n("", !0)
|
|
4500
|
-
|
|
4306
|
+
}, 8, ["onClick"])) : n("", !0),
|
|
4307
|
+
m(s.$slots, "default")
|
|
4308
|
+
], 42, zr));
|
|
4501
4309
|
}
|
|
4502
|
-
}),
|
|
4310
|
+
}), Vr = ["scrollbar", "arrows"], Hr = ["auto", "manually"], Ur = ["static", "removable"], Wr = [
|
|
4503
4311
|
"data-variant",
|
|
4504
4312
|
"data-hide-asterisk",
|
|
4505
4313
|
"data-hide-label"
|
|
4506
|
-
],
|
|
4314
|
+
], Gr = ["for"], Kr = [
|
|
4507
4315
|
"aria-invalid",
|
|
4508
4316
|
"data-custom-validity",
|
|
4509
4317
|
"data-field-sizing",
|
|
@@ -4525,10 +4333,10 @@ var x = () => {
|
|
|
4525
4333
|
"placeholder",
|
|
4526
4334
|
"rows",
|
|
4527
4335
|
"cols"
|
|
4528
|
-
],
|
|
4336
|
+
], qr = {
|
|
4529
4337
|
"data-visually-hidden": "true",
|
|
4530
4338
|
role: "status"
|
|
4531
|
-
},
|
|
4339
|
+
}, Jr = /* @__PURE__ */ s({
|
|
4532
4340
|
name: "DBTextarea",
|
|
4533
4341
|
__name: "textarea",
|
|
4534
4342
|
props: {
|
|
@@ -4622,39 +4430,39 @@ var x = () => {
|
|
|
4622
4430
|
},
|
|
4623
4431
|
emits: ["update:value"],
|
|
4624
4432
|
setup(e, { emit: s }) {
|
|
4625
|
-
let
|
|
4433
|
+
let p = _(), m = s, b = e, x = f(void 0), C = f(void 0), w = f(void 0), E = f(void 0), O = f(void 0), j = f(void 0), M = f(""), N = f(""), I = f(void 0), L = f(null);
|
|
4626
4434
|
l(() => {
|
|
4627
|
-
|
|
4435
|
+
U(), O.value = b.invalidMessage || "TODO: Add an invalidMessage";
|
|
4628
4436
|
}), u(() => {
|
|
4629
|
-
|
|
4630
|
-
}),
|
|
4631
|
-
(
|
|
4437
|
+
I.value?.abort();
|
|
4438
|
+
}), v(() => [b.id, b.propOverrides?.id], () => {
|
|
4439
|
+
(b.id ?? b.propOverrides?.id) && U();
|
|
4632
4440
|
}, {
|
|
4633
4441
|
immediate: !0,
|
|
4634
4442
|
flush: "post"
|
|
4635
|
-
}),
|
|
4636
|
-
|
|
4443
|
+
}), v(() => [L.value, b.invalidMessage], () => {
|
|
4444
|
+
O.value = b.invalidMessage || L.value?.validationMessage || "TODO: Add an invalidMessage";
|
|
4637
4445
|
}, {
|
|
4638
4446
|
immediate: !0,
|
|
4639
4447
|
flush: "post"
|
|
4640
|
-
}),
|
|
4448
|
+
}), v(() => [x.value], () => {
|
|
4641
4449
|
if (x.value) {
|
|
4642
|
-
let e = x.value +
|
|
4643
|
-
|
|
4450
|
+
let e = x.value + K;
|
|
4451
|
+
C.value = e, w.value = x.value + q, E.value = x.value + J, F(b.message, b.showMessage) && (j.value = e), z();
|
|
4644
4452
|
}
|
|
4645
4453
|
}, {
|
|
4646
4454
|
immediate: !0,
|
|
4647
4455
|
flush: "post"
|
|
4648
|
-
}),
|
|
4649
|
-
M.value =
|
|
4456
|
+
}), v(() => [b.value], () => {
|
|
4457
|
+
M.value = b.value;
|
|
4650
4458
|
}, {
|
|
4651
4459
|
immediate: !0,
|
|
4652
4460
|
flush: "post"
|
|
4653
|
-
}),
|
|
4461
|
+
}), v(() => [L.value], () => {
|
|
4654
4462
|
if (L.value) {
|
|
4655
|
-
let e =
|
|
4656
|
-
e || (e = new AbortController(),
|
|
4657
|
-
value:
|
|
4463
|
+
let e = I.value;
|
|
4464
|
+
e || (e = new AbortController(), I.value = e), Ge(L.value, {
|
|
4465
|
+
value: b.value,
|
|
4658
4466
|
defaultValue: void 0
|
|
4659
4467
|
}, (e) => {
|
|
4660
4468
|
V(e, !0), B(e, !0);
|
|
@@ -4665,34 +4473,34 @@ var x = () => {
|
|
|
4665
4473
|
flush: "post"
|
|
4666
4474
|
});
|
|
4667
4475
|
function R() {
|
|
4668
|
-
return !!(
|
|
4476
|
+
return !!(b.validMessage ?? b.validation === "valid");
|
|
4669
4477
|
}
|
|
4670
4478
|
function z() {
|
|
4671
|
-
!L.value?.validity.valid ||
|
|
4479
|
+
!L.value?.validity.valid || b.validation === "invalid" ? (j.value = E.value, O.value = b.invalidMessage || L.value?.validationMessage || "TODO: Add an invalidMessage", T() && (N.value = O.value, D(() => N.value = "", 1e3))) : R() && L.value?.validity.valid && (b.required || b.minLength || b.maxLength) ? (j.value = w.value, T() && (N.value = b.validMessage ?? "TODO: Add a validMessage", D(() => N.value = "", 1e3))) : F(b.message, b.showMessage) ? j.value = C.value : j.value = void 0;
|
|
4672
4480
|
}
|
|
4673
4481
|
function B(e, t) {
|
|
4674
|
-
|
|
4482
|
+
b.input && b.input(e), M.value = e.target.value, b.onInput && b.onInput(e), Q(m, e), z();
|
|
4675
4483
|
}
|
|
4676
4484
|
function V(e, t) {
|
|
4677
|
-
|
|
4485
|
+
b.onChange && b.onChange(e), Q(m, e), z();
|
|
4678
4486
|
}
|
|
4679
4487
|
function H(e) {
|
|
4680
|
-
|
|
4488
|
+
b.onBlur && b.onBlur(e);
|
|
4681
4489
|
}
|
|
4682
|
-
function
|
|
4683
|
-
|
|
4490
|
+
function ee(e) {
|
|
4491
|
+
b.onFocus && b.onFocus(e);
|
|
4684
4492
|
}
|
|
4685
|
-
function
|
|
4686
|
-
let e =
|
|
4687
|
-
x.value = e,
|
|
4493
|
+
function U() {
|
|
4494
|
+
let e = b.id ?? b.propOverrides?.id ?? `textarea-${p}`;
|
|
4495
|
+
x.value = e, C.value = e + K, w.value = e + q, E.value = e + J;
|
|
4688
4496
|
}
|
|
4689
|
-
return (s, l) => (
|
|
4690
|
-
class: c(
|
|
4497
|
+
return (s, l) => (d(), r("div", {
|
|
4498
|
+
class: c(g(S)("db-textarea", b.class)),
|
|
4691
4499
|
"data-variant": e.variant,
|
|
4692
|
-
"data-hide-asterisk":
|
|
4693
|
-
"data-hide-label":
|
|
4500
|
+
"data-hide-asterisk": g(P)(e.showRequiredAsterisk),
|
|
4501
|
+
"data-hide-label": g(P)(e.showLabel)
|
|
4694
4502
|
}, [
|
|
4695
|
-
i("label", { for: x.value },
|
|
4503
|
+
i("label", { for: x.value }, h(e.label ?? g("LABEL SHOULD BE SET")), 9, Gr),
|
|
4696
4504
|
i("textarea", {
|
|
4697
4505
|
"aria-invalid": e.validation === "invalid",
|
|
4698
4506
|
"data-custom-validity": e.validation,
|
|
@@ -4701,13 +4509,13 @@ var x = () => {
|
|
|
4701
4509
|
ref: L,
|
|
4702
4510
|
id: x.value,
|
|
4703
4511
|
"data-resize": e.resize,
|
|
4704
|
-
"data-hide-resizer":
|
|
4705
|
-
disabled:
|
|
4706
|
-
required:
|
|
4707
|
-
readOnly:
|
|
4512
|
+
"data-hide-resizer": g(P)(e.showResizer ?? !0),
|
|
4513
|
+
disabled: g(k)(e.disabled, "disabled"),
|
|
4514
|
+
required: g(k)(e.required, "required"),
|
|
4515
|
+
readOnly: g(k)(e.readOnly, "readOnly") || g(k)(e.readonly, "readonly"),
|
|
4708
4516
|
form: e.form,
|
|
4709
|
-
maxLength:
|
|
4710
|
-
minLength:
|
|
4517
|
+
maxLength: g(A)(e.maxLength, e.maxlength),
|
|
4518
|
+
minLength: g(A)(e.minLength, e.minlength),
|
|
4711
4519
|
name: e.name,
|
|
4712
4520
|
wrap: e.wrap,
|
|
4713
4521
|
spellcheck: e.spellCheck,
|
|
@@ -4715,83 +4523,83 @@ var x = () => {
|
|
|
4715
4523
|
onInput: l[0] ||= async (e) => B(e),
|
|
4716
4524
|
onChange: l[1] ||= async (e) => V(e),
|
|
4717
4525
|
onBlur: l[2] ||= async (e) => H(e),
|
|
4718
|
-
onFocus: l[3] ||= async (e) =>
|
|
4526
|
+
onFocus: l[3] ||= async (e) => ee(e),
|
|
4719
4527
|
value: e.value ?? M.value ?? "",
|
|
4720
|
-
"aria-describedby": e.ariaDescribedBy ??
|
|
4721
|
-
placeholder: e.placeholder ??
|
|
4722
|
-
rows:
|
|
4723
|
-
cols:
|
|
4724
|
-
},
|
|
4725
|
-
|
|
4528
|
+
"aria-describedby": e.ariaDescribedBy ?? j.value,
|
|
4529
|
+
placeholder: e.placeholder ?? g(" "),
|
|
4530
|
+
rows: g(A)(e.rows, g(4)),
|
|
4531
|
+
cols: g(A)(e.cols)
|
|
4532
|
+
}, h(e.value), 41, Kr),
|
|
4533
|
+
g(F)(e.message, e.showMessage) ? (d(), t($, {
|
|
4726
4534
|
key: 0,
|
|
4727
4535
|
size: "small",
|
|
4728
4536
|
icon: e.messageIcon,
|
|
4729
|
-
id:
|
|
4537
|
+
id: C.value
|
|
4730
4538
|
}, {
|
|
4731
|
-
default:
|
|
4539
|
+
default: y(() => [a(h(e.message), 1)]),
|
|
4732
4540
|
_: 1
|
|
4733
4541
|
}, 8, ["icon", "id"])) : n("", !0),
|
|
4734
|
-
R() ? (
|
|
4542
|
+
R() ? (d(), t($, {
|
|
4735
4543
|
key: 1,
|
|
4736
4544
|
size: "small",
|
|
4737
4545
|
semantic: "successful",
|
|
4738
4546
|
id: w.value
|
|
4739
4547
|
}, {
|
|
4740
|
-
default:
|
|
4548
|
+
default: y(() => [a(h(e.validMessage || g("TODO: Add a validMessage")), 1)]),
|
|
4741
4549
|
_: 1
|
|
4742
4550
|
}, 8, ["id"])) : n("", !0),
|
|
4743
4551
|
o($, {
|
|
4744
4552
|
size: "small",
|
|
4745
4553
|
semantic: "critical",
|
|
4746
|
-
id:
|
|
4554
|
+
id: E.value
|
|
4747
4555
|
}, {
|
|
4748
|
-
default:
|
|
4556
|
+
default: y(() => [a(h(O.value), 1)]),
|
|
4749
4557
|
_: 1
|
|
4750
4558
|
}, 8, ["id"]),
|
|
4751
|
-
i("span",
|
|
4752
|
-
], 10,
|
|
4559
|
+
i("span", qr, h(N.value), 1)
|
|
4560
|
+
], 10, Wr));
|
|
4753
4561
|
}
|
|
4754
|
-
}),
|
|
4562
|
+
}), Yr = [
|
|
4755
4563
|
"none",
|
|
4756
4564
|
"both",
|
|
4757
4565
|
"horizontal",
|
|
4758
4566
|
"vertical"
|
|
4759
|
-
],
|
|
4567
|
+
], Xr = [
|
|
4760
4568
|
"hard",
|
|
4761
4569
|
"soft",
|
|
4762
4570
|
"off"
|
|
4763
|
-
],
|
|
4571
|
+
], Zr = ["description", "label"], Qr = [
|
|
4764
4572
|
"adaptive",
|
|
4765
4573
|
"neutral",
|
|
4766
4574
|
"critical",
|
|
4767
4575
|
"informational",
|
|
4768
4576
|
"warning",
|
|
4769
4577
|
"successful"
|
|
4770
|
-
],
|
|
4578
|
+
], $r = [
|
|
4771
4579
|
"medium",
|
|
4772
4580
|
"small",
|
|
4773
4581
|
"large",
|
|
4774
4582
|
"none"
|
|
4775
|
-
],
|
|
4583
|
+
], ei = [
|
|
4776
4584
|
"medium",
|
|
4777
4585
|
"small",
|
|
4778
4586
|
"large",
|
|
4779
4587
|
"none"
|
|
4780
|
-
],
|
|
4588
|
+
], ti = [
|
|
4781
4589
|
"left",
|
|
4782
4590
|
"right",
|
|
4783
4591
|
"left-start",
|
|
4784
4592
|
"left-end",
|
|
4785
4593
|
"right-start",
|
|
4786
4594
|
"right-end"
|
|
4787
|
-
],
|
|
4595
|
+
], ni = [
|
|
4788
4596
|
"top",
|
|
4789
4597
|
"bottom",
|
|
4790
4598
|
"top-start",
|
|
4791
4599
|
"top-end",
|
|
4792
4600
|
"bottom-start",
|
|
4793
4601
|
"bottom-end"
|
|
4794
|
-
],
|
|
4602
|
+
], ri = [...ti, ...ni], ii = [
|
|
4795
4603
|
"none",
|
|
4796
4604
|
"3x-large",
|
|
4797
4605
|
"2x-large",
|
|
@@ -4802,25 +4610,25 @@ var x = () => {
|
|
|
4802
4610
|
"x-small",
|
|
4803
4611
|
"2x-small",
|
|
4804
4612
|
"3x-small"
|
|
4805
|
-
],
|
|
4613
|
+
], ai = ["horizontal", "vertical"], oi = ["full", "auto"], si = [
|
|
4806
4614
|
"full",
|
|
4807
4615
|
"medium",
|
|
4808
4616
|
"large",
|
|
4809
4617
|
"small"
|
|
4810
|
-
],
|
|
4618
|
+
], ci = [
|
|
4811
4619
|
"none",
|
|
4812
4620
|
"slow",
|
|
4813
4621
|
"fast"
|
|
4814
|
-
],
|
|
4622
|
+
], li = ["auto", "fixed"], ui = ["small", "medium"], di = ["weak", "strong"], fi = [
|
|
4815
4623
|
"invalid",
|
|
4816
4624
|
"valid",
|
|
4817
4625
|
"no-validation"
|
|
4818
|
-
],
|
|
4626
|
+
], pi = ["fixed", "content"], mi = ["above", "floating"], hi = ["leading", "trailing"], gi = /* @__PURE__ */ "off.on.name.honorific-prefix.given-name.additional-name.family-name.honorific-suffix.nickname.email.username.new-password.current-password.one-time-code.organization-title.organization.street-address.shipping.billing.address-line1.address-line2.address-line3.address-level4.address-level3.address-level2.address-level1.country.country-name.postal-code.cc-name.cc-given-name.cc-additional-name.cc-family-name.cc-number.cc-exp.cc-exp-month.cc-exp-year.cc-csc.cc-type.transaction-currency.transaction-amount.language.bday.bday-day.bday-month.bday-year.sex.tel.tel-country-code.tel-national.tel-area-code.tel-local.tel-extension.impp.url.photo.webauthn".split("."), _i = [
|
|
4819
4627
|
"_self",
|
|
4820
4628
|
"_blank",
|
|
4821
4629
|
"_parent",
|
|
4822
4630
|
"_top"
|
|
4823
|
-
],
|
|
4631
|
+
], vi = [
|
|
4824
4632
|
"no-referrer",
|
|
4825
4633
|
"no-referrer-when-downgrade",
|
|
4826
4634
|
"origin",
|
|
@@ -4829,10 +4637,6 @@ var x = () => {
|
|
|
4829
4637
|
"strict-origin",
|
|
4830
4638
|
"strict-origin-when-cross-origin",
|
|
4831
4639
|
"unsafe-url"
|
|
4832
|
-
],
|
|
4833
|
-
"start",
|
|
4834
|
-
"center",
|
|
4835
|
-
"end"
|
|
4836
|
-
];
|
|
4640
|
+
], yi = ["start", "center"];
|
|
4837
4641
|
//#endregion
|
|
4838
|
-
export {
|
|
4642
|
+
export { W as AccordionBehaviorList, te as AccordionVariantList, yi as AlignmentList, gi as AutoCompleteList, Me as BadgePlacementList, Re as ButtonTypeList, Le as ButtonVariantList, X as COLOR, Z as COLORS, Se as COLORS_SIMPLE, ve as COLOR_CONST, xe as COLOR_SIMPLE, Ve as CardBehaviorList, He as CardElevationLevelList, Kt as CustomSelectDropdownWidthList, Yt as CustomSelectListItemTypeList, U as DBAccordion, H as DBAccordionItem, je as DBBadge, Pe as DBBrand, Ie as DBButton, Be as DBCard, Ze as DBCheckbox, $e as DBCustomButton, Gt as DBCustomSelect, dt as DBCustomSelectDropdown, Jt as DBCustomSelectFormField, vt as DBCustomSelectList, gt as DBCustomSelectListItem, Qt as DBDivider, sn as DBDrawer, Dn as DBHeader, kn as DBIcon, $ as DBInfotext, Tt as DBInput, Nn as DBLink, Rn as DBNavigation, Un as DBNavigationItem, Jn as DBNotification, $n as DBPage, ir as DBPopover, sr as DBRadio, lr as DBSection, yr as DBSelect, xr as DBStack, Ar as DBSwitch, Nr as DBTabItem, Ir as DBTabList, Rr as DBTabPanel, Br as DBTabs, kt as DBTag, Jr as DBTextarea, Dt as DBTooltip, Oe as DB_UX_LOCAL_STORAGE_FRAMEWORK, ke as DB_UX_LOCAL_STORAGE_MODE, de as DEFAULT_BACK, pe as DEFAULT_BURGER_MENU, ge as DEFAULT_CLOSE_BUTTON, ce as DEFAULT_DATALIST_ID_SUFFIX, me as DEFAULT_ICON, ne as DEFAULT_ID, Y as DEFAULT_INVALID_MESSAGE, J as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, re as DEFAULT_LABEL, ae as DEFAULT_LABEL_ID_SUFFIX, ie as DEFAULT_MESSAGE, K as DEFAULT_MESSAGE_ID_SUFFIX, G as DEFAULT_PLACEHOLDER, se as DEFAULT_PLACEHOLDER_ID_SUFFIX, ue as DEFAULT_REMOVE, he as DEFAULT_ROWS, fe as DEFAULT_SELECTED, oe as DEFAULT_SELECT_ID_SUFFIX, le as DEFAULT_VALID_MESSAGE, q as DEFAULT_VALID_MESSAGE_ID_SUFFIX, Te as DEFAULT_VIEWPORT, be as DENSITIES, ye as DENSITY, _e as DENSITY_CONST, Ee as DESKTOP_VIEWPORT, $t as DividerMarginList, en as DividerVariantList, et as DocumentClickListener, tt as DocumentScrollListener, cn as DrawerBackdropList, ln as DrawerDirectionList, dn as DrawerPositionList, un as DrawerVariantList, di as EmphasisList, pi as FieldSizingList, ii as GapSpacingList, An as IconWeightList, jn as InputTypeList, hi as LabelVariantHorizontalList, mi as LabelVariantList, In as LinkContentList, vi as LinkReferrerPolicyList, Fn as LinkSizeList, _i as LinkTargetList, Pn as LinkVariantList, ei as MarginList, si as MaxWidthList, pn as NavigationItemSafeTriangle, Zn as NotificationAriaLiveList, Xn as NotificationLinkVariantList, Yn as NotificationVariantList, ai as OrientationList, tr as PageDocumentOverflowList, er as PageVariantList, ti as PlacementHorizontalList, ri as PlacementList, ni as PlacementVerticalList, ci as PopoverDelayList, li as PopoverWidthList, Ce as SEMANTIC, we as SEMANTICS, Xt as SelectedTypeList, Qr as SemanticList, ui as SizeList, $r as SpacingList, wr as StackAlignmentList, Cr as StackDirectionList, Tr as StackJustifyContentList, Sr as StackVariantList, De as TESTING_VIEWPORTS, Vr as TabsBehaviorList, Hr as TabsInitialSelectedModeList, Ur as TagBehaviorList, Yr as TextareaResizeList, Xr as TextareaWrapList, Zr as TooltipVariantList, fi as ValidationList, oi as WidthList, x as addAttributeToChildren, S as cls, D as delay, k as getBoolean, O as getBooleanAsString, at as getFloatingProps, P as getHideProp, M as getInputValue, z as getNotificationRole, A as getNumber, L as getOptionKey, I as getSearchInput, j as getStep, rt as handleDataOutside, it as handleFixedDropdown, lt as handleFixedPopover, T as hasVoiceOver, C as isArrayOfStrings, fn as isEventTargetNavigationItem, E as isIOSSafari, R as isKeyboardEvent, F as stringPropVisible, b as uuid };
|