@vergelijkdirect/comparison-forms 2.0.0-rc.12 → 2.0.0-rc.14

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.
Files changed (36) hide show
  1. package/dist/wc/comparison-forms.js +241 -219
  2. package/dist/wc-forms/VdInput-PLH7DZsc.js +331 -0
  3. package/dist/wc-forms/VdPopover-CcRVedXS.js +285 -0
  4. package/dist/wc-forms/VdRadioGroup-BsMaGEuY.js +166 -0
  5. package/dist/wc-forms/VdSearchableSelect-CY7qBcIO.js +4516 -0
  6. package/dist/wc-forms/VdSelect-BPB3Jh_f.js +108 -0
  7. package/dist/wc-forms/bike.js +1647 -0
  8. package/dist/wc-forms/birthdate.schema-DGsq2GQR.js +89 -0
  9. package/dist/wc-forms/business-car.js +109 -0
  10. package/dist/wc-forms/business-liability.js +71 -0
  11. package/dist/wc-forms/car.js +112 -0
  12. package/dist/wc-forms/caravan.js +144 -0
  13. package/dist/wc-forms/company.schema-CUG4hnMP.js +239 -0
  14. package/dist/wc-forms/date.util-D9xNHiuY.js +474 -0
  15. package/dist/wc-forms/familyComposition.schema-fY4w6P1J.js +74 -0
  16. package/dist/wc-forms/floating-ui.dom-B6uyM6oK.js +856 -0
  17. package/dist/wc-forms/house.js +101 -0
  18. package/dist/wc-forms/houseOwnedBuilding.model-CPULUrWv.js +14 -0
  19. package/dist/wc-forms/legal.js +153 -0
  20. package/dist/wc-forms/liability.js +89 -0
  21. package/dist/wc-forms/loan.js +173 -0
  22. package/dist/wc-forms/messages-kbFdNTrA.js +40 -0
  23. package/dist/wc-forms/moped.js +115 -0
  24. package/dist/wc-forms/motor.js +112 -0
  25. package/dist/wc-forms/package.js +119 -0
  26. package/dist/wc-forms/pet.js +158 -0
  27. package/dist/wc-forms/rolldown-runtime-Dqa2HsxW.js +20 -0
  28. package/dist/wc-forms/rules-Cj1sWDmF.js +13 -0
  29. package/dist/wc-forms/services-CG6XsnRT.js +16 -0
  30. package/dist/wc-forms/travel.js +99 -0
  31. package/dist/wc-forms/useAddress-LSZ7sQk9.js +243 -0
  32. package/dist/wc-forms/useLicensePlate-KLwykzxF.js +187 -0
  33. package/dist/wc-forms/useValidator-DdXn8soU.js +7197 -0
  34. package/dist/wc-forms/yesNo-BvJlCm7Y.js +6 -0
  35. package/dist/wc-noitc/comparison-forms.js +2 -2
  36. package/package.json +7 -4
@@ -0,0 +1,331 @@
1
+ import { Gt as e, Jt as t, Kt as n, On as r, Un as i, Xn as a, Yt as o, fr as s, in as c, kt as l, li as u, lr as d, oi as f, ri as p, tn as m, ur as h, wr as g } from "./useValidator-DdXn8soU.js";
2
+ //#region node_modules/maska/dist/maska.mjs
3
+ var _ = Object.defineProperty, v = (e, t, n) => t in e ? _(e, t, {
4
+ enumerable: !0,
5
+ configurable: !0,
6
+ writable: !0,
7
+ value: n
8
+ }) : e[t] = n, y = (e, t, n) => v(e, typeof t == "symbol" ? t : t + "", n), b = {
9
+ "#": { pattern: /[0-9]/ },
10
+ "@": { pattern: /[a-zA-Z]/ },
11
+ "*": { pattern: /[a-zA-Z0-9]/ }
12
+ }, x = (e, t, n) => e.replaceAll(t, "").replace(n, ".").replace("..", ".").replace(/[^.\d]/g, ""), S = (e, t, n) => new Intl.NumberFormat(n.number?.locale ?? "en", {
13
+ minimumFractionDigits: e,
14
+ maximumFractionDigits: t,
15
+ roundingMode: "trunc"
16
+ }), C = (e, t = !0, n) => {
17
+ let r = n.number?.unsigned !== !0 && e.startsWith("-") ? "-" : "", i = n.number?.fraction ?? 0, a = S(0, i, n), o = a.formatToParts(1000.12), s = o.find((e) => e.type === "group")?.value ?? " ", c = o.find((e) => e.type === "decimal")?.value ?? ".", l = x(e, s, c);
18
+ if (Number.isNaN(parseFloat(l))) return r;
19
+ let u = l.split(".");
20
+ u[1] != null && u[1].length >= 1 && (a = S(u[1].length <= i ? u[1].length : i, i, n));
21
+ let d = a.format(parseFloat(l));
22
+ return t ? i > 0 && l.endsWith(".") && !l.slice(0, -1).includes(".") && (d += c) : d = x(d, s, c), r + d;
23
+ }, w = (e) => JSON.parse(e.replaceAll("'", "\"")), T = (e, t = {}) => {
24
+ let n = { ...t };
25
+ e.dataset.maska != null && e.dataset.maska !== "" && (n.mask = D(e.dataset.maska)), e.dataset.maskaEager != null && (n.eager = E(e.dataset.maskaEager)), e.dataset.maskaReversed != null && (n.reversed = E(e.dataset.maskaReversed)), e.dataset.maskaTokensReplace != null && (n.tokensReplace = E(e.dataset.maskaTokensReplace)), e.dataset.maskaTokens != null && (n.tokens = O(e.dataset.maskaTokens));
26
+ let r = {};
27
+ return e.dataset.maskaNumberLocale != null && (r.locale = e.dataset.maskaNumberLocale), e.dataset.maskaNumberFraction != null && (r.fraction = parseInt(e.dataset.maskaNumberFraction)), e.dataset.maskaNumberUnsigned != null && (r.unsigned = E(e.dataset.maskaNumberUnsigned)), (e.dataset.maskaNumber != null || Object.values(r).length > 0) && (n.number = r), n;
28
+ }, E = (e) => e === "" || !!JSON.parse(e), D = (e) => e.startsWith("[") && e.endsWith("]") ? w(e) : e, O = (e) => {
29
+ if (e.startsWith("{") && e.endsWith("}")) return w(e);
30
+ let t = {};
31
+ return e.split("|").forEach((e) => {
32
+ let n = e.split(":");
33
+ t[n[0]] = {
34
+ pattern: k() ? new RegExp(n[1], "u") : new RegExp(n[1]),
35
+ optional: n[2] === "optional",
36
+ multiple: n[2] === "multiple",
37
+ repeated: n[2] === "repeated"
38
+ };
39
+ }), t;
40
+ }, k = () => {
41
+ try {
42
+ return !0;
43
+ } catch {
44
+ return !1;
45
+ }
46
+ }, A = class {
47
+ constructor(e = {}) {
48
+ y(this, "opts", {}), y(this, "memo", /* @__PURE__ */ new Map());
49
+ let t = { ...e };
50
+ if (t.tokens != null) {
51
+ t.tokens = t.tokensReplace ? { ...t.tokens } : {
52
+ ...b,
53
+ ...t.tokens
54
+ };
55
+ for (let e of Object.values(t.tokens)) typeof e.pattern == "string" && (e.pattern = k() ? new RegExp(e.pattern, "u") : new RegExp(e.pattern));
56
+ } else t.tokens = b;
57
+ Array.isArray(t.mask) && (t.mask.length > 1 ? t.mask = [...t.mask].sort((e, t) => e.length - t.length) : t.mask = t.mask[0] ?? ""), t.mask === "" && (t.mask = null), this.opts = t;
58
+ }
59
+ masked(e) {
60
+ return this.process(String(e), this.findMask(String(e)));
61
+ }
62
+ unmasked(e) {
63
+ return this.process(String(e), this.findMask(String(e)), !1);
64
+ }
65
+ isEager() {
66
+ return this.opts.eager === !0;
67
+ }
68
+ isReversed() {
69
+ return this.opts.reversed === !0;
70
+ }
71
+ completed(e) {
72
+ let t = this.findMask(String(e));
73
+ if (this.opts.mask == null || t == null) return !1;
74
+ let n = this.process(String(e), t).length;
75
+ return typeof this.opts.mask == "string" ? n >= this.opts.mask.length : n >= t.length;
76
+ }
77
+ findMask(e) {
78
+ let t = this.opts.mask;
79
+ if (t == null) return null;
80
+ if (typeof t == "string") return t;
81
+ if (typeof t == "function") return t(e);
82
+ let n = this.process(e, t.slice(-1).pop() ?? "", !1);
83
+ return t.find((t) => this.process(e, t, !1).length >= n.length) ?? "";
84
+ }
85
+ escapeMask(e) {
86
+ let t = [], n = [];
87
+ return e.split("").forEach((r, i) => {
88
+ r === "!" && e[i - 1] !== "!" ? n.push(i - n.length) : t.push(r);
89
+ }), {
90
+ mask: t.join(""),
91
+ escaped: n
92
+ };
93
+ }
94
+ process(e, t, n = !0) {
95
+ if (this.opts.number != null) return C(e, n, this.opts);
96
+ if (t == null) return e;
97
+ let r = `v=${e},mr=${t},m=${+!!n}`;
98
+ if (this.memo.has(r)) return this.memo.get(r);
99
+ let { mask: i, escaped: a } = this.escapeMask(t), o = [], s = this.opts.tokens == null ? {} : this.opts.tokens, c = this.isReversed() ? -1 : 1, l = this.isReversed() ? "unshift" : "push", u = this.isReversed() ? 0 : i.length - 1, d = this.isReversed() ? () => h > -1 && g > -1 : () => h < i.length && g < e.length, f = (e) => !this.isReversed() && e <= u || this.isReversed() && e >= u, p, m = -1, h = this.isReversed() ? i.length - 1 : 0, g = this.isReversed() ? e.length - 1 : 0, _ = !1;
100
+ for (; d();) {
101
+ let t = i.charAt(h), r = s[t], d = r?.transform == null ? e.charAt(g) : r.transform(e.charAt(g));
102
+ if (!a.includes(h) && r != null ? (d.match(r.pattern) == null ? r.multiple ? _ &&= (h += c, g -= c, !1) : d === p ? p = void 0 : r.optional && (h += c, g -= c) : (o[l](d), r.repeated ? (m === -1 ? m = h : h === u && h !== m && (h = m - c), u === m && (h -= c)) : r.multiple && (_ = !0, h -= c), h += c), g += c) : (n && !this.isEager() && o[l](t), d === t && !this.isEager() ? g += c : p = t, this.isEager() || (h += c)), this.isEager()) for (; f(h) && (s[i.charAt(h)] == null || a.includes(h));) {
103
+ if (n) {
104
+ if (o[l](i.charAt(h)), e.charAt(g) === i.charAt(h)) {
105
+ h += c, g += c;
106
+ continue;
107
+ }
108
+ } else i.charAt(h) === e.charAt(g) && (g += c);
109
+ h += c;
110
+ }
111
+ }
112
+ return this.memo.set(r, o.join("")), this.memo.get(r);
113
+ }
114
+ }, j = class {
115
+ constructor(e, t = {}) {
116
+ y(this, "items", /* @__PURE__ */ new Map()), y(this, "eventAbortController"), y(this, "onInput", (e) => {
117
+ if (e instanceof CustomEvent && e.type === "input" && !e.isTrusted && !e.bubbles) return;
118
+ let t = e.target, n = this.items.get(t);
119
+ if (n === void 0) return;
120
+ let r = "inputType" in e && e.inputType.startsWith("delete"), i = n.isEager(), a = r && i && n.unmasked(t.value) === "" ? "" : t.value;
121
+ this.fixCursor(t, r, () => this.setValue(t, a));
122
+ }), this.options = t, this.eventAbortController = new AbortController(), this.init(this.getInputs(e));
123
+ }
124
+ update(e = {}) {
125
+ this.options = { ...e }, this.init(Array.from(this.items.keys()));
126
+ }
127
+ updateValue(e) {
128
+ e.value !== "" && e.value !== this.processInput(e)?.masked && this.setValue(e, e.value);
129
+ }
130
+ destroy() {
131
+ this.eventAbortController.abort(), this.items.clear();
132
+ }
133
+ init(e) {
134
+ let t = this.getOptions(this.options);
135
+ for (let n of e) {
136
+ if (!this.items.has(n)) {
137
+ let { signal: e } = this.eventAbortController;
138
+ n.addEventListener("input", this.onInput, {
139
+ capture: !0,
140
+ signal: e
141
+ });
142
+ }
143
+ let e = new A(T(n, t));
144
+ this.items.set(n, e), queueMicrotask(() => this.updateValue(n)), n.selectionStart === null && e.isEager() && console.warn("Maska: input of `%s` type is not supported", n.type);
145
+ }
146
+ }
147
+ getInputs(e) {
148
+ return typeof e == "string" ? Array.from(document.querySelectorAll(e)) : "length" in e ? Array.from(e) : [e];
149
+ }
150
+ getOptions(e) {
151
+ let { onMaska: t, preProcess: n, postProcess: r, ...i } = e;
152
+ return i;
153
+ }
154
+ fixCursor(e, t, n) {
155
+ let r = e.selectionStart, i = e.value;
156
+ if (n(), r === null || r === i.length && !t) return;
157
+ let a = e.value, o = i.slice(0, r), s = a.slice(0, r), c = this.processInput(e, o)?.unmasked, l = this.processInput(e, s)?.unmasked;
158
+ if (c === void 0 || l === void 0) return;
159
+ let u = r;
160
+ o !== s && (u += t ? a.length - i.length : c.length - l.length), e.setSelectionRange(u, u);
161
+ }
162
+ setValue(e, t) {
163
+ let n = this.processInput(e, t);
164
+ n !== void 0 && (e.value = n.masked, this.options.onMaska != null && (Array.isArray(this.options.onMaska) ? this.options.onMaska.forEach((e) => e(n)) : this.options.onMaska(n)), e.dispatchEvent(new CustomEvent("maska", { detail: n })), e.dispatchEvent(new CustomEvent("input", { detail: n.masked })));
165
+ }
166
+ processInput(e, t) {
167
+ let n = this.items.get(e);
168
+ if (n === void 0) return;
169
+ let r = t ?? e.value;
170
+ this.options.preProcess != null && (r = this.options.preProcess(r));
171
+ let i = n.masked(r);
172
+ return this.options.postProcess != null && (i = this.options.postProcess(i)), {
173
+ masked: i,
174
+ unmasked: n.unmasked(r),
175
+ completed: n.completed(r)
176
+ };
177
+ }
178
+ }, M = /* @__PURE__ */ new WeakMap(), N = (e, t) => {
179
+ if (e.arg == null || e.instance == null) return;
180
+ let n = "setup" in e.instance.$.type;
181
+ e.arg in e.instance ? e.instance[e.arg] = t : n && console.warn("Maska: please expose `%s` using defineExpose", e.arg);
182
+ }, P = (e, t) => {
183
+ var n;
184
+ let r = e instanceof HTMLInputElement ? e : e.querySelector("input");
185
+ if (r == null || r?.type === "file") return;
186
+ let i = {};
187
+ if (t.value != null && (i = typeof t.value == "string" ? { mask: t.value } : { ...t.value }), t.arg != null) {
188
+ let e = (e) => {
189
+ N(t, t.modifiers.unmasked ? e.unmasked : t.modifiers.completed ? e.completed : e.masked);
190
+ };
191
+ i.onMaska = i.onMaska == null ? e : Array.isArray(i.onMaska) ? [...i.onMaska, e] : [i.onMaska, e];
192
+ }
193
+ M.has(r) ? (n = M.get(r)) == null || n.update(i) : M.set(r, new j(r, i));
194
+ }, F = { class: "vd-field" }, I = ["for"], L = {
195
+ key: 0,
196
+ class: "vd-field__asterisk"
197
+ }, R = {
198
+ key: 1,
199
+ class: "vd-field__popover"
200
+ }, z = [
201
+ "id",
202
+ "value",
203
+ "type",
204
+ "name",
205
+ "inputmode",
206
+ "placeholder",
207
+ "disabled",
208
+ "readonly",
209
+ "autocomplete"
210
+ ], B = {
211
+ key: 0,
212
+ class: "vd-field__icon-and-loader"
213
+ }, V = {
214
+ key: 0,
215
+ class: "vd-field__icon vd-field__icon--with-loader"
216
+ }, H = { key: 1 }, U = {
217
+ key: 0,
218
+ class: "vd-field__loader-circle"
219
+ }, W = {
220
+ key: 0,
221
+ class: "vd-field__message vd-field__message--error"
222
+ }, G = {
223
+ key: 1,
224
+ class: "vd-field__message vd-field__message--information"
225
+ }, K = /* @__PURE__ */ c({
226
+ __name: "VdInput",
227
+ props: /*@__PURE__*/ r({
228
+ id: { default: null },
229
+ name: {},
230
+ type: { default: "text" },
231
+ label: { default: "" },
232
+ placeholder: { default: "" },
233
+ errorMessage: { default: null },
234
+ disabled: {
235
+ type: Boolean,
236
+ default: !1
237
+ },
238
+ readonly: {
239
+ type: Boolean,
240
+ default: !1
241
+ },
242
+ required: {
243
+ type: Boolean,
244
+ default: !0
245
+ },
246
+ verified: {
247
+ type: Boolean,
248
+ default: !1
249
+ },
250
+ mask: { default: "" },
251
+ autocomplete: {
252
+ type: Boolean,
253
+ default: !1
254
+ },
255
+ infoMessage: { default: "" },
256
+ icon: { default: "" },
257
+ iconLeft: {
258
+ type: Boolean,
259
+ default: !1
260
+ },
261
+ capitalize: {
262
+ type: Boolean,
263
+ default: !1
264
+ },
265
+ hasError: {
266
+ type: [Boolean, null],
267
+ default: null
268
+ },
269
+ loading: {
270
+ type: Boolean,
271
+ default: !1
272
+ },
273
+ inputmode: { default: void 0 }
274
+ }, {
275
+ modelValue: { required: !0 },
276
+ modelModifiers: {}
277
+ }),
278
+ emits: /*@__PURE__*/ r(["blur", "change"], ["update:modelValue"]),
279
+ setup(r, { emit: c }) {
280
+ let _ = r, v = h(r, "modelValue"), y = c, b = s(), x = _.id ?? d(), S = (e) => _.capitalize ? e.toUpperCase() : e, C = e(() => !_.errorMessage && !_.verified && !_.hasError), w = e(() => !!v.value && !_.errorMessage && _.verified && !_.hasError && !_.loading), T = e(() => !!_.errorMessage || !!_.hasError), E = e(() => !!_.errorMessage || !!b.errorMessage), D = (e) => {
281
+ v.value = S(e.target.value);
282
+ }, O = (e) => {
283
+ y("blur", S(e.target.value));
284
+ }, k = (e) => {
285
+ y("change", S(e.target.value));
286
+ };
287
+ return (e, s) => (i(), o("div", F, [
288
+ n("div", {
289
+ class: f(["vd-field__label-wrapper", { "vd-field__label-wrapper--disabled": r.disabled }]),
290
+ onClick: s[0] ||= l(() => {}, ["prevent"])
291
+ }, [r.label || p(b).label ? (i(), o("label", {
292
+ key: 0,
293
+ for: r.name,
294
+ class: "vd-field__label"
295
+ }, [n("span", null, [a(e.$slots, "label", {}, () => [m(u(r.label), 1)]), r.required ? (i(), o("span", L, "*")) : t("", !0)])], 8, I)) : t("", !0), p(b).popover ? (i(), o("span", R, [a(e.$slots, "popover")])) : t("", !0)], 2),
296
+ n("div", { class: f(["vd-field__wrapper", { "vd-field__wrapper-checkmark": w.value && !(r.icon || p(b).icon) }]) }, [g(n("input", {
297
+ id: p(x),
298
+ value: v.value,
299
+ type: r.type,
300
+ name: r.name,
301
+ inputmode: r.inputmode,
302
+ placeholder: r.placeholder,
303
+ disabled: r.disabled,
304
+ readonly: r.readonly,
305
+ autocomplete: r.autocomplete ? "off" : "on",
306
+ class: f(["vd-field__input", {
307
+ "vd-field__input--verified": w.value,
308
+ "vd-field__input--default": C.value,
309
+ "vd-field__input--error": T.value,
310
+ "vd-field__input--icon-left": (r.icon || p(b).icon) && r.iconLeft,
311
+ "vd-field__input--icon-right": (r.icon || p(b).icon) && !r.iconLeft,
312
+ "vd-field__input--loading": r.loading,
313
+ "vd-field__input--loading vd-field__input--icon": r.loading && !r.iconLeft && (r.icon || p(b).icon)
314
+ }]),
315
+ onInput: D,
316
+ onChange: k,
317
+ onBlur: O
318
+ }, null, 42, z), [[p(P), r.mask || void 0]]), r.loading && r.icon && !r.iconLeft ? (i(), o("div", B, [s[1] ||= n("div", { class: "vd-field__loader-circle vd-field__loader-circle--and-icon" }, null, -1), r.icon || p(b).icon ? (i(), o("span", V, [a(e.$slots, "icon", {}, () => [n("i", { class: f(r.icon) }, null, 2)])])) : t("", !0)])) : (i(), o("div", H, [r.loading ? (i(), o("div", U)) : t("", !0), r.icon || p(b).icon ? (i(), o("span", {
319
+ key: 1,
320
+ class: f(["vd-field__icon", {
321
+ "vd-field__icon--left": r.iconLeft,
322
+ "vd-field__icon--disabled": r.disabled
323
+ }])
324
+ }, [a(e.$slots, "icon", {}, () => [n("i", { class: f(r.icon) }, null, 2)])], 2)) : t("", !0)]))], 2),
325
+ E.value || p(b).errorMessage ? (i(), o("div", W, [a(e.$slots, "errorMessage", {}, () => [s[2] ||= n("i", { class: "fas fa-exclamation-circle vd-field__message-icon" }, null, -1), m(" " + u(r.errorMessage), 1)])])) : t("", !0),
326
+ r.infoMessage || p(b).information ? (i(), o("div", G, [a(e.$slots, "information", {}, () => [s[3] ||= n("i", { class: "fas fa-info-circle vd-field__message-icon" }, null, -1), m(" " + u(r.infoMessage), 1)])])) : t("", !0)
327
+ ]));
328
+ }
329
+ });
330
+ //#endregion
331
+ export { K as t };
@@ -0,0 +1,285 @@
1
+ import { Gt as e, Hr as t, Jt as n, Kt as r, Pr as i, Un as a, Xn as o, Xr as s, Yr as c, Yt as l, _r as u, ci as d, in as f, kt as p, li as m, nn as h, oi as g, qr as _, qt as v, ri as y, ti as b } from "./useValidator-DdXn8soU.js";
2
+ import { c as x, d as S, i as C, n as w, r as T, s as E, u as D } from "./floating-ui.dom-B6uyM6oK.js";
3
+ //#region src/components/ui/popover/VdPopoverHeader.vue?vue&type=script&setup=true&lang.ts
4
+ var O = { class: "vd-popover__title" }, k = {
5
+ key: 0,
6
+ class: "vd-popover__title-icon"
7
+ }, A = { key: 1 }, j = /* @__PURE__ */ f({
8
+ __name: "VdPopoverHeader",
9
+ props: {
10
+ title: { default: "" },
11
+ icon: { default: "" }
12
+ },
13
+ emits: ["close"],
14
+ setup(e, { emit: t }) {
15
+ let i = t, s = () => {
16
+ i("close");
17
+ };
18
+ return (t, i) => (a(), l("div", { class: g(["vd-popover__header", { "vd-popover__header--only-close-icon": !e.title }]) }, [e.title ? o(t.$slots, "default", { key: 0 }, () => [r("div", O, [e.icon ? (a(), l("div", k, [r("i", { class: g(e.icon) }, null, 2)])) : n("", !0), e.title ? (a(), l("span", A, m(e.title), 1)) : n("", !0)])]) : n("", !0), r("button", {
19
+ class: "vd-popover__close-btn",
20
+ onClick: s
21
+ }, [...i[0] ||= [r("i", { class: "far fa-times vd-popover__close-btn-icon" }, null, -1)]])], 2));
22
+ }
23
+ }), M = ["innerHTML"], N = /* @__PURE__ */ f({
24
+ __name: "VdPopoverTooltip",
25
+ props: {
26
+ content: { default: () => ({
27
+ title: "",
28
+ description: ""
29
+ }) },
30
+ variant: { default: void 0 },
31
+ size: { default: void 0 },
32
+ hideHeaderTooltip: {
33
+ type: Boolean,
34
+ default: !1
35
+ },
36
+ headerIconTooltip: { default: "" }
37
+ },
38
+ emits: ["close"],
39
+ setup(e, { emit: t }) {
40
+ let r = t, i = () => {
41
+ r("close");
42
+ };
43
+ return (t, r) => (a(), l("div", {
44
+ class: g(["vd-popover__tooltip", [e.size ? `vd-popover__tooltip--${e.size}` : "", e.variant ? `vd-popover__tooltip--${e.variant}` : ""]]),
45
+ onPointerdown: r[0] ||= p(() => {}, ["prevent"])
46
+ }, [e.hideHeaderTooltip ? n("", !0) : (a(), v(j, {
47
+ key: 0,
48
+ title: e.content.title,
49
+ icon: e.headerIconTooltip,
50
+ onClose: i
51
+ }, null, 8, ["title", "icon"])), e.content && e.content.description ? (a(), l("p", {
52
+ key: 1,
53
+ class: "vd-popover__description",
54
+ innerHTML: e.content.description
55
+ }, null, 8, M)) : n("", !0)], 34));
56
+ }
57
+ }), P = { key: 1 }, F = /* @__PURE__ */ f({
58
+ __name: "VdPopoverReference",
59
+ props: {
60
+ label: { default: "" },
61
+ icon: { default: "fas fa-info-circle" },
62
+ variant: { default: void 0 },
63
+ iconLeft: {
64
+ type: Boolean,
65
+ default: !1
66
+ }
67
+ },
68
+ setup(e) {
69
+ return (t, r) => (a(), l("span", { class: g(["vd-popover__reference", [e.variant ? `vd-popover__reference--${e.variant}` : ""]]) }, [
70
+ e.iconLeft ? (a(), l("i", {
71
+ key: 0,
72
+ class: g(e.icon)
73
+ }, null, 2)) : n("", !0),
74
+ e.label ? (a(), l("span", P, m(e.label), 1)) : n("", !0),
75
+ e.iconLeft ? n("", !0) : (a(), l("i", {
76
+ key: 2,
77
+ class: g(e.icon)
78
+ }, null, 2))
79
+ ], 2));
80
+ }
81
+ });
82
+ //#endregion
83
+ //#region node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs
84
+ function I(e) {
85
+ return typeof e == "object" && !!e && "$el" in e;
86
+ }
87
+ function L(e) {
88
+ if (I(e)) {
89
+ let t = e.$el;
90
+ return S(t) && D(t) === "#comment" ? null : t;
91
+ }
92
+ return e;
93
+ }
94
+ function R(e) {
95
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
96
+ }
97
+ function z(e, t) {
98
+ let n = R(e);
99
+ return Math.round(t * n) / n;
100
+ }
101
+ function B(n, r, a) {
102
+ a === void 0 && (a = {});
103
+ let o = a.whileElementsMounted, l = e(() => b(a.open) ?? !0), d = e(() => b(a.middleware)), f = e(() => b(a.placement) ?? "bottom"), p = e(() => b(a.strategy) ?? "absolute"), m = e(() => b(a.transform) ?? !0), h = e(() => L(n.value)), g = e(() => L(r.value)), v = _(0), y = _(0), x = _(p.value), S = _(f.value), C = s({}), w = _(!1), E = e(() => {
104
+ let e = {
105
+ position: x.value,
106
+ left: "0",
107
+ top: "0"
108
+ };
109
+ if (!g.value) return e;
110
+ let t = z(g.value, v.value), n = z(g.value, y.value);
111
+ return m.value ? {
112
+ ...e,
113
+ transform: "translate(" + t + "px, " + n + "px)",
114
+ ...R(g.value) >= 1.5 && { willChange: "transform" }
115
+ } : {
116
+ position: x.value,
117
+ left: t + "px",
118
+ top: n + "px"
119
+ };
120
+ }), D;
121
+ function O() {
122
+ if (h.value == null || g.value == null) return;
123
+ let e = l.value;
124
+ T(h.value, g.value, {
125
+ middleware: d.value,
126
+ placement: f.value,
127
+ strategy: p.value
128
+ }).then((t) => {
129
+ v.value = t.x, y.value = t.y, x.value = t.strategy, S.value = t.placement, C.value = t.middlewareData, w.value = e !== !1;
130
+ });
131
+ }
132
+ function k() {
133
+ typeof D == "function" && (D(), D = void 0);
134
+ }
135
+ function A() {
136
+ if (k(), o === void 0) {
137
+ O();
138
+ return;
139
+ }
140
+ if (h.value != null && g.value != null) {
141
+ D = o(h.value, g.value, O);
142
+ return;
143
+ }
144
+ }
145
+ function j() {
146
+ l.value || (w.value = !1);
147
+ }
148
+ return u([
149
+ d,
150
+ f,
151
+ p,
152
+ l
153
+ ], O, { flush: "sync" }), u([h, g], A, { flush: "sync" }), u(l, j, { flush: "sync" }), i() && t(k), {
154
+ x: c(v),
155
+ y: c(y),
156
+ strategy: c(x),
157
+ placement: c(S),
158
+ middlewareData: c(C),
159
+ isPositioned: c(w),
160
+ floatingStyles: E,
161
+ update: O
162
+ };
163
+ }
164
+ //#endregion
165
+ //#region src/components/ui/VdPopover.vue
166
+ var V = /* @__PURE__ */ f({
167
+ __name: "VdPopover",
168
+ props: {
169
+ label: { default: "" },
170
+ iconRef: { default: "fas fa-info-circle" },
171
+ refVariant: { default: void 0 },
172
+ iconLeftRef: {
173
+ type: Boolean,
174
+ default: !1
175
+ },
176
+ offSet: { default: 8 },
177
+ content: { default: () => ({
178
+ title: "",
179
+ description: ""
180
+ }) },
181
+ tooltipVariant: { default: void 0 },
182
+ tooltipSize: { default: void 0 },
183
+ hideHeaderTooltip: {
184
+ type: Boolean,
185
+ default: !1
186
+ },
187
+ headerIconTooltip: { default: "fas fa-info-circle" },
188
+ fixed: {
189
+ type: Boolean,
190
+ default: !1
191
+ },
192
+ display: { default: "inline-block" },
193
+ position: { default: "top-start" },
194
+ disableHoverListener: {
195
+ type: Boolean,
196
+ default: !1
197
+ },
198
+ disableClickListener: {
199
+ type: Boolean,
200
+ default: !1
201
+ },
202
+ mousedownListener: {
203
+ type: Boolean,
204
+ default: !1
205
+ },
206
+ fullWidth: {
207
+ type: Boolean,
208
+ default: !1
209
+ }
210
+ },
211
+ setup(e) {
212
+ let t = e, i = _(null), s = _(null), { floatingStyles: c } = B(i, s, {
213
+ placement: t.position,
214
+ middleware: [
215
+ E(t.offSet),
216
+ C({ mainAxis: !t.fixed }),
217
+ x({
218
+ crossAxis: !1,
219
+ padding: 10
220
+ })
221
+ ],
222
+ whileElementsMounted: w
223
+ }), u = _(!1), f = _(!1), m = () => {
224
+ u.value = !0, f.value = !0;
225
+ }, v = () => {
226
+ u.value = !1, f.value = !1;
227
+ }, b = () => {
228
+ t.disableClickListener || t.mousedownListener || (f.value ? v() : m());
229
+ }, S = () => {
230
+ t.mousedownListener && (u.value ? v() : m());
231
+ }, T = () => {
232
+ t.disableHoverListener || (u.value = !0);
233
+ }, D = () => {
234
+ t.disableHoverListener || f.value || (u.value = !1);
235
+ };
236
+ return (f, m) => (a(), l("span", { class: g(["vd-popover", `vd-popover--${e.display}`]) }, [r("span", {
237
+ ref_key: "reference",
238
+ ref: i,
239
+ class: "vd-popover__reference-wrapper",
240
+ onClick: p(b, ["stop"]),
241
+ onMouseover: T,
242
+ onMouseleave: D,
243
+ onMousedown: S
244
+ }, [o(f.$slots, "reference", {
245
+ toggleOnClick: b,
246
+ onHover: T,
247
+ onLeave: D,
248
+ onMousedown: S,
249
+ isOpen: u.value,
250
+ close: v
251
+ }, () => [h(F, {
252
+ variant: e.refVariant,
253
+ label: e.label,
254
+ icon: e.iconRef,
255
+ "icon-left": e.iconLeftRef
256
+ }, null, 8, [
257
+ "variant",
258
+ "label",
259
+ "icon",
260
+ "icon-left"
261
+ ])])], 544), u.value ? (a(), l("div", {
262
+ key: 0,
263
+ ref_key: "floating",
264
+ ref: s,
265
+ style: d(y(c)),
266
+ class: g(["vd-popover__floating", t.fullWidth ? "vd-popover__floating--full-width" : ""]),
267
+ onPointerdown: m[0] ||= p(() => {}, ["prevent"])
268
+ }, [o(f.$slots, "tooltip", { close: v }, () => [h(N, {
269
+ content: e.content,
270
+ variant: e.tooltipVariant,
271
+ size: e.tooltipSize,
272
+ "hide-header-tooltip": e.hideHeaderTooltip,
273
+ "header-icon-tooltip": e.headerIconTooltip,
274
+ onClose: v
275
+ }, null, 8, [
276
+ "content",
277
+ "variant",
278
+ "size",
279
+ "hide-header-tooltip",
280
+ "header-icon-tooltip"
281
+ ])])], 38)) : n("", !0)], 2));
282
+ }
283
+ });
284
+ //#endregion
285
+ export { V as t };