@oneb/ui-vue 0.3.30 → 0.3.32

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.
@@ -1,11 +1,11 @@
1
- import { d as he, e as ye, _ as we, r as ge, f as ke } from "../OneHelpMenu-df4e18a9.js";
2
- import { O as lo, a as so, c as no, b as ro } from "../OneHelpMenu-df4e18a9.js";
3
- import { defineComponent as X, ref as C, watch as ce, onBeforeUnmount as be, provide as xe, computed as I, openBlock as o, createElementBlock as s, createElementVNode as t, renderSlot as V, normalizeProps as F, guardReactiveProps as P, createBlock as U, Teleport as Ce, createCommentVNode as m, withDirectives as q, normalizeClass as w, toDisplayString as u, vShow as _e, withCtx as z, createVNode as H, unref as y, normalizeStyle as J, Fragment as M, renderList as L, onMounted as $e, onUnmounted as Me, vModelText as se, mergeProps as R, createTextVNode as ne, nextTick as T } from "vue";
4
- import { computePosition as re, offset as ae, shift as ie, autoUpdate as Ve } from "@floating-ui/dom";
1
+ import { d as ye, e as we, _ as ge, r as ke, f as be } from "../OneHelpMenu-73817f8a.js";
2
+ import { O as lo, a as so, c as no, b as ro } from "../OneHelpMenu-73817f8a.js";
3
+ import { defineComponent as X, ref as $, watch as ce, onBeforeUnmount as xe, provide as _e, computed as j, openBlock as o, createElementBlock as s, createElementVNode as t, renderSlot as K, normalizeProps as U, guardReactiveProps as W, createBlock as N, Teleport as Ce, createCommentVNode as v, withDirectives as q, normalizeClass as g, toDisplayString as u, vShow as $e, withCtx as z, createVNode as H, unref as y, normalizeStyle as J, Fragment as V, renderList as L, onMounted as Me, onUnmounted as Ve, vModelText as se, mergeProps as P, createTextVNode as ne, nextTick as T } from "vue";
4
+ import { computePosition as re, offset as ae, shift as ie, autoUpdate as Ke } from "@floating-ui/dom";
5
5
  import { flip as ue } from "@floating-ui/vue";
6
- import { _ as Ke } from "../_plugin-vue_export-helper-dad06003.js";
6
+ import { _ as Ae } from "../_plugin-vue_export-helper-dad06003.js";
7
7
  import { _ as de } from "../OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd.js";
8
- import { useOnebI18n as Ae } from "../i18n/index.js";
8
+ import { useOnebI18n as ve } from "../i18n/index.js";
9
9
  import { u as Oe, O as je } from "../useModal-7fe9444b.js";
10
10
  import "../XMarkIcon-51ef0691.js";
11
11
  import "../ChevronDownIcon-6805ce6c.js";
@@ -18,85 +18,85 @@ const Ie = ["data-opened"], Be = {
18
18
  class: "text-sm text-secondary-content px-3 py-2 text-left"
19
19
  }, Le = /* @__PURE__ */ X({
20
20
  __name: "OneDropdownAuto",
21
- props: he,
21
+ props: ye,
22
22
  emits: ["open", "close"],
23
- setup(S, { emit: g }) {
24
- const n = S, c = C(!1), f = C(null), x = C(null);
23
+ setup(S, { emit: k }) {
24
+ const n = S, p = $(!1), m = $(null), w = $(null);
25
25
  let h = null;
26
- ce(c, (p) => {
27
- p && x.value && f.value ? (re(x.value, f.value, {
26
+ ce(p, (d) => {
27
+ d && w.value && m.value ? (re(w.value, m.value, {
28
28
  placement: n.stick ? n.stick : "bottom-start",
29
29
  strategy: "fixed",
30
30
  middleware: [ae(5), ue(), ie({ padding: 8 })]
31
- }).then(({ x: i, y: A }) => {
32
- Object.assign(f.value.style, {
31
+ }).then(({ x: i, y: C }) => {
32
+ Object.assign(m.value.style, {
33
33
  left: `${i}px`,
34
- top: `${A}px`
34
+ top: `${C}px`
35
35
  });
36
- }), h = Ve(x.value, f.value, () => {
37
- re(x.value, f.value, {
36
+ }), h = Ke(w.value, m.value, () => {
37
+ re(w.value, m.value, {
38
38
  placement: n.stick ? n.stick : "bottom-start",
39
39
  strategy: "fixed",
40
40
  middleware: [ae(4), ue(), ie({ padding: 8 })]
41
- }).then(({ x: i, y: A }) => {
42
- Object.assign(f.value.style, {
41
+ }).then(({ x: i, y: C }) => {
42
+ Object.assign(m.value.style, {
43
43
  left: `${i}px`,
44
- top: `${A}px`
44
+ top: `${C}px`
45
45
  });
46
46
  });
47
47
  })) : h && (h(), h = null);
48
- }), be(() => {
48
+ }), xe(() => {
49
49
  h && h();
50
50
  });
51
- const d = g, _ = () => {
52
- c.value = !c.value, c.value ? d("open") : d("close");
51
+ const b = k, A = () => {
52
+ p.value = !p.value, p.value ? b("open") : b("close");
53
53
  };
54
- xe("OneDropdown", {
55
- onToggle: _
54
+ _e("OneDropdown", {
55
+ onToggle: A
56
56
  });
57
- const K = I(() => [
57
+ const f = j(() => [
58
58
  "fixed z-[10000] w-fit rounded-md bg-white",
59
59
  "py-1 shadow-lg ring-black ring-opacity-5 focus:outline-none",
60
60
  "overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"
61
61
  ]);
62
- return (p, i) => (o(), s("div", {
62
+ return (d, i) => (o(), s("div", {
63
63
  class: "relative inline-block",
64
- "data-opened": c.value
64
+ "data-opened": p.value
65
65
  }, [
66
66
  t("div", {
67
67
  ref_key: "buttonRef",
68
- ref: x
68
+ ref: w
69
69
  }, [
70
- V(p.$slots, "button", F(P({ onToggle: _, isExpanded: c.value })))
70
+ K(d.$slots, "button", U(W({ onToggle: A, isExpanded: p.value })))
71
71
  ], 512),
72
- (o(), U(Ce, { to: "body" }, [
73
- c.value ? (o(), s("div", {
72
+ (o(), N(Ce, { to: "body" }, [
73
+ p.value ? (o(), s("div", {
74
74
  key: 0,
75
75
  class: "fixed top-0 left-0 w-screen h-screen z-[9999]",
76
- onClick: _
77
- })) : m("", !0),
76
+ onClick: A
77
+ })) : v("", !0),
78
78
  q(t("div", {
79
79
  ref_key: "menuRef",
80
- ref: f,
81
- class: w(["menu", K.value]),
80
+ ref: m,
81
+ class: g(["menu", f.value]),
82
82
  role: "menu",
83
83
  "aria-orientation": "vertical",
84
84
  tabindex: "-1",
85
85
  style: { display: "none" }
86
86
  }, [
87
- p.title ? (o(), s("div", Be, u(p.title), 1)) : m("", !0),
88
- V(p.$slots, "menu", F(P({ onToggle: _ })))
87
+ d.title ? (o(), s("div", Be, u(d.title), 1)) : v("", !0),
88
+ K(d.$slots, "menu", U(W({ onToggle: A })))
89
89
  ], 2), [
90
- [_e, c.value]
90
+ [$e, p.value]
91
91
  ])
92
92
  ]))
93
93
  ], 8, Ie));
94
94
  }
95
95
  }), Se = {}, De = { class: "border-t border-secondary-stroke my-1" };
96
- function ze(S, g) {
96
+ function ze(S, k) {
97
97
  return o(), s("div", De);
98
98
  }
99
- const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { class: "grid" }, Fe = { class: "font-semibold px-3" }, Pe = { class: "rounded-lg m-3 border" }, Ue = {
99
+ const Zt = /* @__PURE__ */ Ae(Se, [["render", ze]]), Ee = ["onClick"], Re = { class: "grid" }, Fe = { class: "font-semibold px-3" }, Pe = { class: "rounded-lg m-3 border" }, Ue = {
100
100
  class: "space-x-2 flex items-center px-3 py-2",
101
101
  style: { width: "300px" }
102
102
  }, We = { class: "flex-shrink-0" }, Ne = { class: "w-full text-left" }, Ge = { class: "flex-shrink-0" }, He = { class: "px-3 py-2" }, Te = { class: "text-secondary-content text-left pb-1 text-sm uppercase" }, qe = {
@@ -104,61 +104,61 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
104
104
  class: "space-y-2"
105
105
  }, Je = ["onClick"], Xe = { class: "pl-2" }, Ye = { class: "text-sm mt-1" }, Ze = { class: "text-xs mt-1" }, pe = 3, Qt = /* @__PURE__ */ X({
106
106
  __name: "OneBrowserMenuGrid",
107
- props: ye,
107
+ props: we,
108
108
  setup(S) {
109
- const g = S, n = () => {
110
- typeof g.onChange == "function" && g.onChange();
111
- }, c = C(!1), f = I(() => g.apps ? c.value ? g.apps : g.apps.slice(0, pe) : []), x = () => {
112
- c.value = !c.value;
113
- }, h = (d) => {
114
- typeof g.onApp == "function" && g.onApp(d);
109
+ const k = S, n = ve(), p = j(() => k.t ?? n), m = () => {
110
+ typeof k.onChange == "function" && k.onChange();
111
+ }, w = $(!1), h = j(() => k.apps ? w.value ? k.apps : k.apps.slice(0, pe) : []), b = () => {
112
+ w.value = !w.value;
113
+ }, A = (f) => {
114
+ typeof k.onApp == "function" && k.onApp(f);
115
115
  };
116
- return (d, _) => (o(), U(we, { stick: "right" }, {
117
- button: z(({ onToggle: K, isExpanded: p }) => [
116
+ return (f, d) => (o(), N(ge, { stick: "right" }, {
117
+ button: z(({ onToggle: i, isExpanded: C }) => [
118
118
  t("button", {
119
- onClick: K,
120
- class: w(["p-1 rounded-md hover:bg-secondary-10", [p ? "bg-secondary-25" : ""]])
119
+ onClick: i,
120
+ class: g(["p-1 rounded-md hover:bg-secondary-10", [C ? "bg-secondary-25" : ""]])
121
121
  }, [
122
- H(y(ge), {
122
+ H(y(ke), {
123
123
  class: "text-secondary-base",
124
- style: J(`width: ${d.iconSize}px; height: ${d.iconSize}px`)
124
+ style: J(`width: ${f.iconSize}px; height: ${f.iconSize}px`)
125
125
  }, null, 8, ["style"])
126
126
  ], 10, Ee)
127
127
  ]),
128
128
  menu: z(() => {
129
- var K, p, i, A;
129
+ var i, C, E;
130
130
  return [
131
131
  t("div", Re, [
132
- t("div", Fe, u((K = d.workspace) == null ? void 0 : K.title), 1),
132
+ t("div", Fe, u(p.value("ui.layout.workspaces")), 1),
133
133
  t("div", Pe, [
134
134
  t("div", Ue, [
135
135
  t("div", We, [
136
136
  H(de, {
137
- text: ((p = d.workspace) == null ? void 0 : p.name) || "",
138
- src: (i = d.workspace) == null ? void 0 : i.photo_url,
137
+ text: ((i = f.workspace) == null ? void 0 : i.name) || "",
138
+ src: (C = f.workspace) == null ? void 0 : C.photo_url,
139
139
  size: 44,
140
140
  rounded: !1,
141
141
  class: "mx-auto"
142
142
  }, null, 8, ["text", "src"])
143
143
  ]),
144
- t("div", Ne, u((A = d.workspace) == null ? void 0 : A.name), 1),
144
+ t("div", Ne, u((E = f.workspace) == null ? void 0 : E.name), 1),
145
145
  t("div", Ge, [
146
146
  t("button", {
147
147
  class: "text-sm border border-secondary-stroke rounded px-2 py-0.5 text-secondary-content hover:text-primary-content",
148
- onClick: n
149
- }, u(d.changeLabel), 1)
148
+ onClick: m
149
+ }, u(p.value("ui.layout.change_workspace")), 1)
150
150
  ])
151
151
  ]),
152
- _[0] || (_[0] = t("hr", null, null, -1))
152
+ d[0] || (d[0] = t("hr", null, null, -1))
153
153
  ])
154
154
  ]),
155
155
  t("div", He, [
156
- t("div", Te, u(d.appsTitle), 1),
156
+ t("div", Te, u(p.value("ui.layout.apps")), 1),
157
157
  t("div", null, [
158
- d.apps && d.apps.length ? (o(), s("div", qe, [
159
- (o(!0), s(M, null, L(f.value, (O) => (o(), s("div", {
158
+ f.apps && f.apps.length ? (o(), s("div", qe, [
159
+ (o(!0), s(V, null, L(h.value, (O) => (o(), s("div", {
160
160
  key: O.id,
161
- onClick: (W) => h(O),
161
+ onClick: (R) => A(O),
162
162
  class: "flex items-center rounded-lg hover:bg-secondary-10 border p-2 bg-[#FAFAFA] cursor-pointer"
163
163
  }, [
164
164
  H(de, {
@@ -172,12 +172,12 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
172
172
  t("p", Ze, u(O.short), 1)
173
173
  ])
174
174
  ], 8, Je))), 128))
175
- ])) : m("", !0),
176
- d.apps && d.apps.length > pe ? (o(), s("button", {
175
+ ])) : v("", !0),
176
+ f.apps && f.apps.length > pe ? (o(), s("button", {
177
177
  key: 1,
178
- onClick: x,
178
+ onClick: b,
179
179
  class: "mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs"
180
- }, u(c.value ? "Приховати" : "Дивитися всі"), 1)) : m("", !0)
180
+ }, u(w.value ? p.value("ui.layout.hide") : p.value("ui.layout.view_all")), 1)) : v("", !0)
181
181
  ])
182
182
  ])
183
183
  ];
@@ -239,10 +239,10 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
239
239
  }, gt = { class: "pb-6" }, kt = {
240
240
  key: 0,
241
241
  class: "relative px-3 py-3"
242
- }, bt = { class: "relative" }, xt = ["placeholder"], Ct = {
242
+ }, bt = { class: "relative" }, xt = ["placeholder"], _t = {
243
243
  key: 1,
244
244
  class: "px-3 py-2"
245
- }, _t = {
245
+ }, Ct = {
246
246
  key: 2,
247
247
  class: "flex items-center justify-between px-3 py-2 border-b border-gray-100"
248
248
  }, $t = {
@@ -293,84 +293,84 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
293
293
  class: "px-3 py-8 text-sm text-gray-500 text-center"
294
294
  }, eo = /* @__PURE__ */ X({
295
295
  __name: "OneDropdownSelect",
296
- props: ke,
296
+ props: be,
297
297
  emits: ["update:modelValue", "search", "create"],
298
- setup(S, { emit: g }) {
299
- const n = S, c = Ae(), f = g, x = C(!1);
298
+ setup(S, { emit: k }) {
299
+ const n = S, p = ve(), m = k, w = $(!1);
300
300
  let h = null;
301
- $e(() => {
302
- h = window.matchMedia("(max-width: 767px)"), x.value = h.matches;
301
+ Me(() => {
302
+ h = window.matchMedia("(max-width: 767px)"), w.value = h.matches;
303
303
  const e = (l) => {
304
- x.value = l.matches;
304
+ w.value = l.matches;
305
305
  };
306
- h.addEventListener("change", e), Me(() => {
306
+ h.addEventListener("change", e), Ve(() => {
307
307
  h == null || h.removeEventListener("change", e);
308
308
  });
309
309
  });
310
- const d = Oe(), _ = C(null), K = () => {
311
- p.value = "", i.value = -1, d.open(), T(() => {
310
+ const b = Oe(), A = $(null), f = () => {
311
+ d.value = "", i.value = -1, b.open(), T(() => {
312
312
  var e;
313
- (e = _.value) == null || e.focus();
313
+ (e = A.value) == null || e.focus();
314
314
  });
315
- }, p = C(""), i = C(-1), A = C(null), O = C(null), W = C({}), N = (e, l) => {
316
- e && (W.value[l] = e);
317
- }, D = I(() => n.allowEmpty ? 1 : 0), B = I(() => {
318
- if (!p.value.trim())
315
+ }, d = $(""), i = $(-1), C = $(null), E = $(null), O = $({}), R = (e, l) => {
316
+ e && (O.value[l] = e);
317
+ }, D = j(() => n.allowEmpty ? 1 : 0), B = j(() => {
318
+ if (!d.value.trim())
319
319
  return n.items;
320
- const e = p.value.toLowerCase();
320
+ const e = d.value.toLowerCase();
321
321
  return n.items.filter(
322
322
  (l) => String(l[n.labelKey] ?? "").toLowerCase().includes(e)
323
323
  );
324
- }), Y = I(() => {
324
+ }), Y = j(() => {
325
325
  if (!n.groupKey)
326
326
  return [];
327
327
  const e = [], l = /* @__PURE__ */ new Map();
328
328
  let a = D.value;
329
329
  for (const r of B.value) {
330
- const b = String(r[n.groupKey] ?? "");
331
- let v = l.get(b);
332
- v || (v = { label: b, entries: [] }, l.set(b, v), e.push(v)), v.entries.push({ item: r, flatIndex: a }), a++;
330
+ const _ = String(r[n.groupKey] ?? "");
331
+ let c = l.get(_);
332
+ c || (c = { label: _, entries: [] }, l.set(_, c), e.push(c)), c.entries.push({ item: r, flatIndex: a }), a++;
333
333
  }
334
334
  return e;
335
- }), $ = I(() => n.multiple ? (n.modelValue ?? []).length > 0 : n.modelValue !== null && n.modelValue !== void 0), E = I(() => {
335
+ }), M = j(() => n.multiple ? (n.modelValue ?? []).length > 0 : n.modelValue !== null && n.modelValue !== void 0), F = j(() => {
336
336
  if (n.multiple) {
337
337
  const e = n.modelValue ?? [];
338
338
  return e.length === 0 ? n.placeholder : e.length === 1 ? e[0][n.labelKey] ?? n.placeholder : `${e[0][n.labelKey]} +${e.length - 1}`;
339
339
  }
340
340
  return n.modelValue === null || n.modelValue === void 0 ? n.placeholder : n.modelValue[n.labelKey] ?? n.placeholder;
341
- }), k = (e) => n.modelValue ? n.multiple ? n.modelValue.some((a) => a[n.valueKey] === e[n.valueKey]) : n.modelValue[n.valueKey] === e[n.valueKey] : !1, Z = I(() => B.value.length + D.value), j = (e, l) => {
341
+ }), x = (e) => n.modelValue ? n.multiple ? n.modelValue.some((a) => a[n.valueKey] === e[n.valueKey]) : n.modelValue[n.valueKey] === e[n.valueKey] : !1, Z = j(() => B.value.length + D.value), I = (e, l) => {
342
342
  if (n.multiple) {
343
343
  const a = (n.modelValue ?? []).slice();
344
344
  if (e === null) {
345
- f("update:modelValue", []);
345
+ m("update:modelValue", []);
346
346
  return;
347
347
  }
348
- const r = a.findIndex((b) => b[n.valueKey] === e[n.valueKey]);
349
- r >= 0 ? a.splice(r, 1) : a.push(e), f("update:modelValue", a);
348
+ const r = a.findIndex((_) => _[n.valueKey] === e[n.valueKey]);
349
+ r >= 0 ? a.splice(r, 1) : a.push(e), m("update:modelValue", a);
350
350
  return;
351
351
  }
352
- f("update:modelValue", e), l();
352
+ m("update:modelValue", e), l();
353
353
  }, Q = () => {
354
- f("update:modelValue", [...n.items]);
354
+ m("update:modelValue", [...n.items]);
355
355
  }, ee = () => {
356
- f("update:modelValue", []);
356
+ m("update:modelValue", []);
357
357
  }, te = (e) => {
358
- f("create", p.value), e();
359
- }, ve = () => {
360
- p.value = "", i.value = -1, T(() => {
358
+ m("create", d.value), e();
359
+ }, me = () => {
360
+ d.value = "", i.value = -1, T(() => {
361
361
  var e;
362
- (e = A.value) == null || e.focus();
362
+ (e = C.value) == null || e.focus();
363
363
  });
364
- }, me = () => {
365
- p.value = "", i.value = -1;
364
+ }, fe = () => {
365
+ d.value = "", i.value = -1;
366
366
  }, oe = () => {
367
- i.value = 0, f("search", p.value);
367
+ i.value = 0, m("search", d.value);
368
368
  }, le = () => {
369
369
  T(() => {
370
- const e = W.value[i.value];
370
+ const e = O.value[i.value];
371
371
  e && e.scrollIntoView({ block: "nearest" });
372
372
  });
373
- }, fe = (e, l) => {
373
+ }, he = (e, l) => {
374
374
  switch (e.key) {
375
375
  case "ArrowDown":
376
376
  e.preventDefault(), i.value < Z.value - 1 ? i.value++ : i.value = 0, le();
@@ -381,10 +381,10 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
381
381
  case "Enter":
382
382
  if (e.preventDefault(), i.value >= 0)
383
383
  if (n.allowEmpty && i.value === 0)
384
- j(null, l);
384
+ I(null, l);
385
385
  else {
386
386
  const a = i.value - D.value, r = B.value[a];
387
- r && j(r, l);
387
+ r && I(r, l);
388
388
  }
389
389
  break;
390
390
  case "Escape":
@@ -392,20 +392,20 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
392
392
  break;
393
393
  }
394
394
  };
395
- return ce(p, () => {
395
+ return ce(d, () => {
396
396
  i.value = 0;
397
- }), (e, l) => x.value ? (o(), s(M, { key: 1 }, [
398
- V(e.$slots, "button", F(P({ onToggle: K, isExpanded: y(d).isOpened.value, selectedLabel: E.value })), () => [
397
+ }), (e, l) => w.value ? (o(), s(V, { key: 1 }, [
398
+ K(e.$slots, "button", U(W({ onToggle: f, isExpanded: y(b).isOpened.value, selectedLabel: F.value })), () => [
399
399
  t("button", {
400
- class: w(["inline-flex items-center justify-between gap-2 text-sm transition-colors", [
400
+ class: g(["inline-flex items-center justify-between gap-2 text-sm transition-colors", [
401
401
  e.view === "pill" ? "rounded-full bg-gray-100 px-3.5 py-1.5 hover:bg-gray-200 text-gray-700" : "rounded-lg border border-gray-300 bg-white px-3 py-2 hover:bg-gray-50 min-w-[180px]"
402
402
  ]]),
403
403
  style: J(e.maxWidth ? { maxWidth: e.maxWidth } : void 0),
404
- onClick: K
404
+ onClick: f
405
405
  }, [
406
406
  t("span", {
407
- class: w(["truncate", e.view === "pill" ? "" : $.value ? "text-gray-900" : "text-gray-500"])
408
- }, u(E.value), 3),
407
+ class: g(["truncate", e.view === "pill" ? "" : M.value ? "text-gray-900" : "text-gray-500"])
408
+ }, u(F.value), 3),
409
409
  l[12] || (l[12] = t("svg", {
410
410
  xmlns: "http://www.w3.org/2000/svg",
411
411
  fill: "none",
@@ -422,9 +422,9 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
422
422
  ], -1))
423
423
  ], 6)
424
424
  ]),
425
- y(d).isOpened.value ? (o(), U(y(je), {
425
+ y(b).isOpened.value ? (o(), N(y(je), {
426
426
  key: 0,
427
- useModal: y(d),
427
+ useModal: y(b),
428
428
  title: e.title || e.placeholder,
429
429
  size: "sm",
430
430
  classModal: !0,
@@ -450,21 +450,21 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
450
450
  ], -1)),
451
451
  q(t("input", {
452
452
  ref_key: "mobileSearchInputRef",
453
- ref: _,
454
- "onUpdate:modelValue": l[2] || (l[2] = (a) => p.value = a),
453
+ ref: A,
454
+ "onUpdate:modelValue": l[2] || (l[2] = (a) => d.value = a),
455
455
  type: "text",
456
456
  placeholder: e.searchPlaceholder,
457
457
  class: "w-full rounded-md border border-gray-300 py-2 pl-8 pr-3 text-sm outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",
458
458
  onInput: oe
459
459
  }, null, 40, xt), [
460
- [se, p.value]
460
+ [se, d.value]
461
461
  ])
462
462
  ])
463
- ])) : m("", !0),
464
- e.createLabel ? (o(), s("div", Ct, [
463
+ ])) : v("", !0),
464
+ e.createLabel ? (o(), s("div", _t, [
465
465
  t("button", {
466
466
  class: "w-full flex items-center justify-center gap-2 py-2 text-sm text-blue-700 hover:text-blue-500",
467
- onClick: l[3] || (l[3] = (a) => te(() => y(d).close()))
467
+ onClick: l[3] || (l[3] = (a) => te(() => y(b).close()))
468
468
  }, [
469
469
  l[14] || (l[14] = t("svg", {
470
470
  xmlns: "http://www.w3.org/2000/svg",
@@ -482,29 +482,29 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
482
482
  ], -1)),
483
483
  t("span", null, u(e.createLabel), 1)
484
484
  ])
485
- ])) : m("", !0),
486
- e.multiple ? (o(), s("div", _t, [
485
+ ])) : v("", !0),
486
+ e.multiple ? (o(), s("div", Ct, [
487
487
  t("button", {
488
488
  class: "text-sm text-blue-600 hover:text-blue-800 transition-colors",
489
489
  onClick: Q
490
- }, u(y(c)("ui.dropdown.selectAll")), 1),
491
- $.value ? (o(), s("button", {
490
+ }, u(y(p)("ui.dropdown.selectAll")), 1),
491
+ M.value ? (o(), s("button", {
492
492
  key: 0,
493
493
  class: "text-sm text-gray-500 hover:text-gray-700 transition-colors",
494
494
  onClick: ee
495
- }, u(y(c)("ui.dropdown.clear")), 1)) : m("", !0)
496
- ])) : m("", !0),
495
+ }, u(y(p)("ui.dropdown.clear")), 1)) : v("", !0)
496
+ ])) : v("", !0),
497
497
  e.isLoading ? (o(), s("div", $t, [...l[15] || (l[15] = [
498
498
  t("div", { class: "animate-spin w-6 h-6 border-2 border-blue-500 border-t-transparent rounded-full" }, null, -1)
499
499
  ])])) : (o(), s("div", Mt, [
500
500
  e.allowEmpty ? (o(), s("button", {
501
501
  key: 0,
502
- class: w(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors", $.value ? "" : "bg-gray-50 font-medium"]),
502
+ class: g(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors", M.value ? "" : "bg-gray-50 font-medium"]),
503
503
  role: "option",
504
- "aria-selected": !$.value,
505
- onClick: l[4] || (l[4] = (a) => j(null, () => y(d).close()))
504
+ "aria-selected": !M.value,
505
+ onClick: l[4] || (l[4] = (a) => I(null, () => y(b).close()))
506
506
  }, [
507
- $.value ? (o(), s("span", At)) : (o(), s("svg", Kt, [...l[16] || (l[16] = [
507
+ M.value ? (o(), s("span", At)) : (o(), s("svg", Kt, [...l[16] || (l[16] = [
508
508
  t("path", {
509
509
  "stroke-linecap": "round",
510
510
  "stroke-linejoin": "round",
@@ -512,67 +512,67 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
512
512
  }, null, -1)
513
513
  ])])),
514
514
  t("span", null, u(e.emptyLabel ?? e.placeholder), 1)
515
- ], 10, Vt)) : m("", !0),
516
- e.groupKey ? (o(!0), s(M, { key: 1 }, L(Y.value, (a) => (o(), s(M, {
515
+ ], 10, Vt)) : v("", !0),
516
+ e.groupKey ? (o(!0), s(V, { key: 1 }, L(Y.value, (a) => (o(), s(V, {
517
517
  key: a.label
518
518
  }, [
519
- a.label ? (o(), s("div", Ot, u(a.label), 1)) : m("", !0),
520
- (o(!0), s(M, null, L(a.entries, (r) => (o(), s("button", {
519
+ a.label ? (o(), s("div", Ot, u(a.label), 1)) : v("", !0),
520
+ (o(!0), s(V, null, L(a.entries, (r) => (o(), s("button", {
521
521
  key: r.item[e.valueKey],
522
- class: w(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors break-words", k(r.item) ? "bg-gray-50 font-medium" : ""]),
522
+ class: g(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors break-words", x(r.item) ? "bg-gray-50 font-medium" : ""]),
523
523
  role: "option",
524
- "aria-selected": k(r.item),
525
- onClick: (b) => j(r.item, () => y(d).close())
524
+ "aria-selected": x(r.item),
525
+ onClick: (_) => I(r.item, () => y(b).close())
526
526
  }, [
527
- k(r.item) ? (o(), s("svg", It, [...l[17] || (l[17] = [
527
+ x(r.item) ? (o(), s("svg", It, [...l[17] || (l[17] = [
528
528
  t("path", {
529
529
  "stroke-linecap": "round",
530
530
  "stroke-linejoin": "round",
531
531
  d: "M4.5 12.75l6 6 9-13.5"
532
532
  }, null, -1)
533
533
  ])])) : (o(), s("span", Bt)),
534
- V(e.$slots, "item", R({ ref_for: !0 }, { item: r.item }), () => [
534
+ K(e.$slots, "item", P({ ref_for: !0 }, { item: r.item }), () => [
535
535
  t("span", null, u(r.item[e.labelKey]), 1)
536
536
  ])
537
537
  ], 10, jt))), 128))
538
- ], 64))), 128)) : (o(!0), s(M, { key: 2 }, L(B.value, (a) => (o(), s("button", {
538
+ ], 64))), 128)) : (o(!0), s(V, { key: 2 }, L(B.value, (a) => (o(), s("button", {
539
539
  key: a[e.valueKey],
540
- class: w(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors break-words", k(a) ? "bg-gray-50 font-medium" : ""]),
540
+ class: g(["flex items-center gap-3 w-full px-3 py-3 text-sm text-left hover:bg-gray-50 transition-colors break-words", x(a) ? "bg-gray-50 font-medium" : ""]),
541
541
  role: "option",
542
- "aria-selected": k(a),
543
- onClick: (r) => j(a, () => y(d).close())
542
+ "aria-selected": x(a),
543
+ onClick: (r) => I(a, () => y(b).close())
544
544
  }, [
545
- k(a) ? (o(), s("svg", St, [...l[18] || (l[18] = [
545
+ x(a) ? (o(), s("svg", St, [...l[18] || (l[18] = [
546
546
  t("path", {
547
547
  "stroke-linecap": "round",
548
548
  "stroke-linejoin": "round",
549
549
  d: "M4.5 12.75l6 6 9-13.5"
550
550
  }, null, -1)
551
551
  ])])) : (o(), s("span", Dt)),
552
- V(e.$slots, "item", R({ ref_for: !0 }, { item: a }), () => [
552
+ K(e.$slots, "item", P({ ref_for: !0 }, { item: a }), () => [
553
553
  t("span", null, u(a[e.labelKey]), 1)
554
554
  ])
555
555
  ], 10, Lt))), 128)),
556
556
  B.value.length === 0 && !e.allowEmpty ? (o(), s("div", zt, [
557
- V(e.$slots, "empty", {}, () => [
558
- ne(u(y(c)("ui.dropdown.nothingFound")), 1)
557
+ K(e.$slots, "empty", {}, () => [
558
+ ne(u(y(p)("ui.dropdown.nothingFound")), 1)
559
559
  ])
560
- ])) : m("", !0)
560
+ ])) : v("", !0)
561
561
  ]))
562
562
  ])
563
563
  ]),
564
564
  _: 3
565
- }, 8, ["useModal", "title"])) : m("", !0)
566
- ], 64)) : (o(), U(Le, {
565
+ }, 8, ["useModal", "title"])) : v("", !0)
566
+ ], 64)) : (o(), N(Le, {
567
567
  key: 0,
568
568
  stick: e.stick,
569
- onOpen: ve,
570
- onClose: me
569
+ onOpen: me,
570
+ onClose: fe
571
571
  }, {
572
572
  button: z(({ onToggle: a, isExpanded: r }) => [
573
- V(e.$slots, "button", F(P({ onToggle: a, isExpanded: r, selectedLabel: E.value })), () => [
573
+ K(e.$slots, "button", U(W({ onToggle: a, isExpanded: r, selectedLabel: F.value })), () => [
574
574
  t("button", {
575
- class: w(["inline-flex items-center justify-between gap-2 text-sm transition-colors", [
575
+ class: g(["inline-flex items-center justify-between gap-2 text-sm transition-colors", [
576
576
  e.view === "pill" ? "rounded-full bg-gray-100 px-3.5 py-1.5 hover:bg-gray-200 text-gray-700" : "rounded-lg border border-gray-300 bg-white px-3 py-2 hover:bg-gray-50 min-w-[180px]",
577
577
  e.view === "default" && r ? "ring-1 ring-blue-500 border-blue-500" : ""
578
578
  ]]),
@@ -580,15 +580,15 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
580
580
  onClick: a
581
581
  }, [
582
582
  t("span", {
583
- class: w(["truncate", e.view === "pill" ? "" : $.value ? "text-gray-900" : "text-gray-500"])
584
- }, u(E.value), 3),
583
+ class: g(["truncate", e.view === "pill" ? "" : M.value ? "text-gray-900" : "text-gray-500"])
584
+ }, u(F.value), 3),
585
585
  (o(), s("svg", {
586
586
  xmlns: "http://www.w3.org/2000/svg",
587
587
  fill: "none",
588
588
  viewBox: "0 0 24 24",
589
589
  "stroke-width": "1.5",
590
590
  stroke: "currentColor",
591
- class: w(["w-4 h-4 text-gray-400 transition-transform shrink-0", r ? "rotate-180" : ""])
591
+ class: g(["w-4 h-4 text-gray-400 transition-transform shrink-0", r ? "rotate-180" : ""])
592
592
  }, [...l[5] || (l[5] = [
593
593
  t("path", {
594
594
  "stroke-linecap": "round",
@@ -602,9 +602,9 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
602
602
  menu: z(({ onToggle: a }) => [
603
603
  t("div", {
604
604
  class: "min-w-[240px] w-full",
605
- onKeydown: (r) => fe(r, a)
605
+ onKeydown: (r) => he(r, a)
606
606
  }, [
607
- e.title ? (o(), s("div", tt, u(e.title), 1)) : m("", !0),
607
+ e.title ? (o(), s("div", tt, u(e.title), 1)) : v("", !0),
608
608
  e.searchable ? (o(), s("div", ot, [
609
609
  t("div", lt, [
610
610
  l[6] || (l[6] = t("svg", {
@@ -623,17 +623,17 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
623
623
  ], -1)),
624
624
  q(t("input", {
625
625
  ref_key: "searchInputRef",
626
- ref: A,
627
- "onUpdate:modelValue": l[0] || (l[0] = (r) => p.value = r),
626
+ ref: C,
627
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => d.value = r),
628
628
  type: "text",
629
629
  placeholder: e.searchPlaceholder,
630
630
  class: "w-full rounded-md border border-gray-300 py-1.5 pl-8 pr-3 text-sm outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500",
631
631
  onInput: oe
632
632
  }, null, 40, st), [
633
- [se, p.value]
633
+ [se, d.value]
634
634
  ])
635
635
  ])
636
- ])) : m("", !0),
636
+ ])) : v("", !0),
637
637
  e.createLabel ? (o(), s("div", nt, [
638
638
  t("button", {
639
639
  class: "flex items-center gap-2 w-full px-3 py-2 text-sm text-blue-700 hover:bg-gray-50 transition-colors",
@@ -655,18 +655,18 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
655
655
  ], -1)),
656
656
  t("span", null, u(e.createLabel), 1)
657
657
  ], 8, rt)
658
- ])) : m("", !0),
658
+ ])) : v("", !0),
659
659
  e.multiple ? (o(), s("div", at, [
660
660
  t("button", {
661
661
  class: "text-xs text-blue-600 hover:text-blue-800 transition-colors",
662
662
  onClick: Q
663
- }, u(y(c)("ui.dropdown.selectAll")), 1),
664
- $.value ? (o(), s("button", {
663
+ }, u(y(p)("ui.dropdown.selectAll")), 1),
664
+ M.value ? (o(), s("button", {
665
665
  key: 0,
666
666
  class: "text-xs text-gray-500 hover:text-gray-700 transition-colors",
667
667
  onClick: ee
668
- }, u(y(c)("ui.dropdown.clear")), 1)) : m("", !0)
669
- ])) : m("", !0),
668
+ }, u(y(p)("ui.dropdown.clear")), 1)) : v("", !0)
669
+ ])) : v("", !0),
670
670
  e.isLoading ? (o(), s("div", it, [...l[8] || (l[8] = [
671
671
  t("svg", {
672
672
  class: "animate-spin h-5 w-5 text-gray-400",
@@ -691,23 +691,23 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
691
691
  ])])) : (o(), s("div", {
692
692
  key: 5,
693
693
  ref_key: "listRef",
694
- ref: O,
694
+ ref: E,
695
695
  class: "max-h-[300px] overflow-y-auto",
696
696
  role: "listbox"
697
697
  }, [
698
698
  e.allowEmpty ? (o(), s("button", {
699
699
  key: 0,
700
- ref: (r) => N(r, 0),
701
- class: w(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors", [
702
- $.value ? "hover:bg-gray-50" : "bg-gray-100 font-medium",
700
+ ref: (r) => R(r, 0),
701
+ class: g(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors", [
702
+ M.value ? "hover:bg-gray-50" : "bg-gray-100 font-medium",
703
703
  i.value === 0 ? "bg-gray-50" : ""
704
704
  ]]),
705
705
  role: "option",
706
- "aria-selected": !$.value,
707
- onClick: (r) => j(null, a),
706
+ "aria-selected": !M.value,
707
+ onClick: (r) => I(null, a),
708
708
  onMouseenter: l[1] || (l[1] = (r) => i.value = 0)
709
709
  }, [
710
- $.value ? (o(), s("span", pt)) : (o(), s("svg", dt, [...l[9] || (l[9] = [
710
+ M.value ? (o(), s("span", pt)) : (o(), s("svg", dt, [...l[9] || (l[9] = [
711
711
  t("path", {
712
712
  "stroke-linecap": "round",
713
713
  "stroke-linejoin": "round",
@@ -715,67 +715,67 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
715
715
  }, null, -1)
716
716
  ])])),
717
717
  t("span", null, u(e.emptyLabel ?? e.placeholder), 1)
718
- ], 42, ut)) : m("", !0),
719
- e.groupKey ? (o(!0), s(M, { key: 1 }, L(Y.value, (r, b) => (o(), s(M, {
718
+ ], 42, ut)) : v("", !0),
719
+ e.groupKey ? (o(!0), s(V, { key: 1 }, L(Y.value, (r, _) => (o(), s(V, {
720
720
  key: r.label
721
721
  }, [
722
722
  r.label ? (o(), s("div", {
723
723
  key: 0,
724
- class: w(["px-3 pt-2 pb-1 text-xs font-semibold text-gray-500 uppercase tracking-wide", b > 0 ? "border-t border-gray-100 mt-1" : ""])
725
- }, u(r.label), 3)) : m("", !0),
726
- (o(!0), s(M, null, L(r.entries, (v) => (o(), s("button", {
727
- key: v.item[e.valueKey],
724
+ class: g(["px-3 pt-2 pb-1 text-xs font-semibold text-gray-500 uppercase tracking-wide", _ > 0 ? "border-t border-gray-100 mt-1" : ""])
725
+ }, u(r.label), 3)) : v("", !0),
726
+ (o(!0), s(V, null, L(r.entries, (c) => (o(), s("button", {
727
+ key: c.item[e.valueKey],
728
728
  ref_for: !0,
729
- ref: (G) => N(G, v.flatIndex),
730
- class: w(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors break-words", [
731
- k(v.item) ? "bg-gray-100 font-medium" : "hover:bg-gray-50",
732
- i.value === v.flatIndex ? "bg-gray-50" : ""
729
+ ref: (G) => R(G, c.flatIndex),
730
+ class: g(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors break-words", [
731
+ x(c.item) ? "bg-gray-100 font-medium" : "hover:bg-gray-50",
732
+ i.value === c.flatIndex ? "bg-gray-50" : ""
733
733
  ]]),
734
734
  role: "option",
735
- "aria-selected": k(v.item),
736
- onClick: (G) => j(v.item, a),
737
- onMouseenter: (G) => i.value = v.flatIndex
735
+ "aria-selected": x(c.item),
736
+ onClick: (G) => I(c.item, a),
737
+ onMouseenter: (G) => i.value = c.flatIndex
738
738
  }, [
739
- k(v.item) ? (o(), s("svg", vt, [...l[10] || (l[10] = [
739
+ x(c.item) ? (o(), s("svg", vt, [...l[10] || (l[10] = [
740
740
  t("path", {
741
741
  "stroke-linecap": "round",
742
742
  "stroke-linejoin": "round",
743
743
  d: "M4.5 12.75l6 6 9-13.5"
744
744
  }, null, -1)
745
745
  ])])) : (o(), s("span", mt)),
746
- V(e.$slots, "item", R({ ref_for: !0 }, { item: v.item }), () => [
747
- t("span", null, u(v.item[e.labelKey]), 1)
746
+ K(e.$slots, "item", P({ ref_for: !0 }, { item: c.item }), () => [
747
+ t("span", null, u(c.item[e.labelKey]), 1)
748
748
  ])
749
749
  ], 42, ct))), 128))
750
- ], 64))), 128)) : (o(!0), s(M, { key: 2 }, L(B.value, (r, b) => (o(), s("button", {
750
+ ], 64))), 128)) : (o(!0), s(V, { key: 2 }, L(B.value, (r, _) => (o(), s("button", {
751
751
  key: r[e.valueKey],
752
752
  ref_for: !0,
753
- ref: (v) => N(v, D.value + b),
754
- class: w(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors break-words", [
755
- k(r) ? "bg-gray-100 font-medium" : "hover:bg-gray-50",
756
- i.value === D.value + b ? "bg-gray-50" : ""
753
+ ref: (c) => R(c, D.value + _),
754
+ class: g(["flex items-center gap-2 w-full px-3 py-2 text-sm text-left transition-colors break-words", [
755
+ x(r) ? "bg-gray-100 font-medium" : "hover:bg-gray-50",
756
+ i.value === D.value + _ ? "bg-gray-50" : ""
757
757
  ]]),
758
758
  role: "option",
759
- "aria-selected": k(r),
760
- onClick: (v) => j(r, a),
761
- onMouseenter: (v) => i.value = D.value + b
759
+ "aria-selected": x(r),
760
+ onClick: (c) => I(r, a),
761
+ onMouseenter: (c) => i.value = D.value + _
762
762
  }, [
763
- k(r) ? (o(), s("svg", ht, [...l[11] || (l[11] = [
763
+ x(r) ? (o(), s("svg", ht, [...l[11] || (l[11] = [
764
764
  t("path", {
765
765
  "stroke-linecap": "round",
766
766
  "stroke-linejoin": "round",
767
767
  d: "M4.5 12.75l6 6 9-13.5"
768
768
  }, null, -1)
769
769
  ])])) : (o(), s("span", yt)),
770
- V(e.$slots, "item", R({ ref_for: !0 }, { item: r }), () => [
770
+ K(e.$slots, "item", P({ ref_for: !0 }, { item: r }), () => [
771
771
  t("span", null, u(r[e.labelKey]), 1)
772
772
  ])
773
773
  ], 42, ft))), 128)),
774
774
  B.value.length === 0 && !e.allowEmpty ? (o(), s("div", wt, [
775
- V(e.$slots, "empty", {}, () => [
776
- ne(u(y(c)("ui.dropdown.nothingFound")), 1)
775
+ K(e.$slots, "empty", {}, () => [
776
+ ne(u(y(p)("ui.dropdown.nothingFound")), 1)
777
777
  ])
778
- ])) : m("", !0)
778
+ ])) : v("", !0)
779
779
  ], 512))
780
780
  ], 40, et)
781
781
  ]),
@@ -786,7 +786,7 @@ const Zt = /* @__PURE__ */ Ke(Se, [["render", ze]]), Ee = ["onClick"], Re = { cl
786
786
  export {
787
787
  lo as OneBrowserMenu,
788
788
  Qt as OneBrowserMenuGrid,
789
- we as OneDropdown,
789
+ ge as OneDropdown,
790
790
  Le as OneDropdownAuto,
791
791
  Zt as OneDropdownDivider,
792
792
  so as OneDropdownItem,