@deck9/ui 0.15.0 → 0.15.2
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/src/ui.mjs +679 -667
- package/dist/src/ui.umd.js +4 -4
- package/package.json +1 -1
package/dist/src/ui.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { FontAwesomeIcon as
|
|
1
|
+
import { defineComponent as A, computed as k, openBlock as R, createBlock as K, unref as P, mergeProps as ot, createCommentVNode as M, createElementBlock as L, normalizeClass as $, createElementVNode as T, toDisplayString as H, createVNode as F, ref as C, getCurrentInstance as In, onMounted as ee, watch as Q, Fragment as be, withDirectives as An, vModelText as $n, normalizeStyle as Nt, cloneVNode as Mn, h as Oe, inject as he, provide as ye, watchEffect as xe, nextTick as B, onUnmounted as Ne, toRaw as X, shallowRef as Vn, getCurrentScope as Fn, onScopeDispose as Nn, shallowReadonly as me, withCtx as W, renderSlot as ht, Teleport as Bn, Transition as Bt, normalizeProps as jn, guardReactiveProps as zn, resolveDynamicComponent as Hn, isRef as Un, renderList as jt } from "vue";
|
|
2
|
+
import { FontAwesomeIcon as Wn } from "@fortawesome/vue-fontawesome";
|
|
3
3
|
import { library as lt } from "@fortawesome/fontawesome-svg-core";
|
|
4
|
-
import * as
|
|
4
|
+
import * as p from "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
import * as Se from "@fortawesome/free-brands-svg-icons";
|
|
6
|
-
var zt = "fas",
|
|
6
|
+
var zt = "fas", Ht = "numeric-input", Ut = 512, Wt = 512, Ze = [], Kt = "", Gt = "m409.445 111 2.112.004c34.066.146 46.74 3.848 59.517 10.681 13.037 6.973 23.268 17.204 30.24 30.241l.415.782c6.705 12.782 10.271 25.9 10.271 60.847v72.002c-.15 34.066-3.852 46.74-10.685 59.517-6.973 13.037-17.204 23.268-30.241 30.24l-.782.415C457.51 382.434 444.392 386 409.445 386h-306.89l-2.112-.004c-34.066-.146-46.74-3.848-59.517-10.681-13.037-6.973-23.268-17.204-30.24-30.241l-.415-.782C3.566 331.51 0 318.392 0 283.445v-69.89c0-35.66 3.713-48.592 10.685-61.629 6.973-13.037 17.204-23.268 30.241-30.24l.782-.415C54.49 114.566 67.608 111 102.555 111h306.89Zm.806 36H102.555l-2.387.005c-22.69.089-31.789 1.488-39.667 5.128l-.523.246c-.696.332-1.385.683-2.074 1.052-6.764 3.617-11.856 8.71-15.473 15.473l-.282.533c-4.492 8.62-6.116 17.401-6.148 43.312v71.502l.012 3.09c.161 24.044 1.9 32.308 6.418 40.755 3.617 6.764 8.71 11.856 15.473 15.473l.533.282c8.62 4.492 17.401 6.116 43.312 6.149h307.696c27.078 0 35.763-1.677 44.651-6.43 6.764-3.618 11.856-8.71 15.473-15.474l.282-.533c4.492-8.62 6.116-17.401 6.149-43.312v-70.696c0-27.078-1.677-35.763-6.43-44.651-3.618-6.764-8.71-11.856-15.474-15.473l-.533-.282c-8.62-4.492-17.401-6.116-43.312-6.149Zm-164.715 19c11.682 0 22.013 1.976 30.994 5.929 8.98 3.952 16.005 9.38 21.074 16.284 5.07 6.904 7.578 14.797 7.527 23.677.103 8.829-2.92 16.066-9.07 21.713-6.15 5.646-13.935 8.983-23.353 10.01v1.231c12.764 1.386 22.362 5.274 28.794 11.665 6.433 6.39 9.598 14.411 9.496 24.061.051 9.24-2.715 17.427-8.299 24.562-5.584 7.135-13.33 12.73-23.236 16.785-9.907 4.055-21.319 6.083-34.236 6.083-12.454 0-23.506-2.143-33.156-6.43-9.65-4.285-17.227-10.201-22.734-17.747-5.506-7.545-8.286-16.22-8.337-26.025h43.23c.051 3.029.99 5.737 2.817 8.124 1.827 2.386 4.336 4.247 7.527 5.582 3.19 1.334 6.845 2.002 10.962 2.002 3.962 0 7.462-.706 10.498-2.118 3.037-1.411 5.404-3.375 7.102-5.89 1.699-2.515 2.522-5.39 2.47-8.623.052-3.183-.913-6.006-2.894-8.47-1.982-2.464-4.748-4.389-8.299-5.775-3.55-1.386-7.642-2.079-12.274-2.079h-16.057v-29.566h16.057c4.271 0 8.041-.693 11.31-2.08 3.267-1.385 5.815-3.31 7.642-5.774s2.714-5.287 2.663-8.47c.051-3.08-.695-5.8-2.239-8.161-1.544-2.361-3.692-4.21-6.446-5.544-2.753-1.334-5.93-2.002-9.533-2.002-3.912 0-7.398.693-10.46 2.08-3.063 1.385-5.468 3.31-7.218 5.774s-2.65 5.287-2.702 8.47h-41.068c.051-9.65 2.715-18.172 7.99-25.563 5.275-7.392 12.518-13.192 21.73-17.401 9.212-4.21 19.788-6.314 31.728-6.314Zm-133.074 0c12.615 0 23.55 2.017 32.807 6.05 9.257 4.033 16.41 9.698 21.462 16.994 5.051 7.296 7.577 15.851 7.577 25.665 0 6.063-1.257 12.087-3.77 18.073-2.512 5.986-7.025 12.601-13.538 19.846-6.513 7.245-15.77 15.877-27.77 25.896l-14.768 12.331v.925H176V326H55.077v-30.829l58.77-48.709c3.897-3.237 7.243-6.28 10.038-9.133 2.794-2.851 4.948-5.793 6.461-8.824 1.513-3.032 2.27-6.397 2.27-10.097 0-4.059-.86-7.527-2.578-10.404-1.717-2.877-4.09-5.1-7.115-6.667-3.026-1.567-6.513-2.35-10.461-2.35-3.95 0-7.424.796-10.424 2.389-3 1.593-5.32 3.93-6.961 7.013-1.641 3.083-2.462 6.834-2.462 11.253H52c0-11.099 2.487-20.655 7.462-28.67 4.974-8.016 12-14.182 21.076-18.498 9.077-4.316 19.718-6.474 31.924-6.474Z";
|
|
7
7
|
const yt = {
|
|
8
8
|
prefix: zt,
|
|
9
|
-
iconName:
|
|
10
|
-
icon: [
|
|
11
|
-
},
|
|
9
|
+
iconName: Ht,
|
|
10
|
+
icon: [Ut, Wt, Ze, Kt, Gt]
|
|
11
|
+
}, Kn = {
|
|
12
12
|
definition: yt,
|
|
13
13
|
faAlignJustify: yt,
|
|
14
14
|
prefix: zt,
|
|
15
|
-
iconName:
|
|
16
|
-
width:
|
|
15
|
+
iconName: Ht,
|
|
16
|
+
width: Ut,
|
|
17
17
|
height: Wt,
|
|
18
18
|
ligatures: Ze,
|
|
19
19
|
unicode: Kt,
|
|
@@ -21,96 +21,106 @@ const yt = {
|
|
|
21
21
|
aliases: Ze
|
|
22
22
|
};
|
|
23
23
|
lt.add(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
24
|
+
p.faAlignCenter,
|
|
25
|
+
p.faAlignLeft,
|
|
26
|
+
p.faAlignRight,
|
|
27
|
+
p.faArrowUp19,
|
|
28
|
+
p.faAsterisk,
|
|
29
|
+
p.faAt,
|
|
30
|
+
p.faBold,
|
|
31
|
+
p.faBolt,
|
|
32
|
+
p.faCalendar,
|
|
33
|
+
p.faChartPie,
|
|
34
|
+
p.faCheck,
|
|
35
|
+
p.faCheckCircle,
|
|
36
|
+
p.faChevronDown,
|
|
37
|
+
p.faChevronLeft,
|
|
38
|
+
p.faChevronRight,
|
|
39
|
+
p.faChevronUp,
|
|
40
|
+
p.faCircleCheck,
|
|
41
|
+
p.faCircleNodes,
|
|
42
|
+
p.faCircleNotch,
|
|
43
|
+
p.faClipboard,
|
|
44
|
+
p.faCloudDownload,
|
|
45
|
+
p.faCloudUpload,
|
|
46
|
+
p.faCode,
|
|
47
|
+
p.faCodeBranch,
|
|
48
|
+
p.faCodeFork,
|
|
49
|
+
p.faCog,
|
|
50
|
+
p.faCrown,
|
|
51
|
+
p.faDiagramProject,
|
|
52
|
+
p.faDoorOpen,
|
|
53
|
+
p.faDotCircle,
|
|
54
|
+
p.faEllipsis,
|
|
55
|
+
p.faEllipsisVertical,
|
|
56
|
+
p.faEnvelope,
|
|
57
|
+
p.faExclamationTriangle,
|
|
58
|
+
p.faExternalLink,
|
|
59
|
+
p.faEyeDropper,
|
|
60
|
+
p.faFileLines,
|
|
61
|
+
p.faFilePdf,
|
|
62
|
+
p.faFileUpload,
|
|
63
|
+
p.faFileVideo,
|
|
64
|
+
p.faFileWaveform,
|
|
65
|
+
p.faFilter,
|
|
66
|
+
p.faFilter,
|
|
67
|
+
p.faFingerprint,
|
|
68
|
+
p.faFont,
|
|
69
|
+
p.faGears,
|
|
70
|
+
p.faGlobe,
|
|
71
|
+
p.faGripHorizontal,
|
|
72
|
+
p.faGripVertical,
|
|
73
|
+
p.faHandPointRight,
|
|
74
|
+
p.faHashtag,
|
|
75
|
+
p.faHeading,
|
|
76
|
+
p.faHeart,
|
|
77
|
+
p.faImage,
|
|
78
|
+
p.faInfoCircle,
|
|
79
|
+
p.faItalic,
|
|
80
|
+
p.faLink,
|
|
81
|
+
p.faLinkSlash,
|
|
82
|
+
p.faList,
|
|
83
|
+
p.faListOl,
|
|
84
|
+
p.faListUl,
|
|
85
|
+
p.faLock,
|
|
86
|
+
p.faLockOpen,
|
|
87
|
+
p.faMedal,
|
|
88
|
+
p.faMessage,
|
|
89
|
+
p.faMicrochip,
|
|
90
|
+
p.faPencilAlt,
|
|
91
|
+
p.faPenToSquare,
|
|
92
|
+
p.faPhone,
|
|
93
|
+
p.faPlayCircle,
|
|
94
|
+
p.faPlus,
|
|
95
|
+
p.faPlusCircle,
|
|
96
|
+
p.faPoo,
|
|
97
|
+
p.faPuzzlePiece,
|
|
98
|
+
p.faQuestion,
|
|
99
|
+
p.faQuoteLeft,
|
|
100
|
+
p.faQuoteRight,
|
|
101
|
+
p.faReply,
|
|
102
|
+
p.faReplyAll,
|
|
103
|
+
p.faRobot,
|
|
104
|
+
p.faSave,
|
|
105
|
+
p.faShield,
|
|
106
|
+
p.faSignal,
|
|
107
|
+
p.faSignature,
|
|
108
|
+
p.faSignature,
|
|
109
|
+
p.faSquareCheck,
|
|
110
|
+
p.faStar,
|
|
111
|
+
p.faStrikethrough,
|
|
112
|
+
p.faTerminal,
|
|
113
|
+
p.faTextSlash,
|
|
114
|
+
p.faTimes,
|
|
115
|
+
p.faTrash,
|
|
116
|
+
p.faTree,
|
|
117
|
+
p.faTrophy,
|
|
118
|
+
p.faTurnDown,
|
|
119
|
+
p.faUnderline,
|
|
120
|
+
p.faUpload,
|
|
121
|
+
p.faUser,
|
|
122
|
+
p.faUserShield,
|
|
123
|
+
p.faWandMagicSparkles,
|
|
114
124
|
// Brands
|
|
115
125
|
Se.faTwitter,
|
|
116
126
|
Se.faInstagram,
|
|
@@ -118,27 +128,27 @@ lt.add(
|
|
|
118
128
|
Se.faLinkedin,
|
|
119
129
|
Se.faFacebook,
|
|
120
130
|
// Custom
|
|
121
|
-
|
|
131
|
+
Kn.definition
|
|
122
132
|
);
|
|
123
|
-
const
|
|
133
|
+
const Gn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.definitions.fab)].sort(), z = /* @__PURE__ */ A({
|
|
124
134
|
__name: "Icon",
|
|
125
135
|
props: {
|
|
126
136
|
name: { default: "user" }
|
|
127
137
|
},
|
|
128
138
|
setup(e) {
|
|
129
|
-
const t = e, l = k(() => xt.includes(t.name) ? "fab" : "fas"), o = k(() =>
|
|
139
|
+
const t = e, l = k(() => xt.includes(t.name) ? "fab" : "fas"), o = k(() => Gn.includes(t.name) || xt.includes(t.name) ? !0 : (console.warn(
|
|
130
140
|
"could not load icon, because it is not available",
|
|
131
141
|
t.name
|
|
132
142
|
), !1));
|
|
133
|
-
return (n, r) => o.value ? (R(), K(P(
|
|
143
|
+
return (n, r) => o.value ? (R(), K(P(Wn), ot({
|
|
134
144
|
key: 0,
|
|
135
145
|
icon: [l.value, n.name]
|
|
136
146
|
}, n.$attrs), null, 16, ["icon"])) : M("", !0);
|
|
137
147
|
}
|
|
138
|
-
}),
|
|
148
|
+
}), qn = ["aria-label", "tabindex"], Xn = {
|
|
139
149
|
key: 0,
|
|
140
150
|
class: "absolute inset-0 flex items-center justify-center"
|
|
141
|
-
}, Rr = /* @__PURE__ */
|
|
151
|
+
}, Rr = /* @__PURE__ */ A({
|
|
142
152
|
__name: "Button",
|
|
143
153
|
props: {
|
|
144
154
|
label: {},
|
|
@@ -190,70 +200,70 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
190
200
|
function i() {
|
|
191
201
|
o.isDisabled || l("onClick");
|
|
192
202
|
}
|
|
193
|
-
return (u, c) => (R(),
|
|
194
|
-
class:
|
|
203
|
+
return (u, c) => (R(), L("button", {
|
|
204
|
+
class: $(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out", n.value]),
|
|
195
205
|
type: "button",
|
|
196
206
|
"aria-label": u.label,
|
|
197
207
|
tabindex: u.isDisabled ? "-1" : void 0,
|
|
198
208
|
onClick: i
|
|
199
209
|
}, [
|
|
200
|
-
|
|
201
|
-
class:
|
|
210
|
+
T("div", {
|
|
211
|
+
class: $(!u.isLoading || "invisible")
|
|
202
212
|
}, [
|
|
203
|
-
u.icon && u.iconPosition === "left" ? (R(), K(
|
|
213
|
+
u.icon && u.iconPosition === "left" ? (R(), K(z, {
|
|
204
214
|
key: 0,
|
|
205
215
|
name: u.icon,
|
|
206
|
-
class:
|
|
216
|
+
class: $(r.value)
|
|
207
217
|
}, null, 8, ["name", "class"])) : M("", !0),
|
|
208
|
-
|
|
209
|
-
u.icon && u.iconPosition === "right" ? (R(), K(
|
|
218
|
+
T("span", null, H(u.label), 1),
|
|
219
|
+
u.icon && u.iconPosition === "right" ? (R(), K(z, {
|
|
210
220
|
key: 1,
|
|
211
221
|
name: u.icon,
|
|
212
|
-
class:
|
|
222
|
+
class: $(r.value)
|
|
213
223
|
}, null, 8, ["name", "class"])) : M("", !0)
|
|
214
224
|
], 2),
|
|
215
|
-
u.isLoading ? (R(),
|
|
216
|
-
F(
|
|
225
|
+
u.isLoading ? (R(), L("span", Xn, [
|
|
226
|
+
F(z, {
|
|
217
227
|
class: "animate-spin",
|
|
218
228
|
name: "circle-notch"
|
|
219
229
|
})
|
|
220
230
|
])) : M("", !0)
|
|
221
|
-
], 10,
|
|
231
|
+
], 10, qn));
|
|
222
232
|
}
|
|
223
233
|
});
|
|
224
234
|
let Te;
|
|
225
|
-
const
|
|
226
|
-
function
|
|
235
|
+
const Yn = new Uint8Array(16);
|
|
236
|
+
function Qn() {
|
|
227
237
|
if (!Te && (Te = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Te))
|
|
228
238
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
229
|
-
return Te(
|
|
239
|
+
return Te(Yn);
|
|
230
240
|
}
|
|
231
241
|
const V = [];
|
|
232
242
|
for (let e = 0; e < 256; ++e)
|
|
233
243
|
V.push((e + 256).toString(16).slice(1));
|
|
234
|
-
function
|
|
244
|
+
function Zn(e, t = 0) {
|
|
235
245
|
return V[e[t + 0]] + V[e[t + 1]] + V[e[t + 2]] + V[e[t + 3]] + "-" + V[e[t + 4]] + V[e[t + 5]] + "-" + V[e[t + 6]] + V[e[t + 7]] + "-" + V[e[t + 8]] + V[e[t + 9]] + "-" + V[e[t + 10]] + V[e[t + 11]] + V[e[t + 12]] + V[e[t + 13]] + V[e[t + 14]] + V[e[t + 15]];
|
|
236
246
|
}
|
|
237
|
-
const
|
|
238
|
-
randomUUID:
|
|
247
|
+
const Jn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), wt = {
|
|
248
|
+
randomUUID: Jn
|
|
239
249
|
};
|
|
240
250
|
function qt(e, t, l) {
|
|
241
251
|
if (wt.randomUUID && !t && !e)
|
|
242
252
|
return wt.randomUUID();
|
|
243
253
|
e = e || {};
|
|
244
|
-
const o = e.random || (e.rng ||
|
|
254
|
+
const o = e.random || (e.rng || Qn)();
|
|
245
255
|
if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, t) {
|
|
246
256
|
l = l || 0;
|
|
247
257
|
for (let n = 0; n < 16; ++n)
|
|
248
258
|
t[l + n] = o[n];
|
|
249
259
|
return t;
|
|
250
260
|
}
|
|
251
|
-
return
|
|
261
|
+
return Zn(o);
|
|
252
262
|
}
|
|
253
|
-
const
|
|
263
|
+
const eo = { class: "relative flex items-start" }, to = { class: "flex items-center h-5" }, no = ["checked", "id"], oo = { class: "ml-2 text-sm leading-5" }, lo = ["for"], ro = {
|
|
254
264
|
key: 0,
|
|
255
265
|
class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
|
|
256
|
-
}, Er = /* @__PURE__ */
|
|
266
|
+
}, Er = /* @__PURE__ */ A({
|
|
257
267
|
__name: "Checkbox",
|
|
258
268
|
props: {
|
|
259
269
|
id: { default: qt() },
|
|
@@ -266,38 +276,38 @@ const to = { class: "relative flex items-start" }, no = { class: "flex items-cen
|
|
|
266
276
|
const l = t, o = (n) => {
|
|
267
277
|
l("update:modelValue", n.target.checked);
|
|
268
278
|
};
|
|
269
|
-
return (n, r) => (R(),
|
|
270
|
-
|
|
271
|
-
|
|
279
|
+
return (n, r) => (R(), L("div", eo, [
|
|
280
|
+
T("div", to, [
|
|
281
|
+
T("input", {
|
|
272
282
|
class: "h-4 w-4 border-grey-600 dark:text-blue-500 dark:border-grey-300 dark:checked:border-blue-500 dark:focus:ring-blue-900 dark:focus:ring-offset-grey-800 rounded-sm",
|
|
273
283
|
type: "checkbox",
|
|
274
284
|
checked: n.modelValue,
|
|
275
285
|
onChange: o,
|
|
276
286
|
id: n.id
|
|
277
|
-
}, null, 40,
|
|
287
|
+
}, null, 40, no)
|
|
278
288
|
]),
|
|
279
|
-
|
|
280
|
-
|
|
289
|
+
T("div", oo, [
|
|
290
|
+
T("label", {
|
|
281
291
|
for: n.id,
|
|
282
292
|
class: "font-medium text-grey-700 dark:text-grey-200 casual-25"
|
|
283
|
-
},
|
|
284
|
-
n.description ? (R(),
|
|
293
|
+
}, H(n.label), 9, lo),
|
|
294
|
+
n.description ? (R(), L("p", ro, H(n.description), 1)) : M("", !0)
|
|
285
295
|
])
|
|
286
296
|
]));
|
|
287
297
|
}
|
|
288
298
|
});
|
|
289
|
-
function
|
|
290
|
-
const e =
|
|
299
|
+
function io() {
|
|
300
|
+
const e = C(!1);
|
|
291
301
|
return In() && ee(() => {
|
|
292
302
|
e.value = !0;
|
|
293
303
|
}), e;
|
|
294
304
|
}
|
|
295
|
-
function
|
|
296
|
-
const t =
|
|
305
|
+
function ao(e) {
|
|
306
|
+
const t = io();
|
|
297
307
|
return k(() => (t.value, !!e()));
|
|
298
308
|
}
|
|
299
|
-
function
|
|
300
|
-
const { initialValue: t = "" } = e, l =
|
|
309
|
+
function so(e = {}) {
|
|
310
|
+
const { initialValue: t = "" } = e, l = ao(() => typeof window < "u" && "EyeDropper" in window), o = C(t);
|
|
301
311
|
async function n(r) {
|
|
302
312
|
if (!l.value)
|
|
303
313
|
return;
|
|
@@ -306,22 +316,22 @@ function uo(e = {}) {
|
|
|
306
316
|
}
|
|
307
317
|
return { isSupported: l, sRGBHex: o, open: n };
|
|
308
318
|
}
|
|
309
|
-
const
|
|
310
|
-
},
|
|
319
|
+
const uo = () => {
|
|
320
|
+
}, co = Array.isArray, fo = (e) => typeof e == "function", po = (e) => typeof e == "symbol";
|
|
311
321
|
let kt;
|
|
312
322
|
const St = () => kt || (kt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
|
|
313
|
-
let
|
|
314
|
-
function
|
|
323
|
+
let mo;
|
|
324
|
+
function vo(e, t = mo) {
|
|
315
325
|
t && t.active && t.effects.push(e);
|
|
316
326
|
}
|
|
317
|
-
const
|
|
327
|
+
const go = (e) => {
|
|
318
328
|
const t = new Set(e);
|
|
319
329
|
return t.w = 0, t.n = 0, t;
|
|
320
|
-
}, Xt = (e) => (e.w & ie) > 0, Yt = (e) => (e.n & ie) > 0,
|
|
330
|
+
}, Xt = (e) => (e.w & ie) > 0, Yt = (e) => (e.n & ie) > 0, bo = ({ deps: e }) => {
|
|
321
331
|
if (e.length)
|
|
322
332
|
for (let t = 0; t < e.length; t++)
|
|
323
333
|
e[t].w |= ie;
|
|
324
|
-
},
|
|
334
|
+
}, ho = (e) => {
|
|
325
335
|
const { deps: t } = e;
|
|
326
336
|
if (t.length) {
|
|
327
337
|
let l = 0;
|
|
@@ -332,33 +342,33 @@ const bo = (e) => {
|
|
|
332
342
|
t.length = l;
|
|
333
343
|
}
|
|
334
344
|
};
|
|
335
|
-
let
|
|
345
|
+
let Ce = 0, ie = 1;
|
|
336
346
|
const Je = 30;
|
|
337
347
|
let Y;
|
|
338
|
-
class
|
|
348
|
+
class yo {
|
|
339
349
|
constructor(t, l = null, o) {
|
|
340
|
-
this.fn = t, this.scheduler = l, this.active = !0, this.deps = [], this.parent = void 0,
|
|
350
|
+
this.fn = t, this.scheduler = l, this.active = !0, this.deps = [], this.parent = void 0, vo(this, o);
|
|
341
351
|
}
|
|
342
352
|
run() {
|
|
343
353
|
if (!this.active)
|
|
344
354
|
return this.fn();
|
|
345
|
-
let t = Y, l =
|
|
355
|
+
let t = Y, l = Ae;
|
|
346
356
|
for (; t; ) {
|
|
347
357
|
if (t === this)
|
|
348
358
|
return;
|
|
349
359
|
t = t.parent;
|
|
350
360
|
}
|
|
351
361
|
try {
|
|
352
|
-
return this.parent = Y, Y = this,
|
|
362
|
+
return this.parent = Y, Y = this, Ae = !0, ie = 1 << ++Ce, Ce <= Je ? bo(this) : Ct(this), this.fn();
|
|
353
363
|
} finally {
|
|
354
|
-
|
|
364
|
+
Ce <= Je && ho(this), ie = 1 << --Ce, Y = this.parent, Ae = l, this.parent = void 0, this.deferStop && this.stop();
|
|
355
365
|
}
|
|
356
366
|
}
|
|
357
367
|
stop() {
|
|
358
|
-
Y === this ? this.deferStop = !0 : this.active && (
|
|
368
|
+
Y === this ? this.deferStop = !0 : this.active && (Ct(this), this.onStop && this.onStop(), this.active = !1);
|
|
359
369
|
}
|
|
360
370
|
}
|
|
361
|
-
function
|
|
371
|
+
function Ct(e) {
|
|
362
372
|
const { deps: t } = e;
|
|
363
373
|
if (t.length) {
|
|
364
374
|
for (let l = 0; l < t.length; l++)
|
|
@@ -366,59 +376,59 @@ function Ot(e) {
|
|
|
366
376
|
t.length = 0;
|
|
367
377
|
}
|
|
368
378
|
}
|
|
369
|
-
let
|
|
370
|
-
function
|
|
379
|
+
let Ae = !0;
|
|
380
|
+
function xo(e, t) {
|
|
371
381
|
let l = !1;
|
|
372
|
-
|
|
382
|
+
Ce <= Je ? Yt(e) || (e.n |= ie, l = !Xt(e)) : l = !e.has(Y), l && (e.add(Y), Y.deps.push(e));
|
|
373
383
|
}
|
|
374
|
-
function
|
|
375
|
-
const l =
|
|
384
|
+
function wo(e, t) {
|
|
385
|
+
const l = co(e) ? e : [...e];
|
|
376
386
|
for (const o of l)
|
|
377
|
-
o.computed &&
|
|
387
|
+
o.computed && Ot(o);
|
|
378
388
|
for (const o of l)
|
|
379
|
-
o.computed ||
|
|
389
|
+
o.computed || Ot(o);
|
|
380
390
|
}
|
|
381
|
-
function
|
|
391
|
+
function Ot(e, t) {
|
|
382
392
|
(e !== Y || e.allowRecurse) && (e.scheduler ? e.scheduler() : e.run());
|
|
383
393
|
}
|
|
384
394
|
new Set(
|
|
385
|
-
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(
|
|
395
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(po)
|
|
386
396
|
);
|
|
387
397
|
function Be(e) {
|
|
388
398
|
const t = e && e.__v_raw;
|
|
389
399
|
return t ? Be(t) : e;
|
|
390
400
|
}
|
|
391
|
-
function
|
|
392
|
-
|
|
401
|
+
function ko(e) {
|
|
402
|
+
Ae && Y && (e = Be(e), xo(e.dep || (e.dep = go())));
|
|
393
403
|
}
|
|
394
|
-
function
|
|
404
|
+
function So(e, t) {
|
|
395
405
|
e = Be(e);
|
|
396
406
|
const l = e.dep;
|
|
397
|
-
l &&
|
|
407
|
+
l && wo(l);
|
|
398
408
|
}
|
|
399
409
|
class Co {
|
|
400
410
|
constructor(t, l, o, n) {
|
|
401
|
-
this._setter = l, this.dep = void 0, this.__v_isRef = !0, this.__v_isReadonly = !1, this._dirty = !0, this.effect = new
|
|
402
|
-
this._dirty || (this._dirty = !0,
|
|
411
|
+
this._setter = l, this.dep = void 0, this.__v_isRef = !0, this.__v_isReadonly = !1, this._dirty = !0, this.effect = new yo(t, () => {
|
|
412
|
+
this._dirty || (this._dirty = !0, So(this));
|
|
403
413
|
}), this.effect.computed = this, this.effect.active = this._cacheable = !n, this.__v_isReadonly = o;
|
|
404
414
|
}
|
|
405
415
|
get value() {
|
|
406
416
|
const t = Be(this);
|
|
407
|
-
return
|
|
417
|
+
return ko(t), (t._dirty || !t._cacheable) && (t._dirty = !1, t._value = t.effect.run()), t._value;
|
|
408
418
|
}
|
|
409
419
|
set value(t) {
|
|
410
420
|
this._setter(t);
|
|
411
421
|
}
|
|
412
422
|
}
|
|
413
|
-
function
|
|
423
|
+
function Oo(e, t, l = !1) {
|
|
414
424
|
let o, n;
|
|
415
|
-
const r =
|
|
416
|
-
return r ? (o = e, n =
|
|
425
|
+
const r = fo(e);
|
|
426
|
+
return r ? (o = e, n = uo) : (o = e.get, n = e.set), new Co(o, n, r || !n, l);
|
|
417
427
|
}
|
|
418
428
|
let Xe, Rt = "__VUE_INSTANCE_SETTERS__";
|
|
419
429
|
(Xe = St()[Rt]) || (Xe = St()[Rt] = []), Xe.push((e) => e);
|
|
420
|
-
let
|
|
421
|
-
const Ye = (e, t) =>
|
|
430
|
+
let Ro = !1;
|
|
431
|
+
const Ye = (e, t) => Oo(e, t, Ro);
|
|
422
432
|
function rt(e) {
|
|
423
433
|
const t = Ye(() => ({
|
|
424
434
|
"pl-3 pr-10 py-2": !e.icon && e.type !== "color" && e.size === "small",
|
|
@@ -440,10 +450,10 @@ function rt(e) {
|
|
|
440
450
|
textSizeClasses: o
|
|
441
451
|
};
|
|
442
452
|
}
|
|
443
|
-
const
|
|
453
|
+
const Eo = ["placeholder", "type", "tabindex", "value"], Do = { class: "absolute inset-y-2 left-2 w-8 cursor-pointer" }, Po = {
|
|
444
454
|
inheritAttrs: !1
|
|
445
|
-
}, Dr = /* @__PURE__ */
|
|
446
|
-
...
|
|
455
|
+
}, Dr = /* @__PURE__ */ A({
|
|
456
|
+
...Po,
|
|
447
457
|
__name: "Input",
|
|
448
458
|
props: {
|
|
449
459
|
modelValue: {},
|
|
@@ -459,7 +469,7 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
459
469
|
},
|
|
460
470
|
emits: ["update:modelValue"],
|
|
461
471
|
setup(e, { expose: t, emit: l }) {
|
|
462
|
-
const o = e, n =
|
|
472
|
+
const o = e, n = C(null), r = C(o.modelValue ?? "");
|
|
463
473
|
Q(
|
|
464
474
|
() => o.modelValue,
|
|
465
475
|
(y) => {
|
|
@@ -468,15 +478,15 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
468
478
|
);
|
|
469
479
|
const i = l, { inputClasses: u, disabledClasses: c, textSizeClasses: a } = rt(o), s = k(() => o.type === "color" ? "text" : o.type), {
|
|
470
480
|
isSupported: d,
|
|
471
|
-
open:
|
|
481
|
+
open: v,
|
|
472
482
|
sRGBHex: f
|
|
473
|
-
} =
|
|
474
|
-
|
|
483
|
+
} = so(), g = () => {
|
|
484
|
+
v();
|
|
475
485
|
};
|
|
476
486
|
Q(f, (y) => {
|
|
477
487
|
r.value = y, i("update:modelValue", y);
|
|
478
488
|
});
|
|
479
|
-
const
|
|
489
|
+
const m = function(y) {
|
|
480
490
|
const x = (y == null ? void 0 : y.target).value;
|
|
481
491
|
if (o.type === "number" && o.min && parseInt(x) < o.min) {
|
|
482
492
|
r.value = o.min, n.value.value = r.value.toString(), i("update:modelValue", o.min);
|
|
@@ -487,15 +497,15 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
487
497
|
return;
|
|
488
498
|
}
|
|
489
499
|
r.value = (y == null ? void 0 : y.target).value, i("update:modelValue", r.value);
|
|
490
|
-
}, h =
|
|
500
|
+
}, h = C(null);
|
|
491
501
|
return t({
|
|
492
502
|
focus: () => {
|
|
493
503
|
o.isDisabled || h.value.focus();
|
|
494
504
|
}
|
|
495
|
-
}), (y, x) => (R(),
|
|
496
|
-
class:
|
|
505
|
+
}), (y, x) => (R(), L("div", {
|
|
506
|
+
class: $(["relative", [y.block ? "w-full block" : "inline-block"]])
|
|
497
507
|
}, [
|
|
498
|
-
|
|
508
|
+
T("input", ot({
|
|
499
509
|
class: ["relative mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [P(u), P(a), P(c)]],
|
|
500
510
|
placeholder: y.placeholder,
|
|
501
511
|
type: s.value,
|
|
@@ -504,46 +514,46 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
504
514
|
}, y.$attrs, {
|
|
505
515
|
ref_key: "inputElement",
|
|
506
516
|
ref: n,
|
|
507
|
-
onInput:
|
|
508
|
-
}), null, 16,
|
|
509
|
-
y.type === "color" ? (R(),
|
|
510
|
-
|
|
511
|
-
|
|
517
|
+
onInput: m
|
|
518
|
+
}), null, 16, Eo),
|
|
519
|
+
y.type === "color" ? (R(), L(be, { key: 0 }, [
|
|
520
|
+
T("label", Do, [
|
|
521
|
+
An(T("input", {
|
|
512
522
|
class: "invisible",
|
|
513
523
|
type: "color",
|
|
514
524
|
"onUpdate:modelValue": x[0] || (x[0] = (w) => r.value = w),
|
|
515
|
-
onInput:
|
|
525
|
+
onInput: m
|
|
516
526
|
}, null, 544), [
|
|
517
|
-
[
|
|
527
|
+
[$n, r.value]
|
|
518
528
|
]),
|
|
519
|
-
|
|
529
|
+
T("span", {
|
|
520
530
|
class: "border-1 absolute inset-0 block rounded border border-grey-600/25 bg-clip-border shadow",
|
|
521
531
|
style: Nt(`background-color: ${r.value}`)
|
|
522
532
|
}, null, 4)
|
|
523
533
|
]),
|
|
524
|
-
P(d) && y.showColorPicker ? (R(),
|
|
534
|
+
P(d) && y.showColorPicker ? (R(), L("button", {
|
|
525
535
|
key: 0,
|
|
526
536
|
type: "button",
|
|
527
537
|
class: "absolute inset-y-2 right-2 h-7 w-7 rounded-full hover:bg-grey-200",
|
|
528
|
-
onClick:
|
|
538
|
+
onClick: g
|
|
529
539
|
}, [
|
|
530
|
-
F(
|
|
540
|
+
F(z, {
|
|
531
541
|
size: "xs",
|
|
532
542
|
name: "eyedropper"
|
|
533
543
|
})
|
|
534
544
|
])) : M("", !0)
|
|
535
|
-
], 64)) : y.icon ? (R(),
|
|
545
|
+
], 64)) : y.icon ? (R(), L("span", {
|
|
536
546
|
key: 1,
|
|
537
|
-
class:
|
|
547
|
+
class: $(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", P(a)])
|
|
538
548
|
}, [
|
|
539
|
-
F(
|
|
549
|
+
F(z, { name: y.icon }, null, 8, ["name"])
|
|
540
550
|
], 2)) : M("", !0)
|
|
541
551
|
], 2));
|
|
542
552
|
}
|
|
543
|
-
}),
|
|
553
|
+
}), _o = { class: "inline-block text-grey-700 dark:text-grey-200 text-sm font-medium casual-20" }, To = ["for"], Lo = {
|
|
544
554
|
key: 0,
|
|
545
555
|
class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
|
|
546
|
-
}, Pr = /* @__PURE__ */
|
|
556
|
+
}, Pr = /* @__PURE__ */ A({
|
|
547
557
|
__name: "Label",
|
|
548
558
|
props: {
|
|
549
559
|
id: {},
|
|
@@ -551,9 +561,9 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
551
561
|
description: {}
|
|
552
562
|
},
|
|
553
563
|
setup(e) {
|
|
554
|
-
return (t, l) => (R(),
|
|
555
|
-
|
|
556
|
-
t.description ? (R(),
|
|
564
|
+
return (t, l) => (R(), L("span", _o, [
|
|
565
|
+
T("label", { for: t.id }, H(t.label), 9, To),
|
|
566
|
+
t.description ? (R(), L("span", Lo, H(t.description), 1)) : M("", !0)
|
|
557
567
|
]));
|
|
558
568
|
}
|
|
559
569
|
});
|
|
@@ -565,8 +575,8 @@ function G(e, t, ...l) {
|
|
|
565
575
|
let o = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((n) => `"${n}"`).join(", ")}.`);
|
|
566
576
|
throw Error.captureStackTrace && Error.captureStackTrace(o, G), o;
|
|
567
577
|
}
|
|
568
|
-
var Re = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Re || {}),
|
|
569
|
-
function
|
|
578
|
+
var Re = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Re || {}), Io = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Io || {});
|
|
579
|
+
function j({ visible: e = !0, features: t = 0, ourProps: l, theirProps: o, ...n }) {
|
|
570
580
|
var r;
|
|
571
581
|
let i = Zt(o, l), u = Object.assign(n, { props: i });
|
|
572
582
|
if (e || t & 2 && i.static)
|
|
@@ -585,27 +595,27 @@ function Qe({ props: e, attrs: t, slots: l, slot: o, name: n }) {
|
|
|
585
595
|
var r, i;
|
|
586
596
|
let { as: u, ...c } = it(e, ["unmount", "static"]), a = (r = l.default) == null ? void 0 : r.call(l, o), s = {};
|
|
587
597
|
if (o) {
|
|
588
|
-
let d = !1,
|
|
589
|
-
for (let [f,
|
|
590
|
-
typeof
|
|
591
|
-
d && (s["data-headlessui-state"] =
|
|
598
|
+
let d = !1, v = [];
|
|
599
|
+
for (let [f, g] of Object.entries(o))
|
|
600
|
+
typeof g == "boolean" && (d = !0), g === !0 && v.push(f);
|
|
601
|
+
d && (s["data-headlessui-state"] = v.join(" "));
|
|
592
602
|
}
|
|
593
603
|
if (u === "template") {
|
|
594
604
|
if (a = Qt(a ?? []), Object.keys(c).length > 0 || Object.keys(t).length > 0) {
|
|
595
|
-
let [d, ...
|
|
596
|
-
if (!Ao(d) ||
|
|
597
|
-
throw new Error(['Passing props on "template"!', "", `The current component <${n} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(c).concat(Object.keys(t)).map((
|
|
598
|
-
`), "", "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((
|
|
605
|
+
let [d, ...v] = a ?? [];
|
|
606
|
+
if (!Ao(d) || v.length > 0)
|
|
607
|
+
throw new Error(['Passing props on "template"!', "", `The current component <${n} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(c).concat(Object.keys(t)).map((m) => m.trim()).filter((m, h, b) => b.indexOf(m) === h).sort((m, h) => m.localeCompare(h)).map((m) => ` - ${m}`).join(`
|
|
608
|
+
`), "", "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((m) => ` - ${m}`).join(`
|
|
599
609
|
`)].join(`
|
|
600
610
|
`));
|
|
601
|
-
let f = Zt((i = d.props) != null ? i : {}, c),
|
|
602
|
-
for (let
|
|
603
|
-
|
|
604
|
-
return
|
|
611
|
+
let f = Zt((i = d.props) != null ? i : {}, c), g = Mn(d, f);
|
|
612
|
+
for (let m in f)
|
|
613
|
+
m.startsWith("on") && (g.props || (g.props = {}), g.props[m] = f[m]);
|
|
614
|
+
return g;
|
|
605
615
|
}
|
|
606
616
|
return Array.isArray(a) && a.length === 1 ? a[0] : a;
|
|
607
617
|
}
|
|
608
|
-
return
|
|
618
|
+
return Oe(u, Object.assign({}, c, s), { default: () => a });
|
|
609
619
|
}
|
|
610
620
|
function Qt(e) {
|
|
611
621
|
return e.flatMap((t) => t.type === be ? Qt(t.children) : [t]);
|
|
@@ -647,18 +657,18 @@ function it(e, t = []) {
|
|
|
647
657
|
function Ao(e) {
|
|
648
658
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
649
659
|
}
|
|
650
|
-
let
|
|
651
|
-
function
|
|
652
|
-
return
|
|
660
|
+
let $o = 0;
|
|
661
|
+
function Mo() {
|
|
662
|
+
return ++$o;
|
|
653
663
|
}
|
|
654
664
|
function J() {
|
|
655
|
-
return
|
|
665
|
+
return Mo();
|
|
656
666
|
}
|
|
657
667
|
var D = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(D || {});
|
|
658
|
-
function
|
|
668
|
+
function Vo(e) {
|
|
659
669
|
throw new Error("Unexpected object: " + e);
|
|
660
670
|
}
|
|
661
|
-
var
|
|
671
|
+
var I = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(I || {});
|
|
662
672
|
function en(e, t) {
|
|
663
673
|
let l = t.resolveItems();
|
|
664
674
|
if (l.length <= 0)
|
|
@@ -682,7 +692,7 @@ function en(e, t) {
|
|
|
682
692
|
case 5:
|
|
683
693
|
return null;
|
|
684
694
|
default:
|
|
685
|
-
|
|
695
|
+
Vo(e);
|
|
686
696
|
}
|
|
687
697
|
})();
|
|
688
698
|
return r === -1 ? o : r;
|
|
@@ -707,7 +717,7 @@ function Et(e, t) {
|
|
|
707
717
|
return "button";
|
|
708
718
|
}
|
|
709
719
|
function at(e, t) {
|
|
710
|
-
let l =
|
|
720
|
+
let l = C(Et(e.value.type, e.value.as));
|
|
711
721
|
return ee(() => {
|
|
712
722
|
l.value = Et(e.value.type, e.value.as);
|
|
713
723
|
}), xe(() => {
|
|
@@ -715,8 +725,8 @@ function at(e, t) {
|
|
|
715
725
|
l.value || E(t) && E(t) instanceof HTMLButtonElement && !((o = E(t)) != null && o.hasAttribute("type")) && (l.value = "button");
|
|
716
726
|
}), l;
|
|
717
727
|
}
|
|
718
|
-
var
|
|
719
|
-
class
|
|
728
|
+
var Fo = Object.defineProperty, No = (e, t, l) => t in e ? Fo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, Dt = (e, t, l) => (No(e, typeof t != "symbol" ? t + "" : t, l), l);
|
|
729
|
+
class Bo {
|
|
720
730
|
constructor() {
|
|
721
731
|
Dt(this, "current", this.detect()), Dt(this, "currentId", 0);
|
|
722
732
|
}
|
|
@@ -739,7 +749,7 @@ class jo {
|
|
|
739
749
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
740
750
|
}
|
|
741
751
|
}
|
|
742
|
-
let st = new
|
|
752
|
+
let st = new Bo();
|
|
743
753
|
function ut(e) {
|
|
744
754
|
if (st.isServer)
|
|
745
755
|
return null;
|
|
@@ -752,7 +762,7 @@ function ut(e) {
|
|
|
752
762
|
}
|
|
753
763
|
return document;
|
|
754
764
|
}
|
|
755
|
-
function
|
|
765
|
+
function jo({ container: e, accept: t, walk: l, enabled: o }) {
|
|
756
766
|
xe(() => {
|
|
757
767
|
let n = e.value;
|
|
758
768
|
if (!n || o !== void 0 && !o.value)
|
|
@@ -766,7 +776,7 @@ function zo({ container: e, accept: t, walk: l, enabled: o }) {
|
|
|
766
776
|
});
|
|
767
777
|
}
|
|
768
778
|
let et = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
|
769
|
-
var tt = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(tt || {}),
|
|
779
|
+
var tt = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(tt || {}), zo = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(zo || {}), Ho = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Ho || {});
|
|
770
780
|
function ln(e = document.body) {
|
|
771
781
|
return e == null ? [] : Array.from(e.querySelectorAll(et)).sort((t, l) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (l.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
772
782
|
}
|
|
@@ -787,23 +797,23 @@ function ze(e, t = 0) {
|
|
|
787
797
|
}
|
|
788
798
|
function rn(e) {
|
|
789
799
|
let t = ut(e);
|
|
790
|
-
|
|
791
|
-
t && !ze(t.activeElement, 0) &&
|
|
800
|
+
B(() => {
|
|
801
|
+
t && !ze(t.activeElement, 0) && Wo(e);
|
|
792
802
|
});
|
|
793
803
|
}
|
|
794
|
-
var
|
|
804
|
+
var Uo = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(Uo || {});
|
|
795
805
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
796
806
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
797
807
|
}, !0), document.addEventListener("click", (e) => {
|
|
798
808
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
799
809
|
}, !0));
|
|
800
|
-
function
|
|
810
|
+
function Wo(e) {
|
|
801
811
|
e == null || e.focus({ preventScroll: !0 });
|
|
802
812
|
}
|
|
803
|
-
let
|
|
804
|
-
function
|
|
813
|
+
let Ko = ["textarea", "input"].join(",");
|
|
814
|
+
function Go(e) {
|
|
805
815
|
var t, l;
|
|
806
|
-
return (l = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e,
|
|
816
|
+
return (l = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, Ko)) != null ? l : !1;
|
|
807
817
|
}
|
|
808
818
|
function ct(e, t = (l) => l) {
|
|
809
819
|
return e.slice().sort((l, o) => {
|
|
@@ -814,13 +824,13 @@ function ct(e, t = (l) => l) {
|
|
|
814
824
|
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
815
825
|
});
|
|
816
826
|
}
|
|
817
|
-
function
|
|
818
|
-
return
|
|
827
|
+
function qo(e, t) {
|
|
828
|
+
return Xo(ln(), t, { relativeTo: e });
|
|
819
829
|
}
|
|
820
|
-
function
|
|
830
|
+
function Xo(e, t, { sorted: l = !0, relativeTo: o = null, skipElements: n = [] } = {}) {
|
|
821
831
|
var r;
|
|
822
832
|
let i = (r = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? r : document, u = Array.isArray(e) ? l ? ct(e) : e : ln(e);
|
|
823
|
-
n.length > 0 && u.length > 1 && (u = u.filter((
|
|
833
|
+
n.length > 0 && u.length > 1 && (u = u.filter((g) => !n.includes(g))), o = o ?? i.activeElement;
|
|
824
834
|
let c = (() => {
|
|
825
835
|
if (t & 5)
|
|
826
836
|
return 1;
|
|
@@ -837,29 +847,29 @@ function Yo(e, t, { sorted: l = !0, relativeTo: o = null, skipElements: n = [] }
|
|
|
837
847
|
if (t & 8)
|
|
838
848
|
return u.length - 1;
|
|
839
849
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
840
|
-
})(), s = t & 32 ? { preventScroll: !0 } : {}, d = 0,
|
|
850
|
+
})(), s = t & 32 ? { preventScroll: !0 } : {}, d = 0, v = u.length, f;
|
|
841
851
|
do {
|
|
842
|
-
if (d >=
|
|
852
|
+
if (d >= v || d + v <= 0)
|
|
843
853
|
return 0;
|
|
844
|
-
let
|
|
854
|
+
let g = a + d;
|
|
845
855
|
if (t & 16)
|
|
846
|
-
|
|
856
|
+
g = (g + v) % v;
|
|
847
857
|
else {
|
|
848
|
-
if (
|
|
858
|
+
if (g < 0)
|
|
849
859
|
return 3;
|
|
850
|
-
if (
|
|
860
|
+
if (g >= v)
|
|
851
861
|
return 1;
|
|
852
862
|
}
|
|
853
|
-
f = u[
|
|
863
|
+
f = u[g], f == null || f.focus(s), d += c;
|
|
854
864
|
} while (f !== i.activeElement);
|
|
855
|
-
return t & 6 &&
|
|
865
|
+
return t & 6 && Go(f) && f.select(), 2;
|
|
856
866
|
}
|
|
857
867
|
function Le(e, t, l) {
|
|
858
868
|
st.isServer || xe((o) => {
|
|
859
869
|
document.addEventListener(e, t, l), o(() => document.removeEventListener(e, t, l));
|
|
860
870
|
});
|
|
861
871
|
}
|
|
862
|
-
function
|
|
872
|
+
function Yo(e, t, l) {
|
|
863
873
|
st.isServer || xe((o) => {
|
|
864
874
|
window.addEventListener(e, t, l), o(() => window.removeEventListener(e, t, l));
|
|
865
875
|
});
|
|
@@ -883,7 +893,7 @@ function an(e, t, l = k(() => !0)) {
|
|
|
883
893
|
}
|
|
884
894
|
return !ze(u, je.Loose) && u.tabIndex !== -1 && r.preventDefault(), t(r, u);
|
|
885
895
|
}
|
|
886
|
-
let n =
|
|
896
|
+
let n = C(null);
|
|
887
897
|
Le("pointerdown", (r) => {
|
|
888
898
|
var i, u;
|
|
889
899
|
l.value && (n.value = ((u = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : u[0]) || r.target);
|
|
@@ -892,13 +902,13 @@ function an(e, t, l = k(() => !0)) {
|
|
|
892
902
|
l.value && (n.value = ((u = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : u[0]) || r.target);
|
|
893
903
|
}, !0), Le("click", (r) => {
|
|
894
904
|
n.value && (o(r, () => n.value), n.value = null);
|
|
895
|
-
}, !0), Le("touchend", (r) => o(r, () => r.target instanceof HTMLElement ? r.target : null), !0),
|
|
905
|
+
}, !0), Le("touchend", (r) => o(r, () => r.target instanceof HTMLElement ? r.target : null), !0), Yo("blur", (r) => o(r, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
896
906
|
}
|
|
897
907
|
var dt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(dt || {});
|
|
898
|
-
let sn =
|
|
908
|
+
let sn = A({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: t, attrs: l }) {
|
|
899
909
|
return () => {
|
|
900
910
|
let { features: o, ...n } = e, r = { "aria-hidden": (o & 2) === 2 ? !0 : 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", ...(o & 4) === 4 && (o & 2) !== 2 && { display: "none" } } };
|
|
901
|
-
return
|
|
911
|
+
return j({ ourProps: r, theirProps: n, slot: {}, attrs: l, slots: t, name: "Hidden" });
|
|
902
912
|
};
|
|
903
913
|
} });
|
|
904
914
|
function un(e = {}, t = null, l = []) {
|
|
@@ -916,7 +926,7 @@ function dn(e, t, l) {
|
|
|
916
926
|
else
|
|
917
927
|
l instanceof Date ? e.push([t, l.toISOString()]) : typeof l == "boolean" ? e.push([t, l ? "1" : "0"]) : typeof l == "string" ? e.push([t, l]) : typeof l == "number" ? e.push([t, `${l}`]) : l == null ? e.push([t, ""]) : un(l, t, e);
|
|
918
928
|
}
|
|
919
|
-
function
|
|
929
|
+
function Qo(e) {
|
|
920
930
|
var t, l;
|
|
921
931
|
let o = (t = e == null ? void 0 : e.form) != null ? t : e.closest("form");
|
|
922
932
|
if (o) {
|
|
@@ -929,7 +939,7 @@ function Zo(e) {
|
|
|
929
939
|
}
|
|
930
940
|
}
|
|
931
941
|
function fn(e, t, l) {
|
|
932
|
-
let o =
|
|
942
|
+
let o = C(l == null ? void 0 : l.value), n = k(() => e.value !== void 0);
|
|
933
943
|
return [k(() => n.value ? e.value : o.value), function(r) {
|
|
934
944
|
return n.value || (o.value = r), t == null ? void 0 : t(r);
|
|
935
945
|
}];
|
|
@@ -938,7 +948,7 @@ function Pt(e) {
|
|
|
938
948
|
return [e.screenX, e.screenY];
|
|
939
949
|
}
|
|
940
950
|
function pn() {
|
|
941
|
-
let e =
|
|
951
|
+
let e = C([-1, -1]);
|
|
942
952
|
return { wasMoved(t) {
|
|
943
953
|
let l = Pt(t);
|
|
944
954
|
return e.value[0] === l[0] && e.value[1] === l[1] ? !1 : (e.value = l, !0);
|
|
@@ -947,14 +957,14 @@ function pn() {
|
|
|
947
957
|
} };
|
|
948
958
|
}
|
|
949
959
|
let mn = Symbol("DescriptionContext");
|
|
950
|
-
function
|
|
960
|
+
function Zo() {
|
|
951
961
|
let e = he(mn, null);
|
|
952
962
|
if (e === null)
|
|
953
963
|
throw new Error("Missing parent");
|
|
954
964
|
return e;
|
|
955
965
|
}
|
|
956
|
-
function
|
|
957
|
-
let o =
|
|
966
|
+
function Jo({ slot: e = C({}), name: t = "Description", props: l = {} } = {}) {
|
|
967
|
+
let o = C([]);
|
|
958
968
|
function n(r) {
|
|
959
969
|
return o.value.push(r), () => {
|
|
960
970
|
let i = o.value.indexOf(r);
|
|
@@ -963,11 +973,11 @@ function el({ slot: e = O({}), name: t = "Description", props: l = {} } = {}) {
|
|
|
963
973
|
}
|
|
964
974
|
return ye(mn, { register: n, slot: e, name: t, props: l }), k(() => o.value.length > 0 ? o.value.join(" ") : void 0);
|
|
965
975
|
}
|
|
966
|
-
|
|
967
|
-
let o =
|
|
976
|
+
A({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${J()}` } }, setup(e, { attrs: t, slots: l }) {
|
|
977
|
+
let o = Zo();
|
|
968
978
|
return ee(() => Ne(o.register(e.id))), () => {
|
|
969
|
-
let { name: n = "Description", slot: r =
|
|
970
|
-
return
|
|
979
|
+
let { name: n = "Description", slot: r = C({}), props: i = {} } = o, { id: u, ...c } = e, a = { ...Object.entries(i).reduce((s, [d, v]) => Object.assign(s, { [d]: P(v) }), {}), id: u };
|
|
980
|
+
return j({ ourProps: a, theirProps: c, slot: r.value, attrs: t, slots: l, name: n });
|
|
971
981
|
};
|
|
972
982
|
} });
|
|
973
983
|
let _t = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
|
|
@@ -982,7 +992,7 @@ function Tt(e) {
|
|
|
982
992
|
let i = r ? (l = n.innerText) != null ? l : "" : o;
|
|
983
993
|
return _t.test(i) && (i = i.replace(_t, "")), i;
|
|
984
994
|
}
|
|
985
|
-
function
|
|
995
|
+
function el(e) {
|
|
986
996
|
let t = e.getAttribute("aria-label");
|
|
987
997
|
if (typeof t == "string")
|
|
988
998
|
return t.trim();
|
|
@@ -1002,7 +1012,7 @@ function tl(e) {
|
|
|
1002
1012
|
return Tt(e).trim();
|
|
1003
1013
|
}
|
|
1004
1014
|
function vn(e) {
|
|
1005
|
-
let t =
|
|
1015
|
+
let t = C(""), l = C("");
|
|
1006
1016
|
return () => {
|
|
1007
1017
|
let o = E(e);
|
|
1008
1018
|
if (!o)
|
|
@@ -1010,15 +1020,15 @@ function vn(e) {
|
|
|
1010
1020
|
let n = o.innerText;
|
|
1011
1021
|
if (t.value === n)
|
|
1012
1022
|
return l.value;
|
|
1013
|
-
let r =
|
|
1023
|
+
let r = el(o).trim().toLowerCase();
|
|
1014
1024
|
return t.value = n, l.value = r, r;
|
|
1015
1025
|
};
|
|
1016
1026
|
}
|
|
1017
|
-
function
|
|
1027
|
+
function tl(e, t) {
|
|
1018
1028
|
return e === t;
|
|
1019
1029
|
}
|
|
1020
|
-
var
|
|
1021
|
-
function
|
|
1030
|
+
var nl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(nl || {}), ol = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(ol || {}), ll = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(ll || {});
|
|
1031
|
+
function rl(e) {
|
|
1022
1032
|
requestAnimationFrame(() => requestAnimationFrame(e));
|
|
1023
1033
|
}
|
|
1024
1034
|
let gn = Symbol("ListboxContext");
|
|
@@ -1030,13 +1040,13 @@ function De(e) {
|
|
|
1030
1040
|
}
|
|
1031
1041
|
return t;
|
|
1032
1042
|
}
|
|
1033
|
-
let
|
|
1034
|
-
let n =
|
|
1035
|
-
function
|
|
1036
|
-
let w = s.value !== null ? c.value[s.value] : null, S = ct(x(c.value.slice()), (
|
|
1043
|
+
let il = A({ name: "Listbox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], default: () => tl }, horizontal: { type: [Boolean], default: !1 }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, multiple: { type: [Boolean], default: !1 } }, inheritAttrs: !1, setup(e, { slots: t, attrs: l, emit: o }) {
|
|
1044
|
+
let n = C(1), r = C(null), i = C(null), u = C(null), c = C([]), a = C(""), s = C(null), d = C(1);
|
|
1045
|
+
function v(x = (w) => w) {
|
|
1046
|
+
let w = s.value !== null ? c.value[s.value] : null, S = ct(x(c.value.slice()), (O) => E(O.dataRef.domRef)), _ = w ? S.indexOf(w) : null;
|
|
1037
1047
|
return _ === -1 && (_ = null), { options: S, activeOptionIndex: _ };
|
|
1038
1048
|
}
|
|
1039
|
-
let f = k(() => e.multiple ? 1 : 0), [
|
|
1049
|
+
let f = k(() => e.multiple ? 1 : 0), [g, m] = fn(k(() => e.modelValue), (x) => o("update:modelValue", x), k(() => e.defaultValue)), h = k(() => g.value === void 0 ? G(f.value, { 1: [], 0: void 0 }) : g.value), b = { listboxState: n, value: h, mode: f, compare(x, w) {
|
|
1040
1050
|
if (typeof e.by == "string") {
|
|
1041
1051
|
let S = e.by;
|
|
1042
1052
|
return (x == null ? void 0 : x[S]) === (w == null ? void 0 : w[S]);
|
|
@@ -1049,31 +1059,31 @@ let al = $({ name: "Listbox", emits: { "update:modelValue": (e) => !0 }, props:
|
|
|
1049
1059
|
}, goToOption(x, w, S) {
|
|
1050
1060
|
if (e.disabled || n.value === 1)
|
|
1051
1061
|
return;
|
|
1052
|
-
let _ =
|
|
1053
|
-
a.value = "", s.value =
|
|
1062
|
+
let _ = v(), O = en(x === I.Specific ? { focus: I.Specific, id: w } : { focus: x }, { resolveItems: () => _.options, resolveActiveIndex: () => _.activeOptionIndex, resolveId: (N) => N.id, resolveDisabled: (N) => N.dataRef.disabled });
|
|
1063
|
+
a.value = "", s.value = O, d.value = S ?? 1, c.value = _.options;
|
|
1054
1064
|
}, search(x) {
|
|
1055
1065
|
if (e.disabled || n.value === 1)
|
|
1056
1066
|
return;
|
|
1057
1067
|
let w = a.value !== "" ? 0 : 1;
|
|
1058
1068
|
a.value += x.toLowerCase();
|
|
1059
|
-
let S = (s.value !== null ? c.value.slice(s.value + w).concat(c.value.slice(0, s.value + w)) : c.value).find((
|
|
1069
|
+
let S = (s.value !== null ? c.value.slice(s.value + w).concat(c.value.slice(0, s.value + w)) : c.value).find((O) => O.dataRef.textValue.startsWith(a.value) && !O.dataRef.disabled), _ = S ? c.value.indexOf(S) : -1;
|
|
1060
1070
|
_ === -1 || _ === s.value || (s.value = _, d.value = 1);
|
|
1061
1071
|
}, clearSearch() {
|
|
1062
1072
|
e.disabled || n.value !== 1 && a.value !== "" && (a.value = "");
|
|
1063
1073
|
}, registerOption(x, w) {
|
|
1064
|
-
let S =
|
|
1074
|
+
let S = v((_) => [..._, { id: x, dataRef: w }]);
|
|
1065
1075
|
c.value = S.options, s.value = S.activeOptionIndex;
|
|
1066
1076
|
}, unregisterOption(x) {
|
|
1067
|
-
let w =
|
|
1068
|
-
let _ = S.findIndex((
|
|
1077
|
+
let w = v((S) => {
|
|
1078
|
+
let _ = S.findIndex((O) => O.id === x);
|
|
1069
1079
|
return _ !== -1 && S.splice(_, 1), S;
|
|
1070
1080
|
});
|
|
1071
1081
|
c.value = w.options, s.value = w.activeOptionIndex, d.value = 1;
|
|
1072
1082
|
}, theirOnChange(x) {
|
|
1073
|
-
e.disabled ||
|
|
1083
|
+
e.disabled || m(x);
|
|
1074
1084
|
}, select(x) {
|
|
1075
|
-
e.disabled ||
|
|
1076
|
-
let w = X(b.value.value).slice(), S = X(x), _ = w.findIndex((
|
|
1085
|
+
e.disabled || m(G(f.value, { 0: () => x, 1: () => {
|
|
1086
|
+
let w = X(b.value.value).slice(), S = X(x), _ = w.findIndex((O) => b.compare(S, X(O)));
|
|
1077
1087
|
return _ === -1 ? w.push(S) : w.splice(_, 1), w;
|
|
1078
1088
|
} }));
|
|
1079
1089
|
} };
|
|
@@ -1098,11 +1108,11 @@ let al = $({ name: "Listbox", emits: { "update:modelValue": (e) => !0 }, props:
|
|
|
1098
1108
|
};
|
|
1099
1109
|
}, { immediate: !0 });
|
|
1100
1110
|
}), () => {
|
|
1101
|
-
let { name: x, modelValue: w, disabled: S, form: _, ...
|
|
1102
|
-
return
|
|
1111
|
+
let { name: x, modelValue: w, disabled: S, form: _, ...O } = e, N = { open: n.value === 0, disabled: S, value: h.value };
|
|
1112
|
+
return Oe(be, [...x != null && h.value != null ? un({ [x]: h.value }).map(([re, _e]) => Oe(sn, Jt({ features: dt.Hidden, key: re, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: _, name: re, value: _e }))) : [], j({ ourProps: {}, theirProps: { ...l, ...it(O, ["defaultValue", "onUpdate:modelValue", "horizontal", "multiple", "by"]) }, slot: N, slots: t, attrs: l, name: "Listbox" })]);
|
|
1103
1113
|
};
|
|
1104
1114
|
} });
|
|
1105
|
-
|
|
1115
|
+
A({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: () => `headlessui-listbox-label-${J()}` } }, setup(e, { attrs: t, slots: l }) {
|
|
1106
1116
|
let o = De("ListboxLabel");
|
|
1107
1117
|
function n() {
|
|
1108
1118
|
var r;
|
|
@@ -1110,10 +1120,10 @@ $({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label
|
|
|
1110
1120
|
}
|
|
1111
1121
|
return () => {
|
|
1112
1122
|
let r = { open: o.listboxState.value === 0, disabled: o.disabled.value }, { id: i, ...u } = e, c = { id: i, ref: o.labelRef, onClick: n };
|
|
1113
|
-
return
|
|
1123
|
+
return j({ ourProps: c, theirProps: u, slot: r, attrs: t, slots: l, name: "ListboxLabel" });
|
|
1114
1124
|
};
|
|
1115
1125
|
} });
|
|
1116
|
-
let
|
|
1126
|
+
let al = A({ name: "ListboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-listbox-button-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
|
|
1117
1127
|
let n = De("ListboxButton");
|
|
1118
1128
|
o({ el: n.buttonRef, $el: n.buttonRef });
|
|
1119
1129
|
function r(a) {
|
|
@@ -1121,15 +1131,15 @@ let sl = $({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1121
1131
|
case D.Space:
|
|
1122
1132
|
case D.Enter:
|
|
1123
1133
|
case D.ArrowDown:
|
|
1124
|
-
a.preventDefault(), n.openListbox(),
|
|
1134
|
+
a.preventDefault(), n.openListbox(), B(() => {
|
|
1125
1135
|
var s;
|
|
1126
|
-
(s = E(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(
|
|
1136
|
+
(s = E(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(I.First);
|
|
1127
1137
|
});
|
|
1128
1138
|
break;
|
|
1129
1139
|
case D.ArrowUp:
|
|
1130
|
-
a.preventDefault(), n.openListbox(),
|
|
1140
|
+
a.preventDefault(), n.openListbox(), B(() => {
|
|
1131
1141
|
var s;
|
|
1132
|
-
(s = E(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(
|
|
1142
|
+
(s = E(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(I.Last);
|
|
1133
1143
|
});
|
|
1134
1144
|
break;
|
|
1135
1145
|
}
|
|
@@ -1142,10 +1152,10 @@ let sl = $({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1142
1152
|
}
|
|
1143
1153
|
}
|
|
1144
1154
|
function u(a) {
|
|
1145
|
-
n.disabled.value || (n.listboxState.value === 0 ? (n.closeListbox(),
|
|
1155
|
+
n.disabled.value || (n.listboxState.value === 0 ? (n.closeListbox(), B(() => {
|
|
1146
1156
|
var s;
|
|
1147
1157
|
return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1148
|
-
})) : (a.preventDefault(), n.openListbox(),
|
|
1158
|
+
})) : (a.preventDefault(), n.openListbox(), rl(() => {
|
|
1149
1159
|
var s;
|
|
1150
1160
|
return (s = E(n.optionsRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1151
1161
|
})));
|
|
@@ -1153,11 +1163,11 @@ let sl = $({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1153
1163
|
let c = at(k(() => ({ as: e.as, type: t.type })), n.buttonRef);
|
|
1154
1164
|
return () => {
|
|
1155
1165
|
var a, s;
|
|
1156
|
-
let d = { open: n.listboxState.value === 0, disabled: n.disabled.value, value: n.value.value }, { id:
|
|
1157
|
-
return
|
|
1166
|
+
let d = { open: n.listboxState.value === 0, disabled: n.disabled.value, value: n.value.value }, { id: v, ...f } = e, g = { ref: n.buttonRef, id: v, type: c.value, "aria-haspopup": "listbox", "aria-controls": (a = E(n.optionsRef)) == null ? void 0 : a.id, "aria-expanded": n.listboxState.value === 0, "aria-labelledby": n.labelRef.value ? [(s = E(n.labelRef)) == null ? void 0 : s.id, v].join(" ") : void 0, disabled: n.disabled.value === !0 ? !0 : void 0, onKeydown: r, onKeyup: i, onClick: u };
|
|
1167
|
+
return j({ ourProps: g, theirProps: f, slot: d, attrs: t, slots: l, name: "ListboxButton" });
|
|
1158
1168
|
};
|
|
1159
|
-
} }),
|
|
1160
|
-
let n = De("ListboxOptions"), r =
|
|
1169
|
+
} }), sl = A({ name: "ListboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: () => `headlessui-listbox-options-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
|
|
1170
|
+
let n = De("ListboxOptions"), r = C(null);
|
|
1161
1171
|
o({ el: n.optionsRef, $el: n.optionsRef });
|
|
1162
1172
|
function i(a) {
|
|
1163
1173
|
switch (r.value && clearTimeout(r.value), a.key) {
|
|
@@ -1169,23 +1179,23 @@ let sl = $({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1169
1179
|
let s = n.options.value[n.activeOptionIndex.value];
|
|
1170
1180
|
n.select(s.dataRef.value);
|
|
1171
1181
|
}
|
|
1172
|
-
n.mode.value === 0 && (n.closeListbox(),
|
|
1182
|
+
n.mode.value === 0 && (n.closeListbox(), B(() => {
|
|
1173
1183
|
var s;
|
|
1174
1184
|
return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1175
1185
|
}));
|
|
1176
1186
|
break;
|
|
1177
1187
|
case G(n.orientation.value, { vertical: D.ArrowDown, horizontal: D.ArrowRight }):
|
|
1178
|
-
return a.preventDefault(), a.stopPropagation(), n.goToOption(
|
|
1188
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(I.Next);
|
|
1179
1189
|
case G(n.orientation.value, { vertical: D.ArrowUp, horizontal: D.ArrowLeft }):
|
|
1180
|
-
return a.preventDefault(), a.stopPropagation(), n.goToOption(
|
|
1190
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(I.Previous);
|
|
1181
1191
|
case D.Home:
|
|
1182
1192
|
case D.PageUp:
|
|
1183
|
-
return a.preventDefault(), a.stopPropagation(), n.goToOption(
|
|
1193
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(I.First);
|
|
1184
1194
|
case D.End:
|
|
1185
1195
|
case D.PageDown:
|
|
1186
|
-
return a.preventDefault(), a.stopPropagation(), n.goToOption(
|
|
1196
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(I.Last);
|
|
1187
1197
|
case D.Escape:
|
|
1188
|
-
a.preventDefault(), a.stopPropagation(), n.closeListbox(),
|
|
1198
|
+
a.preventDefault(), a.stopPropagation(), n.closeListbox(), B(() => {
|
|
1189
1199
|
var s;
|
|
1190
1200
|
return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1191
1201
|
});
|
|
@@ -1200,12 +1210,12 @@ let sl = $({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1200
1210
|
}
|
|
1201
1211
|
let u = nn(), c = k(() => u !== null ? (u.value & te.Open) === te.Open : n.listboxState.value === 0);
|
|
1202
1212
|
return () => {
|
|
1203
|
-
var a, s, d,
|
|
1204
|
-
let f = { open: n.listboxState.value === 0 }, { id:
|
|
1205
|
-
return
|
|
1213
|
+
var a, s, d, v;
|
|
1214
|
+
let f = { open: n.listboxState.value === 0 }, { id: g, ...m } = e, h = { "aria-activedescendant": n.activeOptionIndex.value === null || (a = n.options.value[n.activeOptionIndex.value]) == null ? void 0 : a.id, "aria-multiselectable": n.mode.value === 1 ? !0 : void 0, "aria-labelledby": (v = (s = E(n.labelRef)) == null ? void 0 : s.id) != null ? v : (d = E(n.buttonRef)) == null ? void 0 : d.id, "aria-orientation": n.orientation.value, id: g, onKeydown: i, role: "listbox", tabIndex: 0, ref: n.optionsRef };
|
|
1215
|
+
return j({ ourProps: h, theirProps: m, slot: f, attrs: t, slots: l, features: Re.RenderStrategy | Re.Static, visible: c.value, name: "ListboxOptions" });
|
|
1206
1216
|
};
|
|
1207
|
-
} }),
|
|
1208
|
-
let n = De("ListboxOption"), r =
|
|
1217
|
+
} }), ul = A({ name: "ListboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: () => `headlessui-listbox.option-${J()}` } }, setup(e, { slots: t, attrs: l, expose: o }) {
|
|
1218
|
+
let n = De("ListboxOption"), r = C(null);
|
|
1209
1219
|
o({ el: r, $el: r });
|
|
1210
1220
|
let i = k(() => n.activeOptionIndex.value !== null ? n.options.value[n.activeOptionIndex.value].id === e.id : !1), u = k(() => G(n.mode.value, { 0: () => n.compare(X(n.value.value), X(e.value)), 1: () => X(n.value.value).some((b) => n.compare(X(b), X(e.value))) })), c = k(() => G(n.mode.value, { 1: () => {
|
|
1211
1221
|
var b;
|
|
@@ -1217,13 +1227,13 @@ let sl = $({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1217
1227
|
ee(() => n.registerOption(e.id, s)), Ne(() => n.unregisterOption(e.id)), ee(() => {
|
|
1218
1228
|
Q([n.listboxState, u], () => {
|
|
1219
1229
|
n.listboxState.value === 0 && u.value && G(n.mode.value, { 1: () => {
|
|
1220
|
-
c.value && n.goToOption(
|
|
1230
|
+
c.value && n.goToOption(I.Specific, e.id);
|
|
1221
1231
|
}, 0: () => {
|
|
1222
|
-
n.goToOption(
|
|
1232
|
+
n.goToOption(I.Specific, e.id);
|
|
1223
1233
|
} });
|
|
1224
1234
|
}, { immediate: !0 });
|
|
1225
1235
|
}), xe(() => {
|
|
1226
|
-
n.listboxState.value === 0 && i.value && n.activationTrigger.value !== 0 &&
|
|
1236
|
+
n.listboxState.value === 0 && i.value && n.activationTrigger.value !== 0 && B(() => {
|
|
1227
1237
|
var b, y;
|
|
1228
1238
|
return (y = (b = E(r)) == null ? void 0 : b.scrollIntoView) == null ? void 0 : y.call(b, { block: "nearest" });
|
|
1229
1239
|
});
|
|
@@ -1231,96 +1241,96 @@ let sl = $({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1231
1241
|
function d(b) {
|
|
1232
1242
|
if (e.disabled)
|
|
1233
1243
|
return b.preventDefault();
|
|
1234
|
-
n.select(e.value), n.mode.value === 0 && (n.closeListbox(),
|
|
1244
|
+
n.select(e.value), n.mode.value === 0 && (n.closeListbox(), B(() => {
|
|
1235
1245
|
var y;
|
|
1236
1246
|
return (y = E(n.buttonRef)) == null ? void 0 : y.focus({ preventScroll: !0 });
|
|
1237
1247
|
}));
|
|
1238
1248
|
}
|
|
1239
|
-
function
|
|
1249
|
+
function v() {
|
|
1240
1250
|
if (e.disabled)
|
|
1241
|
-
return n.goToOption(
|
|
1242
|
-
n.goToOption(
|
|
1251
|
+
return n.goToOption(I.Nothing);
|
|
1252
|
+
n.goToOption(I.Specific, e.id);
|
|
1243
1253
|
}
|
|
1244
1254
|
let f = pn();
|
|
1245
|
-
function
|
|
1255
|
+
function g(b) {
|
|
1246
1256
|
f.update(b);
|
|
1247
1257
|
}
|
|
1248
|
-
function
|
|
1249
|
-
f.wasMoved(b) && (e.disabled || i.value || n.goToOption(
|
|
1258
|
+
function m(b) {
|
|
1259
|
+
f.wasMoved(b) && (e.disabled || i.value || n.goToOption(I.Specific, e.id, 0));
|
|
1250
1260
|
}
|
|
1251
1261
|
function h(b) {
|
|
1252
|
-
f.wasMoved(b) && (e.disabled || i.value && n.goToOption(
|
|
1262
|
+
f.wasMoved(b) && (e.disabled || i.value && n.goToOption(I.Nothing));
|
|
1253
1263
|
}
|
|
1254
1264
|
return () => {
|
|
1255
|
-
let { disabled: b } = e, y = { active: i.value, selected: u.value, disabled: b }, { id: x, value: w, disabled: S, ..._ } = e,
|
|
1256
|
-
return
|
|
1265
|
+
let { disabled: b } = e, y = { active: i.value, selected: u.value, disabled: b }, { id: x, value: w, disabled: S, ..._ } = e, O = { id: x, ref: r, role: "option", tabIndex: b === !0 ? void 0 : -1, "aria-disabled": b === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onClick: d, onFocus: v, onPointerenter: g, onMouseenter: g, onPointermove: m, onMousemove: m, onPointerleave: h, onMouseleave: h };
|
|
1266
|
+
return j({ ourProps: O, theirProps: _, slot: y, attrs: l, slots: t, name: "ListboxOption" });
|
|
1257
1267
|
};
|
|
1258
1268
|
} });
|
|
1259
|
-
var
|
|
1260
|
-
function
|
|
1269
|
+
var cl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(cl || {}), dl = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(dl || {});
|
|
1270
|
+
function fl(e) {
|
|
1261
1271
|
requestAnimationFrame(() => requestAnimationFrame(e));
|
|
1262
1272
|
}
|
|
1263
1273
|
let bn = Symbol("MenuContext");
|
|
1264
|
-
function
|
|
1274
|
+
function He(e) {
|
|
1265
1275
|
let t = he(bn, null);
|
|
1266
1276
|
if (t === null) {
|
|
1267
1277
|
let l = new Error(`<${e} /> is missing a parent <Menu /> component.`);
|
|
1268
|
-
throw Error.captureStackTrace && Error.captureStackTrace(l,
|
|
1278
|
+
throw Error.captureStackTrace && Error.captureStackTrace(l, He), l;
|
|
1269
1279
|
}
|
|
1270
1280
|
return t;
|
|
1271
1281
|
}
|
|
1272
|
-
let
|
|
1273
|
-
let o =
|
|
1274
|
-
function s(
|
|
1275
|
-
let f = c.value !== null ? i.value[c.value] : null,
|
|
1276
|
-
return
|
|
1282
|
+
let pl = A({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: l }) {
|
|
1283
|
+
let o = C(1), n = C(null), r = C(null), i = C([]), u = C(""), c = C(null), a = C(1);
|
|
1284
|
+
function s(v = (f) => f) {
|
|
1285
|
+
let f = c.value !== null ? i.value[c.value] : null, g = ct(v(i.value.slice()), (h) => E(h.dataRef.domRef)), m = f ? g.indexOf(f) : null;
|
|
1286
|
+
return m === -1 && (m = null), { items: g, activeItemIndex: m };
|
|
1277
1287
|
}
|
|
1278
1288
|
let d = { menuState: o, buttonRef: n, itemsRef: r, items: i, searchQuery: u, activeItemIndex: c, activationTrigger: a, closeMenu: () => {
|
|
1279
1289
|
o.value = 1, c.value = null;
|
|
1280
|
-
}, openMenu: () => o.value = 0, goToItem(
|
|
1281
|
-
let
|
|
1282
|
-
u.value = "", c.value = h, a.value =
|
|
1283
|
-
}, search(
|
|
1290
|
+
}, openMenu: () => o.value = 0, goToItem(v, f, g) {
|
|
1291
|
+
let m = s(), h = en(v === I.Specific ? { focus: I.Specific, id: f } : { focus: v }, { resolveItems: () => m.items, resolveActiveIndex: () => m.activeItemIndex, resolveId: (b) => b.id, resolveDisabled: (b) => b.dataRef.disabled });
|
|
1292
|
+
u.value = "", c.value = h, a.value = g ?? 1, i.value = m.items;
|
|
1293
|
+
}, search(v) {
|
|
1284
1294
|
let f = u.value !== "" ? 0 : 1;
|
|
1285
|
-
u.value +=
|
|
1286
|
-
let
|
|
1287
|
-
|
|
1295
|
+
u.value += v.toLowerCase();
|
|
1296
|
+
let g = (c.value !== null ? i.value.slice(c.value + f).concat(i.value.slice(0, c.value + f)) : i.value).find((h) => h.dataRef.textValue.startsWith(u.value) && !h.dataRef.disabled), m = g ? i.value.indexOf(g) : -1;
|
|
1297
|
+
m === -1 || m === c.value || (c.value = m, a.value = 1);
|
|
1288
1298
|
}, clearSearch() {
|
|
1289
1299
|
u.value = "";
|
|
1290
|
-
}, registerItem(
|
|
1291
|
-
let
|
|
1292
|
-
i.value =
|
|
1293
|
-
}, unregisterItem(
|
|
1294
|
-
let f = s((
|
|
1295
|
-
let
|
|
1296
|
-
return
|
|
1300
|
+
}, registerItem(v, f) {
|
|
1301
|
+
let g = s((m) => [...m, { id: v, dataRef: f }]);
|
|
1302
|
+
i.value = g.items, c.value = g.activeItemIndex, a.value = 1;
|
|
1303
|
+
}, unregisterItem(v) {
|
|
1304
|
+
let f = s((g) => {
|
|
1305
|
+
let m = g.findIndex((h) => h.id === v);
|
|
1306
|
+
return m !== -1 && g.splice(m, 1), g;
|
|
1297
1307
|
});
|
|
1298
1308
|
i.value = f.items, c.value = f.activeItemIndex, a.value = 1;
|
|
1299
1309
|
} };
|
|
1300
|
-
return an([n, r], (
|
|
1301
|
-
var
|
|
1302
|
-
d.closeMenu(), ze(f, je.Loose) || (
|
|
1310
|
+
return an([n, r], (v, f) => {
|
|
1311
|
+
var g;
|
|
1312
|
+
d.closeMenu(), ze(f, je.Loose) || (v.preventDefault(), (g = E(n)) == null || g.focus());
|
|
1303
1313
|
}, k(() => o.value === 0)), ye(bn, d), on(k(() => G(o.value, { 0: te.Open, 1: te.Closed }))), () => {
|
|
1304
|
-
let
|
|
1305
|
-
return
|
|
1314
|
+
let v = { open: o.value === 0, close: d.closeMenu };
|
|
1315
|
+
return j({ ourProps: {}, theirProps: e, slot: v, slots: t, attrs: l, name: "Menu" });
|
|
1306
1316
|
};
|
|
1307
|
-
} }),
|
|
1308
|
-
let n =
|
|
1317
|
+
} }), ml = A({ name: "MenuButton", props: { disabled: { type: Boolean, default: !1 }, as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-menu-button-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
|
|
1318
|
+
let n = He("MenuButton");
|
|
1309
1319
|
o({ el: n.buttonRef, $el: n.buttonRef });
|
|
1310
1320
|
function r(a) {
|
|
1311
1321
|
switch (a.key) {
|
|
1312
1322
|
case D.Space:
|
|
1313
1323
|
case D.Enter:
|
|
1314
1324
|
case D.ArrowDown:
|
|
1315
|
-
a.preventDefault(), a.stopPropagation(), n.openMenu(),
|
|
1325
|
+
a.preventDefault(), a.stopPropagation(), n.openMenu(), B(() => {
|
|
1316
1326
|
var s;
|
|
1317
|
-
(s = E(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(
|
|
1327
|
+
(s = E(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(I.First);
|
|
1318
1328
|
});
|
|
1319
1329
|
break;
|
|
1320
1330
|
case D.ArrowUp:
|
|
1321
|
-
a.preventDefault(), a.stopPropagation(), n.openMenu(),
|
|
1331
|
+
a.preventDefault(), a.stopPropagation(), n.openMenu(), B(() => {
|
|
1322
1332
|
var s;
|
|
1323
|
-
(s = E(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(
|
|
1333
|
+
(s = E(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(I.Last);
|
|
1324
1334
|
});
|
|
1325
1335
|
break;
|
|
1326
1336
|
}
|
|
@@ -1333,10 +1343,10 @@ let ml = $({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1333
1343
|
}
|
|
1334
1344
|
}
|
|
1335
1345
|
function u(a) {
|
|
1336
|
-
e.disabled || (n.menuState.value === 0 ? (n.closeMenu(),
|
|
1346
|
+
e.disabled || (n.menuState.value === 0 ? (n.closeMenu(), B(() => {
|
|
1337
1347
|
var s;
|
|
1338
1348
|
return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1339
|
-
})) : (a.preventDefault(), n.openMenu(),
|
|
1349
|
+
})) : (a.preventDefault(), n.openMenu(), fl(() => {
|
|
1340
1350
|
var s;
|
|
1341
1351
|
return (s = E(n.itemsRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1342
1352
|
})));
|
|
@@ -1344,12 +1354,12 @@ let ml = $({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1344
1354
|
let c = at(k(() => ({ as: e.as, type: t.type })), n.buttonRef);
|
|
1345
1355
|
return () => {
|
|
1346
1356
|
var a;
|
|
1347
|
-
let s = { open: n.menuState.value === 0 }, { id: d, ...
|
|
1348
|
-
return
|
|
1357
|
+
let s = { open: n.menuState.value === 0 }, { id: d, ...v } = e, f = { ref: n.buttonRef, id: d, type: c.value, "aria-haspopup": "menu", "aria-controls": (a = E(n.itemsRef)) == null ? void 0 : a.id, "aria-expanded": n.menuState.value === 0, onKeydown: r, onKeyup: i, onClick: u };
|
|
1358
|
+
return j({ ourProps: f, theirProps: v, slot: s, attrs: t, slots: l, name: "MenuButton" });
|
|
1349
1359
|
};
|
|
1350
|
-
} }),
|
|
1351
|
-
let n =
|
|
1352
|
-
o({ el: n.itemsRef, $el: n.itemsRef }),
|
|
1360
|
+
} }), vl = A({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: () => `headlessui-menu-items-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
|
|
1361
|
+
let n = He("MenuItems"), r = C(null);
|
|
1362
|
+
o({ el: n.itemsRef, $el: n.itemsRef }), jo({ container: k(() => E(n.itemsRef)), enabled: k(() => n.menuState.value === 0), accept(s) {
|
|
1353
1363
|
return s.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : s.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1354
1364
|
}, walk(s) {
|
|
1355
1365
|
s.setAttribute("role", "none");
|
|
@@ -1362,29 +1372,29 @@ let ml = $({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1362
1372
|
return s.preventDefault(), s.stopPropagation(), n.search(s.key);
|
|
1363
1373
|
case D.Enter:
|
|
1364
1374
|
if (s.preventDefault(), s.stopPropagation(), n.activeItemIndex.value !== null) {
|
|
1365
|
-
let
|
|
1366
|
-
(d = E(
|
|
1375
|
+
let v = n.items.value[n.activeItemIndex.value];
|
|
1376
|
+
(d = E(v.dataRef.domRef)) == null || d.click();
|
|
1367
1377
|
}
|
|
1368
1378
|
n.closeMenu(), rn(E(n.buttonRef));
|
|
1369
1379
|
break;
|
|
1370
1380
|
case D.ArrowDown:
|
|
1371
|
-
return s.preventDefault(), s.stopPropagation(), n.goToItem(
|
|
1381
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(I.Next);
|
|
1372
1382
|
case D.ArrowUp:
|
|
1373
|
-
return s.preventDefault(), s.stopPropagation(), n.goToItem(
|
|
1383
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(I.Previous);
|
|
1374
1384
|
case D.Home:
|
|
1375
1385
|
case D.PageUp:
|
|
1376
|
-
return s.preventDefault(), s.stopPropagation(), n.goToItem(
|
|
1386
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(I.First);
|
|
1377
1387
|
case D.End:
|
|
1378
1388
|
case D.PageDown:
|
|
1379
|
-
return s.preventDefault(), s.stopPropagation(), n.goToItem(
|
|
1389
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(I.Last);
|
|
1380
1390
|
case D.Escape:
|
|
1381
|
-
s.preventDefault(), s.stopPropagation(), n.closeMenu(),
|
|
1382
|
-
var
|
|
1383
|
-
return (
|
|
1391
|
+
s.preventDefault(), s.stopPropagation(), n.closeMenu(), B(() => {
|
|
1392
|
+
var v;
|
|
1393
|
+
return (v = E(n.buttonRef)) == null ? void 0 : v.focus({ preventScroll: !0 });
|
|
1384
1394
|
});
|
|
1385
1395
|
break;
|
|
1386
1396
|
case D.Tab:
|
|
1387
|
-
s.preventDefault(), s.stopPropagation(), n.closeMenu(),
|
|
1397
|
+
s.preventDefault(), s.stopPropagation(), n.closeMenu(), B(() => qo(E(n.buttonRef), s.shiftKey ? tt.Previous : tt.Next));
|
|
1388
1398
|
break;
|
|
1389
1399
|
default:
|
|
1390
1400
|
s.key.length === 1 && (n.search(s.key), r.value = setTimeout(() => n.clearSearch(), 350));
|
|
@@ -1401,44 +1411,44 @@ let ml = $({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1401
1411
|
let c = nn(), a = k(() => c !== null ? (c.value & te.Open) === te.Open : n.menuState.value === 0);
|
|
1402
1412
|
return () => {
|
|
1403
1413
|
var s, d;
|
|
1404
|
-
let
|
|
1405
|
-
return
|
|
1414
|
+
let v = { open: n.menuState.value === 0 }, { id: f, ...g } = e, m = { "aria-activedescendant": n.activeItemIndex.value === null || (s = n.items.value[n.activeItemIndex.value]) == null ? void 0 : s.id, "aria-labelledby": (d = E(n.buttonRef)) == null ? void 0 : d.id, id: f, onKeydown: i, onKeyup: u, role: "menu", tabIndex: 0, ref: n.itemsRef };
|
|
1415
|
+
return j({ ourProps: m, theirProps: g, slot: v, attrs: t, slots: l, features: Re.RenderStrategy | Re.Static, visible: a.value, name: "MenuItems" });
|
|
1406
1416
|
};
|
|
1407
|
-
} }),
|
|
1408
|
-
let n =
|
|
1417
|
+
} }), gl = A({ name: "MenuItem", inheritAttrs: !1, props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: () => `headlessui-menu-item-${J()}` } }, setup(e, { slots: t, attrs: l, expose: o }) {
|
|
1418
|
+
let n = He("MenuItem"), r = C(null);
|
|
1409
1419
|
o({ el: r, $el: r });
|
|
1410
1420
|
let i = k(() => n.activeItemIndex.value !== null ? n.items.value[n.activeItemIndex.value].id === e.id : !1), u = vn(r), c = k(() => ({ disabled: e.disabled, get textValue() {
|
|
1411
1421
|
return u();
|
|
1412
1422
|
}, domRef: r }));
|
|
1413
1423
|
ee(() => n.registerItem(e.id, c)), Ne(() => n.unregisterItem(e.id)), xe(() => {
|
|
1414
|
-
n.menuState.value === 0 && i.value && n.activationTrigger.value !== 0 &&
|
|
1415
|
-
var
|
|
1416
|
-
return (h = (
|
|
1424
|
+
n.menuState.value === 0 && i.value && n.activationTrigger.value !== 0 && B(() => {
|
|
1425
|
+
var m, h;
|
|
1426
|
+
return (h = (m = E(r)) == null ? void 0 : m.scrollIntoView) == null ? void 0 : h.call(m, { block: "nearest" });
|
|
1417
1427
|
});
|
|
1418
1428
|
});
|
|
1419
|
-
function a(
|
|
1429
|
+
function a(m) {
|
|
1420
1430
|
if (e.disabled)
|
|
1421
|
-
return
|
|
1431
|
+
return m.preventDefault();
|
|
1422
1432
|
n.closeMenu(), rn(E(n.buttonRef));
|
|
1423
1433
|
}
|
|
1424
1434
|
function s() {
|
|
1425
1435
|
if (e.disabled)
|
|
1426
|
-
return n.goToItem(
|
|
1427
|
-
n.goToItem(
|
|
1436
|
+
return n.goToItem(I.Nothing);
|
|
1437
|
+
n.goToItem(I.Specific, e.id);
|
|
1428
1438
|
}
|
|
1429
1439
|
let d = pn();
|
|
1430
|
-
function m
|
|
1431
|
-
d.update(
|
|
1440
|
+
function v(m) {
|
|
1441
|
+
d.update(m);
|
|
1432
1442
|
}
|
|
1433
|
-
function f(
|
|
1434
|
-
d.wasMoved(
|
|
1443
|
+
function f(m) {
|
|
1444
|
+
d.wasMoved(m) && (e.disabled || i.value || n.goToItem(I.Specific, e.id, 0));
|
|
1435
1445
|
}
|
|
1436
|
-
function
|
|
1437
|
-
d.wasMoved(
|
|
1446
|
+
function g(m) {
|
|
1447
|
+
d.wasMoved(m) && (e.disabled || i.value && n.goToItem(I.Nothing));
|
|
1438
1448
|
}
|
|
1439
1449
|
return () => {
|
|
1440
|
-
let { disabled:
|
|
1441
|
-
return
|
|
1450
|
+
let { disabled: m } = e, h = { active: i.value, disabled: m, close: n.closeMenu }, { id: b, ...y } = e;
|
|
1451
|
+
return j({ ourProps: { id: b, ref: r, role: "menuitem", tabIndex: m === !0 ? void 0 : -1, "aria-disabled": m === !0 ? !0 : void 0, disabled: void 0, onClick: a, onFocus: s, onPointerenter: v, onMouseenter: v, onPointermove: f, onMousemove: f, onPointerleave: g, onMouseleave: g }, theirProps: { ...l, ...y }, slot: h, attrs: l, slots: t, name: "MenuItem" });
|
|
1442
1452
|
};
|
|
1443
1453
|
} }), hn = Symbol("LabelContext");
|
|
1444
1454
|
function yn() {
|
|
@@ -1449,8 +1459,8 @@ function yn() {
|
|
|
1449
1459
|
}
|
|
1450
1460
|
return e;
|
|
1451
1461
|
}
|
|
1452
|
-
function
|
|
1453
|
-
let o =
|
|
1462
|
+
function bl({ slot: e = {}, name: t = "Label", props: l = {} } = {}) {
|
|
1463
|
+
let o = C([]);
|
|
1454
1464
|
function n(r) {
|
|
1455
1465
|
return o.value.push(r), () => {
|
|
1456
1466
|
let i = o.value.indexOf(r);
|
|
@@ -1459,76 +1469,76 @@ function hl({ slot: e = {}, name: t = "Label", props: l = {} } = {}) {
|
|
|
1459
1469
|
}
|
|
1460
1470
|
return ye(hn, { register: n, slot: e, name: t, props: l }), k(() => o.value.length > 0 ? o.value.join(" ") : void 0);
|
|
1461
1471
|
}
|
|
1462
|
-
|
|
1472
|
+
A({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: !1 }, id: { type: String, default: () => `headlessui-label-${J()}` } }, setup(e, { slots: t, attrs: l }) {
|
|
1463
1473
|
let o = yn();
|
|
1464
1474
|
return ee(() => Ne(o.register(e.id))), () => {
|
|
1465
|
-
let { name: n = "Label", slot: r = {}, props: i = {} } = o, { id: u, passive: c, ...a } = e, s = { ...Object.entries(i).reduce((d, [
|
|
1466
|
-
return c && (delete s.onClick, delete s.htmlFor, delete a.onClick),
|
|
1475
|
+
let { name: n = "Label", slot: r = {}, props: i = {} } = o, { id: u, passive: c, ...a } = e, s = { ...Object.entries(i).reduce((d, [v, f]) => Object.assign(d, { [v]: P(f) }), {}), id: u };
|
|
1476
|
+
return c && (delete s.onClick, delete s.htmlFor, delete a.onClick), j({ ourProps: s, theirProps: a, slot: r, attrs: l, slots: t, name: n });
|
|
1467
1477
|
};
|
|
1468
1478
|
} });
|
|
1469
1479
|
let xn = Symbol("GroupContext");
|
|
1470
|
-
|
|
1471
|
-
let o =
|
|
1480
|
+
A({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: l }) {
|
|
1481
|
+
let o = C(null), n = bl({ name: "SwitchLabel", props: { htmlFor: k(() => {
|
|
1472
1482
|
var i;
|
|
1473
1483
|
return (i = o.value) == null ? void 0 : i.id;
|
|
1474
1484
|
}), onClick(i) {
|
|
1475
1485
|
o.value && (i.currentTarget.tagName === "LABEL" && i.preventDefault(), o.value.click(), o.value.focus({ preventScroll: !0 }));
|
|
1476
|
-
} } }), r =
|
|
1477
|
-
return ye(xn, { switchRef: o, labelledby: n, describedby: r }), () =>
|
|
1486
|
+
} } }), r = Jo({ name: "SwitchDescription" });
|
|
1487
|
+
return ye(xn, { switchRef: o, labelledby: n, describedby: r }), () => j({ theirProps: e, ourProps: {}, slot: {}, slots: t, attrs: l, name: "SwitchGroup" });
|
|
1478
1488
|
} });
|
|
1479
|
-
let
|
|
1489
|
+
let hl = A({ name: "Switch", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: void 0 }, defaultChecked: { type: Boolean, optional: !0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, value: { type: String, optional: !0 }, id: { type: String, default: () => `headlessui-switch-${J()}` } }, inheritAttrs: !1, setup(e, { emit: t, attrs: l, slots: o, expose: n }) {
|
|
1480
1490
|
let r = he(xn, null), [i, u] = fn(k(() => e.modelValue), (h) => t("update:modelValue", h), k(() => e.defaultChecked));
|
|
1481
1491
|
function c() {
|
|
1482
1492
|
u(!i.value);
|
|
1483
1493
|
}
|
|
1484
|
-
let a =
|
|
1494
|
+
let a = C(null), s = r === null ? a : r.switchRef, d = at(k(() => ({ as: e.as, type: l.type })), s);
|
|
1485
1495
|
n({ el: s, $el: s });
|
|
1486
|
-
function
|
|
1496
|
+
function v(h) {
|
|
1487
1497
|
h.preventDefault(), c();
|
|
1488
1498
|
}
|
|
1489
1499
|
function f(h) {
|
|
1490
|
-
h.key === D.Space ? (h.preventDefault(), c()) : h.key === D.Enter &&
|
|
1500
|
+
h.key === D.Space ? (h.preventDefault(), c()) : h.key === D.Enter && Qo(h.currentTarget);
|
|
1491
1501
|
}
|
|
1492
|
-
function
|
|
1502
|
+
function g(h) {
|
|
1493
1503
|
h.preventDefault();
|
|
1494
1504
|
}
|
|
1495
|
-
let
|
|
1505
|
+
let m = k(() => {
|
|
1496
1506
|
var h, b;
|
|
1497
1507
|
return (b = (h = E(s)) == null ? void 0 : h.closest) == null ? void 0 : b.call(h, "form");
|
|
1498
1508
|
});
|
|
1499
1509
|
return ee(() => {
|
|
1500
|
-
Q([
|
|
1501
|
-
if (!
|
|
1510
|
+
Q([m], () => {
|
|
1511
|
+
if (!m.value || e.defaultChecked === void 0)
|
|
1502
1512
|
return;
|
|
1503
1513
|
function h() {
|
|
1504
1514
|
u(e.defaultChecked);
|
|
1505
1515
|
}
|
|
1506
|
-
return
|
|
1516
|
+
return m.value.addEventListener("reset", h), () => {
|
|
1507
1517
|
var b;
|
|
1508
|
-
(b =
|
|
1518
|
+
(b = m.value) == null || b.removeEventListener("reset", h);
|
|
1509
1519
|
};
|
|
1510
1520
|
}, { immediate: !0 });
|
|
1511
1521
|
}), () => {
|
|
1512
|
-
let { id: h, name: b, value: y, form: x, ...w } = e, S = { checked: i.value }, _ = { id: h, ref: s, role: "switch", type: d.value, tabIndex: 0, "aria-checked": i.value, "aria-labelledby": r == null ? void 0 : r.labelledby.value, "aria-describedby": r == null ? void 0 : r.describedby.value, onClick:
|
|
1513
|
-
return
|
|
1522
|
+
let { id: h, name: b, value: y, form: x, ...w } = e, S = { checked: i.value }, _ = { id: h, ref: s, role: "switch", type: d.value, tabIndex: 0, "aria-checked": i.value, "aria-labelledby": r == null ? void 0 : r.labelledby.value, "aria-describedby": r == null ? void 0 : r.describedby.value, onClick: v, onKeyup: f, onKeypress: g };
|
|
1523
|
+
return Oe(be, [b != null && i.value != null ? Oe(sn, Jt({ features: dt.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: i.value, form: x, name: b, value: y })) : null, j({ ourProps: _, theirProps: { ...l, ...it(w, ["modelValue", "defaultChecked"]) }, slot: S, attrs: l, slots: o, name: "Switch" })]);
|
|
1514
1524
|
};
|
|
1515
1525
|
} });
|
|
1516
|
-
const
|
|
1526
|
+
const $e = Math.min, ue = Math.max, Me = Math.round, Ie = Math.floor, ae = (e) => ({
|
|
1517
1527
|
x: e,
|
|
1518
1528
|
y: e
|
|
1519
|
-
}),
|
|
1529
|
+
}), yl = {
|
|
1520
1530
|
left: "right",
|
|
1521
1531
|
right: "left",
|
|
1522
1532
|
bottom: "top",
|
|
1523
1533
|
top: "bottom"
|
|
1524
|
-
},
|
|
1534
|
+
}, xl = {
|
|
1525
1535
|
start: "end",
|
|
1526
1536
|
end: "start"
|
|
1527
1537
|
};
|
|
1528
1538
|
function Lt(e, t, l) {
|
|
1529
|
-
return ue(e,
|
|
1539
|
+
return ue(e, $e(t, l));
|
|
1530
1540
|
}
|
|
1531
|
-
function
|
|
1541
|
+
function Ue(e, t) {
|
|
1532
1542
|
return typeof e == "function" ? e(t) : e;
|
|
1533
1543
|
}
|
|
1534
1544
|
function ce(e) {
|
|
@@ -1549,20 +1559,20 @@ function Ke(e) {
|
|
|
1549
1559
|
function Sn(e) {
|
|
1550
1560
|
return wn(Ke(e));
|
|
1551
1561
|
}
|
|
1552
|
-
function
|
|
1562
|
+
function wl(e, t, l) {
|
|
1553
1563
|
l === void 0 && (l = !1);
|
|
1554
1564
|
const o = We(e), n = Sn(e), r = kn(n);
|
|
1555
1565
|
let i = n === "x" ? o === (l ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
1556
1566
|
return t.reference[r] > t.floating[r] && (i = Ve(i)), [i, Ve(i)];
|
|
1557
1567
|
}
|
|
1558
|
-
function
|
|
1568
|
+
function kl(e) {
|
|
1559
1569
|
const t = Ve(e);
|
|
1560
1570
|
return [nt(e), t, nt(t)];
|
|
1561
1571
|
}
|
|
1562
1572
|
function nt(e) {
|
|
1563
|
-
return e.replace(/start|end/g, (t) =>
|
|
1573
|
+
return e.replace(/start|end/g, (t) => xl[t]);
|
|
1564
1574
|
}
|
|
1565
|
-
function
|
|
1575
|
+
function Sl(e, t, l) {
|
|
1566
1576
|
const o = ["left", "right"], n = ["right", "left"], r = ["top", "bottom"], i = ["bottom", "top"];
|
|
1567
1577
|
switch (e) {
|
|
1568
1578
|
case "top":
|
|
@@ -1577,13 +1587,13 @@ function Ol(e, t, l) {
|
|
|
1577
1587
|
}
|
|
1578
1588
|
function Cl(e, t, l, o) {
|
|
1579
1589
|
const n = We(e);
|
|
1580
|
-
let r =
|
|
1590
|
+
let r = Sl(ce(e), l === "start", o);
|
|
1581
1591
|
return n && (r = r.map((i) => i + "-" + n), t && (r = r.concat(r.map(nt)))), r;
|
|
1582
1592
|
}
|
|
1583
1593
|
function Ve(e) {
|
|
1584
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
1594
|
+
return e.replace(/left|right|bottom|top/g, (t) => yl[t]);
|
|
1585
1595
|
}
|
|
1586
|
-
function
|
|
1596
|
+
function Ol(e) {
|
|
1587
1597
|
return {
|
|
1588
1598
|
top: 0,
|
|
1589
1599
|
right: 0,
|
|
@@ -1592,8 +1602,8 @@ function Rl(e) {
|
|
|
1592
1602
|
...e
|
|
1593
1603
|
};
|
|
1594
1604
|
}
|
|
1595
|
-
function
|
|
1596
|
-
return typeof e != "number" ?
|
|
1605
|
+
function Rl(e) {
|
|
1606
|
+
return typeof e != "number" ? Ol(e) : {
|
|
1597
1607
|
top: e,
|
|
1598
1608
|
right: e,
|
|
1599
1609
|
bottom: e,
|
|
@@ -1614,7 +1624,7 @@ function It(e, t, l) {
|
|
|
1614
1624
|
reference: o,
|
|
1615
1625
|
floating: n
|
|
1616
1626
|
} = e;
|
|
1617
|
-
const r = Ke(t), i = Sn(t), u = kn(i), c = ce(t), a = r === "y", s = o.x + o.width / 2 - n.width / 2, d = o.y + o.height / 2 - n.height / 2,
|
|
1627
|
+
const r = Ke(t), i = Sn(t), u = kn(i), c = ce(t), a = r === "y", s = o.x + o.width / 2 - n.width / 2, d = o.y + o.height / 2 - n.height / 2, v = o[u] / 2 - n[u] / 2;
|
|
1618
1628
|
let f;
|
|
1619
1629
|
switch (c) {
|
|
1620
1630
|
case "top":
|
|
@@ -1649,15 +1659,15 @@ function It(e, t, l) {
|
|
|
1649
1659
|
}
|
|
1650
1660
|
switch (We(t)) {
|
|
1651
1661
|
case "start":
|
|
1652
|
-
f[i] -=
|
|
1662
|
+
f[i] -= v * (l && a ? -1 : 1);
|
|
1653
1663
|
break;
|
|
1654
1664
|
case "end":
|
|
1655
|
-
f[i] +=
|
|
1665
|
+
f[i] += v * (l && a ? -1 : 1);
|
|
1656
1666
|
break;
|
|
1657
1667
|
}
|
|
1658
1668
|
return f;
|
|
1659
1669
|
}
|
|
1660
|
-
const
|
|
1670
|
+
const El = async (e, t, l) => {
|
|
1661
1671
|
const {
|
|
1662
1672
|
placement: o = "bottom",
|
|
1663
1673
|
strategy: n = "absolute",
|
|
@@ -1671,12 +1681,12 @@ const Dl = async (e, t, l) => {
|
|
|
1671
1681
|
}), {
|
|
1672
1682
|
x: s,
|
|
1673
1683
|
y: d
|
|
1674
|
-
} = It(a, o, c),
|
|
1675
|
-
for (let
|
|
1684
|
+
} = It(a, o, c), v = o, f = {}, g = 0;
|
|
1685
|
+
for (let m = 0; m < u.length; m++) {
|
|
1676
1686
|
const {
|
|
1677
1687
|
name: h,
|
|
1678
1688
|
fn: b
|
|
1679
|
-
} = u[
|
|
1689
|
+
} = u[m], {
|
|
1680
1690
|
x: y,
|
|
1681
1691
|
y: x,
|
|
1682
1692
|
data: w,
|
|
@@ -1685,7 +1695,7 @@ const Dl = async (e, t, l) => {
|
|
|
1685
1695
|
x: s,
|
|
1686
1696
|
y: d,
|
|
1687
1697
|
initialPlacement: o,
|
|
1688
|
-
placement:
|
|
1698
|
+
placement: v,
|
|
1689
1699
|
strategy: n,
|
|
1690
1700
|
middlewareData: f,
|
|
1691
1701
|
rects: a,
|
|
@@ -1701,27 +1711,27 @@ const Dl = async (e, t, l) => {
|
|
|
1701
1711
|
...f[h],
|
|
1702
1712
|
...w
|
|
1703
1713
|
}
|
|
1704
|
-
}, S &&
|
|
1705
|
-
|
|
1714
|
+
}, S && g <= 50) {
|
|
1715
|
+
g++, typeof S == "object" && (S.placement && (v = S.placement), S.rects && (a = S.rects === !0 ? await i.getElementRects({
|
|
1706
1716
|
reference: e,
|
|
1707
1717
|
floating: t,
|
|
1708
1718
|
strategy: n
|
|
1709
1719
|
}) : S.rects), {
|
|
1710
1720
|
x: s,
|
|
1711
1721
|
y: d
|
|
1712
|
-
} = It(a,
|
|
1722
|
+
} = It(a, v, c)), m = -1;
|
|
1713
1723
|
continue;
|
|
1714
1724
|
}
|
|
1715
1725
|
}
|
|
1716
1726
|
return {
|
|
1717
1727
|
x: s,
|
|
1718
1728
|
y: d,
|
|
1719
|
-
placement:
|
|
1729
|
+
placement: v,
|
|
1720
1730
|
strategy: n,
|
|
1721
1731
|
middlewareData: f
|
|
1722
1732
|
};
|
|
1723
1733
|
};
|
|
1724
|
-
async function
|
|
1734
|
+
async function Cn(e, t) {
|
|
1725
1735
|
var l;
|
|
1726
1736
|
t === void 0 && (t = {});
|
|
1727
1737
|
const {
|
|
@@ -1735,9 +1745,9 @@ async function On(e, t) {
|
|
|
1735
1745
|
boundary: a = "clippingAncestors",
|
|
1736
1746
|
rootBoundary: s = "viewport",
|
|
1737
1747
|
elementContext: d = "floating",
|
|
1738
|
-
altBoundary:
|
|
1748
|
+
altBoundary: v = !1,
|
|
1739
1749
|
padding: f = 0
|
|
1740
|
-
} =
|
|
1750
|
+
} = Ue(t, e), g = Rl(f), h = u[v ? d === "floating" ? "reference" : "floating" : d], b = Fe(await r.getClippingRect({
|
|
1741
1751
|
element: (l = await (r.isElement == null ? void 0 : r.isElement(h))) == null || l ? h : h.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(u.floating)),
|
|
1742
1752
|
boundary: a,
|
|
1743
1753
|
rootBoundary: s,
|
|
@@ -1758,13 +1768,13 @@ async function On(e, t) {
|
|
|
1758
1768
|
strategy: c
|
|
1759
1769
|
}) : y);
|
|
1760
1770
|
return {
|
|
1761
|
-
top: (b.top - S.top +
|
|
1762
|
-
bottom: (S.bottom - b.bottom +
|
|
1763
|
-
left: (b.left - S.left +
|
|
1764
|
-
right: (S.right - b.right +
|
|
1771
|
+
top: (b.top - S.top + g.top) / w.y,
|
|
1772
|
+
bottom: (S.bottom - b.bottom + g.bottom) / w.y,
|
|
1773
|
+
left: (b.left - S.left + g.left) / w.x,
|
|
1774
|
+
right: (S.right - b.right + g.right) / w.x
|
|
1765
1775
|
};
|
|
1766
1776
|
}
|
|
1767
|
-
const
|
|
1777
|
+
const Dl = function(e) {
|
|
1768
1778
|
return e === void 0 && (e = {}), {
|
|
1769
1779
|
name: "flip",
|
|
1770
1780
|
options: e,
|
|
@@ -1780,26 +1790,26 @@ const Pl = function(e) {
|
|
|
1780
1790
|
} = t, {
|
|
1781
1791
|
mainAxis: s = !0,
|
|
1782
1792
|
crossAxis: d = !0,
|
|
1783
|
-
fallbackPlacements:
|
|
1793
|
+
fallbackPlacements: v,
|
|
1784
1794
|
fallbackStrategy: f = "bestFit",
|
|
1785
|
-
fallbackAxisSideDirection:
|
|
1786
|
-
flipAlignment:
|
|
1795
|
+
fallbackAxisSideDirection: g = "none",
|
|
1796
|
+
flipAlignment: m = !0,
|
|
1787
1797
|
...h
|
|
1788
|
-
} =
|
|
1798
|
+
} = Ue(e, t);
|
|
1789
1799
|
if ((l = r.arrow) != null && l.alignmentOffset)
|
|
1790
1800
|
return {};
|
|
1791
|
-
const b = ce(n), y = ce(u) === u, x = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), w =
|
|
1792
|
-
!
|
|
1793
|
-
const S = [u, ...w], _ = await
|
|
1801
|
+
const b = ce(n), y = ce(u) === u, x = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), w = v || (y || !m ? [Ve(u)] : kl(u));
|
|
1802
|
+
!v && g !== "none" && w.push(...Cl(u, m, g, x));
|
|
1803
|
+
const S = [u, ...w], _ = await Cn(t, h), O = [];
|
|
1794
1804
|
let N = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
1795
|
-
if (s &&
|
|
1796
|
-
const se =
|
|
1797
|
-
|
|
1805
|
+
if (s && O.push(_[b]), d) {
|
|
1806
|
+
const se = wl(n, i, x);
|
|
1807
|
+
O.push(_[se[0]], _[se[1]]);
|
|
1798
1808
|
}
|
|
1799
1809
|
if (N = [...N, {
|
|
1800
1810
|
placement: n,
|
|
1801
|
-
overflows:
|
|
1802
|
-
}], !
|
|
1811
|
+
overflows: O
|
|
1812
|
+
}], !O.every((se) => se <= 0)) {
|
|
1803
1813
|
var re, _e;
|
|
1804
1814
|
const se = (((re = r.flip) == null ? void 0 : re.index) || 0) + 1, bt = S[se];
|
|
1805
1815
|
if (bt)
|
|
@@ -1836,16 +1846,16 @@ const Pl = function(e) {
|
|
|
1836
1846
|
}
|
|
1837
1847
|
};
|
|
1838
1848
|
};
|
|
1839
|
-
async function
|
|
1849
|
+
async function Pl(e, t) {
|
|
1840
1850
|
const {
|
|
1841
1851
|
placement: l,
|
|
1842
1852
|
platform: o,
|
|
1843
1853
|
elements: n
|
|
1844
|
-
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(n.floating)), i = ce(l), u = We(l), c = Ke(l) === "y", a = ["left", "top"].includes(i) ? -1 : 1, s = r && c ? -1 : 1, d =
|
|
1854
|
+
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(n.floating)), i = ce(l), u = We(l), c = Ke(l) === "y", a = ["left", "top"].includes(i) ? -1 : 1, s = r && c ? -1 : 1, d = Ue(t, e);
|
|
1845
1855
|
let {
|
|
1846
|
-
mainAxis:
|
|
1856
|
+
mainAxis: v,
|
|
1847
1857
|
crossAxis: f,
|
|
1848
|
-
alignmentAxis:
|
|
1858
|
+
alignmentAxis: g
|
|
1849
1859
|
} = typeof d == "number" ? {
|
|
1850
1860
|
mainAxis: d,
|
|
1851
1861
|
crossAxis: 0,
|
|
@@ -1856,15 +1866,15 @@ async function _l(e, t) {
|
|
|
1856
1866
|
alignmentAxis: null,
|
|
1857
1867
|
...d
|
|
1858
1868
|
};
|
|
1859
|
-
return u && typeof
|
|
1869
|
+
return u && typeof g == "number" && (f = u === "end" ? g * -1 : g), c ? {
|
|
1860
1870
|
x: f * s,
|
|
1861
|
-
y:
|
|
1871
|
+
y: v * a
|
|
1862
1872
|
} : {
|
|
1863
|
-
x:
|
|
1873
|
+
x: v * a,
|
|
1864
1874
|
y: f * s
|
|
1865
1875
|
};
|
|
1866
1876
|
}
|
|
1867
|
-
const
|
|
1877
|
+
const _l = function(e) {
|
|
1868
1878
|
return e === void 0 && (e = 0), {
|
|
1869
1879
|
name: "offset",
|
|
1870
1880
|
options: e,
|
|
@@ -1875,7 +1885,7 @@ const Tl = function(e) {
|
|
|
1875
1885
|
y: r,
|
|
1876
1886
|
placement: i,
|
|
1877
1887
|
middlewareData: u
|
|
1878
|
-
} = t, c = await
|
|
1888
|
+
} = t, c = await Pl(t, e);
|
|
1879
1889
|
return i === ((l = u.offset) == null ? void 0 : l.placement) && (o = u.arrow) != null && o.alignmentOffset ? {} : {
|
|
1880
1890
|
x: n + c.x,
|
|
1881
1891
|
y: r + c.y,
|
|
@@ -1886,7 +1896,7 @@ const Tl = function(e) {
|
|
|
1886
1896
|
};
|
|
1887
1897
|
}
|
|
1888
1898
|
};
|
|
1889
|
-
},
|
|
1899
|
+
}, Tl = function(e) {
|
|
1890
1900
|
return e === void 0 && (e = {}), {
|
|
1891
1901
|
name: "shift",
|
|
1892
1902
|
options: e,
|
|
@@ -1911,29 +1921,29 @@ const Tl = function(e) {
|
|
|
1911
1921
|
}
|
|
1912
1922
|
},
|
|
1913
1923
|
...c
|
|
1914
|
-
} =
|
|
1924
|
+
} = Ue(e, t), a = {
|
|
1915
1925
|
x: l,
|
|
1916
1926
|
y: o
|
|
1917
|
-
}, s = await
|
|
1918
|
-
let f = a[
|
|
1927
|
+
}, s = await Cn(t, c), d = Ke(ce(n)), v = wn(d);
|
|
1928
|
+
let f = a[v], g = a[d];
|
|
1919
1929
|
if (r) {
|
|
1920
|
-
const h =
|
|
1930
|
+
const h = v === "y" ? "top" : "left", b = v === "y" ? "bottom" : "right", y = f + s[h], x = f - s[b];
|
|
1921
1931
|
f = Lt(y, f, x);
|
|
1922
1932
|
}
|
|
1923
1933
|
if (i) {
|
|
1924
|
-
const h = d === "y" ? "top" : "left", b = d === "y" ? "bottom" : "right", y =
|
|
1925
|
-
|
|
1934
|
+
const h = d === "y" ? "top" : "left", b = d === "y" ? "bottom" : "right", y = g + s[h], x = g - s[b];
|
|
1935
|
+
g = Lt(y, g, x);
|
|
1926
1936
|
}
|
|
1927
|
-
const
|
|
1937
|
+
const m = u.fn({
|
|
1928
1938
|
...t,
|
|
1929
|
-
[
|
|
1930
|
-
[d]:
|
|
1939
|
+
[v]: f,
|
|
1940
|
+
[d]: g
|
|
1931
1941
|
});
|
|
1932
1942
|
return {
|
|
1933
|
-
...
|
|
1943
|
+
...m,
|
|
1934
1944
|
data: {
|
|
1935
|
-
x:
|
|
1936
|
-
y:
|
|
1945
|
+
x: m.x - l,
|
|
1946
|
+
y: m.y - o
|
|
1937
1947
|
}
|
|
1938
1948
|
};
|
|
1939
1949
|
}
|
|
@@ -1942,7 +1952,7 @@ const Tl = function(e) {
|
|
|
1942
1952
|
function ne(e) {
|
|
1943
1953
|
return ft(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1944
1954
|
}
|
|
1945
|
-
function
|
|
1955
|
+
function U(e) {
|
|
1946
1956
|
var t;
|
|
1947
1957
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1948
1958
|
}
|
|
@@ -1951,16 +1961,16 @@ function le(e) {
|
|
|
1951
1961
|
return (t = (ft(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1952
1962
|
}
|
|
1953
1963
|
function ft(e) {
|
|
1954
|
-
return e instanceof Node || e instanceof
|
|
1964
|
+
return e instanceof Node || e instanceof U(e).Node;
|
|
1955
1965
|
}
|
|
1956
1966
|
function oe(e) {
|
|
1957
|
-
return e instanceof Element || e instanceof
|
|
1967
|
+
return e instanceof Element || e instanceof U(e).Element;
|
|
1958
1968
|
}
|
|
1959
1969
|
function Z(e) {
|
|
1960
|
-
return e instanceof HTMLElement || e instanceof
|
|
1970
|
+
return e instanceof HTMLElement || e instanceof U(e).HTMLElement;
|
|
1961
1971
|
}
|
|
1962
|
-
function
|
|
1963
|
-
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
1972
|
+
function At(e) {
|
|
1973
|
+
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
|
|
1964
1974
|
}
|
|
1965
1975
|
function Pe(e) {
|
|
1966
1976
|
const {
|
|
@@ -1971,14 +1981,14 @@ function Pe(e) {
|
|
|
1971
1981
|
} = q(e);
|
|
1972
1982
|
return /auto|scroll|overlay|hidden|clip/.test(t + o + l) && !["inline", "contents"].includes(n);
|
|
1973
1983
|
}
|
|
1974
|
-
function
|
|
1984
|
+
function Ll(e) {
|
|
1975
1985
|
return ["table", "td", "th"].includes(ne(e));
|
|
1976
1986
|
}
|
|
1977
1987
|
function pt(e) {
|
|
1978
1988
|
const t = mt(), l = q(e);
|
|
1979
1989
|
return l.transform !== "none" || l.perspective !== "none" || (l.containerType ? l.containerType !== "normal" : !1) || !t && (l.backdropFilter ? l.backdropFilter !== "none" : !1) || !t && (l.filter ? l.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (l.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (l.contain || "").includes(o));
|
|
1980
1990
|
}
|
|
1981
|
-
function
|
|
1991
|
+
function Il(e) {
|
|
1982
1992
|
let t = ge(e);
|
|
1983
1993
|
for (; Z(t) && !Ge(t); ) {
|
|
1984
1994
|
if (pt(t))
|
|
@@ -1994,7 +2004,7 @@ function Ge(e) {
|
|
|
1994
2004
|
return ["html", "body", "#document"].includes(ne(e));
|
|
1995
2005
|
}
|
|
1996
2006
|
function q(e) {
|
|
1997
|
-
return
|
|
2007
|
+
return U(e).getComputedStyle(e);
|
|
1998
2008
|
}
|
|
1999
2009
|
function qe(e) {
|
|
2000
2010
|
return oe(e) ? {
|
|
@@ -2012,19 +2022,19 @@ function ge(e) {
|
|
|
2012
2022
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
2013
2023
|
e.assignedSlot || // DOM Element detected.
|
|
2014
2024
|
e.parentNode || // ShadowRoot detected.
|
|
2015
|
-
|
|
2025
|
+
At(e) && e.host || // Fallback.
|
|
2016
2026
|
le(e)
|
|
2017
2027
|
);
|
|
2018
|
-
return
|
|
2028
|
+
return At(t) ? t.host : t;
|
|
2019
2029
|
}
|
|
2020
|
-
function
|
|
2030
|
+
function On(e) {
|
|
2021
2031
|
const t = ge(e);
|
|
2022
|
-
return Ge(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Z(t) && Pe(t) ? t :
|
|
2032
|
+
return Ge(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Z(t) && Pe(t) ? t : On(t);
|
|
2023
2033
|
}
|
|
2024
2034
|
function Ee(e, t, l) {
|
|
2025
2035
|
var o;
|
|
2026
2036
|
t === void 0 && (t = []), l === void 0 && (l = !0);
|
|
2027
|
-
const n =
|
|
2037
|
+
const n = On(e), r = n === ((o = e.ownerDocument) == null ? void 0 : o.body), i = U(n);
|
|
2028
2038
|
return r ? t.concat(i, i.visualViewport || [], Pe(n) ? n : [], i.frameElement && l ? Ee(i.frameElement) : []) : t.concat(n, Ee(n, [], l));
|
|
2029
2039
|
}
|
|
2030
2040
|
function Rn(e) {
|
|
@@ -2057,28 +2067,28 @@ function ve(e) {
|
|
|
2057
2067
|
}
|
|
2058
2068
|
const Al = /* @__PURE__ */ ae(0);
|
|
2059
2069
|
function En(e) {
|
|
2060
|
-
const t =
|
|
2070
|
+
const t = U(e);
|
|
2061
2071
|
return !mt() || !t.visualViewport ? Al : {
|
|
2062
2072
|
x: t.visualViewport.offsetLeft,
|
|
2063
2073
|
y: t.visualViewport.offsetTop
|
|
2064
2074
|
};
|
|
2065
2075
|
}
|
|
2066
|
-
function
|
|
2067
|
-
return t === void 0 && (t = !1), !l || t && l !==
|
|
2076
|
+
function $l(e, t, l) {
|
|
2077
|
+
return t === void 0 && (t = !1), !l || t && l !== U(e) ? !1 : t;
|
|
2068
2078
|
}
|
|
2069
2079
|
function de(e, t, l, o) {
|
|
2070
2080
|
t === void 0 && (t = !1), l === void 0 && (l = !1);
|
|
2071
2081
|
const n = e.getBoundingClientRect(), r = vt(e);
|
|
2072
2082
|
let i = ae(1);
|
|
2073
2083
|
t && (o ? oe(o) && (i = ve(o)) : i = ve(e));
|
|
2074
|
-
const u =
|
|
2084
|
+
const u = $l(r, l, o) ? En(r) : ae(0);
|
|
2075
2085
|
let c = (n.left + u.x) / i.x, a = (n.top + u.y) / i.y, s = n.width / i.x, d = n.height / i.y;
|
|
2076
2086
|
if (r) {
|
|
2077
|
-
const
|
|
2078
|
-
let
|
|
2079
|
-
for (;
|
|
2080
|
-
const
|
|
2081
|
-
c *=
|
|
2087
|
+
const v = U(r), f = o && oe(o) ? U(o) : o;
|
|
2088
|
+
let g = v.frameElement;
|
|
2089
|
+
for (; g && o && f !== v; ) {
|
|
2090
|
+
const m = ve(g), h = g.getBoundingClientRect(), b = q(g), y = h.left + (g.clientLeft + parseFloat(b.paddingLeft)) * m.x, x = h.top + (g.clientTop + parseFloat(b.paddingTop)) * m.y;
|
|
2091
|
+
c *= m.x, a *= m.y, s *= m.x, d *= m.y, c += y, a += x, g = U(g).frameElement;
|
|
2082
2092
|
}
|
|
2083
2093
|
}
|
|
2084
2094
|
return Fe({
|
|
@@ -2088,7 +2098,7 @@ function de(e, t, l, o) {
|
|
|
2088
2098
|
y: a
|
|
2089
2099
|
});
|
|
2090
2100
|
}
|
|
2091
|
-
function
|
|
2101
|
+
function Ml(e) {
|
|
2092
2102
|
let {
|
|
2093
2103
|
rect: t,
|
|
2094
2104
|
offsetParent: l,
|
|
@@ -2113,13 +2123,13 @@ function Vl(e) {
|
|
|
2113
2123
|
y: t.y * u.y - i.scrollTop * u.y + c.y
|
|
2114
2124
|
};
|
|
2115
2125
|
}
|
|
2116
|
-
function
|
|
2126
|
+
function Vl(e) {
|
|
2117
2127
|
return Array.from(e.getClientRects());
|
|
2118
2128
|
}
|
|
2119
2129
|
function Dn(e) {
|
|
2120
2130
|
return de(le(e)).left + qe(e).scrollLeft;
|
|
2121
2131
|
}
|
|
2122
|
-
function
|
|
2132
|
+
function Fl(e) {
|
|
2123
2133
|
const t = le(e), l = qe(e), o = e.ownerDocument.body, n = ue(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = ue(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
2124
2134
|
let i = -l.scrollLeft + Dn(e);
|
|
2125
2135
|
const u = -l.scrollTop;
|
|
@@ -2130,8 +2140,8 @@ function Nl(e) {
|
|
|
2130
2140
|
y: u
|
|
2131
2141
|
};
|
|
2132
2142
|
}
|
|
2133
|
-
function
|
|
2134
|
-
const l =
|
|
2143
|
+
function Nl(e, t) {
|
|
2144
|
+
const l = U(e), o = le(e), n = l.visualViewport;
|
|
2135
2145
|
let r = o.clientWidth, i = o.clientHeight, u = 0, c = 0;
|
|
2136
2146
|
if (n) {
|
|
2137
2147
|
r = n.width, i = n.height;
|
|
@@ -2145,7 +2155,7 @@ function Bl(e, t) {
|
|
|
2145
2155
|
y: c
|
|
2146
2156
|
};
|
|
2147
2157
|
}
|
|
2148
|
-
function
|
|
2158
|
+
function Bl(e, t) {
|
|
2149
2159
|
const l = de(e, !0, t === "fixed"), o = l.top + e.clientTop, n = l.left + e.clientLeft, r = Z(e) ? ve(e) : ae(1), i = e.clientWidth * r.x, u = e.clientHeight * r.y, c = n * r.x, a = o * r.y;
|
|
2150
2160
|
return {
|
|
2151
2161
|
width: i,
|
|
@@ -2154,14 +2164,14 @@ function jl(e, t) {
|
|
|
2154
2164
|
y: a
|
|
2155
2165
|
};
|
|
2156
2166
|
}
|
|
2157
|
-
function
|
|
2167
|
+
function $t(e, t, l) {
|
|
2158
2168
|
let o;
|
|
2159
2169
|
if (t === "viewport")
|
|
2160
|
-
o =
|
|
2170
|
+
o = Nl(e, l);
|
|
2161
2171
|
else if (t === "document")
|
|
2162
|
-
o =
|
|
2172
|
+
o = Fl(le(e));
|
|
2163
2173
|
else if (oe(t))
|
|
2164
|
-
o =
|
|
2174
|
+
o = Bl(t, l);
|
|
2165
2175
|
else {
|
|
2166
2176
|
const n = En(e);
|
|
2167
2177
|
o = {
|
|
@@ -2176,7 +2186,7 @@ function Pn(e, t) {
|
|
|
2176
2186
|
const l = ge(e);
|
|
2177
2187
|
return l === t || !oe(l) || Ge(l) ? !1 : q(l).position === "fixed" || Pn(l, t);
|
|
2178
2188
|
}
|
|
2179
|
-
function
|
|
2189
|
+
function jl(e, t) {
|
|
2180
2190
|
const l = t.get(e);
|
|
2181
2191
|
if (l)
|
|
2182
2192
|
return l;
|
|
@@ -2189,17 +2199,17 @@ function zl(e, t) {
|
|
|
2189
2199
|
}
|
|
2190
2200
|
return t.set(e, o), o;
|
|
2191
2201
|
}
|
|
2192
|
-
function
|
|
2202
|
+
function zl(e) {
|
|
2193
2203
|
let {
|
|
2194
2204
|
element: t,
|
|
2195
2205
|
boundary: l,
|
|
2196
2206
|
rootBoundary: o,
|
|
2197
2207
|
strategy: n
|
|
2198
2208
|
} = e;
|
|
2199
|
-
const i = [...l === "clippingAncestors" ?
|
|
2200
|
-
const d =
|
|
2201
|
-
return a.top = ue(d.top, a.top), a.right =
|
|
2202
|
-
},
|
|
2209
|
+
const i = [...l === "clippingAncestors" ? jl(t, this._c) : [].concat(l), o], u = i[0], c = i.reduce((a, s) => {
|
|
2210
|
+
const d = $t(t, s, n);
|
|
2211
|
+
return a.top = ue(d.top, a.top), a.right = $e(d.right, a.right), a.bottom = $e(d.bottom, a.bottom), a.left = ue(d.left, a.left), a;
|
|
2212
|
+
}, $t(t, u, n));
|
|
2203
2213
|
return {
|
|
2204
2214
|
width: c.right - c.left,
|
|
2205
2215
|
height: c.bottom - c.top,
|
|
@@ -2217,7 +2227,7 @@ function Hl(e) {
|
|
|
2217
2227
|
height: l
|
|
2218
2228
|
};
|
|
2219
2229
|
}
|
|
2220
|
-
function
|
|
2230
|
+
function Ul(e, t, l) {
|
|
2221
2231
|
const o = Z(t), n = le(t), r = l === "fixed", i = de(e, !0, r, t);
|
|
2222
2232
|
let u = {
|
|
2223
2233
|
scrollLeft: 0,
|
|
@@ -2241,15 +2251,15 @@ function Mt(e, t) {
|
|
|
2241
2251
|
return !Z(e) || q(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
|
|
2242
2252
|
}
|
|
2243
2253
|
function _n(e, t) {
|
|
2244
|
-
const l =
|
|
2254
|
+
const l = U(e);
|
|
2245
2255
|
if (!Z(e))
|
|
2246
2256
|
return l;
|
|
2247
2257
|
let o = Mt(e, t);
|
|
2248
|
-
for (; o &&
|
|
2258
|
+
for (; o && Ll(o) && q(o).position === "static"; )
|
|
2249
2259
|
o = Mt(o, t);
|
|
2250
|
-
return o && (ne(o) === "html" || ne(o) === "body" && q(o).position === "static" && !pt(o)) ? l : o ||
|
|
2260
|
+
return o && (ne(o) === "html" || ne(o) === "body" && q(o).position === "static" && !pt(o)) ? l : o || Il(e) || l;
|
|
2251
2261
|
}
|
|
2252
|
-
const
|
|
2262
|
+
const Wl = async function(e) {
|
|
2253
2263
|
let {
|
|
2254
2264
|
reference: t,
|
|
2255
2265
|
floating: l,
|
|
@@ -2257,7 +2267,7 @@ const Kl = async function(e) {
|
|
|
2257
2267
|
} = e;
|
|
2258
2268
|
const n = this.getOffsetParent || _n, r = this.getDimensions;
|
|
2259
2269
|
return {
|
|
2260
|
-
reference:
|
|
2270
|
+
reference: Ul(t, await n(l), o),
|
|
2261
2271
|
floating: {
|
|
2262
2272
|
x: 0,
|
|
2263
2273
|
y: 0,
|
|
@@ -2265,22 +2275,22 @@ const Kl = async function(e) {
|
|
|
2265
2275
|
}
|
|
2266
2276
|
};
|
|
2267
2277
|
};
|
|
2268
|
-
function
|
|
2278
|
+
function Kl(e) {
|
|
2269
2279
|
return q(e).direction === "rtl";
|
|
2270
2280
|
}
|
|
2271
|
-
const
|
|
2272
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
2281
|
+
const Gl = {
|
|
2282
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ml,
|
|
2273
2283
|
getDocumentElement: le,
|
|
2274
|
-
getClippingRect:
|
|
2284
|
+
getClippingRect: zl,
|
|
2275
2285
|
getOffsetParent: _n,
|
|
2276
|
-
getElementRects:
|
|
2277
|
-
getClientRects:
|
|
2286
|
+
getElementRects: Wl,
|
|
2287
|
+
getClientRects: Vl,
|
|
2278
2288
|
getDimensions: Hl,
|
|
2279
2289
|
getScale: ve,
|
|
2280
2290
|
isElement: oe,
|
|
2281
|
-
isRTL:
|
|
2291
|
+
isRTL: Kl
|
|
2282
2292
|
};
|
|
2283
|
-
function
|
|
2293
|
+
function ql(e, t) {
|
|
2284
2294
|
let l = null, o;
|
|
2285
2295
|
const n = le(e);
|
|
2286
2296
|
function r() {
|
|
@@ -2292,13 +2302,13 @@ function Xl(e, t) {
|
|
|
2292
2302
|
left: a,
|
|
2293
2303
|
top: s,
|
|
2294
2304
|
width: d,
|
|
2295
|
-
height:
|
|
2305
|
+
height: v
|
|
2296
2306
|
} = e.getBoundingClientRect();
|
|
2297
|
-
if (u || t(), !d || !
|
|
2307
|
+
if (u || t(), !d || !v)
|
|
2298
2308
|
return;
|
|
2299
|
-
const f = Ie(s),
|
|
2300
|
-
rootMargin: -f + "px " + -
|
|
2301
|
-
threshold: ue(0,
|
|
2309
|
+
const f = Ie(s), g = Ie(n.clientWidth - (a + d)), m = Ie(n.clientHeight - (s + v)), h = Ie(a), y = {
|
|
2310
|
+
rootMargin: -f + "px " + -g + "px " + -m + "px " + -h + "px",
|
|
2311
|
+
threshold: ue(0, $e(1, c)) || 1
|
|
2302
2312
|
};
|
|
2303
2313
|
let x = !0;
|
|
2304
2314
|
function w(S) {
|
|
@@ -2325,7 +2335,7 @@ function Xl(e, t) {
|
|
|
2325
2335
|
}
|
|
2326
2336
|
return i(!0), r;
|
|
2327
2337
|
}
|
|
2328
|
-
function
|
|
2338
|
+
function Xl(e, t, l, o) {
|
|
2329
2339
|
o === void 0 && (o = {});
|
|
2330
2340
|
const {
|
|
2331
2341
|
ancestorScroll: n = !0,
|
|
@@ -2339,44 +2349,44 @@ function Yl(e, t, l, o) {
|
|
|
2339
2349
|
passive: !0
|
|
2340
2350
|
}), r && b.addEventListener("resize", l);
|
|
2341
2351
|
});
|
|
2342
|
-
const d = a && u ?
|
|
2343
|
-
let
|
|
2352
|
+
const d = a && u ? ql(a, l) : null;
|
|
2353
|
+
let v = -1, f = null;
|
|
2344
2354
|
i && (f = new ResizeObserver((b) => {
|
|
2345
2355
|
let [y] = b;
|
|
2346
|
-
y && y.target === a && f && (f.unobserve(t), cancelAnimationFrame(
|
|
2356
|
+
y && y.target === a && f && (f.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
|
|
2347
2357
|
f && f.observe(t);
|
|
2348
2358
|
})), l();
|
|
2349
2359
|
}), a && !c && f.observe(a), f.observe(t));
|
|
2350
|
-
let
|
|
2360
|
+
let g, m = c ? de(e) : null;
|
|
2351
2361
|
c && h();
|
|
2352
2362
|
function h() {
|
|
2353
2363
|
const b = de(e);
|
|
2354
|
-
|
|
2364
|
+
m && (b.x !== m.x || b.y !== m.y || b.width !== m.width || b.height !== m.height) && l(), m = b, g = requestAnimationFrame(h);
|
|
2355
2365
|
}
|
|
2356
2366
|
return l(), () => {
|
|
2357
2367
|
s.forEach((b) => {
|
|
2358
2368
|
n && b.removeEventListener("scroll", l), r && b.removeEventListener("resize", l);
|
|
2359
|
-
}), d && d(), f && f.disconnect(), f = null, c && cancelAnimationFrame(
|
|
2369
|
+
}), d && d(), f && f.disconnect(), f = null, c && cancelAnimationFrame(g);
|
|
2360
2370
|
};
|
|
2361
2371
|
}
|
|
2362
|
-
const
|
|
2372
|
+
const Yl = Tl, Ql = Dl, Zl = (e, t, l) => {
|
|
2363
2373
|
const o = /* @__PURE__ */ new Map(), n = {
|
|
2364
|
-
platform:
|
|
2374
|
+
platform: Gl,
|
|
2365
2375
|
...l
|
|
2366
2376
|
}, r = {
|
|
2367
2377
|
...n.platform,
|
|
2368
2378
|
_c: o
|
|
2369
2379
|
};
|
|
2370
|
-
return
|
|
2380
|
+
return El(e, t, {
|
|
2371
2381
|
...n,
|
|
2372
2382
|
platform: r
|
|
2373
2383
|
});
|
|
2374
2384
|
};
|
|
2375
|
-
function
|
|
2385
|
+
function Jl(e) {
|
|
2376
2386
|
return e != null && typeof e == "object" && "$el" in e;
|
|
2377
2387
|
}
|
|
2378
2388
|
function Vt(e) {
|
|
2379
|
-
if (
|
|
2389
|
+
if (Jl(e)) {
|
|
2380
2390
|
const t = e.$el;
|
|
2381
2391
|
return ft(t) && ne(t) === "#comment" ? null : t;
|
|
2382
2392
|
}
|
|
@@ -2389,31 +2399,31 @@ function Ft(e, t) {
|
|
|
2389
2399
|
const l = Tn(e);
|
|
2390
2400
|
return Math.round(t * l) / l;
|
|
2391
2401
|
}
|
|
2392
|
-
function
|
|
2402
|
+
function er(e, t, l) {
|
|
2393
2403
|
l === void 0 && (l = {});
|
|
2394
2404
|
const o = l.whileElementsMounted, n = k(() => {
|
|
2395
|
-
var
|
|
2396
|
-
return (
|
|
2405
|
+
var O;
|
|
2406
|
+
return (O = P(l.open)) != null ? O : !0;
|
|
2397
2407
|
}), r = k(() => P(l.middleware)), i = k(() => {
|
|
2398
|
-
var
|
|
2399
|
-
return (
|
|
2408
|
+
var O;
|
|
2409
|
+
return (O = P(l.placement)) != null ? O : "bottom";
|
|
2400
2410
|
}), u = k(() => {
|
|
2401
|
-
var
|
|
2402
|
-
return (
|
|
2411
|
+
var O;
|
|
2412
|
+
return (O = P(l.strategy)) != null ? O : "absolute";
|
|
2403
2413
|
}), c = k(() => {
|
|
2404
|
-
var
|
|
2405
|
-
return (
|
|
2406
|
-
}), a = k(() => Vt(e.value)), s = k(() => Vt(t.value)), d =
|
|
2407
|
-
const
|
|
2414
|
+
var O;
|
|
2415
|
+
return (O = P(l.transform)) != null ? O : !0;
|
|
2416
|
+
}), a = k(() => Vt(e.value)), s = k(() => Vt(t.value)), d = C(0), v = C(0), f = C(u.value), g = C(i.value), m = Vn({}), h = C(!1), b = k(() => {
|
|
2417
|
+
const O = {
|
|
2408
2418
|
position: f.value,
|
|
2409
2419
|
left: "0",
|
|
2410
2420
|
top: "0"
|
|
2411
2421
|
};
|
|
2412
2422
|
if (!s.value)
|
|
2413
|
-
return
|
|
2414
|
-
const N = Ft(s.value, d.value), re = Ft(s.value,
|
|
2423
|
+
return O;
|
|
2424
|
+
const N = Ft(s.value, d.value), re = Ft(s.value, v.value);
|
|
2415
2425
|
return c.value ? {
|
|
2416
|
-
...
|
|
2426
|
+
...O,
|
|
2417
2427
|
transform: "translate(" + N + "px, " + re + "px)",
|
|
2418
2428
|
...Tn(s.value) >= 1.5 && {
|
|
2419
2429
|
willChange: "transform"
|
|
@@ -2426,12 +2436,12 @@ function tr(e, t, l) {
|
|
|
2426
2436
|
});
|
|
2427
2437
|
let y;
|
|
2428
2438
|
function x() {
|
|
2429
|
-
a.value == null || s.value == null ||
|
|
2439
|
+
a.value == null || s.value == null || Zl(a.value, s.value, {
|
|
2430
2440
|
middleware: r.value,
|
|
2431
2441
|
placement: i.value,
|
|
2432
2442
|
strategy: u.value
|
|
2433
|
-
}).then((
|
|
2434
|
-
d.value =
|
|
2443
|
+
}).then((O) => {
|
|
2444
|
+
d.value = O.x, v.value = O.y, f.value = O.strategy, g.value = O.placement, m.value = O.middlewareData, h.value = !0;
|
|
2435
2445
|
});
|
|
2436
2446
|
}
|
|
2437
2447
|
function w() {
|
|
@@ -2458,40 +2468,40 @@ function tr(e, t, l) {
|
|
|
2458
2468
|
flush: "sync"
|
|
2459
2469
|
}), Fn() && Nn(w), {
|
|
2460
2470
|
x: me(d),
|
|
2461
|
-
y: me(
|
|
2471
|
+
y: me(v),
|
|
2462
2472
|
strategy: me(f),
|
|
2463
|
-
placement: me(
|
|
2464
|
-
middlewareData: me(
|
|
2473
|
+
placement: me(g),
|
|
2474
|
+
middlewareData: me(m),
|
|
2465
2475
|
isPositioned: me(h),
|
|
2466
2476
|
floatingStyles: b,
|
|
2467
2477
|
update: x
|
|
2468
2478
|
};
|
|
2469
2479
|
}
|
|
2470
|
-
const _r = /* @__PURE__ */
|
|
2480
|
+
const _r = /* @__PURE__ */ A({
|
|
2471
2481
|
__name: "MenuContainer",
|
|
2472
2482
|
props: {
|
|
2473
2483
|
position: { default: "left" },
|
|
2474
2484
|
usePortal: { type: [Boolean, String], default: !1 }
|
|
2475
2485
|
},
|
|
2476
2486
|
setup(e) {
|
|
2477
|
-
const t = e, l =
|
|
2487
|
+
const t = e, l = C(null), o = C(null), n = t.position === "left" ? "bottom-end" : "bottom-start", { floatingStyles: r } = er(l, o, {
|
|
2478
2488
|
placement: n,
|
|
2479
|
-
whileElementsMounted:
|
|
2480
|
-
middleware: [
|
|
2489
|
+
whileElementsMounted: Xl,
|
|
2490
|
+
middleware: [_l(6), Ql(), Yl({ padding: 6 })]
|
|
2481
2491
|
});
|
|
2482
|
-
return (i, u) => (R(), K(P(
|
|
2492
|
+
return (i, u) => (R(), K(P(pl), {
|
|
2483
2493
|
as: "div",
|
|
2484
2494
|
class: "inline-block text-left"
|
|
2485
2495
|
}, {
|
|
2486
2496
|
default: W(() => [
|
|
2487
|
-
F(P(
|
|
2497
|
+
F(P(ml), {
|
|
2488
2498
|
class: "focus:outline-none",
|
|
2489
2499
|
ref_key: "reference",
|
|
2490
2500
|
ref: l
|
|
2491
2501
|
}, {
|
|
2492
2502
|
default: W(() => [
|
|
2493
2503
|
ht(i.$slots, "button", {}, () => [
|
|
2494
|
-
F(P(
|
|
2504
|
+
F(P(z), {
|
|
2495
2505
|
class: "fill-current",
|
|
2496
2506
|
name: "ellipsis-h"
|
|
2497
2507
|
})
|
|
@@ -2503,7 +2513,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2503
2513
|
to: typeof i.usePortal == "string" ? i.usePortal : "body",
|
|
2504
2514
|
disabled: !i.usePortal
|
|
2505
2515
|
}, [
|
|
2506
|
-
|
|
2516
|
+
T("div", {
|
|
2507
2517
|
class: "w-56 z-20",
|
|
2508
2518
|
style: Nt(P(r)),
|
|
2509
2519
|
ref_key: "floating",
|
|
@@ -2518,8 +2528,8 @@ const _r = /* @__PURE__ */ $({
|
|
|
2518
2528
|
"leave-to-class": "transform -translate-y-2 opacity-0"
|
|
2519
2529
|
}, {
|
|
2520
2530
|
default: W(() => [
|
|
2521
|
-
F(P(
|
|
2522
|
-
class:
|
|
2531
|
+
F(P(vl), {
|
|
2532
|
+
class: $([
|
|
2523
2533
|
"z-40 mt-1 p-1 bg-white rounded shadow-lg text-grey-700 focus:outline-none w-full"
|
|
2524
2534
|
])
|
|
2525
2535
|
}, {
|
|
@@ -2537,10 +2547,10 @@ const _r = /* @__PURE__ */ $({
|
|
|
2537
2547
|
_: 3
|
|
2538
2548
|
}));
|
|
2539
2549
|
}
|
|
2540
|
-
}),
|
|
2550
|
+
}), tr = {
|
|
2541
2551
|
key: 0,
|
|
2542
2552
|
class: "bg-grey-300 px-2 rounded-lg max-w-[66px] truncate"
|
|
2543
|
-
}, Tr = /* @__PURE__ */
|
|
2553
|
+
}, Tr = /* @__PURE__ */ A({
|
|
2544
2554
|
__name: "MenuLink",
|
|
2545
2555
|
props: {
|
|
2546
2556
|
label: {},
|
|
@@ -2549,17 +2559,17 @@ const _r = /* @__PURE__ */ $({
|
|
|
2549
2559
|
as: {}
|
|
2550
2560
|
},
|
|
2551
2561
|
setup(e) {
|
|
2552
|
-
return (t, l) => (R(), K(P(
|
|
2562
|
+
return (t, l) => (R(), K(P(gl), jn(zn({ disabled: t.disabled })), {
|
|
2553
2563
|
default: W(({ active: o }) => [
|
|
2554
|
-
(R(), K(
|
|
2555
|
-
class:
|
|
2564
|
+
(R(), K(Hn(t.as || "span"), {
|
|
2565
|
+
class: $(["flex items-center justify-between px-4 py-2 text-xs leading-5 transition-colors duration-100 rounded-lg", [
|
|
2556
2566
|
o ? "bg-grey-200" : "",
|
|
2557
2567
|
t.disabled ? "opacity-50 pointer-events-none" : "hover:bg-grey-200 focus:bg-grey-200 focus:outline-none"
|
|
2558
2568
|
]])
|
|
2559
2569
|
}, {
|
|
2560
2570
|
default: W(() => [
|
|
2561
|
-
|
|
2562
|
-
t.meta ? (R(),
|
|
2571
|
+
T("span", null, H(t.label), 1),
|
|
2572
|
+
t.meta ? (R(), L("span", tr, H(t.meta), 1)) : M("", !0)
|
|
2563
2573
|
]),
|
|
2564
2574
|
_: 2
|
|
2565
2575
|
}, 1032, ["class"]))
|
|
@@ -2567,19 +2577,19 @@ const _r = /* @__PURE__ */ $({
|
|
|
2567
2577
|
_: 1
|
|
2568
2578
|
}, 16));
|
|
2569
2579
|
}
|
|
2570
|
-
}),
|
|
2580
|
+
}), nr = { class: "relative" }, or = {
|
|
2571
2581
|
key: 0,
|
|
2572
2582
|
class: "absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none"
|
|
2573
|
-
},
|
|
2583
|
+
}, lr = {
|
|
2574
2584
|
key: 1,
|
|
2575
2585
|
class: "block truncate"
|
|
2576
|
-
},
|
|
2586
|
+
}, rr = {
|
|
2577
2587
|
key: 2,
|
|
2578
2588
|
class: "text-grey-500 truncate"
|
|
2579
|
-
},
|
|
2589
|
+
}, ir = { class: "absolute right-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none" }, ar = { class: "absolute right-2 inset-y-0 flex items-center" }, sr = {
|
|
2580
2590
|
key: 0,
|
|
2581
2591
|
class: "bg-grey-500 text-grey-100 rounded text-xs px-2 py-1"
|
|
2582
|
-
}, Lr = /* @__PURE__ */
|
|
2592
|
+
}, ur = ["innerHTML"], Lr = /* @__PURE__ */ A({
|
|
2583
2593
|
__name: "Select",
|
|
2584
2594
|
props: {
|
|
2585
2595
|
modelValue: {},
|
|
@@ -2592,7 +2602,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2592
2602
|
},
|
|
2593
2603
|
emits: ["update:modelValue"],
|
|
2594
2604
|
setup(e, { emit: t }) {
|
|
2595
|
-
const l = e, o = l.modelValue ?
|
|
2605
|
+
const l = e, o = l.modelValue ? C(l.modelValue) : C(void 0), n = t, { inputClasses: r, disabledClasses: i, textSizeClasses: u } = rt(l);
|
|
2596
2606
|
return Q(
|
|
2597
2607
|
() => l.modelValue,
|
|
2598
2608
|
(c) => {
|
|
@@ -2601,28 +2611,28 @@ const _r = /* @__PURE__ */ $({
|
|
|
2601
2611
|
}
|
|
2602
2612
|
), Q(o, (c) => {
|
|
2603
2613
|
c && n("update:modelValue", c);
|
|
2604
|
-
}), (c, a) => (R(), K(P(
|
|
2614
|
+
}), (c, a) => (R(), K(P(il), {
|
|
2605
2615
|
as: "div",
|
|
2606
2616
|
modelValue: P(o),
|
|
2607
|
-
"onUpdate:modelValue": a[0] || (a[0] = (s) =>
|
|
2617
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => Un(o) ? o.value = s : null),
|
|
2608
2618
|
disabled: c.isDisabled
|
|
2609
2619
|
}, {
|
|
2610
2620
|
default: W(() => [
|
|
2611
|
-
|
|
2612
|
-
F(P(
|
|
2613
|
-
class:
|
|
2621
|
+
T("div", nr, [
|
|
2622
|
+
F(P(al), {
|
|
2623
|
+
class: $(["w-full mono-50 bg-white text-grey-800 placeholder-grey-600 border border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder-grey-400 dark:border-grey-700 focus:ring-2 focus:border-blue-400 focus:ring-blue-400 focus:outline-none dark:focus:border-blue-800 dark:focus:ring-blue-800 cursor-default rounded font-normal text-left", [P(r), P(u), P(i)]])
|
|
2614
2624
|
}, {
|
|
2615
2625
|
default: W(() => {
|
|
2616
2626
|
var s;
|
|
2617
2627
|
return [
|
|
2618
|
-
c.icon ? (R(),
|
|
2619
|
-
F(
|
|
2628
|
+
c.icon ? (R(), L("span", or, [
|
|
2629
|
+
F(z, {
|
|
2620
2630
|
name: ((s = P(o)) == null ? void 0 : s.icon) ?? c.icon
|
|
2621
2631
|
}, null, 8, ["name"])
|
|
2622
2632
|
])) : M("", !0),
|
|
2623
|
-
P(o) ? (R(),
|
|
2624
|
-
|
|
2625
|
-
F(
|
|
2633
|
+
P(o) ? (R(), L("span", lr, H(P(o).label), 1)) : (R(), L("span", rr, H(c.placeholder), 1)),
|
|
2634
|
+
T("span", ir, [
|
|
2635
|
+
F(z, {
|
|
2626
2636
|
class: "text-grey-400",
|
|
2627
2637
|
name: "chevron-down",
|
|
2628
2638
|
"aria-hidden": "true"
|
|
@@ -2638,46 +2648,48 @@ const _r = /* @__PURE__ */ $({
|
|
|
2638
2648
|
"leave-to-class": "opacity-0"
|
|
2639
2649
|
}, {
|
|
2640
2650
|
default: W(() => [
|
|
2641
|
-
F(P(
|
|
2651
|
+
F(P(sl), { class: "absolute z-10 mt-1 w-full bg-white dark:bg-grey-700 dark:text-grey-50 shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm" }, {
|
|
2642
2652
|
default: W(() => [
|
|
2643
|
-
(R(!0),
|
|
2653
|
+
(R(!0), L(be, null, jt(c.options, (s) => (R(), K(P(ul), {
|
|
2644
2654
|
as: "template",
|
|
2645
2655
|
key: s.id,
|
|
2646
2656
|
value: s,
|
|
2647
2657
|
disabled: s.disabled
|
|
2648
2658
|
}, {
|
|
2649
|
-
default: W(({ active: d, selected:
|
|
2650
|
-
|
|
2651
|
-
class:
|
|
2659
|
+
default: W(({ active: d, selected: v }) => [
|
|
2660
|
+
T("li", {
|
|
2661
|
+
class: $([
|
|
2652
2662
|
d ? "text-white bg-blue-500" : "text-grey-900 dark:text-grey-50",
|
|
2653
2663
|
"cursor-default select-none relative py-2 pl-3 pr-12",
|
|
2654
2664
|
{ "opacity-50 bg-grey-100": s.disabled }
|
|
2655
2665
|
])
|
|
2656
2666
|
}, [
|
|
2657
|
-
|
|
2658
|
-
s.disabled && c.disabledBadge ? (R(),
|
|
2667
|
+
T("div", ar, [
|
|
2668
|
+
s.disabled && c.disabledBadge ? (R(), L("span", sr, H(c.disabledBadge), 1)) : M("", !0)
|
|
2659
2669
|
]),
|
|
2660
|
-
|
|
2661
|
-
class:
|
|
2662
|
-
|
|
2670
|
+
T("span", {
|
|
2671
|
+
class: $([
|
|
2672
|
+
v ? "font-semibold" : "font-normal",
|
|
2663
2673
|
"block truncate"
|
|
2664
2674
|
])
|
|
2665
2675
|
}, [
|
|
2666
|
-
s.icon ? (R(), K(
|
|
2676
|
+
s.icon ? (R(), K(z, {
|
|
2667
2677
|
key: 0,
|
|
2668
2678
|
class: "inline-block mr-1",
|
|
2669
2679
|
name: s.icon
|
|
2670
2680
|
}, null, 8, ["name"])) : M("", !0),
|
|
2671
|
-
|
|
2681
|
+
T("span", {
|
|
2682
|
+
innerHTML: s.label
|
|
2683
|
+
}, null, 8, ur)
|
|
2672
2684
|
], 2),
|
|
2673
|
-
|
|
2685
|
+
v ? (R(), L("span", {
|
|
2674
2686
|
key: 0,
|
|
2675
|
-
class:
|
|
2687
|
+
class: $([
|
|
2676
2688
|
d ? "text-blue-100" : "text-blue-500",
|
|
2677
2689
|
"absolute inset-y-0 right-0 flex items-center pr-4"
|
|
2678
2690
|
])
|
|
2679
2691
|
}, [
|
|
2680
|
-
F(
|
|
2692
|
+
F(z, {
|
|
2681
2693
|
name: "check",
|
|
2682
2694
|
class: "h-5 w-5",
|
|
2683
2695
|
"aria-hidden": "true"
|
|
@@ -2710,7 +2722,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2710
2722
|
}, vr = {
|
|
2711
2723
|
key: 1,
|
|
2712
2724
|
class: "w-1/3 h-10 mt-6 bg-current rounded-lg"
|
|
2713
|
-
}, Ir = /* @__PURE__ */
|
|
2725
|
+
}, Ir = /* @__PURE__ */ A({
|
|
2714
2726
|
__name: "Skeleton",
|
|
2715
2727
|
props: {
|
|
2716
2728
|
avatar: { type: Boolean, default: !1 },
|
|
@@ -2725,24 +2737,24 @@ const _r = /* @__PURE__ */ $({
|
|
|
2725
2737
|
margin: `mr-${o[Math.floor(Math.random() * o.length)]}`
|
|
2726
2738
|
};
|
|
2727
2739
|
});
|
|
2728
|
-
return (o, n) => (R(),
|
|
2729
|
-
|
|
2730
|
-
o.avatar ? (R(),
|
|
2731
|
-
o.title ? (R(),
|
|
2740
|
+
return (o, n) => (R(), L("div", cr, [
|
|
2741
|
+
T("div", dr, [
|
|
2742
|
+
o.avatar ? (R(), L("div", fr)) : M("", !0),
|
|
2743
|
+
o.title ? (R(), L("div", pr)) : M("", !0)
|
|
2732
2744
|
]),
|
|
2733
|
-
o.lines > 0 ? (R(),
|
|
2734
|
-
(R(!0),
|
|
2735
|
-
class:
|
|
2745
|
+
o.lines > 0 ? (R(), L("div", mr, [
|
|
2746
|
+
(R(!0), L(be, null, jt(P(l), (r, i) => (R(), L("div", {
|
|
2747
|
+
class: $(["h-4 bg-current rounded-lg", r.margin]),
|
|
2736
2748
|
key: i
|
|
2737
2749
|
}, null, 2))), 128))
|
|
2738
2750
|
])) : M("", !0),
|
|
2739
|
-
o.footer ? (R(),
|
|
2751
|
+
o.footer ? (R(), L("div", vr)) : M("", !0)
|
|
2740
2752
|
]));
|
|
2741
2753
|
}
|
|
2742
|
-
}),
|
|
2754
|
+
}), Ar = /* @__PURE__ */ A({
|
|
2743
2755
|
__name: "Spinner",
|
|
2744
2756
|
setup(e) {
|
|
2745
|
-
return (t, l) => (R(), K(P(
|
|
2757
|
+
return (t, l) => (R(), K(P(z), {
|
|
2746
2758
|
class: "animate-spin",
|
|
2747
2759
|
name: "circle-notch"
|
|
2748
2760
|
}));
|
|
@@ -2750,7 +2762,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2750
2762
|
}), gr = { class: "relative inline-flex items-center" }, br = ["aria-label", "tabindex"], hr = {
|
|
2751
2763
|
key: 0,
|
|
2752
2764
|
class: "absolute inset-0 flex items-center justify-center"
|
|
2753
|
-
},
|
|
2765
|
+
}, $r = /* @__PURE__ */ A({
|
|
2754
2766
|
__name: "SplitButton",
|
|
2755
2767
|
props: {
|
|
2756
2768
|
label: {},
|
|
@@ -2808,39 +2820,39 @@ const _r = /* @__PURE__ */ $({
|
|
|
2808
2820
|
function c() {
|
|
2809
2821
|
o.isDisabled || l("onClickSplit");
|
|
2810
2822
|
}
|
|
2811
|
-
return (a, s) => (R(),
|
|
2812
|
-
|
|
2823
|
+
return (a, s) => (R(), L("div", gr, [
|
|
2824
|
+
T("button", {
|
|
2813
2825
|
type: "button",
|
|
2814
2826
|
"aria-label": a.label,
|
|
2815
2827
|
tabindex: a.isDisabled ? "-1" : void 0,
|
|
2816
|
-
class:
|
|
2828
|
+
class: $(["relative transition duration-150 ease-in-out rounded-l-lg", n.value]),
|
|
2817
2829
|
onClick: u
|
|
2818
2830
|
}, [
|
|
2819
|
-
|
|
2820
|
-
class:
|
|
2831
|
+
T("div", {
|
|
2832
|
+
class: $(!a.isLoading || "invisible")
|
|
2821
2833
|
}, [
|
|
2822
|
-
|
|
2834
|
+
T("span", null, H(a.label), 1)
|
|
2823
2835
|
], 2),
|
|
2824
|
-
a.isLoading ? (R(),
|
|
2825
|
-
F(
|
|
2836
|
+
a.isLoading ? (R(), L("span", hr, [
|
|
2837
|
+
F(z, {
|
|
2826
2838
|
class: "ml-3 animate-spin",
|
|
2827
2839
|
name: "circle-notch"
|
|
2828
2840
|
})
|
|
2829
2841
|
])) : M("", !0)
|
|
2830
2842
|
], 10, br),
|
|
2831
|
-
|
|
2843
|
+
T("button", {
|
|
2832
2844
|
type: "button",
|
|
2833
|
-
class:
|
|
2845
|
+
class: $(["border-l-white/50 border-l transition duration-150 ease-in-out rounded-r-lg", [n.value, r.value]]),
|
|
2834
2846
|
onClick: c
|
|
2835
2847
|
}, [
|
|
2836
|
-
F(
|
|
2837
|
-
class:
|
|
2848
|
+
F(z, {
|
|
2849
|
+
class: $([i.value]),
|
|
2838
2850
|
name: a.icon
|
|
2839
2851
|
}, null, 8, ["class", "name"])
|
|
2840
2852
|
], 2)
|
|
2841
2853
|
]));
|
|
2842
2854
|
}
|
|
2843
|
-
}), yr = { class: "sr-only" }, Mr = /* @__PURE__ */
|
|
2855
|
+
}), yr = { class: "sr-only" }, Mr = /* @__PURE__ */ A({
|
|
2844
2856
|
__name: "Switch",
|
|
2845
2857
|
props: {
|
|
2846
2858
|
id: { default: qt() },
|
|
@@ -2855,19 +2867,19 @@ const _r = /* @__PURE__ */ $({
|
|
|
2855
2867
|
const l = t, o = (n) => {
|
|
2856
2868
|
l("update:modelValue", n), l("change", n);
|
|
2857
2869
|
};
|
|
2858
|
-
return (n, r) => (R(), K(P(
|
|
2870
|
+
return (n, r) => (R(), K(P(hl), {
|
|
2859
2871
|
modelValue: n.modelValue,
|
|
2860
2872
|
label: n.label,
|
|
2861
|
-
class:
|
|
2873
|
+
class: $([n.modelValue ? "bg-blue-700" : "bg-grey-700", "relative inline-flex items-center h-6 transition rounded-full w-14 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-grey-900 focus:ring-blue-300"]),
|
|
2862
2874
|
"onUpdate:modelValue": o
|
|
2863
2875
|
}, {
|
|
2864
2876
|
default: W(() => [
|
|
2865
|
-
|
|
2866
|
-
class:
|
|
2867
|
-
},
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
class:
|
|
2877
|
+
T("span", {
|
|
2878
|
+
class: $(["absolute text-xs text-center text-white inset-x-2", n.modelValue ? "pr-3" : "pl-3"])
|
|
2879
|
+
}, H(n.modelValue === !0 ? n.onLabel : n.offLabel), 3),
|
|
2880
|
+
T("span", yr, H(n.label), 1),
|
|
2881
|
+
T("span", {
|
|
2882
|
+
class: $([n.modelValue ? "translate-x-9" : "translate-x-1", "inline-block w-4 h-4 transition bg-white rounded-full"])
|
|
2871
2883
|
}, null, 2)
|
|
2872
2884
|
]),
|
|
2873
2885
|
_: 1
|
|
@@ -2875,7 +2887,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2875
2887
|
}
|
|
2876
2888
|
}), xr = { class: "relative" }, wr = ["tabindex", "value"], kr = {
|
|
2877
2889
|
inheritAttrs: !1
|
|
2878
|
-
}, Vr = /* @__PURE__ */
|
|
2890
|
+
}, Vr = /* @__PURE__ */ A({
|
|
2879
2891
|
...kr,
|
|
2880
2892
|
__name: "Textarea",
|
|
2881
2893
|
props: {
|
|
@@ -2888,13 +2900,13 @@ const _r = /* @__PURE__ */ $({
|
|
|
2888
2900
|
setup(e, { expose: t, emit: l }) {
|
|
2889
2901
|
const o = e, n = l, { inputClasses: r, disabledClasses: i, textSizeClasses: u } = rt(o), c = function(d) {
|
|
2890
2902
|
n("update:modelValue", (d == null ? void 0 : d.target).value);
|
|
2891
|
-
}, a =
|
|
2903
|
+
}, a = C(null);
|
|
2892
2904
|
return t({
|
|
2893
2905
|
focus: () => {
|
|
2894
2906
|
o.isDisabled || a.value.focus();
|
|
2895
2907
|
}
|
|
2896
|
-
}), (d,
|
|
2897
|
-
|
|
2908
|
+
}), (d, v) => (R(), L("div", xr, [
|
|
2909
|
+
T("textarea", ot({
|
|
2898
2910
|
class: ["mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [P(r), P(u), P(i)]],
|
|
2899
2911
|
tabindex: d.isDisabled ? "-1" : void 0,
|
|
2900
2912
|
value: d.modelValue ?? ""
|
|
@@ -2912,17 +2924,17 @@ const _r = /* @__PURE__ */ $({
|
|
|
2912
2924
|
export {
|
|
2913
2925
|
Rr as D9Button,
|
|
2914
2926
|
Er as D9Checkbox,
|
|
2915
|
-
|
|
2927
|
+
z as D9Icon,
|
|
2916
2928
|
Dr as D9Input,
|
|
2917
2929
|
Pr as D9Label,
|
|
2918
2930
|
_r as D9Menu,
|
|
2919
2931
|
Tr as D9MenuLink,
|
|
2920
2932
|
Lr as D9Select,
|
|
2921
2933
|
Ir as D9Skeleton,
|
|
2922
|
-
|
|
2923
|
-
|
|
2934
|
+
Ar as D9Spinner,
|
|
2935
|
+
$r as D9SplitButton,
|
|
2924
2936
|
Mr as D9Switch,
|
|
2925
2937
|
Vr as D9Textarea,
|
|
2926
2938
|
xt as brands,
|
|
2927
|
-
|
|
2939
|
+
Gn as icons
|
|
2928
2940
|
};
|