veloce-vue 0.12.0 → 0.14.0

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/index.js CHANGED
@@ -1,48 +1,48 @@
1
- import { defineComponent as h, ref as b, resolveComponent as j, createElementBlock as n, openBlock as s, Fragment as _, renderList as I, createElementVNode as l, createCommentVNode as p, normalizeClass as u, createVNode as x, toDisplayString as y, renderSlot as g, createTextVNode as A, computed as k, createBlock as L, resolveDynamicComponent as P, mergeModels as B, useModel as E, watch as V, withDirectives as O, vModelDynamic as F, onMounted as X, onUnmounted as U, normalizeStyle as $, vModelText as Z } from "vue";
2
- const R = { class: "w-full divide-y divide-gray-200 rounded border border-slate-200 bg-white" }, K = ["onClick"], Q = { class: "title text-gray-600" }, G = {
1
+ import { defineComponent as x, ref as _, resolveComponent as G, createElementBlock as i, openBlock as r, Fragment as E, renderList as F, createElementVNode as a, createCommentVNode as y, createVNode as S, toDisplayString as $, normalizeClass as h, renderSlot as C, createTextVNode as K, computed as M, createBlock as j, resolveDynamicComponent as ee, mergeModels as R, useModel as W, withDirectives as Q, vModelDynamic as te, watch as P, onMounted as oe, onUnmounted as se, normalizeStyle as V, getCurrentScope as le, onScopeDispose as ne, toValue as L, unref as re, useTemplateRef as ae, vModelText as ie } from "vue";
2
+ const ue = { class: "w-full divide-y divide-gray-200 overflow-hidden rounded-xl border border-slate-200 bg-white shadow" }, de = ["onClick"], ce = { class: "title" }, pe = {
3
3
  key: 0,
4
- class: "p-3 text-gray-500"
5
- }, H = {
4
+ class: "text-text p-3"
5
+ }, fe = {
6
6
  key: 1,
7
7
  class: "px-3 py-6 text-center text-gray-500"
8
- }, Je = /* @__PURE__ */ h({
8
+ }, wt = /* @__PURE__ */ x({
9
9
  __name: "Index",
10
10
  props: {
11
11
  items: { type: Array, required: !0 }
12
12
  },
13
- setup(r) {
14
- const e = b(null);
15
- return (t, d) => {
16
- const a = j("Icon");
17
- return s(), n("div", R, [
18
- r.items.length ? (s(!0), n(_, { key: 0 }, I(r.items, (o, i) => (s(), n("div", { key: i }, [
19
- l("div", {
20
- class: u([{ "bg-primary/5": e.value === i }, "hover:bg-primary/5 relative flex cursor-pointer justify-between gap-4 p-3 font-medium duration-100"]),
21
- onClick: (c) => e.value = e.value === i ? null : i
13
+ setup(o) {
14
+ const e = _(null);
15
+ return (t, l) => {
16
+ const n = G("Icon");
17
+ return r(), i("div", ue, [
18
+ o.items.length ? (r(!0), i(E, { key: 0 }, F(o.items, (s, u) => (r(), i("div", { key: u }, [
19
+ a("div", {
20
+ class: "text-text relative flex cursor-pointer justify-between gap-4 p-3 font-medium duration-100 hover:bg-gray-100",
21
+ onClick: (d) => e.value = e.value === u ? null : u
22
22
  }, [
23
- l("span", Q, y(o.title), 1),
24
- x(a, {
23
+ a("span", ce, $(s.title), 1),
24
+ S(n, {
25
25
  icon: "chevron-down",
26
- class: u([{ "rotate-180": e.value === i }, "icon text-[1.4rem] text-gray-400 duration-200"])
26
+ class: h([{ "rotate-180 ": e.value === u }, "icon text-[1.4rem] duration-200"])
27
27
  }, null, 8, ["class"])
28
- ], 10, K),
29
- e.value === i ? (s(), n("div", G, [
30
- o.slot ? g(t.$slots, o.slot, { key: 0 }) : (s(), n(_, { key: 1 }, [
31
- A(y(o.content), 1)
28
+ ], 8, de),
29
+ e.value === u ? (r(), i("div", pe, [
30
+ s.slot ? C(t.$slots, s.slot, { key: 0 }) : (r(), i(E, { key: 1 }, [
31
+ K($(s.content), 1)
32
32
  ], 64))
33
- ])) : p("", !0)
34
- ]))), 128)) : (s(), n("div", H, "No items to show"))
33
+ ])) : y("", !0)
34
+ ]))), 128)) : (r(), i("div", fe, "No items to show"))
35
35
  ]);
36
36
  };
37
37
  }
38
- }), J = {
38
+ }), me = {
39
39
  label: { type: String, default: "" },
40
40
  loading: { type: Boolean, default: !1 },
41
41
  disabled: { type: Boolean, default: !1 },
42
42
  variant: {
43
43
  type: String,
44
44
  default: "solid",
45
- options: ["outlined", "text", "ghost", "solid"]
45
+ options: ["outlined", "text", "ghost", "solid", "gray"]
46
46
  },
47
47
  icon: { type: String, default: "" },
48
48
  iconClass: { type: String, default: "" },
@@ -52,11 +52,11 @@ const R = { class: "w-full divide-y divide-gray-200 rounded border border-slate-
52
52
  options: ["left", "right"]
53
53
  },
54
54
  rounded: { type: Boolean, default: !1 }
55
- }, W = ["disabled"], C = /* @__PURE__ */ h({
55
+ }, ve = ["disabled"], O = /* @__PURE__ */ x({
56
56
  __name: "Index",
57
- props: J,
58
- setup(r) {
59
- const e = r, t = k(() => {
57
+ props: me,
58
+ setup(o) {
59
+ const e = o, t = M(() => {
60
60
  switch (e.variant) {
61
61
  case "outlined":
62
62
  return "!border-primary text-primary bg-transparent hover:bg-primary disabled:hover:bg-transparent disabled:hover:text-primary hover:text-white";
@@ -64,96 +64,99 @@ const R = { class: "w-full divide-y divide-gray-200 rounded border border-slate-
64
64
  return "bg-transparent text-primary hover:bg-gray-200 disabled:hover:bg-transparent disabled:hover:text-primary";
65
65
  case "ghost":
66
66
  return "text-primary bg-gray-100 hover:bg-gray-200 disabled:hover:bg-transparent disabled:hover:text-primary";
67
+ case "gray":
68
+ return "bg-gray-100 text-gray-700 hover:bg-gray-200 disabled:hover:bg-gray-100 disabled:hover:text-gray-900";
67
69
  default:
68
70
  return "bg-primary text-white hover:bg-primary/75 disabled:hover:bg-primary disabled:hover:text-white";
69
71
  }
70
72
  });
71
- return (d, a) => {
72
- const o = j("Icon");
73
- return s(), n("button", {
73
+ return (l, n) => {
74
+ const s = G("Icon");
75
+ return r(), i("button", {
74
76
  type: "button",
75
77
  disabled: e.disabled || e.loading,
76
- class: u([
78
+ class: h([
77
79
  t.value,
78
80
  { "rounded-full": e.rounded },
79
81
  "flex cursor-pointer items-center justify-center gap-2 rounded border border-transparent px-3 py-2 transition duration-200 disabled:cursor-not-allowed disabled:opacity-75 "
80
82
  ])
81
83
  }, [
82
- l("div", {
83
- class: u([{ "justify-center": !e.icon }, "flex w-full items-center justify-between gap-2"])
84
+ a("div", {
85
+ class: h([{ "justify-center": !e.icon }, "flex w-full items-center justify-between gap-2"])
84
86
  }, [
85
- e.label ? (s(), n("span", {
87
+ e.label ? (r(), i("span", {
86
88
  key: 0,
87
- class: u({ "order-2": e.iconPosition === "left" })
88
- }, y(e.label), 3)) : p("", !0),
89
- e.icon && !e.loading ? (s(), L(o, {
89
+ class: h({ "order-2": e.iconPosition === "left" })
90
+ }, $(e.label), 3)) : y("", !0),
91
+ e.icon && !e.loading ? (r(), j(s, {
90
92
  key: 1,
91
93
  icon: e.icon,
92
- class: u([e.iconClass, "duration-200"])
93
- }, null, 8, ["icon", "class"])) : p("", !0)
94
- ], 2),
95
- e.loading ? (s(), L(o, {
96
- key: 0,
97
- icon: "loading"
98
- })) : p("", !0)
99
- ], 10, W);
94
+ class: h([e.iconClass, "duration-200 size-5 text-current"])
95
+ }, null, 8, ["icon", "class"])) : y("", !0),
96
+ e.loading ? (r(), j(s, {
97
+ key: 2,
98
+ icon: "loading",
99
+ class: "duration-200 size-5 text-current"
100
+ })) : y("", !0)
101
+ ], 2)
102
+ ], 10, ve);
100
103
  };
101
104
  }
102
- }), Y = {
105
+ }), he = {
103
106
  label: { type: String, default: "" },
104
107
  labelClass: { type: String, default: "" },
105
108
  checkboxClass: { type: String, default: "" }
106
- }, S = (r, e) => {
107
- const t = r.__vccOpts || r;
108
- for (const [d, a] of e)
109
- t[d] = a;
109
+ }, T = (o, e) => {
110
+ const t = o.__vccOpts || o;
111
+ for (const [l, n] of e)
112
+ t[l] = n;
110
113
  return t;
111
- }, ee = {}, te = {
114
+ }, ye = {}, ge = {
112
115
  xmlns: "http://www.w3.org/2000/svg",
113
116
  width: "24",
114
117
  height: "24",
115
118
  viewBox: "0 0 24 24"
116
119
  };
117
- function oe(r, e) {
118
- return s(), n("svg", te, [...e[0] || (e[0] = [
119
- l("path", {
120
+ function be(o, e) {
121
+ return r(), i("svg", ge, [...e[0] || (e[0] = [
122
+ a("path", {
120
123
  fill: "currentColor",
121
124
  d: "m9.55 15.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175 9.2q-.3.3-.7.3t-.7-.3L4.55 13q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z"
122
125
  }, null, -1)
123
126
  ])]);
124
127
  }
125
- const se = /* @__PURE__ */ S(ee, [["render", oe]]), le = {}, re = {
128
+ const we = /* @__PURE__ */ T(ye, [["render", be]]), xe = {}, ke = {
126
129
  xmlns: "http://www.w3.org/2000/svg",
127
130
  width: "24",
128
131
  height: "24",
129
132
  viewBox: "0 0 24 24"
130
133
  };
131
- function ne(r, e) {
132
- return s(), n("svg", re, [...e[0] || (e[0] = [
133
- l("path", {
134
+ function $e(o, e) {
135
+ return r(), i("svg", ke, [...e[0] || (e[0] = [
136
+ a("path", {
134
137
  fill: "currentColor",
135
138
  d: "m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"
136
139
  }, null, -1)
137
140
  ])]);
138
141
  }
139
- const ae = /* @__PURE__ */ S(le, [["render", ne]]), ie = {}, de = {
142
+ const _e = /* @__PURE__ */ T(xe, [["render", $e]]), Ce = {}, Se = {
140
143
  xmlns: "http://www.w3.org/2000/svg",
141
144
  width: "24",
142
145
  height: "24",
143
146
  viewBox: "0 0 24 24"
144
147
  };
145
- function ue(r, e) {
146
- return s(), n("svg", de, [...e[0] || (e[0] = [
147
- l("path", {
148
+ function Le(o, e) {
149
+ return r(), i("svg", Se, [...e[0] || (e[0] = [
150
+ a("path", {
148
151
  fill: "currentColor",
149
152
  d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",
150
153
  opacity: "0.25"
151
154
  }, null, -1),
152
- l("path", {
155
+ a("path", {
153
156
  fill: "currentColor",
154
157
  d: "M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z"
155
158
  }, [
156
- l("animateTransform", {
159
+ a("animateTransform", {
157
160
  type: "rotate",
158
161
  attributeName: "transform",
159
162
  dur: "0.75s",
@@ -163,35 +166,35 @@ function ue(r, e) {
163
166
  ], -1)
164
167
  ])]);
165
168
  }
166
- const ce = /* @__PURE__ */ S(ie, [["render", ue]]), pe = {}, fe = {
169
+ const Ee = /* @__PURE__ */ T(Ce, [["render", Le]]), Me = {}, Ie = {
167
170
  xmlns: "http://www.w3.org/2000/svg",
168
171
  width: "24",
169
172
  height: "24",
170
173
  viewBox: "-5 -8 24 24"
171
174
  };
172
- function me(r, e) {
173
- return s(), n("svg", fe, [...e[0] || (e[0] = [
174
- l("path", {
175
+ function ze(o, e) {
176
+ return r(), i("svg", Ie, [...e[0] || (e[0] = [
177
+ a("path", {
175
178
  fill: "currentColor",
176
179
  d: "m7.071 5.314l4.95-4.95a1 1 0 1 1 1.414 1.414L7.778 7.435a1 1 0 0 1-1.414 0L.707 1.778A1 1 0 1 1 2.121.364z"
177
180
  }, null, -1)
178
181
  ])]);
179
182
  }
180
- const ve = /* @__PURE__ */ S(pe, [["render", me]]), he = {}, ye = {
183
+ const Ve = /* @__PURE__ */ T(Me, [["render", ze]]), Ae = {}, Be = {
181
184
  xmlns: "http://www.w3.org/2000/svg",
182
185
  width: "24",
183
186
  height: "24",
184
187
  viewBox: "0 0 24 24"
185
188
  };
186
- function be(r, e) {
187
- return s(), n("svg", ye, [...e[0] || (e[0] = [
188
- l("g", { fill: "none" }, [
189
- l("path", {
189
+ function Oe(o, e) {
190
+ return r(), i("svg", Be, [...e[0] || (e[0] = [
191
+ a("g", { fill: "none" }, [
192
+ a("path", {
190
193
  fill: "currentColor",
191
194
  "fill-opacity": "0.16",
192
195
  d: "M10.575 5.217L3.517 17a1.667 1.667 0 0 0 1.425 2.5h14.116a1.666 1.666 0 0 0 1.425-2.5L13.426 5.217a1.666 1.666 0 0 0-2.85 0"
193
196
  }),
194
- l("path", {
197
+ a("path", {
195
198
  stroke: "currentColor",
196
199
  "stroke-linecap": "round",
197
200
  "stroke-linejoin": "round",
@@ -202,13 +205,13 @@ function be(r, e) {
202
205
  ], -1)
203
206
  ])]);
204
207
  }
205
- const ge = /* @__PURE__ */ S(he, [["render", be]]), T = {
206
- check: se,
207
- close: ae,
208
- loading: ce,
209
- "chevron-down": ve,
210
- alert: ge
211
- }, D = /* @__PURE__ */ h({
208
+ const Te = /* @__PURE__ */ T(Ae, [["render", Oe]]), U = {
209
+ check: we,
210
+ close: _e,
211
+ loading: Ee,
212
+ "chevron-down": Ve,
213
+ alert: Te
214
+ }, H = /* @__PURE__ */ x({
212
215
  __name: "index",
213
216
  props: {
214
217
  icon: {},
@@ -216,414 +219,558 @@ const ge = /* @__PURE__ */ S(he, [["render", be]]), T = {
216
219
  class: {},
217
220
  size: {}
218
221
  },
219
- setup(r) {
220
- const e = r, t = k(() => e.size ?? 24), d = k(() => {
221
- const a = e.icon, o = e.fallbackIcon ? e.fallbackIcon : "alert";
222
- return T[a] ?? T[o];
222
+ setup(o) {
223
+ const e = o, t = M(() => e.size ?? 24), l = M(() => {
224
+ const n = e.icon, s = e.fallbackIcon ? e.fallbackIcon : "alert";
225
+ return U[n] ?? U[s];
223
226
  });
224
- return (a, o) => (s(), L(P(d.value), {
225
- class: u(["shrink-0", e.class]),
227
+ return (n, s) => (r(), j(ee(l.value), {
228
+ class: h(["shrink-0", e.class]),
226
229
  width: t.value,
227
230
  height: t.value
228
231
  }, null, 8, ["class", "width", "height"]));
229
232
  }
230
- }), We = /* @__PURE__ */ h({
233
+ }), xt = /* @__PURE__ */ x({
231
234
  __name: "Index",
232
- props: /* @__PURE__ */ B(Y, {
235
+ props: /* @__PURE__ */ R(he, {
233
236
  modelValue: {},
234
237
  modelModifiers: {}
235
238
  }),
236
239
  emits: ["update:modelValue"],
237
- setup(r) {
238
- const e = E(r, "modelValue");
239
- return (t, d) => (s(), n("div", {
240
+ setup(o) {
241
+ const e = W(o, "modelValue");
242
+ return (t, l) => (r(), i("div", {
240
243
  class: "flex w-fit cursor-pointer gap-2 select-none",
241
- onClick: d[0] || (d[0] = (a) => e.value = !e.value)
244
+ onClick: l[0] || (l[0] = (n) => e.value = !e.value)
242
245
  }, [
243
- l("div", {
244
- class: u([[{ "bg-primary": e.value }, t.checkboxClass], "border-primary m-0 size-6 rounded-sm border-2 duration-200"])
246
+ a("div", {
247
+ class: h([[{ "bg-primary": e.value }, t.checkboxClass], "border-primary m-0 size-6 rounded-sm border-2 duration-200"])
245
248
  }, [
246
- e.value ? (s(), L(D, {
249
+ e.value ? (r(), j(H, {
247
250
  key: 0,
248
251
  icon: "check",
249
- class: u([{ "text-white": e.value }, "size-5"])
250
- }, null, 8, ["class"])) : p("", !0)
252
+ class: h([{ "text-white": e.value }, "size-5"])
253
+ }, null, 8, ["class"])) : y("", !0)
251
254
  ], 2),
252
- l("div", {
253
- class: u(t.labelClass)
254
- }, y(t.label), 3)
255
+ a("div", {
256
+ class: h(t.labelClass)
257
+ }, $(t.label), 3)
255
258
  ]));
256
259
  }
257
- }), we = {
260
+ }), je = {
258
261
  direction: { type: String, default: "bottom", options: ["left", "bottom", "right"] },
259
262
  title: { type: String, default: "" },
260
263
  description: { type: String, default: "" },
261
264
  showFooter: { type: Boolean, default: !1 },
262
265
  show: { type: Boolean, default: !1 }
263
- }, xe = { class: "flex justify-between border-b border-gray-200 p-2" }, $e = { class: "font-semibold" }, _e = { class: "text-sm text-gray-500" }, ke = { class: "ml-auto" }, Ce = { class: "size-full overflow-auto p-2" }, Se = {
266
+ }, Pe = { class: "flex justify-between border-b border-gray-200 p-2" }, qe = { class: "font-semibold" }, De = { class: "text-sm text-gray-500" }, Ne = { class: "ml-auto" }, Fe = { class: "size-full overflow-auto p-2" }, Re = {
264
267
  key: 0,
265
268
  class: "border-t border-gray-200 p-2"
266
- }, Ye = /* @__PURE__ */ h({
269
+ }, kt = /* @__PURE__ */ x({
267
270
  __name: "Index",
268
- props: /* @__PURE__ */ B(we, {
271
+ props: /* @__PURE__ */ R(je, {
269
272
  modelValue: {},
270
273
  modelModifiers: {}
271
274
  }),
272
275
  emits: ["update:modelValue"],
273
- setup(r) {
274
- const e = r, t = E(r, "modelValue"), d = k(() => {
275
- let o = "";
276
+ setup(o) {
277
+ const e = o, t = W(o, "modelValue"), l = M(() => {
278
+ let s = "";
276
279
  switch (e.direction) {
277
280
  case "left":
278
- o = t.value ? "fixed top-0 left-0 bottom-0" : "fixed top-0 -left-full bottom-0";
281
+ s = t.value ? "fixed top-0 left-0 bottom-0" : "fixed top-0 -left-full bottom-0";
279
282
  break;
280
283
  case "bottom":
281
- o = t.value ? "fixed left-0 bottom-0 right-0" : "fixed left-0 right-0 -bottom-full";
284
+ s = t.value ? "fixed left-0 bottom-0 right-0" : "fixed left-0 right-0 -bottom-full";
282
285
  break;
283
286
  case "right":
284
- o = t.value ? "fixed top-0 right-0 bottom-0" : "fixed top-0 -right-full bottom-0";
287
+ s = t.value ? "fixed top-0 right-0 bottom-0" : "fixed top-0 -right-full bottom-0";
285
288
  break;
286
289
  default:
287
290
  alert("Invalid direction");
288
291
  }
289
- return o;
290
- }), a = k(() => {
291
- let o = "";
292
+ return s;
293
+ }), n = M(() => {
294
+ let s = "";
292
295
  switch (e.direction) {
293
296
  case "left":
294
- o = "w-full max-w-[360px]";
297
+ s = "w-full max-w-[360px]";
295
298
  break;
296
299
  case "bottom":
297
- o = "w-full h-full max-h-[90dvh]";
300
+ s = "w-full h-full max-h-[90dvh]";
298
301
  break;
299
302
  case "right":
300
- o = "w-full max-w-[360px]";
303
+ s = "w-full max-w-[360px]";
301
304
  break;
302
305
  }
303
- return o;
306
+ return s;
304
307
  });
305
- return V(t, () => {
306
- t.value ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
307
- }), (o, i) => (s(), n(_, null, [
308
- l("div", {
309
- onClick: i[0] || (i[0] = (c) => t.value = !t.value)
308
+ return (s, u) => (r(), i(E, null, [
309
+ a("div", {
310
+ onClick: u[0] || (u[0] = (d) => t.value = !t.value)
310
311
  }, [
311
- g(o.$slots, "default")
312
+ C(s.$slots, "default")
312
313
  ]),
313
- l("div", {
314
- class: u([[d.value, a.value], "z-50 flex flex-col justify-between bg-white duration-300"])
314
+ a("div", {
315
+ class: h([[l.value, n.value], "z-50 flex flex-col justify-between bg-white duration-300"])
315
316
  }, [
316
- l("div", xe, [
317
- l("div", null, [
318
- l("h4", $e, y(o.title), 1),
319
- l("p", _e, y(o.description), 1)
317
+ a("div", Pe, [
318
+ a("div", null, [
319
+ a("h4", qe, $(s.title), 1),
320
+ a("p", De, $(s.description), 1)
320
321
  ]),
321
- l("div", ke, [
322
- x(C, {
322
+ a("div", Ne, [
323
+ S(O, {
323
324
  icon: "close",
324
325
  class: "!p-1",
325
326
  circle: "",
326
327
  variant: "text",
327
- onClick: i[1] || (i[1] = (c) => t.value = !1)
328
+ onClick: u[1] || (u[1] = (d) => t.value = !1)
328
329
  })
329
330
  ])
330
331
  ]),
331
- l("div", Ce, [
332
- g(o.$slots, "content")
332
+ a("div", Fe, [
333
+ C(s.$slots, "content")
333
334
  ]),
334
- o.showFooter ? (s(), n("div", Se, [
335
- g(o.$slots, "footer")
336
- ])) : p("", !0)
335
+ s.showFooter ? (r(), i("div", Re, [
336
+ C(s.$slots, "footer")
337
+ ])) : y("", !0)
337
338
  ], 2),
338
- l("div", {
339
- class: u([t.value ? "opacity-100" : "pointer-events-none", "fixed inset-0 z-[49] bg-black/40 opacity-0 duration-200"]),
340
- onClick: i[2] || (i[2] = (c) => t.value = !1)
339
+ a("div", {
340
+ class: h([t.value ? "opacity-100" : "pointer-events-none", "fixed inset-0 z-[49] bg-black/40 opacity-0 duration-200"]),
341
+ onClick: u[2] || (u[2] = (d) => t.value = !1)
341
342
  }, null, 2)
342
343
  ], 64));
343
344
  }
344
- }), Le = {
345
+ }), We = {
345
346
  icon: { type: String, default: "" },
346
347
  placeholder: { type: String, default: "" },
347
348
  helpText: { type: String, default: "" },
348
349
  type: { type: String, default: "text", options: ["text", "password"] }
349
- }, Me = ["type"], ze = {
350
+ }, Xe = ["type"], Ue = {
350
351
  key: 0,
351
352
  class: "ml-1 pt-1 text-xs text-gray-400"
352
- }, et = /* @__PURE__ */ h({
353
+ }, $t = /* @__PURE__ */ x({
353
354
  __name: "Index",
354
- props: /* @__PURE__ */ B(Le, {
355
+ props: /* @__PURE__ */ R(We, {
355
356
  modelValue: {},
356
357
  modelModifiers: {}
357
358
  }),
358
359
  emits: ["update:modelValue"],
359
- setup(r) {
360
- const e = E(r, "modelValue");
361
- return (t, d) => (s(), n("div", {
362
- class: u([{ "mb-6": t.helpText }, "relative h-[42px]"])
360
+ setup(o) {
361
+ const e = W(o, "modelValue");
362
+ return (t, l) => (r(), i("div", {
363
+ class: h([{ "mb-6": t.helpText }, "relative h-[38px]"])
363
364
  }, [
364
- O(l("input", {
365
+ Q(a("input", {
365
366
  type: t.type,
366
- "onUpdate:modelValue": d[0] || (d[0] = (a) => e.value = a),
367
+ "onUpdate:modelValue": l[0] || (l[0] = (n) => e.value = n),
367
368
  class: "hover:border-primary/60 peer outline-primary h-full w-full rounded-md border border-gray-200 px-3 duration-200",
368
369
  placeholder: " "
369
- }, null, 8, Me), [
370
- [F, e.value]
370
+ }, null, 8, Xe), [
371
+ [te, e.value]
371
372
  ]),
372
- l("div", {
373
- class: u([e.value ? "-top-2.5 text-sm text-black" : "top-[9px]", "absolute left-3 bg-white px-[2px] text-black duration-100 peer-placeholder-shown:text-gray-400 peer-focus:-top-2.5 peer-focus:text-sm peer-focus:text-black"])
374
- }, y(t.placeholder), 3),
375
- t.helpText ? (s(), n("div", ze, y(t.helpText), 1)) : p("", !0)
373
+ a("div", {
374
+ class: h([e.value ? "-top-2.5 text-sm text-black" : "top-[6px]", "absolute left-3 bg-white px-[2px] text-black duration-100 peer-placeholder-shown:text-gray-400 peer-focus:-top-2.5 peer-focus:text-sm peer-focus:text-black"])
375
+ }, $(t.placeholder), 3),
376
+ t.helpText ? (r(), i("div", Ue, $(t.helpText), 1)) : y("", !0)
376
377
  ], 2));
377
378
  }
378
- }), Ve = {
379
+ }), Ze = {
379
380
  show: { type: Boolean, default: !1 }
380
- }, Ie = {
381
+ }, Ge = {
381
382
  key: 0,
382
383
  class: "fixed top-0 left-0 z-20 flex h-screen w-screen items-center justify-center backdrop-blur-[2px]"
383
- }, Be = {
384
+ }, Ke = {
384
385
  class: "flex max-w-[600px] flex-col overflow-hidden rounded border border-gray-200 bg-white text-slate-500 shadow-xl shadow-slate-700/10 sm:max-h-[95dvh] sm:w-[90%]",
385
386
  role: "document"
386
- }, Ee = { class: "flex items-center gap-4 border-b border-gray-200 px-4 py-2" }, qe = { class: "max-h-[calc(100dvh-100px)] flex-1 overflow-auto px-4 py-2 sm:max-h-[75vh]" }, Te = { class: "flex items-center justify-end gap-4 border-t border-gray-200 px-4 py-2" }, tt = /* @__PURE__ */ h({
387
+ }, Qe = { class: "flex items-center gap-4 border-b border-gray-200 px-4 py-2" }, He = { class: "max-h-[calc(100dvh-100px)] flex-1 overflow-auto px-4 py-2 sm:max-h-[75vh]" }, Je = { class: "flex items-center justify-end gap-4 border-t border-gray-200 px-4 py-2" }, _t = /* @__PURE__ */ x({
387
388
  __name: "Index",
388
- props: Ve,
389
+ props: Ze,
389
390
  emits: ["update:show"],
390
- setup(r, { emit: e }) {
391
- const t = r, d = e, a = b(t.show ?? !1);
392
- return V(
391
+ setup(o, { emit: e }) {
392
+ const t = o, l = e, n = _(t.show ?? !1);
393
+ return P(
393
394
  () => t.show,
394
- (o) => {
395
- o !== a.value && (a.value = o);
395
+ (s) => {
396
+ s !== n.value && (n.value = s);
396
397
  }
397
- ), V(a, (o) => {
398
- d("update:show", o), document.body.classList.toggle("overflow-hidden", o);
399
- }), (o, i) => (s(), n(_, null, [
400
- l("div", {
398
+ ), P(n, (s) => {
399
+ l("update:show", s), document.body.classList.toggle("overflow-hidden", s);
400
+ }), (s, u) => (r(), i(E, null, [
401
+ a("div", {
401
402
  class: "w-full",
402
- onClick: i[0] || (i[0] = (c) => a.value = !0)
403
+ onClick: u[0] || (u[0] = (d) => n.value = !0)
403
404
  }, [
404
- g(o.$slots, "default")
405
+ C(s.$slots, "default")
405
406
  ]),
406
- a.value ? (s(), n("div", Ie, [
407
- l("div", Be, [
408
- l("div", Ee, [
409
- i[4] || (i[4] = l("h3", { class: "text-primary flex-1 text-xl font-medium" }, "Modal title", -1)),
410
- x(C, {
407
+ n.value ? (r(), i("div", Ge, [
408
+ a("div", Ke, [
409
+ a("div", Qe, [
410
+ u[4] || (u[4] = a("h3", { class: "text-primary flex-1 text-xl font-medium" }, "Modal title", -1)),
411
+ S(O, {
411
412
  icon: "close",
412
413
  class: "!p-1",
413
414
  variant: "ghost",
414
415
  circle: "",
415
- onClick: i[1] || (i[1] = (c) => a.value = !1)
416
+ onClick: u[1] || (u[1] = (d) => n.value = !1)
416
417
  })
417
418
  ]),
418
- l("div", qe, [
419
- (s(), n(_, null, I(15, (c) => l("p", null, "Lorem ipsum dolor sit amet consectetur adipisicing elit. Nemo autem consequatur aspernatur animi voluptate quasi non, maxime iste, harum ipsa reiciendis laborum ad unde a sequi molestias? Dolore, obcaecati sed?")), 64))
419
+ a("div", He, [
420
+ (r(), i(E, null, F(15, (d) => a("p", null, "Lorem ipsum dolor sit amet consectetur adipisicing elit. Nemo autem consequatur aspernatur animi voluptate quasi non, maxime iste, harum ipsa reiciendis laborum ad unde a sequi molestias? Dolore, obcaecati sed?")), 64))
420
421
  ]),
421
- l("div", Te, [
422
- x(C, {
422
+ a("div", Je, [
423
+ S(O, {
423
424
  class: "!px-3 !py-1",
424
425
  variant: "ghost",
425
426
  label: "Close",
426
- onClick: i[2] || (i[2] = (c) => a.value = !1)
427
+ onClick: u[2] || (u[2] = (d) => n.value = !1)
427
428
  }),
428
- x(C, {
429
+ S(O, {
429
430
  class: "!px-3 !py-1",
430
431
  label: "Save",
431
- onClick: i[3] || (i[3] = (c) => a.value = !1)
432
+ onClick: u[3] || (u[3] = (d) => n.value = !1)
432
433
  })
433
434
  ])
434
435
  ])
435
- ])) : p("", !0)
436
+ ])) : y("", !0)
436
437
  ], 64));
437
438
  }
438
- }), je = {
439
+ }), Ye = {
439
440
  position: { type: String, default: "bottom", options: ["top", "bottom"] },
440
441
  bodyClass: { type: String, default: "" },
441
442
  contentClass: { type: String, default: "" }
442
- }, ot = /* @__PURE__ */ h({
443
+ }, Ct = /* @__PURE__ */ x({
443
444
  __name: "Index",
444
- props: je,
445
- setup(r) {
446
- const e = b(!0);
447
- return (t, d) => (s(), n("div", {
445
+ props: Ye,
446
+ setup(o) {
447
+ const e = _(!0);
448
+ return (t, l) => (r(), i("div", {
448
449
  class: "relative inline-block",
449
- onMouseleave: d[1] || (d[1] = (a) => e.value = !1)
450
+ onMouseleave: l[1] || (l[1] = (n) => e.value = !1)
450
451
  }, [
451
- l("div", {
452
+ a("div", {
452
453
  class: "relative",
453
- onMouseover: d[0] || (d[0] = (a) => e.value = !0)
454
+ onMouseover: l[0] || (l[0] = (n) => e.value = !0)
454
455
  }, [
455
- e.value ? (s(), n("svg", {
456
+ e.value ? (r(), i("svg", {
456
457
  key: 0,
457
- class: u([{ "top-full": t.position === "bottom", "bottom-full rotate-180": t.position === "top" }, "absolute left-1/2 w-4 -translate-x-1/2 text-gray-200"]),
458
+ class: h([{ "top-full": t.position === "bottom", "bottom-full rotate-180": t.position === "top" }, "absolute left-1/2 w-4 -translate-x-1/2 text-gray-200"]),
458
459
  xmlns: "http://www.w3.org/2000/svg",
459
460
  viewBox: "0 0 24 24"
460
- }, [...d[2] || (d[2] = [
461
- l("path", {
461
+ }, [...l[2] || (l[2] = [
462
+ a("path", {
462
463
  fill: "currentColor",
463
464
  d: "M3 19h18a1.002 1.002 0 0 0 .823-1.569l-9-13c-.373-.539-1.271-.539-1.645 0l-9 13A.999.999 0 0 0 3 19"
464
465
  }, null, -1)
465
- ])], 2)) : p("", !0),
466
- g(t.$slots, "default")
466
+ ])], 2)) : y("", !0),
467
+ C(t.$slots, "default")
467
468
  ], 32),
468
- e.value ? (s(), n("div", {
469
+ e.value ? (r(), i("div", {
469
470
  key: 0,
470
- class: u([[t.bodyClass, { "bottom-full mb-3": t.position === "top" }, { "top-full mt-3": t.position === "bottom" }], "absolute left-1/2 z-10 w-fit -translate-x-1/2"])
471
+ class: h([[t.bodyClass, { "bottom-full mb-3": t.position === "top" }, { "top-full mt-3": t.position === "bottom" }], "absolute left-1/2 z-10 w-fit -translate-x-1/2"])
471
472
  }, [
472
- l("div", {
473
- class: u([t.contentClass, "w-[200px] rounded-md border border-gray-200 bg-white p-3"])
473
+ a("div", {
474
+ class: h([t.contentClass, "w-[200px] rounded-md border border-gray-200 bg-white p-3"])
474
475
  }, [
475
- g(t.$slots, "body")
476
+ C(t.$slots, "body")
476
477
  ], 2)
477
- ], 2)) : p("", !0)
478
+ ], 2)) : y("", !0)
478
479
  ], 32));
479
480
  }
480
- }), Ae = {
481
+ }), et = {
481
482
  showTooltip: { type: Boolean, default: !1 },
482
483
  value: { type: Number, default: 0 }
483
- }, Oe = { class: "progress-container relative min-w-full py-4" }, De = { class: "relative h-2 rounded-full bg-gray-200" }, st = /* @__PURE__ */ h({
484
+ }, tt = { class: "progress-container relative min-w-full py-4" }, ot = { class: "relative h-2 rounded-full bg-gray-200" }, St = /* @__PURE__ */ x({
484
485
  __name: "Index",
485
- props: Ae,
486
+ props: et,
486
487
  emits: ["update:value"],
487
- setup(r, { emit: e }) {
488
- const t = r, d = e, a = b(t.value), o = b(!1), i = b(!1), c = (m) => {
489
- if (!o.value) return;
490
- const w = document.querySelector(".progress-container");
491
- if (!w) return;
492
- const M = w.getBoundingClientRect();
493
- let z;
494
- m instanceof TouchEvent ? z = m.touches[0]?.clientX ?? 0 : z = m.clientX;
495
- const N = z - M.left, q = Math.max(0, Math.min(100, N / M.width * 100));
496
- a.value = q, d("update:value", q);
497
- }, f = (m) => {
498
- o.value = !0, i.value = !0, c(m);
499
- }, v = () => {
500
- o.value = !1, i.value = !1;
488
+ setup(o, { emit: e }) {
489
+ const t = o, l = e, n = _(t.value), s = _(!1), u = _(!1), d = (f) => {
490
+ if (!s.value) return;
491
+ const g = document.querySelector(".progress-container");
492
+ if (!g) return;
493
+ const b = g.getBoundingClientRect();
494
+ let k;
495
+ f instanceof TouchEvent ? k = f.touches[0]?.clientX ?? 0 : k = f.clientX;
496
+ const I = k - b.left, A = Math.max(0, Math.min(100, I / b.width * 100));
497
+ n.value = A, l("update:value", A);
498
+ }, p = (f) => {
499
+ s.value = !0, u.value = !0, d(f);
500
+ }, m = () => {
501
+ s.value = !1, u.value = !1;
501
502
  };
502
- return X(() => {
503
- window.addEventListener("mousemove", c), window.addEventListener("mouseup", v), window.addEventListener("mouseleave", v), window.addEventListener("touchmove", c, { passive: !1 }), window.addEventListener("touchend", v), window.addEventListener("touchcancel", v);
504
- }), U(() => {
505
- window.removeEventListener("mousemove", c), window.removeEventListener("mouseup", v), window.removeEventListener("mouseleave", v), window.removeEventListener("touchmove", c), window.removeEventListener("touchend", v), window.removeEventListener("touchcancel", v);
506
- }), (m, w) => (s(), n("div", Oe, [
507
- l("div", De, [
508
- l("div", {
503
+ return oe(() => {
504
+ window.addEventListener("mousemove", d), window.addEventListener("mouseup", m), window.addEventListener("mouseleave", m), window.addEventListener("touchmove", d, { passive: !1 }), window.addEventListener("touchend", m), window.addEventListener("touchcancel", m);
505
+ }), se(() => {
506
+ window.removeEventListener("mousemove", d), window.removeEventListener("mouseup", m), window.removeEventListener("mouseleave", m), window.removeEventListener("touchmove", d), window.removeEventListener("touchend", m), window.removeEventListener("touchcancel", m);
507
+ }), (f, g) => (r(), i("div", tt, [
508
+ a("div", ot, [
509
+ a("div", {
509
510
  class: "bg-primary absolute h-2 rounded-full",
510
- style: $({ width: a.value + "%" })
511
+ style: V({ width: n.value + "%" })
511
512
  }, null, 4),
512
- l("div", {
513
+ a("div", {
513
514
  class: "absolute top-1/2 -ml-2 flex h-4 w-4 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full border border-gray-300 bg-white shadow",
514
- style: $({ left: a.value + "%" }),
515
+ style: V({ left: n.value + "%" }),
515
516
  unselectable: "on",
516
517
  onselectstart: "return false;",
517
- onMousedown: f,
518
- onTouchstart: f
518
+ onMousedown: p,
519
+ onTouchstart: p
519
520
  }, null, 36),
520
- i.value && m.showTooltip ? (s(), n("div", {
521
+ u.value && f.showTooltip ? (r(), i("div", {
521
522
  key: 0,
522
523
  class: "absolute -top-9 mx-auto w-10 -translate-x-1/2 rounded bg-gray-800 px-2 py-1 text-xs text-white",
523
- style: $({ left: a.value + "%" })
524
+ style: V({ left: n.value + "%" })
524
525
  }, [
525
- A(y(Math.round(a.value)) + "% ", 1),
526
- w[0] || (w[0] = l("span", { class: "absolute -bottom-1 left-1/2 -ml-1 h-2 w-2 rotate-45 bg-gray-800" }, null, -1))
527
- ], 4)) : p("", !0)
526
+ K($(Math.round(n.value)) + "% ", 1),
527
+ g[0] || (g[0] = a("span", { class: "absolute -bottom-1 left-1/2 -ml-1 h-2 w-2 rotate-45 bg-gray-800" }, null, -1))
528
+ ], 4)) : y("", !0)
528
529
  ])
529
530
  ]));
530
531
  }
531
- }), Ne = {
532
+ }), st = {
532
533
  modelValue: { type: String, default: "" },
533
534
  options: { type: Array, required: !0 },
534
- variant: { type: String, default: "solid", options: ["outlined", "text", "ghost", "solid"] },
535
+ variant: { type: String, default: "solid", options: ["outlined", "text", "ghost", "solid", "gray"] },
535
536
  showFilter: { type: Boolean, default: !1 },
536
- isOpen: { type: Boolean, default: !1 }
537
- }, Pe = { class: "relative" }, Fe = {
537
+ isOpen: { type: Boolean, default: !1 },
538
+ closeOnClickOutside: { type: Boolean, default: !0 }
539
+ };
540
+ function lt(o) {
541
+ return le() ? (ne(o), !0) : !1;
542
+ }
543
+ const J = typeof window < "u" && typeof document < "u";
544
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
545
+ const nt = Object.prototype.toString, rt = (o) => nt.call(o) === "[object Object]", z = () => {
546
+ }, at = /* @__PURE__ */ it();
547
+ function it() {
548
+ var o, e;
549
+ return J && ((o = window?.navigator) == null ? void 0 : o.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((e = window?.navigator) == null ? void 0 : e.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
550
+ }
551
+ function D(o) {
552
+ return Array.isArray(o) ? o : [o];
553
+ }
554
+ function ut(o, e, t) {
555
+ return P(
556
+ o,
557
+ e,
558
+ {
559
+ ...t,
560
+ immediate: !0
561
+ }
562
+ );
563
+ }
564
+ const Y = J ? window : void 0;
565
+ function B(o) {
566
+ var e;
567
+ const t = L(o);
568
+ return (e = t?.$el) != null ? e : t;
569
+ }
570
+ function N(...o) {
571
+ const e = [], t = () => {
572
+ e.forEach((d) => d()), e.length = 0;
573
+ }, l = (d, p, m, f) => (d.addEventListener(p, m, f), () => d.removeEventListener(p, m, f)), n = M(() => {
574
+ const d = D(L(o[0])).filter((p) => p != null);
575
+ return d.every((p) => typeof p != "string") ? d : void 0;
576
+ }), s = ut(
577
+ () => {
578
+ var d, p;
579
+ return [
580
+ (p = (d = n.value) == null ? void 0 : d.map((m) => B(m))) != null ? p : [Y].filter((m) => m != null),
581
+ D(L(n.value ? o[1] : o[0])),
582
+ D(re(n.value ? o[2] : o[1])),
583
+ // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
584
+ L(n.value ? o[3] : o[2])
585
+ ];
586
+ },
587
+ ([d, p, m, f]) => {
588
+ if (t(), !d?.length || !p?.length || !m?.length)
589
+ return;
590
+ const g = rt(f) ? { ...f } : f;
591
+ e.push(
592
+ ...d.flatMap(
593
+ (b) => p.flatMap(
594
+ (k) => m.map((I) => l(b, k, I, g))
595
+ )
596
+ )
597
+ );
598
+ },
599
+ { flush: "post" }
600
+ ), u = () => {
601
+ s(), t();
602
+ };
603
+ return lt(t), u;
604
+ }
605
+ let Z = !1;
606
+ function dt(o, e, t = {}) {
607
+ const { window: l = Y, ignore: n = [], capture: s = !0, detectIframe: u = !1, controls: d = !1 } = t;
608
+ if (!l)
609
+ return d ? { stop: z, cancel: z, trigger: z } : z;
610
+ if (at && !Z) {
611
+ Z = !0;
612
+ const c = { passive: !0 };
613
+ Array.from(l.document.body.children).forEach((v) => v.addEventListener("click", z, c)), l.document.documentElement.addEventListener("click", z, c);
614
+ }
615
+ let p = !0;
616
+ const m = (c) => L(n).some((v) => {
617
+ if (typeof v == "string")
618
+ return Array.from(l.document.querySelectorAll(v)).some((w) => w === c.target || c.composedPath().includes(w));
619
+ {
620
+ const w = B(v);
621
+ return w && (c.target === w || c.composedPath().includes(w));
622
+ }
623
+ });
624
+ function f(c) {
625
+ const v = L(c);
626
+ return v && v.$.subTree.shapeFlag === 16;
627
+ }
628
+ function g(c, v) {
629
+ const w = L(c), q = w.$.subTree && w.$.subTree.children;
630
+ return q == null || !Array.isArray(q) ? !1 : q.some((X) => X.el === v.target || v.composedPath().includes(X.el));
631
+ }
632
+ const b = (c) => {
633
+ const v = B(o);
634
+ if (c.target != null && !(!(v instanceof Element) && f(o) && g(o, c)) && !(!v || v === c.target || c.composedPath().includes(v))) {
635
+ if ("detail" in c && c.detail === 0 && (p = !m(c)), !p) {
636
+ p = !0;
637
+ return;
638
+ }
639
+ e(c);
640
+ }
641
+ };
642
+ let k = !1;
643
+ const I = [
644
+ N(l, "click", (c) => {
645
+ k || (k = !0, setTimeout(() => {
646
+ k = !1;
647
+ }, 0), b(c));
648
+ }, { passive: !0, capture: s }),
649
+ N(l, "pointerdown", (c) => {
650
+ const v = B(o);
651
+ p = !m(c) && !!(v && !c.composedPath().includes(v));
652
+ }, { passive: !0 }),
653
+ u && N(l, "blur", (c) => {
654
+ setTimeout(() => {
655
+ var v;
656
+ const w = B(o);
657
+ ((v = l.document.activeElement) == null ? void 0 : v.tagName) === "IFRAME" && !w?.contains(l.document.activeElement) && e(c);
658
+ }, 0);
659
+ }, { passive: !0 })
660
+ ].filter(Boolean), A = () => I.forEach((c) => c());
661
+ return d ? {
662
+ stop: A,
663
+ cancel: () => {
664
+ p = !1;
665
+ },
666
+ trigger: (c) => {
667
+ p = !0, b(c), p = !1;
668
+ }
669
+ } : A;
670
+ }
671
+ const ct = {
538
672
  key: 0,
539
673
  class: "absolute top-full z-10 mt-1 flex w-full list-none flex-col rounded border border-gray-200 bg-white shadow-md shadow-slate-500/10"
540
- }, Xe = {
674
+ }, pt = {
541
675
  key: 0,
542
676
  class: "border-b border-gray-200 p-2"
543
- }, Ue = ["onClick"], lt = /* @__PURE__ */ h({
677
+ }, ft = ["onClick"], Lt = /* @__PURE__ */ x({
544
678
  __name: "Index",
545
- props: Ne,
679
+ props: st,
546
680
  emits: ["update:modelValue", "update:isOpen"],
547
- setup(r, { emit: e }) {
548
- const t = r, d = e, a = b(t.modelValue), o = (f) => {
549
- a.value = f, d("update:modelValue", f), d("update:isOpen", !1);
550
- }, i = b(""), c = k(() => i.value ? t.options.filter((f) => f.toLowerCase().includes(i.value.toLowerCase())) : t.options);
551
- return (f, v) => (s(), n("div", Pe, [
552
- x(C, {
553
- "icon-class": f.isOpen ? "rotate-180" : "",
681
+ setup(o, { emit: e }) {
682
+ const t = o, l = e, n = _(t.modelValue), s = _(t.isOpen ?? !1), u = ae("target");
683
+ dt(u, () => t.closeOnClickOutside && (s.value = !1)), P(
684
+ () => t.isOpen,
685
+ (f) => {
686
+ f !== s.value && (s.value = f);
687
+ }
688
+ );
689
+ const d = (f) => {
690
+ n.value = f, l("update:modelValue", f), s.value = !1;
691
+ }, p = _(""), m = M(() => p.value ? t.options.filter((f) => f.toLowerCase().includes(p.value.toLowerCase())) : t.options);
692
+ return (f, g) => (r(), i("div", {
693
+ class: "relative",
694
+ ref_key: "target",
695
+ ref: u
696
+ }, [
697
+ S(O, {
698
+ "icon-class": s.value ? "rotate-180" : "",
554
699
  icon: "chevron-down",
555
- class: "w-full",
700
+ class: "w-full capitalize",
556
701
  variant: f.variant,
557
- label: a.value || "Select",
558
- onClick: v[0] || (v[0] = (m) => f.isOpen = !f.isOpen)
702
+ label: n.value || "Select",
703
+ onClick: g[0] || (g[0] = (b) => s.value = !s.value)
559
704
  }, null, 8, ["icon-class", "variant", "label"]),
560
- f.isOpen ? (s(), n("ul", Fe, [
561
- f.showFilter ? (s(), n("li", Xe, [
562
- O(l("input", {
705
+ s.value ? (r(), i("ul", ct, [
706
+ f.showFilter ? (r(), i("li", pt, [
707
+ Q(a("input", {
563
708
  type: "text",
564
- "onUpdate:modelValue": v[1] || (v[1] = (m) => i.value = m),
709
+ "onUpdate:modelValue": g[1] || (g[1] = (b) => p.value = b),
565
710
  class: "focus:border-primary w-full rounded-sm border border-gray-200 px-2 py-1 focus:outline-none",
566
711
  placeholder: "Search"
567
712
  }, null, 512), [
568
- [Z, i.value]
713
+ [ie, p.value]
569
714
  ])
570
- ])) : p("", !0),
571
- (s(!0), n(_, null, I(c.value, (m, w) => (s(), n("li", {
572
- key: w,
573
- class: u([m === a.value && "bg-primary/10", "hover:bg-primary/5 cursor-pointer px-4 py-2"]),
574
- onClick: (M) => o(m)
575
- }, y(m), 11, Ue))), 128))
576
- ])) : p("", !0)
577
- ]));
715
+ ])) : y("", !0),
716
+ (r(!0), i(E, null, F(m.value, (b, k) => (r(), i("li", {
717
+ key: k,
718
+ class: h([b === n.value && "bg-primary/10", "hover:bg-primary/5 cursor-pointer px-4 py-2 text-left"]),
719
+ onClick: (I) => d(b)
720
+ }, $(b), 11, ft))), 128))
721
+ ])) : y("", !0)
722
+ ], 512));
578
723
  }
579
- }), Ze = {
724
+ }), mt = {
580
725
  direction: { type: String, default: "horizontal", options: ["horizontal", "vertical"] },
581
- color: { type: String, default: "#16476A" },
726
+ color: { type: String, default: "" },
582
727
  label: { type: String, default: "" },
583
728
  icon: { type: String, default: "" }
584
- }, Re = {
729
+ }, vt = {
585
730
  key: 1,
586
731
  class: "absolute inset-0 m-auto flex h-fit w-fit shrink-0 items-center justify-center bg-white p-1"
587
- }, rt = /* @__PURE__ */ h({
732
+ }, Et = /* @__PURE__ */ x({
588
733
  __name: "Index",
589
- props: Ze,
590
- setup(r) {
591
- return (e, t) => (s(), n("div", {
592
- class: u([e.direction === "horizontal" ? "h-[1px] w-full" : e.direction === "vertical" ? "h-full w-[1px]" : "", "relative bg-gray-200"]),
593
- style: $({ backgroundColor: e.color })
734
+ props: mt,
735
+ setup(o) {
736
+ return (e, t) => (r(), i("div", {
737
+ class: h([e.direction === "horizontal" ? "h-[1px] w-full" : e.direction === "vertical" ? "h-full w-[1px]" : "", "relative bg-gray-200"]),
738
+ style: V({ backgroundColor: e.color || "var(--color-primary)" })
594
739
  }, [
595
- e.direction === "horizontal" && e.label && !e.icon ? (s(), n("span", {
596
- key: 0,
597
- class: "absolute inset-0 m-auto flex w-fit items-center justify-center rounded-sm border border-gray-100 bg-white px-1 py-2 text-sm",
598
- style: $({ color: e.color, borderColor: e.color })
599
- }, "Test label", 4)) : p("", !0),
600
- e.direction === "horizontal" && !e.label && e.icon ? (s(), n("span", Re, [
601
- x(D, {
602
- icon: e.icon,
603
- class: "size-6",
604
- style: $({ color: e.color })
605
- }, null, 8, ["icon", "style"])
606
- ])) : p("", !0)
740
+ e.direction === "horizontal" ? (r(), i(E, { key: 0 }, [
741
+ e.label && !e.icon ? (r(), i("span", {
742
+ key: 0,
743
+ class: "absolute inset-0 m-auto flex w-fit items-center justify-center rounded-sm border border-gray-100 bg-white px-1 py-2 text-sm",
744
+ style: V({ color: e.color, borderColor: e.color })
745
+ }, "Test label", 4)) : y("", !0),
746
+ e.icon && !e.label ? (r(), i("span", vt, [
747
+ S(H, {
748
+ icon: e.icon,
749
+ class: "size-6",
750
+ style: V({ color: e.color || "var(--color-primary)" })
751
+ }, null, 8, ["icon", "style"])
752
+ ])) : y("", !0)
753
+ ], 64)) : y("", !0)
607
754
  ], 6));
608
755
  }
609
- }), Ke = {
756
+ }), ht = {
610
757
  content: { type: String, default: "" },
611
758
  position: { type: String, default: "bottom", options: ["top", "bottom", "left", "right"] },
612
759
  bodyClass: { type: String, default: "" }
613
- }, Qe = { key: 0 }, nt = /* @__PURE__ */ h({
760
+ }, yt = { key: 0 }, Mt = /* @__PURE__ */ x({
614
761
  __name: "Index",
615
- props: Ke,
616
- setup(r) {
617
- const e = b(!1);
618
- return (t, d) => (s(), n("div", {
762
+ props: ht,
763
+ setup(o) {
764
+ const e = _(!1);
765
+ return (t, l) => (r(), i("div", {
619
766
  class: "relative inline-block",
620
- onMouseenter: d[0] || (d[0] = (a) => e.value = !0),
621
- onMouseleave: d[1] || (d[1] = (a) => e.value = !1)
767
+ onMouseenter: l[0] || (l[0] = (n) => e.value = !0),
768
+ onMouseleave: l[1] || (l[1] = (n) => e.value = !1)
622
769
  }, [
623
- g(t.$slots, "default"),
624
- e.value ? (s(), n("div", {
770
+ C(t.$slots, "default"),
771
+ e.value ? (r(), i("div", {
625
772
  key: 0,
626
- class: u([
773
+ class: h([
627
774
  "absolute z-10 w-max rounded-md bg-white px-3 py-2 text-sm text-primary border shadow-xl transition-opacity duration-200",
628
775
  t.position === "top" && "bottom-full left-1/2 mb-2 -translate-x-1/2",
629
776
  t.position === "bottom" && "top-full left-1/2 mt-2 -translate-x-1/2",
@@ -632,35 +779,35 @@ const ge = /* @__PURE__ */ S(he, [["render", be]]), T = {
632
779
  t.bodyClass
633
780
  ])
634
781
  }, [
635
- t.content ? g(t.$slots, "body", { key: 1 }) : (s(), n("span", Qe, y(t.content), 1))
636
- ], 2)) : p("", !0)
782
+ t.content ? C(t.$slots, "body", { key: 1 }) : (r(), i("span", yt, $(t.content), 1))
783
+ ], 2)) : y("", !0)
637
784
  ], 32));
638
785
  }
639
- }), at = (r) => ({
786
+ }), It = (o) => ({
640
787
  install() {
641
- if (!r || !r.colors) {
788
+ if (!o || !o.colors) {
642
789
  console.warn("No config provided for the theme settings");
643
790
  return;
644
791
  }
645
- Ge(r.colors);
792
+ gt(o.colors);
646
793
  }
647
- }), Ge = (r) => {
794
+ }), gt = (o) => {
648
795
  const e = document.documentElement;
649
- for (const t in r)
650
- r[t] && e.style.setProperty(`--ui-color-${t}`, r[t]);
796
+ for (const t in o)
797
+ o[t] && e.style.setProperty(`--ui-color-${t}`, o[t]);
651
798
  };
652
799
  export {
653
- Je as Accordion,
654
- C as Button,
655
- We as Checkbox,
656
- Ye as Drawer,
657
- et as Input,
658
- tt as Modal,
659
- ot as Popover,
660
- st as RangeSlider,
661
- lt as Select,
662
- rt as Separator,
663
- nt as Tooltip,
664
- at as config
800
+ wt as Accordion,
801
+ O as Button,
802
+ xt as Checkbox,
803
+ kt as Drawer,
804
+ $t as Input,
805
+ _t as Modal,
806
+ Ct as Popover,
807
+ St as RangeSlider,
808
+ Lt as Select,
809
+ Et as Separator,
810
+ Mt as Tooltip,
811
+ It as config
665
812
  };
666
813
  //# sourceMappingURL=index.js.map