@oneb/ui-vue 0.2.24 → 0.2.25

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.
@@ -0,0 +1,782 @@
1
+ import { defineComponent as z, ref as F, provide as X, computed as S, openBlock as t, createElementBlock as o, renderSlot as N, normalizeProps as R, guardReactiveProps as W, createCommentVNode as u, createVNode as _, Transition as Y, withCtx as P, normalizeClass as M, toDisplayString as c, inject as Z, withModifiers as ee, createBlock as L, resolveDynamicComponent as I, createElementVNode as e, Fragment as $, renderList as A, mergeProps as te, unref as k } from "vue";
2
+ import { _ as j } from "./OneAvatar.vue_vue_type_script_setup_true_lang-08ab80dd.js";
3
+ import { r as U } from "./XMarkIcon-51ef0691.js";
4
+ import { r as G, a as J, b as oe } from "./ChevronRightIcon-8df1af46.js";
5
+ import { OneButton as se } from "./button/index.js";
6
+ import { _ as Q } from "./_plugin-vue_export-helper-dad06003.js";
7
+ const ne = {
8
+ title: {
9
+ type: String
10
+ },
11
+ stick: {
12
+ type: String,
13
+ default: "right"
14
+ }
15
+ }, le = {
16
+ variant: {
17
+ type: String,
18
+ default: "primary"
19
+ },
20
+ label: {
21
+ type: String
22
+ },
23
+ icon: {
24
+ type: [Function, Object]
25
+ }
26
+ }, Lt = {
27
+ modelValue: {
28
+ type: [Object, Array],
29
+ default: null
30
+ },
31
+ multiple: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ items: {
36
+ type: Array,
37
+ default: () => []
38
+ },
39
+ title: {
40
+ type: String
41
+ },
42
+ placeholder: {
43
+ type: String,
44
+ default: "Select"
45
+ },
46
+ searchPlaceholder: {
47
+ type: String,
48
+ default: "Search"
49
+ },
50
+ labelKey: {
51
+ type: String,
52
+ default: "label"
53
+ },
54
+ valueKey: {
55
+ type: String,
56
+ default: "id"
57
+ },
58
+ stick: {
59
+ type: String,
60
+ default: "bottom-start"
61
+ },
62
+ allowEmpty: {
63
+ type: Boolean,
64
+ default: !1
65
+ },
66
+ emptyLabel: {
67
+ type: String
68
+ },
69
+ createLabel: {
70
+ type: String
71
+ },
72
+ searchable: {
73
+ type: Boolean,
74
+ default: !0
75
+ },
76
+ isLoading: {
77
+ type: Boolean,
78
+ default: !1
79
+ },
80
+ groupKey: {
81
+ type: String
82
+ },
83
+ maxWidth: {
84
+ type: String
85
+ },
86
+ view: {
87
+ type: String,
88
+ default: "default"
89
+ }
90
+ }, re = ["data-opened"], ie = {
91
+ key: 0,
92
+ class: "text-sm text-secondary-content px-3 py-2 text-left"
93
+ }, ae = /* @__PURE__ */ z({
94
+ __name: "OneDropdown",
95
+ props: ne,
96
+ emits: ["open", "close"],
97
+ setup(y, { emit: p }) {
98
+ const f = F(!1), h = F(null), a = p, i = y, d = () => {
99
+ f.value = !f.value, f.value ? a("open") : a("close");
100
+ };
101
+ X("OneDropdown", {
102
+ onToggle: d
103
+ });
104
+ const l = S(() => {
105
+ var w;
106
+ const s = (w = h.value) == null ? void 0 : w.getBoundingClientRect(), m = s ? s.x < 270 : !1;
107
+ return s && s.top + 270 > window.innerHeight ? "up" + (m ? "-right" : "-left") : "down" + (m ? "-right" : "-left");
108
+ }), g = S(() => {
109
+ const s = [
110
+ "absolute z-10 w-fit rounded-md bg-white",
111
+ "py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",
112
+ "overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"
113
+ ];
114
+ return l.value.startsWith("up") ? s.push("bottom-1 mb-10") : l.value.startsWith("down") && s.push("top-1 mt-10"), i.stick === "right" ? s.push("right-0") : i.stick === "left" && s.push("left-0"), s;
115
+ });
116
+ return (s, m) => (t(), o("div", {
117
+ class: "relative inline-block",
118
+ ref_key: "menuRef",
119
+ ref: h,
120
+ "data-opened": f.value
121
+ }, [
122
+ N(s.$slots, "button", R(W({ onToggle: d, isExpanded: f.value }))),
123
+ f.value ? (t(), o("div", {
124
+ key: 0,
125
+ class: "fixed top-0 left-0 w-screen h-screen z-10",
126
+ onClick: d
127
+ })) : u("", !0),
128
+ _(Y, {
129
+ "enter-active-class": "transition ease-out duration-100",
130
+ "enter-from-class": "transform opacity-0 scale-95",
131
+ "enter-to-class": "transform opacity-100 scale-100",
132
+ "leave-active-class": "transition ease-in duration-75",
133
+ "leave-from-class": "transform opacity-100 scale-100",
134
+ "leave-to-class": "transform opacity-0 scale-95"
135
+ }, {
136
+ default: P(() => [
137
+ f.value ? (t(), o("div", {
138
+ key: 0,
139
+ class: M(["menu", g.value]),
140
+ role: "menu",
141
+ "aria-orientation": "vertical",
142
+ tabindex: "-1"
143
+ }, [
144
+ s.title ? (t(), o("div", ie, c(s.title), 1)) : u("", !0),
145
+ N(s.$slots, "menu", R(W({ onToggle: d })))
146
+ ], 2)) : u("", !0)
147
+ ]),
148
+ _: 3
149
+ })
150
+ ], 8, re));
151
+ }
152
+ }), K = /* @__PURE__ */ z({
153
+ __name: "OneDropdownItem",
154
+ props: le,
155
+ emits: ["click"],
156
+ setup(y, { emit: p }) {
157
+ const f = p, h = y, a = Z("OneDropdown"), i = () => {
158
+ a !== void 0 && a.onToggle(), f("click");
159
+ }, d = S(() => {
160
+ const l = [];
161
+ return h.variant === "secondary" ? l.push("text-secondary-content hover:bg-secondary-body-hover") : h.variant === "danger" ? l.push("text-danger-content hover:bg-danger-10") : h.variant === "warning" ? l.push("text-warning-content hover:bg-warning-10") : h.variant === "info" ? l.push("text-info-content hover:bg-info-10") : l.push("hover:bg-secondary-body-hover"), l;
162
+ });
163
+ return (l, g) => (t(), o("button", {
164
+ class: M(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap", d.value]),
165
+ onClick: ee(i, ["prevent"])
166
+ }, [
167
+ l.icon ? (t(), L(I(l.icon), {
168
+ key: 0,
169
+ class: "w-4 h-4"
170
+ })) : u("", !0),
171
+ e("span", null, c(l.label), 1)
172
+ ], 2));
173
+ }
174
+ });
175
+ function ce(y, p) {
176
+ return t(), o("svg", {
177
+ xmlns: "http://www.w3.org/2000/svg",
178
+ fill: "none",
179
+ viewBox: "0 0 24 24",
180
+ "stroke-width": "1.8",
181
+ stroke: "currentColor",
182
+ "aria-hidden": "true"
183
+ }, [
184
+ e("path", {
185
+ "stroke-linecap": "round",
186
+ "stroke-linejoin": "round",
187
+ d: "M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"
188
+ })
189
+ ]);
190
+ }
191
+ const de = {
192
+ user: {
193
+ type: Object,
194
+ required: !0
195
+ },
196
+ menu: {
197
+ type: Array,
198
+ default: () => []
199
+ },
200
+ iconSize: {
201
+ type: String,
202
+ default: "34"
203
+ },
204
+ app: {
205
+ type: Object
206
+ },
207
+ accountLabel: {
208
+ type: String,
209
+ default: "Account"
210
+ },
211
+ logoutLabel: {
212
+ type: String,
213
+ default: "Logout"
214
+ },
215
+ versionLabel: {
216
+ type: String,
217
+ default: ""
218
+ },
219
+ onAccount: {
220
+ type: Function
221
+ },
222
+ onLogout: {
223
+ type: Function
224
+ }
225
+ }, ue = {
226
+ workspace: {
227
+ type: Object,
228
+ required: !0
229
+ },
230
+ workspaces: {
231
+ type: Array
232
+ },
233
+ apps: {
234
+ type: Array,
235
+ required: !0
236
+ },
237
+ iconSize: {
238
+ type: String,
239
+ default: "24"
240
+ },
241
+ appsTitle: {
242
+ type: String,
243
+ default: "Ваші додатки"
244
+ },
245
+ changeLabel: {
246
+ type: String,
247
+ default: "Керувати робочими просторами"
248
+ },
249
+ onChange: {
250
+ type: Function
251
+ },
252
+ onApp: {
253
+ type: Function
254
+ }
255
+ }, pe = {
256
+ help: {
257
+ type: Object,
258
+ required: !0
259
+ }
260
+ }, he = ["onClick"], fe = { class: "flex flex-col items-center pt-5 pb-2 h-full" }, me = { class: "flex flex-col px-10 py-1 mt-2 text-center" }, ve = { class: "self-center text-base font-medium tracking-wide text-black" }, xe = { class: "mt-1 text-xs leading-5 text-blue-500 font-light" }, ge = { class: "text-left w-full mt-5 px-3" }, ye = { class: "-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400" }, Bt = /* @__PURE__ */ z({
261
+ __name: "OneUserMenu",
262
+ props: de,
263
+ setup(y) {
264
+ const p = y, f = S(() => {
265
+ var i;
266
+ return (i = p.menu) == null ? void 0 : i.map((d) => {
267
+ let l = { label: d.label };
268
+ d.icon != null && (l = { ...l, icon: d.icon });
269
+ const g = typeof d.click == "function" ? d.click : () => {
270
+ };
271
+ return {
272
+ key: d.label,
273
+ args: l,
274
+ click: g
275
+ };
276
+ });
277
+ }), h = () => {
278
+ typeof p.onAccount == "function" && p.onAccount();
279
+ }, a = () => {
280
+ typeof p.onLogout == "function" && p.onLogout();
281
+ };
282
+ return (i, d) => (t(), L(ae, { stick: "right" }, {
283
+ button: P(({ onToggle: l, isExpanded: g }) => {
284
+ var s, m;
285
+ return [
286
+ e("button", {
287
+ onClick: l,
288
+ class: M(["p-1 rounded-full hover:bg-secondary-10", [g ? "bg-secondary-25" : ""]])
289
+ }, [
290
+ _(j, {
291
+ text: ((s = i.user) == null ? void 0 : s.name) || "",
292
+ size: i.iconSize,
293
+ src: (m = i.user) == null ? void 0 : m.photo_url,
294
+ rounded: !0
295
+ }, null, 8, ["text", "size", "src"])
296
+ ], 10, he)
297
+ ];
298
+ }),
299
+ menu: P(() => {
300
+ var l, g, s, m, w;
301
+ return [
302
+ e("div", fe, [
303
+ _(j, {
304
+ text: ((l = i.user) == null ? void 0 : l.name) || "",
305
+ size: 80,
306
+ src: (g = i.user) == null ? void 0 : g.photo_url,
307
+ rounded: !0,
308
+ class: "mx-auto"
309
+ }, null, 8, ["text", "src"]),
310
+ e("div", me, [
311
+ e("div", ve, c((s = i.user) == null ? void 0 : s.name), 1),
312
+ e("div", xe, c((m = i.user) == null ? void 0 : m.email), 1)
313
+ ]),
314
+ typeof p.onAccount == "function" ? (t(), o("a", {
315
+ key: 0,
316
+ onClick: h,
317
+ 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"
318
+ }, c(i.accountLabel), 1)) : u("", !0),
319
+ e("div", ge, [
320
+ (t(!0), o($, null, A(f.value, (C) => (t(), L(K, te({
321
+ key: C.key
322
+ }, { ref_for: !0 }, C.args, {
323
+ onClick: C.click
324
+ }), null, 16, ["onClick"]))), 128)),
325
+ typeof i.onLogout == "function" ? (t(), L(K, {
326
+ key: 0,
327
+ icon: k(ce),
328
+ label: i.logoutLabel,
329
+ class: "rounded py-3",
330
+ onClick: a
331
+ }, null, 8, ["icon", "label"])) : u("", !0)
332
+ ]),
333
+ d[0] || (d[0] = e("div", {
334
+ class: "space-y-2 text-center",
335
+ style: { width: "240px" }
336
+ }, null, -1)),
337
+ e("div", ye, c((w = i.app) == null ? void 0 : w.version), 1)
338
+ ])
339
+ ];
340
+ }),
341
+ _: 1
342
+ }));
343
+ }
344
+ });
345
+ function _e(y, p) {
346
+ return t(), o("svg", {
347
+ xmlns: "http://www.w3.org/2000/svg",
348
+ fill: "none",
349
+ viewBox: "0 0 24 24",
350
+ "stroke-width": "1.8",
351
+ stroke: "currentColor",
352
+ "aria-hidden": "true"
353
+ }, [
354
+ e("rect", {
355
+ width: "2.94",
356
+ height: "2.94",
357
+ x: "17.16",
358
+ y: "3.9",
359
+ fill: "currentColor",
360
+ "stroke-width": "1.8",
361
+ rx: "1.1"
362
+ }),
363
+ e("rect", {
364
+ width: "2.94",
365
+ height: "2.94",
366
+ x: "10.53",
367
+ y: "3.9",
368
+ fill: "currentColor",
369
+ "stroke-width": "1.8",
370
+ rx: "1.1"
371
+ }),
372
+ e("rect", {
373
+ width: "2.94",
374
+ height: "2.94",
375
+ x: "3.9",
376
+ y: "3.9",
377
+ fill: "currentColor",
378
+ "stroke-width": "1.8",
379
+ rx: "1.1"
380
+ }),
381
+ e("rect", {
382
+ width: "2.94",
383
+ height: "2.94",
384
+ x: "17.16",
385
+ y: "10.53",
386
+ fill: "currentColor",
387
+ "stroke-width": "1.8",
388
+ rx: "1.1"
389
+ }),
390
+ e("rect", {
391
+ width: "2.94",
392
+ height: "2.94",
393
+ x: "10.53",
394
+ y: "10.53",
395
+ fill: "currentColor",
396
+ "stroke-width": "1.8",
397
+ rx: "1.1"
398
+ }),
399
+ e("rect", {
400
+ width: "2.94",
401
+ height: "2.94",
402
+ x: "3.9",
403
+ y: "10.53",
404
+ fill: "currentColor",
405
+ "stroke-width": "1.8",
406
+ rx: "1.1"
407
+ }),
408
+ e("rect", {
409
+ width: "2.94",
410
+ height: "2.94",
411
+ x: "17.16",
412
+ y: "17.16",
413
+ fill: "currentColor",
414
+ "stroke-width": "1.8",
415
+ rx: "1.1"
416
+ }),
417
+ e("rect", {
418
+ width: "2.94",
419
+ height: "2.94",
420
+ x: "10.53",
421
+ y: "17.16",
422
+ fill: "currentColor",
423
+ "stroke-width": "1.8",
424
+ rx: "1.1"
425
+ }),
426
+ e("rect", {
427
+ width: "2.94",
428
+ height: "2.94",
429
+ x: "3.9",
430
+ y: "17.16",
431
+ fill: "currentColor",
432
+ "stroke-width": "1.8",
433
+ rx: "1.1"
434
+ })
435
+ ]);
436
+ }
437
+ const we = ["data-opened"], be = {
438
+ key: 1,
439
+ class: "absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"
440
+ }, ke = { class: "flex justify-between items-center pt-3 mb-3" }, Ce = { class: "font-semibold text-xl px-3" }, $e = { class: "grid" }, Ae = { class: "rounded-lg m-3 border" }, Se = {
441
+ class: "space-x-2 flex items-center px-3 py-2",
442
+ style: { width: "300px" }
443
+ }, Fe = { class: "flex justify-between relative" }, Le = { class: "flex items-center justify-between w-full text-left text-sm font-semibold" }, Be = { key: 0 }, je = { class: "text-xs font-semibold" }, ze = { class: "px-3 py-2" }, Me = { class: "text-secondary-content text-left pb-1 text-xs uppercase" }, Oe = { class: "overflow-auto max-h-full" }, Ee = {
444
+ key: 0,
445
+ class: "space-y-2"
446
+ }, Pe = ["onClick"], Ie = { class: "flex" }, Ve = { class: "border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center" }, He = { class: "pl-2" }, Te = { class: "text-sm mt-1 font-semibold" }, De = { class: "text9 mt-1" }, qe = {
447
+ key: 1,
448
+ class: "mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"
449
+ }, Ne = /* @__PURE__ */ z({
450
+ __name: "OneBrowserMenu",
451
+ props: ue,
452
+ emits: ["open", "close"],
453
+ setup(y, { emit: p }) {
454
+ const f = p, h = y, a = F(!1), i = () => {
455
+ a.value = !a.value, a.value ? f("open") : f("close");
456
+ }, d = F(!1);
457
+ S(() => d.value ? G : J);
458
+ const l = () => {
459
+ typeof h.onChange == "function" && h.onChange();
460
+ }, g = (s) => {
461
+ typeof h.onApp == "function" && h.onApp(s);
462
+ };
463
+ return (s, m) => {
464
+ var w, C, r, v, b, B;
465
+ return t(), o("div", { "data-opened": a.value }, [
466
+ e("button", {
467
+ onClick: i,
468
+ class: M(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex", { "bg-secondary-10": a.value }])
469
+ }, [
470
+ _(k(_e), { class: "text-secondary-base w-full p-1 hover:text-blue-600 m-auto" })
471
+ ], 2),
472
+ a.value ? (t(), o("div", {
473
+ key: 0,
474
+ class: "fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",
475
+ onClick: i
476
+ })) : u("", !0),
477
+ a.value ? (t(), o("div", be, [
478
+ e("div", ke, [
479
+ e("div", Ce, c((w = s.workspace) == null ? void 0 : w.title), 1),
480
+ _(k(U), {
481
+ class: "w-6 cursor-pointer",
482
+ onClick: i
483
+ })
484
+ ]),
485
+ e("div", $e, [
486
+ e("div", Ae, [
487
+ e("div", Se, [
488
+ e("div", Fe, [
489
+ _(j, {
490
+ text: ((C = s.workspace) == null ? void 0 : C.name) || "",
491
+ src: (r = s.workspace) == null ? void 0 : r.photo_url,
492
+ size: 44,
493
+ rounded: !1,
494
+ class: "mx-auto"
495
+ }, null, 8, ["text", "src"])
496
+ ]),
497
+ e("div", Le, c((v = s.workspace) == null ? void 0 : v.name), 1)
498
+ ]),
499
+ d.value ? (t(), o("div", Be, [
500
+ (t(!0), o($, null, A(s.workspaces, (x) => (t(), o("div", {
501
+ key: x.name,
502
+ class: "flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"
503
+ }, [
504
+ _(j, {
505
+ text: x.name,
506
+ src: x.photo_url,
507
+ size: 30,
508
+ rounded: !1
509
+ }, null, 8, ["text", "src"]),
510
+ e("span", je, c(x.name), 1)
511
+ ]))), 128))
512
+ ])) : u("", !0),
513
+ m[0] || (m[0] = e("hr", null, null, -1)),
514
+ e("div", {
515
+ onClick: l,
516
+ class: "text-center py-2 cursor-pointer",
517
+ style: { "font-size": "10px" }
518
+ }, c((b = s.workspace) == null ? void 0 : b.changeLabel), 1)
519
+ ])
520
+ ]),
521
+ e("div", ze, [
522
+ e("div", Me, c((B = s.workspace) == null ? void 0 : B.appsLabel), 1),
523
+ e("div", Oe, [
524
+ s.apps && s.apps.length ? (t(), o("div", Ee, [
525
+ (t(!0), o($, null, A(s.apps, (x) => (t(), o("div", {
526
+ key: x.id,
527
+ onClick: (O) => g(x),
528
+ class: "flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"
529
+ }, [
530
+ e("div", Ie, [
531
+ e("div", Ve, [
532
+ _(j, {
533
+ text: x.name,
534
+ src: x.photo_url,
535
+ size: 44,
536
+ rounded: !1
537
+ }, null, 8, ["text", "src"])
538
+ ]),
539
+ e("div", He, [
540
+ e("p", Te, c(x.name), 1),
541
+ e("p", De, c(x == null ? void 0 : x.short), 1)
542
+ ])
543
+ ]),
544
+ e("div", null, [
545
+ _(se, {
546
+ variant: "touch",
547
+ icon: k(oe),
548
+ onClick: (O) => g(x)
549
+ }, null, 8, ["icon", "onClick"])
550
+ ])
551
+ ], 8, Pe))), 128))
552
+ ])) : u("", !0),
553
+ s.apps && s.apps.length ? (t(), o("button", qe, c("Дивитися всі"))) : u("", !0)
554
+ ])
555
+ ])
556
+ ])) : u("", !0)
557
+ ], 8, we);
558
+ };
559
+ }
560
+ });
561
+ const jt = /* @__PURE__ */ Q(Ne, [["__scopeId", "data-v-9e75279e"]]);
562
+ function Re(y, p) {
563
+ return t(), o("svg", {
564
+ xmlns: "http://www.w3.org/2000/svg",
565
+ fill: "none",
566
+ viewBox: "0 0 24 24",
567
+ "stroke-width": "1.8",
568
+ stroke: "currentColor",
569
+ "aria-hidden": "true"
570
+ }, [
571
+ e("path", {
572
+ "stroke-linecap": "round",
573
+ "stroke-linejoin": "round",
574
+ d: "M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"
575
+ })
576
+ ]);
577
+ }
578
+ function We(y, p) {
579
+ return t(), o("svg", {
580
+ xmlns: "http://www.w3.org/2000/svg",
581
+ fill: "none",
582
+ viewBox: "0 0 24 24",
583
+ "stroke-width": "1.8",
584
+ stroke: "currentColor",
585
+ "aria-hidden": "true"
586
+ }, [
587
+ e("path", {
588
+ "stroke-linecap": "round",
589
+ "stroke-linejoin": "round",
590
+ d: "M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
591
+ }),
592
+ e("path", {
593
+ "stroke-linecap": "round",
594
+ "stroke-linejoin": "round",
595
+ d: "M15.91 11.672a.375.375 0 010 .656l-5.603 3.113a.375.375 0 01-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112z"
596
+ })
597
+ ]);
598
+ }
599
+ function Ke(y, p) {
600
+ return t(), o("svg", {
601
+ xmlns: "http://www.w3.org/2000/svg",
602
+ fill: "none",
603
+ viewBox: "0 0 24 24",
604
+ "stroke-width": "1.8",
605
+ stroke: "currentColor",
606
+ "aria-hidden": "true"
607
+ }, [
608
+ e("path", {
609
+ "stroke-linecap": "round",
610
+ "stroke-linejoin": "round",
611
+ d: "M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"
612
+ })
613
+ ]);
614
+ }
615
+ const Ue = ["data-opened"], Ge = {
616
+ key: 1,
617
+ class: "absolute top-0 right-0 h-screen max-w-96 bg-white px-3 z-10 flex flex-col"
618
+ }, Je = { class: "flex justify-between items-center pt-3 mb-3" }, Qe = { class: "font-semibold text-xl px-3" }, Xe = {
619
+ key: 0,
620
+ class: "grid grid-cols-3 bg-[#FAFAFA] rounded-xl text-[#525B66] mb-2"
621
+ }, Ye = ["onClick"], Ze = { class: "uppercase text-[8px]" }, et = { class: "overflow-y-auto grid rounded-xl" }, tt = { class: "max-h-full bg-[#FAFAFA]" }, ot = {
622
+ key: 0,
623
+ class: "space-y-2"
624
+ }, st = ["onClick"], nt = { class: "flex" }, lt = { class: "pl-2" }, rt = { class: "text-sm mt-1 font-semibold" }, it = { class: "text-[10px] mt-1 text-[#979CA9]" }, at = { class: "mt-auto" }, ct = { key: 0 }, dt = ["onClick"], ut = { class: "flex items-center space-x-3" }, pt = { class: "h-16" }, ht = {
625
+ key: 0,
626
+ class: "bg-[#FAFAFA] rounded-lg p-3"
627
+ }, ft = { class: "flex justify-between" }, mt = ["onClick"], vt = {
628
+ key: 0,
629
+ class: "tooltip-text min-w-[70px]"
630
+ }, xt = { class: "flex justify-between mb-4" }, gt = ["href"], yt = { class: "flex flex-nowrap items-center w-max h-[24px]" }, _t = { class: "whitespace-nowrap overflow-hidden text-ellipsis text-left flex-shrink w-full text-[#525B66]" }, wt = { class: "py-[8px] pl-0 pr-[8px]" }, bt = /* @__PURE__ */ z({
631
+ __name: "OneHelpMenu",
632
+ props: pe,
633
+ emits: ["open", "close"],
634
+ setup(y, { emit: p }) {
635
+ const f = p, h = y, a = F(!1), i = () => {
636
+ a.value = !a.value, a.value ? f("open") : f("close");
637
+ }, d = S(() => w.value ? G : J), l = F(3), g = S(() => {
638
+ var v, b;
639
+ const r = ((b = (v = h.help) == null ? void 0 : v.helpList) == null ? void 0 : b.length) || 0;
640
+ return l.value === r;
641
+ });
642
+ S(() => {
643
+ var v;
644
+ return (((v = h.help) == null ? void 0 : v.helpList) || []).slice(0, l.value);
645
+ });
646
+ const s = () => {
647
+ var v, b;
648
+ const r = ((b = (v = h.help) == null ? void 0 : v.helpList) == null ? void 0 : b.length) || 0;
649
+ l.value = g.value ? 3 : r;
650
+ }, m = (r, v) => {
651
+ r && v && typeof v.openLink == "function" ? v.openLink(v) : r && window.open(r, "_blank");
652
+ }, w = F(!1), C = () => {
653
+ w.value = !w.value;
654
+ };
655
+ return (r, v) => {
656
+ var b, B, x, O, V, H, T, D, q;
657
+ return t(), o("div", { "data-opened": a.value }, [
658
+ e("button", {
659
+ onClick: i,
660
+ class: M(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex", { "bg-secondary-10": a.value }])
661
+ }, [
662
+ _(k(Re), { class: "text-secondary-base w-full p-1 hover:text-blue-600 m-auto" })
663
+ ], 2),
664
+ a.value ? (t(), o("div", {
665
+ key: 0,
666
+ class: "fixed top-0 left-0 w-screen h-screen z-10 bg-black/10 flex flex-col",
667
+ onClick: i
668
+ })) : u("", !0),
669
+ a.value ? (t(), o("div", Ge, [
670
+ e("div", Je, [
671
+ e("div", Qe, c((b = r.help) == null ? void 0 : b.label), 1),
672
+ _(k(U), {
673
+ class: "w-6 cursor-pointer",
674
+ onClick: i
675
+ })
676
+ ]),
677
+ (B = r.help) != null && B.helpButton ? (t(), o("div", Xe, [
678
+ (t(!0), o($, null, A((x = r.help) == null ? void 0 : x.helpButton, (n) => (t(), o("button", {
679
+ key: n.name,
680
+ onClick: (E) => m(n.link, n),
681
+ class: "grid justify-center space-y-2 hover:bg-slate-100 p-3 rounded-xl hover:text-blue-500"
682
+ }, [
683
+ e("div", null, [
684
+ (t(), L(I(n == null ? void 0 : n.icon), { class: "w-[16px] h-[16px] mx-auto" }))
685
+ ]),
686
+ e("span", Ze, c(n.name), 1)
687
+ ], 8, Ye))), 128))
688
+ ])) : u("", !0),
689
+ e("div", et, [
690
+ e("div", tt, [
691
+ (O = r.help) != null && O.helpList && r.help.helpList.length ? (t(), o("div", ot, [
692
+ (t(!0), o($, null, A(r.help.helpList, (n) => (t(), o("div", {
693
+ key: n.id,
694
+ onClick: (E) => m(n.link, n),
695
+ class: "flex justify-between items-center rounded-lg hover:bg-slate-100 p-2 cursor-pointer hover:text-[#4089E0]"
696
+ }, [
697
+ e("div", nt, [
698
+ e("div", lt, [
699
+ e("p", rt, c(n.name), 1),
700
+ e("p", it, c(n.category), 1)
701
+ ])
702
+ ])
703
+ ], 8, st))), 128))
704
+ ])) : u("", !0)
705
+ ])
706
+ ]),
707
+ (V = r.help) != null && V.helpList && r.help.helpList.length < 0 ? (t(), o("button", {
708
+ key: 1,
709
+ onClick: s,
710
+ 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"
711
+ }, c(g.value ? r.help.buttNoMore : r.help.buttMore), 1)) : u("", !0),
712
+ e("div", at, [
713
+ (H = r.help) != null && H.video ? (t(), o("div", ct, [
714
+ (t(!0), o($, null, A(r.help.video, (n) => (t(), o("button", {
715
+ key: n.id,
716
+ onClick: (E) => m(n.link, n),
717
+ 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"
718
+ }, [
719
+ _(k(We), { class: "w-6 h-6" }),
720
+ e("span", null, c(n.name), 1)
721
+ ], 8, dt))), 128))
722
+ ])) : u("", !0),
723
+ (T = r.help) != null && T.socialList ? (t(), o("button", {
724
+ key: 1,
725
+ onClick: C,
726
+ 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"
727
+ }, [
728
+ e("div", ut, [
729
+ _(k(Ke), { class: "w-6 h-6" }),
730
+ e("span", null, c(r.help.socialButt), 1)
731
+ ]),
732
+ _(k(d), { class: "w-4 h-4" })
733
+ ])) : u("", !0),
734
+ e("div", pt, [
735
+ w.value ? (t(), o("div", ht, [
736
+ e("div", ft, [
737
+ (t(!0), o($, null, A((D = r.help) == null ? void 0 : D.socialList, (n) => (t(), o("button", {
738
+ key: n.id,
739
+ onClick: (E) => m(n.link, n),
740
+ class: "flex items-center space-x-2 p-2 rounded-lg hover:bg-slate-100 hover:text-blue-500 tooltip"
741
+ }, [
742
+ e("div", null, [
743
+ n.name ? (t(), o("div", vt, c(n.name), 1)) : u("", !0),
744
+ (t(), L(I(n == null ? void 0 : n.icon), { class: "w-[24px] h-[24px] mx-auto" }))
745
+ ])
746
+ ], 8, mt))), 128))
747
+ ])
748
+ ])) : u("", !0)
749
+ ]),
750
+ e("div", xt, [
751
+ (t(!0), o($, null, A((q = r.help) == null ? void 0 : q.termsOffer, (n) => (t(), o("a", {
752
+ key: n.name,
753
+ target: "_blank",
754
+ href: n.link,
755
+ class: "ml-2 flex items-center rounded-lg text-xs hover:underline font-extralight cursor-pointer"
756
+ }, [
757
+ e("div", yt, [
758
+ e("div", _t, [
759
+ e("span", wt, c(n.name), 1)
760
+ ])
761
+ ])
762
+ ], 8, gt))), 128))
763
+ ])
764
+ ])
765
+ ])) : u("", !0)
766
+ ], 8, Ue);
767
+ };
768
+ }
769
+ });
770
+ const zt = /* @__PURE__ */ Q(bt, [["__scopeId", "data-v-f5d2b453"]]);
771
+ export {
772
+ jt as O,
773
+ ae as _,
774
+ K as a,
775
+ Bt as b,
776
+ zt as c,
777
+ ne as d,
778
+ ue as e,
779
+ Lt as f,
780
+ Ke as g,
781
+ _e as r
782
+ };