@deck9/ui 0.15.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/ui.mjs +399 -389
- package/dist/src/ui.umd.js +4 -4
- package/package.json +1 -1
package/dist/src/ui.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, computed as k, openBlock as R, createBlock as K, unref as P, mergeProps as ot, createCommentVNode as M, createElementBlock as T, normalizeClass as $, createElementVNode as I, toDisplayString as B, 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 j, onUnmounted as Ne, toRaw as X, shallowRef as Vn, getCurrentScope as Fn, onScopeDispose as Nn, shallowReadonly as me, withCtx as W, renderSlot as ht, Teleport as Bn, Transition as Bt, normalizeProps as jn, guardReactiveProps as zn, resolveDynamicComponent as Un, isRef as Hn, renderList as jt, createTextVNode as Wn } from "vue";
|
|
2
2
|
import { FontAwesomeIcon as Kn } from "@fortawesome/vue-fontawesome";
|
|
3
3
|
import { library as lt } from "@fortawesome/fontawesome-svg-core";
|
|
4
|
-
import * as
|
|
4
|
+
import * as p from "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
import * as Se from "@fortawesome/free-brands-svg-icons";
|
|
6
6
|
var zt = "fas", Ut = "numeric-input", Ht = 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,96 +21,106 @@ const yt = {
|
|
|
21
21
|
aliases: Ze
|
|
22
22
|
};
|
|
23
23
|
lt.add(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
24
|
+
p.faAlignCenter,
|
|
25
|
+
p.faAlignLeft,
|
|
26
|
+
p.faAlignRight,
|
|
27
|
+
p.faArrowUp19,
|
|
28
|
+
p.faAsterisk,
|
|
29
|
+
p.faAt,
|
|
30
|
+
p.faBold,
|
|
31
|
+
p.faBolt,
|
|
32
|
+
p.faCalendar,
|
|
33
|
+
p.faChartPie,
|
|
34
|
+
p.faCheck,
|
|
35
|
+
p.faCheckCircle,
|
|
36
|
+
p.faChevronDown,
|
|
37
|
+
p.faChevronLeft,
|
|
38
|
+
p.faChevronRight,
|
|
39
|
+
p.faChevronUp,
|
|
40
|
+
p.faCircleCheck,
|
|
41
|
+
p.faCircleNodes,
|
|
42
|
+
p.faCircleNotch,
|
|
43
|
+
p.faClipboard,
|
|
44
|
+
p.faCloudDownload,
|
|
45
|
+
p.faCloudUpload,
|
|
46
|
+
p.faCode,
|
|
47
|
+
p.faCodeBranch,
|
|
48
|
+
p.faCodeFork,
|
|
49
|
+
p.faCog,
|
|
50
|
+
p.faCrown,
|
|
51
|
+
p.faDiagramProject,
|
|
52
|
+
p.faDoorOpen,
|
|
53
|
+
p.faDotCircle,
|
|
54
|
+
p.faEllipsis,
|
|
55
|
+
p.faEllipsisVertical,
|
|
56
|
+
p.faEnvelope,
|
|
57
|
+
p.faExclamationTriangle,
|
|
58
|
+
p.faExternalLink,
|
|
59
|
+
p.faEyeDropper,
|
|
60
|
+
p.faFileLines,
|
|
61
|
+
p.faFilePdf,
|
|
62
|
+
p.faFileUpload,
|
|
63
|
+
p.faFileVideo,
|
|
64
|
+
p.faFileWaveform,
|
|
65
|
+
p.faFilter,
|
|
66
|
+
p.faFilter,
|
|
67
|
+
p.faFingerprint,
|
|
68
|
+
p.faFont,
|
|
69
|
+
p.faGears,
|
|
70
|
+
p.faGlobe,
|
|
71
|
+
p.faGripHorizontal,
|
|
72
|
+
p.faGripVertical,
|
|
73
|
+
p.faHandPointRight,
|
|
74
|
+
p.faHashtag,
|
|
75
|
+
p.faHeading,
|
|
76
|
+
p.faHeart,
|
|
77
|
+
p.faImage,
|
|
78
|
+
p.faInfoCircle,
|
|
79
|
+
p.faItalic,
|
|
80
|
+
p.faLink,
|
|
81
|
+
p.faLinkSlash,
|
|
82
|
+
p.faList,
|
|
83
|
+
p.faListOl,
|
|
84
|
+
p.faListUl,
|
|
85
|
+
p.faLock,
|
|
86
|
+
p.faLockOpen,
|
|
87
|
+
p.faMedal,
|
|
88
|
+
p.faMessage,
|
|
89
|
+
p.faMicrochip,
|
|
90
|
+
p.faPencilAlt,
|
|
91
|
+
p.faPenToSquare,
|
|
92
|
+
p.faPhone,
|
|
93
|
+
p.faPlayCircle,
|
|
94
|
+
p.faPlus,
|
|
95
|
+
p.faPlusCircle,
|
|
96
|
+
p.faPoo,
|
|
97
|
+
p.faPuzzlePiece,
|
|
98
|
+
p.faQuestion,
|
|
99
|
+
p.faQuoteLeft,
|
|
100
|
+
p.faQuoteRight,
|
|
101
|
+
p.faReply,
|
|
102
|
+
p.faReplyAll,
|
|
103
|
+
p.faRobot,
|
|
104
|
+
p.faSave,
|
|
105
|
+
p.faShield,
|
|
106
|
+
p.faSignal,
|
|
107
|
+
p.faSignature,
|
|
108
|
+
p.faSignature,
|
|
109
|
+
p.faSquareCheck,
|
|
110
|
+
p.faStar,
|
|
111
|
+
p.faStrikethrough,
|
|
112
|
+
p.faTerminal,
|
|
113
|
+
p.faTextSlash,
|
|
114
|
+
p.faTimes,
|
|
115
|
+
p.faTrash,
|
|
116
|
+
p.faTree,
|
|
117
|
+
p.faTrophy,
|
|
118
|
+
p.faTurnDown,
|
|
119
|
+
p.faUnderline,
|
|
120
|
+
p.faUpload,
|
|
121
|
+
p.faUser,
|
|
122
|
+
p.faUserShield,
|
|
123
|
+
p.faWandMagicSparkles,
|
|
114
124
|
// Brands
|
|
115
125
|
Se.faTwitter,
|
|
116
126
|
Se.faInstagram,
|
|
@@ -120,7 +130,7 @@ lt.add(
|
|
|
120
130
|
// Custom
|
|
121
131
|
Gn.definition
|
|
122
132
|
);
|
|
123
|
-
const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.definitions.fab)].sort(), U = /* @__PURE__ */
|
|
133
|
+
const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.definitions.fab)].sort(), U = /* @__PURE__ */ A({
|
|
124
134
|
__name: "Icon",
|
|
125
135
|
props: {
|
|
126
136
|
name: { default: "user" }
|
|
@@ -138,7 +148,7 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
138
148
|
}), Xn = ["aria-label", "tabindex"], Yn = {
|
|
139
149
|
key: 0,
|
|
140
150
|
class: "absolute inset-0 flex items-center justify-center"
|
|
141
|
-
}, Rr = /* @__PURE__ */
|
|
151
|
+
}, Rr = /* @__PURE__ */ A({
|
|
142
152
|
__name: "Button",
|
|
143
153
|
props: {
|
|
144
154
|
label: {},
|
|
@@ -191,25 +201,25 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
191
201
|
o.isDisabled || l("onClick");
|
|
192
202
|
}
|
|
193
203
|
return (u, c) => (R(), T("button", {
|
|
194
|
-
class:
|
|
204
|
+
class: $(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out", n.value]),
|
|
195
205
|
type: "button",
|
|
196
206
|
"aria-label": u.label,
|
|
197
207
|
tabindex: u.isDisabled ? "-1" : void 0,
|
|
198
208
|
onClick: i
|
|
199
209
|
}, [
|
|
200
210
|
I("div", {
|
|
201
|
-
class:
|
|
211
|
+
class: $(!u.isLoading || "invisible")
|
|
202
212
|
}, [
|
|
203
213
|
u.icon && u.iconPosition === "left" ? (R(), K(U, {
|
|
204
214
|
key: 0,
|
|
205
215
|
name: u.icon,
|
|
206
|
-
class:
|
|
216
|
+
class: $(r.value)
|
|
207
217
|
}, null, 8, ["name", "class"])) : M("", !0),
|
|
208
218
|
I("span", null, B(u.label), 1),
|
|
209
219
|
u.icon && u.iconPosition === "right" ? (R(), K(U, {
|
|
210
220
|
key: 1,
|
|
211
221
|
name: u.icon,
|
|
212
|
-
class:
|
|
222
|
+
class: $(r.value)
|
|
213
223
|
}, null, 8, ["name", "class"])) : M("", !0)
|
|
214
224
|
], 2),
|
|
215
225
|
u.isLoading ? (R(), T("span", Yn, [
|
|
@@ -253,7 +263,7 @@ function qt(e, t, l) {
|
|
|
253
263
|
const to = { class: "relative flex items-start" }, no = { class: "flex items-center h-5" }, oo = ["checked", "id"], lo = { class: "ml-2 text-sm leading-5" }, ro = ["for"], io = {
|
|
254
264
|
key: 0,
|
|
255
265
|
class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
|
|
256
|
-
}, Er = /* @__PURE__ */
|
|
266
|
+
}, Er = /* @__PURE__ */ A({
|
|
257
267
|
__name: "Checkbox",
|
|
258
268
|
props: {
|
|
259
269
|
id: { default: qt() },
|
|
@@ -287,7 +297,7 @@ const to = { class: "relative flex items-start" }, no = { class: "flex items-cen
|
|
|
287
297
|
}
|
|
288
298
|
});
|
|
289
299
|
function ao() {
|
|
290
|
-
const e =
|
|
300
|
+
const e = C(!1);
|
|
291
301
|
return In() && ee(() => {
|
|
292
302
|
e.value = !0;
|
|
293
303
|
}), e;
|
|
@@ -297,7 +307,7 @@ function so(e) {
|
|
|
297
307
|
return k(() => (t.value, !!e()));
|
|
298
308
|
}
|
|
299
309
|
function uo(e = {}) {
|
|
300
|
-
const { initialValue: t = "" } = e, l = so(() => typeof window < "u" && "EyeDropper" in window), o =
|
|
310
|
+
const { initialValue: t = "" } = e, l = so(() => typeof window < "u" && "EyeDropper" in window), o = C(t);
|
|
301
311
|
async function n(r) {
|
|
302
312
|
if (!l.value)
|
|
303
313
|
return;
|
|
@@ -332,7 +342,7 @@ const bo = (e) => {
|
|
|
332
342
|
t.length = l;
|
|
333
343
|
}
|
|
334
344
|
};
|
|
335
|
-
let
|
|
345
|
+
let Ce = 0, ie = 1;
|
|
336
346
|
const Je = 30;
|
|
337
347
|
let Y;
|
|
338
348
|
class xo {
|
|
@@ -342,23 +352,23 @@ class xo {
|
|
|
342
352
|
run() {
|
|
343
353
|
if (!this.active)
|
|
344
354
|
return this.fn();
|
|
345
|
-
let t = Y, l =
|
|
355
|
+
let t = Y, l = Ae;
|
|
346
356
|
for (; t; ) {
|
|
347
357
|
if (t === this)
|
|
348
358
|
return;
|
|
349
359
|
t = t.parent;
|
|
350
360
|
}
|
|
351
361
|
try {
|
|
352
|
-
return this.parent = Y, Y = this,
|
|
362
|
+
return this.parent = Y, Y = this, Ae = !0, ie = 1 << ++Ce, Ce <= Je ? ho(this) : Ct(this), this.fn();
|
|
353
363
|
} finally {
|
|
354
|
-
|
|
364
|
+
Ce <= Je && yo(this), ie = 1 << --Ce, Y = this.parent, Ae = l, this.parent = void 0, this.deferStop && this.stop();
|
|
355
365
|
}
|
|
356
366
|
}
|
|
357
367
|
stop() {
|
|
358
|
-
Y === this ? this.deferStop = !0 : this.active && (
|
|
368
|
+
Y === this ? this.deferStop = !0 : this.active && (Ct(this), this.onStop && this.onStop(), this.active = !1);
|
|
359
369
|
}
|
|
360
370
|
}
|
|
361
|
-
function
|
|
371
|
+
function Ct(e) {
|
|
362
372
|
const { deps: t } = e;
|
|
363
373
|
if (t.length) {
|
|
364
374
|
for (let l = 0; l < t.length; l++)
|
|
@@ -366,19 +376,19 @@ function Ot(e) {
|
|
|
366
376
|
t.length = 0;
|
|
367
377
|
}
|
|
368
378
|
}
|
|
369
|
-
let
|
|
379
|
+
let Ae = !0;
|
|
370
380
|
function wo(e, t) {
|
|
371
381
|
let l = !1;
|
|
372
|
-
|
|
382
|
+
Ce <= Je ? Yt(e) || (e.n |= ie, l = !Xt(e)) : l = !e.has(Y), l && (e.add(Y), Y.deps.push(e));
|
|
373
383
|
}
|
|
374
384
|
function ko(e, t) {
|
|
375
385
|
const l = fo(e) ? e : [...e];
|
|
376
386
|
for (const o of l)
|
|
377
|
-
o.computed &&
|
|
387
|
+
o.computed && Ot(o);
|
|
378
388
|
for (const o of l)
|
|
379
|
-
o.computed ||
|
|
389
|
+
o.computed || Ot(o);
|
|
380
390
|
}
|
|
381
|
-
function
|
|
391
|
+
function Ot(e, t) {
|
|
382
392
|
(e !== Y || e.allowRecurse) && (e.scheduler ? e.scheduler() : e.run());
|
|
383
393
|
}
|
|
384
394
|
new Set(
|
|
@@ -389,17 +399,17 @@ function Be(e) {
|
|
|
389
399
|
return t ? Be(t) : e;
|
|
390
400
|
}
|
|
391
401
|
function So(e) {
|
|
392
|
-
|
|
402
|
+
Ae && Y && (e = Be(e), wo(e.dep || (e.dep = bo())));
|
|
393
403
|
}
|
|
394
|
-
function
|
|
404
|
+
function Co(e, t) {
|
|
395
405
|
e = Be(e);
|
|
396
406
|
const l = e.dep;
|
|
397
407
|
l && ko(l);
|
|
398
408
|
}
|
|
399
|
-
class
|
|
409
|
+
class Oo {
|
|
400
410
|
constructor(t, l, o, n) {
|
|
401
411
|
this._setter = l, this.dep = void 0, this.__v_isRef = !0, this.__v_isReadonly = !1, this._dirty = !0, this.effect = new xo(t, () => {
|
|
402
|
-
this._dirty || (this._dirty = !0,
|
|
412
|
+
this._dirty || (this._dirty = !0, Co(this));
|
|
403
413
|
}), this.effect.computed = this, this.effect.active = this._cacheable = !n, this.__v_isReadonly = o;
|
|
404
414
|
}
|
|
405
415
|
get value() {
|
|
@@ -413,7 +423,7 @@ class Co {
|
|
|
413
423
|
function Ro(e, t, l = !1) {
|
|
414
424
|
let o, n;
|
|
415
425
|
const r = po(e);
|
|
416
|
-
return r ? (o = e, n = co) : (o = e.get, n = e.set), new
|
|
426
|
+
return r ? (o = e, n = co) : (o = e.get, n = e.set), new Oo(o, n, r || !n, l);
|
|
417
427
|
}
|
|
418
428
|
let Xe, Rt = "__VUE_INSTANCE_SETTERS__";
|
|
419
429
|
(Xe = St()[Rt]) || (Xe = St()[Rt] = []), Xe.push((e) => e);
|
|
@@ -442,7 +452,7 @@ function rt(e) {
|
|
|
442
452
|
}
|
|
443
453
|
const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute inset-y-2 left-2 w-8 cursor-pointer" }, _o = {
|
|
444
454
|
inheritAttrs: !1
|
|
445
|
-
}, Dr = /* @__PURE__ */
|
|
455
|
+
}, Dr = /* @__PURE__ */ A({
|
|
446
456
|
..._o,
|
|
447
457
|
__name: "Input",
|
|
448
458
|
props: {
|
|
@@ -459,7 +469,7 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
459
469
|
},
|
|
460
470
|
emits: ["update:modelValue"],
|
|
461
471
|
setup(e, { expose: t, emit: l }) {
|
|
462
|
-
const o = e, n =
|
|
472
|
+
const o = e, n = C(null), r = C(o.modelValue ?? "");
|
|
463
473
|
Q(
|
|
464
474
|
() => o.modelValue,
|
|
465
475
|
(y) => {
|
|
@@ -468,15 +478,15 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
468
478
|
);
|
|
469
479
|
const i = l, { inputClasses: u, disabledClasses: c, textSizeClasses: a } = rt(o), s = k(() => o.type === "color" ? "text" : o.type), {
|
|
470
480
|
isSupported: d,
|
|
471
|
-
open:
|
|
481
|
+
open: v,
|
|
472
482
|
sRGBHex: f
|
|
473
|
-
} = uo(),
|
|
474
|
-
|
|
483
|
+
} = uo(), g = () => {
|
|
484
|
+
v();
|
|
475
485
|
};
|
|
476
486
|
Q(f, (y) => {
|
|
477
487
|
r.value = y, i("update:modelValue", y);
|
|
478
488
|
});
|
|
479
|
-
const
|
|
489
|
+
const m = function(y) {
|
|
480
490
|
const x = (y == null ? void 0 : y.target).value;
|
|
481
491
|
if (o.type === "number" && o.min && parseInt(x) < o.min) {
|
|
482
492
|
r.value = o.min, n.value.value = r.value.toString(), i("update:modelValue", o.min);
|
|
@@ -487,13 +497,13 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
487
497
|
return;
|
|
488
498
|
}
|
|
489
499
|
r.value = (y == null ? void 0 : y.target).value, i("update:modelValue", r.value);
|
|
490
|
-
}, h =
|
|
500
|
+
}, h = C(null);
|
|
491
501
|
return t({
|
|
492
502
|
focus: () => {
|
|
493
503
|
o.isDisabled || h.value.focus();
|
|
494
504
|
}
|
|
495
505
|
}), (y, x) => (R(), T("div", {
|
|
496
|
-
class:
|
|
506
|
+
class: $(["relative", [y.block ? "w-full block" : "inline-block"]])
|
|
497
507
|
}, [
|
|
498
508
|
I("input", ot({
|
|
499
509
|
class: ["relative mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [P(u), P(a), P(c)]],
|
|
@@ -504,17 +514,17 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
504
514
|
}, y.$attrs, {
|
|
505
515
|
ref_key: "inputElement",
|
|
506
516
|
ref: n,
|
|
507
|
-
onInput:
|
|
517
|
+
onInput: m
|
|
508
518
|
}), null, 16, Do),
|
|
509
519
|
y.type === "color" ? (R(), T(be, { key: 0 }, [
|
|
510
520
|
I("label", Po, [
|
|
511
|
-
|
|
521
|
+
An(I("input", {
|
|
512
522
|
class: "invisible",
|
|
513
523
|
type: "color",
|
|
514
524
|
"onUpdate:modelValue": x[0] || (x[0] = (w) => r.value = w),
|
|
515
|
-
onInput:
|
|
525
|
+
onInput: m
|
|
516
526
|
}, null, 544), [
|
|
517
|
-
[
|
|
527
|
+
[$n, r.value]
|
|
518
528
|
]),
|
|
519
529
|
I("span", {
|
|
520
530
|
class: "border-1 absolute inset-0 block rounded border border-grey-600/25 bg-clip-border shadow",
|
|
@@ -525,7 +535,7 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
525
535
|
key: 0,
|
|
526
536
|
type: "button",
|
|
527
537
|
class: "absolute inset-y-2 right-2 h-7 w-7 rounded-full hover:bg-grey-200",
|
|
528
|
-
onClick:
|
|
538
|
+
onClick: g
|
|
529
539
|
}, [
|
|
530
540
|
F(U, {
|
|
531
541
|
size: "xs",
|
|
@@ -534,7 +544,7 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
534
544
|
])) : M("", !0)
|
|
535
545
|
], 64)) : y.icon ? (R(), T("span", {
|
|
536
546
|
key: 1,
|
|
537
|
-
class:
|
|
547
|
+
class: $(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", P(a)])
|
|
538
548
|
}, [
|
|
539
549
|
F(U, { name: y.icon }, null, 8, ["name"])
|
|
540
550
|
], 2)) : M("", !0)
|
|
@@ -543,7 +553,7 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
543
553
|
}), To = { class: "inline-block text-grey-700 dark:text-grey-200 text-sm font-medium casual-20" }, Lo = ["for"], Io = {
|
|
544
554
|
key: 0,
|
|
545
555
|
class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
|
|
546
|
-
}, Pr = /* @__PURE__ */
|
|
556
|
+
}, Pr = /* @__PURE__ */ A({
|
|
547
557
|
__name: "Label",
|
|
548
558
|
props: {
|
|
549
559
|
id: {},
|
|
@@ -565,7 +575,7 @@ function G(e, t, ...l) {
|
|
|
565
575
|
let o = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((n) => `"${n}"`).join(", ")}.`);
|
|
566
576
|
throw Error.captureStackTrace && Error.captureStackTrace(o, G), o;
|
|
567
577
|
}
|
|
568
|
-
var Re = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Re || {}),
|
|
578
|
+
var Re = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Re || {}), Ao = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Ao || {});
|
|
569
579
|
function z({ visible: e = !0, features: t = 0, ourProps: l, theirProps: o, ...n }) {
|
|
570
580
|
var r;
|
|
571
581
|
let i = Zt(o, l), u = Object.assign(n, { props: i });
|
|
@@ -585,27 +595,27 @@ function Qe({ props: e, attrs: t, slots: l, slot: o, name: n }) {
|
|
|
585
595
|
var r, i;
|
|
586
596
|
let { as: u, ...c } = it(e, ["unmount", "static"]), a = (r = l.default) == null ? void 0 : r.call(l, o), s = {};
|
|
587
597
|
if (o) {
|
|
588
|
-
let d = !1,
|
|
589
|
-
for (let [f,
|
|
590
|
-
typeof
|
|
591
|
-
d && (s["data-headlessui-state"] =
|
|
598
|
+
let d = !1, v = [];
|
|
599
|
+
for (let [f, g] of Object.entries(o))
|
|
600
|
+
typeof g == "boolean" && (d = !0), g === !0 && v.push(f);
|
|
601
|
+
d && (s["data-headlessui-state"] = v.join(" "));
|
|
592
602
|
}
|
|
593
603
|
if (u === "template") {
|
|
594
604
|
if (a = Qt(a ?? []), Object.keys(c).length > 0 || Object.keys(t).length > 0) {
|
|
595
|
-
let [d, ...
|
|
596
|
-
if (
|
|
597
|
-
throw new Error(['Passing props on "template"!', "", `The current component <${n} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(c).concat(Object.keys(t)).map((
|
|
598
|
-
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((
|
|
605
|
+
let [d, ...v] = a ?? [];
|
|
606
|
+
if (!$o(d) || v.length > 0)
|
|
607
|
+
throw new Error(['Passing props on "template"!', "", `The current component <${n} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(c).concat(Object.keys(t)).map((m) => m.trim()).filter((m, h, b) => b.indexOf(m) === h).sort((m, h) => m.localeCompare(h)).map((m) => ` - ${m}`).join(`
|
|
608
|
+
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((m) => ` - ${m}`).join(`
|
|
599
609
|
`)].join(`
|
|
600
610
|
`));
|
|
601
|
-
let f = Zt((i = d.props) != null ? i : {}, c),
|
|
602
|
-
for (let
|
|
603
|
-
|
|
604
|
-
return
|
|
611
|
+
let f = Zt((i = d.props) != null ? i : {}, c), g = Mn(d, f);
|
|
612
|
+
for (let m in f)
|
|
613
|
+
m.startsWith("on") && (g.props || (g.props = {}), g.props[m] = f[m]);
|
|
614
|
+
return g;
|
|
605
615
|
}
|
|
606
616
|
return Array.isArray(a) && a.length === 1 ? a[0] : a;
|
|
607
617
|
}
|
|
608
|
-
return
|
|
618
|
+
return Oe(u, Object.assign({}, c, s), { default: () => a });
|
|
609
619
|
}
|
|
610
620
|
function Qt(e) {
|
|
611
621
|
return e.flatMap((t) => t.type === be ? Qt(t.children) : [t]);
|
|
@@ -644,7 +654,7 @@ function it(e, t = []) {
|
|
|
644
654
|
o in l && delete l[o];
|
|
645
655
|
return l;
|
|
646
656
|
}
|
|
647
|
-
function
|
|
657
|
+
function $o(e) {
|
|
648
658
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
649
659
|
}
|
|
650
660
|
let Mo = 0;
|
|
@@ -707,7 +717,7 @@ function Et(e, t) {
|
|
|
707
717
|
return "button";
|
|
708
718
|
}
|
|
709
719
|
function at(e, t) {
|
|
710
|
-
let l =
|
|
720
|
+
let l = C(Et(e.value.type, e.value.as));
|
|
711
721
|
return ee(() => {
|
|
712
722
|
l.value = Et(e.value.type, e.value.as);
|
|
713
723
|
}), xe(() => {
|
|
@@ -820,7 +830,7 @@ function Xo(e, t) {
|
|
|
820
830
|
function Yo(e, t, { sorted: l = !0, relativeTo: o = null, skipElements: n = [] } = {}) {
|
|
821
831
|
var r;
|
|
822
832
|
let i = (r = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? r : document, u = Array.isArray(e) ? l ? ct(e) : e : ln(e);
|
|
823
|
-
n.length > 0 && u.length > 1 && (u = u.filter((
|
|
833
|
+
n.length > 0 && u.length > 1 && (u = u.filter((g) => !n.includes(g))), o = o ?? i.activeElement;
|
|
824
834
|
let c = (() => {
|
|
825
835
|
if (t & 5)
|
|
826
836
|
return 1;
|
|
@@ -837,20 +847,20 @@ function Yo(e, t, { sorted: l = !0, relativeTo: o = null, skipElements: n = [] }
|
|
|
837
847
|
if (t & 8)
|
|
838
848
|
return u.length - 1;
|
|
839
849
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
840
|
-
})(), s = t & 32 ? { preventScroll: !0 } : {}, d = 0,
|
|
850
|
+
})(), s = t & 32 ? { preventScroll: !0 } : {}, d = 0, v = u.length, f;
|
|
841
851
|
do {
|
|
842
|
-
if (d >=
|
|
852
|
+
if (d >= v || d + v <= 0)
|
|
843
853
|
return 0;
|
|
844
|
-
let
|
|
854
|
+
let g = a + d;
|
|
845
855
|
if (t & 16)
|
|
846
|
-
|
|
856
|
+
g = (g + v) % v;
|
|
847
857
|
else {
|
|
848
|
-
if (
|
|
858
|
+
if (g < 0)
|
|
849
859
|
return 3;
|
|
850
|
-
if (
|
|
860
|
+
if (g >= v)
|
|
851
861
|
return 1;
|
|
852
862
|
}
|
|
853
|
-
f = u[
|
|
863
|
+
f = u[g], f == null || f.focus(s), d += c;
|
|
854
864
|
} while (f !== i.activeElement);
|
|
855
865
|
return t & 6 && qo(f) && f.select(), 2;
|
|
856
866
|
}
|
|
@@ -883,7 +893,7 @@ function an(e, t, l = k(() => !0)) {
|
|
|
883
893
|
}
|
|
884
894
|
return !ze(u, je.Loose) && u.tabIndex !== -1 && r.preventDefault(), t(r, u);
|
|
885
895
|
}
|
|
886
|
-
let n =
|
|
896
|
+
let n = C(null);
|
|
887
897
|
Le("pointerdown", (r) => {
|
|
888
898
|
var i, u;
|
|
889
899
|
l.value && (n.value = ((u = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : u[0]) || r.target);
|
|
@@ -895,7 +905,7 @@ function an(e, t, l = k(() => !0)) {
|
|
|
895
905
|
}, !0), Le("touchend", (r) => o(r, () => r.target instanceof HTMLElement ? r.target : null), !0), Qo("blur", (r) => o(r, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
896
906
|
}
|
|
897
907
|
var dt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(dt || {});
|
|
898
|
-
let sn =
|
|
908
|
+
let sn = A({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: t, attrs: l }) {
|
|
899
909
|
return () => {
|
|
900
910
|
let { features: o, ...n } = e, r = { "aria-hidden": (o & 2) === 2 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(o & 4) === 4 && (o & 2) !== 2 && { display: "none" } } };
|
|
901
911
|
return z({ ourProps: r, theirProps: n, slot: {}, attrs: l, slots: t, name: "Hidden" });
|
|
@@ -929,7 +939,7 @@ function Zo(e) {
|
|
|
929
939
|
}
|
|
930
940
|
}
|
|
931
941
|
function fn(e, t, l) {
|
|
932
|
-
let o =
|
|
942
|
+
let o = C(l == null ? void 0 : l.value), n = k(() => e.value !== void 0);
|
|
933
943
|
return [k(() => n.value ? e.value : o.value), function(r) {
|
|
934
944
|
return n.value || (o.value = r), t == null ? void 0 : t(r);
|
|
935
945
|
}];
|
|
@@ -938,7 +948,7 @@ function Pt(e) {
|
|
|
938
948
|
return [e.screenX, e.screenY];
|
|
939
949
|
}
|
|
940
950
|
function pn() {
|
|
941
|
-
let e =
|
|
951
|
+
let e = C([-1, -1]);
|
|
942
952
|
return { wasMoved(t) {
|
|
943
953
|
let l = Pt(t);
|
|
944
954
|
return e.value[0] === l[0] && e.value[1] === l[1] ? !1 : (e.value = l, !0);
|
|
@@ -953,8 +963,8 @@ function Jo() {
|
|
|
953
963
|
throw new Error("Missing parent");
|
|
954
964
|
return e;
|
|
955
965
|
}
|
|
956
|
-
function el({ slot: e =
|
|
957
|
-
let o =
|
|
966
|
+
function el({ slot: e = C({}), name: t = "Description", props: l = {} } = {}) {
|
|
967
|
+
let o = C([]);
|
|
958
968
|
function n(r) {
|
|
959
969
|
return o.value.push(r), () => {
|
|
960
970
|
let i = o.value.indexOf(r);
|
|
@@ -963,10 +973,10 @@ function el({ slot: e = O({}), name: t = "Description", props: l = {} } = {}) {
|
|
|
963
973
|
}
|
|
964
974
|
return ye(mn, { register: n, slot: e, name: t, props: l }), k(() => o.value.length > 0 ? o.value.join(" ") : void 0);
|
|
965
975
|
}
|
|
966
|
-
|
|
976
|
+
A({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${J()}` } }, setup(e, { attrs: t, slots: l }) {
|
|
967
977
|
let o = Jo();
|
|
968
978
|
return ee(() => Ne(o.register(e.id))), () => {
|
|
969
|
-
let { name: n = "Description", slot: r =
|
|
979
|
+
let { name: n = "Description", slot: r = C({}), props: i = {} } = o, { id: u, ...c } = e, a = { ...Object.entries(i).reduce((s, [d, v]) => Object.assign(s, { [d]: P(v) }), {}), id: u };
|
|
970
980
|
return z({ ourProps: a, theirProps: c, slot: r.value, attrs: t, slots: l, name: n });
|
|
971
981
|
};
|
|
972
982
|
} });
|
|
@@ -1002,7 +1012,7 @@ function tl(e) {
|
|
|
1002
1012
|
return Tt(e).trim();
|
|
1003
1013
|
}
|
|
1004
1014
|
function vn(e) {
|
|
1005
|
-
let t =
|
|
1015
|
+
let t = C(""), l = C("");
|
|
1006
1016
|
return () => {
|
|
1007
1017
|
let o = E(e);
|
|
1008
1018
|
if (!o)
|
|
@@ -1030,13 +1040,13 @@ function De(e) {
|
|
|
1030
1040
|
}
|
|
1031
1041
|
return t;
|
|
1032
1042
|
}
|
|
1033
|
-
let al =
|
|
1034
|
-
let n =
|
|
1035
|
-
function
|
|
1036
|
-
let w = s.value !== null ? c.value[s.value] : null, S = ct(x(c.value.slice()), (
|
|
1043
|
+
let al = 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: () => nl }, horizontal: { type: [Boolean], default: !1 }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, multiple: { type: [Boolean], default: !1 } }, inheritAttrs: !1, setup(e, { slots: t, attrs: l, emit: o }) {
|
|
1044
|
+
let n = C(1), r = C(null), i = C(null), u = C(null), c = C([]), a = C(""), s = C(null), d = C(1);
|
|
1045
|
+
function v(x = (w) => w) {
|
|
1046
|
+
let w = s.value !== null ? c.value[s.value] : null, S = ct(x(c.value.slice()), (O) => E(O.dataRef.domRef)), _ = w ? S.indexOf(w) : null;
|
|
1037
1047
|
return _ === -1 && (_ = null), { options: S, activeOptionIndex: _ };
|
|
1038
1048
|
}
|
|
1039
|
-
let f = k(() => e.multiple ? 1 : 0), [
|
|
1049
|
+
let f = k(() => e.multiple ? 1 : 0), [g, m] = fn(k(() => e.modelValue), (x) => o("update:modelValue", x), k(() => e.defaultValue)), h = k(() => g.value === void 0 ? G(f.value, { 1: [], 0: void 0 }) : g.value), b = { listboxState: n, value: h, mode: f, compare(x, w) {
|
|
1040
1050
|
if (typeof e.by == "string") {
|
|
1041
1051
|
let S = e.by;
|
|
1042
1052
|
return (x == null ? void 0 : x[S]) === (w == null ? void 0 : w[S]);
|
|
@@ -1049,31 +1059,31 @@ let al = $({ name: "Listbox", emits: { "update:modelValue": (e) => !0 }, props:
|
|
|
1049
1059
|
}, goToOption(x, w, S) {
|
|
1050
1060
|
if (e.disabled || n.value === 1)
|
|
1051
1061
|
return;
|
|
1052
|
-
let _ =
|
|
1053
|
-
a.value = "", s.value =
|
|
1062
|
+
let _ = v(), O = en(x === L.Specific ? { focus: L.Specific, id: w } : { focus: x }, { resolveItems: () => _.options, resolveActiveIndex: () => _.activeOptionIndex, resolveId: (N) => N.id, resolveDisabled: (N) => N.dataRef.disabled });
|
|
1063
|
+
a.value = "", s.value = O, d.value = S ?? 1, c.value = _.options;
|
|
1054
1064
|
}, search(x) {
|
|
1055
1065
|
if (e.disabled || n.value === 1)
|
|
1056
1066
|
return;
|
|
1057
1067
|
let w = a.value !== "" ? 0 : 1;
|
|
1058
1068
|
a.value += x.toLowerCase();
|
|
1059
|
-
let S = (s.value !== null ? c.value.slice(s.value + w).concat(c.value.slice(0, s.value + w)) : c.value).find((
|
|
1069
|
+
let S = (s.value !== null ? c.value.slice(s.value + w).concat(c.value.slice(0, s.value + w)) : c.value).find((O) => O.dataRef.textValue.startsWith(a.value) && !O.dataRef.disabled), _ = S ? c.value.indexOf(S) : -1;
|
|
1060
1070
|
_ === -1 || _ === s.value || (s.value = _, d.value = 1);
|
|
1061
1071
|
}, clearSearch() {
|
|
1062
1072
|
e.disabled || n.value !== 1 && a.value !== "" && (a.value = "");
|
|
1063
1073
|
}, registerOption(x, w) {
|
|
1064
|
-
let S =
|
|
1074
|
+
let S = v((_) => [..._, { id: x, dataRef: w }]);
|
|
1065
1075
|
c.value = S.options, s.value = S.activeOptionIndex;
|
|
1066
1076
|
}, unregisterOption(x) {
|
|
1067
|
-
let w =
|
|
1068
|
-
let _ = S.findIndex((
|
|
1077
|
+
let w = v((S) => {
|
|
1078
|
+
let _ = S.findIndex((O) => O.id === x);
|
|
1069
1079
|
return _ !== -1 && S.splice(_, 1), S;
|
|
1070
1080
|
});
|
|
1071
1081
|
c.value = w.options, s.value = w.activeOptionIndex, d.value = 1;
|
|
1072
1082
|
}, theirOnChange(x) {
|
|
1073
|
-
e.disabled ||
|
|
1083
|
+
e.disabled || m(x);
|
|
1074
1084
|
}, select(x) {
|
|
1075
|
-
e.disabled ||
|
|
1076
|
-
let w = X(b.value.value).slice(), S = X(x), _ = w.findIndex((
|
|
1085
|
+
e.disabled || m(G(f.value, { 0: () => x, 1: () => {
|
|
1086
|
+
let w = X(b.value.value).slice(), S = X(x), _ = w.findIndex((O) => b.compare(S, X(O)));
|
|
1077
1087
|
return _ === -1 ? w.push(S) : w.splice(_, 1), w;
|
|
1078
1088
|
} }));
|
|
1079
1089
|
} };
|
|
@@ -1098,11 +1108,11 @@ let al = $({ name: "Listbox", emits: { "update:modelValue": (e) => !0 }, props:
|
|
|
1098
1108
|
};
|
|
1099
1109
|
}, { immediate: !0 });
|
|
1100
1110
|
}), () => {
|
|
1101
|
-
let { name: x, modelValue: w, disabled: S, form: _, ...
|
|
1102
|
-
return
|
|
1111
|
+
let { name: x, modelValue: w, disabled: S, form: _, ...O } = e, N = { open: n.value === 0, disabled: S, value: h.value };
|
|
1112
|
+
return Oe(be, [...x != null && h.value != null ? un({ [x]: h.value }).map(([re, _e]) => Oe(sn, Jt({ features: dt.Hidden, key: re, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: _, name: re, value: _e }))) : [], z({ ourProps: {}, theirProps: { ...l, ...it(O, ["defaultValue", "onUpdate:modelValue", "horizontal", "multiple", "by"]) }, slot: N, slots: t, attrs: l, name: "Listbox" })]);
|
|
1103
1113
|
};
|
|
1104
1114
|
} });
|
|
1105
|
-
|
|
1115
|
+
A({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: () => `headlessui-listbox-label-${J()}` } }, setup(e, { attrs: t, slots: l }) {
|
|
1106
1116
|
let o = De("ListboxLabel");
|
|
1107
1117
|
function n() {
|
|
1108
1118
|
var r;
|
|
@@ -1113,7 +1123,7 @@ $({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label
|
|
|
1113
1123
|
return z({ ourProps: c, theirProps: u, slot: r, attrs: t, slots: l, name: "ListboxLabel" });
|
|
1114
1124
|
};
|
|
1115
1125
|
} });
|
|
1116
|
-
let sl =
|
|
1126
|
+
let sl = A({ name: "ListboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-listbox-button-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
|
|
1117
1127
|
let n = De("ListboxButton");
|
|
1118
1128
|
o({ el: n.buttonRef, $el: n.buttonRef });
|
|
1119
1129
|
function r(a) {
|
|
@@ -1153,11 +1163,11 @@ let sl = $({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1153
1163
|
let c = at(k(() => ({ as: e.as, type: t.type })), n.buttonRef);
|
|
1154
1164
|
return () => {
|
|
1155
1165
|
var a, s;
|
|
1156
|
-
let d = { open: n.listboxState.value === 0, disabled: n.disabled.value, value: n.value.value }, { id:
|
|
1157
|
-
return z({ ourProps:
|
|
1166
|
+
let d = { open: n.listboxState.value === 0, disabled: n.disabled.value, value: n.value.value }, { id: v, ...f } = e, g = { ref: n.buttonRef, id: v, type: c.value, "aria-haspopup": "listbox", "aria-controls": (a = E(n.optionsRef)) == null ? void 0 : a.id, "aria-expanded": n.listboxState.value === 0, "aria-labelledby": n.labelRef.value ? [(s = E(n.labelRef)) == null ? void 0 : s.id, v].join(" ") : void 0, disabled: n.disabled.value === !0 ? !0 : void 0, onKeydown: r, onKeyup: i, onClick: u };
|
|
1167
|
+
return z({ ourProps: g, theirProps: f, slot: d, attrs: t, slots: l, name: "ListboxButton" });
|
|
1158
1168
|
};
|
|
1159
|
-
} }), ul =
|
|
1160
|
-
let n = De("ListboxOptions"), r =
|
|
1169
|
+
} }), ul = A({ name: "ListboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: () => `headlessui-listbox-options-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
|
|
1170
|
+
let n = De("ListboxOptions"), r = C(null);
|
|
1161
1171
|
o({ el: n.optionsRef, $el: n.optionsRef });
|
|
1162
1172
|
function i(a) {
|
|
1163
1173
|
switch (r.value && clearTimeout(r.value), a.key) {
|
|
@@ -1200,12 +1210,12 @@ let sl = $({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1200
1210
|
}
|
|
1201
1211
|
let u = nn(), c = k(() => u !== null ? (u.value & te.Open) === te.Open : n.listboxState.value === 0);
|
|
1202
1212
|
return () => {
|
|
1203
|
-
var a, s, d,
|
|
1204
|
-
let f = { open: n.listboxState.value === 0 }, { id:
|
|
1205
|
-
return z({ ourProps: h, theirProps:
|
|
1213
|
+
var a, s, d, v;
|
|
1214
|
+
let f = { open: n.listboxState.value === 0 }, { id: g, ...m } = e, h = { "aria-activedescendant": n.activeOptionIndex.value === null || (a = n.options.value[n.activeOptionIndex.value]) == null ? void 0 : a.id, "aria-multiselectable": n.mode.value === 1 ? !0 : void 0, "aria-labelledby": (v = (s = E(n.labelRef)) == null ? void 0 : s.id) != null ? v : (d = E(n.buttonRef)) == null ? void 0 : d.id, "aria-orientation": n.orientation.value, id: g, onKeydown: i, role: "listbox", tabIndex: 0, ref: n.optionsRef };
|
|
1215
|
+
return z({ ourProps: h, theirProps: m, slot: f, attrs: t, slots: l, features: Re.RenderStrategy | Re.Static, visible: c.value, name: "ListboxOptions" });
|
|
1206
1216
|
};
|
|
1207
|
-
} }), cl =
|
|
1208
|
-
let n = De("ListboxOption"), r =
|
|
1217
|
+
} }), cl = A({ name: "ListboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: () => `headlessui-listbox.option-${J()}` } }, setup(e, { slots: t, attrs: l, expose: o }) {
|
|
1218
|
+
let n = De("ListboxOption"), r = C(null);
|
|
1209
1219
|
o({ el: r, $el: r });
|
|
1210
1220
|
let i = k(() => n.activeOptionIndex.value !== null ? n.options.value[n.activeOptionIndex.value].id === e.id : !1), u = k(() => G(n.mode.value, { 0: () => n.compare(X(n.value.value), X(e.value)), 1: () => X(n.value.value).some((b) => n.compare(X(b), X(e.value))) })), c = k(() => G(n.mode.value, { 1: () => {
|
|
1211
1221
|
var b;
|
|
@@ -1236,24 +1246,24 @@ let sl = $({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1236
1246
|
return (y = E(n.buttonRef)) == null ? void 0 : y.focus({ preventScroll: !0 });
|
|
1237
1247
|
}));
|
|
1238
1248
|
}
|
|
1239
|
-
function
|
|
1249
|
+
function v() {
|
|
1240
1250
|
if (e.disabled)
|
|
1241
1251
|
return n.goToOption(L.Nothing);
|
|
1242
1252
|
n.goToOption(L.Specific, e.id);
|
|
1243
1253
|
}
|
|
1244
1254
|
let f = pn();
|
|
1245
|
-
function
|
|
1255
|
+
function g(b) {
|
|
1246
1256
|
f.update(b);
|
|
1247
1257
|
}
|
|
1248
|
-
function
|
|
1258
|
+
function m(b) {
|
|
1249
1259
|
f.wasMoved(b) && (e.disabled || i.value || n.goToOption(L.Specific, e.id, 0));
|
|
1250
1260
|
}
|
|
1251
1261
|
function h(b) {
|
|
1252
1262
|
f.wasMoved(b) && (e.disabled || i.value && n.goToOption(L.Nothing));
|
|
1253
1263
|
}
|
|
1254
1264
|
return () => {
|
|
1255
|
-
let { disabled: b } = e, y = { active: i.value, selected: u.value, disabled: b }, { id: x, value: w, disabled: S, ..._ } = e,
|
|
1256
|
-
return z({ ourProps:
|
|
1265
|
+
let { disabled: b } = e, y = { active: i.value, selected: u.value, disabled: b }, { id: x, value: w, disabled: S, ..._ } = e, O = { id: x, ref: r, role: "option", tabIndex: b === !0 ? void 0 : -1, "aria-disabled": b === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onClick: d, onFocus: v, onPointerenter: g, onMouseenter: g, onPointermove: m, onMousemove: m, onPointerleave: h, onMouseleave: h };
|
|
1266
|
+
return z({ ourProps: O, theirProps: _, slot: y, attrs: l, slots: t, name: "ListboxOption" });
|
|
1257
1267
|
};
|
|
1258
1268
|
} });
|
|
1259
1269
|
var dl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(dl || {}), fl = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(fl || {});
|
|
@@ -1269,42 +1279,42 @@ function Ue(e) {
|
|
|
1269
1279
|
}
|
|
1270
1280
|
return t;
|
|
1271
1281
|
}
|
|
1272
|
-
let ml =
|
|
1273
|
-
let o =
|
|
1274
|
-
function s(
|
|
1275
|
-
let f = c.value !== null ? i.value[c.value] : null,
|
|
1276
|
-
return
|
|
1282
|
+
let ml = A({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: l }) {
|
|
1283
|
+
let o = C(1), n = C(null), r = C(null), i = C([]), u = C(""), c = C(null), a = C(1);
|
|
1284
|
+
function s(v = (f) => f) {
|
|
1285
|
+
let f = c.value !== null ? i.value[c.value] : null, g = ct(v(i.value.slice()), (h) => E(h.dataRef.domRef)), m = f ? g.indexOf(f) : null;
|
|
1286
|
+
return m === -1 && (m = null), { items: g, activeItemIndex: m };
|
|
1277
1287
|
}
|
|
1278
1288
|
let d = { menuState: o, buttonRef: n, itemsRef: r, items: i, searchQuery: u, activeItemIndex: c, activationTrigger: a, closeMenu: () => {
|
|
1279
1289
|
o.value = 1, c.value = null;
|
|
1280
|
-
}, openMenu: () => o.value = 0, goToItem(
|
|
1281
|
-
let
|
|
1282
|
-
u.value = "", c.value = h, a.value =
|
|
1283
|
-
}, search(
|
|
1290
|
+
}, openMenu: () => o.value = 0, goToItem(v, f, g) {
|
|
1291
|
+
let m = s(), h = en(v === L.Specific ? { focus: L.Specific, id: f } : { focus: v }, { resolveItems: () => m.items, resolveActiveIndex: () => m.activeItemIndex, resolveId: (b) => b.id, resolveDisabled: (b) => b.dataRef.disabled });
|
|
1292
|
+
u.value = "", c.value = h, a.value = g ?? 1, i.value = m.items;
|
|
1293
|
+
}, search(v) {
|
|
1284
1294
|
let f = u.value !== "" ? 0 : 1;
|
|
1285
|
-
u.value +=
|
|
1286
|
-
let
|
|
1287
|
-
|
|
1295
|
+
u.value += v.toLowerCase();
|
|
1296
|
+
let g = (c.value !== null ? i.value.slice(c.value + f).concat(i.value.slice(0, c.value + f)) : i.value).find((h) => h.dataRef.textValue.startsWith(u.value) && !h.dataRef.disabled), m = g ? i.value.indexOf(g) : -1;
|
|
1297
|
+
m === -1 || m === c.value || (c.value = m, a.value = 1);
|
|
1288
1298
|
}, clearSearch() {
|
|
1289
1299
|
u.value = "";
|
|
1290
|
-
}, registerItem(
|
|
1291
|
-
let
|
|
1292
|
-
i.value =
|
|
1293
|
-
}, unregisterItem(
|
|
1294
|
-
let f = s((
|
|
1295
|
-
let
|
|
1296
|
-
return
|
|
1300
|
+
}, registerItem(v, f) {
|
|
1301
|
+
let g = s((m) => [...m, { id: v, dataRef: f }]);
|
|
1302
|
+
i.value = g.items, c.value = g.activeItemIndex, a.value = 1;
|
|
1303
|
+
}, unregisterItem(v) {
|
|
1304
|
+
let f = s((g) => {
|
|
1305
|
+
let m = g.findIndex((h) => h.id === v);
|
|
1306
|
+
return m !== -1 && g.splice(m, 1), g;
|
|
1297
1307
|
});
|
|
1298
1308
|
i.value = f.items, c.value = f.activeItemIndex, a.value = 1;
|
|
1299
1309
|
} };
|
|
1300
|
-
return an([n, r], (
|
|
1301
|
-
var
|
|
1302
|
-
d.closeMenu(), ze(f, je.Loose) || (
|
|
1310
|
+
return an([n, r], (v, f) => {
|
|
1311
|
+
var g;
|
|
1312
|
+
d.closeMenu(), ze(f, je.Loose) || (v.preventDefault(), (g = E(n)) == null || g.focus());
|
|
1303
1313
|
}, k(() => o.value === 0)), ye(bn, d), on(k(() => G(o.value, { 0: te.Open, 1: te.Closed }))), () => {
|
|
1304
|
-
let
|
|
1305
|
-
return z({ ourProps: {}, theirProps: e, slot:
|
|
1314
|
+
let v = { open: o.value === 0, close: d.closeMenu };
|
|
1315
|
+
return z({ ourProps: {}, theirProps: e, slot: v, slots: t, attrs: l, name: "Menu" });
|
|
1306
1316
|
};
|
|
1307
|
-
} }), vl =
|
|
1317
|
+
} }), vl = 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 }) {
|
|
1308
1318
|
let n = Ue("MenuButton");
|
|
1309
1319
|
o({ el: n.buttonRef, $el: n.buttonRef });
|
|
1310
1320
|
function r(a) {
|
|
@@ -1344,11 +1354,11 @@ let ml = $({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1344
1354
|
let c = at(k(() => ({ as: e.as, type: t.type })), n.buttonRef);
|
|
1345
1355
|
return () => {
|
|
1346
1356
|
var a;
|
|
1347
|
-
let s = { open: n.menuState.value === 0 }, { id: d, ...
|
|
1348
|
-
return z({ ourProps: f, theirProps:
|
|
1357
|
+
let s = { open: n.menuState.value === 0 }, { id: d, ...v } = e, f = { ref: n.buttonRef, id: d, type: c.value, "aria-haspopup": "menu", "aria-controls": (a = E(n.itemsRef)) == null ? void 0 : a.id, "aria-expanded": n.menuState.value === 0, onKeydown: r, onKeyup: i, onClick: u };
|
|
1358
|
+
return z({ ourProps: f, theirProps: v, slot: s, attrs: t, slots: l, name: "MenuButton" });
|
|
1349
1359
|
};
|
|
1350
|
-
} }), gl =
|
|
1351
|
-
let n = Ue("MenuItems"), r =
|
|
1360
|
+
} }), gl = A({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: () => `headlessui-menu-items-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
|
|
1361
|
+
let n = Ue("MenuItems"), r = C(null);
|
|
1352
1362
|
o({ el: n.itemsRef, $el: n.itemsRef }), zo({ container: k(() => E(n.itemsRef)), enabled: k(() => n.menuState.value === 0), accept(s) {
|
|
1353
1363
|
return s.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : s.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1354
1364
|
}, walk(s) {
|
|
@@ -1362,8 +1372,8 @@ let ml = $({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1362
1372
|
return s.preventDefault(), s.stopPropagation(), n.search(s.key);
|
|
1363
1373
|
case D.Enter:
|
|
1364
1374
|
if (s.preventDefault(), s.stopPropagation(), n.activeItemIndex.value !== null) {
|
|
1365
|
-
let
|
|
1366
|
-
(d = E(
|
|
1375
|
+
let v = n.items.value[n.activeItemIndex.value];
|
|
1376
|
+
(d = E(v.dataRef.domRef)) == null || d.click();
|
|
1367
1377
|
}
|
|
1368
1378
|
n.closeMenu(), rn(E(n.buttonRef));
|
|
1369
1379
|
break;
|
|
@@ -1379,8 +1389,8 @@ let ml = $({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1379
1389
|
return s.preventDefault(), s.stopPropagation(), n.goToItem(L.Last);
|
|
1380
1390
|
case D.Escape:
|
|
1381
1391
|
s.preventDefault(), s.stopPropagation(), n.closeMenu(), j(() => {
|
|
1382
|
-
var
|
|
1383
|
-
return (
|
|
1392
|
+
var v;
|
|
1393
|
+
return (v = E(n.buttonRef)) == null ? void 0 : v.focus({ preventScroll: !0 });
|
|
1384
1394
|
});
|
|
1385
1395
|
break;
|
|
1386
1396
|
case D.Tab:
|
|
@@ -1401,24 +1411,24 @@ let ml = $({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1401
1411
|
let c = nn(), a = k(() => c !== null ? (c.value & te.Open) === te.Open : n.menuState.value === 0);
|
|
1402
1412
|
return () => {
|
|
1403
1413
|
var s, d;
|
|
1404
|
-
let
|
|
1405
|
-
return z({ ourProps:
|
|
1414
|
+
let v = { open: n.menuState.value === 0 }, { id: f, ...g } = e, m = { "aria-activedescendant": n.activeItemIndex.value === null || (s = n.items.value[n.activeItemIndex.value]) == null ? void 0 : s.id, "aria-labelledby": (d = E(n.buttonRef)) == null ? void 0 : d.id, id: f, onKeydown: i, onKeyup: u, role: "menu", tabIndex: 0, ref: n.itemsRef };
|
|
1415
|
+
return z({ ourProps: m, theirProps: g, slot: v, attrs: t, slots: l, features: Re.RenderStrategy | Re.Static, visible: a.value, name: "MenuItems" });
|
|
1406
1416
|
};
|
|
1407
|
-
} }), bl =
|
|
1408
|
-
let n = Ue("MenuItem"), r =
|
|
1417
|
+
} }), bl = A({ name: "MenuItem", inheritAttrs: !1, props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: () => `headlessui-menu-item-${J()}` } }, setup(e, { slots: t, attrs: l, expose: o }) {
|
|
1418
|
+
let n = Ue("MenuItem"), r = C(null);
|
|
1409
1419
|
o({ el: r, $el: r });
|
|
1410
1420
|
let i = k(() => n.activeItemIndex.value !== null ? n.items.value[n.activeItemIndex.value].id === e.id : !1), u = vn(r), c = k(() => ({ disabled: e.disabled, get textValue() {
|
|
1411
1421
|
return u();
|
|
1412
1422
|
}, domRef: r }));
|
|
1413
1423
|
ee(() => n.registerItem(e.id, c)), Ne(() => n.unregisterItem(e.id)), xe(() => {
|
|
1414
1424
|
n.menuState.value === 0 && i.value && n.activationTrigger.value !== 0 && j(() => {
|
|
1415
|
-
var
|
|
1416
|
-
return (h = (
|
|
1425
|
+
var m, h;
|
|
1426
|
+
return (h = (m = E(r)) == null ? void 0 : m.scrollIntoView) == null ? void 0 : h.call(m, { block: "nearest" });
|
|
1417
1427
|
});
|
|
1418
1428
|
});
|
|
1419
|
-
function a(
|
|
1429
|
+
function a(m) {
|
|
1420
1430
|
if (e.disabled)
|
|
1421
|
-
return
|
|
1431
|
+
return m.preventDefault();
|
|
1422
1432
|
n.closeMenu(), rn(E(n.buttonRef));
|
|
1423
1433
|
}
|
|
1424
1434
|
function s() {
|
|
@@ -1427,18 +1437,18 @@ let ml = $({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1427
1437
|
n.goToItem(L.Specific, e.id);
|
|
1428
1438
|
}
|
|
1429
1439
|
let d = pn();
|
|
1430
|
-
function m
|
|
1431
|
-
d.update(
|
|
1440
|
+
function v(m) {
|
|
1441
|
+
d.update(m);
|
|
1432
1442
|
}
|
|
1433
|
-
function f(
|
|
1434
|
-
d.wasMoved(
|
|
1443
|
+
function f(m) {
|
|
1444
|
+
d.wasMoved(m) && (e.disabled || i.value || n.goToItem(L.Specific, e.id, 0));
|
|
1435
1445
|
}
|
|
1436
|
-
function
|
|
1437
|
-
d.wasMoved(
|
|
1446
|
+
function g(m) {
|
|
1447
|
+
d.wasMoved(m) && (e.disabled || i.value && n.goToItem(L.Nothing));
|
|
1438
1448
|
}
|
|
1439
1449
|
return () => {
|
|
1440
|
-
let { disabled:
|
|
1441
|
-
return z({ ourProps: { id: b, ref: r, role: "menuitem", tabIndex:
|
|
1450
|
+
let { disabled: m } = e, h = { active: i.value, disabled: m, close: n.closeMenu }, { id: b, ...y } = e;
|
|
1451
|
+
return z({ ourProps: { id: b, ref: r, role: "menuitem", tabIndex: m === !0 ? void 0 : -1, "aria-disabled": m === !0 ? !0 : void 0, disabled: void 0, onClick: a, onFocus: s, onPointerenter: v, onMouseenter: v, onPointermove: f, onMousemove: f, onPointerleave: g, onMouseleave: g }, theirProps: { ...l, ...y }, slot: h, attrs: l, slots: t, name: "MenuItem" });
|
|
1442
1452
|
};
|
|
1443
1453
|
} }), hn = Symbol("LabelContext");
|
|
1444
1454
|
function yn() {
|
|
@@ -1450,7 +1460,7 @@ function yn() {
|
|
|
1450
1460
|
return e;
|
|
1451
1461
|
}
|
|
1452
1462
|
function hl({ slot: e = {}, name: t = "Label", props: l = {} } = {}) {
|
|
1453
|
-
let o =
|
|
1463
|
+
let o = C([]);
|
|
1454
1464
|
function n(r) {
|
|
1455
1465
|
return o.value.push(r), () => {
|
|
1456
1466
|
let i = o.value.indexOf(r);
|
|
@@ -1459,16 +1469,16 @@ function hl({ slot: e = {}, name: t = "Label", props: l = {} } = {}) {
|
|
|
1459
1469
|
}
|
|
1460
1470
|
return ye(hn, { register: n, slot: e, name: t, props: l }), k(() => o.value.length > 0 ? o.value.join(" ") : void 0);
|
|
1461
1471
|
}
|
|
1462
|
-
|
|
1472
|
+
A({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: !1 }, id: { type: String, default: () => `headlessui-label-${J()}` } }, setup(e, { slots: t, attrs: l }) {
|
|
1463
1473
|
let o = yn();
|
|
1464
1474
|
return ee(() => Ne(o.register(e.id))), () => {
|
|
1465
|
-
let { name: n = "Label", slot: r = {}, props: i = {} } = o, { id: u, passive: c, ...a } = e, s = { ...Object.entries(i).reduce((d, [
|
|
1475
|
+
let { name: n = "Label", slot: r = {}, props: i = {} } = o, { id: u, passive: c, ...a } = e, s = { ...Object.entries(i).reduce((d, [v, f]) => Object.assign(d, { [v]: P(f) }), {}), id: u };
|
|
1466
1476
|
return c && (delete s.onClick, delete s.htmlFor, delete a.onClick), z({ ourProps: s, theirProps: a, slot: r, attrs: l, slots: t, name: n });
|
|
1467
1477
|
};
|
|
1468
1478
|
} });
|
|
1469
1479
|
let xn = Symbol("GroupContext");
|
|
1470
|
-
|
|
1471
|
-
let o =
|
|
1480
|
+
A({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: l }) {
|
|
1481
|
+
let o = C(null), n = hl({ name: "SwitchLabel", props: { htmlFor: k(() => {
|
|
1472
1482
|
var i;
|
|
1473
1483
|
return (i = o.value) == null ? void 0 : i.id;
|
|
1474
1484
|
}), onClick(i) {
|
|
@@ -1476,44 +1486,44 @@ $({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "templa
|
|
|
1476
1486
|
} } }), r = el({ name: "SwitchDescription" });
|
|
1477
1487
|
return ye(xn, { switchRef: o, labelledby: n, describedby: r }), () => z({ theirProps: e, ourProps: {}, slot: {}, slots: t, attrs: l, name: "SwitchGroup" });
|
|
1478
1488
|
} });
|
|
1479
|
-
let yl =
|
|
1489
|
+
let yl = A({ name: "Switch", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: void 0 }, defaultChecked: { type: Boolean, optional: !0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, value: { type: String, optional: !0 }, id: { type: String, default: () => `headlessui-switch-${J()}` } }, inheritAttrs: !1, setup(e, { emit: t, attrs: l, slots: o, expose: n }) {
|
|
1480
1490
|
let r = he(xn, null), [i, u] = fn(k(() => e.modelValue), (h) => t("update:modelValue", h), k(() => e.defaultChecked));
|
|
1481
1491
|
function c() {
|
|
1482
1492
|
u(!i.value);
|
|
1483
1493
|
}
|
|
1484
|
-
let a =
|
|
1494
|
+
let a = C(null), s = r === null ? a : r.switchRef, d = at(k(() => ({ as: e.as, type: l.type })), s);
|
|
1485
1495
|
n({ el: s, $el: s });
|
|
1486
|
-
function
|
|
1496
|
+
function v(h) {
|
|
1487
1497
|
h.preventDefault(), c();
|
|
1488
1498
|
}
|
|
1489
1499
|
function f(h) {
|
|
1490
1500
|
h.key === D.Space ? (h.preventDefault(), c()) : h.key === D.Enter && Zo(h.currentTarget);
|
|
1491
1501
|
}
|
|
1492
|
-
function
|
|
1502
|
+
function g(h) {
|
|
1493
1503
|
h.preventDefault();
|
|
1494
1504
|
}
|
|
1495
|
-
let
|
|
1505
|
+
let m = k(() => {
|
|
1496
1506
|
var h, b;
|
|
1497
1507
|
return (b = (h = E(s)) == null ? void 0 : h.closest) == null ? void 0 : b.call(h, "form");
|
|
1498
1508
|
});
|
|
1499
1509
|
return ee(() => {
|
|
1500
|
-
Q([
|
|
1501
|
-
if (!
|
|
1510
|
+
Q([m], () => {
|
|
1511
|
+
if (!m.value || e.defaultChecked === void 0)
|
|
1502
1512
|
return;
|
|
1503
1513
|
function h() {
|
|
1504
1514
|
u(e.defaultChecked);
|
|
1505
1515
|
}
|
|
1506
|
-
return
|
|
1516
|
+
return m.value.addEventListener("reset", h), () => {
|
|
1507
1517
|
var b;
|
|
1508
|
-
(b =
|
|
1518
|
+
(b = m.value) == null || b.removeEventListener("reset", h);
|
|
1509
1519
|
};
|
|
1510
1520
|
}, { immediate: !0 });
|
|
1511
1521
|
}), () => {
|
|
1512
|
-
let { id: h, name: b, value: y, form: x, ...w } = e, S = { checked: i.value }, _ = { id: h, ref: s, role: "switch", type: d.value, tabIndex: 0, "aria-checked": i.value, "aria-labelledby": r == null ? void 0 : r.labelledby.value, "aria-describedby": r == null ? void 0 : r.describedby.value, onClick:
|
|
1513
|
-
return
|
|
1522
|
+
let { id: h, name: b, value: y, form: x, ...w } = e, S = { checked: i.value }, _ = { id: h, ref: s, role: "switch", type: d.value, tabIndex: 0, "aria-checked": i.value, "aria-labelledby": r == null ? void 0 : r.labelledby.value, "aria-describedby": r == null ? void 0 : r.describedby.value, onClick: v, onKeyup: f, onKeypress: g };
|
|
1523
|
+
return Oe(be, [b != null && i.value != null ? Oe(sn, Jt({ features: dt.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: i.value, form: x, name: b, value: y })) : null, z({ ourProps: _, theirProps: { ...l, ...it(w, ["modelValue", "defaultChecked"]) }, slot: S, attrs: l, slots: o, name: "Switch" })]);
|
|
1514
1524
|
};
|
|
1515
1525
|
} });
|
|
1516
|
-
const
|
|
1526
|
+
const $e = Math.min, ue = Math.max, Me = Math.round, Ie = Math.floor, ae = (e) => ({
|
|
1517
1527
|
x: e,
|
|
1518
1528
|
y: e
|
|
1519
1529
|
}), xl = {
|
|
@@ -1526,7 +1536,7 @@ const Ae = Math.min, ue = Math.max, Me = Math.round, Ie = Math.floor, ae = (e) =
|
|
|
1526
1536
|
end: "start"
|
|
1527
1537
|
};
|
|
1528
1538
|
function Lt(e, t, l) {
|
|
1529
|
-
return ue(e,
|
|
1539
|
+
return ue(e, $e(t, l));
|
|
1530
1540
|
}
|
|
1531
1541
|
function He(e, t) {
|
|
1532
1542
|
return typeof e == "function" ? e(t) : e;
|
|
@@ -1562,7 +1572,7 @@ function Sl(e) {
|
|
|
1562
1572
|
function nt(e) {
|
|
1563
1573
|
return e.replace(/start|end/g, (t) => wl[t]);
|
|
1564
1574
|
}
|
|
1565
|
-
function
|
|
1575
|
+
function Cl(e, t, l) {
|
|
1566
1576
|
const o = ["left", "right"], n = ["right", "left"], r = ["top", "bottom"], i = ["bottom", "top"];
|
|
1567
1577
|
switch (e) {
|
|
1568
1578
|
case "top":
|
|
@@ -1575,9 +1585,9 @@ function Ol(e, t, l) {
|
|
|
1575
1585
|
return [];
|
|
1576
1586
|
}
|
|
1577
1587
|
}
|
|
1578
|
-
function
|
|
1588
|
+
function Ol(e, t, l, o) {
|
|
1579
1589
|
const n = We(e);
|
|
1580
|
-
let r =
|
|
1590
|
+
let r = Cl(ce(e), l === "start", o);
|
|
1581
1591
|
return n && (r = r.map((i) => i + "-" + n), t && (r = r.concat(r.map(nt)))), r;
|
|
1582
1592
|
}
|
|
1583
1593
|
function Ve(e) {
|
|
@@ -1614,7 +1624,7 @@ function It(e, t, l) {
|
|
|
1614
1624
|
reference: o,
|
|
1615
1625
|
floating: n
|
|
1616
1626
|
} = e;
|
|
1617
|
-
const r = Ke(t), i = Sn(t), u = kn(i), c = ce(t), a = r === "y", s = o.x + o.width / 2 - n.width / 2, d = o.y + o.height / 2 - n.height / 2,
|
|
1627
|
+
const r = Ke(t), i = Sn(t), u = kn(i), c = ce(t), a = r === "y", s = o.x + o.width / 2 - n.width / 2, d = o.y + o.height / 2 - n.height / 2, v = o[u] / 2 - n[u] / 2;
|
|
1618
1628
|
let f;
|
|
1619
1629
|
switch (c) {
|
|
1620
1630
|
case "top":
|
|
@@ -1649,10 +1659,10 @@ function It(e, t, l) {
|
|
|
1649
1659
|
}
|
|
1650
1660
|
switch (We(t)) {
|
|
1651
1661
|
case "start":
|
|
1652
|
-
f[i] -=
|
|
1662
|
+
f[i] -= v * (l && a ? -1 : 1);
|
|
1653
1663
|
break;
|
|
1654
1664
|
case "end":
|
|
1655
|
-
f[i] +=
|
|
1665
|
+
f[i] += v * (l && a ? -1 : 1);
|
|
1656
1666
|
break;
|
|
1657
1667
|
}
|
|
1658
1668
|
return f;
|
|
@@ -1671,12 +1681,12 @@ const Dl = async (e, t, l) => {
|
|
|
1671
1681
|
}), {
|
|
1672
1682
|
x: s,
|
|
1673
1683
|
y: d
|
|
1674
|
-
} = It(a, o, c),
|
|
1675
|
-
for (let
|
|
1684
|
+
} = It(a, o, c), v = o, f = {}, g = 0;
|
|
1685
|
+
for (let m = 0; m < u.length; m++) {
|
|
1676
1686
|
const {
|
|
1677
1687
|
name: h,
|
|
1678
1688
|
fn: b
|
|
1679
|
-
} = u[
|
|
1689
|
+
} = u[m], {
|
|
1680
1690
|
x: y,
|
|
1681
1691
|
y: x,
|
|
1682
1692
|
data: w,
|
|
@@ -1685,7 +1695,7 @@ const Dl = async (e, t, l) => {
|
|
|
1685
1695
|
x: s,
|
|
1686
1696
|
y: d,
|
|
1687
1697
|
initialPlacement: o,
|
|
1688
|
-
placement:
|
|
1698
|
+
placement: v,
|
|
1689
1699
|
strategy: n,
|
|
1690
1700
|
middlewareData: f,
|
|
1691
1701
|
rects: a,
|
|
@@ -1701,27 +1711,27 @@ const Dl = async (e, t, l) => {
|
|
|
1701
1711
|
...f[h],
|
|
1702
1712
|
...w
|
|
1703
1713
|
}
|
|
1704
|
-
}, S &&
|
|
1705
|
-
|
|
1714
|
+
}, S && g <= 50) {
|
|
1715
|
+
g++, typeof S == "object" && (S.placement && (v = S.placement), S.rects && (a = S.rects === !0 ? await i.getElementRects({
|
|
1706
1716
|
reference: e,
|
|
1707
1717
|
floating: t,
|
|
1708
1718
|
strategy: n
|
|
1709
1719
|
}) : S.rects), {
|
|
1710
1720
|
x: s,
|
|
1711
1721
|
y: d
|
|
1712
|
-
} = It(a,
|
|
1722
|
+
} = It(a, v, c)), m = -1;
|
|
1713
1723
|
continue;
|
|
1714
1724
|
}
|
|
1715
1725
|
}
|
|
1716
1726
|
return {
|
|
1717
1727
|
x: s,
|
|
1718
1728
|
y: d,
|
|
1719
|
-
placement:
|
|
1729
|
+
placement: v,
|
|
1720
1730
|
strategy: n,
|
|
1721
1731
|
middlewareData: f
|
|
1722
1732
|
};
|
|
1723
1733
|
};
|
|
1724
|
-
async function
|
|
1734
|
+
async function Cn(e, t) {
|
|
1725
1735
|
var l;
|
|
1726
1736
|
t === void 0 && (t = {});
|
|
1727
1737
|
const {
|
|
@@ -1735,9 +1745,9 @@ async function On(e, t) {
|
|
|
1735
1745
|
boundary: a = "clippingAncestors",
|
|
1736
1746
|
rootBoundary: s = "viewport",
|
|
1737
1747
|
elementContext: d = "floating",
|
|
1738
|
-
altBoundary:
|
|
1748
|
+
altBoundary: v = !1,
|
|
1739
1749
|
padding: f = 0
|
|
1740
|
-
} = He(t, e),
|
|
1750
|
+
} = He(t, e), g = El(f), h = u[v ? d === "floating" ? "reference" : "floating" : d], b = Fe(await r.getClippingRect({
|
|
1741
1751
|
element: (l = await (r.isElement == null ? void 0 : r.isElement(h))) == null || l ? h : h.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(u.floating)),
|
|
1742
1752
|
boundary: a,
|
|
1743
1753
|
rootBoundary: s,
|
|
@@ -1758,10 +1768,10 @@ async function On(e, t) {
|
|
|
1758
1768
|
strategy: c
|
|
1759
1769
|
}) : y);
|
|
1760
1770
|
return {
|
|
1761
|
-
top: (b.top - S.top +
|
|
1762
|
-
bottom: (S.bottom - b.bottom +
|
|
1763
|
-
left: (b.left - S.left +
|
|
1764
|
-
right: (S.right - b.right +
|
|
1771
|
+
top: (b.top - S.top + g.top) / w.y,
|
|
1772
|
+
bottom: (S.bottom - b.bottom + g.bottom) / w.y,
|
|
1773
|
+
left: (b.left - S.left + g.left) / w.x,
|
|
1774
|
+
right: (S.right - b.right + g.right) / w.x
|
|
1765
1775
|
};
|
|
1766
1776
|
}
|
|
1767
1777
|
const Pl = function(e) {
|
|
@@ -1780,26 +1790,26 @@ const Pl = function(e) {
|
|
|
1780
1790
|
} = t, {
|
|
1781
1791
|
mainAxis: s = !0,
|
|
1782
1792
|
crossAxis: d = !0,
|
|
1783
|
-
fallbackPlacements:
|
|
1793
|
+
fallbackPlacements: v,
|
|
1784
1794
|
fallbackStrategy: f = "bestFit",
|
|
1785
|
-
fallbackAxisSideDirection:
|
|
1786
|
-
flipAlignment:
|
|
1795
|
+
fallbackAxisSideDirection: g = "none",
|
|
1796
|
+
flipAlignment: m = !0,
|
|
1787
1797
|
...h
|
|
1788
1798
|
} = He(e, t);
|
|
1789
1799
|
if ((l = r.arrow) != null && l.alignmentOffset)
|
|
1790
1800
|
return {};
|
|
1791
|
-
const b = ce(n), y = ce(u) === u, x = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), w =
|
|
1792
|
-
!
|
|
1793
|
-
const S = [u, ...w], _ = await
|
|
1801
|
+
const b = ce(n), y = ce(u) === u, x = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), w = v || (y || !m ? [Ve(u)] : Sl(u));
|
|
1802
|
+
!v && g !== "none" && w.push(...Ol(u, m, g, x));
|
|
1803
|
+
const S = [u, ...w], _ = await Cn(t, h), O = [];
|
|
1794
1804
|
let N = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
1795
|
-
if (s &&
|
|
1805
|
+
if (s && O.push(_[b]), d) {
|
|
1796
1806
|
const se = kl(n, i, x);
|
|
1797
|
-
|
|
1807
|
+
O.push(_[se[0]], _[se[1]]);
|
|
1798
1808
|
}
|
|
1799
1809
|
if (N = [...N, {
|
|
1800
1810
|
placement: n,
|
|
1801
|
-
overflows:
|
|
1802
|
-
}], !
|
|
1811
|
+
overflows: O
|
|
1812
|
+
}], !O.every((se) => se <= 0)) {
|
|
1803
1813
|
var re, _e;
|
|
1804
1814
|
const se = (((re = r.flip) == null ? void 0 : re.index) || 0) + 1, bt = S[se];
|
|
1805
1815
|
if (bt)
|
|
@@ -1843,9 +1853,9 @@ async function _l(e, t) {
|
|
|
1843
1853
|
elements: n
|
|
1844
1854
|
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(n.floating)), i = ce(l), u = We(l), c = Ke(l) === "y", a = ["left", "top"].includes(i) ? -1 : 1, s = r && c ? -1 : 1, d = He(t, e);
|
|
1845
1855
|
let {
|
|
1846
|
-
mainAxis:
|
|
1856
|
+
mainAxis: v,
|
|
1847
1857
|
crossAxis: f,
|
|
1848
|
-
alignmentAxis:
|
|
1858
|
+
alignmentAxis: g
|
|
1849
1859
|
} = typeof d == "number" ? {
|
|
1850
1860
|
mainAxis: d,
|
|
1851
1861
|
crossAxis: 0,
|
|
@@ -1856,11 +1866,11 @@ async function _l(e, t) {
|
|
|
1856
1866
|
alignmentAxis: null,
|
|
1857
1867
|
...d
|
|
1858
1868
|
};
|
|
1859
|
-
return u && typeof
|
|
1869
|
+
return u && typeof g == "number" && (f = u === "end" ? g * -1 : g), c ? {
|
|
1860
1870
|
x: f * s,
|
|
1861
|
-
y:
|
|
1871
|
+
y: v * a
|
|
1862
1872
|
} : {
|
|
1863
|
-
x:
|
|
1873
|
+
x: v * a,
|
|
1864
1874
|
y: f * s
|
|
1865
1875
|
};
|
|
1866
1876
|
}
|
|
@@ -1914,26 +1924,26 @@ const Tl = function(e) {
|
|
|
1914
1924
|
} = He(e, t), a = {
|
|
1915
1925
|
x: l,
|
|
1916
1926
|
y: o
|
|
1917
|
-
}, s = await
|
|
1918
|
-
let f = a[
|
|
1927
|
+
}, s = await Cn(t, c), d = Ke(ce(n)), v = wn(d);
|
|
1928
|
+
let f = a[v], g = a[d];
|
|
1919
1929
|
if (r) {
|
|
1920
|
-
const h =
|
|
1930
|
+
const h = v === "y" ? "top" : "left", b = v === "y" ? "bottom" : "right", y = f + s[h], x = f - s[b];
|
|
1921
1931
|
f = Lt(y, f, x);
|
|
1922
1932
|
}
|
|
1923
1933
|
if (i) {
|
|
1924
|
-
const h = d === "y" ? "top" : "left", b = d === "y" ? "bottom" : "right", y =
|
|
1925
|
-
|
|
1934
|
+
const h = d === "y" ? "top" : "left", b = d === "y" ? "bottom" : "right", y = g + s[h], x = g - s[b];
|
|
1935
|
+
g = Lt(y, g, x);
|
|
1926
1936
|
}
|
|
1927
|
-
const
|
|
1937
|
+
const m = u.fn({
|
|
1928
1938
|
...t,
|
|
1929
|
-
[
|
|
1930
|
-
[d]:
|
|
1939
|
+
[v]: f,
|
|
1940
|
+
[d]: g
|
|
1931
1941
|
});
|
|
1932
1942
|
return {
|
|
1933
|
-
...
|
|
1943
|
+
...m,
|
|
1934
1944
|
data: {
|
|
1935
|
-
x:
|
|
1936
|
-
y:
|
|
1945
|
+
x: m.x - l,
|
|
1946
|
+
y: m.y - o
|
|
1937
1947
|
}
|
|
1938
1948
|
};
|
|
1939
1949
|
}
|
|
@@ -1959,7 +1969,7 @@ function oe(e) {
|
|
|
1959
1969
|
function Z(e) {
|
|
1960
1970
|
return e instanceof HTMLElement || e instanceof H(e).HTMLElement;
|
|
1961
1971
|
}
|
|
1962
|
-
function
|
|
1972
|
+
function At(e) {
|
|
1963
1973
|
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof H(e).ShadowRoot;
|
|
1964
1974
|
}
|
|
1965
1975
|
function Pe(e) {
|
|
@@ -1978,7 +1988,7 @@ function pt(e) {
|
|
|
1978
1988
|
const t = mt(), l = q(e);
|
|
1979
1989
|
return l.transform !== "none" || l.perspective !== "none" || (l.containerType ? l.containerType !== "normal" : !1) || !t && (l.backdropFilter ? l.backdropFilter !== "none" : !1) || !t && (l.filter ? l.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (l.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (l.contain || "").includes(o));
|
|
1980
1990
|
}
|
|
1981
|
-
function
|
|
1991
|
+
function Al(e) {
|
|
1982
1992
|
let t = ge(e);
|
|
1983
1993
|
for (; Z(t) && !Ge(t); ) {
|
|
1984
1994
|
if (pt(t))
|
|
@@ -2012,19 +2022,19 @@ function ge(e) {
|
|
|
2012
2022
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
2013
2023
|
e.assignedSlot || // DOM Element detected.
|
|
2014
2024
|
e.parentNode || // ShadowRoot detected.
|
|
2015
|
-
|
|
2025
|
+
At(e) && e.host || // Fallback.
|
|
2016
2026
|
le(e)
|
|
2017
2027
|
);
|
|
2018
|
-
return
|
|
2028
|
+
return At(t) ? t.host : t;
|
|
2019
2029
|
}
|
|
2020
|
-
function
|
|
2030
|
+
function On(e) {
|
|
2021
2031
|
const t = ge(e);
|
|
2022
|
-
return Ge(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Z(t) && Pe(t) ? t :
|
|
2032
|
+
return Ge(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Z(t) && Pe(t) ? t : On(t);
|
|
2023
2033
|
}
|
|
2024
2034
|
function Ee(e, t, l) {
|
|
2025
2035
|
var o;
|
|
2026
2036
|
t === void 0 && (t = []), l === void 0 && (l = !0);
|
|
2027
|
-
const n =
|
|
2037
|
+
const n = On(e), r = n === ((o = e.ownerDocument) == null ? void 0 : o.body), i = H(n);
|
|
2028
2038
|
return r ? t.concat(i, i.visualViewport || [], Pe(n) ? n : [], i.frameElement && l ? Ee(i.frameElement) : []) : t.concat(n, Ee(n, [], l));
|
|
2029
2039
|
}
|
|
2030
2040
|
function Rn(e) {
|
|
@@ -2055,10 +2065,10 @@ function ve(e) {
|
|
|
2055
2065
|
y: u
|
|
2056
2066
|
};
|
|
2057
2067
|
}
|
|
2058
|
-
const
|
|
2068
|
+
const $l = /* @__PURE__ */ ae(0);
|
|
2059
2069
|
function En(e) {
|
|
2060
2070
|
const t = H(e);
|
|
2061
|
-
return !mt() || !t.visualViewport ?
|
|
2071
|
+
return !mt() || !t.visualViewport ? $l : {
|
|
2062
2072
|
x: t.visualViewport.offsetLeft,
|
|
2063
2073
|
y: t.visualViewport.offsetTop
|
|
2064
2074
|
};
|
|
@@ -2074,11 +2084,11 @@ function de(e, t, l, o) {
|
|
|
2074
2084
|
const u = Ml(r, l, o) ? En(r) : ae(0);
|
|
2075
2085
|
let c = (n.left + u.x) / i.x, a = (n.top + u.y) / i.y, s = n.width / i.x, d = n.height / i.y;
|
|
2076
2086
|
if (r) {
|
|
2077
|
-
const
|
|
2078
|
-
let
|
|
2079
|
-
for (;
|
|
2080
|
-
const
|
|
2081
|
-
c *=
|
|
2087
|
+
const v = H(r), f = o && oe(o) ? H(o) : o;
|
|
2088
|
+
let g = v.frameElement;
|
|
2089
|
+
for (; g && o && f !== v; ) {
|
|
2090
|
+
const m = ve(g), h = g.getBoundingClientRect(), b = q(g), y = h.left + (g.clientLeft + parseFloat(b.paddingLeft)) * m.x, x = h.top + (g.clientTop + parseFloat(b.paddingTop)) * m.y;
|
|
2091
|
+
c *= m.x, a *= m.y, s *= m.x, d *= m.y, c += y, a += x, g = H(g).frameElement;
|
|
2082
2092
|
}
|
|
2083
2093
|
}
|
|
2084
2094
|
return Fe({
|
|
@@ -2154,7 +2164,7 @@ function jl(e, t) {
|
|
|
2154
2164
|
y: a
|
|
2155
2165
|
};
|
|
2156
2166
|
}
|
|
2157
|
-
function
|
|
2167
|
+
function $t(e, t, l) {
|
|
2158
2168
|
let o;
|
|
2159
2169
|
if (t === "viewport")
|
|
2160
2170
|
o = Bl(e, l);
|
|
@@ -2197,9 +2207,9 @@ function Ul(e) {
|
|
|
2197
2207
|
strategy: n
|
|
2198
2208
|
} = e;
|
|
2199
2209
|
const i = [...l === "clippingAncestors" ? zl(t, this._c) : [].concat(l), o], u = i[0], c = i.reduce((a, s) => {
|
|
2200
|
-
const d =
|
|
2201
|
-
return a.top = ue(d.top, a.top), a.right =
|
|
2202
|
-
},
|
|
2210
|
+
const d = $t(t, s, n);
|
|
2211
|
+
return a.top = ue(d.top, a.top), a.right = $e(d.right, a.right), a.bottom = $e(d.bottom, a.bottom), a.left = ue(d.left, a.left), a;
|
|
2212
|
+
}, $t(t, u, n));
|
|
2203
2213
|
return {
|
|
2204
2214
|
width: c.right - c.left,
|
|
2205
2215
|
height: c.bottom - c.top,
|
|
@@ -2247,7 +2257,7 @@ function _n(e, t) {
|
|
|
2247
2257
|
let o = Mt(e, t);
|
|
2248
2258
|
for (; o && Il(o) && q(o).position === "static"; )
|
|
2249
2259
|
o = Mt(o, t);
|
|
2250
|
-
return o && (ne(o) === "html" || ne(o) === "body" && q(o).position === "static" && !pt(o)) ? l : o ||
|
|
2260
|
+
return o && (ne(o) === "html" || ne(o) === "body" && q(o).position === "static" && !pt(o)) ? l : o || Al(e) || l;
|
|
2251
2261
|
}
|
|
2252
2262
|
const Kl = async function(e) {
|
|
2253
2263
|
let {
|
|
@@ -2292,13 +2302,13 @@ function Xl(e, t) {
|
|
|
2292
2302
|
left: a,
|
|
2293
2303
|
top: s,
|
|
2294
2304
|
width: d,
|
|
2295
|
-
height:
|
|
2305
|
+
height: v
|
|
2296
2306
|
} = e.getBoundingClientRect();
|
|
2297
|
-
if (u || t(), !d || !
|
|
2307
|
+
if (u || t(), !d || !v)
|
|
2298
2308
|
return;
|
|
2299
|
-
const f = Ie(s),
|
|
2300
|
-
rootMargin: -f + "px " + -
|
|
2301
|
-
threshold: ue(0,
|
|
2309
|
+
const f = Ie(s), g = Ie(n.clientWidth - (a + d)), m = Ie(n.clientHeight - (s + v)), h = Ie(a), y = {
|
|
2310
|
+
rootMargin: -f + "px " + -g + "px " + -m + "px " + -h + "px",
|
|
2311
|
+
threshold: ue(0, $e(1, c)) || 1
|
|
2302
2312
|
};
|
|
2303
2313
|
let x = !0;
|
|
2304
2314
|
function w(S) {
|
|
@@ -2340,23 +2350,23 @@ function Yl(e, t, l, o) {
|
|
|
2340
2350
|
}), r && b.addEventListener("resize", l);
|
|
2341
2351
|
});
|
|
2342
2352
|
const d = a && u ? Xl(a, l) : null;
|
|
2343
|
-
let
|
|
2353
|
+
let v = -1, f = null;
|
|
2344
2354
|
i && (f = new ResizeObserver((b) => {
|
|
2345
2355
|
let [y] = b;
|
|
2346
|
-
y && y.target === a && f && (f.unobserve(t), cancelAnimationFrame(
|
|
2356
|
+
y && y.target === a && f && (f.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
|
|
2347
2357
|
f && f.observe(t);
|
|
2348
2358
|
})), l();
|
|
2349
2359
|
}), a && !c && f.observe(a), f.observe(t));
|
|
2350
|
-
let
|
|
2360
|
+
let g, m = c ? de(e) : null;
|
|
2351
2361
|
c && h();
|
|
2352
2362
|
function h() {
|
|
2353
2363
|
const b = de(e);
|
|
2354
|
-
|
|
2364
|
+
m && (b.x !== m.x || b.y !== m.y || b.width !== m.width || b.height !== m.height) && l(), m = b, g = requestAnimationFrame(h);
|
|
2355
2365
|
}
|
|
2356
2366
|
return l(), () => {
|
|
2357
2367
|
s.forEach((b) => {
|
|
2358
2368
|
n && b.removeEventListener("scroll", l), r && b.removeEventListener("resize", l);
|
|
2359
|
-
}), d && d(), f && f.disconnect(), f = null, c && cancelAnimationFrame(
|
|
2369
|
+
}), d && d(), f && f.disconnect(), f = null, c && cancelAnimationFrame(g);
|
|
2360
2370
|
};
|
|
2361
2371
|
}
|
|
2362
2372
|
const Ql = Ll, Zl = Pl, Jl = (e, t, l) => {
|
|
@@ -2392,28 +2402,28 @@ function Ft(e, t) {
|
|
|
2392
2402
|
function tr(e, t, l) {
|
|
2393
2403
|
l === void 0 && (l = {});
|
|
2394
2404
|
const o = l.whileElementsMounted, n = k(() => {
|
|
2395
|
-
var
|
|
2396
|
-
return (
|
|
2405
|
+
var O;
|
|
2406
|
+
return (O = P(l.open)) != null ? O : !0;
|
|
2397
2407
|
}), r = k(() => P(l.middleware)), i = k(() => {
|
|
2398
|
-
var
|
|
2399
|
-
return (
|
|
2408
|
+
var O;
|
|
2409
|
+
return (O = P(l.placement)) != null ? O : "bottom";
|
|
2400
2410
|
}), u = k(() => {
|
|
2401
|
-
var
|
|
2402
|
-
return (
|
|
2411
|
+
var O;
|
|
2412
|
+
return (O = P(l.strategy)) != null ? O : "absolute";
|
|
2403
2413
|
}), c = k(() => {
|
|
2404
|
-
var
|
|
2405
|
-
return (
|
|
2406
|
-
}), a = k(() => Vt(e.value)), s = k(() => Vt(t.value)), d =
|
|
2407
|
-
const
|
|
2414
|
+
var O;
|
|
2415
|
+
return (O = P(l.transform)) != null ? O : !0;
|
|
2416
|
+
}), a = k(() => Vt(e.value)), s = k(() => Vt(t.value)), d = C(0), v = C(0), f = C(u.value), g = C(i.value), m = Vn({}), h = C(!1), b = k(() => {
|
|
2417
|
+
const O = {
|
|
2408
2418
|
position: f.value,
|
|
2409
2419
|
left: "0",
|
|
2410
2420
|
top: "0"
|
|
2411
2421
|
};
|
|
2412
2422
|
if (!s.value)
|
|
2413
|
-
return
|
|
2414
|
-
const N = Ft(s.value, d.value), re = Ft(s.value,
|
|
2423
|
+
return O;
|
|
2424
|
+
const N = Ft(s.value, d.value), re = Ft(s.value, v.value);
|
|
2415
2425
|
return c.value ? {
|
|
2416
|
-
...
|
|
2426
|
+
...O,
|
|
2417
2427
|
transform: "translate(" + N + "px, " + re + "px)",
|
|
2418
2428
|
...Tn(s.value) >= 1.5 && {
|
|
2419
2429
|
willChange: "transform"
|
|
@@ -2430,8 +2440,8 @@ function tr(e, t, l) {
|
|
|
2430
2440
|
middleware: r.value,
|
|
2431
2441
|
placement: i.value,
|
|
2432
2442
|
strategy: u.value
|
|
2433
|
-
}).then((
|
|
2434
|
-
d.value =
|
|
2443
|
+
}).then((O) => {
|
|
2444
|
+
d.value = O.x, v.value = O.y, f.value = O.strategy, g.value = O.placement, m.value = O.middlewareData, h.value = !0;
|
|
2435
2445
|
});
|
|
2436
2446
|
}
|
|
2437
2447
|
function w() {
|
|
@@ -2458,23 +2468,23 @@ function tr(e, t, l) {
|
|
|
2458
2468
|
flush: "sync"
|
|
2459
2469
|
}), Fn() && Nn(w), {
|
|
2460
2470
|
x: me(d),
|
|
2461
|
-
y: me(
|
|
2471
|
+
y: me(v),
|
|
2462
2472
|
strategy: me(f),
|
|
2463
|
-
placement: me(
|
|
2464
|
-
middlewareData: me(
|
|
2473
|
+
placement: me(g),
|
|
2474
|
+
middlewareData: me(m),
|
|
2465
2475
|
isPositioned: me(h),
|
|
2466
2476
|
floatingStyles: b,
|
|
2467
2477
|
update: x
|
|
2468
2478
|
};
|
|
2469
2479
|
}
|
|
2470
|
-
const _r = /* @__PURE__ */
|
|
2480
|
+
const _r = /* @__PURE__ */ A({
|
|
2471
2481
|
__name: "MenuContainer",
|
|
2472
2482
|
props: {
|
|
2473
2483
|
position: { default: "left" },
|
|
2474
2484
|
usePortal: { type: [Boolean, String], default: !1 }
|
|
2475
2485
|
},
|
|
2476
2486
|
setup(e) {
|
|
2477
|
-
const t = e, l =
|
|
2487
|
+
const t = e, l = C(null), o = C(null), n = t.position === "left" ? "bottom-end" : "bottom-start", { floatingStyles: r } = tr(l, o, {
|
|
2478
2488
|
placement: n,
|
|
2479
2489
|
whileElementsMounted: Yl,
|
|
2480
2490
|
middleware: [Tl(6), Zl(), Ql({ padding: 6 })]
|
|
@@ -2519,7 +2529,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2519
2529
|
}, {
|
|
2520
2530
|
default: W(() => [
|
|
2521
2531
|
F(P(gl), {
|
|
2522
|
-
class:
|
|
2532
|
+
class: $([
|
|
2523
2533
|
"z-40 mt-1 p-1 bg-white rounded shadow-lg text-grey-700 focus:outline-none w-full"
|
|
2524
2534
|
])
|
|
2525
2535
|
}, {
|
|
@@ -2540,7 +2550,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2540
2550
|
}), nr = {
|
|
2541
2551
|
key: 0,
|
|
2542
2552
|
class: "bg-grey-300 px-2 rounded-lg max-w-[66px] truncate"
|
|
2543
|
-
}, Tr = /* @__PURE__ */
|
|
2553
|
+
}, Tr = /* @__PURE__ */ A({
|
|
2544
2554
|
__name: "MenuLink",
|
|
2545
2555
|
props: {
|
|
2546
2556
|
label: {},
|
|
@@ -2552,7 +2562,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2552
2562
|
return (t, l) => (R(), K(P(bl), jn(zn({ disabled: t.disabled })), {
|
|
2553
2563
|
default: W(({ active: o }) => [
|
|
2554
2564
|
(R(), K(Un(t.as || "span"), {
|
|
2555
|
-
class:
|
|
2565
|
+
class: $(["flex items-center justify-between px-4 py-2 text-xs leading-5 transition-colors duration-100 rounded-lg", [
|
|
2556
2566
|
o ? "bg-grey-200" : "",
|
|
2557
2567
|
t.disabled ? "opacity-50 pointer-events-none" : "hover:bg-grey-200 focus:bg-grey-200 focus:outline-none"
|
|
2558
2568
|
]])
|
|
@@ -2579,7 +2589,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2579
2589
|
}, 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 = {
|
|
2580
2590
|
key: 0,
|
|
2581
2591
|
class: "bg-grey-500 text-grey-100 rounded text-xs px-2 py-1"
|
|
2582
|
-
}, Lr = /* @__PURE__ */
|
|
2592
|
+
}, Lr = /* @__PURE__ */ A({
|
|
2583
2593
|
__name: "Select",
|
|
2584
2594
|
props: {
|
|
2585
2595
|
modelValue: {},
|
|
@@ -2592,7 +2602,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2592
2602
|
},
|
|
2593
2603
|
emits: ["update:modelValue"],
|
|
2594
2604
|
setup(e, { emit: t }) {
|
|
2595
|
-
const l = e, o = l.modelValue ?
|
|
2605
|
+
const l = e, o = l.modelValue ? C(l.modelValue) : C(void 0), n = t, { inputClasses: r, disabledClasses: i, textSizeClasses: u } = rt(l);
|
|
2596
2606
|
return Q(
|
|
2597
2607
|
() => l.modelValue,
|
|
2598
2608
|
(c) => {
|
|
@@ -2610,7 +2620,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2610
2620
|
default: W(() => [
|
|
2611
2621
|
I("div", or, [
|
|
2612
2622
|
F(P(sl), {
|
|
2613
|
-
class:
|
|
2623
|
+
class: $(["w-full mono-50 bg-white text-grey-800 placeholder-grey-600 border border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder-grey-400 dark:border-grey-700 focus:ring-2 focus:border-blue-400 focus:ring-blue-400 focus:outline-none dark:focus:border-blue-800 dark:focus:ring-blue-800 cursor-default rounded font-normal text-left", [P(r), P(u), P(i)]])
|
|
2614
2624
|
}, {
|
|
2615
2625
|
default: W(() => {
|
|
2616
2626
|
var s;
|
|
@@ -2646,9 +2656,9 @@ const _r = /* @__PURE__ */ $({
|
|
|
2646
2656
|
value: s,
|
|
2647
2657
|
disabled: s.disabled
|
|
2648
2658
|
}, {
|
|
2649
|
-
default: W(({ active: d, selected:
|
|
2659
|
+
default: W(({ active: d, selected: v }) => [
|
|
2650
2660
|
I("li", {
|
|
2651
|
-
class:
|
|
2661
|
+
class: $([
|
|
2652
2662
|
d ? "text-white bg-blue-500" : "text-grey-900 dark:text-grey-50",
|
|
2653
2663
|
"cursor-default select-none relative py-2 pl-3 pr-12",
|
|
2654
2664
|
{ "opacity-50 bg-grey-100": s.disabled }
|
|
@@ -2658,8 +2668,8 @@ const _r = /* @__PURE__ */ $({
|
|
|
2658
2668
|
s.disabled && c.disabledBadge ? (R(), T("span", ur, B(c.disabledBadge), 1)) : M("", !0)
|
|
2659
2669
|
]),
|
|
2660
2670
|
I("span", {
|
|
2661
|
-
class:
|
|
2662
|
-
|
|
2671
|
+
class: $([
|
|
2672
|
+
v ? "font-semibold" : "font-normal",
|
|
2663
2673
|
"block truncate"
|
|
2664
2674
|
])
|
|
2665
2675
|
}, [
|
|
@@ -2670,9 +2680,9 @@ const _r = /* @__PURE__ */ $({
|
|
|
2670
2680
|
}, null, 8, ["name"])) : M("", !0),
|
|
2671
2681
|
Wn(" " + B(s.label), 1)
|
|
2672
2682
|
], 2),
|
|
2673
|
-
|
|
2683
|
+
v ? (R(), T("span", {
|
|
2674
2684
|
key: 0,
|
|
2675
|
-
class:
|
|
2685
|
+
class: $([
|
|
2676
2686
|
d ? "text-blue-100" : "text-blue-500",
|
|
2677
2687
|
"absolute inset-y-0 right-0 flex items-center pr-4"
|
|
2678
2688
|
])
|
|
@@ -2710,7 +2720,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2710
2720
|
}, vr = {
|
|
2711
2721
|
key: 1,
|
|
2712
2722
|
class: "w-1/3 h-10 mt-6 bg-current rounded-lg"
|
|
2713
|
-
}, Ir = /* @__PURE__ */
|
|
2723
|
+
}, Ir = /* @__PURE__ */ A({
|
|
2714
2724
|
__name: "Skeleton",
|
|
2715
2725
|
props: {
|
|
2716
2726
|
avatar: { type: Boolean, default: !1 },
|
|
@@ -2732,14 +2742,14 @@ const _r = /* @__PURE__ */ $({
|
|
|
2732
2742
|
]),
|
|
2733
2743
|
o.lines > 0 ? (R(), T("div", mr, [
|
|
2734
2744
|
(R(!0), T(be, null, jt(P(l), (r, i) => (R(), T("div", {
|
|
2735
|
-
class:
|
|
2745
|
+
class: $(["h-4 bg-current rounded-lg", r.margin]),
|
|
2736
2746
|
key: i
|
|
2737
2747
|
}, null, 2))), 128))
|
|
2738
2748
|
])) : M("", !0),
|
|
2739
2749
|
o.footer ? (R(), T("div", vr)) : M("", !0)
|
|
2740
2750
|
]));
|
|
2741
2751
|
}
|
|
2742
|
-
}),
|
|
2752
|
+
}), Ar = /* @__PURE__ */ A({
|
|
2743
2753
|
__name: "Spinner",
|
|
2744
2754
|
setup(e) {
|
|
2745
2755
|
return (t, l) => (R(), K(P(U), {
|
|
@@ -2750,7 +2760,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2750
2760
|
}), gr = { class: "relative inline-flex items-center" }, br = ["aria-label", "tabindex"], hr = {
|
|
2751
2761
|
key: 0,
|
|
2752
2762
|
class: "absolute inset-0 flex items-center justify-center"
|
|
2753
|
-
},
|
|
2763
|
+
}, $r = /* @__PURE__ */ A({
|
|
2754
2764
|
__name: "SplitButton",
|
|
2755
2765
|
props: {
|
|
2756
2766
|
label: {},
|
|
@@ -2813,11 +2823,11 @@ const _r = /* @__PURE__ */ $({
|
|
|
2813
2823
|
type: "button",
|
|
2814
2824
|
"aria-label": a.label,
|
|
2815
2825
|
tabindex: a.isDisabled ? "-1" : void 0,
|
|
2816
|
-
class:
|
|
2826
|
+
class: $(["relative transition duration-150 ease-in-out rounded-l-lg", n.value]),
|
|
2817
2827
|
onClick: u
|
|
2818
2828
|
}, [
|
|
2819
2829
|
I("div", {
|
|
2820
|
-
class:
|
|
2830
|
+
class: $(!a.isLoading || "invisible")
|
|
2821
2831
|
}, [
|
|
2822
2832
|
I("span", null, B(a.label), 1)
|
|
2823
2833
|
], 2),
|
|
@@ -2830,17 +2840,17 @@ const _r = /* @__PURE__ */ $({
|
|
|
2830
2840
|
], 10, br),
|
|
2831
2841
|
I("button", {
|
|
2832
2842
|
type: "button",
|
|
2833
|
-
class:
|
|
2843
|
+
class: $(["border-l-white/50 border-l transition duration-150 ease-in-out rounded-r-lg", [n.value, r.value]]),
|
|
2834
2844
|
onClick: c
|
|
2835
2845
|
}, [
|
|
2836
2846
|
F(U, {
|
|
2837
|
-
class:
|
|
2847
|
+
class: $([i.value]),
|
|
2838
2848
|
name: a.icon
|
|
2839
2849
|
}, null, 8, ["class", "name"])
|
|
2840
2850
|
], 2)
|
|
2841
2851
|
]));
|
|
2842
2852
|
}
|
|
2843
|
-
}), yr = { class: "sr-only" }, Mr = /* @__PURE__ */
|
|
2853
|
+
}), yr = { class: "sr-only" }, Mr = /* @__PURE__ */ A({
|
|
2844
2854
|
__name: "Switch",
|
|
2845
2855
|
props: {
|
|
2846
2856
|
id: { default: qt() },
|
|
@@ -2858,16 +2868,16 @@ const _r = /* @__PURE__ */ $({
|
|
|
2858
2868
|
return (n, r) => (R(), K(P(yl), {
|
|
2859
2869
|
modelValue: n.modelValue,
|
|
2860
2870
|
label: n.label,
|
|
2861
|
-
class:
|
|
2871
|
+
class: $([n.modelValue ? "bg-blue-700" : "bg-grey-700", "relative inline-flex items-center h-6 transition rounded-full w-14 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-grey-900 focus:ring-blue-300"]),
|
|
2862
2872
|
"onUpdate:modelValue": o
|
|
2863
2873
|
}, {
|
|
2864
2874
|
default: W(() => [
|
|
2865
2875
|
I("span", {
|
|
2866
|
-
class:
|
|
2876
|
+
class: $(["absolute text-xs text-center text-white inset-x-2", n.modelValue ? "pr-3" : "pl-3"])
|
|
2867
2877
|
}, B(n.modelValue === !0 ? n.onLabel : n.offLabel), 3),
|
|
2868
2878
|
I("span", yr, B(n.label), 1),
|
|
2869
2879
|
I("span", {
|
|
2870
|
-
class:
|
|
2880
|
+
class: $([n.modelValue ? "translate-x-9" : "translate-x-1", "inline-block w-4 h-4 transition bg-white rounded-full"])
|
|
2871
2881
|
}, null, 2)
|
|
2872
2882
|
]),
|
|
2873
2883
|
_: 1
|
|
@@ -2875,7 +2885,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2875
2885
|
}
|
|
2876
2886
|
}), xr = { class: "relative" }, wr = ["tabindex", "value"], kr = {
|
|
2877
2887
|
inheritAttrs: !1
|
|
2878
|
-
}, Vr = /* @__PURE__ */
|
|
2888
|
+
}, Vr = /* @__PURE__ */ A({
|
|
2879
2889
|
...kr,
|
|
2880
2890
|
__name: "Textarea",
|
|
2881
2891
|
props: {
|
|
@@ -2888,12 +2898,12 @@ const _r = /* @__PURE__ */ $({
|
|
|
2888
2898
|
setup(e, { expose: t, emit: l }) {
|
|
2889
2899
|
const o = e, n = l, { inputClasses: r, disabledClasses: i, textSizeClasses: u } = rt(o), c = function(d) {
|
|
2890
2900
|
n("update:modelValue", (d == null ? void 0 : d.target).value);
|
|
2891
|
-
}, a =
|
|
2901
|
+
}, a = C(null);
|
|
2892
2902
|
return t({
|
|
2893
2903
|
focus: () => {
|
|
2894
2904
|
o.isDisabled || a.value.focus();
|
|
2895
2905
|
}
|
|
2896
|
-
}), (d,
|
|
2906
|
+
}), (d, v) => (R(), T("div", xr, [
|
|
2897
2907
|
I("textarea", ot({
|
|
2898
2908
|
class: ["mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [P(r), P(u), P(i)]],
|
|
2899
2909
|
tabindex: d.isDisabled ? "-1" : void 0,
|
|
@@ -2919,8 +2929,8 @@ export {
|
|
|
2919
2929
|
Tr as D9MenuLink,
|
|
2920
2930
|
Lr as D9Select,
|
|
2921
2931
|
Ir as D9Skeleton,
|
|
2922
|
-
|
|
2923
|
-
|
|
2932
|
+
Ar as D9Spinner,
|
|
2933
|
+
$r as D9SplitButton,
|
|
2924
2934
|
Mr as D9Switch,
|
|
2925
2935
|
Vr as D9Textarea,
|
|
2926
2936
|
xt as brands,
|