@db-ux/v-core-components 4.6.1 → 4.7.0-tabs-34782eb
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 +8 -0
- package/agent/Tabs.md +23 -20
- package/dist/components/tab-item/model.d.ts +28 -11
- package/dist/components/tab-item/tab-item.vue.d.ts +5 -10
- package/dist/components/tab-list/model.d.ts +15 -5
- package/dist/components/tab-list/tab-list.vue.d.ts +5 -2
- package/dist/components/tab-panel/model.d.ts +13 -3
- package/dist/components/tab-panel/tab-panel.vue.d.ts +1 -7
- package/dist/components/tabs/model.d.ts +51 -17
- package/dist/components/tabs/tabs.vue.d.ts +10 -8
- package/dist/db-ux.es.js +1346 -1150
- package/dist/db-ux.umd.js +1 -1
- package/dist/shared/model.d.ts +5 -5
- package/package.json +6 -6
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, onUpdated as d, openBlock as f, ref as p, renderList as m, renderSlot as h, toDisplayString as g, unref as _, useId as v, watch as y, withCtx as b } from "vue";
|
|
2
2
|
//#region src/utils/index.ts
|
|
3
|
-
var
|
|
3
|
+
var x = () => {
|
|
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
|
+
}, S = (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 && S(e, t);
|
|
13
13
|
});
|
|
14
|
-
},
|
|
14
|
+
}, C = (...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
|
+
}, w = (e) => Array.isArray(e) && e.every((e) => typeof e == "string"), T = [
|
|
20
20
|
"Mac",
|
|
21
21
|
"iPhone",
|
|
22
22
|
"iPad",
|
|
23
23
|
"iPod"
|
|
24
|
-
],
|
|
24
|
+
], E = () => typeof window < "u" && T.some((e) => window.navigator.userAgent.includes(e)), D = () => {
|
|
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
|
+
}, O = (e, t) => new Promise(() => setTimeout(e, t)), k = (e) => {
|
|
29
29
|
if (e != null) return String(typeof e == "string" ? e === "true" : e);
|
|
30
|
-
}, k = (e, t) => {
|
|
31
|
-
if (e != null) return typeof e == "string" ? t === e || e === "true" : !!e;
|
|
32
30
|
}, A = (e, t) => {
|
|
31
|
+
if (e != null) return typeof e == "string" ? t === e || e === "true" : !!e;
|
|
32
|
+
}, j = (e, t) => {
|
|
33
33
|
if (!(e == null && t == null)) return Number(e ?? t);
|
|
34
|
-
},
|
|
34
|
+
}, M = (e) => {
|
|
35
35
|
if (e != null) return e === "any" ? "any" : Number(e);
|
|
36
|
-
},
|
|
37
|
-
if (e != null) return
|
|
38
|
-
},
|
|
36
|
+
}, N = (e, t) => t && ["number", "range"].includes(t) ? j(e) : e, P = (e) => typeof e == "string" ? e === "true" : e, F = (e) => {
|
|
37
|
+
if (e != null) return k(!P(e));
|
|
38
|
+
}, I = (e, t) => (t === void 0 || P(t)) && !!e, L = (e) => e.querySelector("input[type=\"search\"]"), R = (e, t) => `${t}${e.id ?? e.value ?? x()}`, z = (e) => e.key !== void 0, B = ({ 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 b = () => {
|
|
|
45
45
|
case "successful": return "status";
|
|
46
46
|
default: return "article";
|
|
47
47
|
}
|
|
48
|
-
},
|
|
48
|
+
}, V = ["id"], H = [
|
|
49
49
|
"aria-disabled",
|
|
50
50
|
"name",
|
|
51
51
|
"open"
|
|
52
|
-
],
|
|
52
|
+
], U = /* @__PURE__ */ s({
|
|
53
53
|
name: "DBAccordionItem",
|
|
54
54
|
__name: "accordion-item",
|
|
55
55
|
props: {
|
|
@@ -78,37 +78,37 @@ var b = () => {
|
|
|
78
78
|
name: { default: void 0 }
|
|
79
79
|
},
|
|
80
80
|
setup(t) {
|
|
81
|
-
let o = t, s =
|
|
81
|
+
let o = t, s = p(!1), u = p(void 0), d = p(!1), m = p(null);
|
|
82
82
|
l(() => {
|
|
83
|
-
o.defaultOpen && (s.value = o.defaultOpen),
|
|
84
|
-
}),
|
|
85
|
-
|
|
83
|
+
o.defaultOpen && (s.value = o.defaultOpen), d.value = !0;
|
|
84
|
+
}), y(() => [m.value, d.value], () => {
|
|
85
|
+
m.value && d.value;
|
|
86
86
|
}, {
|
|
87
87
|
immediate: !0,
|
|
88
88
|
flush: "post"
|
|
89
|
-
}),
|
|
89
|
+
}), y(() => [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 v(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, d) => (f(), r("li", {
|
|
101
101
|
id: t.id ?? t.propOverrides?.id,
|
|
102
|
-
class: c(
|
|
102
|
+
class: c(_(C)("db-accordion-item", o.class))
|
|
103
103
|
}, [i("details", {
|
|
104
|
-
"aria-disabled":
|
|
104
|
+
"aria-disabled": _(k)(t.disabled),
|
|
105
105
|
ref_key: "_ref",
|
|
106
|
-
ref:
|
|
106
|
+
ref: m,
|
|
107
107
|
name: u.value,
|
|
108
108
|
open: s.value
|
|
109
|
-
}, [i("summary", { onClick:
|
|
109
|
+
}, [i("summary", { onClick: d[0] ||= async (e) => v(e) }, [t.headlinePlain ? (f(), r(e, { key: 0 }, [a(g(t.headlinePlain), 1)], 64)) : n("", !0), t.headlinePlain ? n("", !0) : h(l.$slots, "headline", { key: 1 })]), i("div", null, [t.text ? (f(), r(e, { key: 0 }, [a(g(t.text), 1)], 64)) : h(l.$slots, "default", { key: 1 })])], 8, H)], 10, V));
|
|
110
110
|
}
|
|
111
|
-
}),
|
|
111
|
+
}), W = ["id", "data-variant"], ee = /* @__PURE__ */ s({
|
|
112
112
|
name: "DBAccordion",
|
|
113
113
|
__name: "accordion",
|
|
114
114
|
props: {
|
|
@@ -126,10 +126,10 @@ var b = () => {
|
|
|
126
126
|
propOverrides: { default: void 0 }
|
|
127
127
|
},
|
|
128
128
|
setup(i) {
|
|
129
|
-
let a =
|
|
129
|
+
let a = v(), o = i, s = p(""), u = p(!1), d = p(!1), g = p(null);
|
|
130
130
|
l(() => {
|
|
131
|
-
u.value = !0,
|
|
132
|
-
}),
|
|
131
|
+
u.value = !0, d.value = !0;
|
|
132
|
+
}), y(() => [
|
|
133
133
|
u.value,
|
|
134
134
|
o.name,
|
|
135
135
|
o.behavior
|
|
@@ -138,22 +138,22 @@ var b = () => {
|
|
|
138
138
|
}, {
|
|
139
139
|
immediate: !0,
|
|
140
140
|
flush: "post"
|
|
141
|
-
}),
|
|
142
|
-
if (
|
|
143
|
-
let e =
|
|
141
|
+
}), y(() => [g.value, s.value], () => {
|
|
142
|
+
if (g.value) {
|
|
143
|
+
let e = g.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
|
+
}), y(() => [
|
|
150
|
+
g.value,
|
|
151
|
+
d.value,
|
|
152
152
|
o.initOpenIndex
|
|
153
153
|
], () => {
|
|
154
|
-
if (
|
|
154
|
+
if (g.value && d.value) {
|
|
155
155
|
if (o.initOpenIndex && o.initOpenIndex.length > 0) {
|
|
156
|
-
let e =
|
|
156
|
+
let e = g.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 b = () => {
|
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
|
|
164
|
+
d.value = !1;
|
|
165
165
|
}
|
|
166
166
|
}, {
|
|
167
167
|
immediate: !0,
|
|
@@ -175,13 +175,13 @@ var b = () => {
|
|
|
175
175
|
}
|
|
176
176
|
return [];
|
|
177
177
|
}
|
|
178
|
-
return (a, s) => (
|
|
178
|
+
return (a, s) => (f(), r("ul", {
|
|
179
179
|
ref_key: "_ref",
|
|
180
|
-
ref:
|
|
180
|
+
ref: g,
|
|
181
181
|
id: i.id ?? i.propOverrides?.id,
|
|
182
|
-
class: c(
|
|
182
|
+
class: c(_(C)("db-accordion", o.class)),
|
|
183
183
|
"data-variant": i.variant
|
|
184
|
-
}, [i.items ? n("", !0) :
|
|
184
|
+
}, [i.items ? n("", !0) : h(a.$slots, "default", { key: 0 }), i.items ? (f(!0), r(e, { key: 1 }, m(b(), (e, n) => (f(), t(U, {
|
|
185
185
|
key: `accordion-item-${n}`,
|
|
186
186
|
headlinePlain: e.headlinePlain,
|
|
187
187
|
disabled: e.disabled,
|
|
@@ -190,15 +190,15 @@ var b = () => {
|
|
|
190
190
|
"headlinePlain",
|
|
191
191
|
"disabled",
|
|
192
192
|
"text"
|
|
193
|
-
]))), 128)) : n("", !0)], 10,
|
|
193
|
+
]))), 128)) : n("", !0)], 10, W));
|
|
194
194
|
}
|
|
195
|
-
}),
|
|
195
|
+
}), G = ["divider", "card"], te = ["multiple", "single"], K = "OVERWRITE_DEFAULT_ID", q = "LABEL SHOULD BE SET", ne = " ", re = "MESSAGE SHOULD BE SET", ie = "-label", ae = "-select", J = "-message", Y = "-valid-message", oe = "-invalid-message", se = "-placeholder", ce = "-datalist", X = "TODO: Add a validMessage", le = "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), Z = /* @__PURE__ */ function(e) {
|
|
198
198
|
return e.PRIMARY = "primary", e;
|
|
199
|
-
}({}),
|
|
199
|
+
}({}), Q = /* @__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
|
+
}({}), xe = Object.entries(Q).map(([, e]) => e), Se = Object.entries(Z).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 b = () => {
|
|
|
250
250
|
}
|
|
251
251
|
},
|
|
252
252
|
setup(t) {
|
|
253
|
-
let n = t, i =
|
|
253
|
+
let n = t, i = p(!1), o = p(null);
|
|
254
254
|
return l(() => {
|
|
255
255
|
i.value = !0;
|
|
256
|
-
}),
|
|
256
|
+
}), y(() => [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 b = () => {
|
|
|
261
261
|
}, {
|
|
262
262
|
immediate: !0,
|
|
263
263
|
flush: "post"
|
|
264
|
-
}), (i, s) => (
|
|
264
|
+
}), (i, s) => (f(), 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(_(C)("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": _(k)(t.wrap),
|
|
274
|
+
"data-label": t.placement?.startsWith("corner") && (t.label ?? _("LABEL SHOULD BE SET"))
|
|
275
|
+
}, [t.text ? (f(), r(e, { key: 0 }, [a(g(t.text), 1)], 64)) : h(i.$slots, "default", { key: 1 })], 10, Ae));
|
|
276
276
|
}
|
|
277
277
|
}), Me = [
|
|
278
278
|
"inline",
|
|
@@ -308,15 +308,15 @@ var b = () => {
|
|
|
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 = p(null);
|
|
312
|
+
return (o, s) => (f(), 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 ?? _("brand"),
|
|
316
|
+
"data-show-icon": _(k)(t.showIcon),
|
|
317
317
|
id: t.id ?? t.propOverrides?.id,
|
|
318
|
-
class: c(
|
|
319
|
-
}, [t.text ? (
|
|
318
|
+
class: c(_(C)("db-brand", n.class))
|
|
319
|
+
}, [t.text ? (f(), r(e, { key: 0 }, [a(g(t.text), 1)], 64)) : h(o.$slots, "default", { key: 1 })], 10, Ne));
|
|
320
320
|
}
|
|
321
321
|
}), Fe = [
|
|
322
322
|
"id",
|
|
@@ -386,34 +386,34 @@ var b = () => {
|
|
|
386
386
|
}
|
|
387
387
|
},
|
|
388
388
|
setup(t) {
|
|
389
|
-
let n = t, i =
|
|
389
|
+
let n = t, i = p(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) => (f(), 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(_(C)("db-button", n.class)),
|
|
401
401
|
type: o(),
|
|
402
|
-
disabled:
|
|
402
|
+
disabled: _(A)(t.disabled, "disabled"),
|
|
403
403
|
"data-icon": t.iconLeading ?? t.icon,
|
|
404
|
-
"data-show-icon":
|
|
404
|
+
"data-show-icon": _(k)(t.showIconLeading ?? t.showIcon),
|
|
405
405
|
"data-icon-trailing": t.iconTrailing,
|
|
406
|
-
"data-show-icon-trailing":
|
|
406
|
+
"data-show-icon-trailing": _(k)(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": _(k)(t.wrap),
|
|
411
|
+
"data-no-text": _(k)(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 ? (f(), r(e, { key: 0 }, [a(g(t.text), 1)], 64)) : h(l.$slots, "default", { key: 1 })], 10, Fe));
|
|
417
417
|
}
|
|
418
418
|
}), Le = [
|
|
419
419
|
"outlined",
|
|
@@ -449,34 +449,34 @@ var b = () => {
|
|
|
449
449
|
spacing: { default: void 0 }
|
|
450
450
|
},
|
|
451
451
|
setup(e) {
|
|
452
|
-
let t = e, n =
|
|
452
|
+
let t = e, n = p(null);
|
|
453
453
|
function i(e) {
|
|
454
454
|
t.onClick && t.onClick(e);
|
|
455
455
|
}
|
|
456
|
-
return (a, o) => (
|
|
456
|
+
return (a, o) => (f(), 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(_(C)("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
|
+
}, [h(a.$slots, "default")], 10, ze));
|
|
466
466
|
}
|
|
467
467
|
}), Ve = ["static", "interactive"], He = [
|
|
468
468
|
"1",
|
|
469
469
|
"2",
|
|
470
470
|
"3"
|
|
471
|
-
],
|
|
471
|
+
], Ue = (e, t, n = "value") => {
|
|
472
472
|
e(`update:${n}`, t.target[n]);
|
|
473
|
-
},
|
|
473
|
+
}, We = (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
|
+
}, Ge = (e, t, n, r) => {
|
|
478
|
+
We(e, (r) => {
|
|
479
|
+
O(() => {
|
|
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 b = () => {
|
|
|
487
487
|
});
|
|
488
488
|
}, 1);
|
|
489
489
|
}, r);
|
|
490
|
-
},
|
|
491
|
-
|
|
492
|
-
|
|
490
|
+
}, Ke = (e, t, n, r) => {
|
|
491
|
+
We(e, (r) => {
|
|
492
|
+
O(() => {
|
|
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 b = () => {
|
|
|
500
500
|
});
|
|
501
501
|
}, 1);
|
|
502
502
|
}, r);
|
|
503
|
-
},
|
|
503
|
+
}, qe = [
|
|
504
504
|
"id",
|
|
505
505
|
"data-icon",
|
|
506
506
|
"data-semantic",
|
|
@@ -531,24 +531,24 @@ var b = () => {
|
|
|
531
531
|
}
|
|
532
532
|
},
|
|
533
533
|
setup(t) {
|
|
534
|
-
let n = t, i =
|
|
535
|
-
return (o, s) => (
|
|
534
|
+
let n = t, i = p(null);
|
|
535
|
+
return (o, s) => (f(), 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(_(C)("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": _(k)(t.wrap),
|
|
544
|
+
"data-show-icon-leading": _(k)(t.showIcon ?? !0)
|
|
545
|
+
}, [t.text ? (f(), r(e, { key: 0 }, [a(g(t.text), 1)], 64)) : h(o.$slots, "default", { key: 1 })], 10, qe));
|
|
546
546
|
}
|
|
547
|
-
}),
|
|
547
|
+
}), Je = [
|
|
548
548
|
"data-size",
|
|
549
549
|
"data-hide-asterisk",
|
|
550
550
|
"data-hide-label"
|
|
551
|
-
],
|
|
551
|
+
], Ye = ["for"], Xe = [
|
|
552
552
|
"aria-invalid",
|
|
553
553
|
"data-custom-validity",
|
|
554
554
|
"id",
|
|
@@ -558,10 +558,10 @@ var b = () => {
|
|
|
558
558
|
"value",
|
|
559
559
|
"required",
|
|
560
560
|
"aria-describedby"
|
|
561
|
-
],
|
|
561
|
+
], Ze = {
|
|
562
562
|
"data-visually-hidden": "true",
|
|
563
563
|
role: "status"
|
|
564
|
-
},
|
|
564
|
+
}, Qe = /* @__PURE__ */ s({
|
|
565
565
|
name: "DBCheckbox",
|
|
566
566
|
__name: "checkbox",
|
|
567
567
|
props: {
|
|
@@ -630,53 +630,53 @@ var b = () => {
|
|
|
630
630
|
size: { default: void 0 }
|
|
631
631
|
},
|
|
632
632
|
emits: ["update:checked"],
|
|
633
|
-
setup(s, { emit:
|
|
634
|
-
let
|
|
633
|
+
setup(s, { emit: d }) {
|
|
634
|
+
let m = v(), x = d, S = s, w = p(!1), T = p(void 0), D = p(void 0), k = p(void 0), j = p(void 0), M = p(void 0), N = p(void 0), P = p(""), L = p(void 0), R = p(null);
|
|
635
635
|
l(() => {
|
|
636
|
-
w.value = !0,
|
|
636
|
+
w.value = !0, W(), M.value = S.invalidMessage || "TODO: Add an invalidMessage";
|
|
637
637
|
}), u(() => {
|
|
638
638
|
L.value?.abort();
|
|
639
|
-
}),
|
|
640
|
-
(
|
|
639
|
+
}), y(() => [S.id, S.propOverrides?.id], () => {
|
|
640
|
+
(S.id ?? S.propOverrides?.id) && W();
|
|
641
641
|
}, {
|
|
642
642
|
immediate: !0,
|
|
643
643
|
flush: "post"
|
|
644
|
-
}),
|
|
645
|
-
M.value =
|
|
644
|
+
}), y(() => [R.value, S.invalidMessage], () => {
|
|
645
|
+
M.value = S.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
|
+
}), y(() => [T.value], () => {
|
|
650
|
+
if (T.value) {
|
|
651
|
+
let e = T.value + J;
|
|
652
|
+
D.value = e, k.value = T.value + Y, j.value = T.value + oe, I(S.message, S.showMessage) && (N.value = e), B();
|
|
653
653
|
}
|
|
654
654
|
}, {
|
|
655
655
|
immediate: !0,
|
|
656
656
|
flush: "post"
|
|
657
|
-
}),
|
|
657
|
+
}), y(() => [
|
|
658
658
|
w.value,
|
|
659
659
|
R.value,
|
|
660
|
-
|
|
660
|
+
S.indeterminate
|
|
661
661
|
], () => {
|
|
662
|
-
R.value &&
|
|
662
|
+
R.value && S.indeterminate !== void 0 && (R.value.indeterminate = !!A(S.indeterminate));
|
|
663
663
|
}, {
|
|
664
664
|
immediate: !0,
|
|
665
665
|
flush: "post"
|
|
666
|
-
}),
|
|
666
|
+
}), y(() => [
|
|
667
667
|
w.value,
|
|
668
668
|
R.value,
|
|
669
|
-
|
|
669
|
+
S.checked
|
|
670
670
|
], () => {
|
|
671
|
-
w.value && R.value && (
|
|
671
|
+
w.value && R.value && (S.checked != null && (R.value.checked = !!A(S.checked)), w.value = !1);
|
|
672
672
|
}, {
|
|
673
673
|
immediate: !0,
|
|
674
674
|
flush: "post"
|
|
675
|
-
}),
|
|
675
|
+
}), y(() => [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), Ge(R.value, {
|
|
679
|
+
checked: S.checked,
|
|
680
680
|
defaultChecked: void 0
|
|
681
681
|
}, (e) => {
|
|
682
682
|
V(e, !0);
|
|
@@ -687,63 +687,63 @@ var b = () => {
|
|
|
687
687
|
flush: "post"
|
|
688
688
|
});
|
|
689
689
|
function z() {
|
|
690
|
-
return !!(
|
|
690
|
+
return !!(S.validMessage ?? S.validation === "valid");
|
|
691
691
|
}
|
|
692
692
|
function B() {
|
|
693
|
-
!R.value?.validity.valid ||
|
|
693
|
+
!R.value?.validity.valid || S.validation === "invalid" ? (N.value = j.value, M.value = S.invalidMessage || R.value?.validationMessage || "TODO: Add an invalidMessage", E() && (P.value = M.value, O(() => P.value = "", 1e3))) : z() && R.value?.validity.valid && S.required ? (N.value = k.value, E() && (P.value = S.validMessage ?? "TODO: Add a validMessage", O(() => P.value = "", 1e3))) : I(S.message, S.showMessage) ? N.value = D.value : N.value = void 0;
|
|
694
694
|
}
|
|
695
695
|
function V(e, t) {
|
|
696
|
-
|
|
696
|
+
S.onChange && S.onChange(e), Ue(x, e, "checked"), B();
|
|
697
697
|
}
|
|
698
698
|
function H(e) {
|
|
699
|
-
|
|
699
|
+
S.onBlur && S.onBlur(e);
|
|
700
700
|
}
|
|
701
|
-
function
|
|
702
|
-
|
|
701
|
+
function U(e) {
|
|
702
|
+
S.onFocus && S.onFocus(e);
|
|
703
703
|
}
|
|
704
|
-
function
|
|
705
|
-
let e =
|
|
706
|
-
|
|
704
|
+
function W() {
|
|
705
|
+
let e = S.id ?? S.propOverrides?.id ?? `checkbox-${m}`;
|
|
706
|
+
T.value = e, D.value = e + J, k.value = e + Y, j.value = e + oe;
|
|
707
707
|
}
|
|
708
|
-
return (l, u) => (
|
|
709
|
-
class: c(
|
|
708
|
+
return (l, u) => (f(), r("div", {
|
|
709
|
+
class: c(_(C)("db-checkbox", S.class)),
|
|
710
710
|
"data-size": s.size,
|
|
711
|
-
"data-hide-asterisk":
|
|
712
|
-
"data-hide-label":
|
|
711
|
+
"data-hide-asterisk": _(F)(s.showRequiredAsterisk),
|
|
712
|
+
"data-hide-label": _(F)(s.showLabel)
|
|
713
713
|
}, [
|
|
714
|
-
i("label", { for:
|
|
714
|
+
i("label", { for: T.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: T.value,
|
|
721
721
|
name: s.name,
|
|
722
|
-
checked:
|
|
723
|
-
disabled:
|
|
722
|
+
checked: _(A)(s.checked, "checked"),
|
|
723
|
+
disabled: _(A)(s.disabled, "disabled"),
|
|
724
724
|
value: s.value,
|
|
725
|
-
required:
|
|
725
|
+
required: _(A)(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) => U(e),
|
|
729
729
|
"aria-describedby": s.ariaDescribedBy ?? N.value
|
|
730
|
-
}, null, 40,
|
|
731
|
-
|
|
730
|
+
}, null, 40, Xe), s.label ? (f(), r(e, { key: 0 }, [a(g(s.label), 1)], 64)) : h(l.$slots, "default", { key: 1 })], 8, Ye),
|
|
731
|
+
_(I)(s.message, s.showMessage) ? (f(), t($, {
|
|
732
732
|
key: 0,
|
|
733
733
|
size: "small",
|
|
734
734
|
icon: s.messageIcon,
|
|
735
|
-
id:
|
|
735
|
+
id: D.value
|
|
736
736
|
}, {
|
|
737
|
-
default:
|
|
737
|
+
default: b(() => [a(g(s.message), 1)]),
|
|
738
738
|
_: 1
|
|
739
739
|
}, 8, ["icon", "id"])) : n("", !0),
|
|
740
|
-
z() ? (
|
|
740
|
+
z() ? (f(), t($, {
|
|
741
741
|
key: 1,
|
|
742
742
|
size: "small",
|
|
743
743
|
semantic: "successful",
|
|
744
|
-
id:
|
|
744
|
+
id: k.value
|
|
745
745
|
}, {
|
|
746
|
-
default:
|
|
746
|
+
default: b(() => [a(g(s.validMessage || _("TODO: Add a validMessage")), 1)]),
|
|
747
747
|
_: 1
|
|
748
748
|
}, 8, ["id"])) : n("", !0),
|
|
749
749
|
o($, {
|
|
@@ -751,13 +751,13 @@ var b = () => {
|
|
|
751
751
|
semantic: "critical",
|
|
752
752
|
id: j.value
|
|
753
753
|
}, {
|
|
754
|
-
default:
|
|
754
|
+
default: b(() => [a(g(M.value), 1)]),
|
|
755
755
|
_: 1
|
|
756
756
|
}, 8, ["id"]),
|
|
757
|
-
i("span",
|
|
758
|
-
], 10,
|
|
757
|
+
i("span", Ze, g(P.value), 1)
|
|
758
|
+
], 10, Je));
|
|
759
759
|
}
|
|
760
|
-
}),
|
|
760
|
+
}), $e = [
|
|
761
761
|
"id",
|
|
762
762
|
"data-icon",
|
|
763
763
|
"data-show-icon",
|
|
@@ -767,7 +767,7 @@ var b = () => {
|
|
|
767
767
|
"data-width",
|
|
768
768
|
"data-variant",
|
|
769
769
|
"data-no-text"
|
|
770
|
-
],
|
|
770
|
+
], et = /* @__PURE__ */ s({
|
|
771
771
|
name: "DBCustomButton",
|
|
772
772
|
__name: "custom-button",
|
|
773
773
|
props: {
|
|
@@ -802,23 +802,23 @@ var b = () => {
|
|
|
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 = p(null);
|
|
806
|
+
return (i, a) => (f(), 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(_(C)("db-custom-button", t.class)),
|
|
811
811
|
"data-icon": e.iconLeading ?? e.icon,
|
|
812
|
-
"data-show-icon":
|
|
812
|
+
"data-show-icon": _(k)(e.showIconLeading ?? e.showIcon),
|
|
813
813
|
"data-icon-trailing": e.iconTrailing,
|
|
814
|
-
"data-show-icon-trailing":
|
|
814
|
+
"data-show-icon-trailing": _(k)(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": _(k)(e.noText)
|
|
819
|
+
}, [h(i.$slots, "default")], 10, $e));
|
|
820
820
|
}
|
|
821
|
-
}),
|
|
821
|
+
}), tt = class e {
|
|
822
822
|
static callbacks = {};
|
|
823
823
|
static _instance = null;
|
|
824
824
|
static runCallbacks(t) {
|
|
@@ -829,13 +829,13 @@ var b = () => {
|
|
|
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 = x();
|
|
833
833
|
return e.callbacks[n] = t, n;
|
|
834
834
|
}
|
|
835
835
|
removeCallback(t) {
|
|
836
836
|
delete e.callbacks[t];
|
|
837
837
|
}
|
|
838
|
-
},
|
|
838
|
+
}, nt = class e {
|
|
839
839
|
static callbacks = {};
|
|
840
840
|
static _instance = null;
|
|
841
841
|
static runCallbacks(t) {
|
|
@@ -851,13 +851,13 @@ var b = () => {
|
|
|
851
851
|
}, !0);
|
|
852
852
|
}
|
|
853
853
|
addCallback(t) {
|
|
854
|
-
let n =
|
|
854
|
+
let n = x();
|
|
855
855
|
return e.callbacks[n] = t, n;
|
|
856
856
|
}
|
|
857
857
|
removeCallback(t) {
|
|
858
858
|
delete e.callbacks[t];
|
|
859
859
|
}
|
|
860
|
-
},
|
|
860
|
+
}, rt = (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 b = () => {
|
|
|
865
865
|
outLeft: l,
|
|
866
866
|
outRight: u
|
|
867
867
|
};
|
|
868
|
-
},
|
|
869
|
-
let { outTop: t, outBottom: n, outLeft: r, outRight: i } =
|
|
868
|
+
}, it = (e) => {
|
|
869
|
+
let { outTop: t, outBottom: n, outLeft: r, outRight: i } = rt(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
|
+
}, at = (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 } = ot(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
|
+
}, ot = (e, t, n) => {
|
|
879
879
|
if (!e || !t) return {
|
|
880
880
|
top: 0,
|
|
881
881
|
bottom: 0,
|
|
@@ -905,17 +905,17 @@ var b = () => {
|
|
|
905
905
|
innerWidth: d,
|
|
906
906
|
innerHeight: u
|
|
907
907
|
};
|
|
908
|
-
},
|
|
909
|
-
if (
|
|
908
|
+
}, st = 10, ct = /* @__PURE__ */ new WeakMap(), lt = (e) => {
|
|
909
|
+
if (ct.has(e)) return ct.get(e);
|
|
910
910
|
let t = e.parentElement, n = 0;
|
|
911
|
-
for (; t && n <
|
|
912
|
-
if (t.dataset.correctedPlacement) return
|
|
911
|
+
for (; t && n < st;) {
|
|
912
|
+
if (t.dataset.correctedPlacement) return ct.set(e, t), t;
|
|
913
913
|
t = t.parentElement, n += 1;
|
|
914
914
|
}
|
|
915
|
-
return
|
|
916
|
-
},
|
|
915
|
+
return ct.set(e, null), null;
|
|
916
|
+
}, ut = (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 = lt(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 } = ot(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 b = () => {
|
|
|
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
|
+
}, dt = ["id", "data-width"], ft = /* @__PURE__ */ s({
|
|
965
965
|
name: "DBCustomSelectDropdown",
|
|
966
966
|
__name: "custom-select-dropdown",
|
|
967
967
|
props: {
|
|
@@ -974,28 +974,28 @@ var b = () => {
|
|
|
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 = p(null);
|
|
978
|
+
return (i, a) => (f(), 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(_(C)("db-custom-select-dropdown db-card", t.class)),
|
|
984
984
|
"data-width": e.width
|
|
985
|
-
}, [
|
|
985
|
+
}, [h(i.$slots, "default")], 10, dt));
|
|
986
986
|
}
|
|
987
|
-
}),
|
|
987
|
+
}), pt = ["id", "data-divider"], mt = [
|
|
988
988
|
"data-icon",
|
|
989
989
|
"data-show-icon",
|
|
990
990
|
"data-icon-trailing"
|
|
991
|
-
],
|
|
991
|
+
], ht = [
|
|
992
992
|
"type",
|
|
993
993
|
"name",
|
|
994
994
|
"form",
|
|
995
995
|
"checked",
|
|
996
996
|
"disabled",
|
|
997
997
|
"value"
|
|
998
|
-
],
|
|
998
|
+
], gt = { key: 1 }, _t = /* @__PURE__ */ s({
|
|
999
999
|
name: "DBCustomSelectListItem",
|
|
1000
1000
|
__name: "custom-select-list-item",
|
|
1001
1001
|
props: {
|
|
@@ -1039,50 +1039,50 @@ var b = () => {
|
|
|
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 = p(!1), u = p(null);
|
|
1043
|
+
y(() => [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 d(e) {
|
|
1050
|
+
e.stopPropagation(), s.onChange && s.onChange(e), Ue(o, e, "checked");
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1053
|
-
if (!(s.isGroupTitle || s.type === "checkbox")) return
|
|
1052
|
+
function m() {
|
|
1053
|
+
if (!(s.isGroupTitle || s.type === "checkbox")) return A(s.checked, "checked") ? "check" : "x_placeholder";
|
|
1054
1054
|
}
|
|
1055
|
-
return (n, o) => (
|
|
1055
|
+
return (n, o) => (f(), 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(_(C)("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": _(k)(l.value)
|
|
1064
|
+
}, [t.isGroupTitle ? (f(), r("span", gt, g(t.groupTitle), 1)) : (f(), 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": _(k)(t.showIcon),
|
|
1068
|
+
"data-icon-trailing": m()
|
|
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: _(A)(t.checked, "checked"),
|
|
1076
|
+
disabled: _(A)(t.disabled, "disabled"),
|
|
1077
1077
|
value: t.value,
|
|
1078
|
-
onChange: o[0] ||= async (e) =>
|
|
1079
|
-
}, null, 40,
|
|
1078
|
+
onChange: o[0] ||= async (e) => d(e)
|
|
1079
|
+
}, null, 40, ht), t.label ? (f(), r(e, { key: 0 }, [a(g(t.label), 1)], 64)) : h(n.$slots, "default", { key: 1 })], 8, mt))], 10, pt));
|
|
1080
1080
|
}
|
|
1081
|
-
}),
|
|
1081
|
+
}), vt = [
|
|
1082
1082
|
"role",
|
|
1083
1083
|
"aria-label",
|
|
1084
1084
|
"id"
|
|
1085
|
-
],
|
|
1085
|
+
], yt = /* @__PURE__ */ s({
|
|
1086
1086
|
name: "DBCustomSelectList",
|
|
1087
1087
|
__name: "custom-select-list",
|
|
1088
1088
|
props: {
|
|
@@ -1099,17 +1099,17 @@ var b = () => {
|
|
|
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 = p(null);
|
|
1103
|
+
return (a, o) => (f(), 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(_(C)("db-custom-select-list", t.class))
|
|
1110
|
+
}, [i("ul", null, [h(a.$slots, "default")])], 10, vt));
|
|
1111
1111
|
}
|
|
1112
|
-
}),
|
|
1112
|
+
}), bt = [
|
|
1113
1113
|
"data-variant",
|
|
1114
1114
|
"data-hide-label",
|
|
1115
1115
|
"data-show-icon",
|
|
@@ -1117,10 +1117,10 @@ var b = () => {
|
|
|
1117
1117
|
"data-icon-trailing",
|
|
1118
1118
|
"data-hide-asterisk",
|
|
1119
1119
|
"data-show-icon-trailing"
|
|
1120
|
-
],
|
|
1120
|
+
], xt = ["for"], St = /* @__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("."), Ct = ["id"], wt = ["value"], Tt = {
|
|
1121
1121
|
"data-visually-hidden": "true",
|
|
1122
1122
|
role: "status"
|
|
1123
|
-
},
|
|
1123
|
+
}, Et = /* @__PURE__ */ s({
|
|
1124
1124
|
name: "DBInput",
|
|
1125
1125
|
__name: "input",
|
|
1126
1126
|
props: {
|
|
@@ -1237,121 +1237,121 @@ var b = () => {
|
|
|
1237
1237
|
size: { default: void 0 }
|
|
1238
1238
|
},
|
|
1239
1239
|
emits: ["update:value"],
|
|
1240
|
-
setup(s, { emit:
|
|
1241
|
-
let x =
|
|
1240
|
+
setup(s, { emit: d }) {
|
|
1241
|
+
let x = v(), S = d, T = s, P = p(void 0), L = p(void 0), R = p(void 0), z = p(void 0), B = p(void 0), V = p(void 0), H = p(void 0), U = p(""), W = p(""), ee = p(void 0), G = p(null);
|
|
1242
1242
|
l(() => {
|
|
1243
|
-
|
|
1243
|
+
se(), B.value = T.invalidMessage || "TODO: Add an invalidMessage";
|
|
1244
1244
|
}), u(() => {
|
|
1245
|
-
|
|
1246
|
-
}),
|
|
1247
|
-
(
|
|
1245
|
+
ee.value?.abort();
|
|
1246
|
+
}), y(() => [T.id, T.propOverrides?.id], () => {
|
|
1247
|
+
(T.id ?? T.propOverrides?.id) && se();
|
|
1248
1248
|
}, {
|
|
1249
1249
|
immediate: !0,
|
|
1250
1250
|
flush: "post"
|
|
1251
|
-
}),
|
|
1252
|
-
B.value =
|
|
1251
|
+
}), y(() => [G.value, T.invalidMessage], () => {
|
|
1252
|
+
B.value = T.invalidMessage || G.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
|
+
}), y(() => [P.value], () => {
|
|
1257
|
+
if (P.value) {
|
|
1258
|
+
let e = P.value + J;
|
|
1259
|
+
L.value = e, R.value = P.value + Y, z.value = P.value + oe, V.value = T.dataListId ?? P.value + "-datalist", I(T.message, T.showMessage) && (H.value = e), K();
|
|
1260
1260
|
}
|
|
1261
1261
|
}, {
|
|
1262
1262
|
immediate: !0,
|
|
1263
1263
|
flush: "post"
|
|
1264
|
-
}),
|
|
1265
|
-
|
|
1264
|
+
}), y(() => [T.value], () => {
|
|
1265
|
+
U.value = T.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
|
+
}), y(() => [G.value], () => {
|
|
1270
|
+
if (G.value) {
|
|
1271
|
+
let e = ee.value;
|
|
1272
|
+
e || (e = new AbortController(), ee.value = e), Ke(G.value, {
|
|
1273
|
+
value: T.value,
|
|
1274
1274
|
defaultValue: void 0
|
|
1275
1275
|
}, (e) => {
|
|
1276
|
-
|
|
1276
|
+
ne(e, !0), q(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 te() {
|
|
1284
|
+
return !!(T.validMessage ?? T.validation === "valid");
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1287
|
-
!
|
|
1286
|
+
function K() {
|
|
1287
|
+
!G.value?.validity.valid || T.validation === "invalid" ? (H.value = z.value, B.value = T.invalidMessage || G.value?.validationMessage || "TODO: Add an invalidMessage", E() && (W.value = B.value, O(() => W.value = "", 1e3))) : te() && G.value?.validity.valid && (T.required || T.minLength || T.maxLength || T.pattern) ? (H.value = R.value, E() && (W.value = T.validMessage ?? "TODO: Add a validMessage", O(() => W.value = "", 1e3))) : I(T.message, T.showMessage) ? H.value = L.value : H.value = void 0;
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1290
|
-
|
|
1289
|
+
function q(e, t) {
|
|
1290
|
+
T.input && T.input(e), U.value = e.target.value, T.onInput && T.onInput(e), Ue(S, e), K();
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1293
|
-
|
|
1292
|
+
function ne(e, t) {
|
|
1293
|
+
T.onChange && T.onChange(e), Ue(S, e), K();
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1296
|
-
|
|
1295
|
+
function re(e) {
|
|
1296
|
+
T.onBlur && T.onBlur(e);
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1299
|
-
|
|
1298
|
+
function ie(e) {
|
|
1299
|
+
T.onFocus && T.onFocus(e);
|
|
1300
1300
|
}
|
|
1301
|
-
function
|
|
1302
|
-
let e =
|
|
1303
|
-
return Array.from((
|
|
1301
|
+
function ae() {
|
|
1302
|
+
let e = T.dataList;
|
|
1303
|
+
return Array.from((w(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 se() {
|
|
1309
|
+
let e = T.id ?? T.propOverrides?.id ?? `input-${x}`;
|
|
1310
|
+
P.value = e, L.value = e + J, R.value = e + Y, z.value = e + oe, V.value = e + ce;
|
|
1311
1311
|
}
|
|
1312
|
-
return (l, u) => (
|
|
1313
|
-
class: c(
|
|
1312
|
+
return (l, u) => (f(), r("div", {
|
|
1313
|
+
class: c(_(C)("db-input", T.class)),
|
|
1314
1314
|
"data-variant": s.variant,
|
|
1315
|
-
"data-hide-label":
|
|
1316
|
-
"data-show-icon":
|
|
1315
|
+
"data-hide-label": _(F)(s.showLabel),
|
|
1316
|
+
"data-show-icon": _(k)(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": _(F)(s.showRequiredAsterisk),
|
|
1320
|
+
"data-show-icon-trailing": _(k)(s.showIconTrailing)
|
|
1321
1321
|
}, [
|
|
1322
|
-
i("label", { for:
|
|
1322
|
+
i("label", { for: P.value }, g(s.label ?? _("LABEL SHOULD BE SET")), 9, xt),
|
|
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: G,
|
|
1329
|
+
id: P.value,
|
|
1330
1330
|
name: s.name,
|
|
1331
1331
|
type: s.type || "text",
|
|
1332
|
-
multiple:
|
|
1332
|
+
multiple: _(A)(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 ?? _(" "),
|
|
1335
|
+
disabled: _(A)(s.disabled, "disabled"),
|
|
1336
|
+
required: _(A)(s.required, "required"),
|
|
1337
|
+
step: _(M)(s.step),
|
|
1338
|
+
value: s.value ?? U.value ?? "",
|
|
1339
|
+
maxLength: _(j)(s.maxLength, s.maxlength),
|
|
1340
|
+
minLength: _(j)(s.minLength, s.minlength),
|
|
1341
|
+
max: _(N)(s.max, s.type),
|
|
1342
|
+
min: _(N)(s.min, s.type),
|
|
1343
|
+
readOnly: _(A)(s.readOnly, "readOnly") || _(A)(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: _(A)(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) => q(e),
|
|
1352
|
+
onChange: u[1] ||= async (e) => ne(e),
|
|
1353
|
+
onBlur: u[2] ||= async (e) => re(e),
|
|
1354
|
+
onFocus: u[3] ||= async (e) => ie(e),
|
|
1355
1355
|
list: s.dataList && V.value,
|
|
1356
1356
|
"aria-describedby": s.ariaDescribedBy ?? H.value,
|
|
1357
1357
|
role: [
|
|
@@ -1361,36 +1361,36 @@ var b = () => {
|
|
|
1361
1361
|
"week",
|
|
1362
1362
|
"month",
|
|
1363
1363
|
"color"
|
|
1364
|
-
].includes(s.type ?? "") &&
|
|
1365
|
-
}, null, 40,
|
|
1366
|
-
s.dataList ? (
|
|
1364
|
+
].includes(s.type ?? "") && _(D)() ? "textbox" : void 0
|
|
1365
|
+
}, null, 40, St),
|
|
1366
|
+
s.dataList ? (f(), r("datalist", {
|
|
1367
1367
|
key: 0,
|
|
1368
1368
|
id: V.value
|
|
1369
|
-
}, [(
|
|
1369
|
+
}, [(f(!0), r(e, null, m(ae(), (e) => (f(), r("option", {
|
|
1370
1370
|
key: V.value + "-option-" + e.value,
|
|
1371
1371
|
value: e.value
|
|
1372
|
-
},
|
|
1373
|
-
|
|
1374
|
-
|
|
1372
|
+
}, g(e.label), 9, wt))), 128))], 8, Ct)) : n("", !0),
|
|
1373
|
+
h(l.$slots, "default"),
|
|
1374
|
+
_(I)(s.message, s.showMessage) ? (f(), 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: b(() => [a(g(s.message), 1)]),
|
|
1381
1381
|
_: 1
|
|
1382
1382
|
}, 8, [
|
|
1383
1383
|
"size",
|
|
1384
1384
|
"icon",
|
|
1385
1385
|
"id"
|
|
1386
1386
|
])) : n("", !0),
|
|
1387
|
-
|
|
1387
|
+
te() ? (f(), 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: b(() => [a(g(s.validMessage || _("TODO: Add a validMessage")), 1)]),
|
|
1394
1394
|
_: 1
|
|
1395
1395
|
}, 8, ["id", "size"])) : n("", !0),
|
|
1396
1396
|
o($, {
|
|
@@ -1398,13 +1398,13 @@ var b = () => {
|
|
|
1398
1398
|
id: z.value,
|
|
1399
1399
|
size: s.invalidMessageSize || "small"
|
|
1400
1400
|
}, {
|
|
1401
|
-
default:
|
|
1401
|
+
default: b(() => [a(g(B.value), 1)]),
|
|
1402
1402
|
_: 1
|
|
1403
1403
|
}, 8, ["id", "size"]),
|
|
1404
|
-
i("span",
|
|
1405
|
-
], 10,
|
|
1404
|
+
i("span", Tt, g(W.value), 1)
|
|
1405
|
+
], 10, bt));
|
|
1406
1406
|
}
|
|
1407
|
-
}),
|
|
1407
|
+
}), Dt = [
|
|
1408
1408
|
"id",
|
|
1409
1409
|
"data-emphasis",
|
|
1410
1410
|
"data-wrap",
|
|
@@ -1413,7 +1413,7 @@ var b = () => {
|
|
|
1413
1413
|
"data-width",
|
|
1414
1414
|
"data-show-arrow",
|
|
1415
1415
|
"data-placement"
|
|
1416
|
-
],
|
|
1416
|
+
], Ot = /* @__PURE__ */ s({
|
|
1417
1417
|
name: "DBTooltip",
|
|
1418
1418
|
__name: "tooltip",
|
|
1419
1419
|
props: {
|
|
@@ -1442,80 +1442,80 @@ var b = () => {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
},
|
|
1444
1444
|
setup(e) {
|
|
1445
|
-
let t =
|
|
1445
|
+
let t = v(), n = e, i = p("tooltip-" + t), a = p(!1), o = p(void 0), s = p(void 0), u = p(null);
|
|
1446
1446
|
l(() => {
|
|
1447
1447
|
T(), a.value = !0;
|
|
1448
|
-
}),
|
|
1448
|
+
}), y(() => [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
|
+
}), y(() => [
|
|
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 = g();
|
|
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) => m(e)), ["mouseleave", "focusout"].forEach((t) => {
|
|
1463
|
+
e.addEventListener(t, () => S());
|
|
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 === g());
|
|
1466
|
+
t && !t.isIntersecting && m(!1);
|
|
1467
1467
|
})), a.value = !1;
|
|
1468
1468
|
}
|
|
1469
1469
|
}, {
|
|
1470
1470
|
immediate: !0,
|
|
1471
1471
|
flush: "post"
|
|
1472
1472
|
});
|
|
1473
|
-
function
|
|
1473
|
+
function d(e) {
|
|
1474
1474
|
e.stopPropagation();
|
|
1475
1475
|
}
|
|
1476
|
-
function
|
|
1477
|
-
(!e || e.key === "Escape") && u.value && getComputedStyle(u.value).visibility === "visible" &&
|
|
1476
|
+
function m(e) {
|
|
1477
|
+
(!e || e.key === "Escape") && u.value && getComputedStyle(u.value).visibility === "visible" && g().blur();
|
|
1478
1478
|
}
|
|
1479
|
-
function
|
|
1479
|
+
function g() {
|
|
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 && O(() => {
|
|
1485
|
+
u.value && ut(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 S() {
|
|
1492
|
+
o.value && new nt().removeCallback(o.value), s.value?.unobserve(g());
|
|
1493
1493
|
}
|
|
1494
1494
|
function w(e) {
|
|
1495
|
-
o.value = new
|
|
1495
|
+
o.value = new nt().addCallback((t) => x(t, e)), b(e), s.value?.observe(g());
|
|
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) => (f(), 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(_(C)("db-tooltip", n.class)),
|
|
1507
1507
|
id: i.value,
|
|
1508
1508
|
"data-emphasis": e.emphasis,
|
|
1509
|
-
"data-wrap":
|
|
1510
|
-
"data-animation":
|
|
1509
|
+
"data-wrap": _(k)(e.wrap),
|
|
1510
|
+
"data-animation": _(k)(e.animation ?? !0),
|
|
1511
1511
|
"data-delay": e.delay,
|
|
1512
1512
|
"data-width": e.width,
|
|
1513
|
-
"data-show-arrow":
|
|
1513
|
+
"data-show-arrow": _(k)(e.showArrow ?? !0),
|
|
1514
1514
|
"data-placement": e.placement,
|
|
1515
|
-
onClick: a[0] ||= async (e) =>
|
|
1516
|
-
}, [
|
|
1515
|
+
onClick: a[0] ||= async (e) => d(e)
|
|
1516
|
+
}, [h(t.$slots, "default")], 10, Dt));
|
|
1517
1517
|
}
|
|
1518
|
-
}),
|
|
1518
|
+
}), kt = [
|
|
1519
1519
|
"id",
|
|
1520
1520
|
"data-semantic",
|
|
1521
1521
|
"data-emphasis",
|
|
@@ -1524,7 +1524,7 @@ var b = () => {
|
|
|
1524
1524
|
"data-show-icon",
|
|
1525
1525
|
"data-no-text",
|
|
1526
1526
|
"data-overflow"
|
|
1527
|
-
],
|
|
1527
|
+
], At = /* @__PURE__ */ s({
|
|
1528
1528
|
name: "DBTag",
|
|
1529
1529
|
__name: "tag",
|
|
1530
1530
|
props: {
|
|
@@ -1565,30 +1565,30 @@ var b = () => {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
},
|
|
1567
1567
|
setup(t) {
|
|
1568
|
-
let i = t, s =
|
|
1568
|
+
let i = t, s = p(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 (d, p) => (f(), 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(_(C)("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": _(k)(t.showCheckState ?? !0),
|
|
1584
|
+
"data-show-icon": _(k)(t.showIcon),
|
|
1585
|
+
"data-no-text": _(k)(t.noText),
|
|
1586
|
+
"data-overflow": _(k)(t.overflow)
|
|
1587
1587
|
}, [
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
t.text ? (
|
|
1591
|
-
t.behavior === "removable" ? (
|
|
1588
|
+
h(d.$slots, "content"),
|
|
1589
|
+
h(d.$slots, "default"),
|
|
1590
|
+
t.text ? (f(), r(e, { key: 0 }, [a(g(t.text), 1)], 64)) : n("", !0),
|
|
1591
|
+
t.behavior === "removable" ? (f(), 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 b = () => {
|
|
|
1597
1597
|
"data-variant": "ghost",
|
|
1598
1598
|
type: "button",
|
|
1599
1599
|
onClick: p[0] ||= async (e) => l(e)
|
|
1600
|
-
}, [o(
|
|
1601
|
-
default:
|
|
1600
|
+
}, [o(Ot, { variant: "label" }, {
|
|
1601
|
+
default: b(() => [a(g(u()), 1)]),
|
|
1602
1602
|
_: 1
|
|
1603
1603
|
})])) : n("", !0)
|
|
1604
|
-
], 10,
|
|
1604
|
+
], 10, kt));
|
|
1605
1605
|
}
|
|
1606
|
-
}),
|
|
1606
|
+
}), jt = [
|
|
1607
1607
|
"id",
|
|
1608
1608
|
"aria-invalid",
|
|
1609
1609
|
"data-custom-validity",
|
|
@@ -1616,7 +1616,7 @@ var b = () => {
|
|
|
1616
1616
|
"data-hide-label",
|
|
1617
1617
|
"data-icon",
|
|
1618
1618
|
"data-show-icon"
|
|
1619
|
-
],
|
|
1619
|
+
], Mt = ["id"], Nt = [
|
|
1620
1620
|
"id",
|
|
1621
1621
|
"form",
|
|
1622
1622
|
"name",
|
|
@@ -1624,18 +1624,18 @@ var b = () => {
|
|
|
1624
1624
|
"multiple",
|
|
1625
1625
|
"disabled",
|
|
1626
1626
|
"required"
|
|
1627
|
-
],
|
|
1627
|
+
], Pt = ["disabled", "value"], Ft = ["open"], It = [
|
|
1628
1628
|
"id",
|
|
1629
1629
|
"aria-disabled",
|
|
1630
1630
|
"tabIndex",
|
|
1631
1631
|
"aria-labelledby"
|
|
1632
|
-
],
|
|
1632
|
+
], Lt = ["data-visually-hidden", "id"], Rt = {
|
|
1633
1633
|
key: 0,
|
|
1634
1634
|
"data-visually-hidden": "true"
|
|
1635
|
-
},
|
|
1635
|
+
}, zt = { key: 1 }, Bt = { key: 0 }, Vt = { key: 0 }, Ht = { class: "db-checkbox db-custom-select-list-item" }, Ut = ["form", "checked"], Wt = ["aria-hidden", "id"], Gt = {
|
|
1636
1636
|
"data-visually-hidden": "true",
|
|
1637
1637
|
role: "status"
|
|
1638
|
-
},
|
|
1638
|
+
}, Kt = /* @__PURE__ */ s({
|
|
1639
1639
|
name: "DBCustomSelect",
|
|
1640
1640
|
__name: "custom-select",
|
|
1641
1641
|
props: {
|
|
@@ -1759,204 +1759,204 @@ var b = () => {
|
|
|
1759
1759
|
}
|
|
1760
1760
|
},
|
|
1761
1761
|
emits: ["update:values"],
|
|
1762
|
-
setup(s, { emit:
|
|
1763
|
-
let x =
|
|
1762
|
+
setup(s, { emit: d }) {
|
|
1763
|
+
let x = v(), S = d, w = s, T = p(void 0), D = p(void 0), j = p(void 0), M = p(void 0), N = p(void 0), P = p(void 0), R = p(void 0), z = p(void 0), B = p(void 0), V = p(void 0), H = p("no-validation"), U = p(!1), W = p(void 0), ee = p(void 0), G = p(""), te = p(void 0), K = p(""), q = p([]), ne = p(!1), re = p(!1), ce = p(0), X = p([]), le = p([]), de = p(!1), pe = p(void 0), me = p(0), he = p(void 0), ge = p(void 0), _e = p(void 0), ve = p(!1), ye = p(!1), be = p(null), Z = p(null), Q = p(null), xe = p(null), Se = p(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 && (ge.value = new IntersectionObserver((e) => {
|
|
1766
|
+
if (Z.value) {
|
|
1767
|
+
let t = e.find(({ target: e }) => e === Z.value);
|
|
1768
|
+
t && !t.isIntersecting && Z.value.open && (Z.value.open = !1);
|
|
1769
1769
|
}
|
|
1770
1770
|
}));
|
|
1771
1771
|
}), u(() => {
|
|
1772
|
-
|
|
1773
|
-
}),
|
|
1772
|
+
W.value?.abort();
|
|
1773
|
+
}), y(() => [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
|
+
}), y(() => [Z.value], () => {
|
|
1779
|
+
Z.value && Z.value.addEventListener("focusout", (e) => Re(e));
|
|
1780
1780
|
}, {
|
|
1781
1781
|
immediate: !0,
|
|
1782
1782
|
flush: "post"
|
|
1783
|
-
}),
|
|
1784
|
-
if (
|
|
1785
|
-
let e =
|
|
1786
|
-
R.value =
|
|
1783
|
+
}), y(() => [T.value], () => {
|
|
1784
|
+
if (T.value) {
|
|
1785
|
+
let e = T.value + J;
|
|
1786
|
+
R.value = T.value + ie, P.value = T.value + ae, j.value = T.value + Y, M.value = T.value + oe, B.value = T.value + se, I(w.message, w.showMessage) ? Oe(e) : Oe();
|
|
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
|
+
}), y(() => [Z.value, ee.value], () => {
|
|
1792
|
+
if (Z.value) {
|
|
1793
|
+
let e = Z.value.querySelector("summary");
|
|
1794
|
+
e && e.setAttribute("aria-describedby", w.ariaDescribedBy ?? (ee.value || ""));
|
|
1795
1795
|
}
|
|
1796
1796
|
}, {
|
|
1797
1797
|
immediate: !0,
|
|
1798
1798
|
flush: "post"
|
|
1799
|
-
}),
|
|
1799
|
+
}), y(() => [
|
|
1800
1800
|
w.showNoResults,
|
|
1801
1801
|
w.showLoading,
|
|
1802
|
-
|
|
1802
|
+
le.value
|
|
1803
1803
|
], () => {
|
|
1804
|
-
w.showNoResults === void 0 ?
|
|
1804
|
+
w.showNoResults === void 0 ? le.value && (de.value = le.value.length === 0) : de.value = w.showNoResults;
|
|
1805
1805
|
}, {
|
|
1806
1806
|
immediate: !0,
|
|
1807
1807
|
flush: "post"
|
|
1808
|
-
}),
|
|
1808
|
+
}), y(() => [
|
|
1809
1809
|
w.showSelectAll,
|
|
1810
|
-
|
|
1810
|
+
ce.value,
|
|
1811
1811
|
w.multiple
|
|
1812
1812
|
], () => {
|
|
1813
|
-
|
|
1813
|
+
ne.value = !!(w.multiple && (w.showSelectAll ?? ce.value > 5));
|
|
1814
1814
|
}, {
|
|
1815
1815
|
immediate: !0,
|
|
1816
1816
|
flush: "post"
|
|
1817
|
-
}),
|
|
1818
|
-
|
|
1817
|
+
}), y(() => [w.showSearch, ce.value], () => {
|
|
1818
|
+
re.value = w.showSearch ?? ce.value > 9;
|
|
1819
1819
|
}, {
|
|
1820
1820
|
immediate: !0,
|
|
1821
1821
|
flush: "post"
|
|
1822
|
-
}),
|
|
1822
|
+
}), y(() => [w.values], () => {
|
|
1823
1823
|
let e = w.values;
|
|
1824
|
-
Array.isArray(e) ?
|
|
1824
|
+
Array.isArray(e) ? X.value !== e && (X.value = e) : e == null && X.value?.length !== 0 && (X.value = []);
|
|
1825
1825
|
}, {
|
|
1826
1826
|
immediate: !0,
|
|
1827
1827
|
flush: "post"
|
|
1828
|
-
}),
|
|
1829
|
-
|
|
1828
|
+
}), y(() => [X.value, Q.value], () => {
|
|
1829
|
+
Q.value && Te();
|
|
1830
1830
|
}, {
|
|
1831
1831
|
immediate: !0,
|
|
1832
1832
|
flush: "post"
|
|
1833
|
-
}),
|
|
1834
|
-
if (
|
|
1835
|
-
let e =
|
|
1836
|
-
e || (e = new AbortController(),
|
|
1833
|
+
}), y(() => [Q.value], () => {
|
|
1834
|
+
if (Q.value) {
|
|
1835
|
+
let e = W.value;
|
|
1836
|
+
e || (e = new AbortController(), W.value = e);
|
|
1837
1837
|
let t = w.values;
|
|
1838
|
-
|
|
1839
|
-
|
|
1838
|
+
We(Q.value, () => {
|
|
1839
|
+
Be(t || (Q.value.value ? [Q.value.value] : [])), Te();
|
|
1840
1840
|
}, e.signal);
|
|
1841
1841
|
}
|
|
1842
1842
|
}, {
|
|
1843
1843
|
immediate: !0,
|
|
1844
1844
|
flush: "post"
|
|
1845
|
-
}),
|
|
1845
|
+
}), y(() => [w.validation], () => {
|
|
1846
1846
|
H.value = w.validation;
|
|
1847
1847
|
}, {
|
|
1848
1848
|
immediate: !0,
|
|
1849
1849
|
flush: "post"
|
|
1850
|
-
}),
|
|
1851
|
-
|
|
1850
|
+
}), y(() => [X.value, ce.value], () => {
|
|
1851
|
+
X.value?.length === 0 ? (ve.value = !1, ye.value = !1) : X.value?.length === ce.value ? (ye.value = !1, ve.value = !0) : X.value && (ye.value = !0);
|
|
1852
1852
|
}, {
|
|
1853
1853
|
immediate: !0,
|
|
1854
1854
|
flush: "post"
|
|
1855
|
-
}),
|
|
1856
|
-
|
|
1855
|
+
}), y(() => [w.options], () => {
|
|
1856
|
+
le.value = w.options, ce.value = w.options?.filter((e) => !e.isGroupTitle).length ?? 0;
|
|
1857
1857
|
}, {
|
|
1858
1858
|
immediate: !0,
|
|
1859
1859
|
flush: "post"
|
|
1860
|
-
}),
|
|
1861
|
-
if (
|
|
1860
|
+
}), y(() => [w.searchValue], () => {
|
|
1861
|
+
if (_e.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
|
+
}), y(() => [w.options, X.value], () => {
|
|
1869
|
+
w.options?.length && (q.value = w.options?.filter((e) => !e.value || !X.value?.includes ? !1 : !e.isGroupTitle && X.value?.includes(e.value)));
|
|
1870
1870
|
}, {
|
|
1871
1871
|
immediate: !0,
|
|
1872
1872
|
flush: "post"
|
|
1873
|
-
}),
|
|
1874
|
-
|
|
1873
|
+
}), y(() => [
|
|
1874
|
+
q.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
|
+
G.value = w.selectedLabels;
|
|
1882
1882
|
return;
|
|
1883
1883
|
}
|
|
1884
|
-
if (
|
|
1884
|
+
if (q.value?.length) {
|
|
1885
1885
|
if (w.transformSelectedLabels) {
|
|
1886
|
-
let e =
|
|
1887
|
-
|
|
1886
|
+
let e = q.value, t = w.transformSelectedLabels;
|
|
1887
|
+
G.value = t(e);
|
|
1888
1888
|
return;
|
|
1889
1889
|
}
|
|
1890
|
-
w.selectedType === "amount" ?
|
|
1891
|
-
} else
|
|
1890
|
+
w.selectedType === "amount" ? G.value = w.amountText ? w.amountText : `${q.value?.length} ${fe}` : G.value = q.value?.map((e) => Ae(e)).join(", ");
|
|
1891
|
+
} else G.value = "";
|
|
1892
1892
|
}, {
|
|
1893
1893
|
immediate: !0,
|
|
1894
1894
|
flush: "post"
|
|
1895
|
-
}),
|
|
1896
|
-
w.onAmountChange && w.onAmountChange(
|
|
1895
|
+
}), y(() => [q.value], () => {
|
|
1896
|
+
w.onAmountChange && w.onAmountChange(q.value?.length ?? 0);
|
|
1897
1897
|
}, {
|
|
1898
1898
|
immediate: !0,
|
|
1899
1899
|
flush: "post"
|
|
1900
|
-
}),
|
|
1901
|
-
|
|
1900
|
+
}), y(() => [ye.value, xe.value], () => {
|
|
1901
|
+
xe.value && (xe.value.indeterminate = !!ye.value);
|
|
1902
1902
|
}, {
|
|
1903
1903
|
immediate: !0,
|
|
1904
1904
|
flush: "post"
|
|
1905
|
-
}),
|
|
1906
|
-
N.value = w.invalidMessage ||
|
|
1905
|
+
}), y(() => [Q.value, w.invalidMessage], () => {
|
|
1906
|
+
N.value = w.invalidMessage || Q.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 Ce(e) {
|
|
1912
|
+
e?.target?.contains && e?.target?.contains(Z.value) && Pe();
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function we() {
|
|
1915
1915
|
return !!(w.validMessage ?? w.validation === "valid");
|
|
1916
1916
|
}
|
|
1917
|
-
function
|
|
1918
|
-
|
|
1917
|
+
function Te() {
|
|
1918
|
+
Q.value && (Q.value.value = De()), !Q.value?.validity.valid || w.validation === "invalid" ? (Oe(M.value), N.value = w.invalidMessage || Q.value?.validationMessage || "TODO: Add an invalidMessage", E() && (K.value = N.value, O(() => K.value = "", 1e3)), U.value && (H.value = w.validation ?? "invalid")) : we() && Q.value?.validity.valid && w.required ? (Oe(j.value), E() && (K.value = w.validMessage ?? "TODO: Add a validMessage", O(() => K.value = "", 1e3)), H.value = w.validation ?? "valid") : I(w.message, w.showMessage) ? (Oe(D.value), H.value = w.validation ?? "no-validation") : (Oe(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 Ee(e) {
|
|
1921
|
+
w.onDropdownToggle && (e.stopPropagation(), w.onDropdownToggle(e)), e.target instanceof HTMLDetailsElement && e.target.open ? (pe.value = new tt().addCallback((e) => ze(e)), he.value = new nt().addCallback((e) => Ce(e)), Pe(), ge.value?.observe(Z.value), e.target.dataset.test || Ke()) : (pe.value && new tt().removeCallback(pe.value), he.value && new nt().removeCallback(he.value), ge.value?.unobserve(Z.value));
|
|
1922
1922
|
}
|
|
1923
|
-
function
|
|
1924
|
-
return
|
|
1923
|
+
function De() {
|
|
1924
|
+
return X.value?.length ? X.value.at(0) ?? "" : "";
|
|
1925
1925
|
}
|
|
1926
|
-
function
|
|
1926
|
+
function Oe(e) {
|
|
1927
1927
|
let t = [];
|
|
1928
|
-
e && t.push(e),
|
|
1928
|
+
e && t.push(e), te.value && G.value?.length && t.push(te.value), ee.value = t.join(" ");
|
|
1929
1929
|
}
|
|
1930
|
-
function
|
|
1930
|
+
function ke() {
|
|
1931
1931
|
return w.selectAllLabel ?? "LABEL SHOULD BE SET";
|
|
1932
1932
|
}
|
|
1933
|
-
function
|
|
1933
|
+
function Ae(e) {
|
|
1934
1934
|
return e.label ?? e.value?.toString() ?? "";
|
|
1935
1935
|
}
|
|
1936
|
-
function
|
|
1937
|
-
return e &&
|
|
1936
|
+
function je(e) {
|
|
1937
|
+
return e && X.value?.includes ? X.value?.includes(e) : !1;
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1939
|
+
function Me(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} ${Ae(e)}`;
|
|
1946
1946
|
}
|
|
1947
|
-
function
|
|
1948
|
-
t && t.stopPropagation(),
|
|
1947
|
+
function Ne(e, t) {
|
|
1948
|
+
t && t.stopPropagation(), Ve(e.value), Ye();
|
|
1949
1949
|
}
|
|
1950
|
-
function
|
|
1951
|
-
if (
|
|
1952
|
-
let e =
|
|
1953
|
-
e &&
|
|
1954
|
-
|
|
1950
|
+
function Pe() {
|
|
1951
|
+
if (Z.value) {
|
|
1952
|
+
let e = Z.value.querySelector("article");
|
|
1953
|
+
e && O(() => {
|
|
1954
|
+
at(e, Z.value, w.placement ?? "bottom");
|
|
1955
1955
|
}, 1);
|
|
1956
1956
|
}
|
|
1957
1957
|
}
|
|
1958
|
-
function
|
|
1959
|
-
if (
|
|
1958
|
+
function Fe(e) {
|
|
1959
|
+
if (Z.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 b = () => {
|
|
|
1983
1983
|
e = e.previousElementSibling;
|
|
1984
1984
|
}
|
|
1985
1985
|
if (!e) {
|
|
1986
|
-
let e =
|
|
1986
|
+
let e = Z.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 = L(Z.value);
|
|
1990
|
+
if (e) O(() => {
|
|
1991
1991
|
e.focus();
|
|
1992
1992
|
}, 100);
|
|
1993
1993
|
else {
|
|
1994
|
-
let e = Array.from(
|
|
1994
|
+
let e = Array.from(Z.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") ? (Re(void 0, !0), Ye()) : Ge(t);
|
|
2001
2001
|
}
|
|
2002
|
-
} else (e.key === "ArrowDown" || e.key === "ArrowRight") && (
|
|
2002
|
+
} else (e.key === "ArrowDown" || e.key === "ArrowRight") && (Pe(), Z.value && (Z.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 Le(e) {
|
|
2006
|
+
if (e.stopPropagation(), e.key === "Escape" && Z.value?.open) Re(void 0, !0), Ye();
|
|
2007
|
+
else if (e.key === "Enter" && Z.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 = le.value?.find((e) => !e.isGroupTitle && !e.disabled);
|
|
2013
|
+
t?.value && (Ve(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") && Fe(e);
|
|
2017
2017
|
}
|
|
2018
|
-
function
|
|
2019
|
-
if (
|
|
2020
|
-
if (t)
|
|
2021
|
-
else if (
|
|
2018
|
+
function Re(e, t) {
|
|
2019
|
+
if (Z.value) {
|
|
2020
|
+
if (t) Z.value.open = !1, Ye();
|
|
2021
|
+
else if (Z.value.open && e && e.relatedTarget) {
|
|
2022
2022
|
let t = e.relatedTarget;
|
|
2023
|
-
!
|
|
2023
|
+
!Z.value.contains(t) && t.localName !== "dialog" && O(() => Z.value.open = !1, 1);
|
|
2024
2024
|
}
|
|
2025
2025
|
}
|
|
2026
2026
|
}
|
|
2027
|
-
function
|
|
2027
|
+
function ze(e) {
|
|
2028
2028
|
if (e) {
|
|
2029
2029
|
let t = e.target;
|
|
2030
|
-
|
|
2030
|
+
Z.value?.open && !Z.value.contains(t) && (Z.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
|
+
}
|
|
2033
2036
|
function Ve(e) {
|
|
2034
|
-
|
|
2037
|
+
e && (w.multiple ? X.value?.includes(e) ? Be(X.value.filter((t) => t !== e)) : Be([...X.value || [], e]) : (Be([e]), Re(void 0, !0)));
|
|
2035
2038
|
}
|
|
2036
2039
|
function He(e) {
|
|
2037
|
-
|
|
2038
|
-
}
|
|
2039
|
-
function We(e) {
|
|
2040
|
-
if (e.stopPropagation(), Y.value?.length === le.value) Ve([]);
|
|
2040
|
+
if (e.stopPropagation(), X.value?.length === ce.value) Be([]);
|
|
2041
2041
|
else {
|
|
2042
|
-
let e =
|
|
2043
|
-
|
|
2042
|
+
let e = re.value && Se.value ? Se.value.value : void 0;
|
|
2043
|
+
Be(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 (Z.value) {
|
|
2048
|
+
let t = Array.from(Z.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 && O(() => {
|
|
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 (Z.value) {
|
|
2059
|
+
let e = L(Z.value);
|
|
2060
|
+
e ? O(() => {
|
|
2061
2061
|
e.focus();
|
|
2062
2062
|
}, 1) : Ge();
|
|
2063
2063
|
}
|
|
@@ -2068,97 +2068,97 @@ var b = () => {
|
|
|
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, _e.value = t;
|
|
2072
2072
|
}
|
|
2073
|
-
!w.options || !t || t.length === 0 ?
|
|
2073
|
+
!w.options || !t || t.length === 0 ? le.value = w.options : w.searchFilter ? le.value = w.options.filter((e) => w.searchFilter(e, t)) : le.value = w.options.filter((e) => !e.isGroupTitle && Ae(e).toLowerCase().includes(t.toLowerCase()));
|
|
2074
2074
|
}
|
|
2075
2075
|
function Je(e) {
|
|
2076
|
-
e.stopPropagation(),
|
|
2076
|
+
e.stopPropagation(), Be([]), Ye();
|
|
2077
2077
|
}
|
|
2078
2078
|
function Ye() {
|
|
2079
|
-
|
|
2079
|
+
Z.value && Z.value.querySelector("summary")?.focus();
|
|
2080
2080
|
}
|
|
2081
2081
|
function Xe() {
|
|
2082
2082
|
let e = w.id ?? w.propOverrides?.id ?? `custom-select-${x}`;
|
|
2083
|
-
|
|
2083
|
+
T.value = e, D.value = e + J, j.value = e + Y, M.value = e + oe, P.value = e + ae, R.value = e + ie, z.value = e + "-summary", B.value = e + se, te.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) => (f(), r("div", {
|
|
2089
|
+
id: T.value,
|
|
2090
2090
|
ref_key: "_ref",
|
|
2091
|
-
ref:
|
|
2092
|
-
class: c(
|
|
2091
|
+
ref: be,
|
|
2092
|
+
class: c(_(C)("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": _(k)(s.required),
|
|
2098
|
+
"data-hide-asterisk": _(F)(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": _(F)(s.showLabel),
|
|
2102
2102
|
"data-icon": s.icon,
|
|
2103
|
-
"data-show-icon":
|
|
2103
|
+
"data-show-icon": _(k)(s.showIcon)
|
|
2104
2104
|
}, [
|
|
2105
|
-
i("label", { id: R.value }, [a(
|
|
2105
|
+
i("label", { id: R.value }, [a(g(s.label ?? _("LABEL SHOULD BE SET")), 1), i("select", {
|
|
2106
2106
|
role: "none",
|
|
2107
2107
|
hidden: !0,
|
|
2108
|
-
id:
|
|
2108
|
+
id: P.value,
|
|
2109
2109
|
tabIndex: -1,
|
|
2110
2110
|
ref_key: "selectRef",
|
|
2111
|
-
ref:
|
|
2111
|
+
ref: Q,
|
|
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: _(A)(s.multiple, "multiple"),
|
|
2116
|
+
disabled: _(A)(s.disabled, "disabled"),
|
|
2117
|
+
required: _(A)(s.required, "required"),
|
|
2118
2118
|
onChange: u[0] ||= async (e) => Ze(e)
|
|
2119
|
-
}, [s.options?.length ? (
|
|
2119
|
+
}, [s.options?.length ? (f(!0), r(e, { key: 0 }, m(s.options, (e, t) => (f(), r("option", {
|
|
2120
2120
|
key: t,
|
|
2121
2121
|
disabled: e.disabled,
|
|
2122
2122
|
value: e.value
|
|
2123
|
-
},
|
|
2123
|
+
}, g(Ae(e)), 9, Pt))), 128)) : n("", !0)], 40, Nt)], 8, Mt),
|
|
2124
2124
|
i("details", {
|
|
2125
2125
|
ref_key: "detailsRef",
|
|
2126
|
-
ref:
|
|
2126
|
+
ref: Z,
|
|
2127
2127
|
open: s.open,
|
|
2128
|
-
onToggle: u[2] ||= async (e) =>
|
|
2129
|
-
onKeydown: u[3] ||= async (e) =>
|
|
2130
|
-
}, [
|
|
2128
|
+
onToggle: u[2] ||= async (e) => Ee(e),
|
|
2129
|
+
onKeydown: u[3] ||= async (e) => Le(e)
|
|
2130
|
+
}, [h(l.$slots, "default"), s.options ? (f(), 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": _(k)(s.disabled),
|
|
2134
2134
|
tabIndex: s.disabled ? -1 : void 0,
|
|
2135
2135
|
"aria-labelledby": R.value
|
|
2136
|
-
}, [
|
|
2136
|
+
}, [G.value?.length ? (f(), r("span", {
|
|
2137
2137
|
key: 0,
|
|
2138
|
-
"data-visually-hidden":
|
|
2139
|
-
id:
|
|
2140
|
-
}, [s.selectedPrefix ? (
|
|
2138
|
+
"data-visually-hidden": _(k)(s.selectedType === "tag"),
|
|
2139
|
+
id: te.value
|
|
2140
|
+
}, [s.selectedPrefix ? (f(), r("span", Rt, g(s.selectedPrefix), 1)) : n("", !0), a(" " + g(G.value), 1)], 8, Lt)) : n("", !0), s.selectedType === "tag" ? (f(), r("div", zt, [(f(!0), r(e, null, m(q.value, (e, n) => (f(), t(At, {
|
|
2141
2141
|
key: n,
|
|
2142
2142
|
emphasis: "strong",
|
|
2143
2143
|
behavior: "removable",
|
|
2144
|
-
removeButton:
|
|
2145
|
-
onRemove: (t) =>
|
|
2144
|
+
removeButton: Me(e),
|
|
2145
|
+
onRemove: (t) => Ne(e, t)
|
|
2146
2146
|
}, {
|
|
2147
|
-
default:
|
|
2147
|
+
default: b(() => [a(g(Ae(e)), 1)]),
|
|
2148
2148
|
_: 2
|
|
2149
|
-
}, 1032, ["removeButton", "onRemove"]))), 128))])) : n("", !0)], 8,
|
|
2150
|
-
default:
|
|
2151
|
-
|
|
2149
|
+
}, 1032, ["removeButton", "onRemove"]))), 128))])) : n("", !0)], 8, It), o(ft, { width: s.dropdownWidth }, {
|
|
2150
|
+
default: b(() => [
|
|
2151
|
+
re.value ? (f(), r("div", Bt, [o(Et, {
|
|
2152
2152
|
type: "search",
|
|
2153
2153
|
ref_key: "searchInputRef",
|
|
2154
|
-
ref:
|
|
2155
|
-
name:
|
|
2156
|
-
form:
|
|
2154
|
+
ref: Se,
|
|
2155
|
+
name: T.value,
|
|
2156
|
+
form: T.value,
|
|
2157
2157
|
showLabel: !1,
|
|
2158
|
-
value:
|
|
2159
|
-
label: s.searchLabel ??
|
|
2158
|
+
value: _e.value,
|
|
2159
|
+
label: s.searchLabel ?? _("LABEL SHOULD BE SET"),
|
|
2160
2160
|
placeholder: s.searchPlaceholder ?? s.searchLabel,
|
|
2161
|
-
ariaDescribedBy:
|
|
2161
|
+
ariaDescribedBy: de.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 b = () => {
|
|
|
2169
2169
|
"ariaDescribedBy",
|
|
2170
2170
|
"onInput"
|
|
2171
2171
|
])])) : n("", !0),
|
|
2172
|
-
|
|
2172
|
+
de.value || s.showLoading ? (f(), 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: b(() => [a(g((s.showLoading ? s.loadingText : s.noResultsText) ?? _("MESSAGE SHOULD BE SET")), 1)]),
|
|
2179
2179
|
_: 1
|
|
2180
2180
|
}, 8, [
|
|
2181
2181
|
"id",
|
|
2182
2182
|
"icon",
|
|
2183
2183
|
"semantic"
|
|
2184
|
-
])) : (
|
|
2184
|
+
])) : (f(), r(e, { key: 2 }, [ne.value ? (f(), r("div", Vt, [i("div", Ht, [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: xe,
|
|
2189
|
+
form: T.value,
|
|
2190
|
+
checked: ve.value,
|
|
2191
|
+
onChange: u[1] ||= async (e) => He(e)
|
|
2192
|
+
}, null, 40, Ut), a(g(ke()), 1)])])])) : n("", !0), o(yt, {
|
|
2193
|
+
multiple: _(A)(s.multiple, "multiple"),
|
|
2194
|
+
label: s.listLabel ?? s.label ?? _("LABEL SHOULD BE SET")
|
|
2195
2195
|
}, {
|
|
2196
|
-
default:
|
|
2196
|
+
default: b(() => [(f(!0), r(e, null, m(le.value, (i, o) => (f(), t(_t, {
|
|
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: Ae(i),
|
|
2203
|
+
name: T.value,
|
|
2204
|
+
checked: je(i.value),
|
|
2205
2205
|
disabled: i.disabled,
|
|
2206
2206
|
value: i.value,
|
|
2207
|
-
onChange: (e) =>
|
|
2207
|
+
onChange: (e) => Ve(i.value)
|
|
2208
2208
|
}, {
|
|
2209
|
-
default:
|
|
2209
|
+
default: b(() => [i.isGroupTitle ? n("", !0) : (f(), r(e, { key: 0 }, [a(g(Ae(i)), 1)], 64))]),
|
|
2210
2210
|
_: 2
|
|
2211
2211
|
}, 1032, [
|
|
2212
2212
|
"type",
|
|
@@ -2227,11 +2227,11 @@ var b = () => {
|
|
|
2227
2227
|
width: "full",
|
|
2228
2228
|
icon: "cross",
|
|
2229
2229
|
size: "small",
|
|
2230
|
-
name:
|
|
2231
|
-
form:
|
|
2232
|
-
onClick: (e) =>
|
|
2230
|
+
name: T.value,
|
|
2231
|
+
form: T.value,
|
|
2232
|
+
onClick: (e) => Re(void 0, !0)
|
|
2233
2233
|
}, {
|
|
2234
|
-
default:
|
|
2234
|
+
default: b(() => [a(g(s.mobileCloseButtonText ?? _("Close")), 1)]),
|
|
2235
2235
|
_: 1
|
|
2236
2236
|
}, 8, [
|
|
2237
2237
|
"name",
|
|
@@ -2240,20 +2240,20 @@ var b = () => {
|
|
|
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, Ft),
|
|
2244
|
+
(s.showClearSelection ?? !0) && X.value?.length ? (f(), 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: T.value,
|
|
2251
|
+
form: T.value,
|
|
2252
|
+
disabled: _(A)(s.disabled, "disabled"),
|
|
2253
2253
|
onClick: (e) => Je(e)
|
|
2254
2254
|
}, {
|
|
2255
|
-
default:
|
|
2256
|
-
default:
|
|
2255
|
+
default: b(() => [a(g(s.clearSelectionText), 1), o(Ot, { placement: "top" }, {
|
|
2256
|
+
default: b(() => [a(g(s.clearSelectionText), 1)]),
|
|
2257
2257
|
_: 1
|
|
2258
2258
|
})]),
|
|
2259
2259
|
_: 1
|
|
@@ -2265,25 +2265,25 @@ var b = () => {
|
|
|
2265
2265
|
])) : n("", !0),
|
|
2266
2266
|
i("span", {
|
|
2267
2267
|
class: "db-custom-select-placeholder",
|
|
2268
|
-
"aria-hidden":
|
|
2268
|
+
"aria-hidden": _(k)(!0),
|
|
2269
2269
|
id: B.value
|
|
2270
|
-
},
|
|
2271
|
-
|
|
2270
|
+
}, g(s.placeholder ?? s.label), 9, Wt),
|
|
2271
|
+
_(I)(s.message, s.showMessage) ? (f(), t($, {
|
|
2272
2272
|
key: 1,
|
|
2273
2273
|
size: "small",
|
|
2274
2274
|
icon: s.messageIcon,
|
|
2275
|
-
id:
|
|
2275
|
+
id: D.value
|
|
2276
2276
|
}, {
|
|
2277
|
-
default:
|
|
2277
|
+
default: b(() => [a(g(s.message), 1)]),
|
|
2278
2278
|
_: 1
|
|
2279
2279
|
}, 8, ["icon", "id"])) : n("", !0),
|
|
2280
|
-
|
|
2280
|
+
we() ? (f(), t($, {
|
|
2281
2281
|
key: 2,
|
|
2282
2282
|
size: "small",
|
|
2283
2283
|
semantic: "successful",
|
|
2284
2284
|
id: j.value
|
|
2285
2285
|
}, {
|
|
2286
|
-
default:
|
|
2286
|
+
default: b(() => [a(g(s.validMessage || _("TODO: Add a validMessage")), 1)]),
|
|
2287
2287
|
_: 1
|
|
2288
2288
|
}, 8, ["id"])) : n("", !0),
|
|
2289
2289
|
o($, {
|
|
@@ -2291,17 +2291,17 @@ var b = () => {
|
|
|
2291
2291
|
semantic: "critical",
|
|
2292
2292
|
id: M.value
|
|
2293
2293
|
}, {
|
|
2294
|
-
default:
|
|
2294
|
+
default: b(() => [a(g(N.value), 1)]),
|
|
2295
2295
|
_: 1
|
|
2296
2296
|
}, 8, ["id"]),
|
|
2297
|
-
i("span",
|
|
2298
|
-
], 10,
|
|
2297
|
+
i("span", Gt, g(K.value), 1)
|
|
2298
|
+
], 10, jt));
|
|
2299
2299
|
}
|
|
2300
|
-
}),
|
|
2300
|
+
}), qt = [
|
|
2301
2301
|
"fixed",
|
|
2302
2302
|
"auto",
|
|
2303
2303
|
"full"
|
|
2304
|
-
],
|
|
2304
|
+
], Jt = ["id"], Yt = /* @__PURE__ */ s({
|
|
2305
2305
|
name: "DBCustomSelectFormField",
|
|
2306
2306
|
__name: "custom-select-form-field",
|
|
2307
2307
|
props: {
|
|
@@ -2313,25 +2313,25 @@ var b = () => {
|
|
|
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 = p(null);
|
|
2317
|
+
return (i, a) => (f(), 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(_(C)("db-custom-select-form-field", t.class))
|
|
2322
|
+
}, [h(i.$slots, "default")], 10, Jt));
|
|
2323
2323
|
}
|
|
2324
|
-
}),
|
|
2324
|
+
}), Xt = ["checkbox", "radio"], Zt = [
|
|
2325
2325
|
"amount",
|
|
2326
2326
|
"text",
|
|
2327
2327
|
"tag"
|
|
2328
|
-
],
|
|
2328
|
+
], Qt = [
|
|
2329
2329
|
"id",
|
|
2330
2330
|
"data-margin",
|
|
2331
2331
|
"data-variant",
|
|
2332
2332
|
"data-emphasis",
|
|
2333
2333
|
"data-width"
|
|
2334
|
-
],
|
|
2334
|
+
], $t = /* @__PURE__ */ s({
|
|
2335
2335
|
name: "DBDivider",
|
|
2336
2336
|
__name: "divider",
|
|
2337
2337
|
props: {
|
|
@@ -2347,8 +2347,8 @@ var b = () => {
|
|
|
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 = p(null);
|
|
2351
|
+
return (i, a) => (f(), r("div", {
|
|
2352
2352
|
ref_key: "_ref",
|
|
2353
2353
|
ref: n,
|
|
2354
2354
|
id: e.id ?? e.propOverrides?.id,
|
|
@@ -2356,21 +2356,21 @@ var b = () => {
|
|
|
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(_(C)("db-divider", t.class))
|
|
2360
|
+
}, null, 10, Qt));
|
|
2361
2361
|
}
|
|
2362
|
-
}),
|
|
2362
|
+
}), en = ["none", "_"], tn = ["horizontal", "vertical"], nn = [
|
|
2363
2363
|
"id",
|
|
2364
2364
|
"data-position",
|
|
2365
2365
|
"data-backdrop",
|
|
2366
2366
|
"data-direction",
|
|
2367
2367
|
"data-variant"
|
|
2368
|
-
],
|
|
2368
|
+
], rn = [
|
|
2369
2369
|
"data-spacing",
|
|
2370
2370
|
"data-width",
|
|
2371
2371
|
"data-direction",
|
|
2372
2372
|
"data-rounded"
|
|
2373
|
-
],
|
|
2373
|
+
], an = { class: "db-drawer-header" }, on = { class: "db-drawer-header-text" }, sn = { class: "db-drawer-content" }, cn = /* @__PURE__ */ s({
|
|
2374
2374
|
name: "DBDrawer",
|
|
2375
2375
|
__name: "drawer",
|
|
2376
2376
|
props: {
|
|
@@ -2404,15 +2404,15 @@ var b = () => {
|
|
|
2404
2404
|
spacing: { default: void 0 }
|
|
2405
2405
|
},
|
|
2406
2406
|
setup(e) {
|
|
2407
|
-
let t = e, n =
|
|
2407
|
+
let t = e, n = p(!1), s = p(null), u = p(null);
|
|
2408
2408
|
l(() => {
|
|
2409
|
-
|
|
2410
|
-
}),
|
|
2411
|
-
|
|
2409
|
+
m(), n.value = !0;
|
|
2410
|
+
}), y(() => [t.open], () => {
|
|
2411
|
+
m();
|
|
2412
2412
|
}, {
|
|
2413
2413
|
immediate: !0,
|
|
2414
2414
|
flush: "post"
|
|
2415
|
-
}),
|
|
2415
|
+
}), y(() => [
|
|
2416
2416
|
s.value,
|
|
2417
2417
|
n.value,
|
|
2418
2418
|
t.position
|
|
@@ -2425,26 +2425,26 @@ var b = () => {
|
|
|
2425
2425
|
immediate: !0,
|
|
2426
2426
|
flush: "post"
|
|
2427
2427
|
});
|
|
2428
|
-
function
|
|
2429
|
-
e && (
|
|
2428
|
+
function d(e, n) {
|
|
2429
|
+
e && (z(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 m() {
|
|
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(), O(() => {
|
|
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"), O(() => {
|
|
2437
2437
|
s.value?.close();
|
|
2438
2438
|
}, 401));
|
|
2439
2439
|
}
|
|
2440
2440
|
}
|
|
2441
|
-
return (n, l) => (
|
|
2441
|
+
return (n, l) => (f(), 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) => d(e),
|
|
2447
|
+
onKeydown: l[1] ||= async (e) => d(e),
|
|
2448
2448
|
"data-position": e.position,
|
|
2449
2449
|
"data-backdrop": e.backdrop,
|
|
2450
2450
|
"data-direction": e.direction,
|
|
@@ -2452,37 +2452,37 @@ var b = () => {
|
|
|
2452
2452
|
}, [i("article", {
|
|
2453
2453
|
ref_key: "dialogContainerRef",
|
|
2454
2454
|
ref: u,
|
|
2455
|
-
class: c(
|
|
2455
|
+
class: c(_(C)("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": _(k)(e.rounded)
|
|
2460
|
+
}, [i("header", an, [i("div", on, [h(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) => d(e, !0)
|
|
2467
2467
|
}, {
|
|
2468
|
-
default:
|
|
2468
|
+
default: b(() => [a(g(e.closeButtonText ?? _("Close")), 1)]),
|
|
2469
2469
|
_: 1
|
|
2470
|
-
}, 8, ["id", "onClick"])]), i("div",
|
|
2470
|
+
}, 8, ["id", "onClick"])]), i("div", sn, [h(n.$slots, "default")])], 10, rn)], 40, nn));
|
|
2471
2471
|
}
|
|
2472
|
-
}),
|
|
2472
|
+
}), ln = [
|
|
2473
2473
|
"none",
|
|
2474
2474
|
"strong",
|
|
2475
2475
|
"weak",
|
|
2476
2476
|
"invisible"
|
|
2477
|
-
],
|
|
2477
|
+
], un = [
|
|
2478
2478
|
"left",
|
|
2479
2479
|
"right",
|
|
2480
2480
|
"up",
|
|
2481
2481
|
"down"
|
|
2482
|
-
],
|
|
2482
|
+
], dn = ["modal", "inside"], fn = ["fixed", "absolute"], pn = (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
|
+
}, mn = class {
|
|
2486
2486
|
element;
|
|
2487
2487
|
subNavigation;
|
|
2488
2488
|
parentSubNavigation = null;
|
|
@@ -2499,7 +2499,7 @@ var b = () => {
|
|
|
2499
2499
|
}
|
|
2500
2500
|
enableFollow() {
|
|
2501
2501
|
if (!this.initialized || this.triangleData || !this.element || !this.subNavigation) return;
|
|
2502
|
-
let e =
|
|
2502
|
+
let e = it(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 b = () => {
|
|
|
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
|
+
}, hn = [
|
|
2554
2554
|
"id",
|
|
2555
2555
|
"data-width",
|
|
2556
2556
|
"data-on-forcing-mobile"
|
|
2557
|
-
],
|
|
2557
|
+
], gn = { class: "db-header-drawer-navigation" }, _n = { class: "db-header-meta-navigation" }, vn = { class: "db-header-secondary-action" }, yn = { class: "db-header-meta-navigation" }, bn = { class: "db-header-navigation-bar" }, xn = { class: "db-header-brand-container" }, Sn = { class: "db-header-navigation-container" }, Cn = { class: "db-header-navigation" }, wn = { class: "db-header-primary-action" }, Tn = { class: "db-header-action-container" }, En = { class: "db-header-burger-menu-container" }, Dn = { class: "db-header-secondary-action" }, On = /* @__PURE__ */ s({
|
|
2558
2558
|
name: "DBHeader",
|
|
2559
2559
|
__name: "header",
|
|
2560
2560
|
props: {
|
|
@@ -2587,11 +2587,11 @@ var b = () => {
|
|
|
2587
2587
|
width: { default: void 0 }
|
|
2588
2588
|
},
|
|
2589
2589
|
setup(e) {
|
|
2590
|
-
let t = e, n =
|
|
2590
|
+
let t = e, n = p(!1), s = p(!1), u = p(null);
|
|
2591
2591
|
l(() => {
|
|
2592
2592
|
n.value = !0;
|
|
2593
|
-
}),
|
|
2594
|
-
n.value && u.value && t.forceMobile && (
|
|
2593
|
+
}), y(() => [n.value, u.value], () => {
|
|
2594
|
+
n.value && u.value && t.forceMobile && (S(u.value, {
|
|
2595
2595
|
key: "data-force-mobile",
|
|
2596
2596
|
value: "true"
|
|
2597
2597
|
}), s.value = !0);
|
|
@@ -2599,35 +2599,35 @@ var b = () => {
|
|
|
2599
2599
|
immediate: !0,
|
|
2600
2600
|
flush: "post"
|
|
2601
2601
|
});
|
|
2602
|
-
function
|
|
2602
|
+
function d(e) {
|
|
2603
2603
|
e && e.stopPropagation && e.stopPropagation();
|
|
2604
|
-
let n = !
|
|
2604
|
+
let n = !A(t.drawerOpen, "drawerOpen");
|
|
2605
2605
|
t.onToggle && t.onToggle(n);
|
|
2606
2606
|
}
|
|
2607
|
-
function
|
|
2608
|
-
|
|
2607
|
+
function m(e) {
|
|
2608
|
+
pn(e) && d();
|
|
2609
2609
|
}
|
|
2610
|
-
return (n, l) => (
|
|
2610
|
+
return (n, l) => (f(), r("header", {
|
|
2611
2611
|
ref_key: "_ref",
|
|
2612
2612
|
ref: u,
|
|
2613
|
-
class: c(
|
|
2613
|
+
class: c(_(C)("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(cn, {
|
|
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: _(A)(e.drawerOpen),
|
|
2625
|
+
onClose: (e) => d()
|
|
2626
2626
|
}, {
|
|
2627
|
-
default:
|
|
2627
|
+
default: b(() => [i("div", gn, [i("div", {
|
|
2628
2628
|
class: "db-header-navigation",
|
|
2629
|
-
onClick: l[0] ||= async (e) =>
|
|
2630
|
-
}, [
|
|
2629
|
+
onClick: l[0] ||= async (e) => m(e)
|
|
2630
|
+
}, [h(n.$slots, "default")]), i("div", _n, [h(n.$slots, "meta-navigation")])]), i("div", vn, [h(n.$slots, "secondary-action")])]),
|
|
2631
2631
|
_: 3
|
|
2632
2632
|
}, 8, [
|
|
2633
2633
|
"closeButtonId",
|
|
@@ -2635,28 +2635,28 @@ var b = () => {
|
|
|
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", yn, [h(n.$slots, "meta-navigation")]),
|
|
2639
|
+
i("div", bn, [
|
|
2640
|
+
i("div", xn, [h(n.$slots, "brand")]),
|
|
2641
|
+
i("div", Sn, [i("div", Cn, [h(n.$slots, "default")]), i("div", wn, [h(n.$slots, "primary-action")])]),
|
|
2642
|
+
i("div", Tn, [i("div", En, [o(Ie, {
|
|
2643
2643
|
icon: "menu",
|
|
2644
2644
|
variant: "ghost",
|
|
2645
2645
|
noText: !0,
|
|
2646
|
-
onClick: (e) =>
|
|
2646
|
+
onClick: (e) => d()
|
|
2647
2647
|
}, {
|
|
2648
|
-
default:
|
|
2648
|
+
default: b(() => [a(g(e.burgerMenuLabel ?? _("BurgerMenu")), 1)]),
|
|
2649
2649
|
_: 1
|
|
2650
|
-
}, 8, ["onClick"])]), i("div",
|
|
2650
|
+
}, 8, ["onClick"])]), i("div", Dn, [h(n.$slots, "secondary-action")])])
|
|
2651
2651
|
])
|
|
2652
|
-
], 10,
|
|
2652
|
+
], 10, hn));
|
|
2653
2653
|
}
|
|
2654
|
-
}),
|
|
2654
|
+
}), kn = [
|
|
2655
2655
|
"id",
|
|
2656
2656
|
"data-icon",
|
|
2657
2657
|
"data-icon-weight",
|
|
2658
2658
|
"data-icon-variant"
|
|
2659
|
-
],
|
|
2659
|
+
], An = /* @__PURE__ */ s({
|
|
2660
2660
|
name: "DBIcon",
|
|
2661
2661
|
__name: "icon",
|
|
2662
2662
|
props: {
|
|
@@ -2672,26 +2672,26 @@ var b = () => {
|
|
|
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 = p(null);
|
|
2676
|
+
return (o, s) => (f(), 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(_(C)("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 ? (f(), r(e, { key: 0 }, [a(g(t.text), 1)], 64)) : h(o.$slots, "default", { key: 1 })], 10, kn));
|
|
2686
2686
|
}
|
|
2687
|
-
}),
|
|
2687
|
+
}), jn = [
|
|
2688
2688
|
"16",
|
|
2689
2689
|
"20",
|
|
2690
2690
|
"24",
|
|
2691
2691
|
"32",
|
|
2692
2692
|
"48",
|
|
2693
2693
|
"64"
|
|
2694
|
-
],
|
|
2694
|
+
], Mn = [
|
|
2695
2695
|
"color",
|
|
2696
2696
|
"date",
|
|
2697
2697
|
"datetime-local",
|
|
@@ -2708,7 +2708,7 @@ var b = () => {
|
|
|
2708
2708
|
"time",
|
|
2709
2709
|
"url",
|
|
2710
2710
|
"week"
|
|
2711
|
-
],
|
|
2711
|
+
], Nn = [
|
|
2712
2712
|
"id",
|
|
2713
2713
|
"href",
|
|
2714
2714
|
"target",
|
|
@@ -2723,7 +2723,7 @@ var b = () => {
|
|
|
2723
2723
|
"data-variant",
|
|
2724
2724
|
"data-content",
|
|
2725
2725
|
"data-wrap"
|
|
2726
|
-
],
|
|
2726
|
+
], Pn = /* @__PURE__ */ s({
|
|
2727
2727
|
name: "DBLink",
|
|
2728
2728
|
__name: "link",
|
|
2729
2729
|
props: {
|
|
@@ -2763,36 +2763,36 @@ var b = () => {
|
|
|
2763
2763
|
}
|
|
2764
2764
|
},
|
|
2765
2765
|
setup(t) {
|
|
2766
|
-
let n = t, i =
|
|
2766
|
+
let n = t, i = p(null);
|
|
2767
2767
|
function o(e) {
|
|
2768
2768
|
n.onClick && n.onClick(e);
|
|
2769
2769
|
}
|
|
2770
|
-
return (s, l) => (
|
|
2770
|
+
return (s, l) => (f(), 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(_(C)("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": _(k)(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": _(k)(t.showIcon ?? !0),
|
|
2785
2785
|
"data-variant": t.variant,
|
|
2786
2786
|
"data-content": t.content || "internal",
|
|
2787
|
-
"data-wrap":
|
|
2787
|
+
"data-wrap": _(k)(t.wrap),
|
|
2788
2788
|
onClick: l[0] ||= async (e) => o(e)
|
|
2789
|
-
}, [t.text ? (
|
|
2789
|
+
}, [t.text ? (f(), r(e, { key: 0 }, [a(g(t.text), 1)], 64)) : h(s.$slots, "default", { key: 1 })], 10, Nn));
|
|
2790
2790
|
}
|
|
2791
|
-
}),
|
|
2791
|
+
}), Fn = [
|
|
2792
2792
|
"adaptive",
|
|
2793
2793
|
"brand",
|
|
2794
2794
|
"inline"
|
|
2795
|
-
],
|
|
2795
|
+
], In = ["medium", "small"], Ln = ["external", "internal"], Rn = ["id"], zn = /* @__PURE__ */ s({
|
|
2796
2796
|
name: "DBNavigation",
|
|
2797
2797
|
__name: "navigation",
|
|
2798
2798
|
props: {
|
|
@@ -2804,15 +2804,15 @@ var b = () => {
|
|
|
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 = p(null);
|
|
2808
|
+
return (a, o) => (f(), 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(_(C)("db-navigation", t.class))
|
|
2813
|
+
}, [i("menu", null, [h(a.$slots, "default")])], 10, Rn));
|
|
2814
2814
|
}
|
|
2815
|
-
}),
|
|
2815
|
+
}), Bn = [
|
|
2816
2816
|
"id",
|
|
2817
2817
|
"data-width",
|
|
2818
2818
|
"data-icon",
|
|
@@ -2820,20 +2820,20 @@ var b = () => {
|
|
|
2820
2820
|
"data-active",
|
|
2821
2821
|
"data-wrap",
|
|
2822
2822
|
"aria-disabled"
|
|
2823
|
-
],
|
|
2823
|
+
], Vn = [
|
|
2824
2824
|
"id",
|
|
2825
2825
|
"aria-haspopup",
|
|
2826
2826
|
"aria-expanded",
|
|
2827
2827
|
"aria-controls",
|
|
2828
2828
|
"disabled"
|
|
2829
|
-
],
|
|
2829
|
+
], Hn = [
|
|
2830
2830
|
"id",
|
|
2831
2831
|
"aria-labelledby",
|
|
2832
2832
|
"data-force-close"
|
|
2833
|
-
],
|
|
2833
|
+
], Un = {
|
|
2834
2834
|
key: 0,
|
|
2835
2835
|
class: "db-mobile-navigation-back"
|
|
2836
|
-
},
|
|
2836
|
+
}, Wn = /* @__PURE__ */ s({
|
|
2837
2837
|
name: "DBNavigationItem",
|
|
2838
2838
|
__name: "navigation-item",
|
|
2839
2839
|
props: {
|
|
@@ -2876,75 +2876,75 @@ var b = () => {
|
|
|
2876
2876
|
text: { default: void 0 }
|
|
2877
2877
|
},
|
|
2878
2878
|
setup(t) {
|
|
2879
|
-
let s =
|
|
2879
|
+
let s = v(), u = t, d = p(!1), m = p(!1), x = p(!0), S = p(!1), w = p(!1), T = p(void 0), E = p(void 0), D = p(void 0), j = p(null);
|
|
2880
2880
|
l(() => {
|
|
2881
|
-
|
|
2881
|
+
d.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, D.value = `${e}-toggle`;
|
|
2884
|
+
}), y(() => [u.subNavigationExpanded], () => {
|
|
2885
|
+
u.subNavigationExpanded !== void 0 && (S.value = !!A(u.subNavigationExpanded, "subNavigationExpanded"));
|
|
2886
2886
|
}, {
|
|
2887
2887
|
immediate: !0,
|
|
2888
2888
|
flush: "post"
|
|
2889
|
-
}),
|
|
2890
|
-
if (
|
|
2889
|
+
}), y(() => [d.value, j.value], () => {
|
|
2890
|
+
if (d.value && j.value) {
|
|
2891
2891
|
let e = j.value.querySelector("menu");
|
|
2892
|
-
e && (e.children?.length > 0 ? (
|
|
2892
|
+
e && (e.children?.length > 0 ? (m.value = !0, T.value ||= new mn(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, O(() => {
|
|
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)), m.value && (S.value = !0);
|
|
2905
2905
|
}
|
|
2906
2906
|
function P(e) {
|
|
2907
|
-
e.stopPropagation(),
|
|
2907
|
+
e.stopPropagation(), S.value = !1;
|
|
2908
2908
|
}
|
|
2909
|
-
return (s, l) => (
|
|
2909
|
+
return (s, l) => (f(), 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(_(C)("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": _(k)(t.showIcon),
|
|
2920
2920
|
"data-active": t.active,
|
|
2921
|
-
"data-wrap":
|
|
2922
|
-
"aria-disabled":
|
|
2923
|
-
}, [x.value ? n("", !0) : (
|
|
2921
|
+
"data-wrap": _(k)(t.wrap),
|
|
2922
|
+
"aria-disabled": _(k)(t.disabled)
|
|
2923
|
+
}, [x.value ? n("", !0) : (f(), r(e, { key: 0 }, [t.text ? (f(), r(e, { key: 0 }, [a(g(t.text), 1)], 64)) : h(s.$slots, "default", { key: 1 })], 64)), x.value ? (f(), r(e, { key: 1 }, [i("button", {
|
|
2924
2924
|
class: "db-navigation-item-expand-button",
|
|
2925
|
-
id:
|
|
2926
|
-
"aria-haspopup":
|
|
2927
|
-
"aria-expanded":
|
|
2925
|
+
id: D.value,
|
|
2926
|
+
"aria-haspopup": m.value ? "true" : void 0,
|
|
2927
|
+
"aria-expanded": S.value,
|
|
2928
2928
|
"aria-controls": E.value,
|
|
2929
|
-
disabled:
|
|
2929
|
+
disabled: _(A)(t.disabled, "disabled"),
|
|
2930
2930
|
onClick: l[0] ||= async (e) => N(e)
|
|
2931
|
-
}, [t.text ? (
|
|
2931
|
+
}, [t.text ? (f(), r(e, { key: 0 }, [a(g(t.text), 1)], 64)) : h(s.$slots, "default", { key: 1 })], 8, Vn), i("menu", {
|
|
2932
2932
|
class: "db-sub-navigation",
|
|
2933
2933
|
id: E.value,
|
|
2934
|
-
"aria-labelledby":
|
|
2934
|
+
"aria-labelledby": D.value,
|
|
2935
2935
|
"data-force-close": w.value,
|
|
2936
2936
|
onClick: l[1] ||= async (e) => M(e)
|
|
2937
|
-
}, [
|
|
2937
|
+
}, [m.value ? (f(), r("div", Un, [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: b(() => [a(g(t.backButtonText ?? _("Back")), 1)]),
|
|
2944
2944
|
_: 1
|
|
2945
|
-
}, 8, ["id", "onClick"])])) : n("", !0),
|
|
2945
|
+
}, 8, ["id", "onClick"])])) : n("", !0), h(s.$slots, "sub-navigation")], 8, Hn)], 64)) : n("", !0)], 42, Bn));
|
|
2946
2946
|
}
|
|
2947
|
-
}),
|
|
2947
|
+
}), Gn = [
|
|
2948
2948
|
"id",
|
|
2949
2949
|
"role",
|
|
2950
2950
|
"aria-live",
|
|
@@ -2953,7 +2953,7 @@ var b = () => {
|
|
|
2953
2953
|
"data-icon",
|
|
2954
2954
|
"data-show-icon",
|
|
2955
2955
|
"data-link-variant"
|
|
2956
|
-
],
|
|
2956
|
+
], Kn = { key: 0 }, qn = { "data-area": "content" }, Jn = { key: 1 }, Yn = /* @__PURE__ */ s({
|
|
2957
2957
|
name: "DBNotification",
|
|
2958
2958
|
__name: "notification",
|
|
2959
2959
|
props: {
|
|
@@ -2999,16 +2999,16 @@ var b = () => {
|
|
|
2999
2999
|
text: { default: void 0 }
|
|
3000
3000
|
},
|
|
3001
3001
|
setup(o) {
|
|
3002
|
-
let s = o, l =
|
|
3002
|
+
let s = o, l = p(null);
|
|
3003
3003
|
function u(e) {
|
|
3004
3004
|
e && (e.stopPropagation(), s.onClose && s.onClose(e));
|
|
3005
3005
|
}
|
|
3006
|
-
return (
|
|
3006
|
+
return (d, p) => (f(), 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(_(C)("db-notification", s.class)),
|
|
3011
|
+
role: _(B)({
|
|
3012
3012
|
semantic: o.semantic,
|
|
3013
3013
|
role: o.role,
|
|
3014
3014
|
ariaLive: o.ariaLive
|
|
@@ -3016,16 +3016,16 @@ var b = () => {
|
|
|
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": _(A)(o.showIcon) === !1 ? void 0 : o.icon,
|
|
3020
|
+
"data-show-icon": _(k)(o.showIcon),
|
|
3021
3021
|
"data-link-variant": o.linkVariant
|
|
3022
3022
|
}, [
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
i("
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3023
|
+
h(d.$slots, "image"),
|
|
3024
|
+
_(I)(o.headline, o.showHeadline) ? (f(), r("header", Kn, g(o.headline), 1)) : n("", !0),
|
|
3025
|
+
i("div", qn, [o.text ? (f(), r(e, { key: 0 }, [a(g(o.text), 1)], 64)) : h(d.$slots, "default", { key: 1 })]),
|
|
3026
|
+
_(I)(o.timestamp, o.showTimestamp) ? (f(), r("span", Jn, g(o.timestamp), 1)) : n("", !0),
|
|
3027
|
+
h(d.$slots, "link"),
|
|
3028
|
+
_(A)(o.closeable, "closeable") ? (f(), t(Ie, {
|
|
3029
3029
|
key: 2,
|
|
3030
3030
|
icon: "cross",
|
|
3031
3031
|
variant: "ghost",
|
|
@@ -3034,25 +3034,25 @@ var b = () => {
|
|
|
3034
3034
|
noText: !0,
|
|
3035
3035
|
onClick: (e) => u(e)
|
|
3036
3036
|
}, {
|
|
3037
|
-
default:
|
|
3037
|
+
default: b(() => [a(g(o.closeButtonText ?? _("Close")), 1)]),
|
|
3038
3038
|
_: 1
|
|
3039
3039
|
}, 8, ["id", "onClick"])) : n("", !0)
|
|
3040
|
-
], 10,
|
|
3040
|
+
], 10, Gn));
|
|
3041
3041
|
}
|
|
3042
|
-
}),
|
|
3042
|
+
}), Xn = [
|
|
3043
3043
|
"docked",
|
|
3044
3044
|
"standalone",
|
|
3045
3045
|
"overlay"
|
|
3046
|
-
],
|
|
3046
|
+
], Zn = ["block", "inline"], Qn = [
|
|
3047
3047
|
"assertive",
|
|
3048
3048
|
"polite",
|
|
3049
3049
|
"off"
|
|
3050
|
-
],
|
|
3050
|
+
], $n = [
|
|
3051
3051
|
"id",
|
|
3052
3052
|
"data-variant",
|
|
3053
3053
|
"data-fade-in",
|
|
3054
3054
|
"data-fonts-loaded"
|
|
3055
|
-
],
|
|
3055
|
+
], er = /* @__PURE__ */ s({
|
|
3056
3056
|
name: "DBPage",
|
|
3057
3057
|
__name: "page",
|
|
3058
3058
|
props: {
|
|
@@ -3073,28 +3073,28 @@ var b = () => {
|
|
|
3073
3073
|
propOverrides: { default: void 0 }
|
|
3074
3074
|
},
|
|
3075
3075
|
setup(e) {
|
|
3076
|
-
let t = e, n =
|
|
3076
|
+
let t = e, n = p(!1), a = p(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) => (f(), 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(_(C)("db-page", t.class)),
|
|
3088
3088
|
"data-variant": e.variant,
|
|
3089
|
-
"data-fade-in":
|
|
3090
|
-
"data-fonts-loaded":
|
|
3089
|
+
"data-fade-in": _(k)(e.fadeIn),
|
|
3090
|
+
"data-fonts-loaded": _(k)(n.value)
|
|
3091
3091
|
}, [
|
|
3092
|
-
|
|
3093
|
-
i("main", { class: c(
|
|
3094
|
-
|
|
3095
|
-
], 10,
|
|
3092
|
+
h(o.$slots, "header"),
|
|
3093
|
+
i("main", { class: c(_(C)("db-main", e.mainClass)) }, [h(o.$slots, "default")], 2),
|
|
3094
|
+
h(o.$slots, "footer")
|
|
3095
|
+
], 10, $n));
|
|
3096
3096
|
}
|
|
3097
|
-
}),
|
|
3097
|
+
}), tr = ["auto", "fixed"], nr = ["hidden", "auto"], rr = ["id"], ir = [
|
|
3098
3098
|
"data-spacing",
|
|
3099
3099
|
"data-gap",
|
|
3100
3100
|
"data-animation",
|
|
@@ -3102,7 +3102,7 @@ var b = () => {
|
|
|
3102
3102
|
"data-delay",
|
|
3103
3103
|
"data-width",
|
|
3104
3104
|
"data-placement"
|
|
3105
|
-
],
|
|
3105
|
+
], ar = /* @__PURE__ */ s({
|
|
3106
3106
|
name: "DBPopover",
|
|
3107
3107
|
__name: "popover",
|
|
3108
3108
|
props: {
|
|
@@ -3131,26 +3131,26 @@ var b = () => {
|
|
|
3131
3131
|
width: { default: void 0 }
|
|
3132
3132
|
},
|
|
3133
3133
|
setup(e) {
|
|
3134
|
-
let t = e, n =
|
|
3134
|
+
let t = e, n = p(!1), a = p(!1), o = p(void 0), s = p(void 0), u = p(null);
|
|
3135
3135
|
l(() => {
|
|
3136
3136
|
n.value = !0;
|
|
3137
|
-
}),
|
|
3137
|
+
}), y(() => [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"), m(), u.value.addEventListener("keydown", (e) => d(e)), ["mouseenter", "focusin"].forEach((e) => {
|
|
3142
|
+
u.value.addEventListener(e, () => v());
|
|
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 && d(!1);
|
|
3148
3148
|
}));
|
|
3149
3149
|
}
|
|
3150
3150
|
}, {
|
|
3151
3151
|
immediate: !0,
|
|
3152
3152
|
flush: "post"
|
|
3153
|
-
}),
|
|
3153
|
+
}), y(() => [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 b = () => {
|
|
|
3159
3159
|
immediate: !0,
|
|
3160
3160
|
flush: "post"
|
|
3161
3161
|
});
|
|
3162
|
-
function
|
|
3162
|
+
function d(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 m() {
|
|
3166
3166
|
if (!u.value) return;
|
|
3167
3167
|
let e = u.value.querySelector("article");
|
|
3168
|
-
e &&
|
|
3169
|
-
|
|
3168
|
+
e && O(() => {
|
|
3169
|
+
ut(e, u.value, t.placement ?? "bottom");
|
|
3170
3170
|
}, 1);
|
|
3171
3171
|
}
|
|
3172
|
-
function
|
|
3173
|
-
e?.target?.contains && e?.target?.contains(u.value) &&
|
|
3172
|
+
function g(e) {
|
|
3173
|
+
e?.target?.contains && e?.target?.contains(u.value) && m();
|
|
3174
3174
|
}
|
|
3175
|
-
function
|
|
3176
|
-
a.value = !0, o.value = new
|
|
3175
|
+
function v() {
|
|
3176
|
+
a.value = !0, o.value = new nt().addCallback((e) => g(e)), m();
|
|
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 nt().removeCallback(o.value);
|
|
3184
3184
|
let e = x();
|
|
3185
3185
|
e && s.value?.unobserve(e);
|
|
3186
3186
|
}
|
|
@@ -3195,28 +3195,28 @@ var b = () => {
|
|
|
3195
3195
|
}
|
|
3196
3196
|
return null;
|
|
3197
3197
|
}
|
|
3198
|
-
return (n, a) => (
|
|
3198
|
+
return (n, a) => (f(), 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(_(C)("db-popover", t.class))
|
|
3203
|
+
}, [h(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": _(k)(e.gap),
|
|
3207
|
+
"data-animation": _(k)(e.animation ?? !0),
|
|
3208
|
+
"data-open": _(k)(e.open),
|
|
3209
3209
|
"data-delay": e.delay,
|
|
3210
3210
|
"data-width": e.width,
|
|
3211
3211
|
"data-placement": e.placement
|
|
3212
|
-
}, [
|
|
3212
|
+
}, [h(n.$slots, "default")], 8, ir)], 10, rr));
|
|
3213
3213
|
}
|
|
3214
|
-
}),
|
|
3214
|
+
}), or = [
|
|
3215
3215
|
"data-size",
|
|
3216
3216
|
"data-hide-label",
|
|
3217
3217
|
"data-hide-asterisk",
|
|
3218
3218
|
"for"
|
|
3219
|
-
],
|
|
3219
|
+
], sr = [
|
|
3220
3220
|
"aria-invalid",
|
|
3221
3221
|
"data-custom-validity",
|
|
3222
3222
|
"id",
|
|
@@ -3225,7 +3225,7 @@ var b = () => {
|
|
|
3225
3225
|
"disabled",
|
|
3226
3226
|
"value",
|
|
3227
3227
|
"required"
|
|
3228
|
-
],
|
|
3228
|
+
], cr = /* @__PURE__ */ s({
|
|
3229
3229
|
name: "DBRadio",
|
|
3230
3230
|
__name: "radio",
|
|
3231
3231
|
props: {
|
|
@@ -3288,31 +3288,31 @@ var b = () => {
|
|
|
3288
3288
|
},
|
|
3289
3289
|
emits: ["update:value"],
|
|
3290
3290
|
setup(t, { emit: n }) {
|
|
3291
|
-
let o =
|
|
3291
|
+
let o = v(), s = n, d = t, m = p(!1), b = p(void 0), x = p(void 0), S = p(null);
|
|
3292
3292
|
l(() => {
|
|
3293
|
-
|
|
3293
|
+
m.value = !0, k();
|
|
3294
3294
|
}), u(() => {
|
|
3295
3295
|
x.value?.abort();
|
|
3296
|
-
}),
|
|
3297
|
-
(
|
|
3296
|
+
}), y(() => [d.id, d.propOverrides?.id], () => {
|
|
3297
|
+
(d.id ?? d.propOverrides?.id) && k();
|
|
3298
3298
|
}, {
|
|
3299
3299
|
immediate: !0,
|
|
3300
3300
|
flush: "post"
|
|
3301
|
-
}),
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3301
|
+
}), y(() => [
|
|
3302
|
+
m.value,
|
|
3303
|
+
S.value,
|
|
3304
|
+
d.checked
|
|
3305
3305
|
], () => {
|
|
3306
|
-
|
|
3306
|
+
d.checked && m.value && S.value && (S.value.checked = !0);
|
|
3307
3307
|
}, {
|
|
3308
3308
|
immediate: !0,
|
|
3309
3309
|
flush: "post"
|
|
3310
|
-
}),
|
|
3311
|
-
if (
|
|
3310
|
+
}), y(() => [S.value], () => {
|
|
3311
|
+
if (S.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), We(S.value, (e) => {
|
|
3314
|
+
O(() => {
|
|
3315
|
+
let t = d.checked ? d.checked : S.value.checked, n = {
|
|
3316
3316
|
...e,
|
|
3317
3317
|
target: {
|
|
3318
3318
|
...e.target,
|
|
@@ -3329,49 +3329,49 @@ var b = () => {
|
|
|
3329
3329
|
flush: "post"
|
|
3330
3330
|
});
|
|
3331
3331
|
function w(e, t) {
|
|
3332
|
-
|
|
3332
|
+
d.input && d.input(e), d.onInput && d.onInput(e), Ue(s, e);
|
|
3333
3333
|
}
|
|
3334
3334
|
function T(e, t) {
|
|
3335
|
-
|
|
3335
|
+
d.onChange && d.onChange(e), Ue(s, e);
|
|
3336
3336
|
}
|
|
3337
3337
|
function E(e) {
|
|
3338
|
-
|
|
3338
|
+
d.onBlur && d.onBlur(e);
|
|
3339
3339
|
}
|
|
3340
|
-
function
|
|
3341
|
-
|
|
3340
|
+
function D(e) {
|
|
3341
|
+
d.onFocus && d.onFocus(e);
|
|
3342
3342
|
}
|
|
3343
|
-
function
|
|
3344
|
-
b.value =
|
|
3343
|
+
function k() {
|
|
3344
|
+
b.value = d.id ?? d.propOverrides?.id ?? `radio-${o}`;
|
|
3345
3345
|
}
|
|
3346
|
-
return (n, o) => (
|
|
3346
|
+
return (n, o) => (f(), r("label", {
|
|
3347
3347
|
"data-size": t.size,
|
|
3348
|
-
"data-hide-label":
|
|
3349
|
-
"data-hide-asterisk":
|
|
3350
|
-
class: c(
|
|
3348
|
+
"data-hide-label": _(F)(t.showLabel),
|
|
3349
|
+
"data-hide-asterisk": _(F)(t.showRequiredAsterisk),
|
|
3350
|
+
class: c(_(C)("db-radio", d.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: S,
|
|
3358
3358
|
id: b.value,
|
|
3359
3359
|
name: t.name,
|
|
3360
|
-
checked:
|
|
3361
|
-
disabled:
|
|
3360
|
+
checked: _(A)(t.checked, "checked"),
|
|
3361
|
+
disabled: _(A)(t.disabled, "disabled"),
|
|
3362
3362
|
value: t.value,
|
|
3363
|
-
required:
|
|
3363
|
+
required: _(A)(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) => D(e)
|
|
3368
|
+
}, null, 40, sr), t.label ? (f(), r(e, { key: 0 }, [a(g(t.label), 1)], 64)) : h(n.$slots, "default", { key: 1 })], 10, or));
|
|
3369
3369
|
}
|
|
3370
|
-
}),
|
|
3370
|
+
}), lr = [
|
|
3371
3371
|
"id",
|
|
3372
3372
|
"data-spacing",
|
|
3373
3373
|
"data-width"
|
|
3374
|
-
],
|
|
3374
|
+
], ur = /* @__PURE__ */ s({
|
|
3375
3375
|
name: "DBSection",
|
|
3376
3376
|
__name: "section",
|
|
3377
3377
|
props: {
|
|
@@ -3385,23 +3385,23 @@ var b = () => {
|
|
|
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 = p(null);
|
|
3389
|
+
return (i, a) => (f(), 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(_(C)("db-section", t.class)),
|
|
3394
3394
|
"data-spacing": e.spacing || "medium",
|
|
3395
3395
|
"data-width": e.width
|
|
3396
|
-
}, [
|
|
3396
|
+
}, [h(i.$slots, "default")], 10, lr));
|
|
3397
3397
|
}
|
|
3398
|
-
}),
|
|
3398
|
+
}), dr = [
|
|
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
|
+
], fr = ["for"], pr = [
|
|
3405
3405
|
"aria-invalid",
|
|
3406
3406
|
"data-custom-validity",
|
|
3407
3407
|
"required",
|
|
@@ -3413,18 +3413,18 @@ var b = () => {
|
|
|
3413
3413
|
"autocomplete",
|
|
3414
3414
|
"multiple",
|
|
3415
3415
|
"aria-describedby"
|
|
3416
|
-
],
|
|
3416
|
+
], mr = ["data-show-empty-option"], hr = ["label"], gr = [
|
|
3417
3417
|
"value",
|
|
3418
3418
|
"selected",
|
|
3419
3419
|
"disabled"
|
|
3420
|
-
],
|
|
3420
|
+
], _r = [
|
|
3421
3421
|
"value",
|
|
3422
3422
|
"disabled",
|
|
3423
3423
|
"selected"
|
|
3424
|
-
],
|
|
3424
|
+
], vr = ["id"], yr = {
|
|
3425
3425
|
"data-visually-hidden": "true",
|
|
3426
3426
|
role: "status"
|
|
3427
|
-
},
|
|
3427
|
+
}, br = /* @__PURE__ */ s({
|
|
3428
3428
|
name: "DBSelect",
|
|
3429
3429
|
__name: "select",
|
|
3430
3430
|
props: {
|
|
@@ -3512,148 +3512,148 @@ var b = () => {
|
|
|
3512
3512
|
size: { default: void 0 }
|
|
3513
3513
|
},
|
|
3514
3514
|
emits: ["update:value"],
|
|
3515
|
-
setup(s, { emit:
|
|
3516
|
-
let x =
|
|
3515
|
+
setup(s, { emit: d }) {
|
|
3516
|
+
let x = v(), S = d, w = s, T = p(void 0), D = p(void 0), j = p(void 0), M = p(void 0), N = p(void 0), P = p(""), L = p(void 0), R = p(""), z = p(!1), B = p(""), V = p(void 0), H = p(null);
|
|
3517
3517
|
l(() => {
|
|
3518
|
-
z.value = !0,
|
|
3518
|
+
z.value = !0, ie(), N.value = w.invalidMessage || "TODO: Add an invalidMessage";
|
|
3519
3519
|
}), u(() => {
|
|
3520
3520
|
V.value?.abort();
|
|
3521
|
-
}),
|
|
3522
|
-
(w.id ?? w.propOverrides?.id) &&
|
|
3521
|
+
}), y(() => [w.id, w.propOverrides?.id], () => {
|
|
3522
|
+
(w.id ?? w.propOverrides?.id) && ie();
|
|
3523
3523
|
}, {
|
|
3524
3524
|
immediate: !0,
|
|
3525
3525
|
flush: "post"
|
|
3526
|
-
}),
|
|
3526
|
+
}), y(() => [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
|
+
}), y(() => [T.value, z.value], () => {
|
|
3532
|
+
if (T.value && z.value) {
|
|
3533
|
+
let e = T.value + J, t = T.value + se;
|
|
3534
|
+
D.value = e, j.value = T.value + Y, M.value = T.value + oe, P.value = t, I(w.message, w.showMessage) ? L.value = e : w.placeholder ? L.value = t : L.value = void 0, W(), z.value = !1;
|
|
3535
3535
|
}
|
|
3536
3536
|
}, {
|
|
3537
3537
|
immediate: !0,
|
|
3538
3538
|
flush: "post"
|
|
3539
|
-
}),
|
|
3539
|
+
}), y(() => [w.value], () => {
|
|
3540
3540
|
R.value = w.value;
|
|
3541
3541
|
}, {
|
|
3542
3542
|
immediate: !0,
|
|
3543
3543
|
flush: "post"
|
|
3544
|
-
}),
|
|
3544
|
+
}), y(() => [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), Ke(H.value, {
|
|
3548
3548
|
value: w.value,
|
|
3549
3549
|
defaultValue: void 0
|
|
3550
3550
|
}, (e) => {
|
|
3551
|
-
|
|
3551
|
+
te(e, !0), G(e, !0);
|
|
3552
3552
|
}, e.signal);
|
|
3553
3553
|
}
|
|
3554
3554
|
}, {
|
|
3555
3555
|
immediate: !0,
|
|
3556
3556
|
flush: "post"
|
|
3557
3557
|
});
|
|
3558
|
-
function
|
|
3558
|
+
function U() {
|
|
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 W() {
|
|
3562
|
+
!H.value?.validity.valid || w.validation === "invalid" ? (L.value = M.value, N.value = w.invalidMessage || H.value?.validationMessage || "TODO: Add an invalidMessage", E() && (B.value = N.value, O(() => B.value = "", 1e3))) : U() && H.value?.validity.valid && w.required ? (L.value = j.value, E() && (B.value = w.validMessage ?? "TODO: Add a validMessage", O(() => B.value = "", 1e3))) : I(w.message, w.showMessage) ? L.value = D.value : w.placeholder ? L.value = P.value : L.value = void 0;
|
|
3563
3563
|
}
|
|
3564
|
-
function
|
|
3564
|
+
function ee(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 G(e, t) {
|
|
3568
|
+
w.input && w.input(e), R.value = e.target.value, w.onInput && w.onInput(e), Ue(S, e), W();
|
|
3569
3569
|
}
|
|
3570
|
-
function
|
|
3571
|
-
w.onChange && w.onChange(e),
|
|
3570
|
+
function te(e, t) {
|
|
3571
|
+
w.onChange && w.onChange(e), Ue(S, e), W();
|
|
3572
3572
|
}
|
|
3573
|
-
function
|
|
3573
|
+
function K(e) {
|
|
3574
3574
|
w.onBlur && w.onBlur(e);
|
|
3575
3575
|
}
|
|
3576
|
-
function
|
|
3576
|
+
function q(e) {
|
|
3577
3577
|
w.onFocus && w.onFocus(e);
|
|
3578
3578
|
}
|
|
3579
|
-
function
|
|
3579
|
+
function ne(e) {
|
|
3580
3580
|
return e.label ?? e.value?.toString();
|
|
3581
3581
|
}
|
|
3582
|
-
function
|
|
3582
|
+
function re() {
|
|
3583
3583
|
return w.variant === "floating" || w.placeholder ? w.showEmptyOption === void 0 ? !w.required : w.showEmptyOption : !1;
|
|
3584
3584
|
}
|
|
3585
|
-
function
|
|
3585
|
+
function ie() {
|
|
3586
3586
|
let e = w.id ?? w.propOverrides?.id ?? `select-${x}`;
|
|
3587
|
-
|
|
3587
|
+
T.value = e, D.value = e + J, j.value = e + Y, M.value = e + oe, P.value = e + se;
|
|
3588
3588
|
}
|
|
3589
|
-
return (l, u) => (
|
|
3590
|
-
class: c(
|
|
3589
|
+
return (l, u) => (f(), r("div", {
|
|
3590
|
+
class: c(_(C)("db-select", w.class)),
|
|
3591
3591
|
"data-variant": s.variant,
|
|
3592
|
-
"data-hide-label":
|
|
3593
|
-
"data-hide-asterisk":
|
|
3592
|
+
"data-hide-label": _(F)(s.showLabel),
|
|
3593
|
+
"data-hide-asterisk": _(F)(s.showRequiredAsterisk),
|
|
3594
3594
|
"data-icon": s.icon,
|
|
3595
|
-
"data-show-icon":
|
|
3595
|
+
"data-show-icon": _(k)(s.showIcon)
|
|
3596
3596
|
}, [
|
|
3597
|
-
i("label", { for:
|
|
3597
|
+
i("label", { for: T.value }, g(s.label ?? _("LABEL SHOULD BE SET")), 9, fr),
|
|
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: _(A)(s.required, "required"),
|
|
3604
|
+
disabled: _(A)(s.disabled, "disabled"),
|
|
3605
|
+
id: T.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) => G(e),
|
|
3612
|
+
onClick: u[1] ||= async (e) => ee(e),
|
|
3613
|
+
onChange: u[2] ||= async (e) => te(e),
|
|
3614
|
+
onBlur: u[3] ||= async (e) => K(e),
|
|
3615
|
+
onFocus: u[4] ||= async (e) => q(e),
|
|
3616
3616
|
"aria-describedby": s.ariaDescribedBy ?? L.value
|
|
3617
|
-
}, [s.variant === "floating" || s.placeholder ? (
|
|
3617
|
+
}, [s.variant === "floating" || s.placeholder ? (f(), 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": _(k)(re())
|
|
3622
|
+
}, null, 8, mr)) : n("", !0), s.options?.length ? (f(!0), r(e, { key: 1 }, m(s.options, (t, n) => (f(), r(e, { key: n }, [t.options ? (f(), r("optgroup", {
|
|
3623
3623
|
key: 0,
|
|
3624
|
-
label:
|
|
3625
|
-
}, [(
|
|
3624
|
+
label: ne(t)
|
|
3625
|
+
}, [(f(!0), r(e, null, m(t.options, (e, t) => (f(), r("option", {
|
|
3626
3626
|
key: t,
|
|
3627
3627
|
value: e.value,
|
|
3628
3628
|
selected: e.selected,
|
|
3629
3629
|
disabled: e.disabled
|
|
3630
|
-
},
|
|
3630
|
+
}, g(ne(e)), 9, gr))), 128))], 8, hr)) : (f(), 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
|
+
}, g(ne(t)), 9, _r))], 64))), 128)) : h(l.$slots, "default", { key: 2 })], 40, pr),
|
|
3636
|
+
s.placeholder ? (f(), r("span", {
|
|
3637
3637
|
key: 0,
|
|
3638
3638
|
class: "db-select-placeholder",
|
|
3639
|
-
id:
|
|
3640
|
-
},
|
|
3641
|
-
|
|
3639
|
+
id: P.value
|
|
3640
|
+
}, g(s.placeholder), 9, vr)) : n("", !0),
|
|
3641
|
+
_(I)(s.message, s.showMessage) ? (f(), t($, {
|
|
3642
3642
|
key: 1,
|
|
3643
3643
|
size: "small",
|
|
3644
3644
|
icon: s.messageIcon,
|
|
3645
|
-
id:
|
|
3645
|
+
id: D.value
|
|
3646
3646
|
}, {
|
|
3647
|
-
default:
|
|
3647
|
+
default: b(() => [a(g(s.message), 1)]),
|
|
3648
3648
|
_: 1
|
|
3649
3649
|
}, 8, ["icon", "id"])) : n("", !0),
|
|
3650
|
-
|
|
3650
|
+
U() ? (f(), t($, {
|
|
3651
3651
|
key: 2,
|
|
3652
3652
|
size: "small",
|
|
3653
3653
|
semantic: "successful",
|
|
3654
3654
|
id: j.value
|
|
3655
3655
|
}, {
|
|
3656
|
-
default:
|
|
3656
|
+
default: b(() => [a(g(s.validMessage || _("TODO: Add a validMessage")), 1)]),
|
|
3657
3657
|
_: 1
|
|
3658
3658
|
}, 8, ["id"])) : n("", !0),
|
|
3659
3659
|
o($, {
|
|
@@ -3661,13 +3661,13 @@ var b = () => {
|
|
|
3661
3661
|
semantic: "critical",
|
|
3662
3662
|
id: M.value
|
|
3663
3663
|
}, {
|
|
3664
|
-
default:
|
|
3664
|
+
default: b(() => [a(g(N.value), 1)]),
|
|
3665
3665
|
_: 1
|
|
3666
3666
|
}, 8, ["id"]),
|
|
3667
|
-
i("span",
|
|
3668
|
-
], 10,
|
|
3667
|
+
i("span", yr, g(B.value), 1)
|
|
3668
|
+
], 10, dr));
|
|
3669
3669
|
}
|
|
3670
|
-
}),
|
|
3670
|
+
}), xr = [
|
|
3671
3671
|
"id",
|
|
3672
3672
|
"data-gap",
|
|
3673
3673
|
"data-variant",
|
|
@@ -3675,7 +3675,7 @@ var b = () => {
|
|
|
3675
3675
|
"data-alignment",
|
|
3676
3676
|
"data-justify-content",
|
|
3677
3677
|
"data-wrap"
|
|
3678
|
-
],
|
|
3678
|
+
], Sr = /* @__PURE__ */ s({
|
|
3679
3679
|
name: "DBStack",
|
|
3680
3680
|
__name: "stack",
|
|
3681
3681
|
props: {
|
|
@@ -3696,38 +3696,38 @@ var b = () => {
|
|
|
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 = p(null);
|
|
3700
|
+
return (i, a) => (f(), 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(_(C)("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": _(k)(e.wrap)
|
|
3711
|
+
}, [h(i.$slots, "default")], 10, xr));
|
|
3712
3712
|
}
|
|
3713
|
-
}),
|
|
3713
|
+
}), Cr = ["simple", "divider"], wr = ["row", "column"], Tr = [
|
|
3714
3714
|
"stretch",
|
|
3715
3715
|
"start",
|
|
3716
3716
|
"end",
|
|
3717
3717
|
"center"
|
|
3718
|
-
],
|
|
3718
|
+
], Er = [
|
|
3719
3719
|
"space-between",
|
|
3720
3720
|
"start",
|
|
3721
3721
|
"end",
|
|
3722
3722
|
"center"
|
|
3723
|
-
],
|
|
3723
|
+
], Dr = [
|
|
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
|
+
], Or = ["for"], kr = [
|
|
3731
3731
|
"id",
|
|
3732
3732
|
"checked",
|
|
3733
3733
|
"value",
|
|
@@ -3738,10 +3738,10 @@ var b = () => {
|
|
|
3738
3738
|
"required",
|
|
3739
3739
|
"data-aid-icon",
|
|
3740
3740
|
"data-aid-icon-trailing"
|
|
3741
|
-
],
|
|
3741
|
+
], Ar = {
|
|
3742
3742
|
"data-visually-hidden": "true",
|
|
3743
3743
|
role: "status"
|
|
3744
|
-
},
|
|
3744
|
+
}, jr = /* @__PURE__ */ s({
|
|
3745
3745
|
name: "DBSwitch",
|
|
3746
3746
|
__name: "switch",
|
|
3747
3747
|
props: {
|
|
@@ -3813,40 +3813,40 @@ var b = () => {
|
|
|
3813
3813
|
variant: { default: void 0 }
|
|
3814
3814
|
},
|
|
3815
3815
|
emits: ["update:checked"],
|
|
3816
|
-
setup(s, { emit:
|
|
3817
|
-
let
|
|
3816
|
+
setup(s, { emit: d }) {
|
|
3817
|
+
let m = v(), x = d, S = s, w = p(void 0), T = p(void 0), D = p(void 0), j = p(void 0), M = p(void 0), N = p(void 0), P = p(""), L = p(void 0), R = p(null);
|
|
3818
3818
|
l(() => {
|
|
3819
|
-
|
|
3819
|
+
ee(), B(), M.value = S.invalidMessage || "TODO: Add an invalidMessage";
|
|
3820
3820
|
}), u(() => {
|
|
3821
3821
|
L.value?.abort();
|
|
3822
|
-
}),
|
|
3823
|
-
(
|
|
3822
|
+
}), y(() => [S.id, S.propOverrides?.id], () => {
|
|
3823
|
+
(S.id ?? S.propOverrides?.id) && ee();
|
|
3824
3824
|
}, {
|
|
3825
3825
|
immediate: !0,
|
|
3826
3826
|
flush: "post"
|
|
3827
|
-
}),
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3827
|
+
}), y(() => [
|
|
3828
|
+
S.validation,
|
|
3829
|
+
S.required,
|
|
3830
|
+
S.message,
|
|
3831
|
+
S.showMessage,
|
|
3832
|
+
S.validMessage,
|
|
3833
|
+
S.invalidMessage,
|
|
3834
|
+
S.checked
|
|
3835
3835
|
], () => {
|
|
3836
3836
|
B();
|
|
3837
3837
|
}, {
|
|
3838
3838
|
immediate: !0,
|
|
3839
3839
|
flush: "post"
|
|
3840
|
-
}),
|
|
3841
|
-
M.value =
|
|
3840
|
+
}), y(() => [R.value, S.invalidMessage], () => {
|
|
3841
|
+
M.value = S.invalidMessage || R.value?.validationMessage || "TODO: Add an invalidMessage";
|
|
3842
3842
|
}, {
|
|
3843
3843
|
immediate: !0,
|
|
3844
3844
|
flush: "post"
|
|
3845
|
-
}),
|
|
3845
|
+
}), y(() => [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), Ge(R.value, {
|
|
3849
|
+
checked: S.checked,
|
|
3850
3850
|
defaultChecked: void 0
|
|
3851
3851
|
}, (e) => {
|
|
3852
3852
|
V(e, !0);
|
|
@@ -3857,51 +3857,51 @@ var b = () => {
|
|
|
3857
3857
|
flush: "post"
|
|
3858
3858
|
});
|
|
3859
3859
|
function z() {
|
|
3860
|
-
return !!(
|
|
3860
|
+
return !!(S.validMessage ?? S.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 || S.validation === "invalid") {
|
|
3864
|
+
N.value = j.value, M.value = S.invalidMessage || R.value?.validationMessage || "TODO: Add an invalidMessage", E() && (P.value = M.value || "TODO: Add an invalidMessage", O(() => {
|
|
3865
|
+
P.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 && S.required) {
|
|
3870
|
+
N.value = D.value, E() && (P.value = S.validMessage ?? "TODO: Add a validMessage", O(() => {
|
|
3871
|
+
P.value = "";
|
|
3872
3872
|
}, 1e3));
|
|
3873
3873
|
return;
|
|
3874
3874
|
}
|
|
3875
|
-
if (
|
|
3876
|
-
N.value =
|
|
3875
|
+
if (I(S.message, S.showMessage)) {
|
|
3876
|
+
N.value = T.value;
|
|
3877
3877
|
return;
|
|
3878
3878
|
}
|
|
3879
3879
|
N.value = void 0;
|
|
3880
3880
|
}
|
|
3881
3881
|
function V(e, t) {
|
|
3882
|
-
|
|
3882
|
+
S.onChange && S.onChange(e), B(), Ue(x, e, "checked");
|
|
3883
3883
|
}
|
|
3884
3884
|
function H(e) {
|
|
3885
|
-
|
|
3886
|
-
}
|
|
3887
|
-
function ee(e) {
|
|
3888
|
-
C.onFocus && C.onFocus(e);
|
|
3885
|
+
S.onBlur && S.onBlur(e);
|
|
3889
3886
|
}
|
|
3890
3887
|
function U(e) {
|
|
3891
|
-
|
|
3888
|
+
S.onFocus && S.onFocus(e);
|
|
3892
3889
|
}
|
|
3893
|
-
function
|
|
3894
|
-
|
|
3895
|
-
w.value = e, E.value = `${e}${K}`, A.value = `${e}${q}`, j.value = `${e}${J}`;
|
|
3890
|
+
function W(e) {
|
|
3891
|
+
e.key === "Enter" && (e.preventDefault(), S.disabled || R.value?.click());
|
|
3896
3892
|
}
|
|
3897
|
-
|
|
3898
|
-
|
|
3893
|
+
function ee() {
|
|
3894
|
+
let e = S.id ?? S.propOverrides?.id ?? `switch-${m}`;
|
|
3895
|
+
w.value = e, T.value = `${e}${J}`, D.value = `${e}${Y}`, j.value = `${e}${oe}`;
|
|
3896
|
+
}
|
|
3897
|
+
return (l, u) => (f(), r("div", {
|
|
3898
|
+
"data-visual-aid": _(k)(s.visualAid),
|
|
3899
3899
|
"data-size": s.size,
|
|
3900
|
-
"data-hide-label":
|
|
3900
|
+
"data-hide-label": _(F)(s.showLabel),
|
|
3901
3901
|
"data-variant": s.variant,
|
|
3902
|
-
"data-hide-asterisk":
|
|
3902
|
+
"data-hide-asterisk": _(F)(s.showRequiredAsterisk),
|
|
3903
3903
|
"data-custom-validity": s.validation,
|
|
3904
|
-
class: c(
|
|
3904
|
+
class: c(_(C)("db-switch", S.class))
|
|
3905
3905
|
}, [
|
|
3906
3906
|
i("label", { for: w.value }, [i("input", {
|
|
3907
3907
|
type: "checkbox",
|
|
@@ -3909,37 +3909,37 @@ var b = () => {
|
|
|
3909
3909
|
id: w.value,
|
|
3910
3910
|
ref_key: "_ref",
|
|
3911
3911
|
ref: R,
|
|
3912
|
-
checked:
|
|
3912
|
+
checked: _(A)(s.checked, "checked"),
|
|
3913
3913
|
value: s.value,
|
|
3914
|
-
disabled:
|
|
3914
|
+
disabled: _(A)(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: _(A)(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) => U(e),
|
|
3924
|
+
onKeydown: u[3] ||= async (e) => W(e)
|
|
3925
|
+
}, null, 40, kr), s.label ? (f(), r(e, { key: 0 }, [a(g(s.label), 1)], 64)) : h(l.$slots, "default", { key: 1 })], 8, Or),
|
|
3926
|
+
_(I)(s.message, s.showMessage) ? (f(), t($, {
|
|
3927
3927
|
key: 0,
|
|
3928
3928
|
size: "small",
|
|
3929
3929
|
semantic: "adaptive",
|
|
3930
|
-
id:
|
|
3930
|
+
id: T.value,
|
|
3931
3931
|
icon: s.messageIcon
|
|
3932
3932
|
}, {
|
|
3933
|
-
default:
|
|
3933
|
+
default: b(() => [a(g(s.message), 1)]),
|
|
3934
3934
|
_: 1
|
|
3935
3935
|
}, 8, ["id", "icon"])) : n("", !0),
|
|
3936
|
-
z() ? (
|
|
3936
|
+
z() ? (f(), t($, {
|
|
3937
3937
|
key: 1,
|
|
3938
3938
|
size: "small",
|
|
3939
3939
|
semantic: "successful",
|
|
3940
|
-
id:
|
|
3940
|
+
id: D.value
|
|
3941
3941
|
}, {
|
|
3942
|
-
default:
|
|
3942
|
+
default: b(() => [a(g(s.validMessage ?? _("TODO: Add a validMessage")), 1)]),
|
|
3943
3943
|
_: 1
|
|
3944
3944
|
}, 8, ["id"])) : n("", !0),
|
|
3945
3945
|
o($, {
|
|
@@ -3947,39 +3947,26 @@ var b = () => {
|
|
|
3947
3947
|
semantic: "critical",
|
|
3948
3948
|
id: j.value
|
|
3949
3949
|
}, {
|
|
3950
|
-
default:
|
|
3950
|
+
default: b(() => [a(g(M.value), 1)]),
|
|
3951
3951
|
_: 1
|
|
3952
3952
|
}, 8, ["id"]),
|
|
3953
|
-
i("span",
|
|
3954
|
-
], 10,
|
|
3953
|
+
i("span", Ar, g(P.value), 1)
|
|
3954
|
+
], 10, Dr));
|
|
3955
3955
|
}
|
|
3956
|
-
}),
|
|
3957
|
-
"
|
|
3958
|
-
"data-icon",
|
|
3959
|
-
"data-icon-trailing",
|
|
3960
|
-
"data-show-icon",
|
|
3961
|
-
"data-show-icon-trailing",
|
|
3962
|
-
"data-no-text"
|
|
3963
|
-
], jr = [
|
|
3964
|
-
"disabled",
|
|
3956
|
+
}), Mr = [
|
|
3957
|
+
"aria-label",
|
|
3965
3958
|
"aria-selected",
|
|
3966
|
-
"
|
|
3967
|
-
"
|
|
3968
|
-
"
|
|
3969
|
-
|
|
3959
|
+
"aria-controls",
|
|
3960
|
+
"disabled",
|
|
3961
|
+
"tabIndex",
|
|
3962
|
+
"id",
|
|
3963
|
+
"data-active",
|
|
3964
|
+
"data-no-text",
|
|
3965
|
+
"data-value"
|
|
3966
|
+
], Nr = ["data-icon", "data-icon-trailing"], Pr = ["data-icon"], Fr = /* @__PURE__ */ s({
|
|
3970
3967
|
name: "DBTabItem",
|
|
3971
3968
|
__name: "tab-item",
|
|
3972
3969
|
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
|
-
},
|
|
3983
3970
|
disabled: {
|
|
3984
3971
|
type: [Boolean, String],
|
|
3985
3972
|
default: void 0
|
|
@@ -3989,145 +3976,227 @@ var b = () => {
|
|
|
3989
3976
|
type: [Boolean, String],
|
|
3990
3977
|
default: void 0
|
|
3991
3978
|
},
|
|
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: {},
|
|
3992
3993
|
icon: { default: void 0 },
|
|
3993
|
-
|
|
3994
|
-
iconLeading: { default: void 0 },
|
|
3995
|
-
showIconLeading: {
|
|
3994
|
+
showIcon: {
|
|
3996
3995
|
type: [Boolean, String],
|
|
3997
3996
|
default: void 0
|
|
3998
3997
|
},
|
|
3998
|
+
iconTrailing: { default: void 0 },
|
|
3999
|
+
iconLeading: { default: void 0 },
|
|
3999
4000
|
showIconTrailing: {
|
|
4000
4001
|
type: [Boolean, String],
|
|
4001
4002
|
default: void 0
|
|
4002
4003
|
},
|
|
4003
|
-
|
|
4004
|
+
showIconLeading: {
|
|
4004
4005
|
type: [Boolean, String],
|
|
4005
4006
|
default: void 0
|
|
4006
4007
|
},
|
|
4007
|
-
|
|
4008
|
-
onChange: {
|
|
4009
|
-
type: Function,
|
|
4010
|
-
default: void 0
|
|
4011
|
-
},
|
|
4012
|
-
showIcon: {
|
|
4008
|
+
active: {
|
|
4013
4009
|
type: [Boolean, String],
|
|
4014
4010
|
default: void 0
|
|
4015
4011
|
},
|
|
4016
|
-
|
|
4012
|
+
width: {}
|
|
4017
4013
|
},
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4014
|
+
setup(i) {
|
|
4015
|
+
let o = i;
|
|
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);
|
|
4021
4018
|
l(() => {
|
|
4022
|
-
|
|
4019
|
+
if (s.value = A(o.active) || !1, m.value = A(o.active) ? 0 : -1, typeof window < "u") {
|
|
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
|
+
}
|
|
4023
4042
|
}), u(() => {
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
}), v(() => [p.name], () => {
|
|
4035
|
-
p.name && (y.value = p.name);
|
|
4043
|
+
S.value?.disconnect();
|
|
4044
|
+
let e = w.value;
|
|
4045
|
+
T.value && e && T.value.removeEventListener("aria-selected-changed", e.fn);
|
|
4046
|
+
}), d(() => {
|
|
4047
|
+
if (T.value) {
|
|
4048
|
+
let e = A(o.disabled) ? "true" : "false";
|
|
4049
|
+
T.value?.getAttribute("aria-disabled") !== e && T.value?.setAttribute("aria-disabled", e), v.value || (T.value.hasAttribute("data-has-tooltip") && T.value.removeAttribute("data-has-tooltip"), T.value.hasAttribute("aria-describedby") && T.value.removeAttribute("aria-describedby"));
|
|
4050
|
+
}
|
|
4051
|
+
}), y(() => [o.active], () => {
|
|
4052
|
+
o.active !== void 0 && (s.value = A(o.active) || !1);
|
|
4036
4053
|
}, {
|
|
4037
4054
|
immediate: !0,
|
|
4038
4055
|
flush: "post"
|
|
4039
4056
|
});
|
|
4040
|
-
function
|
|
4041
|
-
|
|
4057
|
+
function D() {
|
|
4058
|
+
return o.tabIndex === void 0 ? m.value : Number(o.tabIndex);
|
|
4042
4059
|
}
|
|
4043
|
-
function
|
|
4044
|
-
|
|
4060
|
+
function O(e) {
|
|
4061
|
+
e && e.preventDefault && e.preventDefault(), !A(o.disabled) && o.onClick && o.onClick(e);
|
|
4045
4062
|
}
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
"
|
|
4054
|
-
"
|
|
4055
|
-
"
|
|
4063
|
+
function k() {
|
|
4064
|
+
if (E.value) {
|
|
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
|
+
}
|
|
4068
|
+
}
|
|
4069
|
+
return (l, u) => (f(), r("button", {
|
|
4070
|
+
type: "button",
|
|
4071
|
+
role: "tab",
|
|
4072
|
+
title: "",
|
|
4073
|
+
ref_key: "_ref",
|
|
4074
|
+
ref: T,
|
|
4075
|
+
class: c(_(C)("db-tab-item", o.class)),
|
|
4076
|
+
"aria-label": _(A)(i.noText) ? i.label : void 0,
|
|
4077
|
+
"aria-selected": (i.active === void 0 ? s.value : _(A)(i.active)) ? "true" : "false",
|
|
4078
|
+
"aria-controls": i.ariaControls,
|
|
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)
|
|
4056
4086
|
}, [
|
|
4057
|
-
i("
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
"
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4087
|
+
i.noText ? n("", !0) : (f(), r("span", {
|
|
4088
|
+
key: 0,
|
|
4089
|
+
class: "db-tab-label",
|
|
4090
|
+
title: "",
|
|
4091
|
+
ref_key: "_labelRef",
|
|
4092
|
+
ref: E,
|
|
4093
|
+
"data-icon": _(A)(i.showIconLeading ?? i.showIcon) ? i.iconLeading ?? i.icon : void 0,
|
|
4094
|
+
"data-icon-trailing": _(A)(i.showIconTrailing) ? i.iconTrailing : void 0
|
|
4095
|
+
}, [i.label ? (f(), r(e, { key: 0 }, [a(g(i.label), 1)], 64)) : n("", !0), i.label ? n("", !0) : h(l.$slots, "default", { key: 1 })], 8, Nr)),
|
|
4096
|
+
_(A)(i.noText) ? (f(), r("span", {
|
|
4097
|
+
key: 1,
|
|
4098
|
+
class: "db-tab-label",
|
|
4099
|
+
"aria-hidden": "true",
|
|
4100
|
+
"data-icon": _(A)(i.showIconLeading ?? i.showIcon) ? i.iconLeading ?? i.icon : void 0
|
|
4101
|
+
}, null, 8, Pr)) : n("", !0),
|
|
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));
|
|
4072
4110
|
}
|
|
4073
|
-
}),
|
|
4111
|
+
}), Ir = [
|
|
4112
|
+
"id",
|
|
4113
|
+
"aria-orientation",
|
|
4114
|
+
"aria-label",
|
|
4115
|
+
"aria-labelledby"
|
|
4116
|
+
], Lr = /* @__PURE__ */ s({
|
|
4074
4117
|
name: "DBTabList",
|
|
4075
4118
|
__name: "tab-list",
|
|
4076
4119
|
props: {
|
|
4120
|
+
ariaLabel: { default: void 0 },
|
|
4121
|
+
ariaLabelledby: { default: void 0 },
|
|
4077
4122
|
children: { default: void 0 },
|
|
4078
4123
|
className: { default: void 0 },
|
|
4079
4124
|
class: {},
|
|
4080
4125
|
id: { default: void 0 },
|
|
4081
4126
|
autofocus: { type: [Boolean, String] },
|
|
4082
|
-
propOverrides: {
|
|
4127
|
+
propOverrides: {},
|
|
4128
|
+
orientation: { default: void 0 }
|
|
4083
4129
|
},
|
|
4084
4130
|
setup(e) {
|
|
4085
|
-
let t =
|
|
4086
|
-
return (
|
|
4131
|
+
let t = v(), n = e, i = p("tab-list-base-id"), a = p(null);
|
|
4132
|
+
return l(() => {
|
|
4133
|
+
i.value = n.id || "tab-list-" + t;
|
|
4134
|
+
}), (t, o) => (f(), r("div", {
|
|
4135
|
+
role: "tablist",
|
|
4087
4136
|
ref_key: "_ref",
|
|
4088
|
-
ref:
|
|
4089
|
-
id:
|
|
4090
|
-
class: c(
|
|
4091
|
-
|
|
4137
|
+
ref: a,
|
|
4138
|
+
id: i.value,
|
|
4139
|
+
class: c(_(C)("db-tab-list", n.class)),
|
|
4140
|
+
"aria-orientation": e.orientation || "horizontal",
|
|
4141
|
+
"aria-label": e.ariaLabelledby ? void 0 : e.ariaLabel,
|
|
4142
|
+
"aria-labelledby": e.ariaLabelledby
|
|
4143
|
+
}, [h(t.$slots, "default")], 10, Ir));
|
|
4092
4144
|
}
|
|
4093
|
-
}),
|
|
4145
|
+
}), Rr = [
|
|
4146
|
+
"id",
|
|
4147
|
+
"tabIndex",
|
|
4148
|
+
"hidden",
|
|
4149
|
+
"aria-label",
|
|
4150
|
+
"aria-labelledby"
|
|
4151
|
+
], zr = /* @__PURE__ */ s({
|
|
4094
4152
|
name: "DBTabPanel",
|
|
4095
4153
|
__name: "tab-panel",
|
|
4096
4154
|
props: {
|
|
4097
|
-
content: {
|
|
4098
|
-
|
|
4099
|
-
|
|
4155
|
+
content: {},
|
|
4156
|
+
hidden: { type: Boolean },
|
|
4157
|
+
ariaLabelledby: {},
|
|
4158
|
+
ariaLabel: {},
|
|
4159
|
+
children: {},
|
|
4160
|
+
className: {},
|
|
4100
4161
|
class: {},
|
|
4101
|
-
id: {
|
|
4162
|
+
id: {},
|
|
4102
4163
|
autofocus: { type: [Boolean, String] },
|
|
4103
|
-
propOverrides: {
|
|
4164
|
+
propOverrides: {}
|
|
4104
4165
|
},
|
|
4105
4166
|
setup(t) {
|
|
4106
|
-
let i = t, o =
|
|
4107
|
-
return
|
|
4167
|
+
let i = t, o = p(null);
|
|
4168
|
+
return (s, l) => (f(), r("div", {
|
|
4108
4169
|
role: "tabpanel",
|
|
4109
4170
|
ref_key: "_ref",
|
|
4110
4171
|
ref: o,
|
|
4111
|
-
class: c(
|
|
4112
|
-
id: t.id ?? t.propOverrides?.id
|
|
4113
|
-
|
|
4172
|
+
class: c(_(C)("db-tab-panel", i.class)),
|
|
4173
|
+
id: t.id ?? t.propOverrides?.id,
|
|
4174
|
+
tabIndex: t.hidden ? -1 : 0,
|
|
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));
|
|
4114
4179
|
}
|
|
4115
|
-
}),
|
|
4180
|
+
}), Br = [
|
|
4116
4181
|
"id",
|
|
4117
4182
|
"data-orientation",
|
|
4118
4183
|
"data-scroll-behavior",
|
|
4119
|
-
"data-alignment",
|
|
4120
|
-
"data-width"
|
|
4121
|
-
],
|
|
4184
|
+
"data-tab-item-alignment",
|
|
4185
|
+
"data-tab-item-width"
|
|
4186
|
+
], Vr = /* @__PURE__ */ s({
|
|
4122
4187
|
name: "DBTabs",
|
|
4123
4188
|
__name: "tabs",
|
|
4124
4189
|
props: {
|
|
4125
4190
|
arrowScrollDistance: { default: void 0 },
|
|
4126
4191
|
behavior: { default: void 0 },
|
|
4127
4192
|
initialSelectedIndex: { default: void 0 },
|
|
4193
|
+
activeIndex: { default: void 0 },
|
|
4128
4194
|
initialSelectedMode: { default: void 0 },
|
|
4129
4195
|
name: { default: void 0 },
|
|
4130
4196
|
tabs: { default: void 0 },
|
|
4197
|
+
tabItemWidth: { default: "auto" },
|
|
4198
|
+
scrollStartLabel: { default: "Scroll start" },
|
|
4199
|
+
scrollEndLabel: { default: "Scroll end" },
|
|
4131
4200
|
children: { default: void 0 },
|
|
4132
4201
|
className: { default: void 0 },
|
|
4133
4202
|
class: {},
|
|
@@ -4135,183 +4204,306 @@ var b = () => {
|
|
|
4135
4204
|
autofocus: { type: [Boolean, String] },
|
|
4136
4205
|
propOverrides: { default: void 0 },
|
|
4137
4206
|
orientation: { default: void 0 },
|
|
4138
|
-
|
|
4139
|
-
alignment: { default: void 0 },
|
|
4207
|
+
tabItemAlignment: { default: "start" },
|
|
4140
4208
|
indexChange: {},
|
|
4141
4209
|
onIndexChange: {
|
|
4142
4210
|
type: Function,
|
|
4143
4211
|
default: void 0
|
|
4144
4212
|
},
|
|
4145
|
-
|
|
4213
|
+
onValueChange: {
|
|
4146
4214
|
type: Function,
|
|
4147
4215
|
default: void 0
|
|
4148
|
-
}
|
|
4149
|
-
tabSelect: {}
|
|
4216
|
+
}
|
|
4150
4217
|
},
|
|
4151
4218
|
setup(i) {
|
|
4152
|
-
let s =
|
|
4219
|
+
let s = v(), d = i, x = p("tabs-" + s), S = p(s), w = p(0), T = p(!1), E = p(!1), D = p(!1), O = p(null), k = p(null), A = p(null), j = p(null), M = p([]), N = p(null);
|
|
4153
4220
|
l(() => {
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
let
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4221
|
+
let e = 0;
|
|
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
|
+
});
|
|
4164
4243
|
});
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4244
|
+
t.observe(e, {
|
|
4245
|
+
childList: !0,
|
|
4246
|
+
subtree: !0
|
|
4247
|
+
}), k.value = t;
|
|
4248
|
+
}
|
|
4249
|
+
}
|
|
4250
|
+
}), u(() => {
|
|
4251
|
+
let e = A.value;
|
|
4252
|
+
e !== null && (cancelAnimationFrame(e), A.value = null);
|
|
4253
|
+
let t = j.value, n = W();
|
|
4254
|
+
t && n && n.removeEventListener("scroll", t.fn), O.value?.disconnect(), O.value = null, k.value?.disconnect(), k.value = null;
|
|
4255
|
+
}), y(() => [d.tabs], () => {
|
|
4256
|
+
U();
|
|
4257
|
+
}, {
|
|
4258
|
+
immediate: !0,
|
|
4259
|
+
flush: "post"
|
|
4260
|
+
}), y(() => [d.activeIndex], () => {
|
|
4261
|
+
if (d.activeIndex !== void 0) {
|
|
4262
|
+
let e = Number(d.activeIndex);
|
|
4263
|
+
!isNaN(e) && e !== w.value && R(e);
|
|
4169
4264
|
}
|
|
4170
4265
|
}, {
|
|
4171
4266
|
immediate: !0,
|
|
4172
4267
|
flush: "post"
|
|
4173
4268
|
});
|
|
4174
|
-
function
|
|
4269
|
+
function P() {
|
|
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() {
|
|
4175
4357
|
try {
|
|
4176
|
-
|
|
4358
|
+
typeof d.tabs == "string" ? M.value = JSON.parse(d.tabs) : d.tabs ? M.value = d.tabs : M.value = [];
|
|
4177
4359
|
} catch (e) {
|
|
4178
|
-
console.error(e);
|
|
4360
|
+
console.error(e), M.value = [];
|
|
4179
4361
|
}
|
|
4180
|
-
return [];
|
|
4181
4362
|
}
|
|
4182
|
-
function
|
|
4183
|
-
|
|
4184
|
-
w.value = t && e.scrollLeft > 1, T.value = t && e.scrollLeft < e.scrollWidth - e.clientWidth;
|
|
4363
|
+
function W() {
|
|
4364
|
+
return N.value?.querySelector("[role=\"tablist\"]") ?? null;
|
|
4185
4365
|
}
|
|
4186
|
-
function
|
|
4187
|
-
let
|
|
4188
|
-
e &&
|
|
4189
|
-
|
|
4190
|
-
|
|
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;
|
|
4377
|
+
}
|
|
4378
|
+
function te(e) {
|
|
4379
|
+
let t = W();
|
|
4380
|
+
if (!t) return;
|
|
4381
|
+
let n = Number(d.arrowScrollDistance) || 120;
|
|
4382
|
+
!!e !== ee() && (n *= -1), t.scrollBy({
|
|
4383
|
+
left: n,
|
|
4191
4384
|
behavior: "smooth"
|
|
4192
4385
|
});
|
|
4193
4386
|
}
|
|
4194
|
-
function
|
|
4195
|
-
if (
|
|
4196
|
-
let e =
|
|
4387
|
+
function K() {
|
|
4388
|
+
if (N.value) {
|
|
4389
|
+
let e = N.value.querySelector("[role=\"tablist\"]");
|
|
4197
4390
|
if (e) {
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
let
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
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();
|
|
4391
|
+
if (e.getAttribute("aria-orientation") || e.setAttribute("aria-orientation", d.orientation ?? "horizontal"), d.behavior === "arrows") {
|
|
4392
|
+
G(e);
|
|
4393
|
+
let t = j.value;
|
|
4394
|
+
t && e && (e.removeEventListener("scroll", t.fn), j.value = null);
|
|
4395
|
+
let n = () => G(e);
|
|
4396
|
+
if (j.value = { fn: n }, e.addEventListener("scroll", n), !O.value) {
|
|
4397
|
+
let t = new ResizeObserver(() => {
|
|
4398
|
+
G(e);
|
|
4399
|
+
});
|
|
4400
|
+
t.observe(e), O.value = t;
|
|
4223
4401
|
}
|
|
4224
4402
|
}
|
|
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}`);
|
|
4403
|
+
d.name && !e.getAttribute("aria-label") && e.setAttribute("aria-label", d.name ?? "");
|
|
4230
4404
|
}
|
|
4231
4405
|
}
|
|
4232
4406
|
}
|
|
4233
|
-
function
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
}
|
|
4407
|
+
function q(e) {
|
|
4408
|
+
let t = e === void 0 ? w.value : e;
|
|
4409
|
+
if (N.value) {
|
|
4410
|
+
let e = N.value.querySelector("[role=\"tablist\"]"), n = Array.from(N.value?.querySelectorAll("[role=\"tabpanel\"]") ?? []).filter((e) => e.closest(".db-tabs") === N.value);
|
|
4411
|
+
if (!e) return;
|
|
4412
|
+
Array.from(e.querySelectorAll("[role=\"tab\"]")).forEach((e, r) => {
|
|
4413
|
+
let i = t === r, a = n[r], o = e.id || I(r), s = a?.id || L(r);
|
|
4414
|
+
e.id ||= o, e.getAttribute("aria-controls") || e.setAttribute("aria-controls", s), e.dispatchEvent(new CustomEvent("aria-selected-changed", { detail: {
|
|
4415
|
+
selected: i,
|
|
4416
|
+
tabIndex: t === r || t === -1 && r === 0 ? 0 : -1
|
|
4417
|
+
} })), a && (a.id ||= s, !a.getAttribute("aria-label") && !a.getAttribute("aria-labelledby") && a.setAttribute("aria-labelledby", o), a.hidden = !i);
|
|
4418
|
+
});
|
|
4246
4419
|
}
|
|
4247
4420
|
}
|
|
4248
|
-
return (s, l) => (
|
|
4421
|
+
return (s, l) => (f(), r("div", {
|
|
4249
4422
|
ref_key: "_ref",
|
|
4250
|
-
ref:
|
|
4251
|
-
id: i.id ?? i.propOverrides?.id,
|
|
4252
|
-
class: c(
|
|
4423
|
+
ref: N,
|
|
4424
|
+
id: i.id ?? i.propOverrides?.id ?? P(),
|
|
4425
|
+
class: c(_(C)("db-tabs", d.class)),
|
|
4253
4426
|
"data-orientation": i.orientation,
|
|
4254
4427
|
"data-scroll-behavior": i.behavior,
|
|
4255
|
-
"data-alignment": i.
|
|
4256
|
-
"data-width": i.
|
|
4257
|
-
|
|
4258
|
-
|
|
4428
|
+
"data-tab-item-alignment": i.tabItemAlignment,
|
|
4429
|
+
"data-tab-item-width": i.tabItemWidth,
|
|
4430
|
+
onClick: l[0] ||= async (e) => z(e),
|
|
4431
|
+
onKeydown: l[1] ||= async (e) => B(e)
|
|
4259
4432
|
}, [
|
|
4260
|
-
|
|
4433
|
+
E.value ? (f(), t(Ie, {
|
|
4261
4434
|
key: 0,
|
|
4262
|
-
class: "tabs-scroll-
|
|
4435
|
+
class: "tabs-scroll-start",
|
|
4263
4436
|
variant: "ghost",
|
|
4264
4437
|
icon: "chevron_left",
|
|
4265
4438
|
type: "button",
|
|
4266
4439
|
noText: !0,
|
|
4267
|
-
onClick: (e) =>
|
|
4440
|
+
onClick: (e) => te(!0)
|
|
4268
4441
|
}, {
|
|
4269
|
-
default:
|
|
4442
|
+
default: b(() => [a(g(i.scrollStartLabel), 1)]),
|
|
4270
4443
|
_: 1
|
|
4271
4444
|
}, 8, ["onClick"])) : n("", !0),
|
|
4272
|
-
i.tabs ? (
|
|
4273
|
-
|
|
4445
|
+
i.tabs ? (f(), r(e, { key: 1 }, [o(Lr, {
|
|
4446
|
+
orientation: i.orientation,
|
|
4447
|
+
ariaLabel: i.name
|
|
4448
|
+
}, {
|
|
4449
|
+
default: b(() => [(f(!0), r(e, null, m(M.value, (e, n) => (f(), t(Fr, {
|
|
4274
4450
|
key: i.name + "tab-item" + n,
|
|
4275
|
-
|
|
4451
|
+
id: I(n),
|
|
4452
|
+
ariaControls: L(n),
|
|
4453
|
+
active: V(n),
|
|
4454
|
+
tabIndex: H(n),
|
|
4276
4455
|
label: e.label,
|
|
4277
4456
|
iconTrailing: e.iconTrailing,
|
|
4278
4457
|
icon: e.icon,
|
|
4279
|
-
noText: e.noText
|
|
4458
|
+
noText: e.noText,
|
|
4459
|
+
onClick: (e) => R(n)
|
|
4280
4460
|
}, null, 8, [
|
|
4461
|
+
"id",
|
|
4462
|
+
"ariaControls",
|
|
4281
4463
|
"active",
|
|
4464
|
+
"tabIndex",
|
|
4282
4465
|
"label",
|
|
4283
4466
|
"iconTrailing",
|
|
4284
4467
|
"icon",
|
|
4285
|
-
"noText"
|
|
4468
|
+
"noText",
|
|
4469
|
+
"onClick"
|
|
4286
4470
|
]))), 128))]),
|
|
4287
4471
|
_: 1
|
|
4288
|
-
}), (
|
|
4472
|
+
}, 8, ["orientation", "ariaLabel"]), (f(!0), r(e, null, m(M.value, (e, n) => (f(), t(zr, {
|
|
4289
4473
|
key: i.name + "tab-panel" + n,
|
|
4290
|
-
|
|
4474
|
+
id: L(n),
|
|
4475
|
+
ariaLabelledby: I(n),
|
|
4476
|
+
content: e.content,
|
|
4477
|
+
hidden: !V(n)
|
|
4291
4478
|
}, {
|
|
4292
|
-
default:
|
|
4479
|
+
default: b(() => [a(g(e.children), 1)]),
|
|
4293
4480
|
_: 2
|
|
4294
|
-
}, 1032, [
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4481
|
+
}, 1032, [
|
|
4482
|
+
"id",
|
|
4483
|
+
"ariaLabelledby",
|
|
4484
|
+
"content",
|
|
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",
|
|
4298
4491
|
variant: "ghost",
|
|
4299
4492
|
icon: "chevron_right",
|
|
4300
4493
|
type: "button",
|
|
4301
4494
|
noText: !0,
|
|
4302
|
-
onClick: (e) =>
|
|
4495
|
+
onClick: (e) => te(!1)
|
|
4303
4496
|
}, {
|
|
4304
|
-
default:
|
|
4497
|
+
default: b(() => [a(g(i.scrollEndLabel), 1)]),
|
|
4305
4498
|
_: 1
|
|
4306
|
-
}, 8, ["onClick"])) : n("", !0)
|
|
4307
|
-
|
|
4308
|
-
], 42, Rr));
|
|
4499
|
+
}, 8, ["onClick"])) : n("", !0)
|
|
4500
|
+
], 42, Br));
|
|
4309
4501
|
}
|
|
4310
|
-
}),
|
|
4502
|
+
}), Hr = ["scrollbar", "arrows"], Ur = ["auto", "manually"], Wr = ["static", "removable"], Gr = [
|
|
4311
4503
|
"data-variant",
|
|
4312
4504
|
"data-hide-asterisk",
|
|
4313
4505
|
"data-hide-label"
|
|
4314
|
-
],
|
|
4506
|
+
], Kr = ["for"], qr = [
|
|
4315
4507
|
"aria-invalid",
|
|
4316
4508
|
"data-custom-validity",
|
|
4317
4509
|
"data-field-sizing",
|
|
@@ -4333,10 +4525,10 @@ var b = () => {
|
|
|
4333
4525
|
"placeholder",
|
|
4334
4526
|
"rows",
|
|
4335
4527
|
"cols"
|
|
4336
|
-
],
|
|
4528
|
+
], Jr = {
|
|
4337
4529
|
"data-visually-hidden": "true",
|
|
4338
4530
|
role: "status"
|
|
4339
|
-
},
|
|
4531
|
+
}, Yr = /* @__PURE__ */ s({
|
|
4340
4532
|
name: "DBTextarea",
|
|
4341
4533
|
__name: "textarea",
|
|
4342
4534
|
props: {
|
|
@@ -4430,39 +4622,39 @@ var b = () => {
|
|
|
4430
4622
|
},
|
|
4431
4623
|
emits: ["update:value"],
|
|
4432
4624
|
setup(e, { emit: s }) {
|
|
4433
|
-
let
|
|
4625
|
+
let d = v(), m = s, h = e, x = p(void 0), S = p(void 0), w = p(void 0), T = p(void 0), D = p(void 0), k = p(void 0), M = p(""), N = p(""), P = p(void 0), L = p(null);
|
|
4434
4626
|
l(() => {
|
|
4435
|
-
|
|
4627
|
+
W(), D.value = h.invalidMessage || "TODO: Add an invalidMessage";
|
|
4436
4628
|
}), u(() => {
|
|
4437
|
-
|
|
4438
|
-
}),
|
|
4439
|
-
(
|
|
4629
|
+
P.value?.abort();
|
|
4630
|
+
}), y(() => [h.id, h.propOverrides?.id], () => {
|
|
4631
|
+
(h.id ?? h.propOverrides?.id) && W();
|
|
4440
4632
|
}, {
|
|
4441
4633
|
immediate: !0,
|
|
4442
4634
|
flush: "post"
|
|
4443
|
-
}),
|
|
4444
|
-
|
|
4635
|
+
}), y(() => [L.value, h.invalidMessage], () => {
|
|
4636
|
+
D.value = h.invalidMessage || L.value?.validationMessage || "TODO: Add an invalidMessage";
|
|
4445
4637
|
}, {
|
|
4446
4638
|
immediate: !0,
|
|
4447
4639
|
flush: "post"
|
|
4448
|
-
}),
|
|
4640
|
+
}), y(() => [x.value], () => {
|
|
4449
4641
|
if (x.value) {
|
|
4450
|
-
let e = x.value +
|
|
4451
|
-
|
|
4642
|
+
let e = x.value + J;
|
|
4643
|
+
S.value = e, w.value = x.value + Y, T.value = x.value + oe, I(h.message, h.showMessage) && (k.value = e), z();
|
|
4452
4644
|
}
|
|
4453
4645
|
}, {
|
|
4454
4646
|
immediate: !0,
|
|
4455
4647
|
flush: "post"
|
|
4456
|
-
}),
|
|
4457
|
-
M.value =
|
|
4648
|
+
}), y(() => [h.value], () => {
|
|
4649
|
+
M.value = h.value;
|
|
4458
4650
|
}, {
|
|
4459
4651
|
immediate: !0,
|
|
4460
4652
|
flush: "post"
|
|
4461
|
-
}),
|
|
4653
|
+
}), y(() => [L.value], () => {
|
|
4462
4654
|
if (L.value) {
|
|
4463
|
-
let e =
|
|
4464
|
-
e || (e = new AbortController(),
|
|
4465
|
-
value:
|
|
4655
|
+
let e = P.value;
|
|
4656
|
+
e || (e = new AbortController(), P.value = e), Ke(L.value, {
|
|
4657
|
+
value: h.value,
|
|
4466
4658
|
defaultValue: void 0
|
|
4467
4659
|
}, (e) => {
|
|
4468
4660
|
V(e, !0), B(e, !0);
|
|
@@ -4473,34 +4665,34 @@ var b = () => {
|
|
|
4473
4665
|
flush: "post"
|
|
4474
4666
|
});
|
|
4475
4667
|
function R() {
|
|
4476
|
-
return !!(
|
|
4668
|
+
return !!(h.validMessage ?? h.validation === "valid");
|
|
4477
4669
|
}
|
|
4478
4670
|
function z() {
|
|
4479
|
-
!L.value?.validity.valid ||
|
|
4671
|
+
!L.value?.validity.valid || h.validation === "invalid" ? (k.value = T.value, D.value = h.invalidMessage || L.value?.validationMessage || "TODO: Add an invalidMessage", E() && (N.value = D.value, O(() => N.value = "", 1e3))) : R() && L.value?.validity.valid && (h.required || h.minLength || h.maxLength) ? (k.value = w.value, E() && (N.value = h.validMessage ?? "TODO: Add a validMessage", O(() => N.value = "", 1e3))) : I(h.message, h.showMessage) ? k.value = S.value : k.value = void 0;
|
|
4480
4672
|
}
|
|
4481
4673
|
function B(e, t) {
|
|
4482
|
-
|
|
4674
|
+
h.input && h.input(e), M.value = e.target.value, h.onInput && h.onInput(e), Ue(m, e), z();
|
|
4483
4675
|
}
|
|
4484
4676
|
function V(e, t) {
|
|
4485
|
-
|
|
4677
|
+
h.onChange && h.onChange(e), Ue(m, e), z();
|
|
4486
4678
|
}
|
|
4487
4679
|
function H(e) {
|
|
4488
|
-
|
|
4680
|
+
h.onBlur && h.onBlur(e);
|
|
4489
4681
|
}
|
|
4490
|
-
function
|
|
4491
|
-
|
|
4682
|
+
function U(e) {
|
|
4683
|
+
h.onFocus && h.onFocus(e);
|
|
4492
4684
|
}
|
|
4493
|
-
function
|
|
4494
|
-
let e =
|
|
4495
|
-
x.value = e,
|
|
4685
|
+
function W() {
|
|
4686
|
+
let e = h.id ?? h.propOverrides?.id ?? `textarea-${d}`;
|
|
4687
|
+
x.value = e, S.value = e + J, w.value = e + Y, T.value = e + oe;
|
|
4496
4688
|
}
|
|
4497
|
-
return (s, l) => (
|
|
4498
|
-
class: c(
|
|
4689
|
+
return (s, l) => (f(), r("div", {
|
|
4690
|
+
class: c(_(C)("db-textarea", h.class)),
|
|
4499
4691
|
"data-variant": e.variant,
|
|
4500
|
-
"data-hide-asterisk":
|
|
4501
|
-
"data-hide-label":
|
|
4692
|
+
"data-hide-asterisk": _(F)(e.showRequiredAsterisk),
|
|
4693
|
+
"data-hide-label": _(F)(e.showLabel)
|
|
4502
4694
|
}, [
|
|
4503
|
-
i("label", { for: x.value },
|
|
4695
|
+
i("label", { for: x.value }, g(e.label ?? _("LABEL SHOULD BE SET")), 9, Kr),
|
|
4504
4696
|
i("textarea", {
|
|
4505
4697
|
"aria-invalid": e.validation === "invalid",
|
|
4506
4698
|
"data-custom-validity": e.validation,
|
|
@@ -4509,13 +4701,13 @@ var b = () => {
|
|
|
4509
4701
|
ref: L,
|
|
4510
4702
|
id: x.value,
|
|
4511
4703
|
"data-resize": e.resize,
|
|
4512
|
-
"data-hide-resizer":
|
|
4513
|
-
disabled:
|
|
4514
|
-
required:
|
|
4515
|
-
readOnly:
|
|
4704
|
+
"data-hide-resizer": _(F)(e.showResizer ?? !0),
|
|
4705
|
+
disabled: _(A)(e.disabled, "disabled"),
|
|
4706
|
+
required: _(A)(e.required, "required"),
|
|
4707
|
+
readOnly: _(A)(e.readOnly, "readOnly") || _(A)(e.readonly, "readonly"),
|
|
4516
4708
|
form: e.form,
|
|
4517
|
-
maxLength:
|
|
4518
|
-
minLength:
|
|
4709
|
+
maxLength: _(j)(e.maxLength, e.maxlength),
|
|
4710
|
+
minLength: _(j)(e.minLength, e.minlength),
|
|
4519
4711
|
name: e.name,
|
|
4520
4712
|
wrap: e.wrap,
|
|
4521
4713
|
spellcheck: e.spellCheck,
|
|
@@ -4523,83 +4715,83 @@ var b = () => {
|
|
|
4523
4715
|
onInput: l[0] ||= async (e) => B(e),
|
|
4524
4716
|
onChange: l[1] ||= async (e) => V(e),
|
|
4525
4717
|
onBlur: l[2] ||= async (e) => H(e),
|
|
4526
|
-
onFocus: l[3] ||= async (e) =>
|
|
4718
|
+
onFocus: l[3] ||= async (e) => U(e),
|
|
4527
4719
|
value: e.value ?? M.value ?? "",
|
|
4528
|
-
"aria-describedby": e.ariaDescribedBy ??
|
|
4529
|
-
placeholder: e.placeholder ??
|
|
4530
|
-
rows:
|
|
4531
|
-
cols:
|
|
4532
|
-
},
|
|
4533
|
-
|
|
4720
|
+
"aria-describedby": e.ariaDescribedBy ?? k.value,
|
|
4721
|
+
placeholder: e.placeholder ?? _(" "),
|
|
4722
|
+
rows: _(j)(e.rows, _(4)),
|
|
4723
|
+
cols: _(j)(e.cols)
|
|
4724
|
+
}, g(e.value), 41, qr),
|
|
4725
|
+
_(I)(e.message, e.showMessage) ? (f(), t($, {
|
|
4534
4726
|
key: 0,
|
|
4535
4727
|
size: "small",
|
|
4536
4728
|
icon: e.messageIcon,
|
|
4537
|
-
id:
|
|
4729
|
+
id: S.value
|
|
4538
4730
|
}, {
|
|
4539
|
-
default:
|
|
4731
|
+
default: b(() => [a(g(e.message), 1)]),
|
|
4540
4732
|
_: 1
|
|
4541
4733
|
}, 8, ["icon", "id"])) : n("", !0),
|
|
4542
|
-
R() ? (
|
|
4734
|
+
R() ? (f(), t($, {
|
|
4543
4735
|
key: 1,
|
|
4544
4736
|
size: "small",
|
|
4545
4737
|
semantic: "successful",
|
|
4546
4738
|
id: w.value
|
|
4547
4739
|
}, {
|
|
4548
|
-
default:
|
|
4740
|
+
default: b(() => [a(g(e.validMessage || _("TODO: Add a validMessage")), 1)]),
|
|
4549
4741
|
_: 1
|
|
4550
4742
|
}, 8, ["id"])) : n("", !0),
|
|
4551
4743
|
o($, {
|
|
4552
4744
|
size: "small",
|
|
4553
4745
|
semantic: "critical",
|
|
4554
|
-
id:
|
|
4746
|
+
id: T.value
|
|
4555
4747
|
}, {
|
|
4556
|
-
default:
|
|
4748
|
+
default: b(() => [a(g(D.value), 1)]),
|
|
4557
4749
|
_: 1
|
|
4558
4750
|
}, 8, ["id"]),
|
|
4559
|
-
i("span",
|
|
4560
|
-
], 10,
|
|
4751
|
+
i("span", Jr, g(N.value), 1)
|
|
4752
|
+
], 10, Gr));
|
|
4561
4753
|
}
|
|
4562
|
-
}),
|
|
4754
|
+
}), Xr = [
|
|
4563
4755
|
"none",
|
|
4564
4756
|
"both",
|
|
4565
4757
|
"horizontal",
|
|
4566
4758
|
"vertical"
|
|
4567
|
-
],
|
|
4759
|
+
], Zr = [
|
|
4568
4760
|
"hard",
|
|
4569
4761
|
"soft",
|
|
4570
4762
|
"off"
|
|
4571
|
-
],
|
|
4763
|
+
], Qr = ["description", "label"], $r = [
|
|
4572
4764
|
"adaptive",
|
|
4573
4765
|
"neutral",
|
|
4574
4766
|
"critical",
|
|
4575
4767
|
"informational",
|
|
4576
4768
|
"warning",
|
|
4577
4769
|
"successful"
|
|
4578
|
-
],
|
|
4770
|
+
], ei = [
|
|
4579
4771
|
"medium",
|
|
4580
4772
|
"small",
|
|
4581
4773
|
"large",
|
|
4582
4774
|
"none"
|
|
4583
|
-
],
|
|
4775
|
+
], ti = [
|
|
4584
4776
|
"medium",
|
|
4585
4777
|
"small",
|
|
4586
4778
|
"large",
|
|
4587
4779
|
"none"
|
|
4588
|
-
],
|
|
4780
|
+
], ni = [
|
|
4589
4781
|
"left",
|
|
4590
4782
|
"right",
|
|
4591
4783
|
"left-start",
|
|
4592
4784
|
"left-end",
|
|
4593
4785
|
"right-start",
|
|
4594
4786
|
"right-end"
|
|
4595
|
-
],
|
|
4787
|
+
], ri = [
|
|
4596
4788
|
"top",
|
|
4597
4789
|
"bottom",
|
|
4598
4790
|
"top-start",
|
|
4599
4791
|
"top-end",
|
|
4600
4792
|
"bottom-start",
|
|
4601
4793
|
"bottom-end"
|
|
4602
|
-
],
|
|
4794
|
+
], ii = [...ni, ...ri], ai = [
|
|
4603
4795
|
"none",
|
|
4604
4796
|
"3x-large",
|
|
4605
4797
|
"2x-large",
|
|
@@ -4610,25 +4802,25 @@ var b = () => {
|
|
|
4610
4802
|
"x-small",
|
|
4611
4803
|
"2x-small",
|
|
4612
4804
|
"3x-small"
|
|
4613
|
-
],
|
|
4805
|
+
], oi = ["horizontal", "vertical"], si = ["full", "auto"], ci = [
|
|
4614
4806
|
"full",
|
|
4615
4807
|
"medium",
|
|
4616
4808
|
"large",
|
|
4617
4809
|
"small"
|
|
4618
|
-
],
|
|
4810
|
+
], li = [
|
|
4619
4811
|
"none",
|
|
4620
4812
|
"slow",
|
|
4621
4813
|
"fast"
|
|
4622
|
-
],
|
|
4814
|
+
], ui = ["auto", "fixed"], di = ["small", "medium"], fi = ["weak", "strong"], pi = [
|
|
4623
4815
|
"invalid",
|
|
4624
4816
|
"valid",
|
|
4625
4817
|
"no-validation"
|
|
4626
|
-
],
|
|
4818
|
+
], mi = ["fixed", "content"], hi = ["above", "floating"], gi = ["leading", "trailing"], _i = /* @__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("."), vi = [
|
|
4627
4819
|
"_self",
|
|
4628
4820
|
"_blank",
|
|
4629
4821
|
"_parent",
|
|
4630
4822
|
"_top"
|
|
4631
|
-
],
|
|
4823
|
+
], yi = [
|
|
4632
4824
|
"no-referrer",
|
|
4633
4825
|
"no-referrer-when-downgrade",
|
|
4634
4826
|
"origin",
|
|
@@ -4637,6 +4829,10 @@ var b = () => {
|
|
|
4637
4829
|
"strict-origin",
|
|
4638
4830
|
"strict-origin-when-cross-origin",
|
|
4639
4831
|
"unsafe-url"
|
|
4640
|
-
],
|
|
4832
|
+
], bi = [
|
|
4833
|
+
"start",
|
|
4834
|
+
"center",
|
|
4835
|
+
"end"
|
|
4836
|
+
];
|
|
4641
4837
|
//#endregion
|
|
4642
|
-
export {
|
|
4838
|
+
export { te as AccordionBehaviorList, G as AccordionVariantList, _i as AutoCompleteList, Me as BadgePlacementList, Re as ButtonTypeList, Le as ButtonVariantList, Q as COLOR, xe as COLORS, Se as COLORS_SIMPLE, ve as COLOR_CONST, Z as COLOR_SIMPLE, Ve as CardBehaviorList, He as CardElevationLevelList, qt as CustomSelectDropdownWidthList, Xt as CustomSelectListItemTypeList, ee as DBAccordion, U as DBAccordionItem, je as DBBadge, Pe as DBBrand, Ie as DBButton, Be as DBCard, Qe as DBCheckbox, et as DBCustomButton, Kt as DBCustomSelect, ft as DBCustomSelectDropdown, Yt as DBCustomSelectFormField, yt as DBCustomSelectList, _t as DBCustomSelectListItem, $t as DBDivider, cn as DBDrawer, On as DBHeader, An as DBIcon, $ as DBInfotext, Et as DBInput, Pn as DBLink, zn as DBNavigation, Wn as DBNavigationItem, Yn as DBNotification, er as DBPage, ar as DBPopover, cr as DBRadio, ur as DBSection, br as DBSelect, Sr as DBStack, jr as DBSwitch, Fr as DBTabItem, Lr as DBTabList, zr as DBTabPanel, Vr as DBTabs, At as DBTag, Yr as DBTextarea, Ot 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, K as DEFAULT_ID, le as DEFAULT_INVALID_MESSAGE, oe as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, q as DEFAULT_LABEL, ie as DEFAULT_LABEL_ID_SUFFIX, re as DEFAULT_MESSAGE, J as DEFAULT_MESSAGE_ID_SUFFIX, ne as DEFAULT_PLACEHOLDER, se as DEFAULT_PLACEHOLDER_ID_SUFFIX, ue as DEFAULT_REMOVE, he as DEFAULT_ROWS, fe as DEFAULT_SELECTED, ae as DEFAULT_SELECT_ID_SUFFIX, X as DEFAULT_VALID_MESSAGE, Y as DEFAULT_VALID_MESSAGE_ID_SUFFIX, Te as DEFAULT_VIEWPORT, be as DENSITIES, ye as DENSITY, _e as DENSITY_CONST, Ee as DESKTOP_VIEWPORT, en as DividerMarginList, tn as DividerVariantList, tt as DocumentClickListener, nt as DocumentScrollListener, ln as DrawerBackdropList, un as DrawerDirectionList, fn as DrawerPositionList, dn as DrawerVariantList, fi as EmphasisList, mi as FieldSizingList, ai as GapSpacingList, jn as IconWeightList, Mn as InputTypeList, gi as LabelVariantHorizontalList, hi as LabelVariantList, Ln as LinkContentList, yi as LinkReferrerPolicyList, In as LinkSizeList, vi as LinkTargetList, Fn as LinkVariantList, ti as MarginList, ci as MaxWidthList, mn as NavigationItemSafeTriangle, Qn as NotificationAriaLiveList, Zn as NotificationLinkVariantList, Xn as NotificationVariantList, oi as OrientationList, nr as PageDocumentOverflowList, tr as PageVariantList, ni as PlacementHorizontalList, ii as PlacementList, ri as PlacementVerticalList, li as PopoverDelayList, ui as PopoverWidthList, Ce as SEMANTIC, we as SEMANTICS, Zt as SelectedTypeList, $r as SemanticList, di as SizeList, ei as SpacingList, Tr as StackAlignmentList, wr as StackDirectionList, Er as StackJustifyContentList, Cr as StackVariantList, De as TESTING_VIEWPORTS, bi as TabItemAlignmentList, Hr as TabsBehaviorList, Ur as TabsInitialSelectedModeList, Wr as TagBehaviorList, Xr as TextareaResizeList, Zr as TextareaWrapList, Qr as TooltipVariantList, pi as ValidationList, si as WidthList, S as addAttributeToChildren, C as cls, O as delay, A as getBoolean, k as getBooleanAsString, ot as getFloatingProps, F as getHideProp, N as getInputValue, B as getNotificationRole, j as getNumber, R as getOptionKey, L as getSearchInput, M as getStep, it as handleDataOutside, at as handleFixedDropdown, ut as handleFixedPopover, E as hasVoiceOver, w as isArrayOfStrings, pn as isEventTargetNavigationItem, D as isIOSSafari, z as isKeyboardEvent, I as stringPropVisible, x as uuid };
|