@robuust-digital/vue-components 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-components.es.js +298 -298
- package/dist/vue-components.umd.js +3 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as pn from "vue";
|
|
2
|
-
import { openBlock as w, createElementBlock as k, createElementVNode as C, Fragment as ce, renderList as ye, renderSlot as
|
|
2
|
+
import { openBlock as w, createElementBlock as k, createElementVNode as C, Fragment as ce, renderList as ye, renderSlot as L, createTextVNode as be, toDisplayString as K, createVNode as j, unref as E, normalizeClass as Z, createBlock as W, resolveDynamicComponent as ie, withCtx as z, createCommentVNode as q, watchEffect as le, mergeProps as ne, computed as x, getCurrentInstance as Vn, useAttrs as Nn, withDirectives as it, vModelDynamic as Yt, normalizeProps as Ze, toValue as mn, shallowRef as Ke, watch as oe, triggerRef as hn, onScopeDispose as jn, ref as T, onUnmounted as fe, nextTick as de, onMounted as _, cloneVNode as zn, h as J, defineComponent as Y, inject as se, provide as ve, reactive as Hn, toRaw as Pe, Teleport as zl, withModifiers as wt, guardReactiveProps as Wn, vModelSelect as Hl, Transition as Wl, useSlots as ql, vModelText as Ul, getCurrentScope as Kl, shallowReadonly as We, normalizeStyle as Yl } from "vue";
|
|
3
3
|
function Zl(e, n) {
|
|
4
4
|
return w(), k("svg", {
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -75,12 +75,12 @@ const Xl = { class: "rvc-accordion" }, Ql = ["open", "name"], Jl = ["innerHTML"]
|
|
|
75
75
|
class: "rvc-group/accordion group/accordion"
|
|
76
76
|
}, [
|
|
77
77
|
C("summary", null, [
|
|
78
|
-
|
|
78
|
+
L(n.$slots, "summary", {
|
|
79
79
|
item: o,
|
|
80
80
|
active: e.defaultOpenIndex === l
|
|
81
81
|
}, () => [
|
|
82
82
|
be(K(o.title) + " ", 1),
|
|
83
|
-
|
|
83
|
+
L(n.$slots, "icon", { classList: "size-5 group-open/accordion:rotate-45 transition-transform" }, () => [
|
|
84
84
|
j(E(Gl), { class: "rvc-size-5 group-open/accordion:rvc-rotate-45 rvc-transition-transform" })
|
|
85
85
|
])
|
|
86
86
|
])
|
|
@@ -88,7 +88,7 @@ const Xl = { class: "rvc-accordion" }, Ql = ["open", "name"], Jl = ["innerHTML"]
|
|
|
88
88
|
C("div", {
|
|
89
89
|
class: Z(["rvc-accordion-content", e.contentClass])
|
|
90
90
|
}, [
|
|
91
|
-
|
|
91
|
+
L(n.$slots, "content", { item: o }, () => [
|
|
92
92
|
C("div", {
|
|
93
93
|
innerHTML: o.content
|
|
94
94
|
}, null, 8, Jl)
|
|
@@ -128,19 +128,19 @@ const Xl = { class: "rvc-accordion" }, Ql = ["open", "name"], Jl = ["innerHTML"]
|
|
|
128
128
|
class: Z(["rvc-alert", `rvc-alert-${e.type}`])
|
|
129
129
|
}, {
|
|
130
130
|
default: z(() => [
|
|
131
|
-
|
|
131
|
+
L(n.$slots, "icon", {}, () => [
|
|
132
132
|
e.icon ? (w(), W(ie(e.icon), {
|
|
133
133
|
key: 0,
|
|
134
134
|
class: "rvc-alert-icon"
|
|
135
135
|
})) : q("", !0)
|
|
136
136
|
]),
|
|
137
137
|
C("div", null, [
|
|
138
|
-
|
|
138
|
+
L(n.$slots, "title", {}, () => [
|
|
139
139
|
C("span", _l, K(e.title), 1)
|
|
140
140
|
]),
|
|
141
|
-
|
|
141
|
+
L(n.$slots, "default")
|
|
142
142
|
]),
|
|
143
|
-
|
|
143
|
+
L(n.$slots, "close", {}, () => [
|
|
144
144
|
e.close ? (w(), k("button", {
|
|
145
145
|
key: 0,
|
|
146
146
|
type: "button",
|
|
@@ -181,7 +181,7 @@ const Xl = { class: "rvc-accordion" }, Ql = ["open", "name"], Jl = ["innerHTML"]
|
|
|
181
181
|
class: Z(["rvc-badge", `rvc-badge-${e.color}`, `rvc-badge-${e.size}`])
|
|
182
182
|
}, {
|
|
183
183
|
default: z(() => [
|
|
184
|
-
|
|
184
|
+
L(n.$slots, "default", { label: e.label }, () => [
|
|
185
185
|
be(K(e.label), 1)
|
|
186
186
|
])
|
|
187
187
|
]),
|
|
@@ -263,23 +263,23 @@ const Zt = { render: no }, lo = {
|
|
|
263
263
|
}), {
|
|
264
264
|
default: z(() => [
|
|
265
265
|
e.iconOnly && e.label ? (w(), k("span", lo, [
|
|
266
|
-
|
|
266
|
+
L(t.$slots, "default", { label: e.label }, () => [
|
|
267
267
|
be(K(e.label), 1)
|
|
268
268
|
])
|
|
269
|
-
])) : e.label ?
|
|
269
|
+
])) : e.label ? L(t.$slots, "default", {
|
|
270
270
|
key: 1,
|
|
271
271
|
label: e.label
|
|
272
272
|
}, () => [
|
|
273
273
|
be(K(e.label), 1)
|
|
274
274
|
]) : q("", !0),
|
|
275
|
-
|
|
275
|
+
L(t.$slots, "icon", { icon: e.icon }, () => [
|
|
276
276
|
e.icon && !e.spinning ? (w(), W(ie(e.icon), {
|
|
277
277
|
key: 0,
|
|
278
278
|
class: "rvc-button-icon",
|
|
279
279
|
"aria-hidden": !e.iconOnly
|
|
280
280
|
}, null, 8, ["aria-hidden"])) : q("", !0)
|
|
281
281
|
]),
|
|
282
|
-
|
|
282
|
+
L(t.$slots, "spinner", { spinning: e.spinning }, () => [
|
|
283
283
|
e.spinning ? (w(), W(E(Zt), {
|
|
284
284
|
key: 0,
|
|
285
285
|
class: "rvc-button-icon rvc-button-icon-loading",
|
|
@@ -339,7 +339,7 @@ const Zt = { render: no }, lo = {
|
|
|
339
339
|
j(E(Zl))
|
|
340
340
|
]),
|
|
341
341
|
C("div", null, [
|
|
342
|
-
s.$slots.default || e.label ?
|
|
342
|
+
s.$slots.default || e.label ? L(s.$slots, "default", { key: 0 }, () => [
|
|
343
343
|
C("label", { for: e.id }, K(e.label), 9, ao)
|
|
344
344
|
]) : q("", !0)
|
|
345
345
|
])
|
|
@@ -508,7 +508,7 @@ function qe(e, n, t) {
|
|
|
508
508
|
return (s = t == null ? void 0 : t.onChange) == null || s.call(t, l), l;
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Pt(e, n) {
|
|
512
512
|
if (e === void 0)
|
|
513
513
|
throw new Error("Unexpected undefined");
|
|
514
514
|
return e;
|
|
@@ -829,11 +829,11 @@ class Eo {
|
|
|
829
829
|
), this.getVirtualItemForOffset = (t) => {
|
|
830
830
|
const o = this.getMeasurements();
|
|
831
831
|
if (o.length !== 0)
|
|
832
|
-
return
|
|
832
|
+
return Pt(
|
|
833
833
|
o[Un(
|
|
834
834
|
0,
|
|
835
835
|
o.length - 1,
|
|
836
|
-
(l) =>
|
|
836
|
+
(l) => Pt(o[l]).start,
|
|
837
837
|
t
|
|
838
838
|
)]
|
|
839
839
|
);
|
|
@@ -877,7 +877,7 @@ class Eo {
|
|
|
877
877
|
if (this.scrollToIndexTimeoutId = null, this.elementsCache.has(
|
|
878
878
|
this.options.getItemKey(t)
|
|
879
879
|
)) {
|
|
880
|
-
const [u] =
|
|
880
|
+
const [u] = Pt(
|
|
881
881
|
this.getOffsetForIndex(t, i)
|
|
882
882
|
);
|
|
883
883
|
ho(u, this.getScrollOffset()) || this.scrollToIndex(t, { align: i, behavior: l });
|
|
@@ -1023,18 +1023,18 @@ function ko() {
|
|
|
1023
1023
|
let e = De();
|
|
1024
1024
|
return fe(() => e.dispose()), e;
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1026
|
+
function Io() {
|
|
1027
1027
|
let e = ko();
|
|
1028
1028
|
return (n) => {
|
|
1029
1029
|
e.dispose(), e.nextFrame(n);
|
|
1030
1030
|
};
|
|
1031
1031
|
}
|
|
1032
1032
|
var yn;
|
|
1033
|
-
let
|
|
1033
|
+
let Po = Symbol("headlessui.useid"), Ao = 0;
|
|
1034
1034
|
const ue = (yn = pn.useId) != null ? yn : function() {
|
|
1035
|
-
return pn.inject(
|
|
1035
|
+
return pn.inject(Po, () => `${++Ao}`)();
|
|
1036
1036
|
};
|
|
1037
|
-
function
|
|
1037
|
+
function P(e) {
|
|
1038
1038
|
var n;
|
|
1039
1039
|
if (e == null || e.value == null) return null;
|
|
1040
1040
|
let t = (n = e.value.$el) != null ? n : e.value;
|
|
@@ -1048,7 +1048,7 @@ function re(e, n, ...t) {
|
|
|
1048
1048
|
let o = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map((l) => `"${l}"`).join(", ")}.`);
|
|
1049
1049
|
throw Error.captureStackTrace && Error.captureStackTrace(o, re), o;
|
|
1050
1050
|
}
|
|
1051
|
-
var
|
|
1051
|
+
var Lo = Object.defineProperty, Do = (e, n, t) => n in e ? Lo(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, wn = (e, n, t) => (Do(e, typeof n != "symbol" ? n + "" : n, t), t);
|
|
1052
1052
|
let Mo = class {
|
|
1053
1053
|
constructor() {
|
|
1054
1054
|
wn(this, "current", this.detect()), wn(this, "currentId", 0);
|
|
@@ -1076,7 +1076,7 @@ function ke(e) {
|
|
|
1076
1076
|
if (ut.isServer) return null;
|
|
1077
1077
|
if (e instanceof Node) return e.ownerDocument;
|
|
1078
1078
|
if (e != null && e.hasOwnProperty("value")) {
|
|
1079
|
-
let n =
|
|
1079
|
+
let n = P(e);
|
|
1080
1080
|
if (n) return n.ownerDocument;
|
|
1081
1081
|
}
|
|
1082
1082
|
return document;
|
|
@@ -1103,7 +1103,7 @@ function Qt(e, n = 0) {
|
|
|
1103
1103
|
function Gn(e) {
|
|
1104
1104
|
let n = ke(e);
|
|
1105
1105
|
de(() => {
|
|
1106
|
-
n && !Qt(n.activeElement, 0) &&
|
|
1106
|
+
n && !Qt(n.activeElement, 0) && Le(e);
|
|
1107
1107
|
});
|
|
1108
1108
|
}
|
|
1109
1109
|
var Bo = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(Bo || {});
|
|
@@ -1112,7 +1112,7 @@ typeof window < "u" && typeof document < "u" && (document.addEventListener("keyd
|
|
|
1112
1112
|
}, !0), document.addEventListener("click", (e) => {
|
|
1113
1113
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
1114
1114
|
}, !0));
|
|
1115
|
-
function
|
|
1115
|
+
function Le(e) {
|
|
1116
1116
|
e == null || e.focus({ preventScroll: !0 });
|
|
1117
1117
|
}
|
|
1118
1118
|
let Vo = ["textarea", "input"].join(",");
|
|
@@ -1187,7 +1187,7 @@ function _t(e, n, t = x(() => !0)) {
|
|
|
1187
1187
|
}(e);
|
|
1188
1188
|
for (let u of s) {
|
|
1189
1189
|
if (u === null) continue;
|
|
1190
|
-
let c = u instanceof HTMLElement ? u :
|
|
1190
|
+
let c = u instanceof HTMLElement ? u : P(u);
|
|
1191
1191
|
if (c != null && c.contains(i) || r.composed && r.composedPath().includes(c)) return;
|
|
1192
1192
|
}
|
|
1193
1193
|
return !Qt(i, Xt.Loose) && i.tabIndex !== -1 && r.preventDefault(), n(r, i);
|
|
@@ -1214,7 +1214,7 @@ function en(e, n) {
|
|
|
1214
1214
|
t.value = xn(e.value.type, e.value.as);
|
|
1215
1215
|
}), le(() => {
|
|
1216
1216
|
var o;
|
|
1217
|
-
t.value ||
|
|
1217
|
+
t.value || P(n) && P(n) instanceof HTMLButtonElement && !((o = P(n)) != null && o.hasAttribute("type")) && (t.value = "button");
|
|
1218
1218
|
}), t;
|
|
1219
1219
|
}
|
|
1220
1220
|
function Sn(e) {
|
|
@@ -1239,22 +1239,22 @@ function el({ container: e, accept: n, walk: t, enabled: o }) {
|
|
|
1239
1239
|
for (; i.nextNode(); ) t(i.currentNode);
|
|
1240
1240
|
});
|
|
1241
1241
|
}
|
|
1242
|
-
var Ee = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Ee || {}),
|
|
1242
|
+
var Ee = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Ee || {}), Ae = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Ae || {});
|
|
1243
1243
|
function X({ visible: e = !0, features: n = 0, ourProps: t, theirProps: o, ...l }) {
|
|
1244
1244
|
var r;
|
|
1245
1245
|
let a = nl(o, t), i = Object.assign(l, { props: a });
|
|
1246
|
-
if (e || n & 2 && a.static) return
|
|
1246
|
+
if (e || n & 2 && a.static) return At(i);
|
|
1247
1247
|
if (n & 1) {
|
|
1248
1248
|
let s = (r = a.unmount) == null || r ? 0 : 1;
|
|
1249
1249
|
return re(s, { 0() {
|
|
1250
1250
|
return null;
|
|
1251
1251
|
}, 1() {
|
|
1252
|
-
return
|
|
1252
|
+
return At({ ...l, props: { ...a, hidden: !0, style: { display: "none" } } });
|
|
1253
1253
|
} });
|
|
1254
1254
|
}
|
|
1255
|
-
return
|
|
1255
|
+
return At(i);
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function At({ props: e, attrs: n, slots: t, slot: o, name: l }) {
|
|
1258
1258
|
var r, a;
|
|
1259
1259
|
let { as: i, ...s } = Qe(e, ["unmount", "static"]), u = (r = t.default) == null ? void 0 : r.call(t, o), c = {};
|
|
1260
1260
|
if (o) {
|
|
@@ -1413,14 +1413,14 @@ function je(e) {
|
|
|
1413
1413
|
}
|
|
1414
1414
|
let cl = Symbol("VirtualContext"), Qo = Y({ name: "VirtualProvider", setup(e, { slots: n }) {
|
|
1415
1415
|
let t = je("VirtualProvider"), o = x(() => {
|
|
1416
|
-
let i =
|
|
1416
|
+
let i = P(t.optionsRef);
|
|
1417
1417
|
if (!i) return { start: 0, end: 0 };
|
|
1418
1418
|
let s = window.getComputedStyle(i);
|
|
1419
1419
|
return { start: parseFloat(s.paddingBlockStart || s.paddingTop), end: parseFloat(s.paddingBlockEnd || s.paddingBottom) };
|
|
1420
1420
|
}), l = Ro(x(() => ({ scrollPaddingStart: o.value.start, scrollPaddingEnd: o.value.end, count: t.virtual.value.options.length, estimateSize() {
|
|
1421
1421
|
return 40;
|
|
1422
1422
|
}, getScrollElement() {
|
|
1423
|
-
return
|
|
1423
|
+
return P(t.optionsRef);
|
|
1424
1424
|
}, overscan: 12 }))), r = x(() => {
|
|
1425
1425
|
var i;
|
|
1426
1426
|
return (i = t.virtual.value) == null ? void 0 : i.options;
|
|
@@ -1436,21 +1436,21 @@ let cl = Symbol("VirtualContext"), Qo = Y({ name: "VirtualProvider", setup(e, {
|
|
|
1436
1436
|
} }), Jo = Y({ name: "Combobox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], nullable: !0, default: null }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, nullable: { type: Boolean, default: !1 }, multiple: { type: [Boolean], default: !1 }, immediate: { type: [Boolean], default: !1 }, virtual: { type: Object, default: null } }, inheritAttrs: !1, setup(e, { slots: n, attrs: t, emit: o }) {
|
|
1437
1437
|
let l = T(1), r = T(null), a = T(null), i = T(null), s = T(null), u = T({ static: !1, hold: !1 }), c = T([]), d = T(null), f = T(2), v = T(!1);
|
|
1438
1438
|
function p(O = (R) => R) {
|
|
1439
|
-
let R = d.value !== null ? c.value[d.value] : null, B = O(c.value.slice()), F = B.length > 0 && B[0].dataRef.order.value !== null ? B.sort((N, Q) => N.dataRef.order.value - Q.dataRef.order.value) : Jt(B, (N) =>
|
|
1439
|
+
let R = d.value !== null ? c.value[d.value] : null, B = O(c.value.slice()), F = B.length > 0 && B[0].dataRef.order.value !== null ? B.sort((N, Q) => N.dataRef.order.value - Q.dataRef.order.value) : Jt(B, (N) => P(N.dataRef.domRef)), V = R ? F.indexOf(R) : null;
|
|
1440
1440
|
return V === -1 && (V = null), { options: F, activeOptionIndex: V };
|
|
1441
1441
|
}
|
|
1442
|
-
let m = x(() => e.multiple ? 1 : 0), S = x(() => e.nullable), [y, h] = Kn(x(() => e.modelValue), (O) => o("update:modelValue", O), x(() => e.defaultValue)), b = x(() => y.value === void 0 ? re(m.value, { 1: [], 0: void 0 }) : y.value),
|
|
1442
|
+
let m = x(() => e.multiple ? 1 : 0), S = x(() => e.nullable), [y, h] = Kn(x(() => e.modelValue), (O) => o("update:modelValue", O), x(() => e.defaultValue)), b = x(() => y.value === void 0 ? re(m.value, { 1: [], 0: void 0 }) : y.value), I = null, $ = null;
|
|
1443
1443
|
function D(O) {
|
|
1444
1444
|
return re(m.value, { 0() {
|
|
1445
1445
|
return h == null ? void 0 : h(O);
|
|
1446
1446
|
}, 1: () => {
|
|
1447
|
-
let R =
|
|
1447
|
+
let R = Pe(g.value.value).slice(), B = Pe(O), F = R.findIndex((V) => g.compare(B, Pe(V)));
|
|
1448
1448
|
return F === -1 ? R.push(B) : R.splice(F, 1), h == null ? void 0 : h(R);
|
|
1449
1449
|
} });
|
|
1450
1450
|
}
|
|
1451
|
-
let
|
|
1451
|
+
let A = x(() => {
|
|
1452
1452
|
});
|
|
1453
|
-
oe([
|
|
1453
|
+
oe([A], ([O], [R]) => {
|
|
1454
1454
|
if (g.virtual.value && O && R && d.value !== null) {
|
|
1455
1455
|
let B = O.indexOf(R[d.value]);
|
|
1456
1456
|
B !== -1 ? d.value = B : d.value = null;
|
|
@@ -1492,14 +1492,14 @@ let cl = Symbol("VirtualContext"), Qo = Y({ name: "VirtualProvider", setup(e, {
|
|
|
1492
1492
|
}, setActivationTrigger(O) {
|
|
1493
1493
|
f.value = O;
|
|
1494
1494
|
}, goToOption(O, R, B) {
|
|
1495
|
-
v.value = !1,
|
|
1495
|
+
v.value = !1, I !== null && cancelAnimationFrame(I), I = requestAnimationFrame(() => {
|
|
1496
1496
|
if (e.disabled || s.value && !u.value.static && l.value === 1) return;
|
|
1497
1497
|
if (g.virtual.value) {
|
|
1498
1498
|
d.value = O === U.Specific ? R : Bt({ focus: O }, { resolveItems: () => g.virtual.value.options, resolveActiveIndex: () => {
|
|
1499
1499
|
var N, Q;
|
|
1500
1500
|
return (Q = (N = g.activeOptionIndex.value) != null ? N : g.virtual.value.options.findIndex((ae) => {
|
|
1501
|
-
var
|
|
1502
|
-
return !((
|
|
1501
|
+
var Ie;
|
|
1502
|
+
return !((Ie = g.virtual.value) != null && Ie.disabled(ae));
|
|
1503
1503
|
})) != null ? Q : null;
|
|
1504
1504
|
}, resolveDisabled: (N) => g.virtual.value.disabled(N), resolveId() {
|
|
1505
1505
|
throw new Error("Function not implemented.");
|
|
@@ -1536,12 +1536,12 @@ let cl = Symbol("VirtualContext"), Qo = Y({ name: "VirtualProvider", setup(e, {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
$ && cancelAnimationFrame($);
|
|
1538
1538
|
let F = p((V) => (V.push(B), V));
|
|
1539
|
-
d.value === null && g.isSelected(R.value.value) && (F.activeOptionIndex = F.options.indexOf(B)), c.value = F.options, d.value = F.activeOptionIndex, f.value = 2, F.options.some((V) => !
|
|
1539
|
+
d.value === null && g.isSelected(R.value.value) && (F.activeOptionIndex = F.options.indexOf(B)), c.value = F.options, d.value = F.activeOptionIndex, f.value = 2, F.options.some((V) => !P(V.dataRef.domRef)) && ($ = requestAnimationFrame(() => {
|
|
1540
1540
|
let V = p();
|
|
1541
1541
|
c.value = V.options, d.value = V.activeOptionIndex;
|
|
1542
1542
|
}));
|
|
1543
1543
|
}, unregisterOption(O, R) {
|
|
1544
|
-
if (
|
|
1544
|
+
if (I !== null && cancelAnimationFrame(I), R && (v.value = !0), g.virtual.value) {
|
|
1545
1545
|
c.value = c.value.filter((F) => F.id !== O);
|
|
1546
1546
|
return;
|
|
1547
1547
|
}
|
|
@@ -1551,14 +1551,14 @@ let cl = Symbol("VirtualContext"), Qo = Y({ name: "VirtualProvider", setup(e, {
|
|
|
1551
1551
|
});
|
|
1552
1552
|
c.value = B.options, d.value = B.activeOptionIndex, f.value = 2;
|
|
1553
1553
|
}, isSelected(O) {
|
|
1554
|
-
return re(m.value, { 0: () => g.compare(
|
|
1554
|
+
return re(m.value, { 0: () => g.compare(Pe(g.value.value), Pe(O)), 1: () => Pe(g.value.value).some((R) => g.compare(Pe(R), Pe(O))) });
|
|
1555
1555
|
}, isActive(O) {
|
|
1556
1556
|
return d.value === g.calculateIndex(O);
|
|
1557
1557
|
} };
|
|
1558
1558
|
_t([a, i, s], () => g.closeCombobox(), x(() => l.value === 0)), ve(ul, g), tn(x(() => re(l.value, { 0: te.Open, 1: te.Closed })));
|
|
1559
1559
|
let M = x(() => {
|
|
1560
1560
|
var O;
|
|
1561
|
-
return (O =
|
|
1561
|
+
return (O = P(a)) == null ? void 0 : O.closest("form");
|
|
1562
1562
|
});
|
|
1563
1563
|
return _(() => {
|
|
1564
1564
|
oe([M], () => {
|
|
@@ -1574,7 +1574,7 @@ let cl = Symbol("VirtualContext"), Qo = Y({ name: "VirtualProvider", setup(e, {
|
|
|
1574
1574
|
}), () => {
|
|
1575
1575
|
var O, R, B;
|
|
1576
1576
|
let { name: F, disabled: V, form: N, ...Q } = e, ae = { open: l.value === 0, disabled: V, activeIndex: g.activeOptionIndex.value, activeOption: g.activeOptionIndex.value === null ? null : g.virtual.value ? g.virtual.value.options[(O = g.activeOptionIndex.value) != null ? O : 0] : (B = (R = g.options.value[g.activeOptionIndex.value]) == null ? void 0 : R.dataRef.value) != null ? B : null, value: b.value };
|
|
1577
|
-
return J(ce, [...F != null && b.value != null ? rl({ [F]: b.value }).map(([
|
|
1577
|
+
return J(ce, [...F != null && b.value != null ? rl({ [F]: b.value }).map(([Ie, pt]) => J(ot, ll({ features: Ge.Hidden, key: Ie, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: N, disabled: V, name: Ie, value: pt }))) : [], X({ theirProps: { ...t, ...Qe(Q, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: ae, slots: n, attrs: t, name: "Combobox" })]);
|
|
1578
1578
|
};
|
|
1579
1579
|
} });
|
|
1580
1580
|
Y({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: n, slots: t }) {
|
|
@@ -1582,7 +1582,7 @@ Y({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "labe
|
|
|
1582
1582
|
let l = (o = e.id) != null ? o : `headlessui-combobox-label-${ue()}`, r = je("ComboboxLabel");
|
|
1583
1583
|
function a() {
|
|
1584
1584
|
var i;
|
|
1585
|
-
(i =
|
|
1585
|
+
(i = P(r.inputRef)) == null || i.focus({ preventScroll: !0 });
|
|
1586
1586
|
}
|
|
1587
1587
|
return () => {
|
|
1588
1588
|
let i = { open: r.comboboxState.value === 0, disabled: r.disabled.value }, { ...s } = e, u = { id: l, ref: r.labelRef, onClick: a };
|
|
@@ -1596,7 +1596,7 @@ let _o = Y({ name: "ComboboxButton", props: { as: { type: [Object, String], defa
|
|
|
1596
1596
|
function i(c) {
|
|
1597
1597
|
a.disabled.value || (a.comboboxState.value === 0 ? a.closeCombobox() : (c.preventDefault(), a.openCombobox()), de(() => {
|
|
1598
1598
|
var d;
|
|
1599
|
-
return (d =
|
|
1599
|
+
return (d = P(a.inputRef)) == null ? void 0 : d.focus({ preventScroll: !0 });
|
|
1600
1600
|
}));
|
|
1601
1601
|
}
|
|
1602
1602
|
function s(c) {
|
|
@@ -1627,28 +1627,28 @@ let _o = Y({ name: "ComboboxButton", props: { as: { type: [Object, String], defa
|
|
|
1627
1627
|
let u = en(x(() => ({ as: e.as, type: n.type })), a.buttonRef);
|
|
1628
1628
|
return () => {
|
|
1629
1629
|
var c, d;
|
|
1630
|
-
let f = { open: a.comboboxState.value === 0, disabled: a.disabled.value, value: a.value.value }, { ...v } = e, p = { ref: a.buttonRef, id: r, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c =
|
|
1630
|
+
let f = { open: a.comboboxState.value === 0, disabled: a.disabled.value, value: a.value.value }, { ...v } = e, p = { ref: a.buttonRef, id: r, type: u.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": (c = P(a.optionsRef)) == null ? void 0 : c.id, "aria-expanded": a.comboboxState.value === 0, "aria-labelledby": a.labelRef.value ? [(d = P(a.labelRef)) == null ? void 0 : d.id, r].join(" ") : void 0, disabled: a.disabled.value === !0 ? !0 : void 0, onKeydown: s, onClick: i };
|
|
1631
1631
|
return X({ ourProps: p, theirProps: v, slot: f, attrs: n, slots: t, name: "ComboboxButton" });
|
|
1632
1632
|
};
|
|
1633
1633
|
} }), ea = Y({ name: "ComboboxInput", props: { as: { type: [Object, String], default: "input" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, displayValue: { type: Function }, defaultValue: { type: String, default: void 0 }, id: { type: String, default: null } }, emits: { change: (e) => !0 }, setup(e, { emit: n, attrs: t, slots: o, expose: l }) {
|
|
1634
1634
|
var r;
|
|
1635
|
-
let a = (r = e.id) != null ? r : `headlessui-combobox-input-${ue()}`, i = je("ComboboxInput"), s = x(() => ke(
|
|
1635
|
+
let a = (r = e.id) != null ? r : `headlessui-combobox-input-${ue()}`, i = je("ComboboxInput"), s = x(() => ke(P(i.inputRef))), u = { value: !1 };
|
|
1636
1636
|
l({ el: i.inputRef, $el: i.inputRef });
|
|
1637
1637
|
function c() {
|
|
1638
1638
|
i.change(null);
|
|
1639
|
-
let $ =
|
|
1639
|
+
let $ = P(i.optionsRef);
|
|
1640
1640
|
$ && ($.scrollTop = 0), i.goToOption(U.Nothing);
|
|
1641
1641
|
}
|
|
1642
1642
|
let d = x(() => {
|
|
1643
1643
|
var $;
|
|
1644
1644
|
let D = i.value.value;
|
|
1645
|
-
return
|
|
1645
|
+
return P(i.inputRef) ? typeof e.displayValue < "u" && D !== void 0 ? ($ = e.displayValue(D)) != null ? $ : "" : typeof D == "string" ? D : "" : "";
|
|
1646
1646
|
});
|
|
1647
1647
|
_(() => {
|
|
1648
|
-
oe([d, i.comboboxState, s], ([$, D], [
|
|
1648
|
+
oe([d, i.comboboxState, s], ([$, D], [A, g]) => {
|
|
1649
1649
|
if (u.value) return;
|
|
1650
|
-
let M =
|
|
1651
|
-
M && ((g === 0 && D === 1 || $ !==
|
|
1650
|
+
let M = P(i.inputRef);
|
|
1651
|
+
M && ((g === 0 && D === 1 || $ !== A) && (M.value = $), requestAnimationFrame(() => {
|
|
1652
1652
|
var O;
|
|
1653
1653
|
if (u.value || !M || ((O = s.value) == null ? void 0 : O.activeElement) !== M) return;
|
|
1654
1654
|
let { selectionStart: R, selectionEnd: B } = M;
|
|
@@ -1657,10 +1657,10 @@ let _o = Y({ name: "ComboboxButton", props: { as: { type: [Object, String], defa
|
|
|
1657
1657
|
}, { immediate: !0 }), oe([i.comboboxState], ([$], [D]) => {
|
|
1658
1658
|
if ($ === 0 && D === 1) {
|
|
1659
1659
|
if (u.value) return;
|
|
1660
|
-
let
|
|
1661
|
-
if (!
|
|
1662
|
-
let g =
|
|
1663
|
-
|
|
1660
|
+
let A = P(i.inputRef);
|
|
1661
|
+
if (!A) return;
|
|
1662
|
+
let g = A.value, { selectionStart: M, selectionEnd: O, selectionDirection: R } = A;
|
|
1663
|
+
A.value = "", A.value = g, R !== null ? A.setSelectionRange(M, O, R) : A.setSelectionRange(M, O);
|
|
1664
1664
|
}
|
|
1665
1665
|
});
|
|
1666
1666
|
});
|
|
@@ -1673,7 +1673,7 @@ let _o = Y({ name: "ComboboxButton", props: { as: { type: [Object, String], defa
|
|
|
1673
1673
|
f.value = !1;
|
|
1674
1674
|
});
|
|
1675
1675
|
}
|
|
1676
|
-
let m =
|
|
1676
|
+
let m = Io();
|
|
1677
1677
|
function S($) {
|
|
1678
1678
|
switch (u.value = !0, m(() => {
|
|
1679
1679
|
u.value = !1;
|
|
@@ -1718,24 +1718,24 @@ let _o = Y({ name: "ComboboxButton", props: { as: { type: [Object, String], defa
|
|
|
1718
1718
|
n("change", $), i.nullable.value && i.mode.value === 0 && $.target.value === "" && c(), i.openCombobox();
|
|
1719
1719
|
}
|
|
1720
1720
|
function h($) {
|
|
1721
|
-
var D,
|
|
1721
|
+
var D, A, g;
|
|
1722
1722
|
let M = (D = $.relatedTarget) != null ? D : Re.find((O) => O !== $.currentTarget);
|
|
1723
|
-
if (u.value = !1, !((
|
|
1723
|
+
if (u.value = !1, !((A = P(i.optionsRef)) != null && A.contains(M)) && !((g = P(i.buttonRef)) != null && g.contains(M)) && i.comboboxState.value === 0) return $.preventDefault(), i.mode.value === 0 && (i.nullable.value && i.value.value === null ? c() : i.activationTrigger.value !== 1 && i.selectActiveOption()), i.closeCombobox();
|
|
1724
1724
|
}
|
|
1725
1725
|
function b($) {
|
|
1726
|
-
var D,
|
|
1726
|
+
var D, A, g;
|
|
1727
1727
|
let M = (D = $.relatedTarget) != null ? D : Re.find((O) => O !== $.currentTarget);
|
|
1728
|
-
(
|
|
1728
|
+
(A = P(i.buttonRef)) != null && A.contains(M) || (g = P(i.optionsRef)) != null && g.contains(M) || i.disabled.value || i.immediate.value && i.comboboxState.value !== 0 && (i.openCombobox(), De().nextFrame(() => {
|
|
1729
1729
|
i.setActivationTrigger(1);
|
|
1730
1730
|
}));
|
|
1731
1731
|
}
|
|
1732
|
-
let
|
|
1733
|
-
var $, D,
|
|
1734
|
-
return (g = (
|
|
1732
|
+
let I = x(() => {
|
|
1733
|
+
var $, D, A, g;
|
|
1734
|
+
return (g = (A = (D = e.defaultValue) != null ? D : i.defaultValue.value !== void 0 ? ($ = e.displayValue) == null ? void 0 : $.call(e, i.defaultValue.value) : null) != null ? A : i.defaultValue.value) != null ? g : "";
|
|
1735
1735
|
});
|
|
1736
1736
|
return () => {
|
|
1737
|
-
var $, D,
|
|
1738
|
-
let B = { open: i.comboboxState.value === 0 }, { displayValue: F, onChange: V, ...N } = e, Q = { "aria-controls": ($ = i.optionsRef.value) == null ? void 0 : $.id, "aria-expanded": i.comboboxState.value === 0, "aria-activedescendant": i.activeOptionIndex.value === null ? void 0 : i.virtual.value ? (D = i.options.value.find((ae) => !i.virtual.value.disabled(ae.dataRef.value) && i.compare(ae.dataRef.value, i.virtual.value.options[i.activeOptionIndex.value]))) == null ? void 0 : D.id : (
|
|
1737
|
+
var $, D, A, g, M, O, R;
|
|
1738
|
+
let B = { open: i.comboboxState.value === 0 }, { displayValue: F, onChange: V, ...N } = e, Q = { "aria-controls": ($ = i.optionsRef.value) == null ? void 0 : $.id, "aria-expanded": i.comboboxState.value === 0, "aria-activedescendant": i.activeOptionIndex.value === null ? void 0 : i.virtual.value ? (D = i.options.value.find((ae) => !i.virtual.value.disabled(ae.dataRef.value) && i.compare(ae.dataRef.value, i.virtual.value.options[i.activeOptionIndex.value]))) == null ? void 0 : D.id : (A = i.options.value[i.activeOptionIndex.value]) == null ? void 0 : A.id, "aria-labelledby": (O = (g = P(i.labelRef)) == null ? void 0 : g.id) != null ? O : (M = P(i.buttonRef)) == null ? void 0 : M.id, "aria-autocomplete": "list", id: a, onCompositionstart: v, onCompositionend: p, onKeydown: S, onInput: y, onFocus: b, onBlur: h, role: "combobox", type: (R = t.type) != null ? R : "text", tabIndex: 0, ref: i.inputRef, defaultValue: I.value, disabled: i.disabled.value === !0 ? !0 : void 0 };
|
|
1739
1739
|
return X({ ourProps: Q, theirProps: N, slot: B, attrs: t, slots: o, features: Ee.RenderStrategy | Ee.Static, name: "ComboboxInput" });
|
|
1740
1740
|
};
|
|
1741
1741
|
} }), ta = Y({ name: "ComboboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, hold: { type: [Boolean], default: !1 } }, setup(e, { attrs: n, slots: t, expose: o }) {
|
|
@@ -1746,7 +1746,7 @@ let _o = Y({ name: "ComboboxButton", props: { as: { type: [Object, String], defa
|
|
|
1746
1746
|
l.optionsPropsRef.value.hold = e.hold;
|
|
1747
1747
|
});
|
|
1748
1748
|
let a = ct(), i = x(() => a !== null ? (a.value & te.Open) === te.Open : l.comboboxState.value === 0);
|
|
1749
|
-
el({ container: x(() =>
|
|
1749
|
+
el({ container: x(() => P(l.optionsRef)), enabled: x(() => l.comboboxState.value === 0), accept(u) {
|
|
1750
1750
|
return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1751
1751
|
}, walk(u) {
|
|
1752
1752
|
u.setAttribute("role", "none");
|
|
@@ -1756,7 +1756,7 @@ let _o = Y({ name: "ComboboxButton", props: { as: { type: [Object, String], defa
|
|
|
1756
1756
|
}
|
|
1757
1757
|
return () => {
|
|
1758
1758
|
var u, c, d;
|
|
1759
|
-
let f = { open: l.comboboxState.value === 0 }, v = { "aria-labelledby": (d = (u =
|
|
1759
|
+
let f = { open: l.comboboxState.value === 0 }, v = { "aria-labelledby": (d = (u = P(l.labelRef)) == null ? void 0 : u.id) != null ? d : (c = P(l.buttonRef)) == null ? void 0 : c.id, id: r, ref: l.optionsRef, role: "listbox", "aria-multiselectable": l.mode.value === 1 ? !0 : void 0, onMousedown: s }, p = Qe(e, ["hold"]);
|
|
1760
1760
|
return X({ ourProps: v, theirProps: p, slot: f, attrs: n, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [J(Qo, {}, t.default)] } : t, features: Ee.RenderStrategy | Ee.Static, visible: i.value, name: "ComboboxOptions" });
|
|
1761
1761
|
};
|
|
1762
1762
|
} }), na = Y({ name: "ComboboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, order: { type: [Number], default: null } }, setup(e, { slots: n, attrs: t, expose: o }) {
|
|
@@ -1767,18 +1767,18 @@ let _o = Y({ name: "ComboboxButton", props: { as: { type: [Object, String], defa
|
|
|
1767
1767
|
return l.virtual.value ? l.activeOptionIndex.value === l.calculateIndex(e.value) : l.activeOptionIndex.value === null ? !1 : ((h = l.options.value[l.activeOptionIndex.value]) == null ? void 0 : h.id) === r;
|
|
1768
1768
|
}), u = x(() => l.isSelected(e.value)), c = se(cl, null), d = x(() => ({ disabled: e.disabled, value: e.value, domRef: a, order: x(() => e.order) }));
|
|
1769
1769
|
_(() => l.registerOption(r, d)), fe(() => l.unregisterOption(r, s.value)), le(() => {
|
|
1770
|
-
let h =
|
|
1770
|
+
let h = P(a);
|
|
1771
1771
|
h && (c == null || c.value.measureElement(h));
|
|
1772
1772
|
}), le(() => {
|
|
1773
1773
|
l.comboboxState.value === 0 && s.value && (l.virtual.value || l.activationTrigger.value !== 0 && de(() => {
|
|
1774
1774
|
var h, b;
|
|
1775
|
-
return (b = (h =
|
|
1775
|
+
return (b = (h = P(a)) == null ? void 0 : h.scrollIntoView) == null ? void 0 : b.call(h, { block: "nearest" });
|
|
1776
1776
|
}));
|
|
1777
1777
|
});
|
|
1778
1778
|
function f(h) {
|
|
1779
1779
|
h.preventDefault(), h.button === al.Left && (i.value || (l.selectOption(r), Qn() || requestAnimationFrame(() => {
|
|
1780
1780
|
var b;
|
|
1781
|
-
return (b =
|
|
1781
|
+
return (b = P(l.inputRef)) == null ? void 0 : b.focus({ preventScroll: !0 });
|
|
1782
1782
|
}), l.mode.value === 0 && l.closeCombobox()));
|
|
1783
1783
|
}
|
|
1784
1784
|
function v() {
|
|
@@ -1794,16 +1794,16 @@ let _o = Y({ name: "ComboboxButton", props: { as: { type: [Object, String], defa
|
|
|
1794
1794
|
function S(h) {
|
|
1795
1795
|
var b;
|
|
1796
1796
|
if (!p.wasMoved(h) || e.disabled || (b = l.virtual.value) != null && b.disabled(e.value) || s.value) return;
|
|
1797
|
-
let
|
|
1798
|
-
l.goToOption(U.Specific,
|
|
1797
|
+
let I = l.calculateIndex(e.value);
|
|
1798
|
+
l.goToOption(U.Specific, I, 0);
|
|
1799
1799
|
}
|
|
1800
1800
|
function y(h) {
|
|
1801
1801
|
var b;
|
|
1802
1802
|
p.wasMoved(h) && (e.disabled || (b = l.virtual.value) != null && b.disabled(e.value) || s.value && (l.optionsPropsRef.value.hold || l.goToOption(U.Nothing)));
|
|
1803
1803
|
}
|
|
1804
1804
|
return () => {
|
|
1805
|
-
let { disabled: h } = e, b = { active: s.value, selected: u.value, disabled: h },
|
|
1806
|
-
return X({ ourProps:
|
|
1805
|
+
let { disabled: h } = e, b = { active: s.value, selected: u.value, disabled: h }, I = { id: r, ref: a, role: "option", tabIndex: h === !0 ? void 0 : -1, "aria-disabled": h === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onMousedown: f, onFocus: v, onPointerenter: m, onMouseenter: m, onPointermove: S, onMousemove: S, onPointerleave: y, onMouseleave: y }, $ = Qe(e, ["order", "value"]);
|
|
1806
|
+
return X({ ourProps: I, theirProps: $, slot: b, attrs: t, slots: n, name: "ComboboxOption" });
|
|
1807
1807
|
};
|
|
1808
1808
|
} });
|
|
1809
1809
|
function dl(e, n, t, o) {
|
|
@@ -1823,7 +1823,7 @@ function fl(e) {
|
|
|
1823
1823
|
if (typeof e == "function") return new Set(e());
|
|
1824
1824
|
let n = /* @__PURE__ */ new Set();
|
|
1825
1825
|
for (let t of e.value) {
|
|
1826
|
-
let o =
|
|
1826
|
+
let o = P(t);
|
|
1827
1827
|
o instanceof HTMLElement && n.add(o);
|
|
1828
1828
|
}
|
|
1829
1829
|
return n;
|
|
@@ -1838,7 +1838,7 @@ let _e = Object.assign(Y({ name: "FocusTrap", props: { as: { type: [Object, Stri
|
|
|
1838
1838
|
ia({ ownerDocument: r, container: l, containers: e.containers, previousActiveElement: i }, x(() => a.value && !!(e.features & 8)));
|
|
1839
1839
|
let s = la();
|
|
1840
1840
|
function u(v) {
|
|
1841
|
-
let p =
|
|
1841
|
+
let p = P(l);
|
|
1842
1842
|
p && ((m) => m())(() => {
|
|
1843
1843
|
re(s.value, { [tt.Forwards]: () => {
|
|
1844
1844
|
nt(p, Se.First, { skipElements: [v.relatedTarget] });
|
|
@@ -1856,9 +1856,9 @@ let _e = Object.assign(Y({ name: "FocusTrap", props: { as: { type: [Object, Stri
|
|
|
1856
1856
|
function f(v) {
|
|
1857
1857
|
if (!a.value) return;
|
|
1858
1858
|
let p = fl(e.containers);
|
|
1859
|
-
|
|
1859
|
+
P(l) instanceof HTMLElement && p.add(P(l));
|
|
1860
1860
|
let m = v.relatedTarget;
|
|
1861
|
-
m instanceof HTMLElement && m.dataset.headlessuiFocusGuard !== "true" && (pl(p, m) || (c.value ? nt(
|
|
1861
|
+
m instanceof HTMLElement && m.dataset.headlessuiFocusGuard !== "true" && (pl(p, m) || (c.value ? nt(P(l), re(s.value, { [tt.Forwards]: () => Se.Next, [tt.Backwards]: () => Se.Previous }) | Se.WrapAround, { relativeTo: v.target }) : v.target instanceof HTMLElement && Le(v.target)));
|
|
1862
1862
|
}
|
|
1863
1863
|
return () => {
|
|
1864
1864
|
let v = {}, p = { ref: l, onKeydown: d, onFocusout: f }, { features: m, initialFocus: S, containers: y, ...h } = e;
|
|
@@ -1881,10 +1881,10 @@ function aa({ ownerDocument: e }, n) {
|
|
|
1881
1881
|
_(() => {
|
|
1882
1882
|
le(() => {
|
|
1883
1883
|
var o, l;
|
|
1884
|
-
n.value || ((o = e.value) == null ? void 0 : o.activeElement) === ((l = e.value) == null ? void 0 : l.body) &&
|
|
1884
|
+
n.value || ((o = e.value) == null ? void 0 : o.activeElement) === ((l = e.value) == null ? void 0 : l.body) && Le(t());
|
|
1885
1885
|
}, { flush: "post" });
|
|
1886
1886
|
}), fe(() => {
|
|
1887
|
-
n.value &&
|
|
1887
|
+
n.value && Le(t());
|
|
1888
1888
|
});
|
|
1889
1889
|
}
|
|
1890
1890
|
function ra({ ownerDocument: e, container: n, initialFocus: t }, o) {
|
|
@@ -1892,11 +1892,11 @@ function ra({ ownerDocument: e, container: n, initialFocus: t }, o) {
|
|
|
1892
1892
|
return _(() => r.value = !0), fe(() => r.value = !1), _(() => {
|
|
1893
1893
|
oe([n, t, o], (a, i) => {
|
|
1894
1894
|
if (a.every((u, c) => (i == null ? void 0 : i[c]) === u) || !o.value) return;
|
|
1895
|
-
let s =
|
|
1895
|
+
let s = P(n);
|
|
1896
1896
|
s && Gt(() => {
|
|
1897
1897
|
var u, c;
|
|
1898
1898
|
if (!r.value) return;
|
|
1899
|
-
let d =
|
|
1899
|
+
let d = P(t), f = (u = e.value) == null ? void 0 : u.activeElement;
|
|
1900
1900
|
if (d) {
|
|
1901
1901
|
if (d === f) {
|
|
1902
1902
|
l.value = f;
|
|
@@ -1906,7 +1906,7 @@ function ra({ ownerDocument: e, container: n, initialFocus: t }, o) {
|
|
|
1906
1906
|
l.value = f;
|
|
1907
1907
|
return;
|
|
1908
1908
|
}
|
|
1909
|
-
d ?
|
|
1909
|
+
d ? Le(d) : nt(s, Se.First | Se.NoScroll) === Yn.Error && console.warn("There are no focusable elements inside the <FocusTrap />"), l.value = (c = e.value) == null ? void 0 : c.activeElement;
|
|
1910
1910
|
});
|
|
1911
1911
|
}, { immediate: !0, flush: "post" });
|
|
1912
1912
|
}), l;
|
|
@@ -1916,11 +1916,11 @@ function ia({ ownerDocument: e, container: n, containers: t, previousActiveEleme
|
|
|
1916
1916
|
dl((r = e.value) == null ? void 0 : r.defaultView, "focus", (a) => {
|
|
1917
1917
|
if (!l.value) return;
|
|
1918
1918
|
let i = fl(t);
|
|
1919
|
-
|
|
1919
|
+
P(n) instanceof HTMLElement && i.add(P(n));
|
|
1920
1920
|
let s = o.value;
|
|
1921
1921
|
if (!s) return;
|
|
1922
1922
|
let u = a.target;
|
|
1923
|
-
u && u instanceof HTMLElement ? pl(i, u) ? (o.value = u,
|
|
1923
|
+
u && u instanceof HTMLElement ? pl(i, u) ? (o.value = u, Le(u)) : (a.preventDefault(), a.stopPropagation(), Le(s)) : Le(o.value);
|
|
1924
1924
|
}, !0);
|
|
1925
1925
|
}
|
|
1926
1926
|
function pl(e, n) {
|
|
@@ -2045,23 +2045,23 @@ function pa(e, n, t) {
|
|
|
2045
2045
|
});
|
|
2046
2046
|
}, { immediate: !0 }), l;
|
|
2047
2047
|
}
|
|
2048
|
-
let
|
|
2048
|
+
let Lt = /* @__PURE__ */ new Map(), et = /* @__PURE__ */ new Map();
|
|
2049
2049
|
function $n(e, n = T(!0)) {
|
|
2050
2050
|
le((t) => {
|
|
2051
2051
|
var o;
|
|
2052
2052
|
if (!n.value) return;
|
|
2053
|
-
let l =
|
|
2053
|
+
let l = P(e);
|
|
2054
2054
|
if (!l) return;
|
|
2055
2055
|
t(function() {
|
|
2056
2056
|
var a;
|
|
2057
2057
|
if (!l) return;
|
|
2058
2058
|
let i = (a = et.get(l)) != null ? a : 1;
|
|
2059
2059
|
if (i === 1 ? et.delete(l) : et.set(l, i - 1), i !== 1) return;
|
|
2060
|
-
let s =
|
|
2061
|
-
s && (s["aria-hidden"] === null ? l.removeAttribute("aria-hidden") : l.setAttribute("aria-hidden", s["aria-hidden"]), l.inert = s.inert,
|
|
2060
|
+
let s = Lt.get(l);
|
|
2061
|
+
s && (s["aria-hidden"] === null ? l.removeAttribute("aria-hidden") : l.setAttribute("aria-hidden", s["aria-hidden"]), l.inert = s.inert, Lt.delete(l));
|
|
2062
2062
|
});
|
|
2063
2063
|
let r = (o = et.get(l)) != null ? o : 0;
|
|
2064
|
-
et.set(l, r + 1), r === 0 && (
|
|
2064
|
+
et.set(l, r + 1), r === 0 && (Lt.set(l, { "aria-hidden": l.getAttribute("aria-hidden"), inert: l.inert }), l.setAttribute("aria-hidden", "true"), l.inert = !0);
|
|
2065
2065
|
});
|
|
2066
2066
|
}
|
|
2067
2067
|
function ma({ defaultContainers: e = [], portals: n, mainTreeNodeRef: t } = {}) {
|
|
@@ -2071,7 +2071,7 @@ function ma({ defaultContainers: e = [], portals: n, mainTreeNodeRef: t } = {})
|
|
|
2071
2071
|
let u = [];
|
|
2072
2072
|
for (let c of e) c !== null && (c instanceof HTMLElement ? u.push(c) : "value" in c && c.value instanceof HTMLElement && u.push(c.value));
|
|
2073
2073
|
if (n != null && n.value) for (let c of n.value) u.push(c);
|
|
2074
|
-
for (let c of (a = l == null ? void 0 : l.querySelectorAll("html > *, body > *")) != null ? a : []) c !== document.body && c !== document.head && c instanceof HTMLElement && c.id !== "headlessui-portal-root" && (c.contains(
|
|
2074
|
+
for (let c of (a = l == null ? void 0 : l.querySelectorAll("html > *, body > *")) != null ? a : []) c !== document.body && c !== document.head && c instanceof HTMLElement && c.id !== "headlessui-portal-root" && (c.contains(P(o)) || c.contains((s = (i = P(o)) == null ? void 0 : i.getRootNode()) == null ? void 0 : s.host) || u.some((d) => c.contains(d)) || u.push(c));
|
|
2075
2075
|
return u;
|
|
2076
2076
|
}
|
|
2077
2077
|
return { resolveContainers: r, contains(a) {
|
|
@@ -2164,7 +2164,7 @@ let yl = Y({ name: "Portal", props: { as: { type: [Object, String], default: "di
|
|
|
2164
2164
|
let u = se(zt, null), c = !1, d = Vn();
|
|
2165
2165
|
return oe(o, () => {
|
|
2166
2166
|
if (c || !u) return;
|
|
2167
|
-
let f =
|
|
2167
|
+
let f = P(o);
|
|
2168
2168
|
f && (fe(u.register(f), d), c = !0);
|
|
2169
2169
|
}), fe(() => {
|
|
2170
2170
|
var f, v;
|
|
@@ -2221,17 +2221,17 @@ let gt = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", xl = Y({ name: "Dialog", inheri
|
|
|
2221
2221
|
let u = !1, c = x(() => e.role === "dialog" || e.role === "alertdialog" ? e.role : (u || (u = !0, console.warn(`Invalid role [${c}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog")), d = T(0), f = ct(), v = x(() => e.open === gt && f !== null ? (f.value & te.Open) === te.Open : e.open), p = T(null), m = x(() => ke(p));
|
|
2222
2222
|
if (l({ el: p, $el: p }), !(e.open !== gt || f !== null)) throw new Error("You forgot to provide an `open` prop to the `Dialog`.");
|
|
2223
2223
|
if (typeof v.value != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${v.value === gt ? void 0 : e.open}`);
|
|
2224
|
-
let S = x(() => s.value && v.value ? 0 : 1), y = x(() => S.value === 0), h = x(() => d.value > 1), b = se(Ht, null) !== null, [
|
|
2224
|
+
let S = x(() => s.value && v.value ? 0 : 1), y = x(() => S.value === 0), h = x(() => d.value > 1), b = se(Ht, null) !== null, [I, $] = Sa(), { resolveContainers: D, mainTreeNodeRef: A, MainTreeNode: g } = ma({ portals: I, defaultContainers: [x(() => {
|
|
2225
2225
|
var G;
|
|
2226
2226
|
return (G = ae.panelRef.value) != null ? G : p.value;
|
|
2227
2227
|
})] }), M = x(() => h.value ? "parent" : "leaf"), O = x(() => f !== null ? (f.value & te.Closing) === te.Closing : !1), R = x(() => b || O.value ? !1 : y.value), B = x(() => {
|
|
2228
2228
|
var G, ee, he;
|
|
2229
|
-
return (he = Array.from((ee = (G = m.value) == null ? void 0 : G.querySelectorAll("body > *")) != null ? ee : []).find((ge) => ge.id === "headlessui-portal-root" ? !1 : ge.contains(
|
|
2229
|
+
return (he = Array.from((ee = (G = m.value) == null ? void 0 : G.querySelectorAll("body > *")) != null ? ee : []).find((ge) => ge.id === "headlessui-portal-root" ? !1 : ge.contains(P(A)) && ge instanceof HTMLElement)) != null ? he : null;
|
|
2230
2230
|
});
|
|
2231
2231
|
$n(B, R);
|
|
2232
2232
|
let F = x(() => h.value ? !0 : y.value), V = x(() => {
|
|
2233
2233
|
var G, ee, he;
|
|
2234
|
-
return (he = Array.from((ee = (G = m.value) == null ? void 0 : G.querySelectorAll("[data-headlessui-portal]")) != null ? ee : []).find((ge) => ge.contains(
|
|
2234
|
+
return (he = Array.from((ee = (G = m.value) == null ? void 0 : G.querySelectorAll("[data-headlessui-portal]")) != null ? ee : []).find((ge) => ge.contains(P(A)) && ge instanceof HTMLElement)) != null ? he : null;
|
|
2235
2235
|
});
|
|
2236
2236
|
$n(V, F), ba({ type: "Dialog", enabled: x(() => S.value === 0), element: p, onUpdate: (G, ee) => {
|
|
2237
2237
|
if (ee === "Dialog") return re(G, { [Nt.Add]: () => d.value += 1, [Nt.Remove]: () => d.value -= 1 });
|
|
@@ -2242,10 +2242,10 @@ let gt = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", xl = Y({ name: "Dialog", inheri
|
|
|
2242
2242
|
n("close", !1);
|
|
2243
2243
|
} };
|
|
2244
2244
|
ve(Ht, ae);
|
|
2245
|
-
let
|
|
2245
|
+
let Ie = x(() => !(!y.value || h.value));
|
|
2246
2246
|
_t(D, (G, ee) => {
|
|
2247
2247
|
G.preventDefault(), ae.close(), de(() => ee == null ? void 0 : ee.focus());
|
|
2248
|
-
},
|
|
2248
|
+
}, Ie);
|
|
2249
2249
|
let pt = x(() => !(h.value || S.value !== 0));
|
|
2250
2250
|
dl((a = m.value) == null ? void 0 : a.defaultView, "keydown", (G) => {
|
|
2251
2251
|
pt.value && (G.defaultPrevented || G.key === H.Escape && (G.preventDefault(), G.stopPropagation(), ae.close()));
|
|
@@ -2256,18 +2256,18 @@ let gt = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", xl = Y({ name: "Dialog", inheri
|
|
|
2256
2256
|
return { containers: [...(ee = G.containers) != null ? ee : [], D] };
|
|
2257
2257
|
}), le((G) => {
|
|
2258
2258
|
if (S.value !== 0) return;
|
|
2259
|
-
let ee =
|
|
2259
|
+
let ee = P(p);
|
|
2260
2260
|
if (!ee) return;
|
|
2261
2261
|
let he = new ResizeObserver((ge) => {
|
|
2262
|
-
for (let
|
|
2263
|
-
let mt =
|
|
2262
|
+
for (let It of ge) {
|
|
2263
|
+
let mt = It.target.getBoundingClientRect();
|
|
2264
2264
|
mt.x === 0 && mt.y === 0 && mt.width === 0 && mt.height === 0 && ae.close();
|
|
2265
2265
|
}
|
|
2266
2266
|
});
|
|
2267
2267
|
he.observe(ee), G(() => he.disconnect());
|
|
2268
2268
|
}), () => {
|
|
2269
|
-
let { open: G, initialFocus: ee, ...he } = e, ge = { ...t, ref: p, id: i, role: c.value, "aria-modal": S.value === 0 ? !0 : void 0, "aria-labelledby": Q.value, "aria-describedby": N.value },
|
|
2270
|
-
return J(Vt, { force: !0 }, () => [J(yl, () => J($a, { target: p.value }, () => J(Vt, { force: !1 }, () => J(_e, { initialFocus: ee, containers: D, features: y.value ? re(M.value, { parent: _e.features.RestoreFocus, leaf: _e.features.All & ~_e.features.FocusLock }) : _e.features.None }, () => J($, {}, () => X({ ourProps: ge, theirProps: { ...he, ...t }, slot:
|
|
2269
|
+
let { open: G, initialFocus: ee, ...he } = e, ge = { ...t, ref: p, id: i, role: c.value, "aria-modal": S.value === 0 ? !0 : void 0, "aria-labelledby": Q.value, "aria-describedby": N.value }, It = { open: S.value === 0 };
|
|
2270
|
+
return J(Vt, { force: !0 }, () => [J(yl, () => J($a, { target: p.value }, () => J(Vt, { force: !1 }, () => J(_e, { initialFocus: ee, containers: D, features: y.value ? re(M.value, { parent: _e.features.RestoreFocus, leaf: _e.features.All & ~_e.features.FocusLock }) : _e.features.None }, () => J($, {}, () => X({ ourProps: ge, theirProps: { ...he, ...t }, slot: It, attrs: t, slots: o, visible: S.value === 0, features: Ee.RenderStrategy | Ee.Static, name: "Dialog" })))))), J(g)]);
|
|
2271
2271
|
};
|
|
2272
2272
|
} });
|
|
2273
2273
|
Y({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, setup(e, { attrs: n, slots: t }) {
|
|
@@ -2341,7 +2341,7 @@ function Ea(e) {
|
|
|
2341
2341
|
function Ta(e) {
|
|
2342
2342
|
let n = T(""), t = T("");
|
|
2343
2343
|
return () => {
|
|
2344
|
-
let o =
|
|
2344
|
+
let o = P(e);
|
|
2345
2345
|
if (!o) return "";
|
|
2346
2346
|
let l = o.innerText;
|
|
2347
2347
|
if (n.value === l) return t.value;
|
|
@@ -2362,10 +2362,10 @@ function Ot(e) {
|
|
|
2362
2362
|
}
|
|
2363
2363
|
return n;
|
|
2364
2364
|
}
|
|
2365
|
-
let
|
|
2365
|
+
let Ia = Y({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: n, attrs: t }) {
|
|
2366
2366
|
let o = T(1), l = T(null), r = T(null), a = T([]), i = T(""), s = T(null), u = T(1);
|
|
2367
2367
|
function c(f = (v) => v) {
|
|
2368
|
-
let v = s.value !== null ? a.value[s.value] : null, p = Jt(f(a.value.slice()), (S) =>
|
|
2368
|
+
let v = s.value !== null ? a.value[s.value] : null, p = Jt(f(a.value.slice()), (S) => P(S.dataRef.domRef)), m = v ? p.indexOf(v) : null;
|
|
2369
2369
|
return m === -1 && (m = null), { items: p, activeItemIndex: m };
|
|
2370
2370
|
}
|
|
2371
2371
|
let d = { menuState: o, buttonRef: l, itemsRef: r, items: a, searchQuery: i, activeItemIndex: s, activationTrigger: u, closeMenu: () => {
|
|
@@ -2392,7 +2392,7 @@ let Pa = Y({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
2392
2392
|
} };
|
|
2393
2393
|
return _t([l, r], (f, v) => {
|
|
2394
2394
|
var p;
|
|
2395
|
-
d.closeMenu(), Qt(v, Xt.Loose) || (f.preventDefault(), (p =
|
|
2395
|
+
d.closeMenu(), Qt(v, Xt.Loose) || (f.preventDefault(), (p = P(l)) == null || p.focus());
|
|
2396
2396
|
}, x(() => o.value === 0)), ve(Ol, d), tn(x(() => re(o.value, { 0: te.Open, 1: te.Closed }))), () => {
|
|
2397
2397
|
let f = { open: o.value === 0, close: d.closeMenu };
|
|
2398
2398
|
return X({ ourProps: {}, theirProps: e, slot: f, slots: n, attrs: t, name: "Menu" });
|
|
@@ -2408,13 +2408,13 @@ let Pa = Y({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
2408
2408
|
case H.ArrowDown:
|
|
2409
2409
|
d.preventDefault(), d.stopPropagation(), a.openMenu(), de(() => {
|
|
2410
2410
|
var f;
|
|
2411
|
-
(f =
|
|
2411
|
+
(f = P(a.itemsRef)) == null || f.focus({ preventScroll: !0 }), a.goToItem(U.First);
|
|
2412
2412
|
});
|
|
2413
2413
|
break;
|
|
2414
2414
|
case H.ArrowUp:
|
|
2415
2415
|
d.preventDefault(), d.stopPropagation(), a.openMenu(), de(() => {
|
|
2416
2416
|
var f;
|
|
2417
|
-
(f =
|
|
2417
|
+
(f = P(a.itemsRef)) == null || f.focus({ preventScroll: !0 }), a.goToItem(U.Last);
|
|
2418
2418
|
});
|
|
2419
2419
|
break;
|
|
2420
2420
|
}
|
|
@@ -2429,22 +2429,22 @@ let Pa = Y({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
2429
2429
|
function u(d) {
|
|
2430
2430
|
e.disabled || (a.menuState.value === 0 ? (a.closeMenu(), de(() => {
|
|
2431
2431
|
var f;
|
|
2432
|
-
return (f =
|
|
2432
|
+
return (f = P(a.buttonRef)) == null ? void 0 : f.focus({ preventScroll: !0 });
|
|
2433
2433
|
})) : (d.preventDefault(), a.openMenu(), ka(() => {
|
|
2434
2434
|
var f;
|
|
2435
|
-
return (f =
|
|
2435
|
+
return (f = P(a.itemsRef)) == null ? void 0 : f.focus({ preventScroll: !0 });
|
|
2436
2436
|
})));
|
|
2437
2437
|
}
|
|
2438
2438
|
let c = en(x(() => ({ as: e.as, type: n.type })), a.buttonRef);
|
|
2439
2439
|
return () => {
|
|
2440
2440
|
var d;
|
|
2441
|
-
let f = { open: a.menuState.value === 0 }, { ...v } = e, p = { ref: a.buttonRef, id: r, type: c.value, "aria-haspopup": "menu", "aria-controls": (d =
|
|
2441
|
+
let f = { open: a.menuState.value === 0 }, { ...v } = e, p = { ref: a.buttonRef, id: r, type: c.value, "aria-haspopup": "menu", "aria-controls": (d = P(a.itemsRef)) == null ? void 0 : d.id, "aria-expanded": a.menuState.value === 0, onKeydown: i, onKeyup: s, onClick: u };
|
|
2442
2442
|
return X({ ourProps: p, theirProps: v, slot: f, attrs: n, slots: t, name: "MenuButton" });
|
|
2443
2443
|
};
|
|
2444
|
-
} }),
|
|
2444
|
+
} }), Pa = Y({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: null } }, setup(e, { attrs: n, slots: t, expose: o }) {
|
|
2445
2445
|
var l;
|
|
2446
2446
|
let r = (l = e.id) != null ? l : `headlessui-menu-items-${ue()}`, a = Ot("MenuItems"), i = T(null);
|
|
2447
|
-
o({ el: a.itemsRef, $el: a.itemsRef }), el({ container: x(() =>
|
|
2447
|
+
o({ el: a.itemsRef, $el: a.itemsRef }), el({ container: x(() => P(a.itemsRef)), enabled: x(() => a.menuState.value === 0), accept(f) {
|
|
2448
2448
|
return f.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : f.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
2449
2449
|
}, walk(f) {
|
|
2450
2450
|
f.setAttribute("role", "none");
|
|
@@ -2457,9 +2457,9 @@ let Pa = Y({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
2457
2457
|
case H.Enter:
|
|
2458
2458
|
if (f.preventDefault(), f.stopPropagation(), a.activeItemIndex.value !== null) {
|
|
2459
2459
|
let p = a.items.value[a.activeItemIndex.value];
|
|
2460
|
-
(v =
|
|
2460
|
+
(v = P(p.dataRef.domRef)) == null || v.click();
|
|
2461
2461
|
}
|
|
2462
|
-
a.closeMenu(), Gn(
|
|
2462
|
+
a.closeMenu(), Gn(P(a.buttonRef));
|
|
2463
2463
|
break;
|
|
2464
2464
|
case H.ArrowDown:
|
|
2465
2465
|
return f.preventDefault(), f.stopPropagation(), a.goToItem(U.Next);
|
|
@@ -2474,11 +2474,11 @@ let Pa = Y({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
2474
2474
|
case H.Escape:
|
|
2475
2475
|
f.preventDefault(), f.stopPropagation(), a.closeMenu(), de(() => {
|
|
2476
2476
|
var p;
|
|
2477
|
-
return (p =
|
|
2477
|
+
return (p = P(a.buttonRef)) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
2478
2478
|
});
|
|
2479
2479
|
break;
|
|
2480
2480
|
case H.Tab:
|
|
2481
|
-
f.preventDefault(), f.stopPropagation(), a.closeMenu(), de(() => jo(
|
|
2481
|
+
f.preventDefault(), f.stopPropagation(), a.closeMenu(), de(() => jo(P(a.buttonRef), f.shiftKey ? Se.Previous : Se.Next));
|
|
2482
2482
|
break;
|
|
2483
2483
|
default:
|
|
2484
2484
|
f.key.length === 1 && (a.search(f.key), i.value = setTimeout(() => a.clearSearch(), 350));
|
|
@@ -2495,7 +2495,7 @@ let Pa = Y({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
2495
2495
|
let c = ct(), d = x(() => c !== null ? (c.value & te.Open) === te.Open : a.menuState.value === 0);
|
|
2496
2496
|
return () => {
|
|
2497
2497
|
var f, v;
|
|
2498
|
-
let p = { open: a.menuState.value === 0 }, { ...m } = e, S = { "aria-activedescendant": a.activeItemIndex.value === null || (f = a.items.value[a.activeItemIndex.value]) == null ? void 0 : f.id, "aria-labelledby": (v =
|
|
2498
|
+
let p = { open: a.menuState.value === 0 }, { ...m } = e, S = { "aria-activedescendant": a.activeItemIndex.value === null || (f = a.items.value[a.activeItemIndex.value]) == null ? void 0 : f.id, "aria-labelledby": (v = P(a.buttonRef)) == null ? void 0 : v.id, id: r, onKeydown: s, onKeyup: u, role: "menu", tabIndex: 0, ref: a.itemsRef };
|
|
2499
2499
|
return X({ ourProps: S, theirProps: m, slot: p, attrs: n, slots: t, features: Ee.RenderStrategy | Ee.Static, visible: d.value, name: "MenuItems" });
|
|
2500
2500
|
};
|
|
2501
2501
|
} }), Rn = Y({ name: "MenuItem", inheritAttrs: !1, props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: null } }, setup(e, { slots: n, attrs: t, expose: o }) {
|
|
@@ -2508,12 +2508,12 @@ let Pa = Y({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
2508
2508
|
_(() => a.registerItem(r, c)), fe(() => a.unregisterItem(r)), le(() => {
|
|
2509
2509
|
a.menuState.value === 0 && s.value && a.activationTrigger.value !== 0 && de(() => {
|
|
2510
2510
|
var y, h;
|
|
2511
|
-
return (h = (y =
|
|
2511
|
+
return (h = (y = P(i)) == null ? void 0 : y.scrollIntoView) == null ? void 0 : h.call(y, { block: "nearest" });
|
|
2512
2512
|
});
|
|
2513
2513
|
});
|
|
2514
2514
|
function d(y) {
|
|
2515
2515
|
if (e.disabled) return y.preventDefault();
|
|
2516
|
-
a.closeMenu(), Gn(
|
|
2516
|
+
a.closeMenu(), Gn(P(a.buttonRef));
|
|
2517
2517
|
}
|
|
2518
2518
|
function f() {
|
|
2519
2519
|
if (e.disabled) return a.goToItem(U.Nothing);
|
|
@@ -2542,7 +2542,7 @@ function Tl() {
|
|
|
2542
2542
|
}
|
|
2543
2543
|
return e;
|
|
2544
2544
|
}
|
|
2545
|
-
function
|
|
2545
|
+
function Aa({ slot: e = {}, name: n = "Label", props: t = {} } = {}) {
|
|
2546
2546
|
let o = T([]);
|
|
2547
2547
|
function l(r) {
|
|
2548
2548
|
return o.value.push(r), () => {
|
|
@@ -2552,7 +2552,7 @@ function Ia({ slot: e = {}, name: n = "Label", props: t = {} } = {}) {
|
|
|
2552
2552
|
}
|
|
2553
2553
|
return ve(El, { register: l, slot: e, name: n, props: t }), x(() => o.value.length > 0 ? o.value.join(" ") : void 0);
|
|
2554
2554
|
}
|
|
2555
|
-
let
|
|
2555
|
+
let La = Y({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: !1 }, id: { type: String, default: null } }, setup(e, { slots: n, attrs: t }) {
|
|
2556
2556
|
var o;
|
|
2557
2557
|
let l = (o = e.id) != null ? o : `headlessui-label-${ue()}`, r = Tl();
|
|
2558
2558
|
return _(() => fe(r.register(l))), () => {
|
|
@@ -2560,7 +2560,7 @@ let Aa = Y({ name: "Label", props: { as: { type: [Object, String], default: "lab
|
|
|
2560
2560
|
return u && (delete d.onClick, delete d.htmlFor, delete c.onClick), X({ ourProps: d, theirProps: c, slot: i, attrs: t, slots: n, name: a });
|
|
2561
2561
|
};
|
|
2562
2562
|
} }), Cl = Symbol("GroupContext"), Da = Y({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: n, attrs: t }) {
|
|
2563
|
-
let o = T(null), l =
|
|
2563
|
+
let o = T(null), l = Aa({ name: "SwitchLabel", props: { htmlFor: x(() => {
|
|
2564
2564
|
var a;
|
|
2565
2565
|
return (a = o.value) == null ? void 0 : a.id;
|
|
2566
2566
|
}), onClick(a) {
|
|
@@ -2586,7 +2586,7 @@ let Aa = Y({ name: "Label", props: { as: { type: [Object, String], default: "lab
|
|
|
2586
2586
|
}
|
|
2587
2587
|
let y = x(() => {
|
|
2588
2588
|
var h, b;
|
|
2589
|
-
return (b = (h =
|
|
2589
|
+
return (b = (h = P(f)) == null ? void 0 : h.closest) == null ? void 0 : b.call(h, "form");
|
|
2590
2590
|
});
|
|
2591
2591
|
return _(() => {
|
|
2592
2592
|
oe([y], () => {
|
|
@@ -2600,10 +2600,10 @@ let Aa = Y({ name: "Label", props: { as: { type: [Object, String], default: "lab
|
|
|
2600
2600
|
};
|
|
2601
2601
|
}, { immediate: !0 });
|
|
2602
2602
|
}), () => {
|
|
2603
|
-
let { name: h, value: b, form:
|
|
2604
|
-
return J(ce, [h != null && s.value != null ? J(ot, ll({ features: Ge.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: s.value, form:
|
|
2603
|
+
let { name: h, value: b, form: I, tabIndex: $, ...D } = e, A = { checked: s.value }, g = { id: a, ref: f, role: "switch", type: v.value, tabIndex: $ === -1 ? 0 : $, "aria-checked": s.value, "aria-labelledby": i == null ? void 0 : i.labelledby.value, "aria-describedby": i == null ? void 0 : i.describedby.value, onClick: p, onKeyup: m, onKeypress: S };
|
|
2604
|
+
return J(ce, [h != null && s.value != null ? J(ot, ll({ features: Ge.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: s.value, form: I, disabled: D.disabled, name: h, value: b })) : null, X({ ourProps: g, theirProps: { ...t, ...Qe(D, ["modelValue", "defaultChecked"]) }, slot: A, attrs: t, slots: o, name: "Switch" })]);
|
|
2605
2605
|
};
|
|
2606
|
-
} }), Fa =
|
|
2606
|
+
} }), Fa = La;
|
|
2607
2607
|
function Ba(e) {
|
|
2608
2608
|
let n = { called: !1 };
|
|
2609
2609
|
return (...t) => {
|
|
@@ -2658,17 +2658,17 @@ function Et(e) {
|
|
|
2658
2658
|
function Rl(e) {
|
|
2659
2659
|
let n = T([]), t = T(!1);
|
|
2660
2660
|
_(() => t.value = !0), fe(() => t.value = !1);
|
|
2661
|
-
function o(r, a =
|
|
2661
|
+
function o(r, a = Ae.Hidden) {
|
|
2662
2662
|
let i = n.value.findIndex(({ id: s }) => s === r);
|
|
2663
|
-
i !== -1 && (re(a, { [
|
|
2663
|
+
i !== -1 && (re(a, { [Ae.Unmount]() {
|
|
2664
2664
|
n.value.splice(i, 1);
|
|
2665
|
-
}, [
|
|
2665
|
+
}, [Ae.Hidden]() {
|
|
2666
2666
|
n.value[i].state = "hidden";
|
|
2667
2667
|
} }), !Et(n) && t.value && (e == null || e()));
|
|
2668
2668
|
}
|
|
2669
2669
|
function l(r) {
|
|
2670
2670
|
let a = n.value.find(({ id: i }) => i === r);
|
|
2671
|
-
return a ? a.state !== "visible" && (a.state = "visible") : n.value.push({ id: r, state: "visible" }), () => o(r,
|
|
2671
|
+
return a ? a.state !== "visible" && (a.state = "visible") : n.value.push({ id: r, state: "visible" }), () => o(r, Ae.Unmount);
|
|
2672
2672
|
}
|
|
2673
2673
|
return { children: n, register: l, unregister: o };
|
|
2674
2674
|
}
|
|
@@ -2687,16 +2687,16 @@ let kl = Ee.RenderStrategy, at = Y({ props: { as: { type: [Object, String], defa
|
|
|
2687
2687
|
r.value &= ~te.Closing, n("afterLeave");
|
|
2688
2688
|
}
|
|
2689
2689
|
if (!ja() && Wo()) return () => J(Tt, { ...e, onBeforeEnter: a, onAfterEnter: i, onBeforeLeave: s, onAfterLeave: u }, o);
|
|
2690
|
-
let c = T(null), d = x(() => e.unmount ?
|
|
2690
|
+
let c = T(null), d = x(() => e.unmount ? Ae.Unmount : Ae.Hidden);
|
|
2691
2691
|
l({ el: c, $el: c });
|
|
2692
|
-
let { show: f, appear: v } = za(), { register: p, unregister: m } = Ha(), S = T(f.value ? "visible" : "hidden"), y = { value: !0 }, h = ue(), b = { value: !1 },
|
|
2692
|
+
let { show: f, appear: v } = za(), { register: p, unregister: m } = Ha(), S = T(f.value ? "visible" : "hidden"), y = { value: !0 }, h = ue(), b = { value: !1 }, I = Rl(() => {
|
|
2693
2693
|
!b.value && S.value !== "hidden" && (S.value = "hidden", m(h), u());
|
|
2694
2694
|
});
|
|
2695
2695
|
_(() => {
|
|
2696
2696
|
let F = p(h);
|
|
2697
2697
|
fe(F);
|
|
2698
2698
|
}), le(() => {
|
|
2699
|
-
if (d.value ===
|
|
2699
|
+
if (d.value === Ae.Hidden && h) {
|
|
2700
2700
|
if (f.value && S.value !== "visible") {
|
|
2701
2701
|
S.value = "visible";
|
|
2702
2702
|
return;
|
|
@@ -2704,29 +2704,29 @@ let kl = Ee.RenderStrategy, at = Y({ props: { as: { type: [Object, String], defa
|
|
|
2704
2704
|
re(S.value, { hidden: () => m(h), visible: () => p(h) });
|
|
2705
2705
|
}
|
|
2706
2706
|
});
|
|
2707
|
-
let $ = Be(e.enter), D = Be(e.enterFrom),
|
|
2707
|
+
let $ = Be(e.enter), D = Be(e.enterFrom), A = Be(e.enterTo), g = Be(e.entered), M = Be(e.leave), O = Be(e.leaveFrom), R = Be(e.leaveTo);
|
|
2708
2708
|
_(() => {
|
|
2709
2709
|
le(() => {
|
|
2710
2710
|
if (S.value === "visible") {
|
|
2711
|
-
let F =
|
|
2711
|
+
let F = P(c);
|
|
2712
2712
|
if (F instanceof Comment && F.data === "") throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
2713
2713
|
}
|
|
2714
2714
|
});
|
|
2715
2715
|
});
|
|
2716
2716
|
function B(F) {
|
|
2717
|
-
let V = y.value && !v.value, N =
|
|
2718
|
-
!N || !(N instanceof HTMLElement) || V || (b.value = !0, f.value && a(), f.value || s(), F(f.value ? kn(N, $, D,
|
|
2717
|
+
let V = y.value && !v.value, N = P(c);
|
|
2718
|
+
!N || !(N instanceof HTMLElement) || V || (b.value = !0, f.value && a(), f.value || s(), F(f.value ? kn(N, $, D, A, g, (Q) => {
|
|
2719
2719
|
b.value = !1, Q === Wt.Finished && i();
|
|
2720
2720
|
}) : kn(N, M, O, R, g, (Q) => {
|
|
2721
|
-
b.value = !1, Q === Wt.Finished && (Et(
|
|
2721
|
+
b.value = !1, Q === Wt.Finished && (Et(I) || (S.value = "hidden", m(h), u()));
|
|
2722
2722
|
})));
|
|
2723
2723
|
}
|
|
2724
2724
|
return _(() => {
|
|
2725
2725
|
oe([f], (F, V, N) => {
|
|
2726
2726
|
B(N), y.value = !1;
|
|
2727
2727
|
}, { immediate: !0 });
|
|
2728
|
-
}), ve(ln,
|
|
2729
|
-
let { appear: F, show: V, enter: N, enterFrom: Q, enterTo: ae, entered:
|
|
2728
|
+
}), ve(ln, I), tn(x(() => re(S.value, { visible: te.Open, hidden: te.Closed }) | r.value)), () => {
|
|
2729
|
+
let { appear: F, show: V, enter: N, enterFrom: Q, enterTo: ae, entered: Ie, leave: pt, leaveFrom: vn, leaveTo: G, ...ee } = e, he = { ref: c }, ge = { ...ee, ...v.value && f.value && ut.isServer ? { class: Z([t.class, ee.class, ...$, ...D]) } : {} };
|
|
2730
2730
|
return X({ theirProps: ge, ourProps: he, slot: {}, slots: o, attrs: t, features: kl, visible: S.value === "visible", name: "TransitionChild" });
|
|
2731
2731
|
};
|
|
2732
2732
|
} }), Wa = at, Tt = Y({ inheritAttrs: !1, props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: n, attrs: t, slots: o }) {
|
|
@@ -2840,7 +2840,7 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
2840
2840
|
type: [Object, Function],
|
|
2841
2841
|
default: null
|
|
2842
2842
|
},
|
|
2843
|
-
|
|
2843
|
+
prefixIcon: {
|
|
2844
2844
|
type: [Object, Function],
|
|
2845
2845
|
default: null
|
|
2846
2846
|
},
|
|
@@ -2870,18 +2870,18 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
2870
2870
|
}), c = x({
|
|
2871
2871
|
get: () => t.requestParams,
|
|
2872
2872
|
set: (b) => o("update:requestParams", b)
|
|
2873
|
-
}), d = (b) => new Promise((
|
|
2874
|
-
setTimeout(
|
|
2875
|
-
}), f = (b,
|
|
2876
|
-
l.value = [], o("combobox:error", b), o("combobox:noResults",
|
|
2873
|
+
}), d = (b) => new Promise((I) => {
|
|
2874
|
+
setTimeout(I, b);
|
|
2875
|
+
}), f = (b, I) => {
|
|
2876
|
+
l.value = [], o("combobox:error", b), o("combobox:noResults", I);
|
|
2877
2877
|
}, v = async (b) => {
|
|
2878
2878
|
if (!t.onSearch) return;
|
|
2879
2879
|
s.value && t.onCancel && t.onCancel(s.value), r.value = !0;
|
|
2880
|
-
const
|
|
2880
|
+
const I = Date.now();
|
|
2881
2881
|
try {
|
|
2882
|
-
const { data: $, error: D, cancel:
|
|
2883
|
-
s.value =
|
|
2884
|
-
const g = t.responseData($), M = Date.now() -
|
|
2882
|
+
const { data: $, error: D, cancel: A } = await t.onSearch(t.endpoint, b, c.value);
|
|
2883
|
+
s.value = A;
|
|
2884
|
+
const g = t.responseData($), M = Date.now() - I;
|
|
2885
2885
|
!g.length && D && f(D, b), M < t.minLoadingTime && await d(t.minLoadingTime - M), g != null && g.length ? l.value = g : (l.value = [], o("combobox:noResults", b));
|
|
2886
2886
|
} catch ($) {
|
|
2887
2887
|
$.cancelled || f($, b);
|
|
@@ -2891,17 +2891,17 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
2891
2891
|
}, p = so(v, t.debounce), m = (b) => {
|
|
2892
2892
|
i.value ? (i.value = !1, v(b)) : p(b);
|
|
2893
2893
|
}, S = (b) => {
|
|
2894
|
-
var
|
|
2895
|
-
((
|
|
2894
|
+
var I;
|
|
2895
|
+
((I = b.target.value) == null ? void 0 : I.length) === 0 && (l.value = [], o("update:modelValue", null)), t.manualInput && o("update:modelValue", c.value.query);
|
|
2896
2896
|
}, y = (b) => {
|
|
2897
|
-
var
|
|
2898
|
-
return t.multiple ? u.value.some(($) => $[t.itemKey] === b) : ((
|
|
2897
|
+
var I;
|
|
2898
|
+
return t.multiple ? u.value.some(($) => $[t.itemKey] === b) : ((I = u.value) == null ? void 0 : I[t.itemKey]) === b;
|
|
2899
2899
|
}, h = (b) => {
|
|
2900
|
-
u.value = u.value.filter((
|
|
2900
|
+
u.value = u.value.filter((I) => I[t.itemKey] !== b[t.itemKey]);
|
|
2901
2901
|
};
|
|
2902
|
-
return (b,
|
|
2902
|
+
return (b, I) => (w(), W(E(Jo), ne({
|
|
2903
2903
|
modelValue: u.value,
|
|
2904
|
-
"onUpdate:modelValue":
|
|
2904
|
+
"onUpdate:modelValue": I[4] || (I[4] = ($) => u.value = $),
|
|
2905
2905
|
as: "div"
|
|
2906
2906
|
}, e.rootAttrs, {
|
|
2907
2907
|
multiple: e.multiple,
|
|
@@ -2912,40 +2912,40 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
2912
2912
|
]
|
|
2913
2913
|
}), {
|
|
2914
2914
|
default: z(() => {
|
|
2915
|
-
var $, D,
|
|
2915
|
+
var $, D, A;
|
|
2916
2916
|
return [
|
|
2917
2917
|
C("div", qa, [
|
|
2918
2918
|
C("div", Ua, [
|
|
2919
2919
|
C("div", Ka, [
|
|
2920
|
-
e.
|
|
2920
|
+
e.prefixIcon ? L(b.$slots, "prefixIcon", {
|
|
2921
2921
|
key: 0,
|
|
2922
|
-
icon: e.
|
|
2922
|
+
icon: e.prefixIcon
|
|
2923
2923
|
}, () => [
|
|
2924
|
-
(w(), W(ie(e.
|
|
2924
|
+
(w(), W(ie(e.prefixIcon), { "aria-hidden": "true" }))
|
|
2925
2925
|
]) : q("", !0),
|
|
2926
2926
|
j(E(ea), ne(b.$attrs, {
|
|
2927
2927
|
id: e.id,
|
|
2928
2928
|
"display-value": e.displayValue,
|
|
2929
2929
|
disabled: e.disabled,
|
|
2930
2930
|
autocomplete: "off",
|
|
2931
|
-
onChange:
|
|
2931
|
+
onChange: I[0] || (I[0] = (g) => m(g.target.value)),
|
|
2932
2932
|
onSearch: S,
|
|
2933
|
-
onInput:
|
|
2933
|
+
onInput: I[1] || (I[1] = (g) => a.value = g.target.value)
|
|
2934
2934
|
}), null, 16, ["id", "display-value", "disabled"]),
|
|
2935
2935
|
j(E(_o), {
|
|
2936
2936
|
disabled: e.disabled,
|
|
2937
2937
|
class: "rvc-combobox-button",
|
|
2938
|
-
onClick:
|
|
2938
|
+
onClick: I[2] || (I[2] = (g) => m(a.value || null))
|
|
2939
2939
|
}, {
|
|
2940
2940
|
default: z(() => {
|
|
2941
2941
|
var g;
|
|
2942
2942
|
return [
|
|
2943
|
-
r.value ?
|
|
2943
|
+
r.value ? L(b.$slots, "spinner", {
|
|
2944
2944
|
key: 0,
|
|
2945
2945
|
spinning: r.value
|
|
2946
2946
|
}, () => [
|
|
2947
2947
|
j(E(Zt), { class: "rvc-combobox-spinner" })
|
|
2948
|
-
]) : (!e.searchOnly || (g = l.value) != null && g.length) && !r.value ?
|
|
2948
|
+
]) : (!e.searchOnly || (g = l.value) != null && g.length) && !r.value ? L(b.$slots, "icon", {
|
|
2949
2949
|
key: 1,
|
|
2950
2950
|
icon: e.icon
|
|
2951
2951
|
}, () => [
|
|
@@ -2961,9 +2961,9 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
2961
2961
|
type: "button",
|
|
2962
2962
|
"aria-label": "Clear selection",
|
|
2963
2963
|
class: "rvc-combobox-clear",
|
|
2964
|
-
onClick:
|
|
2964
|
+
onClick: I[3] || (I[3] = wt((g) => o("update:modelValue", null), ["prevent"]))
|
|
2965
2965
|
}, [
|
|
2966
|
-
|
|
2966
|
+
L(b.$slots, "clear", {}, () => [
|
|
2967
2967
|
j(E(vo))
|
|
2968
2968
|
])
|
|
2969
2969
|
])) : q("", !0)
|
|
@@ -2972,7 +2972,7 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
2972
2972
|
(w(!0), k(ce, null, ye(u.value, (g) => (w(), k("li", {
|
|
2973
2973
|
key: `${e.id}-selected-option-${g[e.itemKey]}`
|
|
2974
2974
|
}, [
|
|
2975
|
-
|
|
2975
|
+
L(b.$slots, "chip", {
|
|
2976
2976
|
optionText: e.optionText(g),
|
|
2977
2977
|
option: g,
|
|
2978
2978
|
removeOption: h
|
|
@@ -2997,7 +2997,7 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
2997
2997
|
])
|
|
2998
2998
|
]))), 128))
|
|
2999
2999
|
])) : q("", !0),
|
|
3000
|
-
(!e.searchOnly || (
|
|
3000
|
+
(!e.searchOnly || (A = a.value) != null && A.length) && (!r.value || l.value.length) ? (w(), W(E(ta), {
|
|
3001
3001
|
key: 1,
|
|
3002
3002
|
class: "rvc-combobox-options"
|
|
3003
3003
|
}, {
|
|
@@ -3008,7 +3008,7 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
3008
3008
|
C("div", Xa, [
|
|
3009
3009
|
C("em", null, "Minimal " + K(e.minLength) + " characters.", 1)
|
|
3010
3010
|
])
|
|
3011
|
-
])) : !r.value && !l.value.length ? (w(), k("div", Qa,
|
|
3011
|
+
])) : !r.value && !l.value.length ? (w(), k("div", Qa, I[5] || (I[5] = [
|
|
3012
3012
|
C("div", { class: "rvc-flex rvc-items-center" }, " No results found. ", -1)
|
|
3013
3013
|
]))) : (w(!0), k(ce, { key: 2 }, ye(l.value, (M) => (w(), W(E(na), {
|
|
3014
3014
|
key: M[e.itemKey],
|
|
@@ -3023,16 +3023,16 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
3023
3023
|
{ "rvc-combobox-option-active": y(M[e.itemKey]) }
|
|
3024
3024
|
])
|
|
3025
3025
|
}, [
|
|
3026
|
-
|
|
3026
|
+
L(b.$slots, "option", {
|
|
3027
3027
|
option: M,
|
|
3028
3028
|
isActive: y
|
|
3029
3029
|
}, () => [
|
|
3030
|
-
|
|
3030
|
+
L(b.$slots, "optionPrefix", {
|
|
3031
3031
|
option: M[e.itemKey],
|
|
3032
3032
|
isActive: y
|
|
3033
3033
|
}),
|
|
3034
3034
|
C("span", Ja, K(e.optionText(M)), 1),
|
|
3035
|
-
|
|
3035
|
+
L(b.$slots, "optionSuffix", {
|
|
3036
3036
|
option: M[e.itemKey],
|
|
3037
3037
|
isActive: y
|
|
3038
3038
|
})
|
|
@@ -3051,7 +3051,7 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
3051
3051
|
_: 3
|
|
3052
3052
|
}, 16, ["modelValue", "multiple", "class"]));
|
|
3053
3053
|
}
|
|
3054
|
-
}),
|
|
3054
|
+
}), Il = /* @__PURE__ */ Object.assign({
|
|
3055
3055
|
inheritAttrs: !1
|
|
3056
3056
|
}, {
|
|
3057
3057
|
__name: "FormSelect",
|
|
@@ -3064,7 +3064,7 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
3064
3064
|
type: String,
|
|
3065
3065
|
default: ""
|
|
3066
3066
|
},
|
|
3067
|
-
|
|
3067
|
+
prefixIcon: {
|
|
3068
3068
|
type: [Object, Function],
|
|
3069
3069
|
default: null
|
|
3070
3070
|
},
|
|
@@ -3091,24 +3091,24 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
3091
3091
|
e.rootClass
|
|
3092
3092
|
])
|
|
3093
3093
|
}, [
|
|
3094
|
-
e.
|
|
3094
|
+
e.prefixIcon ? L(a.$slots, "prefixIcon", {
|
|
3095
3095
|
key: 0,
|
|
3096
|
-
icon: e.
|
|
3096
|
+
icon: e.prefixIcon
|
|
3097
3097
|
}, () => [
|
|
3098
|
-
(w(), W(ie(e.
|
|
3098
|
+
(w(), W(ie(e.prefixIcon), { "aria-hidden": "true" }))
|
|
3099
3099
|
]) : q("", !0),
|
|
3100
|
-
|
|
3100
|
+
L(a.$slots, "select", Ze(Wn(a.$attrs)), () => [
|
|
3101
3101
|
E(r) ? it((w(), k("select", ne({ key: 0 }, a.$attrs, {
|
|
3102
3102
|
"onUpdate:modelValue": i[0] || (i[0] = (s) => l.value = s)
|
|
3103
3103
|
}), [
|
|
3104
|
-
|
|
3104
|
+
L(a.$slots, "default")
|
|
3105
3105
|
], 16)), [
|
|
3106
3106
|
[Hl, l.value]
|
|
3107
3107
|
]) : (w(), k("select", Ze(ne({ key: 1 }, a.$attrs)), [
|
|
3108
|
-
|
|
3108
|
+
L(a.$slots, "default")
|
|
3109
3109
|
], 16))
|
|
3110
3110
|
]),
|
|
3111
|
-
|
|
3111
|
+
L(a.$slots, "icon", { icon: e.icon }, () => [
|
|
3112
3112
|
(w(), W(ie(e.icon ?? E(qn)), { "aria-hidden": "true" }))
|
|
3113
3113
|
])
|
|
3114
3114
|
], 2));
|
|
@@ -3146,8 +3146,8 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
3146
3146
|
return (r, a) => {
|
|
3147
3147
|
var i;
|
|
3148
3148
|
return (i = e.pagination) != null && i.total ? (w(), k("div", _a, [
|
|
3149
|
-
|
|
3150
|
-
j(
|
|
3149
|
+
L(r.$slots, "perPage", ne(e.pagination, { perPage: l.value }), () => [
|
|
3150
|
+
j(Il, {
|
|
3151
3151
|
modelValue: l.value,
|
|
3152
3152
|
"onUpdate:modelValue": [
|
|
3153
3153
|
a[0] || (a[0] = (s) => l.value = s),
|
|
@@ -3165,7 +3165,7 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
3165
3165
|
_: 1
|
|
3166
3166
|
}, 8, ["modelValue"])
|
|
3167
3167
|
]),
|
|
3168
|
-
|
|
3168
|
+
L(r.$slots, "info", ne(e.pagination, { fromLabel: e.fromLabel }), () => [
|
|
3169
3169
|
C("div", tr, [
|
|
3170
3170
|
C("div", nr, K(e.pagination.from) + " - " + K(e.pagination.to) + " " + K(e.fromLabel) + " " + K(e.pagination.total), 1)
|
|
3171
3171
|
])
|
|
@@ -3261,7 +3261,7 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
3261
3261
|
}, [
|
|
3262
3262
|
e.headers.length ? (w(), k("thead", cr, [
|
|
3263
3263
|
C("tr", null, [
|
|
3264
|
-
|
|
3264
|
+
L(i.$slots, "headers", { headers: e.headers }, () => [
|
|
3265
3265
|
(w(!0), k(ce, null, ye(e.headers, (u) => {
|
|
3266
3266
|
var c, d;
|
|
3267
3267
|
return w(), k("th", ne({ ref_for: !0 }, u, {
|
|
@@ -3285,7 +3285,7 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
3285
3285
|
]),
|
|
3286
3286
|
onClick: (f) => a(u)
|
|
3287
3287
|
}, [
|
|
3288
|
-
|
|
3288
|
+
L(i.$slots, "header-label", {
|
|
3289
3289
|
sortBy: l.value,
|
|
3290
3290
|
header: u
|
|
3291
3291
|
}, () => [
|
|
@@ -3301,7 +3301,7 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
3301
3301
|
}
|
|
3302
3302
|
])
|
|
3303
3303
|
}, null, 8, ["class"])
|
|
3304
|
-
], 10, dr)) :
|
|
3304
|
+
], 10, dr)) : L(i.$slots, "header-label", {
|
|
3305
3305
|
key: 1,
|
|
3306
3306
|
sortBy: l.value,
|
|
3307
3307
|
header: u
|
|
@@ -3317,7 +3317,7 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
3317
3317
|
e.items.length && !e.spinning ? (w(!0), k(ce, { key: 0 }, ye(e.items, (u, c) => (w(), k("tr", {
|
|
3318
3318
|
key: `rvc-table-row-${c}-${u.id}`
|
|
3319
3319
|
}, [
|
|
3320
|
-
|
|
3320
|
+
L(i.$slots, "items", {
|
|
3321
3321
|
item: u,
|
|
3322
3322
|
index: c
|
|
3323
3323
|
}, () => [
|
|
@@ -3348,7 +3348,7 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
3348
3348
|
colspan: e.headers.length,
|
|
3349
3349
|
class: "rvc-table-state"
|
|
3350
3350
|
}, [
|
|
3351
|
-
|
|
3351
|
+
L(i.$slots, "spinner", {
|
|
3352
3352
|
spinning: e.spinning,
|
|
3353
3353
|
label: e.loadingText
|
|
3354
3354
|
}, () => [
|
|
@@ -3366,7 +3366,7 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
3366
3366
|
])
|
|
3367
3367
|
], 2)
|
|
3368
3368
|
]),
|
|
3369
|
-
e.pagination ?
|
|
3369
|
+
e.pagination ? L(i.$slots, "pagination", Ze(ne({ key: 0 }, e.pagination)), () => [
|
|
3370
3370
|
j(sr, {
|
|
3371
3371
|
pagination: e.pagination,
|
|
3372
3372
|
"onPagination:change": s[0] || (s[0] = (u) => o("pagination:change", u)),
|
|
@@ -3376,7 +3376,7 @@ const qa = { class: "rvc-relative" }, Ua = { class: "rvc-flex rvc-gap-x-1" }, Ka
|
|
|
3376
3376
|
]));
|
|
3377
3377
|
}
|
|
3378
3378
|
};
|
|
3379
|
-
function
|
|
3379
|
+
function Pl(e) {
|
|
3380
3380
|
const n = T(null), t = T(!1), o = x(() => e.as === "form"), l = x(() => `${e.id}-title`), r = x(() => `${e.id}-content`), a = x(() => {
|
|
3381
3381
|
var i;
|
|
3382
3382
|
return (i = n.value) == null ? void 0 : i.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
@@ -3445,7 +3445,7 @@ const br = {
|
|
|
3445
3445
|
titleId: i,
|
|
3446
3446
|
descriptionId: s,
|
|
3447
3447
|
initialFocusElement: u
|
|
3448
|
-
} =
|
|
3448
|
+
} = Pl(o);
|
|
3449
3449
|
return (c, d) => (w(), W(E(Tt), { as: "template" }, {
|
|
3450
3450
|
default: z(() => [
|
|
3451
3451
|
j(E(xl), {
|
|
@@ -3503,7 +3503,7 @@ const br = {
|
|
|
3503
3503
|
C("header", {
|
|
3504
3504
|
class: Z([{ "rvc-sticky rvc-top-0 rvc-left-0 rvc-w-full rvc-z-10": e.headerSticky }, "rvc-drawer-header"])
|
|
3505
3505
|
}, [
|
|
3506
|
-
|
|
3506
|
+
L(c.$slots, "header", {
|
|
3507
3507
|
title: e.title,
|
|
3508
3508
|
showClose: e.showClose
|
|
3509
3509
|
}, () => [
|
|
@@ -3542,11 +3542,11 @@ const br = {
|
|
|
3542
3542
|
ref: l,
|
|
3543
3543
|
class: "rvc-relative rvc-flex-1 rvc-drawer-content"
|
|
3544
3544
|
}, [
|
|
3545
|
-
|
|
3545
|
+
L(c.$slots, "default", { ready: E(r) })
|
|
3546
3546
|
], 8, Or)
|
|
3547
3547
|
], 2),
|
|
3548
3548
|
C("footer", Er, [
|
|
3549
|
-
|
|
3549
|
+
L(c.$slots, "footer", { loading: e.spinning }, () => [
|
|
3550
3550
|
j(lt, {
|
|
3551
3551
|
type: "button",
|
|
3552
3552
|
label: e.cancelLabel,
|
|
@@ -3615,12 +3615,12 @@ const br = {
|
|
|
3615
3615
|
} = l;
|
|
3616
3616
|
return c;
|
|
3617
3617
|
};
|
|
3618
|
-
return (l, r) => (w(), W(E(
|
|
3618
|
+
return (l, r) => (w(), W(E(Ia), {
|
|
3619
3619
|
as: "div",
|
|
3620
3620
|
class: Z(["rvc-relative rvc-inline-block rvc-w-fit", e.rootClass])
|
|
3621
3621
|
}, {
|
|
3622
3622
|
default: z(() => [
|
|
3623
|
-
|
|
3623
|
+
L(l.$slots, "button", {
|
|
3624
3624
|
label: e.label,
|
|
3625
3625
|
button: E(Cn)
|
|
3626
3626
|
}, () => [
|
|
@@ -3641,11 +3641,11 @@ const br = {
|
|
|
3641
3641
|
"leave-to-class": "rvc-transform rvc-scale-95 rvc-opacity-0"
|
|
3642
3642
|
}, {
|
|
3643
3643
|
default: z(() => [
|
|
3644
|
-
j(E(
|
|
3644
|
+
j(E(Pa), {
|
|
3645
3645
|
class: Z(["rvc-dropdown", e.alignLeft ? "rvc-left-0" : "rvc-right-0"])
|
|
3646
3646
|
}, {
|
|
3647
3647
|
default: z(() => [
|
|
3648
|
-
|
|
3648
|
+
L(l.$slots, "items", {
|
|
3649
3649
|
items: e.items,
|
|
3650
3650
|
menuItem: E(Rn)
|
|
3651
3651
|
}, () => [
|
|
@@ -3654,7 +3654,7 @@ const br = {
|
|
|
3654
3654
|
as: "template"
|
|
3655
3655
|
}, {
|
|
3656
3656
|
default: z(() => [
|
|
3657
|
-
|
|
3657
|
+
L(l.$slots, "item", { item: a }, () => [
|
|
3658
3658
|
(w(), W(ie(a.as ? a.as : "button"), ne({
|
|
3659
3659
|
class: "rvc-dropdown-item",
|
|
3660
3660
|
ref_for: !0
|
|
@@ -3715,7 +3715,7 @@ const br = {
|
|
|
3715
3715
|
class: "rvc-empty-state-icon"
|
|
3716
3716
|
})) : q("", !0),
|
|
3717
3717
|
e.title ? (w(), k("p", Tr, K(e.title), 1)) : q("", !0),
|
|
3718
|
-
|
|
3718
|
+
L(n.$slots, "default")
|
|
3719
3719
|
], 2));
|
|
3720
3720
|
}
|
|
3721
3721
|
}, Cr = {
|
|
@@ -3734,7 +3734,7 @@ const br = {
|
|
|
3734
3734
|
type: String,
|
|
3735
3735
|
default: ""
|
|
3736
3736
|
},
|
|
3737
|
-
|
|
3737
|
+
prefixIcon: {
|
|
3738
3738
|
type: [Object, Function],
|
|
3739
3739
|
default: null
|
|
3740
3740
|
},
|
|
@@ -3761,17 +3761,17 @@ const br = {
|
|
|
3761
3761
|
e.rootClass
|
|
3762
3762
|
])
|
|
3763
3763
|
}, [
|
|
3764
|
-
E(r).prefix || E(r).
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
e.
|
|
3764
|
+
E(r).prefix || E(r).prefixIcon || e.prefixIcon ? (w(), k("span", Cr, [
|
|
3765
|
+
L(i.$slots, "prefix", {}, () => [
|
|
3766
|
+
L(i.$slots, "prefixIcon", { icon: e.prefixIcon }, () => [
|
|
3767
|
+
e.prefixIcon ? (w(), W(ie(e.prefixIcon), {
|
|
3768
3768
|
key: 0,
|
|
3769
3769
|
"aria-hidden": "true"
|
|
3770
3770
|
})) : q("", !0)
|
|
3771
3771
|
])
|
|
3772
3772
|
])
|
|
3773
3773
|
])) : q("", !0),
|
|
3774
|
-
|
|
3774
|
+
L(i.$slots, "input", Ze(Wn(i.$attrs)), () => [
|
|
3775
3775
|
E(l) ? it((w(), k("input", ne({ key: 0 }, i.$attrs, {
|
|
3776
3776
|
"onUpdate:modelValue": s[0] || (s[0] = (u) => a.value = u),
|
|
3777
3777
|
type: i.$attrs.type || "text"
|
|
@@ -3782,7 +3782,7 @@ const br = {
|
|
|
3782
3782
|
type: i.$attrs.type || "text"
|
|
3783
3783
|
}, i.$attrs), null, 16, kr))
|
|
3784
3784
|
]),
|
|
3785
|
-
|
|
3785
|
+
L(i.$slots, "icon", { icon: e.icon }, () => [
|
|
3786
3786
|
e.icon ? (w(), W(ie(e.icon), {
|
|
3787
3787
|
key: 0,
|
|
3788
3788
|
"aria-hidden": "true"
|
|
@@ -3858,7 +3858,7 @@ const br = {
|
|
|
3858
3858
|
}, 16, ["modelValue", "class"]),
|
|
3859
3859
|
r.$slots.default ? (w(), W(E(Fa), { key: 0 }, {
|
|
3860
3860
|
default: z(() => [
|
|
3861
|
-
|
|
3861
|
+
L(r.$slots, "default")
|
|
3862
3862
|
]),
|
|
3863
3863
|
_: 3
|
|
3864
3864
|
})) : q("", !0)
|
|
@@ -3866,10 +3866,10 @@ const br = {
|
|
|
3866
3866
|
_: 3
|
|
3867
3867
|
}));
|
|
3868
3868
|
}
|
|
3869
|
-
}),
|
|
3869
|
+
}), Ir = {
|
|
3870
3870
|
role: "presentation",
|
|
3871
3871
|
class: "rvc-fixed rvc-inset-0 rvc-z-10 rvc-w-screen rvc-overflow-y-auto"
|
|
3872
|
-
},
|
|
3872
|
+
}, Pr = { class: "rvc-flex rvc-min-h-full rvc-justify-center rvc-p-4 rvc-items-center sm:rvc-p-0" }, Ar = { class: "rvc-modal-header" }, Lr = { class: "rvc-flex rvc-items-center rvc-justify-between" }, Dr = {
|
|
3873
3873
|
key: 0,
|
|
3874
3874
|
class: "rvc-ml-3 rvc-flex rvc-h-7 rvc-items-center"
|
|
3875
3875
|
}, Mr = ["id"], Fr = { class: "rvc-modal-footer" }, Ki = {
|
|
@@ -3915,7 +3915,7 @@ const br = {
|
|
|
3915
3915
|
titleId: i,
|
|
3916
3916
|
descriptionId: s,
|
|
3917
3917
|
initialFocusElement: u
|
|
3918
|
-
} =
|
|
3918
|
+
} = Pl(o);
|
|
3919
3919
|
return (c, d) => (w(), W(E(Tt), { as: "template" }, {
|
|
3920
3920
|
default: z(() => [
|
|
3921
3921
|
j(E(xl), {
|
|
@@ -3948,8 +3948,8 @@ const br = {
|
|
|
3948
3948
|
])),
|
|
3949
3949
|
_: 1
|
|
3950
3950
|
}),
|
|
3951
|
-
C("div",
|
|
3952
|
-
C("div",
|
|
3951
|
+
C("div", Ir, [
|
|
3952
|
+
C("div", Pr, [
|
|
3953
3953
|
j(E(at), {
|
|
3954
3954
|
as: "template",
|
|
3955
3955
|
enter: "rvc-ease-out rvc-duration-300",
|
|
@@ -3968,9 +3968,9 @@ const br = {
|
|
|
3968
3968
|
"aria-describedby": E(s)
|
|
3969
3969
|
}, {
|
|
3970
3970
|
default: z(() => [
|
|
3971
|
-
C("header",
|
|
3972
|
-
|
|
3973
|
-
C("div",
|
|
3971
|
+
C("header", Ar, [
|
|
3972
|
+
L(c.$slots, "header", { title: e.title }, () => [
|
|
3973
|
+
C("div", Lr, [
|
|
3974
3974
|
j(E($l), {
|
|
3975
3975
|
id: E(i),
|
|
3976
3976
|
class: "rvc-modal-title"
|
|
@@ -4002,10 +4002,10 @@ const br = {
|
|
|
4002
4002
|
ref: l,
|
|
4003
4003
|
class: "rvc-modal-content"
|
|
4004
4004
|
}, [
|
|
4005
|
-
|
|
4005
|
+
L(c.$slots, "default", { ready: E(r) })
|
|
4006
4006
|
], 8, Mr),
|
|
4007
4007
|
C("footer", Fr, [
|
|
4008
|
-
|
|
4008
|
+
L(c.$slots, "footer", { loading: e.spinning }, () => [
|
|
4009
4009
|
j(lt, {
|
|
4010
4010
|
type: E(a) ? "submit" : "button",
|
|
4011
4011
|
label: e.submitLabel,
|
|
@@ -4074,7 +4074,7 @@ const br = {
|
|
|
4074
4074
|
]) : (w(), k("input", Ze(ne({ key: 1 }, i)), null, 16)),
|
|
4075
4075
|
u[1] || (u[1] = C("span", { class: "rvc-radio-input" }, null, -1)),
|
|
4076
4076
|
s.$slots.default || e.label ? (w(), k("span", Nr, [
|
|
4077
|
-
|
|
4077
|
+
L(s.$slots, "default", {}, () => [
|
|
4078
4078
|
C("label", { for: e.id }, K(e.label), 9, jr)
|
|
4079
4079
|
])
|
|
4080
4080
|
])) : q("", !0)
|
|
@@ -4144,7 +4144,7 @@ const br = {
|
|
|
4144
4144
|
])
|
|
4145
4145
|
], 2),
|
|
4146
4146
|
C("div", Hr, [
|
|
4147
|
-
j(
|
|
4147
|
+
j(Il, {
|
|
4148
4148
|
value: r.value,
|
|
4149
4149
|
onChange: a
|
|
4150
4150
|
}, {
|
|
@@ -4224,19 +4224,19 @@ const br = {
|
|
|
4224
4224
|
class: Z(["rvc-toast rvc-transition-opacity", `rvc-toast-${e.position}`, `rvc-toast-${e.type}`, { "rvc-toast-open": e.open }])
|
|
4225
4225
|
}, {
|
|
4226
4226
|
default: z(() => [
|
|
4227
|
-
|
|
4227
|
+
L(r.$slots, "icon", {}, () => [
|
|
4228
4228
|
e.icon ? (w(), W(ie(e.icon), {
|
|
4229
4229
|
key: 0,
|
|
4230
4230
|
class: "rvc-toast-icon"
|
|
4231
4231
|
})) : q("", !0)
|
|
4232
4232
|
]),
|
|
4233
4233
|
C("div", null, [
|
|
4234
|
-
|
|
4234
|
+
L(r.$slots, "title", {}, () => [
|
|
4235
4235
|
C("span", qr, K(e.title), 1)
|
|
4236
4236
|
]),
|
|
4237
|
-
|
|
4237
|
+
L(r.$slots, "default")
|
|
4238
4238
|
]),
|
|
4239
|
-
|
|
4239
|
+
L(r.$slots, "close", {}, () => [
|
|
4240
4240
|
e.showClose ? (w(), k("button", {
|
|
4241
4241
|
key: 0,
|
|
4242
4242
|
type: "button",
|
|
@@ -4253,7 +4253,7 @@ const br = {
|
|
|
4253
4253
|
_: 3
|
|
4254
4254
|
}, 8, ["show"]));
|
|
4255
4255
|
}
|
|
4256
|
-
}, Ur = ["top", "right", "bottom", "left"],
|
|
4256
|
+
}, Ur = ["top", "right", "bottom", "left"], In = ["start", "end"], Pn = /* @__PURE__ */ Ur.reduce((e, n) => e.concat(n, n + "-" + In[0], n + "-" + In[1]), []), Me = Math.min, pe = Math.max, xt = Math.round, yt = Math.floor, $e = (e) => ({
|
|
4257
4257
|
x: e,
|
|
4258
4258
|
y: e
|
|
4259
4259
|
}), Kr = {
|
|
@@ -4277,7 +4277,7 @@ function ze(e) {
|
|
|
4277
4277
|
function Oe(e) {
|
|
4278
4278
|
return e.split("-")[1];
|
|
4279
4279
|
}
|
|
4280
|
-
function
|
|
4280
|
+
function Al(e) {
|
|
4281
4281
|
return e === "x" ? "y" : "x";
|
|
4282
4282
|
}
|
|
4283
4283
|
function on(e) {
|
|
@@ -4287,18 +4287,18 @@ function ft(e) {
|
|
|
4287
4287
|
return ["top", "bottom"].includes(ze(e)) ? "y" : "x";
|
|
4288
4288
|
}
|
|
4289
4289
|
function an(e) {
|
|
4290
|
-
return
|
|
4290
|
+
return Al(ft(e));
|
|
4291
4291
|
}
|
|
4292
4292
|
function Zr(e, n, t) {
|
|
4293
4293
|
t === void 0 && (t = !1);
|
|
4294
4294
|
const o = Oe(e), l = an(e), r = on(l);
|
|
4295
4295
|
let a = l === "x" ? o === (t ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
4296
|
-
return n.reference[r] > n.floating[r] && (a =
|
|
4296
|
+
return n.reference[r] > n.floating[r] && (a = An(a)), [a, An(a)];
|
|
4297
4297
|
}
|
|
4298
4298
|
function Gr(e) {
|
|
4299
4299
|
return e.replace(/start|end/g, (n) => Yr[n]);
|
|
4300
4300
|
}
|
|
4301
|
-
function
|
|
4301
|
+
function An(e) {
|
|
4302
4302
|
return e.replace(/left|right|bottom|top/g, (n) => Kr[n]);
|
|
4303
4303
|
}
|
|
4304
4304
|
function Xr(e) {
|
|
@@ -4310,7 +4310,7 @@ function Xr(e) {
|
|
|
4310
4310
|
...e
|
|
4311
4311
|
};
|
|
4312
4312
|
}
|
|
4313
|
-
function
|
|
4313
|
+
function Ll(e) {
|
|
4314
4314
|
return typeof e != "number" ? Xr(e) : {
|
|
4315
4315
|
top: e,
|
|
4316
4316
|
right: e,
|
|
@@ -4336,7 +4336,7 @@ function St(e) {
|
|
|
4336
4336
|
y: t
|
|
4337
4337
|
};
|
|
4338
4338
|
}
|
|
4339
|
-
function
|
|
4339
|
+
function Ln(e, n, t) {
|
|
4340
4340
|
let {
|
|
4341
4341
|
reference: o,
|
|
4342
4342
|
floating: l
|
|
@@ -4398,7 +4398,7 @@ const Qr = async (e, n, t) => {
|
|
|
4398
4398
|
}), {
|
|
4399
4399
|
x: c,
|
|
4400
4400
|
y: d
|
|
4401
|
-
} =
|
|
4401
|
+
} = Ln(u, o, s), f = o, v = {}, p = 0;
|
|
4402
4402
|
for (let m = 0; m < i.length; m++) {
|
|
4403
4403
|
const {
|
|
4404
4404
|
name: S,
|
|
@@ -4406,7 +4406,7 @@ const Qr = async (e, n, t) => {
|
|
|
4406
4406
|
} = i[m], {
|
|
4407
4407
|
x: h,
|
|
4408
4408
|
y: b,
|
|
4409
|
-
data:
|
|
4409
|
+
data: I,
|
|
4410
4410
|
reset: $
|
|
4411
4411
|
} = await y({
|
|
4412
4412
|
x: c,
|
|
@@ -4426,7 +4426,7 @@ const Qr = async (e, n, t) => {
|
|
|
4426
4426
|
...v,
|
|
4427
4427
|
[S]: {
|
|
4428
4428
|
...v[S],
|
|
4429
|
-
...
|
|
4429
|
+
...I
|
|
4430
4430
|
}
|
|
4431
4431
|
}, $ && p <= 50 && (p++, typeof $ == "object" && ($.placement && (f = $.placement), $.rects && (u = $.rects === !0 ? await a.getElementRects({
|
|
4432
4432
|
reference: e,
|
|
@@ -4435,7 +4435,7 @@ const Qr = async (e, n, t) => {
|
|
|
4435
4435
|
}) : $.rects), {
|
|
4436
4436
|
x: c,
|
|
4437
4437
|
y: d
|
|
4438
|
-
} =
|
|
4438
|
+
} = Ln(u, f, s)), m = -1);
|
|
4439
4439
|
}
|
|
4440
4440
|
return {
|
|
4441
4441
|
x: c,
|
|
@@ -4461,7 +4461,7 @@ async function rn(e, n) {
|
|
|
4461
4461
|
elementContext: d = "floating",
|
|
4462
4462
|
altBoundary: f = !1,
|
|
4463
4463
|
padding: v = 0
|
|
4464
|
-
} = Je(n, e), p =
|
|
4464
|
+
} = Je(n, e), p = Ll(v), S = i[f ? d === "floating" ? "reference" : "floating" : d], y = St(await r.getClippingRect({
|
|
4465
4465
|
element: (t = await (r.isElement == null ? void 0 : r.isElement(S))) == null || t ? S : S.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(i.floating)),
|
|
4466
4466
|
boundary: u,
|
|
4467
4467
|
rootBoundary: c,
|
|
@@ -4471,7 +4471,7 @@ async function rn(e, n) {
|
|
|
4471
4471
|
y: l,
|
|
4472
4472
|
width: a.floating.width,
|
|
4473
4473
|
height: a.floating.height
|
|
4474
|
-
} : a.reference, b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(i.floating)),
|
|
4474
|
+
} : a.reference, b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(i.floating)), I = await (r.isElement == null ? void 0 : r.isElement(b)) ? await (r.getScale == null ? void 0 : r.getScale(b)) || {
|
|
4475
4475
|
x: 1,
|
|
4476
4476
|
y: 1
|
|
4477
4477
|
} : {
|
|
@@ -4484,10 +4484,10 @@ async function rn(e, n) {
|
|
|
4484
4484
|
strategy: s
|
|
4485
4485
|
}) : h);
|
|
4486
4486
|
return {
|
|
4487
|
-
top: (y.top - $.top + p.top) /
|
|
4488
|
-
bottom: ($.bottom - y.bottom + p.bottom) /
|
|
4489
|
-
left: (y.left - $.left + p.left) /
|
|
4490
|
-
right: ($.right - y.right + p.right) /
|
|
4487
|
+
top: (y.top - $.top + p.top) / I.y,
|
|
4488
|
+
bottom: ($.bottom - y.bottom + p.bottom) / I.y,
|
|
4489
|
+
left: (y.left - $.left + p.left) / I.x,
|
|
4490
|
+
right: ($.right - y.right + p.right) / I.x
|
|
4491
4491
|
};
|
|
4492
4492
|
}
|
|
4493
4493
|
const Jr = (e) => ({
|
|
@@ -4508,13 +4508,13 @@ const Jr = (e) => ({
|
|
|
4508
4508
|
} = Je(e, n) || {};
|
|
4509
4509
|
if (u == null)
|
|
4510
4510
|
return {};
|
|
4511
|
-
const d =
|
|
4511
|
+
const d = Ll(c), f = {
|
|
4512
4512
|
x: t,
|
|
4513
4513
|
y: o
|
|
4514
|
-
}, v = an(l), p = on(v), m = await a.getDimensions(u), S = v === "y", y = S ? "top" : "left", h = S ? "bottom" : "right", b = S ? "clientHeight" : "clientWidth",
|
|
4515
|
-
let
|
|
4516
|
-
(!
|
|
4517
|
-
const g =
|
|
4514
|
+
}, v = an(l), p = on(v), m = await a.getDimensions(u), S = v === "y", y = S ? "top" : "left", h = S ? "bottom" : "right", b = S ? "clientHeight" : "clientWidth", I = r.reference[p] + r.reference[v] - f[v] - r.floating[p], $ = f[v] - r.reference[v], D = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(u));
|
|
4515
|
+
let A = D ? D[b] : 0;
|
|
4516
|
+
(!A || !await (a.isElement == null ? void 0 : a.isElement(D))) && (A = i.floating[b] || r.floating[p]);
|
|
4517
|
+
const g = I / 2 - $ / 2, M = A / 2 - m[p] / 2 - 1, O = Me(d[y], M), R = Me(d[h], M), B = O, F = A - m[p] - R, V = A / 2 - m[p] / 2 + g, N = qt(B, V, F), Q = !s.arrow && Oe(l) != null && V !== N && r.reference[p] / 2 - (V < B ? O : R) - m[p] / 2 < 0, ae = Q ? V < B ? V - B : V - F : 0;
|
|
4518
4518
|
return {
|
|
4519
4519
|
[v]: f[v] + ae,
|
|
4520
4520
|
data: {
|
|
@@ -4546,10 +4546,10 @@ const ei = function(e) {
|
|
|
4546
4546
|
} = n, {
|
|
4547
4547
|
crossAxis: c = !1,
|
|
4548
4548
|
alignment: d,
|
|
4549
|
-
allowedPlacements: f =
|
|
4549
|
+
allowedPlacements: f = Pn,
|
|
4550
4550
|
autoAlignment: v = !0,
|
|
4551
4551
|
...p
|
|
4552
|
-
} = Je(e, n), m = d !== void 0 || f ===
|
|
4552
|
+
} = Je(e, n), m = d !== void 0 || f === Pn ? _r(d || null, v, f) : f, S = await rn(n, p), y = ((t = a.autoPlacement) == null ? void 0 : t.index) || 0, h = m[y];
|
|
4553
4553
|
if (h == null)
|
|
4554
4554
|
return {};
|
|
4555
4555
|
const b = Zr(h, r, await (s.isRTL == null ? void 0 : s.isRTL(u.floating)));
|
|
@@ -4559,9 +4559,9 @@ const ei = function(e) {
|
|
|
4559
4559
|
placement: m[0]
|
|
4560
4560
|
}
|
|
4561
4561
|
};
|
|
4562
|
-
const
|
|
4562
|
+
const I = [S[ze(h)], S[b[0]], S[b[1]]], $ = [...((o = a.autoPlacement) == null ? void 0 : o.overflows) || [], {
|
|
4563
4563
|
placement: h,
|
|
4564
|
-
overflows:
|
|
4564
|
+
overflows: I
|
|
4565
4565
|
}], D = m[y + 1];
|
|
4566
4566
|
if (D)
|
|
4567
4567
|
return {
|
|
@@ -4573,7 +4573,7 @@ const ei = function(e) {
|
|
|
4573
4573
|
placement: D
|
|
4574
4574
|
}
|
|
4575
4575
|
};
|
|
4576
|
-
const
|
|
4576
|
+
const A = $.map((O) => {
|
|
4577
4577
|
const R = Oe(O.placement);
|
|
4578
4578
|
return [O.placement, R && c ? (
|
|
4579
4579
|
// Check along the mainAxis and main crossAxis side.
|
|
@@ -4582,12 +4582,12 @@ const ei = function(e) {
|
|
|
4582
4582
|
// Check only the mainAxis.
|
|
4583
4583
|
O.overflows[0]
|
|
4584
4584
|
), O.overflows];
|
|
4585
|
-
}).sort((O, R) => O[1] - R[1]), M = ((l =
|
|
4585
|
+
}).sort((O, R) => O[1] - R[1]), M = ((l = A.filter((O) => O[2].slice(
|
|
4586
4586
|
0,
|
|
4587
4587
|
// Aligned placements should not check their opposite crossAxis
|
|
4588
4588
|
// side.
|
|
4589
4589
|
Oe(O[0]) ? 2 : 3
|
|
4590
|
-
).every((R) => R <= 0))[0]) == null ? void 0 : l[0]) ||
|
|
4590
|
+
).every((R) => R <= 0))[0]) == null ? void 0 : l[0]) || A[0][0];
|
|
4591
4591
|
return M !== i ? {
|
|
4592
4592
|
data: {
|
|
4593
4593
|
index: y + 1,
|
|
@@ -4677,7 +4677,7 @@ const ni = function(e) {
|
|
|
4677
4677
|
} = Je(e, n), u = {
|
|
4678
4678
|
x: t,
|
|
4679
4679
|
y: o
|
|
4680
|
-
}, c = await rn(n, s), d = ft(ze(l)), f =
|
|
4680
|
+
}, c = await rn(n, s), d = ft(ze(l)), f = Al(d);
|
|
4681
4681
|
let v = u[f], p = u[d];
|
|
4682
4682
|
if (r) {
|
|
4683
4683
|
const S = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", h = v + c[S], b = v - c[y];
|
|
@@ -4726,16 +4726,16 @@ const ni = function(e) {
|
|
|
4726
4726
|
} = r.floating;
|
|
4727
4727
|
let S, y;
|
|
4728
4728
|
d === "top" || d === "bottom" ? (S = d, y = f === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (y = d, S = f === "end" ? "top" : "bottom");
|
|
4729
|
-
const h = m - c.top - c.bottom, b = p - c.left - c.right,
|
|
4730
|
-
let
|
|
4731
|
-
if ((t = n.middlewareData.shift) != null && t.enabled.x && (g = b), (o = n.middlewareData.shift) != null && o.enabled.y && (
|
|
4729
|
+
const h = m - c.top - c.bottom, b = p - c.left - c.right, I = Me(m - c[S], h), $ = Me(p - c[y], b), D = !n.middlewareData.shift;
|
|
4730
|
+
let A = I, g = $;
|
|
4731
|
+
if ((t = n.middlewareData.shift) != null && t.enabled.x && (g = b), (o = n.middlewareData.shift) != null && o.enabled.y && (A = h), D && !f) {
|
|
4732
4732
|
const O = pe(c.left, 0), R = pe(c.right, 0), B = pe(c.top, 0), F = pe(c.bottom, 0);
|
|
4733
|
-
v ? g = p - 2 * (O !== 0 || R !== 0 ? O + R : pe(c.left, c.right)) :
|
|
4733
|
+
v ? g = p - 2 * (O !== 0 || R !== 0 ? O + R : pe(c.left, c.right)) : A = m - 2 * (B !== 0 || F !== 0 ? B + F : pe(c.top, c.bottom));
|
|
4734
4734
|
}
|
|
4735
4735
|
await s({
|
|
4736
4736
|
...n,
|
|
4737
4737
|
availableWidth: g,
|
|
4738
|
-
availableHeight:
|
|
4738
|
+
availableHeight: A
|
|
4739
4739
|
});
|
|
4740
4740
|
const M = await a.getDimensions(i.floating);
|
|
4741
4741
|
return p !== M.width || m !== M.height ? {
|
|
@@ -4905,8 +4905,8 @@ function Ne(e, n, t, o) {
|
|
|
4905
4905
|
const f = me(r), v = o && we(o) ? me(o) : o;
|
|
4906
4906
|
let p = f, m = Ut(p);
|
|
4907
4907
|
for (; m && o && v !== p; ) {
|
|
4908
|
-
const S = Ye(m), y = m.getBoundingClientRect(), h = xe(m), b = y.left + (m.clientLeft + parseFloat(h.paddingLeft)) * S.x,
|
|
4909
|
-
s *= S.x, u *= S.y, c *= S.x, d *= S.y, s += b, u +=
|
|
4908
|
+
const S = Ye(m), y = m.getBoundingClientRect(), h = xe(m), b = y.left + (m.clientLeft + parseFloat(h.paddingLeft)) * S.x, I = y.top + (m.clientTop + parseFloat(h.paddingTop)) * S.y;
|
|
4909
|
+
s *= S.x, u *= S.y, c *= S.x, d *= S.y, s += b, u += I, p = me(m), m = Ut(p);
|
|
4910
4910
|
}
|
|
4911
4911
|
}
|
|
4912
4912
|
return St({
|
|
@@ -5158,7 +5158,7 @@ function xi(e, n) {
|
|
|
5158
5158
|
threshold: pe(0, Me(1, s)) || 1
|
|
5159
5159
|
};
|
|
5160
5160
|
let b = !0;
|
|
5161
|
-
function
|
|
5161
|
+
function I($) {
|
|
5162
5162
|
const D = $[0].intersectionRatio;
|
|
5163
5163
|
if (D !== s) {
|
|
5164
5164
|
if (!b)
|
|
@@ -5170,13 +5170,13 @@ function xi(e, n) {
|
|
|
5170
5170
|
b = !1;
|
|
5171
5171
|
}
|
|
5172
5172
|
try {
|
|
5173
|
-
t = new IntersectionObserver(
|
|
5173
|
+
t = new IntersectionObserver(I, {
|
|
5174
5174
|
...h,
|
|
5175
5175
|
// Handle <iframe>s
|
|
5176
5176
|
root: l.ownerDocument
|
|
5177
5177
|
});
|
|
5178
5178
|
} catch {
|
|
5179
|
-
t = new IntersectionObserver(
|
|
5179
|
+
t = new IntersectionObserver(I, h);
|
|
5180
5180
|
}
|
|
5181
5181
|
t.observe(e);
|
|
5182
5182
|
}
|
|
@@ -5244,7 +5244,7 @@ function Kt(e) {
|
|
|
5244
5244
|
function Ue(e) {
|
|
5245
5245
|
return typeof e == "function" ? e() : E(e);
|
|
5246
5246
|
}
|
|
5247
|
-
function
|
|
5247
|
+
function Ii(e) {
|
|
5248
5248
|
return {
|
|
5249
5249
|
name: "arrow",
|
|
5250
5250
|
options: e,
|
|
@@ -5264,31 +5264,31 @@ function Bn(e, n) {
|
|
|
5264
5264
|
const t = jl(e);
|
|
5265
5265
|
return Math.round(n * t) / t;
|
|
5266
5266
|
}
|
|
5267
|
-
function
|
|
5267
|
+
function Pi(e, n, t) {
|
|
5268
5268
|
t === void 0 && (t = {});
|
|
5269
5269
|
const o = t.whileElementsMounted, l = x(() => {
|
|
5270
|
-
var
|
|
5271
|
-
return (
|
|
5270
|
+
var A;
|
|
5271
|
+
return (A = Ue(t.open)) != null ? A : !0;
|
|
5272
5272
|
}), r = x(() => Ue(t.middleware)), a = x(() => {
|
|
5273
|
-
var
|
|
5274
|
-
return (
|
|
5273
|
+
var A;
|
|
5274
|
+
return (A = Ue(t.placement)) != null ? A : "bottom";
|
|
5275
5275
|
}), i = x(() => {
|
|
5276
|
-
var
|
|
5277
|
-
return (
|
|
5276
|
+
var A;
|
|
5277
|
+
return (A = Ue(t.strategy)) != null ? A : "absolute";
|
|
5278
5278
|
}), s = x(() => {
|
|
5279
|
-
var
|
|
5280
|
-
return (
|
|
5279
|
+
var A;
|
|
5280
|
+
return (A = Ue(t.transform)) != null ? A : !0;
|
|
5281
5281
|
}), u = x(() => Kt(e.value)), c = x(() => Kt(n.value)), d = T(0), f = T(0), v = T(i.value), p = T(a.value), m = Ke({}), S = T(!1), y = x(() => {
|
|
5282
|
-
const
|
|
5282
|
+
const A = {
|
|
5283
5283
|
position: v.value,
|
|
5284
5284
|
left: "0",
|
|
5285
5285
|
top: "0"
|
|
5286
5286
|
};
|
|
5287
5287
|
if (!c.value)
|
|
5288
|
-
return
|
|
5288
|
+
return A;
|
|
5289
5289
|
const g = Bn(c.value, d.value), M = Bn(c.value, f.value);
|
|
5290
5290
|
return s.value ? {
|
|
5291
|
-
...
|
|
5291
|
+
...A,
|
|
5292
5292
|
transform: "translate(" + g + "px, " + M + "px)",
|
|
5293
5293
|
...jl(c.value) >= 1.5 && {
|
|
5294
5294
|
willChange: "transform"
|
|
@@ -5303,20 +5303,20 @@ function Li(e, n, t) {
|
|
|
5303
5303
|
function b() {
|
|
5304
5304
|
if (u.value == null || c.value == null)
|
|
5305
5305
|
return;
|
|
5306
|
-
const
|
|
5306
|
+
const A = l.value;
|
|
5307
5307
|
Ri(u.value, c.value, {
|
|
5308
5308
|
middleware: r.value,
|
|
5309
5309
|
placement: a.value,
|
|
5310
5310
|
strategy: i.value
|
|
5311
5311
|
}).then((g) => {
|
|
5312
|
-
d.value = g.x, f.value = g.y, v.value = g.strategy, p.value = g.placement, m.value = g.middlewareData, S.value =
|
|
5312
|
+
d.value = g.x, f.value = g.y, v.value = g.strategy, p.value = g.placement, m.value = g.middlewareData, S.value = A !== !1;
|
|
5313
5313
|
});
|
|
5314
5314
|
}
|
|
5315
|
-
function
|
|
5315
|
+
function I() {
|
|
5316
5316
|
typeof h == "function" && (h(), h = void 0);
|
|
5317
5317
|
}
|
|
5318
5318
|
function $() {
|
|
5319
|
-
if (
|
|
5319
|
+
if (I(), o === void 0) {
|
|
5320
5320
|
b();
|
|
5321
5321
|
return;
|
|
5322
5322
|
}
|
|
@@ -5334,7 +5334,7 @@ function Li(e, n, t) {
|
|
|
5334
5334
|
flush: "sync"
|
|
5335
5335
|
}), oe(l, D, {
|
|
5336
5336
|
flush: "sync"
|
|
5337
|
-
}), Kl() && jn(
|
|
5337
|
+
}), Kl() && jn(I), {
|
|
5338
5338
|
x: We(d),
|
|
5339
5339
|
y: We(f),
|
|
5340
5340
|
strategy: We(v),
|
|
@@ -5345,7 +5345,7 @@ function Li(e, n, t) {
|
|
|
5345
5345
|
update: b
|
|
5346
5346
|
};
|
|
5347
5347
|
}
|
|
5348
|
-
const
|
|
5348
|
+
const Ai = ["innerHTML"], Xi = {
|
|
5349
5349
|
__name: "Tooltip",
|
|
5350
5350
|
props: {
|
|
5351
5351
|
content: {
|
|
@@ -5388,12 +5388,12 @@ const Ii = ["innerHTML"], Xi = {
|
|
|
5388
5388
|
floatingStyles: r,
|
|
5389
5389
|
middlewareData: a,
|
|
5390
5390
|
placement: i
|
|
5391
|
-
} =
|
|
5391
|
+
} = Pi(t, o, {
|
|
5392
5392
|
middleware: [
|
|
5393
5393
|
n.placement ? null : Oi(),
|
|
5394
5394
|
$i(10),
|
|
5395
5395
|
Ei({ crossAxis: !0, padding: 5 }),
|
|
5396
|
-
|
|
5396
|
+
Ii({ element: l }),
|
|
5397
5397
|
Ti({
|
|
5398
5398
|
apply({ availableWidth: c, availableHeight: d, elements: f }) {
|
|
5399
5399
|
Object.assign(f.floating.style, {
|
|
@@ -5434,18 +5434,18 @@ const Ii = ["innerHTML"], Xi = {
|
|
|
5434
5434
|
ref: t,
|
|
5435
5435
|
class: "rvc-group/tooltip"
|
|
5436
5436
|
}, [
|
|
5437
|
-
|
|
5437
|
+
L(c.$slots, "default"),
|
|
5438
5438
|
C("div", {
|
|
5439
5439
|
ref_key: "tooltipRef",
|
|
5440
5440
|
ref: o,
|
|
5441
5441
|
class: Z(["group-hover/tooltip:rvc-opacity-100 group-hover/tooltip:rvc-visible rvc-invisible rvc-opacity-0 rvc-tooltip", e.tooltipClass, { "rvc-tooltip-blur": e.blur }]),
|
|
5442
5442
|
style: Yl(E(r))
|
|
5443
5443
|
}, [
|
|
5444
|
-
|
|
5444
|
+
L(c.$slots, "content", { content: e.content }, () => [
|
|
5445
5445
|
e.content ? (w(), k("div", {
|
|
5446
5446
|
key: 0,
|
|
5447
5447
|
innerHTML: e.content
|
|
5448
|
-
}, null, 8,
|
|
5448
|
+
}, null, 8, Ai)) : q("", !0)
|
|
5449
5449
|
]),
|
|
5450
5450
|
C("div", ne({
|
|
5451
5451
|
ref_key: "arrowRef",
|
|
@@ -5468,7 +5468,7 @@ export {
|
|
|
5468
5468
|
zi as Dropdown,
|
|
5469
5469
|
Hi as EmptyState,
|
|
5470
5470
|
Wi as FormInput,
|
|
5471
|
-
|
|
5471
|
+
Il as FormSelect,
|
|
5472
5472
|
qi as FormTextarea,
|
|
5473
5473
|
Ui as Lightswitch,
|
|
5474
5474
|
Ki as Modal,
|