@deck9/ui 0.16.0-0 → 0.17.0-next.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 CHANGED
@@ -1,163 +1,167 @@
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
- import { FontAwesomeIcon as Wn } from "@fortawesome/vue-fontawesome";
3
- import { library as lt } from "@fortawesome/fontawesome-svg-core";
4
- import * as d from "@fortawesome/free-solid-svg-icons";
5
- import * as Se from "@fortawesome/free-brands-svg-icons";
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
- const yt = {
8
- prefix: zt,
9
- iconName: Ht,
10
- icon: [Ut, Wt, Ze, Kt, Gt]
11
- }, Kn = {
12
- definition: yt,
13
- faAlignJustify: yt,
14
- prefix: zt,
15
- iconName: Ht,
16
- width: Ut,
17
- height: Wt,
18
- ligatures: Ze,
19
- unicode: Kt,
20
- svgPathData: Gt,
21
- aliases: Ze
1
+ import { defineComponent as v, computed as w, openBlock as o, createBlock as k, unref as d, mergeProps as T, createCommentVNode as m, createElementBlock as u, normalizeClass as b, createElementVNode as c, toDisplayString as C, createVNode as y, ref as D, watch as I, Fragment as E, withDirectives as te, vModelText as le, normalizeStyle as G, withCtx as h, renderSlot as U, Teleport as se, Transition as O, normalizeProps as oe, guardReactiveProps as ne, resolveDynamicComponent as re, onMounted as ie, renderList as Z } from "vue";
2
+ import { FontAwesomeIcon as de } from "@fortawesome/vue-fontawesome";
3
+ import { library as F } from "@fortawesome/fontawesome-svg-core";
4
+ import * as e from "@fortawesome/free-solid-svg-icons";
5
+ import * as B from "@fortawesome/free-brands-svg-icons";
6
+ import { v4 as Q } from "uuid";
7
+ import { useEyeDropper as ue } from "@vueuse/core";
8
+ import { Menu as ce, MenuButton as fe, MenuItems as me, MenuItem as pe, Listbox as be, ListboxButton as ge, ListboxOptions as ye, ListboxOption as he, Switch as ke } from "@headlessui/vue";
9
+ import { useFloating as ve, autoUpdate as _e, offset as xe, flip as Ce, shift as we } from "@floating-ui/vue";
10
+ var q = "fas", W = "numeric-input", J = 512, K = 512, A = [], X = "", Y = "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";
11
+ const j = {
12
+ prefix: q,
13
+ iconName: W,
14
+ icon: [J, K, A, X, Y]
15
+ }, $e = {
16
+ definition: j,
17
+ faAlignJustify: j,
18
+ prefix: q,
19
+ iconName: W,
20
+ width: J,
21
+ height: K,
22
+ ligatures: A,
23
+ unicode: X,
24
+ svgPathData: Y,
25
+ aliases: A
22
26
  };
23
- lt.add(
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.faLayerGroup,
86
- d.faLink,
87
- d.faLinkSlash,
88
- d.faList,
89
- d.faListOl,
90
- d.faListUl,
91
- d.faLocationArrow,
92
- d.faLocationCrosshairs,
93
- d.faLock,
94
- d.faLockOpen,
95
- d.faMedal,
96
- d.faMessage,
97
- d.faMicrochip,
98
- d.faPencilAlt,
99
- d.faPenToSquare,
100
- d.faPhone,
101
- d.faPlayCircle,
102
- d.faPlus,
103
- d.faPlusCircle,
104
- d.faPoo,
105
- d.faPuzzlePiece,
106
- d.faQuestion,
107
- d.faQuoteLeft,
108
- d.faQuoteRight,
109
- d.faReply,
110
- d.faReplyAll,
111
- d.faRightLong,
112
- d.faRobot,
113
- d.faSave,
114
- d.faShield,
115
- d.faSignal,
116
- d.faSignature,
117
- d.faSignature,
118
- d.faSquareCheck,
119
- d.faStar,
120
- d.faStrikethrough,
121
- d.faTerminal,
122
- d.faTextSlash,
123
- d.faTimes,
124
- d.faTrash,
125
- d.faTree,
126
- d.faTrophy,
127
- d.faTurnDown,
128
- d.faUnderline,
129
- d.faUpload,
130
- d.faUser,
131
- d.faUserShield,
132
- d.faWandMagicSparkles,
27
+ F.add(
28
+ e.faAlignCenter,
29
+ e.faAlignLeft,
30
+ e.faAlignRight,
31
+ e.faArrowRight,
32
+ e.faArrowUp19,
33
+ e.faAsterisk,
34
+ e.faAt,
35
+ e.faBold,
36
+ e.faBolt,
37
+ e.faCalendar,
38
+ e.faChartPie,
39
+ e.faCheck,
40
+ e.faCheckCircle,
41
+ e.faChevronDown,
42
+ e.faChevronLeft,
43
+ e.faChevronRight,
44
+ e.faChevronUp,
45
+ e.faCircleCheck,
46
+ e.faCircleNodes,
47
+ e.faCircleNotch,
48
+ e.faClipboard,
49
+ e.faCloudDownload,
50
+ e.faCloudUpload,
51
+ e.faCode,
52
+ e.faCodeBranch,
53
+ e.faCodeFork,
54
+ e.faCog,
55
+ e.faCompass,
56
+ e.faCrown,
57
+ e.faDiagramProject,
58
+ e.faDoorOpen,
59
+ e.faDotCircle,
60
+ e.faEllipsis,
61
+ e.faEllipsisVertical,
62
+ e.faEnvelope,
63
+ e.faExclamationTriangle,
64
+ e.faExternalLink,
65
+ e.faEye,
66
+ e.faEyeDropper,
67
+ e.faEyeSlash,
68
+ e.faFileLines,
69
+ e.faFilePdf,
70
+ e.faFileUpload,
71
+ e.faFileVideo,
72
+ e.faFileWaveform,
73
+ e.faFilter,
74
+ e.faFilter,
75
+ e.faFingerprint,
76
+ e.faFont,
77
+ e.faGears,
78
+ e.faGlobe,
79
+ e.faGripHorizontal,
80
+ e.faGripVertical,
81
+ e.faHandPointRight,
82
+ e.faHandPointRight,
83
+ e.faHashtag,
84
+ e.faHeading,
85
+ e.faHeart,
86
+ e.faImage,
87
+ e.faInfoCircle,
88
+ e.faItalic,
89
+ e.faLayerGroup,
90
+ e.faLink,
91
+ e.faLinkSlash,
92
+ e.faList,
93
+ e.faListOl,
94
+ e.faListUl,
95
+ e.faLocationArrow,
96
+ e.faLocationCrosshairs,
97
+ e.faLock,
98
+ e.faLockOpen,
99
+ e.faMedal,
100
+ e.faMessage,
101
+ e.faMicrochip,
102
+ e.faPencilAlt,
103
+ e.faPenToSquare,
104
+ e.faPhone,
105
+ e.faPlayCircle,
106
+ e.faPlus,
107
+ e.faPlusCircle,
108
+ e.faPoo,
109
+ e.faPuzzlePiece,
110
+ e.faQuestion,
111
+ e.faQuoteLeft,
112
+ e.faQuoteRight,
113
+ e.faReply,
114
+ e.faReplyAll,
115
+ e.faRightLong,
116
+ e.faRobot,
117
+ e.faSave,
118
+ e.faShield,
119
+ e.faSignal,
120
+ e.faSignature,
121
+ e.faSignature,
122
+ e.faSquareCheck,
123
+ e.faStar,
124
+ e.faStrikethrough,
125
+ e.faTerminal,
126
+ e.faTextSlash,
127
+ e.faTimes,
128
+ e.faTrash,
129
+ e.faTree,
130
+ e.faTrophy,
131
+ e.faTurnDown,
132
+ e.faUnderline,
133
+ e.faUpload,
134
+ e.faUser,
135
+ e.faUserShield,
136
+ e.faWandMagicSparkles,
133
137
  // Brands
134
- Se.faTwitter,
135
- Se.faInstagram,
136
- Se.faGithub,
137
- Se.faLinkedin,
138
- Se.faFacebook,
138
+ B.faTwitter,
139
+ B.faInstagram,
140
+ B.faGithub,
141
+ B.faLinkedin,
142
+ B.faFacebook,
139
143
  // Custom
140
- Kn.definition
144
+ $e.definition
141
145
  );
142
- const Gn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.definitions.fab)].sort(), z = /* @__PURE__ */ A({
146
+ const Le = [...Object.keys(F.definitions.fas)].sort(), N = [...Object.keys(F.definitions.fab)].sort(), x = /* @__PURE__ */ v({
143
147
  __name: "Icon",
144
148
  props: {
145
149
  name: { default: "user" }
146
150
  },
147
- setup(e) {
148
- const t = e, l = k(() => xt.includes(t.name) ? "fab" : "fas"), o = k(() => Gn.includes(t.name) || xt.includes(t.name) ? !0 : (console.warn(
151
+ setup(s) {
152
+ const a = s, r = w(() => N.includes(a.name) ? "fab" : "fas"), l = w(() => Le.includes(a.name) || N.includes(a.name) ? !0 : (console.warn(
149
153
  "could not load icon, because it is not available",
150
- t.name
154
+ a.name
151
155
  ), !1));
152
- return (n, r) => o.value ? (R(), W(_(Wn), ot({
156
+ return (t, i) => l.value ? (o(), k(d(de), T({
153
157
  key: 0,
154
- icon: [l.value, n.name]
155
- }, n.$attrs), null, 16, ["icon"])) : M("", !0);
158
+ icon: [r.value, t.name]
159
+ }, t.$attrs), null, 16, ["icon"])) : m("", !0);
156
160
  }
157
- }), qn = ["aria-label", "tabindex"], Xn = {
161
+ }), De = ["aria-label", "disabled", "aria-busy"], Ve = {
158
162
  key: 0,
159
163
  class: "absolute inset-0 flex items-center justify-center"
160
- }, Er = /* @__PURE__ */ A({
164
+ }, ya = /* @__PURE__ */ v({
161
165
  __name: "Button",
162
166
  props: {
163
167
  label: {},
@@ -168,301 +172,135 @@ const Gn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
168
172
  icon: {},
169
173
  iconPosition: { default: "right" }
170
174
  },
171
- emits: ["onClick"],
172
- setup(e, { emit: t }) {
173
- const l = t, o = e, n = k(() => {
174
- const u = {
175
- "text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900": o.color === "primary",
176
- "text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900": o.color === "light",
177
- "text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900": o.color === "dark",
178
- "text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900": o.color === "danger"
179
- }, c = {
180
- "pointer-events-none opacity-75 cursor-not-allowed": o.isDisabled
181
- }, a = {
182
- "px-4 py-1 text-xs leading-5 mono-100 rounded-lg": o.size === "small",
183
- "px-5 py-2 text-sm leading-4 font-medium rounded-lg": o.size === "medium",
184
- "px-8 py-3 text-base leading-6 font-medium rounded-lg": o.size === "large"
175
+ setup(s) {
176
+ const a = s, r = w(() => {
177
+ const t = {
178
+ "text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900": a.color === "primary",
179
+ "text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900": a.color === "light",
180
+ "text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900": a.color === "dark",
181
+ "text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900": a.color === "danger"
182
+ }, i = {
183
+ "pointer-events-none opacity-75 cursor-not-allowed": a.isDisabled
184
+ }, f = {
185
+ "px-4 py-1 text-xs leading-5 mono-100 rounded-lg": a.size === "small",
186
+ "px-5 py-2 text-sm leading-4 font-medium rounded-lg": a.size === "medium",
187
+ "px-8 py-3 text-base leading-6 font-medium rounded-lg": a.size === "large"
185
188
  };
186
189
  return {
187
- ...u,
188
- ...c,
189
- ...a
190
+ ...t,
191
+ ...i,
192
+ ...f
190
193
  };
191
- }), r = k(() => {
192
- const u = {
193
- "mr-2 -ml-1": ["small", "medium"].includes(o.size) && o.iconPosition === "left",
194
- "mr-4 -ml-2": ["large"].includes(o.size) && o.iconPosition === "left"
195
- }, c = {
196
- "ml-3 -mr-1": ["small", "medium"].includes(o.size) && o.iconPosition === "right",
197
- "ml-3 -mr-3": ["large"].includes(o.size) && o.iconPosition === "right"
198
- }, a = {
199
- "text-white": o.color === "primary",
200
- "text-blue-600": o.color === "light",
201
- "text-grey-50": o.color === "dark"
194
+ }), l = w(() => {
195
+ const t = {
196
+ "mr-2 -ml-1": ["small", "medium"].includes(a.size) && a.iconPosition === "left",
197
+ "mr-4 -ml-2": ["large"].includes(a.size) && a.iconPosition === "left"
198
+ }, i = {
199
+ "ml-3 -mr-1": ["small", "medium"].includes(a.size) && a.iconPosition === "right",
200
+ "ml-3 -mr-3": ["large"].includes(a.size) && a.iconPosition === "right"
201
+ }, f = {
202
+ "text-white": a.color === "primary",
203
+ "text-blue-600": a.color === "light",
204
+ "text-grey-50": a.color === "dark"
202
205
  };
203
206
  return {
204
- ...u,
205
- ...c,
206
- ...a
207
+ ...t,
208
+ ...i,
209
+ ...f
207
210
  };
208
211
  });
209
- function i() {
210
- o.isDisabled || l("onClick");
211
- }
212
- return (u, c) => (R(), T("button", {
213
- class: $(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out", n.value]),
212
+ return (t, i) => (o(), u("button", {
213
+ class: b(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out", r.value]),
214
214
  type: "button",
215
- "aria-label": u.label,
216
- tabindex: u.isDisabled ? "-1" : void 0,
217
- onClick: i
215
+ "aria-label": t.label,
216
+ disabled: t.isDisabled || t.isLoading,
217
+ "aria-busy": t.isLoading
218
218
  }, [
219
- L("div", {
220
- class: $(!u.isLoading || "invisible")
219
+ c("div", {
220
+ class: b(!t.isLoading || "invisible")
221
221
  }, [
222
- u.icon && u.iconPosition === "left" ? (R(), W(z, {
222
+ t.icon && t.iconPosition === "left" ? (o(), k(x, {
223
223
  key: 0,
224
- name: u.icon,
225
- class: $(r.value)
226
- }, null, 8, ["name", "class"])) : M("", !0),
227
- L("span", null, G(u.label), 1),
228
- u.icon && u.iconPosition === "right" ? (R(), W(z, {
224
+ name: t.icon,
225
+ class: b(l.value)
226
+ }, null, 8, ["name", "class"])) : m("", !0),
227
+ c("span", null, C(t.label), 1),
228
+ t.icon && t.iconPosition === "right" ? (o(), k(x, {
229
229
  key: 1,
230
- name: u.icon,
231
- class: $(r.value)
232
- }, null, 8, ["name", "class"])) : M("", !0)
230
+ name: t.icon,
231
+ class: b(l.value)
232
+ }, null, 8, ["name", "class"])) : m("", !0)
233
233
  ], 2),
234
- u.isLoading ? (R(), T("span", Xn, [
235
- F(z, {
234
+ t.isLoading ? (o(), u("span", Ve, [
235
+ y(x, {
236
236
  class: "animate-spin",
237
237
  name: "circle-notch"
238
238
  })
239
- ])) : M("", !0)
240
- ], 10, qn));
241
- }
242
- });
243
- let Le;
244
- const Yn = new Uint8Array(16);
245
- function Qn() {
246
- if (!Le && (Le = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Le))
247
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
248
- return Le(Yn);
249
- }
250
- const V = [];
251
- for (let e = 0; e < 256; ++e)
252
- V.push((e + 256).toString(16).slice(1));
253
- function Zn(e, t = 0) {
254
- return V[e[t + 0]] + V[e[t + 1]] + V[e[t + 2]] + V[e[t + 3]] + "-" + V[e[t + 4]] + V[e[t + 5]] + "-" + V[e[t + 6]] + V[e[t + 7]] + "-" + V[e[t + 8]] + V[e[t + 9]] + "-" + V[e[t + 10]] + V[e[t + 11]] + V[e[t + 12]] + V[e[t + 13]] + V[e[t + 14]] + V[e[t + 15]];
255
- }
256
- const Jn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), wt = {
257
- randomUUID: Jn
258
- };
259
- function qt(e, t, l) {
260
- if (wt.randomUUID && !t && !e)
261
- return wt.randomUUID();
262
- e = e || {};
263
- const o = e.random || (e.rng || Qn)();
264
- if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, t) {
265
- l = l || 0;
266
- for (let n = 0; n < 16; ++n)
267
- t[l + n] = o[n];
268
- return t;
239
+ ])) : m("", !0)
240
+ ], 10, De));
269
241
  }
270
- return Zn(o);
271
- }
272
- 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 = {
242
+ }), Se = { class: "relative flex items-start" }, ze = ["checked", "id"], Pe = { class: "ml-2 text-sm leading-5 peer-disabled:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:[&>label]:cursor-not-allowed" }, Be = ["for"], Me = {
273
243
  key: 0,
274
244
  class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
275
- }, Dr = /* @__PURE__ */ A({
245
+ }, Ie = {
246
+ inheritAttrs: !1
247
+ }, ha = /* @__PURE__ */ v({
248
+ ...Ie,
276
249
  __name: "Checkbox",
277
250
  props: {
278
- id: { default: qt() },
251
+ id: { default: () => Q() },
279
252
  label: {},
280
253
  modelValue: { type: Boolean },
281
254
  description: {}
282
255
  },
283
256
  emits: ["update:modelValue"],
284
- setup(e, { emit: t }) {
285
- const l = t, o = (n) => {
286
- l("update:modelValue", n.target.checked);
257
+ setup(s, { emit: a }) {
258
+ const r = a, l = (t) => {
259
+ r("update:modelValue", t.target.checked);
287
260
  };
288
- return (n, r) => (R(), T("div", eo, [
289
- L("div", to, [
290
- L("input", {
291
- 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",
292
- type: "checkbox",
293
- checked: n.modelValue,
294
- onChange: o,
295
- id: n.id
296
- }, null, 40, no)
297
- ]),
298
- L("div", oo, [
299
- L("label", {
300
- for: n.id,
261
+ return (t, i) => (o(), u("div", Se, [
262
+ c("input", T({
263
+ class: "peer mt-0.5 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 disabled:opacity-50 disabled:cursor-not-allowed",
264
+ type: "checkbox",
265
+ checked: t.modelValue,
266
+ onChange: l,
267
+ id: t.id
268
+ }, t.$attrs), null, 16, ze),
269
+ c("div", Pe, [
270
+ c("label", {
271
+ for: t.id,
301
272
  class: "font-medium text-grey-700 dark:text-grey-200 casual-25"
302
- }, G(n.label), 9, lo),
303
- n.description ? (R(), T("p", ro, G(n.description), 1)) : M("", !0)
273
+ }, C(t.label), 9, Be),
274
+ t.description ? (o(), u("p", Me, C(t.description), 1)) : m("", !0)
304
275
  ])
305
276
  ]));
306
277
  }
307
278
  });
308
- function io() {
309
- const e = C(!1);
310
- return In() && ee(() => {
311
- e.value = !0;
312
- }), e;
313
- }
314
- function ao(e) {
315
- const t = io();
316
- return k(() => (t.value, !!e()));
317
- }
318
- function so(e = {}) {
319
- const { initialValue: t = "" } = e, l = ao(() => typeof window < "u" && "EyeDropper" in window), o = C(t);
320
- async function n(r) {
321
- if (!l.value)
322
- return;
323
- const u = await new window.EyeDropper().open(r);
324
- return o.value = u.sRGBHex, u;
325
- }
326
- return { isSupported: l, sRGBHex: o, open: n };
327
- }
328
- const uo = () => {
329
- }, co = Array.isArray, fo = (e) => typeof e == "function", po = (e) => typeof e == "symbol";
330
- let kt;
331
- const St = () => kt || (kt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
332
- let mo;
333
- function vo(e, t = mo) {
334
- t && t.active && t.effects.push(e);
335
- }
336
- const go = (e) => {
337
- const t = new Set(e);
338
- return t.w = 0, t.n = 0, t;
339
- }, Xt = (e) => (e.w & ie) > 0, Yt = (e) => (e.n & ie) > 0, bo = ({ deps: e }) => {
340
- if (e.length)
341
- for (let t = 0; t < e.length; t++)
342
- e[t].w |= ie;
343
- }, ho = (e) => {
344
- const { deps: t } = e;
345
- if (t.length) {
346
- let l = 0;
347
- for (let o = 0; o < t.length; o++) {
348
- const n = t[o];
349
- Xt(n) && !Yt(n) ? n.delete(e) : t[l++] = n, n.w &= ~ie, n.n &= ~ie;
350
- }
351
- t.length = l;
352
- }
353
- };
354
- let Ce = 0, ie = 1;
355
- const Je = 30;
356
- let Y;
357
- class yo {
358
- constructor(t, l = null, o) {
359
- this.fn = t, this.scheduler = l, this.active = !0, this.deps = [], this.parent = void 0, vo(this, o);
360
- }
361
- run() {
362
- if (!this.active)
363
- return this.fn();
364
- let t = Y, l = Ae;
365
- for (; t; ) {
366
- if (t === this)
367
- return;
368
- t = t.parent;
369
- }
370
- try {
371
- return this.parent = Y, Y = this, Ae = !0, ie = 1 << ++Ce, Ce <= Je ? bo(this) : Ct(this), this.fn();
372
- } finally {
373
- Ce <= Je && ho(this), ie = 1 << --Ce, Y = this.parent, Ae = l, this.parent = void 0, this.deferStop && this.stop();
374
- }
375
- }
376
- stop() {
377
- Y === this ? this.deferStop = !0 : this.active && (Ct(this), this.onStop && this.onStop(), this.active = !1);
378
- }
379
- }
380
- function Ct(e) {
381
- const { deps: t } = e;
382
- if (t.length) {
383
- for (let l = 0; l < t.length; l++)
384
- t[l].delete(e);
385
- t.length = 0;
386
- }
387
- }
388
- let Ae = !0;
389
- function xo(e, t) {
390
- let l = !1;
391
- Ce <= Je ? Yt(e) || (e.n |= ie, l = !Xt(e)) : l = !e.has(Y), l && (e.add(Y), Y.deps.push(e));
392
- }
393
- function wo(e, t) {
394
- const l = co(e) ? e : [...e];
395
- for (const o of l)
396
- o.computed && Ot(o);
397
- for (const o of l)
398
- o.computed || Ot(o);
399
- }
400
- function Ot(e, t) {
401
- (e !== Y || e.allowRecurse) && (e.scheduler ? e.scheduler() : e.run());
402
- }
403
- new Set(
404
- /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(po)
405
- );
406
- function Be(e) {
407
- const t = e && e.__v_raw;
408
- return t ? Be(t) : e;
409
- }
410
- function ko(e) {
411
- Ae && Y && (e = Be(e), xo(e.dep || (e.dep = go())));
412
- }
413
- function So(e, t) {
414
- e = Be(e);
415
- const l = e.dep;
416
- l && wo(l);
417
- }
418
- class Co {
419
- constructor(t, l, o, n) {
420
- this._setter = l, this.dep = void 0, this.__v_isRef = !0, this.__v_isReadonly = !1, this._dirty = !0, this.effect = new yo(t, () => {
421
- this._dirty || (this._dirty = !0, So(this));
422
- }), this.effect.computed = this, this.effect.active = this._cacheable = !n, this.__v_isReadonly = o;
423
- }
424
- get value() {
425
- const t = Be(this);
426
- return ko(t), (t._dirty || !t._cacheable) && (t._dirty = !1, t._value = t.effect.run()), t._value;
427
- }
428
- set value(t) {
429
- this._setter(t);
430
- }
431
- }
432
- function Oo(e, t, l = !1) {
433
- let o, n;
434
- const r = fo(e);
435
- return r ? (o = e, n = uo) : (o = e.get, n = e.set), new Co(o, n, r || !n, l);
436
- }
437
- let Xe, Rt = "__VUE_INSTANCE_SETTERS__";
438
- (Xe = St()[Rt]) || (Xe = St()[Rt] = []), Xe.push((e) => e);
439
- let Ro = !1;
440
- const Ye = (e, t) => Oo(e, t, Ro);
441
- function rt(e) {
442
- const t = Ye(() => ({
443
- "pl-3 pr-10 py-2": !e.icon && e.type !== "color" && e.size === "small",
444
- "pl-4 pr-10 py-3": !e.icon && e.type !== "color" && e.size === "medium",
445
- "pl-6 pr-10 py-3": !e.icon && e.type !== "color" && e.size === "large",
446
- "pl-10 pr-10 py-1": (e.icon || e.type === "color") && e.size === "small",
447
- "pl-12 pr-10 py-3": (e.icon || e.type === "color") && (e.size === "medium" || e.size === "large"),
448
- "w-full block": e.block === !0
449
- })), l = Ye(() => ({
450
- "pointer-events-none opacity-50 cursor-not-allowed": e.isDisabled
451
- })), o = Ye(() => ({
452
- "text-xs leading-4": e.size === "small",
453
- "text-sm leading-4": e.size === "medium",
454
- "text-base leading-5": e.size === "large"
279
+ function H(s) {
280
+ const a = w(() => ({
281
+ "pl-3 pr-10 py-2": !s.icon && s.type !== "color" && s.size === "small",
282
+ "pl-4 pr-10 py-3": !s.icon && s.type !== "color" && s.size === "medium",
283
+ "pl-6 pr-10 py-3": !s.icon && s.type !== "color" && s.size === "large",
284
+ "pl-10 pr-10 py-1": (s.icon || s.type === "color") && s.size === "small",
285
+ "pl-12 pr-10 py-3": (s.icon || s.type === "color") && (s.size === "medium" || s.size === "large"),
286
+ "w-full block": s.block === !0
287
+ })), r = w(() => ({
288
+ "pointer-events-none opacity-50 cursor-not-allowed": s.isDisabled
289
+ })), l = w(() => ({
290
+ "text-xs leading-4": s.size === "small",
291
+ "text-sm leading-4": s.size === "medium",
292
+ "text-base leading-5": s.size === "large"
455
293
  }));
456
294
  return {
457
- inputClasses: t,
458
- disabledClasses: l,
459
- textSizeClasses: o
295
+ inputClasses: a,
296
+ disabledClasses: r,
297
+ textSizeClasses: l
460
298
  };
461
299
  }
462
- const Eo = ["placeholder", "type", "tabindex", "value"], Do = { class: "absolute inset-y-2 left-2 w-8 cursor-pointer" }, _o = {
300
+ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { class: "absolute inset-y-2 left-2 w-8 cursor-pointer" }, Ee = ["disabled"], Fe = ["disabled"], He = {
463
301
  inheritAttrs: !1
464
- }, _r = /* @__PURE__ */ A({
465
- ..._o,
302
+ }, ka = /* @__PURE__ */ v({
303
+ ...He,
466
304
  __name: "Input",
467
305
  props: {
468
306
  modelValue: {},
@@ -477,2040 +315,138 @@ const Eo = ["placeholder", "type", "tabindex", "value"], Do = { class: "absolute
477
315
  showColorPicker: { type: Boolean }
478
316
  },
479
317
  emits: ["update:modelValue"],
480
- setup(e, { expose: t, emit: l }) {
481
- const o = e, n = C(null), r = C(o.modelValue ?? "");
482
- Q(
483
- () => o.modelValue,
484
- (y) => {
485
- typeof y < "u" && y !== r.value && (r.value = y);
318
+ setup(s, { expose: a, emit: r }) {
319
+ const l = s, t = D(null), i = D(l.modelValue ?? ""), f = (n) => l.type === "number" && n !== "" && n !== null ? Number(n) : n;
320
+ I(
321
+ () => l.modelValue,
322
+ (n) => {
323
+ typeof n < "u" && n !== f(i.value) && (i.value = n);
486
324
  }
487
325
  );
488
- const i = l, { inputClasses: u, disabledClasses: c, textSizeClasses: a } = rt(o), s = k(() => o.type === "color" ? "text" : o.type), {
489
- isSupported: f,
490
- open: v,
491
- sRGBHex: p
492
- } = so(), g = () => {
493
- v();
326
+ const $ = r, { inputClasses: V, disabledClasses: L, textSizeClasses: z } = H(l), _ = w(() => l.type === "color" ? "text" : l.type), {
327
+ isSupported: p,
328
+ open: R,
329
+ sRGBHex: g
330
+ } = ue(), M = () => {
331
+ R();
494
332
  };
495
- Q(p, (y) => {
496
- r.value = y, i("update:modelValue", y);
333
+ I(g, (n) => {
334
+ i.value = n, $("update:modelValue", n);
497
335
  });
498
- const m = function(y) {
499
- const x = (y == null ? void 0 : y.target).value;
500
- if (o.type === "number" && o.min && parseInt(x) < o.min) {
501
- r.value = o.min, n.value.value = r.value.toString(), i("update:modelValue", o.min);
336
+ const P = function(n) {
337
+ i.value = (n == null ? void 0 : n.target).value, $("update:modelValue", f(i.value));
338
+ }, ee = function() {
339
+ const n = f(i.value);
340
+ if (typeof n != "number")
502
341
  return;
503
- }
504
- if (o.type === "number" && o.max && parseInt(x) > o.max) {
505
- r.value = o.max, n.value.value = r.value.toString(), i("update:modelValue", o.max);
506
- return;
507
- }
508
- r.value = (y == null ? void 0 : y.target).value, i("update:modelValue", r.value);
509
- }, h = C(null);
510
- return t({
342
+ const S = Math.min(
343
+ Math.max(n, l.min ?? -1 / 0),
344
+ l.max ?? 1 / 0
345
+ );
346
+ S !== n && (i.value = S, $("update:modelValue", S));
347
+ };
348
+ return a({
511
349
  focus: () => {
512
- o.isDisabled || h.value.focus();
350
+ var n;
351
+ l.isDisabled || (n = t.value) == null || n.focus();
513
352
  }
514
- }), (y, x) => (R(), T("div", {
515
- class: $(["relative", [y.block ? "w-full block" : "inline-block"]])
353
+ }), (n, S) => (o(), u("div", {
354
+ class: b(["relative", [n.block ? "w-full block" : "inline-block"]])
516
355
  }, [
517
- L("input", ot({
518
- 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)]],
519
- placeholder: y.placeholder,
520
- type: s.value,
521
- tabindex: y.isDisabled ? "-1" : void 0,
522
- value: r.value
523
- }, y.$attrs, {
356
+ c("input", T({
357
+ 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", [d(V), d(z), d(L)]],
358
+ placeholder: n.placeholder,
359
+ type: _.value,
360
+ min: n.min,
361
+ max: n.max,
362
+ disabled: n.isDisabled,
363
+ value: i.value
364
+ }, n.$attrs, {
524
365
  ref_key: "inputElement",
525
- ref: n,
526
- onInput: m
527
- }), null, 16, Eo),
528
- y.type === "color" ? (R(), T(be, { key: 0 }, [
529
- L("label", Do, [
530
- An(L("input", {
366
+ ref: t,
367
+ onInput: P,
368
+ onChange: ee
369
+ }), null, 16, Te),
370
+ n.type === "color" ? (o(), u(E, { key: 0 }, [
371
+ c("label", Ae, [
372
+ te(c("input", {
531
373
  class: "invisible",
532
374
  type: "color",
533
- "onUpdate:modelValue": x[0] || (x[0] = (w) => r.value = w),
534
- onInput: m
535
- }, null, 544), [
536
- [$n, r.value]
375
+ disabled: n.isDisabled,
376
+ "onUpdate:modelValue": S[0] || (S[0] = (ae) => i.value = ae),
377
+ onInput: P
378
+ }, null, 40, Ee), [
379
+ [le, i.value]
537
380
  ]),
538
- L("span", {
381
+ c("span", {
539
382
  class: "border-1 absolute inset-0 block rounded border border-grey-600/25 bg-clip-border shadow",
540
- style: Nt(`background-color: ${r.value}`)
383
+ style: G(`background-color: ${i.value}`)
541
384
  }, null, 4)
542
385
  ]),
543
- _(f) && y.showColorPicker ? (R(), T("button", {
386
+ d(p) && n.showColorPicker ? (o(), u("button", {
544
387
  key: 0,
545
388
  type: "button",
546
389
  class: "absolute inset-y-2 right-2 h-7 w-7 rounded-full hover:bg-grey-200",
547
- onClick: g
390
+ disabled: n.isDisabled,
391
+ onClick: M
548
392
  }, [
549
- F(z, {
393
+ y(x, {
550
394
  size: "xs",
551
395
  name: "eyedropper"
552
396
  })
553
- ])) : M("", !0)
554
- ], 64)) : y.icon ? (R(), T("span", {
397
+ ], 8, Fe)) : m("", !0)
398
+ ], 64)) : n.icon ? (o(), u("span", {
555
399
  key: 1,
556
- class: $(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", _(a)])
400
+ class: b(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", d(z)])
557
401
  }, [
558
- F(z, { name: y.icon }, null, 8, ["name"])
559
- ], 2)) : M("", !0)
402
+ y(x, { name: n.icon }, null, 8, ["name"])
403
+ ], 2)) : m("", !0)
560
404
  ], 2));
561
405
  }
562
- }), Po = { class: "inline-block text-grey-700 dark:text-grey-200 text-sm font-medium casual-20" }, Lo = ["for"], To = {
406
+ }), Re = { class: "inline-block text-grey-700 dark:text-grey-200 text-sm font-medium casual-20" }, Ue = ["id", "for"], je = {
563
407
  key: 0,
564
408
  class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
565
- }, Pr = /* @__PURE__ */ A({
409
+ }, va = /* @__PURE__ */ v({
566
410
  __name: "Label",
567
411
  props: {
568
412
  id: {},
569
413
  label: {},
570
414
  description: {}
571
415
  },
572
- setup(e) {
573
- return (t, l) => (R(), T("span", Po, [
574
- L("label", { for: t.id }, G(t.label), 9, Lo),
575
- t.description ? (R(), T("span", To, G(t.description), 1)) : M("", !0)
416
+ setup(s) {
417
+ return (a, r) => (o(), u("span", Re, [
418
+ c("label", {
419
+ id: a.id ? `${a.id}-label` : void 0,
420
+ for: a.id
421
+ }, C(a.label), 9, Ue),
422
+ a.description ? (o(), u("span", je, C(a.description), 1)) : m("", !0)
576
423
  ]));
577
424
  }
578
- });
579
- function K(e, t, ...l) {
580
- if (e in t) {
581
- let n = t[e];
582
- return typeof n == "function" ? n(...l) : n;
583
- }
584
- 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(", ")}.`);
585
- throw Error.captureStackTrace && Error.captureStackTrace(o, K), o;
586
- }
587
- 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 || {});
588
- function j({ visible: e = !0, features: t = 0, ourProps: l, theirProps: o, ...n }) {
589
- var r;
590
- let i = Zt(o, l), u = Object.assign(n, { props: i });
591
- if (e || t & 2 && i.static)
592
- return Qe(u);
593
- if (t & 1) {
594
- let c = (r = i.unmount) == null || r ? 0 : 1;
595
- return K(c, { 0() {
596
- return null;
597
- }, 1() {
598
- return Qe({ ...n, props: { ...i, hidden: !0, style: { display: "none" } } });
599
- } });
600
- }
601
- return Qe(u);
602
- }
603
- function Qe({ props: e, attrs: t, slots: l, slot: o, name: n }) {
604
- var r, i;
605
- let { as: u, ...c } = it(e, ["unmount", "static"]), a = (r = l.default) == null ? void 0 : r.call(l, o), s = {};
606
- if (o) {
607
- let f = !1, v = [];
608
- for (let [p, g] of Object.entries(o))
609
- typeof g == "boolean" && (f = !0), g === !0 && v.push(p);
610
- f && (s["data-headlessui-state"] = v.join(" "));
611
- }
612
- if (u === "template") {
613
- if (a = Qt(a ?? []), Object.keys(c).length > 0 || Object.keys(t).length > 0) {
614
- let [f, ...v] = a ?? [];
615
- if (!Ao(f) || v.length > 0)
616
- 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(`
617
- `), "", "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(`
618
- `)].join(`
619
- `));
620
- let p = Zt((i = f.props) != null ? i : {}, c), g = Mn(f, p);
621
- for (let m in p)
622
- m.startsWith("on") && (g.props || (g.props = {}), g.props[m] = p[m]);
623
- return g;
624
- }
625
- return Array.isArray(a) && a.length === 1 ? a[0] : a;
626
- }
627
- return Oe(u, Object.assign({}, c, s), { default: () => a });
628
- }
629
- function Qt(e) {
630
- return e.flatMap((t) => t.type === be ? Qt(t.children) : [t]);
631
- }
632
- function Zt(...e) {
633
- if (e.length === 0)
634
- return {};
635
- if (e.length === 1)
636
- return e[0];
637
- let t = {}, l = {};
638
- for (let o of e)
639
- for (let n in o)
640
- n.startsWith("on") && typeof o[n] == "function" ? (l[n] != null || (l[n] = []), l[n].push(o[n])) : t[n] = o[n];
641
- if (t.disabled || t["aria-disabled"])
642
- return Object.assign(t, Object.fromEntries(Object.keys(l).map((o) => [o, void 0])));
643
- for (let o in l)
644
- Object.assign(t, { [o](n, ...r) {
645
- let i = l[o];
646
- for (let u of i) {
647
- if (n instanceof Event && n.defaultPrevented)
648
- return;
649
- u(n, ...r);
650
- }
651
- } });
652
- return t;
653
- }
654
- function Jt(e) {
655
- let t = Object.assign({}, e);
656
- for (let l in t)
657
- t[l] === void 0 && delete t[l];
658
- return t;
659
- }
660
- function it(e, t = []) {
661
- let l = Object.assign({}, e);
662
- for (let o of t)
663
- o in l && delete l[o];
664
- return l;
665
- }
666
- function Ao(e) {
667
- return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
668
- }
669
- let $o = 0;
670
- function Mo() {
671
- return ++$o;
672
- }
673
- function J() {
674
- return Mo();
675
- }
676
- var D = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(D || {});
677
- function Vo(e) {
678
- throw new Error("Unexpected object: " + e);
679
- }
680
- var I = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(I || {});
681
- function en(e, t) {
682
- let l = t.resolveItems();
683
- if (l.length <= 0)
684
- return null;
685
- let o = t.resolveActiveIndex(), n = o ?? -1, r = (() => {
686
- switch (e.focus) {
687
- case 0:
688
- return l.findIndex((i) => !t.resolveDisabled(i));
689
- case 1: {
690
- let i = l.slice().reverse().findIndex((u, c, a) => n !== -1 && a.length - c - 1 >= n ? !1 : !t.resolveDisabled(u));
691
- return i === -1 ? i : l.length - 1 - i;
692
- }
693
- case 2:
694
- return l.findIndex((i, u) => u <= n ? !1 : !t.resolveDisabled(i));
695
- case 3: {
696
- let i = l.slice().reverse().findIndex((u) => !t.resolveDisabled(u));
697
- return i === -1 ? i : l.length - 1 - i;
698
- }
699
- case 4:
700
- return l.findIndex((i) => t.resolveId(i) === e.id);
701
- case 5:
702
- return null;
703
- default:
704
- Vo(e);
705
- }
706
- })();
707
- return r === -1 ? o : r;
708
- }
709
- function E(e) {
710
- var t;
711
- return e == null || e.value == null ? null : (t = e.value.$el) != null ? t : e.value;
712
- }
713
- let tn = Symbol("Context");
714
- var te = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(te || {});
715
- function nn() {
716
- return he(tn, null);
717
- }
718
- function on(e) {
719
- ye(tn, e);
720
- }
721
- function Et(e, t) {
722
- if (e)
723
- return e;
724
- let l = t ?? "button";
725
- if (typeof l == "string" && l.toLowerCase() === "button")
726
- return "button";
727
- }
728
- function at(e, t) {
729
- let l = C(Et(e.value.type, e.value.as));
730
- return ee(() => {
731
- l.value = Et(e.value.type, e.value.as);
732
- }), xe(() => {
733
- var o;
734
- l.value || E(t) && E(t) instanceof HTMLButtonElement && !((o = E(t)) != null && o.hasAttribute("type")) && (l.value = "button");
735
- }), l;
736
- }
737
- var Fo = Object.defineProperty, No = (e, t, l) => t in e ? Fo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, Dt = (e, t, l) => (No(e, typeof t != "symbol" ? t + "" : t, l), l);
738
- class Bo {
739
- constructor() {
740
- Dt(this, "current", this.detect()), Dt(this, "currentId", 0);
741
- }
742
- set(t) {
743
- this.current !== t && (this.currentId = 0, this.current = t);
744
- }
745
- reset() {
746
- this.set(this.detect());
747
- }
748
- nextId() {
749
- return ++this.currentId;
750
- }
751
- get isServer() {
752
- return this.current === "server";
753
- }
754
- get isClient() {
755
- return this.current === "client";
756
- }
757
- detect() {
758
- return typeof window > "u" || typeof document > "u" ? "server" : "client";
759
- }
760
- }
761
- let st = new Bo();
762
- function ut(e) {
763
- if (st.isServer)
764
- return null;
765
- if (e instanceof Node)
766
- return e.ownerDocument;
767
- if (e != null && e.hasOwnProperty("value")) {
768
- let t = E(e);
769
- if (t)
770
- return t.ownerDocument;
771
- }
772
- return document;
773
- }
774
- function jo({ container: e, accept: t, walk: l, enabled: o }) {
775
- xe(() => {
776
- let n = e.value;
777
- if (!n || o !== void 0 && !o.value)
778
- return;
779
- let r = ut(e);
780
- if (!r)
781
- return;
782
- let i = Object.assign((c) => t(c), { acceptNode: t }), u = r.createTreeWalker(n, NodeFilter.SHOW_ELEMENT, i, !1);
783
- for (; u.nextNode(); )
784
- l(u.currentNode);
785
- });
786
- }
787
- let et = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
788
- var tt = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(tt || {}), zo = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(zo || {}), Ho = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Ho || {});
789
- function ln(e = document.body) {
790
- return e == null ? [] : Array.from(e.querySelectorAll(et)).sort((t, l) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (l.tabIndex || Number.MAX_SAFE_INTEGER)));
791
- }
792
- var je = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(je || {});
793
- function ze(e, t = 0) {
794
- var l;
795
- return e === ((l = ut(e)) == null ? void 0 : l.body) ? !1 : K(t, { 0() {
796
- return e.matches(et);
797
- }, 1() {
798
- let o = e;
799
- for (; o !== null; ) {
800
- if (o.matches(et))
801
- return !0;
802
- o = o.parentElement;
803
- }
804
- return !1;
805
- } });
806
- }
807
- function rn(e) {
808
- let t = ut(e);
809
- B(() => {
810
- t && !ze(t.activeElement, 0) && Wo(e);
811
- });
812
- }
813
- var Uo = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(Uo || {});
814
- typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
815
- e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
816
- }, !0), document.addEventListener("click", (e) => {
817
- e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
818
- }, !0));
819
- function Wo(e) {
820
- e == null || e.focus({ preventScroll: !0 });
821
- }
822
- let Ko = ["textarea", "input"].join(",");
823
- function Go(e) {
824
- var t, l;
825
- return (l = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, Ko)) != null ? l : !1;
826
- }
827
- function ct(e, t = (l) => l) {
828
- return e.slice().sort((l, o) => {
829
- let n = t(l), r = t(o);
830
- if (n === null || r === null)
831
- return 0;
832
- let i = n.compareDocumentPosition(r);
833
- return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
834
- });
835
- }
836
- function qo(e, t) {
837
- return Xo(ln(), t, { relativeTo: e });
838
- }
839
- function Xo(e, t, { sorted: l = !0, relativeTo: o = null, skipElements: n = [] } = {}) {
840
- var r;
841
- 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);
842
- n.length > 0 && u.length > 1 && (u = u.filter((g) => !n.includes(g))), o = o ?? i.activeElement;
843
- let c = (() => {
844
- if (t & 5)
845
- return 1;
846
- if (t & 10)
847
- return -1;
848
- throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
849
- })(), a = (() => {
850
- if (t & 1)
851
- return 0;
852
- if (t & 2)
853
- return Math.max(0, u.indexOf(o)) - 1;
854
- if (t & 4)
855
- return Math.max(0, u.indexOf(o)) + 1;
856
- if (t & 8)
857
- return u.length - 1;
858
- throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
859
- })(), s = t & 32 ? { preventScroll: !0 } : {}, f = 0, v = u.length, p;
860
- do {
861
- if (f >= v || f + v <= 0)
862
- return 0;
863
- let g = a + f;
864
- if (t & 16)
865
- g = (g + v) % v;
866
- else {
867
- if (g < 0)
868
- return 3;
869
- if (g >= v)
870
- return 1;
871
- }
872
- p = u[g], p == null || p.focus(s), f += c;
873
- } while (p !== i.activeElement);
874
- return t & 6 && Go(p) && p.select(), 2;
875
- }
876
- function Te(e, t, l) {
877
- st.isServer || xe((o) => {
878
- document.addEventListener(e, t, l), o(() => document.removeEventListener(e, t, l));
879
- });
880
- }
881
- function Yo(e, t, l) {
882
- st.isServer || xe((o) => {
883
- window.addEventListener(e, t, l), o(() => window.removeEventListener(e, t, l));
884
- });
885
- }
886
- function an(e, t, l = k(() => !0)) {
887
- function o(r, i) {
888
- if (!l.value || r.defaultPrevented)
889
- return;
890
- let u = i(r);
891
- if (u === null || !u.getRootNode().contains(u))
892
- return;
893
- let c = function a(s) {
894
- return typeof s == "function" ? a(s()) : Array.isArray(s) || s instanceof Set ? s : [s];
895
- }(e);
896
- for (let a of c) {
897
- if (a === null)
898
- continue;
899
- let s = a instanceof HTMLElement ? a : E(a);
900
- if (s != null && s.contains(u) || r.composed && r.composedPath().includes(s))
901
- return;
902
- }
903
- return !ze(u, je.Loose) && u.tabIndex !== -1 && r.preventDefault(), t(r, u);
904
- }
905
- let n = C(null);
906
- Te("pointerdown", (r) => {
907
- var i, u;
908
- l.value && (n.value = ((u = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : u[0]) || r.target);
909
- }, !0), Te("mousedown", (r) => {
910
- var i, u;
911
- l.value && (n.value = ((u = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : u[0]) || r.target);
912
- }, !0), Te("click", (r) => {
913
- n.value && (o(r, () => n.value), n.value = null);
914
- }, !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);
915
- }
916
- var dt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(dt || {});
917
- let sn = A({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: t, attrs: l }) {
918
- return () => {
919
- 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" } } };
920
- return j({ ourProps: r, theirProps: n, slot: {}, attrs: l, slots: t, name: "Hidden" });
921
- };
922
- } });
923
- function un(e = {}, t = null, l = []) {
924
- for (let [o, n] of Object.entries(e))
925
- dn(l, cn(t, o), n);
926
- return l;
927
- }
928
- function cn(e, t) {
929
- return e ? e + "[" + t + "]" : t;
930
- }
931
- function dn(e, t, l) {
932
- if (Array.isArray(l))
933
- for (let [o, n] of l.entries())
934
- dn(e, cn(t, o.toString()), n);
935
- else
936
- l instanceof Date ? e.push([t, l.toISOString()]) : typeof l == "boolean" ? e.push([t, l ? "1" : "0"]) : typeof l == "string" ? e.push([t, l]) : typeof l == "number" ? e.push([t, `${l}`]) : l == null ? e.push([t, ""]) : un(l, t, e);
937
- }
938
- function Qo(e) {
939
- var t, l;
940
- let o = (t = e == null ? void 0 : e.form) != null ? t : e.closest("form");
941
- if (o) {
942
- for (let n of o.elements)
943
- if (n !== e && (n.tagName === "INPUT" && n.type === "submit" || n.tagName === "BUTTON" && n.type === "submit" || n.nodeName === "INPUT" && n.type === "image")) {
944
- n.click();
945
- return;
946
- }
947
- (l = o.requestSubmit) == null || l.call(o);
948
- }
949
- }
950
- function fn(e, t, l) {
951
- let o = C(l == null ? void 0 : l.value), n = k(() => e.value !== void 0);
952
- return [k(() => n.value ? e.value : o.value), function(r) {
953
- return n.value || (o.value = r), t == null ? void 0 : t(r);
954
- }];
955
- }
956
- function _t(e) {
957
- return [e.screenX, e.screenY];
958
- }
959
- function pn() {
960
- let e = C([-1, -1]);
961
- return { wasMoved(t) {
962
- let l = _t(t);
963
- return e.value[0] === l[0] && e.value[1] === l[1] ? !1 : (e.value = l, !0);
964
- }, update(t) {
965
- e.value = _t(t);
966
- } };
967
- }
968
- let mn = Symbol("DescriptionContext");
969
- function Zo() {
970
- let e = he(mn, null);
971
- if (e === null)
972
- throw new Error("Missing parent");
973
- return e;
974
- }
975
- function Jo({ slot: e = C({}), name: t = "Description", props: l = {} } = {}) {
976
- let o = C([]);
977
- function n(r) {
978
- return o.value.push(r), () => {
979
- let i = o.value.indexOf(r);
980
- i !== -1 && o.value.splice(i, 1);
981
- };
982
- }
983
- return ye(mn, { register: n, slot: e, name: t, props: l }), k(() => o.value.length > 0 ? o.value.join(" ") : void 0);
984
- }
985
- A({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${J()}` } }, setup(e, { attrs: t, slots: l }) {
986
- let o = Zo();
987
- return ee(() => Ne(o.register(e.id))), () => {
988
- 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 };
989
- return j({ ourProps: a, theirProps: c, slot: r.value, attrs: t, slots: l, name: n });
990
- };
991
- } });
992
- let Pt = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
993
- function Lt(e) {
994
- var t, l;
995
- let o = (t = e.innerText) != null ? t : "", n = e.cloneNode(!0);
996
- if (!(n instanceof HTMLElement))
997
- return o;
998
- let r = !1;
999
- for (let u of n.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))
1000
- u.remove(), r = !0;
1001
- let i = r ? (l = n.innerText) != null ? l : "" : o;
1002
- return Pt.test(i) && (i = i.replace(Pt, "")), i;
1003
- }
1004
- function el(e) {
1005
- let t = e.getAttribute("aria-label");
1006
- if (typeof t == "string")
1007
- return t.trim();
1008
- let l = e.getAttribute("aria-labelledby");
1009
- if (l) {
1010
- let o = l.split(" ").map((n) => {
1011
- let r = document.getElementById(n);
1012
- if (r) {
1013
- let i = r.getAttribute("aria-label");
1014
- return typeof i == "string" ? i.trim() : Lt(r).trim();
1015
- }
1016
- return null;
1017
- }).filter(Boolean);
1018
- if (o.length > 0)
1019
- return o.join(", ");
1020
- }
1021
- return Lt(e).trim();
1022
- }
1023
- function vn(e) {
1024
- let t = C(""), l = C("");
1025
- return () => {
1026
- let o = E(e);
1027
- if (!o)
1028
- return "";
1029
- let n = o.innerText;
1030
- if (t.value === n)
1031
- return l.value;
1032
- let r = el(o).trim().toLowerCase();
1033
- return t.value = n, l.value = r, r;
1034
- };
1035
- }
1036
- function tl(e, t) {
1037
- return e === t;
1038
- }
1039
- var nl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(nl || {}), ol = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(ol || {}), ll = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(ll || {});
1040
- function rl(e) {
1041
- requestAnimationFrame(() => requestAnimationFrame(e));
1042
- }
1043
- let gn = Symbol("ListboxContext");
1044
- function De(e) {
1045
- let t = he(gn, null);
1046
- if (t === null) {
1047
- let l = new Error(`<${e} /> is missing a parent <Listbox /> component.`);
1048
- throw Error.captureStackTrace && Error.captureStackTrace(l, De), l;
1049
- }
1050
- return t;
1051
- }
1052
- 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 }) {
1053
- let n = C(1), r = C(null), i = C(null), u = C(null), c = C([]), a = C(""), s = C(null), f = C(1);
1054
- function v(x = (w) => w) {
1055
- 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;
1056
- return P === -1 && (P = null), { options: S, activeOptionIndex: P };
1057
- }
1058
- 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) {
1059
- if (typeof e.by == "string") {
1060
- let S = e.by;
1061
- return (x == null ? void 0 : x[S]) === (w == null ? void 0 : w[S]);
1062
- }
1063
- return e.by(x, w);
1064
- }, 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() {
1065
- e.disabled || n.value !== 1 && (n.value = 1, s.value = null);
1066
- }, openListbox() {
1067
- e.disabled || n.value !== 0 && (n.value = 0);
1068
- }, goToOption(x, w, S) {
1069
- if (e.disabled || n.value === 1)
1070
- return;
1071
- 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 });
1072
- a.value = "", s.value = O, f.value = S ?? 1, c.value = P.options;
1073
- }, search(x) {
1074
- if (e.disabled || n.value === 1)
1075
- return;
1076
- let w = a.value !== "" ? 0 : 1;
1077
- a.value += x.toLowerCase();
1078
- 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;
1079
- P === -1 || P === s.value || (s.value = P, f.value = 1);
1080
- }, clearSearch() {
1081
- e.disabled || n.value !== 1 && a.value !== "" && (a.value = "");
1082
- }, registerOption(x, w) {
1083
- let S = v((P) => [...P, { id: x, dataRef: w }]);
1084
- c.value = S.options, s.value = S.activeOptionIndex;
1085
- }, unregisterOption(x) {
1086
- let w = v((S) => {
1087
- let P = S.findIndex((O) => O.id === x);
1088
- return P !== -1 && S.splice(P, 1), S;
1089
- });
1090
- c.value = w.options, s.value = w.activeOptionIndex, f.value = 1;
1091
- }, theirOnChange(x) {
1092
- e.disabled || m(x);
1093
- }, select(x) {
1094
- e.disabled || m(K(p.value, { 0: () => x, 1: () => {
1095
- let w = X(b.value.value).slice(), S = X(x), P = w.findIndex((O) => b.compare(S, X(O)));
1096
- return P === -1 ? w.push(S) : w.splice(P, 1), w;
1097
- } }));
1098
- } };
1099
- an([i, u], (x, w) => {
1100
- var S;
1101
- b.closeListbox(), ze(w, je.Loose) || (x.preventDefault(), (S = E(i)) == null || S.focus());
1102
- }, k(() => n.value === 0)), ye(gn, b), on(k(() => K(n.value, { 0: te.Open, 1: te.Closed })));
1103
- let y = k(() => {
1104
- var x;
1105
- return (x = E(i)) == null ? void 0 : x.closest("form");
1106
- });
1107
- return ee(() => {
1108
- Q([y], () => {
1109
- if (!y.value || e.defaultValue === void 0)
1110
- return;
1111
- function x() {
1112
- b.theirOnChange(e.defaultValue);
1113
- }
1114
- return y.value.addEventListener("reset", x), () => {
1115
- var w;
1116
- (w = y.value) == null || w.removeEventListener("reset", x);
1117
- };
1118
- }, { immediate: !0 });
1119
- }), () => {
1120
- let { name: x, modelValue: w, disabled: S, form: P, ...O } = e, N = { open: n.value === 0, disabled: S, value: h.value };
1121
- 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" })]);
1122
- };
1123
- } });
1124
- A({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: () => `headlessui-listbox-label-${J()}` } }, setup(e, { attrs: t, slots: l }) {
1125
- let o = De("ListboxLabel");
1126
- function n() {
1127
- var r;
1128
- (r = E(o.buttonRef)) == null || r.focus({ preventScroll: !0 });
1129
- }
1130
- return () => {
1131
- let r = { open: o.listboxState.value === 0, disabled: o.disabled.value }, { id: i, ...u } = e, c = { id: i, ref: o.labelRef, onClick: n };
1132
- return j({ ourProps: c, theirProps: u, slot: r, attrs: t, slots: l, name: "ListboxLabel" });
1133
- };
1134
- } });
1135
- let al = A({ name: "ListboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-listbox-button-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
1136
- let n = De("ListboxButton");
1137
- o({ el: n.buttonRef, $el: n.buttonRef });
1138
- function r(a) {
1139
- switch (a.key) {
1140
- case D.Space:
1141
- case D.Enter:
1142
- case D.ArrowDown:
1143
- a.preventDefault(), n.openListbox(), B(() => {
1144
- var s;
1145
- (s = E(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(I.First);
1146
- });
1147
- break;
1148
- case D.ArrowUp:
1149
- a.preventDefault(), n.openListbox(), B(() => {
1150
- var s;
1151
- (s = E(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(I.Last);
1152
- });
1153
- break;
1154
- }
1155
- }
1156
- function i(a) {
1157
- switch (a.key) {
1158
- case D.Space:
1159
- a.preventDefault();
1160
- break;
1161
- }
1162
- }
1163
- function u(a) {
1164
- n.disabled.value || (n.listboxState.value === 0 ? (n.closeListbox(), B(() => {
1165
- var s;
1166
- return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
1167
- })) : (a.preventDefault(), n.openListbox(), rl(() => {
1168
- var s;
1169
- return (s = E(n.optionsRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
1170
- })));
1171
- }
1172
- let c = at(k(() => ({ as: e.as, type: t.type })), n.buttonRef);
1173
- return () => {
1174
- var a, s;
1175
- 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 };
1176
- return j({ ourProps: g, theirProps: p, slot: f, attrs: t, slots: l, name: "ListboxButton" });
1177
- };
1178
- } }), 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 }) {
1179
- let n = De("ListboxOptions"), r = C(null);
1180
- o({ el: n.optionsRef, $el: n.optionsRef });
1181
- function i(a) {
1182
- switch (r.value && clearTimeout(r.value), a.key) {
1183
- case D.Space:
1184
- if (n.searchQuery.value !== "")
1185
- return a.preventDefault(), a.stopPropagation(), n.search(a.key);
1186
- case D.Enter:
1187
- if (a.preventDefault(), a.stopPropagation(), n.activeOptionIndex.value !== null) {
1188
- let s = n.options.value[n.activeOptionIndex.value];
1189
- n.select(s.dataRef.value);
1190
- }
1191
- n.mode.value === 0 && (n.closeListbox(), B(() => {
1192
- var s;
1193
- return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
1194
- }));
1195
- break;
1196
- case K(n.orientation.value, { vertical: D.ArrowDown, horizontal: D.ArrowRight }):
1197
- return a.preventDefault(), a.stopPropagation(), n.goToOption(I.Next);
1198
- case K(n.orientation.value, { vertical: D.ArrowUp, horizontal: D.ArrowLeft }):
1199
- return a.preventDefault(), a.stopPropagation(), n.goToOption(I.Previous);
1200
- case D.Home:
1201
- case D.PageUp:
1202
- return a.preventDefault(), a.stopPropagation(), n.goToOption(I.First);
1203
- case D.End:
1204
- case D.PageDown:
1205
- return a.preventDefault(), a.stopPropagation(), n.goToOption(I.Last);
1206
- case D.Escape:
1207
- a.preventDefault(), a.stopPropagation(), n.closeListbox(), B(() => {
1208
- var s;
1209
- return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
1210
- });
1211
- break;
1212
- case D.Tab:
1213
- a.preventDefault(), a.stopPropagation();
1214
- break;
1215
- default:
1216
- a.key.length === 1 && (n.search(a.key), r.value = setTimeout(() => n.clearSearch(), 350));
1217
- break;
1218
- }
1219
- }
1220
- let u = nn(), c = k(() => u !== null ? (u.value & te.Open) === te.Open : n.listboxState.value === 0);
1221
- return () => {
1222
- var a, s, f, v;
1223
- 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 };
1224
- return j({ ourProps: h, theirProps: m, slot: p, attrs: t, slots: l, features: Re.RenderStrategy | Re.Static, visible: c.value, name: "ListboxOptions" });
1225
- };
1226
- } }), 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 }) {
1227
- let n = De("ListboxOption"), r = C(null);
1228
- o({ el: r, $el: r });
1229
- 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: () => {
1230
- var b;
1231
- let y = X(n.value.value);
1232
- 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;
1233
- }, 0: () => u.value })), a = vn(r), s = k(() => ({ disabled: e.disabled, value: e.value, get textValue() {
1234
- return a();
1235
- }, domRef: r }));
1236
- ee(() => n.registerOption(e.id, s)), Ne(() => n.unregisterOption(e.id)), ee(() => {
1237
- Q([n.listboxState, u], () => {
1238
- n.listboxState.value === 0 && u.value && K(n.mode.value, { 1: () => {
1239
- c.value && n.goToOption(I.Specific, e.id);
1240
- }, 0: () => {
1241
- n.goToOption(I.Specific, e.id);
1242
- } });
1243
- }, { immediate: !0 });
1244
- }), xe(() => {
1245
- n.listboxState.value === 0 && i.value && n.activationTrigger.value !== 0 && B(() => {
1246
- var b, y;
1247
- return (y = (b = E(r)) == null ? void 0 : b.scrollIntoView) == null ? void 0 : y.call(b, { block: "nearest" });
1248
- });
1249
- });
1250
- function f(b) {
1251
- if (e.disabled)
1252
- return b.preventDefault();
1253
- n.select(e.value), n.mode.value === 0 && (n.closeListbox(), B(() => {
1254
- var y;
1255
- return (y = E(n.buttonRef)) == null ? void 0 : y.focus({ preventScroll: !0 });
1256
- }));
1257
- }
1258
- function v() {
1259
- if (e.disabled)
1260
- return n.goToOption(I.Nothing);
1261
- n.goToOption(I.Specific, e.id);
1262
- }
1263
- let p = pn();
1264
- function g(b) {
1265
- p.update(b);
1266
- }
1267
- function m(b) {
1268
- p.wasMoved(b) && (e.disabled || i.value || n.goToOption(I.Specific, e.id, 0));
1269
- }
1270
- function h(b) {
1271
- p.wasMoved(b) && (e.disabled || i.value && n.goToOption(I.Nothing));
1272
- }
1273
- return () => {
1274
- 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 };
1275
- return j({ ourProps: O, theirProps: P, slot: y, attrs: l, slots: t, name: "ListboxOption" });
1276
- };
1277
- } });
1278
- 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 || {});
1279
- function fl(e) {
1280
- requestAnimationFrame(() => requestAnimationFrame(e));
1281
- }
1282
- let bn = Symbol("MenuContext");
1283
- function He(e) {
1284
- let t = he(bn, null);
1285
- if (t === null) {
1286
- let l = new Error(`<${e} /> is missing a parent <Menu /> component.`);
1287
- throw Error.captureStackTrace && Error.captureStackTrace(l, He), l;
1288
- }
1289
- return t;
1290
- }
1291
- let pl = A({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: l }) {
1292
- let o = C(1), n = C(null), r = C(null), i = C([]), u = C(""), c = C(null), a = C(1);
1293
- function s(v = (p) => p) {
1294
- 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;
1295
- return m === -1 && (m = null), { items: g, activeItemIndex: m };
1296
- }
1297
- let f = { menuState: o, buttonRef: n, itemsRef: r, items: i, searchQuery: u, activeItemIndex: c, activationTrigger: a, closeMenu: () => {
1298
- o.value = 1, c.value = null;
1299
- }, openMenu: () => o.value = 0, goToItem(v, p, g) {
1300
- 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 });
1301
- u.value = "", c.value = h, a.value = g ?? 1, i.value = m.items;
1302
- }, search(v) {
1303
- let p = u.value !== "" ? 0 : 1;
1304
- u.value += v.toLowerCase();
1305
- 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;
1306
- m === -1 || m === c.value || (c.value = m, a.value = 1);
1307
- }, clearSearch() {
1308
- u.value = "";
1309
- }, registerItem(v, p) {
1310
- let g = s((m) => [...m, { id: v, dataRef: p }]);
1311
- i.value = g.items, c.value = g.activeItemIndex, a.value = 1;
1312
- }, unregisterItem(v) {
1313
- let p = s((g) => {
1314
- let m = g.findIndex((h) => h.id === v);
1315
- return m !== -1 && g.splice(m, 1), g;
1316
- });
1317
- i.value = p.items, c.value = p.activeItemIndex, a.value = 1;
1318
- } };
1319
- return an([n, r], (v, p) => {
1320
- var g;
1321
- f.closeMenu(), ze(p, je.Loose) || (v.preventDefault(), (g = E(n)) == null || g.focus());
1322
- }, k(() => o.value === 0)), ye(bn, f), on(k(() => K(o.value, { 0: te.Open, 1: te.Closed }))), () => {
1323
- let v = { open: o.value === 0, close: f.closeMenu };
1324
- return j({ ourProps: {}, theirProps: e, slot: v, slots: t, attrs: l, name: "Menu" });
1325
- };
1326
- } }), 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 }) {
1327
- let n = He("MenuButton");
1328
- o({ el: n.buttonRef, $el: n.buttonRef });
1329
- function r(a) {
1330
- switch (a.key) {
1331
- case D.Space:
1332
- case D.Enter:
1333
- case D.ArrowDown:
1334
- a.preventDefault(), a.stopPropagation(), n.openMenu(), B(() => {
1335
- var s;
1336
- (s = E(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(I.First);
1337
- });
1338
- break;
1339
- case D.ArrowUp:
1340
- a.preventDefault(), a.stopPropagation(), n.openMenu(), B(() => {
1341
- var s;
1342
- (s = E(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(I.Last);
1343
- });
1344
- break;
1345
- }
1346
- }
1347
- function i(a) {
1348
- switch (a.key) {
1349
- case D.Space:
1350
- a.preventDefault();
1351
- break;
1352
- }
1353
- }
1354
- function u(a) {
1355
- e.disabled || (n.menuState.value === 0 ? (n.closeMenu(), B(() => {
1356
- var s;
1357
- return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
1358
- })) : (a.preventDefault(), n.openMenu(), fl(() => {
1359
- var s;
1360
- return (s = E(n.itemsRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
1361
- })));
1362
- }
1363
- let c = at(k(() => ({ as: e.as, type: t.type })), n.buttonRef);
1364
- return () => {
1365
- var a;
1366
- 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 };
1367
- return j({ ourProps: p, theirProps: v, slot: s, attrs: t, slots: l, name: "MenuButton" });
1368
- };
1369
- } }), 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 }) {
1370
- let n = He("MenuItems"), r = C(null);
1371
- o({ el: n.itemsRef, $el: n.itemsRef }), jo({ container: k(() => E(n.itemsRef)), enabled: k(() => n.menuState.value === 0), accept(s) {
1372
- return s.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : s.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
1373
- }, walk(s) {
1374
- s.setAttribute("role", "none");
1375
- } });
1376
- function i(s) {
1377
- var f;
1378
- switch (r.value && clearTimeout(r.value), s.key) {
1379
- case D.Space:
1380
- if (n.searchQuery.value !== "")
1381
- return s.preventDefault(), s.stopPropagation(), n.search(s.key);
1382
- case D.Enter:
1383
- if (s.preventDefault(), s.stopPropagation(), n.activeItemIndex.value !== null) {
1384
- let v = n.items.value[n.activeItemIndex.value];
1385
- (f = E(v.dataRef.domRef)) == null || f.click();
1386
- }
1387
- n.closeMenu(), rn(E(n.buttonRef));
1388
- break;
1389
- case D.ArrowDown:
1390
- return s.preventDefault(), s.stopPropagation(), n.goToItem(I.Next);
1391
- case D.ArrowUp:
1392
- return s.preventDefault(), s.stopPropagation(), n.goToItem(I.Previous);
1393
- case D.Home:
1394
- case D.PageUp:
1395
- return s.preventDefault(), s.stopPropagation(), n.goToItem(I.First);
1396
- case D.End:
1397
- case D.PageDown:
1398
- return s.preventDefault(), s.stopPropagation(), n.goToItem(I.Last);
1399
- case D.Escape:
1400
- s.preventDefault(), s.stopPropagation(), n.closeMenu(), B(() => {
1401
- var v;
1402
- return (v = E(n.buttonRef)) == null ? void 0 : v.focus({ preventScroll: !0 });
1403
- });
1404
- break;
1405
- case D.Tab:
1406
- s.preventDefault(), s.stopPropagation(), n.closeMenu(), B(() => qo(E(n.buttonRef), s.shiftKey ? tt.Previous : tt.Next));
1407
- break;
1408
- default:
1409
- s.key.length === 1 && (n.search(s.key), r.value = setTimeout(() => n.clearSearch(), 350));
1410
- break;
1411
- }
1412
- }
1413
- function u(s) {
1414
- switch (s.key) {
1415
- case D.Space:
1416
- s.preventDefault();
1417
- break;
1418
- }
1419
- }
1420
- let c = nn(), a = k(() => c !== null ? (c.value & te.Open) === te.Open : n.menuState.value === 0);
1421
- return () => {
1422
- var s, f;
1423
- 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 };
1424
- return j({ ourProps: m, theirProps: g, slot: v, attrs: t, slots: l, features: Re.RenderStrategy | Re.Static, visible: a.value, name: "MenuItems" });
1425
- };
1426
- } }), 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 }) {
1427
- let n = He("MenuItem"), r = C(null);
1428
- o({ el: r, $el: r });
1429
- 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() {
1430
- return u();
1431
- }, domRef: r }));
1432
- ee(() => n.registerItem(e.id, c)), Ne(() => n.unregisterItem(e.id)), xe(() => {
1433
- n.menuState.value === 0 && i.value && n.activationTrigger.value !== 0 && B(() => {
1434
- var m, h;
1435
- return (h = (m = E(r)) == null ? void 0 : m.scrollIntoView) == null ? void 0 : h.call(m, { block: "nearest" });
1436
- });
1437
- });
1438
- function a(m) {
1439
- if (e.disabled)
1440
- return m.preventDefault();
1441
- n.closeMenu(), rn(E(n.buttonRef));
1442
- }
1443
- function s() {
1444
- if (e.disabled)
1445
- return n.goToItem(I.Nothing);
1446
- n.goToItem(I.Specific, e.id);
1447
- }
1448
- let f = pn();
1449
- function v(m) {
1450
- f.update(m);
1451
- }
1452
- function p(m) {
1453
- f.wasMoved(m) && (e.disabled || i.value || n.goToItem(I.Specific, e.id, 0));
1454
- }
1455
- function g(m) {
1456
- f.wasMoved(m) && (e.disabled || i.value && n.goToItem(I.Nothing));
1457
- }
1458
- return () => {
1459
- let { disabled: m } = e, h = { active: i.value, disabled: m, close: n.closeMenu }, { id: b, ...y } = e;
1460
- 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" });
1461
- };
1462
- } }), hn = Symbol("LabelContext");
1463
- function yn() {
1464
- let e = he(hn, null);
1465
- if (e === null) {
1466
- let t = new Error("You used a <Label /> component, but it is not inside a parent.");
1467
- throw Error.captureStackTrace && Error.captureStackTrace(t, yn), t;
1468
- }
1469
- return e;
1470
- }
1471
- function bl({ slot: e = {}, name: t = "Label", props: l = {} } = {}) {
1472
- let o = C([]);
1473
- function n(r) {
1474
- return o.value.push(r), () => {
1475
- let i = o.value.indexOf(r);
1476
- i !== -1 && o.value.splice(i, 1);
1477
- };
1478
- }
1479
- return ye(hn, { register: n, slot: e, name: t, props: l }), k(() => o.value.length > 0 ? o.value.join(" ") : void 0);
1480
- }
1481
- 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 }) {
1482
- let o = yn();
1483
- return ee(() => Ne(o.register(e.id))), () => {
1484
- 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 };
1485
- return c && (delete s.onClick, delete s.htmlFor, delete a.onClick), j({ ourProps: s, theirProps: a, slot: r, attrs: l, slots: t, name: n });
1486
- };
1487
- } });
1488
- let xn = Symbol("GroupContext");
1489
- A({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: l }) {
1490
- let o = C(null), n = bl({ name: "SwitchLabel", props: { htmlFor: k(() => {
1491
- var i;
1492
- return (i = o.value) == null ? void 0 : i.id;
1493
- }), onClick(i) {
1494
- o.value && (i.currentTarget.tagName === "LABEL" && i.preventDefault(), o.value.click(), o.value.focus({ preventScroll: !0 }));
1495
- } } }), r = Jo({ name: "SwitchDescription" });
1496
- return ye(xn, { switchRef: o, labelledby: n, describedby: r }), () => j({ theirProps: e, ourProps: {}, slot: {}, slots: t, attrs: l, name: "SwitchGroup" });
1497
- } });
1498
- let hl = A({ name: "Switch", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: void 0 }, defaultChecked: { type: Boolean, optional: !0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, value: { type: String, optional: !0 }, id: { type: String, default: () => `headlessui-switch-${J()}` } }, inheritAttrs: !1, setup(e, { emit: t, attrs: l, slots: o, expose: n }) {
1499
- let r = he(xn, null), [i, u] = fn(k(() => e.modelValue), (h) => t("update:modelValue", h), k(() => e.defaultChecked));
1500
- function c() {
1501
- u(!i.value);
1502
- }
1503
- let a = C(null), s = r === null ? a : r.switchRef, f = at(k(() => ({ as: e.as, type: l.type })), s);
1504
- n({ el: s, $el: s });
1505
- function v(h) {
1506
- h.preventDefault(), c();
1507
- }
1508
- function p(h) {
1509
- h.key === D.Space ? (h.preventDefault(), c()) : h.key === D.Enter && Qo(h.currentTarget);
1510
- }
1511
- function g(h) {
1512
- h.preventDefault();
1513
- }
1514
- let m = k(() => {
1515
- var h, b;
1516
- return (b = (h = E(s)) == null ? void 0 : h.closest) == null ? void 0 : b.call(h, "form");
1517
- });
1518
- return ee(() => {
1519
- Q([m], () => {
1520
- if (!m.value || e.defaultChecked === void 0)
1521
- return;
1522
- function h() {
1523
- u(e.defaultChecked);
1524
- }
1525
- return m.value.addEventListener("reset", h), () => {
1526
- var b;
1527
- (b = m.value) == null || b.removeEventListener("reset", h);
1528
- };
1529
- }, { immediate: !0 });
1530
- }), () => {
1531
- 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 };
1532
- 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" })]);
1533
- };
1534
- } });
1535
- const $e = Math.min, ue = Math.max, Me = Math.round, Ie = Math.floor, ae = (e) => ({
1536
- x: e,
1537
- y: e
1538
- }), yl = {
1539
- left: "right",
1540
- right: "left",
1541
- bottom: "top",
1542
- top: "bottom"
1543
- }, xl = {
1544
- start: "end",
1545
- end: "start"
1546
- };
1547
- function Tt(e, t, l) {
1548
- return ue(e, $e(t, l));
1549
- }
1550
- function Ue(e, t) {
1551
- return typeof e == "function" ? e(t) : e;
1552
- }
1553
- function ce(e) {
1554
- return e.split("-")[0];
1555
- }
1556
- function We(e) {
1557
- return e.split("-")[1];
1558
- }
1559
- function wn(e) {
1560
- return e === "x" ? "y" : "x";
1561
- }
1562
- function kn(e) {
1563
- return e === "y" ? "height" : "width";
1564
- }
1565
- function Ke(e) {
1566
- return ["top", "bottom"].includes(ce(e)) ? "y" : "x";
1567
- }
1568
- function Sn(e) {
1569
- return wn(Ke(e));
1570
- }
1571
- function wl(e, t, l) {
1572
- l === void 0 && (l = !1);
1573
- const o = We(e), n = Sn(e), r = kn(n);
1574
- let i = n === "x" ? o === (l ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
1575
- return t.reference[r] > t.floating[r] && (i = Ve(i)), [i, Ve(i)];
1576
- }
1577
- function kl(e) {
1578
- const t = Ve(e);
1579
- return [nt(e), t, nt(t)];
1580
- }
1581
- function nt(e) {
1582
- return e.replace(/start|end/g, (t) => xl[t]);
1583
- }
1584
- function Sl(e, t, l) {
1585
- const o = ["left", "right"], n = ["right", "left"], r = ["top", "bottom"], i = ["bottom", "top"];
1586
- switch (e) {
1587
- case "top":
1588
- case "bottom":
1589
- return l ? t ? n : o : t ? o : n;
1590
- case "left":
1591
- case "right":
1592
- return t ? r : i;
1593
- default:
1594
- return [];
1595
- }
1596
- }
1597
- function Cl(e, t, l, o) {
1598
- const n = We(e);
1599
- let r = Sl(ce(e), l === "start", o);
1600
- return n && (r = r.map((i) => i + "-" + n), t && (r = r.concat(r.map(nt)))), r;
1601
- }
1602
- function Ve(e) {
1603
- return e.replace(/left|right|bottom|top/g, (t) => yl[t]);
1604
- }
1605
- function Ol(e) {
1606
- return {
1607
- top: 0,
1608
- right: 0,
1609
- bottom: 0,
1610
- left: 0,
1611
- ...e
1612
- };
1613
- }
1614
- function Rl(e) {
1615
- return typeof e != "number" ? Ol(e) : {
1616
- top: e,
1617
- right: e,
1618
- bottom: e,
1619
- left: e
1620
- };
1621
- }
1622
- function Fe(e) {
1623
- return {
1624
- ...e,
1625
- top: e.y,
1626
- left: e.x,
1627
- right: e.x + e.width,
1628
- bottom: e.y + e.height
1629
- };
1630
- }
1631
- function It(e, t, l) {
1632
- let {
1633
- reference: o,
1634
- floating: n
1635
- } = e;
1636
- 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;
1637
- let p;
1638
- switch (c) {
1639
- case "top":
1640
- p = {
1641
- x: s,
1642
- y: o.y - n.height
1643
- };
1644
- break;
1645
- case "bottom":
1646
- p = {
1647
- x: s,
1648
- y: o.y + o.height
1649
- };
1650
- break;
1651
- case "right":
1652
- p = {
1653
- x: o.x + o.width,
1654
- y: f
1655
- };
1656
- break;
1657
- case "left":
1658
- p = {
1659
- x: o.x - n.width,
1660
- y: f
1661
- };
1662
- break;
1663
- default:
1664
- p = {
1665
- x: o.x,
1666
- y: o.y
1667
- };
1668
- }
1669
- switch (We(t)) {
1670
- case "start":
1671
- p[i] -= v * (l && a ? -1 : 1);
1672
- break;
1673
- case "end":
1674
- p[i] += v * (l && a ? -1 : 1);
1675
- break;
1676
- }
1677
- return p;
1678
- }
1679
- const El = async (e, t, l) => {
1680
- const {
1681
- placement: o = "bottom",
1682
- strategy: n = "absolute",
1683
- middleware: r = [],
1684
- platform: i
1685
- } = l, u = r.filter(Boolean), c = await (i.isRTL == null ? void 0 : i.isRTL(t));
1686
- let a = await i.getElementRects({
1687
- reference: e,
1688
- floating: t,
1689
- strategy: n
1690
- }), {
1691
- x: s,
1692
- y: f
1693
- } = It(a, o, c), v = o, p = {}, g = 0;
1694
- for (let m = 0; m < u.length; m++) {
1695
- const {
1696
- name: h,
1697
- fn: b
1698
- } = u[m], {
1699
- x: y,
1700
- y: x,
1701
- data: w,
1702
- reset: S
1703
- } = await b({
1704
- x: s,
1705
- y: f,
1706
- initialPlacement: o,
1707
- placement: v,
1708
- strategy: n,
1709
- middlewareData: p,
1710
- rects: a,
1711
- platform: i,
1712
- elements: {
1713
- reference: e,
1714
- floating: t
1715
- }
1716
- });
1717
- if (s = y ?? s, f = x ?? f, p = {
1718
- ...p,
1719
- [h]: {
1720
- ...p[h],
1721
- ...w
1722
- }
1723
- }, S && g <= 50) {
1724
- g++, typeof S == "object" && (S.placement && (v = S.placement), S.rects && (a = S.rects === !0 ? await i.getElementRects({
1725
- reference: e,
1726
- floating: t,
1727
- strategy: n
1728
- }) : S.rects), {
1729
- x: s,
1730
- y: f
1731
- } = It(a, v, c)), m = -1;
1732
- continue;
1733
- }
1734
- }
1735
- return {
1736
- x: s,
1737
- y: f,
1738
- placement: v,
1739
- strategy: n,
1740
- middlewareData: p
1741
- };
1742
- };
1743
- async function Cn(e, t) {
1744
- var l;
1745
- t === void 0 && (t = {});
1746
- const {
1747
- x: o,
1748
- y: n,
1749
- platform: r,
1750
- rects: i,
1751
- elements: u,
1752
- strategy: c
1753
- } = e, {
1754
- boundary: a = "clippingAncestors",
1755
- rootBoundary: s = "viewport",
1756
- elementContext: f = "floating",
1757
- altBoundary: v = !1,
1758
- padding: p = 0
1759
- } = Ue(t, e), g = Rl(p), h = u[v ? f === "floating" ? "reference" : "floating" : f], b = Fe(await r.getClippingRect({
1760
- 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)),
1761
- boundary: a,
1762
- rootBoundary: s,
1763
- strategy: c
1764
- })), y = f === "floating" ? {
1765
- ...i.floating,
1766
- x: o,
1767
- y: n
1768
- } : i.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(u.floating)), w = await (r.isElement == null ? void 0 : r.isElement(x)) ? await (r.getScale == null ? void 0 : r.getScale(x)) || {
1769
- x: 1,
1770
- y: 1
1771
- } : {
1772
- x: 1,
1773
- y: 1
1774
- }, S = Fe(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
1775
- rect: y,
1776
- offsetParent: x,
1777
- strategy: c
1778
- }) : y);
1779
- return {
1780
- top: (b.top - S.top + g.top) / w.y,
1781
- bottom: (S.bottom - b.bottom + g.bottom) / w.y,
1782
- left: (b.left - S.left + g.left) / w.x,
1783
- right: (S.right - b.right + g.right) / w.x
1784
- };
1785
- }
1786
- const Dl = function(e) {
1787
- return e === void 0 && (e = {}), {
1788
- name: "flip",
1789
- options: e,
1790
- async fn(t) {
1791
- var l, o;
1792
- const {
1793
- placement: n,
1794
- middlewareData: r,
1795
- rects: i,
1796
- initialPlacement: u,
1797
- platform: c,
1798
- elements: a
1799
- } = t, {
1800
- mainAxis: s = !0,
1801
- crossAxis: f = !0,
1802
- fallbackPlacements: v,
1803
- fallbackStrategy: p = "bestFit",
1804
- fallbackAxisSideDirection: g = "none",
1805
- flipAlignment: m = !0,
1806
- ...h
1807
- } = Ue(e, t);
1808
- if ((l = r.arrow) != null && l.alignmentOffset)
1809
- return {};
1810
- 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));
1811
- !v && g !== "none" && w.push(...Cl(u, m, g, x));
1812
- const S = [u, ...w], P = await Cn(t, h), O = [];
1813
- let N = ((o = r.flip) == null ? void 0 : o.overflows) || [];
1814
- if (s && O.push(P[b]), f) {
1815
- const se = wl(n, i, x);
1816
- O.push(P[se[0]], P[se[1]]);
1817
- }
1818
- if (N = [...N, {
1819
- placement: n,
1820
- overflows: O
1821
- }], !O.every((se) => se <= 0)) {
1822
- var re, Pe;
1823
- const se = (((re = r.flip) == null ? void 0 : re.index) || 0) + 1, bt = S[se];
1824
- if (bt)
1825
- return {
1826
- data: {
1827
- index: se,
1828
- overflows: N
1829
- },
1830
- reset: {
1831
- placement: bt
1832
- }
1833
- };
1834
- 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;
1835
- if (!we)
1836
- switch (p) {
1837
- case "bestFit": {
1838
- var gt;
1839
- 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];
1840
- fe && (we = fe);
1841
- break;
1842
- }
1843
- case "initialPlacement":
1844
- we = u;
1845
- break;
1846
- }
1847
- if (n !== we)
1848
- return {
1849
- reset: {
1850
- placement: we
1851
- }
1852
- };
1853
- }
1854
- return {};
1855
- }
1856
- };
1857
- };
1858
- async function _l(e, t) {
1859
- const {
1860
- placement: l,
1861
- platform: o,
1862
- elements: n
1863
- } = 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);
1864
- let {
1865
- mainAxis: v,
1866
- crossAxis: p,
1867
- alignmentAxis: g
1868
- } = typeof f == "number" ? {
1869
- mainAxis: f,
1870
- crossAxis: 0,
1871
- alignmentAxis: null
1872
- } : {
1873
- mainAxis: 0,
1874
- crossAxis: 0,
1875
- alignmentAxis: null,
1876
- ...f
1877
- };
1878
- return u && typeof g == "number" && (p = u === "end" ? g * -1 : g), c ? {
1879
- x: p * s,
1880
- y: v * a
1881
- } : {
1882
- x: v * a,
1883
- y: p * s
1884
- };
1885
- }
1886
- const Pl = function(e) {
1887
- return e === void 0 && (e = 0), {
1888
- name: "offset",
1889
- options: e,
1890
- async fn(t) {
1891
- var l, o;
1892
- const {
1893
- x: n,
1894
- y: r,
1895
- placement: i,
1896
- middlewareData: u
1897
- } = t, c = await _l(t, e);
1898
- return i === ((l = u.offset) == null ? void 0 : l.placement) && (o = u.arrow) != null && o.alignmentOffset ? {} : {
1899
- x: n + c.x,
1900
- y: r + c.y,
1901
- data: {
1902
- ...c,
1903
- placement: i
1904
- }
1905
- };
1906
- }
1907
- };
1908
- }, Ll = function(e) {
1909
- return e === void 0 && (e = {}), {
1910
- name: "shift",
1911
- options: e,
1912
- async fn(t) {
1913
- const {
1914
- x: l,
1915
- y: o,
1916
- placement: n
1917
- } = t, {
1918
- mainAxis: r = !0,
1919
- crossAxis: i = !1,
1920
- limiter: u = {
1921
- fn: (h) => {
1922
- let {
1923
- x: b,
1924
- y
1925
- } = h;
1926
- return {
1927
- x: b,
1928
- y
1929
- };
1930
- }
1931
- },
1932
- ...c
1933
- } = Ue(e, t), a = {
1934
- x: l,
1935
- y: o
1936
- }, s = await Cn(t, c), f = Ke(ce(n)), v = wn(f);
1937
- let p = a[v], g = a[f];
1938
- if (r) {
1939
- const h = v === "y" ? "top" : "left", b = v === "y" ? "bottom" : "right", y = p + s[h], x = p - s[b];
1940
- p = Tt(y, p, x);
1941
- }
1942
- if (i) {
1943
- const h = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", y = g + s[h], x = g - s[b];
1944
- g = Tt(y, g, x);
1945
- }
1946
- const m = u.fn({
1947
- ...t,
1948
- [v]: p,
1949
- [f]: g
1950
- });
1951
- return {
1952
- ...m,
1953
- data: {
1954
- x: m.x - l,
1955
- y: m.y - o
1956
- }
1957
- };
1958
- }
1959
- };
1960
- };
1961
- function ne(e) {
1962
- return ft(e) ? (e.nodeName || "").toLowerCase() : "#document";
1963
- }
1964
- function H(e) {
1965
- var t;
1966
- return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
1967
- }
1968
- function le(e) {
1969
- var t;
1970
- return (t = (ft(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
1971
- }
1972
- function ft(e) {
1973
- return e instanceof Node || e instanceof H(e).Node;
1974
- }
1975
- function oe(e) {
1976
- return e instanceof Element || e instanceof H(e).Element;
1977
- }
1978
- function Z(e) {
1979
- return e instanceof HTMLElement || e instanceof H(e).HTMLElement;
1980
- }
1981
- function At(e) {
1982
- return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof H(e).ShadowRoot;
1983
- }
1984
- function _e(e) {
1985
- const {
1986
- overflow: t,
1987
- overflowX: l,
1988
- overflowY: o,
1989
- display: n
1990
- } = q(e);
1991
- return /auto|scroll|overlay|hidden|clip/.test(t + o + l) && !["inline", "contents"].includes(n);
1992
- }
1993
- function Tl(e) {
1994
- return ["table", "td", "th"].includes(ne(e));
1995
- }
1996
- function pt(e) {
1997
- const t = mt(), l = q(e);
1998
- 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));
1999
- }
2000
- function Il(e) {
2001
- let t = ge(e);
2002
- for (; Z(t) && !Ge(t); ) {
2003
- if (pt(t))
2004
- return t;
2005
- t = ge(t);
2006
- }
2007
- return null;
2008
- }
2009
- function mt() {
2010
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
2011
- }
2012
- function Ge(e) {
2013
- return ["html", "body", "#document"].includes(ne(e));
2014
- }
2015
- function q(e) {
2016
- return H(e).getComputedStyle(e);
2017
- }
2018
- function qe(e) {
2019
- return oe(e) ? {
2020
- scrollLeft: e.scrollLeft,
2021
- scrollTop: e.scrollTop
2022
- } : {
2023
- scrollLeft: e.pageXOffset,
2024
- scrollTop: e.pageYOffset
2025
- };
2026
- }
2027
- function ge(e) {
2028
- if (ne(e) === "html")
2029
- return e;
2030
- const t = (
2031
- // Step into the shadow DOM of the parent of a slotted node.
2032
- e.assignedSlot || // DOM Element detected.
2033
- e.parentNode || // ShadowRoot detected.
2034
- At(e) && e.host || // Fallback.
2035
- le(e)
2036
- );
2037
- return At(t) ? t.host : t;
2038
- }
2039
- function On(e) {
2040
- const t = ge(e);
2041
- return Ge(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Z(t) && _e(t) ? t : On(t);
2042
- }
2043
- function Ee(e, t, l) {
2044
- var o;
2045
- t === void 0 && (t = []), l === void 0 && (l = !0);
2046
- const n = On(e), r = n === ((o = e.ownerDocument) == null ? void 0 : o.body), i = H(n);
2047
- return r ? t.concat(i, i.visualViewport || [], _e(n) ? n : [], i.frameElement && l ? Ee(i.frameElement) : []) : t.concat(n, Ee(n, [], l));
2048
- }
2049
- function Rn(e) {
2050
- const t = q(e);
2051
- let l = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
2052
- const n = Z(e), r = n ? e.offsetWidth : l, i = n ? e.offsetHeight : o, u = Me(l) !== r || Me(o) !== i;
2053
- return u && (l = r, o = i), {
2054
- width: l,
2055
- height: o,
2056
- $: u
2057
- };
2058
- }
2059
- function vt(e) {
2060
- return oe(e) ? e : e.contextElement;
2061
- }
2062
- function ve(e) {
2063
- const t = vt(e);
2064
- if (!Z(t))
2065
- return ae(1);
2066
- const l = t.getBoundingClientRect(), {
2067
- width: o,
2068
- height: n,
2069
- $: r
2070
- } = Rn(t);
2071
- let i = (r ? Me(l.width) : l.width) / o, u = (r ? Me(l.height) : l.height) / n;
2072
- return (!i || !Number.isFinite(i)) && (i = 1), (!u || !Number.isFinite(u)) && (u = 1), {
2073
- x: i,
2074
- y: u
2075
- };
2076
- }
2077
- const Al = /* @__PURE__ */ ae(0);
2078
- function En(e) {
2079
- const t = H(e);
2080
- return !mt() || !t.visualViewport ? Al : {
2081
- x: t.visualViewport.offsetLeft,
2082
- y: t.visualViewport.offsetTop
2083
- };
2084
- }
2085
- function $l(e, t, l) {
2086
- return t === void 0 && (t = !1), !l || t && l !== H(e) ? !1 : t;
2087
- }
2088
- function de(e, t, l, o) {
2089
- t === void 0 && (t = !1), l === void 0 && (l = !1);
2090
- const n = e.getBoundingClientRect(), r = vt(e);
2091
- let i = ae(1);
2092
- t && (o ? oe(o) && (i = ve(o)) : i = ve(e));
2093
- const u = $l(r, l, o) ? En(r) : ae(0);
2094
- 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;
2095
- if (r) {
2096
- const v = H(r), p = o && oe(o) ? H(o) : o;
2097
- let g = v.frameElement;
2098
- for (; g && o && p !== v; ) {
2099
- 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;
2100
- c *= m.x, a *= m.y, s *= m.x, f *= m.y, c += y, a += x, g = H(g).frameElement;
2101
- }
2102
- }
2103
- return Fe({
2104
- width: s,
2105
- height: f,
2106
- x: c,
2107
- y: a
2108
- });
2109
- }
2110
- function Ml(e) {
2111
- let {
2112
- rect: t,
2113
- offsetParent: l,
2114
- strategy: o
2115
- } = e;
2116
- const n = Z(l), r = le(l);
2117
- if (l === r)
2118
- return t;
2119
- let i = {
2120
- scrollLeft: 0,
2121
- scrollTop: 0
2122
- }, u = ae(1);
2123
- const c = ae(0);
2124
- if ((n || !n && o !== "fixed") && ((ne(l) !== "body" || _e(r)) && (i = qe(l)), Z(l))) {
2125
- const a = de(l);
2126
- u = ve(l), c.x = a.x + l.clientLeft, c.y = a.y + l.clientTop;
2127
- }
2128
- return {
2129
- width: t.width * u.x,
2130
- height: t.height * u.y,
2131
- x: t.x * u.x - i.scrollLeft * u.x + c.x,
2132
- y: t.y * u.y - i.scrollTop * u.y + c.y
2133
- };
2134
- }
2135
- function Vl(e) {
2136
- return Array.from(e.getClientRects());
2137
- }
2138
- function Dn(e) {
2139
- return de(le(e)).left + qe(e).scrollLeft;
2140
- }
2141
- function Fl(e) {
2142
- const t = le(e), l = qe(e), o = e.ownerDocument.body, n = ue(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = ue(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
2143
- let i = -l.scrollLeft + Dn(e);
2144
- const u = -l.scrollTop;
2145
- return q(o).direction === "rtl" && (i += ue(t.clientWidth, o.clientWidth) - n), {
2146
- width: n,
2147
- height: r,
2148
- x: i,
2149
- y: u
2150
- };
2151
- }
2152
- function Nl(e, t) {
2153
- const l = H(e), o = le(e), n = l.visualViewport;
2154
- let r = o.clientWidth, i = o.clientHeight, u = 0, c = 0;
2155
- if (n) {
2156
- r = n.width, i = n.height;
2157
- const a = mt();
2158
- (!a || a && t === "fixed") && (u = n.offsetLeft, c = n.offsetTop);
2159
- }
2160
- return {
2161
- width: r,
2162
- height: i,
2163
- x: u,
2164
- y: c
2165
- };
2166
- }
2167
- function Bl(e, t) {
2168
- const l = de(e, !0, t === "fixed"), o = l.top + e.clientTop, n = l.left + e.clientLeft, r = Z(e) ? ve(e) : ae(1), i = e.clientWidth * r.x, u = e.clientHeight * r.y, c = n * r.x, a = o * r.y;
2169
- return {
2170
- width: i,
2171
- height: u,
2172
- x: c,
2173
- y: a
2174
- };
2175
- }
2176
- function $t(e, t, l) {
2177
- let o;
2178
- if (t === "viewport")
2179
- o = Nl(e, l);
2180
- else if (t === "document")
2181
- o = Fl(le(e));
2182
- else if (oe(t))
2183
- o = Bl(t, l);
2184
- else {
2185
- const n = En(e);
2186
- o = {
2187
- ...t,
2188
- x: t.x - n.x,
2189
- y: t.y - n.y
2190
- };
2191
- }
2192
- return Fe(o);
2193
- }
2194
- function _n(e, t) {
2195
- const l = ge(e);
2196
- return l === t || !oe(l) || Ge(l) ? !1 : q(l).position === "fixed" || _n(l, t);
2197
- }
2198
- function jl(e, t) {
2199
- const l = t.get(e);
2200
- if (l)
2201
- return l;
2202
- let o = Ee(e, [], !1).filter((u) => oe(u) && ne(u) !== "body"), n = null;
2203
- const r = q(e).position === "fixed";
2204
- let i = r ? ge(e) : e;
2205
- for (; oe(i) && !Ge(i); ) {
2206
- const u = q(i), c = pt(i);
2207
- !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);
2208
- }
2209
- return t.set(e, o), o;
2210
- }
2211
- function zl(e) {
2212
- let {
2213
- element: t,
2214
- boundary: l,
2215
- rootBoundary: o,
2216
- strategy: n
2217
- } = e;
2218
- const i = [...l === "clippingAncestors" ? jl(t, this._c) : [].concat(l), o], u = i[0], c = i.reduce((a, s) => {
2219
- const f = $t(t, s, n);
2220
- 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;
2221
- }, $t(t, u, n));
2222
- return {
2223
- width: c.right - c.left,
2224
- height: c.bottom - c.top,
2225
- x: c.left,
2226
- y: c.top
2227
- };
2228
- }
2229
- function Hl(e) {
2230
- const {
2231
- width: t,
2232
- height: l
2233
- } = Rn(e);
2234
- return {
2235
- width: t,
2236
- height: l
2237
- };
2238
- }
2239
- function Ul(e, t, l) {
2240
- const o = Z(t), n = le(t), r = l === "fixed", i = de(e, !0, r, t);
2241
- let u = {
2242
- scrollLeft: 0,
2243
- scrollTop: 0
2244
- };
2245
- const c = ae(0);
2246
- if (o || !o && !r)
2247
- if ((ne(t) !== "body" || _e(n)) && (u = qe(t)), o) {
2248
- const a = de(t, !0, r, t);
2249
- c.x = a.x + t.clientLeft, c.y = a.y + t.clientTop;
2250
- } else
2251
- n && (c.x = Dn(n));
2252
- return {
2253
- x: i.left + u.scrollLeft - c.x,
2254
- y: i.top + u.scrollTop - c.y,
2255
- width: i.width,
2256
- height: i.height
2257
- };
2258
- }
2259
- function Mt(e, t) {
2260
- return !Z(e) || q(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
2261
- }
2262
- function Pn(e, t) {
2263
- const l = H(e);
2264
- if (!Z(e))
2265
- return l;
2266
- let o = Mt(e, t);
2267
- for (; o && Tl(o) && q(o).position === "static"; )
2268
- o = Mt(o, t);
2269
- return o && (ne(o) === "html" || ne(o) === "body" && q(o).position === "static" && !pt(o)) ? l : o || Il(e) || l;
2270
- }
2271
- const Wl = async function(e) {
2272
- let {
2273
- reference: t,
2274
- floating: l,
2275
- strategy: o
2276
- } = e;
2277
- const n = this.getOffsetParent || Pn, r = this.getDimensions;
2278
- return {
2279
- reference: Ul(t, await n(l), o),
2280
- floating: {
2281
- x: 0,
2282
- y: 0,
2283
- ...await r(l)
2284
- }
2285
- };
2286
- };
2287
- function Kl(e) {
2288
- return q(e).direction === "rtl";
2289
- }
2290
- const Gl = {
2291
- convertOffsetParentRelativeRectToViewportRelativeRect: Ml,
2292
- getDocumentElement: le,
2293
- getClippingRect: zl,
2294
- getOffsetParent: Pn,
2295
- getElementRects: Wl,
2296
- getClientRects: Vl,
2297
- getDimensions: Hl,
2298
- getScale: ve,
2299
- isElement: oe,
2300
- isRTL: Kl
2301
- };
2302
- function ql(e, t) {
2303
- let l = null, o;
2304
- const n = le(e);
2305
- function r() {
2306
- clearTimeout(o), l && l.disconnect(), l = null;
2307
- }
2308
- function i(u, c) {
2309
- u === void 0 && (u = !1), c === void 0 && (c = 1), r();
2310
- const {
2311
- left: a,
2312
- top: s,
2313
- width: f,
2314
- height: v
2315
- } = e.getBoundingClientRect();
2316
- if (u || t(), !f || !v)
2317
- return;
2318
- const p = Ie(s), g = Ie(n.clientWidth - (a + f)), m = Ie(n.clientHeight - (s + v)), h = Ie(a), y = {
2319
- rootMargin: -p + "px " + -g + "px " + -m + "px " + -h + "px",
2320
- threshold: ue(0, $e(1, c)) || 1
2321
- };
2322
- let x = !0;
2323
- function w(S) {
2324
- const P = S[0].intersectionRatio;
2325
- if (P !== c) {
2326
- if (!x)
2327
- return i();
2328
- P ? i(!1, P) : o = setTimeout(() => {
2329
- i(!1, 1e-7);
2330
- }, 100);
2331
- }
2332
- x = !1;
2333
- }
2334
- try {
2335
- l = new IntersectionObserver(w, {
2336
- ...y,
2337
- // Handle <iframe>s
2338
- root: n.ownerDocument
2339
- });
2340
- } catch {
2341
- l = new IntersectionObserver(w, y);
2342
- }
2343
- l.observe(e);
2344
- }
2345
- return i(!0), r;
2346
- }
2347
- function Xl(e, t, l, o) {
2348
- o === void 0 && (o = {});
2349
- const {
2350
- ancestorScroll: n = !0,
2351
- ancestorResize: r = !0,
2352
- elementResize: i = typeof ResizeObserver == "function",
2353
- layoutShift: u = typeof IntersectionObserver == "function",
2354
- animationFrame: c = !1
2355
- } = o, a = vt(e), s = n || r ? [...a ? Ee(a) : [], ...Ee(t)] : [];
2356
- s.forEach((b) => {
2357
- n && b.addEventListener("scroll", l, {
2358
- passive: !0
2359
- }), r && b.addEventListener("resize", l);
2360
- });
2361
- const f = a && u ? ql(a, l) : null;
2362
- let v = -1, p = null;
2363
- i && (p = new ResizeObserver((b) => {
2364
- let [y] = b;
2365
- y && y.target === a && p && (p.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
2366
- p && p.observe(t);
2367
- })), l();
2368
- }), a && !c && p.observe(a), p.observe(t));
2369
- let g, m = c ? de(e) : null;
2370
- c && h();
2371
- function h() {
2372
- const b = de(e);
2373
- m && (b.x !== m.x || b.y !== m.y || b.width !== m.width || b.height !== m.height) && l(), m = b, g = requestAnimationFrame(h);
2374
- }
2375
- return l(), () => {
2376
- s.forEach((b) => {
2377
- n && b.removeEventListener("scroll", l), r && b.removeEventListener("resize", l);
2378
- }), f && f(), p && p.disconnect(), p = null, c && cancelAnimationFrame(g);
2379
- };
2380
- }
2381
- const Yl = Ll, Ql = Dl, Zl = (e, t, l) => {
2382
- const o = /* @__PURE__ */ new Map(), n = {
2383
- platform: Gl,
2384
- ...l
2385
- }, r = {
2386
- ...n.platform,
2387
- _c: o
2388
- };
2389
- return El(e, t, {
2390
- ...n,
2391
- platform: r
2392
- });
2393
- };
2394
- function Jl(e) {
2395
- return e != null && typeof e == "object" && "$el" in e;
2396
- }
2397
- function Vt(e) {
2398
- if (Jl(e)) {
2399
- const t = e.$el;
2400
- return ft(t) && ne(t) === "#comment" ? null : t;
2401
- }
2402
- return e;
2403
- }
2404
- function Ln(e) {
2405
- return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
2406
- }
2407
- function Ft(e, t) {
2408
- const l = Ln(e);
2409
- return Math.round(t * l) / l;
2410
- }
2411
- function er(e, t, l) {
2412
- l === void 0 && (l = {});
2413
- const o = l.whileElementsMounted, n = k(() => {
2414
- var O;
2415
- return (O = _(l.open)) != null ? O : !0;
2416
- }), r = k(() => _(l.middleware)), i = k(() => {
2417
- var O;
2418
- return (O = _(l.placement)) != null ? O : "bottom";
2419
- }), u = k(() => {
2420
- var O;
2421
- return (O = _(l.strategy)) != null ? O : "absolute";
2422
- }), c = k(() => {
2423
- var O;
2424
- return (O = _(l.transform)) != null ? O : !0;
2425
- }), 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(() => {
2426
- const O = {
2427
- position: p.value,
2428
- left: "0",
2429
- top: "0"
2430
- };
2431
- if (!s.value)
2432
- return O;
2433
- const N = Ft(s.value, f.value), re = Ft(s.value, v.value);
2434
- return c.value ? {
2435
- ...O,
2436
- transform: "translate(" + N + "px, " + re + "px)",
2437
- ...Ln(s.value) >= 1.5 && {
2438
- willChange: "transform"
2439
- }
2440
- } : {
2441
- position: p.value,
2442
- left: N + "px",
2443
- top: re + "px"
2444
- };
2445
- });
2446
- let y;
2447
- function x() {
2448
- a.value == null || s.value == null || Zl(a.value, s.value, {
2449
- middleware: r.value,
2450
- placement: i.value,
2451
- strategy: u.value
2452
- }).then((O) => {
2453
- f.value = O.x, v.value = O.y, p.value = O.strategy, g.value = O.placement, m.value = O.middlewareData, h.value = !0;
2454
- });
2455
- }
2456
- function w() {
2457
- typeof y == "function" && (y(), y = void 0);
2458
- }
2459
- function S() {
2460
- if (w(), o === void 0) {
2461
- x();
2462
- return;
2463
- }
2464
- if (a.value != null && s.value != null) {
2465
- y = o(a.value, s.value, x);
2466
- return;
2467
- }
2468
- }
2469
- function P() {
2470
- n.value || (h.value = !1);
2471
- }
2472
- return Q([r, i, u], x, {
2473
- flush: "sync"
2474
- }), Q([a, s], S, {
2475
- flush: "sync"
2476
- }), Q(n, P, {
2477
- flush: "sync"
2478
- }), Fn() && Nn(w), {
2479
- x: me(f),
2480
- y: me(v),
2481
- strategy: me(p),
2482
- placement: me(g),
2483
- middlewareData: me(m),
2484
- isPositioned: me(h),
2485
- floatingStyles: b,
2486
- update: x
2487
- };
2488
- }
2489
- const Lr = /* @__PURE__ */ A({
425
+ }), _a = /* @__PURE__ */ v({
2490
426
  __name: "MenuContainer",
2491
427
  props: {
2492
428
  position: { default: "left" },
2493
429
  usePortal: { type: [Boolean, String], default: !1 }
2494
430
  },
2495
- setup(e) {
2496
- const t = e, l = C(null), o = C(null), n = t.position === "left" ? "bottom-end" : "bottom-start", { floatingStyles: r } = er(l, o, {
2497
- placement: n,
2498
- whileElementsMounted: Xl,
2499
- middleware: [Pl(6), Ql(), Yl({ padding: 6 })]
431
+ setup(s) {
432
+ const a = s, r = D(null), l = D(null), t = a.position === "left" ? "bottom-end" : "bottom-start", { floatingStyles: i } = ve(r, l, {
433
+ placement: t,
434
+ whileElementsMounted: _e,
435
+ middleware: [xe(6), Ce(), we({ padding: 6 })]
2500
436
  });
2501
- return (i, u) => (R(), W(_(pl), {
437
+ return (f, $) => (o(), k(d(ce), {
2502
438
  as: "div",
2503
439
  class: "inline-block text-left"
2504
440
  }, {
2505
- default: U(() => [
2506
- F(_(ml), {
441
+ default: h(() => [
442
+ y(d(fe), {
2507
443
  class: "focus:outline-none",
2508
444
  ref_key: "reference",
2509
- ref: l
445
+ ref: r
2510
446
  }, {
2511
- default: U(() => [
2512
- ht(i.$slots, "button", {}, () => [
2513
- F(_(z), {
447
+ default: h(() => [
448
+ U(f.$slots, "button", {}, () => [
449
+ y(d(x), {
2514
450
  class: "fill-current",
2515
451
  name: "ellipsis-h"
2516
452
  })
@@ -2518,17 +454,17 @@ const Lr = /* @__PURE__ */ A({
2518
454
  ]),
2519
455
  _: 3
2520
456
  }, 512),
2521
- (R(), W(Bn, {
2522
- to: typeof i.usePortal == "string" ? i.usePortal : "body",
2523
- disabled: !i.usePortal
457
+ (o(), k(se, {
458
+ to: typeof f.usePortal == "string" ? f.usePortal : "body",
459
+ disabled: !f.usePortal
2524
460
  }, [
2525
- L("div", {
461
+ c("div", {
2526
462
  class: "w-56 z-20",
2527
- style: Nt(_(r)),
463
+ style: G(d(i)),
2528
464
  ref_key: "floating",
2529
- ref: o
465
+ ref: l
2530
466
  }, [
2531
- F(Bt, {
467
+ y(O, {
2532
468
  "enter-active-class": "transition duration-200 ease-in-out",
2533
469
  "enter-from-class": "transform -translate-y-4 opacity-0",
2534
470
  "enter-to-class": "transform opacity-100",
@@ -2536,14 +472,14 @@ const Lr = /* @__PURE__ */ A({
2536
472
  "leave-from-class": "transform opacity-100",
2537
473
  "leave-to-class": "transform -translate-y-2 opacity-0"
2538
474
  }, {
2539
- default: U(() => [
2540
- F(_(vl), {
2541
- class: $([
475
+ default: h(() => [
476
+ y(d(me), {
477
+ class: b([
2542
478
  "z-40 mt-1 p-1 bg-white rounded shadow-lg text-grey-700 focus:outline-none w-full"
2543
479
  ])
2544
480
  }, {
2545
- default: U(() => [
2546
- ht(i.$slots, "default")
481
+ default: h(() => [
482
+ U(f.$slots, "default")
2547
483
  ]),
2548
484
  _: 3
2549
485
  })
@@ -2556,10 +492,10 @@ const Lr = /* @__PURE__ */ A({
2556
492
  _: 3
2557
493
  }));
2558
494
  }
2559
- }), tr = {
495
+ }), Ne = {
2560
496
  key: 0,
2561
497
  class: "bg-grey-300 px-2 rounded-lg max-w-[66px] truncate"
2562
- }, Tr = /* @__PURE__ */ A({
498
+ }, xa = /* @__PURE__ */ v({
2563
499
  __name: "MenuLink",
2564
500
  props: {
2565
501
  label: {},
@@ -2567,18 +503,18 @@ const Lr = /* @__PURE__ */ A({
2567
503
  disabled: { type: Boolean },
2568
504
  as: {}
2569
505
  },
2570
- setup(e) {
2571
- return (t, l) => (R(), W(_(gl), jn(zn({ disabled: t.disabled })), {
2572
- default: U(({ active: o }) => [
2573
- (R(), W(Hn(t.as || "span"), {
2574
- class: $(["flex items-center justify-between px-4 py-2 text-xs leading-5 transition-colors duration-100 rounded-lg", [
2575
- o ? "bg-grey-200" : "",
2576
- t.disabled ? "opacity-50 pointer-events-none" : "hover:bg-grey-200 focus:bg-grey-200 focus:outline-none"
506
+ setup(s) {
507
+ return (a, r) => (o(), k(d(pe), oe(ne({ disabled: a.disabled })), {
508
+ default: h(({ active: l }) => [
509
+ (o(), k(re(a.as || "span"), {
510
+ class: b(["flex items-center justify-between px-4 py-2 text-xs leading-5 transition-colors duration-100 rounded-lg", [
511
+ l ? "bg-grey-200" : "",
512
+ a.disabled ? "opacity-50 pointer-events-none" : "hover:bg-grey-200 focus:bg-grey-200 focus:outline-none"
2577
513
  ]])
2578
514
  }, {
2579
- default: U(() => [
2580
- L("span", null, G(t.label), 1),
2581
- t.meta ? (R(), T("span", tr, G(t.meta), 1)) : M("", !0)
515
+ default: h(() => [
516
+ c("span", null, C(a.label), 1),
517
+ a.meta ? (o(), u("span", Ne, C(a.meta), 1)) : m("", !0)
2582
518
  ]),
2583
519
  _: 2
2584
520
  }, 1032, ["class"]))
@@ -2586,21 +522,22 @@ const Lr = /* @__PURE__ */ A({
2586
522
  _: 1
2587
523
  }, 16));
2588
524
  }
2589
- }), nr = { class: "relative" }, or = {
525
+ }), Ge = { class: "relative" }, Oe = {
2590
526
  key: 0,
2591
527
  class: "absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none"
2592
- }, lr = {
528
+ }, Ze = {
2593
529
  key: 1,
2594
530
  class: "block truncate"
2595
- }, rr = ["innerHTML"], ir = {
531
+ }, Qe = ["innerHTML"], qe = {
2596
532
  key: 2,
2597
533
  class: "text-grey-500 truncate"
2598
- }, 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 = {
534
+ }, We = { 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" }, Je = { class: "absolute right-2 inset-y-0 flex items-center" }, Ke = {
2599
535
  key: 0,
2600
536
  class: "bg-grey-500 text-grey-100 rounded text-xs px-2 py-1"
2601
- }, cr = ["innerHTML"], Ir = /* @__PURE__ */ A({
537
+ }, Xe = ["innerHTML"], Ca = /* @__PURE__ */ v({
2602
538
  __name: "Select",
2603
539
  props: {
540
+ id: {},
2604
541
  modelValue: {},
2605
542
  size: { default: "medium" },
2606
543
  icon: {},
@@ -2610,42 +547,51 @@ const Lr = /* @__PURE__ */ A({
2610
547
  disabledBadge: {}
2611
548
  },
2612
549
  emits: ["update:modelValue"],
2613
- setup(e, { emit: t }) {
2614
- const l = e, o = l.modelValue ? C(l.modelValue) : C(void 0), n = t, { inputClasses: r, disabledClasses: i, textSizeClasses: u } = rt(l);
2615
- return Q(
2616
- () => l.modelValue,
2617
- (c) => {
2618
- var a;
2619
- c && c.id !== ((a = o.value) == null ? void 0 : a.id) && (o.value = c);
550
+ setup(s, { emit: a }) {
551
+ const r = s, l = D(r.modelValue ?? null), t = a, { inputClasses: i, disabledClasses: f, textSizeClasses: $ } = H(r), V = D(!1), L = () => {
552
+ V.value = !!r.id && !!document.getElementById(`${r.id}-label`);
553
+ };
554
+ ie(L), I(() => r.id, L, { flush: "post" });
555
+ const z = w(
556
+ () => V.value ? `${r.id}-label ${r.id}` : void 0
557
+ );
558
+ I(
559
+ () => r.modelValue,
560
+ (p) => {
561
+ l.value = p ?? null;
2620
562
  }
2621
- ), Q(o, (c) => {
2622
- c && n("update:modelValue", c);
2623
- }), (c, a) => (R(), W(_(il), {
563
+ );
564
+ const _ = (p) => {
565
+ l.value = p, t("update:modelValue", p);
566
+ };
567
+ return (p, R) => (o(), k(d(be), {
2624
568
  as: "div",
2625
- modelValue: _(o),
2626
- "onUpdate:modelValue": a[0] || (a[0] = (s) => Un(o) ? o.value = s : null),
2627
- disabled: c.isDisabled
569
+ "model-value": l.value,
570
+ "onUpdate:modelValue": _,
571
+ disabled: p.isDisabled
2628
572
  }, {
2629
- default: U(() => [
2630
- L("div", nr, [
2631
- F(_(al), {
2632
- 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)]])
573
+ default: h(() => [
574
+ c("div", Ge, [
575
+ y(d(ge), {
576
+ id: p.id,
577
+ "aria-labelledby": z.value,
578
+ class: b(["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", [d(i), d($), d(f)]])
2633
579
  }, {
2634
- default: U(() => {
2635
- var s;
580
+ default: h(() => {
581
+ var g;
2636
582
  return [
2637
- c.icon ? (R(), T("span", or, [
2638
- F(z, {
2639
- name: ((s = _(o)) == null ? void 0 : s.icon) ?? c.icon
583
+ p.icon ? (o(), u("span", Oe, [
584
+ y(x, {
585
+ name: ((g = l.value) == null ? void 0 : g.icon) ?? p.icon
2640
586
  }, null, 8, ["name"])
2641
- ])) : M("", !0),
2642
- _(o) ? (R(), T("span", lr, [
2643
- L("span", {
2644
- innerHTML: _(o).label
2645
- }, null, 8, rr)
2646
- ])) : (R(), T("span", ir, G(c.placeholder), 1)),
2647
- L("span", ar, [
2648
- F(z, {
587
+ ])) : m("", !0),
588
+ l.value ? (o(), u("span", Ze, [
589
+ c("span", {
590
+ innerHTML: l.value.label
591
+ }, null, 8, Qe)
592
+ ])) : (o(), u("span", qe, C(p.placeholder), 1)),
593
+ c("span", We, [
594
+ y(x, {
2649
595
  class: "text-grey-400",
2650
596
  name: "chevron-down",
2651
597
  "aria-hidden": "true"
@@ -2654,60 +600,60 @@ const Lr = /* @__PURE__ */ A({
2654
600
  ];
2655
601
  }),
2656
602
  _: 1
2657
- }, 8, ["class"]),
2658
- F(Bt, {
603
+ }, 8, ["id", "aria-labelledby", "class"]),
604
+ y(O, {
2659
605
  "leave-active-class": "transition ease-in duration-100",
2660
606
  "leave-from-class": "opacity-100",
2661
607
  "leave-to-class": "opacity-0"
2662
608
  }, {
2663
- default: U(() => [
2664
- 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" }, {
2665
- default: U(() => [
2666
- (R(!0), T(be, null, jt(c.options, (s) => (R(), W(_(ul), {
609
+ default: h(() => [
610
+ y(d(ye), { 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" }, {
611
+ default: h(() => [
612
+ (o(!0), u(E, null, Z(p.options, (g) => (o(), k(d(he), {
2667
613
  as: "template",
2668
- key: s.id,
2669
- value: s,
2670
- disabled: s.disabled
614
+ key: g.id,
615
+ value: g,
616
+ disabled: g.disabled
2671
617
  }, {
2672
- default: U(({ active: f, selected: v }) => [
2673
- L("li", {
2674
- class: $([
2675
- f ? "text-white bg-blue-500" : "text-grey-900 dark:text-grey-50",
618
+ default: h(({ active: M, selected: P }) => [
619
+ c("li", {
620
+ class: b([
621
+ M ? "text-white bg-blue-500" : "text-grey-900 dark:text-grey-50",
2676
622
  "cursor-default select-none relative py-2 pl-3 pr-12",
2677
- { "opacity-50 bg-grey-100": s.disabled }
623
+ { "opacity-50 bg-grey-100": g.disabled }
2678
624
  ])
2679
625
  }, [
2680
- L("div", sr, [
2681
- s.disabled && c.disabledBadge ? (R(), T("span", ur, G(c.disabledBadge), 1)) : M("", !0)
626
+ c("div", Je, [
627
+ g.disabled && p.disabledBadge ? (o(), u("span", Ke, C(p.disabledBadge), 1)) : m("", !0)
2682
628
  ]),
2683
- L("span", {
2684
- class: $([
2685
- v ? "font-semibold" : "font-normal",
629
+ c("span", {
630
+ class: b([
631
+ P ? "font-semibold" : "font-normal",
2686
632
  "block truncate"
2687
633
  ])
2688
634
  }, [
2689
- s.icon ? (R(), W(z, {
635
+ g.icon ? (o(), k(x, {
2690
636
  key: 0,
2691
637
  class: "inline-block mr-1",
2692
- name: s.icon
2693
- }, null, 8, ["name"])) : M("", !0),
2694
- L("span", {
2695
- innerHTML: s.label
2696
- }, null, 8, cr)
638
+ name: g.icon
639
+ }, null, 8, ["name"])) : m("", !0),
640
+ c("span", {
641
+ innerHTML: g.label
642
+ }, null, 8, Xe)
2697
643
  ], 2),
2698
- v ? (R(), T("span", {
644
+ P ? (o(), u("span", {
2699
645
  key: 0,
2700
- class: $([
2701
- f ? "text-blue-100" : "text-blue-500",
646
+ class: b([
647
+ M ? "text-blue-100" : "text-blue-500",
2702
648
  "absolute inset-y-0 right-0 flex items-center pr-4"
2703
649
  ])
2704
650
  }, [
2705
- F(z, {
651
+ y(x, {
2706
652
  name: "check",
2707
653
  class: "h-5 w-5",
2708
654
  "aria-hidden": "true"
2709
655
  })
2710
- ], 2)) : M("", !0)
656
+ ], 2)) : m("", !0)
2711
657
  ], 2)
2712
658
  ]),
2713
659
  _: 2
@@ -2721,21 +667,21 @@ const Lr = /* @__PURE__ */ A({
2721
667
  ])
2722
668
  ]),
2723
669
  _: 1
2724
- }, 8, ["modelValue", "disabled"]));
670
+ }, 8, ["model-value", "disabled"]));
2725
671
  }
2726
- }), dr = { class: "animate-pulse" }, fr = { class: "flex items-center justify-between space-x-4" }, pr = {
672
+ }), Ye = { class: "animate-pulse" }, ea = { class: "flex items-center justify-between space-x-4" }, aa = {
2727
673
  key: 0,
2728
674
  class: "w-12 h-12 bg-current rounded-full shrink-0"
2729
- }, mr = {
675
+ }, ta = {
2730
676
  key: 1,
2731
677
  class: "w-full h-8 bg-current rounded-lg"
2732
- }, vr = {
678
+ }, la = {
2733
679
  key: 0,
2734
680
  class: "mt-6 space-y-2"
2735
- }, gr = {
681
+ }, sa = {
2736
682
  key: 1,
2737
683
  class: "w-1/3 h-10 mt-6 bg-current rounded-lg"
2738
- }, Ar = /* @__PURE__ */ A({
684
+ }, wa = /* @__PURE__ */ v({
2739
685
  __name: "Skeleton",
2740
686
  props: {
2741
687
  avatar: { type: Boolean, default: !1 },
@@ -2743,165 +689,71 @@ const Lr = /* @__PURE__ */ A({
2743
689
  lines: { default: 3 },
2744
690
  footer: { type: Boolean, default: !1 }
2745
691
  },
2746
- setup(e) {
2747
- const t = e, l = new Array(t.lines).fill(void 0).map(() => {
2748
- const o = [4, 5, 6, 8, 10, 16, 24, 32];
692
+ setup(s) {
693
+ const a = s, r = new Array(a.lines).fill(void 0).map(() => {
694
+ const l = [4, 5, 6, 8, 10, 16, 24, 32];
2749
695
  return {
2750
- margin: `mr-${o[Math.floor(Math.random() * o.length)]}`
696
+ margin: `mr-${l[Math.floor(Math.random() * l.length)]}`
2751
697
  };
2752
698
  });
2753
- return (o, n) => (R(), T("div", dr, [
2754
- L("div", fr, [
2755
- o.avatar ? (R(), T("div", pr)) : M("", !0),
2756
- o.title ? (R(), T("div", mr)) : M("", !0)
699
+ return (l, t) => (o(), u("div", Ye, [
700
+ c("div", ea, [
701
+ l.avatar ? (o(), u("div", aa)) : m("", !0),
702
+ l.title ? (o(), u("div", ta)) : m("", !0)
2757
703
  ]),
2758
- o.lines > 0 ? (R(), T("div", vr, [
2759
- (R(!0), T(be, null, jt(_(l), (r, i) => (R(), T("div", {
2760
- class: $(["h-4 bg-current rounded-lg", r.margin]),
2761
- key: i
704
+ l.lines > 0 ? (o(), u("div", la, [
705
+ (o(!0), u(E, null, Z(d(r), (i, f) => (o(), u("div", {
706
+ class: b(["h-4 bg-current rounded-lg", i.margin]),
707
+ key: f
2762
708
  }, null, 2))), 128))
2763
- ])) : M("", !0),
2764
- o.footer ? (R(), T("div", gr)) : M("", !0)
709
+ ])) : m("", !0),
710
+ l.footer ? (o(), u("div", sa)) : m("", !0)
2765
711
  ]));
2766
712
  }
2767
- }), $r = /* @__PURE__ */ A({
713
+ }), $a = /* @__PURE__ */ v({
2768
714
  __name: "Spinner",
2769
- setup(e) {
2770
- return (t, l) => (R(), W(_(z), {
715
+ setup(s) {
716
+ return (a, r) => (o(), k(d(x), {
2771
717
  class: "animate-spin",
2772
718
  name: "circle-notch"
2773
719
  }));
2774
720
  }
2775
- }), br = { class: "relative inline-flex items-center" }, hr = ["aria-label", "tabindex"], yr = {
2776
- key: 0,
2777
- class: "absolute inset-0 flex items-center justify-center"
2778
- }, Mr = /* @__PURE__ */ A({
2779
- __name: "SplitButton",
2780
- props: {
2781
- label: {},
2782
- size: { default: "medium" },
2783
- color: { default: "primary" },
2784
- isLoading: { type: Boolean, default: !1 },
2785
- isDisabled: { type: Boolean, default: !1 },
2786
- icon: { default: "plus" }
2787
- },
2788
- emits: ["onClick", "onClickSplit"],
2789
- setup(e, { emit: t }) {
2790
- const l = t, o = e, n = k(() => {
2791
- const a = {
2792
- "text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900": o.color === "primary",
2793
- "text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900": o.color === "light",
2794
- "text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900": o.color === "dark",
2795
- "text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900": o.color === "danger"
2796
- }, s = {
2797
- "px-4 py-1 text-xs leading-5 mono-100": o.size === "small",
2798
- "px-5 py-2 text-sm leading-4 font-medium": o.size === "medium",
2799
- "px-8 pr-4 py-3 text-base leading-6 font-medium": o.size === "large"
2800
- }, f = {
2801
- "pointer-events-none opacity-75 cursor-not-allowed": o.isDisabled
2802
- };
2803
- return {
2804
- ...a,
2805
- ...f,
2806
- ...s
2807
- };
2808
- }), r = k(() => {
2809
- const a = {
2810
- "border-l-white/50 border-l": o.color === "primary",
2811
- "border-l-blue-100 border-l": o.color === "light",
2812
- "border-l-grey-600 border-l": o.color === "dark",
2813
- "border-l-red-600 border-l": o.color === "danger"
2814
- }, s = {
2815
- "pl-2 pr-3": o.size === "small",
2816
- "pl-3 pr-3": o.size === "medium",
2817
- "pl-4 pr-5": o.size === "large"
2818
- };
2819
- return {
2820
- ...a,
2821
- ...s
2822
- };
2823
- }), i = k(() => ({
2824
- ...{
2825
- "text-white": o.color === "primary",
2826
- "text-blue-600": o.color === "light",
2827
- "text-grey-50": o.color === "dark"
2828
- }
2829
- }));
2830
- function u() {
2831
- o.isDisabled || l("onClick");
2832
- }
2833
- function c() {
2834
- o.isDisabled || l("onClickSplit");
2835
- }
2836
- return (a, s) => (R(), T("div", br, [
2837
- L("button", {
2838
- type: "button",
2839
- "aria-label": a.label,
2840
- tabindex: a.isDisabled ? "-1" : void 0,
2841
- class: $(["relative transition duration-150 ease-in-out rounded-l-lg", n.value]),
2842
- onClick: u
2843
- }, [
2844
- L("div", {
2845
- class: $(!a.isLoading || "invisible")
2846
- }, [
2847
- L("span", null, G(a.label), 1)
2848
- ], 2),
2849
- a.isLoading ? (R(), T("span", yr, [
2850
- F(z, {
2851
- class: "ml-3 animate-spin",
2852
- name: "circle-notch"
2853
- })
2854
- ])) : M("", !0)
2855
- ], 10, hr),
2856
- L("button", {
2857
- type: "button",
2858
- class: $(["border-l-white/50 border-l transition duration-150 ease-in-out rounded-r-lg", [n.value, r.value]]),
2859
- onClick: c
2860
- }, [
2861
- F(z, {
2862
- class: $([i.value]),
2863
- name: a.icon
2864
- }, null, 8, ["class", "name"])
2865
- ], 2)
2866
- ]));
2867
- }
2868
- }), xr = { class: "sr-only" }, Vr = /* @__PURE__ */ A({
721
+ }), oa = { class: "sr-only" }, La = /* @__PURE__ */ v({
2869
722
  __name: "Switch",
2870
723
  props: {
2871
- id: { default: qt() },
724
+ id: { default: () => Q() },
2872
725
  label: {},
2873
726
  modelValue: { type: Boolean },
2874
- description: {},
2875
727
  onLabel: { default: "on" },
2876
728
  offLabel: { default: "off" }
2877
729
  },
2878
730
  emits: ["update:modelValue", "change"],
2879
- setup(e, { emit: t }) {
2880
- const l = t, o = (n) => {
2881
- l("update:modelValue", n), l("change", n);
731
+ setup(s, { emit: a }) {
732
+ const r = a, l = (t) => {
733
+ r("update:modelValue", t), r("change", t);
2882
734
  };
2883
- return (n, r) => (R(), W(_(hl), {
2884
- modelValue: n.modelValue,
2885
- label: n.label,
2886
- 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"]),
2887
- "onUpdate:modelValue": o
735
+ return (t, i) => (o(), k(d(ke), {
736
+ id: t.id,
737
+ modelValue: t.modelValue,
738
+ class: b([t.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"]),
739
+ "onUpdate:modelValue": l
2888
740
  }, {
2889
- default: U(() => [
2890
- L("span", {
2891
- class: $(["absolute text-xs text-center text-white inset-x-2", n.modelValue ? "pr-3" : "pl-3"])
2892
- }, G(n.modelValue === !0 ? n.onLabel : n.offLabel), 3),
2893
- L("span", xr, G(n.label), 1),
2894
- L("span", {
2895
- class: $([n.modelValue ? "translate-x-9" : "translate-x-1", "inline-block w-4 h-4 transition bg-white rounded-full"])
741
+ default: h(() => [
742
+ c("span", {
743
+ class: b(["absolute text-xs text-center text-white inset-x-2", t.modelValue ? "pr-3" : "pl-3"])
744
+ }, C(t.modelValue === !0 ? t.onLabel : t.offLabel), 3),
745
+ c("span", oa, C(t.label), 1),
746
+ c("span", {
747
+ class: b([t.modelValue ? "translate-x-9" : "translate-x-1", "inline-block w-4 h-4 transition bg-white rounded-full"])
2896
748
  }, null, 2)
2897
749
  ]),
2898
750
  _: 1
2899
- }, 8, ["modelValue", "label", "class"]));
751
+ }, 8, ["id", "modelValue", "class"]));
2900
752
  }
2901
- }), wr = { class: "relative" }, kr = ["tabindex", "value"], Sr = {
753
+ }), na = { class: "relative" }, ra = ["disabled", "value"], ia = {
2902
754
  inheritAttrs: !1
2903
- }, Fr = /* @__PURE__ */ A({
2904
- ...Sr,
755
+ }, Da = /* @__PURE__ */ v({
756
+ ...ia,
2905
757
  __name: "Textarea",
2906
758
  props: {
2907
759
  modelValue: {},
@@ -2910,44 +762,43 @@ const Lr = /* @__PURE__ */ A({
2910
762
  block: { type: Boolean }
2911
763
  },
2912
764
  emits: ["update:modelValue"],
2913
- setup(e, { expose: t, emit: l }) {
2914
- const o = e, n = l, { inputClasses: r, disabledClasses: i, textSizeClasses: u } = rt(o), c = function(f) {
2915
- n("update:modelValue", (f == null ? void 0 : f.target).value);
2916
- }, a = C(null);
2917
- return t({
765
+ setup(s, { expose: a, emit: r }) {
766
+ const l = s, t = r, { inputClasses: i, disabledClasses: f, textSizeClasses: $ } = H(l), V = function(_) {
767
+ t("update:modelValue", (_ == null ? void 0 : _.target).value);
768
+ }, L = D(null);
769
+ return a({
2918
770
  focus: () => {
2919
- o.isDisabled || a.value.focus();
771
+ l.isDisabled || L.value.focus();
2920
772
  }
2921
- }), (f, v) => (R(), T("div", wr, [
2922
- L("textarea", ot({
2923
- 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)]],
2924
- tabindex: f.isDisabled ? "-1" : void 0,
2925
- value: f.modelValue ?? ""
2926
- }, f.$attrs, {
773
+ }), (_, p) => (o(), u("div", na, [
774
+ c("textarea", T({
775
+ 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", [d(i), d($), d(f)]],
776
+ disabled: _.isDisabled,
777
+ value: _.modelValue ?? ""
778
+ }, _.$attrs, {
2927
779
  ref_key: "input",
2928
- ref: a,
780
+ ref: L,
2929
781
  cols: "56",
2930
782
  rows: "8",
2931
- onInput: c
783
+ onInput: V
2932
784
  }), `
2933
- `, 16, kr)
785
+ `, 16, ra)
2934
786
  ]));
2935
787
  }
2936
788
  });
2937
789
  export {
2938
- Er as D9Button,
2939
- Dr as D9Checkbox,
2940
- z as D9Icon,
2941
- _r as D9Input,
2942
- Pr as D9Label,
2943
- Lr as D9Menu,
2944
- Tr as D9MenuLink,
2945
- Ir as D9Select,
2946
- Ar as D9Skeleton,
2947
- $r as D9Spinner,
2948
- Mr as D9SplitButton,
2949
- Vr as D9Switch,
2950
- Fr as D9Textarea,
2951
- xt as brands,
2952
- Gn as icons
790
+ ya as D9Button,
791
+ ha as D9Checkbox,
792
+ x as D9Icon,
793
+ ka as D9Input,
794
+ va as D9Label,
795
+ _a as D9Menu,
796
+ xa as D9MenuLink,
797
+ Ca as D9Select,
798
+ wa as D9Skeleton,
799
+ $a as D9Spinner,
800
+ La as D9Switch,
801
+ Da as D9Textarea,
802
+ N as brands,
803
+ Le as icons
2953
804
  };