@db-ux/v-core-components 1.0.0-test-13b991d
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/README.md +112 -0
- package/dist/components/accordion/accordion.vue.d.ts +22 -0
- package/dist/components/accordion/index.d.ts +1 -0
- package/dist/components/accordion/model.d.ts +41 -0
- package/dist/components/accordion-item/accordion-item.vue.d.ts +22 -0
- package/dist/components/accordion-item/index.d.ts +1 -0
- package/dist/components/accordion-item/model.d.ts +24 -0
- package/dist/components/badge/badge.vue.d.ts +22 -0
- package/dist/components/badge/index.d.ts +1 -0
- package/dist/components/badge/model.d.ts +16 -0
- package/dist/components/brand/brand.vue.d.ts +20 -0
- package/dist/components/brand/index.d.ts +1 -0
- package/dist/components/brand/model.d.ts +10 -0
- package/dist/components/button/button.vue.d.ts +33 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/model.d.ts +52 -0
- package/dist/components/card/card.vue.d.ts +20 -0
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/card/model.d.ts +18 -0
- package/dist/components/checkbox/checkbox.vue.d.ts +41 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/checkbox/model.d.ts +10 -0
- package/dist/components/divider/divider.vue.d.ts +12 -0
- package/dist/components/divider/index.d.ts +1 -0
- package/dist/components/divider/model.d.ts +18 -0
- package/dist/components/drawer/drawer.vue.d.ts +28 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/drawer/model.d.ts +41 -0
- package/dist/components/header/header.vue.d.ts +28 -0
- package/dist/components/header/index.d.ts +1 -0
- package/dist/components/header/model.d.ts +44 -0
- package/dist/components/icon/icon.vue.d.ts +20 -0
- package/dist/components/icon/index.d.ts +1 -0
- package/dist/components/icon/model.d.ts +12 -0
- package/dist/components/infotext/index.d.ts +1 -0
- package/dist/components/infotext/infotext.vue.d.ts +21 -0
- package/dist/components/infotext/model.d.ts +5 -0
- package/dist/components/input/index.d.ts +1 -0
- package/dist/components/input/input.vue.d.ts +59 -0
- package/dist/components/input/model.d.ts +39 -0
- package/dist/components/link/index.d.ts +1 -0
- package/dist/components/link/link.vue.d.ts +31 -0
- package/dist/components/link/model.d.ts +24 -0
- package/dist/components/navigation/index.d.ts +1 -0
- package/dist/components/navigation/model.d.ts +5 -0
- package/dist/components/navigation/navigation.vue.d.ts +17 -0
- package/dist/components/navigation-item/index.d.ts +1 -0
- package/dist/components/navigation-item/model.d.ts +34 -0
- package/dist/components/navigation-item/navigation-item.vue.d.ts +28 -0
- package/dist/components/notification/index.d.ts +1 -0
- package/dist/components/notification/model.d.ts +57 -0
- package/dist/components/notification/notification.vue.d.ts +33 -0
- package/dist/components/page/index.d.ts +1 -0
- package/dist/components/page/model.d.ts +32 -0
- package/dist/components/page/page.vue.d.ts +21 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/model.d.ts +18 -0
- package/dist/components/popover/popover.vue.d.ts +24 -0
- package/dist/components/radio/index.d.ts +1 -0
- package/dist/components/radio/model.d.ts +7 -0
- package/dist/components/radio/radio.vue.d.ts +36 -0
- package/dist/components/section/index.d.ts +1 -0
- package/dist/components/section/model.d.ts +5 -0
- package/dist/components/section/section.vue.d.ts +18 -0
- package/dist/components/select/index.d.ts +1 -0
- package/dist/components/select/model.d.ts +43 -0
- package/dist/components/select/select.vue.d.ts +47 -0
- package/dist/components/stack/index.d.ts +1 -0
- package/dist/components/stack/model.d.ts +34 -0
- package/dist/components/stack/stack.vue.d.ts +22 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/model.d.ts +12 -0
- package/dist/components/switch/switch.vue.d.ts +39 -0
- package/dist/components/tab-item/index.d.ts +1 -0
- package/dist/components/tab-item/model.d.ts +24 -0
- package/dist/components/tab-item/tab-item.vue.d.ts +31 -0
- package/dist/components/tab-list/index.d.ts +1 -0
- package/dist/components/tab-list/model.d.ts +5 -0
- package/dist/components/tab-list/tab-list.vue.d.ts +15 -0
- package/dist/components/tab-panel/index.d.ts +1 -0
- package/dist/components/tab-panel/model.d.ts +10 -0
- package/dist/components/tab-panel/tab-panel.vue.d.ts +18 -0
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/tabs/model.d.ts +47 -0
- package/dist/components/tabs/tabs.vue.d.ts +25 -0
- package/dist/components/tag/index.d.ts +1 -0
- package/dist/components/tag/model.d.ts +45 -0
- package/dist/components/tag/tag.vue.d.ts +29 -0
- package/dist/components/textarea/index.d.ts +1 -0
- package/dist/components/textarea/model.d.ts +30 -0
- package/dist/components/textarea/textarea.vue.d.ts +44 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/model.d.ts +7 -0
- package/dist/components/tooltip/tooltip.vue.d.ts +22 -0
- package/dist/db-ux.es.js +2645 -0
- package/dist/db-ux.umd.js +1 -0
- package/dist/index.d.ts +36 -0
- package/dist/shared/constants.d.ts +83 -0
- package/dist/shared/model.d.ts +445 -0
- package/dist/utils/form-components.d.ts +2 -0
- package/dist/utils/index.d.ts +61 -0
- package/dist/utils/navigation.d.ts +32 -0
- package/package.json +58 -0
package/dist/db-ux.es.js
ADDED
|
@@ -0,0 +1,2645 @@
|
|
|
1
|
+
var be = Object.defineProperty;
|
|
2
|
+
var ge = (t, n, d) => n in t ? be(t, n, { enumerable: !0, configurable: !0, writable: !0, value: d }) : t[n] = d;
|
|
3
|
+
var j = (t, n, d) => ge(t, typeof n != "symbol" ? n + "" : n, d);
|
|
4
|
+
import { defineComponent as A, ref as o, createElementBlock as g, openBlock as m, unref as r, normalizeClass as N, renderSlot as I, Fragment as T, createTextVNode as E, toDisplayString as w, createCommentVNode as D, createElementVNode as _, createBlock as X, withCtx as z, onMounted as U, watch as R, createVNode as W, renderList as ne, onUnmounted as ye } from "vue";
|
|
5
|
+
const V = () => {
|
|
6
|
+
var t, n;
|
|
7
|
+
if (typeof window < "u") {
|
|
8
|
+
if ((t = window.crypto) != null && t.randomUUID)
|
|
9
|
+
return window.crypto.randomUUID();
|
|
10
|
+
if ((n = window.crypto) != null && n.getRandomValues)
|
|
11
|
+
return window.crypto.getRandomValues(new Uint32Array(3)).join("-");
|
|
12
|
+
}
|
|
13
|
+
return Math.random().toString().substring(2);
|
|
14
|
+
}, re = (t, n) => {
|
|
15
|
+
const d = t.children;
|
|
16
|
+
Object.values(d).forEach((e) => {
|
|
17
|
+
e.setAttribute(n.key, n.value), e.children.length > 0 && re(e, n);
|
|
18
|
+
});
|
|
19
|
+
}, F = (...t) => {
|
|
20
|
+
let n = "";
|
|
21
|
+
for (const d of t)
|
|
22
|
+
if (d)
|
|
23
|
+
if (typeof d == "string")
|
|
24
|
+
n += `${d} `;
|
|
25
|
+
else
|
|
26
|
+
for (const e in d)
|
|
27
|
+
d[e] && (n += `${e} `);
|
|
28
|
+
return n.trim();
|
|
29
|
+
}, Be = ["suppressHydrationWarning", "suppressContentEditableWarning", "translate", "title", "tabIndex", "style", "spellCheck", "nonce", "lang", "hidden", "draggable", "dir", "contextMenu", "contentEditable", "autoFocus", "accessKey", "is", "inputMode", "unselectable", "security", "results", "vocab", "typeof", "rev", "resource", "rel", "property", "inlist", "datatype", "content", "about", "role", "radioGroup", "color"], cn = (t, n) => Object.keys(t).filter((d) => (d.startsWith("data-") || d.startsWith("aria-") || d.startsWith("default") || d.startsWith("auto") || d.startsWith("item") || d.startsWith("on") || Be.includes(d)) && !n.includes(d)).reduce((d, e) => ({
|
|
30
|
+
...d,
|
|
31
|
+
[e]: t[e]
|
|
32
|
+
}), {}), vn = (t, n) => Object.keys(t).filter((d) => n.includes(d)).reduce((d, e) => ({
|
|
33
|
+
...d,
|
|
34
|
+
[e]: t[e]
|
|
35
|
+
}), {}), pn = (t) => {
|
|
36
|
+
const {
|
|
37
|
+
left: n,
|
|
38
|
+
right: d
|
|
39
|
+
} = t.getBoundingClientRect(), {
|
|
40
|
+
innerWidth: e
|
|
41
|
+
} = window;
|
|
42
|
+
return n >= 0 && d <= e;
|
|
43
|
+
}, hn = (t) => {
|
|
44
|
+
const {
|
|
45
|
+
top: n,
|
|
46
|
+
bottom: d
|
|
47
|
+
} = t.getBoundingClientRect(), {
|
|
48
|
+
innerHeight: e
|
|
49
|
+
} = window;
|
|
50
|
+
return n >= 0 && d <= e;
|
|
51
|
+
}, ke = (t) => {
|
|
52
|
+
var k;
|
|
53
|
+
const {
|
|
54
|
+
top: n,
|
|
55
|
+
bottom: d,
|
|
56
|
+
left: e,
|
|
57
|
+
right: a
|
|
58
|
+
} = t.getBoundingClientRect(), {
|
|
59
|
+
innerHeight: u,
|
|
60
|
+
innerWidth: l
|
|
61
|
+
} = window;
|
|
62
|
+
let c = n < 0, i = d > u, h = e < 0, s = a > l;
|
|
63
|
+
const B = t.hasAttribute("data-outside-vy"), y = t.hasAttribute("data-outside-vx"), L = (k = t == null ? void 0 : t.parentElement) == null ? void 0 : k.getBoundingClientRect();
|
|
64
|
+
return L && (B && (t.getAttribute("data-outside-vy") === "top" ? c = L.top - (d - L.bottom) < 0 : i = L.bottom + (L.top - n) > u), y && (t.getAttribute("data-outside-vx") === "left" ? h = L.left - (a - L.right) < 0 : s = L.right + (L.left - e) > l)), {
|
|
65
|
+
outTop: c,
|
|
66
|
+
outBottom: i,
|
|
67
|
+
outLeft: h,
|
|
68
|
+
outRight: s
|
|
69
|
+
};
|
|
70
|
+
}, se = (t) => {
|
|
71
|
+
const {
|
|
72
|
+
outTop: n,
|
|
73
|
+
outBottom: d,
|
|
74
|
+
outLeft: e,
|
|
75
|
+
outRight: a
|
|
76
|
+
} = ke(t);
|
|
77
|
+
let u = {};
|
|
78
|
+
return n || d ? (u = {
|
|
79
|
+
vy: n ? "top" : "bottom"
|
|
80
|
+
}, t.setAttribute("data-outside-vy", u.vy)) : t.removeAttribute("data-outside-vy"), e || a ? (u = {
|
|
81
|
+
...u,
|
|
82
|
+
vx: a ? "right" : "left"
|
|
83
|
+
}, t.setAttribute("data-outside-vx", u.vx)) : t.removeAttribute("data-outside-vx"), u;
|
|
84
|
+
}, we = (t) => Array.isArray(t) && t.every((n) => typeof n == "string"), Ie = ["Mac", "iPhone", "iPad", "iPod"], Y = () => typeof window < "u" && Ie.some((t) => window.navigator.userAgent.includes(t)), H = (t, n) => new Promise(() => setTimeout(t, n)), G = (t) => t && String(t), P = (t) => {
|
|
85
|
+
if (t != null)
|
|
86
|
+
return G(!t);
|
|
87
|
+
}, q = (t, n) => n === void 0 ? !!t : n && t, _e = ["id", "type", "disabled", "aria-label", "data-icon", "data-hide-icon", "data-size", "data-state", "data-width", "data-variant", "data-no-text", "name", "value", "aria-describedby", "aria-expanded", "aria-pressed"], te = /* @__PURE__ */ A({
|
|
88
|
+
__name: "button",
|
|
89
|
+
props: {
|
|
90
|
+
ariaexpanded: { type: Boolean, default: void 0 },
|
|
91
|
+
ariapressed: { type: Boolean, default: void 0 },
|
|
92
|
+
disabled: { type: Boolean, default: void 0 },
|
|
93
|
+
noText: { type: Boolean, default: void 0 },
|
|
94
|
+
label: { default: void 0 },
|
|
95
|
+
name: { default: void 0 },
|
|
96
|
+
type: { default: void 0 },
|
|
97
|
+
value: { default: void 0 },
|
|
98
|
+
state: { default: void 0 },
|
|
99
|
+
variant: { default: void 0 },
|
|
100
|
+
children: { default: void 0 },
|
|
101
|
+
className: { default: void 0 },
|
|
102
|
+
class: {},
|
|
103
|
+
describedbyid: { default: void 0 },
|
|
104
|
+
id: { default: void 0 },
|
|
105
|
+
autofocus: { type: Boolean },
|
|
106
|
+
onClick: { type: Function, default: void 0 },
|
|
107
|
+
icon: { default: void 0 },
|
|
108
|
+
width: { default: void 0 },
|
|
109
|
+
size: { default: void 0 },
|
|
110
|
+
showIcon: { type: Boolean, default: void 0 },
|
|
111
|
+
text: { default: void 0 }
|
|
112
|
+
},
|
|
113
|
+
setup(t) {
|
|
114
|
+
const n = t, d = o(null);
|
|
115
|
+
function e(a) {
|
|
116
|
+
n.onClick && n.onClick(a);
|
|
117
|
+
}
|
|
118
|
+
return (a, u) => (m(), g("button", {
|
|
119
|
+
ref_key: "_ref",
|
|
120
|
+
ref: d,
|
|
121
|
+
id: a.id,
|
|
122
|
+
class: N(r(F)("db-button", n.class)),
|
|
123
|
+
type: a.type || "button",
|
|
124
|
+
disabled: a.disabled,
|
|
125
|
+
"aria-label": a.label,
|
|
126
|
+
"data-icon": a.icon,
|
|
127
|
+
"data-hide-icon": r(P)(a.showIcon),
|
|
128
|
+
"data-size": a.size,
|
|
129
|
+
"data-state": a.state,
|
|
130
|
+
"data-width": a.width,
|
|
131
|
+
"data-variant": a.variant,
|
|
132
|
+
"data-no-text": r(G)(a.noText),
|
|
133
|
+
name: a.name,
|
|
134
|
+
value: a.value,
|
|
135
|
+
"aria-describedby": a.describedbyid,
|
|
136
|
+
"aria-expanded": a.ariaexpanded,
|
|
137
|
+
"aria-pressed": a.ariapressed,
|
|
138
|
+
onClick: u[0] || (u[0] = async (l) => e(l))
|
|
139
|
+
}, [
|
|
140
|
+
a.text ? (m(), g(T, { key: 0 }, [
|
|
141
|
+
E(w(a.text), 1)
|
|
142
|
+
], 64)) : I(a.$slots, "default", { key: 1 })
|
|
143
|
+
], 10, _e));
|
|
144
|
+
}
|
|
145
|
+
}), ee = "OVERWRITE_DEFAULT_ID", le = "LABEL SHOULD BE SET", fe = " ", K = "-message", J = "-valid-message", Q = "-invalid-message", oe = "-placeholder", ue = "-datalist", Z = "TODO: Add a validMessage", x = "TODO: Add an invalidMessage", $e = "Back", Le = "BurgerMenu", Ee = "brand", Ae = 4, ce = "Close Button", mn = "density", bn = "color";
|
|
146
|
+
var ve = /* @__PURE__ */ ((t) => (t.FUNCTIONAL = "functional", t.REGULAR = "regular", t.EXPRESSIVE = "expressive", t))(ve || {});
|
|
147
|
+
const gn = Object.entries(ve).map(([, t]) => t);
|
|
148
|
+
var pe = /* @__PURE__ */ ((t) => (t.PRIMARY = "primary", t))(pe || {}), he = /* @__PURE__ */ ((t) => (t.NEUTRAL_BG_LEVEL_1 = "neutral-bg-basic-level-1", t.NEUTRAL_BG_LEVEL_2 = "neutral-bg-basic-level-2", t.NEUTRAL_BG_LEVEL_3 = "neutral-bg-basic-level-3", t.NEUTRAL_BG_TRANSPARENT_SEMI = "neutral-bg-basic-transparent-semi", t.NEUTRAL_BG_TRANSPARENT_FULL = "neutral-bg-basic-transparent-full", t.BRAND_BG_LEVEL_1 = "brand-bg-basic-level-1", t.BRAND_BG_LEVEL_2 = "brand-bg-basic-level-2", t.BRAND_BG_LEVEL_3 = "brand-bg-basic-level-3", t.BRAND_BG_TRANSPARENT_SEMI = "brand-bg-basic-transparent-semi", t.BRAND_BG_TRANSPARENT_FULL = "brand-bg-basic-transparent-full", t.SUCCESSFUL_BG_LEVEL_1 = "successful-bg-basic-level-1", t.SUCCESSFUL_BG_LEVEL_2 = "successful-bg-basic-level-2", t.SUCCESSFUL_BG_LEVEL_3 = "successful-bg-basic-level-3", t.SUCCESSFUL_BG_TRANSPARENT_SEMI = "successful-bg-basic-transparent-semi", t.SUCCESSFUL_BG_TRANSPARENT_FULL = "successful-bg-basic-transparent-full", t.CRITICAL_BG_LEVEL_1 = "critical-bg-basic-level-1", t.CRITICAL_BG_LEVEL_2 = "critical-bg-basic-level-2", t.CRITICAL_BG_LEVEL_3 = "critical-bg-basic-level-3", t.CRITICAL_BG_TRANSPARENT_SEMI = "critical-bg-basic-transparent-semi", t.CRITICAL_BG_TRANSPARENT_Full = "critical-bg-basic-transparent-full", t.WARNING_BG_LEVEL_1 = "warning-bg-basic-level-1", t.WARNING_BG_LEVEL_2 = "warning-bg-basic-level-2", t.WARNING_BG_LEVEL_3 = "warning-bg-basic-level-3", t.WARNING_BG_TRANSPARENT_SEMI = "warning-bg-basic-transparent-semi", t.WARNING_BG_TRANSPARENT_FULL = "warning-bg-basic-transparent-full", t.INFORMATIONAL_BG_LEVEL_1 = "informational-bg-basic-level-1", t.INFORMATIONAL_BG_LEVEL_2 = "informational-bg-basic-level-2", t.INFORMATIONAL_BG_LEVEL_3 = "informational-bg-basic-level-3", t.INFORMATIONAL_BG_TRANSPARENT_SEMI = "informational-bg-basic-transparent-semi", t.INFORMATIONAL_BG_TRANSPARENT_FULL = "informational-bg-basic-transparent-full", t))(he || {});
|
|
149
|
+
const yn = Object.entries(he).map(([, t]) => t), Bn = Object.entries(pe).map(([, t]) => t);
|
|
150
|
+
var me = /* @__PURE__ */ ((t) => (t.CRITICAL = "critical", t.INFORMATIONAL = "informational", t.WARNING = "warning", t.SUCCESSFUL = "successful", t))(me || {});
|
|
151
|
+
const kn = Object.entries(me).map(([, t]) => t), Ne = {
|
|
152
|
+
width: 390,
|
|
153
|
+
height: 884
|
|
154
|
+
}, Fe = {
|
|
155
|
+
width: 1920,
|
|
156
|
+
height: 1280
|
|
157
|
+
}, wn = [{
|
|
158
|
+
name: "desktop",
|
|
159
|
+
...Fe
|
|
160
|
+
}, {
|
|
161
|
+
name: "tablet",
|
|
162
|
+
width: 768,
|
|
163
|
+
height: 1024
|
|
164
|
+
}, {
|
|
165
|
+
name: "mobile",
|
|
166
|
+
...Ne
|
|
167
|
+
}], Te = ["id", "aria-live", "data-semantic", "data-variant", "data-icon", "data-hide-icon", "data-link-variant"], Se = { key: 0 }, Ce = { key: 1 }, In = /* @__PURE__ */ A({
|
|
168
|
+
__name: "notification",
|
|
169
|
+
props: {
|
|
170
|
+
ariaLive: { default: void 0 },
|
|
171
|
+
closeable: { type: Boolean, default: void 0 },
|
|
172
|
+
headline: { default: void 0 },
|
|
173
|
+
image: {},
|
|
174
|
+
link: {},
|
|
175
|
+
linkVariant: { default: void 0 },
|
|
176
|
+
showHeadline: { type: Boolean, default: void 0 },
|
|
177
|
+
timestamp: { default: void 0 },
|
|
178
|
+
showTimestamp: { type: Boolean, default: void 0 },
|
|
179
|
+
variant: { default: void 0 },
|
|
180
|
+
children: { default: void 0 },
|
|
181
|
+
className: { default: void 0 },
|
|
182
|
+
class: {},
|
|
183
|
+
describedbyid: {},
|
|
184
|
+
id: { default: void 0 },
|
|
185
|
+
autofocus: { type: Boolean },
|
|
186
|
+
onClose: { type: Function, default: void 0 },
|
|
187
|
+
icon: { default: void 0 },
|
|
188
|
+
semantic: { default: void 0 },
|
|
189
|
+
closeButtonId: { default: void 0 },
|
|
190
|
+
closeButtonText: { default: void 0 },
|
|
191
|
+
delay: {},
|
|
192
|
+
animation: { type: Boolean },
|
|
193
|
+
width: {},
|
|
194
|
+
showIcon: { type: Boolean, default: void 0 },
|
|
195
|
+
text: { default: void 0 }
|
|
196
|
+
},
|
|
197
|
+
setup(t) {
|
|
198
|
+
const n = t, d = o(null);
|
|
199
|
+
function e(a) {
|
|
200
|
+
n.onClose && n.onClose();
|
|
201
|
+
}
|
|
202
|
+
return (a, u) => (m(), g("article", {
|
|
203
|
+
ref_key: "_ref",
|
|
204
|
+
ref: d,
|
|
205
|
+
id: a.id,
|
|
206
|
+
class: N(r(F)("db-notification", n.class)),
|
|
207
|
+
"aria-live": a.ariaLive,
|
|
208
|
+
"data-semantic": a.semantic,
|
|
209
|
+
"data-variant": a.variant,
|
|
210
|
+
"data-icon": a.icon,
|
|
211
|
+
"data-hide-icon": r(P)(a.showIcon),
|
|
212
|
+
"data-link-variant": a.linkVariant
|
|
213
|
+
}, [
|
|
214
|
+
I(a.$slots, "image"),
|
|
215
|
+
r(q)(a.headline, a.showHeadline) ? (m(), g("header", Se, w(a.headline), 1)) : D("", !0),
|
|
216
|
+
_("p", null, [
|
|
217
|
+
a.text ? (m(), g(T, { key: 0 }, [
|
|
218
|
+
E(w(a.text), 1)
|
|
219
|
+
], 64)) : I(a.$slots, "default", { key: 1 })
|
|
220
|
+
]),
|
|
221
|
+
r(q)(a.timestamp, a.showTimestamp) ? (m(), g("span", Ce, w(a.timestamp), 1)) : D("", !0),
|
|
222
|
+
I(a.$slots, "link"),
|
|
223
|
+
a.closeable ? (m(), X(te, {
|
|
224
|
+
key: 2,
|
|
225
|
+
icon: "cross",
|
|
226
|
+
variant: "ghost",
|
|
227
|
+
size: "small",
|
|
228
|
+
id: a.closeButtonId,
|
|
229
|
+
noText: !0,
|
|
230
|
+
onClick: (l) => e()
|
|
231
|
+
}, {
|
|
232
|
+
default: z(() => [
|
|
233
|
+
E(w(a.closeButtonText ?? r(ce)), 1)
|
|
234
|
+
]),
|
|
235
|
+
_: 1
|
|
236
|
+
}, 8, ["id", "onClick"])) : D("", !0)
|
|
237
|
+
], 10, Te));
|
|
238
|
+
}
|
|
239
|
+
}), De = ["id", "data-semantic", "data-size", "data-emphasis", "data-placement", "data-label"], _n = /* @__PURE__ */ A({
|
|
240
|
+
__name: "badge",
|
|
241
|
+
props: {
|
|
242
|
+
placement: { default: void 0 },
|
|
243
|
+
label: { default: void 0 },
|
|
244
|
+
children: { default: void 0 },
|
|
245
|
+
className: { default: void 0 },
|
|
246
|
+
class: {},
|
|
247
|
+
describedbyid: {},
|
|
248
|
+
id: { default: void 0 },
|
|
249
|
+
autofocus: { type: Boolean },
|
|
250
|
+
semantic: { default: void 0 },
|
|
251
|
+
size: { default: void 0 },
|
|
252
|
+
emphasis: { default: void 0 },
|
|
253
|
+
text: { default: void 0 }
|
|
254
|
+
},
|
|
255
|
+
setup(t) {
|
|
256
|
+
const n = t, d = o(!1), e = o(null);
|
|
257
|
+
return U(() => {
|
|
258
|
+
d.value = !0;
|
|
259
|
+
}), R(
|
|
260
|
+
() => [e.value, d.value],
|
|
261
|
+
() => {
|
|
262
|
+
var a;
|
|
263
|
+
if (e.value && d.value && (a = n.placement) != null && a.startsWith("corner")) {
|
|
264
|
+
let u = e.value.parentElement;
|
|
265
|
+
u && u.localName.includes("badge") && (u = u.parentElement), u && u.setAttribute("data-has-badge", "true");
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
immediate: !0,
|
|
270
|
+
flush: "post"
|
|
271
|
+
}
|
|
272
|
+
), (a, u) => {
|
|
273
|
+
var l;
|
|
274
|
+
return m(), g("span", {
|
|
275
|
+
ref_key: "_ref",
|
|
276
|
+
ref: e,
|
|
277
|
+
id: a.id,
|
|
278
|
+
class: N(r(F)("db-badge", n.class)),
|
|
279
|
+
"data-semantic": a.semantic,
|
|
280
|
+
"data-size": a.size,
|
|
281
|
+
"data-emphasis": a.emphasis,
|
|
282
|
+
"data-placement": a.placement,
|
|
283
|
+
"data-label": ((l = a.placement) == null ? void 0 : l.startsWith("corner")) && (a.label ?? r(le))
|
|
284
|
+
}, [
|
|
285
|
+
a.text ? (m(), g(T, { key: 0 }, [
|
|
286
|
+
E(w(a.text), 1)
|
|
287
|
+
], 64)) : I(a.$slots, "default", { key: 1 })
|
|
288
|
+
], 10, De);
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
}), Me = ["data-icon", "data-hide-icon", "id"], $n = /* @__PURE__ */ A({
|
|
292
|
+
__name: "brand",
|
|
293
|
+
props: {
|
|
294
|
+
hideLogo: { type: Boolean, default: void 0 },
|
|
295
|
+
children: { default: void 0 },
|
|
296
|
+
className: { default: void 0 },
|
|
297
|
+
class: {},
|
|
298
|
+
describedbyid: {},
|
|
299
|
+
id: { default: void 0 },
|
|
300
|
+
autofocus: { type: Boolean },
|
|
301
|
+
icon: { default: void 0 },
|
|
302
|
+
showIcon: { type: Boolean, default: void 0 },
|
|
303
|
+
text: { default: void 0 }
|
|
304
|
+
},
|
|
305
|
+
setup(t) {
|
|
306
|
+
const n = t, d = o(null);
|
|
307
|
+
return (e, a) => (m(), g("div", {
|
|
308
|
+
ref_key: "_ref",
|
|
309
|
+
ref: d,
|
|
310
|
+
"data-icon": e.hideLogo ? "none" : e.icon ?? r(Ee),
|
|
311
|
+
"data-hide-icon": r(P)(e.showIcon),
|
|
312
|
+
id: e.id,
|
|
313
|
+
class: N(r(F)("db-brand", n.class))
|
|
314
|
+
}, [
|
|
315
|
+
e.text ? (m(), g(T, { key: 0 }, [
|
|
316
|
+
E(w(e.text), 1)
|
|
317
|
+
], 64)) : I(e.$slots, "default", { key: 1 })
|
|
318
|
+
], 10, Me));
|
|
319
|
+
}
|
|
320
|
+
}), Re = ["id", "data-behavior", "data-elevation-level", "data-spacing", "role", "tabIndex"], Ln = /* @__PURE__ */ A({
|
|
321
|
+
__name: "card",
|
|
322
|
+
props: {
|
|
323
|
+
behavior: { default: void 0 },
|
|
324
|
+
elevationLevel: { default: void 0 },
|
|
325
|
+
children: { default: void 0 },
|
|
326
|
+
className: { default: void 0 },
|
|
327
|
+
class: {},
|
|
328
|
+
describedbyid: {},
|
|
329
|
+
id: { default: void 0 },
|
|
330
|
+
autofocus: { type: Boolean },
|
|
331
|
+
onClick: { type: Function, default: void 0 },
|
|
332
|
+
spacing: { default: void 0 }
|
|
333
|
+
},
|
|
334
|
+
setup(t) {
|
|
335
|
+
const n = t, d = o(null);
|
|
336
|
+
function e(a) {
|
|
337
|
+
n.onClick && n.onClick(a);
|
|
338
|
+
}
|
|
339
|
+
return (a, u) => (m(), g("div", {
|
|
340
|
+
ref_key: "_ref",
|
|
341
|
+
ref: d,
|
|
342
|
+
id: a.id,
|
|
343
|
+
class: N(r(F)("db-card", n.class)),
|
|
344
|
+
"data-behavior": a.behavior,
|
|
345
|
+
"data-elevation-level": a.elevationLevel,
|
|
346
|
+
"data-spacing": a.spacing,
|
|
347
|
+
role: a.behavior === "interactive" ? "button" : void 0,
|
|
348
|
+
tabIndex: a.behavior === "interactive" ? 0 : void 0,
|
|
349
|
+
onClick: u[0] || (u[0] = async (l) => e(l))
|
|
350
|
+
}, [
|
|
351
|
+
I(a.$slots, "default")
|
|
352
|
+
], 10, Re));
|
|
353
|
+
}
|
|
354
|
+
}), ae = (t, n, d = "value") => {
|
|
355
|
+
t(`update:${d}`, n.target[d]);
|
|
356
|
+
}, ze = ["id", "data-icon", "data-semantic", "data-size", "data-hide-icon-before"], O = /* @__PURE__ */ A({
|
|
357
|
+
__name: "infotext",
|
|
358
|
+
props: {
|
|
359
|
+
children: { default: void 0 },
|
|
360
|
+
className: { default: void 0 },
|
|
361
|
+
class: {},
|
|
362
|
+
describedbyid: {},
|
|
363
|
+
id: { default: void 0 },
|
|
364
|
+
autofocus: { type: Boolean },
|
|
365
|
+
semantic: { default: void 0 },
|
|
366
|
+
icon: { default: void 0 },
|
|
367
|
+
size: { default: void 0 },
|
|
368
|
+
showIcon: { type: Boolean, default: void 0 },
|
|
369
|
+
text: { default: void 0 }
|
|
370
|
+
},
|
|
371
|
+
setup(t) {
|
|
372
|
+
const n = t, d = o(null);
|
|
373
|
+
return (e, a) => (m(), g("span", {
|
|
374
|
+
ref_key: "_ref",
|
|
375
|
+
ref: d,
|
|
376
|
+
id: e.id,
|
|
377
|
+
class: N(r(F)("db-infotext", n.class)),
|
|
378
|
+
"data-icon": e.icon,
|
|
379
|
+
"data-semantic": e.semantic,
|
|
380
|
+
"data-size": e.size,
|
|
381
|
+
"data-hide-icon-before": r(P)(e.showIcon ?? !0)
|
|
382
|
+
}, [
|
|
383
|
+
e.text ? (m(), g(T, { key: 0 }, [
|
|
384
|
+
E(w(e.text), 1)
|
|
385
|
+
], 64)) : I(e.$slots, "default", { key: 1 })
|
|
386
|
+
], 10, ze));
|
|
387
|
+
}
|
|
388
|
+
}), Ue = ["data-size", "data-hide-label"], Pe = ["for"], Ge = ["aria-invalid", "data-custom-validity", "id", "name", "checked", "disabled", "value", "required", "aria-describedby"], Ve = {
|
|
389
|
+
"data-visually-hidden": "true",
|
|
390
|
+
role: "status"
|
|
391
|
+
}, En = /* @__PURE__ */ A({
|
|
392
|
+
__name: "checkbox",
|
|
393
|
+
props: {
|
|
394
|
+
indeterminate: { type: Boolean, default: void 0 },
|
|
395
|
+
children: { default: void 0 },
|
|
396
|
+
className: { default: void 0 },
|
|
397
|
+
class: {},
|
|
398
|
+
describedbyid: {},
|
|
399
|
+
id: { default: void 0 },
|
|
400
|
+
autofocus: { type: Boolean },
|
|
401
|
+
change: { type: Function, default: void 0 },
|
|
402
|
+
onChange: { type: Function, default: void 0 },
|
|
403
|
+
blur: { type: Function, default: void 0 },
|
|
404
|
+
onBlur: { type: Function, default: void 0 },
|
|
405
|
+
focus: { type: Function, default: void 0 },
|
|
406
|
+
onFocus: { type: Function, default: void 0 },
|
|
407
|
+
validation: { default: void 0 },
|
|
408
|
+
disabled: { type: Boolean, default: void 0 },
|
|
409
|
+
form: {},
|
|
410
|
+
label: { default: void 0 },
|
|
411
|
+
name: { default: void 0 },
|
|
412
|
+
required: { type: Boolean, default: void 0 },
|
|
413
|
+
showLabel: { type: Boolean, default: void 0 },
|
|
414
|
+
value: { default: void 0 },
|
|
415
|
+
checked: { type: Boolean, default: void 0 },
|
|
416
|
+
variant: {},
|
|
417
|
+
placeholder: {},
|
|
418
|
+
message: { default: void 0 },
|
|
419
|
+
validMessage: { default: void 0 },
|
|
420
|
+
invalidMessage: { default: void 0 },
|
|
421
|
+
messageIcon: { default: void 0 },
|
|
422
|
+
autocomplete: {},
|
|
423
|
+
showMessage: { type: Boolean, default: void 0 },
|
|
424
|
+
size: { default: void 0 }
|
|
425
|
+
},
|
|
426
|
+
emits: ["update:checked"],
|
|
427
|
+
setup(t, { emit: n }) {
|
|
428
|
+
const d = n, e = t, a = o(!1), u = o(void 0), l = o(void 0), c = o(void 0), i = o(void 0), h = o(""), s = o(""), B = o(null);
|
|
429
|
+
U(() => {
|
|
430
|
+
a.value = !0;
|
|
431
|
+
const v = e.id ?? `checkbox-${V()}`;
|
|
432
|
+
u.value = v, l.value = v + K, c.value = v + J, i.value = v + Q;
|
|
433
|
+
}), R(
|
|
434
|
+
() => [u.value],
|
|
435
|
+
() => {
|
|
436
|
+
if (u.value) {
|
|
437
|
+
const v = u.value + K;
|
|
438
|
+
l.value = v, c.value = u.value + J, i.value = u.value + Q, q(e.message, e.showMessage) && (h.value = v);
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
immediate: !0,
|
|
443
|
+
flush: "post"
|
|
444
|
+
}
|
|
445
|
+
), R(
|
|
446
|
+
() => [a.value, e.indeterminate, e.checked],
|
|
447
|
+
() => {
|
|
448
|
+
if (a.value && document && u.value) {
|
|
449
|
+
const v = document == null ? void 0 : document.getElementById(
|
|
450
|
+
u.value
|
|
451
|
+
);
|
|
452
|
+
v && (e.checked != null && (v.checked = e.checked), e.indeterminate !== void 0 && (v.indeterminate = e.indeterminate), a.value = !1);
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
immediate: !0,
|
|
457
|
+
flush: "post"
|
|
458
|
+
}
|
|
459
|
+
);
|
|
460
|
+
function y(v) {
|
|
461
|
+
var p, $, f;
|
|
462
|
+
e.onChange && e.onChange(v), e.change && e.change(v), ae(d, v, "checked"), !((p = B.value) != null && p.validity.valid) || e.validation === "invalid" ? (h.value = i.value, Y() && (s.value = e.invalidMessage ?? (($ = B.value) == null ? void 0 : $.validationMessage) ?? x, H(() => s.value = "", 1e3))) : e.validation === "valid" || (f = B.value) != null && f.validity.valid && e.required ? (h.value = c.value, Y() && (s.value = e.validMessage ?? Z, H(() => s.value = "", 1e3))) : q(e.message, e.showMessage) ? h.value = l.value : h.value = "";
|
|
463
|
+
}
|
|
464
|
+
function L(v) {
|
|
465
|
+
e.onBlur && e.onBlur(v), e.blur && e.blur(v);
|
|
466
|
+
}
|
|
467
|
+
function k(v) {
|
|
468
|
+
e.onFocus && e.onFocus(v), e.focus && e.focus(v);
|
|
469
|
+
}
|
|
470
|
+
return (v, p) => (m(), g("div", {
|
|
471
|
+
class: N(r(F)("db-checkbox", e.class)),
|
|
472
|
+
"data-size": v.size,
|
|
473
|
+
"data-hide-label": r(P)(v.showLabel)
|
|
474
|
+
}, [
|
|
475
|
+
_("label", { for: u.value }, [
|
|
476
|
+
_("input", {
|
|
477
|
+
type: "checkbox",
|
|
478
|
+
"aria-invalid": v.validation === "invalid",
|
|
479
|
+
"data-custom-validity": v.validation,
|
|
480
|
+
ref_key: "_ref",
|
|
481
|
+
ref: B,
|
|
482
|
+
id: u.value,
|
|
483
|
+
name: v.name,
|
|
484
|
+
checked: v.checked,
|
|
485
|
+
disabled: v.disabled,
|
|
486
|
+
value: v.value,
|
|
487
|
+
required: v.required,
|
|
488
|
+
onChange: p[0] || (p[0] = async ($) => y($)),
|
|
489
|
+
onBlur: p[1] || (p[1] = async ($) => L($)),
|
|
490
|
+
onFocus: p[2] || (p[2] = async ($) => k($)),
|
|
491
|
+
"aria-describedby": h.value
|
|
492
|
+
}, null, 40, Ge),
|
|
493
|
+
v.label ? (m(), g(T, { key: 0 }, [
|
|
494
|
+
E(w(v.label), 1)
|
|
495
|
+
], 64)) : I(v.$slots, "default", { key: 1 })
|
|
496
|
+
], 8, Pe),
|
|
497
|
+
r(q)(v.message, v.showMessage) ? (m(), X(O, {
|
|
498
|
+
key: 0,
|
|
499
|
+
size: "small",
|
|
500
|
+
icon: v.messageIcon,
|
|
501
|
+
id: l.value
|
|
502
|
+
}, {
|
|
503
|
+
default: z(() => [
|
|
504
|
+
E(w(v.message), 1)
|
|
505
|
+
]),
|
|
506
|
+
_: 1
|
|
507
|
+
}, 8, ["icon", "id"])) : D("", !0),
|
|
508
|
+
W(O, {
|
|
509
|
+
size: "small",
|
|
510
|
+
semantic: "successful",
|
|
511
|
+
id: c.value
|
|
512
|
+
}, {
|
|
513
|
+
default: z(() => [
|
|
514
|
+
E(w(v.validMessage ?? r(Z)), 1)
|
|
515
|
+
]),
|
|
516
|
+
_: 1
|
|
517
|
+
}, 8, ["id"]),
|
|
518
|
+
W(O, {
|
|
519
|
+
size: "small",
|
|
520
|
+
semantic: "critical",
|
|
521
|
+
id: i.value
|
|
522
|
+
}, {
|
|
523
|
+
default: z(() => {
|
|
524
|
+
var $;
|
|
525
|
+
return [
|
|
526
|
+
E(w(v.invalidMessage ?? (($ = B.value) == null ? void 0 : $.validationMessage) ?? r(x)), 1)
|
|
527
|
+
];
|
|
528
|
+
}),
|
|
529
|
+
_: 1
|
|
530
|
+
}, 8, ["id"]),
|
|
531
|
+
_("span", Ve, w(s.value), 1)
|
|
532
|
+
], 10, Ue));
|
|
533
|
+
}
|
|
534
|
+
}), qe = ["id", "data-margin", "data-variant", "data-emphasis", "data-width"], An = /* @__PURE__ */ A({
|
|
535
|
+
__name: "divider",
|
|
536
|
+
props: {
|
|
537
|
+
margin: { default: void 0 },
|
|
538
|
+
variant: { default: void 0 },
|
|
539
|
+
children: {},
|
|
540
|
+
className: { default: void 0 },
|
|
541
|
+
class: {},
|
|
542
|
+
describedbyid: {},
|
|
543
|
+
id: { default: void 0 },
|
|
544
|
+
autofocus: { type: Boolean },
|
|
545
|
+
emphasis: { default: void 0 },
|
|
546
|
+
width: { default: void 0 }
|
|
547
|
+
},
|
|
548
|
+
setup(t) {
|
|
549
|
+
const n = t, d = o(null);
|
|
550
|
+
return (e, a) => (m(), g("div", {
|
|
551
|
+
ref_key: "_ref",
|
|
552
|
+
ref: d,
|
|
553
|
+
id: e.id,
|
|
554
|
+
"data-margin": e.margin,
|
|
555
|
+
"data-variant": e.variant,
|
|
556
|
+
"data-emphasis": e.emphasis,
|
|
557
|
+
"data-width": e.width,
|
|
558
|
+
class: N(r(F)("db-divider", n.class))
|
|
559
|
+
}, null, 10, qe));
|
|
560
|
+
}
|
|
561
|
+
}), We = ["id", "data-backdrop", "data-variant"], Oe = ["data-spacing", "data-width", "data-direction", "data-rounded"], Xe = { class: "db-drawer-header" }, He = { class: "db-drawer-header-text" }, je = { class: "db-drawer-content" }, Ye = /* @__PURE__ */ A({
|
|
562
|
+
__name: "drawer",
|
|
563
|
+
props: {
|
|
564
|
+
backdrop: { default: void 0 },
|
|
565
|
+
direction: { default: void 0 },
|
|
566
|
+
drawerHeader: {},
|
|
567
|
+
open: { type: Boolean, default: void 0 },
|
|
568
|
+
rounded: { type: Boolean, default: void 0 },
|
|
569
|
+
variant: { default: void 0 },
|
|
570
|
+
children: { default: void 0 },
|
|
571
|
+
className: { default: void 0 },
|
|
572
|
+
class: {},
|
|
573
|
+
describedbyid: {},
|
|
574
|
+
id: { default: void 0 },
|
|
575
|
+
autofocus: { type: Boolean },
|
|
576
|
+
onClose: { type: Function, default: void 0 },
|
|
577
|
+
closeButtonId: { default: void 0 },
|
|
578
|
+
closeButtonText: { default: void 0 },
|
|
579
|
+
width: { default: void 0 },
|
|
580
|
+
spacing: { default: void 0 }
|
|
581
|
+
},
|
|
582
|
+
setup(t) {
|
|
583
|
+
const n = t, d = o(null), e = o(null);
|
|
584
|
+
U(() => {
|
|
585
|
+
u();
|
|
586
|
+
}), R(
|
|
587
|
+
() => [n.open],
|
|
588
|
+
() => {
|
|
589
|
+
u();
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
immediate: !0,
|
|
593
|
+
flush: "post"
|
|
594
|
+
}
|
|
595
|
+
);
|
|
596
|
+
function a(l) {
|
|
597
|
+
l.key === "Escape" && l.preventDefault(), (l === "close" || l.key === "Escape" || l.target.nodeName === "DIALOG" && l.type === "click" && n.backdrop !== "none") && n.onClose && n.onClose(l);
|
|
598
|
+
}
|
|
599
|
+
function u() {
|
|
600
|
+
d.value && (n.open && !d.value.open && (e.value && (e.value.hidden = !1), n.backdrop === "none" || n.variant === "inside" ? d.value.show() : d.value.showModal()), !n.open && d.value.open && (e.value && (e.value.hidden = !0), H(() => {
|
|
601
|
+
var l;
|
|
602
|
+
e.value && (e.value.hidden = !1), (l = d.value) == null || l.close();
|
|
603
|
+
}, 401)));
|
|
604
|
+
}
|
|
605
|
+
return (l, c) => (m(), g("dialog", {
|
|
606
|
+
class: "db-drawer",
|
|
607
|
+
id: l.id,
|
|
608
|
+
ref_key: "_ref",
|
|
609
|
+
ref: d,
|
|
610
|
+
onClick: c[0] || (c[0] = async (i) => {
|
|
611
|
+
a(i);
|
|
612
|
+
}),
|
|
613
|
+
onKeydown: c[1] || (c[1] = async (i) => a(i)),
|
|
614
|
+
"data-backdrop": l.backdrop,
|
|
615
|
+
"data-variant": l.variant
|
|
616
|
+
}, [
|
|
617
|
+
_("article", {
|
|
618
|
+
ref_key: "dialogContainerRef",
|
|
619
|
+
ref: e,
|
|
620
|
+
class: N(r(F)("db-drawer-container", n.class)),
|
|
621
|
+
"data-spacing": l.spacing,
|
|
622
|
+
"data-width": l.width,
|
|
623
|
+
"data-direction": l.direction,
|
|
624
|
+
"data-rounded": l.rounded
|
|
625
|
+
}, [
|
|
626
|
+
_("header", Xe, [
|
|
627
|
+
_("div", He, [
|
|
628
|
+
I(l.$slots, "drawer-header")
|
|
629
|
+
]),
|
|
630
|
+
W(te, {
|
|
631
|
+
class: "button-close-drawer",
|
|
632
|
+
icon: "cross",
|
|
633
|
+
variant: "ghost",
|
|
634
|
+
id: l.closeButtonId,
|
|
635
|
+
noText: !0,
|
|
636
|
+
onClick: (i) => a("close")
|
|
637
|
+
}, {
|
|
638
|
+
default: z(() => [
|
|
639
|
+
E(w(l.closeButtonText ?? r(ce)), 1)
|
|
640
|
+
]),
|
|
641
|
+
_: 1
|
|
642
|
+
}, 8, ["id", "onClick"])
|
|
643
|
+
]),
|
|
644
|
+
_("div", je, [
|
|
645
|
+
I(l.$slots, "default")
|
|
646
|
+
])
|
|
647
|
+
], 10, Oe)
|
|
648
|
+
], 40, We));
|
|
649
|
+
}
|
|
650
|
+
}), Ke = (t) => {
|
|
651
|
+
var d, e;
|
|
652
|
+
const {
|
|
653
|
+
target: n
|
|
654
|
+
} = t;
|
|
655
|
+
return !!(!((d = n == null ? void 0 : n.classList) != null && d.contains("db-navigation-item-expand-button")) && ((e = n == null ? void 0 : n.parentElement) != null && e.classList.contains("db-navigation-item")));
|
|
656
|
+
};
|
|
657
|
+
class Je {
|
|
658
|
+
constructor(n, d) {
|
|
659
|
+
j(this, "element");
|
|
660
|
+
j(this, "subNavigation");
|
|
661
|
+
j(this, "parentSubNavigation", null);
|
|
662
|
+
j(this, "triangleData");
|
|
663
|
+
j(this, "initialized", !1);
|
|
664
|
+
j(this, "mouseX", 0);
|
|
665
|
+
j(this, "mouseY", 0);
|
|
666
|
+
var e;
|
|
667
|
+
this.element = n, this.subNavigation = d, !(!this.element || !this.subNavigation) && (this.parentSubNavigation = (e = this.element) == null ? void 0 : e.closest(".db-sub-navigation"), this.parentSubNavigation && !this.element.closest(".db-drawer") && this.init());
|
|
668
|
+
}
|
|
669
|
+
init() {
|
|
670
|
+
var d, e;
|
|
671
|
+
const n = ((d = this.parentSubNavigation) == null ? void 0 : d.getBoundingClientRect().width) ?? 0;
|
|
672
|
+
(e = this.element) == null || e.style.setProperty("--db-navigation-item-inline-size", `${n}px`), this.initialized = !0;
|
|
673
|
+
}
|
|
674
|
+
enableFollow() {
|
|
675
|
+
var a;
|
|
676
|
+
if (!this.initialized || this.triangleData || !this.element || !this.subNavigation)
|
|
677
|
+
return;
|
|
678
|
+
const n = se(this.subNavigation), d = this.element.getBoundingClientRect(), e = ((a = this.parentSubNavigation) == null ? void 0 : a.getBoundingClientRect().width) ?? 0;
|
|
679
|
+
this.triangleData = {
|
|
680
|
+
itemRect: d,
|
|
681
|
+
parentElementWidth: e,
|
|
682
|
+
subNavigationHeight: this.subNavigation.getBoundingClientRect().height,
|
|
683
|
+
padding: (e - d.width) / 2,
|
|
684
|
+
outsideVX: n.vx,
|
|
685
|
+
outsideVY: n.vy
|
|
686
|
+
};
|
|
687
|
+
}
|
|
688
|
+
disableFollow() {
|
|
689
|
+
this.triangleData = void 0;
|
|
690
|
+
}
|
|
691
|
+
getTriangleTipX() {
|
|
692
|
+
return this.triangleData ? this.triangleData.outsideVX === "right" ? this.triangleData.itemRect.width - this.mouseX : Math.min(this.mouseX, this.triangleData.itemRect.width * 0.75) : 0;
|
|
693
|
+
}
|
|
694
|
+
getTriangleTipY() {
|
|
695
|
+
if (!this.triangleData) return 0;
|
|
696
|
+
const n = Math.max(Math.min(this.mouseY, this.triangleData.itemRect.height), 0) + this.triangleData.padding;
|
|
697
|
+
return this.triangleData.outsideVY === "bottom" ? n + (this.triangleData.subNavigationHeight - this.triangleData.padding * 2 - this.triangleData.itemRect.height) : n;
|
|
698
|
+
}
|
|
699
|
+
hasMouseEnteredSubNavigation() {
|
|
700
|
+
if (!this.triangleData)
|
|
701
|
+
return !1;
|
|
702
|
+
const n = this.triangleData.outsideVX === "right";
|
|
703
|
+
return !!(n && this.mouseX < -1 * this.triangleData.padding || !n && this.mouseX > this.triangleData.parentElementWidth - this.triangleData.padding);
|
|
704
|
+
}
|
|
705
|
+
getTriangleCoordinates(n) {
|
|
706
|
+
if (!this.triangleData)
|
|
707
|
+
return;
|
|
708
|
+
if (n === "fill-gap") {
|
|
709
|
+
const l = `${this.triangleData.itemRect.height + 2 * this.triangleData.padding}px`, c = `${this.triangleData.parentElementWidth - this.triangleData.padding}px`;
|
|
710
|
+
return {
|
|
711
|
+
lb: `${c} ${l}`,
|
|
712
|
+
lt: `${c} 0`,
|
|
713
|
+
rt: "100% 0",
|
|
714
|
+
rb: `100% ${l}`
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
const d = this.getTriangleTipX(), e = this.getTriangleTipY(), a = `${d}px ${e}px`, u = `${d}px ${e}px`;
|
|
718
|
+
return {
|
|
719
|
+
lb: a,
|
|
720
|
+
lt: u,
|
|
721
|
+
rt: "100% 0",
|
|
722
|
+
rb: "100% 100%"
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
followByMouseEvent(n) {
|
|
726
|
+
if (!this.initialized || !this.triangleData || !this.element || !this.subNavigation)
|
|
727
|
+
return;
|
|
728
|
+
this.mouseX = n.clientX - this.triangleData.itemRect.left, this.mouseY = n.clientY - this.triangleData.itemRect.top;
|
|
729
|
+
const d = this.hasMouseEnteredSubNavigation(), e = this.getTriangleCoordinates(d ? "fill-gap" : "safe-triangle");
|
|
730
|
+
e && (this.element.style.setProperty("--db-navigation-item-clip-path", `polygon(${e.lb}, ${e.lt}, ${e.rt}, ${e.rb})`), d && (this.triangleData = void 0));
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
const Qe = ["id", "data-width", "data-on-forcing-mobile"], Ze = { class: "db-header-drawer-navigation" }, xe = { class: "db-header-meta-navigation" }, ea = { class: "db-header-secondary-action" }, aa = { class: "db-header-meta-navigation" }, na = { class: "db-header-navigation-bar" }, ta = { class: "db-header-brand-container" }, da = { class: "db-header-navigation-container" }, ia = { class: "db-header-navigation" }, la = { class: "db-header-primary-action" }, sa = { class: "db-header-action-container" }, oa = { class: "db-header-burger-menu-container" }, ua = { class: "db-header-secondary-action" }, Nn = /* @__PURE__ */ A({
|
|
734
|
+
__name: "header",
|
|
735
|
+
props: {
|
|
736
|
+
brand: {},
|
|
737
|
+
metaNavigation: {},
|
|
738
|
+
primaryAction: {},
|
|
739
|
+
secondaryAction: {},
|
|
740
|
+
drawerOpen: { type: Boolean, default: void 0 },
|
|
741
|
+
forceMobile: { type: Boolean, default: void 0 },
|
|
742
|
+
burgerMenuLabel: { default: void 0 },
|
|
743
|
+
children: { default: void 0 },
|
|
744
|
+
className: { default: void 0 },
|
|
745
|
+
class: {},
|
|
746
|
+
describedbyid: {},
|
|
747
|
+
id: { default: void 0 },
|
|
748
|
+
autofocus: { type: Boolean },
|
|
749
|
+
onToggle: { type: Function, default: void 0 },
|
|
750
|
+
width: { default: void 0 }
|
|
751
|
+
},
|
|
752
|
+
setup(t) {
|
|
753
|
+
const n = t, d = o(ee), e = o(!1), a = o(!1), u = o(null);
|
|
754
|
+
U(() => {
|
|
755
|
+
e.value = !0, d.value = n.id || "header-" + V();
|
|
756
|
+
}), R(
|
|
757
|
+
() => [e.value],
|
|
758
|
+
() => {
|
|
759
|
+
if (e.value && document && d.value && n.forceMobile) {
|
|
760
|
+
const i = document.getElementById(d.value);
|
|
761
|
+
i && re(i, {
|
|
762
|
+
key: "data-force-mobile",
|
|
763
|
+
value: "true"
|
|
764
|
+
}), a.value = !0;
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
immediate: !0,
|
|
769
|
+
flush: "post"
|
|
770
|
+
}
|
|
771
|
+
);
|
|
772
|
+
function l() {
|
|
773
|
+
n.onToggle && n.onToggle(!n.drawerOpen);
|
|
774
|
+
}
|
|
775
|
+
function c(i) {
|
|
776
|
+
Ke(i) && l();
|
|
777
|
+
}
|
|
778
|
+
return (i, h) => (m(), g("header", {
|
|
779
|
+
ref_key: "_ref",
|
|
780
|
+
ref: u,
|
|
781
|
+
class: N(r(F)("db-header", n.class)),
|
|
782
|
+
id: d.value,
|
|
783
|
+
"data-width": i.width,
|
|
784
|
+
"data-on-forcing-mobile": i.forceMobile && !a.value
|
|
785
|
+
}, [
|
|
786
|
+
W(Ye, {
|
|
787
|
+
class: "db-header-drawer",
|
|
788
|
+
spacing: "small",
|
|
789
|
+
rounded: !0,
|
|
790
|
+
open: i.drawerOpen,
|
|
791
|
+
onClose: () => l()
|
|
792
|
+
}, {
|
|
793
|
+
default: z(() => [
|
|
794
|
+
_("div", Ze, [
|
|
795
|
+
_("div", {
|
|
796
|
+
class: "db-header-navigation",
|
|
797
|
+
onClick: h[0] || (h[0] = async (s) => c(s))
|
|
798
|
+
}, [
|
|
799
|
+
I(i.$slots, "default")
|
|
800
|
+
]),
|
|
801
|
+
_("div", xe, [
|
|
802
|
+
I(i.$slots, "meta-navigation")
|
|
803
|
+
])
|
|
804
|
+
]),
|
|
805
|
+
_("div", ea, [
|
|
806
|
+
I(i.$slots, "secondary-action")
|
|
807
|
+
])
|
|
808
|
+
]),
|
|
809
|
+
_: 3
|
|
810
|
+
}, 8, ["open", "onClose"]),
|
|
811
|
+
_("div", aa, [
|
|
812
|
+
I(i.$slots, "meta-navigation")
|
|
813
|
+
]),
|
|
814
|
+
_("div", na, [
|
|
815
|
+
_("div", ta, [
|
|
816
|
+
I(i.$slots, "brand")
|
|
817
|
+
]),
|
|
818
|
+
_("div", da, [
|
|
819
|
+
_("div", ia, [
|
|
820
|
+
I(i.$slots, "default")
|
|
821
|
+
]),
|
|
822
|
+
_("div", la, [
|
|
823
|
+
I(i.$slots, "primary-action")
|
|
824
|
+
])
|
|
825
|
+
]),
|
|
826
|
+
_("div", sa, [
|
|
827
|
+
_("div", oa, [
|
|
828
|
+
W(te, {
|
|
829
|
+
icon: "menu",
|
|
830
|
+
variant: "ghost",
|
|
831
|
+
id: d.value + "-burger-menu",
|
|
832
|
+
noText: !0,
|
|
833
|
+
onClick: () => l()
|
|
834
|
+
}, {
|
|
835
|
+
default: z(() => [
|
|
836
|
+
E(w(i.burgerMenuLabel ?? r(Le)), 1)
|
|
837
|
+
]),
|
|
838
|
+
_: 1
|
|
839
|
+
}, 8, ["id", "onClick"])
|
|
840
|
+
]),
|
|
841
|
+
_("div", ua, [
|
|
842
|
+
I(i.$slots, "secondary-action")
|
|
843
|
+
])
|
|
844
|
+
])
|
|
845
|
+
])
|
|
846
|
+
], 10, Qe));
|
|
847
|
+
}
|
|
848
|
+
}), ra = ["id", "data-icon", "data-icon-weight", "data-icon-variant"], Fn = /* @__PURE__ */ A({
|
|
849
|
+
__name: "icon",
|
|
850
|
+
props: {
|
|
851
|
+
variant: { default: void 0 },
|
|
852
|
+
weight: { default: void 0 },
|
|
853
|
+
children: { default: void 0 },
|
|
854
|
+
className: { default: void 0 },
|
|
855
|
+
class: {},
|
|
856
|
+
describedbyid: {},
|
|
857
|
+
id: { default: void 0 },
|
|
858
|
+
autofocus: { type: Boolean },
|
|
859
|
+
icon: { default: void 0 },
|
|
860
|
+
text: { default: void 0 }
|
|
861
|
+
},
|
|
862
|
+
setup(t) {
|
|
863
|
+
const n = t, d = o(null);
|
|
864
|
+
return (e, a) => (m(), g("span", {
|
|
865
|
+
"aria-hidden": "true",
|
|
866
|
+
ref_key: "_ref",
|
|
867
|
+
ref: d,
|
|
868
|
+
id: e.id,
|
|
869
|
+
class: N(r(F)("db-icon", n.class)),
|
|
870
|
+
"data-icon": e.icon,
|
|
871
|
+
"data-icon-weight": e.weight,
|
|
872
|
+
"data-icon-variant": e.variant
|
|
873
|
+
}, [
|
|
874
|
+
e.text ? (m(), g(T, { key: 0 }, [
|
|
875
|
+
E(w(e.text), 1)
|
|
876
|
+
], 64)) : I(e.$slots, "default", { key: 1 })
|
|
877
|
+
], 10, ra));
|
|
878
|
+
}
|
|
879
|
+
}), fa = ["data-variant", "data-hide-label", "data-hide-icon", "data-icon", "data-icon-after", "data-hide-icon-after"], ca = ["for"], va = ["aria-invalid", "data-custom-validity", "id", "name", "type", "placeholder", "disabled", "required", "step", "value", "maxLength", "minLength", "max", "min", "readOnly", "form", "pattern", "autoComplete", "autoFocus", "list", "aria-describedby"], pa = ["id"], ha = ["value"], ma = {
|
|
880
|
+
"data-visually-hidden": "true",
|
|
881
|
+
role: "status"
|
|
882
|
+
}, Tn = /* @__PURE__ */ A({
|
|
883
|
+
__name: "input",
|
|
884
|
+
props: {
|
|
885
|
+
dataList: { default: void 0 },
|
|
886
|
+
dataListId: { default: void 0 },
|
|
887
|
+
max: { default: void 0 },
|
|
888
|
+
min: { default: void 0 },
|
|
889
|
+
pattern: { default: void 0 },
|
|
890
|
+
type: { default: void 0 },
|
|
891
|
+
step: { default: void 0 },
|
|
892
|
+
children: { default: void 0 },
|
|
893
|
+
className: { default: void 0 },
|
|
894
|
+
class: {},
|
|
895
|
+
describedbyid: {},
|
|
896
|
+
id: { default: void 0 },
|
|
897
|
+
autofocus: { type: Boolean, default: void 0 },
|
|
898
|
+
maxLength: { default: void 0 },
|
|
899
|
+
minLength: { default: void 0 },
|
|
900
|
+
readOnly: { type: Boolean, default: void 0 },
|
|
901
|
+
input: { type: Function, default: void 0 },
|
|
902
|
+
onInput: { type: Function, default: void 0 },
|
|
903
|
+
change: { type: Function, default: void 0 },
|
|
904
|
+
onChange: { type: Function, default: void 0 },
|
|
905
|
+
blur: { type: Function, default: void 0 },
|
|
906
|
+
onBlur: { type: Function, default: void 0 },
|
|
907
|
+
focus: { type: Function, default: void 0 },
|
|
908
|
+
onFocus: { type: Function, default: void 0 },
|
|
909
|
+
validation: { default: void 0 },
|
|
910
|
+
disabled: { type: Boolean, default: void 0 },
|
|
911
|
+
form: { default: void 0 },
|
|
912
|
+
label: { default: void 0 },
|
|
913
|
+
name: { default: void 0 },
|
|
914
|
+
required: { type: Boolean, default: void 0 },
|
|
915
|
+
showLabel: { type: Boolean, default: void 0 },
|
|
916
|
+
value: { default: void 0 },
|
|
917
|
+
icon: { default: void 0 },
|
|
918
|
+
iconAfter: { default: void 0 },
|
|
919
|
+
variant: { default: void 0 },
|
|
920
|
+
placeholder: { default: void 0 },
|
|
921
|
+
message: { default: void 0 },
|
|
922
|
+
validMessage: { default: void 0 },
|
|
923
|
+
invalidMessage: { default: void 0 },
|
|
924
|
+
messageIcon: { default: void 0 },
|
|
925
|
+
autocomplete: { default: void 0 },
|
|
926
|
+
showMessage: { type: Boolean, default: void 0 },
|
|
927
|
+
showIcon: { type: Boolean, default: void 0 }
|
|
928
|
+
},
|
|
929
|
+
emits: ["update:value"],
|
|
930
|
+
setup(t, { emit: n }) {
|
|
931
|
+
const d = n, e = t, a = o(void 0), u = o(void 0), l = o(void 0), c = o(void 0), i = o(void 0), h = o(""), s = o(""), B = o(""), y = o(null);
|
|
932
|
+
U(() => {
|
|
933
|
+
const f = e.id ?? `input-${V()}`;
|
|
934
|
+
a.value = f, u.value = f + K, l.value = f + J, c.value = f + Q, i.value = f + ue;
|
|
935
|
+
}), R(
|
|
936
|
+
() => [a.value],
|
|
937
|
+
() => {
|
|
938
|
+
if (a.value) {
|
|
939
|
+
const f = a.value + K;
|
|
940
|
+
u.value = f, l.value = a.value + J, c.value = a.value + Q, i.value = e.dataListId ?? a.value + ue, q(e.message, e.showMessage) && (h.value = f);
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
immediate: !0,
|
|
945
|
+
flush: "post"
|
|
946
|
+
}
|
|
947
|
+
), R(
|
|
948
|
+
() => [e.value],
|
|
949
|
+
() => {
|
|
950
|
+
s.value = e.value;
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
immediate: !0,
|
|
954
|
+
flush: "post"
|
|
955
|
+
}
|
|
956
|
+
);
|
|
957
|
+
function L(f) {
|
|
958
|
+
s.value = f.target.value, e.onInput && e.onInput(f), e.input && e.input(f);
|
|
959
|
+
}
|
|
960
|
+
function k(f) {
|
|
961
|
+
var M, b, S;
|
|
962
|
+
e.onChange && e.onChange(f), e.change && e.change(f), ae(d, f), !((M = y.value) != null && M.validity.valid) || e.validation === "invalid" ? (h.value = c.value, Y() && (B.value = e.invalidMessage ?? ((b = y.value) == null ? void 0 : b.validationMessage) ?? x, H(() => B.value = "", 1e3))) : e.validation === "valid" || (S = y.value) != null && S.validity.valid && (e.required || e.minLength || e.maxLength || e.pattern) ? (h.value = l.value, Y() && (B.value = e.validMessage ?? Z, H(() => B.value = "", 1e3))) : q(e.message, e.showMessage) ? h.value = u.value : h.value = "";
|
|
963
|
+
}
|
|
964
|
+
function v(f) {
|
|
965
|
+
e.onBlur && e.onBlur(f), e.blur && e.blur(f);
|
|
966
|
+
}
|
|
967
|
+
function p(f) {
|
|
968
|
+
e.onFocus && e.onFocus(f), e.focus && e.focus(f);
|
|
969
|
+
}
|
|
970
|
+
function $(f) {
|
|
971
|
+
return Array.from(
|
|
972
|
+
(we(f) ? f.map((M) => ({
|
|
973
|
+
value: M,
|
|
974
|
+
label: void 0
|
|
975
|
+
})) : f) || []
|
|
976
|
+
);
|
|
977
|
+
}
|
|
978
|
+
return (f, M) => (m(), g("div", {
|
|
979
|
+
class: N(r(F)("db-input", e.class)),
|
|
980
|
+
"data-variant": f.variant,
|
|
981
|
+
"data-hide-label": r(P)(f.showLabel),
|
|
982
|
+
"data-hide-icon": r(P)(f.showIcon),
|
|
983
|
+
"data-icon": f.icon,
|
|
984
|
+
"data-icon-after": f.iconAfter,
|
|
985
|
+
"data-hide-icon-after": r(P)(f.showIcon)
|
|
986
|
+
}, [
|
|
987
|
+
_("label", { for: a.value }, w(f.label ?? r(le)), 9, ca),
|
|
988
|
+
_("input", {
|
|
989
|
+
"aria-invalid": f.validation === "invalid",
|
|
990
|
+
"data-custom-validity": f.validation,
|
|
991
|
+
ref_key: "_ref",
|
|
992
|
+
ref: y,
|
|
993
|
+
id: a.value,
|
|
994
|
+
name: f.name,
|
|
995
|
+
type: f.type || "text",
|
|
996
|
+
placeholder: f.placeholder ?? r(fe),
|
|
997
|
+
disabled: f.disabled,
|
|
998
|
+
required: f.required,
|
|
999
|
+
step: f.step,
|
|
1000
|
+
value: f.value ?? s.value,
|
|
1001
|
+
maxLength: f.maxLength,
|
|
1002
|
+
minLength: f.minLength,
|
|
1003
|
+
max: f.max,
|
|
1004
|
+
min: f.min,
|
|
1005
|
+
readOnly: f.readOnly,
|
|
1006
|
+
form: f.form,
|
|
1007
|
+
pattern: f.pattern,
|
|
1008
|
+
autoComplete: f.autocomplete,
|
|
1009
|
+
autoFocus: f.autofocus,
|
|
1010
|
+
onInput: M[0] || (M[0] = async (b) => L(b)),
|
|
1011
|
+
onChange: M[1] || (M[1] = async (b) => k(b)),
|
|
1012
|
+
onBlur: M[2] || (M[2] = async (b) => v(b)),
|
|
1013
|
+
onFocus: M[3] || (M[3] = async (b) => p(b)),
|
|
1014
|
+
list: f.dataList && i.value,
|
|
1015
|
+
"aria-describedby": h.value
|
|
1016
|
+
}, null, 40, va),
|
|
1017
|
+
f.dataList ? (m(), g("datalist", {
|
|
1018
|
+
key: 0,
|
|
1019
|
+
id: i.value
|
|
1020
|
+
}, [
|
|
1021
|
+
(m(!0), g(T, null, ne($(f.dataList), (b) => (m(), g("option", {
|
|
1022
|
+
key: i.value + "-option-" + b.value,
|
|
1023
|
+
value: b.value
|
|
1024
|
+
}, w(b.label), 9, ha))), 128))
|
|
1025
|
+
], 8, pa)) : D("", !0),
|
|
1026
|
+
I(f.$slots, "default"),
|
|
1027
|
+
r(q)(f.message, f.showMessage) ? (m(), X(O, {
|
|
1028
|
+
key: 1,
|
|
1029
|
+
size: "small",
|
|
1030
|
+
icon: f.messageIcon,
|
|
1031
|
+
id: u.value
|
|
1032
|
+
}, {
|
|
1033
|
+
default: z(() => [
|
|
1034
|
+
E(w(f.message), 1)
|
|
1035
|
+
]),
|
|
1036
|
+
_: 1
|
|
1037
|
+
}, 8, ["icon", "id"])) : D("", !0),
|
|
1038
|
+
W(O, {
|
|
1039
|
+
size: "small",
|
|
1040
|
+
semantic: "successful",
|
|
1041
|
+
id: l.value
|
|
1042
|
+
}, {
|
|
1043
|
+
default: z(() => [
|
|
1044
|
+
E(w(f.validMessage ?? r(Z)), 1)
|
|
1045
|
+
]),
|
|
1046
|
+
_: 1
|
|
1047
|
+
}, 8, ["id"]),
|
|
1048
|
+
W(O, {
|
|
1049
|
+
size: "small",
|
|
1050
|
+
semantic: "critical",
|
|
1051
|
+
id: c.value
|
|
1052
|
+
}, {
|
|
1053
|
+
default: z(() => {
|
|
1054
|
+
var b;
|
|
1055
|
+
return [
|
|
1056
|
+
E(w(f.invalidMessage ?? ((b = y.value) == null ? void 0 : b.validationMessage) ?? r(x)), 1)
|
|
1057
|
+
];
|
|
1058
|
+
}),
|
|
1059
|
+
_: 1
|
|
1060
|
+
}, 8, ["id"]),
|
|
1061
|
+
_("span", ma, w(B.value), 1)
|
|
1062
|
+
], 10, fa));
|
|
1063
|
+
}
|
|
1064
|
+
}), ba = ["id", "href", "target", "rel", "role", "hrefLang", "aria-disabled", "tabIndex", "aria-selected", "aria-label", "aria-current", "data-size", "data-hide-icon-after", "data-variant", "data-content"], Sn = /* @__PURE__ */ A({
|
|
1065
|
+
__name: "link",
|
|
1066
|
+
props: {
|
|
1067
|
+
content: { default: void 0 },
|
|
1068
|
+
size: { default: void 0 },
|
|
1069
|
+
variant: { default: void 0 },
|
|
1070
|
+
children: { default: void 0 },
|
|
1071
|
+
className: { default: void 0 },
|
|
1072
|
+
class: {},
|
|
1073
|
+
describedbyid: {},
|
|
1074
|
+
id: { default: void 0 },
|
|
1075
|
+
autofocus: { type: Boolean },
|
|
1076
|
+
onClick: { type: Function, default: void 0 },
|
|
1077
|
+
current: { type: Boolean, default: void 0 },
|
|
1078
|
+
disabled: { type: Boolean, default: void 0 },
|
|
1079
|
+
href: { default: void 0 },
|
|
1080
|
+
hreflang: { default: void 0 },
|
|
1081
|
+
label: { default: void 0 },
|
|
1082
|
+
target: { default: void 0 },
|
|
1083
|
+
rel: { default: void 0 },
|
|
1084
|
+
role: { default: void 0 },
|
|
1085
|
+
referrerpolicy: {},
|
|
1086
|
+
selected: { type: Boolean, default: void 0 },
|
|
1087
|
+
showIcon: { type: Boolean, default: void 0 },
|
|
1088
|
+
text: { default: void 0 }
|
|
1089
|
+
},
|
|
1090
|
+
setup(t) {
|
|
1091
|
+
const n = t, d = o(null);
|
|
1092
|
+
function e(a) {
|
|
1093
|
+
n.onClick && n.onClick(a);
|
|
1094
|
+
}
|
|
1095
|
+
return (a, u) => (m(), g("a", {
|
|
1096
|
+
ref_key: "_ref",
|
|
1097
|
+
ref: d,
|
|
1098
|
+
id: a.id,
|
|
1099
|
+
class: N(r(F)("db-link", n.class)),
|
|
1100
|
+
href: a.href,
|
|
1101
|
+
target: a.target,
|
|
1102
|
+
rel: a.rel,
|
|
1103
|
+
role: a.role,
|
|
1104
|
+
hrefLang: a.hreflang,
|
|
1105
|
+
"aria-disabled": r(G)(a.disabled),
|
|
1106
|
+
tabIndex: a.disabled ? -1 : 0,
|
|
1107
|
+
"aria-selected": a.selected,
|
|
1108
|
+
"aria-label": a.label,
|
|
1109
|
+
"aria-current": a.current,
|
|
1110
|
+
"data-size": a.size,
|
|
1111
|
+
"data-hide-icon-after": r(P)(a.showIcon ?? !0),
|
|
1112
|
+
"data-variant": a.variant,
|
|
1113
|
+
"data-content": a.content || "internal",
|
|
1114
|
+
onClick: u[0] || (u[0] = async (l) => e(l))
|
|
1115
|
+
}, [
|
|
1116
|
+
a.text ? (m(), g(T, { key: 0 }, [
|
|
1117
|
+
E(w(a.text), 1)
|
|
1118
|
+
], 64)) : I(a.$slots, "default", { key: 1 })
|
|
1119
|
+
], 10, ba));
|
|
1120
|
+
}
|
|
1121
|
+
}), ga = ["id", "data-variant", "data-fade-in", "data-fonts-loaded"], ya = { class: "db-main" }, Cn = /* @__PURE__ */ A({
|
|
1122
|
+
__name: "page",
|
|
1123
|
+
props: {
|
|
1124
|
+
documentOverflow: { default: void 0 },
|
|
1125
|
+
fadeIn: { type: Boolean, default: void 0 },
|
|
1126
|
+
footer: {},
|
|
1127
|
+
header: {},
|
|
1128
|
+
variant: { default: void 0 },
|
|
1129
|
+
children: { default: void 0 },
|
|
1130
|
+
className: { default: void 0 },
|
|
1131
|
+
class: {},
|
|
1132
|
+
describedbyid: {},
|
|
1133
|
+
id: { default: void 0 },
|
|
1134
|
+
autofocus: { type: Boolean }
|
|
1135
|
+
},
|
|
1136
|
+
setup(t) {
|
|
1137
|
+
const n = t, d = o(!1), e = o(null);
|
|
1138
|
+
return typeof window < "u" && document && (n.documentOverflow === "hidden" || n.variant === "fixed" && n.documentOverflow !== "auto") && document.documentElement.classList.add("db-page-document"), U(() => {
|
|
1139
|
+
d.value = !n.fadeIn, document && n.fadeIn ? document.fonts.ready.then(() => {
|
|
1140
|
+
d.value = !0;
|
|
1141
|
+
}) : d.value = !0;
|
|
1142
|
+
}), ye(() => {
|
|
1143
|
+
typeof window < "u" && document.documentElement.classList.contains("db-page-document") && document.documentElement.classList.remove("db-page-document");
|
|
1144
|
+
}), (a, u) => (m(), g("div", {
|
|
1145
|
+
ref_key: "_ref",
|
|
1146
|
+
ref: e,
|
|
1147
|
+
id: a.id,
|
|
1148
|
+
class: N(r(F)("db-page", n.class)),
|
|
1149
|
+
"data-variant": a.variant,
|
|
1150
|
+
"data-fade-in": a.fadeIn,
|
|
1151
|
+
"data-fonts-loaded": r(G)(d.value)
|
|
1152
|
+
}, [
|
|
1153
|
+
I(a.$slots, "header"),
|
|
1154
|
+
_("main", ya, [
|
|
1155
|
+
I(a.$slots, "default")
|
|
1156
|
+
]),
|
|
1157
|
+
I(a.$slots, "footer")
|
|
1158
|
+
], 10, ga));
|
|
1159
|
+
}
|
|
1160
|
+
}), Ba = ["data-size", "data-hide-label", "for"], ka = ["aria-invalid", "data-custom-validity", "id", "name", "checked", "disabled", "aria-describedby", "value", "required"], Dn = /* @__PURE__ */ A({
|
|
1161
|
+
__name: "radio",
|
|
1162
|
+
props: {
|
|
1163
|
+
describedbyid: { default: void 0 },
|
|
1164
|
+
children: { default: void 0 },
|
|
1165
|
+
className: { default: void 0 },
|
|
1166
|
+
class: {},
|
|
1167
|
+
id: { default: void 0 },
|
|
1168
|
+
autofocus: { type: Boolean },
|
|
1169
|
+
change: { type: Function, default: void 0 },
|
|
1170
|
+
onChange: { type: Function, default: void 0 },
|
|
1171
|
+
blur: { type: Function, default: void 0 },
|
|
1172
|
+
onBlur: { type: Function, default: void 0 },
|
|
1173
|
+
focus: { type: Function, default: void 0 },
|
|
1174
|
+
onFocus: { type: Function, default: void 0 },
|
|
1175
|
+
validation: { default: void 0 },
|
|
1176
|
+
disabled: { type: Boolean, default: void 0 },
|
|
1177
|
+
form: {},
|
|
1178
|
+
label: { default: void 0 },
|
|
1179
|
+
name: { default: void 0 },
|
|
1180
|
+
required: { type: Boolean, default: void 0 },
|
|
1181
|
+
showLabel: { type: Boolean, default: void 0 },
|
|
1182
|
+
value: { default: void 0 },
|
|
1183
|
+
checked: { type: Boolean, default: void 0 },
|
|
1184
|
+
size: { default: void 0 }
|
|
1185
|
+
},
|
|
1186
|
+
emits: ["update:checked"],
|
|
1187
|
+
setup(t, { emit: n }) {
|
|
1188
|
+
const d = n, e = t, a = o(!1), u = o(void 0), l = o(null);
|
|
1189
|
+
U(() => {
|
|
1190
|
+
a.value = !0, u.value = e.id ?? `radio-${V()}`;
|
|
1191
|
+
}), R(
|
|
1192
|
+
() => [a.value, e.checked],
|
|
1193
|
+
() => {
|
|
1194
|
+
if (e.checked && a.value && document && u.value) {
|
|
1195
|
+
const s = document == null ? void 0 : document.getElementById(
|
|
1196
|
+
u.value
|
|
1197
|
+
);
|
|
1198
|
+
s && e.checked != null && (s.checked = !0);
|
|
1199
|
+
}
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
immediate: !0,
|
|
1203
|
+
flush: "post"
|
|
1204
|
+
}
|
|
1205
|
+
);
|
|
1206
|
+
function c(s) {
|
|
1207
|
+
e.onChange && e.onChange(s), e.change && e.change(s), ae(d, s, "checked");
|
|
1208
|
+
}
|
|
1209
|
+
function i(s) {
|
|
1210
|
+
e.onBlur && e.onBlur(s), e.blur && e.blur(s);
|
|
1211
|
+
}
|
|
1212
|
+
function h(s) {
|
|
1213
|
+
e.onFocus && e.onFocus(s), e.focus && e.focus(s);
|
|
1214
|
+
}
|
|
1215
|
+
return (s, B) => (m(), g("label", {
|
|
1216
|
+
"data-size": s.size,
|
|
1217
|
+
"data-hide-label": r(P)(s.showLabel),
|
|
1218
|
+
class: N(r(F)("db-radio", e.class)),
|
|
1219
|
+
for: u.value
|
|
1220
|
+
}, [
|
|
1221
|
+
_("input", {
|
|
1222
|
+
type: "radio",
|
|
1223
|
+
"aria-invalid": s.validation === "invalid",
|
|
1224
|
+
"data-custom-validity": s.validation,
|
|
1225
|
+
ref_key: "_ref",
|
|
1226
|
+
ref: l,
|
|
1227
|
+
id: u.value,
|
|
1228
|
+
name: s.name,
|
|
1229
|
+
checked: s.checked,
|
|
1230
|
+
disabled: s.disabled,
|
|
1231
|
+
"aria-describedby": s.describedbyid,
|
|
1232
|
+
value: s.value,
|
|
1233
|
+
required: s.required,
|
|
1234
|
+
onChange: B[0] || (B[0] = async (y) => c(y)),
|
|
1235
|
+
onBlur: B[1] || (B[1] = async (y) => i(y)),
|
|
1236
|
+
onFocus: B[2] || (B[2] = async (y) => h(y))
|
|
1237
|
+
}, null, 40, ka),
|
|
1238
|
+
s.label ? (m(), g(T, { key: 0 }, [
|
|
1239
|
+
E(w(s.label), 1)
|
|
1240
|
+
], 64)) : I(s.$slots, "default", { key: 1 })
|
|
1241
|
+
], 10, Ba));
|
|
1242
|
+
}
|
|
1243
|
+
}), wa = ["id", "data-spacing", "data-width"], Mn = /* @__PURE__ */ A({
|
|
1244
|
+
__name: "section",
|
|
1245
|
+
props: {
|
|
1246
|
+
children: { default: void 0 },
|
|
1247
|
+
className: { default: void 0 },
|
|
1248
|
+
class: {},
|
|
1249
|
+
describedbyid: {},
|
|
1250
|
+
id: { default: void 0 },
|
|
1251
|
+
autofocus: { type: Boolean },
|
|
1252
|
+
spacing: { default: void 0 },
|
|
1253
|
+
width: { default: void 0 }
|
|
1254
|
+
},
|
|
1255
|
+
setup(t) {
|
|
1256
|
+
const n = t, d = o(ee), e = o(null);
|
|
1257
|
+
return U(() => {
|
|
1258
|
+
d.value = n.id || "section-" + V();
|
|
1259
|
+
}), (a, u) => (m(), g("section", {
|
|
1260
|
+
ref_key: "_ref",
|
|
1261
|
+
ref: e,
|
|
1262
|
+
id: d.value,
|
|
1263
|
+
class: N(r(F)("db-section", n.class)),
|
|
1264
|
+
"data-spacing": a.spacing || "medium",
|
|
1265
|
+
"data-width": a.width
|
|
1266
|
+
}, [
|
|
1267
|
+
I(a.$slots, "default")
|
|
1268
|
+
], 10, wa));
|
|
1269
|
+
}
|
|
1270
|
+
}), Ia = ["data-variant", "data-hide-label", "data-icon", "data-hide-icon"], _a = ["for"], $a = ["aria-invalid", "data-custom-validity", "required", "disabled", "id", "name", "value", "autocomplete", "aria-describedby"], La = ["label"], Ea = ["value", "selected", "disabled"], Aa = ["value", "disabled", "selected"], Na = ["id"], Fa = {
|
|
1271
|
+
"data-visually-hidden": "true",
|
|
1272
|
+
role: "status"
|
|
1273
|
+
}, Rn = /* @__PURE__ */ A({
|
|
1274
|
+
__name: "select",
|
|
1275
|
+
props: {
|
|
1276
|
+
description: {},
|
|
1277
|
+
options: { default: void 0 },
|
|
1278
|
+
children: { default: void 0 },
|
|
1279
|
+
className: { default: void 0 },
|
|
1280
|
+
class: {},
|
|
1281
|
+
describedbyid: {},
|
|
1282
|
+
id: { default: void 0 },
|
|
1283
|
+
autofocus: { type: Boolean },
|
|
1284
|
+
onClick: { type: Function, default: void 0 },
|
|
1285
|
+
change: { type: Function, default: void 0 },
|
|
1286
|
+
onChange: { type: Function, default: void 0 },
|
|
1287
|
+
blur: { type: Function, default: void 0 },
|
|
1288
|
+
onBlur: { type: Function, default: void 0 },
|
|
1289
|
+
focus: { type: Function, default: void 0 },
|
|
1290
|
+
onFocus: { type: Function, default: void 0 },
|
|
1291
|
+
input: { type: Function, default: void 0 },
|
|
1292
|
+
onInput: { type: Function, default: void 0 },
|
|
1293
|
+
validation: { default: void 0 },
|
|
1294
|
+
disabled: { type: Boolean, default: void 0 },
|
|
1295
|
+
form: {},
|
|
1296
|
+
label: { default: void 0 },
|
|
1297
|
+
name: { default: void 0 },
|
|
1298
|
+
required: { type: Boolean, default: void 0 },
|
|
1299
|
+
showLabel: { type: Boolean, default: void 0 },
|
|
1300
|
+
value: { default: void 0 },
|
|
1301
|
+
icon: { default: void 0 },
|
|
1302
|
+
variant: { default: void 0 },
|
|
1303
|
+
placeholder: { default: void 0 },
|
|
1304
|
+
message: { default: void 0 },
|
|
1305
|
+
validMessage: { default: void 0 },
|
|
1306
|
+
invalidMessage: { default: void 0 },
|
|
1307
|
+
messageIcon: { default: void 0 },
|
|
1308
|
+
autocomplete: { default: void 0 },
|
|
1309
|
+
showMessage: { type: Boolean, default: void 0 },
|
|
1310
|
+
showIcon: { type: Boolean, default: void 0 }
|
|
1311
|
+
},
|
|
1312
|
+
emits: ["update:value"],
|
|
1313
|
+
setup(t, { emit: n }) {
|
|
1314
|
+
const d = n, e = t, a = o(void 0), u = o(void 0), l = o(void 0), c = o(void 0), i = o(""), h = o(""), s = o(""), B = o(!1), y = o(""), L = o(null);
|
|
1315
|
+
U(() => {
|
|
1316
|
+
B.value = !0;
|
|
1317
|
+
const b = e.id ?? `select-${V()}`;
|
|
1318
|
+
a.value = b, u.value = b + K, l.value = b + J, c.value = b + Q, i.value = b + oe;
|
|
1319
|
+
}), R(
|
|
1320
|
+
() => [a.value, B.value],
|
|
1321
|
+
() => {
|
|
1322
|
+
if (a.value && B.value) {
|
|
1323
|
+
const b = a.value + K, S = a.value + oe;
|
|
1324
|
+
u.value = b, l.value = a.value + J, c.value = a.value + Q, i.value = S, q(e.message, e.showMessage) ? h.value = b : h.value = S, B.value = !1;
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
immediate: !0,
|
|
1329
|
+
flush: "post"
|
|
1330
|
+
}
|
|
1331
|
+
), R(
|
|
1332
|
+
() => [e.value],
|
|
1333
|
+
() => {
|
|
1334
|
+
s.value = e.value;
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
immediate: !0,
|
|
1338
|
+
flush: "post"
|
|
1339
|
+
}
|
|
1340
|
+
);
|
|
1341
|
+
function k(b) {
|
|
1342
|
+
e.onClick && e.onClick(b);
|
|
1343
|
+
}
|
|
1344
|
+
function v(b) {
|
|
1345
|
+
s.value = b.target.value, e.onInput && e.onInput(b), e.input && e.input(b);
|
|
1346
|
+
}
|
|
1347
|
+
function p(b) {
|
|
1348
|
+
var S, C, ie;
|
|
1349
|
+
e.onChange && e.onChange(b), e.change && e.change(b), ae(d, b), !((S = L.value) != null && S.validity.valid) || e.validation === "invalid" ? (h.value = c.value, Y() && (y.value = e.invalidMessage ?? ((C = L.value) == null ? void 0 : C.validationMessage) ?? x, H(() => y.value = "", 1e3))) : e.validation === "valid" || (ie = L.value) != null && ie.validity.valid && e.required ? (h.value = l.value, Y() && (y.value = e.validMessage ?? Z, H(() => y.value = "", 1e3))) : q(e.message, e.showMessage) ? h.value = u.value : h.value = i.value;
|
|
1350
|
+
}
|
|
1351
|
+
function $(b) {
|
|
1352
|
+
e.onBlur && e.onBlur(b), e.blur && e.blur(b);
|
|
1353
|
+
}
|
|
1354
|
+
function f(b) {
|
|
1355
|
+
e.onFocus && e.onFocus(b), e.focus && e.focus(b);
|
|
1356
|
+
}
|
|
1357
|
+
function M(b) {
|
|
1358
|
+
return b.label ?? b.value.toString();
|
|
1359
|
+
}
|
|
1360
|
+
return (b, S) => (m(), g("div", {
|
|
1361
|
+
class: N(r(F)("db-select", e.class)),
|
|
1362
|
+
"data-variant": b.variant,
|
|
1363
|
+
"data-hide-label": r(P)(b.showLabel),
|
|
1364
|
+
"data-icon": b.icon,
|
|
1365
|
+
"data-hide-icon": r(P)(b.showIcon)
|
|
1366
|
+
}, [
|
|
1367
|
+
_("label", { for: a.value }, w(b.label ?? r(le)), 9, _a),
|
|
1368
|
+
_("select", {
|
|
1369
|
+
"aria-invalid": b.validation === "invalid",
|
|
1370
|
+
"data-custom-validity": b.validation,
|
|
1371
|
+
ref_key: "_ref",
|
|
1372
|
+
ref: L,
|
|
1373
|
+
required: b.required,
|
|
1374
|
+
disabled: b.disabled,
|
|
1375
|
+
id: a.value,
|
|
1376
|
+
name: b.name,
|
|
1377
|
+
value: b.value ?? s.value,
|
|
1378
|
+
autocomplete: b.autocomplete,
|
|
1379
|
+
onInput: S[0] || (S[0] = async (C) => v(C)),
|
|
1380
|
+
onClick: S[1] || (S[1] = async (C) => k(C)),
|
|
1381
|
+
onChange: S[2] || (S[2] = async (C) => p(C)),
|
|
1382
|
+
onBlur: S[3] || (S[3] = async (C) => $(C)),
|
|
1383
|
+
onFocus: S[4] || (S[4] = async (C) => f(C)),
|
|
1384
|
+
"aria-describedby": h.value
|
|
1385
|
+
}, [
|
|
1386
|
+
S[5] || (S[5] = _("option", { hidden: !0 }, null, -1)),
|
|
1387
|
+
b.options ? (m(!0), g(T, { key: 0 }, ne(b.options, (C, ie) => (m(), g(T, { key: ie }, [
|
|
1388
|
+
C.options ? (m(), g("optgroup", {
|
|
1389
|
+
key: 0,
|
|
1390
|
+
label: M(C)
|
|
1391
|
+
}, [
|
|
1392
|
+
(m(!0), g(T, null, ne(C.options, (de, un) => (m(), g("option", {
|
|
1393
|
+
key: de.value.toString(),
|
|
1394
|
+
value: de.value,
|
|
1395
|
+
selected: de.selected,
|
|
1396
|
+
disabled: de.disabled
|
|
1397
|
+
}, w(M(de)), 9, Ea))), 128))
|
|
1398
|
+
], 8, La)) : D("", !0),
|
|
1399
|
+
C.options ? D("", !0) : (m(), g("option", {
|
|
1400
|
+
key: 1,
|
|
1401
|
+
value: C.value,
|
|
1402
|
+
disabled: C.disabled,
|
|
1403
|
+
selected: C.selected
|
|
1404
|
+
}, w(M(C)), 9, Aa))
|
|
1405
|
+
], 64))), 128)) : D("", !0),
|
|
1406
|
+
I(b.$slots, "default")
|
|
1407
|
+
], 40, $a),
|
|
1408
|
+
_("span", { id: i.value }, w(b.placeholder ?? b.label), 9, Na),
|
|
1409
|
+
r(q)(b.message, b.showMessage) ? (m(), X(O, {
|
|
1410
|
+
key: 0,
|
|
1411
|
+
size: "small",
|
|
1412
|
+
icon: b.messageIcon,
|
|
1413
|
+
id: u.value
|
|
1414
|
+
}, {
|
|
1415
|
+
default: z(() => [
|
|
1416
|
+
E(w(b.message), 1)
|
|
1417
|
+
]),
|
|
1418
|
+
_: 1
|
|
1419
|
+
}, 8, ["icon", "id"])) : D("", !0),
|
|
1420
|
+
W(O, {
|
|
1421
|
+
size: "small",
|
|
1422
|
+
semantic: "successful",
|
|
1423
|
+
id: l.value
|
|
1424
|
+
}, {
|
|
1425
|
+
default: z(() => [
|
|
1426
|
+
E(w(b.validMessage ?? r(Z)), 1)
|
|
1427
|
+
]),
|
|
1428
|
+
_: 1
|
|
1429
|
+
}, 8, ["id"]),
|
|
1430
|
+
W(O, {
|
|
1431
|
+
size: "small",
|
|
1432
|
+
semantic: "critical",
|
|
1433
|
+
id: c.value
|
|
1434
|
+
}, {
|
|
1435
|
+
default: z(() => {
|
|
1436
|
+
var C;
|
|
1437
|
+
return [
|
|
1438
|
+
E(w(b.invalidMessage ?? ((C = L.value) == null ? void 0 : C.validationMessage) ?? r(x)), 1)
|
|
1439
|
+
];
|
|
1440
|
+
}),
|
|
1441
|
+
_: 1
|
|
1442
|
+
}, 8, ["id"]),
|
|
1443
|
+
_("span", Fa, w(y.value), 1)
|
|
1444
|
+
], 10, Ia));
|
|
1445
|
+
}
|
|
1446
|
+
}), Ta = ["data-visual-aid", "data-size", "data-hide-label", "data-emphasis", "for"], Sa = ["id", "aria-checked", "checked", "disabled", "aria-describedby", "aria-invalid", "data-custom-validity", "name", "required", "data-aid-icon", "data-aid-icon-after"], zn = /* @__PURE__ */ A({
|
|
1447
|
+
__name: "switch",
|
|
1448
|
+
props: {
|
|
1449
|
+
visualAid: { type: Boolean, default: void 0 },
|
|
1450
|
+
children: { default: void 0 },
|
|
1451
|
+
className: { default: void 0 },
|
|
1452
|
+
class: {},
|
|
1453
|
+
describedbyid: { default: void 0 },
|
|
1454
|
+
id: { default: void 0 },
|
|
1455
|
+
autofocus: { type: Boolean },
|
|
1456
|
+
change: { type: Function, default: void 0 },
|
|
1457
|
+
onChange: { type: Function, default: void 0 },
|
|
1458
|
+
blur: { type: Function, default: void 0 },
|
|
1459
|
+
onBlur: { type: Function, default: void 0 },
|
|
1460
|
+
focus: { type: Function, default: void 0 },
|
|
1461
|
+
onFocus: { type: Function, default: void 0 },
|
|
1462
|
+
validation: { default: void 0 },
|
|
1463
|
+
disabled: { type: Boolean, default: void 0 },
|
|
1464
|
+
form: {},
|
|
1465
|
+
label: { default: void 0 },
|
|
1466
|
+
name: { default: void 0 },
|
|
1467
|
+
required: { type: Boolean, default: void 0 },
|
|
1468
|
+
showLabel: { type: Boolean, default: void 0 },
|
|
1469
|
+
value: {},
|
|
1470
|
+
checked: { type: Boolean, default: void 0 },
|
|
1471
|
+
emphasis: { default: void 0 },
|
|
1472
|
+
size: { default: void 0 },
|
|
1473
|
+
icon: { default: void 0 },
|
|
1474
|
+
iconAfter: { default: void 0 }
|
|
1475
|
+
},
|
|
1476
|
+
emits: ["update:checked"],
|
|
1477
|
+
setup(t, { emit: n }) {
|
|
1478
|
+
const d = n, e = t, a = o(void 0), u = o(!1);
|
|
1479
|
+
o(!1);
|
|
1480
|
+
const l = o(null);
|
|
1481
|
+
U(() => {
|
|
1482
|
+
a.value = e.id ?? `switch-${V()}`;
|
|
1483
|
+
});
|
|
1484
|
+
function c(s) {
|
|
1485
|
+
var B;
|
|
1486
|
+
e.onChange && e.onChange(s), e.change && e.change(s), u.value = (B = s.target) == null ? void 0 : B.checked, ae(d, s, "checked");
|
|
1487
|
+
}
|
|
1488
|
+
function i(s) {
|
|
1489
|
+
e.onBlur && e.onBlur(s), e.blur && e.blur(s);
|
|
1490
|
+
}
|
|
1491
|
+
function h(s) {
|
|
1492
|
+
e.onFocus && e.onFocus(s), e.focus && e.focus(s);
|
|
1493
|
+
}
|
|
1494
|
+
return (s, B) => (m(), g("label", {
|
|
1495
|
+
"data-visual-aid": r(G)(s.visualAid),
|
|
1496
|
+
"data-size": s.size,
|
|
1497
|
+
"data-hide-label": r(P)(s.showLabel),
|
|
1498
|
+
"data-emphasis": s.emphasis,
|
|
1499
|
+
for: a.value,
|
|
1500
|
+
class: N(r(F)("db-switch", e.class))
|
|
1501
|
+
}, [
|
|
1502
|
+
_("input", {
|
|
1503
|
+
type: "checkbox",
|
|
1504
|
+
role: "switch",
|
|
1505
|
+
id: a.value,
|
|
1506
|
+
"aria-checked": u.value,
|
|
1507
|
+
ref_key: "_ref",
|
|
1508
|
+
ref: l,
|
|
1509
|
+
checked: s.checked,
|
|
1510
|
+
disabled: s.disabled,
|
|
1511
|
+
"aria-describedby": s.describedbyid,
|
|
1512
|
+
"aria-invalid": s.validation === "invalid",
|
|
1513
|
+
"data-custom-validity": s.validation,
|
|
1514
|
+
name: s.name,
|
|
1515
|
+
required: s.required,
|
|
1516
|
+
"data-aid-icon": s.icon,
|
|
1517
|
+
"data-aid-icon-after": s.iconAfter,
|
|
1518
|
+
onChange: B[0] || (B[0] = async (y) => c(y)),
|
|
1519
|
+
onBlur: B[1] || (B[1] = async (y) => i(y)),
|
|
1520
|
+
onFocus: B[2] || (B[2] = async (y) => h(y))
|
|
1521
|
+
}, null, 40, Sa),
|
|
1522
|
+
s.label ? (m(), g(T, { key: 0 }, [
|
|
1523
|
+
E(w(s.label), 1)
|
|
1524
|
+
], 64)) : I(s.$slots, "default", { key: 1 })
|
|
1525
|
+
], 10, Ta));
|
|
1526
|
+
}
|
|
1527
|
+
}), Ca = ["for", "data-icon", "data-icon-after", "data-hide-icon", "data-hide-icon-after", "data-no-text"], Da = ["disabled", "aria-selected", "aria-controls", "checked", "id"], Ma = /* @__PURE__ */ A({
|
|
1528
|
+
__name: "tab-item",
|
|
1529
|
+
props: {
|
|
1530
|
+
children: { default: void 0 },
|
|
1531
|
+
className: { default: void 0 },
|
|
1532
|
+
class: {},
|
|
1533
|
+
describedbyid: {},
|
|
1534
|
+
id: { default: void 0 },
|
|
1535
|
+
autofocus: { type: Boolean },
|
|
1536
|
+
checked: { type: Boolean, default: void 0 },
|
|
1537
|
+
disabled: { type: Boolean, default: void 0 },
|
|
1538
|
+
label: { default: void 0 },
|
|
1539
|
+
noText: { type: Boolean, default: void 0 },
|
|
1540
|
+
icon: { default: void 0 },
|
|
1541
|
+
iconAfter: { default: void 0 },
|
|
1542
|
+
active: { type: Boolean, default: void 0 },
|
|
1543
|
+
controls: { default: void 0 },
|
|
1544
|
+
change: { type: Function, default: void 0 },
|
|
1545
|
+
onChange: { type: Function, default: void 0 },
|
|
1546
|
+
showIcon: { type: Boolean, default: void 0 }
|
|
1547
|
+
},
|
|
1548
|
+
emits: ["update:checked"],
|
|
1549
|
+
setup(t, { emit: n }) {
|
|
1550
|
+
const d = n, e = t, a = o(!1), u = o(!1), l = o(null);
|
|
1551
|
+
U(() => {
|
|
1552
|
+
a.value = !0;
|
|
1553
|
+
}), R(
|
|
1554
|
+
() => [l.value, a.value],
|
|
1555
|
+
() => {
|
|
1556
|
+
e.active && a.value && l.value && (l.value.click(), a.value = !1);
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
immediate: !0,
|
|
1560
|
+
flush: "post"
|
|
1561
|
+
}
|
|
1562
|
+
);
|
|
1563
|
+
function c(i) {
|
|
1564
|
+
var h;
|
|
1565
|
+
e.onChange && e.onChange(i), e.change && e.change(i), u.value = (h = i.target) == null ? void 0 : h.checked, ae(d, i, "checked");
|
|
1566
|
+
}
|
|
1567
|
+
return (i, h) => (m(), g("li", {
|
|
1568
|
+
role: "none",
|
|
1569
|
+
class: N(r(F)("db-tab-item", e.class))
|
|
1570
|
+
}, [
|
|
1571
|
+
_("label", {
|
|
1572
|
+
for: i.id,
|
|
1573
|
+
"data-icon": i.icon,
|
|
1574
|
+
"data-icon-after": i.iconAfter,
|
|
1575
|
+
"data-hide-icon": r(P)(i.showIcon),
|
|
1576
|
+
"data-hide-icon-after": r(P)(i.showIcon),
|
|
1577
|
+
"data-no-text": i.noText
|
|
1578
|
+
}, [
|
|
1579
|
+
_("input", {
|
|
1580
|
+
type: "radio",
|
|
1581
|
+
role: "tab",
|
|
1582
|
+
disabled: i.disabled,
|
|
1583
|
+
"aria-selected": u.value,
|
|
1584
|
+
"aria-controls": i.controls,
|
|
1585
|
+
checked: i.checked,
|
|
1586
|
+
ref_key: "_ref",
|
|
1587
|
+
ref: l,
|
|
1588
|
+
id: i.id,
|
|
1589
|
+
onChange: h[0] || (h[0] = async (s) => c(s))
|
|
1590
|
+
}, null, 40, Da),
|
|
1591
|
+
i.label ? (m(), g(T, { key: 0 }, [
|
|
1592
|
+
E(w(i.label), 1)
|
|
1593
|
+
], 64)) : D("", !0),
|
|
1594
|
+
I(i.$slots, "default")
|
|
1595
|
+
], 8, Ca)
|
|
1596
|
+
], 2));
|
|
1597
|
+
}
|
|
1598
|
+
}), Ra = ["id", "data-disabled", "data-semantic", "data-emphasis", "data-icon", "data-show-check-state", "data-hide-icon", "data-no-text", "data-overflow"], za = ["title"], Un = /* @__PURE__ */ A({
|
|
1599
|
+
__name: "tag",
|
|
1600
|
+
props: {
|
|
1601
|
+
behavior: { default: void 0 },
|
|
1602
|
+
disabled: { type: Boolean, default: void 0 },
|
|
1603
|
+
noText: { type: Boolean, default: void 0 },
|
|
1604
|
+
onRemove: { type: Function, default: void 0 },
|
|
1605
|
+
removeButton: { default: void 0 },
|
|
1606
|
+
showCheckState: { type: Boolean, default: void 0 },
|
|
1607
|
+
text: { default: void 0 },
|
|
1608
|
+
value: {},
|
|
1609
|
+
children: { default: void 0 },
|
|
1610
|
+
className: { default: void 0 },
|
|
1611
|
+
class: {},
|
|
1612
|
+
describedbyid: {},
|
|
1613
|
+
id: { default: void 0 },
|
|
1614
|
+
autofocus: { type: Boolean },
|
|
1615
|
+
icon: { default: void 0 },
|
|
1616
|
+
semantic: { default: void 0 },
|
|
1617
|
+
overflow: { type: Boolean, default: void 0 },
|
|
1618
|
+
emphasis: { default: void 0 },
|
|
1619
|
+
showIcon: { type: Boolean, default: void 0 },
|
|
1620
|
+
content: {}
|
|
1621
|
+
},
|
|
1622
|
+
setup(t) {
|
|
1623
|
+
const n = t, d = o(!1), e = o(null);
|
|
1624
|
+
d.value = !0, R(
|
|
1625
|
+
() => [d.value, n.disabled, e.value],
|
|
1626
|
+
() => {
|
|
1627
|
+
var l, c;
|
|
1628
|
+
if (d.value && e.value && n.disabled !== void 0) {
|
|
1629
|
+
const i = (l = e.value) == null ? void 0 : l.querySelector(
|
|
1630
|
+
"button:not(.db-tab-remove-button)"
|
|
1631
|
+
), h = (c = e.value) == null ? void 0 : c.querySelector("input");
|
|
1632
|
+
for (const s of [i, h])
|
|
1633
|
+
s && (s.disabled = n.disabled);
|
|
1634
|
+
}
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
immediate: !0,
|
|
1638
|
+
flush: "post"
|
|
1639
|
+
}
|
|
1640
|
+
);
|
|
1641
|
+
function a() {
|
|
1642
|
+
n.onRemove && n.onRemove();
|
|
1643
|
+
}
|
|
1644
|
+
function u() {
|
|
1645
|
+
return n.removeButton ? n.removeButton : "Remove tag";
|
|
1646
|
+
}
|
|
1647
|
+
return (l, c) => (m(), g("div", {
|
|
1648
|
+
ref_key: "_ref",
|
|
1649
|
+
ref: e,
|
|
1650
|
+
id: l.id,
|
|
1651
|
+
class: N(r(F)("db-tag", n.class)),
|
|
1652
|
+
"data-disabled": r(G)(l.disabled),
|
|
1653
|
+
"data-semantic": l.semantic,
|
|
1654
|
+
"data-emphasis": l.emphasis,
|
|
1655
|
+
"data-icon": l.icon,
|
|
1656
|
+
"data-show-check-state": r(G)(l.showCheckState ?? !0),
|
|
1657
|
+
"data-hide-icon": r(P)(l.showIcon),
|
|
1658
|
+
"data-no-text": r(G)(l.noText),
|
|
1659
|
+
"data-overflow": r(G)(l.overflow)
|
|
1660
|
+
}, [
|
|
1661
|
+
I(l.$slots, "content"),
|
|
1662
|
+
I(l.$slots, "default"),
|
|
1663
|
+
l.text ? (m(), g(T, { key: 0 }, [
|
|
1664
|
+
E(w(l.text), 1)
|
|
1665
|
+
], 64)) : D("", !0),
|
|
1666
|
+
l.behavior === "removable" ? (m(), g("button", {
|
|
1667
|
+
key: 1,
|
|
1668
|
+
class: "db-button db-tab-remove-button",
|
|
1669
|
+
"data-icon": "cross",
|
|
1670
|
+
"data-size": "small",
|
|
1671
|
+
"data-no-text": "true",
|
|
1672
|
+
"data-variant": "ghost",
|
|
1673
|
+
onClick: c[0] || (c[0] = async (i) => a()),
|
|
1674
|
+
title: u()
|
|
1675
|
+
}, w(u()), 9, za)) : D("", !0)
|
|
1676
|
+
], 10, Ra));
|
|
1677
|
+
}
|
|
1678
|
+
}), Ua = ["data-variant", "data-hide-label"], Pa = ["for"], Ga = ["aria-invalid", "data-custom-validity", "id", "data-resize", "disabled", "required", "readOnly", "form", "maxLength", "minLength", "name", "wrap", "spellcheck", "autocomplete", "value", "aria-describedby", "placeholder", "rows", "cols"], Va = {
|
|
1679
|
+
"data-visually-hidden": "true",
|
|
1680
|
+
role: "status"
|
|
1681
|
+
}, Pn = /* @__PURE__ */ A({
|
|
1682
|
+
__name: "textarea",
|
|
1683
|
+
props: {
|
|
1684
|
+
cols: { default: void 0 },
|
|
1685
|
+
resize: { default: void 0 },
|
|
1686
|
+
rows: { default: void 0 },
|
|
1687
|
+
spellCheck: { type: Boolean, default: void 0 },
|
|
1688
|
+
wrap: { default: void 0 },
|
|
1689
|
+
change: { type: Function, default: void 0 },
|
|
1690
|
+
onChange: { type: Function, default: void 0 },
|
|
1691
|
+
input: { type: Function, default: void 0 },
|
|
1692
|
+
onInput: { type: Function, default: void 0 },
|
|
1693
|
+
blur: { type: Function, default: void 0 },
|
|
1694
|
+
onBlur: { type: Function, default: void 0 },
|
|
1695
|
+
focus: { type: Function, default: void 0 },
|
|
1696
|
+
onFocus: { type: Function, default: void 0 },
|
|
1697
|
+
validation: { default: void 0 },
|
|
1698
|
+
disabled: { type: Boolean, default: void 0 },
|
|
1699
|
+
form: { default: void 0 },
|
|
1700
|
+
label: { default: void 0 },
|
|
1701
|
+
name: { default: void 0 },
|
|
1702
|
+
required: { type: Boolean, default: void 0 },
|
|
1703
|
+
showLabel: { type: Boolean, default: void 0 },
|
|
1704
|
+
value: { default: void 0 },
|
|
1705
|
+
children: {},
|
|
1706
|
+
className: { default: void 0 },
|
|
1707
|
+
class: {},
|
|
1708
|
+
describedbyid: {},
|
|
1709
|
+
id: { default: void 0 },
|
|
1710
|
+
autofocus: { type: Boolean },
|
|
1711
|
+
maxLength: { default: void 0 },
|
|
1712
|
+
minLength: { default: void 0 },
|
|
1713
|
+
readOnly: { type: Boolean, default: void 0 },
|
|
1714
|
+
variant: { default: void 0 },
|
|
1715
|
+
placeholder: { default: void 0 },
|
|
1716
|
+
message: { default: void 0 },
|
|
1717
|
+
validMessage: { default: void 0 },
|
|
1718
|
+
invalidMessage: { default: void 0 },
|
|
1719
|
+
messageIcon: { default: void 0 },
|
|
1720
|
+
autocomplete: { default: void 0 },
|
|
1721
|
+
showMessage: { type: Boolean, default: void 0 }
|
|
1722
|
+
},
|
|
1723
|
+
emits: ["update:value"],
|
|
1724
|
+
setup(t, { emit: n }) {
|
|
1725
|
+
const d = n, e = t, a = o(void 0), u = o(void 0), l = o(void 0), c = o(void 0), i = o(""), h = o(""), s = o(""), B = o(null);
|
|
1726
|
+
U(() => {
|
|
1727
|
+
const p = e.id ?? `textarea-${V()}`;
|
|
1728
|
+
a.value = p, u.value = p + K, l.value = p + J, c.value = p + Q;
|
|
1729
|
+
}), R(
|
|
1730
|
+
() => [a.value],
|
|
1731
|
+
() => {
|
|
1732
|
+
if (a.value) {
|
|
1733
|
+
const p = a.value + K;
|
|
1734
|
+
u.value = p, l.value = a.value + J, c.value = a.value + Q, q(e.message, e.showMessage) && (i.value = p);
|
|
1735
|
+
}
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
immediate: !0,
|
|
1739
|
+
flush: "post"
|
|
1740
|
+
}
|
|
1741
|
+
), R(
|
|
1742
|
+
() => [e.value],
|
|
1743
|
+
() => {
|
|
1744
|
+
h.value = e.value;
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
immediate: !0,
|
|
1748
|
+
flush: "post"
|
|
1749
|
+
}
|
|
1750
|
+
);
|
|
1751
|
+
function y(p) {
|
|
1752
|
+
h.value = p.target.value, e.onInput && e.onInput(p), e.input && e.input(p);
|
|
1753
|
+
}
|
|
1754
|
+
function L(p) {
|
|
1755
|
+
var $, f, M;
|
|
1756
|
+
e.onChange && e.onChange(p), e.change && e.change(p), ae(d, p), !(($ = B.value) != null && $.validity.valid) || e.validation === "invalid" ? (i.value = c.value, Y() && (s.value = e.invalidMessage ?? ((f = B.value) == null ? void 0 : f.validationMessage) ?? x, H(() => s.value = "", 1e3))) : e.validation === "valid" || (M = B.value) != null && M.validity.valid && (e.required || e.minLength || e.maxLength) ? (i.value = l.value, Y() && (s.value = e.validMessage ?? Z, H(() => s.value = "", 1e3))) : q(e.message, e.showMessage) ? i.value = u.value : i.value = "";
|
|
1757
|
+
}
|
|
1758
|
+
function k(p) {
|
|
1759
|
+
e.onBlur && e.onBlur(p), e.blur && e.blur(p);
|
|
1760
|
+
}
|
|
1761
|
+
function v(p) {
|
|
1762
|
+
e.onFocus && e.onFocus(p), e.focus && e.focus(p);
|
|
1763
|
+
}
|
|
1764
|
+
return (p, $) => (m(), g("div", {
|
|
1765
|
+
class: N(r(F)("db-textarea", e.class)),
|
|
1766
|
+
"data-variant": p.variant,
|
|
1767
|
+
"data-hide-label": r(P)(p.showLabel)
|
|
1768
|
+
}, [
|
|
1769
|
+
_("label", { for: a.value }, w(p.label ?? r(le)), 9, Pa),
|
|
1770
|
+
_("textarea", {
|
|
1771
|
+
"aria-invalid": p.validation === "invalid",
|
|
1772
|
+
"data-custom-validity": p.validation,
|
|
1773
|
+
ref_key: "_ref",
|
|
1774
|
+
ref: B,
|
|
1775
|
+
id: a.value,
|
|
1776
|
+
"data-resize": p.resize,
|
|
1777
|
+
disabled: p.disabled,
|
|
1778
|
+
required: p.required,
|
|
1779
|
+
readOnly: p.readOnly,
|
|
1780
|
+
form: p.form,
|
|
1781
|
+
maxLength: p.maxLength,
|
|
1782
|
+
minLength: p.minLength,
|
|
1783
|
+
name: p.name,
|
|
1784
|
+
wrap: p.wrap,
|
|
1785
|
+
spellcheck: p.spellCheck,
|
|
1786
|
+
autocomplete: p.autocomplete,
|
|
1787
|
+
onInput: $[0] || ($[0] = async (f) => y(f)),
|
|
1788
|
+
onChange: $[1] || ($[1] = async (f) => L(f)),
|
|
1789
|
+
onBlur: $[2] || ($[2] = async (f) => k(f)),
|
|
1790
|
+
onFocus: $[3] || ($[3] = async (f) => v(f)),
|
|
1791
|
+
value: p.value ?? h.value,
|
|
1792
|
+
"aria-describedby": i.value,
|
|
1793
|
+
placeholder: p.placeholder ?? r(fe),
|
|
1794
|
+
rows: p.rows ?? r(Ae),
|
|
1795
|
+
cols: p.cols
|
|
1796
|
+
}, null, 40, Ga),
|
|
1797
|
+
r(q)(p.message, p.showMessage) ? (m(), X(O, {
|
|
1798
|
+
key: 0,
|
|
1799
|
+
size: "small",
|
|
1800
|
+
icon: p.messageIcon,
|
|
1801
|
+
id: u.value
|
|
1802
|
+
}, {
|
|
1803
|
+
default: z(() => [
|
|
1804
|
+
E(w(p.message), 1)
|
|
1805
|
+
]),
|
|
1806
|
+
_: 1
|
|
1807
|
+
}, 8, ["icon", "id"])) : D("", !0),
|
|
1808
|
+
W(O, {
|
|
1809
|
+
size: "small",
|
|
1810
|
+
semantic: "successful",
|
|
1811
|
+
id: l.value
|
|
1812
|
+
}, {
|
|
1813
|
+
default: z(() => [
|
|
1814
|
+
E(w(p.validMessage ?? r(Z)), 1)
|
|
1815
|
+
]),
|
|
1816
|
+
_: 1
|
|
1817
|
+
}, 8, ["id"]),
|
|
1818
|
+
W(O, {
|
|
1819
|
+
size: "small",
|
|
1820
|
+
semantic: "critical",
|
|
1821
|
+
id: c.value
|
|
1822
|
+
}, {
|
|
1823
|
+
default: z(() => {
|
|
1824
|
+
var f;
|
|
1825
|
+
return [
|
|
1826
|
+
E(w(p.invalidMessage ?? ((f = B.value) == null ? void 0 : f.validationMessage) ?? r(x)), 1)
|
|
1827
|
+
];
|
|
1828
|
+
}),
|
|
1829
|
+
_: 1
|
|
1830
|
+
}, 8, ["id"]),
|
|
1831
|
+
_("span", Va, w(s.value), 1)
|
|
1832
|
+
], 10, Ua));
|
|
1833
|
+
}
|
|
1834
|
+
}), qa = ["id", "data-width", "data-icon", "data-hide-icon", "data-active", "aria-disabled"], Wa = ["aria-haspopup", "aria-expanded", "disabled"], Oa = ["id"], Xa = {
|
|
1835
|
+
key: 0,
|
|
1836
|
+
class: "db-mobile-navigation-back"
|
|
1837
|
+
}, Gn = /* @__PURE__ */ A({
|
|
1838
|
+
__name: "navigation-item",
|
|
1839
|
+
props: {
|
|
1840
|
+
active: { type: Boolean, default: void 0 },
|
|
1841
|
+
disabled: { type: Boolean, default: void 0 },
|
|
1842
|
+
subNavigation: {},
|
|
1843
|
+
subNavigationExpanded: { type: Boolean, default: void 0 },
|
|
1844
|
+
children: { default: void 0 },
|
|
1845
|
+
className: { default: void 0 },
|
|
1846
|
+
class: {},
|
|
1847
|
+
describedbyid: {},
|
|
1848
|
+
id: { default: void 0 },
|
|
1849
|
+
autofocus: { type: Boolean },
|
|
1850
|
+
onClick: { type: Function, default: void 0 },
|
|
1851
|
+
icon: { default: void 0 },
|
|
1852
|
+
width: { default: void 0 },
|
|
1853
|
+
backButtonId: { default: void 0 },
|
|
1854
|
+
backButtonText: { default: void 0 },
|
|
1855
|
+
showIcon: { type: Boolean, default: void 0 },
|
|
1856
|
+
text: { default: void 0 }
|
|
1857
|
+
},
|
|
1858
|
+
setup(t) {
|
|
1859
|
+
const n = t, d = o(!1), e = o(!1), a = o(!0), u = o(!1), l = o(
|
|
1860
|
+
"sub-navigation-" + V()
|
|
1861
|
+
), c = o(void 0), i = o(null);
|
|
1862
|
+
U(() => {
|
|
1863
|
+
d.value = !0;
|
|
1864
|
+
}), R(
|
|
1865
|
+
() => [n.subNavigationExpanded],
|
|
1866
|
+
() => {
|
|
1867
|
+
n.subNavigationExpanded !== void 0 && (u.value = !!n.subNavigationExpanded);
|
|
1868
|
+
},
|
|
1869
|
+
{
|
|
1870
|
+
immediate: !0,
|
|
1871
|
+
flush: "post"
|
|
1872
|
+
}
|
|
1873
|
+
), R(
|
|
1874
|
+
() => [d.value],
|
|
1875
|
+
() => {
|
|
1876
|
+
B();
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
immediate: !0,
|
|
1880
|
+
flush: "post"
|
|
1881
|
+
}
|
|
1882
|
+
);
|
|
1883
|
+
function h(y) {
|
|
1884
|
+
n.onClick && n.onClick(y), e.value && (u.value = !0);
|
|
1885
|
+
}
|
|
1886
|
+
function s(y) {
|
|
1887
|
+
y.stopPropagation(), u.value = !1;
|
|
1888
|
+
}
|
|
1889
|
+
function B() {
|
|
1890
|
+
var y;
|
|
1891
|
+
if (d.value && document && l.value) {
|
|
1892
|
+
const L = document == null ? void 0 : document.getElementById(
|
|
1893
|
+
l.value
|
|
1894
|
+
);
|
|
1895
|
+
L && (((y = L.children) == null ? void 0 : y.length) > 0 ? (e.value = !0, c.value || (c.value = new Je(
|
|
1896
|
+
i.value,
|
|
1897
|
+
L
|
|
1898
|
+
))) : a.value = !1);
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
return (y, L) => (m(), g("li", {
|
|
1902
|
+
ref_key: "_ref",
|
|
1903
|
+
ref: i,
|
|
1904
|
+
id: y.id,
|
|
1905
|
+
onMouseover: L[1] || (L[1] = async (k) => {
|
|
1906
|
+
var v;
|
|
1907
|
+
return (v = c.value) == null ? void 0 : v.enableFollow();
|
|
1908
|
+
}),
|
|
1909
|
+
onMouseleave: L[2] || (L[2] = async (k) => {
|
|
1910
|
+
var v;
|
|
1911
|
+
return (v = c.value) == null ? void 0 : v.disableFollow();
|
|
1912
|
+
}),
|
|
1913
|
+
onMousemove: L[3] || (L[3] = async (k) => {
|
|
1914
|
+
var v;
|
|
1915
|
+
return (v = c.value) == null ? void 0 : v.followByMouseEvent(k);
|
|
1916
|
+
}),
|
|
1917
|
+
class: N(r(F)("db-navigation-item", n.class)),
|
|
1918
|
+
"data-width": y.width,
|
|
1919
|
+
"data-icon": y.icon,
|
|
1920
|
+
"data-hide-icon": r(P)(y.showIcon),
|
|
1921
|
+
"data-active": y.active,
|
|
1922
|
+
"aria-disabled": r(G)(y.disabled)
|
|
1923
|
+
}, [
|
|
1924
|
+
a.value ? D("", !0) : (m(), g(T, { key: 0 }, [
|
|
1925
|
+
y.text ? (m(), g(T, { key: 0 }, [
|
|
1926
|
+
E(w(y.text), 1)
|
|
1927
|
+
], 64)) : I(y.$slots, "default", { key: 1 })
|
|
1928
|
+
], 64)),
|
|
1929
|
+
a.value ? (m(), g(T, { key: 1 }, [
|
|
1930
|
+
_("button", {
|
|
1931
|
+
class: "db-navigation-item-expand-button",
|
|
1932
|
+
"aria-haspopup": e.value,
|
|
1933
|
+
"aria-expanded": u.value,
|
|
1934
|
+
disabled: y.disabled,
|
|
1935
|
+
onClick: L[0] || (L[0] = async (k) => h(k))
|
|
1936
|
+
}, [
|
|
1937
|
+
y.text ? (m(), g(T, { key: 0 }, [
|
|
1938
|
+
E(w(y.text), 1)
|
|
1939
|
+
], 64)) : I(y.$slots, "default", { key: 1 })
|
|
1940
|
+
], 8, Wa),
|
|
1941
|
+
_("menu", {
|
|
1942
|
+
class: "db-sub-navigation",
|
|
1943
|
+
id: l.value
|
|
1944
|
+
}, [
|
|
1945
|
+
e.value ? (m(), g("div", Xa, [
|
|
1946
|
+
W(te, {
|
|
1947
|
+
icon: "arrow_left",
|
|
1948
|
+
variant: "ghost",
|
|
1949
|
+
id: y.backButtonId,
|
|
1950
|
+
onClick: (k) => s(k)
|
|
1951
|
+
}, {
|
|
1952
|
+
default: z(() => [
|
|
1953
|
+
E(w(y.backButtonText ?? r($e)), 1)
|
|
1954
|
+
]),
|
|
1955
|
+
_: 1
|
|
1956
|
+
}, 8, ["id", "onClick"])
|
|
1957
|
+
])) : D("", !0),
|
|
1958
|
+
I(y.$slots, "sub-navigation")
|
|
1959
|
+
], 8, Oa)
|
|
1960
|
+
], 64)) : D("", !0)
|
|
1961
|
+
], 42, qa));
|
|
1962
|
+
}
|
|
1963
|
+
}), Ha = ["id"], ja = ["aria-disabled", "open"], Ya = /* @__PURE__ */ A({
|
|
1964
|
+
__name: "accordion-item",
|
|
1965
|
+
props: {
|
|
1966
|
+
defaultOpen: { type: Boolean, default: void 0 },
|
|
1967
|
+
disabled: { type: Boolean, default: void 0 },
|
|
1968
|
+
headline: {},
|
|
1969
|
+
headlinePlain: { default: void 0 },
|
|
1970
|
+
text: { default: void 0 },
|
|
1971
|
+
children: { default: void 0 },
|
|
1972
|
+
className: { default: void 0 },
|
|
1973
|
+
class: {},
|
|
1974
|
+
describedbyid: {},
|
|
1975
|
+
id: { default: void 0 },
|
|
1976
|
+
autofocus: { type: Boolean },
|
|
1977
|
+
onToggle: { type: Function, default: void 0 }
|
|
1978
|
+
},
|
|
1979
|
+
setup(t) {
|
|
1980
|
+
const n = t, d = o(ee), e = o(!1), a = o(null);
|
|
1981
|
+
U(() => {
|
|
1982
|
+
d.value = n.id || "accordion-item-" + V(), n.defaultOpen && (e.value = n.defaultOpen);
|
|
1983
|
+
});
|
|
1984
|
+
function u(l) {
|
|
1985
|
+
l == null || l.preventDefault();
|
|
1986
|
+
const c = !e.value;
|
|
1987
|
+
n.onToggle && n.onToggle(c), e.value = c;
|
|
1988
|
+
}
|
|
1989
|
+
return (l, c) => (m(), g("li", {
|
|
1990
|
+
id: d.value,
|
|
1991
|
+
class: N(r(F)("db-accordion-item", n.class))
|
|
1992
|
+
}, [
|
|
1993
|
+
_("details", {
|
|
1994
|
+
"aria-disabled": r(G)(l.disabled),
|
|
1995
|
+
ref_key: "_ref",
|
|
1996
|
+
ref: a,
|
|
1997
|
+
open: e.value
|
|
1998
|
+
}, [
|
|
1999
|
+
_("summary", {
|
|
2000
|
+
onClick: c[0] || (c[0] = async (i) => u(i))
|
|
2001
|
+
}, [
|
|
2002
|
+
l.headlinePlain ? (m(), g(T, { key: 0 }, [
|
|
2003
|
+
E(w(l.headlinePlain), 1)
|
|
2004
|
+
], 64)) : D("", !0),
|
|
2005
|
+
l.headlinePlain ? D("", !0) : I(l.$slots, "headline", { key: 1 })
|
|
2006
|
+
]),
|
|
2007
|
+
_("div", null, [
|
|
2008
|
+
l.text ? (m(), g(T, { key: 0 }, [
|
|
2009
|
+
E(w(l.text), 1)
|
|
2010
|
+
], 64)) : I(l.$slots, "default", { key: 1 })
|
|
2011
|
+
])
|
|
2012
|
+
], 8, ja)
|
|
2013
|
+
], 10, Ha));
|
|
2014
|
+
}
|
|
2015
|
+
}), Ka = ["id", "data-variant"], Vn = /* @__PURE__ */ A({
|
|
2016
|
+
__name: "accordion",
|
|
2017
|
+
props: {
|
|
2018
|
+
behavior: { default: void 0 },
|
|
2019
|
+
initOpenIndex: { default: void 0 },
|
|
2020
|
+
items: { default: void 0 },
|
|
2021
|
+
name: { default: void 0 },
|
|
2022
|
+
onChange: {},
|
|
2023
|
+
variant: { default: void 0 },
|
|
2024
|
+
children: { default: void 0 },
|
|
2025
|
+
className: { default: void 0 },
|
|
2026
|
+
class: {},
|
|
2027
|
+
describedbyid: {},
|
|
2028
|
+
id: { default: void 0 },
|
|
2029
|
+
autofocus: { type: Boolean }
|
|
2030
|
+
},
|
|
2031
|
+
setup(t) {
|
|
2032
|
+
const n = t, d = o(ee), e = o(""), a = o(!1), u = o(!1), l = o(null);
|
|
2033
|
+
U(() => {
|
|
2034
|
+
d.value = n.id || "accordion-" + V(), a.value = !0, u.value = !0;
|
|
2035
|
+
}), R(
|
|
2036
|
+
() => [a.value, n.name, n.behavior, d.value],
|
|
2037
|
+
() => {
|
|
2038
|
+
a.value && (n.behavior === "single" ? n.name ? e.value !== n.name && (e.value = n.name) : e.value !== d.value && d.value && (e.value = d.value) : e.value = "");
|
|
2039
|
+
},
|
|
2040
|
+
{
|
|
2041
|
+
immediate: !0,
|
|
2042
|
+
flush: "post"
|
|
2043
|
+
}
|
|
2044
|
+
), R(
|
|
2045
|
+
() => [l.value, e.value],
|
|
2046
|
+
() => {
|
|
2047
|
+
if (l.value) {
|
|
2048
|
+
const i = l.value.getElementsByTagName("details");
|
|
2049
|
+
if (i)
|
|
2050
|
+
for (const h of Array.from(i))
|
|
2051
|
+
e.value === "" ? h.removeAttribute("name") : h.name = e.value;
|
|
2052
|
+
}
|
|
2053
|
+
},
|
|
2054
|
+
{
|
|
2055
|
+
immediate: !0,
|
|
2056
|
+
flush: "post"
|
|
2057
|
+
}
|
|
2058
|
+
), R(
|
|
2059
|
+
() => [l.value, u.value, n.initOpenIndex],
|
|
2060
|
+
() => {
|
|
2061
|
+
var i;
|
|
2062
|
+
if (l.value && u.value) {
|
|
2063
|
+
if (n.initOpenIndex && ((i = n.initOpenIndex) == null ? void 0 : i.length) > 0) {
|
|
2064
|
+
const h = l.value.getElementsByTagName("details");
|
|
2065
|
+
if (h) {
|
|
2066
|
+
const s = n.behavior === "single" && n.initOpenIndex.length > 1 ? [n.initOpenIndex[0]] : n.initOpenIndex;
|
|
2067
|
+
Array.from(h).forEach(
|
|
2068
|
+
(B, y) => {
|
|
2069
|
+
s.includes(y) && (B.open = !0);
|
|
2070
|
+
}
|
|
2071
|
+
);
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
u.value = !1;
|
|
2075
|
+
}
|
|
2076
|
+
},
|
|
2077
|
+
{
|
|
2078
|
+
immediate: !0,
|
|
2079
|
+
flush: "post"
|
|
2080
|
+
}
|
|
2081
|
+
);
|
|
2082
|
+
function c(i) {
|
|
2083
|
+
try {
|
|
2084
|
+
return typeof i == "string" ? JSON.parse(i) : i;
|
|
2085
|
+
} catch (h) {
|
|
2086
|
+
console.error(h);
|
|
2087
|
+
}
|
|
2088
|
+
return [];
|
|
2089
|
+
}
|
|
2090
|
+
return (i, h) => (m(), g("ul", {
|
|
2091
|
+
ref_key: "_ref",
|
|
2092
|
+
ref: l,
|
|
2093
|
+
id: d.value,
|
|
2094
|
+
class: N(r(F)("db-accordion", n.class)),
|
|
2095
|
+
"data-variant": i.variant
|
|
2096
|
+
}, [
|
|
2097
|
+
i.items ? D("", !0) : I(i.$slots, "default", { key: 0 }),
|
|
2098
|
+
i.items ? (m(!0), g(T, { key: 1 }, ne(c(i.items), (s, B) => (m(), X(Ya, {
|
|
2099
|
+
key: `accordion-item-${B}`,
|
|
2100
|
+
headlinePlain: s.headlinePlain,
|
|
2101
|
+
disabled: s.disabled,
|
|
2102
|
+
text: s.text
|
|
2103
|
+
}, null, 8, ["headlinePlain", "disabled", "text"]))), 128)) : D("", !0)
|
|
2104
|
+
], 10, Ka));
|
|
2105
|
+
}
|
|
2106
|
+
}), Ja = ["id", "aria-labelledby"], qn = /* @__PURE__ */ A({
|
|
2107
|
+
__name: "navigation",
|
|
2108
|
+
props: {
|
|
2109
|
+
children: { default: void 0 },
|
|
2110
|
+
className: { default: void 0 },
|
|
2111
|
+
class: {},
|
|
2112
|
+
describedbyid: {},
|
|
2113
|
+
id: { default: void 0 },
|
|
2114
|
+
autofocus: { type: Boolean },
|
|
2115
|
+
labelledBy: { default: void 0 }
|
|
2116
|
+
},
|
|
2117
|
+
setup(t) {
|
|
2118
|
+
const n = t, d = o(ee), e = o(null);
|
|
2119
|
+
return U(() => {
|
|
2120
|
+
d.value = n.id || "navigation-" + V();
|
|
2121
|
+
}), (a, u) => (m(), g("nav", {
|
|
2122
|
+
ref_key: "_ref",
|
|
2123
|
+
ref: e,
|
|
2124
|
+
id: d.value,
|
|
2125
|
+
"aria-labelledby": a.labelledBy,
|
|
2126
|
+
class: N(r(F)("db-navigation", n.class))
|
|
2127
|
+
}, [
|
|
2128
|
+
_("menu", null, [
|
|
2129
|
+
I(a.$slots, "default")
|
|
2130
|
+
])
|
|
2131
|
+
], 10, Ja));
|
|
2132
|
+
}
|
|
2133
|
+
}), Qa = ["id"], Za = ["data-spacing", "data-gap", "data-animation", "data-open", "data-delay", "data-width", "data-placement"], Wn = /* @__PURE__ */ A({
|
|
2134
|
+
__name: "popover",
|
|
2135
|
+
props: {
|
|
2136
|
+
open: { type: Boolean, default: void 0 },
|
|
2137
|
+
trigger: {},
|
|
2138
|
+
children: { default: void 0 },
|
|
2139
|
+
className: { default: void 0 },
|
|
2140
|
+
class: {},
|
|
2141
|
+
describedbyid: {},
|
|
2142
|
+
id: { default: void 0 },
|
|
2143
|
+
autofocus: { type: Boolean },
|
|
2144
|
+
spacing: { default: void 0 },
|
|
2145
|
+
placement: { default: void 0 },
|
|
2146
|
+
gap: { type: Boolean, default: void 0 },
|
|
2147
|
+
delay: { default: void 0 },
|
|
2148
|
+
animation: { type: Boolean, default: void 0 },
|
|
2149
|
+
width: { default: void 0 }
|
|
2150
|
+
},
|
|
2151
|
+
setup(t) {
|
|
2152
|
+
const n = t, d = o(!1), e = o(!1), a = o(null);
|
|
2153
|
+
U(() => {
|
|
2154
|
+
d.value = !0;
|
|
2155
|
+
}), R(
|
|
2156
|
+
() => [a.value, d.value],
|
|
2157
|
+
() => {
|
|
2158
|
+
if (a.value && d.value) {
|
|
2159
|
+
const i = c();
|
|
2160
|
+
i && (i.ariaHasPopup = "true"), d.value = !1;
|
|
2161
|
+
}
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
immediate: !0,
|
|
2165
|
+
flush: "post"
|
|
2166
|
+
}
|
|
2167
|
+
), R(
|
|
2168
|
+
() => [a.value, e.value],
|
|
2169
|
+
() => {
|
|
2170
|
+
if (a.value) {
|
|
2171
|
+
const i = c();
|
|
2172
|
+
i && (i.ariaExpanded = (!!e.value).toString());
|
|
2173
|
+
}
|
|
2174
|
+
},
|
|
2175
|
+
{
|
|
2176
|
+
immediate: !0,
|
|
2177
|
+
flush: "post"
|
|
2178
|
+
}
|
|
2179
|
+
);
|
|
2180
|
+
function u() {
|
|
2181
|
+
if (e.value = !0, !a.value) return;
|
|
2182
|
+
const i = a.value.querySelector("article");
|
|
2183
|
+
i && se(i);
|
|
2184
|
+
}
|
|
2185
|
+
function l(i) {
|
|
2186
|
+
const h = i.target;
|
|
2187
|
+
(!h.parentNode || h.parentNode.querySelector(":focus") !== h && h.parentNode.querySelector(":focus-within") !== h && h.parentNode.querySelector(":hover") !== h) && (e.value = !1);
|
|
2188
|
+
}
|
|
2189
|
+
function c() {
|
|
2190
|
+
var i;
|
|
2191
|
+
if (a.value) {
|
|
2192
|
+
const h = Array.from(a.value.children);
|
|
2193
|
+
if (h.length >= 2) {
|
|
2194
|
+
const s = h[0];
|
|
2195
|
+
return s.tagName.includes("-") ? ((i = s.children) == null ? void 0 : i.length) > 0 ? s.children[0] : null : s;
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
return null;
|
|
2199
|
+
}
|
|
2200
|
+
return (i, h) => (m(), g("div", {
|
|
2201
|
+
ref_key: "_ref",
|
|
2202
|
+
ref: a,
|
|
2203
|
+
id: i.id,
|
|
2204
|
+
class: N(r(F)("db-popover", n.class)),
|
|
2205
|
+
onFocus: h[0] || (h[0] = async (s) => u()),
|
|
2206
|
+
onBlur: h[1] || (h[1] = async (s) => l(s)),
|
|
2207
|
+
onMouseenter: h[2] || (h[2] = async (s) => u()),
|
|
2208
|
+
onMouseleave: h[3] || (h[3] = async (s) => l(s))
|
|
2209
|
+
}, [
|
|
2210
|
+
I(i.$slots, "trigger"),
|
|
2211
|
+
_("article", {
|
|
2212
|
+
class: "db-popover-content",
|
|
2213
|
+
"data-spacing": i.spacing,
|
|
2214
|
+
"data-gap": r(G)(i.gap),
|
|
2215
|
+
"data-animation": r(G)(i.animation ?? !0),
|
|
2216
|
+
"data-open": i.open,
|
|
2217
|
+
"data-delay": i.delay,
|
|
2218
|
+
"data-width": i.width,
|
|
2219
|
+
"data-placement": i.placement
|
|
2220
|
+
}, [
|
|
2221
|
+
I(i.$slots, "default")
|
|
2222
|
+
], 8, Za)
|
|
2223
|
+
], 42, Qa));
|
|
2224
|
+
}
|
|
2225
|
+
}), xa = ["id", "data-emphasis", "data-animation", "data-delay", "data-width", "data-show-arrow", "data-placement"], On = /* @__PURE__ */ A({
|
|
2226
|
+
__name: "tooltip",
|
|
2227
|
+
props: {
|
|
2228
|
+
showArrow: { type: Boolean, default: void 0 },
|
|
2229
|
+
children: { default: void 0 },
|
|
2230
|
+
className: { default: void 0 },
|
|
2231
|
+
class: {},
|
|
2232
|
+
describedbyid: {},
|
|
2233
|
+
id: { default: void 0 },
|
|
2234
|
+
autofocus: { type: Boolean },
|
|
2235
|
+
emphasis: { default: void 0 },
|
|
2236
|
+
placement: { default: void 0 },
|
|
2237
|
+
delay: { default: void 0 },
|
|
2238
|
+
animation: { type: Boolean, default: void 0 },
|
|
2239
|
+
width: { default: void 0 }
|
|
2240
|
+
},
|
|
2241
|
+
setup(t) {
|
|
2242
|
+
const n = t, d = o(ee), e = o(!1), a = o(null);
|
|
2243
|
+
U(() => {
|
|
2244
|
+
d.value = n.id || "tooltip-" + V(), e.value = !0;
|
|
2245
|
+
}), R(
|
|
2246
|
+
() => [a.value, e.value],
|
|
2247
|
+
() => {
|
|
2248
|
+
if (a.value && e.value && d.value) {
|
|
2249
|
+
let c = a.value.parentElement;
|
|
2250
|
+
c && c.localName.includes("tooltip") && (c = c.parentElement), c && (["mouseenter", "focus"].forEach((i) => {
|
|
2251
|
+
c.addEventListener(i, () => l());
|
|
2252
|
+
}), c.setAttribute("data-has-tooltip", "true"), c.setAttribute("aria-describedby", d.value)), e.value = !1;
|
|
2253
|
+
}
|
|
2254
|
+
},
|
|
2255
|
+
{
|
|
2256
|
+
immediate: !0,
|
|
2257
|
+
flush: "post"
|
|
2258
|
+
}
|
|
2259
|
+
);
|
|
2260
|
+
function u(c) {
|
|
2261
|
+
c.stopPropagation();
|
|
2262
|
+
}
|
|
2263
|
+
function l() {
|
|
2264
|
+
a.value && se(a.value);
|
|
2265
|
+
}
|
|
2266
|
+
return (c, i) => (m(), g("i", {
|
|
2267
|
+
role: "tooltip",
|
|
2268
|
+
"aria-hidden": "true",
|
|
2269
|
+
"data-gap": "true",
|
|
2270
|
+
ref_key: "_ref",
|
|
2271
|
+
ref: a,
|
|
2272
|
+
class: N(r(F)("db-tooltip", n.class)),
|
|
2273
|
+
id: d.value,
|
|
2274
|
+
"data-emphasis": c.emphasis,
|
|
2275
|
+
"data-animation": r(G)(c.animation ?? !0),
|
|
2276
|
+
"data-delay": c.delay,
|
|
2277
|
+
"data-width": c.width,
|
|
2278
|
+
"data-show-arrow": r(G)(c.showArrow ?? !0),
|
|
2279
|
+
"data-placement": c.placement,
|
|
2280
|
+
onClick: i[0] || (i[0] = async (h) => u(h))
|
|
2281
|
+
}, [
|
|
2282
|
+
I(c.$slots, "default")
|
|
2283
|
+
], 10, xa));
|
|
2284
|
+
}
|
|
2285
|
+
}), en = ["id"], an = { role: "tablist" }, nn = /* @__PURE__ */ A({
|
|
2286
|
+
__name: "tab-list",
|
|
2287
|
+
props: {
|
|
2288
|
+
children: { default: void 0 },
|
|
2289
|
+
className: { default: void 0 },
|
|
2290
|
+
class: {},
|
|
2291
|
+
describedbyid: {},
|
|
2292
|
+
id: { default: void 0 },
|
|
2293
|
+
autofocus: { type: Boolean }
|
|
2294
|
+
},
|
|
2295
|
+
setup(t) {
|
|
2296
|
+
const n = t, d = o(ee), e = o(null);
|
|
2297
|
+
return U(() => {
|
|
2298
|
+
d.value = n.id || "tab-list-" + V();
|
|
2299
|
+
}), (a, u) => (m(), g("div", {
|
|
2300
|
+
ref_key: "_ref",
|
|
2301
|
+
ref: e,
|
|
2302
|
+
id: d.value,
|
|
2303
|
+
class: N(r(F)("db-tab-list", n.class))
|
|
2304
|
+
}, [
|
|
2305
|
+
_("ul", an, [
|
|
2306
|
+
I(a.$slots, "default")
|
|
2307
|
+
])
|
|
2308
|
+
], 10, en));
|
|
2309
|
+
}
|
|
2310
|
+
}), tn = ["id", "aria-labelledby"], dn = /* @__PURE__ */ A({
|
|
2311
|
+
__name: "tab-panel",
|
|
2312
|
+
props: {
|
|
2313
|
+
content: { default: void 0 },
|
|
2314
|
+
children: { default: void 0 },
|
|
2315
|
+
className: { default: void 0 },
|
|
2316
|
+
class: {},
|
|
2317
|
+
describedbyid: {},
|
|
2318
|
+
id: { default: void 0 },
|
|
2319
|
+
autofocus: { type: Boolean },
|
|
2320
|
+
labelledBy: { default: void 0 }
|
|
2321
|
+
},
|
|
2322
|
+
setup(t) {
|
|
2323
|
+
const n = t, d = o(null);
|
|
2324
|
+
return U(() => {
|
|
2325
|
+
}), (e, a) => (m(), g("section", {
|
|
2326
|
+
role: "tabpanel",
|
|
2327
|
+
ref_key: "_ref",
|
|
2328
|
+
ref: d,
|
|
2329
|
+
class: N(r(F)("db-tab-panel", n.class)),
|
|
2330
|
+
id: e.id,
|
|
2331
|
+
"aria-labelledby": e.labelledBy
|
|
2332
|
+
}, [
|
|
2333
|
+
e.content ? (m(), g(T, { key: 0 }, [
|
|
2334
|
+
E(w(e.content), 1)
|
|
2335
|
+
], 64)) : D("", !0),
|
|
2336
|
+
I(e.$slots, "default")
|
|
2337
|
+
], 10, tn));
|
|
2338
|
+
}
|
|
2339
|
+
}), ln = ["id", "data-orientation", "data-scroll-behavior", "data-alignment", "data-width"], Xn = /* @__PURE__ */ A({
|
|
2340
|
+
__name: "tabs",
|
|
2341
|
+
props: {
|
|
2342
|
+
arrowScrollDistance: { default: void 0 },
|
|
2343
|
+
behavior: { default: void 0 },
|
|
2344
|
+
initialSelectedIndex: { default: void 0 },
|
|
2345
|
+
initialSelectedMode: { default: void 0 },
|
|
2346
|
+
name: { default: void 0 },
|
|
2347
|
+
tabs: { default: void 0 },
|
|
2348
|
+
children: { default: void 0 },
|
|
2349
|
+
className: { default: void 0 },
|
|
2350
|
+
class: {},
|
|
2351
|
+
describedbyid: {},
|
|
2352
|
+
id: { default: void 0 },
|
|
2353
|
+
autofocus: { type: Boolean },
|
|
2354
|
+
orientation: { default: void 0 },
|
|
2355
|
+
width: { default: void 0 },
|
|
2356
|
+
alignment: { default: void 0 }
|
|
2357
|
+
},
|
|
2358
|
+
setup(t) {
|
|
2359
|
+
const n = t, d = o("tabs-" + V()), e = o(""), a = o(!1), u = o(!1), l = o(!1), c = o(null), i = o(null);
|
|
2360
|
+
U(() => {
|
|
2361
|
+
d.value = n.id || d.value, e.value = `tabs-${n.name || V()}`, a.value = !0;
|
|
2362
|
+
}), R(
|
|
2363
|
+
() => [i.value, a.value],
|
|
2364
|
+
() => {
|
|
2365
|
+
if (i.value && a.value) {
|
|
2366
|
+
y(), L(!0);
|
|
2367
|
+
const k = i.value.querySelector(".db-tab-list");
|
|
2368
|
+
k && new MutationObserver((p) => {
|
|
2369
|
+
p.forEach(($) => {
|
|
2370
|
+
($.removedNodes.length || $.addedNodes.length) && (y(), L());
|
|
2371
|
+
});
|
|
2372
|
+
}).observe(k, {
|
|
2373
|
+
childList: !0,
|
|
2374
|
+
subtree: !0
|
|
2375
|
+
}), a.value = !1;
|
|
2376
|
+
}
|
|
2377
|
+
},
|
|
2378
|
+
{
|
|
2379
|
+
immediate: !0,
|
|
2380
|
+
flush: "post"
|
|
2381
|
+
}
|
|
2382
|
+
);
|
|
2383
|
+
function h(k) {
|
|
2384
|
+
try {
|
|
2385
|
+
return typeof k == "string" ? JSON.parse(k) : k;
|
|
2386
|
+
} catch (v) {
|
|
2387
|
+
console.error(v);
|
|
2388
|
+
}
|
|
2389
|
+
return [];
|
|
2390
|
+
}
|
|
2391
|
+
function s(k) {
|
|
2392
|
+
const v = k.scrollWidth > k.clientWidth;
|
|
2393
|
+
u.value = v && k.scrollLeft > 1, l.value = v && k.scrollLeft < k.scrollWidth - k.clientWidth;
|
|
2394
|
+
}
|
|
2395
|
+
function B(k) {
|
|
2396
|
+
var p;
|
|
2397
|
+
let v = n.arrowScrollDistance || 100;
|
|
2398
|
+
k && (v *= -1), (p = c.value) == null || p.scrollBy({
|
|
2399
|
+
top: 0,
|
|
2400
|
+
left: v,
|
|
2401
|
+
behavior: "smooth"
|
|
2402
|
+
});
|
|
2403
|
+
}
|
|
2404
|
+
function y() {
|
|
2405
|
+
if (i.value) {
|
|
2406
|
+
const k = i.value.querySelector(".db-tab-list");
|
|
2407
|
+
if (k) {
|
|
2408
|
+
const v = k.querySelector('[role="tablist"]');
|
|
2409
|
+
v && (v.setAttribute(
|
|
2410
|
+
"aria-orientation",
|
|
2411
|
+
n.orientation || "horizontal"
|
|
2412
|
+
), n.behavior === "arrows" && (c.value = v, s(v), v.addEventListener("scroll", () => {
|
|
2413
|
+
s(v);
|
|
2414
|
+
})));
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
function L(k) {
|
|
2419
|
+
if (i.value) {
|
|
2420
|
+
const v = Array.from(
|
|
2421
|
+
i.value.getElementsByClassName("db-tab-item")
|
|
2422
|
+
);
|
|
2423
|
+
for (const $ of v) {
|
|
2424
|
+
const f = v.indexOf($), M = $.querySelector("label"), b = $.querySelector("input");
|
|
2425
|
+
if (b && M) {
|
|
2426
|
+
if (!b.id) {
|
|
2427
|
+
const S = `${e.value}-tab-${f}`;
|
|
2428
|
+
M.setAttribute("for", S), b.setAttribute(
|
|
2429
|
+
"aria-controls",
|
|
2430
|
+
`${e.value}-tab-panel-${f}`
|
|
2431
|
+
), b.id = S, b.setAttribute("name", e.value);
|
|
2432
|
+
}
|
|
2433
|
+
if (k) {
|
|
2434
|
+
const S = !n.initialSelectedMode || n.initialSelectedMode === "auto", C = n.initialSelectedIndex == null && f === 0 || n.initialSelectedIndex === f;
|
|
2435
|
+
S && C && b.click();
|
|
2436
|
+
}
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
const p = Array.from(
|
|
2440
|
+
i.value.querySelectorAll(
|
|
2441
|
+
":is(:scope > .db-tab-panel, :scope > db-tab-panel > .db-tab-panel)"
|
|
2442
|
+
)
|
|
2443
|
+
);
|
|
2444
|
+
for (const $ of p) {
|
|
2445
|
+
if ($.id) continue;
|
|
2446
|
+
const f = p.indexOf($);
|
|
2447
|
+
$.id = `${e.value}-tab-panel-${f}`, $.setAttribute("aria-labelledby", `${e.value}-tab-${f}`);
|
|
2448
|
+
}
|
|
2449
|
+
}
|
|
2450
|
+
}
|
|
2451
|
+
return (k, v) => (m(), g("div", {
|
|
2452
|
+
ref_key: "_ref",
|
|
2453
|
+
ref: i,
|
|
2454
|
+
id: d.value,
|
|
2455
|
+
class: N(r(F)("db-tabs", n.class)),
|
|
2456
|
+
"data-orientation": k.orientation,
|
|
2457
|
+
"data-scroll-behavior": k.behavior,
|
|
2458
|
+
"data-alignment": k.alignment ?? "start",
|
|
2459
|
+
"data-width": k.width ?? "auto"
|
|
2460
|
+
}, [
|
|
2461
|
+
u.value ? (m(), X(te, {
|
|
2462
|
+
key: 0,
|
|
2463
|
+
class: "tabs-scroll-left",
|
|
2464
|
+
variant: "ghost",
|
|
2465
|
+
icon: "chevron_left",
|
|
2466
|
+
noText: !0,
|
|
2467
|
+
onClick: (p) => B(!0)
|
|
2468
|
+
}, {
|
|
2469
|
+
default: z(() => v[0] || (v[0] = [
|
|
2470
|
+
E(" Scroll left ")
|
|
2471
|
+
])),
|
|
2472
|
+
_: 1
|
|
2473
|
+
}, 8, ["onClick"])) : D("", !0),
|
|
2474
|
+
k.tabs ? (m(), g(T, { key: 1 }, [
|
|
2475
|
+
W(nn, null, {
|
|
2476
|
+
default: z(() => [
|
|
2477
|
+
(m(!0), g(T, null, ne(h(k.tabs), (p, $) => (m(), X(Ma, {
|
|
2478
|
+
key: k.name + "tab-item" + $,
|
|
2479
|
+
active: p.active,
|
|
2480
|
+
label: p.label,
|
|
2481
|
+
iconAfter: p.iconAfter,
|
|
2482
|
+
icon: p.icon,
|
|
2483
|
+
noText: p.noText
|
|
2484
|
+
}, null, 8, ["active", "label", "iconAfter", "icon", "noText"]))), 128))
|
|
2485
|
+
]),
|
|
2486
|
+
_: 1
|
|
2487
|
+
}),
|
|
2488
|
+
(m(!0), g(T, null, ne(h(k.tabs), (p, $) => (m(), X(dn, {
|
|
2489
|
+
key: k.name + "tab-panel" + $,
|
|
2490
|
+
content: p.content
|
|
2491
|
+
}, {
|
|
2492
|
+
default: z(() => [
|
|
2493
|
+
E(w(p.children), 1)
|
|
2494
|
+
]),
|
|
2495
|
+
_: 2
|
|
2496
|
+
}, 1032, ["content"]))), 128))
|
|
2497
|
+
], 64)) : D("", !0),
|
|
2498
|
+
l.value ? (m(), X(te, {
|
|
2499
|
+
key: 2,
|
|
2500
|
+
class: "tabs-scroll-right",
|
|
2501
|
+
variant: "ghost",
|
|
2502
|
+
icon: "chevron_right",
|
|
2503
|
+
noText: !0,
|
|
2504
|
+
onClick: (p) => B()
|
|
2505
|
+
}, {
|
|
2506
|
+
default: z(() => v[1] || (v[1] = [
|
|
2507
|
+
E(" Scroll right ")
|
|
2508
|
+
])),
|
|
2509
|
+
_: 1
|
|
2510
|
+
}, 8, ["onClick"])) : D("", !0),
|
|
2511
|
+
I(k.$slots, "default")
|
|
2512
|
+
], 10, ln));
|
|
2513
|
+
}
|
|
2514
|
+
}), Hn = ["adaptive", "neutral", "critical", "informational", "warning", "successful"], jn = ["medium", "small", "large", "none"], Yn = ["medium", "small", "large", "none"], Kn = ["left", "right", "top", "bottom", "left-start", "left-end", "right-start", "right-end", "top-start", "top-end", "bottom-start", "bottom-end"], Jn = ["none", "3x-large", "2x-large", "x-large", "large", "medium", "small", "x-small", "2x-small", "3x-small"], Qn = ["horizontal", "vertical"], Zn = ["full", "auto"], xn = ["full", "medium", "large", "small"], et = ["none", "slow", "fast"], at = ["auto", "fixed"], nt = ["small", "medium"], sn = ["weak", "strong"], tt = [...sn, "origin"], dt = ["invalid", "valid", "no-validation"], it = ["above", "floating"], lt = ["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"], st = ["time", "true", "false", "date", "page", "step", "location"], ot = ["_self", "_blank", "_parent", "_top"], ut = ["no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "same-origin", "strict-origin", "strict-origin-when-cross-origin", "unsafe-url"], rt = ["start", "center"], on = ["id", "data-gap", "data-variant", "data-direction", "data-alignment", "data-justify-content", "data-wrap"], ft = /* @__PURE__ */ A({
|
|
2515
|
+
__name: "stack",
|
|
2516
|
+
props: {
|
|
2517
|
+
variant: { default: void 0 },
|
|
2518
|
+
direction: { default: void 0 },
|
|
2519
|
+
wrap: { type: Boolean, default: void 0 },
|
|
2520
|
+
alignment: { default: void 0 },
|
|
2521
|
+
justifyContent: { default: void 0 },
|
|
2522
|
+
children: { default: void 0 },
|
|
2523
|
+
className: { default: void 0 },
|
|
2524
|
+
class: {},
|
|
2525
|
+
describedbyid: {},
|
|
2526
|
+
id: { default: void 0 },
|
|
2527
|
+
autofocus: { type: Boolean },
|
|
2528
|
+
gap: { default: void 0 }
|
|
2529
|
+
},
|
|
2530
|
+
setup(t) {
|
|
2531
|
+
const n = t, d = o(null);
|
|
2532
|
+
return (e, a) => (m(), g("div", {
|
|
2533
|
+
ref_key: "_ref",
|
|
2534
|
+
ref: d,
|
|
2535
|
+
id: e.id,
|
|
2536
|
+
class: N(r(F)("db-stack", n.class)),
|
|
2537
|
+
"data-gap": e.gap,
|
|
2538
|
+
"data-variant": e.variant,
|
|
2539
|
+
"data-direction": e.direction,
|
|
2540
|
+
"data-alignment": e.alignment,
|
|
2541
|
+
"data-justify-content": e.justifyContent,
|
|
2542
|
+
"data-wrap": r(G)(e.wrap)
|
|
2543
|
+
}, [
|
|
2544
|
+
I(e.$slots, "default")
|
|
2545
|
+
], 10, on));
|
|
2546
|
+
}
|
|
2547
|
+
});
|
|
2548
|
+
export {
|
|
2549
|
+
rt as AlignmentList,
|
|
2550
|
+
lt as AutoCompleteList,
|
|
2551
|
+
he as COLOR,
|
|
2552
|
+
yn as COLORS,
|
|
2553
|
+
Bn as COLORS_SIMPLE,
|
|
2554
|
+
bn as COLOR_CONST,
|
|
2555
|
+
pe as COLOR_SIMPLE,
|
|
2556
|
+
Vn as DBAccordion,
|
|
2557
|
+
Ya as DBAccordionItem,
|
|
2558
|
+
_n as DBBadge,
|
|
2559
|
+
$n as DBBrand,
|
|
2560
|
+
te as DBButton,
|
|
2561
|
+
Ln as DBCard,
|
|
2562
|
+
En as DBCheckbox,
|
|
2563
|
+
An as DBDivider,
|
|
2564
|
+
Ye as DBDrawer,
|
|
2565
|
+
Nn as DBHeader,
|
|
2566
|
+
Fn as DBIcon,
|
|
2567
|
+
O as DBInfotext,
|
|
2568
|
+
Tn as DBInput,
|
|
2569
|
+
Sn as DBLink,
|
|
2570
|
+
qn as DBNavigation,
|
|
2571
|
+
Gn as DBNavigationItem,
|
|
2572
|
+
In as DBNotification,
|
|
2573
|
+
Cn as DBPage,
|
|
2574
|
+
Wn as DBPopover,
|
|
2575
|
+
Dn as DBRadio,
|
|
2576
|
+
Mn as DBSection,
|
|
2577
|
+
Rn as DBSelect,
|
|
2578
|
+
ft as DBStack,
|
|
2579
|
+
zn as DBSwitch,
|
|
2580
|
+
Ma as DBTabItem,
|
|
2581
|
+
nn as DBTabList,
|
|
2582
|
+
dn as DBTabPanel,
|
|
2583
|
+
Xn as DBTabs,
|
|
2584
|
+
Un as DBTag,
|
|
2585
|
+
Pn as DBTextarea,
|
|
2586
|
+
On as DBTooltip,
|
|
2587
|
+
$e as DEFAULT_BACK,
|
|
2588
|
+
Le as DEFAULT_BURGER_MENU,
|
|
2589
|
+
ce as DEFAULT_CLOSE_BUTTON,
|
|
2590
|
+
ue as DEFAULT_DATALIST_ID_SUFFIX,
|
|
2591
|
+
Ee as DEFAULT_ICON,
|
|
2592
|
+
ee as DEFAULT_ID,
|
|
2593
|
+
x as DEFAULT_INVALID_MESSAGE,
|
|
2594
|
+
Q as DEFAULT_INVALID_MESSAGE_ID_SUFFIX,
|
|
2595
|
+
le as DEFAULT_LABEL,
|
|
2596
|
+
K as DEFAULT_MESSAGE_ID_SUFFIX,
|
|
2597
|
+
fe as DEFAULT_PLACEHOLDER,
|
|
2598
|
+
oe as DEFAULT_PLACEHOLDER_ID_SUFFIX,
|
|
2599
|
+
Ae as DEFAULT_ROWS,
|
|
2600
|
+
Z as DEFAULT_VALID_MESSAGE,
|
|
2601
|
+
J as DEFAULT_VALID_MESSAGE_ID_SUFFIX,
|
|
2602
|
+
Ne as DEFAULT_VIEWPORT,
|
|
2603
|
+
gn as DENSITIES,
|
|
2604
|
+
ve as DENSITY,
|
|
2605
|
+
mn as DENSITY_CONST,
|
|
2606
|
+
Fe as DESKTOP_VIEWPORT,
|
|
2607
|
+
sn as EmphasisList,
|
|
2608
|
+
Jn as GapSpacingList,
|
|
2609
|
+
it as LabelVariantList,
|
|
2610
|
+
st as LinkCurrentList,
|
|
2611
|
+
ut as LinkReferrerPolicyList,
|
|
2612
|
+
ot as LinkTargetList,
|
|
2613
|
+
Yn as MarginList,
|
|
2614
|
+
xn as MaxWidthList,
|
|
2615
|
+
Je as NavigationItemSafeTriangle,
|
|
2616
|
+
Qn as OrientationList,
|
|
2617
|
+
Kn as PlacementList,
|
|
2618
|
+
et as PopoverDelayList,
|
|
2619
|
+
at as PopoverWidthList,
|
|
2620
|
+
me as SEMANTIC,
|
|
2621
|
+
kn as SEMANTICS,
|
|
2622
|
+
Hn as SemanticList,
|
|
2623
|
+
nt as SizeList,
|
|
2624
|
+
jn as SpacingList,
|
|
2625
|
+
wn as TESTING_VIEWPORTS,
|
|
2626
|
+
tt as TagEmphasisList,
|
|
2627
|
+
dt as ValidationList,
|
|
2628
|
+
Zn as WidthList,
|
|
2629
|
+
re as addAttributeToChildren,
|
|
2630
|
+
F as cls,
|
|
2631
|
+
H as delay,
|
|
2632
|
+
cn as filterPassingProps,
|
|
2633
|
+
G as getBooleanAsString,
|
|
2634
|
+
P as getHideProp,
|
|
2635
|
+
vn as getRootProps,
|
|
2636
|
+
se as handleDataOutside,
|
|
2637
|
+
Y as hasVoiceOver,
|
|
2638
|
+
we as isArrayOfStrings,
|
|
2639
|
+
Ke as isEventTargetNavigationItem,
|
|
2640
|
+
ke as isInView,
|
|
2641
|
+
q as stringPropVisible,
|
|
2642
|
+
V as uuid,
|
|
2643
|
+
pn as visibleInVX,
|
|
2644
|
+
hn as visibleInVY
|
|
2645
|
+
};
|