@deck9/ui 0.15.2 → 0.15.4
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 +474 -462
- package/dist/src/ui.umd.js +3 -3
- package/package.json +1 -1
package/dist/src/ui.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as A, computed as k, openBlock as R, createBlock as
|
|
1
|
+
import { defineComponent as A, computed as k, openBlock as R, createBlock as W, unref as _, mergeProps as ot, createCommentVNode as M, createElementBlock as T, normalizeClass as $, createElementVNode as L, toDisplayString as G, 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 U, 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
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 d from "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
import * as Se from "@fortawesome/free-brands-svg-icons";
|
|
6
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 = {
|
|
@@ -21,106 +21,114 @@ 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
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
24
|
+
d.faAlignCenter,
|
|
25
|
+
d.faAlignLeft,
|
|
26
|
+
d.faAlignRight,
|
|
27
|
+
d.faArrowRight,
|
|
28
|
+
d.faArrowUp19,
|
|
29
|
+
d.faAsterisk,
|
|
30
|
+
d.faAt,
|
|
31
|
+
d.faBold,
|
|
32
|
+
d.faBolt,
|
|
33
|
+
d.faCalendar,
|
|
34
|
+
d.faChartPie,
|
|
35
|
+
d.faCheck,
|
|
36
|
+
d.faCheckCircle,
|
|
37
|
+
d.faChevronDown,
|
|
38
|
+
d.faChevronLeft,
|
|
39
|
+
d.faChevronRight,
|
|
40
|
+
d.faChevronUp,
|
|
41
|
+
d.faCircleCheck,
|
|
42
|
+
d.faCircleNodes,
|
|
43
|
+
d.faCircleNotch,
|
|
44
|
+
d.faClipboard,
|
|
45
|
+
d.faCloudDownload,
|
|
46
|
+
d.faCloudUpload,
|
|
47
|
+
d.faCode,
|
|
48
|
+
d.faCodeBranch,
|
|
49
|
+
d.faCodeFork,
|
|
50
|
+
d.faCog,
|
|
51
|
+
d.faCompass,
|
|
52
|
+
d.faCrown,
|
|
53
|
+
d.faDiagramProject,
|
|
54
|
+
d.faDoorOpen,
|
|
55
|
+
d.faDotCircle,
|
|
56
|
+
d.faEllipsis,
|
|
57
|
+
d.faEllipsisVertical,
|
|
58
|
+
d.faEnvelope,
|
|
59
|
+
d.faExclamationTriangle,
|
|
60
|
+
d.faExternalLink,
|
|
61
|
+
d.faEye,
|
|
62
|
+
d.faEyeDropper,
|
|
63
|
+
d.faEyeSlash,
|
|
64
|
+
d.faFileLines,
|
|
65
|
+
d.faFilePdf,
|
|
66
|
+
d.faFileUpload,
|
|
67
|
+
d.faFileVideo,
|
|
68
|
+
d.faFileWaveform,
|
|
69
|
+
d.faFilter,
|
|
70
|
+
d.faFilter,
|
|
71
|
+
d.faFingerprint,
|
|
72
|
+
d.faFont,
|
|
73
|
+
d.faGears,
|
|
74
|
+
d.faGlobe,
|
|
75
|
+
d.faGripHorizontal,
|
|
76
|
+
d.faGripVertical,
|
|
77
|
+
d.faHandPointRight,
|
|
78
|
+
d.faHandPointRight,
|
|
79
|
+
d.faHashtag,
|
|
80
|
+
d.faHeading,
|
|
81
|
+
d.faHeart,
|
|
82
|
+
d.faImage,
|
|
83
|
+
d.faInfoCircle,
|
|
84
|
+
d.faItalic,
|
|
85
|
+
d.faLink,
|
|
86
|
+
d.faLinkSlash,
|
|
87
|
+
d.faList,
|
|
88
|
+
d.faListOl,
|
|
89
|
+
d.faListUl,
|
|
90
|
+
d.faLocationArrow,
|
|
91
|
+
d.faLocationCrosshairs,
|
|
92
|
+
d.faLock,
|
|
93
|
+
d.faLockOpen,
|
|
94
|
+
d.faMedal,
|
|
95
|
+
d.faMessage,
|
|
96
|
+
d.faMicrochip,
|
|
97
|
+
d.faPencilAlt,
|
|
98
|
+
d.faPenToSquare,
|
|
99
|
+
d.faPhone,
|
|
100
|
+
d.faPlayCircle,
|
|
101
|
+
d.faPlus,
|
|
102
|
+
d.faPlusCircle,
|
|
103
|
+
d.faPoo,
|
|
104
|
+
d.faPuzzlePiece,
|
|
105
|
+
d.faQuestion,
|
|
106
|
+
d.faQuoteLeft,
|
|
107
|
+
d.faQuoteRight,
|
|
108
|
+
d.faReply,
|
|
109
|
+
d.faReplyAll,
|
|
110
|
+
d.faRightLong,
|
|
111
|
+
d.faRobot,
|
|
112
|
+
d.faSave,
|
|
113
|
+
d.faShield,
|
|
114
|
+
d.faSignal,
|
|
115
|
+
d.faSignature,
|
|
116
|
+
d.faSignature,
|
|
117
|
+
d.faSquareCheck,
|
|
118
|
+
d.faStar,
|
|
119
|
+
d.faStrikethrough,
|
|
120
|
+
d.faTerminal,
|
|
121
|
+
d.faTextSlash,
|
|
122
|
+
d.faTimes,
|
|
123
|
+
d.faTrash,
|
|
124
|
+
d.faTree,
|
|
125
|
+
d.faTrophy,
|
|
126
|
+
d.faTurnDown,
|
|
127
|
+
d.faUnderline,
|
|
128
|
+
d.faUpload,
|
|
129
|
+
d.faUser,
|
|
130
|
+
d.faUserShield,
|
|
131
|
+
d.faWandMagicSparkles,
|
|
124
132
|
// Brands
|
|
125
133
|
Se.faTwitter,
|
|
126
134
|
Se.faInstagram,
|
|
@@ -140,7 +148,7 @@ const Gn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
140
148
|
"could not load icon, because it is not available",
|
|
141
149
|
t.name
|
|
142
150
|
), !1));
|
|
143
|
-
return (n, r) => o.value ? (R(),
|
|
151
|
+
return (n, r) => o.value ? (R(), W(_(Wn), ot({
|
|
144
152
|
key: 0,
|
|
145
153
|
icon: [l.value, n.name]
|
|
146
154
|
}, n.$attrs), null, 16, ["icon"])) : M("", !0);
|
|
@@ -148,7 +156,7 @@ const Gn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
148
156
|
}), qn = ["aria-label", "tabindex"], Xn = {
|
|
149
157
|
key: 0,
|
|
150
158
|
class: "absolute inset-0 flex items-center justify-center"
|
|
151
|
-
},
|
|
159
|
+
}, Er = /* @__PURE__ */ A({
|
|
152
160
|
__name: "Button",
|
|
153
161
|
props: {
|
|
154
162
|
label: {},
|
|
@@ -200,29 +208,29 @@ const Gn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
200
208
|
function i() {
|
|
201
209
|
o.isDisabled || l("onClick");
|
|
202
210
|
}
|
|
203
|
-
return (u, c) => (R(),
|
|
211
|
+
return (u, c) => (R(), T("button", {
|
|
204
212
|
class: $(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out", n.value]),
|
|
205
213
|
type: "button",
|
|
206
214
|
"aria-label": u.label,
|
|
207
215
|
tabindex: u.isDisabled ? "-1" : void 0,
|
|
208
216
|
onClick: i
|
|
209
217
|
}, [
|
|
210
|
-
|
|
218
|
+
L("div", {
|
|
211
219
|
class: $(!u.isLoading || "invisible")
|
|
212
220
|
}, [
|
|
213
|
-
u.icon && u.iconPosition === "left" ? (R(),
|
|
221
|
+
u.icon && u.iconPosition === "left" ? (R(), W(z, {
|
|
214
222
|
key: 0,
|
|
215
223
|
name: u.icon,
|
|
216
224
|
class: $(r.value)
|
|
217
225
|
}, null, 8, ["name", "class"])) : M("", !0),
|
|
218
|
-
|
|
219
|
-
u.icon && u.iconPosition === "right" ? (R(),
|
|
226
|
+
L("span", null, G(u.label), 1),
|
|
227
|
+
u.icon && u.iconPosition === "right" ? (R(), W(z, {
|
|
220
228
|
key: 1,
|
|
221
229
|
name: u.icon,
|
|
222
230
|
class: $(r.value)
|
|
223
231
|
}, null, 8, ["name", "class"])) : M("", !0)
|
|
224
232
|
], 2),
|
|
225
|
-
u.isLoading ? (R(),
|
|
233
|
+
u.isLoading ? (R(), T("span", Xn, [
|
|
226
234
|
F(z, {
|
|
227
235
|
class: "animate-spin",
|
|
228
236
|
name: "circle-notch"
|
|
@@ -231,12 +239,12 @@ const Gn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
231
239
|
], 10, qn));
|
|
232
240
|
}
|
|
233
241
|
});
|
|
234
|
-
let
|
|
242
|
+
let Le;
|
|
235
243
|
const Yn = new Uint8Array(16);
|
|
236
244
|
function Qn() {
|
|
237
|
-
if (!
|
|
245
|
+
if (!Le && (Le = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Le))
|
|
238
246
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
239
|
-
return
|
|
247
|
+
return Le(Yn);
|
|
240
248
|
}
|
|
241
249
|
const V = [];
|
|
242
250
|
for (let e = 0; e < 256; ++e)
|
|
@@ -263,7 +271,7 @@ function qt(e, t, l) {
|
|
|
263
271
|
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 = {
|
|
264
272
|
key: 0,
|
|
265
273
|
class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
|
|
266
|
-
},
|
|
274
|
+
}, Dr = /* @__PURE__ */ A({
|
|
267
275
|
__name: "Checkbox",
|
|
268
276
|
props: {
|
|
269
277
|
id: { default: qt() },
|
|
@@ -276,9 +284,9 @@ const eo = { class: "relative flex items-start" }, to = { class: "flex items-cen
|
|
|
276
284
|
const l = t, o = (n) => {
|
|
277
285
|
l("update:modelValue", n.target.checked);
|
|
278
286
|
};
|
|
279
|
-
return (n, r) => (R(),
|
|
280
|
-
|
|
281
|
-
|
|
287
|
+
return (n, r) => (R(), T("div", eo, [
|
|
288
|
+
L("div", to, [
|
|
289
|
+
L("input", {
|
|
282
290
|
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",
|
|
283
291
|
type: "checkbox",
|
|
284
292
|
checked: n.modelValue,
|
|
@@ -286,12 +294,12 @@ const eo = { class: "relative flex items-start" }, to = { class: "flex items-cen
|
|
|
286
294
|
id: n.id
|
|
287
295
|
}, null, 40, no)
|
|
288
296
|
]),
|
|
289
|
-
|
|
290
|
-
|
|
297
|
+
L("div", oo, [
|
|
298
|
+
L("label", {
|
|
291
299
|
for: n.id,
|
|
292
300
|
class: "font-medium text-grey-700 dark:text-grey-200 casual-25"
|
|
293
|
-
},
|
|
294
|
-
n.description ? (R(),
|
|
301
|
+
}, G(n.label), 9, lo),
|
|
302
|
+
n.description ? (R(), T("p", ro, G(n.description), 1)) : M("", !0)
|
|
295
303
|
])
|
|
296
304
|
]));
|
|
297
305
|
}
|
|
@@ -450,10 +458,10 @@ function rt(e) {
|
|
|
450
458
|
textSizeClasses: o
|
|
451
459
|
};
|
|
452
460
|
}
|
|
453
|
-
const Eo = ["placeholder", "type", "tabindex", "value"], Do = { class: "absolute inset-y-2 left-2 w-8 cursor-pointer" },
|
|
461
|
+
const Eo = ["placeholder", "type", "tabindex", "value"], Do = { class: "absolute inset-y-2 left-2 w-8 cursor-pointer" }, _o = {
|
|
454
462
|
inheritAttrs: !1
|
|
455
|
-
},
|
|
456
|
-
...
|
|
463
|
+
}, _r = /* @__PURE__ */ A({
|
|
464
|
+
..._o,
|
|
457
465
|
__name: "Input",
|
|
458
466
|
props: {
|
|
459
467
|
modelValue: {},
|
|
@@ -477,13 +485,13 @@ const Eo = ["placeholder", "type", "tabindex", "value"], Do = { class: "absolute
|
|
|
477
485
|
}
|
|
478
486
|
);
|
|
479
487
|
const i = l, { inputClasses: u, disabledClasses: c, textSizeClasses: a } = rt(o), s = k(() => o.type === "color" ? "text" : o.type), {
|
|
480
|
-
isSupported:
|
|
488
|
+
isSupported: f,
|
|
481
489
|
open: v,
|
|
482
|
-
sRGBHex:
|
|
490
|
+
sRGBHex: p
|
|
483
491
|
} = so(), g = () => {
|
|
484
492
|
v();
|
|
485
493
|
};
|
|
486
|
-
Q(
|
|
494
|
+
Q(p, (y) => {
|
|
487
495
|
r.value = y, i("update:modelValue", y);
|
|
488
496
|
});
|
|
489
497
|
const m = function(y) {
|
|
@@ -502,11 +510,11 @@ const Eo = ["placeholder", "type", "tabindex", "value"], Do = { class: "absolute
|
|
|
502
510
|
focus: () => {
|
|
503
511
|
o.isDisabled || h.value.focus();
|
|
504
512
|
}
|
|
505
|
-
}), (y, x) => (R(),
|
|
513
|
+
}), (y, x) => (R(), T("div", {
|
|
506
514
|
class: $(["relative", [y.block ? "w-full block" : "inline-block"]])
|
|
507
515
|
}, [
|
|
508
|
-
|
|
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", [
|
|
516
|
+
L("input", ot({
|
|
517
|
+
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", [_(u), _(a), _(c)]],
|
|
510
518
|
placeholder: y.placeholder,
|
|
511
519
|
type: s.value,
|
|
512
520
|
tabindex: y.isDisabled ? "-1" : void 0,
|
|
@@ -516,9 +524,9 @@ const Eo = ["placeholder", "type", "tabindex", "value"], Do = { class: "absolute
|
|
|
516
524
|
ref: n,
|
|
517
525
|
onInput: m
|
|
518
526
|
}), null, 16, Eo),
|
|
519
|
-
y.type === "color" ? (R(),
|
|
520
|
-
|
|
521
|
-
An(
|
|
527
|
+
y.type === "color" ? (R(), T(be, { key: 0 }, [
|
|
528
|
+
L("label", Do, [
|
|
529
|
+
An(L("input", {
|
|
522
530
|
class: "invisible",
|
|
523
531
|
type: "color",
|
|
524
532
|
"onUpdate:modelValue": x[0] || (x[0] = (w) => r.value = w),
|
|
@@ -526,12 +534,12 @@ const Eo = ["placeholder", "type", "tabindex", "value"], Do = { class: "absolute
|
|
|
526
534
|
}, null, 544), [
|
|
527
535
|
[$n, r.value]
|
|
528
536
|
]),
|
|
529
|
-
|
|
537
|
+
L("span", {
|
|
530
538
|
class: "border-1 absolute inset-0 block rounded border border-grey-600/25 bg-clip-border shadow",
|
|
531
539
|
style: Nt(`background-color: ${r.value}`)
|
|
532
540
|
}, null, 4)
|
|
533
541
|
]),
|
|
534
|
-
|
|
542
|
+
_(f) && y.showColorPicker ? (R(), T("button", {
|
|
535
543
|
key: 0,
|
|
536
544
|
type: "button",
|
|
537
545
|
class: "absolute inset-y-2 right-2 h-7 w-7 rounded-full hover:bg-grey-200",
|
|
@@ -542,15 +550,15 @@ const Eo = ["placeholder", "type", "tabindex", "value"], Do = { class: "absolute
|
|
|
542
550
|
name: "eyedropper"
|
|
543
551
|
})
|
|
544
552
|
])) : M("", !0)
|
|
545
|
-
], 64)) : y.icon ? (R(),
|
|
553
|
+
], 64)) : y.icon ? (R(), T("span", {
|
|
546
554
|
key: 1,
|
|
547
|
-
class: $(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4",
|
|
555
|
+
class: $(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", _(a)])
|
|
548
556
|
}, [
|
|
549
557
|
F(z, { name: y.icon }, null, 8, ["name"])
|
|
550
558
|
], 2)) : M("", !0)
|
|
551
559
|
], 2));
|
|
552
560
|
}
|
|
553
|
-
}),
|
|
561
|
+
}), Po = { class: "inline-block text-grey-700 dark:text-grey-200 text-sm font-medium casual-20" }, Lo = ["for"], To = {
|
|
554
562
|
key: 0,
|
|
555
563
|
class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
|
|
556
564
|
}, Pr = /* @__PURE__ */ A({
|
|
@@ -561,19 +569,19 @@ const Eo = ["placeholder", "type", "tabindex", "value"], Do = { class: "absolute
|
|
|
561
569
|
description: {}
|
|
562
570
|
},
|
|
563
571
|
setup(e) {
|
|
564
|
-
return (t, l) => (R(),
|
|
565
|
-
|
|
566
|
-
t.description ? (R(),
|
|
572
|
+
return (t, l) => (R(), T("span", Po, [
|
|
573
|
+
L("label", { for: t.id }, G(t.label), 9, Lo),
|
|
574
|
+
t.description ? (R(), T("span", To, G(t.description), 1)) : M("", !0)
|
|
567
575
|
]));
|
|
568
576
|
}
|
|
569
577
|
});
|
|
570
|
-
function
|
|
578
|
+
function K(e, t, ...l) {
|
|
571
579
|
if (e in t) {
|
|
572
580
|
let n = t[e];
|
|
573
581
|
return typeof n == "function" ? n(...l) : n;
|
|
574
582
|
}
|
|
575
583
|
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(", ")}.`);
|
|
576
|
-
throw Error.captureStackTrace && Error.captureStackTrace(o,
|
|
584
|
+
throw Error.captureStackTrace && Error.captureStackTrace(o, K), o;
|
|
577
585
|
}
|
|
578
586
|
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
587
|
function j({ visible: e = !0, features: t = 0, ourProps: l, theirProps: o, ...n }) {
|
|
@@ -583,7 +591,7 @@ function j({ visible: e = !0, features: t = 0, ourProps: l, theirProps: o, ...n
|
|
|
583
591
|
return Qe(u);
|
|
584
592
|
if (t & 1) {
|
|
585
593
|
let c = (r = i.unmount) == null || r ? 0 : 1;
|
|
586
|
-
return
|
|
594
|
+
return K(c, { 0() {
|
|
587
595
|
return null;
|
|
588
596
|
}, 1() {
|
|
589
597
|
return Qe({ ...n, props: { ...i, hidden: !0, style: { display: "none" } } });
|
|
@@ -595,22 +603,22 @@ function Qe({ props: e, attrs: t, slots: l, slot: o, name: n }) {
|
|
|
595
603
|
var r, i;
|
|
596
604
|
let { as: u, ...c } = it(e, ["unmount", "static"]), a = (r = l.default) == null ? void 0 : r.call(l, o), s = {};
|
|
597
605
|
if (o) {
|
|
598
|
-
let
|
|
599
|
-
for (let [
|
|
600
|
-
typeof g == "boolean" && (
|
|
601
|
-
|
|
606
|
+
let f = !1, v = [];
|
|
607
|
+
for (let [p, g] of Object.entries(o))
|
|
608
|
+
typeof g == "boolean" && (f = !0), g === !0 && v.push(p);
|
|
609
|
+
f && (s["data-headlessui-state"] = v.join(" "));
|
|
602
610
|
}
|
|
603
611
|
if (u === "template") {
|
|
604
612
|
if (a = Qt(a ?? []), Object.keys(c).length > 0 || Object.keys(t).length > 0) {
|
|
605
|
-
let [
|
|
606
|
-
if (!Ao(
|
|
613
|
+
let [f, ...v] = a ?? [];
|
|
614
|
+
if (!Ao(f) || v.length > 0)
|
|
607
615
|
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
616
|
`), "", "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(`
|
|
609
617
|
`)].join(`
|
|
610
618
|
`));
|
|
611
|
-
let
|
|
612
|
-
for (let m in
|
|
613
|
-
m.startsWith("on") && (g.props || (g.props = {}), g.props[m] =
|
|
619
|
+
let p = Zt((i = f.props) != null ? i : {}, c), g = Mn(f, p);
|
|
620
|
+
for (let m in p)
|
|
621
|
+
m.startsWith("on") && (g.props || (g.props = {}), g.props[m] = p[m]);
|
|
614
622
|
return g;
|
|
615
623
|
}
|
|
616
624
|
return Array.isArray(a) && a.length === 1 ? a[0] : a;
|
|
@@ -783,7 +791,7 @@ function ln(e = document.body) {
|
|
|
783
791
|
var je = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(je || {});
|
|
784
792
|
function ze(e, t = 0) {
|
|
785
793
|
var l;
|
|
786
|
-
return e === ((l = ut(e)) == null ? void 0 : l.body) ? !1 :
|
|
794
|
+
return e === ((l = ut(e)) == null ? void 0 : l.body) ? !1 : K(t, { 0() {
|
|
787
795
|
return e.matches(et);
|
|
788
796
|
}, 1() {
|
|
789
797
|
let o = e;
|
|
@@ -847,11 +855,11 @@ function Xo(e, t, { sorted: l = !0, relativeTo: o = null, skipElements: n = [] }
|
|
|
847
855
|
if (t & 8)
|
|
848
856
|
return u.length - 1;
|
|
849
857
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
850
|
-
})(), s = t & 32 ? { preventScroll: !0 } : {},
|
|
858
|
+
})(), s = t & 32 ? { preventScroll: !0 } : {}, f = 0, v = u.length, p;
|
|
851
859
|
do {
|
|
852
|
-
if (
|
|
860
|
+
if (f >= v || f + v <= 0)
|
|
853
861
|
return 0;
|
|
854
|
-
let g = a +
|
|
862
|
+
let g = a + f;
|
|
855
863
|
if (t & 16)
|
|
856
864
|
g = (g + v) % v;
|
|
857
865
|
else {
|
|
@@ -860,11 +868,11 @@ function Xo(e, t, { sorted: l = !0, relativeTo: o = null, skipElements: n = [] }
|
|
|
860
868
|
if (g >= v)
|
|
861
869
|
return 1;
|
|
862
870
|
}
|
|
863
|
-
|
|
864
|
-
} while (
|
|
865
|
-
return t & 6 && Go(
|
|
871
|
+
p = u[g], p == null || p.focus(s), f += c;
|
|
872
|
+
} while (p !== i.activeElement);
|
|
873
|
+
return t & 6 && Go(p) && p.select(), 2;
|
|
866
874
|
}
|
|
867
|
-
function
|
|
875
|
+
function Te(e, t, l) {
|
|
868
876
|
st.isServer || xe((o) => {
|
|
869
877
|
document.addEventListener(e, t, l), o(() => document.removeEventListener(e, t, l));
|
|
870
878
|
});
|
|
@@ -894,15 +902,15 @@ function an(e, t, l = k(() => !0)) {
|
|
|
894
902
|
return !ze(u, je.Loose) && u.tabIndex !== -1 && r.preventDefault(), t(r, u);
|
|
895
903
|
}
|
|
896
904
|
let n = C(null);
|
|
897
|
-
|
|
905
|
+
Te("pointerdown", (r) => {
|
|
898
906
|
var i, u;
|
|
899
907
|
l.value && (n.value = ((u = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : u[0]) || r.target);
|
|
900
|
-
}, !0),
|
|
908
|
+
}, !0), Te("mousedown", (r) => {
|
|
901
909
|
var i, u;
|
|
902
910
|
l.value && (n.value = ((u = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : u[0]) || r.target);
|
|
903
|
-
}, !0),
|
|
911
|
+
}, !0), Te("click", (r) => {
|
|
904
912
|
n.value && (o(r, () => n.value), n.value = null);
|
|
905
|
-
}, !0),
|
|
913
|
+
}, !0), Te("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);
|
|
906
914
|
}
|
|
907
915
|
var dt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(dt || {});
|
|
908
916
|
let sn = A({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: t, attrs: l }) {
|
|
@@ -944,16 +952,16 @@ function fn(e, t, l) {
|
|
|
944
952
|
return n.value || (o.value = r), t == null ? void 0 : t(r);
|
|
945
953
|
}];
|
|
946
954
|
}
|
|
947
|
-
function
|
|
955
|
+
function _t(e) {
|
|
948
956
|
return [e.screenX, e.screenY];
|
|
949
957
|
}
|
|
950
958
|
function pn() {
|
|
951
959
|
let e = C([-1, -1]);
|
|
952
960
|
return { wasMoved(t) {
|
|
953
|
-
let l =
|
|
961
|
+
let l = _t(t);
|
|
954
962
|
return e.value[0] === l[0] && e.value[1] === l[1] ? !1 : (e.value = l, !0);
|
|
955
963
|
}, update(t) {
|
|
956
|
-
e.value =
|
|
964
|
+
e.value = _t(t);
|
|
957
965
|
} };
|
|
958
966
|
}
|
|
959
967
|
let mn = Symbol("DescriptionContext");
|
|
@@ -976,12 +984,12 @@ function Jo({ slot: e = C({}), name: t = "Description", props: l = {} } = {}) {
|
|
|
976
984
|
A({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${J()}` } }, setup(e, { attrs: t, slots: l }) {
|
|
977
985
|
let o = Zo();
|
|
978
986
|
return ee(() => Ne(o.register(e.id))), () => {
|
|
979
|
-
let { name: n = "Description", slot: r = C({}), props: i = {} } = o, { id: u, ...c } = e, a = { ...Object.entries(i).reduce((s, [
|
|
987
|
+
let { name: n = "Description", slot: r = C({}), props: i = {} } = o, { id: u, ...c } = e, a = { ...Object.entries(i).reduce((s, [f, v]) => Object.assign(s, { [f]: _(v) }), {}), id: u };
|
|
980
988
|
return j({ ourProps: a, theirProps: c, slot: r.value, attrs: t, slots: l, name: n });
|
|
981
989
|
};
|
|
982
990
|
} });
|
|
983
|
-
let
|
|
984
|
-
function
|
|
991
|
+
let Pt = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
|
|
992
|
+
function Lt(e) {
|
|
985
993
|
var t, l;
|
|
986
994
|
let o = (t = e.innerText) != null ? t : "", n = e.cloneNode(!0);
|
|
987
995
|
if (!(n instanceof HTMLElement))
|
|
@@ -990,7 +998,7 @@ function Tt(e) {
|
|
|
990
998
|
for (let u of n.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))
|
|
991
999
|
u.remove(), r = !0;
|
|
992
1000
|
let i = r ? (l = n.innerText) != null ? l : "" : o;
|
|
993
|
-
return
|
|
1001
|
+
return Pt.test(i) && (i = i.replace(Pt, "")), i;
|
|
994
1002
|
}
|
|
995
1003
|
function el(e) {
|
|
996
1004
|
let t = e.getAttribute("aria-label");
|
|
@@ -1002,14 +1010,14 @@ function el(e) {
|
|
|
1002
1010
|
let r = document.getElementById(n);
|
|
1003
1011
|
if (r) {
|
|
1004
1012
|
let i = r.getAttribute("aria-label");
|
|
1005
|
-
return typeof i == "string" ? i.trim() :
|
|
1013
|
+
return typeof i == "string" ? i.trim() : Lt(r).trim();
|
|
1006
1014
|
}
|
|
1007
1015
|
return null;
|
|
1008
1016
|
}).filter(Boolean);
|
|
1009
1017
|
if (o.length > 0)
|
|
1010
1018
|
return o.join(", ");
|
|
1011
1019
|
}
|
|
1012
|
-
return
|
|
1020
|
+
return Lt(e).trim();
|
|
1013
1021
|
}
|
|
1014
1022
|
function vn(e) {
|
|
1015
1023
|
let t = C(""), l = C("");
|
|
@@ -1041,56 +1049,56 @@ function De(e) {
|
|
|
1041
1049
|
return t;
|
|
1042
1050
|
}
|
|
1043
1051
|
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),
|
|
1052
|
+
let n = C(1), r = C(null), i = C(null), u = C(null), c = C([]), a = C(""), s = C(null), f = C(1);
|
|
1045
1053
|
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)),
|
|
1047
|
-
return
|
|
1054
|
+
let w = s.value !== null ? c.value[s.value] : null, S = ct(x(c.value.slice()), (O) => E(O.dataRef.domRef)), P = w ? S.indexOf(w) : null;
|
|
1055
|
+
return P === -1 && (P = null), { options: S, activeOptionIndex: P };
|
|
1048
1056
|
}
|
|
1049
|
-
let
|
|
1057
|
+
let p = 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 ? K(p.value, { 1: [], 0: void 0 }) : g.value), b = { listboxState: n, value: h, mode: p, compare(x, w) {
|
|
1050
1058
|
if (typeof e.by == "string") {
|
|
1051
1059
|
let S = e.by;
|
|
1052
1060
|
return (x == null ? void 0 : x[S]) === (w == null ? void 0 : w[S]);
|
|
1053
1061
|
}
|
|
1054
1062
|
return e.by(x, w);
|
|
1055
|
-
}, orientation: k(() => e.horizontal ? "horizontal" : "vertical"), labelRef: r, buttonRef: i, optionsRef: u, disabled: k(() => e.disabled), options: c, searchQuery: a, activeOptionIndex: s, activationTrigger:
|
|
1063
|
+
}, orientation: k(() => e.horizontal ? "horizontal" : "vertical"), labelRef: r, buttonRef: i, optionsRef: u, disabled: k(() => e.disabled), options: c, searchQuery: a, activeOptionIndex: s, activationTrigger: f, closeListbox() {
|
|
1056
1064
|
e.disabled || n.value !== 1 && (n.value = 1, s.value = null);
|
|
1057
1065
|
}, openListbox() {
|
|
1058
1066
|
e.disabled || n.value !== 0 && (n.value = 0);
|
|
1059
1067
|
}, goToOption(x, w, S) {
|
|
1060
1068
|
if (e.disabled || n.value === 1)
|
|
1061
1069
|
return;
|
|
1062
|
-
let
|
|
1063
|
-
a.value = "", s.value = O,
|
|
1070
|
+
let P = v(), O = en(x === I.Specific ? { focus: I.Specific, id: w } : { focus: x }, { resolveItems: () => P.options, resolveActiveIndex: () => P.activeOptionIndex, resolveId: (N) => N.id, resolveDisabled: (N) => N.dataRef.disabled });
|
|
1071
|
+
a.value = "", s.value = O, f.value = S ?? 1, c.value = P.options;
|
|
1064
1072
|
}, search(x) {
|
|
1065
1073
|
if (e.disabled || n.value === 1)
|
|
1066
1074
|
return;
|
|
1067
1075
|
let w = a.value !== "" ? 0 : 1;
|
|
1068
1076
|
a.value += x.toLowerCase();
|
|
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),
|
|
1070
|
-
|
|
1077
|
+
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), P = S ? c.value.indexOf(S) : -1;
|
|
1078
|
+
P === -1 || P === s.value || (s.value = P, f.value = 1);
|
|
1071
1079
|
}, clearSearch() {
|
|
1072
1080
|
e.disabled || n.value !== 1 && a.value !== "" && (a.value = "");
|
|
1073
1081
|
}, registerOption(x, w) {
|
|
1074
|
-
let S = v((
|
|
1082
|
+
let S = v((P) => [...P, { id: x, dataRef: w }]);
|
|
1075
1083
|
c.value = S.options, s.value = S.activeOptionIndex;
|
|
1076
1084
|
}, unregisterOption(x) {
|
|
1077
1085
|
let w = v((S) => {
|
|
1078
|
-
let
|
|
1079
|
-
return
|
|
1086
|
+
let P = S.findIndex((O) => O.id === x);
|
|
1087
|
+
return P !== -1 && S.splice(P, 1), S;
|
|
1080
1088
|
});
|
|
1081
|
-
c.value = w.options, s.value = w.activeOptionIndex,
|
|
1089
|
+
c.value = w.options, s.value = w.activeOptionIndex, f.value = 1;
|
|
1082
1090
|
}, theirOnChange(x) {
|
|
1083
1091
|
e.disabled || m(x);
|
|
1084
1092
|
}, select(x) {
|
|
1085
|
-
e.disabled || m(
|
|
1086
|
-
let w = X(b.value.value).slice(), S = X(x),
|
|
1087
|
-
return
|
|
1093
|
+
e.disabled || m(K(p.value, { 0: () => x, 1: () => {
|
|
1094
|
+
let w = X(b.value.value).slice(), S = X(x), P = w.findIndex((O) => b.compare(S, X(O)));
|
|
1095
|
+
return P === -1 ? w.push(S) : w.splice(P, 1), w;
|
|
1088
1096
|
} }));
|
|
1089
1097
|
} };
|
|
1090
1098
|
an([i, u], (x, w) => {
|
|
1091
1099
|
var S;
|
|
1092
1100
|
b.closeListbox(), ze(w, je.Loose) || (x.preventDefault(), (S = E(i)) == null || S.focus());
|
|
1093
|
-
}, k(() => n.value === 0)), ye(gn, b), on(k(() =>
|
|
1101
|
+
}, k(() => n.value === 0)), ye(gn, b), on(k(() => K(n.value, { 0: te.Open, 1: te.Closed })));
|
|
1094
1102
|
let y = k(() => {
|
|
1095
1103
|
var x;
|
|
1096
1104
|
return (x = E(i)) == null ? void 0 : x.closest("form");
|
|
@@ -1108,8 +1116,8 @@ let il = A({ name: "Listbox", emits: { "update:modelValue": (e) => !0 }, props:
|
|
|
1108
1116
|
};
|
|
1109
1117
|
}, { immediate: !0 });
|
|
1110
1118
|
}), () => {
|
|
1111
|
-
let { name: x, modelValue: w, disabled: S, form:
|
|
1112
|
-
return Oe(be, [...x != null && h.value != null ? un({ [x]: h.value }).map(([re,
|
|
1119
|
+
let { name: x, modelValue: w, disabled: S, form: P, ...O } = e, N = { open: n.value === 0, disabled: S, value: h.value };
|
|
1120
|
+
return Oe(be, [...x != null && h.value != null ? un({ [x]: h.value }).map(([re, Pe]) => Oe(sn, Jt({ features: dt.Hidden, key: re, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: P, name: re, value: Pe }))) : [], j({ ourProps: {}, theirProps: { ...l, ...it(O, ["defaultValue", "onUpdate:modelValue", "horizontal", "multiple", "by"]) }, slot: N, slots: t, attrs: l, name: "Listbox" })]);
|
|
1113
1121
|
};
|
|
1114
1122
|
} });
|
|
1115
1123
|
A({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: () => `headlessui-listbox-label-${J()}` } }, setup(e, { attrs: t, slots: l }) {
|
|
@@ -1163,8 +1171,8 @@ let al = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1163
1171
|
let c = at(k(() => ({ as: e.as, type: t.type })), n.buttonRef);
|
|
1164
1172
|
return () => {
|
|
1165
1173
|
var a, s;
|
|
1166
|
-
let
|
|
1167
|
-
return j({ ourProps: g, theirProps:
|
|
1174
|
+
let f = { open: n.listboxState.value === 0, disabled: n.disabled.value, value: n.value.value }, { id: v, ...p } = 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 };
|
|
1175
|
+
return j({ ourProps: g, theirProps: p, slot: f, attrs: t, slots: l, name: "ListboxButton" });
|
|
1168
1176
|
};
|
|
1169
1177
|
} }), 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
1178
|
let n = De("ListboxOptions"), r = C(null);
|
|
@@ -1184,9 +1192,9 @@ let al = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1184
1192
|
return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1185
1193
|
}));
|
|
1186
1194
|
break;
|
|
1187
|
-
case
|
|
1195
|
+
case K(n.orientation.value, { vertical: D.ArrowDown, horizontal: D.ArrowRight }):
|
|
1188
1196
|
return a.preventDefault(), a.stopPropagation(), n.goToOption(I.Next);
|
|
1189
|
-
case
|
|
1197
|
+
case K(n.orientation.value, { vertical: D.ArrowUp, horizontal: D.ArrowLeft }):
|
|
1190
1198
|
return a.preventDefault(), a.stopPropagation(), n.goToOption(I.Previous);
|
|
1191
1199
|
case D.Home:
|
|
1192
1200
|
case D.PageUp:
|
|
@@ -1210,14 +1218,14 @@ let al = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1210
1218
|
}
|
|
1211
1219
|
let u = nn(), c = k(() => u !== null ? (u.value & te.Open) === te.Open : n.listboxState.value === 0);
|
|
1212
1220
|
return () => {
|
|
1213
|
-
var a, s,
|
|
1214
|
-
let
|
|
1215
|
-
return j({ ourProps: h, theirProps: m, slot:
|
|
1221
|
+
var a, s, f, v;
|
|
1222
|
+
let p = { 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 : (f = E(n.buttonRef)) == null ? void 0 : f.id, "aria-orientation": n.orientation.value, id: g, onKeydown: i, role: "listbox", tabIndex: 0, ref: n.optionsRef };
|
|
1223
|
+
return j({ ourProps: h, theirProps: m, slot: p, attrs: t, slots: l, features: Re.RenderStrategy | Re.Static, visible: c.value, name: "ListboxOptions" });
|
|
1216
1224
|
};
|
|
1217
1225
|
} }), 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
1226
|
let n = De("ListboxOption"), r = C(null);
|
|
1219
1227
|
o({ el: r, $el: r });
|
|
1220
|
-
let i = k(() => n.activeOptionIndex.value !== null ? n.options.value[n.activeOptionIndex.value].id === e.id : !1), u = k(() =>
|
|
1228
|
+
let i = k(() => n.activeOptionIndex.value !== null ? n.options.value[n.activeOptionIndex.value].id === e.id : !1), u = k(() => K(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(() => K(n.mode.value, { 1: () => {
|
|
1221
1229
|
var b;
|
|
1222
1230
|
let y = X(n.value.value);
|
|
1223
1231
|
return ((b = n.options.value.find((x) => y.some((w) => n.compare(X(w), X(x.dataRef.value))))) == null ? void 0 : b.id) === e.id;
|
|
@@ -1226,7 +1234,7 @@ let al = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1226
1234
|
}, domRef: r }));
|
|
1227
1235
|
ee(() => n.registerOption(e.id, s)), Ne(() => n.unregisterOption(e.id)), ee(() => {
|
|
1228
1236
|
Q([n.listboxState, u], () => {
|
|
1229
|
-
n.listboxState.value === 0 && u.value &&
|
|
1237
|
+
n.listboxState.value === 0 && u.value && K(n.mode.value, { 1: () => {
|
|
1230
1238
|
c.value && n.goToOption(I.Specific, e.id);
|
|
1231
1239
|
}, 0: () => {
|
|
1232
1240
|
n.goToOption(I.Specific, e.id);
|
|
@@ -1238,7 +1246,7 @@ let al = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1238
1246
|
return (y = (b = E(r)) == null ? void 0 : b.scrollIntoView) == null ? void 0 : y.call(b, { block: "nearest" });
|
|
1239
1247
|
});
|
|
1240
1248
|
});
|
|
1241
|
-
function
|
|
1249
|
+
function f(b) {
|
|
1242
1250
|
if (e.disabled)
|
|
1243
1251
|
return b.preventDefault();
|
|
1244
1252
|
n.select(e.value), n.mode.value === 0 && (n.closeListbox(), B(() => {
|
|
@@ -1251,19 +1259,19 @@ let al = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1251
1259
|
return n.goToOption(I.Nothing);
|
|
1252
1260
|
n.goToOption(I.Specific, e.id);
|
|
1253
1261
|
}
|
|
1254
|
-
let
|
|
1262
|
+
let p = pn();
|
|
1255
1263
|
function g(b) {
|
|
1256
|
-
|
|
1264
|
+
p.update(b);
|
|
1257
1265
|
}
|
|
1258
1266
|
function m(b) {
|
|
1259
|
-
|
|
1267
|
+
p.wasMoved(b) && (e.disabled || i.value || n.goToOption(I.Specific, e.id, 0));
|
|
1260
1268
|
}
|
|
1261
1269
|
function h(b) {
|
|
1262
|
-
|
|
1270
|
+
p.wasMoved(b) && (e.disabled || i.value && n.goToOption(I.Nothing));
|
|
1263
1271
|
}
|
|
1264
1272
|
return () => {
|
|
1265
|
-
let { disabled: b } = e, y = { active: i.value, selected: u.value, disabled: b }, { id: x, value: w, disabled: S, ...
|
|
1266
|
-
return j({ ourProps: O, theirProps:
|
|
1273
|
+
let { disabled: b } = e, y = { active: i.value, selected: u.value, disabled: b }, { id: x, value: w, disabled: S, ...P } = 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: f, onFocus: v, onPointerenter: g, onMouseenter: g, onPointermove: m, onMousemove: m, onPointerleave: h, onMouseleave: h };
|
|
1274
|
+
return j({ ourProps: O, theirProps: P, slot: y, attrs: l, slots: t, name: "ListboxOption" });
|
|
1267
1275
|
};
|
|
1268
1276
|
} });
|
|
1269
1277
|
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 || {});
|
|
@@ -1281,37 +1289,37 @@ function He(e) {
|
|
|
1281
1289
|
}
|
|
1282
1290
|
let pl = A({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: l }) {
|
|
1283
1291
|
let o = C(1), n = C(null), r = C(null), i = C([]), u = C(""), c = C(null), a = C(1);
|
|
1284
|
-
function s(v = (
|
|
1285
|
-
let
|
|
1292
|
+
function s(v = (p) => p) {
|
|
1293
|
+
let p = c.value !== null ? i.value[c.value] : null, g = ct(v(i.value.slice()), (h) => E(h.dataRef.domRef)), m = p ? g.indexOf(p) : null;
|
|
1286
1294
|
return m === -1 && (m = null), { items: g, activeItemIndex: m };
|
|
1287
1295
|
}
|
|
1288
|
-
let
|
|
1296
|
+
let f = { menuState: o, buttonRef: n, itemsRef: r, items: i, searchQuery: u, activeItemIndex: c, activationTrigger: a, closeMenu: () => {
|
|
1289
1297
|
o.value = 1, c.value = null;
|
|
1290
|
-
}, openMenu: () => o.value = 0, goToItem(v,
|
|
1291
|
-
let m = s(), h = en(v === I.Specific ? { focus: I.Specific, id:
|
|
1298
|
+
}, openMenu: () => o.value = 0, goToItem(v, p, g) {
|
|
1299
|
+
let m = s(), h = en(v === I.Specific ? { focus: I.Specific, id: p } : { focus: v }, { resolveItems: () => m.items, resolveActiveIndex: () => m.activeItemIndex, resolveId: (b) => b.id, resolveDisabled: (b) => b.dataRef.disabled });
|
|
1292
1300
|
u.value = "", c.value = h, a.value = g ?? 1, i.value = m.items;
|
|
1293
1301
|
}, search(v) {
|
|
1294
|
-
let
|
|
1302
|
+
let p = u.value !== "" ? 0 : 1;
|
|
1295
1303
|
u.value += v.toLowerCase();
|
|
1296
|
-
let g = (c.value !== null ? i.value.slice(c.value +
|
|
1304
|
+
let g = (c.value !== null ? i.value.slice(c.value + p).concat(i.value.slice(0, c.value + p)) : i.value).find((h) => h.dataRef.textValue.startsWith(u.value) && !h.dataRef.disabled), m = g ? i.value.indexOf(g) : -1;
|
|
1297
1305
|
m === -1 || m === c.value || (c.value = m, a.value = 1);
|
|
1298
1306
|
}, clearSearch() {
|
|
1299
1307
|
u.value = "";
|
|
1300
|
-
}, registerItem(v,
|
|
1301
|
-
let g = s((m) => [...m, { id: v, dataRef:
|
|
1308
|
+
}, registerItem(v, p) {
|
|
1309
|
+
let g = s((m) => [...m, { id: v, dataRef: p }]);
|
|
1302
1310
|
i.value = g.items, c.value = g.activeItemIndex, a.value = 1;
|
|
1303
1311
|
}, unregisterItem(v) {
|
|
1304
|
-
let
|
|
1312
|
+
let p = s((g) => {
|
|
1305
1313
|
let m = g.findIndex((h) => h.id === v);
|
|
1306
1314
|
return m !== -1 && g.splice(m, 1), g;
|
|
1307
1315
|
});
|
|
1308
|
-
i.value =
|
|
1316
|
+
i.value = p.items, c.value = p.activeItemIndex, a.value = 1;
|
|
1309
1317
|
} };
|
|
1310
|
-
return an([n, r], (v,
|
|
1318
|
+
return an([n, r], (v, p) => {
|
|
1311
1319
|
var g;
|
|
1312
|
-
|
|
1313
|
-
}, k(() => o.value === 0)), ye(bn,
|
|
1314
|
-
let v = { open: o.value === 0, close:
|
|
1320
|
+
f.closeMenu(), ze(p, je.Loose) || (v.preventDefault(), (g = E(n)) == null || g.focus());
|
|
1321
|
+
}, k(() => o.value === 0)), ye(bn, f), on(k(() => K(o.value, { 0: te.Open, 1: te.Closed }))), () => {
|
|
1322
|
+
let v = { open: o.value === 0, close: f.closeMenu };
|
|
1315
1323
|
return j({ ourProps: {}, theirProps: e, slot: v, slots: t, attrs: l, name: "Menu" });
|
|
1316
1324
|
};
|
|
1317
1325
|
} }), 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 }) {
|
|
@@ -1354,8 +1362,8 @@ let pl = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1354
1362
|
let c = at(k(() => ({ as: e.as, type: t.type })), n.buttonRef);
|
|
1355
1363
|
return () => {
|
|
1356
1364
|
var a;
|
|
1357
|
-
let s = { open: n.menuState.value === 0 }, { id:
|
|
1358
|
-
return j({ ourProps:
|
|
1365
|
+
let s = { open: n.menuState.value === 0 }, { id: f, ...v } = e, p = { ref: n.buttonRef, id: f, 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 };
|
|
1366
|
+
return j({ ourProps: p, theirProps: v, slot: s, attrs: t, slots: l, name: "MenuButton" });
|
|
1359
1367
|
};
|
|
1360
1368
|
} }), 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
1369
|
let n = He("MenuItems"), r = C(null);
|
|
@@ -1365,7 +1373,7 @@ let pl = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1365
1373
|
s.setAttribute("role", "none");
|
|
1366
1374
|
} });
|
|
1367
1375
|
function i(s) {
|
|
1368
|
-
var
|
|
1376
|
+
var f;
|
|
1369
1377
|
switch (r.value && clearTimeout(r.value), s.key) {
|
|
1370
1378
|
case D.Space:
|
|
1371
1379
|
if (n.searchQuery.value !== "")
|
|
@@ -1373,7 +1381,7 @@ let pl = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1373
1381
|
case D.Enter:
|
|
1374
1382
|
if (s.preventDefault(), s.stopPropagation(), n.activeItemIndex.value !== null) {
|
|
1375
1383
|
let v = n.items.value[n.activeItemIndex.value];
|
|
1376
|
-
(
|
|
1384
|
+
(f = E(v.dataRef.domRef)) == null || f.click();
|
|
1377
1385
|
}
|
|
1378
1386
|
n.closeMenu(), rn(E(n.buttonRef));
|
|
1379
1387
|
break;
|
|
@@ -1410,8 +1418,8 @@ let pl = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1410
1418
|
}
|
|
1411
1419
|
let c = nn(), a = k(() => c !== null ? (c.value & te.Open) === te.Open : n.menuState.value === 0);
|
|
1412
1420
|
return () => {
|
|
1413
|
-
var s,
|
|
1414
|
-
let v = { open: n.menuState.value === 0 }, { id:
|
|
1421
|
+
var s, f;
|
|
1422
|
+
let v = { open: n.menuState.value === 0 }, { id: p, ...g } = e, m = { "aria-activedescendant": n.activeItemIndex.value === null || (s = n.items.value[n.activeItemIndex.value]) == null ? void 0 : s.id, "aria-labelledby": (f = E(n.buttonRef)) == null ? void 0 : f.id, id: p, onKeydown: i, onKeyup: u, role: "menu", tabIndex: 0, ref: n.itemsRef };
|
|
1415
1423
|
return j({ ourProps: m, theirProps: g, slot: v, attrs: t, slots: l, features: Re.RenderStrategy | Re.Static, visible: a.value, name: "MenuItems" });
|
|
1416
1424
|
};
|
|
1417
1425
|
} }), 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 }) {
|
|
@@ -1436,19 +1444,19 @@ let pl = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1436
1444
|
return n.goToItem(I.Nothing);
|
|
1437
1445
|
n.goToItem(I.Specific, e.id);
|
|
1438
1446
|
}
|
|
1439
|
-
let
|
|
1447
|
+
let f = pn();
|
|
1440
1448
|
function v(m) {
|
|
1441
|
-
|
|
1449
|
+
f.update(m);
|
|
1442
1450
|
}
|
|
1443
|
-
function
|
|
1444
|
-
|
|
1451
|
+
function p(m) {
|
|
1452
|
+
f.wasMoved(m) && (e.disabled || i.value || n.goToItem(I.Specific, e.id, 0));
|
|
1445
1453
|
}
|
|
1446
1454
|
function g(m) {
|
|
1447
|
-
|
|
1455
|
+
f.wasMoved(m) && (e.disabled || i.value && n.goToItem(I.Nothing));
|
|
1448
1456
|
}
|
|
1449
1457
|
return () => {
|
|
1450
1458
|
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:
|
|
1459
|
+
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: p, onMousemove: p, onPointerleave: g, onMouseleave: g }, theirProps: { ...l, ...y }, slot: h, attrs: l, slots: t, name: "MenuItem" });
|
|
1452
1460
|
};
|
|
1453
1461
|
} }), hn = Symbol("LabelContext");
|
|
1454
1462
|
function yn() {
|
|
@@ -1472,7 +1480,7 @@ function bl({ slot: e = {}, name: t = "Label", props: l = {} } = {}) {
|
|
|
1472
1480
|
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 }) {
|
|
1473
1481
|
let o = yn();
|
|
1474
1482
|
return ee(() => Ne(o.register(e.id))), () => {
|
|
1475
|
-
let { name: n = "Label", slot: r = {}, props: i = {} } = o, { id: u, passive: c, ...a } = e, s = { ...Object.entries(i).reduce((
|
|
1483
|
+
let { name: n = "Label", slot: r = {}, props: i = {} } = o, { id: u, passive: c, ...a } = e, s = { ...Object.entries(i).reduce((f, [v, p]) => Object.assign(f, { [v]: _(p) }), {}), id: u };
|
|
1476
1484
|
return c && (delete s.onClick, delete s.htmlFor, delete a.onClick), j({ ourProps: s, theirProps: a, slot: r, attrs: l, slots: t, name: n });
|
|
1477
1485
|
};
|
|
1478
1486
|
} });
|
|
@@ -1491,12 +1499,12 @@ let hl = A({ name: "Switch", emits: { "update:modelValue": (e) => !0 }, props: {
|
|
|
1491
1499
|
function c() {
|
|
1492
1500
|
u(!i.value);
|
|
1493
1501
|
}
|
|
1494
|
-
let a = C(null), s = r === null ? a : r.switchRef,
|
|
1502
|
+
let a = C(null), s = r === null ? a : r.switchRef, f = at(k(() => ({ as: e.as, type: l.type })), s);
|
|
1495
1503
|
n({ el: s, $el: s });
|
|
1496
1504
|
function v(h) {
|
|
1497
1505
|
h.preventDefault(), c();
|
|
1498
1506
|
}
|
|
1499
|
-
function
|
|
1507
|
+
function p(h) {
|
|
1500
1508
|
h.key === D.Space ? (h.preventDefault(), c()) : h.key === D.Enter && Qo(h.currentTarget);
|
|
1501
1509
|
}
|
|
1502
1510
|
function g(h) {
|
|
@@ -1519,8 +1527,8 @@ let hl = A({ name: "Switch", emits: { "update:modelValue": (e) => !0 }, props: {
|
|
|
1519
1527
|
};
|
|
1520
1528
|
}, { immediate: !0 });
|
|
1521
1529
|
}), () => {
|
|
1522
|
-
let { id: h, name: b, value: y, form: x, ...w } = e, S = { checked: i.value },
|
|
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:
|
|
1530
|
+
let { id: h, name: b, value: y, form: x, ...w } = e, S = { checked: i.value }, P = { id: h, ref: s, role: "switch", type: f.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: p, onKeypress: g };
|
|
1531
|
+
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: P, theirProps: { ...l, ...it(w, ["modelValue", "defaultChecked"]) }, slot: S, attrs: l, slots: o, name: "Switch" })]);
|
|
1524
1532
|
};
|
|
1525
1533
|
} });
|
|
1526
1534
|
const $e = Math.min, ue = Math.max, Me = Math.round, Ie = Math.floor, ae = (e) => ({
|
|
@@ -1535,7 +1543,7 @@ const $e = Math.min, ue = Math.max, Me = Math.round, Ie = Math.floor, ae = (e) =
|
|
|
1535
1543
|
start: "end",
|
|
1536
1544
|
end: "start"
|
|
1537
1545
|
};
|
|
1538
|
-
function
|
|
1546
|
+
function Tt(e, t, l) {
|
|
1539
1547
|
return ue(e, $e(t, l));
|
|
1540
1548
|
}
|
|
1541
1549
|
function Ue(e, t) {
|
|
@@ -1624,48 +1632,48 @@ function It(e, t, l) {
|
|
|
1624
1632
|
reference: o,
|
|
1625
1633
|
floating: n
|
|
1626
1634
|
} = e;
|
|
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,
|
|
1628
|
-
let
|
|
1635
|
+
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, f = o.y + o.height / 2 - n.height / 2, v = o[u] / 2 - n[u] / 2;
|
|
1636
|
+
let p;
|
|
1629
1637
|
switch (c) {
|
|
1630
1638
|
case "top":
|
|
1631
|
-
|
|
1639
|
+
p = {
|
|
1632
1640
|
x: s,
|
|
1633
1641
|
y: o.y - n.height
|
|
1634
1642
|
};
|
|
1635
1643
|
break;
|
|
1636
1644
|
case "bottom":
|
|
1637
|
-
|
|
1645
|
+
p = {
|
|
1638
1646
|
x: s,
|
|
1639
1647
|
y: o.y + o.height
|
|
1640
1648
|
};
|
|
1641
1649
|
break;
|
|
1642
1650
|
case "right":
|
|
1643
|
-
|
|
1651
|
+
p = {
|
|
1644
1652
|
x: o.x + o.width,
|
|
1645
|
-
y:
|
|
1653
|
+
y: f
|
|
1646
1654
|
};
|
|
1647
1655
|
break;
|
|
1648
1656
|
case "left":
|
|
1649
|
-
|
|
1657
|
+
p = {
|
|
1650
1658
|
x: o.x - n.width,
|
|
1651
|
-
y:
|
|
1659
|
+
y: f
|
|
1652
1660
|
};
|
|
1653
1661
|
break;
|
|
1654
1662
|
default:
|
|
1655
|
-
|
|
1663
|
+
p = {
|
|
1656
1664
|
x: o.x,
|
|
1657
1665
|
y: o.y
|
|
1658
1666
|
};
|
|
1659
1667
|
}
|
|
1660
1668
|
switch (We(t)) {
|
|
1661
1669
|
case "start":
|
|
1662
|
-
|
|
1670
|
+
p[i] -= v * (l && a ? -1 : 1);
|
|
1663
1671
|
break;
|
|
1664
1672
|
case "end":
|
|
1665
|
-
|
|
1673
|
+
p[i] += v * (l && a ? -1 : 1);
|
|
1666
1674
|
break;
|
|
1667
1675
|
}
|
|
1668
|
-
return
|
|
1676
|
+
return p;
|
|
1669
1677
|
}
|
|
1670
1678
|
const El = async (e, t, l) => {
|
|
1671
1679
|
const {
|
|
@@ -1680,8 +1688,8 @@ const El = async (e, t, l) => {
|
|
|
1680
1688
|
strategy: n
|
|
1681
1689
|
}), {
|
|
1682
1690
|
x: s,
|
|
1683
|
-
y:
|
|
1684
|
-
} = It(a, o, c), v = o,
|
|
1691
|
+
y: f
|
|
1692
|
+
} = It(a, o, c), v = o, p = {}, g = 0;
|
|
1685
1693
|
for (let m = 0; m < u.length; m++) {
|
|
1686
1694
|
const {
|
|
1687
1695
|
name: h,
|
|
@@ -1693,11 +1701,11 @@ const El = async (e, t, l) => {
|
|
|
1693
1701
|
reset: S
|
|
1694
1702
|
} = await b({
|
|
1695
1703
|
x: s,
|
|
1696
|
-
y:
|
|
1704
|
+
y: f,
|
|
1697
1705
|
initialPlacement: o,
|
|
1698
1706
|
placement: v,
|
|
1699
1707
|
strategy: n,
|
|
1700
|
-
middlewareData:
|
|
1708
|
+
middlewareData: p,
|
|
1701
1709
|
rects: a,
|
|
1702
1710
|
platform: i,
|
|
1703
1711
|
elements: {
|
|
@@ -1705,10 +1713,10 @@ const El = async (e, t, l) => {
|
|
|
1705
1713
|
floating: t
|
|
1706
1714
|
}
|
|
1707
1715
|
});
|
|
1708
|
-
if (s = y ?? s,
|
|
1709
|
-
...
|
|
1716
|
+
if (s = y ?? s, f = x ?? f, p = {
|
|
1717
|
+
...p,
|
|
1710
1718
|
[h]: {
|
|
1711
|
-
...
|
|
1719
|
+
...p[h],
|
|
1712
1720
|
...w
|
|
1713
1721
|
}
|
|
1714
1722
|
}, S && g <= 50) {
|
|
@@ -1718,17 +1726,17 @@ const El = async (e, t, l) => {
|
|
|
1718
1726
|
strategy: n
|
|
1719
1727
|
}) : S.rects), {
|
|
1720
1728
|
x: s,
|
|
1721
|
-
y:
|
|
1729
|
+
y: f
|
|
1722
1730
|
} = It(a, v, c)), m = -1;
|
|
1723
1731
|
continue;
|
|
1724
1732
|
}
|
|
1725
1733
|
}
|
|
1726
1734
|
return {
|
|
1727
1735
|
x: s,
|
|
1728
|
-
y:
|
|
1736
|
+
y: f,
|
|
1729
1737
|
placement: v,
|
|
1730
1738
|
strategy: n,
|
|
1731
|
-
middlewareData:
|
|
1739
|
+
middlewareData: p
|
|
1732
1740
|
};
|
|
1733
1741
|
};
|
|
1734
1742
|
async function Cn(e, t) {
|
|
@@ -1744,15 +1752,15 @@ async function Cn(e, t) {
|
|
|
1744
1752
|
} = e, {
|
|
1745
1753
|
boundary: a = "clippingAncestors",
|
|
1746
1754
|
rootBoundary: s = "viewport",
|
|
1747
|
-
elementContext:
|
|
1755
|
+
elementContext: f = "floating",
|
|
1748
1756
|
altBoundary: v = !1,
|
|
1749
|
-
padding:
|
|
1750
|
-
} = Ue(t, e), g = Rl(
|
|
1757
|
+
padding: p = 0
|
|
1758
|
+
} = Ue(t, e), g = Rl(p), h = u[v ? f === "floating" ? "reference" : "floating" : f], b = Fe(await r.getClippingRect({
|
|
1751
1759
|
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)),
|
|
1752
1760
|
boundary: a,
|
|
1753
1761
|
rootBoundary: s,
|
|
1754
1762
|
strategy: c
|
|
1755
|
-
})), y =
|
|
1763
|
+
})), y = f === "floating" ? {
|
|
1756
1764
|
...i.floating,
|
|
1757
1765
|
x: o,
|
|
1758
1766
|
y: n
|
|
@@ -1789,9 +1797,9 @@ const Dl = function(e) {
|
|
|
1789
1797
|
elements: a
|
|
1790
1798
|
} = t, {
|
|
1791
1799
|
mainAxis: s = !0,
|
|
1792
|
-
crossAxis:
|
|
1800
|
+
crossAxis: f = !0,
|
|
1793
1801
|
fallbackPlacements: v,
|
|
1794
|
-
fallbackStrategy:
|
|
1802
|
+
fallbackStrategy: p = "bestFit",
|
|
1795
1803
|
fallbackAxisSideDirection: g = "none",
|
|
1796
1804
|
flipAlignment: m = !0,
|
|
1797
1805
|
...h
|
|
@@ -1800,17 +1808,17 @@ const Dl = function(e) {
|
|
|
1800
1808
|
return {};
|
|
1801
1809
|
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
1810
|
!v && g !== "none" && w.push(...Cl(u, m, g, x));
|
|
1803
|
-
const S = [u, ...w],
|
|
1811
|
+
const S = [u, ...w], P = await Cn(t, h), O = [];
|
|
1804
1812
|
let N = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
1805
|
-
if (s && O.push(
|
|
1813
|
+
if (s && O.push(P[b]), f) {
|
|
1806
1814
|
const se = wl(n, i, x);
|
|
1807
|
-
O.push(
|
|
1815
|
+
O.push(P[se[0]], P[se[1]]);
|
|
1808
1816
|
}
|
|
1809
1817
|
if (N = [...N, {
|
|
1810
1818
|
placement: n,
|
|
1811
1819
|
overflows: O
|
|
1812
1820
|
}], !O.every((se) => se <= 0)) {
|
|
1813
|
-
var re,
|
|
1821
|
+
var re, Pe;
|
|
1814
1822
|
const se = (((re = r.flip) == null ? void 0 : re.index) || 0) + 1, bt = S[se];
|
|
1815
1823
|
if (bt)
|
|
1816
1824
|
return {
|
|
@@ -1822,12 +1830,12 @@ const Dl = function(e) {
|
|
|
1822
1830
|
placement: bt
|
|
1823
1831
|
}
|
|
1824
1832
|
};
|
|
1825
|
-
let we = (
|
|
1833
|
+
let we = (Pe = N.filter((fe) => fe.overflows[0] <= 0).sort((fe, pe) => fe.overflows[1] - pe.overflows[1])[0]) == null ? void 0 : Pe.placement;
|
|
1826
1834
|
if (!we)
|
|
1827
|
-
switch (
|
|
1835
|
+
switch (p) {
|
|
1828
1836
|
case "bestFit": {
|
|
1829
1837
|
var gt;
|
|
1830
|
-
const fe = (gt = N.map((pe) => [pe.placement, pe.overflows.filter((ke) => ke > 0).reduce((ke,
|
|
1838
|
+
const fe = (gt = N.map((pe) => [pe.placement, pe.overflows.filter((ke) => ke > 0).reduce((ke, Tn) => ke + Tn, 0)]).sort((pe, ke) => pe[1] - ke[1])[0]) == null ? void 0 : gt[0];
|
|
1831
1839
|
fe && (we = fe);
|
|
1832
1840
|
break;
|
|
1833
1841
|
}
|
|
@@ -1846,35 +1854,35 @@ const Dl = function(e) {
|
|
|
1846
1854
|
}
|
|
1847
1855
|
};
|
|
1848
1856
|
};
|
|
1849
|
-
async function
|
|
1857
|
+
async function _l(e, t) {
|
|
1850
1858
|
const {
|
|
1851
1859
|
placement: l,
|
|
1852
1860
|
platform: o,
|
|
1853
1861
|
elements: n
|
|
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,
|
|
1862
|
+
} = 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, f = Ue(t, e);
|
|
1855
1863
|
let {
|
|
1856
1864
|
mainAxis: v,
|
|
1857
|
-
crossAxis:
|
|
1865
|
+
crossAxis: p,
|
|
1858
1866
|
alignmentAxis: g
|
|
1859
|
-
} = typeof
|
|
1860
|
-
mainAxis:
|
|
1867
|
+
} = typeof f == "number" ? {
|
|
1868
|
+
mainAxis: f,
|
|
1861
1869
|
crossAxis: 0,
|
|
1862
1870
|
alignmentAxis: null
|
|
1863
1871
|
} : {
|
|
1864
1872
|
mainAxis: 0,
|
|
1865
1873
|
crossAxis: 0,
|
|
1866
1874
|
alignmentAxis: null,
|
|
1867
|
-
...
|
|
1875
|
+
...f
|
|
1868
1876
|
};
|
|
1869
|
-
return u && typeof g == "number" && (
|
|
1870
|
-
x:
|
|
1877
|
+
return u && typeof g == "number" && (p = u === "end" ? g * -1 : g), c ? {
|
|
1878
|
+
x: p * s,
|
|
1871
1879
|
y: v * a
|
|
1872
1880
|
} : {
|
|
1873
1881
|
x: v * a,
|
|
1874
|
-
y:
|
|
1882
|
+
y: p * s
|
|
1875
1883
|
};
|
|
1876
1884
|
}
|
|
1877
|
-
const
|
|
1885
|
+
const Pl = function(e) {
|
|
1878
1886
|
return e === void 0 && (e = 0), {
|
|
1879
1887
|
name: "offset",
|
|
1880
1888
|
options: e,
|
|
@@ -1885,7 +1893,7 @@ const _l = function(e) {
|
|
|
1885
1893
|
y: r,
|
|
1886
1894
|
placement: i,
|
|
1887
1895
|
middlewareData: u
|
|
1888
|
-
} = t, c = await
|
|
1896
|
+
} = t, c = await _l(t, e);
|
|
1889
1897
|
return i === ((l = u.offset) == null ? void 0 : l.placement) && (o = u.arrow) != null && o.alignmentOffset ? {} : {
|
|
1890
1898
|
x: n + c.x,
|
|
1891
1899
|
y: r + c.y,
|
|
@@ -1896,7 +1904,7 @@ const _l = function(e) {
|
|
|
1896
1904
|
};
|
|
1897
1905
|
}
|
|
1898
1906
|
};
|
|
1899
|
-
},
|
|
1907
|
+
}, Ll = function(e) {
|
|
1900
1908
|
return e === void 0 && (e = {}), {
|
|
1901
1909
|
name: "shift",
|
|
1902
1910
|
options: e,
|
|
@@ -1924,20 +1932,20 @@ const _l = function(e) {
|
|
|
1924
1932
|
} = Ue(e, t), a = {
|
|
1925
1933
|
x: l,
|
|
1926
1934
|
y: o
|
|
1927
|
-
}, s = await Cn(t, c),
|
|
1928
|
-
let
|
|
1935
|
+
}, s = await Cn(t, c), f = Ke(ce(n)), v = wn(f);
|
|
1936
|
+
let p = a[v], g = a[f];
|
|
1929
1937
|
if (r) {
|
|
1930
|
-
const h = v === "y" ? "top" : "left", b = v === "y" ? "bottom" : "right", y =
|
|
1931
|
-
|
|
1938
|
+
const h = v === "y" ? "top" : "left", b = v === "y" ? "bottom" : "right", y = p + s[h], x = p - s[b];
|
|
1939
|
+
p = Tt(y, p, x);
|
|
1932
1940
|
}
|
|
1933
1941
|
if (i) {
|
|
1934
|
-
const h =
|
|
1935
|
-
g =
|
|
1942
|
+
const h = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", y = g + s[h], x = g - s[b];
|
|
1943
|
+
g = Tt(y, g, x);
|
|
1936
1944
|
}
|
|
1937
1945
|
const m = u.fn({
|
|
1938
1946
|
...t,
|
|
1939
|
-
[v]:
|
|
1940
|
-
[
|
|
1947
|
+
[v]: p,
|
|
1948
|
+
[f]: g
|
|
1941
1949
|
});
|
|
1942
1950
|
return {
|
|
1943
1951
|
...m,
|
|
@@ -1952,7 +1960,7 @@ const _l = function(e) {
|
|
|
1952
1960
|
function ne(e) {
|
|
1953
1961
|
return ft(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1954
1962
|
}
|
|
1955
|
-
function
|
|
1963
|
+
function H(e) {
|
|
1956
1964
|
var t;
|
|
1957
1965
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1958
1966
|
}
|
|
@@ -1961,18 +1969,18 @@ function le(e) {
|
|
|
1961
1969
|
return (t = (ft(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1962
1970
|
}
|
|
1963
1971
|
function ft(e) {
|
|
1964
|
-
return e instanceof Node || e instanceof
|
|
1972
|
+
return e instanceof Node || e instanceof H(e).Node;
|
|
1965
1973
|
}
|
|
1966
1974
|
function oe(e) {
|
|
1967
|
-
return e instanceof Element || e instanceof
|
|
1975
|
+
return e instanceof Element || e instanceof H(e).Element;
|
|
1968
1976
|
}
|
|
1969
1977
|
function Z(e) {
|
|
1970
|
-
return e instanceof HTMLElement || e instanceof
|
|
1978
|
+
return e instanceof HTMLElement || e instanceof H(e).HTMLElement;
|
|
1971
1979
|
}
|
|
1972
1980
|
function At(e) {
|
|
1973
|
-
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
1981
|
+
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof H(e).ShadowRoot;
|
|
1974
1982
|
}
|
|
1975
|
-
function
|
|
1983
|
+
function _e(e) {
|
|
1976
1984
|
const {
|
|
1977
1985
|
overflow: t,
|
|
1978
1986
|
overflowX: l,
|
|
@@ -1981,7 +1989,7 @@ function Pe(e) {
|
|
|
1981
1989
|
} = q(e);
|
|
1982
1990
|
return /auto|scroll|overlay|hidden|clip/.test(t + o + l) && !["inline", "contents"].includes(n);
|
|
1983
1991
|
}
|
|
1984
|
-
function
|
|
1992
|
+
function Tl(e) {
|
|
1985
1993
|
return ["table", "td", "th"].includes(ne(e));
|
|
1986
1994
|
}
|
|
1987
1995
|
function pt(e) {
|
|
@@ -2004,7 +2012,7 @@ function Ge(e) {
|
|
|
2004
2012
|
return ["html", "body", "#document"].includes(ne(e));
|
|
2005
2013
|
}
|
|
2006
2014
|
function q(e) {
|
|
2007
|
-
return
|
|
2015
|
+
return H(e).getComputedStyle(e);
|
|
2008
2016
|
}
|
|
2009
2017
|
function qe(e) {
|
|
2010
2018
|
return oe(e) ? {
|
|
@@ -2029,13 +2037,13 @@ function ge(e) {
|
|
|
2029
2037
|
}
|
|
2030
2038
|
function On(e) {
|
|
2031
2039
|
const t = ge(e);
|
|
2032
|
-
return Ge(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Z(t) &&
|
|
2040
|
+
return Ge(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Z(t) && _e(t) ? t : On(t);
|
|
2033
2041
|
}
|
|
2034
2042
|
function Ee(e, t, l) {
|
|
2035
2043
|
var o;
|
|
2036
2044
|
t === void 0 && (t = []), l === void 0 && (l = !0);
|
|
2037
|
-
const n = On(e), r = n === ((o = e.ownerDocument) == null ? void 0 : o.body), i =
|
|
2038
|
-
return r ? t.concat(i, i.visualViewport || [],
|
|
2045
|
+
const n = On(e), r = n === ((o = e.ownerDocument) == null ? void 0 : o.body), i = H(n);
|
|
2046
|
+
return r ? t.concat(i, i.visualViewport || [], _e(n) ? n : [], i.frameElement && l ? Ee(i.frameElement) : []) : t.concat(n, Ee(n, [], l));
|
|
2039
2047
|
}
|
|
2040
2048
|
function Rn(e) {
|
|
2041
2049
|
const t = q(e);
|
|
@@ -2067,14 +2075,14 @@ function ve(e) {
|
|
|
2067
2075
|
}
|
|
2068
2076
|
const Al = /* @__PURE__ */ ae(0);
|
|
2069
2077
|
function En(e) {
|
|
2070
|
-
const t =
|
|
2078
|
+
const t = H(e);
|
|
2071
2079
|
return !mt() || !t.visualViewport ? Al : {
|
|
2072
2080
|
x: t.visualViewport.offsetLeft,
|
|
2073
2081
|
y: t.visualViewport.offsetTop
|
|
2074
2082
|
};
|
|
2075
2083
|
}
|
|
2076
2084
|
function $l(e, t, l) {
|
|
2077
|
-
return t === void 0 && (t = !1), !l || t && l !==
|
|
2085
|
+
return t === void 0 && (t = !1), !l || t && l !== H(e) ? !1 : t;
|
|
2078
2086
|
}
|
|
2079
2087
|
function de(e, t, l, o) {
|
|
2080
2088
|
t === void 0 && (t = !1), l === void 0 && (l = !1);
|
|
@@ -2082,18 +2090,18 @@ function de(e, t, l, o) {
|
|
|
2082
2090
|
let i = ae(1);
|
|
2083
2091
|
t && (o ? oe(o) && (i = ve(o)) : i = ve(e));
|
|
2084
2092
|
const u = $l(r, l, o) ? En(r) : ae(0);
|
|
2085
|
-
let c = (n.left + u.x) / i.x, a = (n.top + u.y) / i.y, s = n.width / i.x,
|
|
2093
|
+
let c = (n.left + u.x) / i.x, a = (n.top + u.y) / i.y, s = n.width / i.x, f = n.height / i.y;
|
|
2086
2094
|
if (r) {
|
|
2087
|
-
const v =
|
|
2095
|
+
const v = H(r), p = o && oe(o) ? H(o) : o;
|
|
2088
2096
|
let g = v.frameElement;
|
|
2089
|
-
for (; g && o &&
|
|
2097
|
+
for (; g && o && p !== v; ) {
|
|
2090
2098
|
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,
|
|
2099
|
+
c *= m.x, a *= m.y, s *= m.x, f *= m.y, c += y, a += x, g = H(g).frameElement;
|
|
2092
2100
|
}
|
|
2093
2101
|
}
|
|
2094
2102
|
return Fe({
|
|
2095
2103
|
width: s,
|
|
2096
|
-
height:
|
|
2104
|
+
height: f,
|
|
2097
2105
|
x: c,
|
|
2098
2106
|
y: a
|
|
2099
2107
|
});
|
|
@@ -2112,7 +2120,7 @@ function Ml(e) {
|
|
|
2112
2120
|
scrollTop: 0
|
|
2113
2121
|
}, u = ae(1);
|
|
2114
2122
|
const c = ae(0);
|
|
2115
|
-
if ((n || !n && o !== "fixed") && ((ne(l) !== "body" ||
|
|
2123
|
+
if ((n || !n && o !== "fixed") && ((ne(l) !== "body" || _e(r)) && (i = qe(l)), Z(l))) {
|
|
2116
2124
|
const a = de(l);
|
|
2117
2125
|
u = ve(l), c.x = a.x + l.clientLeft, c.y = a.y + l.clientTop;
|
|
2118
2126
|
}
|
|
@@ -2141,7 +2149,7 @@ function Fl(e) {
|
|
|
2141
2149
|
};
|
|
2142
2150
|
}
|
|
2143
2151
|
function Nl(e, t) {
|
|
2144
|
-
const l =
|
|
2152
|
+
const l = H(e), o = le(e), n = l.visualViewport;
|
|
2145
2153
|
let r = o.clientWidth, i = o.clientHeight, u = 0, c = 0;
|
|
2146
2154
|
if (n) {
|
|
2147
2155
|
r = n.width, i = n.height;
|
|
@@ -2182,9 +2190,9 @@ function $t(e, t, l) {
|
|
|
2182
2190
|
}
|
|
2183
2191
|
return Fe(o);
|
|
2184
2192
|
}
|
|
2185
|
-
function
|
|
2193
|
+
function _n(e, t) {
|
|
2186
2194
|
const l = ge(e);
|
|
2187
|
-
return l === t || !oe(l) || Ge(l) ? !1 : q(l).position === "fixed" ||
|
|
2195
|
+
return l === t || !oe(l) || Ge(l) ? !1 : q(l).position === "fixed" || _n(l, t);
|
|
2188
2196
|
}
|
|
2189
2197
|
function jl(e, t) {
|
|
2190
2198
|
const l = t.get(e);
|
|
@@ -2195,7 +2203,7 @@ function jl(e, t) {
|
|
|
2195
2203
|
let i = r ? ge(e) : e;
|
|
2196
2204
|
for (; oe(i) && !Ge(i); ) {
|
|
2197
2205
|
const u = q(i), c = pt(i);
|
|
2198
|
-
!c && u.position === "fixed" && (n = null), (r ? !c && !n : !c && u.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) ||
|
|
2206
|
+
!c && u.position === "fixed" && (n = null), (r ? !c && !n : !c && u.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) || _e(i) && !c && _n(e, i)) ? o = o.filter((s) => s !== i) : n = u, i = ge(i);
|
|
2199
2207
|
}
|
|
2200
2208
|
return t.set(e, o), o;
|
|
2201
2209
|
}
|
|
@@ -2207,8 +2215,8 @@ function zl(e) {
|
|
|
2207
2215
|
strategy: n
|
|
2208
2216
|
} = e;
|
|
2209
2217
|
const i = [...l === "clippingAncestors" ? jl(t, this._c) : [].concat(l), o], u = i[0], c = i.reduce((a, s) => {
|
|
2210
|
-
const
|
|
2211
|
-
return a.top = ue(
|
|
2218
|
+
const f = $t(t, s, n);
|
|
2219
|
+
return a.top = ue(f.top, a.top), a.right = $e(f.right, a.right), a.bottom = $e(f.bottom, a.bottom), a.left = ue(f.left, a.left), a;
|
|
2212
2220
|
}, $t(t, u, n));
|
|
2213
2221
|
return {
|
|
2214
2222
|
width: c.right - c.left,
|
|
@@ -2235,7 +2243,7 @@ function Ul(e, t, l) {
|
|
|
2235
2243
|
};
|
|
2236
2244
|
const c = ae(0);
|
|
2237
2245
|
if (o || !o && !r)
|
|
2238
|
-
if ((ne(t) !== "body" ||
|
|
2246
|
+
if ((ne(t) !== "body" || _e(n)) && (u = qe(t)), o) {
|
|
2239
2247
|
const a = de(t, !0, r, t);
|
|
2240
2248
|
c.x = a.x + t.clientLeft, c.y = a.y + t.clientTop;
|
|
2241
2249
|
} else
|
|
@@ -2250,12 +2258,12 @@ function Ul(e, t, l) {
|
|
|
2250
2258
|
function Mt(e, t) {
|
|
2251
2259
|
return !Z(e) || q(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
|
|
2252
2260
|
}
|
|
2253
|
-
function
|
|
2254
|
-
const l =
|
|
2261
|
+
function Pn(e, t) {
|
|
2262
|
+
const l = H(e);
|
|
2255
2263
|
if (!Z(e))
|
|
2256
2264
|
return l;
|
|
2257
2265
|
let o = Mt(e, t);
|
|
2258
|
-
for (; o &&
|
|
2266
|
+
for (; o && Tl(o) && q(o).position === "static"; )
|
|
2259
2267
|
o = Mt(o, t);
|
|
2260
2268
|
return o && (ne(o) === "html" || ne(o) === "body" && q(o).position === "static" && !pt(o)) ? l : o || Il(e) || l;
|
|
2261
2269
|
}
|
|
@@ -2265,7 +2273,7 @@ const Wl = async function(e) {
|
|
|
2265
2273
|
floating: l,
|
|
2266
2274
|
strategy: o
|
|
2267
2275
|
} = e;
|
|
2268
|
-
const n = this.getOffsetParent ||
|
|
2276
|
+
const n = this.getOffsetParent || Pn, r = this.getDimensions;
|
|
2269
2277
|
return {
|
|
2270
2278
|
reference: Ul(t, await n(l), o),
|
|
2271
2279
|
floating: {
|
|
@@ -2282,7 +2290,7 @@ const Gl = {
|
|
|
2282
2290
|
convertOffsetParentRelativeRectToViewportRelativeRect: Ml,
|
|
2283
2291
|
getDocumentElement: le,
|
|
2284
2292
|
getClippingRect: zl,
|
|
2285
|
-
getOffsetParent:
|
|
2293
|
+
getOffsetParent: Pn,
|
|
2286
2294
|
getElementRects: Wl,
|
|
2287
2295
|
getClientRects: Vl,
|
|
2288
2296
|
getDimensions: Hl,
|
|
@@ -2301,22 +2309,22 @@ function ql(e, t) {
|
|
|
2301
2309
|
const {
|
|
2302
2310
|
left: a,
|
|
2303
2311
|
top: s,
|
|
2304
|
-
width:
|
|
2312
|
+
width: f,
|
|
2305
2313
|
height: v
|
|
2306
2314
|
} = e.getBoundingClientRect();
|
|
2307
|
-
if (u || t(), !
|
|
2315
|
+
if (u || t(), !f || !v)
|
|
2308
2316
|
return;
|
|
2309
|
-
const
|
|
2310
|
-
rootMargin: -
|
|
2317
|
+
const p = Ie(s), g = Ie(n.clientWidth - (a + f)), m = Ie(n.clientHeight - (s + v)), h = Ie(a), y = {
|
|
2318
|
+
rootMargin: -p + "px " + -g + "px " + -m + "px " + -h + "px",
|
|
2311
2319
|
threshold: ue(0, $e(1, c)) || 1
|
|
2312
2320
|
};
|
|
2313
2321
|
let x = !0;
|
|
2314
2322
|
function w(S) {
|
|
2315
|
-
const
|
|
2316
|
-
if (
|
|
2323
|
+
const P = S[0].intersectionRatio;
|
|
2324
|
+
if (P !== c) {
|
|
2317
2325
|
if (!x)
|
|
2318
2326
|
return i();
|
|
2319
|
-
|
|
2327
|
+
P ? i(!1, P) : o = setTimeout(() => {
|
|
2320
2328
|
i(!1, 1e-7);
|
|
2321
2329
|
}, 100);
|
|
2322
2330
|
}
|
|
@@ -2349,14 +2357,14 @@ function Xl(e, t, l, o) {
|
|
|
2349
2357
|
passive: !0
|
|
2350
2358
|
}), r && b.addEventListener("resize", l);
|
|
2351
2359
|
});
|
|
2352
|
-
const
|
|
2353
|
-
let v = -1,
|
|
2354
|
-
i && (
|
|
2360
|
+
const f = a && u ? ql(a, l) : null;
|
|
2361
|
+
let v = -1, p = null;
|
|
2362
|
+
i && (p = new ResizeObserver((b) => {
|
|
2355
2363
|
let [y] = b;
|
|
2356
|
-
y && y.target === a &&
|
|
2357
|
-
|
|
2364
|
+
y && y.target === a && p && (p.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
|
|
2365
|
+
p && p.observe(t);
|
|
2358
2366
|
})), l();
|
|
2359
|
-
}), a && !c &&
|
|
2367
|
+
}), a && !c && p.observe(a), p.observe(t));
|
|
2360
2368
|
let g, m = c ? de(e) : null;
|
|
2361
2369
|
c && h();
|
|
2362
2370
|
function h() {
|
|
@@ -2366,10 +2374,10 @@ function Xl(e, t, l, o) {
|
|
|
2366
2374
|
return l(), () => {
|
|
2367
2375
|
s.forEach((b) => {
|
|
2368
2376
|
n && b.removeEventListener("scroll", l), r && b.removeEventListener("resize", l);
|
|
2369
|
-
}),
|
|
2377
|
+
}), f && f(), p && p.disconnect(), p = null, c && cancelAnimationFrame(g);
|
|
2370
2378
|
};
|
|
2371
2379
|
}
|
|
2372
|
-
const Yl =
|
|
2380
|
+
const Yl = Ll, Ql = Dl, Zl = (e, t, l) => {
|
|
2373
2381
|
const o = /* @__PURE__ */ new Map(), n = {
|
|
2374
2382
|
platform: Gl,
|
|
2375
2383
|
...l
|
|
@@ -2392,44 +2400,44 @@ function Vt(e) {
|
|
|
2392
2400
|
}
|
|
2393
2401
|
return e;
|
|
2394
2402
|
}
|
|
2395
|
-
function
|
|
2403
|
+
function Ln(e) {
|
|
2396
2404
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
2397
2405
|
}
|
|
2398
2406
|
function Ft(e, t) {
|
|
2399
|
-
const l =
|
|
2407
|
+
const l = Ln(e);
|
|
2400
2408
|
return Math.round(t * l) / l;
|
|
2401
2409
|
}
|
|
2402
2410
|
function er(e, t, l) {
|
|
2403
2411
|
l === void 0 && (l = {});
|
|
2404
2412
|
const o = l.whileElementsMounted, n = k(() => {
|
|
2405
2413
|
var O;
|
|
2406
|
-
return (O =
|
|
2407
|
-
}), r = k(() =>
|
|
2414
|
+
return (O = _(l.open)) != null ? O : !0;
|
|
2415
|
+
}), r = k(() => _(l.middleware)), i = k(() => {
|
|
2408
2416
|
var O;
|
|
2409
|
-
return (O =
|
|
2417
|
+
return (O = _(l.placement)) != null ? O : "bottom";
|
|
2410
2418
|
}), u = k(() => {
|
|
2411
2419
|
var O;
|
|
2412
|
-
return (O =
|
|
2420
|
+
return (O = _(l.strategy)) != null ? O : "absolute";
|
|
2413
2421
|
}), c = k(() => {
|
|
2414
2422
|
var O;
|
|
2415
|
-
return (O =
|
|
2416
|
-
}), a = k(() => Vt(e.value)), s = k(() => Vt(t.value)),
|
|
2423
|
+
return (O = _(l.transform)) != null ? O : !0;
|
|
2424
|
+
}), a = k(() => Vt(e.value)), s = k(() => Vt(t.value)), f = C(0), v = C(0), p = C(u.value), g = C(i.value), m = Vn({}), h = C(!1), b = k(() => {
|
|
2417
2425
|
const O = {
|
|
2418
|
-
position:
|
|
2426
|
+
position: p.value,
|
|
2419
2427
|
left: "0",
|
|
2420
2428
|
top: "0"
|
|
2421
2429
|
};
|
|
2422
2430
|
if (!s.value)
|
|
2423
2431
|
return O;
|
|
2424
|
-
const N = Ft(s.value,
|
|
2432
|
+
const N = Ft(s.value, f.value), re = Ft(s.value, v.value);
|
|
2425
2433
|
return c.value ? {
|
|
2426
2434
|
...O,
|
|
2427
2435
|
transform: "translate(" + N + "px, " + re + "px)",
|
|
2428
|
-
...
|
|
2436
|
+
...Ln(s.value) >= 1.5 && {
|
|
2429
2437
|
willChange: "transform"
|
|
2430
2438
|
}
|
|
2431
2439
|
} : {
|
|
2432
|
-
position:
|
|
2440
|
+
position: p.value,
|
|
2433
2441
|
left: N + "px",
|
|
2434
2442
|
top: re + "px"
|
|
2435
2443
|
};
|
|
@@ -2441,7 +2449,7 @@ function er(e, t, l) {
|
|
|
2441
2449
|
placement: i.value,
|
|
2442
2450
|
strategy: u.value
|
|
2443
2451
|
}).then((O) => {
|
|
2444
|
-
|
|
2452
|
+
f.value = O.x, v.value = O.y, p.value = O.strategy, g.value = O.placement, m.value = O.middlewareData, h.value = !0;
|
|
2445
2453
|
});
|
|
2446
2454
|
}
|
|
2447
2455
|
function w() {
|
|
@@ -2457,19 +2465,19 @@ function er(e, t, l) {
|
|
|
2457
2465
|
return;
|
|
2458
2466
|
}
|
|
2459
2467
|
}
|
|
2460
|
-
function
|
|
2468
|
+
function P() {
|
|
2461
2469
|
n.value || (h.value = !1);
|
|
2462
2470
|
}
|
|
2463
2471
|
return Q([r, i, u], x, {
|
|
2464
2472
|
flush: "sync"
|
|
2465
2473
|
}), Q([a, s], S, {
|
|
2466
2474
|
flush: "sync"
|
|
2467
|
-
}), Q(n,
|
|
2475
|
+
}), Q(n, P, {
|
|
2468
2476
|
flush: "sync"
|
|
2469
2477
|
}), Fn() && Nn(w), {
|
|
2470
|
-
x: me(
|
|
2478
|
+
x: me(f),
|
|
2471
2479
|
y: me(v),
|
|
2472
|
-
strategy: me(
|
|
2480
|
+
strategy: me(p),
|
|
2473
2481
|
placement: me(g),
|
|
2474
2482
|
middlewareData: me(m),
|
|
2475
2483
|
isPositioned: me(h),
|
|
@@ -2477,7 +2485,7 @@ function er(e, t, l) {
|
|
|
2477
2485
|
update: x
|
|
2478
2486
|
};
|
|
2479
2487
|
}
|
|
2480
|
-
const
|
|
2488
|
+
const Lr = /* @__PURE__ */ A({
|
|
2481
2489
|
__name: "MenuContainer",
|
|
2482
2490
|
props: {
|
|
2483
2491
|
position: { default: "left" },
|
|
@@ -2487,21 +2495,21 @@ const _r = /* @__PURE__ */ A({
|
|
|
2487
2495
|
const t = e, l = C(null), o = C(null), n = t.position === "left" ? "bottom-end" : "bottom-start", { floatingStyles: r } = er(l, o, {
|
|
2488
2496
|
placement: n,
|
|
2489
2497
|
whileElementsMounted: Xl,
|
|
2490
|
-
middleware: [
|
|
2498
|
+
middleware: [Pl(6), Ql(), Yl({ padding: 6 })]
|
|
2491
2499
|
});
|
|
2492
|
-
return (i, u) => (R(),
|
|
2500
|
+
return (i, u) => (R(), W(_(pl), {
|
|
2493
2501
|
as: "div",
|
|
2494
2502
|
class: "inline-block text-left"
|
|
2495
2503
|
}, {
|
|
2496
|
-
default:
|
|
2497
|
-
F(
|
|
2504
|
+
default: U(() => [
|
|
2505
|
+
F(_(ml), {
|
|
2498
2506
|
class: "focus:outline-none",
|
|
2499
2507
|
ref_key: "reference",
|
|
2500
2508
|
ref: l
|
|
2501
2509
|
}, {
|
|
2502
|
-
default:
|
|
2510
|
+
default: U(() => [
|
|
2503
2511
|
ht(i.$slots, "button", {}, () => [
|
|
2504
|
-
F(
|
|
2512
|
+
F(_(z), {
|
|
2505
2513
|
class: "fill-current",
|
|
2506
2514
|
name: "ellipsis-h"
|
|
2507
2515
|
})
|
|
@@ -2509,13 +2517,13 @@ const _r = /* @__PURE__ */ A({
|
|
|
2509
2517
|
]),
|
|
2510
2518
|
_: 3
|
|
2511
2519
|
}, 512),
|
|
2512
|
-
(R(),
|
|
2520
|
+
(R(), W(Bn, {
|
|
2513
2521
|
to: typeof i.usePortal == "string" ? i.usePortal : "body",
|
|
2514
2522
|
disabled: !i.usePortal
|
|
2515
2523
|
}, [
|
|
2516
|
-
|
|
2524
|
+
L("div", {
|
|
2517
2525
|
class: "w-56 z-20",
|
|
2518
|
-
style: Nt(
|
|
2526
|
+
style: Nt(_(r)),
|
|
2519
2527
|
ref_key: "floating",
|
|
2520
2528
|
ref: o
|
|
2521
2529
|
}, [
|
|
@@ -2527,13 +2535,13 @@ const _r = /* @__PURE__ */ A({
|
|
|
2527
2535
|
"leave-from-class": "transform opacity-100",
|
|
2528
2536
|
"leave-to-class": "transform -translate-y-2 opacity-0"
|
|
2529
2537
|
}, {
|
|
2530
|
-
default:
|
|
2531
|
-
F(
|
|
2538
|
+
default: U(() => [
|
|
2539
|
+
F(_(vl), {
|
|
2532
2540
|
class: $([
|
|
2533
2541
|
"z-40 mt-1 p-1 bg-white rounded shadow-lg text-grey-700 focus:outline-none w-full"
|
|
2534
2542
|
])
|
|
2535
2543
|
}, {
|
|
2536
|
-
default:
|
|
2544
|
+
default: U(() => [
|
|
2537
2545
|
ht(i.$slots, "default")
|
|
2538
2546
|
]),
|
|
2539
2547
|
_: 3
|
|
@@ -2559,17 +2567,17 @@ const _r = /* @__PURE__ */ A({
|
|
|
2559
2567
|
as: {}
|
|
2560
2568
|
},
|
|
2561
2569
|
setup(e) {
|
|
2562
|
-
return (t, l) => (R(),
|
|
2563
|
-
default:
|
|
2564
|
-
(R(),
|
|
2570
|
+
return (t, l) => (R(), W(_(gl), jn(zn({ disabled: t.disabled })), {
|
|
2571
|
+
default: U(({ active: o }) => [
|
|
2572
|
+
(R(), W(Hn(t.as || "span"), {
|
|
2565
2573
|
class: $(["flex items-center justify-between px-4 py-2 text-xs leading-5 transition-colors duration-100 rounded-lg", [
|
|
2566
2574
|
o ? "bg-grey-200" : "",
|
|
2567
2575
|
t.disabled ? "opacity-50 pointer-events-none" : "hover:bg-grey-200 focus:bg-grey-200 focus:outline-none"
|
|
2568
2576
|
]])
|
|
2569
2577
|
}, {
|
|
2570
|
-
default:
|
|
2571
|
-
|
|
2572
|
-
t.meta ? (R(),
|
|
2578
|
+
default: U(() => [
|
|
2579
|
+
L("span", null, G(t.label), 1),
|
|
2580
|
+
t.meta ? (R(), T("span", tr, G(t.meta), 1)) : M("", !0)
|
|
2573
2581
|
]),
|
|
2574
2582
|
_: 2
|
|
2575
2583
|
}, 1032, ["class"]))
|
|
@@ -2583,13 +2591,13 @@ const _r = /* @__PURE__ */ A({
|
|
|
2583
2591
|
}, lr = {
|
|
2584
2592
|
key: 1,
|
|
2585
2593
|
class: "block truncate"
|
|
2586
|
-
}, rr = {
|
|
2594
|
+
}, rr = ["innerHTML"], ir = {
|
|
2587
2595
|
key: 2,
|
|
2588
2596
|
class: "text-grey-500 truncate"
|
|
2589
|
-
},
|
|
2597
|
+
}, ar = { 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" }, sr = { class: "absolute right-2 inset-y-0 flex items-center" }, ur = {
|
|
2590
2598
|
key: 0,
|
|
2591
2599
|
class: "bg-grey-500 text-grey-100 rounded text-xs px-2 py-1"
|
|
2592
|
-
},
|
|
2600
|
+
}, cr = ["innerHTML"], Ir = /* @__PURE__ */ A({
|
|
2593
2601
|
__name: "Select",
|
|
2594
2602
|
props: {
|
|
2595
2603
|
modelValue: {},
|
|
@@ -2611,27 +2619,31 @@ const _r = /* @__PURE__ */ A({
|
|
|
2611
2619
|
}
|
|
2612
2620
|
), Q(o, (c) => {
|
|
2613
2621
|
c && n("update:modelValue", c);
|
|
2614
|
-
}), (c, a) => (R(),
|
|
2622
|
+
}), (c, a) => (R(), W(_(il), {
|
|
2615
2623
|
as: "div",
|
|
2616
|
-
modelValue:
|
|
2624
|
+
modelValue: _(o),
|
|
2617
2625
|
"onUpdate:modelValue": a[0] || (a[0] = (s) => Un(o) ? o.value = s : null),
|
|
2618
2626
|
disabled: c.isDisabled
|
|
2619
2627
|
}, {
|
|
2620
|
-
default:
|
|
2621
|
-
|
|
2622
|
-
F(
|
|
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", [
|
|
2628
|
+
default: U(() => [
|
|
2629
|
+
L("div", nr, [
|
|
2630
|
+
F(_(al), {
|
|
2631
|
+
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", [_(r), _(u), _(i)]])
|
|
2624
2632
|
}, {
|
|
2625
|
-
default:
|
|
2633
|
+
default: U(() => {
|
|
2626
2634
|
var s;
|
|
2627
2635
|
return [
|
|
2628
|
-
c.icon ? (R(),
|
|
2636
|
+
c.icon ? (R(), T("span", or, [
|
|
2629
2637
|
F(z, {
|
|
2630
|
-
name: ((s =
|
|
2638
|
+
name: ((s = _(o)) == null ? void 0 : s.icon) ?? c.icon
|
|
2631
2639
|
}, null, 8, ["name"])
|
|
2632
2640
|
])) : M("", !0),
|
|
2633
|
-
|
|
2634
|
-
|
|
2641
|
+
_(o) ? (R(), T("span", lr, [
|
|
2642
|
+
L("span", {
|
|
2643
|
+
innerHTML: _(o).label
|
|
2644
|
+
}, null, 8, rr)
|
|
2645
|
+
])) : (R(), T("span", ir, G(c.placeholder), 1)),
|
|
2646
|
+
L("span", ar, [
|
|
2635
2647
|
F(z, {
|
|
2636
2648
|
class: "text-grey-400",
|
|
2637
2649
|
name: "chevron-down",
|
|
@@ -2647,45 +2659,45 @@ const _r = /* @__PURE__ */ A({
|
|
|
2647
2659
|
"leave-from-class": "opacity-100",
|
|
2648
2660
|
"leave-to-class": "opacity-0"
|
|
2649
2661
|
}, {
|
|
2650
|
-
default:
|
|
2651
|
-
F(
|
|
2652
|
-
default:
|
|
2653
|
-
(R(!0),
|
|
2662
|
+
default: U(() => [
|
|
2663
|
+
F(_(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" }, {
|
|
2664
|
+
default: U(() => [
|
|
2665
|
+
(R(!0), T(be, null, jt(c.options, (s) => (R(), W(_(ul), {
|
|
2654
2666
|
as: "template",
|
|
2655
2667
|
key: s.id,
|
|
2656
2668
|
value: s,
|
|
2657
2669
|
disabled: s.disabled
|
|
2658
2670
|
}, {
|
|
2659
|
-
default:
|
|
2660
|
-
|
|
2671
|
+
default: U(({ active: f, selected: v }) => [
|
|
2672
|
+
L("li", {
|
|
2661
2673
|
class: $([
|
|
2662
|
-
|
|
2674
|
+
f ? "text-white bg-blue-500" : "text-grey-900 dark:text-grey-50",
|
|
2663
2675
|
"cursor-default select-none relative py-2 pl-3 pr-12",
|
|
2664
2676
|
{ "opacity-50 bg-grey-100": s.disabled }
|
|
2665
2677
|
])
|
|
2666
2678
|
}, [
|
|
2667
|
-
|
|
2668
|
-
s.disabled && c.disabledBadge ? (R(),
|
|
2679
|
+
L("div", sr, [
|
|
2680
|
+
s.disabled && c.disabledBadge ? (R(), T("span", ur, G(c.disabledBadge), 1)) : M("", !0)
|
|
2669
2681
|
]),
|
|
2670
|
-
|
|
2682
|
+
L("span", {
|
|
2671
2683
|
class: $([
|
|
2672
2684
|
v ? "font-semibold" : "font-normal",
|
|
2673
2685
|
"block truncate"
|
|
2674
2686
|
])
|
|
2675
2687
|
}, [
|
|
2676
|
-
s.icon ? (R(),
|
|
2688
|
+
s.icon ? (R(), W(z, {
|
|
2677
2689
|
key: 0,
|
|
2678
2690
|
class: "inline-block mr-1",
|
|
2679
2691
|
name: s.icon
|
|
2680
2692
|
}, null, 8, ["name"])) : M("", !0),
|
|
2681
|
-
|
|
2693
|
+
L("span", {
|
|
2682
2694
|
innerHTML: s.label
|
|
2683
|
-
}, null, 8,
|
|
2695
|
+
}, null, 8, cr)
|
|
2684
2696
|
], 2),
|
|
2685
|
-
v ? (R(),
|
|
2697
|
+
v ? (R(), T("span", {
|
|
2686
2698
|
key: 0,
|
|
2687
2699
|
class: $([
|
|
2688
|
-
|
|
2700
|
+
f ? "text-blue-100" : "text-blue-500",
|
|
2689
2701
|
"absolute inset-y-0 right-0 flex items-center pr-4"
|
|
2690
2702
|
])
|
|
2691
2703
|
}, [
|
|
@@ -2710,19 +2722,19 @@ const _r = /* @__PURE__ */ A({
|
|
|
2710
2722
|
_: 1
|
|
2711
2723
|
}, 8, ["modelValue", "disabled"]));
|
|
2712
2724
|
}
|
|
2713
|
-
}),
|
|
2725
|
+
}), dr = { class: "animate-pulse" }, fr = { class: "flex items-center justify-between space-x-4" }, pr = {
|
|
2714
2726
|
key: 0,
|
|
2715
2727
|
class: "w-12 h-12 bg-current rounded-full shrink-0"
|
|
2716
|
-
},
|
|
2728
|
+
}, mr = {
|
|
2717
2729
|
key: 1,
|
|
2718
2730
|
class: "w-full h-8 bg-current rounded-lg"
|
|
2719
|
-
},
|
|
2731
|
+
}, vr = {
|
|
2720
2732
|
key: 0,
|
|
2721
2733
|
class: "mt-6 space-y-2"
|
|
2722
|
-
},
|
|
2734
|
+
}, gr = {
|
|
2723
2735
|
key: 1,
|
|
2724
2736
|
class: "w-1/3 h-10 mt-6 bg-current rounded-lg"
|
|
2725
|
-
},
|
|
2737
|
+
}, Ar = /* @__PURE__ */ A({
|
|
2726
2738
|
__name: "Skeleton",
|
|
2727
2739
|
props: {
|
|
2728
2740
|
avatar: { type: Boolean, default: !1 },
|
|
@@ -2737,32 +2749,32 @@ const _r = /* @__PURE__ */ A({
|
|
|
2737
2749
|
margin: `mr-${o[Math.floor(Math.random() * o.length)]}`
|
|
2738
2750
|
};
|
|
2739
2751
|
});
|
|
2740
|
-
return (o, n) => (R(),
|
|
2741
|
-
|
|
2742
|
-
o.avatar ? (R(),
|
|
2743
|
-
o.title ? (R(),
|
|
2752
|
+
return (o, n) => (R(), T("div", dr, [
|
|
2753
|
+
L("div", fr, [
|
|
2754
|
+
o.avatar ? (R(), T("div", pr)) : M("", !0),
|
|
2755
|
+
o.title ? (R(), T("div", mr)) : M("", !0)
|
|
2744
2756
|
]),
|
|
2745
|
-
o.lines > 0 ? (R(),
|
|
2746
|
-
(R(!0),
|
|
2757
|
+
o.lines > 0 ? (R(), T("div", vr, [
|
|
2758
|
+
(R(!0), T(be, null, jt(_(l), (r, i) => (R(), T("div", {
|
|
2747
2759
|
class: $(["h-4 bg-current rounded-lg", r.margin]),
|
|
2748
2760
|
key: i
|
|
2749
2761
|
}, null, 2))), 128))
|
|
2750
2762
|
])) : M("", !0),
|
|
2751
|
-
o.footer ? (R(),
|
|
2763
|
+
o.footer ? (R(), T("div", gr)) : M("", !0)
|
|
2752
2764
|
]));
|
|
2753
2765
|
}
|
|
2754
|
-
}),
|
|
2766
|
+
}), $r = /* @__PURE__ */ A({
|
|
2755
2767
|
__name: "Spinner",
|
|
2756
2768
|
setup(e) {
|
|
2757
|
-
return (t, l) => (R(),
|
|
2769
|
+
return (t, l) => (R(), W(_(z), {
|
|
2758
2770
|
class: "animate-spin",
|
|
2759
2771
|
name: "circle-notch"
|
|
2760
2772
|
}));
|
|
2761
2773
|
}
|
|
2762
|
-
}),
|
|
2774
|
+
}), br = { class: "relative inline-flex items-center" }, hr = ["aria-label", "tabindex"], yr = {
|
|
2763
2775
|
key: 0,
|
|
2764
2776
|
class: "absolute inset-0 flex items-center justify-center"
|
|
2765
|
-
},
|
|
2777
|
+
}, Mr = /* @__PURE__ */ A({
|
|
2766
2778
|
__name: "SplitButton",
|
|
2767
2779
|
props: {
|
|
2768
2780
|
label: {},
|
|
@@ -2784,12 +2796,12 @@ const _r = /* @__PURE__ */ A({
|
|
|
2784
2796
|
"px-4 py-1 text-xs leading-5 mono-100": o.size === "small",
|
|
2785
2797
|
"px-5 py-2 text-sm leading-4 font-medium": o.size === "medium",
|
|
2786
2798
|
"px-8 pr-4 py-3 text-base leading-6 font-medium": o.size === "large"
|
|
2787
|
-
},
|
|
2799
|
+
}, f = {
|
|
2788
2800
|
"pointer-events-none opacity-75 cursor-not-allowed": o.isDisabled
|
|
2789
2801
|
};
|
|
2790
2802
|
return {
|
|
2791
2803
|
...a,
|
|
2792
|
-
...
|
|
2804
|
+
...f,
|
|
2793
2805
|
...s
|
|
2794
2806
|
};
|
|
2795
2807
|
}), r = k(() => {
|
|
@@ -2820,27 +2832,27 @@ const _r = /* @__PURE__ */ A({
|
|
|
2820
2832
|
function c() {
|
|
2821
2833
|
o.isDisabled || l("onClickSplit");
|
|
2822
2834
|
}
|
|
2823
|
-
return (a, s) => (R(),
|
|
2824
|
-
|
|
2835
|
+
return (a, s) => (R(), T("div", br, [
|
|
2836
|
+
L("button", {
|
|
2825
2837
|
type: "button",
|
|
2826
2838
|
"aria-label": a.label,
|
|
2827
2839
|
tabindex: a.isDisabled ? "-1" : void 0,
|
|
2828
2840
|
class: $(["relative transition duration-150 ease-in-out rounded-l-lg", n.value]),
|
|
2829
2841
|
onClick: u
|
|
2830
2842
|
}, [
|
|
2831
|
-
|
|
2843
|
+
L("div", {
|
|
2832
2844
|
class: $(!a.isLoading || "invisible")
|
|
2833
2845
|
}, [
|
|
2834
|
-
|
|
2846
|
+
L("span", null, G(a.label), 1)
|
|
2835
2847
|
], 2),
|
|
2836
|
-
a.isLoading ? (R(),
|
|
2848
|
+
a.isLoading ? (R(), T("span", yr, [
|
|
2837
2849
|
F(z, {
|
|
2838
2850
|
class: "ml-3 animate-spin",
|
|
2839
2851
|
name: "circle-notch"
|
|
2840
2852
|
})
|
|
2841
2853
|
])) : M("", !0)
|
|
2842
|
-
], 10,
|
|
2843
|
-
|
|
2854
|
+
], 10, hr),
|
|
2855
|
+
L("button", {
|
|
2844
2856
|
type: "button",
|
|
2845
2857
|
class: $(["border-l-white/50 border-l transition duration-150 ease-in-out rounded-r-lg", [n.value, r.value]]),
|
|
2846
2858
|
onClick: c
|
|
@@ -2852,7 +2864,7 @@ const _r = /* @__PURE__ */ A({
|
|
|
2852
2864
|
], 2)
|
|
2853
2865
|
]));
|
|
2854
2866
|
}
|
|
2855
|
-
}),
|
|
2867
|
+
}), xr = { class: "sr-only" }, Vr = /* @__PURE__ */ A({
|
|
2856
2868
|
__name: "Switch",
|
|
2857
2869
|
props: {
|
|
2858
2870
|
id: { default: qt() },
|
|
@@ -2867,28 +2879,28 @@ const _r = /* @__PURE__ */ A({
|
|
|
2867
2879
|
const l = t, o = (n) => {
|
|
2868
2880
|
l("update:modelValue", n), l("change", n);
|
|
2869
2881
|
};
|
|
2870
|
-
return (n, r) => (R(),
|
|
2882
|
+
return (n, r) => (R(), W(_(hl), {
|
|
2871
2883
|
modelValue: n.modelValue,
|
|
2872
2884
|
label: n.label,
|
|
2873
2885
|
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"]),
|
|
2874
2886
|
"onUpdate:modelValue": o
|
|
2875
2887
|
}, {
|
|
2876
|
-
default:
|
|
2877
|
-
|
|
2888
|
+
default: U(() => [
|
|
2889
|
+
L("span", {
|
|
2878
2890
|
class: $(["absolute text-xs text-center text-white inset-x-2", n.modelValue ? "pr-3" : "pl-3"])
|
|
2879
|
-
},
|
|
2880
|
-
|
|
2881
|
-
|
|
2891
|
+
}, G(n.modelValue === !0 ? n.onLabel : n.offLabel), 3),
|
|
2892
|
+
L("span", xr, G(n.label), 1),
|
|
2893
|
+
L("span", {
|
|
2882
2894
|
class: $([n.modelValue ? "translate-x-9" : "translate-x-1", "inline-block w-4 h-4 transition bg-white rounded-full"])
|
|
2883
2895
|
}, null, 2)
|
|
2884
2896
|
]),
|
|
2885
2897
|
_: 1
|
|
2886
2898
|
}, 8, ["modelValue", "label", "class"]));
|
|
2887
2899
|
}
|
|
2888
|
-
}),
|
|
2900
|
+
}), wr = { class: "relative" }, kr = ["tabindex", "value"], Sr = {
|
|
2889
2901
|
inheritAttrs: !1
|
|
2890
|
-
},
|
|
2891
|
-
...
|
|
2902
|
+
}, Fr = /* @__PURE__ */ A({
|
|
2903
|
+
...Sr,
|
|
2892
2904
|
__name: "Textarea",
|
|
2893
2905
|
props: {
|
|
2894
2906
|
modelValue: {},
|
|
@@ -2898,43 +2910,43 @@ const _r = /* @__PURE__ */ A({
|
|
|
2898
2910
|
},
|
|
2899
2911
|
emits: ["update:modelValue"],
|
|
2900
2912
|
setup(e, { expose: t, emit: l }) {
|
|
2901
|
-
const o = e, n = l, { inputClasses: r, disabledClasses: i, textSizeClasses: u } = rt(o), c = function(
|
|
2902
|
-
n("update:modelValue", (
|
|
2913
|
+
const o = e, n = l, { inputClasses: r, disabledClasses: i, textSizeClasses: u } = rt(o), c = function(f) {
|
|
2914
|
+
n("update:modelValue", (f == null ? void 0 : f.target).value);
|
|
2903
2915
|
}, a = C(null);
|
|
2904
2916
|
return t({
|
|
2905
2917
|
focus: () => {
|
|
2906
2918
|
o.isDisabled || a.value.focus();
|
|
2907
2919
|
}
|
|
2908
|
-
}), (
|
|
2909
|
-
|
|
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", [
|
|
2911
|
-
tabindex:
|
|
2912
|
-
value:
|
|
2913
|
-
},
|
|
2920
|
+
}), (f, v) => (R(), T("div", wr, [
|
|
2921
|
+
L("textarea", ot({
|
|
2922
|
+
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", [_(r), _(u), _(i)]],
|
|
2923
|
+
tabindex: f.isDisabled ? "-1" : void 0,
|
|
2924
|
+
value: f.modelValue ?? ""
|
|
2925
|
+
}, f.$attrs, {
|
|
2914
2926
|
ref_key: "input",
|
|
2915
2927
|
ref: a,
|
|
2916
2928
|
cols: "56",
|
|
2917
2929
|
rows: "8",
|
|
2918
2930
|
onInput: c
|
|
2919
2931
|
}), `
|
|
2920
|
-
`, 16,
|
|
2932
|
+
`, 16, kr)
|
|
2921
2933
|
]));
|
|
2922
2934
|
}
|
|
2923
2935
|
});
|
|
2924
2936
|
export {
|
|
2925
|
-
|
|
2926
|
-
|
|
2937
|
+
Er as D9Button,
|
|
2938
|
+
Dr as D9Checkbox,
|
|
2927
2939
|
z as D9Icon,
|
|
2928
|
-
|
|
2940
|
+
_r as D9Input,
|
|
2929
2941
|
Pr as D9Label,
|
|
2930
|
-
|
|
2942
|
+
Lr as D9Menu,
|
|
2931
2943
|
Tr as D9MenuLink,
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2944
|
+
Ir as D9Select,
|
|
2945
|
+
Ar as D9Skeleton,
|
|
2946
|
+
$r as D9Spinner,
|
|
2947
|
+
Mr as D9SplitButton,
|
|
2948
|
+
Vr as D9Switch,
|
|
2949
|
+
Fr as D9Textarea,
|
|
2938
2950
|
xt as brands,
|
|
2939
2951
|
Gn as icons
|
|
2940
2952
|
};
|