@oneb/ui-vue 0.3.19 → 0.3.21

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,7 +1,7 @@
1
- import { defineComponent as M, ref as A, provide as Y, watch as Z, nextTick as ee, onBeforeUnmount as te, computed as S, openBlock as t, createElementBlock as o, createElementVNode as e, renderSlot as T, normalizeProps as I, guardReactiveProps as R, createBlock as L, Teleport as oe, createCommentVNode as d, createVNode as _, Transition as W, withCtx as E, normalizeClass as j, toDisplayString as u, Fragment as C, inject as ne, withModifiers as se, resolveDynamicComponent as V, renderList as B, mergeProps as le, unref as $ } from "vue";
1
+ import { defineComponent as E, ref as S, provide as Y, watch as Z, nextTick as ee, onBeforeUnmount as te, computed as F, openBlock as t, createElementBlock as o, createElementVNode as e, renderSlot as H, normalizeProps as I, guardReactiveProps as R, createBlock as M, Teleport as oe, createCommentVNode as p, createVNode as _, Transition as W, withCtx as P, normalizeClass as j, toDisplayString as d, Fragment as $, inject as ne, withModifiers as se, resolveDynamicComponent as V, renderList as L, mergeProps as le, unref as A } from "vue";
2
2
  import { a as re, c as ie, o as ae, s as ce } from "./floating-ui.dom-4509432e.js";
3
3
  import { flip as ue } from "@floating-ui/vue";
4
- import { _ as z } from "./OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd.js";
4
+ import { _ as O } from "./OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd.js";
5
5
  import { r as G } from "./XMarkIcon-51ef0691.js";
6
6
  import { r as J } from "./ChevronDownIcon-6805ce6c.js";
7
7
  import { r as Q, a as de } from "./ChevronRightIcon-4549a26b.js";
@@ -18,6 +18,14 @@ const he = {
18
18
  appendBody: {
19
19
  type: Boolean,
20
20
  default: !1
21
+ },
22
+ trigger: {
23
+ type: String,
24
+ default: "click"
25
+ },
26
+ offset: {
27
+ type: Number,
28
+ default: 5
21
29
  }
22
30
  }, fe = {
23
31
  variant: {
@@ -94,80 +102,91 @@ const he = {
94
102
  type: String,
95
103
  default: "default"
96
104
  }
97
- }, me = ["data-opened"], ve = {
105
+ }, ve = ["data-opened"], me = {
98
106
  key: 0,
99
107
  class: "text-sm text-secondary-content px-3 py-2 text-left"
100
108
  }, ye = {
101
109
  key: 0,
102
110
  class: "text-sm text-secondary-content px-3 py-2 text-left"
103
- }, xe = /* @__PURE__ */ M({
111
+ }, ge = /* @__PURE__ */ E({
104
112
  __name: "OneDropdown",
105
113
  props: he,
106
114
  emits: ["open", "close"],
107
- setup(w, { emit: f }) {
108
- const p = A(!1), v = A(null), c = A(null), l = A(null), m = f, s = w, h = () => {
109
- p.value = !p.value, p.value ? m("open") : m("close");
115
+ setup(w, { emit: m }) {
116
+ const u = S(!1), y = S(null), c = S(null), l = S(null), h = m, s = w, f = () => {
117
+ u.value = !u.value, u.value ? h("open") : h("close");
118
+ };
119
+ let a = null;
120
+ const g = () => {
121
+ s.trigger === "hover" && (a && (clearTimeout(a), a = null), u.value || (u.value = !0, h("open")));
122
+ }, k = () => {
123
+ s.trigger === "hover" && (a = setTimeout(() => {
124
+ u.value && (u.value = !1, h("close"));
125
+ }, 100));
110
126
  };
111
127
  Y("OneDropdown", {
112
- onToggle: h
128
+ onToggle: f
113
129
  });
114
- let a = null;
115
- function g() {
130
+ let x = null;
131
+ function r() {
116
132
  !c.value || !l.value || ie(c.value, l.value, {
117
133
  placement: s.stick ? s.stick : "bottom-start",
118
134
  strategy: "fixed",
119
- middleware: [ae(5), ue(), ce({ padding: 8 })]
120
- }).then(({ x: n, y }) => {
135
+ middleware: [ae(s.offset), ue(), ce({ padding: 8 })]
136
+ }).then(({ x: n, y: C }) => {
121
137
  l.value && Object.assign(l.value.style, {
122
138
  left: `${n}px`,
123
- top: `${y}px`
139
+ top: `${C}px`,
140
+ visibility: "visible"
124
141
  });
125
142
  });
126
143
  }
127
- Z(p, async (n) => {
128
- s.appendBody && (n ? (await ee(), c.value && l.value && (g(), a = re(c.value, l.value, g))) : a && (a(), a = null));
144
+ Z(u, async (n) => {
145
+ s.appendBody && (n ? (await ee(), c.value && l.value && (l.value.style.visibility = "hidden", r(), x = re(c.value, l.value, r))) : x && (x(), x = null));
129
146
  }), te(() => {
130
- a && a();
147
+ x && x();
131
148
  });
132
- const k = S(() => {
133
- var F;
149
+ const v = F(() => {
150
+ var z;
134
151
  if (s.appendBody)
135
152
  return "";
136
- const n = (F = v.value) == null ? void 0 : F.getBoundingClientRect(), y = n ? n.x < 270 : !1;
137
- return n && n.top + 270 > window.innerHeight ? "up" + (y ? "-right" : "-left") : "down" + (y ? "-right" : "-left");
138
- }), b = S(() => {
153
+ const n = (z = y.value) == null ? void 0 : z.getBoundingClientRect(), C = n ? n.x < 270 : !1;
154
+ return n && n.top + 270 > window.innerHeight ? "up" + (C ? "-right" : "-left") : "down" + (C ? "-right" : "-left");
155
+ }), b = F(() => {
139
156
  const n = [
140
157
  "absolute z-10 w-fit rounded-md bg-white",
141
158
  "py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",
142
159
  "overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"
143
160
  ];
144
- return k.value.startsWith("up") ? n.push("bottom-1 mb-10") : k.value.startsWith("down") && n.push("top-1 mt-10"), s.stick === "right" ? n.push("right-0") : s.stick === "left" && n.push("left-0"), n;
145
- }), i = S(() => [
161
+ return v.value.startsWith("up") ? n.push("bottom-1 mb-10") : v.value.startsWith("down") && n.push("top-1 mt-10"), s.stick === "right" ? n.push("right-0") : s.stick === "left" && n.push("left-0"), n;
162
+ }), B = F(() => [
146
163
  "fixed z-[10000] w-fit rounded-md bg-white",
147
164
  "py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",
148
165
  "overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"
149
166
  ]);
150
- return (n, y) => (t(), o("div", {
167
+ return (n, C) => (t(), o("div", {
151
168
  class: "relative inline-block",
152
169
  ref_key: "containerRef",
153
- ref: v,
154
- "data-opened": p.value
170
+ ref: y,
171
+ "data-opened": u.value,
172
+ onMouseenter: g,
173
+ onMouseleave: k
155
174
  }, [
156
175
  e("div", {
157
176
  ref_key: "buttonRef",
158
177
  ref: c
159
178
  }, [
160
- T(n.$slots, "button", I(R({ onToggle: h, isExpanded: p.value })))
179
+ H(n.$slots, "button", I(R({ onToggle: f, isExpanded: u.value })))
161
180
  ], 512),
162
- s.appendBody ? (t(), L(oe, {
181
+ s.appendBody ? (t(), M(oe, {
163
182
  key: 0,
164
183
  to: "body"
165
184
  }, [
166
- p.value ? (t(), o("div", {
185
+ u.value && n.trigger === "click" ? (t(), o("div", {
167
186
  key: 0,
168
187
  class: "fixed top-0 left-0 w-screen h-screen z-[9999]",
169
- onClick: h
170
- })) : d("", !0),
188
+ onClick: f
189
+ })) : p("", !0),
171
190
  _(W, {
172
191
  "enter-active-class": "transition ease-out duration-100",
173
192
  "enter-from-class": "transform opacity-0 scale-95",
@@ -176,28 +195,30 @@ const he = {
176
195
  "leave-from-class": "transform opacity-100 scale-100",
177
196
  "leave-to-class": "transform opacity-0 scale-95"
178
197
  }, {
179
- default: E(() => [
180
- p.value ? (t(), o("div", {
198
+ default: P(() => [
199
+ u.value ? (t(), o("div", {
181
200
  key: 0,
182
201
  ref_key: "menuRef",
183
202
  ref: l,
184
- class: j(["menu", i.value]),
203
+ class: j(["menu", B.value]),
185
204
  role: "menu",
186
205
  "aria-orientation": "vertical",
187
- tabindex: "-1"
206
+ tabindex: "-1",
207
+ onMouseenter: g,
208
+ onMouseleave: k
188
209
  }, [
189
- n.title ? (t(), o("div", ve, u(n.title), 1)) : d("", !0),
190
- T(n.$slots, "menu", I(R({ onToggle: h })))
191
- ], 2)) : d("", !0)
210
+ n.title ? (t(), o("div", me, d(n.title), 1)) : p("", !0),
211
+ H(n.$slots, "menu", I(R({ onToggle: f })))
212
+ ], 34)) : p("", !0)
192
213
  ]),
193
214
  _: 3
194
215
  })
195
- ])) : (t(), o(C, { key: 1 }, [
196
- p.value ? (t(), o("div", {
216
+ ])) : (t(), o($, { key: 1 }, [
217
+ u.value && n.trigger === "click" ? (t(), o("div", {
197
218
  key: 0,
198
219
  class: "fixed top-0 left-0 w-screen h-screen z-10",
199
- onClick: h
200
- })) : d("", !0),
220
+ onClick: f
221
+ })) : p("", !0),
201
222
  _(W, {
202
223
  "enter-active-class": "transition ease-out duration-100",
203
224
  "enter-from-class": "transform opacity-0 scale-95",
@@ -206,47 +227,47 @@ const he = {
206
227
  "leave-from-class": "transform opacity-100 scale-100",
207
228
  "leave-to-class": "transform opacity-0 scale-95"
208
229
  }, {
209
- default: E(() => [
210
- p.value ? (t(), o("div", {
230
+ default: P(() => [
231
+ u.value ? (t(), o("div", {
211
232
  key: 0,
212
233
  class: j(["menu", b.value]),
213
234
  role: "menu",
214
235
  "aria-orientation": "vertical",
215
236
  tabindex: "-1"
216
237
  }, [
217
- n.title ? (t(), o("div", ye, u(n.title), 1)) : d("", !0),
218
- T(n.$slots, "menu", I(R({ onToggle: h })))
219
- ], 2)) : d("", !0)
238
+ n.title ? (t(), o("div", ye, d(n.title), 1)) : p("", !0),
239
+ H(n.$slots, "menu", I(R({ onToggle: f })))
240
+ ], 2)) : p("", !0)
220
241
  ]),
221
242
  _: 3
222
243
  })
223
244
  ], 64))
224
- ], 8, me));
245
+ ], 40, ve));
225
246
  }
226
- }), K = /* @__PURE__ */ M({
247
+ }), K = /* @__PURE__ */ E({
227
248
  __name: "OneDropdownItem",
228
249
  props: fe,
229
250
  emits: ["click"],
230
- setup(w, { emit: f }) {
231
- const p = f, v = w, c = ne("OneDropdown"), l = () => {
232
- c !== void 0 && c.onToggle(), p("click");
233
- }, m = S(() => {
251
+ setup(w, { emit: m }) {
252
+ const u = m, y = w, c = ne("OneDropdown"), l = () => {
253
+ c !== void 0 && c.onToggle(), u("click");
254
+ }, h = F(() => {
234
255
  const s = [];
235
- return v.variant === "secondary" ? s.push("text-secondary-content hover:bg-secondary-body-hover") : v.variant === "danger" ? s.push("text-danger-content hover:bg-danger-10") : v.variant === "warning" ? s.push("text-warning-content hover:bg-warning-10") : v.variant === "info" ? s.push("text-info-content hover:bg-info-10") : s.push("hover:bg-secondary-body-hover"), s;
256
+ return y.variant === "secondary" ? s.push("text-secondary-content hover:bg-secondary-body-hover") : y.variant === "danger" ? s.push("text-danger-content hover:bg-danger-10") : y.variant === "warning" ? s.push("text-warning-content hover:bg-warning-10") : y.variant === "info" ? s.push("text-info-content hover:bg-info-10") : s.push("hover:bg-secondary-body-hover"), s;
236
257
  });
237
- return (s, h) => (t(), o("button", {
238
- class: j(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap", m.value]),
258
+ return (s, f) => (t(), o("button", {
259
+ class: j(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap", h.value]),
239
260
  onClick: se(l, ["prevent"])
240
261
  }, [
241
- s.icon ? (t(), L(V(s.icon), {
262
+ s.icon ? (t(), M(V(s.icon), {
242
263
  key: 0,
243
264
  class: "w-4 h-4"
244
- })) : d("", !0),
245
- e("span", null, u(s.label), 1)
265
+ })) : p("", !0),
266
+ e("span", null, d(s.label), 1)
246
267
  ], 2));
247
268
  }
248
269
  });
249
- function ge(w, f) {
270
+ function xe(w, m) {
250
271
  return t(), o("svg", {
251
272
  xmlns: "http://www.w3.org/2000/svg",
252
273
  fill: "none",
@@ -331,37 +352,37 @@ const _e = {
331
352
  type: Object,
332
353
  required: !0
333
354
  }
334
- }, be = ["onClick"], Ce = { class: "flex flex-col items-center pt-5 pb-2 h-full" }, $e = { class: "flex flex-col px-10 py-1 mt-2 text-center" }, Ae = { class: "self-center text-base font-medium tracking-wide text-black" }, Se = { class: "mt-1 text-xs leading-5 text-blue-500 font-light" }, Fe = { class: "text-left w-full mt-5 px-3" }, Be = { class: "-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400" }, qt = /* @__PURE__ */ M({
355
+ }, be = ["onClick"], Ce = { class: "flex flex-col items-center pt-5 pb-2 h-full" }, $e = { class: "flex flex-col px-10 py-1 mt-2 text-center" }, Ae = { class: "self-center text-base font-medium tracking-wide text-black" }, Se = { class: "mt-1 text-xs leading-5 text-blue-500 font-light" }, Fe = { class: "text-left w-full mt-5 px-3" }, Le = { class: "-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400" }, Nt = /* @__PURE__ */ E({
335
356
  __name: "OneUserMenu",
336
357
  props: _e,
337
358
  setup(w) {
338
- const f = w, p = S(() => {
359
+ const m = w, u = F(() => {
339
360
  var l;
340
- return (l = f.menu) == null ? void 0 : l.map((m) => {
341
- let s = { label: m.label };
342
- m.icon != null && (s = { ...s, icon: m.icon });
343
- const h = typeof m.click == "function" ? m.click : () => {
361
+ return (l = m.menu) == null ? void 0 : l.map((h) => {
362
+ let s = { label: h.label };
363
+ h.icon != null && (s = { ...s, icon: h.icon });
364
+ const f = typeof h.click == "function" ? h.click : () => {
344
365
  };
345
366
  return {
346
- key: m.label,
367
+ key: h.label,
347
368
  args: s,
348
- click: h
369
+ click: f
349
370
  };
350
371
  });
351
- }), v = () => {
352
- typeof f.onAccount == "function" && f.onAccount();
372
+ }), y = () => {
373
+ typeof m.onAccount == "function" && m.onAccount();
353
374
  }, c = () => {
354
- typeof f.onLogout == "function" && f.onLogout();
375
+ typeof m.onLogout == "function" && m.onLogout();
355
376
  };
356
- return (l, m) => (t(), L(xe, { stick: "right" }, {
357
- button: E(({ onToggle: s, isExpanded: h }) => {
377
+ return (l, h) => (t(), M(ge, { stick: "right" }, {
378
+ button: P(({ onToggle: s, isExpanded: f }) => {
358
379
  var a, g;
359
380
  return [
360
381
  e("button", {
361
382
  onClick: s,
362
- class: j(["p-1 rounded-full hover:bg-secondary-10", [h ? "bg-secondary-25" : ""]])
383
+ class: j(["p-1 rounded-full hover:bg-secondary-10", [f ? "bg-secondary-25" : ""]])
363
384
  }, [
364
- _(z, {
385
+ _(O, {
365
386
  text: ((a = l.user) == null ? void 0 : a.name) || "",
366
387
  size: l.iconSize,
367
388
  src: (g = l.user) == null ? void 0 : g.photo_url,
@@ -370,45 +391,45 @@ const _e = {
370
391
  ], 10, be)
371
392
  ];
372
393
  }),
373
- menu: E(() => {
374
- var s, h, a, g, k;
394
+ menu: P(() => {
395
+ var s, f, a, g, k;
375
396
  return [
376
397
  e("div", Ce, [
377
- _(z, {
398
+ _(O, {
378
399
  text: ((s = l.user) == null ? void 0 : s.name) || "",
379
400
  size: 80,
380
- src: (h = l.user) == null ? void 0 : h.photo_url,
401
+ src: (f = l.user) == null ? void 0 : f.photo_url,
381
402
  rounded: !0,
382
403
  class: "mx-auto"
383
404
  }, null, 8, ["text", "src"]),
384
405
  e("div", $e, [
385
- e("div", Ae, u((a = l.user) == null ? void 0 : a.name), 1),
386
- e("div", Se, u((g = l.user) == null ? void 0 : g.email), 1)
406
+ e("div", Ae, d((a = l.user) == null ? void 0 : a.name), 1),
407
+ e("div", Se, d((g = l.user) == null ? void 0 : g.email), 1)
387
408
  ]),
388
- typeof f.onAccount == "function" ? (t(), o("a", {
409
+ typeof m.onAccount == "function" ? (t(), o("a", {
389
410
  key: 0,
390
- onClick: v,
411
+ onClick: y,
391
412
  class: "cursor-pointer justify-center px-8 py-2 mt-3 text-xs font-semibold tracking-wide leading-5 text-gray-600 border border-solid bg-neutral-100 border-slate-200 rounded-[50px] hover:bg-neutral-200"
392
- }, u(l.accountLabel), 1)) : d("", !0),
413
+ }, d(l.accountLabel), 1)) : p("", !0),
393
414
  e("div", Fe, [
394
- (t(!0), o(C, null, B(p.value, (b) => (t(), L(K, le({
395
- key: b.key
396
- }, { ref_for: !0 }, b.args, {
397
- onClick: b.click
415
+ (t(!0), o($, null, L(u.value, (x) => (t(), M(K, le({
416
+ key: x.key
417
+ }, { ref_for: !0 }, x.args, {
418
+ onClick: x.click
398
419
  }), null, 16, ["onClick"]))), 128)),
399
- typeof l.onLogout == "function" ? (t(), L(K, {
420
+ typeof l.onLogout == "function" ? (t(), M(K, {
400
421
  key: 0,
401
- icon: $(ge),
422
+ icon: A(xe),
402
423
  label: l.logoutLabel,
403
424
  class: "rounded py-3",
404
425
  onClick: c
405
- }, null, 8, ["icon", "label"])) : d("", !0)
426
+ }, null, 8, ["icon", "label"])) : p("", !0)
406
427
  ]),
407
- m[0] || (m[0] = e("div", {
428
+ h[0] || (h[0] = e("div", {
408
429
  class: "space-y-2 text-center",
409
430
  style: { width: "240px" }
410
431
  }, null, -1)),
411
- e("div", Be, u((k = l.app) == null ? void 0 : k.version), 1)
432
+ e("div", Le, d((k = l.app) == null ? void 0 : k.version), 1)
412
433
  ])
413
434
  ];
414
435
  }),
@@ -416,7 +437,7 @@ const _e = {
416
437
  }));
417
438
  }
418
439
  });
419
- function Le(w, f) {
440
+ function Be(w, m) {
420
441
  return t(), o("svg", {
421
442
  xmlns: "http://www.w3.org/2000/svg",
422
443
  fill: "none",
@@ -508,50 +529,50 @@ function Le(w, f) {
508
529
  })
509
530
  ]);
510
531
  }
511
- const je = ["data-opened"], ze = {
532
+ const Me = ["data-opened"], je = {
512
533
  key: 1,
513
534
  class: "absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"
514
- }, Me = { class: "flex justify-between items-center pt-3 mb-3" }, Oe = { class: "font-semibold text-xl px-3" }, Ee = { class: "grid" }, Pe = { class: "rounded-lg m-3 border" }, Te = {
535
+ }, ze = { class: "flex justify-between items-center pt-3 mb-3" }, Oe = { class: "font-semibold text-xl px-3" }, Ee = { class: "grid" }, Pe = { class: "rounded-lg m-3 border" }, Te = {
515
536
  class: "space-x-2 flex items-center px-3 py-2",
516
537
  style: { width: "300px" }
517
- }, Ie = { class: "flex justify-between relative" }, Re = { class: "flex items-center justify-between w-full text-left text-sm font-semibold" }, Ve = { key: 0 }, He = { class: "text-xs font-semibold" }, De = { class: "px-3 py-2" }, qe = { class: "text-secondary-content text-left pb-1 text-xs uppercase" }, Ne = { class: "overflow-auto max-h-full" }, Ue = {
538
+ }, He = { class: "flex justify-between relative" }, Ie = { class: "flex items-center justify-between w-full text-left text-sm font-semibold" }, Re = { key: 0 }, Ve = { class: "text-xs font-semibold" }, De = { class: "px-3 py-2" }, Ne = { class: "text-secondary-content text-left pb-1 text-xs uppercase" }, qe = { class: "overflow-auto max-h-full" }, Ue = {
518
539
  key: 0,
519
540
  class: "space-y-2"
520
541
  }, We = ["onClick"], Ke = { class: "flex" }, Ge = { class: "border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center" }, Je = { class: "pl-2" }, Qe = { class: "text-sm mt-1 font-semibold" }, Xe = { class: "text9 mt-1" }, Ye = {
521
542
  key: 1,
522
543
  class: "mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"
523
- }, Ze = /* @__PURE__ */ M({
544
+ }, Ze = /* @__PURE__ */ E({
524
545
  __name: "OneBrowserMenu",
525
546
  props: we,
526
547
  emits: ["open", "close"],
527
- setup(w, { emit: f }) {
528
- const p = f, v = w, c = A(!1), l = () => {
529
- c.value = !c.value, c.value ? p("open") : p("close");
530
- }, m = A(!1);
531
- S(() => m.value ? Q : J);
548
+ setup(w, { emit: m }) {
549
+ const u = m, y = w, c = S(!1), l = () => {
550
+ c.value = !c.value, c.value ? u("open") : u("close");
551
+ }, h = S(!1);
552
+ F(() => h.value ? Q : J);
532
553
  const s = () => {
533
- typeof v.onChange == "function" && v.onChange();
534
- }, h = (a) => {
535
- typeof v.onApp == "function" && v.onApp(a);
554
+ typeof y.onChange == "function" && y.onChange();
555
+ }, f = (a) => {
556
+ typeof y.onApp == "function" && y.onApp(a);
536
557
  };
537
558
  return (a, g) => {
538
- var k, b, i, n, y, F;
559
+ var k, x, r, v, b, B;
539
560
  return t(), o("div", { "data-opened": c.value }, [
540
561
  e("button", {
541
562
  onClick: l,
542
563
  class: j(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex", { "bg-secondary-10": c.value }])
543
564
  }, [
544
- _($(Le), { class: "text-secondary-base w-full p-1 hover:text-blue-600 m-auto" })
565
+ _(A(Be), { class: "text-secondary-base w-full p-1 hover:text-blue-600 m-auto" })
545
566
  ], 2),
546
567
  c.value ? (t(), o("div", {
547
568
  key: 0,
548
569
  class: "fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",
549
570
  onClick: l
550
- })) : d("", !0),
551
- c.value ? (t(), o("div", ze, [
552
- e("div", Me, [
553
- e("div", Oe, u((k = a.workspace) == null ? void 0 : k.title), 1),
554
- _($(G), {
571
+ })) : p("", !0),
572
+ c.value ? (t(), o("div", je, [
573
+ e("div", ze, [
574
+ e("div", Oe, d((k = a.workspace) == null ? void 0 : k.title), 1),
575
+ _(A(G), {
555
576
  class: "w-6 cursor-pointer",
556
577
  onClick: l
557
578
  })
@@ -559,81 +580,81 @@ const je = ["data-opened"], ze = {
559
580
  e("div", Ee, [
560
581
  e("div", Pe, [
561
582
  e("div", Te, [
562
- e("div", Ie, [
563
- _(z, {
564
- text: ((b = a.workspace) == null ? void 0 : b.name) || "",
565
- src: (i = a.workspace) == null ? void 0 : i.photo_url,
583
+ e("div", He, [
584
+ _(O, {
585
+ text: ((x = a.workspace) == null ? void 0 : x.name) || "",
586
+ src: (r = a.workspace) == null ? void 0 : r.photo_url,
566
587
  size: 44,
567
588
  rounded: !1,
568
589
  class: "mx-auto"
569
590
  }, null, 8, ["text", "src"])
570
591
  ]),
571
- e("div", Re, u((n = a.workspace) == null ? void 0 : n.name), 1)
592
+ e("div", Ie, d((v = a.workspace) == null ? void 0 : v.name), 1)
572
593
  ]),
573
- m.value ? (t(), o("div", Ve, [
574
- (t(!0), o(C, null, B(a.workspaces, (x) => (t(), o("div", {
575
- key: x.name,
594
+ h.value ? (t(), o("div", Re, [
595
+ (t(!0), o($, null, L(a.workspaces, (n) => (t(), o("div", {
596
+ key: n.name,
576
597
  class: "flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"
577
598
  }, [
578
- _(z, {
579
- text: x.name,
580
- src: x.photo_url,
599
+ _(O, {
600
+ text: n.name,
601
+ src: n.photo_url,
581
602
  size: 30,
582
603
  rounded: !1
583
604
  }, null, 8, ["text", "src"]),
584
- e("span", He, u(x.name), 1)
605
+ e("span", Ve, d(n.name), 1)
585
606
  ]))), 128))
586
- ])) : d("", !0),
607
+ ])) : p("", !0),
587
608
  g[0] || (g[0] = e("hr", null, null, -1)),
588
609
  e("div", {
589
610
  onClick: s,
590
611
  class: "text-center py-2 cursor-pointer",
591
612
  style: { "font-size": "10px" }
592
- }, u((y = a.workspace) == null ? void 0 : y.changeLabel), 1)
613
+ }, d((b = a.workspace) == null ? void 0 : b.changeLabel), 1)
593
614
  ])
594
615
  ]),
595
616
  e("div", De, [
596
- e("div", qe, u((F = a.workspace) == null ? void 0 : F.appsLabel), 1),
597
- e("div", Ne, [
617
+ e("div", Ne, d((B = a.workspace) == null ? void 0 : B.appsLabel), 1),
618
+ e("div", qe, [
598
619
  a.apps && a.apps.length ? (t(), o("div", Ue, [
599
- (t(!0), o(C, null, B(a.apps, (x) => (t(), o("div", {
600
- key: x.id,
601
- onClick: (O) => h(x),
620
+ (t(!0), o($, null, L(a.apps, (n) => (t(), o("div", {
621
+ key: n.id,
622
+ onClick: (C) => f(n),
602
623
  class: "flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"
603
624
  }, [
604
625
  e("div", Ke, [
605
626
  e("div", Ge, [
606
- _(z, {
607
- text: x.name,
608
- src: x.photo_url,
627
+ _(O, {
628
+ text: n.name,
629
+ src: n.photo_url,
609
630
  size: 44,
610
631
  rounded: !1
611
632
  }, null, 8, ["text", "src"])
612
633
  ]),
613
634
  e("div", Je, [
614
- e("p", Qe, u(x.name), 1),
615
- e("p", Xe, u(x == null ? void 0 : x.short), 1)
635
+ e("p", Qe, d(n.name), 1),
636
+ e("p", Xe, d(n == null ? void 0 : n.short), 1)
616
637
  ])
617
638
  ]),
618
639
  e("div", null, [
619
640
  _(pe, {
620
641
  variant: "touch",
621
- icon: $(de),
622
- onClick: (O) => h(x)
642
+ icon: A(de),
643
+ onClick: (C) => f(n)
623
644
  }, null, 8, ["icon", "onClick"])
624
645
  ])
625
646
  ], 8, We))), 128))
626
- ])) : d("", !0),
627
- a.apps && a.apps.length ? (t(), o("button", Ye, u("Дивитися всі"))) : d("", !0)
647
+ ])) : p("", !0),
648
+ a.apps && a.apps.length ? (t(), o("button", Ye, d("Дивитися всі"))) : p("", !0)
628
649
  ])
629
650
  ])
630
- ])) : d("", !0)
631
- ], 8, je);
651
+ ])) : p("", !0)
652
+ ], 8, Me);
632
653
  };
633
654
  }
634
655
  });
635
- const Nt = /* @__PURE__ */ X(Ze, [["__scopeId", "data-v-9e75279e"]]);
636
- function et(w, f) {
656
+ const qt = /* @__PURE__ */ X(Ze, [["__scopeId", "data-v-9e75279e"]]);
657
+ function et(w, m) {
637
658
  return t(), o("svg", {
638
659
  xmlns: "http://www.w3.org/2000/svg",
639
660
  fill: "none",
@@ -649,7 +670,7 @@ function et(w, f) {
649
670
  })
650
671
  ]);
651
672
  }
652
- function tt(w, f) {
673
+ function tt(w, m) {
653
674
  return t(), o("svg", {
654
675
  xmlns: "http://www.w3.org/2000/svg",
655
676
  fill: "none",
@@ -670,7 +691,7 @@ function tt(w, f) {
670
691
  })
671
692
  ]);
672
693
  }
673
- function ot(w, f) {
694
+ function ot(w, m) {
674
695
  return t(), o("svg", {
675
696
  xmlns: "http://www.w3.org/2000/svg",
676
697
  fill: "none",
@@ -695,162 +716,162 @@ const nt = ["data-opened"], st = {
695
716
  }, at = ["onClick"], ct = { class: "uppercase text-[8px]" }, ut = { class: "overflow-y-auto grid rounded-xl" }, dt = { class: "max-h-full bg-[#FAFAFA]" }, pt = {
696
717
  key: 0,
697
718
  class: "space-y-2"
698
- }, ht = ["onClick"], ft = { class: "flex" }, mt = { class: "pl-2" }, vt = { class: "text-sm mt-1 font-semibold" }, yt = { class: "text-[10px] mt-1 text-[#979CA9]" }, xt = { class: "mt-auto" }, gt = { key: 0 }, _t = ["onClick"], wt = { class: "flex items-center space-x-3" }, kt = { class: "h-16" }, bt = {
719
+ }, ht = ["onClick"], ft = { class: "flex" }, vt = { class: "pl-2" }, mt = { class: "text-sm mt-1 font-semibold" }, yt = { class: "text-[10px] mt-1 text-[#979CA9]" }, gt = { class: "mt-auto" }, xt = { key: 0 }, _t = ["onClick"], wt = { class: "flex items-center space-x-3" }, kt = { class: "h-16" }, bt = {
699
720
  key: 0,
700
721
  class: "bg-[#FAFAFA] rounded-lg p-3"
701
722
  }, Ct = { class: "flex justify-between" }, $t = ["onClick"], At = {
702
723
  key: 0,
703
724
  class: "tooltip-text min-w-[70px]"
704
- }, St = { class: "flex justify-between mb-4" }, Ft = ["href"], Bt = { class: "flex flex-nowrap items-center w-max h-[24px]" }, Lt = { class: "whitespace-nowrap overflow-hidden text-ellipsis text-left flex-shrink w-full text-[#525B66]" }, jt = { class: "py-[8px] pl-0 pr-[8px]" }, zt = /* @__PURE__ */ M({
725
+ }, St = { class: "flex justify-between mb-4" }, Ft = ["href"], Lt = { class: "flex flex-nowrap items-center w-max h-[24px]" }, Bt = { class: "whitespace-nowrap overflow-hidden text-ellipsis text-left flex-shrink w-full text-[#525B66]" }, Mt = { class: "py-[8px] pl-0 pr-[8px]" }, jt = /* @__PURE__ */ E({
705
726
  __name: "OneHelpMenu",
706
727
  props: ke,
707
728
  emits: ["open", "close"],
708
- setup(w, { emit: f }) {
709
- const p = f, v = w, c = A(!1), l = () => {
710
- c.value = !c.value, c.value ? p("open") : p("close");
711
- }, m = S(() => k.value ? Q : J), s = A(3), h = S(() => {
712
- var n, y;
713
- const i = ((y = (n = v.help) == null ? void 0 : n.helpList) == null ? void 0 : y.length) || 0;
714
- return s.value === i;
729
+ setup(w, { emit: m }) {
730
+ const u = m, y = w, c = S(!1), l = () => {
731
+ c.value = !c.value, c.value ? u("open") : u("close");
732
+ }, h = F(() => k.value ? Q : J), s = S(3), f = F(() => {
733
+ var v, b;
734
+ const r = ((b = (v = y.help) == null ? void 0 : v.helpList) == null ? void 0 : b.length) || 0;
735
+ return s.value === r;
715
736
  });
716
- S(() => {
717
- var n;
718
- return (((n = v.help) == null ? void 0 : n.helpList) || []).slice(0, s.value);
737
+ F(() => {
738
+ var v;
739
+ return (((v = y.help) == null ? void 0 : v.helpList) || []).slice(0, s.value);
719
740
  });
720
741
  const a = () => {
721
- var n, y;
722
- const i = ((y = (n = v.help) == null ? void 0 : n.helpList) == null ? void 0 : y.length) || 0;
723
- s.value = h.value ? 3 : i;
724
- }, g = (i, n) => {
725
- i && n && typeof n.openLink == "function" ? n.openLink(n) : i && window.open(i, "_blank");
726
- }, k = A(!1), b = () => {
742
+ var v, b;
743
+ const r = ((b = (v = y.help) == null ? void 0 : v.helpList) == null ? void 0 : b.length) || 0;
744
+ s.value = f.value ? 3 : r;
745
+ }, g = (r, v) => {
746
+ r && v && typeof v.openLink == "function" ? v.openLink(v) : r && window.open(r, "_blank");
747
+ }, k = S(!1), x = () => {
727
748
  k.value = !k.value;
728
749
  };
729
- return (i, n) => {
730
- var y, F, x, O, H, D, q, N, U;
750
+ return (r, v) => {
751
+ var b, B, n, C, z, D, N, q, U;
731
752
  return t(), o("div", { "data-opened": c.value }, [
732
753
  e("button", {
733
754
  onClick: l,
734
755
  class: j(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex", { "bg-secondary-10": c.value }])
735
756
  }, [
736
- _($(et), { class: "text-secondary-base w-full p-1 hover:text-blue-600 m-auto" })
757
+ _(A(et), { class: "text-secondary-base w-full p-1 hover:text-blue-600 m-auto" })
737
758
  ], 2),
738
759
  c.value ? (t(), o("div", {
739
760
  key: 0,
740
761
  class: "fixed top-0 left-0 w-screen h-screen z-10 bg-black/10 flex flex-col",
741
762
  onClick: l
742
- })) : d("", !0),
763
+ })) : p("", !0),
743
764
  c.value ? (t(), o("div", st, [
744
765
  e("div", lt, [
745
- e("div", rt, u((y = i.help) == null ? void 0 : y.label), 1),
746
- _($(G), {
766
+ e("div", rt, d((b = r.help) == null ? void 0 : b.label), 1),
767
+ _(A(G), {
747
768
  class: "w-6 cursor-pointer",
748
769
  onClick: l
749
770
  })
750
771
  ]),
751
- (F = i.help) != null && F.helpButton ? (t(), o("div", it, [
752
- (t(!0), o(C, null, B((x = i.help) == null ? void 0 : x.helpButton, (r) => (t(), o("button", {
753
- key: r.name,
754
- onClick: (P) => g(r.link, r),
772
+ (B = r.help) != null && B.helpButton ? (t(), o("div", it, [
773
+ (t(!0), o($, null, L((n = r.help) == null ? void 0 : n.helpButton, (i) => (t(), o("button", {
774
+ key: i.name,
775
+ onClick: (T) => g(i.link, i),
755
776
  class: "grid justify-center space-y-2 hover:bg-slate-100 p-3 rounded-xl hover:text-blue-500"
756
777
  }, [
757
778
  e("div", null, [
758
- (t(), L(V(r == null ? void 0 : r.icon), { class: "w-[16px] h-[16px] mx-auto" }))
779
+ (t(), M(V(i == null ? void 0 : i.icon), { class: "w-[16px] h-[16px] mx-auto" }))
759
780
  ]),
760
- e("span", ct, u(r.name), 1)
781
+ e("span", ct, d(i.name), 1)
761
782
  ], 8, at))), 128))
762
- ])) : d("", !0),
783
+ ])) : p("", !0),
763
784
  e("div", ut, [
764
785
  e("div", dt, [
765
- (O = i.help) != null && O.helpList && i.help.helpList.length ? (t(), o("div", pt, [
766
- (t(!0), o(C, null, B(i.help.helpList, (r) => (t(), o("div", {
767
- key: r.id,
768
- onClick: (P) => g(r.link, r),
786
+ (C = r.help) != null && C.helpList && r.help.helpList.length ? (t(), o("div", pt, [
787
+ (t(!0), o($, null, L(r.help.helpList, (i) => (t(), o("div", {
788
+ key: i.id,
789
+ onClick: (T) => g(i.link, i),
769
790
  class: "flex justify-between items-center rounded-lg hover:bg-slate-100 p-2 cursor-pointer hover:text-[#4089E0]"
770
791
  }, [
771
792
  e("div", ft, [
772
- e("div", mt, [
773
- e("p", vt, u(r.name), 1),
774
- e("p", yt, u(r.category), 1)
793
+ e("div", vt, [
794
+ e("p", mt, d(i.name), 1),
795
+ e("p", yt, d(i.category), 1)
775
796
  ])
776
797
  ])
777
798
  ], 8, ht))), 128))
778
- ])) : d("", !0)
799
+ ])) : p("", !0)
779
800
  ])
780
801
  ]),
781
- (H = i.help) != null && H.helpList && i.help.helpList.length < 0 ? (t(), o("button", {
802
+ (z = r.help) != null && z.helpList && r.help.helpList.length < 0 ? (t(), o("button", {
782
803
  key: 1,
783
804
  onClick: a,
784
805
  class: "h-11 w-full bg-[#FAFAFA] hover:bg-slate-100 p-3 text-[#525B66] rounded-b-xl text-xs hover:text-[#4089E0] font-medium"
785
- }, u(h.value ? i.help.buttNoMore : i.help.buttMore), 1)) : d("", !0),
786
- e("div", xt, [
787
- (D = i.help) != null && D.video ? (t(), o("div", gt, [
788
- (t(!0), o(C, null, B(i.help.video, (r) => (t(), o("button", {
789
- key: r.id,
790
- onClick: (P) => g(r.link, r),
806
+ }, d(f.value ? r.help.buttNoMore : r.help.buttMore), 1)) : p("", !0),
807
+ e("div", gt, [
808
+ (D = r.help) != null && D.video ? (t(), o("div", xt, [
809
+ (t(!0), o($, null, L(r.help.video, (i) => (t(), o("button", {
810
+ key: i.id,
811
+ onClick: (T) => g(i.link, i),
791
812
  class: "flex items-center space-x-3 mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"
792
813
  }, [
793
- _($(tt), { class: "w-6 h-6" }),
794
- e("span", null, u(r.name), 1)
814
+ _(A(tt), { class: "w-6 h-6" }),
815
+ e("span", null, d(i.name), 1)
795
816
  ], 8, _t))), 128))
796
- ])) : d("", !0),
797
- (q = i.help) != null && q.socialList ? (t(), o("button", {
817
+ ])) : p("", !0),
818
+ (N = r.help) != null && N.socialList ? (t(), o("button", {
798
819
  key: 1,
799
- onClick: b,
820
+ onClick: x,
800
821
  class: "flex items-center justify-between mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"
801
822
  }, [
802
823
  e("div", wt, [
803
- _($(ot), { class: "w-6 h-6" }),
804
- e("span", null, u(i.help.socialButt), 1)
824
+ _(A(ot), { class: "w-6 h-6" }),
825
+ e("span", null, d(r.help.socialButt), 1)
805
826
  ]),
806
- _($(m), { class: "w-4 h-4" })
807
- ])) : d("", !0),
827
+ _(A(h), { class: "w-4 h-4" })
828
+ ])) : p("", !0),
808
829
  e("div", kt, [
809
830
  k.value ? (t(), o("div", bt, [
810
831
  e("div", Ct, [
811
- (t(!0), o(C, null, B((N = i.help) == null ? void 0 : N.socialList, (r) => (t(), o("button", {
812
- key: r.id,
813
- onClick: (P) => g(r.link, r),
832
+ (t(!0), o($, null, L((q = r.help) == null ? void 0 : q.socialList, (i) => (t(), o("button", {
833
+ key: i.id,
834
+ onClick: (T) => g(i.link, i),
814
835
  class: "flex items-center space-x-2 p-2 rounded-lg hover:bg-slate-100 hover:text-blue-500 tooltip"
815
836
  }, [
816
837
  e("div", null, [
817
- r.name ? (t(), o("div", At, u(r.name), 1)) : d("", !0),
818
- (t(), L(V(r == null ? void 0 : r.icon), { class: "w-[24px] h-[24px] mx-auto" }))
838
+ i.name ? (t(), o("div", At, d(i.name), 1)) : p("", !0),
839
+ (t(), M(V(i == null ? void 0 : i.icon), { class: "w-[24px] h-[24px] mx-auto" }))
819
840
  ])
820
841
  ], 8, $t))), 128))
821
842
  ])
822
- ])) : d("", !0)
843
+ ])) : p("", !0)
823
844
  ]),
824
845
  e("div", St, [
825
- (t(!0), o(C, null, B((U = i.help) == null ? void 0 : U.termsOffer, (r) => (t(), o("a", {
826
- key: r.name,
846
+ (t(!0), o($, null, L((U = r.help) == null ? void 0 : U.termsOffer, (i) => (t(), o("a", {
847
+ key: i.name,
827
848
  target: "_blank",
828
- href: r.link,
849
+ href: i.link,
829
850
  class: "ml-2 flex items-center rounded-lg text-xs hover:underline font-extralight cursor-pointer"
830
851
  }, [
831
- e("div", Bt, [
832
- e("div", Lt, [
833
- e("span", jt, u(r.name), 1)
852
+ e("div", Lt, [
853
+ e("div", Bt, [
854
+ e("span", Mt, d(i.name), 1)
834
855
  ])
835
856
  ])
836
857
  ], 8, Ft))), 128))
837
858
  ])
838
859
  ])
839
- ])) : d("", !0)
860
+ ])) : p("", !0)
840
861
  ], 8, nt);
841
862
  };
842
863
  }
843
864
  });
844
- const Ut = /* @__PURE__ */ X(zt, [["__scopeId", "data-v-f5d2b453"]]);
865
+ const Ut = /* @__PURE__ */ X(jt, [["__scopeId", "data-v-f5d2b453"]]);
845
866
  export {
846
- Nt as O,
847
- xe as _,
867
+ qt as O,
868
+ ge as _,
848
869
  K as a,
849
- qt as b,
870
+ Nt as b,
850
871
  Ut as c,
851
872
  he as d,
852
873
  we as e,
853
874
  Dt as f,
854
875
  ot as g,
855
- Le as r
876
+ Be as r
856
877
  };