@hotelinking/ui 3.33.9 → 4.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui.es.js +538 -546
- package/dist/ui.umd.cjs +1 -1
- package/package.json +2 -3
package/dist/ui.es.js
CHANGED
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
import { openBlock as e, createBlock as t, resolveDynamicComponent as l, normalizeClass as a, createElementBlock as n, createVNode as r, renderSlot as o, createElementVNode as i, ref as s, cloneVNode as u, h as d, Fragment as c, inject as p, provide as g, onMounted as f, watchEffect as m, nextTick as v, computed as y, defineComponent as b, toRaw as h, watch as x, onUnmounted as w, Teleport as k, reactive as S, unref as C, shallowRef as O, withCtx as D, createTextVNode as M, toDisplayString as _, Transition as P, renderList as
|
|
1
|
+
import { openBlock as e, createBlock as t, resolveDynamicComponent as l, normalizeClass as a, createElementBlock as n, createVNode as r, renderSlot as o, createElementVNode as i, ref as s, cloneVNode as u, h as d, Fragment as c, inject as p, provide as g, onMounted as f, watchEffect as m, nextTick as v, computed as y, defineComponent as b, toRaw as h, watch as x, onUnmounted as w, Teleport as k, reactive as S, unref as C, shallowRef as O, withCtx as D, createTextVNode as M, toDisplayString as _, Transition as P, renderList as T, createCommentVNode as j, withDirectives as E, vModelDynamic as L, vShow as B, withModifiers as I, vModelText as R, createStaticVNode as A, resolveComponent as F, vModelCheckbox as N, isRef as $ } from "vue";
|
|
2
2
|
import H from "dayjs";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} }, disabled: { type: Boolean, default: false }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, i2) => t2.loading ? (e(), n("button", W, [r(q, { icon: t2.icon, color: "white", class: "-ml-0.5 mr-2", loading: t2.loading }, null, 8, ["icon", "loading"]), K])) : (e(), n("button", { key: 0, disabled: t2.disabled, class: a([{ "bg-indigo-600 hover:bg-indigo-800 text-white shadow-sm": "primary" === t2.color, "bg-cyan-300 hover:bg-cyan-500 text-white shadow-sme": "secondary" === t2.color, "bg-red-400 hover:bg-red-600 text-white shadow-sm": "red" === t2.color, "bg-yellow-400 hover:bg-yellow-600 text-white shadow-sm": "yellow" === t2.color, "bg-green-400 hover:bg-green-600 text-white shadow-sm": "green" === t2.color, "bg-transparent hover:bg-indigo-800 text-indigo-800 hover:text-white": "transparent" === t2.color, "px-4 py-2 text-sm rounded-md": "normal" === t2.size, "px-2.5 py-1.5 text-xs rounded leading-none": "small" === t2.size, "px-6 py-3 text-base rounded-md": "large" === t2.size }, "inline-flex items-center border border-transparent font-medium focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-25"]), type: "button" }, [r(q, { icon: t2.icon, color: "white", class: "-ml-0.5 mr-2", loading: t2.loading }, null, 8, ["icon", "loading"]), o(l2.$slots, "default")], 10, U)) }), X = { key: 0, class: "relative flex items-start" }, Z = { class: "flex items-center h-5" }, Q = ["checked", "value", "disabled"], ee = { class: "ml-3 text-sm" }, te = { class: "text-gray-500" }, le = { key: 1, class: "flex items-center animate-pulse" }, ae = [i("div", { class: "w-5 h-5 rounded bg-gray-200" }, null, -1), i("div", { class: "ml-3 h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-28" }, null, -1)], ne = { name: "uiCheckbox" }, re = Object.assign(ne, { props: { disabled: { type: Boolean, default: false }, value: { type: String }, check: { type: Boolean, default: false }, loading: { type: Boolean, default: true } }, emits: ["checkboxChanged"], setup(t2, { emit: l2 }) {
|
|
3
|
+
import Y from "vue3-apexcharts";
|
|
4
|
+
const V = { name: "uiIcon" }, z = Object.assign(V, { props: { icon: { type: Function, required: true }, size: { type: String, default: "normal" }, color: { type: String, default: "primary" }, loading: { type: Boolean, default: true } }, setup: (r2) => (o2, i2) => r2.loading ? (e(), n("div", { key: 1, class: a([{ "h-4 w-4": "normal" === r2.size, "h-6 w-6": "big" === r2.size, "h-12 w-12": "huge" === r2.size, "h-20 w-20": "massive" === r2.size }, "animate-pulse rounded-full bg-gray-200 dark:bg-gray-300"]) }, null, 2)) : (e(), t(l(r2.icon), { key: 0, class: a({ "h-4 w-4": "normal" === r2.size, "h-6 w-6": "big" === r2.size, "h-12 w-12": "huge" === r2.size, "h-20 w-20": "massive" === r2.size, "text-indigo-600": "primary" === r2.color, "text-cyan-300": "secondary" === r2.color, "text-red-400": "red" === r2.color, "text-yellow-400": "yellow" === r2.color, "text-green-400": "green" === r2.color, "text-white": "white" === r2.color, "text-gray-300": "gray" === r2.color, "text-black": "black" === r2.color }) }, null, 8, ["class"])) }), q = ["disabled"], U = { key: 1, class: "animate-pulse px-4 py-2.5 text-sm rounded-md inline-flex items-center border border-transparent font-medium shadow-sm text-white focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-25 bg-gray-200" }, W = i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-16" }, null, -1), K = { name: "uiButton" }, J = Object.assign(K, { props: { color: { type: String, default: "primary" }, size: { type: String, default: "normal" }, icon: { type: Function, default: () => {
|
|
5
|
+
} }, disabled: { type: Boolean, default: false }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, i2) => t2.loading ? (e(), n("button", U, [r(z, { icon: t2.icon, color: "white", class: "-ml-0.5 mr-2", loading: t2.loading }, null, 8, ["icon", "loading"]), W])) : (e(), n("button", { key: 0, disabled: t2.disabled, class: a([{ "bg-indigo-600 hover:bg-indigo-800 text-white shadow-sm": "primary" === t2.color, "bg-cyan-300 hover:bg-cyan-500 text-white shadow-sme": "secondary" === t2.color, "bg-red-400 hover:bg-red-600 text-white shadow-sm": "red" === t2.color, "bg-yellow-400 hover:bg-yellow-600 text-white shadow-sm": "yellow" === t2.color, "bg-green-400 hover:bg-green-600 text-white shadow-sm": "green" === t2.color, "bg-transparent hover:bg-indigo-800 text-indigo-800 hover:text-white": "transparent" === t2.color, "px-4 py-2 text-sm rounded-md": "normal" === t2.size, "px-2.5 py-1.5 text-xs rounded leading-none": "small" === t2.size, "px-6 py-3 text-base rounded-md": "large" === t2.size }, "inline-flex items-center border border-transparent font-medium focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-25"]), type: "button" }, [r(z, { icon: t2.icon, color: "white", class: "-ml-0.5 mr-2", loading: t2.loading }, null, 8, ["icon", "loading"]), o(l2.$slots, "default")], 10, q)) }), G = { key: 0, class: "relative flex items-start" }, X = { class: "flex items-center h-5" }, Q = ["checked", "value", "disabled"], Z = { class: "ml-3 text-sm" }, ee = { class: "text-gray-500" }, te = { key: 1, class: "flex items-center animate-pulse" }, le = [i("div", { class: "w-5 h-5 rounded bg-gray-200" }, null, -1), i("div", { class: "ml-3 h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-28" }, null, -1)], ae = { name: "uiCheckbox" }, ne = Object.assign(ae, { props: { disabled: { type: Boolean, default: false }, value: { type: String }, check: { type: Boolean, default: false }, loading: { type: Boolean, default: true } }, emits: ["checkboxChanged"], setup(t2, { emit: l2 }) {
|
|
7
6
|
const a2 = t2, r2 = s(a2.check);
|
|
8
|
-
return (s2, u2) => t2.loading ? (e(), n("div",
|
|
7
|
+
return (s2, u2) => t2.loading ? (e(), n("div", te, le)) : (e(), n("div", G, [i("div", X, [i("input", { checked: t2.check, value: t2.value, disabled: t2.disabled, class: "focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded disabled:opacity-25", type: "checkbox", onChange: u2[0] || (u2[0] = (e2) => {
|
|
9
8
|
a2.disabled || (r2.value = !r2.value, l2("checkboxChanged", { checked: r2.value, value: a2.value }));
|
|
10
|
-
}) }, null, 40, Q)]), i("div",
|
|
9
|
+
}) }, null, 40, Q)]), i("div", Z, [i("span", ee, [o(s2.$slots, "default")])])]));
|
|
11
10
|
} });
|
|
12
|
-
function
|
|
11
|
+
function re(e2, t2, ...l2) {
|
|
13
12
|
if (e2 in t2) {
|
|
14
13
|
let a3 = t2[e2];
|
|
15
14
|
return "function" == typeof a3 ? a3(...l2) : a3;
|
|
16
15
|
}
|
|
17
16
|
let a2 = new Error(`Tried to handle "${e2}" but there is no handler defined. Only defined handlers are: ${Object.keys(t2).map((e3) => `"${e3}"`).join(", ")}.`);
|
|
18
|
-
throw Error.captureStackTrace && Error.captureStackTrace(a2,
|
|
17
|
+
throw Error.captureStackTrace && Error.captureStackTrace(a2, re), a2;
|
|
19
18
|
}
|
|
20
|
-
var
|
|
21
|
-
function
|
|
19
|
+
var oe = ((e2) => (e2[e2.None = 0] = "None", e2[e2.RenderStrategy = 1] = "RenderStrategy", e2[e2.Static = 2] = "Static", e2))(oe || {}), ie = ((e2) => (e2[e2.Unmount = 0] = "Unmount", e2[e2.Hidden = 1] = "Hidden", e2))(ie || {});
|
|
20
|
+
function se({ visible: e2 = true, features: t2 = 0, ourProps: l2, theirProps: a2, ...n2 }) {
|
|
22
21
|
var r2;
|
|
23
|
-
let o2 =
|
|
22
|
+
let o2 = ce(a2, l2), i2 = Object.assign(n2, { props: o2 });
|
|
24
23
|
if (e2 || 2 & t2 && o2.static)
|
|
25
|
-
return
|
|
24
|
+
return ue(i2);
|
|
26
25
|
if (1 & t2) {
|
|
27
|
-
return
|
|
26
|
+
return re(null == (r2 = o2.unmount) || r2 ? 0 : 1, { 0: () => null, 1: () => ue({ ...n2, props: { ...o2, hidden: true, style: { display: "none" } } }) });
|
|
28
27
|
}
|
|
29
|
-
return
|
|
28
|
+
return ue(i2);
|
|
30
29
|
}
|
|
31
|
-
function
|
|
30
|
+
function ue({ props: e2, attrs: t2, slots: l2, slot: a2, name: n2 }) {
|
|
32
31
|
var r2, o2;
|
|
33
|
-
let { as: i2, ...s2 } =
|
|
32
|
+
let { as: i2, ...s2 } = ge(e2, ["unmount", "static"]), c2 = null == (r2 = l2.default) ? void 0 : r2.call(l2, a2), p2 = {};
|
|
34
33
|
if (a2) {
|
|
35
34
|
let e3 = false, t3 = [];
|
|
36
35
|
for (let [l3, n3] of Object.entries(a2))
|
|
@@ -38,13 +37,13 @@ function de({ props: e2, attrs: t2, slots: l2, slot: a2, name: n2 }) {
|
|
|
38
37
|
e3 && (p2["data-headlessui-state"] = t3.join(" "));
|
|
39
38
|
}
|
|
40
39
|
if ("template" === i2) {
|
|
41
|
-
if (c2 =
|
|
40
|
+
if (c2 = de(null != c2 ? c2 : []), Object.keys(s2).length > 0 || Object.keys(t2).length > 0) {
|
|
42
41
|
let [e3, ...l3] = null != c2 ? c2 : [];
|
|
43
42
|
if (!function(e4) {
|
|
44
43
|
return null != e4 && ("string" == typeof e4.type || "object" == typeof e4.type || "function" == typeof e4.type);
|
|
45
44
|
}(e3) || l3.length > 0)
|
|
46
45
|
throw new Error(['Passing props on "template"!', "", `The current component <${n2} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(s2).concat(Object.keys(t2)).map((e4) => e4.trim()).filter((e4, t3, l4) => l4.indexOf(e4) === t3).sort((e4, t3) => e4.localeCompare(t3)).map((e4) => ` - ${e4}`).join("\n"), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((e4) => ` - ${e4}`).join("\n")].join("\n"));
|
|
47
|
-
let a3 =
|
|
46
|
+
let a3 = ce(null != (o2 = e3.props) ? o2 : {}, s2), r3 = u(e3, a3);
|
|
48
47
|
for (let e4 in a3)
|
|
49
48
|
e4.startsWith("on") && (r3.props || (r3.props = {}), r3.props[e4] = a3[e4]);
|
|
50
49
|
return r3;
|
|
@@ -53,10 +52,10 @@ function de({ props: e2, attrs: t2, slots: l2, slot: a2, name: n2 }) {
|
|
|
53
52
|
}
|
|
54
53
|
return d(i2, Object.assign({}, s2, p2), { default: () => c2 });
|
|
55
54
|
}
|
|
56
|
-
function
|
|
57
|
-
return e2.flatMap((e3) => e3.type === c ?
|
|
55
|
+
function de(e2) {
|
|
56
|
+
return e2.flatMap((e3) => e3.type === c ? de(e3.children) : [e3]);
|
|
58
57
|
}
|
|
59
|
-
function
|
|
58
|
+
function ce(...e2) {
|
|
60
59
|
if (0 === e2.length)
|
|
61
60
|
return {};
|
|
62
61
|
if (1 === e2.length)
|
|
@@ -78,25 +77,25 @@ function pe(...e2) {
|
|
|
78
77
|
} });
|
|
79
78
|
return t2;
|
|
80
79
|
}
|
|
81
|
-
function
|
|
80
|
+
function pe(e2) {
|
|
82
81
|
let t2 = Object.assign({}, e2);
|
|
83
82
|
for (let e3 in t2)
|
|
84
83
|
void 0 === t2[e3] && delete t2[e3];
|
|
85
84
|
return t2;
|
|
86
85
|
}
|
|
87
|
-
function
|
|
86
|
+
function ge(e2, t2 = []) {
|
|
88
87
|
let l2 = Object.assign({}, e2);
|
|
89
88
|
for (let e3 of t2)
|
|
90
89
|
e3 in l2 && delete l2[e3];
|
|
91
90
|
return l2;
|
|
92
91
|
}
|
|
93
|
-
let
|
|
94
|
-
function
|
|
95
|
-
return ++
|
|
92
|
+
let fe = 0;
|
|
93
|
+
function me() {
|
|
94
|
+
return ++fe;
|
|
96
95
|
}
|
|
97
|
-
var
|
|
98
|
-
var
|
|
99
|
-
function
|
|
96
|
+
var ve = ((e2) => (e2.Space = " ", e2.Enter = "Enter", e2.Escape = "Escape", e2.Backspace = "Backspace", e2.Delete = "Delete", e2.ArrowLeft = "ArrowLeft", e2.ArrowUp = "ArrowUp", e2.ArrowRight = "ArrowRight", e2.ArrowDown = "ArrowDown", e2.Home = "Home", e2.End = "End", e2.PageUp = "PageUp", e2.PageDown = "PageDown", e2.Tab = "Tab", e2))(ve || {});
|
|
97
|
+
var ye = ((e2) => (e2[e2.First = 0] = "First", e2[e2.Previous = 1] = "Previous", e2[e2.Next = 2] = "Next", e2[e2.Last = 3] = "Last", e2[e2.Specific = 4] = "Specific", e2[e2.Nothing = 5] = "Nothing", e2))(ye || {});
|
|
98
|
+
function be(e2, t2) {
|
|
100
99
|
let l2 = t2.resolveItems();
|
|
101
100
|
if (l2.length <= 0)
|
|
102
101
|
return null;
|
|
@@ -126,39 +125,39 @@ function he(e2, t2) {
|
|
|
126
125
|
})();
|
|
127
126
|
return -1 === r2 ? a2 : r2;
|
|
128
127
|
}
|
|
129
|
-
function
|
|
128
|
+
function he(e2) {
|
|
130
129
|
var t2;
|
|
131
130
|
return null == e2 || null == e2.value ? null : null != (t2 = e2.value.$el) ? t2 : e2.value;
|
|
132
131
|
}
|
|
133
|
-
let
|
|
134
|
-
var
|
|
135
|
-
function
|
|
136
|
-
return p(
|
|
132
|
+
let xe = Symbol("Context");
|
|
133
|
+
var we = ((e2) => (e2[e2.Open = 1] = "Open", e2[e2.Closed = 2] = "Closed", e2[e2.Closing = 4] = "Closing", e2[e2.Opening = 8] = "Opening", e2))(we || {});
|
|
134
|
+
function ke() {
|
|
135
|
+
return p(xe, null);
|
|
137
136
|
}
|
|
138
|
-
function
|
|
139
|
-
g(
|
|
137
|
+
function Se(e2) {
|
|
138
|
+
g(xe, e2);
|
|
140
139
|
}
|
|
141
|
-
function
|
|
140
|
+
function Ce(e2, t2) {
|
|
142
141
|
if (e2)
|
|
143
142
|
return e2;
|
|
144
143
|
let l2 = null != t2 ? t2 : "button";
|
|
145
144
|
return "string" == typeof l2 && "button" === l2.toLowerCase() ? "button" : void 0;
|
|
146
145
|
}
|
|
147
|
-
function
|
|
148
|
-
let l2 = s(
|
|
146
|
+
function Oe(e2, t2) {
|
|
147
|
+
let l2 = s(Ce(e2.value.type, e2.value.as));
|
|
149
148
|
return f(() => {
|
|
150
|
-
l2.value =
|
|
149
|
+
l2.value = Ce(e2.value.type, e2.value.as);
|
|
151
150
|
}), m(() => {
|
|
152
151
|
var e3;
|
|
153
|
-
l2.value ||
|
|
152
|
+
l2.value || he(t2) && he(t2) instanceof HTMLButtonElement && (null == (e3 = he(t2)) || !e3.hasAttribute("type")) && (l2.value = "button");
|
|
154
153
|
}), l2;
|
|
155
154
|
}
|
|
156
|
-
var
|
|
157
|
-
t3 in e3 ?
|
|
155
|
+
var De = Object.defineProperty, Me = (e2, t2, l2) => (((e3, t3, l3) => {
|
|
156
|
+
t3 in e3 ? De(e3, t3, { enumerable: true, configurable: true, writable: true, value: l3 }) : e3[t3] = l3;
|
|
158
157
|
})(e2, "symbol" != typeof t2 ? t2 + "" : t2, l2), l2);
|
|
159
|
-
let
|
|
158
|
+
let _e = new class {
|
|
160
159
|
constructor() {
|
|
161
|
-
|
|
160
|
+
Me(this, "current", this.detect()), Me(this, "currentId", 0);
|
|
162
161
|
}
|
|
163
162
|
set(e2) {
|
|
164
163
|
this.current !== e2 && (this.currentId = 0, this.current = e2);
|
|
@@ -179,13 +178,13 @@ let Pe = new class {
|
|
|
179
178
|
return "undefined" == typeof window || "undefined" == typeof document ? "server" : "client";
|
|
180
179
|
}
|
|
181
180
|
}();
|
|
182
|
-
function
|
|
183
|
-
if (
|
|
181
|
+
function Pe(e2) {
|
|
182
|
+
if (_e.isServer)
|
|
184
183
|
return null;
|
|
185
184
|
if (e2 instanceof Node)
|
|
186
185
|
return e2.ownerDocument;
|
|
187
186
|
if (null != e2 && e2.hasOwnProperty("value")) {
|
|
188
|
-
let t2 =
|
|
187
|
+
let t2 = he(e2);
|
|
189
188
|
if (t2)
|
|
190
189
|
return t2.ownerDocument;
|
|
191
190
|
}
|
|
@@ -196,7 +195,7 @@ function Te({ container: e2, accept: t2, walk: l2, enabled: a2 }) {
|
|
|
196
195
|
let n2 = e2.value;
|
|
197
196
|
if (!n2 || void 0 !== a2 && !a2.value)
|
|
198
197
|
return;
|
|
199
|
-
let r2 =
|
|
198
|
+
let r2 = Pe(e2);
|
|
200
199
|
if (!r2)
|
|
201
200
|
return;
|
|
202
201
|
let o2 = Object.assign((e3) => t2(e3), { acceptNode: t2 }), i2 = r2.createTreeWalker(n2, NodeFilter.SHOW_ELEMENT, o2, false);
|
|
@@ -204,32 +203,32 @@ function Te({ container: e2, accept: t2, walk: l2, enabled: a2 }) {
|
|
|
204
203
|
l2(i2.currentNode);
|
|
205
204
|
});
|
|
206
205
|
}
|
|
207
|
-
let
|
|
208
|
-
var
|
|
209
|
-
function
|
|
210
|
-
return null == e2 ? [] : Array.from(e2.querySelectorAll(
|
|
206
|
+
let je = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e2) => `${e2}:not([tabindex='-1'])`).join(",");
|
|
207
|
+
var Ee = ((e2) => (e2[e2.First = 1] = "First", e2[e2.Previous = 2] = "Previous", e2[e2.Next = 4] = "Next", e2[e2.Last = 8] = "Last", e2[e2.WrapAround = 16] = "WrapAround", e2[e2.NoScroll = 32] = "NoScroll", e2))(Ee || {}), Le = ((e2) => (e2[e2.Error = 0] = "Error", e2[e2.Overflow = 1] = "Overflow", e2[e2.Success = 2] = "Success", e2[e2.Underflow = 3] = "Underflow", e2))(Le || {}), Be = ((e2) => (e2[e2.Previous = -1] = "Previous", e2[e2.Next = 1] = "Next", e2))(Be || {});
|
|
208
|
+
function Ie(e2 = document.body) {
|
|
209
|
+
return null == e2 ? [] : Array.from(e2.querySelectorAll(je)).sort((e3, t2) => Math.sign((e3.tabIndex || Number.MAX_SAFE_INTEGER) - (t2.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
211
210
|
}
|
|
212
|
-
var
|
|
213
|
-
function
|
|
211
|
+
var Re = ((e2) => (e2[e2.Strict = 0] = "Strict", e2[e2.Loose = 1] = "Loose", e2))(Re || {});
|
|
212
|
+
function Ae(e2, t2 = 0) {
|
|
214
213
|
var l2;
|
|
215
|
-
return e2 !== (null == (l2 =
|
|
214
|
+
return e2 !== (null == (l2 = Pe(e2)) ? void 0 : l2.body) && re(t2, { 0: () => e2.matches(je), 1() {
|
|
216
215
|
let t3 = e2;
|
|
217
216
|
for (; null !== t3; ) {
|
|
218
|
-
if (t3.matches(
|
|
217
|
+
if (t3.matches(je))
|
|
219
218
|
return true;
|
|
220
219
|
t3 = t3.parentElement;
|
|
221
220
|
}
|
|
222
221
|
return false;
|
|
223
222
|
} });
|
|
224
223
|
}
|
|
225
|
-
function
|
|
226
|
-
let t2 =
|
|
224
|
+
function Fe(e2) {
|
|
225
|
+
let t2 = Pe(e2);
|
|
227
226
|
v(() => {
|
|
228
|
-
t2 && !
|
|
227
|
+
t2 && !Ae(t2.activeElement, 0) && $e(e2);
|
|
229
228
|
});
|
|
230
229
|
}
|
|
231
|
-
var
|
|
232
|
-
function
|
|
230
|
+
var Ne = ((e2) => (e2[e2.Keyboard = 0] = "Keyboard", e2[e2.Mouse = 1] = "Mouse", e2))(Ne || {});
|
|
231
|
+
function $e(e2) {
|
|
233
232
|
null == e2 || e2.focus({ preventScroll: true });
|
|
234
233
|
}
|
|
235
234
|
"undefined" != typeof window && "undefined" != typeof document && (document.addEventListener("keydown", (e2) => {
|
|
@@ -237,7 +236,7 @@ function He(e2) {
|
|
|
237
236
|
}, true), document.addEventListener("click", (e2) => {
|
|
238
237
|
1 === e2.detail ? delete document.documentElement.dataset.headlessuiFocusVisible : 0 === e2.detail && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
239
238
|
}, true));
|
|
240
|
-
let
|
|
239
|
+
let He = ["textarea", "input"].join(",");
|
|
241
240
|
function Ye(e2, t2 = (e3) => e3) {
|
|
242
241
|
return e2.slice().sort((e3, l2) => {
|
|
243
242
|
let a2 = t2(e3), n2 = t2(l2);
|
|
@@ -247,9 +246,9 @@ function Ye(e2, t2 = (e3) => e3) {
|
|
|
247
246
|
return r2 & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : r2 & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
248
247
|
});
|
|
249
248
|
}
|
|
250
|
-
function
|
|
249
|
+
function Ve(e2, t2, { sorted: l2 = true, relativeTo: a2 = null, skipElements: n2 = [] } = {}) {
|
|
251
250
|
var r2;
|
|
252
|
-
let o2 = null != (r2 = Array.isArray(e2) ? e2.length > 0 ? e2[0].ownerDocument : document : null == e2 ? void 0 : e2.ownerDocument) ? r2 : document, i2 = Array.isArray(e2) ? l2 ? Ye(e2) : e2 :
|
|
251
|
+
let o2 = null != (r2 = Array.isArray(e2) ? e2.length > 0 ? e2[0].ownerDocument : document : null == e2 ? void 0 : e2.ownerDocument) ? r2 : document, i2 = Array.isArray(e2) ? l2 ? Ye(e2) : e2 : Ie(e2);
|
|
253
252
|
n2.length > 0 && i2.length > 1 && (i2 = i2.filter((e3) => !n2.includes(e3))), a2 = null != a2 ? a2 : o2.activeElement;
|
|
254
253
|
let s2, u2 = (() => {
|
|
255
254
|
if (5 & t2)
|
|
@@ -284,20 +283,20 @@ function ze(e2, t2, { sorted: l2 = true, relativeTo: a2 = null, skipElements: n2
|
|
|
284
283
|
} while (s2 !== o2.activeElement);
|
|
285
284
|
return 6 & t2 && function(e3) {
|
|
286
285
|
var t3, l3;
|
|
287
|
-
return null != (l3 = null == (t3 = null == e3 ? void 0 : e3.matches) ? void 0 : t3.call(e3,
|
|
286
|
+
return null != (l3 = null == (t3 = null == e3 ? void 0 : e3.matches) ? void 0 : t3.call(e3, He)) && l3;
|
|
288
287
|
}(s2) && s2.select(), 2;
|
|
289
288
|
}
|
|
290
|
-
function
|
|
291
|
-
|
|
289
|
+
function ze(e2, t2, l2) {
|
|
290
|
+
_e.isServer || m((a2) => {
|
|
292
291
|
document.addEventListener(e2, t2, l2), a2(() => document.removeEventListener(e2, t2, l2));
|
|
293
292
|
});
|
|
294
293
|
}
|
|
295
|
-
function
|
|
296
|
-
|
|
294
|
+
function qe(e2, t2, l2) {
|
|
295
|
+
_e.isServer || m((a2) => {
|
|
297
296
|
window.addEventListener(e2, t2, l2), a2(() => window.removeEventListener(e2, t2, l2));
|
|
298
297
|
});
|
|
299
298
|
}
|
|
300
|
-
function
|
|
299
|
+
function Ue(e2, t2, l2 = y(() => true)) {
|
|
301
300
|
function a2(a3, n3) {
|
|
302
301
|
if (!l2.value || a3.defaultPrevented)
|
|
303
302
|
return;
|
|
@@ -310,39 +309,39 @@ function We(e2, t2, l2 = y(() => true)) {
|
|
|
310
309
|
for (let e3 of o2) {
|
|
311
310
|
if (null === e3)
|
|
312
311
|
continue;
|
|
313
|
-
let t3 = e3 instanceof HTMLElement ? e3 :
|
|
312
|
+
let t3 = e3 instanceof HTMLElement ? e3 : he(e3);
|
|
314
313
|
if (null != t3 && t3.contains(r2) || a3.composed && a3.composedPath().includes(t3))
|
|
315
314
|
return;
|
|
316
315
|
}
|
|
317
|
-
return !
|
|
316
|
+
return !Ae(r2, Re.Loose) && -1 !== r2.tabIndex && a3.preventDefault(), t2(a3, r2);
|
|
318
317
|
}
|
|
319
318
|
let n2 = s(null);
|
|
320
|
-
|
|
319
|
+
ze("mousedown", (e3) => {
|
|
321
320
|
var t3, a3;
|
|
322
321
|
l2.value && (n2.value = (null == (a3 = null == (t3 = e3.composedPath) ? void 0 : t3.call(e3)) ? void 0 : a3[0]) || e3.target);
|
|
323
|
-
}, true),
|
|
322
|
+
}, true), ze("click", (e3) => {
|
|
324
323
|
n2.value && (a2(e3, () => n2.value), n2.value = null);
|
|
325
|
-
}, true),
|
|
324
|
+
}, true), qe("blur", (e3) => a2(e3, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), true);
|
|
326
325
|
}
|
|
327
|
-
var
|
|
328
|
-
let
|
|
326
|
+
var We = ((e2) => (e2[e2.None = 1] = "None", e2[e2.Focusable = 2] = "Focusable", e2[e2.Hidden = 4] = "Hidden", e2))(We || {});
|
|
327
|
+
let Ke = b({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup: (e2, { slots: t2, attrs: l2 }) => () => {
|
|
329
328
|
let { features: a2, ...n2 } = e2;
|
|
330
|
-
return
|
|
329
|
+
return se({ ourProps: { "aria-hidden": 2 == (2 & a2) || void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...4 == (4 & a2) && 2 != (2 & a2) && { display: "none" } } }, theirProps: n2, slot: {}, attrs: l2, slots: t2, name: "Hidden" });
|
|
331
330
|
} });
|
|
332
|
-
function
|
|
331
|
+
function Je(e2 = {}, t2 = null, l2 = []) {
|
|
333
332
|
for (let [a2, n2] of Object.entries(e2))
|
|
334
|
-
|
|
333
|
+
Xe(l2, Ge(t2, a2), n2);
|
|
335
334
|
return l2;
|
|
336
335
|
}
|
|
337
|
-
function
|
|
336
|
+
function Ge(e2, t2) {
|
|
338
337
|
return e2 ? e2 + "[" + t2 + "]" : t2;
|
|
339
338
|
}
|
|
340
|
-
function
|
|
339
|
+
function Xe(e2, t2, l2) {
|
|
341
340
|
if (Array.isArray(l2))
|
|
342
341
|
for (let [a2, n2] of l2.entries())
|
|
343
|
-
|
|
342
|
+
Xe(e2, Ge(t2, a2.toString()), n2);
|
|
344
343
|
else
|
|
345
|
-
l2 instanceof Date ? e2.push([t2, l2.toISOString()]) : "boolean" == typeof l2 ? e2.push([t2, l2 ? "1" : "0"]) : "string" == typeof l2 ? e2.push([t2, l2]) : "number" == typeof l2 ? e2.push([t2, `${l2}`]) : null == l2 ? e2.push([t2, ""]) :
|
|
344
|
+
l2 instanceof Date ? e2.push([t2, l2.toISOString()]) : "boolean" == typeof l2 ? e2.push([t2, l2 ? "1" : "0"]) : "string" == typeof l2 ? e2.push([t2, l2]) : "number" == typeof l2 ? e2.push([t2, `${l2}`]) : null == l2 ? e2.push([t2, ""]) : Je(l2, t2, e2);
|
|
346
345
|
}
|
|
347
346
|
function Qe(e2, t2, l2) {
|
|
348
347
|
let a2 = s(null == l2 ? void 0 : l2.value), n2 = y(() => void 0 !== e2.value);
|
|
@@ -350,25 +349,25 @@ function Qe(e2, t2, l2) {
|
|
|
350
349
|
return n2.value || (a2.value = e3), null == t2 ? void 0 : t2(e3);
|
|
351
350
|
}];
|
|
352
351
|
}
|
|
353
|
-
function
|
|
352
|
+
function Ze(e2) {
|
|
354
353
|
return [e2.screenX, e2.screenY];
|
|
355
354
|
}
|
|
356
|
-
function
|
|
355
|
+
function et() {
|
|
357
356
|
let e2 = s([-1, -1]);
|
|
358
357
|
return { wasMoved(t2) {
|
|
359
|
-
let l2 =
|
|
358
|
+
let l2 = Ze(t2);
|
|
360
359
|
return (e2.value[0] !== l2[0] || e2.value[1] !== l2[1]) && (e2.value = l2, true);
|
|
361
360
|
}, update(t2) {
|
|
362
|
-
e2.value =
|
|
361
|
+
e2.value = Ze(t2);
|
|
363
362
|
} };
|
|
364
363
|
}
|
|
365
|
-
function
|
|
364
|
+
function tt() {
|
|
366
365
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
367
366
|
}
|
|
368
|
-
function
|
|
369
|
-
return
|
|
367
|
+
function lt() {
|
|
368
|
+
return tt() || /Android/gi.test(window.navigator.userAgent);
|
|
370
369
|
}
|
|
371
|
-
function
|
|
370
|
+
function at() {
|
|
372
371
|
let e2 = [], t2 = { addEventListener: (e3, l2, a2, n2) => (e3.addEventListener(l2, a2, n2), t2.add(() => e3.removeEventListener(l2, a2, n2))), requestAnimationFrame(...e3) {
|
|
373
372
|
let l2 = requestAnimationFrame(...e3);
|
|
374
373
|
t2.add(() => cancelAnimationFrame(l2));
|
|
@@ -385,7 +384,7 @@ function nt() {
|
|
|
385
384
|
Object.assign(e3.style, { [t3]: a2 });
|
|
386
385
|
});
|
|
387
386
|
}, group(e3) {
|
|
388
|
-
let t3 =
|
|
387
|
+
let t3 = at();
|
|
389
388
|
return e3(t3), this.add(() => t3.dispose());
|
|
390
389
|
}, add: (t3) => (e2.push(t3), () => {
|
|
391
390
|
let l2 = e2.indexOf(t3);
|
|
@@ -398,26 +397,26 @@ function nt() {
|
|
|
398
397
|
} };
|
|
399
398
|
return t2;
|
|
400
399
|
}
|
|
401
|
-
function
|
|
400
|
+
function nt(e2, t2) {
|
|
402
401
|
return e2 === t2;
|
|
403
402
|
}
|
|
404
|
-
var
|
|
405
|
-
let
|
|
406
|
-
function
|
|
407
|
-
let t2 = p(
|
|
403
|
+
var rt = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(rt || {}), ot = ((e2) => (e2[e2.Single = 0] = "Single", e2[e2.Multi = 1] = "Multi", e2))(ot || {}), it = ((e2) => (e2[e2.Pointer = 0] = "Pointer", e2[e2.Other = 1] = "Other", e2))(it || {});
|
|
404
|
+
let st = Symbol("ComboboxContext");
|
|
405
|
+
function ut(e2) {
|
|
406
|
+
let t2 = p(st, null);
|
|
408
407
|
if (null === t2) {
|
|
409
408
|
let t3 = new Error(`<${e2} /> is missing a parent <Combobox /> component.`);
|
|
410
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
409
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, ut), t3;
|
|
411
410
|
}
|
|
412
411
|
return t2;
|
|
413
412
|
}
|
|
414
|
-
let
|
|
413
|
+
let dt = b({ name: "Combobox", emits: { "update:modelValue": (e2) => true }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: false }, by: { type: [String, Function], default: () => nt }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: true }, name: { type: String, optional: true }, nullable: { type: Boolean, default: false }, multiple: { type: [Boolean], default: false } }, inheritAttrs: false, setup(e2, { slots: t2, attrs: l2, emit: a2 }) {
|
|
415
414
|
let n2 = s(1), r2 = s(null), o2 = s(null), i2 = s(null), u2 = s(null), p2 = s({ static: false, hold: false }), m2 = s([]), v2 = s(null), b2 = s(1), w2 = s(false);
|
|
416
415
|
function k2(e3 = (e4) => e4) {
|
|
417
|
-
let t3 = null !== v2.value ? m2.value[v2.value] : null, l3 = Ye(e3(m2.value.slice()), (e4) =>
|
|
416
|
+
let t3 = null !== v2.value ? m2.value[v2.value] : null, l3 = Ye(e3(m2.value.slice()), (e4) => he(e4.dataRef.domRef)), a3 = t3 ? l3.indexOf(t3) : null;
|
|
418
417
|
return -1 === a3 && (a3 = null), { options: l3, activeOptionIndex: a3 };
|
|
419
418
|
}
|
|
420
|
-
let S2 = y(() => e2.multiple ? 1 : 0), C2 = y(() => e2.nullable), [O2, D2] = Qe(y(() => void 0 === e2.modelValue ?
|
|
419
|
+
let S2 = y(() => e2.multiple ? 1 : 0), C2 = y(() => e2.nullable), [O2, D2] = Qe(y(() => void 0 === e2.modelValue ? re(S2.value, { 1: [], 0: void 0 }) : e2.modelValue), (e3) => a2("update:modelValue", e3), y(() => e2.defaultValue)), M2 = { comboboxState: n2, value: O2, mode: S2, compare(t3, l3) {
|
|
421
420
|
if ("string" == typeof e2.by) {
|
|
422
421
|
let a3 = e2.by;
|
|
423
422
|
return (null == t3 ? void 0 : t3[a3]) === (null == l3 ? void 0 : l3[a3]);
|
|
@@ -438,7 +437,7 @@ let ct = b({ name: "Combobox", emits: { "update:modelValue": (e2) => true }, pro
|
|
|
438
437
|
return;
|
|
439
438
|
let t3 = m2.value.findIndex((e3) => {
|
|
440
439
|
let t4 = h(e3.dataRef.value);
|
|
441
|
-
return
|
|
440
|
+
return re(S2.value, { 0: () => M2.compare(h(M2.value.value), h(t4)), 1: () => h(M2.value.value).some((e4) => M2.compare(h(e4), h(t4))) });
|
|
442
441
|
});
|
|
443
442
|
-1 !== t3 && (v2.value = t3), n2.value = 0;
|
|
444
443
|
}, goToOption(t3, l3, a3) {
|
|
@@ -449,14 +448,14 @@ let ct = b({ name: "Combobox", emits: { "update:modelValue": (e2) => true }, pro
|
|
|
449
448
|
let e3 = r3.options.findIndex((e4) => !e4.dataRef.disabled);
|
|
450
449
|
-1 !== e3 && (r3.activeOptionIndex = e3);
|
|
451
450
|
}
|
|
452
|
-
let o3 =
|
|
451
|
+
let o3 = be(t3 === ye.Specific ? { focus: ye.Specific, id: l3 } : { focus: t3 }, { resolveItems: () => r3.options, resolveActiveIndex: () => r3.activeOptionIndex, resolveId: (e3) => e3.id, resolveDisabled: (e3) => e3.dataRef.disabled });
|
|
453
452
|
v2.value = o3, b2.value = null != a3 ? a3 : 1, m2.value = r3.options;
|
|
454
453
|
}, selectOption(e3) {
|
|
455
454
|
let t3 = m2.value.find((t4) => t4.id === e3);
|
|
456
455
|
if (!t3)
|
|
457
456
|
return;
|
|
458
457
|
let { dataRef: l3 } = t3;
|
|
459
|
-
D2(
|
|
458
|
+
D2(re(S2.value, { 0: () => l3.value, 1: () => {
|
|
460
459
|
let e4 = h(M2.value.value).slice(), t4 = h(l3.value), a3 = e4.findIndex((e5) => M2.compare(t4, h(e5)));
|
|
461
460
|
return -1 === a3 ? e4.push(t4) : e4.splice(a3, 1), e4;
|
|
462
461
|
} }));
|
|
@@ -464,17 +463,17 @@ let ct = b({ name: "Combobox", emits: { "update:modelValue": (e2) => true }, pro
|
|
|
464
463
|
if (null === M2.activeOptionIndex.value)
|
|
465
464
|
return;
|
|
466
465
|
let { dataRef: e3, id: t3 } = m2.value[M2.activeOptionIndex.value];
|
|
467
|
-
D2(
|
|
466
|
+
D2(re(S2.value, { 0: () => e3.value, 1: () => {
|
|
468
467
|
let t4 = h(M2.value.value).slice(), l3 = h(e3.value), a3 = t4.findIndex((e4) => M2.compare(l3, h(e4)));
|
|
469
468
|
return -1 === a3 ? t4.push(l3) : t4.splice(a3, 1), t4;
|
|
470
|
-
} })), M2.goToOption(
|
|
469
|
+
} })), M2.goToOption(ye.Specific, t3);
|
|
471
470
|
}, registerOption(e3, t3) {
|
|
472
471
|
let l3 = { id: e3, dataRef: t3 }, a3 = k2((e4) => [...e4, l3]);
|
|
473
472
|
if (null === v2.value) {
|
|
474
473
|
let e4 = t3.value.value;
|
|
475
|
-
|
|
474
|
+
re(S2.value, { 0: () => M2.compare(h(M2.value.value), h(e4)), 1: () => h(M2.value.value).some((t4) => M2.compare(h(t4), h(e4))) }) && (a3.activeOptionIndex = a3.options.indexOf(l3));
|
|
476
475
|
}
|
|
477
|
-
m2.value = a3.options, v2.value = a3.activeOptionIndex, b2.value = 1, a3.options.some((e4) => !
|
|
476
|
+
m2.value = a3.options, v2.value = a3.activeOptionIndex, b2.value = 1, a3.options.some((e4) => !he(e4.dataRef.domRef)) && requestAnimationFrame(() => {
|
|
478
477
|
let e4 = k2();
|
|
479
478
|
m2.value = e4.options, v2.value = e4.activeOptionIndex;
|
|
480
479
|
});
|
|
@@ -487,10 +486,10 @@ let ct = b({ name: "Combobox", emits: { "update:modelValue": (e2) => true }, pro
|
|
|
487
486
|
});
|
|
488
487
|
m2.value = l3.options, v2.value = l3.activeOptionIndex, b2.value = 1;
|
|
489
488
|
} };
|
|
490
|
-
|
|
489
|
+
Ue([o2, i2, u2], () => M2.closeCombobox(), y(() => 0 === n2.value)), g(st, M2), Se(y(() => re(n2.value, { 0: we.Open, 1: we.Closed })));
|
|
491
490
|
let _2 = y(() => null === M2.activeOptionIndex.value ? null : m2.value[M2.activeOptionIndex.value].dataRef.value), P2 = y(() => {
|
|
492
491
|
var e3;
|
|
493
|
-
return null == (e3 =
|
|
492
|
+
return null == (e3 = he(o2)) ? void 0 : e3.closest("form");
|
|
494
493
|
});
|
|
495
494
|
return f(() => {
|
|
496
495
|
x([P2], () => {
|
|
@@ -505,41 +504,41 @@ let ct = b({ name: "Combobox", emits: { "update:modelValue": (e2) => true }, pro
|
|
|
505
504
|
}, { immediate: true });
|
|
506
505
|
}), () => {
|
|
507
506
|
let { name: a3, disabled: r3, form: o3, ...i3 } = e2, s2 = { open: 0 === n2.value, disabled: r3, activeIndex: M2.activeOptionIndex.value, activeOption: _2.value, value: O2.value };
|
|
508
|
-
return d(c, [...null != a3 && null != O2.value ?
|
|
507
|
+
return d(c, [...null != a3 && null != O2.value ? Je({ [a3]: O2.value }).map(([e3, t3]) => d(Ke, pe({ features: We.Hidden, key: e3, as: "input", type: "hidden", hidden: true, readOnly: true, form: o3, name: e3, value: t3 }))) : [], se({ theirProps: { ...l2, ...ge(i3, ["modelValue", "defaultValue", "nullable", "multiple", "onUpdate:modelValue", "by"]) }, ourProps: {}, slot: s2, slots: t2, attrs: l2, name: "Combobox" })]);
|
|
509
508
|
};
|
|
510
|
-
} }),
|
|
511
|
-
let a2 =
|
|
509
|
+
} }), ct = b({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: () => `headlessui-combobox-label-${me()}` } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
510
|
+
let a2 = ut("ComboboxLabel");
|
|
512
511
|
function n2() {
|
|
513
512
|
var e3;
|
|
514
|
-
null == (e3 =
|
|
513
|
+
null == (e3 = he(a2.inputRef)) || e3.focus({ preventScroll: true });
|
|
515
514
|
}
|
|
516
515
|
return () => {
|
|
517
516
|
let r2 = { open: 0 === a2.comboboxState.value, disabled: a2.disabled.value }, { id: o2, ...i2 } = e2;
|
|
518
|
-
return
|
|
517
|
+
return se({ ourProps: { id: o2, ref: a2.labelRef, onClick: n2 }, theirProps: i2, slot: r2, attrs: t2, slots: l2, name: "ComboboxLabel" });
|
|
519
518
|
};
|
|
520
|
-
} }),
|
|
521
|
-
let n2 =
|
|
519
|
+
} }), pt = b({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-combobox-button-${me()}` } }, setup(e2, { attrs: t2, slots: l2, expose: a2 }) {
|
|
520
|
+
let n2 = ut("ComboboxButton");
|
|
522
521
|
function r2(e3) {
|
|
523
522
|
n2.disabled.value || (0 === n2.comboboxState.value ? n2.closeCombobox() : (e3.preventDefault(), n2.openCombobox()), v(() => {
|
|
524
523
|
var e4;
|
|
525
|
-
return null == (e4 =
|
|
524
|
+
return null == (e4 = he(n2.inputRef)) ? void 0 : e4.focus({ preventScroll: true });
|
|
526
525
|
}));
|
|
527
526
|
}
|
|
528
527
|
function o2(e3) {
|
|
529
528
|
switch (e3.key) {
|
|
530
|
-
case
|
|
529
|
+
case ve.ArrowDown:
|
|
531
530
|
return e3.preventDefault(), e3.stopPropagation(), 1 === n2.comboboxState.value && n2.openCombobox(), void v(() => {
|
|
532
531
|
var e4;
|
|
533
532
|
return null == (e4 = n2.inputRef.value) ? void 0 : e4.focus({ preventScroll: true });
|
|
534
533
|
});
|
|
535
|
-
case
|
|
534
|
+
case ve.ArrowUp:
|
|
536
535
|
return e3.preventDefault(), e3.stopPropagation(), 1 === n2.comboboxState.value && (n2.openCombobox(), v(() => {
|
|
537
|
-
n2.value.value || n2.goToOption(
|
|
536
|
+
n2.value.value || n2.goToOption(ye.Last);
|
|
538
537
|
})), void v(() => {
|
|
539
538
|
var e4;
|
|
540
539
|
return null == (e4 = n2.inputRef.value) ? void 0 : e4.focus({ preventScroll: true });
|
|
541
540
|
});
|
|
542
|
-
case
|
|
541
|
+
case ve.Escape:
|
|
543
542
|
if (0 !== n2.comboboxState.value)
|
|
544
543
|
return;
|
|
545
544
|
return e3.preventDefault(), n2.optionsRef.value && !n2.optionsPropsRef.value.static && e3.stopPropagation(), n2.closeCombobox(), void v(() => {
|
|
@@ -549,29 +548,29 @@ let ct = b({ name: "Combobox", emits: { "update:modelValue": (e2) => true }, pro
|
|
|
549
548
|
}
|
|
550
549
|
}
|
|
551
550
|
a2({ el: n2.buttonRef, $el: n2.buttonRef });
|
|
552
|
-
let i2 =
|
|
551
|
+
let i2 = Oe(y(() => ({ as: e2.as, type: t2.type })), n2.buttonRef);
|
|
553
552
|
return () => {
|
|
554
553
|
var a3, s2;
|
|
555
554
|
let u2 = { open: 0 === n2.comboboxState.value, disabled: n2.disabled.value, value: n2.value.value }, { id: d2, ...c2 } = e2;
|
|
556
|
-
return
|
|
555
|
+
return se({ ourProps: { ref: n2.buttonRef, id: d2, type: i2.value, tabindex: "-1", "aria-haspopup": "listbox", "aria-controls": null == (a3 = he(n2.optionsRef)) ? void 0 : a3.id, "aria-expanded": n2.disabled.value ? void 0 : 0 === n2.comboboxState.value, "aria-labelledby": n2.labelRef.value ? [null == (s2 = he(n2.labelRef)) ? void 0 : s2.id, d2].join(" ") : void 0, disabled: true === n2.disabled.value || void 0, onKeydown: o2, onClick: r2 }, theirProps: c2, slot: u2, attrs: t2, slots: l2, name: "ComboboxButton" });
|
|
557
556
|
};
|
|
558
|
-
} }),
|
|
559
|
-
let r2 =
|
|
557
|
+
} }), gt = b({ name: "ComboboxInput", props: { as: { type: [Object, String], default: "input" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, displayValue: { type: Function }, defaultValue: { type: String, default: void 0 }, id: { type: String, default: () => `headlessui-combobox-input-${me()}` } }, emits: { change: (e2) => true }, setup(e2, { emit: t2, attrs: l2, slots: a2, expose: n2 }) {
|
|
558
|
+
let r2 = ut("ComboboxInput"), o2 = { value: false };
|
|
560
559
|
n2({ el: r2.inputRef, $el: r2.inputRef });
|
|
561
560
|
let i2 = y(() => {
|
|
562
561
|
var t3;
|
|
563
562
|
let l3 = r2.value.value;
|
|
564
|
-
return
|
|
563
|
+
return he(r2.inputRef) ? void 0 !== e2.displayValue && void 0 !== l3 ? null != (t3 = e2.displayValue(l3)) ? t3 : "" : "string" == typeof l3 ? l3 : "" : "";
|
|
565
564
|
});
|
|
566
565
|
f(() => {
|
|
567
566
|
x([i2, r2.comboboxState], ([e3, t3], [l3, a3]) => {
|
|
568
567
|
if (o2.value)
|
|
569
568
|
return;
|
|
570
|
-
let n3 =
|
|
569
|
+
let n3 = he(r2.inputRef);
|
|
571
570
|
n3 && (0 === a3 && 1 === t3 || e3 !== l3) && (n3.value = e3);
|
|
572
571
|
}, { immediate: true }), x([r2.comboboxState], ([e3], [t3]) => {
|
|
573
572
|
if (0 === e3 && 1 === t3) {
|
|
574
|
-
let e4 =
|
|
573
|
+
let e4 = he(r2.inputRef);
|
|
575
574
|
if (!e4)
|
|
576
575
|
return;
|
|
577
576
|
let t4 = e4.value, { selectionStart: l3, selectionEnd: a3, selectionDirection: n3 } = e4;
|
|
@@ -584,58 +583,58 @@ let ct = b({ name: "Combobox", emits: { "update:modelValue": (e2) => true }, pro
|
|
|
584
583
|
u2.value = true;
|
|
585
584
|
}
|
|
586
585
|
function p2() {
|
|
587
|
-
|
|
586
|
+
at().nextFrame(() => {
|
|
588
587
|
u2.value = false, d2.value && (r2.openCombobox(), t2("change", d2.value), d2.value = null);
|
|
589
588
|
});
|
|
590
589
|
}
|
|
591
590
|
function g2(e3) {
|
|
592
591
|
switch (o2.value = true, e3.key) {
|
|
593
|
-
case
|
|
594
|
-
case
|
|
592
|
+
case ve.Backspace:
|
|
593
|
+
case ve.Delete:
|
|
595
594
|
if (0 !== r2.mode.value || !r2.nullable.value)
|
|
596
595
|
return;
|
|
597
596
|
let t3 = e3.currentTarget;
|
|
598
597
|
requestAnimationFrame(() => {
|
|
599
598
|
if ("" === t3.value) {
|
|
600
599
|
r2.change(null);
|
|
601
|
-
let e4 =
|
|
602
|
-
e4 && (e4.scrollTop = 0), r2.goToOption(
|
|
600
|
+
let e4 = he(r2.optionsRef);
|
|
601
|
+
e4 && (e4.scrollTop = 0), r2.goToOption(ye.Nothing);
|
|
603
602
|
}
|
|
604
603
|
});
|
|
605
604
|
break;
|
|
606
|
-
case
|
|
605
|
+
case ve.Enter:
|
|
607
606
|
if (o2.value = false, 0 !== r2.comboboxState.value || u2.value)
|
|
608
607
|
return;
|
|
609
608
|
if (e3.preventDefault(), e3.stopPropagation(), null === r2.activeOptionIndex.value)
|
|
610
609
|
return void r2.closeCombobox();
|
|
611
610
|
r2.selectActiveOption(), 0 === r2.mode.value && r2.closeCombobox();
|
|
612
611
|
break;
|
|
613
|
-
case
|
|
614
|
-
return o2.value = false, e3.preventDefault(), e3.stopPropagation(),
|
|
615
|
-
case
|
|
616
|
-
return o2.value = false, e3.preventDefault(), e3.stopPropagation(),
|
|
612
|
+
case ve.ArrowDown:
|
|
613
|
+
return o2.value = false, e3.preventDefault(), e3.stopPropagation(), re(r2.comboboxState.value, { 0: () => r2.goToOption(ye.Next), 1: () => r2.openCombobox() });
|
|
614
|
+
case ve.ArrowUp:
|
|
615
|
+
return o2.value = false, e3.preventDefault(), e3.stopPropagation(), re(r2.comboboxState.value, { 0: () => r2.goToOption(ye.Previous), 1: () => {
|
|
617
616
|
r2.openCombobox(), v(() => {
|
|
618
|
-
r2.value.value || r2.goToOption(
|
|
617
|
+
r2.value.value || r2.goToOption(ye.Last);
|
|
619
618
|
});
|
|
620
619
|
} });
|
|
621
|
-
case
|
|
620
|
+
case ve.Home:
|
|
622
621
|
if (e3.shiftKey)
|
|
623
622
|
break;
|
|
624
|
-
return o2.value = false, e3.preventDefault(), e3.stopPropagation(), r2.goToOption(
|
|
625
|
-
case
|
|
626
|
-
return o2.value = false, e3.preventDefault(), e3.stopPropagation(), r2.goToOption(
|
|
627
|
-
case
|
|
623
|
+
return o2.value = false, e3.preventDefault(), e3.stopPropagation(), r2.goToOption(ye.First);
|
|
624
|
+
case ve.PageUp:
|
|
625
|
+
return o2.value = false, e3.preventDefault(), e3.stopPropagation(), r2.goToOption(ye.First);
|
|
626
|
+
case ve.End:
|
|
628
627
|
if (e3.shiftKey)
|
|
629
628
|
break;
|
|
630
|
-
return o2.value = false, e3.preventDefault(), e3.stopPropagation(), r2.goToOption(
|
|
631
|
-
case
|
|
632
|
-
return o2.value = false, e3.preventDefault(), e3.stopPropagation(), r2.goToOption(
|
|
633
|
-
case
|
|
629
|
+
return o2.value = false, e3.preventDefault(), e3.stopPropagation(), r2.goToOption(ye.Last);
|
|
630
|
+
case ve.PageDown:
|
|
631
|
+
return o2.value = false, e3.preventDefault(), e3.stopPropagation(), r2.goToOption(ye.Last);
|
|
632
|
+
case ve.Escape:
|
|
634
633
|
if (o2.value = false, 0 !== r2.comboboxState.value)
|
|
635
634
|
return;
|
|
636
635
|
e3.preventDefault(), r2.optionsRef.value && !r2.optionsPropsRef.value.static && e3.stopPropagation(), r2.closeCombobox();
|
|
637
636
|
break;
|
|
638
|
-
case
|
|
637
|
+
case ve.Tab:
|
|
639
638
|
if (o2.value = false, 0 !== r2.comboboxState.value)
|
|
640
639
|
return;
|
|
641
640
|
0 === r2.mode.value && r2.selectActiveOption(), r2.closeCombobox();
|
|
@@ -654,96 +653,96 @@ let ct = b({ name: "Combobox", emits: { "update:modelValue": (e2) => true }, pro
|
|
|
654
653
|
return () => {
|
|
655
654
|
var t3, n3, o3, i3, s2, u3;
|
|
656
655
|
let d3 = { open: 0 === r2.comboboxState.value }, { id: f2, displayValue: v2, onChange: y2, ...x2 } = e2;
|
|
657
|
-
return
|
|
656
|
+
return se({ ourProps: { "aria-controls": null == (t3 = r2.optionsRef.value) ? void 0 : t3.id, "aria-expanded": r2.disabled.value ? void 0 : 0 === r2.comboboxState.value, "aria-activedescendant": null === r2.activeOptionIndex.value || null == (n3 = r2.options.value[r2.activeOptionIndex.value]) ? void 0 : n3.id, "aria-labelledby": null != (s2 = null == (o3 = he(r2.labelRef)) ? void 0 : o3.id) ? s2 : null == (i3 = he(r2.buttonRef)) ? void 0 : i3.id, "aria-autocomplete": "list", id: f2, onCompositionstart: c2, onCompositionend: p2, onKeydown: g2, onInput: m2, onBlur: b2, role: "combobox", type: null != (u3 = l2.type) ? u3 : "text", tabIndex: 0, ref: r2.inputRef, defaultValue: h2.value, disabled: true === r2.disabled.value || void 0 }, theirProps: x2, slot: d3, attrs: l2, slots: a2, features: oe.RenderStrategy | oe.Static, name: "ComboboxInput" });
|
|
658
657
|
};
|
|
659
|
-
} }),
|
|
660
|
-
let n2 =
|
|
658
|
+
} }), ft = b({ name: "ComboboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, hold: { type: [Boolean], default: false } }, setup(e2, { attrs: t2, slots: l2, expose: a2 }) {
|
|
659
|
+
let n2 = ut("ComboboxOptions"), r2 = `headlessui-combobox-options-${me()}`;
|
|
661
660
|
a2({ el: n2.optionsRef, $el: n2.optionsRef }), m(() => {
|
|
662
661
|
n2.optionsPropsRef.value.static = e2.static;
|
|
663
662
|
}), m(() => {
|
|
664
663
|
n2.optionsPropsRef.value.hold = e2.hold;
|
|
665
664
|
});
|
|
666
|
-
let o2 =
|
|
667
|
-
return Te({ container: y(() =>
|
|
665
|
+
let o2 = ke(), i2 = y(() => null !== o2 ? (o2.value & we.Open) === we.Open : 0 === n2.comboboxState.value);
|
|
666
|
+
return Te({ container: y(() => he(n2.optionsRef)), enabled: y(() => 0 === n2.comboboxState.value), accept: (e3) => "option" === e3.getAttribute("role") ? NodeFilter.FILTER_REJECT : e3.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT, walk(e3) {
|
|
668
667
|
e3.setAttribute("role", "none");
|
|
669
668
|
} }), () => {
|
|
670
669
|
var a3, o3, s2;
|
|
671
670
|
let u2 = { open: 0 === n2.comboboxState.value };
|
|
672
|
-
return
|
|
671
|
+
return se({ ourProps: { "aria-labelledby": null != (s2 = null == (a3 = he(n2.labelRef)) ? void 0 : a3.id) ? s2 : null == (o3 = he(n2.buttonRef)) ? void 0 : o3.id, id: r2, ref: n2.optionsRef, role: "listbox", "aria-multiselectable": 1 === n2.mode.value || void 0 }, theirProps: ge(e2, ["hold"]), slot: u2, attrs: t2, slots: l2, features: oe.RenderStrategy | oe.Static, visible: i2.value, name: "ComboboxOptions" });
|
|
673
672
|
};
|
|
674
|
-
} }),
|
|
675
|
-
let n2 =
|
|
673
|
+
} }), mt = b({ name: "ComboboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: false } }, setup(e2, { slots: t2, attrs: l2, expose: a2 }) {
|
|
674
|
+
let n2 = ut("ComboboxOption"), r2 = `headlessui-combobox-option-${me()}`, o2 = s(null);
|
|
676
675
|
a2({ el: o2, $el: o2 });
|
|
677
|
-
let i2 = y(() => null !== n2.activeOptionIndex.value && n2.options.value[n2.activeOptionIndex.value].id === r2), u2 = y(() =>
|
|
676
|
+
let i2 = y(() => null !== n2.activeOptionIndex.value && n2.options.value[n2.activeOptionIndex.value].id === r2), u2 = y(() => re(n2.mode.value, { 0: () => n2.compare(h(n2.value.value), h(e2.value)), 1: () => h(n2.value.value).some((t3) => n2.compare(h(t3), h(e2.value))) })), d2 = y(() => ({ disabled: e2.disabled, value: e2.value, domRef: o2 }));
|
|
678
677
|
function c2(t3) {
|
|
679
678
|
if (e2.disabled)
|
|
680
679
|
return t3.preventDefault();
|
|
681
|
-
n2.selectOption(r2), 0 === n2.mode.value && n2.closeCombobox(),
|
|
680
|
+
n2.selectOption(r2), 0 === n2.mode.value && n2.closeCombobox(), lt() || requestAnimationFrame(() => {
|
|
682
681
|
var e3;
|
|
683
|
-
return null == (e3 =
|
|
682
|
+
return null == (e3 = he(n2.inputRef)) ? void 0 : e3.focus();
|
|
684
683
|
});
|
|
685
684
|
}
|
|
686
685
|
function p2() {
|
|
687
686
|
if (e2.disabled)
|
|
688
|
-
return n2.goToOption(
|
|
689
|
-
n2.goToOption(
|
|
687
|
+
return n2.goToOption(ye.Nothing);
|
|
688
|
+
n2.goToOption(ye.Specific, r2);
|
|
690
689
|
}
|
|
691
690
|
f(() => n2.registerOption(r2, d2)), w(() => n2.unregisterOption(r2)), m(() => {
|
|
692
691
|
0 === n2.comboboxState.value && i2.value && 0 !== n2.activationTrigger.value && v(() => {
|
|
693
692
|
var e3, t3;
|
|
694
|
-
return null == (t3 = null == (e3 =
|
|
693
|
+
return null == (t3 = null == (e3 = he(o2)) ? void 0 : e3.scrollIntoView) ? void 0 : t3.call(e3, { block: "nearest" });
|
|
695
694
|
});
|
|
696
695
|
});
|
|
697
|
-
let g2 =
|
|
696
|
+
let g2 = et();
|
|
698
697
|
function b2(e3) {
|
|
699
698
|
g2.update(e3);
|
|
700
699
|
}
|
|
701
700
|
function x2(t3) {
|
|
702
|
-
g2.wasMoved(t3) && (e2.disabled || i2.value || n2.goToOption(
|
|
701
|
+
g2.wasMoved(t3) && (e2.disabled || i2.value || n2.goToOption(ye.Specific, r2, 0));
|
|
703
702
|
}
|
|
704
703
|
function k2(t3) {
|
|
705
|
-
g2.wasMoved(t3) && (e2.disabled || i2.value && (n2.optionsPropsRef.value.hold || n2.goToOption(
|
|
704
|
+
g2.wasMoved(t3) && (e2.disabled || i2.value && (n2.optionsPropsRef.value.hold || n2.goToOption(ye.Nothing)));
|
|
706
705
|
}
|
|
707
706
|
return () => {
|
|
708
707
|
let { disabled: a3 } = e2, n3 = { active: i2.value, selected: u2.value, disabled: a3 };
|
|
709
|
-
return
|
|
708
|
+
return se({ ourProps: { id: r2, ref: o2, role: "option", tabIndex: true === a3 ? void 0 : -1, "aria-disabled": true === a3 || void 0, "aria-selected": u2.value, disabled: void 0, onClick: c2, onFocus: p2, onPointerenter: b2, onMouseenter: b2, onPointermove: x2, onMousemove: x2, onPointerleave: k2, onMouseleave: k2 }, theirProps: e2, slot: n3, attrs: l2, slots: t2, name: "ComboboxOption" });
|
|
710
709
|
};
|
|
711
710
|
} });
|
|
712
|
-
var
|
|
713
|
-
function
|
|
714
|
-
|
|
711
|
+
var vt = ((e2) => (e2[e2.Forwards = 0] = "Forwards", e2[e2.Backwards = 1] = "Backwards", e2))(vt || {});
|
|
712
|
+
function yt(e2, t2, l2, a2) {
|
|
713
|
+
_e.isServer || m((n2) => {
|
|
715
714
|
(e2 = null != e2 ? e2 : window).addEventListener(t2, l2, a2), n2(() => e2.removeEventListener(t2, l2, a2));
|
|
716
715
|
});
|
|
717
716
|
}
|
|
718
|
-
function
|
|
717
|
+
function bt(e2) {
|
|
719
718
|
"function" == typeof queueMicrotask ? queueMicrotask(e2) : Promise.resolve().then(e2).catch((e3) => setTimeout(() => {
|
|
720
719
|
throw e3;
|
|
721
720
|
}));
|
|
722
721
|
}
|
|
723
|
-
function
|
|
722
|
+
function ht(e2) {
|
|
724
723
|
if (!e2)
|
|
725
724
|
return /* @__PURE__ */ new Set();
|
|
726
725
|
if ("function" == typeof e2)
|
|
727
726
|
return new Set(e2());
|
|
728
727
|
let t2 = /* @__PURE__ */ new Set();
|
|
729
728
|
for (let l2 of e2.value) {
|
|
730
|
-
let e3 =
|
|
729
|
+
let e3 = he(l2);
|
|
731
730
|
e3 instanceof HTMLElement && t2.add(e3);
|
|
732
731
|
}
|
|
733
732
|
return t2;
|
|
734
733
|
}
|
|
735
|
-
var
|
|
736
|
-
let
|
|
734
|
+
var xt = ((e2) => (e2[e2.None = 1] = "None", e2[e2.InitialFocus = 2] = "InitialFocus", e2[e2.TabLock = 4] = "TabLock", e2[e2.FocusLock = 8] = "FocusLock", e2[e2.RestoreFocus = 16] = "RestoreFocus", e2[e2.All = 30] = "All", e2))(xt || {});
|
|
735
|
+
let wt = Object.assign(b({ name: "FocusTrap", props: { as: { type: [Object, String], default: "div" }, initialFocus: { type: Object, default: null }, features: { type: Number, default: 30 }, containers: { type: [Object, Function], default: s(/* @__PURE__ */ new Set()) } }, inheritAttrs: false, setup(e2, { attrs: t2, slots: l2, expose: a2 }) {
|
|
737
736
|
let n2 = s(null);
|
|
738
737
|
a2({ el: n2, $el: n2 });
|
|
739
|
-
let r2 = y(() =>
|
|
738
|
+
let r2 = y(() => Pe(n2)), o2 = s(false);
|
|
740
739
|
f(() => o2.value = true), w(() => o2.value = false), function({ ownerDocument: e3 }, t3) {
|
|
741
740
|
let l3 = function(e4) {
|
|
742
|
-
let t4 = s(
|
|
741
|
+
let t4 = s(kt.slice());
|
|
743
742
|
return x([e4], ([e5], [l4]) => {
|
|
744
|
-
true === l4 && false === e5 ?
|
|
743
|
+
true === l4 && false === e5 ? bt(() => {
|
|
745
744
|
t4.value.splice(0);
|
|
746
|
-
}) : false === l4 && true === e5 && (t4.value =
|
|
745
|
+
}) : false === l4 && true === e5 && (t4.value = kt.slice());
|
|
747
746
|
}, { flush: "post" }), () => {
|
|
748
747
|
var e5;
|
|
749
748
|
return null != (e5 = t4.value.find((e6) => null != e6 && e6.isConnected)) ? e5 : null;
|
|
@@ -752,10 +751,10 @@ let kt = Object.assign(b({ name: "FocusTrap", props: { as: { type: [Object, Stri
|
|
|
752
751
|
f(() => {
|
|
753
752
|
m(() => {
|
|
754
753
|
var a3, n3;
|
|
755
|
-
t3.value || (null == (a3 = e3.value) ? void 0 : a3.activeElement) === (null == (n3 = e3.value) ? void 0 : n3.body) &&
|
|
754
|
+
t3.value || (null == (a3 = e3.value) ? void 0 : a3.activeElement) === (null == (n3 = e3.value) ? void 0 : n3.body) && $e(l3());
|
|
756
755
|
}, { flush: "post" });
|
|
757
756
|
}), w(() => {
|
|
758
|
-
t3.value &&
|
|
757
|
+
t3.value && $e(l3());
|
|
759
758
|
});
|
|
760
759
|
}({ ownerDocument: r2 }, y(() => o2.value && Boolean(16 & e2.features)));
|
|
761
760
|
let i2 = function({ ownerDocument: e3, container: t3, initialFocus: l3 }, a3) {
|
|
@@ -764,48 +763,48 @@ let kt = Object.assign(b({ name: "FocusTrap", props: { as: { type: [Object, Stri
|
|
|
764
763
|
x([t3, l3, a3], (o3, i3) => {
|
|
765
764
|
if (o3.every((e4, t4) => (null == i3 ? void 0 : i3[t4]) === e4) || !a3.value)
|
|
766
765
|
return;
|
|
767
|
-
let s2 =
|
|
768
|
-
s2 &&
|
|
766
|
+
let s2 = he(t3);
|
|
767
|
+
s2 && bt(() => {
|
|
769
768
|
var t4, a4;
|
|
770
769
|
if (!r3.value)
|
|
771
770
|
return;
|
|
772
|
-
let o4 =
|
|
771
|
+
let o4 = he(l3), i4 = null == (t4 = e3.value) ? void 0 : t4.activeElement;
|
|
773
772
|
if (o4) {
|
|
774
773
|
if (o4 === i4)
|
|
775
774
|
return void (n3.value = i4);
|
|
776
775
|
} else if (s2.contains(i4))
|
|
777
776
|
return void (n3.value = i4);
|
|
778
|
-
o4 ?
|
|
777
|
+
o4 ? $e(o4) : Ve(s2, Ee.First | Ee.NoScroll) === Le.Error && console.warn("There are no focusable elements inside the <FocusTrap />"), n3.value = null == (a4 = e3.value) ? void 0 : a4.activeElement;
|
|
779
778
|
});
|
|
780
779
|
}, { immediate: true, flush: "post" });
|
|
781
780
|
}), n3;
|
|
782
781
|
}({ ownerDocument: r2, container: n2, initialFocus: y(() => e2.initialFocus) }, y(() => o2.value && Boolean(2 & e2.features)));
|
|
783
782
|
!function({ ownerDocument: e3, container: t3, containers: l3, previousActiveElement: a3 }, n3) {
|
|
784
783
|
var r3;
|
|
785
|
-
|
|
784
|
+
yt(null == (r3 = e3.value) ? void 0 : r3.defaultView, "focus", (e4) => {
|
|
786
785
|
if (!n3.value)
|
|
787
786
|
return;
|
|
788
|
-
let r4 =
|
|
789
|
-
|
|
787
|
+
let r4 = ht(l3);
|
|
788
|
+
he(t3) instanceof HTMLElement && r4.add(he(t3));
|
|
790
789
|
let o3 = a3.value;
|
|
791
790
|
if (!o3)
|
|
792
791
|
return;
|
|
793
792
|
let i3 = e4.target;
|
|
794
|
-
i3 && i3 instanceof HTMLElement ?
|
|
793
|
+
i3 && i3 instanceof HTMLElement ? St(r4, i3) ? (a3.value = i3, $e(i3)) : (e4.preventDefault(), e4.stopPropagation(), $e(o3)) : $e(a3.value);
|
|
795
794
|
}, true);
|
|
796
795
|
}({ ownerDocument: r2, container: n2, containers: e2.containers, previousActiveElement: i2 }, y(() => o2.value && Boolean(8 & e2.features)));
|
|
797
796
|
let u2 = function() {
|
|
798
797
|
let e3 = s(0);
|
|
799
|
-
return
|
|
798
|
+
return qe("keydown", (t3) => {
|
|
800
799
|
"Tab" === t3.key && (e3.value = t3.shiftKey ? 1 : 0);
|
|
801
800
|
}), e3;
|
|
802
801
|
}();
|
|
803
802
|
function p2(e3) {
|
|
804
|
-
let t3 =
|
|
805
|
-
t3 &&
|
|
806
|
-
|
|
807
|
-
}, [
|
|
808
|
-
|
|
803
|
+
let t3 = he(n2);
|
|
804
|
+
t3 && re(u2.value, { [vt.Forwards]: () => {
|
|
805
|
+
Ve(t3, Ee.First, { skipElements: [e3.relatedTarget] });
|
|
806
|
+
}, [vt.Backwards]: () => {
|
|
807
|
+
Ve(t3, Ee.Last, { skipElements: [e3.relatedTarget] });
|
|
809
808
|
} });
|
|
810
809
|
}
|
|
811
810
|
let g2 = s(false);
|
|
@@ -817,17 +816,17 @@ let kt = Object.assign(b({ name: "FocusTrap", props: { as: { type: [Object, Stri
|
|
|
817
816
|
function b2(t3) {
|
|
818
817
|
if (!o2.value)
|
|
819
818
|
return;
|
|
820
|
-
let l3 =
|
|
821
|
-
|
|
819
|
+
let l3 = ht(e2.containers);
|
|
820
|
+
he(n2) instanceof HTMLElement && l3.add(he(n2));
|
|
822
821
|
let a3 = t3.relatedTarget;
|
|
823
|
-
a3 instanceof HTMLElement && "true" !== a3.dataset.headlessuiFocusGuard && (
|
|
822
|
+
a3 instanceof HTMLElement && "true" !== a3.dataset.headlessuiFocusGuard && (St(l3, a3) || (g2.value ? Ve(he(n2), re(u2.value, { [vt.Forwards]: () => Ee.Next, [vt.Backwards]: () => Ee.Previous }) | Ee.WrapAround, { relativeTo: t3.target }) : t3.target instanceof HTMLElement && $e(t3.target)));
|
|
824
823
|
}
|
|
825
824
|
return () => {
|
|
826
825
|
let a3 = { ref: n2, onKeydown: v2, onFocusout: b2 }, { features: r3, initialFocus: o3, containers: i3, ...s2 } = e2;
|
|
827
|
-
return d(c, [Boolean(4 & r3) && d(
|
|
826
|
+
return d(c, [Boolean(4 & r3) && d(Ke, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: p2, features: We.Focusable }), se({ ourProps: a3, theirProps: { ...t2, ...s2 }, slot: {}, attrs: t2, slots: l2, name: "FocusTrap" }), Boolean(4 & r3) && d(Ke, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: p2, features: We.Focusable })]);
|
|
828
827
|
};
|
|
829
|
-
} }), { features:
|
|
830
|
-
function
|
|
828
|
+
} }), { features: xt }), kt = [];
|
|
829
|
+
function St(e2, t2) {
|
|
831
830
|
for (let l2 of e2)
|
|
832
831
|
if (l2.contains(t2))
|
|
833
832
|
return true;
|
|
@@ -840,44 +839,44 @@ function Ct(e2, t2) {
|
|
|
840
839
|
"undefined" != typeof window && "undefined" != typeof document && (document.addEventListener("DOMContentLoaded", t2), t2());
|
|
841
840
|
}(() => {
|
|
842
841
|
function e2(e3) {
|
|
843
|
-
e3.target instanceof HTMLElement && e3.target !== document.body &&
|
|
842
|
+
e3.target instanceof HTMLElement && e3.target !== document.body && kt[0] !== e3.target && (kt.unshift(e3.target), kt = kt.filter((e4) => null != e4 && e4.isConnected), kt.splice(10));
|
|
844
843
|
}
|
|
845
844
|
window.addEventListener("click", e2, { capture: true }), window.addEventListener("mousedown", e2, { capture: true }), window.addEventListener("focus", e2, { capture: true }), document.body.addEventListener("click", e2, { capture: true }), document.body.addEventListener("mousedown", e2, { capture: true }), document.body.addEventListener("focus", e2, { capture: true });
|
|
846
845
|
});
|
|
847
|
-
let
|
|
848
|
-
function
|
|
846
|
+
let Ct = /* @__PURE__ */ new Map(), Ot = /* @__PURE__ */ new Map();
|
|
847
|
+
function Dt(e2, t2 = s(true)) {
|
|
849
848
|
m((l2) => {
|
|
850
849
|
var a2;
|
|
851
850
|
if (!t2.value)
|
|
852
851
|
return;
|
|
853
|
-
let n2 =
|
|
852
|
+
let n2 = he(e2);
|
|
854
853
|
if (!n2)
|
|
855
854
|
return;
|
|
856
855
|
l2(function() {
|
|
857
856
|
var e3;
|
|
858
857
|
if (!n2)
|
|
859
858
|
return;
|
|
860
|
-
let t3 = null != (e3 =
|
|
861
|
-
if (1 === t3 ?
|
|
859
|
+
let t3 = null != (e3 = Ot.get(n2)) ? e3 : 1;
|
|
860
|
+
if (1 === t3 ? Ot.delete(n2) : Ot.set(n2, t3 - 1), 1 !== t3)
|
|
862
861
|
return;
|
|
863
|
-
let l3 =
|
|
864
|
-
l3 && (null === l3["aria-hidden"] ? n2.removeAttribute("aria-hidden") : n2.setAttribute("aria-hidden", l3["aria-hidden"]), n2.inert = l3.inert,
|
|
862
|
+
let l3 = Ct.get(n2);
|
|
863
|
+
l3 && (null === l3["aria-hidden"] ? n2.removeAttribute("aria-hidden") : n2.setAttribute("aria-hidden", l3["aria-hidden"]), n2.inert = l3.inert, Ct.delete(n2));
|
|
865
864
|
});
|
|
866
|
-
let r2 = null != (a2 =
|
|
867
|
-
|
|
865
|
+
let r2 = null != (a2 = Ot.get(n2)) ? a2 : 0;
|
|
866
|
+
Ot.set(n2, r2 + 1), 0 === r2 && (Ct.set(n2, { "aria-hidden": n2.getAttribute("aria-hidden"), inert: n2.inert }), n2.setAttribute("aria-hidden", "true"), n2.inert = true);
|
|
868
867
|
});
|
|
869
868
|
}
|
|
870
|
-
let
|
|
871
|
-
function
|
|
872
|
-
return p(
|
|
869
|
+
let Mt = Symbol("ForcePortalRootContext");
|
|
870
|
+
function _t() {
|
|
871
|
+
return p(Mt, false);
|
|
873
872
|
}
|
|
874
|
-
let
|
|
873
|
+
let Pt = b({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: false } }, setup: (e2, { slots: t2, attrs: l2 }) => (g(Mt, e2.force), () => {
|
|
875
874
|
let { force: a2, ...n2 } = e2;
|
|
876
|
-
return
|
|
875
|
+
return se({ theirProps: n2, ourProps: {}, slot: {}, slots: t2, attrs: l2, name: "ForcePortalRoot" });
|
|
877
876
|
}) });
|
|
878
877
|
let Tt = b({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
879
|
-
let a2 = s(null), n2 = y(() =>
|
|
880
|
-
let t3 =
|
|
878
|
+
let a2 = s(null), n2 = y(() => Pe(a2)), r2 = _t(), o2 = p(Et, null), i2 = s(true === r2 || null == o2 ? function(e3) {
|
|
879
|
+
let t3 = Pe(e3);
|
|
881
880
|
if (!t3) {
|
|
882
881
|
if (null === e3)
|
|
883
882
|
return null;
|
|
@@ -892,9 +891,9 @@ let Tt = b({ name: "Portal", props: { as: { type: [Object, String], default: "di
|
|
|
892
891
|
m(() => {
|
|
893
892
|
r2 || null != o2 && (i2.value = o2.resolveTarget());
|
|
894
893
|
});
|
|
895
|
-
let u2 = p(
|
|
894
|
+
let u2 = p(jt, null);
|
|
896
895
|
return f(() => {
|
|
897
|
-
let e3 =
|
|
896
|
+
let e3 = he(a2);
|
|
898
897
|
e3 && u2 && w(u2.register(e3));
|
|
899
898
|
}), w(() => {
|
|
900
899
|
var e3, t3;
|
|
@@ -904,19 +903,19 @@ let Tt = b({ name: "Portal", props: { as: { type: [Object, String], default: "di
|
|
|
904
903
|
if (null === i2.value)
|
|
905
904
|
return null;
|
|
906
905
|
let n3 = { ref: a2, "data-headlessui-portal": "" };
|
|
907
|
-
return d(k, { to: i2.value },
|
|
906
|
+
return d(k, { to: i2.value }, se({ ourProps: n3, theirProps: e2, slot: {}, attrs: l2, slots: t2, name: "Portal" }));
|
|
908
907
|
};
|
|
909
|
-
} }),
|
|
910
|
-
let
|
|
908
|
+
} }), jt = Symbol("PortalParentContext");
|
|
909
|
+
let Et = Symbol("PortalGroupContext"), Lt = b({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
911
910
|
let a2 = S({ resolveTarget: () => e2.target });
|
|
912
|
-
return g(
|
|
911
|
+
return g(Et, a2), () => {
|
|
913
912
|
let { target: a3, ...n2 } = e2;
|
|
914
|
-
return
|
|
913
|
+
return se({ theirProps: n2, ourProps: {}, slot: {}, attrs: t2, slots: l2, name: "PortalGroup" });
|
|
915
914
|
};
|
|
916
|
-
} }),
|
|
917
|
-
var
|
|
918
|
-
function
|
|
919
|
-
let n2 = p(
|
|
915
|
+
} }), Bt = Symbol("StackContext");
|
|
916
|
+
var It = ((e2) => (e2[e2.Add = 0] = "Add", e2[e2.Remove = 1] = "Remove", e2))(It || {});
|
|
917
|
+
function Rt({ type: e2, enabled: t2, element: l2, onUpdate: a2 }) {
|
|
918
|
+
let n2 = p(Bt, () => {
|
|
920
919
|
});
|
|
921
920
|
function r2(...e3) {
|
|
922
921
|
null == a2 || a2(...e3), n2(...e3);
|
|
@@ -927,19 +926,19 @@ function At({ type: e2, enabled: t2, element: l2, onUpdate: a2 }) {
|
|
|
927
926
|
}, { immediate: true, flush: "sync" });
|
|
928
927
|
}), w(() => {
|
|
929
928
|
t2.value && r2(1, e2, l2);
|
|
930
|
-
}), g(
|
|
929
|
+
}), g(Bt, r2);
|
|
931
930
|
}
|
|
932
|
-
let
|
|
933
|
-
function
|
|
931
|
+
let At = Symbol("DescriptionContext");
|
|
932
|
+
function Ft({ slot: e2 = s({}), name: t2 = "Description", props: l2 = {} } = {}) {
|
|
934
933
|
let a2 = s([]);
|
|
935
|
-
return g(
|
|
934
|
+
return g(At, { register: function(e3) {
|
|
936
935
|
return a2.value.push(e3), () => {
|
|
937
936
|
let t3 = a2.value.indexOf(e3);
|
|
938
937
|
-1 !== t3 && a2.value.splice(t3, 1);
|
|
939
938
|
};
|
|
940
939
|
}, slot: e2, name: t2, props: l2 }), y(() => a2.value.length > 0 ? a2.value.join(" ") : void 0);
|
|
941
940
|
}
|
|
942
|
-
function
|
|
941
|
+
function Nt() {
|
|
943
942
|
let e2;
|
|
944
943
|
return { before({ doc: t2 }) {
|
|
945
944
|
var l2;
|
|
@@ -950,8 +949,8 @@ function $t() {
|
|
|
950
949
|
l2.style(a2, "paddingRight", `${r2}px`);
|
|
951
950
|
} };
|
|
952
951
|
}
|
|
953
|
-
function
|
|
954
|
-
if (!
|
|
952
|
+
function $t() {
|
|
953
|
+
if (!tt())
|
|
955
954
|
return {};
|
|
956
955
|
let e2;
|
|
957
956
|
return { before() {
|
|
@@ -979,22 +978,22 @@ function Ht() {
|
|
|
979
978
|
});
|
|
980
979
|
} };
|
|
981
980
|
}
|
|
982
|
-
function
|
|
981
|
+
function Ht(e2) {
|
|
983
982
|
let t2 = {};
|
|
984
983
|
for (let l2 of e2)
|
|
985
984
|
Object.assign(t2, l2(t2));
|
|
986
985
|
return t2;
|
|
987
986
|
}
|
|
988
|
-
b({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${
|
|
987
|
+
b({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${me()}` } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
989
988
|
let a2 = function() {
|
|
990
|
-
let e3 = p(
|
|
989
|
+
let e3 = p(At, null);
|
|
991
990
|
if (null === e3)
|
|
992
991
|
throw new Error("Missing parent");
|
|
993
992
|
return e3;
|
|
994
993
|
}();
|
|
995
994
|
return f(() => w(a2.register(e2.id))), () => {
|
|
996
995
|
let { name: n2 = "Description", slot: r2 = s({}), props: o2 = {} } = a2, { id: i2, ...u2 } = e2, d2 = { ...Object.entries(o2).reduce((e3, [t3, l3]) => Object.assign(e3, { [t3]: C(l3) }), {}), id: i2 };
|
|
997
|
-
return
|
|
996
|
+
return se({ ourProps: d2, theirProps: u2, slot: r2.value, attrs: t2, slots: l2, name: n2 });
|
|
998
997
|
};
|
|
999
998
|
} });
|
|
1000
999
|
let Yt = function(e2, t2) {
|
|
@@ -1005,13 +1004,13 @@ let Yt = function(e2, t2) {
|
|
|
1005
1004
|
} };
|
|
1006
1005
|
}(() => /* @__PURE__ */ new Map(), { PUSH(e2, t2) {
|
|
1007
1006
|
var l2;
|
|
1008
|
-
let a2 = null != (l2 = this.get(e2)) ? l2 : { doc: e2, count: 0, d:
|
|
1007
|
+
let a2 = null != (l2 = this.get(e2)) ? l2 : { doc: e2, count: 0, d: at(), meta: /* @__PURE__ */ new Set() };
|
|
1009
1008
|
return a2.count++, a2.meta.add(t2), this.set(e2, a2), this;
|
|
1010
1009
|
}, POP(e2, t2) {
|
|
1011
1010
|
let l2 = this.get(e2);
|
|
1012
1011
|
return l2 && (l2.count--, l2.meta.delete(t2)), this;
|
|
1013
1012
|
}, SCROLL_PREVENT({ doc: e2, d: t2, meta: l2 }) {
|
|
1014
|
-
let a2 = { doc: e2, d: t2, meta:
|
|
1013
|
+
let a2 = { doc: e2, d: t2, meta: Ht(l2) }, n2 = [$t(), Nt(), { before({ doc: e3, d: t3 }) {
|
|
1015
1014
|
t3.style(e3.documentElement, "overflow", "hidden");
|
|
1016
1015
|
} }];
|
|
1017
1016
|
n2.forEach(({ before: e3 }) => null == e3 ? void 0 : e3(a2)), n2.forEach(({ after: e3 }) => null == e3 ? void 0 : e3(a2));
|
|
@@ -1020,7 +1019,7 @@ let Yt = function(e2, t2) {
|
|
|
1020
1019
|
}, TEARDOWN({ doc: e2 }) {
|
|
1021
1020
|
this.delete(e2);
|
|
1022
1021
|
} });
|
|
1023
|
-
function
|
|
1022
|
+
function Vt(e2, t2, l2) {
|
|
1024
1023
|
let a2 = function(e3) {
|
|
1025
1024
|
let t3 = O(e3.getSnapshot());
|
|
1026
1025
|
return w(e3.subscribe(() => {
|
|
@@ -1049,29 +1048,29 @@ Yt.subscribe(() => {
|
|
|
1049
1048
|
(a2 && !e3 || !a2 && e3) && Yt.dispatch(l2.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", l2), 0 === l2.count && Yt.dispatch("TEARDOWN", l2);
|
|
1050
1049
|
}
|
|
1051
1050
|
});
|
|
1052
|
-
var
|
|
1053
|
-
let
|
|
1054
|
-
function
|
|
1055
|
-
let t2 = p(
|
|
1051
|
+
var zt = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(zt || {});
|
|
1052
|
+
let qt = Symbol("DialogContext");
|
|
1053
|
+
function Ut(e2) {
|
|
1054
|
+
let t2 = p(qt, null);
|
|
1056
1055
|
if (null === t2) {
|
|
1057
1056
|
let t3 = new Error(`<${e2} /> is missing a parent <Dialog /> component.`);
|
|
1058
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
1057
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, Ut), t3;
|
|
1059
1058
|
}
|
|
1060
1059
|
return t2;
|
|
1061
1060
|
}
|
|
1062
|
-
let
|
|
1061
|
+
let Wt = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Kt = b({ name: "Dialog", inheritAttrs: false, props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, open: { type: [Boolean, String], default: Wt }, initialFocus: { type: Object, default: null }, id: { type: String, default: () => `headlessui-dialog-${me()}` } }, emits: { close: (e2) => true }, setup(e2, { emit: t2, attrs: l2, slots: a2, expose: n2 }) {
|
|
1063
1062
|
var r2;
|
|
1064
1063
|
let o2 = s(false);
|
|
1065
1064
|
f(() => {
|
|
1066
1065
|
o2.value = true;
|
|
1067
1066
|
});
|
|
1068
|
-
let i2 = s(0), u2 =
|
|
1069
|
-
if (n2({ el: h2, $el: h2 }), e2.open ===
|
|
1067
|
+
let i2 = s(0), u2 = ke(), c2 = y(() => e2.open === Wt && null !== u2 ? (u2.value & we.Open) === we.Open : e2.open), h2 = s(null), x2 = y(() => Pe(h2));
|
|
1068
|
+
if (n2({ el: h2, $el: h2 }), e2.open === Wt && null === u2)
|
|
1070
1069
|
throw new Error("You forgot to provide an `open` prop to the `Dialog`.");
|
|
1071
1070
|
if ("boolean" != typeof c2.value)
|
|
1072
|
-
throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c2.value ===
|
|
1073
|
-
let w2 = y(() => o2.value && c2.value ? 0 : 1), k2 = y(() => 0 === w2.value), S2 = y(() => i2.value > 1), C2 = null !== p(
|
|
1074
|
-
let e3 = p(
|
|
1071
|
+
throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${c2.value === Wt ? void 0 : e2.open}`);
|
|
1072
|
+
let w2 = y(() => o2.value && c2.value ? 0 : 1), k2 = y(() => 0 === w2.value), S2 = y(() => i2.value > 1), C2 = null !== p(qt, null), [O2, D2] = function() {
|
|
1073
|
+
let e3 = p(jt, null), t3 = s([]);
|
|
1075
1074
|
function l3(l4) {
|
|
1076
1075
|
let a4 = t3.value.indexOf(l4);
|
|
1077
1076
|
-1 !== a4 && t3.value.splice(a4, 1), e3 && e3.unregister(l4);
|
|
@@ -1079,12 +1078,12 @@ let Kt = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Jt = b({ name: "Dialog", inheri
|
|
|
1079
1078
|
let a3 = { register: function(a4) {
|
|
1080
1079
|
return t3.value.push(a4), e3 && e3.register(a4), () => l3(a4);
|
|
1081
1080
|
}, unregister: l3, portals: t3 };
|
|
1082
|
-
return [t3, b({ name: "PortalWrapper", setup: (e4, { slots: t4 }) => (g(
|
|
1081
|
+
return [t3, b({ name: "PortalWrapper", setup: (e4, { slots: t4 }) => (g(jt, a3), () => {
|
|
1083
1082
|
var e5;
|
|
1084
1083
|
return null == (e5 = t4.default) ? void 0 : e5.call(t4);
|
|
1085
1084
|
}) })];
|
|
1086
1085
|
}(), { resolveContainers: M2, mainTreeNodeRef: _2, MainTreeNode: P2 } = function({ defaultContainers: e3 = [], portals: t3 } = {}) {
|
|
1087
|
-
let l3 = s(null), a3 =
|
|
1086
|
+
let l3 = s(null), a3 = Pe(l3);
|
|
1088
1087
|
function n3() {
|
|
1089
1088
|
var n4;
|
|
1090
1089
|
let r3 = [];
|
|
@@ -1094,48 +1093,48 @@ let Kt = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Jt = b({ name: "Dialog", inheri
|
|
|
1094
1093
|
for (let e4 of t3.value)
|
|
1095
1094
|
r3.push(e4);
|
|
1096
1095
|
for (let e4 of null != (n4 = null == a3 ? void 0 : a3.querySelectorAll("html > *, body > *")) ? n4 : [])
|
|
1097
|
-
e4 !== document.body && e4 !== document.head && e4 instanceof HTMLElement && "headlessui-portal-root" !== e4.id && (e4.contains(
|
|
1096
|
+
e4 !== document.body && e4 !== document.head && e4 instanceof HTMLElement && "headlessui-portal-root" !== e4.id && (e4.contains(he(l3)) || r3.some((t4) => e4.contains(t4)) || r3.push(e4));
|
|
1098
1097
|
return r3;
|
|
1099
1098
|
}
|
|
1100
|
-
return { resolveContainers: n3, contains: (e4) => n3().some((t4) => t4.contains(e4)), mainTreeNodeRef: l3, MainTreeNode: () => d(
|
|
1099
|
+
return { resolveContainers: n3, contains: (e4) => n3().some((t4) => t4.contains(e4)), mainTreeNodeRef: l3, MainTreeNode: () => d(Ke, { features: We.Hidden, ref: l3 }) };
|
|
1101
1100
|
}({ portals: O2, defaultContainers: [y(() => {
|
|
1102
1101
|
var e3;
|
|
1103
1102
|
return null != (e3 = F2.panelRef.value) ? e3 : h2.value;
|
|
1104
|
-
})] }),
|
|
1103
|
+
})] }), T2 = y(() => S2.value ? "parent" : "leaf"), j2 = y(() => null !== u2 && (u2.value & we.Closing) === we.Closing), E2 = y(() => !C2 && !j2.value && k2.value), L2 = y(() => {
|
|
1105
1104
|
var e3, t3, l3;
|
|
1106
|
-
return null != (l3 = Array.from(null != (t3 = null == (e3 = x2.value) ? void 0 : e3.querySelectorAll("body > *")) ? t3 : []).find((e4) => "headlessui-portal-root" !== e4.id && (e4.contains(
|
|
1105
|
+
return null != (l3 = Array.from(null != (t3 = null == (e3 = x2.value) ? void 0 : e3.querySelectorAll("body > *")) ? t3 : []).find((e4) => "headlessui-portal-root" !== e4.id && (e4.contains(he(_2)) && e4 instanceof HTMLElement))) ? l3 : null;
|
|
1107
1106
|
});
|
|
1108
|
-
|
|
1107
|
+
Dt(L2, E2);
|
|
1109
1108
|
let B2 = y(() => !!S2.value || k2.value), I2 = y(() => {
|
|
1110
1109
|
var e3, t3, l3;
|
|
1111
|
-
return null != (l3 = Array.from(null != (t3 = null == (e3 = x2.value) ? void 0 : e3.querySelectorAll("[data-headlessui-portal]")) ? t3 : []).find((e4) => e4.contains(
|
|
1110
|
+
return null != (l3 = Array.from(null != (t3 = null == (e3 = x2.value) ? void 0 : e3.querySelectorAll("[data-headlessui-portal]")) ? t3 : []).find((e4) => e4.contains(he(_2)) && e4 instanceof HTMLElement)) ? l3 : null;
|
|
1112
1111
|
});
|
|
1113
|
-
|
|
1112
|
+
Dt(I2, B2), Rt({ type: "Dialog", enabled: y(() => 0 === w2.value), element: h2, onUpdate: (e3, t3) => {
|
|
1114
1113
|
if ("Dialog" === t3)
|
|
1115
|
-
return
|
|
1114
|
+
return re(e3, { [It.Add]: () => i2.value += 1, [It.Remove]: () => i2.value -= 1 });
|
|
1116
1115
|
} });
|
|
1117
|
-
let R2 =
|
|
1116
|
+
let R2 = Ft({ name: "DialogDescription", slot: y(() => ({ open: c2.value })) }), A2 = s(null), F2 = { titleId: A2, panelRef: s(null), dialogState: w2, setTitleId(e3) {
|
|
1118
1117
|
A2.value !== e3 && (A2.value = e3);
|
|
1119
1118
|
}, close() {
|
|
1120
1119
|
t2("close", false);
|
|
1121
1120
|
} };
|
|
1122
|
-
g(
|
|
1121
|
+
g(qt, F2);
|
|
1123
1122
|
let N2 = y(() => !(!k2.value || S2.value));
|
|
1124
|
-
|
|
1123
|
+
Ue(M2, (e3, t3) => {
|
|
1125
1124
|
F2.close(), v(() => null == t3 ? void 0 : t3.focus());
|
|
1126
1125
|
}, N2);
|
|
1127
1126
|
let $2 = y(() => !(S2.value || 0 !== w2.value));
|
|
1128
|
-
|
|
1129
|
-
$2.value && (e3.defaultPrevented || e3.key ===
|
|
1127
|
+
yt(null == (r2 = x2.value) ? void 0 : r2.defaultView, "keydown", (e3) => {
|
|
1128
|
+
$2.value && (e3.defaultPrevented || e3.key === ve.Escape && (e3.preventDefault(), e3.stopPropagation(), F2.close()));
|
|
1130
1129
|
});
|
|
1131
|
-
let H2 = y(() => !(
|
|
1132
|
-
return
|
|
1130
|
+
let H2 = y(() => !(j2.value || 0 !== w2.value || C2));
|
|
1131
|
+
return Vt(x2, H2, (e3) => {
|
|
1133
1132
|
var t3;
|
|
1134
1133
|
return { containers: [...null != (t3 = e3.containers) ? t3 : [], M2] };
|
|
1135
1134
|
}), m((e3) => {
|
|
1136
1135
|
if (0 !== w2.value)
|
|
1137
1136
|
return;
|
|
1138
|
-
let t3 =
|
|
1137
|
+
let t3 = he(h2);
|
|
1139
1138
|
if (!t3)
|
|
1140
1139
|
return;
|
|
1141
1140
|
let l3 = new ResizeObserver((e4) => {
|
|
@@ -1147,125 +1146,125 @@ let Kt = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Jt = b({ name: "Dialog", inheri
|
|
|
1147
1146
|
l3.observe(t3), e3(() => l3.disconnect());
|
|
1148
1147
|
}), () => {
|
|
1149
1148
|
let { id: t3, open: n3, initialFocus: r3, ...o3 } = e2, i3 = { ...l2, ref: h2, id: t3, role: "dialog", "aria-modal": 0 === w2.value || void 0, "aria-labelledby": A2.value, "aria-describedby": R2.value }, s2 = { open: 0 === w2.value };
|
|
1150
|
-
return d(
|
|
1149
|
+
return d(Pt, { force: true }, () => [d(Tt, () => d(Lt, { target: h2.value }, () => d(Pt, { force: false }, () => d(wt, { initialFocus: r3, containers: M2, features: k2.value ? re(T2.value, { parent: wt.features.RestoreFocus, leaf: wt.features.All & ~wt.features.FocusLock }) : wt.features.None }, () => d(D2, {}, () => se({ ourProps: i3, theirProps: { ...o3, ...l2 }, slot: s2, attrs: l2, slots: a2, visible: 0 === w2.value, features: oe.RenderStrategy | oe.Static, name: "Dialog" })))))), d(P2)]);
|
|
1151
1150
|
};
|
|
1152
1151
|
} });
|
|
1153
|
-
b({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-overlay-${
|
|
1154
|
-
let a2 =
|
|
1152
|
+
b({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-overlay-${me()}` } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
1153
|
+
let a2 = Ut("DialogOverlay");
|
|
1155
1154
|
function n2(e3) {
|
|
1156
1155
|
e3.target === e3.currentTarget && (e3.preventDefault(), e3.stopPropagation(), a2.close());
|
|
1157
1156
|
}
|
|
1158
1157
|
return () => {
|
|
1159
1158
|
let { id: r2, ...o2 } = e2;
|
|
1160
|
-
return
|
|
1159
|
+
return se({ ourProps: { id: r2, "aria-hidden": true, onClick: n2 }, theirProps: o2, slot: { open: 0 === a2.dialogState.value }, attrs: t2, slots: l2, name: "DialogOverlay" });
|
|
1161
1160
|
};
|
|
1162
|
-
} }), b({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-backdrop-${
|
|
1163
|
-
let n2 =
|
|
1161
|
+
} }), b({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-backdrop-${me()}` } }, inheritAttrs: false, setup(e2, { attrs: t2, slots: l2, expose: a2 }) {
|
|
1162
|
+
let n2 = Ut("DialogBackdrop"), r2 = s(null);
|
|
1164
1163
|
return a2({ el: r2, $el: r2 }), f(() => {
|
|
1165
1164
|
if (null === n2.panelRef.value)
|
|
1166
1165
|
throw new Error("A <DialogBackdrop /> component is being used, but a <DialogPanel /> component is missing.");
|
|
1167
1166
|
}), () => {
|
|
1168
1167
|
let { id: a3, ...o2 } = e2, i2 = { id: a3, ref: r2, "aria-hidden": true };
|
|
1169
|
-
return d(
|
|
1168
|
+
return d(Pt, { force: true }, () => d(Tt, () => se({ ourProps: i2, theirProps: { ...t2, ...o2 }, slot: { open: 0 === n2.dialogState.value }, attrs: t2, slots: l2, name: "DialogBackdrop" })));
|
|
1170
1169
|
};
|
|
1171
1170
|
} });
|
|
1172
|
-
let
|
|
1173
|
-
let n2 =
|
|
1171
|
+
let Jt = b({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: () => `headlessui-dialog-panel-${me()}` } }, setup(e2, { attrs: t2, slots: l2, expose: a2 }) {
|
|
1172
|
+
let n2 = Ut("DialogPanel");
|
|
1174
1173
|
function r2(e3) {
|
|
1175
1174
|
e3.stopPropagation();
|
|
1176
1175
|
}
|
|
1177
1176
|
return a2({ el: n2.panelRef, $el: n2.panelRef }), () => {
|
|
1178
1177
|
let { id: a3, ...o2 } = e2;
|
|
1179
|
-
return
|
|
1178
|
+
return se({ ourProps: { id: a3, ref: n2.panelRef, onClick: r2 }, theirProps: o2, slot: { open: 0 === n2.dialogState.value }, attrs: t2, slots: l2, name: "DialogPanel" });
|
|
1180
1179
|
};
|
|
1181
|
-
} }),
|
|
1182
|
-
let a2 =
|
|
1180
|
+
} }), Gt = b({ name: "DialogTitle", props: { as: { type: [Object, String], default: "h2" }, id: { type: String, default: () => `headlessui-dialog-title-${me()}` } }, setup(e2, { attrs: t2, slots: l2 }) {
|
|
1181
|
+
let a2 = Ut("DialogTitle");
|
|
1183
1182
|
return f(() => {
|
|
1184
1183
|
a2.setTitleId(e2.id), w(() => a2.setTitleId(null));
|
|
1185
1184
|
}), () => {
|
|
1186
1185
|
let { id: n2, ...r2 } = e2;
|
|
1187
|
-
return
|
|
1186
|
+
return se({ ourProps: { id: n2 }, theirProps: r2, slot: { open: 0 === a2.dialogState.value }, attrs: t2, slots: l2, name: "DialogTitle" });
|
|
1188
1187
|
};
|
|
1189
1188
|
} });
|
|
1190
|
-
var
|
|
1189
|
+
var Xt = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(Xt || {});
|
|
1191
1190
|
let Qt = Symbol("DisclosureContext");
|
|
1192
|
-
function
|
|
1191
|
+
function Zt(e2) {
|
|
1193
1192
|
let t2 = p(Qt, null);
|
|
1194
1193
|
if (null === t2) {
|
|
1195
1194
|
let t3 = new Error(`<${e2} /> is missing a parent <Disclosure /> component.`);
|
|
1196
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
1195
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, Zt), t3;
|
|
1197
1196
|
}
|
|
1198
1197
|
return t2;
|
|
1199
1198
|
}
|
|
1200
|
-
let
|
|
1201
|
-
let
|
|
1199
|
+
let el = Symbol("DisclosurePanelContext");
|
|
1200
|
+
let tl = b({ name: "Disclosure", props: { as: { type: [Object, String], default: "template" }, defaultOpen: { type: [Boolean], default: false } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1202
1201
|
let a2 = s(e2.defaultOpen ? 0 : 1), n2 = s(null), r2 = s(null), o2 = { buttonId: s(null), panelId: s(null), disclosureState: a2, panel: n2, button: r2, toggleDisclosure() {
|
|
1203
|
-
a2.value =
|
|
1202
|
+
a2.value = re(a2.value, { 0: 1, 1: 0 });
|
|
1204
1203
|
}, closeDisclosure() {
|
|
1205
1204
|
1 !== a2.value && (a2.value = 1);
|
|
1206
1205
|
}, close(e3) {
|
|
1207
1206
|
o2.closeDisclosure();
|
|
1208
|
-
let t3 = e3 ? e3 instanceof HTMLElement ? e3 : e3.value instanceof HTMLElement ?
|
|
1207
|
+
let t3 = e3 ? e3 instanceof HTMLElement ? e3 : e3.value instanceof HTMLElement ? he(e3) : he(o2.button) : he(o2.button);
|
|
1209
1208
|
null == t3 || t3.focus();
|
|
1210
1209
|
} };
|
|
1211
|
-
return g(Qt, o2),
|
|
1210
|
+
return g(Qt, o2), Se(y(() => re(a2.value, { 0: we.Open, 1: we.Closed }))), () => {
|
|
1212
1211
|
let { defaultOpen: n3, ...r3 } = e2;
|
|
1213
|
-
return
|
|
1212
|
+
return se({ theirProps: r3, ourProps: {}, slot: { open: 0 === a2.value, close: o2.close }, slots: t2, attrs: l2, name: "Disclosure" });
|
|
1214
1213
|
};
|
|
1215
|
-
} }),
|
|
1216
|
-
let n2 =
|
|
1214
|
+
} }), ll = b({ name: "DisclosureButton", props: { as: { type: [Object, String], default: "button" }, disabled: { type: [Boolean], default: false }, id: { type: String, default: () => `headlessui-disclosure-button-${me()}` } }, setup(e2, { attrs: t2, slots: l2, expose: a2 }) {
|
|
1215
|
+
let n2 = Zt("DisclosureButton");
|
|
1217
1216
|
f(() => {
|
|
1218
1217
|
n2.buttonId.value = e2.id;
|
|
1219
1218
|
}), w(() => {
|
|
1220
1219
|
n2.buttonId.value = null;
|
|
1221
1220
|
});
|
|
1222
|
-
let r2 = p(
|
|
1221
|
+
let r2 = p(el, null), o2 = y(() => null !== r2 && r2.value === n2.panelId.value), i2 = s(null);
|
|
1223
1222
|
a2({ el: i2, $el: i2 }), o2.value || m(() => {
|
|
1224
1223
|
n2.button.value = i2.value;
|
|
1225
1224
|
});
|
|
1226
|
-
let u2 =
|
|
1225
|
+
let u2 = Oe(y(() => ({ as: e2.as, type: t2.type })), i2);
|
|
1227
1226
|
function d2() {
|
|
1228
1227
|
var t3;
|
|
1229
|
-
e2.disabled || (o2.value ? (n2.toggleDisclosure(), null == (t3 =
|
|
1228
|
+
e2.disabled || (o2.value ? (n2.toggleDisclosure(), null == (t3 = he(n2.button)) || t3.focus()) : n2.toggleDisclosure());
|
|
1230
1229
|
}
|
|
1231
1230
|
function c2(t3) {
|
|
1232
1231
|
var l3;
|
|
1233
1232
|
if (!e2.disabled)
|
|
1234
1233
|
if (o2.value)
|
|
1235
1234
|
switch (t3.key) {
|
|
1236
|
-
case
|
|
1237
|
-
case
|
|
1238
|
-
t3.preventDefault(), t3.stopPropagation(), n2.toggleDisclosure(), null == (l3 =
|
|
1235
|
+
case ve.Space:
|
|
1236
|
+
case ve.Enter:
|
|
1237
|
+
t3.preventDefault(), t3.stopPropagation(), n2.toggleDisclosure(), null == (l3 = he(n2.button)) || l3.focus();
|
|
1239
1238
|
}
|
|
1240
1239
|
else
|
|
1241
1240
|
switch (t3.key) {
|
|
1242
|
-
case
|
|
1243
|
-
case
|
|
1241
|
+
case ve.Space:
|
|
1242
|
+
case ve.Enter:
|
|
1244
1243
|
t3.preventDefault(), t3.stopPropagation(), n2.toggleDisclosure();
|
|
1245
1244
|
}
|
|
1246
1245
|
}
|
|
1247
1246
|
function g2(e3) {
|
|
1248
|
-
if (e3.key ===
|
|
1247
|
+
if (e3.key === ve.Space)
|
|
1249
1248
|
e3.preventDefault();
|
|
1250
1249
|
}
|
|
1251
1250
|
return () => {
|
|
1252
1251
|
let a3 = { open: 0 === n2.disclosureState.value }, { id: r3, ...s2 } = e2;
|
|
1253
|
-
return
|
|
1252
|
+
return se({ ourProps: o2.value ? { ref: i2, type: u2.value, onClick: d2, onKeydown: c2 } : { id: r3, ref: i2, type: u2.value, "aria-expanded": e2.disabled ? void 0 : 0 === n2.disclosureState.value, "aria-controls": he(n2.panel) ? n2.panelId.value : void 0, disabled: !!e2.disabled || void 0, onClick: d2, onKeydown: c2, onKeyup: g2 }, theirProps: s2, slot: a3, attrs: t2, slots: l2, name: "DisclosureButton" });
|
|
1254
1253
|
};
|
|
1255
|
-
} }),
|
|
1256
|
-
let n2 =
|
|
1254
|
+
} }), al = b({ name: "DisclosurePanel", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, id: { type: String, default: () => `headlessui-disclosure-panel-${me()}` } }, setup(e2, { attrs: t2, slots: l2, expose: a2 }) {
|
|
1255
|
+
let n2 = Zt("DisclosurePanel");
|
|
1257
1256
|
f(() => {
|
|
1258
1257
|
n2.panelId.value = e2.id;
|
|
1259
1258
|
}), w(() => {
|
|
1260
1259
|
n2.panelId.value = null;
|
|
1261
|
-
}), a2({ el: n2.panel, $el: n2.panel }), g(
|
|
1262
|
-
let r2 =
|
|
1260
|
+
}), a2({ el: n2.panel, $el: n2.panel }), g(el, n2.panelId);
|
|
1261
|
+
let r2 = ke(), o2 = y(() => null !== r2 ? (r2.value & we.Open) === we.Open : 0 === n2.disclosureState.value);
|
|
1263
1262
|
return () => {
|
|
1264
1263
|
let a3 = { open: 0 === n2.disclosureState.value, close: n2.close }, { id: r3, ...i2 } = e2;
|
|
1265
|
-
return
|
|
1264
|
+
return se({ ourProps: { id: r3, ref: n2.panel }, theirProps: i2, slot: a3, attrs: t2, slots: l2, features: oe.RenderStrategy | oe.Static, visible: o2.value, name: "DisclosurePanel" });
|
|
1266
1265
|
};
|
|
1267
|
-
} }),
|
|
1268
|
-
function
|
|
1266
|
+
} }), nl = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
|
|
1267
|
+
function rl(e2) {
|
|
1269
1268
|
var t2, l2;
|
|
1270
1269
|
let a2 = null != (t2 = e2.innerText) ? t2 : "", n2 = e2.cloneNode(true);
|
|
1271
1270
|
if (!(n2 instanceof HTMLElement))
|
|
@@ -1274,12 +1273,12 @@ function ol(e2) {
|
|
|
1274
1273
|
for (let e3 of n2.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))
|
|
1275
1274
|
e3.remove(), r2 = true;
|
|
1276
1275
|
let o2 = r2 ? null != (l2 = n2.innerText) ? l2 : "" : a2;
|
|
1277
|
-
return
|
|
1276
|
+
return nl.test(o2) && (o2 = o2.replace(nl, "")), o2;
|
|
1278
1277
|
}
|
|
1279
|
-
function
|
|
1278
|
+
function ol(e2) {
|
|
1280
1279
|
let t2 = s(""), l2 = s("");
|
|
1281
1280
|
return () => {
|
|
1282
|
-
let a2 =
|
|
1281
|
+
let a2 = he(e2);
|
|
1283
1282
|
if (!a2)
|
|
1284
1283
|
return "";
|
|
1285
1284
|
let n2 = a2.innerText;
|
|
@@ -1295,38 +1294,38 @@ function il(e2) {
|
|
|
1295
1294
|
let t4 = document.getElementById(e5);
|
|
1296
1295
|
if (t4) {
|
|
1297
1296
|
let e6 = t4.getAttribute("aria-label");
|
|
1298
|
-
return "string" == typeof e6 ? e6.trim() :
|
|
1297
|
+
return "string" == typeof e6 ? e6.trim() : rl(t4).trim();
|
|
1299
1298
|
}
|
|
1300
1299
|
return null;
|
|
1301
1300
|
}).filter(Boolean);
|
|
1302
1301
|
if (e4.length > 0)
|
|
1303
1302
|
return e4.join(", ");
|
|
1304
1303
|
}
|
|
1305
|
-
return
|
|
1304
|
+
return rl(e3).trim();
|
|
1306
1305
|
}(a2).trim().toLowerCase();
|
|
1307
1306
|
return t2.value = n2, l2.value = r2, r2;
|
|
1308
1307
|
};
|
|
1309
1308
|
}
|
|
1310
|
-
var
|
|
1311
|
-
let
|
|
1312
|
-
function
|
|
1313
|
-
let t2 = p(
|
|
1309
|
+
var il = ((e2) => (e2[e2.Open = 0] = "Open", e2[e2.Closed = 1] = "Closed", e2))(il || {}), sl = ((e2) => (e2[e2.Pointer = 0] = "Pointer", e2[e2.Other = 1] = "Other", e2))(sl || {});
|
|
1310
|
+
let ul = Symbol("MenuContext");
|
|
1311
|
+
function dl(e2) {
|
|
1312
|
+
let t2 = p(ul, null);
|
|
1314
1313
|
if (null === t2) {
|
|
1315
1314
|
let t3 = new Error(`<${e2} /> is missing a parent <Menu /> component.`);
|
|
1316
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t3,
|
|
1315
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t3, dl), t3;
|
|
1317
1316
|
}
|
|
1318
1317
|
return t2;
|
|
1319
1318
|
}
|
|
1320
|
-
let
|
|
1319
|
+
let cl = b({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1321
1320
|
let a2 = s(1), n2 = s(null), r2 = s(null), o2 = s([]), i2 = s(""), u2 = s(null), d2 = s(1);
|
|
1322
1321
|
function c2(e3 = (e4) => e4) {
|
|
1323
|
-
let t3 = null !== u2.value ? o2.value[u2.value] : null, l3 = Ye(e3(o2.value.slice()), (e4) =>
|
|
1322
|
+
let t3 = null !== u2.value ? o2.value[u2.value] : null, l3 = Ye(e3(o2.value.slice()), (e4) => he(e4.dataRef.domRef)), a3 = t3 ? l3.indexOf(t3) : null;
|
|
1324
1323
|
return -1 === a3 && (a3 = null), { items: l3, activeItemIndex: a3 };
|
|
1325
1324
|
}
|
|
1326
1325
|
let p2 = { menuState: a2, buttonRef: n2, itemsRef: r2, items: o2, searchQuery: i2, activeItemIndex: u2, activationTrigger: d2, closeMenu: () => {
|
|
1327
1326
|
a2.value = 1, u2.value = null;
|
|
1328
1327
|
}, openMenu: () => a2.value = 0, goToItem(e3, t3, l3) {
|
|
1329
|
-
let a3 = c2(), n3 =
|
|
1328
|
+
let a3 = c2(), n3 = be(e3 === ye.Specific ? { focus: ye.Specific, id: t3 } : { focus: e3 }, { resolveItems: () => a3.items, resolveActiveIndex: () => a3.activeItemIndex, resolveId: (e4) => e4.id, resolveDisabled: (e4) => e4.dataRef.disabled });
|
|
1330
1329
|
i2.value = "", u2.value = n3, d2.value = null != l3 ? l3 : 1, o2.value = a3.items;
|
|
1331
1330
|
}, search(e3) {
|
|
1332
1331
|
let t3 = "" !== i2.value ? 0 : 1;
|
|
@@ -1345,185 +1344,185 @@ let pl = b({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1345
1344
|
});
|
|
1346
1345
|
o2.value = t3.items, u2.value = t3.activeItemIndex, d2.value = 1;
|
|
1347
1346
|
} };
|
|
1348
|
-
return
|
|
1347
|
+
return Ue([n2, r2], (e3, t3) => {
|
|
1349
1348
|
var l3;
|
|
1350
|
-
p2.closeMenu(),
|
|
1351
|
-
}, y(() => 0 === a2.value)), g(
|
|
1349
|
+
p2.closeMenu(), Ae(t3, Re.Loose) || (e3.preventDefault(), null == (l3 = he(n2)) || l3.focus());
|
|
1350
|
+
}, y(() => 0 === a2.value)), g(ul, p2), Se(y(() => re(a2.value, { 0: we.Open, 1: we.Closed }))), () => {
|
|
1352
1351
|
let n3 = { open: 0 === a2.value, close: p2.closeMenu };
|
|
1353
|
-
return
|
|
1352
|
+
return se({ ourProps: {}, theirProps: e2, slot: n3, slots: t2, attrs: l2, name: "Menu" });
|
|
1354
1353
|
};
|
|
1355
|
-
} }),
|
|
1356
|
-
let n2 =
|
|
1354
|
+
} }), pl = b({ name: "MenuButton", props: { disabled: { type: Boolean, default: false }, as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-menu-button-${me()}` } }, setup(e2, { attrs: t2, slots: l2, expose: a2 }) {
|
|
1355
|
+
let n2 = dl("MenuButton");
|
|
1357
1356
|
function r2(e3) {
|
|
1358
1357
|
switch (e3.key) {
|
|
1359
|
-
case
|
|
1360
|
-
case
|
|
1361
|
-
case
|
|
1358
|
+
case ve.Space:
|
|
1359
|
+
case ve.Enter:
|
|
1360
|
+
case ve.ArrowDown:
|
|
1362
1361
|
e3.preventDefault(), e3.stopPropagation(), n2.openMenu(), v(() => {
|
|
1363
1362
|
var e4;
|
|
1364
|
-
null == (e4 =
|
|
1363
|
+
null == (e4 = he(n2.itemsRef)) || e4.focus({ preventScroll: true }), n2.goToItem(ye.First);
|
|
1365
1364
|
});
|
|
1366
1365
|
break;
|
|
1367
|
-
case
|
|
1366
|
+
case ve.ArrowUp:
|
|
1368
1367
|
e3.preventDefault(), e3.stopPropagation(), n2.openMenu(), v(() => {
|
|
1369
1368
|
var e4;
|
|
1370
|
-
null == (e4 =
|
|
1369
|
+
null == (e4 = he(n2.itemsRef)) || e4.focus({ preventScroll: true }), n2.goToItem(ye.Last);
|
|
1371
1370
|
});
|
|
1372
1371
|
}
|
|
1373
1372
|
}
|
|
1374
1373
|
function o2(e3) {
|
|
1375
|
-
if (e3.key ===
|
|
1374
|
+
if (e3.key === ve.Space)
|
|
1376
1375
|
e3.preventDefault();
|
|
1377
1376
|
}
|
|
1378
1377
|
function i2(t3) {
|
|
1379
1378
|
e2.disabled || (0 === n2.menuState.value ? (n2.closeMenu(), v(() => {
|
|
1380
1379
|
var e3;
|
|
1381
|
-
return null == (e3 =
|
|
1380
|
+
return null == (e3 = he(n2.buttonRef)) ? void 0 : e3.focus({ preventScroll: true });
|
|
1382
1381
|
})) : (t3.preventDefault(), n2.openMenu(), function(e3) {
|
|
1383
1382
|
requestAnimationFrame(() => requestAnimationFrame(e3));
|
|
1384
1383
|
}(() => {
|
|
1385
1384
|
var e3;
|
|
1386
|
-
return null == (e3 =
|
|
1385
|
+
return null == (e3 = he(n2.itemsRef)) ? void 0 : e3.focus({ preventScroll: true });
|
|
1387
1386
|
})));
|
|
1388
1387
|
}
|
|
1389
1388
|
a2({ el: n2.buttonRef, $el: n2.buttonRef });
|
|
1390
|
-
let s2 =
|
|
1389
|
+
let s2 = Oe(y(() => ({ as: e2.as, type: t2.type })), n2.buttonRef);
|
|
1391
1390
|
return () => {
|
|
1392
1391
|
var a3;
|
|
1393
1392
|
let u2 = { open: 0 === n2.menuState.value }, { id: d2, ...c2 } = e2;
|
|
1394
|
-
return
|
|
1393
|
+
return se({ ourProps: { ref: n2.buttonRef, id: d2, type: s2.value, "aria-haspopup": "menu", "aria-controls": null == (a3 = he(n2.itemsRef)) ? void 0 : a3.id, "aria-expanded": e2.disabled ? void 0 : 0 === n2.menuState.value, onKeydown: r2, onKeyup: o2, onClick: i2 }, theirProps: c2, slot: u2, attrs: t2, slots: l2, name: "MenuButton" });
|
|
1395
1394
|
};
|
|
1396
|
-
} }),
|
|
1397
|
-
let n2 =
|
|
1395
|
+
} }), gl = b({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: false }, unmount: { type: Boolean, default: true }, id: { type: String, default: () => `headlessui-menu-items-${me()}` } }, setup(e2, { attrs: t2, slots: l2, expose: a2 }) {
|
|
1396
|
+
let n2 = dl("MenuItems"), r2 = s(null);
|
|
1398
1397
|
function o2(e3) {
|
|
1399
1398
|
var t3;
|
|
1400
1399
|
switch (r2.value && clearTimeout(r2.value), e3.key) {
|
|
1401
|
-
case
|
|
1400
|
+
case ve.Space:
|
|
1402
1401
|
if ("" !== n2.searchQuery.value)
|
|
1403
1402
|
return e3.preventDefault(), e3.stopPropagation(), n2.search(e3.key);
|
|
1404
|
-
case
|
|
1403
|
+
case ve.Enter:
|
|
1405
1404
|
if (e3.preventDefault(), e3.stopPropagation(), null !== n2.activeItemIndex.value) {
|
|
1406
|
-
null == (t3 =
|
|
1405
|
+
null == (t3 = he(n2.items.value[n2.activeItemIndex.value].dataRef.domRef)) || t3.click();
|
|
1407
1406
|
}
|
|
1408
|
-
n2.closeMenu(),
|
|
1407
|
+
n2.closeMenu(), Fe(he(n2.buttonRef));
|
|
1409
1408
|
break;
|
|
1410
|
-
case
|
|
1411
|
-
return e3.preventDefault(), e3.stopPropagation(), n2.goToItem(
|
|
1412
|
-
case
|
|
1413
|
-
return e3.preventDefault(), e3.stopPropagation(), n2.goToItem(
|
|
1414
|
-
case
|
|
1415
|
-
case
|
|
1416
|
-
return e3.preventDefault(), e3.stopPropagation(), n2.goToItem(
|
|
1417
|
-
case
|
|
1418
|
-
case
|
|
1419
|
-
return e3.preventDefault(), e3.stopPropagation(), n2.goToItem(
|
|
1420
|
-
case
|
|
1409
|
+
case ve.ArrowDown:
|
|
1410
|
+
return e3.preventDefault(), e3.stopPropagation(), n2.goToItem(ye.Next);
|
|
1411
|
+
case ve.ArrowUp:
|
|
1412
|
+
return e3.preventDefault(), e3.stopPropagation(), n2.goToItem(ye.Previous);
|
|
1413
|
+
case ve.Home:
|
|
1414
|
+
case ve.PageUp:
|
|
1415
|
+
return e3.preventDefault(), e3.stopPropagation(), n2.goToItem(ye.First);
|
|
1416
|
+
case ve.End:
|
|
1417
|
+
case ve.PageDown:
|
|
1418
|
+
return e3.preventDefault(), e3.stopPropagation(), n2.goToItem(ye.Last);
|
|
1419
|
+
case ve.Escape:
|
|
1421
1420
|
e3.preventDefault(), e3.stopPropagation(), n2.closeMenu(), v(() => {
|
|
1422
1421
|
var e4;
|
|
1423
|
-
return null == (e4 =
|
|
1422
|
+
return null == (e4 = he(n2.buttonRef)) ? void 0 : e4.focus({ preventScroll: true });
|
|
1424
1423
|
});
|
|
1425
1424
|
break;
|
|
1426
|
-
case
|
|
1425
|
+
case ve.Tab:
|
|
1427
1426
|
e3.preventDefault(), e3.stopPropagation(), n2.closeMenu(), v(() => function(e4, t4) {
|
|
1428
|
-
return
|
|
1429
|
-
}(
|
|
1427
|
+
return Ve(Ie(), t4, { relativeTo: e4 });
|
|
1428
|
+
}(he(n2.buttonRef), e3.shiftKey ? Ee.Previous : Ee.Next));
|
|
1430
1429
|
break;
|
|
1431
1430
|
default:
|
|
1432
1431
|
1 === e3.key.length && (n2.search(e3.key), r2.value = setTimeout(() => n2.clearSearch(), 350));
|
|
1433
1432
|
}
|
|
1434
1433
|
}
|
|
1435
1434
|
function i2(e3) {
|
|
1436
|
-
if (e3.key ===
|
|
1435
|
+
if (e3.key === ve.Space)
|
|
1437
1436
|
e3.preventDefault();
|
|
1438
1437
|
}
|
|
1439
|
-
a2({ el: n2.itemsRef, $el: n2.itemsRef }), Te({ container: y(() =>
|
|
1438
|
+
a2({ el: n2.itemsRef, $el: n2.itemsRef }), Te({ container: y(() => he(n2.itemsRef)), enabled: y(() => 0 === n2.menuState.value), accept: (e3) => "menuitem" === e3.getAttribute("role") ? NodeFilter.FILTER_REJECT : e3.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT, walk(e3) {
|
|
1440
1439
|
e3.setAttribute("role", "none");
|
|
1441
1440
|
} });
|
|
1442
|
-
let u2 =
|
|
1441
|
+
let u2 = ke(), d2 = y(() => null !== u2 ? (u2.value & we.Open) === we.Open : 0 === n2.menuState.value);
|
|
1443
1442
|
return () => {
|
|
1444
1443
|
var a3, r3;
|
|
1445
1444
|
let s2 = { open: 0 === n2.menuState.value }, { id: u3, ...c2 } = e2;
|
|
1446
|
-
return
|
|
1445
|
+
return se({ ourProps: { "aria-activedescendant": null === n2.activeItemIndex.value || null == (a3 = n2.items.value[n2.activeItemIndex.value]) ? void 0 : a3.id, "aria-labelledby": null == (r3 = he(n2.buttonRef)) ? void 0 : r3.id, id: u3, onKeydown: o2, onKeyup: i2, role: "menu", tabIndex: 0, ref: n2.itemsRef }, theirProps: c2, slot: s2, attrs: t2, slots: l2, features: oe.RenderStrategy | oe.Static, visible: d2.value, name: "MenuItems" });
|
|
1447
1446
|
};
|
|
1448
|
-
} }),
|
|
1449
|
-
let n2 =
|
|
1447
|
+
} }), fl = b({ name: "MenuItem", inheritAttrs: false, props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: false }, id: { type: String, default: () => `headlessui-menu-item-${me()}` } }, setup(e2, { slots: t2, attrs: l2, expose: a2 }) {
|
|
1448
|
+
let n2 = dl("MenuItem"), r2 = s(null);
|
|
1450
1449
|
a2({ el: r2, $el: r2 });
|
|
1451
|
-
let o2 = y(() => null !== n2.activeItemIndex.value && n2.items.value[n2.activeItemIndex.value].id === e2.id), i2 =
|
|
1450
|
+
let o2 = y(() => null !== n2.activeItemIndex.value && n2.items.value[n2.activeItemIndex.value].id === e2.id), i2 = ol(r2), u2 = y(() => ({ disabled: e2.disabled, get textValue() {
|
|
1452
1451
|
return i2();
|
|
1453
1452
|
}, domRef: r2 }));
|
|
1454
1453
|
function d2(t3) {
|
|
1455
1454
|
if (e2.disabled)
|
|
1456
1455
|
return t3.preventDefault();
|
|
1457
|
-
n2.closeMenu(),
|
|
1456
|
+
n2.closeMenu(), Fe(he(n2.buttonRef));
|
|
1458
1457
|
}
|
|
1459
1458
|
function c2() {
|
|
1460
1459
|
if (e2.disabled)
|
|
1461
|
-
return n2.goToItem(
|
|
1462
|
-
n2.goToItem(
|
|
1460
|
+
return n2.goToItem(ye.Nothing);
|
|
1461
|
+
n2.goToItem(ye.Specific, e2.id);
|
|
1463
1462
|
}
|
|
1464
1463
|
f(() => n2.registerItem(e2.id, u2)), w(() => n2.unregisterItem(e2.id)), m(() => {
|
|
1465
1464
|
0 === n2.menuState.value && o2.value && 0 !== n2.activationTrigger.value && v(() => {
|
|
1466
1465
|
var e3, t3;
|
|
1467
|
-
return null == (t3 = null == (e3 =
|
|
1466
|
+
return null == (t3 = null == (e3 = he(r2)) ? void 0 : e3.scrollIntoView) ? void 0 : t3.call(e3, { block: "nearest" });
|
|
1468
1467
|
});
|
|
1469
1468
|
});
|
|
1470
|
-
let p2 =
|
|
1469
|
+
let p2 = et();
|
|
1471
1470
|
function g2(e3) {
|
|
1472
1471
|
p2.update(e3);
|
|
1473
1472
|
}
|
|
1474
1473
|
function b2(t3) {
|
|
1475
|
-
p2.wasMoved(t3) && (e2.disabled || o2.value || n2.goToItem(
|
|
1474
|
+
p2.wasMoved(t3) && (e2.disabled || o2.value || n2.goToItem(ye.Specific, e2.id, 0));
|
|
1476
1475
|
}
|
|
1477
1476
|
function h2(t3) {
|
|
1478
|
-
p2.wasMoved(t3) && (e2.disabled || o2.value && n2.goToItem(
|
|
1477
|
+
p2.wasMoved(t3) && (e2.disabled || o2.value && n2.goToItem(ye.Nothing));
|
|
1479
1478
|
}
|
|
1480
1479
|
return () => {
|
|
1481
1480
|
let { disabled: a3 } = e2, i3 = { active: o2.value, disabled: a3, close: n2.closeMenu }, { id: s2, ...u3 } = e2;
|
|
1482
|
-
return
|
|
1481
|
+
return se({ ourProps: { id: s2, ref: r2, role: "menuitem", tabIndex: true === a3 ? void 0 : -1, "aria-disabled": true === a3 || void 0, disabled: void 0, onClick: d2, onFocus: c2, onPointerenter: g2, onMouseenter: g2, onPointermove: b2, onMousemove: b2, onPointerleave: h2, onMouseleave: h2 }, theirProps: { ...l2, ...u3 }, slot: i3, attrs: l2, slots: t2, name: "MenuItem" });
|
|
1483
1482
|
};
|
|
1484
|
-
} }),
|
|
1485
|
-
function
|
|
1486
|
-
let e2 = p(
|
|
1483
|
+
} }), ml = Symbol("LabelContext");
|
|
1484
|
+
function vl() {
|
|
1485
|
+
let e2 = p(ml, null);
|
|
1487
1486
|
if (null === e2) {
|
|
1488
1487
|
let e3 = new Error("You used a <Label /> component, but it is not inside a parent.");
|
|
1489
|
-
throw Error.captureStackTrace && Error.captureStackTrace(e3,
|
|
1488
|
+
throw Error.captureStackTrace && Error.captureStackTrace(e3, vl), e3;
|
|
1490
1489
|
}
|
|
1491
1490
|
return e2;
|
|
1492
1491
|
}
|
|
1493
|
-
function
|
|
1492
|
+
function yl({ slot: e2 = {}, name: t2 = "Label", props: l2 = {} } = {}) {
|
|
1494
1493
|
let a2 = s([]);
|
|
1495
|
-
return g(
|
|
1494
|
+
return g(ml, { register: function(e3) {
|
|
1496
1495
|
return a2.value.push(e3), () => {
|
|
1497
1496
|
let t3 = a2.value.indexOf(e3);
|
|
1498
1497
|
-1 !== t3 && a2.value.splice(t3, 1);
|
|
1499
1498
|
};
|
|
1500
1499
|
}, slot: e2, name: t2, props: l2 }), y(() => a2.value.length > 0 ? a2.value.join(" ") : void 0);
|
|
1501
1500
|
}
|
|
1502
|
-
let
|
|
1503
|
-
let a2 =
|
|
1501
|
+
let bl = b({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: false }, id: { type: String, default: () => `headlessui-label-${me()}` } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1502
|
+
let a2 = vl();
|
|
1504
1503
|
return f(() => w(a2.register(e2.id))), () => {
|
|
1505
1504
|
let { name: n2 = "Label", slot: r2 = {}, props: o2 = {} } = a2, { id: i2, passive: s2, ...u2 } = e2, d2 = { ...Object.entries(o2).reduce((e3, [t3, l3]) => Object.assign(e3, { [t3]: C(l3) }), {}), id: i2 };
|
|
1506
|
-
return s2 && (delete d2.onClick, delete d2.htmlFor, delete u2.onClick),
|
|
1505
|
+
return s2 && (delete d2.onClick, delete d2.htmlFor, delete u2.onClick), se({ ourProps: d2, theirProps: u2, slot: r2, attrs: l2, slots: t2, name: n2 });
|
|
1507
1506
|
};
|
|
1508
|
-
} }),
|
|
1509
|
-
let a2 = s(null), n2 =
|
|
1507
|
+
} }), hl = Symbol("GroupContext"), xl = b({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e2, { slots: t2, attrs: l2 }) {
|
|
1508
|
+
let a2 = s(null), n2 = yl({ name: "SwitchLabel", props: { htmlFor: y(() => {
|
|
1510
1509
|
var e3;
|
|
1511
1510
|
return null == (e3 = a2.value) ? void 0 : e3.id;
|
|
1512
1511
|
}), onClick(e3) {
|
|
1513
1512
|
a2.value && ("LABEL" === e3.currentTarget.tagName && e3.preventDefault(), a2.value.click(), a2.value.focus({ preventScroll: true }));
|
|
1514
|
-
} } }), r2 =
|
|
1515
|
-
return g(
|
|
1516
|
-
} }),
|
|
1517
|
-
let r2 = p(
|
|
1513
|
+
} } }), r2 = Ft({ name: "SwitchDescription" });
|
|
1514
|
+
return g(hl, { switchRef: a2, labelledby: n2, describedby: r2 }), () => se({ theirProps: e2, ourProps: {}, slot: {}, slots: t2, attrs: l2, name: "SwitchGroup" });
|
|
1515
|
+
} }), wl = b({ name: "Switch", emits: { "update:modelValue": (e2) => true }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: void 0 }, defaultChecked: { type: Boolean, optional: true }, form: { type: String, optional: true }, name: { type: String, optional: true }, value: { type: String, optional: true }, id: { type: String, default: () => `headlessui-switch-${me()}` } }, inheritAttrs: false, setup(e2, { emit: t2, attrs: l2, slots: a2, expose: n2 }) {
|
|
1516
|
+
let r2 = p(hl, null), [o2, i2] = Qe(y(() => e2.modelValue), (e3) => t2("update:modelValue", e3), y(() => e2.defaultChecked));
|
|
1518
1517
|
function u2() {
|
|
1519
1518
|
i2(!o2.value);
|
|
1520
1519
|
}
|
|
1521
|
-
let g2 = s(null), m2 = null === r2 ? g2 : r2.switchRef, v2 =
|
|
1520
|
+
let g2 = s(null), m2 = null === r2 ? g2 : r2.switchRef, v2 = Oe(y(() => ({ as: e2.as, type: l2.type })), m2);
|
|
1522
1521
|
function b2(e3) {
|
|
1523
1522
|
e3.preventDefault(), u2();
|
|
1524
1523
|
}
|
|
1525
1524
|
function h2(e3) {
|
|
1526
|
-
e3.key ===
|
|
1525
|
+
e3.key === ve.Space ? (e3.preventDefault(), u2()) : e3.key === ve.Enter && function(e4) {
|
|
1527
1526
|
var t3;
|
|
1528
1527
|
let l3 = null != (t3 = null == e4 ? void 0 : e4.form) ? t3 : e4.closest("form");
|
|
1529
1528
|
if (l3) {
|
|
@@ -1539,7 +1538,7 @@ let hl = b({ name: "Label", props: { as: { type: [Object, String], default: "lab
|
|
|
1539
1538
|
n2({ el: m2, $el: m2 });
|
|
1540
1539
|
let k2 = y(() => {
|
|
1541
1540
|
var e3, t3;
|
|
1542
|
-
return null == (t3 = null == (e3 =
|
|
1541
|
+
return null == (t3 = null == (e3 = he(m2)) ? void 0 : e3.closest) ? void 0 : t3.call(e3, "form");
|
|
1543
1542
|
});
|
|
1544
1543
|
return f(() => {
|
|
1545
1544
|
x([k2], () => {
|
|
@@ -1554,18 +1553,18 @@ let hl = b({ name: "Label", props: { as: { type: [Object, String], default: "lab
|
|
|
1554
1553
|
}, { immediate: true });
|
|
1555
1554
|
}), () => {
|
|
1556
1555
|
let { id: t3, name: n3, value: i3, form: s2, ...u3 } = e2, p2 = { checked: o2.value }, g3 = { id: t3, ref: m2, role: "switch", type: v2.value, tabIndex: 0, "aria-checked": o2.value, "aria-labelledby": null == r2 ? void 0 : r2.labelledby.value, "aria-describedby": null == r2 ? void 0 : r2.describedby.value, onClick: b2, onKeyup: h2, onKeypress: w2 };
|
|
1557
|
-
return d(c, [null != n3 && null != o2.value ? d(
|
|
1556
|
+
return d(c, [null != n3 && null != o2.value ? d(Ke, pe({ features: We.Hidden, as: "input", type: "checkbox", hidden: true, readOnly: true, checked: o2.value, form: s2, name: n3, value: i3 })) : null, se({ ourProps: g3, theirProps: { ...l2, ...ge(u3, ["modelValue", "defaultChecked"]) }, slot: p2, attrs: l2, slots: a2, name: "Switch" })]);
|
|
1558
1557
|
};
|
|
1559
|
-
} }),
|
|
1560
|
-
function
|
|
1558
|
+
} }), kl = bl;
|
|
1559
|
+
function Sl(e2, ...t2) {
|
|
1561
1560
|
e2 && t2.length > 0 && e2.classList.add(...t2);
|
|
1562
1561
|
}
|
|
1563
|
-
function
|
|
1562
|
+
function Cl(e2, ...t2) {
|
|
1564
1563
|
e2 && t2.length > 0 && e2.classList.remove(...t2);
|
|
1565
1564
|
}
|
|
1566
|
-
var
|
|
1567
|
-
function
|
|
1568
|
-
let o2 =
|
|
1565
|
+
var Ol = ((e2) => (e2.Finished = "finished", e2.Cancelled = "cancelled", e2))(Ol || {});
|
|
1566
|
+
function Dl(e2, t2, l2, a2, n2, r2) {
|
|
1567
|
+
let o2 = at(), i2 = void 0 !== r2 ? function(e3) {
|
|
1569
1568
|
let t3 = { called: false };
|
|
1570
1569
|
return (...l3) => {
|
|
1571
1570
|
if (!t3.called)
|
|
@@ -1573,9 +1572,9 @@ function Ml(e2, t2, l2, a2, n2, r2) {
|
|
|
1573
1572
|
};
|
|
1574
1573
|
}(r2) : () => {
|
|
1575
1574
|
};
|
|
1576
|
-
return
|
|
1577
|
-
|
|
1578
|
-
let l3 =
|
|
1575
|
+
return Cl(e2, ...n2), Sl(e2, ...t2, ...l2), o2.nextFrame(() => {
|
|
1576
|
+
Cl(e2, ...l2), Sl(e2, ...a2), o2.add(function(e3, t3) {
|
|
1577
|
+
let l3 = at();
|
|
1579
1578
|
if (!e3)
|
|
1580
1579
|
return l3.dispose;
|
|
1581
1580
|
let { transitionDuration: a3, transitionDelay: n3 } = getComputedStyle(e3), [r3, o3] = [a3, n3].map((e4) => {
|
|
@@ -1583,53 +1582,53 @@ function Ml(e2, t2, l2, a2, n2, r2) {
|
|
|
1583
1582
|
return t4;
|
|
1584
1583
|
});
|
|
1585
1584
|
return 0 !== r3 ? l3.setTimeout(() => t3("finished"), r3 + o3) : t3("finished"), l3.add(() => t3("cancelled")), l3.dispose;
|
|
1586
|
-
}(e2, (l3) => (
|
|
1587
|
-
}), o2.add(() =>
|
|
1585
|
+
}(e2, (l3) => (Cl(e2, ...a2, ...t2), Sl(e2, ...n2), i2(l3))));
|
|
1586
|
+
}), o2.add(() => Cl(e2, ...t2, ...l2, ...a2, ...n2)), o2.add(() => i2("cancelled")), o2.dispose;
|
|
1588
1587
|
}
|
|
1589
|
-
function
|
|
1588
|
+
function Ml(e2 = "") {
|
|
1590
1589
|
return e2.split(" ").filter((e3) => e3.trim().length > 1);
|
|
1591
1590
|
}
|
|
1592
|
-
let
|
|
1593
|
-
var
|
|
1591
|
+
let _l = Symbol("TransitionContext");
|
|
1592
|
+
var Pl = ((e2) => (e2.Visible = "visible", e2.Hidden = "hidden", e2))(Pl || {});
|
|
1594
1593
|
let Tl = Symbol("NestingContext");
|
|
1595
|
-
function
|
|
1596
|
-
return "children" in e2 ?
|
|
1594
|
+
function jl(e2) {
|
|
1595
|
+
return "children" in e2 ? jl(e2.children) : e2.value.filter(({ state: e3 }) => "visible" === e3).length > 0;
|
|
1597
1596
|
}
|
|
1598
|
-
function
|
|
1597
|
+
function El(e2) {
|
|
1599
1598
|
let t2 = s([]), l2 = s(false);
|
|
1600
|
-
function a2(a3, n2 =
|
|
1599
|
+
function a2(a3, n2 = ie.Hidden) {
|
|
1601
1600
|
let r2 = t2.value.findIndex(({ id: e3 }) => e3 === a3);
|
|
1602
|
-
-1 !== r2 && (
|
|
1601
|
+
-1 !== r2 && (re(n2, { [ie.Unmount]() {
|
|
1603
1602
|
t2.value.splice(r2, 1);
|
|
1604
|
-
}, [
|
|
1603
|
+
}, [ie.Hidden]() {
|
|
1605
1604
|
t2.value[r2].state = "hidden";
|
|
1606
|
-
} }), !
|
|
1605
|
+
} }), !jl(t2) && l2.value && (null == e2 || e2()));
|
|
1607
1606
|
}
|
|
1608
1607
|
return f(() => l2.value = true), w(() => l2.value = false), { children: t2, register: function(e3) {
|
|
1609
1608
|
let l3 = t2.value.find(({ id: t3 }) => t3 === e3);
|
|
1610
|
-
return l3 ? "visible" !== l3.state && (l3.state = "visible") : t2.value.push({ id: e3, state: "visible" }), () => a2(e3,
|
|
1609
|
+
return l3 ? "visible" !== l3.state && (l3.state = "visible") : t2.value.push({ id: e3, state: "visible" }), () => a2(e3, ie.Unmount);
|
|
1611
1610
|
}, unregister: a2 };
|
|
1612
1611
|
}
|
|
1613
|
-
let
|
|
1612
|
+
let Ll = oe.RenderStrategy, Bl = b({ props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: true }, appear: { type: [Boolean], default: false }, 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: () => true, afterEnter: () => true, beforeLeave: () => true, afterLeave: () => true }, setup(e2, { emit: t2, attrs: l2, slots: n2, expose: r2 }) {
|
|
1614
1613
|
let o2 = s(0);
|
|
1615
1614
|
function i2() {
|
|
1616
|
-
o2.value |=
|
|
1615
|
+
o2.value |= we.Opening, t2("beforeEnter");
|
|
1617
1616
|
}
|
|
1618
1617
|
function u2() {
|
|
1619
|
-
o2.value &= ~
|
|
1618
|
+
o2.value &= ~we.Opening, t2("afterEnter");
|
|
1620
1619
|
}
|
|
1621
1620
|
function c2() {
|
|
1622
|
-
o2.value |=
|
|
1621
|
+
o2.value |= we.Closing, t2("beforeLeave");
|
|
1623
1622
|
}
|
|
1624
1623
|
function v2() {
|
|
1625
|
-
o2.value &= ~
|
|
1624
|
+
o2.value &= ~we.Closing, t2("afterLeave");
|
|
1626
1625
|
}
|
|
1627
|
-
if (null === p(
|
|
1628
|
-
return () => d(
|
|
1629
|
-
let b2 = s(null), h2 = y(() => e2.unmount ?
|
|
1626
|
+
if (null === p(_l, null) && null !== ke())
|
|
1627
|
+
return () => d(Rl, { ...e2, onBeforeEnter: i2, onAfterEnter: u2, onBeforeLeave: c2, onAfterLeave: v2 }, n2);
|
|
1628
|
+
let b2 = s(null), h2 = y(() => e2.unmount ? ie.Unmount : ie.Hidden);
|
|
1630
1629
|
r2({ el: b2, $el: b2 });
|
|
1631
1630
|
let { show: k2, appear: S2 } = function() {
|
|
1632
|
-
let e3 = p(
|
|
1631
|
+
let e3 = p(_l, null);
|
|
1633
1632
|
if (null === e3)
|
|
1634
1633
|
throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
1635
1634
|
return e3;
|
|
@@ -1638,24 +1637,24 @@ let Bl = ie.RenderStrategy, Il = b({ props: { as: { type: [Object, String], defa
|
|
|
1638
1637
|
if (null === e3)
|
|
1639
1638
|
throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
1640
1639
|
return e3;
|
|
1641
|
-
}(), D2 = s(k2.value ? "visible" : "hidden"), M2 = { value: true }, _2 =
|
|
1640
|
+
}(), D2 = s(k2.value ? "visible" : "hidden"), M2 = { value: true }, _2 = me(), P2 = { value: false }, T2 = El(() => {
|
|
1642
1641
|
!P2.value && "hidden" !== D2.value && (D2.value = "hidden", O2(_2), v2());
|
|
1643
1642
|
});
|
|
1644
1643
|
f(() => {
|
|
1645
1644
|
let e3 = C2(_2);
|
|
1646
1645
|
w(e3);
|
|
1647
1646
|
}), m(() => {
|
|
1648
|
-
if (h2.value ===
|
|
1647
|
+
if (h2.value === ie.Hidden && _2) {
|
|
1649
1648
|
if (k2.value && "visible" !== D2.value)
|
|
1650
1649
|
return void (D2.value = "visible");
|
|
1651
|
-
|
|
1650
|
+
re(D2.value, { hidden: () => O2(_2), visible: () => C2(_2) });
|
|
1652
1651
|
}
|
|
1653
1652
|
});
|
|
1654
|
-
let
|
|
1653
|
+
let j2 = Ml(e2.enter), E2 = Ml(e2.enterFrom), L2 = Ml(e2.enterTo), B2 = Ml(e2.entered), I2 = Ml(e2.leave), R2 = Ml(e2.leaveFrom), A2 = Ml(e2.leaveTo);
|
|
1655
1654
|
return f(() => {
|
|
1656
1655
|
m(() => {
|
|
1657
1656
|
if ("visible" === D2.value) {
|
|
1658
|
-
let e3 =
|
|
1657
|
+
let e3 = he(b2);
|
|
1659
1658
|
if (e3 instanceof Comment && "" === e3.data)
|
|
1660
1659
|
throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
1661
1660
|
}
|
|
@@ -1663,99 +1662,99 @@ let Bl = ie.RenderStrategy, Il = b({ props: { as: { type: [Object, String], defa
|
|
|
1663
1662
|
}), f(() => {
|
|
1664
1663
|
x([k2], (e3, t3, l3) => {
|
|
1665
1664
|
(function(e4) {
|
|
1666
|
-
let t4 = M2.value && !S2.value, l4 =
|
|
1667
|
-
!l4 || !(l4 instanceof HTMLElement) || t4 || (P2.value = true, k2.value && i2(), k2.value || c2(), e4(k2.value ?
|
|
1668
|
-
P2.value = false, e5 ===
|
|
1669
|
-
}) :
|
|
1670
|
-
P2.value = false, e5 ===
|
|
1665
|
+
let t4 = M2.value && !S2.value, l4 = he(b2);
|
|
1666
|
+
!l4 || !(l4 instanceof HTMLElement) || t4 || (P2.value = true, k2.value && i2(), k2.value || c2(), e4(k2.value ? Dl(l4, j2, E2, L2, B2, (e5) => {
|
|
1667
|
+
P2.value = false, e5 === Ol.Finished && u2();
|
|
1668
|
+
}) : Dl(l4, I2, R2, A2, B2, (e5) => {
|
|
1669
|
+
P2.value = false, e5 === Ol.Finished && (jl(T2) || (D2.value = "hidden", O2(_2), v2()));
|
|
1671
1670
|
})));
|
|
1672
1671
|
})(l3), M2.value = false;
|
|
1673
1672
|
}, { immediate: true });
|
|
1674
|
-
}), g(Tl,
|
|
1673
|
+
}), g(Tl, T2), Se(y(() => re(D2.value, { visible: we.Open, hidden: we.Closed }) | o2.value)), () => {
|
|
1675
1674
|
let { appear: t3, show: r3, enter: o3, enterFrom: i3, enterTo: s2, entered: u3, leave: d2, leaveFrom: c3, leaveTo: p2, ...g2 } = e2, f2 = { ref: b2 };
|
|
1676
|
-
return
|
|
1675
|
+
return se({ theirProps: { ...g2, ...S2.value && k2.value && _e.isServer ? { class: a([l2.class, g2.class, ...j2, ...E2]) } : {} }, ourProps: f2, slot: {}, slots: n2, attrs: l2, features: Ll, visible: "visible" === D2.value, name: "TransitionChild" });
|
|
1677
1676
|
};
|
|
1678
|
-
} }),
|
|
1679
|
-
let n2 =
|
|
1677
|
+
} }), Il = Bl, Rl = b({ inheritAttrs: false, props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: true }, appear: { type: [Boolean], default: false }, 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: () => true, afterEnter: () => true, beforeLeave: () => true, afterLeave: () => true }, setup(e2, { emit: t2, attrs: l2, slots: a2 }) {
|
|
1678
|
+
let n2 = ke(), r2 = y(() => null === e2.show && null !== n2 ? (n2.value & we.Open) === we.Open : e2.show);
|
|
1680
1679
|
m(() => {
|
|
1681
1680
|
if (![true, false].includes(r2.value))
|
|
1682
1681
|
throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.');
|
|
1683
1682
|
});
|
|
1684
|
-
let o2 = s(r2.value ? "visible" : "hidden"), i2 =
|
|
1683
|
+
let o2 = s(r2.value ? "visible" : "hidden"), i2 = El(() => {
|
|
1685
1684
|
o2.value = "hidden";
|
|
1686
1685
|
}), u2 = s(true), c2 = { show: r2, appear: y(() => e2.appear || !u2.value) };
|
|
1687
1686
|
return f(() => {
|
|
1688
1687
|
m(() => {
|
|
1689
|
-
u2.value = false, r2.value ? o2.value = "visible" :
|
|
1688
|
+
u2.value = false, r2.value ? o2.value = "visible" : jl(i2) || (o2.value = "hidden");
|
|
1690
1689
|
});
|
|
1691
|
-
}), g(Tl, i2), g(
|
|
1692
|
-
let n3 =
|
|
1693
|
-
return
|
|
1690
|
+
}), g(Tl, i2), g(_l, c2), () => {
|
|
1691
|
+
let n3 = ge(e2, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), r3 = { unmount: e2.unmount };
|
|
1692
|
+
return se({ ourProps: { ...r3, as: "template" }, theirProps: {}, slot: {}, slots: { ...a2, default: () => [d(Il, { onBeforeEnter: () => t2("beforeEnter"), onAfterEnter: () => t2("afterEnter"), onBeforeLeave: () => t2("beforeLeave"), onAfterLeave: () => t2("afterLeave"), ...l2, ...r3, ...n3 }, a2.default)] }, attrs: {}, features: Ll, visible: "visible" === o2.value, name: "Transition" });
|
|
1694
1693
|
};
|
|
1695
1694
|
} });
|
|
1696
|
-
function
|
|
1695
|
+
function Al(t2, l2) {
|
|
1697
1696
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M19.5 13.5L12 21m0 0l-7.5-7.5M12 21V3" })]);
|
|
1698
1697
|
}
|
|
1699
|
-
function
|
|
1698
|
+
function Fl(t2, l2) {
|
|
1700
1699
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M4.5 10.5L12 3m0 0l7.5 7.5M12 3v18" })]);
|
|
1701
1700
|
}
|
|
1702
|
-
function
|
|
1701
|
+
function Nl(t2, l2) {
|
|
1703
1702
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" })]);
|
|
1704
1703
|
}
|
|
1705
|
-
function
|
|
1704
|
+
function $l(t2, l2) {
|
|
1706
1705
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M4.5 12.75l6 6 9-13.5" })]);
|
|
1707
1706
|
}
|
|
1708
|
-
function
|
|
1707
|
+
function Hl(t2, l2) {
|
|
1709
1708
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" })]);
|
|
1710
1709
|
}
|
|
1711
1710
|
function Yl(t2, l2) {
|
|
1712
1711
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15.75 19.5L8.25 12l7.5-7.5" })]);
|
|
1713
1712
|
}
|
|
1714
|
-
function
|
|
1713
|
+
function Vl(t2, l2) {
|
|
1715
1714
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" })]);
|
|
1716
1715
|
}
|
|
1717
|
-
function
|
|
1716
|
+
function zl(t2, l2) {
|
|
1718
1717
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" })]);
|
|
1719
1718
|
}
|
|
1720
|
-
function
|
|
1719
|
+
function ql(t2, l2) {
|
|
1721
1720
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" })]);
|
|
1722
1721
|
}
|
|
1723
|
-
function
|
|
1722
|
+
function Ul(t2, l2) {
|
|
1724
1723
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" })]);
|
|
1725
1724
|
}
|
|
1726
|
-
function
|
|
1725
|
+
function Wl(t2, l2) {
|
|
1727
1726
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M10.05 4.575a1.575 1.575 0 10-3.15 0v3m3.15-3v-1.5a1.575 1.575 0 013.15 0v1.5m-3.15 0l.075 5.925m3.075.75V4.575m0 0a1.575 1.575 0 013.15 0V15M6.9 7.575a1.575 1.575 0 10-3.15 0v8.175a6.75 6.75 0 006.75 6.75h2.018a5.25 5.25 0 003.712-1.538l1.732-1.732a5.25 5.25 0 001.538-3.712l.003-2.024a.668.668 0 01.198-.471 1.575 1.575 0 10-2.228-2.228 3.818 3.818 0 00-1.12 2.687M6.9 7.575V12m6.27 4.318A4.49 4.49 0 0116.35 15m.002 0h-.002" })]);
|
|
1728
1727
|
}
|
|
1729
|
-
function
|
|
1728
|
+
function Kl(t2, l2) {
|
|
1730
1729
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" })]);
|
|
1731
1730
|
}
|
|
1732
|
-
function
|
|
1731
|
+
function Jl(t2, l2) {
|
|
1733
1732
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" })]);
|
|
1734
1733
|
}
|
|
1735
|
-
function
|
|
1734
|
+
function Gl(t2, l2) {
|
|
1736
1735
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z" })]);
|
|
1737
1736
|
}
|
|
1738
|
-
function
|
|
1737
|
+
function Xl(t2, l2) {
|
|
1739
1738
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z" })]);
|
|
1740
1739
|
}
|
|
1741
1740
|
function Ql(t2, l2) {
|
|
1742
1741
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6 18L18 6M6 6l12 12" })]);
|
|
1743
1742
|
}
|
|
1744
|
-
const
|
|
1743
|
+
const Zl = { class: "py-1" }, ea = ["onClick"], ta = { key: 1, class: "animate-pulse px-4 py-2 bg-gray-200 rounded-md flex inline-flex items-center relative inline-block text-left" }, la = i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-28" }, null, -1), aa = { name: "uiDropdown" }, na = Object.assign(aa, { props: { items: { type: Array, required: true }, position: { type: String, default: "left" }, disabled: Boolean, label: String, loading: { type: Boolean, default: true } }, emits: ["optionSelected"], setup(l2, { emit: o2 }) {
|
|
1745
1744
|
const s2 = l2, u2 = y(() => {
|
|
1746
1745
|
let e2 = s2.items.find((e3) => true === e3.active);
|
|
1747
1746
|
return e2 ? e2.name : s2.label;
|
|
1748
1747
|
});
|
|
1749
|
-
return (d2, p2) => l2.loading ? (e(), n("div",
|
|
1748
|
+
return (d2, p2) => l2.loading ? (e(), n("div", ta, [la, r(C(Hl), { "aria-hidden": "true", class: "-mr-1 ml-2 h-5 w-5 text-gray-200 dark:text-gray-300" })])) : (e(), t(C(cl), { key: 0, as: "div", class: a(["relative inline-block text-left", { "opacity-25": l2.disabled }]) }, { default: D(() => [i("div", null, [r(C(pl), { class: "inline-flex justify-between w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-indigo-500" }, { default: D(() => [M(_(u2.value) + " ", 1), r(C(Hl), { "aria-hidden": "true", class: "-mr-1 ml-2 h-5 w-5" })]), _: 1 })]), r(P, { "enter-active-class": "transition ease-out duration-100", "enter-from-class": "transform opacity-0 scale-95", "enter-to-class": "transform opacity-100 scale-100", "leave-active-class": "transition ease-in duration-75", "leave-from-class": "transform opacity-100 scale-100", "leave-to-class": "transform opacity-0 scale-95" }, { default: D(() => [l2.disabled ? j("", true) : (e(), t(C(gl), { key: 0, class: a([{ "right-0": "right" === l2.position, "left-0": "left" === l2.position }, "origin-top-right absolute mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none z-10"]) }, { default: D(() => [i("div", Zl, [(e(true), n(c, null, T(l2.items, (l3, n2) => (e(), t(C(fl), { key: n2 }, { default: D(() => [i("a", { onClick: (e2) => ((e3) => {
|
|
1750
1749
|
s2.disabled || o2("optionSelected", e3.value);
|
|
1751
|
-
})(l3), class: a([l3.active ? "bg-gray-100 text-gray-900" : "text-gray-700", "block px-4 py-2 text-sm cursor-pointer"]) }, _(l3.name), 11,
|
|
1752
|
-
} }),
|
|
1750
|
+
})(l3), class: a([l3.active ? "bg-gray-100 text-gray-900" : "text-gray-700", "block px-4 py-2 text-sm cursor-pointer"]) }, _(l3.name), 11, ea)]), _: 2 }, 1024))), 128))])]), _: 1 }, 8, ["class"]))]), _: 1 })]), _: 1 }, 8, ["class"]));
|
|
1751
|
+
} }), ra = { key: 0 }, oa = { class: "flex justify-between" }, ia = { key: 0, class: "block text-sm font-medium text-gray-700" }, sa = { key: 1, class: "text-[10px] text-gray-500 uppercase justify-self-end" }, ua = ["disabled", "name", "placeholder", "type"], da = { key: 2, class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none" }, ca = { key: 1, class: "animate-pulse" }, pa = { key: 0, class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-2/3 md:w-1/4 mb-1.5" }, ga = i("div", { class: "animate-pulse px-4 py-3.5 bg-gray-200 rounded-md flex inline-flex items-center relative inline-block text-left w-full" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-28" })], -1), fa = { name: "uiInput" }, ma = Object.assign(fa, { props: { label: String, type: { type: String, default: "text" }, name: String, placeholder: { type: String, default: "..." }, icon: { type: Function, default: () => {
|
|
1753
1752
|
} }, disabled: Boolean, color: { type: String, default: "gray" }, value: { type: String, default: "" }, error: String, optional: String, addOn: String, rightAddOn: String, loading: { type: Boolean, default: true } }, emits: ["inputChanged", "rightAddOnClicked", "addOnClicked"], setup(t2, { emit: l2 }) {
|
|
1754
1753
|
const o2 = (e2) => {
|
|
1755
1754
|
l2("inputChanged", { value: e2.target.value, name: e2.target.name });
|
|
1756
1755
|
}, u2 = s(t2.value);
|
|
1757
|
-
return (l3, s2) => t2.loading ? (e(), n("div",
|
|
1758
|
-
} }),
|
|
1756
|
+
return (l3, s2) => t2.loading ? (e(), n("div", ca, [void 0 !== t2.label ? (e(), n("div", pa)) : j("", true), ga])) : (e(), n("div", ra, [i("div", oa, [t2.label ? (e(), n("label", ia, _(t2.label), 1)) : j("", true), t2.optional ? (e(), n("span", sa, _(t2.optional), 1)) : j("", true)]), i("div", { class: a([{ "mt-1": t2.label }, "relative flex"]) }, [t2.addOn ? (e(), n("span", { key: 0, onClick: s2[0] || (s2[0] = (e2) => l3.$emit("addOnClicked")), class: "inline-flex items-center px-3 rounded-l-md border border-r-0 border-gray-300 bg-gray-50 text-gray-500 sm:text-sm cursor-pointer" }, _(t2.addOn), 1)) : j("", true), E(i("input", { "onUpdate:modelValue": s2[1] || (s2[1] = (e2) => u2.value = e2), class: a([{ "border-gray-300": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "border-red-400": "danger" === t2.color, "border-yellow-400": "warning" === t2.color, "border-green-400": "success" === t2.color, "bg-gray-100": t2.disabled, "text-black": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "text-red-400": "danger" === t2.color, "text-yellow-400": "warning" === t2.color, "text-green-400": "success" === t2.color, "rounded-md": !t2.addOn || !t2.rightAddOn, "rounded-r-md": t2.addOn, "rounded-l-none": t2.addOn, "rounded-l-md": t2.rightAddOn, "rounded-r-none": t2.rightAddOn }, "shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 placeholder-gray-300"]), disabled: t2.disabled, name: t2.name, placeholder: t2.placeholder, type: t2.type, onInput: o2 }, null, 42, ua), [[L, u2.value]]), t2.rightAddOn ? (e(), n("span", { key: 1, onClick: s2[2] || (s2[2] = (e2) => l3.$emit("rightAddOnClicked")), class: "inline-flex items-center px-3 rounded-r-md border border-l-0 border-gray-300 bg-gray-50 text-gray-500 sm:text-sm cursor-pointer" }, _(t2.rightAddOn), 1)) : j("", true), t2.icon ? (e(), n("div", da, [r(z, { icon: t2.icon, color: t2.color, loading: t2.loading }, null, 8, ["icon", "color", "loading"]), E(r(z, { icon: C($l), color: "green", loading: t2.loading }, null, 8, ["icon", "loading"]), [[B, "success" === t2.color]]), E(r(z, { icon: C(Ul), color: "yellow", loading: t2.loading }, null, 8, ["icon", "loading"]), [[B, "warning" === t2.color]]), E(r(z, { icon: C(Ql), color: "red", loading: t2.loading }, null, 8, ["icon", "loading"]), [[B, "danger" === t2.color]])])) : j("", true)], 2), E(i("p", { class: a([{ "text-gray-400": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "text-red-400": "danger" === t2.color, "text-yellow-400": "warning" === t2.color, "text-green-400": "success" === t2.color }, "mt-2 text-xs flex flex-row items-center"]) }, _(t2.error), 3), [[B, t2.error]])]));
|
|
1757
|
+
} }), va = { key: 0 }, ya = { class: "flex justify-between" }, ba = { key: 0, class: "block text-sm font-medium text-gray-700" }, ha = { key: 1, class: "text-[10px] text-gray-500 uppercase" }, xa = ["onDrop"], wa = { class: "space-y-1 flex flex-col items-center justify-center" }, ka = { class: "flex text-sm text-gray-600 flex flex-col sm:flex-row text-center" }, Sa = { for: "file-upload", class: "relative cursor-pointer rounded-md font-medium text-indigo-600 focus-within:outline-none focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2 hover:text-indigo-500" }, Ca = ["accept"], Oa = { class: "pl-1" }, Da = { class: "text-xs text-gray-500 pb-4" }, Ma = { class: "mt-2 text-xs flex flex-row items-center text-red-300" }, _a = { key: 1, class: "animate-pulse" }, Pa = [i("div", { class: "flex justify-center items-center flex-col rounded-md border-2 border-dashed px-6 pt-5 pb-6 border-gray-200" }, [i("div", { class: "rounded-full h-20 w-20 bg-gray-200 mb-4" }), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full md:w-1/3 mb-3" }), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full md:w-1/4 mb-3" })], -1)], Ta = { name: "uiInputFile" }, ja = Object.assign(Ta, { props: { name: String, label: String, optional: String, placeholder: String, dragAndDrop: String, fileTypesAndSizes: String, error: String, accept: String, icon: { type: Function, default: function(t2, l2) {
|
|
1759
1758
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M7.5 7.5h-.75A2.25 2.25 0 004.5 9.75v7.5a2.25 2.25 0 002.25 2.25h7.5a2.25 2.25 0 002.25-2.25v-7.5a2.25 2.25 0 00-2.25-2.25h-.75m0-3l-3-3m0 0l-3 3m3-3v11.25m6-2.25h.75a2.25 2.25 0 012.25 2.25v7.5a2.25 2.25 0 01-2.25 2.25h-7.5a2.25 2.25 0 01-2.25-2.25v-.75" })]);
|
|
1760
1759
|
} }, loading: { type: Boolean, default: true } }, emits: ["filesUploaded"], setup(t2, { emit: l2 }) {
|
|
1761
1760
|
const o2 = t2, u2 = s(""), d2 = (e2) => {
|
|
@@ -1764,42 +1763,42 @@ const ea = { class: "py-1" }, ta = ["onClick"], la = { key: 1, class: "animate-p
|
|
|
1764
1763
|
}, c2 = (e2) => {
|
|
1765
1764
|
l2("filesUploaded", e2.target.files), o2.filename = e2.target.files[0].name;
|
|
1766
1765
|
};
|
|
1767
|
-
return (l3, o3) => t2.loading ? (e(), n("div",
|
|
1768
|
-
}, ["prevent"])), onDrop: I(d2, ["prevent"]) }, [i("div",
|
|
1769
|
-
} }),
|
|
1766
|
+
return (l3, o3) => t2.loading ? (e(), n("div", _a, Pa)) : (e(), n("div", va, [i("div", ya, [t2.label ? (e(), n("label", ba, _(t2.label), 1)) : j("", true), t2.optional ? (e(), n("span", ha, _(t2.optional), 1)) : j("", true)]), i("div", { class: a([[{ "mt-1": t2.label }, { "border-gray-300 hover:border-gray-400": !t2.error }, { "border-red-300 hover:border-red-400": t2.error }], "dropArea flex justify-center rounded-md border-2 border-dashed px-6 pt-5 pb-6"]), onDragover: o3[0] || (o3[0] = I(() => {
|
|
1767
|
+
}, ["prevent"])), onDrop: I(d2, ["prevent"]) }, [i("div", wa, [r(z, { icon: t2.icon, size: "massive", color: "gray", "aria-hidden": "true", class: "mb-4", loading: t2.loading }, null, 8, ["icon", "loading"]), i("div", ka, [i("label", Sa, [i("span", null, _(t2.placeholder), 1), i("input", { id: "file-upload", name: "file-upload", type: "file", class: "sr-only", accept: t2.accept, onChange: c2 }, null, 40, Ca)]), i("p", Oa, _(t2.dragAndDrop), 1)]), i("p", Da, _(t2.fileTypesAndSizes), 1), E(i("p", { class: "font-bold text-xs uppercase block p-2 bg-gray-200 rounded" }, _(u2.value), 513), [[B, "" !== u2.value]])])], 42, xa), E(i("p", Ma, [r(z, { icon: C(Xl), color: "red", class: "mr-2", loading: t2.loading }, null, 8, ["icon", "loading"]), M(_(t2.error), 1)], 512), [[B, t2.error]])]));
|
|
1768
|
+
} }), Ea = { class: "relative mt-1" }, La = { key: 1, class: "animate-pulse px-4 py-2.5 bg-gray-200 rounded-md flex justify-between items-center w-full" }, Ba = i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, null, -1), Ia = { name: "uiSelect" }, Ra = Object.assign(Ia, { props: { items: { type: Array, required: true }, label: String, select: Object, loading: { type: Boolean, default: true } }, emits: ["selectChanged"], setup(l2, { emit: o2 }) {
|
|
1770
1769
|
const u2 = l2, d2 = s(""), p2 = s(u2.select), g2 = y(() => "" === d2.value ? u2.items : u2.items.filter((e2) => e2.name.toLowerCase().includes(d2.value.toLowerCase()))), f2 = () => {
|
|
1771
1770
|
o2("selectChanged", p2.value);
|
|
1772
1771
|
};
|
|
1773
|
-
return (o3, s2) => l2.loading ? (e(), n("div",
|
|
1774
|
-
} }),
|
|
1772
|
+
return (o3, s2) => l2.loading ? (e(), n("div", La, [Ba, r(C(zl), { "aria-hidden": "true", class: "-mr-1 ml-2 h-5 w-5 text-gray-300 dark:text-gray-400" })])) : (e(), t(C(dt), { key: 0, modelValue: p2.value, "onUpdate:modelValue": [s2[1] || (s2[1] = (e2) => p2.value = e2), s2[3] || (s2[3] = (e2) => f2())], as: "div", onClick: s2[2] || (s2[2] = (e2) => f2()) }, { default: D(() => [r(C(ct), { class: "block text-sm font-medium text-gray-700" }, { default: D(() => [M(_(l2.label), 1)]), _: 1 }), i("div", Ea, [r(C(gt), { "display-value": (e2) => e2 == null ? void 0 : e2.name, class: "w-full rounded-md border border-gray-300 bg-white py-2 pl-3 pr-10 shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500 sm:text-sm", onChange: s2[0] || (s2[0] = (e2) => d2.value = e2.target.value) }, null, 8, ["display-value"]), r(C(pt), { class: "absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none" }, { default: D(() => [r(C(zl), { "aria-hidden": "true", class: "h-5 w-5 text-gray-400" })]), _: 1 }), g2.value.length > 0 ? (e(), t(C(ft), { key: 0, class: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm" }, { default: D(() => [(e(true), n(c, null, T(g2.value, (l3) => (e(), t(C(mt), { key: l3.id, value: l3, as: "template" }, { default: D(({ active: t2, selected: o4 }) => [i("li", { class: a(["relative cursor-default select-none py-2 pl-3 pr-9", t2 ? "bg-indigo-600 text-white" : "text-gray-900"]) }, [i("span", { class: a(["block truncate", o4 && "font-semibold"]) }, _(l3.name), 3), o4 ? (e(), n("span", { key: 0, class: a(["absolute inset-y-0 right-0 flex items-center pr-4", t2 ? "text-white" : "text-indigo-600"]) }, [r(C($l), { "aria-hidden": "true", class: "h-5 w-5", loading: true })], 2)) : j("", true)], 2)]), _: 2 }, 1032, ["value"]))), 128))]), _: 1 })) : j("", true)])]), _: 1 }, 8, ["modelValue"]));
|
|
1773
|
+
} }), Aa = { key: 1, class: "inline-flex items-center px-3 py-2.5 rounded text-xs font-medium leading-none animate-pulse bg-gray-200" }, Fa = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-12" }, null, -1)], Na = { name: "uiTag" }, $a = Object.assign(Na, { props: { color: { type: String, default: "primary" }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, r2) => t2.loading ? (e(), n("div", Aa, Fa)) : (e(), n("span", { key: 0, class: a([{ "bg-indigo-100 text-indigo-800 border border-indigo-200": "primary" === t2.color, "bg-red-100 text-red-800 border border-red-200": "danger" === t2.color, "bg-yellow-100 text-yellow-800 border border-yellow-200": "warning" === t2.color, "bg-green-100 text-green-800 border border-green-200": "success" === t2.color, "bg-black text-white border border-black": "black" === t2.color, "text-black border border-gray-200 bg-white": "white" === t2.color }, "inline-flex items-center px-3 py-2 rounded text-xs font-medium leading-none"]) }, [o(l2.$slots, "default")], 2)) }), Ha = { key: 0 }, Ya = { key: 0, class: "block text-sm font-medium text-gray-700" }, Va = ["disabled", "placeholder"], za = { key: 1, class: "animate-pulse" }, qa = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-2/3 md:w-1/4 mb-1.5" }, null, -1), i("div", { class: "h-24 bg-gray-200 rounded-lg flex inline-flex items-center relative inline-block text-left w-full" }, null, -1)], Ua = { name: "uiTextArea" }, Wa = Object.assign(Ua, { props: { label: String, placeholder: { type: String, default: "..." }, value: String, color: String, disabled: { type: Boolean, default: false }, error: String, loading: { type: Boolean, default: true } }, emits: ["inputChanged"], setup(t2, { emit: l2 }) {
|
|
1775
1774
|
const o2 = (e2) => {
|
|
1776
1775
|
l2("inputChanged", e2.target.value);
|
|
1777
1776
|
}, u2 = s(t2.value);
|
|
1778
|
-
return (l3, s2) => t2.loading ? (e(), n("div",
|
|
1779
|
-
} }),
|
|
1777
|
+
return (l3, s2) => t2.loading ? (e(), n("div", za, qa)) : (e(), n("div", Ha, [t2.label ? (e(), n("label", Ya, _(t2.label), 1)) : j("", true), i("div", { class: a({ "mt-1": t2.label }) }, [E(i("textarea", { disabled: t2.disabled, rows: "4", "onUpdate:modelValue": s2[0] || (s2[0] = (e2) => u2.value = e2), placeholder: t2.placeholder, class: a(["shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm rounded-md", { "border-gray-300": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "border-red-300": "danger" === t2.color, "border-yellow-400": "warning" === t2.color, "border-green-400": "success" === t2.color, "bg-gray-100": t2.disabled, "text-black": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "text-red-300": "danger" === t2.color, "text-yellow-400": "warning" === t2.color, "text-green-400": "success" === t2.color }]), onChange: o2 }, null, 42, Va), [[R, u2.value]])], 2), E(i("p", { class: a([{ "text-gray-300": "danger" !== t2.color || "warning" !== t2.color || "success" !== t2.color, "text-red-300": "danger" === t2.color, "text-yellow-400": "warning" === t2.color, "text-green-400": "success" === t2.color }, "mt-2 text-xs flex flex-row items-center"]) }, [r(z, { icon: C(Xl), color: "red", class: "mr-2" }, null, 8, ["icon"]), M(_(t2.error), 1)], 2), [[B, t2.error]])]));
|
|
1778
|
+
} }), Ka = { class: "text-sm font-medium text-gray-900" }, Ja = { key: 0, class: "text-sm text-gray-500 ml-2" }, Ga = { key: 1, class: "animate-pulse flex items-center" }, Xa = [i("div", { class: "relative bg-gray-200 rounded-full w-12 h-6 p-1 flex items-center" }, [i("div", { class: "rounded-full bg-gray-300 dark:bg-gray-400 h-4 w-4" })], -1), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-16 ml-2" }, null, -1)], Qa = { name: "uiToggle" }, Za = Object.assign(Qa, { props: { item: { type: Object, required: true }, checked: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, loading: { type: Boolean, default: true } }, setup(l2) {
|
|
1780
1779
|
const o2 = s(l2.checked);
|
|
1781
|
-
return (s2, u2) => l2.loading ? (e(), n("div",
|
|
1782
|
-
} }),
|
|
1780
|
+
return (s2, u2) => l2.loading ? (e(), n("div", Ga, Xa)) : (e(), t(C(xl), { key: 0, as: "div", class: "flex items-center relative" }, { default: D(() => [r(C(wl), { disabled: l2.disabled, onClick: u2[0] || (u2[0] = (e2) => s2.$emit("toggleChanged", { item: l2.item, active: !o2.value })), modelValue: o2.value, "onUpdate:modelValue": u2[1] || (u2[1] = (e2) => o2.value = e2), class: a([o2.value ? "bg-indigo-600" : "bg-gray-200", "relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"]) }, { default: D(() => [i("span", { "aria-hidden": "true", class: a([o2.value ? "translate-x-5" : "translate-x-0", l2.disabled ? "bg-gray-300" : "", "pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"]) }, null, 2)]), _: 1 }, 8, ["disabled", "modelValue", "class"]), r(C(kl), { as: "span", class: "ml-3" }, { default: D(() => [i("span", Ka, _(l2.item.title), 1), l2.item.subtitle ? (e(), n("span", Ja, _(l2.item.subtitle), 1)) : j("", true)]), _: 1 }), l2.item.action ? (e(), n("span", { key: 0, class: "cursor-pointer text-indigo-600 hover:text-indigo-400 uppercase text-xs absolute right-0 bottom-0.5", onClick: u2[2] || (u2[2] = (e2) => s2.$emit("actionClicked", l2.item)) }, _(l2.item.action), 1)) : j("", true)]), _: 1 }));
|
|
1781
|
+
} }), en = { key: 0, class: "flex flex-col" }, tn = { class: "flex" }, ln = { class: "flex-shrink-0" }, an = { class: "ml-3" }, nn = { class: "mt-4" }, rn = { class: "-mx-2 -my-1.5 flex" }, on = ["onClick"], sn = { key: 1, class: "flex flex-col animate-pulse" }, un = [A('<div class="p-4 border-l-4 bg-gray-100 border-gray-400 rounded"><div class="flex"><div class="flex-shrink-0"><div class="h-6 w-6 animate-pulse rounded-full bg-gray-200 dark:bg-gray-300"></div></div><div class="ml-3 w-full"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-2/3 mb-2"></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full mb-2"></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-3/5"></div></div></div></div>', 1)], dn = { name: "uiAlert" }, cn = Object.assign(dn, { props: { actions: { type: Array }, title: { type: String }, type: { type: String, default: "info" }, loading: { type: Boolean, default: true } }, setup: (l2) => (r2, s2) => l2.loading ? (e(), n("div", sn, un)) : (e(), n("div", en, [i("div", { class: a([{ "bg-indigo-50 border-indigo-400": "info" === l2.type, "bg-red-50 border-red-400": "danger" === l2.type, "bg-yellow-50 border-yellow-400": "warning" === l2.type, "bg-green-50 border-green-400": "success" === l2.type }, "p-4 border-l-4 rounded"]) }, [i("div", tn, [i("div", ln, ["info" === l2.type ? (e(), t(C(Jl), { key: 0, class: "h-8 w-8 text-indigo-400", "aria-hidden": "true" })) : j("", true), "danger" === l2.type ? (e(), t(C(Xl), { key: 1, class: "h-8 w-8 text-red-400", "aria-hidden": "true" })) : j("", true), "warning" === l2.type ? (e(), t(C(Ul), { key: 2, class: "h-8 w-8 text-yellow-400", "aria-hidden": "true" })) : j("", true), "success" === l2.type ? (e(), t(C(Nl), { key: 3, class: "h-8 w-8 text-green-400", "aria-hidden": "true" })) : j("", true)]), i("div", an, [i("h3", { class: a([{ "text-red-800": "danger" === l2.type, "text-yellow-800": "warning" === l2.type, "text-green-800": "success" === l2.type }, "text-sm font-medium"]) }, _(l2.title), 3), i("div", { class: a([{ "text-red-700": "danger" === l2.type, "text-yellow-700": "warning" === l2.type, "text-green-700": "success" === l2.type }, "mt-2 text-sm"]) }, [o(r2.$slots, "default")], 2), i("div", nn, [i("div", rn, [(e(true), n(c, null, T(l2.actions, (t2, o2) => (e(), n("button", { onClick: (e2) => r2.$emit("alertEvent", t2.event), type: "button", key: o2, class: a([{ "bg-green-50 text-green-800 hover:bg-green-100 focus:ring-green-600 focus:ring-offset-green-50": "success" === l2.type, "bg-indigo-50 text-indigo-800 hover:bg-indigo-100 focus:ring-indigo-600 focus:ring-offset-indigo-50": "info" === l2.type, "bg-red-50 text-red-800 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50": "danger" === l2.type, "bg-yellow-50 text-yellow-800 hover:bg-yellow-100 focus:ring-yellow-600 focus:ring-offset-yellow-50": "warning" === l2.type }, "px-2 py-1.5 text-sm font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2"]) }, _(t2.name), 11, on))), 128))])])])])], 2)])) }), pn = { key: 0, class: "inline-flex", "aria-label": "Breadcrumb" }, gn = { role: "list", class: "flex items-center space-x-4 text-xs" }, fn = { key: 0 }, mn = ["onClick"], vn = { key: 1, class: "flex items-center" }, yn = ["onClick", "aria-current"], bn = { key: 1, class: "flex flex-row items-center animate-pulse" }, hn = [i("div", { class: "animate-pulse rounded-full bg-gray-200 dark:bg-gray-300 h-4 w-4 mr-4" }, null, -1), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/5 mr-4" }, null, -1), i("div", { class: "animate-pulse rounded-full bg-gray-200 dark:bg-gray-300 h-4 w-4 mr-4" }, null, -1), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/5" }, null, -1)], xn = { name: "uiBreadcrumbs" }, wn = Object.assign(xn, { props: { pages: { type: Array, required: true }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, o2) => t2.loading ? (e(), n("div", bn, hn)) : (e(), n("nav", pn, [i("ol", gn, [(e(true), n(c, null, T(t2.pages, (t3, o3) => (e(), n("li", { key: o3 }, [0 === o3 ? (e(), n("div", fn, [i("p", { onClick: (e2) => l2.$emit("breadCrumbClicked", t3.routeName), class: "flex flex-row items-center justify-center text-indigo-600 hover:text-indigo-800 cursor-pointer" }, [r(C(Kl), { class: "flex-shrink-0 h-3 w-3 text-gray-400 mr-4", "aria-hidden": "true" }), i("span", null, _(t3.name), 1)], 8, mn)])) : (e(), n("div", vn, [r(C(Vl), { class: "flex-shrink-0 h-3 w-3 text-gray-400", "aria-hidden": "true" }), i("span", { onClick: (e2) => l2.$emit("breadCrumbClicked", t3.routeName), class: a(["cursor-pointer ml-4 text-xs text-gray-400 hover:text-gray-500", { "text-indigo-600 hover:text-indigo-800": !t3.current }]), "aria-current": t3.current ? "page" : "" }, _(t3.name), 11, yn)]))]))), 128))])])) }), kn = { class: "flex items-center flex-col sm:flex-row justify-center sm:justify-start" }, Sn = ["src"], Cn = { class: "font-bold text-center sm:text-left" }, On = { class: "mt-1 text-xs text-center sm:text-left" }, Dn = { key: 0, class: "flex flex-wrap mt-4 justify-center sm:justify-start" }, Mn = { key: 1, class: "rounded-lg bg-white shadow p-6 cursor-pointer animate-pulse" }, _n = [A('<div class="flex items-center flex-col sm:flex-row justify-center sm:justify-start w-full"><div class="w-16 h-16 rounded-full bg-gray-200 flex self-center"></div><div class="w-full ml-4"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full mt-4 sm:mt-0 sm:w-16 mb-2"></div><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full sm:w-32"></div></div></div>', 1)], Pn = { name: "uiCard" }, Tn = Object.assign(Pn, { props: { id: { type: String, required: true }, name: { type: String, required: true }, type: String, tags: Array, logo: String, loading: { type: Boolean, default: true } }, setup: (l2) => (a2, r2) => {
|
|
1783
1782
|
var _a2;
|
|
1784
|
-
return l2.loading ? (e(), n("div",
|
|
1785
|
-
} }),
|
|
1783
|
+
return l2.loading ? (e(), n("div", Mn, _n)) : (e(), n("div", { key: 0, class: "rounded-lg bg-white shadow p-6 cursor-pointer", onClick: r2[0] || (r2[0] = (e2) => a2.$emit("cardSelected", { id: l2.id, name: l2.name, type: l2.type, tags: l2.tags })) }, [i("div", kn, [i("img", { class: "w-16 h-16 rounded-full mb-4 sm:mb-0 sm:mr-4", src: l2.logo }, null, 8, Sn), i("div", null, [i("h4", Cn, _(l2.name), 1), i("p", On, _(l2.type), 1)])]), ((_a2 = l2.tags) == null ? void 0 : _a2.length) > 0 ? (e(), n("div", Dn, [(e(true), n(c, null, T(l2.tags, (a3) => (e(), t($a, { class: "mb-1 mr-1", key: a3.name, color: a3.color, loading: l2.loading }, { default: D(() => [M(_(a3.name), 1)]), _: 2 }, 1032, ["color", "loading"]))), 128))])) : j("", true)]));
|
|
1784
|
+
} }), jn = { name: "uiFilter" }, En = Object.assign(jn, { props: { position: { type: String, default: "left" }, items: { type: Array, required: true }, label: { type: String, required: true }, loading: { type: Boolean, default: true } }, emits: ["filterSelected"], setup(l2, { emit: a2 }) {
|
|
1786
1785
|
const n2 = s(l2.items);
|
|
1787
|
-
return (r2, o2) => (e(), t(
|
|
1786
|
+
return (r2, o2) => (e(), t(na, { loading: l2.loading, onOptionSelected: o2[0] || (o2[0] = (e2) => ((e3) => {
|
|
1788
1787
|
n2.value.forEach((t2) => {
|
|
1789
1788
|
t2.value !== e3 ? t2.active = false : t2.active = true;
|
|
1790
1789
|
}), a2("filterSelected", e3);
|
|
1791
1790
|
})(e2)), position: l2.position, items: n2.value, label: l2.label }, null, 8, ["loading", "position", "items", "label"]));
|
|
1792
|
-
} }),
|
|
1791
|
+
} }), Ln = i("div", { class: "fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" }, null, -1), Bn = { class: "fixed inset-0 z-10 overflow-y-auto" }, In = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, Rn = { class: "absolute top-0 right-0 hidden pt-4 pr-4 sm:block" }, An = i("span", { class: "sr-only" }, "X", -1), Fn = { class: "sm:flex sm:items-start" }, Nn = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left sm:mr-4" }, $n = { class: "mt-4 text-gray-500 text-sm" }, Hn = { key: 0, class: "mt-8" }, Yn = ["onClick"], Vn = { name: "uiModal" }, zn = Object.assign(Vn, { props: { title: String, actions: Object, modalName: String, open: { type: Boolean, default: false }, type: { type: String, default: "default" }, loading: { type: Boolean, default: false } }, emits: ["modalAction"], setup(l2, { emit: s2 }) {
|
|
1793
1792
|
const u2 = l2, d2 = (e2) => {
|
|
1794
1793
|
s2("modalAction", { modal: u2.modalName, action: e2 });
|
|
1795
1794
|
};
|
|
1796
|
-
return (s3, u3) => (e(), t(C(
|
|
1797
|
-
} }),
|
|
1795
|
+
return (s3, u3) => (e(), t(C(Rl), { as: "template", show: l2.open }, { default: D(() => [r(C(Kt), { as: "div", class: "relative z-10", onClose: u3[1] || (u3[1] = (e2) => d2("close")) }, { default: D(() => [r(C(Bl), { as: "template", enter: "ease-out duration-300", "enter-from": "opacity-0", "enter-to": "opacity-100", leave: "ease-in duration-200", "leave-from": "opacity-100", "leave-to": "opacity-0" }, { default: D(() => [Ln]), _: 1 }), i("div", Bn, [i("div", In, [r(C(Bl), { as: "template", enter: "ease-out duration-300", "enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95", "enter-to": "opacity-100 translate-y-0 sm:scale-100", leave: "ease-in duration-200", "leave-from": "opacity-100 translate-y-0 sm:scale-100", "leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" }, { default: D(() => [r(C(Jt), { class: "relative transform rounded-lg bg-white px-4 pb-4 pt-5 text-left shadow-xl transition-all sm:my-8 w-9/12 sm:w-full sm:max-w-lg sm:p-6" }, { default: D(() => [i("div", Rn, [i("button", { type: "button", class: "rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none", onClick: u3[0] || (u3[0] = (e2) => d2("close")) }, [An, r(z, { icon: C(Ql), "aria-hidden": "true", loading: l2.loading }, null, 8, ["icon", "loading"])])]), i("div", Fn, [i("div", { class: a(["mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full sm:mx-0 sm:h-10 sm:w-10", { "bg-red-100": "danger" === l2.type, "bg-green-100": "success" === l2.type, "bg-indigo-100": "default" === l2.type, "bg-yellow-100": "warning" === l2.type }]) }, [E(r(C(Ql), { class: "h-6 w-6 text-red-600", "aria-hidden": "true" }, null, 512), [[B, "danger" === l2.type]]), E(r(C($l), { class: "h-6 w-6 text-green-600", "aria-hidden": "true" }, null, 512), [[B, "success" === l2.type]]), E(r(C(Ul), { class: "h-6 w-6 text-yellow-600", "aria-hidden": "true" }, null, 512), [[B, "warning" === l2.type]]), E(r(C(Wl), { class: "h-6 w-6 text-indigo-600", "aria-hidden": "true" }, null, 512), [[B, "default" === l2.type]])], 2), i("div", Nn, [r(C(Gt), { as: "h3", class: "text-lg font-medium leading-6 text-gray-900" }, { default: D(() => [M(_(l2.title), 1)]), _: 1 }), i("div", $n, [o(s3.$slots, "default")]), l2.actions ? (e(), n("div", Hn, [(e(true), n(c, null, T(l2.actions, (t2, l3) => (e(), n("button", { key: l3, type: "button", class: "inline-flex w-full justify-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 mb-2 sm:mb-0 mr-2 sm:w-auto sm:text-sm", onClick: (e2) => d2(t2.value) }, _(t2.name), 9, Yn))), 128))])) : j("", true)])])]), _: 3 })]), _: 3 })])])]), _: 3 })]), _: 3 }, 8, ["show"]));
|
|
1796
|
+
} }), qn = { class: "w-full flex flex-col items-center space-y-4 sm:items-end" }, Un = { key: 0, class: "max-w-sm w-full bg-white shadow-lg rounded-lg pointer-events-auto ring-1 ring-black ring-opacity-5 overflow-hidden" }, Wn = { class: "p-4" }, Kn = { class: "flex items-start" }, Jn = { class: "flex-shrink-0 mt-0.5" }, Gn = { class: "ml-3 w-0 flex-1 pt-0.5" }, Xn = { class: "font-medium text-gray-900" }, Qn = { class: "mt-1 text-sm text-gray-500" }, Zn = { class: "ml-4 flex-shrink-0 flex" }, er = i("span", { class: "sr-only" }, "Close", -1), tr = { name: "uiNotification" }, lr = Object.assign(tr, { props: { show: Boolean, type: { type: String, default: "info" }, title: String, message: String, fixed: { type: Boolean, default: true } }, setup(t2) {
|
|
1798
1797
|
const l2 = t2, o2 = y(() => l2.show);
|
|
1799
|
-
return (l3, s2) => (e(), n("div", { "aria-live": "assertive", class: a([{ fixed: t2.fixed }, "inset-0 flex items-end px-4 py-6 pointer-events-none sm:p-6 sm:items-start"]) }, [i("div",
|
|
1800
|
-
} }),
|
|
1798
|
+
return (l3, s2) => (e(), n("div", { "aria-live": "assertive", class: a([{ fixed: t2.fixed }, "inset-0 flex items-end px-4 py-6 pointer-events-none sm:p-6 sm:items-start"]) }, [i("div", qn, [r(P, { "enter-active-class": "transform ease-out duration-300 transition", "enter-from-class": "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2", "enter-to-class": "translate-y-0 opacity-100 sm:translate-x-0", "leave-active-class": "transition ease-in duration-100", "leave-from-class": "opacity-100", "leave-to-class": "opacity-0" }, { default: D(() => [o2.value ? (e(), n("div", Un, [i("div", Wn, [i("div", Kn, [i("div", Jn, [E(r(C(Nl), { "aria-hidden": "true", class: "h-6 w-6 text-green-400" }, null, 512), [[B, "success" === t2.type]]), E(r(C(Xl), { "aria-hidden": "true", class: "h-6 w-6 text-red-400" }, null, 512), [[B, "danger" === t2.type]]), E(r(C(Ul), { "aria-hidden": "true", class: "h-6 w-6 text-yellow-400" }, null, 512), [[B, "warning" === t2.type]]), E(r(C(Jl), { "aria-hidden": "true", class: "h-6 w-6 text-indigo-600" }, null, 512), [[B, "info" === t2.type]])]), i("div", Gn, [i("p", Xn, _(t2.title), 1), i("p", Qn, _(t2.message), 1)]), i("div", Zn, [i("button", { class: "bg-white rounded-md inline-flex text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500", type: "button", onClick: s2[0] || (s2[0] = (e2) => l3.$emit("closeNotification")) }, [er, r(C(Ql), { "aria-hidden": "true", class: "h-5 w-5" })])])])])])) : j("", true)]), _: 1 })])], 2));
|
|
1799
|
+
} }), ar = { key: 0, role: "list", class: "divide-y divide-gray-100" }, nr = { class: "min-w-0" }, rr = { class: "flex items-start gap-x-3" }, or = { class: "text-sm font-semibold leading-6 text-gray-900" }, ir = { class: "mt-1 flex items-center gap-x-2 text-xs leading-5 text-gray-500" }, sr = { class: "truncate" }, ur = { class: "flex flex-none items-center gap-x-4" }, dr = ["href"], cr = { class: "sr-only" }, pr = { key: 1, class: "divide-y divide-gray-100 animate-pulse" }, gr = [A('<div class="min-w-0 w-full"><div class="flex items-start gap-x-3"><p class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2"></p></div></div><div class="flex flex-none items-center gap-x-4"><div class="hidden rounded-md bg-gray-200 px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block"><p class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-10"></p></div></div>', 2)], fr = { name: "uiTaskList" }, mr = Object.assign(fr, { props: { tasks: { type: Array, required: true }, loading: { type: Boolean, default: true } }, setup: (t2) => (l2, r2) => t2.loading ? (e(), n("ul", pr, [(e(true), n(c, null, T(t2.tasks, (t3) => (e(), n("li", { key: t3.id, class: "flex items-center justify-between gap-x-6 py-5" }, gr))), 128))])) : (e(), n("ul", ar, [(e(true), n(c, null, T(t2.tasks, (t3) => (e(), n("li", { key: t3.id, class: "flex items-center justify-between gap-x-6 py-5" }, [i("div", nr, [i("div", rr, [i("p", or, _(t3.name), 1), i("p", { class: a([{ "text-green-700 bg-green-50 ring-green-600/20": "Complete" === t3.status, "text-gray-600 bg-gray-50 ring-gray-500/10": "In progress" === t3.status, "text-yellow-800 bg-yellow-50 ring-yellow-600/20": "Incomplete" === t3.status }, "rounded-md whitespace-nowrap mt-0.5 px-1.5 py-0.5 text-xs font-medium ring-1 ring-inset"]) }, _(t3.statusLiteral), 3)]), i("div", ir, [i("p", sr, _(t3.description), 1)])]), i("div", ur, [i("a", { href: t3.href, class: "hidden rounded-md bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:block" }, [M(_(t3.action), 1), i("span", cr, ", " + _(t3.name), 1)], 8, dr)])]))), 128))])) });
|
|
1801
1800
|
"undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
|
|
1802
|
-
function
|
|
1801
|
+
function vr(e2) {
|
|
1803
1802
|
return e2 && e2.__esModule && Object.prototype.hasOwnProperty.call(e2, "default") ? e2.default : e2;
|
|
1804
1803
|
}
|
|
1805
1804
|
!function(e2) {
|
|
@@ -1835,42 +1834,42 @@ function yr(e2) {
|
|
|
1835
1834
|
} };
|
|
1836
1835
|
l2.default.locale(a2, null, true);
|
|
1837
1836
|
}(H);
|
|
1838
|
-
const
|
|
1837
|
+
const yr = (e2, t2) => {
|
|
1839
1838
|
const l2 = e2.__vccOpts || e2;
|
|
1840
1839
|
for (const [e3, a2] of t2)
|
|
1841
1840
|
l2[e3] = a2;
|
|
1842
1841
|
return l2;
|
|
1843
|
-
},
|
|
1844
|
-
const
|
|
1842
|
+
}, br = { class: "dateSelector flex items-center text-white flex-row" }, hr = { class: "pagination flex items-center my-1 md:my-0" }, xr = { class: "date mx-4 font-bold text-center text-indigo-600 select-none uppercase" }, wr = { class: "pagination flex items-center my-1 sm:my-0" };
|
|
1843
|
+
const kr = yr({ name: "dateSelector", components: { ChevronLeftIcon: Yl, ChevronRightIcon: Vl }, computed: { currentDate() {
|
|
1845
1844
|
return H(this.selectedDate).locale("es").format("DD MMM. YYYY");
|
|
1846
1845
|
} }, props: { selectedDate: { type: Object, required: true } }, methods: { selectDate(e2, t2) {
|
|
1847
1846
|
let l2;
|
|
1848
1847
|
"previous" === t2 && ("day" === e2 && (l2 = H(this.selectedDate).subtract(1, "day")), "month" === e2 && (l2 = H(this.selectedDate).subtract(1, "month")), "year" === e2 && (l2 = H(this.selectedDate).subtract(1, "year"))), "next" === t2 && ("day" === e2 && (l2 = H(this.selectedDate).add(1, "day")), "month" === e2 && (l2 = H(this.selectedDate).add(1, "month")), "year" === e2 && (l2 = H(this.selectedDate).add(1, "year"))), this.$emit("dateSelected", l2);
|
|
1849
1848
|
} } }, [["render", function(t2, l2, a2, o2, s2, u2) {
|
|
1850
1849
|
const d2 = F("ChevronLeftIcon"), c2 = F("ChevronRightIcon");
|
|
1851
|
-
return e(), n("div",
|
|
1852
|
-
}]]),
|
|
1853
|
-
const
|
|
1854
|
-
return e(), n("div",
|
|
1850
|
+
return e(), n("div", br, [i("div", hr, [i("div", { class: "previousYear flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[0] || (l2[0] = (e2) => u2.selectDate("year", "previous")) }, [r(d2, { class: "h-4" }), r(d2, { class: "h-4 -ml-3" }), r(d2, { class: "h-4 -ml-3" })]), i("div", { class: "previousMonth flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[1] || (l2[1] = (e2) => u2.selectDate("month", "previous")) }, [r(d2, { class: "h-4" }), r(d2, { class: "h-4 -ml-3" })]), i("div", { class: "previousDay flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[2] || (l2[2] = (e2) => u2.selectDate("day", "previous")) }, [r(d2, { class: "h-4" })])]), i("div", xr, _(u2.currentDate), 1), i("div", wr, [i("div", { class: "previousDay flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[3] || (l2[3] = (e2) => u2.selectDate("day", "next")) }, [r(c2, { class: "h-4" })]), i("div", { class: "previousMonth flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[4] || (l2[4] = (e2) => u2.selectDate("month", "next")) }, [r(c2, { class: "h-4" }), r(c2, { class: "h-4 -ml-3" })]), i("div", { class: "previousYear flex items-center cursor-pointer bg-indigo-600 p-1 rounded mx-0.5 hover:bg-indigo-800 shadow-sm", onClick: l2[5] || (l2[5] = (e2) => u2.selectDate("year", "next")) }, [r(c2, { class: "h-4" }), r(c2, { class: "h-4 -ml-3" }), r(c2, { class: "h-4 -ml-3" })])])]);
|
|
1851
|
+
}]]), Sr = { name: "SkeletonTable" }, Cr = { class: "px-4 sm:px-6 lg:px-8 animate-pulse" }, Or = { class: "flow-root" }, Dr = { class: "-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8" }, Mr = { class: "inline-block min-w-full py-2 align-middle px-1" }, _r = { class: "overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg" }, Pr = { class: "min-w-full divide-y divide-gray-300" }, Tr = i("thead", { class: "bg-gray-50" }, [i("tr", null, [i("th", { scope: "col", class: "py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })]), i("th", { scope: "col", class: "px-3 py-3.5 text-left text-sm font-semibold text-gray-900" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })]), i("th", { scope: "col", class: "px-3 py-3.5 text-left text-sm font-semibold text-gray-900" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })]), i("th", { scope: "col", class: "px-3 py-3.5 text-left text-sm font-semibold text-gray-900" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })]), i("th", { scope: "col", class: "relative py-3.5 pl-3 pr-4 sm:pr-6" }, [i("span", { class: "sr-only" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })])])])], -1), jr = { class: "divide-y divide-gray-200 bg-white" }, Er = [i("td", { class: "whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })], -1), i("td", { class: "whitespace-nowrap px-3 py-4 text-sm text-gray-500" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })], -1), i("td", { class: "whitespace-nowrap px-3 py-4 text-sm text-gray-500" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })], -1), i("td", { class: "whitespace-nowrap px-3 py-4 text-sm text-gray-500" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })], -1), i("td", { class: "relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6" }, [i("a", { href: "#", class: "text-indigo-600 hover:text-indigo-900" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" }), i("span", { class: "sr-only" }, [M(", {"), i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-6" })])])], -1)];
|
|
1852
|
+
const Lr = yr(Sr, [["render", function(t2, l2, a2, r2, o2, s2) {
|
|
1853
|
+
return e(), n("div", Cr, [i("div", Or, [i("div", Dr, [i("div", Mr, [i("div", _r, [i("table", Pr, [Tr, i("tbody", jr, [(e(), n(c, null, T(10, (e2) => i("tr", { key: e2 }, Er)), 64))])])])])])])]);
|
|
1855
1854
|
}]]);
|
|
1856
|
-
var
|
|
1857
|
-
|
|
1855
|
+
var Br = { exports: {} };
|
|
1856
|
+
Br.exports = function(e2, t2, l2) {
|
|
1858
1857
|
t2.prototype.isToday = function() {
|
|
1859
1858
|
var e3 = "YYYY-MM-DD", t3 = l2();
|
|
1860
1859
|
return this.format(e3) === t3.format(e3);
|
|
1861
1860
|
};
|
|
1862
1861
|
};
|
|
1863
|
-
const
|
|
1864
|
-
const
|
|
1862
|
+
const Ir = vr(Br.exports), Rr = { class: "text-xs" }, Ar = { class: "font-bold text-lg" }, Fr = { class: "text-xs font-medium" };
|
|
1863
|
+
const Nr = { name: "dayPrice", props: { currency: String, price: Object, basePrice: Number, isBasePrice: { type: Boolean, default: false } }, computed: { currentDay() {
|
|
1865
1864
|
return { isWeekend: 6 == H(this.price.date).format("d") || 0 == H(this.price.date).format("d"), price: this.price.price };
|
|
1866
|
-
} } },
|
|
1867
|
-
const
|
|
1868
|
-
return H.extend(
|
|
1865
|
+
} } }, $r = { class: "priceDay" };
|
|
1866
|
+
const Hr = { name: "uiPriceCalendar", data: () => ({ today: /* @__PURE__ */ new Date(), date: /* @__PURE__ */ new Date(), selectedRooms: [], showBasePricesModal: false, showDays: 14 }), props: { category: { type: Object, required: true }, rooms: { type: Array, required: true }, currency: Object, actions: Array, loading: { type: Boolean, default: true } }, components: { DateSelector: kr, Day: yr({ name: "calendarDay", props: { day: Object }, computed: { currentDay() {
|
|
1867
|
+
return H.extend(Ir), { dayName: H(this.day).locale("es").format("ddd"), day: H(this.day).locale("es").format("DD"), month: H(this.day).locale("es").format("MMM."), isWeekend: 6 == H(this.day).format("d") || 0 == H(this.day).format("d"), isToday: H(this.day).isToday() };
|
|
1869
1868
|
} } }, [["render", function(t2, l2, r2, o2, s2, u2) {
|
|
1870
|
-
return e(), n("div", { class: a(["day select-none text-center", { "bg-indigo-200 text-white": u2.currentDay.isWeekend, "bg-[#0ff] text-white": u2.currentDay.isToday }]) }, [i("p",
|
|
1871
|
-
}]]), Price:
|
|
1872
|
-
return e(), n("div",
|
|
1873
|
-
}]]), uiButton:
|
|
1869
|
+
return e(), n("div", { class: a(["day select-none text-center", { "bg-indigo-200 text-white": u2.currentDay.isWeekend, "bg-[#0ff] text-white": u2.currentDay.isToday }]) }, [i("p", Rr, _(u2.currentDay.dayName), 1), i("p", Ar, _(u2.currentDay.day), 1), i("p", Fr, _(u2.currentDay.month), 1)], 2);
|
|
1870
|
+
}]]), Price: yr(Nr, [["render", function(t2, l2, r2, o2, s2, u2) {
|
|
1871
|
+
return e(), n("div", $r, [i("div", { class: a([{ "bg-indigo-200 text-white": u2.currentDay.isWeekend, "bg-green-300 text-white": r2.price.price > r2.basePrice, "bg-yellow-300 text-white": r2.price.price < r2.basePrice }, "select-none text-center rounded-lg p-1"]) }, _(u2.currentDay.price) + _(r2.currency), 3)]);
|
|
1872
|
+
}]]), uiButton: J, SkeletonTable: Lr }, computed: { days() {
|
|
1874
1873
|
let e2 = [];
|
|
1875
1874
|
for (let t2 = 0; t2 < this.showDays; t2++)
|
|
1876
1875
|
e2.push(H(this.date).add(t2, "day"));
|
|
@@ -1892,33 +1891,33 @@ const Vr = { name: "uiPriceCalendar", data: () => ({ today: /* @__PURE__ */ new
|
|
|
1892
1891
|
this.$emit("tableAction", e2);
|
|
1893
1892
|
}, changeRoomPrice(e2) {
|
|
1894
1893
|
this.$emit("changeRoomPrice", e2);
|
|
1895
|
-
} } }, Yr = { key: 0, class: "px-4 sm:px-6 lg:px-8" },
|
|
1896
|
-
const
|
|
1894
|
+
} } }, Yr = { key: 0, class: "px-4 sm:px-6 lg:px-8" }, Vr = { class: "flow-root" }, zr = { class: "overflow-x-auto sm:-mx-6 lg:-mx-8 shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg" }, qr = { class: "inline-block min-w-full align-middle" }, Ur = { class: "min-w-full" }, Wr = { class: "bg-white" }, Kr = { colspan: "6", scope: "colgroup", class: "bg-gray-50 py-2 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-3" }, Jr = { colspan: "20", scope: "colgroup", class: "bg-gray-200 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, Gr = i("span", null, "Categoría: Simple", -1), Xr = i("td", { colspan: "6", class: "pl-4" }, " Precios de selección ", -1), Qr = i("td", { colspan: "6", class: "pl-4" }, " Precios de mejora ", -1), Zr = { colspan: "20", scope: "colgroup", class: "bg-gray-200 py-2 pl-4 pr-3 text-left font-semibold text-gray-900 relative" }, eo = { key: 0, class: "absolute top-0 left-12 flex h-12 items-center space-x-3 sm:left-48 bg-white shadow rounded px-4 py-1 z-10" }, to = ["onClick"], lo = i("span", null, "Precios de selección", -1), ao = { colspan: "2", scope: "colgroup", class: "relative bg-gray-100 py-3.5 pl-4 pr-3 text-left font-semibold text-gray-900" }, no = ["checked", "indeterminate"], ro = i("span", { class: "pl-6" }, "Habitación", -1), oo = i("th", { colspan: "2", scope: "colgroup", class: "bg-gray-100 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, " Edificio ", -1), io = i("th", { colspan: "2", scope: "colgroup", class: "bg-gray-100 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, " Planta ", -1), so = i("th", { colspan: "14", scope: "colgroup", class: "bg-gray-100 py-2 pl-4 pr-3 text-left font-semibold text-gray-900" }, null, -1), uo = { colspan: "2", class: "relative py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6" }, co = { key: 0, class: "absolute inset-y-0 left-0 w-0.5 bg-indigo-600" }, po = ["value"], go = { class: "pl-6" }, fo = { colspan: "2", class: "pl-4" }, mo = { colspan: "2", class: "pl-4" };
|
|
1895
|
+
const vo = yr(Hr, [["render", function(l2, a2, o2, s2, u2, d2) {
|
|
1897
1896
|
var _a2, _b;
|
|
1898
1897
|
const p2 = F("DateSelector"), g2 = F("Day"), f2 = F("uiButton"), m2 = F("Price"), v2 = F("SkeletonTable");
|
|
1899
|
-
return o2.loading ? (e(), t(v2, { key: 1 })) : (e(), n("div", Yr, [i("div",
|
|
1900
|
-
}]]),
|
|
1898
|
+
return o2.loading ? (e(), t(v2, { key: 1 })) : (e(), n("div", Yr, [i("div", Vr, [i("div", zr, [i("div", qr, [i("table", Ur, [i("tbody", Wr, [i("tr", null, [i("th", Kr, [r(p2, { selectedDate: l2.date, onDateSelected: a2[0] || (a2[0] = (e2) => d2.changeDate(e2)) }, null, 8, ["selectedDate"])]), (e(true), n(c, null, T(d2.days, (t2, l3) => (e(), n("th", { scope: "col", key: l3, class: "text-sm font-semibold text-gray-900 p-0" }, [r(g2, { class: "border-l border-gray-200 px-6 py-3", day: t2 }, null, 8, ["day"])]))), 128))]), i("tr", null, [i("th", Jr, [Gr, r(f2, { loading: o2.loading, class: "ml-4", size: "small", onClick: d2.changeCategoryBulkPrices }, { default: D(() => [M("Cambiar precios en bloque ")]), _: 1 }, 8, ["loading", "onClick"])])]), i("tr", null, [Xr, (e(true), n(c, null, T(o2.category.selectionPrices, (t2, l3) => (e(), n("td", { key: l3, class: "p-0" }, [r(m2, { onClick: (e2) => d2.changeCategorySelectionPrice(t2), class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 font-bold cursor-pointer", price: t2, currency: o2.currency.symbol, isBasePrice: true }, null, 8, ["onClick", "price", "currency"])]))), 128))]), i("tr", null, [Qr, (e(true), n(c, null, T(o2.category.upgradePrices, (t2, l3) => (e(), n("td", { key: l3, class: "p-0" }, [r(m2, { onClick: (e2) => d2.changeCategoryUpgradePrice(t2), class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 font-bold cursor-pointer bg-gray-100", price: t2, currency: o2.currency.symbol, isBasePrice: true }, null, 8, ["onClick", "price", "currency"])]))), 128))]), i("tr", null, [i("th", Zr, [((_a2 = l2.selectedRooms) == null ? void 0 : _a2.length) > 0 && ((_b = o2.actions) == null ? void 0 : _b.length) > 0 ? (e(), n("div", eo, [(e(true), n(c, null, T(o2.actions, (t2, a3) => (e(), n("button", { onClick: (e2) => d2.tableAction({ action: t2.id, items: l2.selectedRooms }), key: a3, type: "button", class: "inline-flex items-center rounded bg-indigo-600 hover:bg-indigo-800 px-2.5 py-1.5 text-xs font-medium text-white shadow-sm disabled:cursor-not-allowed disabled:opacity-30" }, _(t2.name), 9, to))), 128))])) : j("", true), lo])]), i("tr", null, [i("th", ao, [i("input", { type: "checkbox", class: "absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", checked: d2.indeterminate || l2.selectedRooms.length === o2.rooms.length, indeterminate: d2.indeterminate, onChange: a2[1] || (a2[1] = (e2) => l2.selectedRooms = e2.target.checked ? o2.rooms.map((e3) => e3.name) : []) }, null, 40, no), ro]), oo, io, so]), (e(true), n(c, null, T(o2.rooms, (t2) => (e(), n("tr", { key: t2.name, class: "even:bg-gray-100" }, [i("td", uo, [l2.selectedRooms.includes(t2.name) ? (e(), n("div", co)) : j("", true), E(i("input", { type: "checkbox", class: "absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600", value: t2.name, "onUpdate:modelValue": a2[2] || (a2[2] = (e2) => l2.selectedRooms = e2) }, null, 8, po), [[N, l2.selectedRooms]]), i("span", go, _(t2.name), 1)]), i("td", fo, _(t2.building), 1), i("td", mo, _(t2.floor), 1), (e(true), n(c, null, T(t2.selectionPrices, (t3, l3) => (e(), n("td", { class: "p-0", key: l3 }, [r(m2, { onClick: (e2) => d2.changeRoomPrice(t3), class: "border-l border-gray-200 px-6 py-3 text-indigo-600 hover:text-indigo-400 cursor-pointer", price: t3, currency: o2.currency.symbol, basePrice: d2.getSelectionBasePrice(t3) }, null, 8, ["onClick", "price", "currency", "basePrice"])]))), 128))]))), 128))])])])])])]));
|
|
1899
|
+
}]]), yo = { class: "chart-selector flex flex-row items-center justify-center" }, bo = { name: "rangeSelector" }, ho = Object.assign(bo, { props: { range: { type: String } }, emits: ["rangeSelected"], setup(t2, { emit: l2 }) {
|
|
1901
1900
|
const r2 = t2;
|
|
1902
1901
|
let o2 = y(() => r2.range);
|
|
1903
1902
|
const s2 = (e2) => {
|
|
1904
1903
|
o2.value = e2, l2("rangeSelected", e2);
|
|
1905
1904
|
};
|
|
1906
|
-
return (t3, l3) => (e(), n("ul",
|
|
1907
|
-
} }),
|
|
1908
|
-
const o2 = t2, s2 = y(() => (o2.stacked && (
|
|
1909
|
-
return (l3, o3) => (e(), n(c, null, [E(i("div", { class: a(["h-[" + t2.height + "px]", "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow"]) }, [i("div",
|
|
1910
|
-
} }), To = { name: "uiFooter" },
|
|
1911
|
-
const
|
|
1912
|
-
return e(), n("footer",
|
|
1913
|
-
}]]),
|
|
1905
|
+
return (t3, l3) => (e(), n("ul", yo, [i("li", { class: a({ selected: "24h" === C(o2) }), onClick: l3[0] || (l3[0] = (e2) => s2("24h")) }, " 24H ", 2), i("li", { class: a({ selected: "7d" === C(o2) }), onClick: l3[1] || (l3[1] = (e2) => s2("7d")) }, "7D", 2), i("li", { class: a({ selected: "1m" === C(o2) }), onClick: l3[2] || (l3[2] = (e2) => s2("1m")) }, "1M", 2), i("li", { class: a({ selected: "3m" === C(o2) }), onClick: l3[3] || (l3[3] = (e2) => s2("3m")) }, "3M", 2)]));
|
|
1906
|
+
} }), xo = { chart: { toolbar: { show: false }, zoom: { enabled: false } }, colors: ["#715aff", "#00ffff", "#aba9ba"], stroke: { show: true, curve: "stepline", lineCap: "butt", width: 1, dashArray: 0 }, dataLabels: { enabled: false }, markers: { strokeWidth: 0, size: 4, hover: { size: 8 } }, plotOptions: {} }, wo = { class: "chart-header flex flex-row justify-between" }, ko = { class: "text-sm font-medium text-gray-500 truncate" }, So = { class: "chart-content" }, Co = { class: "h-full w-full flex items-center justify-center flex-col" }, Oo = i("p", { class: "text-xs uppercase text-gray-300 font-bold" }, "No data", -1), Do = { class: "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow h-80" }, Mo = [i("div", { role: "status", class: "w-full animate-pulse h-full flex flex-col" }, [i("div", { class: "h-2.5 w-36 bg-gray-200 rounded-full mb-2.5" }), i("div", { class: "w-48 h-2 mb-6 bg-gray-200 rounded-full" }), i("div", { class: "flex flex-row justify-between items-baseline grow gap-x-1" }, [i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" })])], -1)], _o = { name: "uiChart" }, Po = Object.assign(_o, { props: { title: String, id: { type: String, default: "noChartId" }, type: { type: String, default: "area" }, series: { type: Array, required: true }, options: { type: Object, required: true }, loading: { type: Boolean, default: true }, empty: { type: Boolean, default: false }, range: { type: String, default: "24h" }, horizontal: { type: Boolean, default: false }, stacked: { type: Boolean, default: false }, height: { type: Number, default: 320 } }, emits: ["selectedRange", "chartUpdated"], setup(t2, { emit: l2 }) {
|
|
1907
|
+
const o2 = t2, s2 = y(() => (o2.stacked && (xo.chart.stacked = true), { ...o2.options, ...xo, plotOptions: { bar: { horizontal: o2.horizontal } } })), u2 = y(() => o2.series), d2 = () => l2("chartUpdated");
|
|
1908
|
+
return (l3, o3) => (e(), n(c, null, [E(i("div", { class: a(["h-[" + t2.height + "px]", "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow"]) }, [i("div", wo, [i("div", ko, _(t2.title), 1), r(ho, { range: t2.range, onRangeSelected: o3[0] || (o3[0] = (e2) => l3.$emit("selectedRange", { range: e2, chartId: t2.id })) }, null, 8, ["range"])]), E(i("div", So, [r(C(Y), { type: t2.type, series: u2.value, width: "100%", height: t2.height, options: s2.value, onUpdated: d2, onMounted: d2 }, null, 8, ["type", "series", "height", "options"])], 512), [[B, !t2.empty]]), E(i("div", Co, [r(z, { icon: C(Ul), color: "gray", loading: false, size: "huge" }, null, 8, ["icon"]), Oo], 512), [[B, t2.empty]])], 2), [[B, !t2.loading]]), E(i("div", Do, Mo, 512), [[B, t2.loading]])], 64));
|
|
1909
|
+
} }), To = { name: "uiFooter" }, jo = { class: "bg-white" }, Eo = [i("div", { class: "mx-auto py-6 px-4 sm:px-6 md:flex md:items-center md:justify-between lg:px-8" }, [i("div", { class: "mt-8 md:mt-0 md:order-1" }, [i("p", { class: "text-center text-base text-gray-400" }, "© Made by Hotelinking.")])], -1)];
|
|
1910
|
+
const Lo = yr(To, [["render", function(t2, l2, a2, r2, o2, i2) {
|
|
1911
|
+
return e(), n("footer", jo, Eo);
|
|
1912
|
+
}]]), Bo = i("div", { class: "spinner h-12 w-12 mb-6" }, [i("img", { src: "https://images.hotelinking.com/ui/loader.gif", alt: "loading animation" })], -1), Io = { name: "uiLoadScreen" }, Ro = Object.assign(Io, { props: { title: String, message: String, fixed: { type: Boolean, default: true } }, setup: (t2) => (l2, r2) => (e(), n("div", { class: a([{ fixed: t2.fixed }, "load-screen h-full w-full top-0 left-0 z-50 flex flex-col items-center justify-center bg-gray-50"]) }, [Bo, E(i("h2", { class: "text-xs font-bold text-center uppercase mb-2" }, _(t2.title), 513), [[B, t2.title]]), E(i("p", { class: "text-xs text-center uppercase md:w-1/4" }, _(t2.message), 513), [[B, t2.message]])], 2)) }), Ao = { key: 0, class: "py-6 flex items-center justify-between" }, Fo = { class: "flex-1 flex justify-between sm:hidden" }, No = { href: "#", class: "relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50" }, $o = { href: "#", class: "ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50" }, Ho = { class: "hidden sm:flex-1 sm:flex sm:items-center sm:justify-between" }, Yo = { class: "text-sm text-gray-700" }, Vo = { class: "font-bold" }, zo = { class: "font-bold" }, qo = { class: "relative z-0 inline-flex rounded-md shadow-sm -space-x-px", "aria-label": "Pagination" }, Uo = { class: "sr-only" }, Wo = ["onClick"], Ko = { class: "sr-only" }, Jo = { key: 1, class: "py-6 flex flex-row justify-between items-center animate-pulse" }, Go = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/5" }, null, -1), i("div", { class: "h-10 w-32 bg-gray-200 rounded dark:bg-gray-300" }, null, -1)], Xo = { name: "uiPagination" }, Qo = Object.assign(Xo, { props: { current: { type: Number, requires: true }, total: { type: Number, requires: true }, loading: { type: Boolean, default: true } }, emits: ["changePage"], setup(t2, { emit: l2 }) {
|
|
1914
1913
|
const u2 = t2, d2 = s(3), p2 = y(() => Math.max(1, Number(u2.current) - Number(d2.value))), g2 = y(() => Math.min(Number(u2.current) + Number(d2.value), Number(u2.total))), f2 = y(() => {
|
|
1915
1914
|
let e2 = [];
|
|
1916
1915
|
for (let t3 = Number(p2.value); t3 <= Number(g2.value); t3++)
|
|
1917
1916
|
e2.push(t3);
|
|
1918
1917
|
return e2;
|
|
1919
1918
|
});
|
|
1920
|
-
return (s2, u3) => t2.loading ? (e(), n("div",
|
|
1921
|
-
} }), ei = { class: "hidden md:flex md:flex-col sticky md:inset-y-0" }, ti = { class: "flex flex-col flex-grow overflow-y-auto" }, li = { class: "grow flex flex-col" }, ai = { class: "flex-1 space-y-1", "aria-label": "Sidebar" }, ni = { key: 0 }, ri = ["onClick"], oi = { key: 0 }, ii = { key: 1, class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, si = { key: 0, class: "flex-1" }, ui = { key: 1, class: "flex-1" }, di = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, null, -1)], ci = { key: 0 }, pi = { key: 1, class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, gi = { name: "uiSidebar" }, fi = Object.assign(gi, { props: { navigation: { type: Array, required: true }, loading: { type: Boolean, default: true } }, emits: ["sideBarClick"], setup: (l2, { emit: o2 }) => (s2, u2) => (e(), n("div", ei, [i("div", ti, [i("div", li, [i("nav", ai, [(e(true), n(c, null, j(l2.navigation, (s3) => (e(), n(c, { key: s3.name }, [s3.children ? (e(), t(C(ll), { key: 1, as: "div", class: "space-y-1" }, { default: D(({ open: i2 }) => [r(C(al), { class: a([s3.current ? "bg-indigo-600 text-white" : "text-gray-600 hover:bg-gray-50 hover:text-gray-900", "group w-full flex items-center pl-2 pr-1 py-2 text-left text-sm font-medium rounded-md focus:outline-none"]) }, { default: D(() => [r(q, { loading: l2.loading, icon: s3.icon, class: "mr-3 flex-shrink-0 h-6 w-6 text-gray-400 group-hover:text-gray-500", "aria-hidden": "true" }, null, 8, ["loading", "icon"]), l2.loading ? (e(), n("div", ui, di)) : (e(), n("span", si, _(s3.name), 1)), r(C(zl), { class: a([i2 ? "text-gray-400 rotate-90" : "text-gray-400", "ml-3 flex-shrink-0 h-3 w-3 transform group-hover:text-gray-400 transition-colors ease-in-out duration-150"]) }, null, 8, ["class"])]), _: 2 }, 1032, ["class"]), r(C(nl), { class: "space-y-1" }, { default: D(() => [(e(true), n(c, null, j(s3.children, (a2) => (e(), t(C(al), { onClick: (e2) => o2("sideBarClick", a2.id), key: a2.name, class: "group w-full flex items-center pl-11 pr-2 py-2 text-sm font-medium text-gray-600 rounded-md hover:text-gray-900 hover:bg-gray-50" }, { default: D(() => [l2.loading ? (e(), n("div", pi)) : (e(), n("span", ci, _(a2.name), 1))]), _: 2 }, 1032, ["onClick"]))), 128))]), _: 2 }, 1024)]), _: 2 }, 1024)) : (e(), n("div", ni, [i("button", { onClick: (e2) => o2("sideBarClick", s3.id), class: a([s3.current ? "bg-indigo-600 text-white" : "text-gray-600 hover:bg-gray-50 hover:text-gray-900", "group w-full flex items-center pl-2 py-2 text-sm font-medium rounded-md"]) }, [r(q, { loading: l2.loading, icon: s3.icon, class: a([s3.current ? "text-white" : "text-gray-400 group-hover:text-gray-500", "mr-3 flex-shrink-0 h-6 w-6"]), "aria-hidden": "true" }, null, 8, ["loading", "icon", "class"]), l2.loading ? (e(), n("div", ii)) : (e(), n("span", oi, _(s3.name), 1))], 10, ri)]))], 64))), 128))])])])])) }), mi = { key: 0 }, vi = { class: "ml-16 text-sm font-medium text-gray-500 truncate" }, yi = { class: "ml-16 flex items-baseline pb-5" }, bi = { class: "text-2xl font-semibold text-gray-900" }, hi = { class: "absolute bottom-0 inset-x-0 bg-gray-50 px-4 py-4 sm:px-6" }, xi = { class: "text-sm" }, wi = { key: 1 }, ki = { class: "relative bg-white pt-5 px-4 sm:pt-6 sm:px-6 shadow rounded-lg overflow-hidden h-full pb-6" }, Si = { class: "absolute bg-gray-200 rounded-md p-3 animate-pulse" }, Ci = i("div", { class: "ml-16" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2 mb-4 animate-pulse" })], -1), Oi = i("div", { class: "ml-16" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2 animate-pulse" })], -1), Di = { name: "uiStats" }, Mi = Object.assign(Di, { props: { item: { type: Object, required: true }, loading: { type: Boolean, default: true } }, emits: ["statClick"], setup: (l2, { emit: o2 }) => (s2, u2) => l2.loading ? (e(), n("div", wi, [i("div", ki, [i("dt", null, [i("div", Si, [r(q, { loading: l2.loading, icon: l2.item.icon, class: "h-6 w-6 text-white", "aria-hidden": "true" }, null, 8, ["loading", "icon"])]), Ci, Oi])])])) : (e(), n("div", mi, [i("div", { class: a(["relative bg-white pt-5 px-4 sm:pt-6 sm:px-6 shadow rounded-lg overflow-hidden h-full", { "pb-12": l2.item.showFooter }]) }, [i("dt", null, [i("div", { class: a(["absolute rounded-md p-3", { "bg-indigo-500": !l2.item.color, "bg-green-500": "success" === l2.item.color, "bg-red-500": "danger" === l2.item.color, "bg-yellow-500": "warning" === l2.item.color }]) }, [r(q, { icon: l2.item.icon, class: "h-6 w-6 text-white", "aria-hidden": "true", loading: l2.loading }, null, 8, ["icon", "loading"])], 2), i("p", vi, _(l2.item.name), 1)]), i("dd", yi, [i("p", bi, _(l2.item.stat), 1), l2.item.changeType ? (e(), n("p", { key: 0, class: a([{ "text-green-600": "increase" === l2.item.changeType, "text-red-600": "decrease" === l2.item.changeType, "text-black": "neutral" === l2.item.changeType }, "ml-2 flex items-baseline text-sm font-semibold"]) }, ["increase" === l2.item.changeType ? (e(), t(C(Nl), { key: 0, class: "self-center flex-shrink-0 h-3 w-3 text-green-500", "aria-hidden": "true" })) : T("", true), "decrease" === l2.item.changeType ? (e(), t(C(Fl), { key: 1, class: "self-center flex-shrink-0 h-3 w-3 text-red-500", "aria-hidden": "true" })) : T("", true), M(" " + _(l2.item.change), 1)], 2)) : T("", true), E(i("div", hi, [i("div", xi, [i("span", { onClick: u2[0] || (u2[0] = (e2) => o2("statClick", l2.item.id)), class: "font-medium text-indigo-600 hover:text-indigo-500 cursor-pointer" }, _(l2.item.actionText), 1)])], 512), [[B, l2.item.showFooter]])])], 2)])) }), _i = { key: 0, class: "overflow-hidden bg-white shadow sm:rounded-lg" }, Pi = { class: "px-4 py-5 sm:px-6" }, ji = { class: "text-lg font-medium leading-6 text-gray-900" }, Ti = { class: "mt-1 max-w-2xl text-sm text-gray-500" }, Ei = { class: "border-t border-gray-200" }, Li = { class: "text-sm font-medium text-gray-500" }, Bi = { key: 0, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-normal" }, Ii = { key: 1, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-normal" }, Ri = ["onClick"], Ai = { key: 3, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-words" }, Fi = { key: 1, class: "overflow-hidden bg-white shadow sm:rounded-lg" }, Ni = A('<div class="px-4 py-5 sm:px-6 animate-pulse"><h3 class="text-lg font-medium leading-6 text-gray-900"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/4"></div></h3><p class="mt-1 max-w-2xl text-sm text-gray-500"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-2/5"></div></p></div>', 1), $i = { class: "border-t border-gray-200" }, Hi = [i("dt", { class: "text-sm font-medium text-gray-500" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-12" })], -1), i("dd", { class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-words" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-12" })], -1)], Vi = { name: "uiStripedCard" }, Yi = Object.assign(Vi, { props: { title: String, subtitle: String, items: Object, loading: { type: Boolean, default: true } }, emits: ["itemClicked"], setup: (l2, { emit: o2 }) => (o3, s2) => l2.loading ? (e(), n("div", Fi, [Ni, i("div", $i, [i("dl", null, [(e(), n(c, null, j(5, (e2) => i("div", { key: e2, class: a(["px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6", [e2 % 2 == 0 ? "bg-gray-50" : "bg-white"]]) }, Hi, 2)), 64))])])])) : (e(), n("div", _i, [i("div", Pi, [i("h3", ji, _(l2.title), 1), i("p", Ti, _(l2.subtitle), 1)]), i("div", Ei, [i("dl", null, [(e(true), n(c, null, j(l2.items, (s3, u2) => (e(), n("div", { key: u2, class: a(["px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6", [u2 % 2 == 0 ? "bg-gray-50" : "bg-white"]]) }, [i("dt", Li, _(s3.title), 1), "tag" === s3.type ? (e(), n("dd", Bi, [r(Ha, { color: s3.color }, { default: D(() => [M(_(s3.text), 1)]), _: 2 }, 1032, ["color"])])) : "tags" === s3.type ? (e(), n("dd", Ii, [(e(true), n(c, null, j(s3.tags, (a2, n2) => (e(), t(Ha, { loading: l2.loading, key: n2, color: a2.color, class: "mr-2 mb-2" }, { default: D(() => [M(_(a2.text), 1)]), _: 2 }, 1032, ["loading", "color"]))), 128))])) : "link" === s3.type ? (e(), n("dd", { key: 2, class: "mt-1 text-sm text-indigo-600 hover:text-indigo-400 sm:col-span-2 sm:mt-0 cursor-pointer", onClick: (e2) => o3.$emit("itemClicked", s3.emits) }, _(s3.text), 9, Ri)) : (e(), n("dd", Ai, _(s3.text), 1))], 2))), 128))])])])) }), zi = { class: "absolute top-10 bg-indigo-600 text-white text-xs p-2 rounded z-10 font-light w-60 flex flex-row items-start" }, qi = i("svg", { class: "absolute -top-3 left-0", xmlns: "http://www.w3.org/2000/svg", width: "27.687", height: "26.954", viewBox: "0 0 27.687 26.954" }, [i("path", { id: "Polígono_1", "data-name": "Polígono 1", d: "M10.5,0,21,19H0Z", transform: "translate(0 10.5) rotate(-30)", fill: "#4f46e5" })], -1), Ui = { class: "ml-2" }, Wi = { __name: "tooltip", props: { tip: { type: String, required: true } }, setup: (t2) => (l2, a2) => (e(), n("div", zi, [qi, i("div", null, [r(q, { icon: C(Xl), loading: false, color: "white", size: "big" }, null, 8, ["icon"])]), i("span", Ui, _(t2.tip), 1)])) }, Ki = { key: 0 }, Ji = { class: "flex flex-col" }, Gi = { class: "-my-2 overflow-x-auto" }, Xi = { class: "inline-block min-w-full py-2 align-middle px-1" }, Zi = { class: "relative overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg" }, Qi = { key: 0, class: "absolute top-0 left-12 flex h-12 items-center space-x-3 sm:left-16 bg-white shadow rounded px-4 py-1" }, es = ["onClick"], ts = { class: "min-w-full table-fixed divide-y divide-gray-300" }, ls = { class: "bg-gray-50" }, as = ["checked", "indeterminate"], ns = ["onMouseover", "onMouseleave"], rs = ["onClick"], os = { key: 2, class: "group flex items-center uppercase text-xs" }, is = { class: "divide-y divide-gray-200 bg-white" }, ss = { key: 0, class: "absolute inset-y-0 left-0 w-0.5 bg-indigo-600" }, us = ["value"], ds = ["onClick"], cs = { key: 2 }, ps = { name: "uiTable" }, gs = Object.assign(ps, { props: { header: { type: Array, required: true }, items: { type: Array, required: true }, orderedBy: String, orderDirection: { type: String, default: "asc" }, actions: Array, loading: { type: Boolean, default: true } }, emits: ["tableAction", "orderBy"], setup(l2, { emit: o2 }) {
|
|
1919
|
+
return (s2, u3) => t2.loading ? (e(), n("div", Jo, Go)) : (e(), n("div", Ao, [i("div", Fo, [i("a", No, [o(s2.$slots, "previous")]), i("a", $o, [o(s2.$slots, "next")])]), i("div", Ho, [i("div", null, [i("p", Yo, [o(s2.$slots, "showing"), M(), i("span", Vo, _(t2.current + " "), 1), o(s2.$slots, "of"), M(), i("span", zo, _(t2.total), 1)])]), i("div", null, [i("nav", qo, [E(i("button", { onClick: u3[0] || (u3[0] = (e2) => l2("changePage", t2.current - 1)), class: "relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50" }, [i("span", Uo, [o(s2.$slots, "previous")]), r(C(Yl), { class: "h-5 w-5", "aria-hidden": "true" })], 512), [[B, 1 !== t2.current]]), (e(true), n(c, null, T(f2.value, (r2) => (e(), n("button", { onClick: (e2) => l2("changePage", r2), key: r2, "aria-current": "page", class: a([[r2 === t2.current ? "z-10 bg-indigo-50 border-indigo-500 text-indigo-600" : "bg-white border-gray-300 text-gray-500 hover:bg-gray-50"], "relative inline-flex items-center px-4 py-2 border text-sm font-medium"]) }, _(r2), 11, Wo))), 128)), E(i("button", { onClick: u3[1] || (u3[1] = (e2) => l2("changePage", t2.current + 1)), class: "relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50" }, [i("span", Ko, [o(s2.$slots, "next")]), r(C(Vl), { class: "h-5 w-5", "aria-hidden": "true" })], 512), [[B, t2.current !== t2.total]])])])])]));
|
|
1920
|
+
} }), Zo = { class: "hidden md:flex md:flex-col sticky md:inset-y-0" }, ei = { class: "flex flex-col flex-grow overflow-y-auto" }, ti = { class: "grow flex flex-col" }, li = { class: "flex-1 space-y-1", "aria-label": "Sidebar" }, ai = { key: 0 }, ni = ["onClick"], ri = { key: 0 }, oi = { key: 1, class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, ii = { key: 0, class: "flex-1" }, si = { key: 1, class: "flex-1" }, ui = [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, null, -1)], di = { key: 0 }, ci = { key: 1, class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2" }, pi = { name: "uiSidebar" }, gi = Object.assign(pi, { props: { navigation: { type: Array, required: true }, loading: { type: Boolean, default: true } }, emits: ["sideBarClick"], setup: (l2, { emit: o2 }) => (s2, u2) => (e(), n("div", Zo, [i("div", ei, [i("div", ti, [i("nav", li, [(e(true), n(c, null, T(l2.navigation, (s3) => (e(), n(c, { key: s3.name }, [s3.children ? (e(), t(C(tl), { key: 1, as: "div", class: "space-y-1" }, { default: D(({ open: i2 }) => [r(C(ll), { class: a([s3.current ? "bg-indigo-600 text-white" : "text-gray-600 hover:bg-gray-50 hover:text-gray-900", "group w-full flex items-center pl-2 pr-1 py-2 text-left text-sm font-medium rounded-md focus:outline-none"]) }, { default: D(() => [r(z, { loading: l2.loading, icon: s3.icon, class: "mr-3 flex-shrink-0 h-6 w-6 text-gray-400 group-hover:text-gray-500", "aria-hidden": "true" }, null, 8, ["loading", "icon"]), l2.loading ? (e(), n("div", si, ui)) : (e(), n("span", ii, _(s3.name), 1)), r(C(Vl), { class: a([i2 ? "text-gray-400 rotate-90" : "text-gray-400", "ml-3 flex-shrink-0 h-3 w-3 transform group-hover:text-gray-400 transition-colors ease-in-out duration-150"]) }, null, 8, ["class"])]), _: 2 }, 1032, ["class"]), r(C(al), { class: "space-y-1" }, { default: D(() => [(e(true), n(c, null, T(s3.children, (a2) => (e(), t(C(ll), { onClick: (e2) => o2("sideBarClick", a2.id), key: a2.name, class: "group w-full flex items-center pl-11 pr-2 py-2 text-sm font-medium text-gray-600 rounded-md hover:text-gray-900 hover:bg-gray-50" }, { default: D(() => [l2.loading ? (e(), n("div", ci)) : (e(), n("span", di, _(a2.name), 1))]), _: 2 }, 1032, ["onClick"]))), 128))]), _: 2 }, 1024)]), _: 2 }, 1024)) : (e(), n("div", ai, [i("button", { onClick: (e2) => o2("sideBarClick", s3.id), class: a([s3.current ? "bg-indigo-600 text-white" : "text-gray-600 hover:bg-gray-50 hover:text-gray-900", "group w-full flex items-center pl-2 py-2 text-sm font-medium rounded-md"]) }, [r(z, { loading: l2.loading, icon: s3.icon, class: a([s3.current ? "text-white" : "text-gray-400 group-hover:text-gray-500", "mr-3 flex-shrink-0 h-6 w-6"]), "aria-hidden": "true" }, null, 8, ["loading", "icon", "class"]), l2.loading ? (e(), n("div", oi)) : (e(), n("span", ri, _(s3.name), 1))], 10, ni)]))], 64))), 128))])])])])) }), fi = { key: 0 }, mi = { class: "ml-16 text-sm font-medium text-gray-500 truncate" }, vi = { class: "ml-16 flex items-baseline pb-5" }, yi = { class: "text-2xl font-semibold text-gray-900" }, bi = { class: "absolute bottom-0 inset-x-0 bg-gray-50 px-4 py-4 sm:px-6" }, hi = { class: "text-sm" }, xi = { key: 1 }, wi = { class: "relative bg-white pt-5 px-4 sm:pt-6 sm:px-6 shadow rounded-lg overflow-hidden h-full pb-6" }, ki = { class: "absolute bg-gray-200 rounded-md p-3 animate-pulse" }, Si = i("div", { class: "ml-16" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2 mb-4 animate-pulse" })], -1), Ci = i("div", { class: "ml-16" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/2 animate-pulse" })], -1), Oi = { name: "uiStats" }, Di = Object.assign(Oi, { props: { item: { type: Object, required: true }, loading: { type: Boolean, default: true } }, emits: ["statClick"], setup: (l2, { emit: o2 }) => (s2, u2) => l2.loading ? (e(), n("div", xi, [i("div", wi, [i("dt", null, [i("div", ki, [r(z, { loading: l2.loading, icon: l2.item.icon, class: "h-6 w-6 text-white", "aria-hidden": "true" }, null, 8, ["loading", "icon"])]), Si, Ci])])])) : (e(), n("div", fi, [i("div", { class: a(["relative bg-white pt-5 px-4 sm:pt-6 sm:px-6 shadow rounded-lg overflow-hidden h-full", { "pb-12": l2.item.showFooter }]) }, [i("dt", null, [i("div", { class: a(["absolute rounded-md p-3", { "bg-indigo-500": !l2.item.color, "bg-green-500": "success" === l2.item.color, "bg-red-500": "danger" === l2.item.color, "bg-yellow-500": "warning" === l2.item.color }]) }, [r(z, { icon: l2.item.icon, class: "h-6 w-6 text-white", "aria-hidden": "true", loading: l2.loading }, null, 8, ["icon", "loading"])], 2), i("p", mi, _(l2.item.name), 1)]), i("dd", vi, [i("p", yi, _(l2.item.stat), 1), l2.item.changeType ? (e(), n("p", { key: 0, class: a([{ "text-green-600": "increase" === l2.item.changeType, "text-red-600": "decrease" === l2.item.changeType, "text-black": "neutral" === l2.item.changeType }, "ml-2 flex items-baseline text-sm font-semibold"]) }, ["increase" === l2.item.changeType ? (e(), t(C(Fl), { key: 0, class: "self-center flex-shrink-0 h-3 w-3 text-green-500", "aria-hidden": "true" })) : j("", true), "decrease" === l2.item.changeType ? (e(), t(C(Al), { key: 1, class: "self-center flex-shrink-0 h-3 w-3 text-red-500", "aria-hidden": "true" })) : j("", true), M(" " + _(l2.item.change), 1)], 2)) : j("", true), E(i("div", bi, [i("div", hi, [i("span", { onClick: u2[0] || (u2[0] = (e2) => o2("statClick", l2.item.id)), class: "font-medium text-indigo-600 hover:text-indigo-500 cursor-pointer" }, _(l2.item.actionText), 1)])], 512), [[B, l2.item.showFooter]])])], 2)])) }), Mi = { key: 0, class: "overflow-hidden bg-white shadow sm:rounded-lg" }, _i = { class: "px-4 py-5 sm:px-6" }, Pi = { class: "text-lg font-medium leading-6 text-gray-900" }, Ti = { class: "mt-1 max-w-2xl text-sm text-gray-500" }, ji = { class: "border-t border-gray-200" }, Ei = { class: "text-sm font-medium text-gray-500" }, Li = { key: 0, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-normal" }, Bi = { key: 1, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-normal" }, Ii = ["onClick"], Ri = { key: 3, class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-words" }, Ai = { key: 1, class: "overflow-hidden bg-white shadow sm:rounded-lg" }, Fi = A('<div class="px-4 py-5 sm:px-6 animate-pulse"><h3 class="text-lg font-medium leading-6 text-gray-900"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/4"></div></h3><p class="mt-1 max-w-2xl text-sm text-gray-500"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-2/5"></div></p></div>', 1), Ni = { class: "border-t border-gray-200" }, $i = [i("dt", { class: "text-sm font-medium text-gray-500" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-12" })], -1), i("dd", { class: "mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-words" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-12" })], -1)], Hi = { name: "uiStripedCard" }, Yi = Object.assign(Hi, { props: { title: String, subtitle: String, items: Object, loading: { type: Boolean, default: true } }, emits: ["itemClicked"], setup: (l2, { emit: o2 }) => (o3, s2) => l2.loading ? (e(), n("div", Ai, [Fi, i("div", Ni, [i("dl", null, [(e(), n(c, null, T(5, (e2) => i("div", { key: e2, class: a(["px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6", [e2 % 2 == 0 ? "bg-gray-50" : "bg-white"]]) }, $i, 2)), 64))])])])) : (e(), n("div", Mi, [i("div", _i, [i("h3", Pi, _(l2.title), 1), i("p", Ti, _(l2.subtitle), 1)]), i("div", ji, [i("dl", null, [(e(true), n(c, null, T(l2.items, (s3, u2) => (e(), n("div", { key: u2, class: a(["px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6", [u2 % 2 == 0 ? "bg-gray-50" : "bg-white"]]) }, [i("dt", Ei, _(s3.title), 1), "tag" === s3.type ? (e(), n("dd", Li, [r($a, { color: s3.color }, { default: D(() => [M(_(s3.text), 1)]), _: 2 }, 1032, ["color"])])) : "tags" === s3.type ? (e(), n("dd", Bi, [(e(true), n(c, null, T(s3.tags, (a2, n2) => (e(), t($a, { loading: l2.loading, key: n2, color: a2.color, class: "mr-2 mb-2" }, { default: D(() => [M(_(a2.text), 1)]), _: 2 }, 1032, ["loading", "color"]))), 128))])) : "link" === s3.type ? (e(), n("dd", { key: 2, class: "mt-1 text-sm text-indigo-600 hover:text-indigo-400 sm:col-span-2 sm:mt-0 cursor-pointer", onClick: (e2) => o3.$emit("itemClicked", s3.emits) }, _(s3.text), 9, Ii)) : (e(), n("dd", Ri, _(s3.text), 1))], 2))), 128))])])])) }), Vi = { class: "absolute top-10 bg-indigo-600 text-white text-xs p-2 rounded z-10 font-light w-60 flex flex-row items-start" }, zi = i("svg", { class: "absolute -top-3 left-0", xmlns: "http://www.w3.org/2000/svg", width: "27.687", height: "26.954", viewBox: "0 0 27.687 26.954" }, [i("path", { id: "Polígono_1", "data-name": "Polígono 1", d: "M10.5,0,21,19H0Z", transform: "translate(0 10.5) rotate(-30)", fill: "#4f46e5" })], -1), qi = { class: "ml-2" }, Ui = { __name: "tooltip", props: { tip: { type: String, required: true } }, setup: (t2) => (l2, a2) => (e(), n("div", Vi, [zi, i("div", null, [r(z, { icon: C(Gl), loading: false, color: "white", size: "big" }, null, 8, ["icon"])]), i("span", qi, _(t2.tip), 1)])) }, Wi = { key: 0 }, Ki = { class: "flex flex-col" }, Ji = { class: "-my-2 overflow-x-auto" }, Gi = { class: "inline-block min-w-full py-2 align-middle px-1" }, Xi = { class: "relative overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg" }, Qi = { key: 0, class: "absolute top-0 left-12 flex h-12 items-center space-x-3 sm:left-16 bg-white shadow rounded px-4 py-1" }, Zi = ["onClick"], es = { class: "min-w-full table-fixed divide-y divide-gray-300" }, ts = { class: "bg-gray-50" }, ls = ["checked", "indeterminate"], as = ["onMouseover", "onMouseleave"], ns = ["onClick"], rs = { key: 2, class: "group flex items-center uppercase text-xs" }, os = { class: "divide-y divide-gray-200 bg-white" }, is = { key: 0, class: "absolute inset-y-0 left-0 w-0.5 bg-indigo-600" }, ss = ["value"], us = ["onClick"], ds = { key: 2 }, cs = { name: "uiTable" }, ps = Object.assign(cs, { props: { header: { type: Array, required: true }, items: { type: Array, required: true }, orderedBy: String, orderDirection: { type: String, default: "asc" }, actions: Array, loading: { type: Boolean, default: true } }, emits: ["tableAction", "orderBy"], setup(l2, { emit: o2 }) {
|
|
1922
1921
|
const u2 = l2;
|
|
1923
1922
|
let d2 = s([]);
|
|
1924
1923
|
s(false);
|
|
@@ -1928,39 +1927,32 @@ const Bo = br(To, [["render", function(t2, l2, a2, r2, o2, i2) {
|
|
|
1928
1927
|
};
|
|
1929
1928
|
return (s2, u3) => {
|
|
1930
1929
|
var _a2, _b;
|
|
1931
|
-
return l2.loading ? (e(), t(
|
|
1930
|
+
return l2.loading ? (e(), t(Lr, { key: 1 })) : (e(), n("div", Wi, [i("div", Ki, [i("div", Ji, [i("div", Gi, [i("div", Xi, [((_a2 = C(d2)) == null ? void 0 : _a2.length) > 0 && ((_b = l2.actions) == null ? void 0 : _b.length) > 0 ? (e(), n("div", Qi, [(e(true), n(c, null, T(l2.actions, (t2, l3) => (e(), n("button", { onClick: (e2) => o2("tableAction", { action: t2.id, items: C(d2) }), key: l3, type: "button", class: "inline-flex items-center rounded bg-indigo-600 hover:bg-indigo-800 px-2.5 py-1.5 text-xs font-medium text-white shadow-sm disabled:cursor-not-allowed disabled:opacity-30" }, _(t2.name), 9, Zi))), 128))])) : j("", true), i("table", es, [i("thead", ts, [i("tr", null, [i("th", { scope: "col", class: a([l2.actions ? "px-6 sm:px-8" : "px-3", "relative"]) }, [l2.actions ? (e(), n("input", { key: 0, checked: g2.value || C(d2).length === l2.items.length, indeterminate: g2.value, class: "absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500", type: "checkbox", onChange: u3[0] || (u3[0] = (e2) => $(d2) ? d2.value = e2.target.checked ? l2.items.map((e3) => e3.id) : [] : d2 = e2.target.checked ? l2.items.map((e3) => e3.id) : []) }, null, 40, ls)) : j("", true)], 2), (e(true), n(c, null, T(l2.header, (s3, u4) => (e(), n("th", { key: u4, class: "py-3.5 pr-3 text-left font-semibold text-gray-900 flex-wrap relative", scope: "col", onMouseover: (e2) => f2(s3.name, true), onMouseleave: (e2) => f2(s3.name, false) }, [s3.tooltip ? E((e(), t(Ui, { key: 0, tip: s3.tooltip }, null, 8, ["tip"])), [[B, C(p2) === s3.name]]) : j("", true), s3.value ? (e(), n("button", { key: 1, class: "group flex items-center uppercase text-xs relative", onClick: (e2) => o2("orderBy", { value: s3.value, orderDirection: "asc" === l2.orderDirection ? "desc" : "asc" }) }, [i("span", null, _(s3.name), 1), i("span", { class: a([[s3.value === l2.orderedBy ? "bg-indigo-600 text-white group-hover:bg-gray-300" : "text-gray-400 group-hover:visible group-focus:visible"], "ml-2 flex-none rounded group-hover:bg-indigo-200 group-hover:text-white"]) }, [r(z, { icon: "asc" === l2.orderDirection ? C(Hl) : C(ql), loading: l2.loading, color: s3.value === l2.orderedBy ? "white" : "primary" }, null, 8, ["icon", "loading", "color"])], 2)], 8, ns)) : (e(), n("p", rs, [i("span", null, _(s3.name), 1)]))], 40, as))), 128))])]), i("tbody", os, [(e(true), n(c, null, T(l2.items, (r2, s3) => {
|
|
1932
1931
|
var _a3, _b2;
|
|
1933
|
-
return e(), n("tr", { key: r2.id, class: a([C(d2).includes(r2.id) && "bg-gray-50", s3 % 2 == 0 ? void 0 : "bg-gray-50"]) }, [i("td", { class: a([((_a3 = l2.actions) == null ? void 0 : _a3.length) > 0 ? "w-2" : "w-0", "relative"]) }, [C(d2).includes(r2.id) ? (e(), n("div",
|
|
1932
|
+
return e(), n("tr", { key: r2.id, class: a([C(d2).includes(r2.id) && "bg-gray-50", s3 % 2 == 0 ? void 0 : "bg-gray-50"]) }, [i("td", { class: a([((_a3 = l2.actions) == null ? void 0 : _a3.length) > 0 ? "w-2" : "w-0", "relative"]) }, [C(d2).includes(r2.id) ? (e(), n("div", is)) : j("", true), ((_b2 = l2.actions) == null ? void 0 : _b2.length) > 0 ? E((e(), n("input", { key: 1, "onUpdate:modelValue": u3[1] || (u3[1] = (e2) => $(d2) ? d2.value = e2 : d2 = e2), value: r2.id, class: "absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500 flex-wrap", type: "checkbox" }, null, 8, ss)), [[N, C(d2)]]) : j("", true)], 2), (e(true), n(c, null, T(r2.row, (i2, s4) => (e(), n("td", { key: s4, class: a(["whitespace-nowrap py-4 pr-3 text-sm", C(d2).includes(r2.id) ? "text-indigo-600" : "text-gray-900"]) }, ["object" == typeof i2 && "tag" === i2.type ? (e(), t($a, { key: 0, loading: l2.loading, color: i2.color }, { default: D(() => [M(_(i2.content), 1)]), _: 2 }, 1032, ["loading", "color"])) : "object" == typeof i2 && "link" === i2.type ? (e(), n("span", { key: 1, class: "text-indigo-600 hover:text-indigo-400 cursor-pointer", onClick: (e2) => o2(i2.emits, { id: r2.id, data: (r2 == null ? void 0 : r2.emitWith) || null }) }, _(i2.content), 9, us)) : (e(), n("span", ds, _(i2), 1))], 2))), 128))], 2);
|
|
1934
1933
|
}), 128))])])])])])])]));
|
|
1935
1934
|
};
|
|
1936
|
-
} }),
|
|
1935
|
+
} }), gs = { class: "lg:hidden" }, fs = ["value"], ms = { class: "hidden lg:block" }, vs = { class: "border-b border-gray-200" }, ys = { class: "-mb-px flex space-x-8", "aria-label": "Tabs" }, bs = ["onClick", "aria-current"], hs = { name: "uiTabs" }, xs = Object.assign(hs, { props: { tabs: Array }, emits: ["tabClicked"], setup: (t2, { emit: l2 }) => (r2, o2) => (e(), n("div", null, [i("div", gs, [i("select", { onChange: o2[0] || (o2[0] = (e2) => {
|
|
1937
1936
|
l2("tabClicked", e2.target.value);
|
|
1938
|
-
}), id: "tabs", name: "tabs", class: "block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm" }, [(e(true), n(c, null,
|
|
1937
|
+
}), id: "tabs", name: "tabs", class: "block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm" }, [(e(true), n(c, null, T(t2.tabs, (t3) => (e(), n("option", { value: t3.id, key: t3.name }, _(t3.name), 9, fs))), 128))], 32)]), i("div", ms, [i("div", vs, [i("nav", ys, [(e(true), n(c, null, T(t2.tabs, (t3) => (e(), n("a", { key: t3.name, onClick: (e2) => l2("tabClicked", t3.id), class: a([t3.current ? "border-indigo-500 text-indigo-600" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-200", "whitespace-nowrap flex py-4 px-1 border-b-2 font-medium text-sm cursor-pointer"]), "aria-current": t3.current ? "page" : void 0 }, [M(_(t3.name) + " ", 1), t3.count ? (e(), n("span", { key: 0, class: a([t3.current ? "bg-indigo-100 text-indigo-600" : "bg-gray-100 text-gray-900", "hidden ml-3 py-0.5 px-2.5 rounded-full text-xs font-medium md:inline-block"]) }, _(t3.count), 3)) : j("", true)], 10, bs))), 128))])])])])) }), ws = { key: 0, class: "bg-white overflow-hidden shadow rounded-lg" }, ks = { class: "px-4 py-5 sm:px-6" }, Ss = { class: "text-xl font-bold" }, Cs = { class: "px-4 py-5 sm:p-6" }, Os = { class: "flow-root" }, Ds = { class: "-mb-8", role: "list" }, Ms = { class: "relative pb-8" }, _s = { key: 0, class: "absolute left-4 top-4 -ml-px h-full w-0.5 bg-gray-200", "aria-hidden": "true" }, Ps = { class: "relative flex space-x-3" }, Ts = { class: "min-w-0 flex-1 pt-1.5 flex justify-between space-x-4 items-center" }, js = { class: "text-sm text-gray-500" }, Es = ["onClick"], Ls = { class: "text-right text-sm whitespace-nowrap text-gray-500" }, Bs = ["datetime"], Is = { class: "bg-gray-50 px-4 py-4 sm:px-6 z-10" }, Rs = { class: "text-sm" }, As = { class: "h-full w-full flex items-center justify-center flex-col mb-5" }, Fs = i("p", { class: "text-xs uppercase text-gray-300 font-bold" }, "No data", -1), Ns = { key: 1, class: "bg-white overflow-hidden shadow rounded-lg" }, $s = i("div", { class: "px-4 py-5 sm:px-6 animate-pulse" }, [i("h1", { class: "text-xl font-bold" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/4" })])], -1), Hs = { class: "px-4 py-5 sm:p-6 animate-pulse" }, Ys = { class: "flow-root" }, Vs = { class: "-mb-8", role: "list" }, zs = { class: "relative pb-8" }, qs = { key: 0, class: "absolute left-4 top-4 -ml-px h-full w-0.5 bg-gray-200", "aria-hidden": "true" }, Us = A('<div class="relative flex space-x-3"><div><span class="h-8 w-8 rounded-full bg-gray-300 flex items-center justify-center ring-4 ring-white"></span></div><div class="min-w-0 flex-1 pt-1.5 flex justify-between space-x-4 items-center"><div><p class="text-sm text-gray-500 flex-1"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-full"></div></p></div><div class="text-right text-sm whitespace-nowrap text-gray-500 flex-1"><div class="h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/4"></div></div></div></div>', 1), Ws = i("div", { class: "bg-gray-50 px-4 py-4 sm:px-6 z-10 animate-pulse" }, [i("div", { class: "text-sm" }, [i("div", { class: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-300 w-1/4" })])], -1), Ks = { name: "uiTimeline" }, Js = Object.assign(Ks, { props: { name: { type: String, required: true }, timeline: { type: Object }, loading: { type: Boolean, default: true }, empty: { type: Boolean, default: false } }, setup: (t2) => (l2, o2) => {
|
|
1939
1938
|
const s2 = F("uiIcon");
|
|
1940
|
-
return t2.loading ? (e(), n("div",
|
|
1941
|
-
} }),
|
|
1939
|
+
return t2.loading ? (e(), n("div", Ns, [$s, i("div", Hs, [i("div", Ys, [i("ul", Vs, [(e(), n(c, null, T(10, (t3) => i("li", { key: l2.index }, [i("div", zs, [10 !== t3 ? (e(), n("span", qs)) : j("", true), Us])])), 64))])])]), Ws])) : (e(), n("div", ws, [i("div", ks, [i("h1", Ss, _(t2.name), 1)]), E(i("div", Cs, [i("div", Os, [i("ul", Ds, [(e(true), n(c, null, T(t2.timeline.items, (o3, u2) => (e(), n("li", { key: u2 }, [i("div", Ms, [u2 !== t2.timeline.items.length - 1 ? (e(), n("span", _s)) : j("", true), i("div", Ps, [i("div", null, [i("span", { class: a([o3.iconBackground, "h-8 w-8 rounded-full flex items-center justify-center ring-4 ring-white"]) }, [r(s2, { loading: t2.loading, icon: o3.icon, "aria-hidden": "true", class: "h-5 w-5 text-white", color: "white" }, null, 8, ["loading", "icon"])], 2)]), i("div", Ts, [i("div", null, [i("p", js, [i("a", { onClick: (e2) => l2.$emit("timelineEventClicked", o3.linkId), class: "font-medium text-indigo-600 hover:text-indigo-800 cursor-pointer" }, _(o3.target), 9, Es), M(" " + _(o3.content), 1)])]), i("div", Ls, [i("time", { datetime: o3.datetime }, _(o3.date), 9, Bs)])])])])]))), 128))])])], 512), [[B, !t2.empty]]), E(i("div", Is, [i("div", Rs, [i("a", { class: "cursor-pointer font-medium text-indigo-600 hover:text-indigo-500", onClick: o2[0] || (o2[0] = (e2) => l2.$emit("timelineFooterClicked", t2.timeline.id)) }, _(t2.timeline.footerText), 1)])], 512), [[B, !t2.empty]]), E(i("div", As, [r(z, { icon: C(Ul), color: "gray", loading: false, size: "huge" }, null, 8, ["icon"]), Fs], 512), [[B, t2.empty]])]));
|
|
1940
|
+
} }), Gs = { name: "uiTopbar", props: ["navigation", "logo", "profileMenu", "brand", "accountLogo", "alerted"], components: { Disclosure: tl, DisclosureButton: ll, DisclosurePanel: al, Menu: cl, MenuButton: pl, MenuItem: fl, MenuItems: gl, Bars3Icon: function(t2, l2) {
|
|
1942
1941
|
return e(), n("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [i("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" })]);
|
|
1943
|
-
}, XMarkIcon: Ql } },
|
|
1944
|
-
const
|
|
1942
|
+
}, XMarkIcon: Ql } }, Xs = { class: "mx-auto px-6 lg:px-8" }, Qs = { class: "flex justify-between h-20" }, Zs = { class: "flex" }, eu = { class: "-ml-2 mr-2 flex items-center lg:hidden" }, tu = i("span", { class: "sr-only" }, "Open main menu", -1), lu = ["src"], au = { class: "flex items-center" }, nu = { class: "md:ml-4 md:flex-shrink-0 md:flex md:items-center" }, ru = { class: "redCircle flex items-center justify-center h-4 w-4 bg-red-500 rounded-full absolute -top-0 -left-1" }, ou = [i("span", { class: "animate-ping absolute inline-flex h-4 w-4 bg-red-500 rounded-full opacity-75" }, null, -1)], iu = ["src"], su = ["onClick"], uu = { class: "pt-2 pb-3 space-y-1" }, du = ["onClick"], cu = { class: "pt-4 pb-3 border-t border-gray-200" }, pu = { class: "flex items-center px-4 sm:px-6" }, gu = { class: "flex-shrink-0" }, fu = ["src"], mu = { key: 0, class: "ml-3" }, vu = { class: "text-base font-medium text-gray-800" }, yu = { class: "text-sm font-medium text-gray-500" }, bu = { class: "mt-3 space-y-1" }, hu = ["onClick"];
|
|
1943
|
+
const xu = yr(Gs, [["render", function(l2, o2, s2, u2, d2, p2) {
|
|
1945
1944
|
const g2 = F("Bars3Icon"), f2 = F("XMarkIcon"), m2 = F("DisclosureButton"), v2 = F("MenuButton"), y2 = F("MenuItem"), b2 = F("MenuItems"), h2 = F("Menu"), x2 = F("DisclosurePanel"), w2 = F("Disclosure");
|
|
1946
|
-
return e(), t(w2, { as: "nav", class: "bg-white shadow z-10" }, { default: D(({ open: u3 }) => [i("div",
|
|
1947
|
-
}]]),
|
|
1948
|
-
const o2 = l2, u2 = s("24h"), d2 = s(null), c2 = [["#725CFF", "#C9C4EB"], ["#00FFFF", "#D6FFFF"], ["#aba9ba", "#f5f4ff"]], p2 = s(0), g2 = s(0), m2 = (e2) => {
|
|
1949
|
-
u2.value = e2, r2("selectedRange", { range: e2, chartId: o2.id });
|
|
1950
|
-
};
|
|
1951
|
-
return f(() => {
|
|
1952
|
-
d2.value.focus(), p2.value = d2.value.clientHeight - d2.value.clientHeight / 4, g2.value = d2.value.clientWidth - d2.value.clientHeight / 4;
|
|
1953
|
-
}), (r3, o3) => (e(), n("div", ku, [E(i("div", { ref_key: "funnelChart", ref: d2, class: "card chart funnel-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow h-full" }, [i("div", Su, [i("div", Cu, _(l2.title), 1), i("ul", Ou, [i("li", { class: a({ selected: "24h" === u2.value }), onClick: o3[0] || (o3[0] = (e2) => m2("24h")) }, " 24H ", 2), i("li", { class: a({ selected: "7d" === u2.value }), onClick: o3[1] || (o3[1] = (e2) => m2("7d")) }, " 7D ", 2), i("li", { class: a({ selected: "1m" === u2.value }), onClick: o3[2] || (o3[2] = (e2) => m2("1m")) }, " 1M ", 2), i("li", { class: a({ selected: "3m" === u2.value }), onClick: o3[3] || (o3[3] = (e2) => m2("3m")) }, " 3M ", 2)])]), i("div", Du, [g2.value > 0 && p2.value > 0 ? (e(), t(C(Y), { key: 0, width: g2.value, height: p2.value, labels: l2.labels, values: l2.values, colors: c2, "sub-labels": l2.subLabels, direction: "vertical", "gradient-direction": "vertical", animated: true, "display-percentage": true }, null, 8, ["width", "height", "labels", "values", "sub-labels"])) : T("", true)])], 512), [[B, !l2.loading]]), E(i("div", Mu, _u, 512), [[B, l2.loading]])]));
|
|
1954
|
-
} }), Tu = { chart: { type: "bar", toolbar: { show: false }, zoom: { enabled: false } }, colors: ["#715aff"], dataLabels: { enabled: true, formatter: function(e2, t2) {
|
|
1945
|
+
return e(), t(w2, { as: "nav", class: "bg-white shadow z-10" }, { default: D(({ open: u3 }) => [i("div", Xs, [i("div", Qs, [i("div", Zs, [i("div", eu, [r(m2, { class: "inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500" }, { default: D(() => [tu, u3 ? (e(), t(f2, { key: 1, class: "block h-6 w-6", "aria-hidden": "true" })) : (e(), t(g2, { key: 0, class: "block h-6 w-6", "aria-hidden": "true" }))]), _: 2 }, 1024)]), i("div", { class: "flex-shrink-0 flex items-center cursor-pointer", onClick: o2[0] || (o2[0] = (e2) => l2.$emit("topBarClick", "logo")) }, [i("img", { class: "h-10", src: s2.logo, alt: "Hotelinking suite product logo" }, null, 8, lu)])]), i("div", au, [i("div", nu, [r(h2, { as: "div", class: "ml-3 relative" }, { default: D(() => [i("div", null, [E(r(v2, { class: "bg-white rounded-full flex text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 relative" }, { default: D(() => [E(i("div", ru, ou, 512), [[B, s2.alerted]]), i("img", { class: "h-10 w-10 rounded-full", src: s2.accountLogo }, null, 8, iu)]), _: 1 }, 512), [[B, s2.accountLogo]])]), r(P, { "enter-active-class": "transition ease-out duration-200", "enter-from-class": "transform opacity-0 scale-95", "enter-to-class": "transform opacity-100 scale-100", "leave-active-class": "transition ease-in duration-75", "leave-from-class": "transform opacity-100 scale-100", "leave-to-class": "transform opacity-0 scale-95" }, { default: D(() => [r(b2, { class: "origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" }, { default: D(() => [(e(true), n(c, null, T(s2.profileMenu, (n2) => (e(), t(y2, { key: n2.name }, { default: D(({ active: e2 }) => [i("p", { onClick: (e3) => l2.$emit("topBarClick", n2.id), class: a(["cursor-pointer", [e2 ? "bg-gray-100" : "", "block px-4 py-2 text-sm text-gray-700"]]) }, _(n2.name), 11, su)]), _: 2 }, 1024))), 128))]), _: 1 })]), _: 1 })]), _: 1 })])])])]), r(x2, { class: "lg:hidden" }, { default: D(() => [i("div", uu, [(e(true), n(c, null, T(s2.navigation, (n2) => (e(), t(m2, { as: "template", key: n2.name, class: a(["block pl-3 pr-4 py-2 border-l-4 text-base font-medium sm:pl-5 sm:pr-6", { "bg-indigo-50 border-indigo-500 text-indigo-700": n2.current && true === n2.current, "border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700": !n2.current }]) }, { default: D(() => [i("p", { onClick: (e2) => l2.$emit("topBarClick", n2.id) }, _(n2.name), 9, du)]), _: 2 }, 1032, ["class"]))), 128))]), i("div", cu, [i("div", pu, [i("div", gu, [i("img", { class: "h-10 w-10 rounded-full", src: s2.accountLogo }, null, 8, fu)]), s2.brand ? (e(), n("div", mu, [i("div", vu, _(s2.brand.title), 1), i("div", yu, _(s2.brand.subtitle), 1)])) : j("", true)]), i("div", bu, [(e(true), n(c, null, T(s2.profileMenu, (a2) => (e(), t(m2, { as: "template", key: a2.name, class: "block px-4 py-2 text-base font-medium text-gray-500 hover:text-gray-800 hover:bg-gray-100 sm:px-6" }, { default: D(() => [i("p", { onClick: (e2) => l2.$emit("topBarClick", a2.id) }, _(a2.name), 9, hu)]), _: 2 }, 1024))), 128))])])]), _: 1 })]), _: 1 });
|
|
1946
|
+
}]]), wu = { chart: { type: "bar", toolbar: { show: false }, zoom: { enabled: false } }, colors: ["#715aff"], dataLabels: { enabled: true, formatter: function(e2, t2) {
|
|
1955
1947
|
return t2.w.globals.labels[t2.dataPointIndex] + ": " + e2;
|
|
1956
|
-
} }, markers: { strokeWidth: 0, size: 4, hover: { size: 8 } }, plotOptions: { bar: { borderRadius: 0, horizontal: true, barHeight: "80%", isFunnel: true } } },
|
|
1957
|
-
const o2 = t2, s2 = y(() => ({ ...o2.options, ...
|
|
1958
|
-
return (l3, o3) => (e(), n(c, null, [E(i("div", { class: a(["h-[" + t2.height + "px]", "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow"]) }, [i("div",
|
|
1959
|
-
} }),
|
|
1960
|
-
Object.keys(
|
|
1961
|
-
e2.component(t2,
|
|
1948
|
+
} }, markers: { strokeWidth: 0, size: 4, hover: { size: 8 } }, plotOptions: { bar: { borderRadius: 0, horizontal: true, barHeight: "80%", isFunnel: true } } }, ku = { class: "chart-header flex flex-row justify-between" }, Su = { class: "text-sm font-medium text-gray-500 truncate" }, Cu = { class: "chart-content" }, Ou = { class: "h-full w-full flex items-center justify-center flex-col" }, Du = i("p", { class: "text-xs uppercase text-gray-300 font-bold" }, "No data", -1), Mu = { class: "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow h-80" }, _u = [i("div", { role: "status", class: "w-full animate-pulse h-full flex flex-col" }, [i("div", { class: "h-2.5 w-36 bg-gray-200 rounded-full mb-2.5" }), i("div", { class: "w-48 h-2 mb-6 bg-gray-200 rounded-full" }), i("div", { class: "flex flex-row justify-between items-baseline grow gap-x-1" }, [i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-4/5" }), i("div", { class: "w-full bg-gray-200 rounded h-full" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" }), i("div", { class: "w-full bg-gray-200 rounded h-1/3" }), i("div", { class: "w-full bg-gray-200 rounded h-1/2" })])], -1)], Pu = { name: "uiChart" }, Tu = Object.assign(Pu, { props: { title: String, id: { type: String, default: "noChartId" }, series: { type: Object, required: true }, options: { type: Object, required: true }, loading: { type: Boolean, default: true }, empty: { type: Boolean, default: false }, range: { type: String, default: "24h" }, height: { type: Number, default: 320 } }, emits: ["selectedRange", "chartUpdated"], setup(t2, { emit: l2 }) {
|
|
1949
|
+
const o2 = t2, s2 = y(() => ({ ...o2.options, ...wu })), u2 = y(() => o2.series), d2 = () => l2("chartUpdated");
|
|
1950
|
+
return (l3, o3) => (e(), n(c, null, [E(i("div", { class: a(["h-[" + t2.height + "px]", "card chart apex-chart px-4 py-5 bg-white shadow rounded-lg overflow-hidden sm:p-6 flex grow"]) }, [i("div", ku, [i("div", Su, _(t2.title), 1), r(ho, { range: t2.range, onRangeSelected: o3[0] || (o3[0] = (e2) => l3.$emit("selectedRange", { range: e2, chartId: t2.id })) }, null, 8, ["range"])]), E(i("div", Cu, [r(C(Y), { type: l3.bar, series: u2.value, width: "100%", height: t2.height, options: s2.value, onUpdated: d2, onMounted: d2 }, null, 8, ["type", "series", "height", "options"])], 512), [[B, !t2.empty]]), E(i("div", Ou, [r(z, { icon: C(Ul), color: "gray", loading: false, size: "huge" }, null, 8, ["icon"]), Du], 512), [[B, t2.empty]])], 2), [[B, !t2.loading]]), E(i("div", Mu, _u, 512), [[B, t2.loading]])], 64));
|
|
1951
|
+
} }), ju = { class: "w-full flex flex-col items-center justify-center p-10 grow" }, Eu = { class: "text-2xl mt-4 font-bold" }, Lu = { class: "buttons flex flex-row items-center justify-center mt-8 gap-x-1" }, Bu = { __name: "uiNoResults", props: { title: { type: String, required: true }, message: { type: String, required: true }, actions: { type: Array } }, emits: ["action"], setup: (l2, { emit: a2 }) => (a3, o2) => (e(), n("div", ju, [r(z, { loading: false, icon: C(Ul), size: "massive", color: "gray" }, null, 8, ["icon"]), i("h2", Eu, _(l2.title), 1), i("p", null, _(l2.message), 1), i("div", Lu, [(e(true), n(c, null, T(l2.actions, (l3, n2) => (e(), t(J, { key: n2, loading: false, onClick: (e2) => a3.$emit("action", l3.action) }, { default: D(() => [M(_(l3.text), 1)]), _: 2 }, 1032, ["onClick"]))), 128))])])) }, Iu = i("div", { class: "fixed inset-0" }, null, -1), Ru = { class: "fixed inset-0 overflow-hidden" }, Au = { class: "absolute inset-0 overflow-hidden" }, Fu = { class: "pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10" }, Nu = { class: "flex h-full flex-col overflow-y-scroll bg-white shadow-xl" }, $u = { class: "bg-indigo-700 px-4 py-6 sm:px-6" }, Hu = { class: "flex items-center justify-between" }, Yu = { class: "ml-3 flex h-7 items-center" }, Vu = i("span", { class: "absolute -inset-2.5" }, null, -1), zu = i("span", { class: "sr-only" }, "Close panel", -1), qu = { class: "mt-1" }, Uu = { class: "text-sm text-indigo-300" }, Wu = { class: "relative flex-1 px-4 py-6 sm:px-6" }, Ku = { name: "uiRightSidebar" }, Ju = Object.assign(Ku, { props: { title: { type: String, required: true }, description: { type: String }, open: { type: Boolean, default: false } }, emits: ["closeRightBar"], setup: (l2, { emit: a2 }) => (n2, s2) => (e(), t(C(Rl), { as: "template", show: l2.open }, { default: D(() => [r(C(Kt), { as: "div", class: "relative z-10", onClose: s2[1] || (s2[1] = (e2) => a2("closeRightBar")) }, { default: D(() => [Iu, i("div", Ru, [i("div", Au, [i("div", Fu, [r(C(Bl), { as: "template", enter: "transform transition ease-in-out duration-500 sm:duration-700", "enter-from": "translate-x-full", "enter-to": "translate-x-0", leave: "transform transition ease-in-out duration-500 sm:duration-700", "leave-from": "translate-x-0", "leave-to": "translate-x-full" }, { default: D(() => [r(C(Jt), { class: "pointer-events-auto w-screen max-w-md" }, { default: D(() => [i("div", Nu, [i("div", $u, [i("div", Hu, [r(C(Gt), { class: "text-base font-semibold leading-6 text-white" }, { default: D(() => [M(_(l2.title), 1)]), _: 1 }), i("div", Yu, [i("button", { type: "button", class: "relative rounded-md bg-indigo-700 text-indigo-200 hover:text-white outline-none", onClick: s2[0] || (s2[0] = (e2) => a2("closeRightBar")) }, [Vu, zu, r(C(Ql), { class: "h-6 w-6 ring-0", "aria-hidden": "true" })])])]), i("div", qu, [i("p", Uu, _(l2.description), 1)])]), i("div", Wu, [o(n2.$slots, "default")])])]), _: 3 })]), _: 3 })])])])]), _: 3 })]), _: 3 }, 8, ["show"])) }), Gu = { uiButton: J, uiIcon: z, uiCheckbox: ne, uiDropdown: na, uiInput: ma, uiInputFile: ja, uiSelect: Ra, uiTag: $a, uiTextArea: Wa, uiToggle: Za, uiAlert: cn, uiBreadcrumbs: wn, uiCard: Tn, uiFilter: En, uiModal: zn, uiNotification: lr, uiTaskList: mr, uiPriceCalendar: vo, uiChart: Po, uiFooter: Lo, uiLoadingScreen: Ro, uiPagination: Qo, uiSidebar: gi, uiStats: Di, uiStripedCard: Yi, uiTable: ps, uiTabs: xs, uiTimeline: Js, uiTopbar: xu, uiFunnelChartV2: Tu, uiNoResults: Bu, uiRightSidebar: Ju }, Xu = { install(e2) {
|
|
1952
|
+
Object.keys(Gu).forEach((t2) => {
|
|
1953
|
+
e2.component(t2, Gu[t2]);
|
|
1962
1954
|
});
|
|
1963
1955
|
} };
|
|
1964
1956
|
export {
|
|
1965
|
-
|
|
1957
|
+
Xu as default
|
|
1966
1958
|
};
|