@topjoao/top-design-system 0.1.0-beta.2 → 0.1.0-beta.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.
- package/README.md +767 -132
- package/dist/TopToast-Dkz2oCA0.cjs +2 -0
- package/dist/TopToast-Dkz2oCA0.cjs.map +1 -0
- package/dist/TopToast-ZB64v4w6.js +2499 -0
- package/dist/TopToast-ZB64v4w6.js.map +1 -0
- package/dist/components/TopButton.vue.d.ts +4 -1
- package/dist/components/TopConfirmDialog.vue.d.ts +47 -0
- package/dist/components/TopDatePicker.vue.d.ts +81 -0
- package/dist/components/TopFileUpload.vue.d.ts +88 -0
- package/dist/components/TopInputText.vue.d.ts +24 -0
- package/dist/components/TopNavBar.vue.d.ts +272 -0
- package/dist/components/TopSelect.vue.d.ts +100 -0
- package/dist/components/TopTabs.vue.d.ts +34 -0
- package/dist/components/TopToast.vue.d.ts +37 -0
- package/dist/components/internal/TopNavMobileTree.vue.d.ts +20 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +15 -0
- package/dist/index.js +12 -70
- package/dist/index.js.map +1 -1
- package/dist/nuxt.cjs +1 -1
- package/dist/nuxt.cjs.map +1 -1
- package/dist/nuxt.js +28 -0
- package/dist/nuxt.js.map +1 -1
- package/dist/plugin.cjs +1 -1
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.ts +16 -0
- package/dist/plugin.js +4 -4
- package/dist/plugin.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/topSolutions.d.ts +7 -0
- package/package.json +91 -84
- package/dist/TopButton-9IIdtUbJ.js +0 -81
- package/dist/TopButton-9IIdtUbJ.js.map +0 -1
- package/dist/TopButton-CDKgguLF.cjs +0 -2
- package/dist/TopButton-CDKgguLF.cjs.map +0 -1
|
@@ -0,0 +1,2499 @@
|
|
|
1
|
+
import { Fragment as e, Transition as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, guardReactiveProps as d, mergeProps as f, nextTick as p, normalizeClass as m, normalizeProps as h, normalizeStyle as g, onBeforeUnmount as ee, onMounted as te, openBlock as _, ref as v, renderList as y, renderSlot as b, resolveComponent as x, resolveDynamicComponent as S, toDisplayString as C, unref as w, useAttrs as T, useId as E, useSlots as D, watch as O, withCtx as k, withDirectives as ne, withModifiers as A } from "vue";
|
|
2
|
+
import j from "primevue/button";
|
|
3
|
+
import M from "primevue/tooltip";
|
|
4
|
+
import { twMerge as N } from "tailwind-merge";
|
|
5
|
+
import P from "primevue/dialog";
|
|
6
|
+
import F from "primevue/datepicker";
|
|
7
|
+
import I from "primevue/fileupload";
|
|
8
|
+
import L from "primevue/inputtext";
|
|
9
|
+
import re from "primevue/drawer";
|
|
10
|
+
import ie from "primevue/menu";
|
|
11
|
+
import R from "primevue/autocomplete";
|
|
12
|
+
import z from "primevue/tab";
|
|
13
|
+
import B from "primevue/tablist";
|
|
14
|
+
import V from "primevue/tabpanel";
|
|
15
|
+
import ae from "primevue/tabpanels";
|
|
16
|
+
import H from "primevue/tabs";
|
|
17
|
+
import U from "primevue/toast";
|
|
18
|
+
//#region src/components/TopButton.vue?vue&type=script&setup=true&lang.ts
|
|
19
|
+
var W = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px] bg-transparent" }, oe = /* @__PURE__ */ u({
|
|
20
|
+
__name: "TopButton",
|
|
21
|
+
props: {
|
|
22
|
+
tooltip: { default: "" },
|
|
23
|
+
tooltipClass: { default: "text-xs" },
|
|
24
|
+
label: { default: "" },
|
|
25
|
+
icon: { default: "" },
|
|
26
|
+
loading: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !1
|
|
29
|
+
},
|
|
30
|
+
class: { default: "" },
|
|
31
|
+
outlined: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !1
|
|
34
|
+
},
|
|
35
|
+
severity: { default: "primary" },
|
|
36
|
+
secondary: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !1
|
|
39
|
+
},
|
|
40
|
+
disabled: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !1
|
|
43
|
+
},
|
|
44
|
+
unstyled: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: !1
|
|
47
|
+
},
|
|
48
|
+
type: { default: "button" }
|
|
49
|
+
},
|
|
50
|
+
emits: ["click"],
|
|
51
|
+
setup(e, { emit: t }) {
|
|
52
|
+
let i = D(), o = n(() => !!i.icon), c = e, l = t, u = n(() => c.secondary ? "secondary" : c.severity), d = n(() => {
|
|
53
|
+
let e = c.unstyled ? "" : u.value === "secondary" ? "rounded-[10px] border px-3 py-2 font-bold dark:!border-zinc-500 dark:!bg-zinc-700 dark:!text-zinc-100 dark:hover:!bg-zinc-600" : c.outlined ? u.value === "primary" ? "shrink-0 rounded-[10px] border-primary-800 px-3 py-2 text-primary-800 hover:bg-primary-50 dark:border-primary-200 dark:bg-transparent dark:text-primary-100 dark:hover:bg-primary-900" : "shrink-0 rounded-[10px] border px-3 py-2 font-bold" : u.value === "primary" ? "rounded-[10px] !border-primary-900 bg-primary-900 px-3 py-2 font-bold text-white hover:!border-primary-800 hover:bg-primary-800 dark:!text-white" : "rounded-[10px] border px-3 py-2 font-bold";
|
|
54
|
+
return N(e, c.class);
|
|
55
|
+
});
|
|
56
|
+
return (t, n) => (_(), a("span", W, [ne((_(), r(w(j), {
|
|
57
|
+
type: e.type,
|
|
58
|
+
label: e.label,
|
|
59
|
+
disabled: e.disabled || e.loading,
|
|
60
|
+
icon: o.value ? void 0 : e.icon || void 0,
|
|
61
|
+
loading: e.loading,
|
|
62
|
+
outlined: e.outlined || u.value === "secondary",
|
|
63
|
+
severity: u.value === "primary" ? void 0 : u.value,
|
|
64
|
+
class: m(d.value),
|
|
65
|
+
pt: { root: { class: d.value } },
|
|
66
|
+
onClick: n[0] ||= (e) => l("click")
|
|
67
|
+
}, s({ _: 2 }, [o.value ? {
|
|
68
|
+
name: "icon",
|
|
69
|
+
fn: k(() => [b(t.$slots, "icon")]),
|
|
70
|
+
key: "0"
|
|
71
|
+
} : void 0]), 1032, [
|
|
72
|
+
"type",
|
|
73
|
+
"label",
|
|
74
|
+
"disabled",
|
|
75
|
+
"icon",
|
|
76
|
+
"loading",
|
|
77
|
+
"outlined",
|
|
78
|
+
"severity",
|
|
79
|
+
"class",
|
|
80
|
+
"pt"
|
|
81
|
+
])), [[
|
|
82
|
+
w(M),
|
|
83
|
+
{
|
|
84
|
+
value: e.tooltip,
|
|
85
|
+
class: e.tooltipClass
|
|
86
|
+
},
|
|
87
|
+
void 0,
|
|
88
|
+
{ top: !0 }
|
|
89
|
+
]])]));
|
|
90
|
+
}
|
|
91
|
+
}), se = {
|
|
92
|
+
primary: {
|
|
93
|
+
50: "#EEF9FF",
|
|
94
|
+
100: "#DFF4FF",
|
|
95
|
+
200: "#C5E6F8",
|
|
96
|
+
300: "#8EC4DF",
|
|
97
|
+
400: "#66ACD1",
|
|
98
|
+
500: "#2488BC",
|
|
99
|
+
600: "#036DA3",
|
|
100
|
+
700: "#1B5783",
|
|
101
|
+
800: "#02466B",
|
|
102
|
+
900: "#052F4A",
|
|
103
|
+
950: "#0C192D"
|
|
104
|
+
},
|
|
105
|
+
secondary: {
|
|
106
|
+
50: "#FAFAFA",
|
|
107
|
+
100: "#F4F4F5",
|
|
108
|
+
200: "#E9E9E9",
|
|
109
|
+
300: "#D8D8D8",
|
|
110
|
+
400: "#B8B8B8",
|
|
111
|
+
500: "#8E8E8E",
|
|
112
|
+
600: "#676767",
|
|
113
|
+
700: "#4B4B4B",
|
|
114
|
+
800: "#343434",
|
|
115
|
+
900: "#1C1917",
|
|
116
|
+
950: "#0C0A09"
|
|
117
|
+
},
|
|
118
|
+
success: {
|
|
119
|
+
50: "#FAFFFA",
|
|
120
|
+
100: "#F4FBF6",
|
|
121
|
+
200: "#DFF6DE",
|
|
122
|
+
300: "#CBE3CA",
|
|
123
|
+
400: "#A3CCA1",
|
|
124
|
+
500: "#6BA968",
|
|
125
|
+
600: "#358F30",
|
|
126
|
+
700: "#2C7B27",
|
|
127
|
+
800: "#1E631A",
|
|
128
|
+
900: "#10430D",
|
|
129
|
+
950: "#062804"
|
|
130
|
+
},
|
|
131
|
+
warn: {
|
|
132
|
+
50: "#FFF7ED",
|
|
133
|
+
100: "#FDF3D8",
|
|
134
|
+
200: "#FDE9B2",
|
|
135
|
+
300: "#FDD566",
|
|
136
|
+
400: "#FFB900",
|
|
137
|
+
500: "#FFA515",
|
|
138
|
+
600: "#FD9024",
|
|
139
|
+
700: "#DD781F",
|
|
140
|
+
800: "#BC4E00",
|
|
141
|
+
900: "#A42D02",
|
|
142
|
+
950: "#792202"
|
|
143
|
+
},
|
|
144
|
+
danger: {
|
|
145
|
+
50: "#F8E6E4",
|
|
146
|
+
100: "#FFDDD9",
|
|
147
|
+
200: "#EEC1BC",
|
|
148
|
+
300: "#E3938C",
|
|
149
|
+
400: "#E3675C",
|
|
150
|
+
500: "#DC3F32",
|
|
151
|
+
600: "#CF150E",
|
|
152
|
+
700: "#B10404",
|
|
153
|
+
800: "#820907",
|
|
154
|
+
900: "#5D0803",
|
|
155
|
+
950: "#450501"
|
|
156
|
+
}
|
|
157
|
+
}, G = ["aria-label", "disabled"], K = { class: "flex flex-col items-center gap-2 pt-2" }, q = { class: "text-base font-bold text-secondary-900 dark:text-zinc-100" }, ce = { class: "text-sm leading-5 text-secondary-700 dark:text-zinc-300" }, J = { class: "mt-2 flex w-full items-center justify-center gap-3" }, le = /* @__PURE__ */ u({
|
|
158
|
+
__name: "TopConfirmDialog",
|
|
159
|
+
props: {
|
|
160
|
+
modelValue: {
|
|
161
|
+
type: Boolean,
|
|
162
|
+
default: !1
|
|
163
|
+
},
|
|
164
|
+
title: { default: "Confirmar" },
|
|
165
|
+
message: { default: "" },
|
|
166
|
+
confirmText: { default: "Confirmar" },
|
|
167
|
+
cancelText: { default: "Cancelar" },
|
|
168
|
+
loading: {
|
|
169
|
+
type: Boolean,
|
|
170
|
+
default: !1
|
|
171
|
+
},
|
|
172
|
+
loadingText: { default: "Processando..." },
|
|
173
|
+
severity: { default: "danger" },
|
|
174
|
+
icon: { default: "pi pi-exclamation-triangle" }
|
|
175
|
+
},
|
|
176
|
+
emits: [
|
|
177
|
+
"update:modelValue",
|
|
178
|
+
"confirm",
|
|
179
|
+
"cancel",
|
|
180
|
+
"close"
|
|
181
|
+
],
|
|
182
|
+
setup(e, { emit: t }) {
|
|
183
|
+
let i = e, a = t, s = n({
|
|
184
|
+
get: () => i.modelValue,
|
|
185
|
+
set: (e) => {
|
|
186
|
+
!e && i.loading || a("update:modelValue", e);
|
|
187
|
+
}
|
|
188
|
+
}), u = n(() => ({
|
|
189
|
+
"--top-confirm-dialog-accent": i.severity === "danger" ? se.danger[600] : se.primary[800],
|
|
190
|
+
"--top-confirm-dialog-accent-hover": i.severity === "danger" ? se.danger[700] : se.primary[700]
|
|
191
|
+
})), d = n(() => ["px-3 py-2 text-sm", i.severity === "danger" ? "!border-red-600 !bg-red-600 hover:!border-red-700 hover:!bg-red-700" : ""].filter(Boolean).join(" "));
|
|
192
|
+
function f() {
|
|
193
|
+
i.loading || a("confirm");
|
|
194
|
+
}
|
|
195
|
+
function p() {
|
|
196
|
+
i.loading || (a("cancel"), s.value = !1);
|
|
197
|
+
}
|
|
198
|
+
function h() {
|
|
199
|
+
i.loading || (s.value = !1);
|
|
200
|
+
}
|
|
201
|
+
return (t, n) => (_(), r(w(P), {
|
|
202
|
+
visible: s.value,
|
|
203
|
+
"onUpdate:visible": n[0] ||= (e) => s.value = e,
|
|
204
|
+
modal: "",
|
|
205
|
+
closable: !1,
|
|
206
|
+
"close-on-escape": !e.loading,
|
|
207
|
+
"dismissable-mask": !1,
|
|
208
|
+
draggable: !1,
|
|
209
|
+
"show-header": !1,
|
|
210
|
+
style: {
|
|
211
|
+
width: "500px",
|
|
212
|
+
maxWidth: "calc(100vw - 2rem)"
|
|
213
|
+
},
|
|
214
|
+
"aria-label": e.title,
|
|
215
|
+
pt: {
|
|
216
|
+
root: { class: "top-confirm-dialog top-solutions-component" },
|
|
217
|
+
content: { class: "p-6" },
|
|
218
|
+
footer: { class: "hidden" }
|
|
219
|
+
},
|
|
220
|
+
onHide: n[1] ||= (e) => a("close")
|
|
221
|
+
}, {
|
|
222
|
+
default: k(() => [o("div", {
|
|
223
|
+
class: "relative flex flex-col items-center gap-4 text-center",
|
|
224
|
+
style: g(u.value)
|
|
225
|
+
}, [
|
|
226
|
+
o("button", {
|
|
227
|
+
type: "button",
|
|
228
|
+
class: "absolute right-[-0.25rem] top-[-0.5rem] flex size-8 items-center justify-center rounded-full border-0 bg-transparent p-0 text-secondary-700 outline-none transition-colors hover:bg-secondary-200 focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:text-zinc-200 dark:hover:bg-zinc-700",
|
|
229
|
+
"aria-label": e.cancelText,
|
|
230
|
+
disabled: e.loading,
|
|
231
|
+
onClick: h
|
|
232
|
+
}, [...n[2] ||= [o("i", {
|
|
233
|
+
class: "pi pi-times text-lg",
|
|
234
|
+
"aria-hidden": "true"
|
|
235
|
+
}, null, -1)]], 8, G),
|
|
236
|
+
o("div", K, [o("i", {
|
|
237
|
+
class: m([e.icon, "top-confirm-dialog__icon text-[40px]"]),
|
|
238
|
+
"aria-hidden": "true"
|
|
239
|
+
}, null, 2), o("p", q, C(e.title), 1)]),
|
|
240
|
+
o("div", ce, [b(t.$slots, "message", {}, () => [b(t.$slots, "default", {}, () => [c(C(e.message), 1)])])]),
|
|
241
|
+
o("div", J, [l(oe, {
|
|
242
|
+
label: e.cancelText,
|
|
243
|
+
secondary: "",
|
|
244
|
+
disabled: e.loading,
|
|
245
|
+
class: "px-3 py-2 text-sm",
|
|
246
|
+
onClick: p
|
|
247
|
+
}, null, 8, ["label", "disabled"]), l(oe, {
|
|
248
|
+
label: e.loading ? e.loadingText : e.confirmText,
|
|
249
|
+
loading: e.loading,
|
|
250
|
+
class: m(d.value),
|
|
251
|
+
onClick: f
|
|
252
|
+
}, null, 8, [
|
|
253
|
+
"label",
|
|
254
|
+
"loading",
|
|
255
|
+
"class"
|
|
256
|
+
])])
|
|
257
|
+
], 4)]),
|
|
258
|
+
_: 3
|
|
259
|
+
}, 8, [
|
|
260
|
+
"visible",
|
|
261
|
+
"close-on-escape",
|
|
262
|
+
"aria-label"
|
|
263
|
+
]));
|
|
264
|
+
}
|
|
265
|
+
}), ue = { class: "top-date-picker top-solutions-component flex w-full flex-col gap-1" }, de = ["for"], fe = {
|
|
266
|
+
key: 0,
|
|
267
|
+
"aria-hidden": "true",
|
|
268
|
+
class: "text-red-600 dark:text-red-400"
|
|
269
|
+
}, pe = ["id"], me = /* @__PURE__ */ u({
|
|
270
|
+
inheritAttrs: !1,
|
|
271
|
+
__name: "TopDatePicker",
|
|
272
|
+
props: {
|
|
273
|
+
modelValue: { default: null },
|
|
274
|
+
label: { default: "" },
|
|
275
|
+
placeholder: { default: "dd/mm/aaaa" },
|
|
276
|
+
required: {
|
|
277
|
+
type: Boolean,
|
|
278
|
+
default: !1
|
|
279
|
+
},
|
|
280
|
+
error: { default: "" },
|
|
281
|
+
invalid: {
|
|
282
|
+
type: Boolean,
|
|
283
|
+
default: !1
|
|
284
|
+
},
|
|
285
|
+
disabled: {
|
|
286
|
+
type: Boolean,
|
|
287
|
+
default: !1
|
|
288
|
+
},
|
|
289
|
+
readonly: {
|
|
290
|
+
type: Boolean,
|
|
291
|
+
default: !1
|
|
292
|
+
},
|
|
293
|
+
selectionMode: { default: "single" },
|
|
294
|
+
dateFormat: { default: "dd/mm/yy" },
|
|
295
|
+
minDate: { default: void 0 },
|
|
296
|
+
maxDate: { default: void 0 },
|
|
297
|
+
showIcon: {
|
|
298
|
+
type: Boolean,
|
|
299
|
+
default: !0
|
|
300
|
+
},
|
|
301
|
+
iconDisplay: { default: "input" },
|
|
302
|
+
manualInput: {
|
|
303
|
+
type: Boolean,
|
|
304
|
+
default: !0
|
|
305
|
+
},
|
|
306
|
+
showButtonBar: {
|
|
307
|
+
type: Boolean,
|
|
308
|
+
default: !1
|
|
309
|
+
},
|
|
310
|
+
appendTo: { default: "body" }
|
|
311
|
+
},
|
|
312
|
+
emits: [
|
|
313
|
+
"update:modelValue",
|
|
314
|
+
"input",
|
|
315
|
+
"change",
|
|
316
|
+
"date-select",
|
|
317
|
+
"show",
|
|
318
|
+
"hide",
|
|
319
|
+
"today-click",
|
|
320
|
+
"clear-click",
|
|
321
|
+
"month-change",
|
|
322
|
+
"year-change",
|
|
323
|
+
"focus",
|
|
324
|
+
"blur",
|
|
325
|
+
"keydown"
|
|
326
|
+
],
|
|
327
|
+
setup(e, { emit: t }) {
|
|
328
|
+
let r = e, o = t, u = T(), p = D(), m = E(), g = n(() => u.id === void 0 || u.id === null || u.id === "" ? m : String(u.id)), ee = n(() => `${g.value}-error`), te = n(() => r.invalid || !!r.error), v = n(() => r.manualInput && !r.readonly && !r.disabled && r.selectionMode === "single" && r.dateFormat === "dd/mm/yy"), x = n(() => {
|
|
329
|
+
if (te.value) return !0;
|
|
330
|
+
let e = u["aria-invalid"];
|
|
331
|
+
return typeof e == "boolean" || e === "true" || e === "false" || e === "grammar" || e === "spelling" ? e : void 0;
|
|
332
|
+
}), S = n(() => {
|
|
333
|
+
let e = u["aria-describedby"], t = [typeof e == "string" ? e : "", r.error ? ee.value : ""].filter(Boolean);
|
|
334
|
+
return t.length ? t.join(" ") : void 0;
|
|
335
|
+
}), O = n(() => {
|
|
336
|
+
let { id: e, "aria-describedby": t, "aria-invalid": n, ...r } = u;
|
|
337
|
+
return r;
|
|
338
|
+
}), ne = n(() => ({ pcInputText: { root: {
|
|
339
|
+
"aria-describedby": S.value,
|
|
340
|
+
"aria-invalid": x.value,
|
|
341
|
+
onChange: (e) => o("change", e),
|
|
342
|
+
inputmode: v.value ? "numeric" : void 0,
|
|
343
|
+
maxlength: v.value ? 10 : void 0
|
|
344
|
+
} } }));
|
|
345
|
+
function A(e) {
|
|
346
|
+
o("update:modelValue", e ?? null);
|
|
347
|
+
}
|
|
348
|
+
function j(e) {
|
|
349
|
+
let t = e.target;
|
|
350
|
+
if (v.value && t instanceof HTMLInputElement && !e.isComposing) {
|
|
351
|
+
let e = t.value.replace(/\D/g, "").slice(0, 8);
|
|
352
|
+
t.value = [
|
|
353
|
+
e.slice(0, 2),
|
|
354
|
+
e.slice(2, 4),
|
|
355
|
+
e.slice(4, 8)
|
|
356
|
+
].filter(Boolean).join("/");
|
|
357
|
+
}
|
|
358
|
+
o("input", e);
|
|
359
|
+
}
|
|
360
|
+
return (t, n) => (_(), a("div", ue, [
|
|
361
|
+
e.label ? (_(), a("label", {
|
|
362
|
+
key: 0,
|
|
363
|
+
for: g.value,
|
|
364
|
+
class: "top-field-label text-xs font-bold"
|
|
365
|
+
}, [c(C(e.label) + " ", 1), e.required ? (_(), a("span", fe, "*")) : i("", !0)], 8, de)) : i("", !0),
|
|
366
|
+
l(w(F), f(O.value, {
|
|
367
|
+
"model-value": e.modelValue,
|
|
368
|
+
"input-id": g.value,
|
|
369
|
+
placeholder: e.placeholder,
|
|
370
|
+
required: e.required,
|
|
371
|
+
invalid: te.value,
|
|
372
|
+
disabled: e.disabled,
|
|
373
|
+
readonly: e.readonly,
|
|
374
|
+
"selection-mode": e.selectionMode,
|
|
375
|
+
"date-format": e.dateFormat,
|
|
376
|
+
"update-model-type": "date",
|
|
377
|
+
"min-date": e.minDate,
|
|
378
|
+
"max-date": e.maxDate,
|
|
379
|
+
"show-icon": e.showIcon,
|
|
380
|
+
"icon-display": e.iconDisplay,
|
|
381
|
+
"manual-input": e.manualInput,
|
|
382
|
+
"show-button-bar": e.showButtonBar,
|
|
383
|
+
"append-to": e.appendTo,
|
|
384
|
+
pt: ne.value,
|
|
385
|
+
"input-class": "top-date-picker__input top-field-control h-[40px] w-full rounded-[10px] border px-3 py-2 text-xs read-only:cursor-default disabled:cursor-not-allowed",
|
|
386
|
+
"panel-class": "top-date-picker-panel top-solutions-component",
|
|
387
|
+
fluid: "",
|
|
388
|
+
"onUpdate:modelValue": A,
|
|
389
|
+
onInput: j,
|
|
390
|
+
onDateSelect: n[0] ||= (e) => o("date-select", e),
|
|
391
|
+
onShow: n[1] ||= (e) => o("show"),
|
|
392
|
+
onHide: n[2] ||= (e) => o("hide"),
|
|
393
|
+
onTodayClick: n[3] ||= (e) => o("today-click", e),
|
|
394
|
+
onClearClick: n[4] ||= (e) => o("clear-click", e),
|
|
395
|
+
onMonthChange: n[5] ||= (e) => o("month-change", e),
|
|
396
|
+
onYearChange: n[6] ||= (e) => o("year-change", e),
|
|
397
|
+
onFocus: n[7] ||= (e) => o("focus", e),
|
|
398
|
+
onBlur: n[8] ||= (e) => o("blur", e),
|
|
399
|
+
onKeydown: n[9] ||= (e) => o("keydown", e)
|
|
400
|
+
}), s({ _: 2 }, [y(w(p), (e, n) => ({
|
|
401
|
+
name: n,
|
|
402
|
+
fn: k((e) => [b(t.$slots, n, h(d(e ?? {})))])
|
|
403
|
+
}))]), 1040, [
|
|
404
|
+
"model-value",
|
|
405
|
+
"input-id",
|
|
406
|
+
"placeholder",
|
|
407
|
+
"required",
|
|
408
|
+
"invalid",
|
|
409
|
+
"disabled",
|
|
410
|
+
"readonly",
|
|
411
|
+
"selection-mode",
|
|
412
|
+
"date-format",
|
|
413
|
+
"min-date",
|
|
414
|
+
"max-date",
|
|
415
|
+
"show-icon",
|
|
416
|
+
"icon-display",
|
|
417
|
+
"manual-input",
|
|
418
|
+
"show-button-bar",
|
|
419
|
+
"append-to",
|
|
420
|
+
"pt"
|
|
421
|
+
]),
|
|
422
|
+
e.error ? (_(), a("span", {
|
|
423
|
+
key: 1,
|
|
424
|
+
id: ee.value,
|
|
425
|
+
class: "text-[11px] text-red-600 dark:text-red-400",
|
|
426
|
+
role: "alert"
|
|
427
|
+
}, C(e.error), 9, pe)) : i("", !0)
|
|
428
|
+
]));
|
|
429
|
+
}
|
|
430
|
+
}), Y = [["path", {
|
|
431
|
+
d: "M17.4776 9.01106C17.485 9.01102 17.4925 9.01101 17.5 9.01101C19.9853 9.01101 22 11.0294 22 13.5193C22 15.8398 20.25 17.7508 18 18M17.4776 9.01106C17.4924 8.84606 17.5 8.67896 17.5 8.51009C17.5 5.46695 15.0376 3 12 3C9.12324 3 6.76233 5.21267 6.52042 8.03192M17.4776 9.01106C17.3753 10.1476 16.9286 11.1846 16.2428 12.0165M6.52042 8.03192C3.98398 8.27373 2 10.4139 2 13.0183C2 15.4417 3.71776 17.4632 6 17.9273M6.52042 8.03192C6.67826 8.01687 6.83823 8.00917 7 8.00917C8.12582 8.00917 9.16474 8.38194 10.0005 9.01101",
|
|
432
|
+
stroke: "currentColor",
|
|
433
|
+
strokeLinecap: "round",
|
|
434
|
+
strokeLinejoin: "round",
|
|
435
|
+
strokeWidth: "1.5",
|
|
436
|
+
key: "0"
|
|
437
|
+
}], ["path", {
|
|
438
|
+
d: "M12 13L12 21M12 13C11.2998 13 9.99153 14.9943 9.5 15.5M12 13C12.7002 13 14.0085 14.9943 14.5 15.5",
|
|
439
|
+
stroke: "currentColor",
|
|
440
|
+
strokeLinecap: "round",
|
|
441
|
+
strokeLinejoin: "round",
|
|
442
|
+
strokeWidth: "1.5",
|
|
443
|
+
key: "1"
|
|
444
|
+
}]], he = [["path", {
|
|
445
|
+
d: "M12.8924 2.80982L21.4876 9.59547C21.8112 9.85095 22 10.2405 22 10.6528C22 11.3969 21.3969 12 20.6528 12H20V15.5C20 18.3284 20 19.7426 19.1213 20.6213C18.2426 21.5 16.8284 21.5 14 21.5H10C7.17157 21.5 5.75736 21.5 4.87868 20.6213C4 19.7426 4 18.3284 4 15.5V12H3.34716C2.60315 12 2 11.3969 2 10.6528C2 10.2405 2.1888 9.85095 2.5124 9.59547L11.1076 2.80982C11.3617 2.60915 11.6761 2.5 12 2.5C12.3239 2.5 12.6383 2.60915 12.8924 2.80982Z",
|
|
446
|
+
stroke: "currentColor",
|
|
447
|
+
strokeLinecap: "round",
|
|
448
|
+
strokeLinejoin: "round",
|
|
449
|
+
strokeWidth: "1.5",
|
|
450
|
+
key: "0"
|
|
451
|
+
}], ["path", {
|
|
452
|
+
d: "M14.5 21.5V17C14.5 16.0654 14.5 15.5981 14.299 15.25C14.1674 15.022 13.978 14.8326 13.75 14.701C13.4019 14.5 12.9346 14.5 12 14.5C11.0654 14.5 10.5981 14.5 10.25 14.701C10.022 14.8326 9.83261 15.022 9.70096 15.25C9.5 15.5981 9.5 16.0654 9.5 17V21.5",
|
|
453
|
+
stroke: "currentColor",
|
|
454
|
+
strokeLinecap: "round",
|
|
455
|
+
strokeLinejoin: "round",
|
|
456
|
+
strokeWidth: "1.5",
|
|
457
|
+
key: "1"
|
|
458
|
+
}]], ge = u({
|
|
459
|
+
name: "HugeiconsIcon",
|
|
460
|
+
inheritAttrs: !1,
|
|
461
|
+
props: {
|
|
462
|
+
icon: {
|
|
463
|
+
type: Array,
|
|
464
|
+
required: !0
|
|
465
|
+
},
|
|
466
|
+
size: {
|
|
467
|
+
type: [Number, String],
|
|
468
|
+
default: 24,
|
|
469
|
+
validator(e) {
|
|
470
|
+
let t = typeof e == "string" ? parseInt(e, 10) : e;
|
|
471
|
+
return !isNaN(t) && t > 0;
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
strokeWidth: {
|
|
475
|
+
type: Number,
|
|
476
|
+
default: void 0
|
|
477
|
+
},
|
|
478
|
+
absoluteStrokeWidth: {
|
|
479
|
+
type: Boolean,
|
|
480
|
+
default: !1
|
|
481
|
+
},
|
|
482
|
+
altIcon: {
|
|
483
|
+
type: Array,
|
|
484
|
+
default: void 0
|
|
485
|
+
},
|
|
486
|
+
showAlt: {
|
|
487
|
+
type: Boolean,
|
|
488
|
+
default: !1
|
|
489
|
+
},
|
|
490
|
+
color: {
|
|
491
|
+
type: String,
|
|
492
|
+
default: "currentColor"
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
setup(e) {
|
|
496
|
+
let t = n(() => {
|
|
497
|
+
let t = typeof e.size == "string" ? parseInt(e.size, 10) : e.size;
|
|
498
|
+
return !isNaN(t) && t > 0 ? t : 24;
|
|
499
|
+
});
|
|
500
|
+
return {
|
|
501
|
+
computedSize: t,
|
|
502
|
+
calculatedStrokeWidth: n(() => {
|
|
503
|
+
if (e.strokeWidth !== void 0) return e.absoluteStrokeWidth ? e.strokeWidth * 24 / t.value : e.strokeWidth;
|
|
504
|
+
}),
|
|
505
|
+
transformAttrs: (e, t) => {
|
|
506
|
+
let n = {};
|
|
507
|
+
for (let [t, r] of Object.entries(e)) {
|
|
508
|
+
let e = t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
509
|
+
n[e] = r;
|
|
510
|
+
}
|
|
511
|
+
return t !== void 0 && (n["stroke-width"] = t, n.stroke = "currentColor"), n;
|
|
512
|
+
},
|
|
513
|
+
currentIcon: n(() => e.altIcon && e.showAlt ? e.altIcon : e.icon)
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
}), _e = (e, t) => {
|
|
517
|
+
let n = e.__vccOpts || e;
|
|
518
|
+
for (let [e, r] of t) n[e] = r;
|
|
519
|
+
return n;
|
|
520
|
+
}, ve = [
|
|
521
|
+
"width",
|
|
522
|
+
"height",
|
|
523
|
+
"color"
|
|
524
|
+
];
|
|
525
|
+
function ye(t, n, i, o, s, c) {
|
|
526
|
+
return _(), a("svg", f({
|
|
527
|
+
width: t.computedSize,
|
|
528
|
+
height: t.computedSize,
|
|
529
|
+
viewBox: "0 0 24 24",
|
|
530
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
531
|
+
fill: "none",
|
|
532
|
+
color: t.color
|
|
533
|
+
}, t.$attrs), [(_(!0), a(e, null, y(t.currentIcon, (e, n) => (_(), r(S(e[0]), f({
|
|
534
|
+
key: n,
|
|
535
|
+
ref_for: !0
|
|
536
|
+
}, t.transformAttrs(e[1], t.calculatedStrokeWidth)), null, 16))), 128))], 16, ve);
|
|
537
|
+
}
|
|
538
|
+
var be = /* @__PURE__ */ _e(ge, [["render", ye], ["__file", "/Users/mahmudulhasan/Desktop/Projects/Hugeicons/hugeicons-monorepo/packages/vue/src/components/HugeiconsIcon.vue"]]), xe = { class: "top-file-upload top-solutions-component flex w-full flex-col gap-1" }, Se = ["for"], Ce = {
|
|
539
|
+
key: 0,
|
|
540
|
+
"aria-hidden": "true",
|
|
541
|
+
class: "text-red-600 dark:text-red-400"
|
|
542
|
+
}, we = { class: "flex min-h-[130px] w-full flex-col items-center justify-center gap-3" }, Te = {
|
|
543
|
+
class: "top-file-upload__empty-icon",
|
|
544
|
+
"aria-hidden": "true"
|
|
545
|
+
}, Ee = {
|
|
546
|
+
key: 0,
|
|
547
|
+
"aria-label": "Carregando...",
|
|
548
|
+
class: "pi pi-spin pi-spinner text-5xl"
|
|
549
|
+
}, De = { class: "m-0 text-center text-xs text-secondary-600 dark:text-zinc-300" }, Oe = {
|
|
550
|
+
key: 1,
|
|
551
|
+
class: "flex w-full flex-col gap-2"
|
|
552
|
+
}, ke = ["src", "alt"], Ae = {
|
|
553
|
+
key: 1,
|
|
554
|
+
class: "flex size-12 shrink-0 items-center justify-center rounded-lg bg-primary-50 text-primary-800 dark:bg-primary-950 dark:text-primary-200"
|
|
555
|
+
}, je = { class: "min-w-0 flex-1" }, Me = { class: "m-0 truncate text-xs font-bold text-secondary-900 dark:text-zinc-100" }, Ne = { class: "text-[11px] text-secondary-500 dark:text-zinc-400" }, X = [
|
|
556
|
+
"aria-label",
|
|
557
|
+
"disabled",
|
|
558
|
+
"onClick"
|
|
559
|
+
], Pe = ["id"], Fe = /* @__PURE__ */ u({
|
|
560
|
+
inheritAttrs: !1,
|
|
561
|
+
__name: "TopFileUpload",
|
|
562
|
+
props: {
|
|
563
|
+
modelValue: { default: null },
|
|
564
|
+
label: { default: "" },
|
|
565
|
+
placeholder: { default: "Arraste e solte o arquivo aqui" },
|
|
566
|
+
required: {
|
|
567
|
+
type: Boolean,
|
|
568
|
+
default: !1
|
|
569
|
+
},
|
|
570
|
+
disabled: {
|
|
571
|
+
type: Boolean,
|
|
572
|
+
default: !1
|
|
573
|
+
},
|
|
574
|
+
accept: { default: "" },
|
|
575
|
+
multiple: {
|
|
576
|
+
type: Boolean,
|
|
577
|
+
default: !1
|
|
578
|
+
},
|
|
579
|
+
maxFileSize: { default: null },
|
|
580
|
+
maxFiles: { default: null },
|
|
581
|
+
error: { default: "" },
|
|
582
|
+
selectLabel: { default: "Selecionar arquivo" },
|
|
583
|
+
removeLabel: { default: "Remover" },
|
|
584
|
+
loading: {
|
|
585
|
+
type: Boolean,
|
|
586
|
+
default: !1
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
emits: [
|
|
590
|
+
"update:modelValue",
|
|
591
|
+
"select",
|
|
592
|
+
"change",
|
|
593
|
+
"remove",
|
|
594
|
+
"clear",
|
|
595
|
+
"error"
|
|
596
|
+
],
|
|
597
|
+
setup(t, { expose: s, emit: u }) {
|
|
598
|
+
let d = t, f = u, m = T(), h = E(), g = v(null), x = v(F(d.modelValue)), S = v([]), D = /* @__PURE__ */ new Map(), ne = n(() => m.id === void 0 || m.id === null || m.id === "" ? h : String(m.id)), A = n(() => `${ne.value}-error`), j = n(() => d.error || S.value[0]?.message || ""), M = n(() => d.disabled || d.loading), N = n(() => {
|
|
599
|
+
let e = m["aria-describedby"], t = [typeof e == "string" ? e : "", j.value ? A.value : ""].filter(Boolean);
|
|
600
|
+
return t.length ? t.join(" ") : void 0;
|
|
601
|
+
}), P = n(() => ({
|
|
602
|
+
...m,
|
|
603
|
+
id: ne.value,
|
|
604
|
+
required: d.required,
|
|
605
|
+
"aria-invalid": j.value ? !0 : m["aria-invalid"],
|
|
606
|
+
"aria-describedby": N.value,
|
|
607
|
+
"aria-label": m["aria-label"] || (d.label ? void 0 : d.selectLabel)
|
|
608
|
+
}));
|
|
609
|
+
function F(e) {
|
|
610
|
+
return e ? Array.isArray(e) ? d.multiple ? [...e] : e.slice(0, 1) : [e] : [];
|
|
611
|
+
}
|
|
612
|
+
function L(e, t) {
|
|
613
|
+
return e.name === t.name && e.type === t.type && e.size === t.size;
|
|
614
|
+
}
|
|
615
|
+
function re(e) {
|
|
616
|
+
return !d.accept.trim() || d.accept.split(",").some((t) => {
|
|
617
|
+
let n = t.trim().toLowerCase(), r = e.type.toLowerCase();
|
|
618
|
+
return n ? n.startsWith(".") ? e.name.toLowerCase().endsWith(n) : n.endsWith("/*") ? r.startsWith(n.slice(0, -1)) : r === n : !1;
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
function ie(e) {
|
|
622
|
+
return e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(2)} MB`;
|
|
623
|
+
}
|
|
624
|
+
function R(e) {
|
|
625
|
+
let t = [];
|
|
626
|
+
return {
|
|
627
|
+
errors: t,
|
|
628
|
+
validFiles: e.filter((e) => re(e) ? d.maxFileSize && e.size > d.maxFileSize ? (t.push({
|
|
629
|
+
code: "file-size",
|
|
630
|
+
file: e,
|
|
631
|
+
message: `O arquivo "${e.name}" excede o tamanho máximo de ${ie(d.maxFileSize)}.`
|
|
632
|
+
}), !1) : !0 : (t.push({
|
|
633
|
+
code: "file-type",
|
|
634
|
+
file: e,
|
|
635
|
+
message: `O arquivo "${e.name}" não possui um tipo aceito.`
|
|
636
|
+
}), !1))
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
function z(e) {
|
|
640
|
+
let t = e.originalEvent;
|
|
641
|
+
return Array.from(t.dataTransfer?.files ?? t.target?.files ?? []);
|
|
642
|
+
}
|
|
643
|
+
function B(e) {
|
|
644
|
+
return d.multiple ? [...e] : e[0] ?? null;
|
|
645
|
+
}
|
|
646
|
+
function V() {
|
|
647
|
+
g.value && (g.value.files = [...x.value]);
|
|
648
|
+
}
|
|
649
|
+
function ae(e, t) {
|
|
650
|
+
x.value = e, S.value = [], q(), p(V);
|
|
651
|
+
let n = B(e);
|
|
652
|
+
f("update:modelValue", n), f("change", n), t === "select" && f("select", [...e]), t === "clear" && f("clear");
|
|
653
|
+
}
|
|
654
|
+
function H(e) {
|
|
655
|
+
let { errors: t, validFiles: n } = R(z(e)), r = d.multiple ? [...x.value, ...n.filter((e) => !x.value.some((t) => L(t, e)))] : n.slice(-1);
|
|
656
|
+
if (d.maxFiles && r.length > d.maxFiles) {
|
|
657
|
+
let e = r.slice(d.maxFiles);
|
|
658
|
+
t.push(...e.map((e) => ({
|
|
659
|
+
code: "file-limit",
|
|
660
|
+
file: e,
|
|
661
|
+
message: `O limite máximo é de ${d.maxFiles} arquivo(s).`
|
|
662
|
+
}))), r = r.slice(0, d.maxFiles);
|
|
663
|
+
}
|
|
664
|
+
if (t.length ? (S.value = t, f("error", t)) : S.value = [], V(), n.length && !U(r, x.value)) {
|
|
665
|
+
x.value = r, q(), p(V);
|
|
666
|
+
let e = B(r);
|
|
667
|
+
f("update:modelValue", e), f("change", e), f("select", [...r]);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
function U(e, t) {
|
|
671
|
+
return e.length === t.length && e.every((e, n) => L(e, t[n]));
|
|
672
|
+
}
|
|
673
|
+
function W() {
|
|
674
|
+
M.value || g.value?.choose();
|
|
675
|
+
}
|
|
676
|
+
function se(e, t) {
|
|
677
|
+
if (M.value) return;
|
|
678
|
+
let n = x.value[t];
|
|
679
|
+
if (!n) return;
|
|
680
|
+
e(t);
|
|
681
|
+
let r = x.value.filter((e, n) => n !== t);
|
|
682
|
+
ae(r, "remove"), f("remove", n, t), r.length || f("clear");
|
|
683
|
+
}
|
|
684
|
+
function G() {
|
|
685
|
+
M.value || !x.value.length || ae([], "clear");
|
|
686
|
+
}
|
|
687
|
+
function K(e) {
|
|
688
|
+
if (!e.type.startsWith("image/") || typeof URL.createObjectURL != "function") return "";
|
|
689
|
+
let t = D.get(e);
|
|
690
|
+
if (t) return t;
|
|
691
|
+
let n = URL.createObjectURL(e);
|
|
692
|
+
return D.set(e, n), n;
|
|
693
|
+
}
|
|
694
|
+
function q() {
|
|
695
|
+
for (let [e, t] of D) x.value.includes(e) || (URL.revokeObjectURL(t), D.delete(e));
|
|
696
|
+
}
|
|
697
|
+
return O(() => d.modelValue, (e) => {
|
|
698
|
+
let t = F(e);
|
|
699
|
+
U(t, x.value) || (x.value = t, S.value = [], q(), p(V));
|
|
700
|
+
}), O(() => d.multiple, () => {
|
|
701
|
+
let e = F(d.modelValue);
|
|
702
|
+
x.value = e, q(), p(V);
|
|
703
|
+
}), te(V), ee(() => {
|
|
704
|
+
for (let e of D.values()) URL.revokeObjectURL(e);
|
|
705
|
+
D.clear();
|
|
706
|
+
}), s({
|
|
707
|
+
choose: W,
|
|
708
|
+
clear: G
|
|
709
|
+
}), (n, s) => (_(), a("div", xe, [
|
|
710
|
+
t.label ? (_(), a("label", {
|
|
711
|
+
key: 0,
|
|
712
|
+
for: ne.value,
|
|
713
|
+
class: "text-xs font-bold text-secondary-800 dark:text-zinc-200"
|
|
714
|
+
}, [c(C(t.label) + " ", 1), t.required ? (_(), a("span", Ce, "*")) : i("", !0)], 8, Se)) : i("", !0),
|
|
715
|
+
l(w(I), {
|
|
716
|
+
ref_key: "fileUploadRef",
|
|
717
|
+
ref: g,
|
|
718
|
+
mode: "advanced",
|
|
719
|
+
accept: t.accept || void 0,
|
|
720
|
+
multiple: t.multiple,
|
|
721
|
+
disabled: M.value,
|
|
722
|
+
"custom-upload": !0,
|
|
723
|
+
"show-upload-button": !1,
|
|
724
|
+
"show-cancel-button": !1,
|
|
725
|
+
pt: {
|
|
726
|
+
root: { class: "top-file-upload__root w-full" },
|
|
727
|
+
header: { class: "hidden" },
|
|
728
|
+
input: P.value,
|
|
729
|
+
content: { class: [
|
|
730
|
+
"top-file-upload__dropzone min-h-[224px] rounded-[10px] border p-4 transition-colors",
|
|
731
|
+
j.value ? "border-red-600 bg-red-50 dark:border-red-400 dark:bg-red-950/20" : "border-secondary-300 bg-white hover:border-primary-600 hover:bg-primary-50 dark:border-zinc-600 dark:bg-zinc-800 dark:hover:border-primary-400 dark:hover:bg-zinc-700",
|
|
732
|
+
M.value ? "cursor-not-allowed opacity-60" : ""
|
|
733
|
+
].join(" ") }
|
|
734
|
+
},
|
|
735
|
+
onSelect: H
|
|
736
|
+
}, {
|
|
737
|
+
content: k(({ removeFileCallback: c }) => [o("div", we, [x.value.length ? (_(), a("div", Oe, [(_(!0), a(e, null, y(x.value, (e, r) => (_(), a("div", {
|
|
738
|
+
key: `${e.name}-${e.size}-${e.lastModified}`,
|
|
739
|
+
class: "flex min-w-0 items-center gap-3 rounded-[10px] border border-secondary-300 bg-white p-3 dark:border-zinc-600 dark:bg-zinc-900"
|
|
740
|
+
}, [
|
|
741
|
+
b(n.$slots, "preview", {
|
|
742
|
+
file: e,
|
|
743
|
+
index: r,
|
|
744
|
+
url: K(e)
|
|
745
|
+
}, () => [K(e) ? (_(), a("img", {
|
|
746
|
+
key: 0,
|
|
747
|
+
src: K(e),
|
|
748
|
+
alt: `Pré-visualização de ${e.name}`,
|
|
749
|
+
class: "size-12 shrink-0 rounded-lg object-cover"
|
|
750
|
+
}, null, 8, ke)) : (_(), a("span", Ae, [...s[0] ||= [o("i", {
|
|
751
|
+
class: "pi pi-file text-2xl",
|
|
752
|
+
"aria-hidden": "true"
|
|
753
|
+
}, null, -1)]]))]),
|
|
754
|
+
o("div", je, [o("p", Me, C(e.name), 1), o("span", Ne, C(ie(e.size)), 1)]),
|
|
755
|
+
o("button", {
|
|
756
|
+
type: "button",
|
|
757
|
+
class: "flex size-8 shrink-0 items-center justify-center rounded-full border-0 bg-transparent p-0 text-red-600 transition-colors hover:bg-red-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:text-red-400 dark:hover:bg-red-950/40 dark:focus-visible:ring-offset-zinc-900",
|
|
758
|
+
"aria-label": `${t.removeLabel}: ${e.name}`,
|
|
759
|
+
disabled: M.value,
|
|
760
|
+
onClick: (e) => se(c, r)
|
|
761
|
+
}, [...s[1] ||= [o("i", {
|
|
762
|
+
class: "pi pi-times",
|
|
763
|
+
"aria-hidden": "true"
|
|
764
|
+
}, null, -1)]], 8, X)
|
|
765
|
+
]))), 128)), t.multiple && (!t.maxFiles || x.value.length < t.maxFiles) ? (_(), r(oe, {
|
|
766
|
+
key: 0,
|
|
767
|
+
label: t.selectLabel,
|
|
768
|
+
icon: "pi pi-plus-circle",
|
|
769
|
+
outlined: "",
|
|
770
|
+
disabled: t.disabled,
|
|
771
|
+
loading: t.loading,
|
|
772
|
+
class: "mt-1 px-3 py-2 text-xs",
|
|
773
|
+
onClick: W
|
|
774
|
+
}, null, 8, [
|
|
775
|
+
"label",
|
|
776
|
+
"disabled",
|
|
777
|
+
"loading"
|
|
778
|
+
])) : i("", !0)])) : b(n.$slots, "empty", {
|
|
779
|
+
choose: W,
|
|
780
|
+
disabled: M.value
|
|
781
|
+
}, () => [
|
|
782
|
+
o("span", Te, [t.loading ? (_(), a("i", Ee)) : (_(), r(w(be), {
|
|
783
|
+
key: 1,
|
|
784
|
+
icon: w(Y),
|
|
785
|
+
size: 72,
|
|
786
|
+
"stroke-width": 1.5,
|
|
787
|
+
class: "text-primary-800 dark:text-primary-300"
|
|
788
|
+
}, null, 8, ["icon"]))]),
|
|
789
|
+
o("p", De, C(t.placeholder), 1),
|
|
790
|
+
l(oe, {
|
|
791
|
+
label: t.selectLabel,
|
|
792
|
+
icon: "pi pi-plus-circle",
|
|
793
|
+
disabled: t.disabled,
|
|
794
|
+
loading: t.loading,
|
|
795
|
+
class: "px-3 py-2 text-xs",
|
|
796
|
+
onClick: W
|
|
797
|
+
}, null, 8, [
|
|
798
|
+
"label",
|
|
799
|
+
"disabled",
|
|
800
|
+
"loading"
|
|
801
|
+
])
|
|
802
|
+
], void 0, 0)])]),
|
|
803
|
+
_: 3
|
|
804
|
+
}, 8, [
|
|
805
|
+
"accept",
|
|
806
|
+
"multiple",
|
|
807
|
+
"disabled",
|
|
808
|
+
"pt"
|
|
809
|
+
]),
|
|
810
|
+
j.value ? (_(), a("span", {
|
|
811
|
+
key: 1,
|
|
812
|
+
id: A.value,
|
|
813
|
+
class: "text-[11px] text-red-600 dark:text-red-400",
|
|
814
|
+
role: "alert"
|
|
815
|
+
}, C(j.value), 9, Pe)) : i("", !0)
|
|
816
|
+
]));
|
|
817
|
+
}
|
|
818
|
+
}), Z = { class: "top-input-text top-solutions-component flex w-full flex-col gap-1" }, Ie = ["for"], Le = {
|
|
819
|
+
key: 0,
|
|
820
|
+
"aria-hidden": "true",
|
|
821
|
+
class: "text-red-600 dark:text-red-400"
|
|
822
|
+
}, Re = ["id"], ze = /* @__PURE__ */ u({
|
|
823
|
+
inheritAttrs: !1,
|
|
824
|
+
__name: "TopInputText",
|
|
825
|
+
props: {
|
|
826
|
+
modelValue: { default: "" },
|
|
827
|
+
label: { default: "" },
|
|
828
|
+
placeholder: { default: "" },
|
|
829
|
+
required: {
|
|
830
|
+
type: Boolean,
|
|
831
|
+
default: !1
|
|
832
|
+
},
|
|
833
|
+
error: { default: "" },
|
|
834
|
+
disabled: {
|
|
835
|
+
type: Boolean,
|
|
836
|
+
default: !1
|
|
837
|
+
},
|
|
838
|
+
readonly: {
|
|
839
|
+
type: Boolean,
|
|
840
|
+
default: !1
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
emits: ["update:modelValue"],
|
|
844
|
+
setup(e, { emit: t }) {
|
|
845
|
+
let r = e, o = t, s = T(), u = E(), d = n(() => s.id === void 0 || s.id === null || s.id === "" ? u : String(s.id)), p = n(() => `${d.value}-error`), m = n(() => {
|
|
846
|
+
if (r.error) return !0;
|
|
847
|
+
let e = s["aria-invalid"];
|
|
848
|
+
return typeof e == "boolean" || e === "true" || e === "false" || e === "grammar" || e === "spelling" ? e : void 0;
|
|
849
|
+
}), h = n(() => {
|
|
850
|
+
let e = s["aria-describedby"], t = [typeof e == "string" ? e : "", r.error ? p.value : ""].filter(Boolean);
|
|
851
|
+
return t.length ? t.join(" ") : void 0;
|
|
852
|
+
});
|
|
853
|
+
function g(e) {
|
|
854
|
+
o("update:modelValue", e ?? "");
|
|
855
|
+
}
|
|
856
|
+
return (t, n) => (_(), a("div", Z, [
|
|
857
|
+
e.label ? (_(), a("label", {
|
|
858
|
+
key: 0,
|
|
859
|
+
for: d.value,
|
|
860
|
+
class: "top-field-label text-xs font-bold"
|
|
861
|
+
}, [c(C(e.label) + " ", 1), e.required ? (_(), a("span", Le, "*")) : i("", !0)], 8, Ie)) : i("", !0),
|
|
862
|
+
l(w(L), f(t.$attrs, {
|
|
863
|
+
id: d.value,
|
|
864
|
+
"model-value": e.modelValue,
|
|
865
|
+
type: "text",
|
|
866
|
+
placeholder: e.placeholder,
|
|
867
|
+
required: e.required,
|
|
868
|
+
disabled: e.disabled,
|
|
869
|
+
readonly: e.readonly,
|
|
870
|
+
invalid: !!e.error,
|
|
871
|
+
"aria-invalid": m.value,
|
|
872
|
+
"aria-describedby": h.value,
|
|
873
|
+
fluid: "",
|
|
874
|
+
class: "top-input-text__control top-field-control h-[40px] w-full rounded-[10px] border px-3 py-2 text-xs read-only:cursor-default disabled:cursor-not-allowed",
|
|
875
|
+
"onUpdate:modelValue": g
|
|
876
|
+
}), null, 16, [
|
|
877
|
+
"id",
|
|
878
|
+
"model-value",
|
|
879
|
+
"placeholder",
|
|
880
|
+
"required",
|
|
881
|
+
"disabled",
|
|
882
|
+
"readonly",
|
|
883
|
+
"invalid",
|
|
884
|
+
"aria-invalid",
|
|
885
|
+
"aria-describedby"
|
|
886
|
+
]),
|
|
887
|
+
e.error ? (_(), a("span", {
|
|
888
|
+
key: 1,
|
|
889
|
+
id: p.value,
|
|
890
|
+
class: "text-[11px] text-red-600 dark:text-red-400",
|
|
891
|
+
role: "alert"
|
|
892
|
+
}, C(e.error), 9, Re)) : i("", !0)
|
|
893
|
+
]));
|
|
894
|
+
}
|
|
895
|
+
}), Be = [
|
|
896
|
+
"disabled",
|
|
897
|
+
"aria-expanded",
|
|
898
|
+
"onClick"
|
|
899
|
+
], Ve = { class: "top-nav-bar__mobile-item-label" }, He = {
|
|
900
|
+
key: 1,
|
|
901
|
+
class: "top-nav-bar__mobile-count",
|
|
902
|
+
"aria-hidden": "true"
|
|
903
|
+
}, Ue = /* @__PURE__ */ u({
|
|
904
|
+
name: "TopNavMobileTree",
|
|
905
|
+
__name: "TopNavMobileTree",
|
|
906
|
+
props: {
|
|
907
|
+
items: {},
|
|
908
|
+
activeItemId: { default: "" },
|
|
909
|
+
level: { default: 0 },
|
|
910
|
+
forceOpen: {
|
|
911
|
+
type: Boolean,
|
|
912
|
+
default: !1
|
|
913
|
+
},
|
|
914
|
+
showSectionDividers: {
|
|
915
|
+
type: Boolean,
|
|
916
|
+
default: !1
|
|
917
|
+
}
|
|
918
|
+
},
|
|
919
|
+
emits: ["select"],
|
|
920
|
+
setup(s, { emit: c }) {
|
|
921
|
+
let u = s, d = c, f = v(/* @__PURE__ */ new Set());
|
|
922
|
+
function p(e) {
|
|
923
|
+
return e.children?.filter(Boolean) ?? [];
|
|
924
|
+
}
|
|
925
|
+
function h(e) {
|
|
926
|
+
return e.id === u.activeItemId || p(e).some(h);
|
|
927
|
+
}
|
|
928
|
+
function ee(e) {
|
|
929
|
+
return u.forceOpen || f.value.has(e.id);
|
|
930
|
+
}
|
|
931
|
+
function te(e) {
|
|
932
|
+
if (e.disabled) return;
|
|
933
|
+
if (!p(e).length) {
|
|
934
|
+
d("select", e);
|
|
935
|
+
return;
|
|
936
|
+
}
|
|
937
|
+
let t = new Set(f.value);
|
|
938
|
+
t.has(e.id) ? t.delete(e.id) : t.add(e.id), f.value = t;
|
|
939
|
+
}
|
|
940
|
+
O(() => [u.activeItemId, u.items], () => {
|
|
941
|
+
let e = new Set(f.value);
|
|
942
|
+
u.items.forEach((t) => {
|
|
943
|
+
p(t).length && h(t) && e.add(t.id);
|
|
944
|
+
}), f.value = e;
|
|
945
|
+
}, {
|
|
946
|
+
immediate: !0,
|
|
947
|
+
deep: !0
|
|
948
|
+
});
|
|
949
|
+
let b = n(() => u.level > 0 ? { "--top-nav-tree-level": String(u.level) } : void 0);
|
|
950
|
+
return (n, c) => {
|
|
951
|
+
let u = x("TopNavMobileTree", !0);
|
|
952
|
+
return _(), a("div", {
|
|
953
|
+
class: m(["top-nav-bar__mobile-tree", {
|
|
954
|
+
"top-nav-bar__mobile-tree--nested": s.level > 0,
|
|
955
|
+
"top-nav-bar__mobile-tree--sections": s.showSectionDividers && s.level === 0
|
|
956
|
+
}]),
|
|
957
|
+
style: g(b.value)
|
|
958
|
+
}, [(_(!0), a(e, null, y(s.items, (e, n) => (_(), a("div", {
|
|
959
|
+
key: e.id,
|
|
960
|
+
class: m(["top-nav-bar__mobile-node", { "top-nav-bar__mobile-node--section": s.showSectionDividers && s.level === 0 && n > 0 }])
|
|
961
|
+
}, [o("button", {
|
|
962
|
+
class: m(["top-nav-bar__mobile-item", {
|
|
963
|
+
"top-nav-bar__mobile-item--active": e.id === s.activeItemId,
|
|
964
|
+
"top-nav-bar__mobile-item--ancestor": e.id !== s.activeItemId && h(e)
|
|
965
|
+
}]),
|
|
966
|
+
type: "button",
|
|
967
|
+
disabled: e.disabled,
|
|
968
|
+
"aria-expanded": p(e).length ? ee(e) : void 0,
|
|
969
|
+
onClick: (t) => te(e)
|
|
970
|
+
}, [
|
|
971
|
+
e.icon ? (_(), a("i", {
|
|
972
|
+
key: 0,
|
|
973
|
+
class: m(e.icon),
|
|
974
|
+
"aria-hidden": "true"
|
|
975
|
+
}, null, 2)) : i("", !0),
|
|
976
|
+
o("span", Ve, C(e.label), 1),
|
|
977
|
+
p(e).length ? (_(), a("span", He, C(p(e).length), 1)) : i("", !0),
|
|
978
|
+
p(e).length ? (_(), a("i", {
|
|
979
|
+
key: 2,
|
|
980
|
+
class: m(["pi pi-chevron-down top-nav-bar__mobile-chevron", { "top-nav-bar__mobile-chevron--open": ee(e) }]),
|
|
981
|
+
"aria-hidden": "true"
|
|
982
|
+
}, null, 2)) : i("", !0)
|
|
983
|
+
], 10, Be), l(t, { name: "top-nav-bar-menu-expand" }, {
|
|
984
|
+
default: k(() => [p(e).length && ee(e) ? (_(), r(u, {
|
|
985
|
+
key: 0,
|
|
986
|
+
items: p(e),
|
|
987
|
+
"active-item-id": s.activeItemId,
|
|
988
|
+
level: s.level + 1,
|
|
989
|
+
"force-open": s.forceOpen,
|
|
990
|
+
onSelect: c[0] ||= (e) => d("select", e)
|
|
991
|
+
}, null, 8, [
|
|
992
|
+
"items",
|
|
993
|
+
"active-item-id",
|
|
994
|
+
"level",
|
|
995
|
+
"force-open"
|
|
996
|
+
])) : i("", !0)]),
|
|
997
|
+
_: 2
|
|
998
|
+
}, 1024)], 2))), 128))], 6);
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
}), We = ["aria-expanded"], Ge = { class: "top-nav-bar__brand" }, Ke = {
|
|
1002
|
+
key: 1,
|
|
1003
|
+
class: "top-nav-bar__context"
|
|
1004
|
+
}, qe = { class: "top-nav-bar__desktop-tools" }, Je = {
|
|
1005
|
+
key: 0,
|
|
1006
|
+
class: "top-nav-bar__search-shell",
|
|
1007
|
+
"data-top-nav-search": ""
|
|
1008
|
+
}, Ye = ["value", "placeholder"], Xe = ["aria-label"], Ze = {
|
|
1009
|
+
key: 1,
|
|
1010
|
+
class: "top-nav-bar__search-results",
|
|
1011
|
+
role: "menu"
|
|
1012
|
+
}, Qe = { class: "top-nav-bar__search-results-scroll" }, $e = ["disabled", "onClick"], et = {
|
|
1013
|
+
key: 0,
|
|
1014
|
+
class: "top-nav-bar__empty"
|
|
1015
|
+
}, tt = {
|
|
1016
|
+
key: 1,
|
|
1017
|
+
class: "top-nav-bar__quick-actions",
|
|
1018
|
+
"data-top-nav-actions": ""
|
|
1019
|
+
}, nt = [
|
|
1020
|
+
"disabled",
|
|
1021
|
+
"aria-label",
|
|
1022
|
+
"aria-pressed",
|
|
1023
|
+
"title",
|
|
1024
|
+
"onClick"
|
|
1025
|
+
], rt = ["aria-expanded"], it = {
|
|
1026
|
+
key: 0,
|
|
1027
|
+
class: "top-nav-bar__popover-layer top-nav-bar__actions-layer"
|
|
1028
|
+
}, at = {
|
|
1029
|
+
class: "top-nav-bar__small-panel",
|
|
1030
|
+
role: "menu"
|
|
1031
|
+
}, ot = ["disabled", "onClick"], st = {
|
|
1032
|
+
key: 2,
|
|
1033
|
+
class: "top-nav-bar__custom-actions"
|
|
1034
|
+
}, ct = ["aria-haspopup", "aria-expanded"], lt = ["src"], ut = {
|
|
1035
|
+
key: 1,
|
|
1036
|
+
class: "top-nav-bar__user-avatar"
|
|
1037
|
+
}, dt = {
|
|
1038
|
+
key: 2,
|
|
1039
|
+
class: "top-nav-bar__user-details"
|
|
1040
|
+
}, ft = { class: "top-nav-bar__user-name" }, pt = {
|
|
1041
|
+
key: 0,
|
|
1042
|
+
class: "top-nav-bar__user-subtitle"
|
|
1043
|
+
}, mt = {
|
|
1044
|
+
key: 0,
|
|
1045
|
+
class: "pi pi-chevron-down top-nav-bar__chevron",
|
|
1046
|
+
"aria-hidden": "true"
|
|
1047
|
+
}, ht = {
|
|
1048
|
+
key: 0,
|
|
1049
|
+
class: "top-nav-bar__popover-layer top-nav-bar__user-layer"
|
|
1050
|
+
}, gt = {
|
|
1051
|
+
class: "top-nav-bar__small-panel top-nav-bar__user-dropdown",
|
|
1052
|
+
role: "menu"
|
|
1053
|
+
}, _t = {
|
|
1054
|
+
key: 0,
|
|
1055
|
+
class: "top-nav-bar__user-separator",
|
|
1056
|
+
role: "separator"
|
|
1057
|
+
}, vt = ["disabled", "onClick"], yt = {
|
|
1058
|
+
class: "top-nav-bar__breadcrumbs",
|
|
1059
|
+
"aria-label": "Breadcrumb"
|
|
1060
|
+
}, bt = {
|
|
1061
|
+
key: 0,
|
|
1062
|
+
class: "top-nav-bar__separator top-nav-bar__desktop-navigation-separator",
|
|
1063
|
+
"aria-hidden": "true"
|
|
1064
|
+
}, xt = ["aria-expanded"], St = {
|
|
1065
|
+
key: 0,
|
|
1066
|
+
class: "top-nav-bar__menu-layer"
|
|
1067
|
+
}, Ct = {
|
|
1068
|
+
class: "top-nav-bar__menu-panel",
|
|
1069
|
+
role: "menu"
|
|
1070
|
+
}, wt = { class: "top-nav-bar__section-list" }, Tt = [
|
|
1071
|
+
"aria-expanded",
|
|
1072
|
+
"onMouseenter",
|
|
1073
|
+
"onClick"
|
|
1074
|
+
], Et = { class: "top-nav-bar__menu-label" }, Dt = { class: "top-nav-bar__item-count" }, Ot = {
|
|
1075
|
+
key: 0,
|
|
1076
|
+
class: "top-nav-bar__submenu-region"
|
|
1077
|
+
}, kt = [
|
|
1078
|
+
"disabled",
|
|
1079
|
+
"aria-haspopup",
|
|
1080
|
+
"aria-expanded",
|
|
1081
|
+
"onMouseenter",
|
|
1082
|
+
"onClick"
|
|
1083
|
+
], At = { class: "top-nav-bar__menu-label" }, jt = {
|
|
1084
|
+
key: 1,
|
|
1085
|
+
class: "pi pi-chevron-right top-nav-bar__menu-arrow",
|
|
1086
|
+
"aria-hidden": "true"
|
|
1087
|
+
}, Mt = ["onMouseenter"], Nt = {
|
|
1088
|
+
key: 0,
|
|
1089
|
+
class: "top-nav-bar__crumb top-nav-bar__crumb--static"
|
|
1090
|
+
}, Pt = ["aria-expanded", "onClick"], Ft = {
|
|
1091
|
+
key: 2,
|
|
1092
|
+
class: "top-nav-bar__menu-layer"
|
|
1093
|
+
}, It = {
|
|
1094
|
+
class: "top-nav-bar__menu-panel top-nav-bar__breadcrumb-panel",
|
|
1095
|
+
role: "menu"
|
|
1096
|
+
}, Lt = [
|
|
1097
|
+
"disabled",
|
|
1098
|
+
"onMouseenter",
|
|
1099
|
+
"onClick"
|
|
1100
|
+
], Rt = { class: "top-nav-bar__menu-label" }, zt = {
|
|
1101
|
+
key: 1,
|
|
1102
|
+
class: "pi pi-chevron-right top-nav-bar__menu-arrow",
|
|
1103
|
+
"aria-hidden": "true"
|
|
1104
|
+
}, Bt = ["onClick"], Vt = ["title"], Ht = { class: "top-nav-bar__current-label" }, Ut = ["aria-label", "aria-pressed"], Wt = { class: "top-nav-bar__breadcrumb-actions" }, Gt = ["aria-expanded"], Kt = {
|
|
1105
|
+
key: 0,
|
|
1106
|
+
class: "top-nav-bar__popover-layer top-nav-bar__favorites-layer"
|
|
1107
|
+
}, qt = {
|
|
1108
|
+
class: "top-nav-bar__small-panel top-nav-bar__favorites-panel",
|
|
1109
|
+
role: "menu"
|
|
1110
|
+
}, Jt = ["disabled", "onClick"], Yt = { class: "top-nav-bar__favorites-title" }, Xt = {
|
|
1111
|
+
key: 0,
|
|
1112
|
+
class: "top-nav-bar__favorites-separator"
|
|
1113
|
+
}, Zt = {
|
|
1114
|
+
key: 0,
|
|
1115
|
+
class: "top-nav-bar__favorites-row top-nav-bar__desktop-only"
|
|
1116
|
+
}, Qt = { class: "top-nav-bar__favorites-title" }, $t = { class: "top-nav-bar__favorites-list" }, en = {
|
|
1117
|
+
key: 0,
|
|
1118
|
+
class: "top-nav-bar__favorites-separator",
|
|
1119
|
+
"aria-hidden": "true"
|
|
1120
|
+
}, tn = ["disabled", "onClick"], nn = { class: "top-nav-bar__mobile-menu" }, rn = { class: "top-nav-bar__mobile-menu-header" }, an = { class: "top-nav-bar__drawer-brand" }, on = ["onClick"], sn = {
|
|
1121
|
+
key: 0,
|
|
1122
|
+
class: "top-nav-bar__drawer-tools"
|
|
1123
|
+
}, cn = { class: "top-nav-bar__drawer-search" }, ln = ["value", "placeholder"], un = ["disabled", "onClick"], dn = { class: "top-nav-bar__mobile-menu-scroll" }, fn = { class: "top-nav-bar__mobile-menu-track" }, pn = {
|
|
1124
|
+
key: 0,
|
|
1125
|
+
class: "top-nav-bar__mobile-favorites"
|
|
1126
|
+
}, mn = ["aria-expanded"], hn = { class: "top-nav-bar__mobile-item-label" }, gn = { class: "top-nav-bar__mobile-count" }, _n = {
|
|
1127
|
+
key: 1,
|
|
1128
|
+
class: "top-nav-bar__drawer-empty"
|
|
1129
|
+
}, vn = {
|
|
1130
|
+
key: 1,
|
|
1131
|
+
class: "top-nav-bar__mobile-footer"
|
|
1132
|
+
}, yn = ["aria-haspopup", "aria-expanded"], bn = ["src"], xn = {
|
|
1133
|
+
key: 1,
|
|
1134
|
+
class: "top-nav-bar__user-avatar"
|
|
1135
|
+
}, Sn = {
|
|
1136
|
+
key: 2,
|
|
1137
|
+
class: "top-nav-bar__user-details"
|
|
1138
|
+
}, Cn = { class: "top-nav-bar__user-name" }, wn = {
|
|
1139
|
+
key: 0,
|
|
1140
|
+
class: "top-nav-bar__user-subtitle"
|
|
1141
|
+
}, Tn = {
|
|
1142
|
+
key: 3,
|
|
1143
|
+
class: "pi pi-chevron-down top-nav-bar__mobile-chevron",
|
|
1144
|
+
"aria-hidden": "true"
|
|
1145
|
+
}, En = 120, Dn = 24, On = /* @__PURE__ */ u({
|
|
1146
|
+
__name: "TopNavBar",
|
|
1147
|
+
props: {
|
|
1148
|
+
sections: { default: () => [] },
|
|
1149
|
+
breadcrumbs: { default: () => [] },
|
|
1150
|
+
homeItem: { default: () => ({
|
|
1151
|
+
id: "home",
|
|
1152
|
+
label: "Início",
|
|
1153
|
+
to: "/"
|
|
1154
|
+
}) },
|
|
1155
|
+
navigationLabel: { default: "Navegação" },
|
|
1156
|
+
activeItemId: { default: "" },
|
|
1157
|
+
searchable: {
|
|
1158
|
+
type: Boolean,
|
|
1159
|
+
default: !1
|
|
1160
|
+
},
|
|
1161
|
+
searchValue: { default: void 0 },
|
|
1162
|
+
searchPlaceholder: { default: "Pesquisar no menu..." },
|
|
1163
|
+
searchResults: { default: void 0 },
|
|
1164
|
+
showAia: {
|
|
1165
|
+
type: Boolean,
|
|
1166
|
+
default: !1
|
|
1167
|
+
},
|
|
1168
|
+
aiaActive: {
|
|
1169
|
+
type: Boolean,
|
|
1170
|
+
default: !1
|
|
1171
|
+
},
|
|
1172
|
+
aiaLabel: { default: "Aia" },
|
|
1173
|
+
showSupport: {
|
|
1174
|
+
type: Boolean,
|
|
1175
|
+
default: !1
|
|
1176
|
+
},
|
|
1177
|
+
supportLabel: { default: "Central de Suporte" },
|
|
1178
|
+
actions: { default: () => [] },
|
|
1179
|
+
user: { default: void 0 },
|
|
1180
|
+
userMenuItems: { default: () => [] },
|
|
1181
|
+
favoriteItems: { default: () => [] },
|
|
1182
|
+
showFavoriteToggle: {
|
|
1183
|
+
type: Boolean,
|
|
1184
|
+
default: !1
|
|
1185
|
+
},
|
|
1186
|
+
favoriteActive: {
|
|
1187
|
+
type: Boolean,
|
|
1188
|
+
default: !1
|
|
1189
|
+
},
|
|
1190
|
+
favoriteLabel: { default: "Favoritos" },
|
|
1191
|
+
mobileOpen: {
|
|
1192
|
+
type: Boolean,
|
|
1193
|
+
default: void 0
|
|
1194
|
+
},
|
|
1195
|
+
appearance: { default: () => ({}) }
|
|
1196
|
+
},
|
|
1197
|
+
emits: [
|
|
1198
|
+
"navigate",
|
|
1199
|
+
"search",
|
|
1200
|
+
"update:searchValue",
|
|
1201
|
+
"update:mobileOpen",
|
|
1202
|
+
"toggle-aia",
|
|
1203
|
+
"open-support",
|
|
1204
|
+
"toggle-favorite",
|
|
1205
|
+
"action",
|
|
1206
|
+
"user-action",
|
|
1207
|
+
"user-click"
|
|
1208
|
+
],
|
|
1209
|
+
setup(s, { expose: u, emit: d }) {
|
|
1210
|
+
let f = s, h = d, x = D(), S = v(null), T = v(null), E = v(null), ne = v(null), j = v(null), M = v(null), N = v(f.mobileOpen ?? !1), P = v(!1), F = v(null), I = v([]), L = v(null), R = v([]), z = v(!1), B = v(!1), V = v(!1), ae = v(null), H = v(!1), U = v(!1), W = v(!1), oe = v(!0), se = v(!1), G = v(f.searchValue ?? ""), K = v(!1), q = v(!1), ce = v(!1), J = v({
|
|
1211
|
+
collapseActions: !1,
|
|
1212
|
+
searchIconOnly: !1,
|
|
1213
|
+
hideUserName: !1,
|
|
1214
|
+
hideContextDetails: !1
|
|
1215
|
+
}), le, ue, de, fe, pe = 0;
|
|
1216
|
+
function me(e) {
|
|
1217
|
+
return (e.children ?? []).filter(Boolean).map((e) => {
|
|
1218
|
+
let t = me(e);
|
|
1219
|
+
if (!t.length) {
|
|
1220
|
+
let { children: t, ...n } = e;
|
|
1221
|
+
return n;
|
|
1222
|
+
}
|
|
1223
|
+
return {
|
|
1224
|
+
...e,
|
|
1225
|
+
children: t
|
|
1226
|
+
};
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
let Y = n(() => f.sections.map((e) => ({
|
|
1230
|
+
...e,
|
|
1231
|
+
children: me(e)
|
|
1232
|
+
})).filter((e) => e.children.length > 0));
|
|
1233
|
+
function ge(e, t = []) {
|
|
1234
|
+
return e.forEach((e) => {
|
|
1235
|
+
let n = e.children ?? [];
|
|
1236
|
+
n.length ? ge(n, t) : t.push(e);
|
|
1237
|
+
}), t;
|
|
1238
|
+
}
|
|
1239
|
+
let _e = n(() => Y.value.flatMap((e) => ge(e.children)));
|
|
1240
|
+
function ve(e) {
|
|
1241
|
+
return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLocaleLowerCase("pt-BR");
|
|
1242
|
+
}
|
|
1243
|
+
let ye = n(() => {
|
|
1244
|
+
if (f.searchResults !== void 0) return f.searchResults;
|
|
1245
|
+
let e = ve(G.value.trim());
|
|
1246
|
+
return e ? _e.value.filter((t) => ve(t.label).includes(e)) : _e.value;
|
|
1247
|
+
});
|
|
1248
|
+
function xe(e, t) {
|
|
1249
|
+
return t ? e.flatMap((e) => {
|
|
1250
|
+
let n = ve(e.label).includes(t), r = xe(e.children ?? [], t);
|
|
1251
|
+
return !n && !r.length ? [] : [{
|
|
1252
|
+
...e,
|
|
1253
|
+
children: n ? e.children : r
|
|
1254
|
+
}];
|
|
1255
|
+
}) : e;
|
|
1256
|
+
}
|
|
1257
|
+
let Se = n(() => xe(Y.value, ve(G.value.trim())));
|
|
1258
|
+
function Ce(e, t, n = []) {
|
|
1259
|
+
for (let r of e) {
|
|
1260
|
+
let e = [...n, r];
|
|
1261
|
+
if (r.id === t) return e;
|
|
1262
|
+
let i = Ce(r.children ?? [], t, e);
|
|
1263
|
+
if (i) return i;
|
|
1264
|
+
}
|
|
1265
|
+
return null;
|
|
1266
|
+
}
|
|
1267
|
+
function we(e, t) {
|
|
1268
|
+
for (let n of e) {
|
|
1269
|
+
if (n.id === t) return n;
|
|
1270
|
+
let e = we(n.children ?? [], t);
|
|
1271
|
+
if (e) return e;
|
|
1272
|
+
}
|
|
1273
|
+
return null;
|
|
1274
|
+
}
|
|
1275
|
+
let Te = n(() => {
|
|
1276
|
+
if (!f.activeItemId) return null;
|
|
1277
|
+
for (let e of Y.value) {
|
|
1278
|
+
if (e.id === f.activeItemId) return [e];
|
|
1279
|
+
let t = Ce(e.children, f.activeItemId);
|
|
1280
|
+
if (t) return [e, ...t];
|
|
1281
|
+
}
|
|
1282
|
+
return null;
|
|
1283
|
+
}), Ee = n(() => {
|
|
1284
|
+
if (f.breadcrumbs.length) return f.breadcrumbs;
|
|
1285
|
+
let e = Te.value;
|
|
1286
|
+
if (!e?.length) return [];
|
|
1287
|
+
let t = e.length - 1;
|
|
1288
|
+
return e.map((e, n) => ({
|
|
1289
|
+
id: e.id,
|
|
1290
|
+
label: e.label,
|
|
1291
|
+
to: n === t ? void 0 : e.to,
|
|
1292
|
+
sectionId: n === 0 ? e.id : void 0,
|
|
1293
|
+
menuId: n > 0 && e.children?.length ? e.id : void 0
|
|
1294
|
+
}));
|
|
1295
|
+
});
|
|
1296
|
+
function De(e) {
|
|
1297
|
+
return e.menuId ? we(Y.value, e.menuId) : e.sectionId ? Y.value.find((t) => t.id === e.sectionId) ?? null : null;
|
|
1298
|
+
}
|
|
1299
|
+
let Oe = n(() => Y.value.find((e) => e.id === F.value) ?? null);
|
|
1300
|
+
function ke(e, t) {
|
|
1301
|
+
let n = [], r = e, i = 0;
|
|
1302
|
+
for (; r.length;) {
|
|
1303
|
+
n.push(r);
|
|
1304
|
+
let e = t[i];
|
|
1305
|
+
if (!e) break;
|
|
1306
|
+
let a = r.find((t) => t.id === e);
|
|
1307
|
+
if (!a?.children?.length) break;
|
|
1308
|
+
r = a.children, i += 1;
|
|
1309
|
+
}
|
|
1310
|
+
return n;
|
|
1311
|
+
}
|
|
1312
|
+
let Ae = n(() => Oe.value ? ke(Oe.value.children, I.value) : []);
|
|
1313
|
+
function je(e, t = 10) {
|
|
1314
|
+
let n = [];
|
|
1315
|
+
for (let r = 0; r < e.length; r += t) n.push(e.slice(r, r + t));
|
|
1316
|
+
return n;
|
|
1317
|
+
}
|
|
1318
|
+
let Me = n(() => {
|
|
1319
|
+
let e = [];
|
|
1320
|
+
return f.showAia && e.push({
|
|
1321
|
+
id: "__aia",
|
|
1322
|
+
label: f.aiaLabel,
|
|
1323
|
+
icon: "pi pi-comments",
|
|
1324
|
+
kind: "aia"
|
|
1325
|
+
}), f.showSupport && e.push({
|
|
1326
|
+
id: "__support",
|
|
1327
|
+
label: f.supportLabel,
|
|
1328
|
+
icon: "pi pi-headphones",
|
|
1329
|
+
kind: "support"
|
|
1330
|
+
}), f.actions.forEach((t) => e.push({
|
|
1331
|
+
...t,
|
|
1332
|
+
kind: "action"
|
|
1333
|
+
})), e;
|
|
1334
|
+
}), Ne = n(() => {
|
|
1335
|
+
let e = [];
|
|
1336
|
+
return f.userMenuItems.forEach((t) => {
|
|
1337
|
+
if (t.separator) {
|
|
1338
|
+
e.length && !e.at(-1)?.separator && e.push(t);
|
|
1339
|
+
return;
|
|
1340
|
+
}
|
|
1341
|
+
e.push(t);
|
|
1342
|
+
}), e.at(-1)?.separator && e.pop(), e;
|
|
1343
|
+
}), X = n(() => !!x["user-menu"] || Ne.value.some((e) => !e.separator)), Pe = n(() => !!f.user || !!x.user), Fe = n(() => !!(x.context || x.scope || x.client || x["context-compact"])), Z = n(() => f.favoriteItems.filter(Boolean)), Ie = n(() => W.value || !oe.value), Le = n(() => Z.value.length > 0 && !Ie.value), Re = n(() => Y.value.length > 0 || f.searchable || Me.value.length > 0 || Pe.value || !!(x["drawer-menu"] || x["drawer-actions"] || x["drawer-footer"])), ze = n(() => f.user ? f.user.initials ? f.user.initials : f.user.name.split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toLocaleUpperCase("pt-BR")).join("") : ""), Be = n(() => Ne.value.map((e) => e.separator ? { separator: !0 } : {
|
|
1344
|
+
label: e.label,
|
|
1345
|
+
icon: e.icon,
|
|
1346
|
+
disabled: e.disabled,
|
|
1347
|
+
command: () => jn(e)
|
|
1348
|
+
})), Ve = n(() => {
|
|
1349
|
+
let e = f.appearance, t = {}, n = (e, n) => {
|
|
1350
|
+
n !== void 0 && n !== "" && (t[e] = n);
|
|
1351
|
+
};
|
|
1352
|
+
return n("--top-nav-bg", e.colors?.navigation), n("--top-nav-breadcrumb-bg", e.surfaces?.breadcrumb ?? e.colors?.navigation), n("--top-nav-drawer-bg", e.surfaces?.drawer ?? e.colors?.navigation), n("--top-nav-drawer-footer-bg", e.surfaces?.drawerFooter), n("--top-nav-fg", e.colors?.text), n("--top-nav-muted-fg", e.colors?.mutedText), n("--top-nav-accent", e.colors?.accent), n("--top-nav-menu-bg", e.surfaces?.menu), n("--top-nav-menu-fg", e.colors?.menuText), n("--top-nav-menu-hover", e.surfaces?.menuHover), n("--top-nav-menu-explored", e.surfaces?.menuExplored), n("--top-nav-border", e.colors?.border), n("--top-nav-menu-border", e.borders?.menu), n("--top-nav-menu-outline", e.borders?.menuOutline), n("--top-nav-radius", e.shape?.radius), n("--top-nav-drawer-radius", e.shape?.drawerRadius), n("--top-nav-shadow", e.shape?.shadow), n("--top-nav-mobile-active-bg", e.surfaces?.mobileActive), n("--top-nav-mobile-active-fg", e.colors?.mobileActiveText), n("--top-nav-mobile-divider", e.borders?.mobileDivider), n("--top-nav-favorites-bg", e.surfaces?.favorites), n("--top-nav-favorites-fg", e.colors?.favoritesText), n("--top-nav-favorites-border", e.borders?.favorites), n("--top-nav-favorites-shadow", e.shape?.favoritesShadow), n("--top-nav-focus-ring", e.focus?.onDark), n("--top-nav-focus-ring-light", e.focus?.onLight), n("--top-nav-current-bg", e.surfaces?.currentPage), n("--top-nav-current-border", e.borders?.currentPage), t;
|
|
1353
|
+
});
|
|
1354
|
+
function He() {
|
|
1355
|
+
let e = Math.max(0, window.scrollY);
|
|
1356
|
+
if (!W.value && e >= En) {
|
|
1357
|
+
W.value = !0;
|
|
1358
|
+
return;
|
|
1359
|
+
}
|
|
1360
|
+
W.value && e <= Dn && (W.value = !1);
|
|
1361
|
+
}
|
|
1362
|
+
function On() {
|
|
1363
|
+
let e = E.value, t = ne.value;
|
|
1364
|
+
!e || !t || (oe.value = t.scrollWidth <= e.clientWidth + 1);
|
|
1365
|
+
}
|
|
1366
|
+
function kn() {
|
|
1367
|
+
fe = window.requestAnimationFrame(() => {
|
|
1368
|
+
fe = window.requestAnimationFrame(() => {
|
|
1369
|
+
se.value = !0;
|
|
1370
|
+
});
|
|
1371
|
+
});
|
|
1372
|
+
}
|
|
1373
|
+
function Q() {
|
|
1374
|
+
return typeof window < "u" && window.matchMedia?.("(hover: hover) and (pointer: fine)").matches;
|
|
1375
|
+
}
|
|
1376
|
+
function $(e) {
|
|
1377
|
+
e.disabled || (h("navigate", e), N.value = !1, Kn());
|
|
1378
|
+
}
|
|
1379
|
+
function An(e, t = !1) {
|
|
1380
|
+
e.disabled || (e.kind === "aia" ? h("toggle-aia") : e.kind === "support" ? h("open-support") : h("action", e), z.value = !1, t && (N.value = !1));
|
|
1381
|
+
}
|
|
1382
|
+
function jn(e, t = !1) {
|
|
1383
|
+
e.disabled || e.separator || (h("user-action", e), B.value = !1, V.value = !1, t && (N.value = !1));
|
|
1384
|
+
}
|
|
1385
|
+
function Mn(e) {
|
|
1386
|
+
if (!X.value) {
|
|
1387
|
+
h("user-click", f.user);
|
|
1388
|
+
return;
|
|
1389
|
+
}
|
|
1390
|
+
ae.value?.toggle(e);
|
|
1391
|
+
}
|
|
1392
|
+
function Nn(e) {
|
|
1393
|
+
G.value = e, h("update:searchValue", e), h("search", e);
|
|
1394
|
+
}
|
|
1395
|
+
function Pn() {
|
|
1396
|
+
Nn(""), p(() => N.value ? M.value?.focus() : j.value?.focus());
|
|
1397
|
+
}
|
|
1398
|
+
function Fn() {
|
|
1399
|
+
Q() && (P.value = !0);
|
|
1400
|
+
}
|
|
1401
|
+
function In() {
|
|
1402
|
+
!Q() || window.innerWidth < 1024 || (P.value = !1, F.value = null, I.value = []);
|
|
1403
|
+
}
|
|
1404
|
+
function Ln() {
|
|
1405
|
+
if (Q()) {
|
|
1406
|
+
P.value = !0;
|
|
1407
|
+
return;
|
|
1408
|
+
}
|
|
1409
|
+
P.value = !P.value, P.value || (F.value = null, I.value = []);
|
|
1410
|
+
}
|
|
1411
|
+
function Rn(e) {
|
|
1412
|
+
Q() && (F.value = e, I.value = []);
|
|
1413
|
+
}
|
|
1414
|
+
function zn(e) {
|
|
1415
|
+
if (Q()) {
|
|
1416
|
+
F.value = e, I.value = [];
|
|
1417
|
+
return;
|
|
1418
|
+
}
|
|
1419
|
+
let t = F.value === e;
|
|
1420
|
+
F.value = t ? null : e, I.value = [];
|
|
1421
|
+
}
|
|
1422
|
+
function Bn(e, t, n, r) {
|
|
1423
|
+
if (r && !Q()) return;
|
|
1424
|
+
let i = e.value[n];
|
|
1425
|
+
if (!t.children?.length) {
|
|
1426
|
+
e.value = e.value.slice(0, n), r || $(t);
|
|
1427
|
+
return;
|
|
1428
|
+
}
|
|
1429
|
+
if (!r && Q()) {
|
|
1430
|
+
e.value = [...e.value.slice(0, n), t.id];
|
|
1431
|
+
return;
|
|
1432
|
+
}
|
|
1433
|
+
e.value = i === t.id && !r ? e.value.slice(0, n) : [...e.value.slice(0, n), t.id];
|
|
1434
|
+
}
|
|
1435
|
+
function Vn(e, t, n) {
|
|
1436
|
+
Bn(I, e, t, n);
|
|
1437
|
+
}
|
|
1438
|
+
function Hn(e, t, n) {
|
|
1439
|
+
Bn(R, e, t, n);
|
|
1440
|
+
}
|
|
1441
|
+
function Un(e) {
|
|
1442
|
+
Q() && (L.value = e, R.value = []);
|
|
1443
|
+
}
|
|
1444
|
+
function Wn() {
|
|
1445
|
+
!Q() || window.innerWidth < 1024 || (L.value = null, R.value = []);
|
|
1446
|
+
}
|
|
1447
|
+
function Gn(e) {
|
|
1448
|
+
if (Q()) {
|
|
1449
|
+
L.value = e;
|
|
1450
|
+
return;
|
|
1451
|
+
}
|
|
1452
|
+
L.value = L.value === e ? null : e, R.value = [];
|
|
1453
|
+
}
|
|
1454
|
+
function Kn() {
|
|
1455
|
+
P.value = !1, F.value = null, I.value = [], L.value = null, R.value = [], z.value = !1, B.value = !1, H.value = !1, K.value = !1;
|
|
1456
|
+
}
|
|
1457
|
+
async function qn() {
|
|
1458
|
+
if (typeof window < "u" && window.innerWidth < 1024) {
|
|
1459
|
+
N.value = !0, await p(), M.value?.focus();
|
|
1460
|
+
return;
|
|
1461
|
+
}
|
|
1462
|
+
q.value = !0, K.value = !0, await p(), j.value?.focus(), Zn();
|
|
1463
|
+
}
|
|
1464
|
+
function Jn() {
|
|
1465
|
+
window.setTimeout(() => {
|
|
1466
|
+
K.value = !1, J.value.searchIconOnly && !G.value.trim() && (q.value = !1, Zn());
|
|
1467
|
+
}, 150);
|
|
1468
|
+
}
|
|
1469
|
+
function Yn() {
|
|
1470
|
+
return Math.round(window.visualViewport?.width ?? window.innerWidth);
|
|
1471
|
+
}
|
|
1472
|
+
async function Xn() {
|
|
1473
|
+
if (typeof window > "u" || !T.value) return;
|
|
1474
|
+
let e = ++pe, t = Yn();
|
|
1475
|
+
ce.value = t < 1024;
|
|
1476
|
+
let n = {
|
|
1477
|
+
collapseActions: !1,
|
|
1478
|
+
searchIconOnly: !1,
|
|
1479
|
+
hideUserName: !1,
|
|
1480
|
+
hideContextDetails: !1
|
|
1481
|
+
};
|
|
1482
|
+
if (t < 1024) {
|
|
1483
|
+
J.value = n, q.value = !1;
|
|
1484
|
+
return;
|
|
1485
|
+
}
|
|
1486
|
+
if (J.value = {
|
|
1487
|
+
collapseActions: t < 1440,
|
|
1488
|
+
searchIconOnly: t < 1320,
|
|
1489
|
+
hideUserName: t < 1180,
|
|
1490
|
+
hideContextDetails: !1
|
|
1491
|
+
}, await p(), e === pe) for (let t of [
|
|
1492
|
+
"collapseActions",
|
|
1493
|
+
"searchIconOnly",
|
|
1494
|
+
"hideUserName",
|
|
1495
|
+
"hideContextDetails"
|
|
1496
|
+
]) {
|
|
1497
|
+
let n = T.value;
|
|
1498
|
+
if (!n || n.scrollWidth <= n.clientWidth + 1) break;
|
|
1499
|
+
if (J.value = {
|
|
1500
|
+
...J.value,
|
|
1501
|
+
[t]: !0
|
|
1502
|
+
}, await p(), e !== pe) return;
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
function Zn() {
|
|
1506
|
+
typeof window > "u" || (de !== void 0 && window.cancelAnimationFrame(de), de = window.requestAnimationFrame(() => {
|
|
1507
|
+
de = void 0, Xn();
|
|
1508
|
+
}));
|
|
1509
|
+
}
|
|
1510
|
+
function Qn(e) {
|
|
1511
|
+
let t = e.target;
|
|
1512
|
+
if (t instanceof Element && !t.closest(".top-nav-bar__mobile-menu")) {
|
|
1513
|
+
if (!S.value?.contains(t)) {
|
|
1514
|
+
Kn();
|
|
1515
|
+
return;
|
|
1516
|
+
}
|
|
1517
|
+
t.closest("[data-top-nav-navigation]") || (P.value = !1, F.value = null, I.value = []), t.closest("[data-top-nav-breadcrumb]") || (L.value = null, R.value = []), t.closest("[data-top-nav-actions]") || (z.value = !1), t.closest("[data-top-nav-user]") || (B.value = !1), t.closest("[data-top-nav-favorites]") || (H.value = !1), t.closest("[data-top-nav-search]") || (K.value = !1);
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
function $n(e) {
|
|
1521
|
+
if ((e.ctrlKey || e.metaKey) && e.key.toLocaleLowerCase() === "k" && f.searchable) {
|
|
1522
|
+
e.preventDefault(), qn();
|
|
1523
|
+
return;
|
|
1524
|
+
}
|
|
1525
|
+
if (e.key === "Escape") {
|
|
1526
|
+
if (V.value) {
|
|
1527
|
+
ae.value?.hide();
|
|
1528
|
+
return;
|
|
1529
|
+
}
|
|
1530
|
+
N.value &&= !1, Kn(), J.value.searchIconOnly && !G.value.trim() && (q.value = !1);
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
function er() {
|
|
1534
|
+
if (!X.value) {
|
|
1535
|
+
h("user-click", f.user);
|
|
1536
|
+
return;
|
|
1537
|
+
}
|
|
1538
|
+
if (Q()) {
|
|
1539
|
+
B.value = !0;
|
|
1540
|
+
return;
|
|
1541
|
+
}
|
|
1542
|
+
B.value = !B.value;
|
|
1543
|
+
}
|
|
1544
|
+
function tr() {
|
|
1545
|
+
if (Q()) {
|
|
1546
|
+
H.value = !0;
|
|
1547
|
+
return;
|
|
1548
|
+
}
|
|
1549
|
+
H.value = !H.value;
|
|
1550
|
+
}
|
|
1551
|
+
return O(() => f.searchValue, (e) => {
|
|
1552
|
+
e !== void 0 && e !== G.value && (G.value = e);
|
|
1553
|
+
}), O(() => f.mobileOpen, (e) => {
|
|
1554
|
+
e !== void 0 && e !== N.value && (N.value = e);
|
|
1555
|
+
}), O(N, (e) => h("update:mobileOpen", e)), O([
|
|
1556
|
+
Y,
|
|
1557
|
+
() => f.user,
|
|
1558
|
+
Me
|
|
1559
|
+
], () => p(Zn), { deep: !0 }), O(Z, () => p(On), { deep: !0 }), te(() => {
|
|
1560
|
+
document.addEventListener("keydown", $n), document.addEventListener("pointerdown", Qn), window.addEventListener("resize", Zn), window.visualViewport?.addEventListener("resize", Zn), window.addEventListener("resize", On), window.addEventListener("scroll", He, { passive: !0 }), typeof ResizeObserver < "u" && (le = new ResizeObserver(Zn), T.value && le.observe(T.value), ue = new ResizeObserver(On), E.value && ue.observe(E.value)), Zn(), p(() => {
|
|
1561
|
+
On(), He(), kn();
|
|
1562
|
+
});
|
|
1563
|
+
}), ee(() => {
|
|
1564
|
+
document.removeEventListener("keydown", $n), document.removeEventListener("pointerdown", Qn), window.removeEventListener("resize", Zn), window.visualViewport?.removeEventListener("resize", Zn), window.removeEventListener("resize", On), window.removeEventListener("scroll", He), le?.disconnect(), ue?.disconnect(), de !== void 0 && window.cancelAnimationFrame(de), fe !== void 0 && window.cancelAnimationFrame(fe);
|
|
1565
|
+
}), u({
|
|
1566
|
+
close: Kn,
|
|
1567
|
+
closeDrawer: () => {
|
|
1568
|
+
N.value = !1;
|
|
1569
|
+
},
|
|
1570
|
+
focusSearch: qn,
|
|
1571
|
+
openDrawer: () => {
|
|
1572
|
+
N.value = !0;
|
|
1573
|
+
}
|
|
1574
|
+
}), (n, u) => (_(), a("nav", {
|
|
1575
|
+
ref_key: "rootRef",
|
|
1576
|
+
ref: S,
|
|
1577
|
+
class: "top-nav-bar top-solutions-component",
|
|
1578
|
+
style: g(Ve.value),
|
|
1579
|
+
"aria-label": "Navegação principal"
|
|
1580
|
+
}, [
|
|
1581
|
+
o("header", {
|
|
1582
|
+
ref_key: "headerRef",
|
|
1583
|
+
ref: T,
|
|
1584
|
+
class: m(["top-nav-bar__header", { "top-nav-bar__header--context-compact": J.value.hideContextDetails }])
|
|
1585
|
+
}, [
|
|
1586
|
+
Re.value ? (_(), a("button", {
|
|
1587
|
+
key: 0,
|
|
1588
|
+
class: "top-nav-bar__mobile-trigger top-nav-bar__square-button",
|
|
1589
|
+
type: "button",
|
|
1590
|
+
"aria-label": "Abrir navegação",
|
|
1591
|
+
"aria-expanded": N.value,
|
|
1592
|
+
onClick: u[0] ||= (e) => N.value = !N.value
|
|
1593
|
+
}, [...u[19] ||= [o("i", {
|
|
1594
|
+
class: "pi pi-bars",
|
|
1595
|
+
"aria-hidden": "true"
|
|
1596
|
+
}, null, -1)]], 8, We)) : i("", !0),
|
|
1597
|
+
o("div", Ge, [b(n.$slots, "brand", { compact: J.value.hideContextDetails })]),
|
|
1598
|
+
Fe.value ? (_(), a("div", Ke, [J.value.hideContextDetails && n.$slots["context-compact"] ? b(n.$slots, "context-compact", {}, void 0, void 0, 0) : n.$slots.context ? b(n.$slots, "context", { compact: J.value.hideContextDetails }, void 0, void 0, 1) : n.$slots.scope ? b(n.$slots, "scope", { compact: J.value.hideContextDetails }, void 0, void 0, 2) : b(n.$slots, "client", { compact: J.value.hideContextDetails }, void 0, void 0, 3)])) : i("", !0),
|
|
1599
|
+
u[24] ||= o("div", {
|
|
1600
|
+
class: "top-nav-bar__spacer",
|
|
1601
|
+
"aria-hidden": "true"
|
|
1602
|
+
}, null, -1),
|
|
1603
|
+
o("div", qe, [
|
|
1604
|
+
s.searchable ? (_(), a("div", Je, [J.value.searchIconOnly && !q.value ? (_(), a("button", {
|
|
1605
|
+
key: 0,
|
|
1606
|
+
class: "top-nav-bar__square-button",
|
|
1607
|
+
type: "button",
|
|
1608
|
+
"aria-label": "Pesquisar no menu",
|
|
1609
|
+
title: "Pesquisar no menu (Ctrl+K)",
|
|
1610
|
+
onClick: qn
|
|
1611
|
+
}, [...u[20] ||= [o("i", {
|
|
1612
|
+
class: "pi pi-search",
|
|
1613
|
+
"aria-hidden": "true"
|
|
1614
|
+
}, null, -1)]])) : (_(), a("div", {
|
|
1615
|
+
key: 1,
|
|
1616
|
+
class: m(["top-nav-bar__search", { "top-nav-bar__search--expanded": q.value }])
|
|
1617
|
+
}, [
|
|
1618
|
+
u[22] ||= o("i", {
|
|
1619
|
+
class: "pi pi-search",
|
|
1620
|
+
"aria-hidden": "true"
|
|
1621
|
+
}, null, -1),
|
|
1622
|
+
o("input", {
|
|
1623
|
+
ref_key: "searchInputRef",
|
|
1624
|
+
ref: j,
|
|
1625
|
+
value: G.value,
|
|
1626
|
+
type: "text",
|
|
1627
|
+
role: "searchbox",
|
|
1628
|
+
placeholder: s.searchPlaceholder,
|
|
1629
|
+
"aria-label": "Pesquisar no menu",
|
|
1630
|
+
onFocus: u[1] ||= (e) => K.value = !0,
|
|
1631
|
+
onBlur: Jn,
|
|
1632
|
+
onInput: u[2] ||= (e) => Nn(e.target.value)
|
|
1633
|
+
}, null, 40, Ye),
|
|
1634
|
+
G.value || J.value.searchIconOnly && q.value ? (_(), a("button", {
|
|
1635
|
+
key: 0,
|
|
1636
|
+
class: "top-nav-bar__search-clear",
|
|
1637
|
+
type: "button",
|
|
1638
|
+
"aria-label": G.value ? "Limpar pesquisa" : "Fechar pesquisa",
|
|
1639
|
+
onMousedown: u[3] ||= A(() => {}, ["prevent"]),
|
|
1640
|
+
onClick: u[4] ||= (e) => G.value ? Pn() : q.value = !1
|
|
1641
|
+
}, [...u[21] ||= [o("i", {
|
|
1642
|
+
class: "pi pi-times",
|
|
1643
|
+
"aria-hidden": "true"
|
|
1644
|
+
}, null, -1)]], 40, Xe)) : i("", !0),
|
|
1645
|
+
K.value ? (_(), a("div", Ze, [o("div", Qe, [b(n.$slots, "search-results", {
|
|
1646
|
+
items: ye.value,
|
|
1647
|
+
select: $
|
|
1648
|
+
}, () => [(_(!0), a(e, null, y(ye.value, (e) => (_(), a("button", {
|
|
1649
|
+
key: e.id,
|
|
1650
|
+
class: "top-nav-bar__menu-item",
|
|
1651
|
+
type: "button",
|
|
1652
|
+
role: "menuitem",
|
|
1653
|
+
disabled: e.disabled,
|
|
1654
|
+
onMousedown: u[5] ||= A(() => {}, ["prevent"]),
|
|
1655
|
+
onClick: (t) => $(e)
|
|
1656
|
+
}, [e.icon ? (_(), a("i", {
|
|
1657
|
+
key: 0,
|
|
1658
|
+
class: m(e.icon),
|
|
1659
|
+
"aria-hidden": "true"
|
|
1660
|
+
}, null, 2)) : i("", !0), o("span", null, C(e.label), 1)], 40, $e))), 128)), ye.value.length ? i("", !0) : (_(), a("span", et, "Nenhum item encontrado."))])])])) : i("", !0)
|
|
1661
|
+
], 2))])) : i("", !0),
|
|
1662
|
+
Me.value.length ? (_(), a("div", tt, [J.value.collapseActions ? (_(), a(e, { key: 1 }, [o("button", {
|
|
1663
|
+
class: "top-nav-bar__square-button",
|
|
1664
|
+
type: "button",
|
|
1665
|
+
"aria-label": "Mais ações",
|
|
1666
|
+
"aria-expanded": z.value,
|
|
1667
|
+
onClick: u[6] ||= (e) => z.value = !z.value
|
|
1668
|
+
}, [...u[23] ||= [o("i", {
|
|
1669
|
+
class: "pi pi-ellipsis-h",
|
|
1670
|
+
"aria-hidden": "true"
|
|
1671
|
+
}, null, -1)]], 8, rt), z.value ? (_(), a("div", it, [o("div", at, [(_(!0), a(e, null, y(Me.value, (e) => (_(), a("button", {
|
|
1672
|
+
key: e.id,
|
|
1673
|
+
class: "top-nav-bar__menu-item",
|
|
1674
|
+
type: "button",
|
|
1675
|
+
role: "menuitem",
|
|
1676
|
+
disabled: e.disabled,
|
|
1677
|
+
onClick: (t) => An(e)
|
|
1678
|
+
}, [o("i", {
|
|
1679
|
+
class: m(e.icon),
|
|
1680
|
+
"aria-hidden": "true"
|
|
1681
|
+
}, null, 2), o("span", null, C(e.label), 1)], 8, ot))), 128))])])) : i("", !0)], 64)) : (_(!0), a(e, { key: 0 }, y(Me.value, (e) => (_(), a("button", {
|
|
1682
|
+
key: e.id,
|
|
1683
|
+
class: m(["top-nav-bar__square-button", { "top-nav-bar__square-button--active": e.kind === "aia" && s.aiaActive }]),
|
|
1684
|
+
type: "button",
|
|
1685
|
+
disabled: e.disabled,
|
|
1686
|
+
"aria-label": e.label,
|
|
1687
|
+
"aria-pressed": e.kind === "aia" ? s.aiaActive : void 0,
|
|
1688
|
+
title: e.label,
|
|
1689
|
+
onClick: (t) => An(e)
|
|
1690
|
+
}, [e.kind === "aia" ? b(n.$slots, "aia-icon", {}, () => [o("i", {
|
|
1691
|
+
class: m(e.icon),
|
|
1692
|
+
"aria-hidden": "true"
|
|
1693
|
+
}, null, 2)], void 0, 0) : e.kind === "support" ? b(n.$slots, "support-icon", {}, () => [o("i", {
|
|
1694
|
+
class: m(e.icon),
|
|
1695
|
+
"aria-hidden": "true"
|
|
1696
|
+
}, null, 2)], void 0, 1) : (_(), a("i", {
|
|
1697
|
+
key: 2,
|
|
1698
|
+
class: m(e.icon),
|
|
1699
|
+
"aria-hidden": "true"
|
|
1700
|
+
}, null, 2))], 10, nt))), 128))])) : i("", !0),
|
|
1701
|
+
n.$slots.actions ? (_(), a("div", st, [b(n.$slots, "actions", {
|
|
1702
|
+
compact: J.value.collapseActions,
|
|
1703
|
+
close: Kn
|
|
1704
|
+
})])) : i("", !0),
|
|
1705
|
+
Pe.value ? (_(), a("div", {
|
|
1706
|
+
key: 3,
|
|
1707
|
+
class: "top-nav-bar__user-menu",
|
|
1708
|
+
"data-top-nav-user": "",
|
|
1709
|
+
onMouseenter: u[7] ||= (e) => X.value && Q() && (B.value = !0),
|
|
1710
|
+
onMouseleave: u[8] ||= (e) => Q() && (B.value = !1)
|
|
1711
|
+
}, [o("button", {
|
|
1712
|
+
class: "top-nav-bar__user-trigger",
|
|
1713
|
+
type: "button",
|
|
1714
|
+
"aria-haspopup": X.value ? "menu" : void 0,
|
|
1715
|
+
"aria-expanded": X.value ? B.value : void 0,
|
|
1716
|
+
onClick: er
|
|
1717
|
+
}, [b(n.$slots, "user", {
|
|
1718
|
+
user: s.user,
|
|
1719
|
+
compact: J.value.hideUserName
|
|
1720
|
+
}, () => [s.user?.avatarUrl ? (_(), a("img", {
|
|
1721
|
+
key: 0,
|
|
1722
|
+
src: s.user.avatarUrl,
|
|
1723
|
+
alt: "",
|
|
1724
|
+
class: "top-nav-bar__user-avatar"
|
|
1725
|
+
}, null, 8, lt)) : (_(), a("span", ut, C(ze.value), 1)), s.user && !J.value.hideUserName ? (_(), a("span", dt, [o("span", ft, C(s.user.name), 1), s.user.subtitle ? (_(), a("span", pt, C(s.user.subtitle), 1)) : i("", !0)])) : i("", !0)]), X.value ? (_(), a("i", mt)) : i("", !0)], 8, ct), X.value && B.value ? (_(), a("div", ht, [o("div", gt, [b(n.$slots, "user-menu", {
|
|
1726
|
+
items: Ne.value,
|
|
1727
|
+
select: jn
|
|
1728
|
+
}, () => [(_(!0), a(e, null, y(Ne.value, (t) => (_(), a(e, { key: t.id }, [t.separator ? (_(), a("div", _t)) : (_(), a("button", {
|
|
1729
|
+
key: 1,
|
|
1730
|
+
class: "top-nav-bar__menu-item",
|
|
1731
|
+
type: "button",
|
|
1732
|
+
role: "menuitem",
|
|
1733
|
+
disabled: t.disabled,
|
|
1734
|
+
onClick: (e) => jn(t)
|
|
1735
|
+
}, [t.icon ? (_(), a("i", {
|
|
1736
|
+
key: 0,
|
|
1737
|
+
class: m(t.icon),
|
|
1738
|
+
"aria-hidden": "true"
|
|
1739
|
+
}, null, 2)) : i("", !0), o("span", null, C(t.label), 1)], 8, vt))], 64))), 128))])])])) : i("", !0)], 32)) : i("", !0)
|
|
1740
|
+
])
|
|
1741
|
+
], 2),
|
|
1742
|
+
o("div", yt, [
|
|
1743
|
+
o("button", {
|
|
1744
|
+
class: "top-nav-bar__crumb",
|
|
1745
|
+
type: "button",
|
|
1746
|
+
onClick: u[9] ||= (e) => $(s.homeItem)
|
|
1747
|
+
}, [l(w(be), { icon: w(he) }, null, 8, ["icon"]), o("span", null, C(s.homeItem.label), 1)]),
|
|
1748
|
+
Y.value.length ? (_(), a("span", bt, "/")) : i("", !0),
|
|
1749
|
+
Y.value.length ? (_(), a("div", {
|
|
1750
|
+
key: 1,
|
|
1751
|
+
class: "top-nav-bar__dropdown top-nav-bar__desktop-navigation",
|
|
1752
|
+
"data-top-nav-navigation": "",
|
|
1753
|
+
onMouseenter: Fn,
|
|
1754
|
+
onMouseleave: In
|
|
1755
|
+
}, [o("button", {
|
|
1756
|
+
class: "top-nav-bar__crumb",
|
|
1757
|
+
type: "button",
|
|
1758
|
+
"aria-haspopup": "menu",
|
|
1759
|
+
"aria-expanded": P.value,
|
|
1760
|
+
onClick: Ln
|
|
1761
|
+
}, [
|
|
1762
|
+
u[25] ||= o("i", {
|
|
1763
|
+
class: "pi pi-bars",
|
|
1764
|
+
"aria-hidden": "true"
|
|
1765
|
+
}, null, -1),
|
|
1766
|
+
o("span", null, C(s.navigationLabel), 1),
|
|
1767
|
+
u[26] ||= o("i", {
|
|
1768
|
+
class: "pi pi-chevron-down top-nav-bar__chevron",
|
|
1769
|
+
"aria-hidden": "true"
|
|
1770
|
+
}, null, -1)
|
|
1771
|
+
], 8, xt), P.value ? (_(), a("div", St, [o("div", Ct, [o("div", wt, [(_(!0), a(e, null, y(Y.value, (e) => (_(), a("button", {
|
|
1772
|
+
key: e.id,
|
|
1773
|
+
class: m(["top-nav-bar__menu-item", { "top-nav-bar__menu-item--explored": F.value === e.id }]),
|
|
1774
|
+
type: "button",
|
|
1775
|
+
role: "menuitem",
|
|
1776
|
+
"aria-haspopup": "menu",
|
|
1777
|
+
"aria-expanded": F.value === e.id,
|
|
1778
|
+
onMouseenter: (t) => Rn(e.id),
|
|
1779
|
+
onClick: (t) => zn(e.id)
|
|
1780
|
+
}, [
|
|
1781
|
+
e.icon ? (_(), a("i", {
|
|
1782
|
+
key: 0,
|
|
1783
|
+
class: m(e.icon),
|
|
1784
|
+
"aria-hidden": "true"
|
|
1785
|
+
}, null, 2)) : i("", !0),
|
|
1786
|
+
o("span", Et, C(e.label), 1),
|
|
1787
|
+
o("span", Dt, C(e.children.length), 1),
|
|
1788
|
+
u[27] ||= o("i", {
|
|
1789
|
+
class: "pi pi-chevron-right top-nav-bar__menu-arrow",
|
|
1790
|
+
"aria-hidden": "true"
|
|
1791
|
+
}, null, -1)
|
|
1792
|
+
], 42, Tt))), 128))]), Oe.value ? (_(), a("div", Ot, [(_(!0), a(e, null, y(Ae.value, (t, n) => (_(), a("div", {
|
|
1793
|
+
key: `navigation-level-${n}`,
|
|
1794
|
+
class: m(["top-nav-bar__cascade-level", { "top-nav-bar__section-items": n === 0 }]),
|
|
1795
|
+
role: "menu"
|
|
1796
|
+
}, [(_(!0), a(e, null, y(je(t), (t, r) => (_(), a("div", {
|
|
1797
|
+
key: `navigation-${n}-${r}`,
|
|
1798
|
+
class: "top-nav-bar__menu-column"
|
|
1799
|
+
}, [(_(!0), a(e, null, y(t, (e) => (_(), a("button", {
|
|
1800
|
+
key: e.id,
|
|
1801
|
+
class: m(["top-nav-bar__menu-item", { "top-nav-bar__menu-item--explored": I.value[n] === e.id }]),
|
|
1802
|
+
type: "button",
|
|
1803
|
+
role: "menuitem",
|
|
1804
|
+
disabled: e.disabled,
|
|
1805
|
+
"aria-haspopup": e.children?.length ? "menu" : void 0,
|
|
1806
|
+
"aria-expanded": e.children?.length ? I.value[n] === e.id : void 0,
|
|
1807
|
+
onMouseenter: (t) => Vn(e, n, !0),
|
|
1808
|
+
onClick: (t) => Vn(e, n, !1)
|
|
1809
|
+
}, [
|
|
1810
|
+
e.icon ? (_(), a("i", {
|
|
1811
|
+
key: 0,
|
|
1812
|
+
class: m(e.icon),
|
|
1813
|
+
"aria-hidden": "true"
|
|
1814
|
+
}, null, 2)) : i("", !0),
|
|
1815
|
+
o("span", At, C(e.label), 1),
|
|
1816
|
+
e.children?.length ? (_(), a("i", jt)) : i("", !0)
|
|
1817
|
+
], 42, kt))), 128))]))), 128))], 2))), 128))])) : i("", !0)])])) : i("", !0)], 32)) : i("", !0),
|
|
1818
|
+
(_(!0), a(e, null, y(Ee.value, (t, n) => (_(), a(e, { key: t.id }, [o("span", {
|
|
1819
|
+
class: m(["top-nav-bar__separator", { "top-nav-bar__separator--current": !t.to && n === Ee.value.length - 1 }]),
|
|
1820
|
+
"aria-hidden": "true"
|
|
1821
|
+
}, "/", 2), De(t)?.children?.length ? (_(), a("div", {
|
|
1822
|
+
key: 0,
|
|
1823
|
+
class: "top-nav-bar__dropdown top-nav-bar__breadcrumb-dropdown",
|
|
1824
|
+
"data-top-nav-breadcrumb": "",
|
|
1825
|
+
onMouseenter: (e) => !ce.value && Un(t.id),
|
|
1826
|
+
onMouseleave: u[10] ||= (e) => !ce.value && Wn()
|
|
1827
|
+
}, [ce.value ? (_(), a("span", Nt, C(t.label), 1)) : (_(), a("button", {
|
|
1828
|
+
key: 1,
|
|
1829
|
+
class: "top-nav-bar__crumb",
|
|
1830
|
+
type: "button",
|
|
1831
|
+
"aria-haspopup": "menu",
|
|
1832
|
+
"aria-expanded": L.value === t.id,
|
|
1833
|
+
onClick: (e) => Gn(t.id)
|
|
1834
|
+
}, [o("span", null, C(t.label), 1), u[28] ||= o("i", {
|
|
1835
|
+
class: "pi pi-chevron-down top-nav-bar__chevron",
|
|
1836
|
+
"aria-hidden": "true"
|
|
1837
|
+
}, null, -1)], 8, Pt)), !ce.value && L.value === t.id ? (_(), a("div", Ft, [o("div", It, [(_(!0), a(e, null, y(ke(De(t)?.children ?? [], R.value), (n, r) => (_(), a("div", {
|
|
1838
|
+
key: `breadcrumb-${t.id}-${r}`,
|
|
1839
|
+
class: m(["top-nav-bar__cascade-level", { "top-nav-bar__breadcrumb-main-items": r === 0 }])
|
|
1840
|
+
}, [(_(!0), a(e, null, y(je(n), (n, s) => (_(), a("div", {
|
|
1841
|
+
key: `breadcrumb-${t.id}-${r}-${s}`,
|
|
1842
|
+
class: "top-nav-bar__menu-column"
|
|
1843
|
+
}, [(_(!0), a(e, null, y(n, (e) => (_(), a("button", {
|
|
1844
|
+
key: e.id,
|
|
1845
|
+
class: m(["top-nav-bar__menu-item", { "top-nav-bar__menu-item--explored": R.value[r] === e.id }]),
|
|
1846
|
+
type: "button",
|
|
1847
|
+
role: "menuitem",
|
|
1848
|
+
disabled: e.disabled,
|
|
1849
|
+
onMouseenter: (t) => Hn(e, r, !0),
|
|
1850
|
+
onClick: (t) => Hn(e, r, !1)
|
|
1851
|
+
}, [
|
|
1852
|
+
e.icon ? (_(), a("i", {
|
|
1853
|
+
key: 0,
|
|
1854
|
+
class: m(e.icon),
|
|
1855
|
+
"aria-hidden": "true"
|
|
1856
|
+
}, null, 2)) : i("", !0),
|
|
1857
|
+
o("span", Rt, C(e.label), 1),
|
|
1858
|
+
e.children?.length ? (_(), a("i", zt)) : i("", !0)
|
|
1859
|
+
], 42, Lt))), 128))]))), 128))], 2))), 128))])])) : i("", !0)], 40, Mt)) : t.to ? (_(), a("button", {
|
|
1860
|
+
key: 1,
|
|
1861
|
+
class: "top-nav-bar__crumb",
|
|
1862
|
+
type: "button",
|
|
1863
|
+
onClick: (e) => $(t)
|
|
1864
|
+
}, C(t.label), 9, Bt)) : (_(), a("span", {
|
|
1865
|
+
key: 2,
|
|
1866
|
+
class: "top-nav-bar__current",
|
|
1867
|
+
title: t.label
|
|
1868
|
+
}, [o("span", Ht, C(t.label), 1), s.showFavoriteToggle ? (_(), a("button", {
|
|
1869
|
+
key: 0,
|
|
1870
|
+
class: "top-nav-bar__favorite-toggle",
|
|
1871
|
+
type: "button",
|
|
1872
|
+
"aria-label": s.favoriteActive ? "Remover dos favoritos" : "Adicionar aos favoritos",
|
|
1873
|
+
"aria-pressed": s.favoriteActive,
|
|
1874
|
+
onClick: u[11] ||= A((e) => h("toggle-favorite"), ["stop"])
|
|
1875
|
+
}, [o("i", {
|
|
1876
|
+
class: m(s.favoriteActive ? "pi pi-star-fill" : "pi pi-star"),
|
|
1877
|
+
"aria-hidden": "true"
|
|
1878
|
+
}, null, 2)], 8, Ut)) : i("", !0)], 8, Vt))], 64))), 128)),
|
|
1879
|
+
o("div", Wt, [l(t, {
|
|
1880
|
+
name: "top-nav-bar-favorites-trigger",
|
|
1881
|
+
css: se.value
|
|
1882
|
+
}, {
|
|
1883
|
+
default: k(() => [Ie.value && Z.value.length ? (_(), a("div", {
|
|
1884
|
+
key: 0,
|
|
1885
|
+
class: "top-nav-bar__favorites-menu top-nav-bar__desktop-only",
|
|
1886
|
+
"data-top-nav-favorites": "",
|
|
1887
|
+
onMouseenter: u[12] ||= (e) => Q() && (H.value = !0),
|
|
1888
|
+
onMouseleave: u[13] ||= (e) => Q() && (H.value = !1)
|
|
1889
|
+
}, [o("button", {
|
|
1890
|
+
class: "top-nav-bar__crumb",
|
|
1891
|
+
type: "button",
|
|
1892
|
+
"aria-haspopup": "menu",
|
|
1893
|
+
"aria-expanded": H.value,
|
|
1894
|
+
onClick: tr
|
|
1895
|
+
}, [
|
|
1896
|
+
u[29] ||= o("i", {
|
|
1897
|
+
class: "pi pi-star-fill top-nav-bar__accent",
|
|
1898
|
+
"aria-hidden": "true"
|
|
1899
|
+
}, null, -1),
|
|
1900
|
+
o("span", null, C(s.favoriteLabel), 1),
|
|
1901
|
+
u[30] ||= o("i", {
|
|
1902
|
+
class: "pi pi-chevron-down top-nav-bar__chevron",
|
|
1903
|
+
"aria-hidden": "true"
|
|
1904
|
+
}, null, -1)
|
|
1905
|
+
], 8, Gt), H.value ? (_(), a("div", Kt, [o("div", qt, [(_(!0), a(e, null, y(Z.value, (e) => (_(), a("button", {
|
|
1906
|
+
key: e.id,
|
|
1907
|
+
class: "top-nav-bar__menu-item",
|
|
1908
|
+
type: "button",
|
|
1909
|
+
role: "menuitem",
|
|
1910
|
+
disabled: e.disabled,
|
|
1911
|
+
onClick: (t) => $(e)
|
|
1912
|
+
}, [e.icon ? (_(), a("i", {
|
|
1913
|
+
key: 0,
|
|
1914
|
+
class: m(e.icon),
|
|
1915
|
+
"aria-hidden": "true"
|
|
1916
|
+
}, null, 2)) : i("", !0), o("span", null, C(e.label), 1)], 8, Jt))), 128))])])) : i("", !0)], 32)) : i("", !0)]),
|
|
1917
|
+
_: 1
|
|
1918
|
+
}, 8, ["css"]), b(n.$slots, "breadcrumb-actions")])
|
|
1919
|
+
]),
|
|
1920
|
+
o("div", {
|
|
1921
|
+
ref_key: "favoritesMeasureContainerRef",
|
|
1922
|
+
ref: E,
|
|
1923
|
+
class: "top-nav-bar__favorites-measure",
|
|
1924
|
+
"aria-hidden": "true"
|
|
1925
|
+
}, [o("div", {
|
|
1926
|
+
ref_key: "favoritesMeasureContentRef",
|
|
1927
|
+
ref: ne,
|
|
1928
|
+
class: "top-nav-bar__favorites-measure-content"
|
|
1929
|
+
}, [o("span", Yt, [u[31] ||= o("i", {
|
|
1930
|
+
class: "pi pi-star-fill top-nav-bar__favorites-icon",
|
|
1931
|
+
"aria-hidden": "true"
|
|
1932
|
+
}, null, -1), o("span", null, C(s.favoriteLabel), 1)]), (_(!0), a(e, null, y(Z.value, (e, t) => (_(), a("span", {
|
|
1933
|
+
key: `measure-${e.id}`,
|
|
1934
|
+
class: "top-nav-bar__favorites-measure-item"
|
|
1935
|
+
}, [t > 0 ? (_(), a("span", Xt, "|")) : i("", !0), o("span", null, [e.icon ? (_(), a("i", {
|
|
1936
|
+
key: 0,
|
|
1937
|
+
class: m(e.icon),
|
|
1938
|
+
"aria-hidden": "true"
|
|
1939
|
+
}, null, 2)) : i("", !0), c(" " + C(e.label), 1)])]))), 128))], 512)], 512),
|
|
1940
|
+
l(t, {
|
|
1941
|
+
name: "top-nav-bar-favorites-row",
|
|
1942
|
+
css: se.value
|
|
1943
|
+
}, {
|
|
1944
|
+
default: k(() => [Le.value ? (_(), a("div", Zt, [o("span", Qt, [u[32] ||= o("i", {
|
|
1945
|
+
class: "pi pi-star-fill top-nav-bar__favorites-icon",
|
|
1946
|
+
"aria-hidden": "true"
|
|
1947
|
+
}, null, -1), o("span", null, C(s.favoriteLabel), 1)]), o("div", $t, [(_(!0), a(e, null, y(Z.value, (t, n) => (_(), a(e, { key: `row-${t.id}` }, [n > 0 ? (_(), a("span", en, "|")) : i("", !0), o("button", {
|
|
1948
|
+
class: "top-nav-bar__favorites-row-item",
|
|
1949
|
+
type: "button",
|
|
1950
|
+
disabled: t.disabled,
|
|
1951
|
+
onClick: (e) => $(t)
|
|
1952
|
+
}, [t.icon ? (_(), a("i", {
|
|
1953
|
+
key: 0,
|
|
1954
|
+
class: m(t.icon),
|
|
1955
|
+
"aria-hidden": "true"
|
|
1956
|
+
}, null, 2)) : i("", !0), o("span", null, C(t.label), 1)], 8, tn)], 64))), 128))])])) : i("", !0)]),
|
|
1957
|
+
_: 1
|
|
1958
|
+
}, 8, ["css"]),
|
|
1959
|
+
l(w(re), {
|
|
1960
|
+
visible: N.value,
|
|
1961
|
+
"onUpdate:visible": u[16] ||= (e) => N.value = e,
|
|
1962
|
+
position: "left",
|
|
1963
|
+
class: "top-nav-bar__mobile-drawer",
|
|
1964
|
+
style: g([Ve.value, { width: "var(--top-nav-drawer-width, min(22rem, calc(100vw - 1.5rem)))" }])
|
|
1965
|
+
}, {
|
|
1966
|
+
container: k(({ closeCallback: c }) => [o("div", nn, [
|
|
1967
|
+
o("header", rn, [b(n.$slots, "drawer-header", { close: c }, () => [o("div", an, [b(n.$slots, "drawer-brand", {}, () => [b(n.$slots, "brand", { compact: !1 })])]), o("button", {
|
|
1968
|
+
class: "top-nav-bar__drawer-close top-nav-bar__square-button",
|
|
1969
|
+
type: "button",
|
|
1970
|
+
"aria-label": "Fechar navegação",
|
|
1971
|
+
onClick: c
|
|
1972
|
+
}, [...u[33] ||= [o("i", {
|
|
1973
|
+
class: "pi pi-times",
|
|
1974
|
+
"aria-hidden": "true"
|
|
1975
|
+
}, null, -1)]], 8, on)])]),
|
|
1976
|
+
s.searchable || Me.value.length || n.$slots["drawer-actions"] ? (_(), a("div", sn, [s.searchable ? b(n.$slots, "drawer-search", {
|
|
1977
|
+
query: G.value,
|
|
1978
|
+
update: Nn,
|
|
1979
|
+
clear: Pn
|
|
1980
|
+
}, () => [o("div", cn, [
|
|
1981
|
+
u[35] ||= o("i", {
|
|
1982
|
+
class: "pi pi-search",
|
|
1983
|
+
"aria-hidden": "true"
|
|
1984
|
+
}, null, -1),
|
|
1985
|
+
o("input", {
|
|
1986
|
+
ref_key: "mobileSearchInputRef",
|
|
1987
|
+
ref: M,
|
|
1988
|
+
value: G.value,
|
|
1989
|
+
type: "text",
|
|
1990
|
+
role: "searchbox",
|
|
1991
|
+
placeholder: s.searchPlaceholder,
|
|
1992
|
+
"aria-label": "Pesquisar no menu",
|
|
1993
|
+
onInput: u[14] ||= (e) => Nn(e.target.value)
|
|
1994
|
+
}, null, 40, ln),
|
|
1995
|
+
G.value ? (_(), a("button", {
|
|
1996
|
+
key: 0,
|
|
1997
|
+
class: "top-nav-bar__search-clear",
|
|
1998
|
+
type: "button",
|
|
1999
|
+
"aria-label": "Limpar pesquisa",
|
|
2000
|
+
onClick: Pn
|
|
2001
|
+
}, [...u[34] ||= [o("i", {
|
|
2002
|
+
class: "pi pi-times",
|
|
2003
|
+
"aria-hidden": "true"
|
|
2004
|
+
}, null, -1)]])) : i("", !0)
|
|
2005
|
+
])], void 0, 0) : i("", !0), b(n.$slots, "drawer-actions", {
|
|
2006
|
+
actions: Me.value,
|
|
2007
|
+
select: (e) => An(e, !0),
|
|
2008
|
+
close: c
|
|
2009
|
+
}, () => [(_(!0), a(e, null, y(Me.value, (e) => (_(), a("button", {
|
|
2010
|
+
key: `drawer-${e.id}`,
|
|
2011
|
+
class: m(["top-nav-bar__drawer-action", { "top-nav-bar__drawer-action--active": e.kind === "aia" && s.aiaActive }]),
|
|
2012
|
+
type: "button",
|
|
2013
|
+
disabled: e.disabled,
|
|
2014
|
+
onClick: (t) => An(e, !0)
|
|
2015
|
+
}, [o("i", {
|
|
2016
|
+
class: m(e.icon),
|
|
2017
|
+
"aria-hidden": "true"
|
|
2018
|
+
}, null, 2), o("span", null, C(e.label), 1)], 10, un))), 128))])])) : i("", !0),
|
|
2019
|
+
o("div", dn, [
|
|
2020
|
+
b(n.$slots, "drawer-before-menu", { close: c }),
|
|
2021
|
+
o("div", fn, [Z.value.length ? (_(), a("section", pn, [o("button", {
|
|
2022
|
+
class: "top-nav-bar__mobile-item",
|
|
2023
|
+
type: "button",
|
|
2024
|
+
"aria-expanded": U.value,
|
|
2025
|
+
onClick: u[15] ||= (e) => U.value = !U.value
|
|
2026
|
+
}, [
|
|
2027
|
+
u[36] ||= o("i", {
|
|
2028
|
+
class: "pi pi-star-fill top-nav-bar__accent",
|
|
2029
|
+
"aria-hidden": "true"
|
|
2030
|
+
}, null, -1),
|
|
2031
|
+
o("span", hn, C(s.favoriteLabel), 1),
|
|
2032
|
+
o("span", gn, C(Z.value.length), 1),
|
|
2033
|
+
o("i", {
|
|
2034
|
+
class: m(["pi pi-chevron-down top-nav-bar__mobile-chevron", { "top-nav-bar__mobile-chevron--open": U.value }]),
|
|
2035
|
+
"aria-hidden": "true"
|
|
2036
|
+
}, null, 2)
|
|
2037
|
+
], 8, mn), l(t, { name: "top-nav-bar-menu-expand" }, {
|
|
2038
|
+
default: k(() => [U.value ? (_(), r(Ue, {
|
|
2039
|
+
key: 0,
|
|
2040
|
+
items: Z.value,
|
|
2041
|
+
"active-item-id": s.activeItemId,
|
|
2042
|
+
level: 1,
|
|
2043
|
+
onSelect: $
|
|
2044
|
+
}, null, 8, ["items", "active-item-id"])) : i("", !0)]),
|
|
2045
|
+
_: 1
|
|
2046
|
+
})])) : i("", !0), b(n.$slots, "drawer-menu", {
|
|
2047
|
+
sections: Se.value,
|
|
2048
|
+
select: $,
|
|
2049
|
+
close: c
|
|
2050
|
+
}, () => [Se.value.length ? (_(), r(Ue, {
|
|
2051
|
+
key: 0,
|
|
2052
|
+
items: Se.value,
|
|
2053
|
+
"active-item-id": s.activeItemId,
|
|
2054
|
+
"force-open": !!G.value.trim(),
|
|
2055
|
+
"show-section-dividers": "",
|
|
2056
|
+
onSelect: $
|
|
2057
|
+
}, null, 8, [
|
|
2058
|
+
"items",
|
|
2059
|
+
"active-item-id",
|
|
2060
|
+
"force-open"
|
|
2061
|
+
])) : (_(), a("div", _n, "Nenhum menu encontrado."))])]),
|
|
2062
|
+
b(n.$slots, "drawer-after-menu", { close: c })
|
|
2063
|
+
]),
|
|
2064
|
+
Pe.value || n.$slots["drawer-footer"] ? (_(), a("footer", vn, [Pe.value ? b(n.$slots, "drawer-user", {
|
|
2065
|
+
user: s.user,
|
|
2066
|
+
open: V.value,
|
|
2067
|
+
toggle: () => V.value = !V.value
|
|
2068
|
+
}, () => [o("button", {
|
|
2069
|
+
class: "top-nav-bar__drawer-user",
|
|
2070
|
+
type: "button",
|
|
2071
|
+
"aria-haspopup": X.value ? "menu" : void 0,
|
|
2072
|
+
"aria-expanded": X.value ? V.value : void 0,
|
|
2073
|
+
onClick: Mn
|
|
2074
|
+
}, [
|
|
2075
|
+
s.user?.avatarUrl ? (_(), a("img", {
|
|
2076
|
+
key: 0,
|
|
2077
|
+
src: s.user.avatarUrl,
|
|
2078
|
+
alt: "",
|
|
2079
|
+
class: "top-nav-bar__user-avatar"
|
|
2080
|
+
}, null, 8, bn)) : (_(), a("span", xn, C(ze.value), 1)),
|
|
2081
|
+
s.user ? (_(), a("span", Sn, [o("span", Cn, C(s.user.name), 1), s.user.subtitle ? (_(), a("span", wn, C(s.user.subtitle), 1)) : i("", !0)])) : i("", !0),
|
|
2082
|
+
X.value ? (_(), a("i", Tn)) : i("", !0)
|
|
2083
|
+
], 8, yn)], void 0, 0) : i("", !0), b(n.$slots, "drawer-footer", { close: c })])) : i("", !0)
|
|
2084
|
+
])]),
|
|
2085
|
+
_: 3
|
|
2086
|
+
}, 8, ["visible", "style"]),
|
|
2087
|
+
l(w(ie), {
|
|
2088
|
+
ref_key: "drawerUserMenuRef",
|
|
2089
|
+
ref: ae,
|
|
2090
|
+
class: "top-nav-bar__drawer-user-popup",
|
|
2091
|
+
model: Be.value,
|
|
2092
|
+
popup: !0,
|
|
2093
|
+
"append-to": "body",
|
|
2094
|
+
"base-z-index": 10001,
|
|
2095
|
+
onShow: u[17] ||= (e) => V.value = !0,
|
|
2096
|
+
onHide: u[18] ||= (e) => V.value = !1
|
|
2097
|
+
}, null, 8, ["model"])
|
|
2098
|
+
], 4));
|
|
2099
|
+
}
|
|
2100
|
+
}), kn = { class: "top-field-icon pointer-events-none absolute left-3 top-1/2 z-10 -translate-y-1/2" }, Q = {
|
|
2101
|
+
key: 0,
|
|
2102
|
+
class: "pi pi-spin pi-spinner"
|
|
2103
|
+
}, $ = {
|
|
2104
|
+
key: 1,
|
|
2105
|
+
class: "pi pi-search"
|
|
2106
|
+
}, An = {
|
|
2107
|
+
key: 1,
|
|
2108
|
+
class: "flex items-center gap-1 !text-sm"
|
|
2109
|
+
}, jn = { class: "flex items-center gap-2 rounded-[9px] bg-primary-500 px-2 py-1 text-white" }, Mn = ["onClick"], Nn = { class: "line-clamp-1 max-w-[300px] overflow-hidden text-ellipsis" }, Pn = {
|
|
2110
|
+
key: 1,
|
|
2111
|
+
class: "flex min-h-[100px] flex-col items-center justify-center gap-2 py-2"
|
|
2112
|
+
}, Fn = {
|
|
2113
|
+
key: 0,
|
|
2114
|
+
class: "text-xs font-medium text-primary-600"
|
|
2115
|
+
}, In = {
|
|
2116
|
+
key: 2,
|
|
2117
|
+
class: "text-xs text-secondary-500"
|
|
2118
|
+
}, Ln = { key: 1 }, Rn = {
|
|
2119
|
+
key: 1,
|
|
2120
|
+
class: "flex items-center gap-2 font-semibold"
|
|
2121
|
+
}, zn = {
|
|
2122
|
+
key: 1,
|
|
2123
|
+
class: "flex w-full min-w-0 items-start gap-2 overflow-hidden px-2 py-3 text-sm",
|
|
2124
|
+
style: { "white-space": "normal" }
|
|
2125
|
+
}, Bn = ["title"], Vn = {
|
|
2126
|
+
key: 0,
|
|
2127
|
+
class: "top-select-option-prefix whitespace-nowrap font-bold text-primary-800 dark:text-primary-100"
|
|
2128
|
+
}, Hn = {
|
|
2129
|
+
key: 0,
|
|
2130
|
+
class: "rounded-sm bg-primary-200 p-0 font-bold text-black dark:bg-cyan-700 dark:text-white"
|
|
2131
|
+
}, Un = {
|
|
2132
|
+
key: 0,
|
|
2133
|
+
class: "rounded-sm bg-primary-200 p-0 font-bold text-black dark:bg-cyan-700 dark:text-white"
|
|
2134
|
+
}, Wn = /* @__PURE__ */ u({
|
|
2135
|
+
__name: "TopSelect",
|
|
2136
|
+
props: {
|
|
2137
|
+
modelValue: { default: null },
|
|
2138
|
+
options: { default: () => [] },
|
|
2139
|
+
loading: {
|
|
2140
|
+
type: Boolean,
|
|
2141
|
+
default: !1
|
|
2142
|
+
},
|
|
2143
|
+
disabled: {
|
|
2144
|
+
type: Boolean,
|
|
2145
|
+
default: !1
|
|
2146
|
+
},
|
|
2147
|
+
placeholder: { default: "Pesquisar..." },
|
|
2148
|
+
optionLabel: {
|
|
2149
|
+
type: [String, Function],
|
|
2150
|
+
default: "label"
|
|
2151
|
+
},
|
|
2152
|
+
optionKey: { default: "id" },
|
|
2153
|
+
optionPrefix: { default: "" },
|
|
2154
|
+
showOptionPrefix: {
|
|
2155
|
+
type: Boolean,
|
|
2156
|
+
default: !1
|
|
2157
|
+
},
|
|
2158
|
+
showSelectedPrefix: {
|
|
2159
|
+
type: Boolean,
|
|
2160
|
+
default: !1
|
|
2161
|
+
},
|
|
2162
|
+
panelWidth: { default: null },
|
|
2163
|
+
scrollHeight: { default: "250px" },
|
|
2164
|
+
invalid: {
|
|
2165
|
+
type: Boolean,
|
|
2166
|
+
default: !1
|
|
2167
|
+
},
|
|
2168
|
+
showTooltip: {
|
|
2169
|
+
type: Boolean,
|
|
2170
|
+
default: !0
|
|
2171
|
+
},
|
|
2172
|
+
optionGroupLabel: { default: null },
|
|
2173
|
+
optionGroupChildren: { default: null },
|
|
2174
|
+
minQueryLength: { default: 1 },
|
|
2175
|
+
emptyMessage: { default: "Nenhum resultado encontrado." },
|
|
2176
|
+
loadingMessage: { default: "Carregando..." },
|
|
2177
|
+
showLoadingMessage: {
|
|
2178
|
+
type: Boolean,
|
|
2179
|
+
default: !0
|
|
2180
|
+
},
|
|
2181
|
+
multiple: {
|
|
2182
|
+
type: Boolean,
|
|
2183
|
+
default: !1
|
|
2184
|
+
},
|
|
2185
|
+
forceSelection: {
|
|
2186
|
+
type: Boolean,
|
|
2187
|
+
default: !0
|
|
2188
|
+
},
|
|
2189
|
+
closeOnSelect: {
|
|
2190
|
+
type: Boolean,
|
|
2191
|
+
default: !1
|
|
2192
|
+
}
|
|
2193
|
+
},
|
|
2194
|
+
emits: [
|
|
2195
|
+
"update:modelValue",
|
|
2196
|
+
"search",
|
|
2197
|
+
"loadMore",
|
|
2198
|
+
"clear",
|
|
2199
|
+
"select",
|
|
2200
|
+
"change"
|
|
2201
|
+
],
|
|
2202
|
+
setup(t, { expose: r, emit: u }) {
|
|
2203
|
+
let g = t, x = u, S = D(), T = R, E = v(""), A = v(!1), j = v(null), N = `top-select-${Math.random().toString(36).slice(2)}`, P = null, F = n({
|
|
2204
|
+
get: () => g.modelValue,
|
|
2205
|
+
set: (e) => x("update:modelValue", e)
|
|
2206
|
+
});
|
|
2207
|
+
function I(e, t) {
|
|
2208
|
+
return e == null ? "" : String(typeof e == "object" ? e[t] ?? "" : e);
|
|
2209
|
+
}
|
|
2210
|
+
function L(e) {
|
|
2211
|
+
return e == null ? "" : typeof g.optionLabel == "function" ? g.optionLabel(e) : I(e, g.optionLabel);
|
|
2212
|
+
}
|
|
2213
|
+
function re(e) {
|
|
2214
|
+
return g.optionPrefix ? I(e, g.optionPrefix) : "";
|
|
2215
|
+
}
|
|
2216
|
+
function ie(e, t = g.showSelectedPrefix) {
|
|
2217
|
+
let n = L(e), r = re(e);
|
|
2218
|
+
return t && r ? `${r} - ${n}` : n;
|
|
2219
|
+
}
|
|
2220
|
+
function z(e) {
|
|
2221
|
+
let t = E.value;
|
|
2222
|
+
if (!t) return [{
|
|
2223
|
+
text: e,
|
|
2224
|
+
highlighted: !1
|
|
2225
|
+
}];
|
|
2226
|
+
let n = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), r = RegExp(`(${n})`, "gi");
|
|
2227
|
+
return e.split(r).filter(Boolean).map((e) => ({
|
|
2228
|
+
text: e,
|
|
2229
|
+
highlighted: e.toLowerCase() === t.toLowerCase()
|
|
2230
|
+
}));
|
|
2231
|
+
}
|
|
2232
|
+
function B() {
|
|
2233
|
+
j.value?.hide?.();
|
|
2234
|
+
}
|
|
2235
|
+
function V() {
|
|
2236
|
+
typeof window > "u" || window.dispatchEvent(new CustomEvent("top-select:close-others", { detail: { instanceId: N } }));
|
|
2237
|
+
}
|
|
2238
|
+
function ae(e) {
|
|
2239
|
+
e.detail?.instanceId !== N && B();
|
|
2240
|
+
}
|
|
2241
|
+
function H() {
|
|
2242
|
+
if (g.disabled || P) {
|
|
2243
|
+
B();
|
|
2244
|
+
return;
|
|
2245
|
+
}
|
|
2246
|
+
A.value = !0, V();
|
|
2247
|
+
}
|
|
2248
|
+
function U() {
|
|
2249
|
+
g.closeOnSelect && (A.value = !1, B(), p(B), P && clearTimeout(P), P = setTimeout(() => {
|
|
2250
|
+
B(), P = null;
|
|
2251
|
+
}, 200));
|
|
2252
|
+
}
|
|
2253
|
+
return r({ hideDropdown: B }), te(() => window.addEventListener("top-select:close-others", ae)), ee(() => {
|
|
2254
|
+
window.removeEventListener("top-select:close-others", ae), P && clearTimeout(P);
|
|
2255
|
+
}), O(() => g.disabled, (e) => {
|
|
2256
|
+
e && (A.value = !1, B());
|
|
2257
|
+
}), O(() => g.options, () => {
|
|
2258
|
+
A.value || B();
|
|
2259
|
+
}), (n, r) => (_(), a("div", {
|
|
2260
|
+
class: m(["top-select top-solutions-component relative w-full", { "pointer-events-none": t.disabled }]),
|
|
2261
|
+
onFocusin: H
|
|
2262
|
+
}, [o("span", kn, [b(n.$slots, "icon", { loading: t.loading }, () => [t.loading ? (_(), a("i", Q)) : (_(), a("i", $))])]), l(w(T), {
|
|
2263
|
+
ref_key: "autocompleteRef",
|
|
2264
|
+
ref: j,
|
|
2265
|
+
modelValue: F.value,
|
|
2266
|
+
"onUpdate:modelValue": r[0] ||= (e) => F.value = e,
|
|
2267
|
+
"option-group-label": t.optionGroupLabel ?? void 0,
|
|
2268
|
+
"option-group-children": t.optionGroupChildren ?? void 0,
|
|
2269
|
+
suggestions: t.options,
|
|
2270
|
+
"data-key": t.optionKey,
|
|
2271
|
+
"option-label": (e) => ie(e),
|
|
2272
|
+
placeholder: t.placeholder,
|
|
2273
|
+
multiple: t.multiple,
|
|
2274
|
+
"min-length": t.minQueryLength,
|
|
2275
|
+
disabled: t.disabled,
|
|
2276
|
+
delay: 500,
|
|
2277
|
+
"show-clear": !t.multiple && !t.disabled,
|
|
2278
|
+
dropdown: "",
|
|
2279
|
+
"dropdown-mode": "current",
|
|
2280
|
+
"complete-on-focus": !1,
|
|
2281
|
+
invalid: t.invalid,
|
|
2282
|
+
fluid: "",
|
|
2283
|
+
"force-selection": t.forceSelection,
|
|
2284
|
+
"input-class": "text-xs",
|
|
2285
|
+
"virtual-scroller-options": {
|
|
2286
|
+
lazy: !0,
|
|
2287
|
+
onLazyLoad: (e) => x("loadMore", e),
|
|
2288
|
+
itemSize: 84,
|
|
2289
|
+
showLoader: !0,
|
|
2290
|
+
scrollHeight: t.scrollHeight
|
|
2291
|
+
},
|
|
2292
|
+
pt: {
|
|
2293
|
+
root: { class: ["w-full text-xs", t.multiple ? "h-auto" : "h-[40px]"].join(" ") },
|
|
2294
|
+
pcInputText: { root: { class: "top-field-control w-full h-auto text-xs border rounded-[10px] !pl-9 min-h-[36px]" } },
|
|
2295
|
+
input: { class: ["top-field-control w-full h-auto text-xs", t.multiple ? "border-0 py-1 !shadow-none outline-none ring-0" : "border rounded-[10px] !pl-9 min-h-[36px]"].join(" ") },
|
|
2296
|
+
inputMultiple: { class: "top-field-control rounded-[10px] pl-9 min-h-[40px]" },
|
|
2297
|
+
inputChip: { class: "py-0" },
|
|
2298
|
+
token: { class: "bg-primary-100 text-primary-900 rounded-md gap-2 px-2 my-1 dark:bg-primary-900 dark:text-primary-100" },
|
|
2299
|
+
removeTokenIcon: { class: "text-primary-900 w-3 h-3 cursor-pointer dark:text-primary-100" },
|
|
2300
|
+
panel: { class: "top-select-panel top-solutions-component max-w-[85vw] overflow-hidden h-fit shadow-xl" },
|
|
2301
|
+
listContainer: {
|
|
2302
|
+
class: "max-w-full overflow-x-hidden",
|
|
2303
|
+
style: {
|
|
2304
|
+
overflowX: "hidden",
|
|
2305
|
+
maxWidth: t.panelWidth ?? "85vw",
|
|
2306
|
+
...t.panelWidth ? { width: t.panelWidth } : {}
|
|
2307
|
+
}
|
|
2308
|
+
},
|
|
2309
|
+
list: { class: "max-w-full overflow-x-hidden" },
|
|
2310
|
+
option: { class: "max-w-full overflow-hidden min-h-[84px]" },
|
|
2311
|
+
placeholder: { class: "!text-xs" }
|
|
2312
|
+
},
|
|
2313
|
+
"search-message": " ",
|
|
2314
|
+
onClear: r[1] ||= (e) => {
|
|
2315
|
+
E.value = "", x("clear");
|
|
2316
|
+
},
|
|
2317
|
+
onItemSelect: r[2] ||= (e) => {
|
|
2318
|
+
E.value = "", x("select", e), U();
|
|
2319
|
+
},
|
|
2320
|
+
onComplete: r[3] ||= (e) => {
|
|
2321
|
+
if (t.disabled) {
|
|
2322
|
+
B();
|
|
2323
|
+
return;
|
|
2324
|
+
}
|
|
2325
|
+
E.value = e.query ?? "", V(), x("search", {
|
|
2326
|
+
...e,
|
|
2327
|
+
query: E.value
|
|
2328
|
+
});
|
|
2329
|
+
},
|
|
2330
|
+
onChange: r[4] ||= (e) => x("change", e)
|
|
2331
|
+
}, s({
|
|
2332
|
+
chip: k((e) => [w(S).chip ? b(n.$slots, "chip", h(d(e)), void 0, void 0, 0) : (_(), a("div", An, [o("div", jn, [o("i", {
|
|
2333
|
+
class: "pi pi-times-circle shrink-0 cursor-pointer rounded-full hover:bg-primary-800",
|
|
2334
|
+
onClick: (t) => e.removeCallback(t)
|
|
2335
|
+
}, null, 8, Mn), ne((_(), a("span", Nn, [c(C(ie(e.value)), 1)])), [[
|
|
2336
|
+
w(M),
|
|
2337
|
+
ie(e.value),
|
|
2338
|
+
void 0,
|
|
2339
|
+
{ top: !0 }
|
|
2340
|
+
]])])]))]),
|
|
2341
|
+
empty: k(() => [w(S).empty ? b(n.$slots, "empty", {}, void 0, void 0, 0) : t.loading ? (_(), a("div", Pn, [r[5] ||= o("span", { class: "pi pi-spin pi-spinner text-2xl text-primary-600" }, null, -1), t.showLoadingMessage ? (_(), a("span", Fn, C(t.loadingMessage), 1)) : i("", !0)])) : (_(), a("span", In, C(t.emptyMessage), 1))]),
|
|
2342
|
+
"selected-item": k((e) => [w(S)["selected-item"] ? b(n.$slots, "selected-item", h(d(e)), void 0, void 0, 0) : e.item ? (_(), a("span", Ln, C(ie(e.item)), 1)) : i("", !0)]),
|
|
2343
|
+
optiongroup: k((e) => [w(S)["option-group"] ? b(n.$slots, "option-group", h(d(e)), void 0, void 0, 0) : (_(), a("div", Rn, [e.option.icon ? (_(), a("i", {
|
|
2344
|
+
key: 0,
|
|
2345
|
+
class: m(e.option.icon)
|
|
2346
|
+
}, null, 2)) : i("", !0), o("span", null, C(e.option[t.optionGroupLabel ?? "label"]), 1)]))]),
|
|
2347
|
+
option: k((s) => [w(S).option ? b(n.$slots, "option", f(s, {
|
|
2348
|
+
label: L(s.option),
|
|
2349
|
+
prefix: re(s.option),
|
|
2350
|
+
query: E.value
|
|
2351
|
+
}), void 0, void 0, 0) : ne((_(), a("div", zn, [o("span", {
|
|
2352
|
+
class: "top-select-option-label line-clamp-2 min-w-0 flex-1 text-secondary-700 dark:text-zinc-200",
|
|
2353
|
+
title: L(s.option)
|
|
2354
|
+
}, [t.showOptionPrefix && re(s.option) ? (_(), a("span", Vn, [(_(!0), a(e, null, y(z(re(s.option)), (t, n) => (_(), a(e, { key: n }, [t.highlighted ? (_(), a("mark", Hn, C(t.text), 1)) : (_(), a(e, { key: 1 }, [c(C(t.text), 1)], 64))], 64))), 128)), r[6] ||= o("span", { class: "font-bold text-secondary-500 dark:text-zinc-400" }, "\xA0-\xA0", -1)])) : i("", !0), (_(!0), a(e, null, y(z(L(s.option)), (t, n) => (_(), a(e, { key: n }, [t.highlighted ? (_(), a("mark", Un, C(t.text), 1)) : (_(), a(e, { key: 1 }, [c(C(t.text), 1)], 64))], 64))), 128))], 8, Bn)])), [[
|
|
2355
|
+
w(M),
|
|
2356
|
+
t.showTooltip ? L(s.option) : null,
|
|
2357
|
+
void 0,
|
|
2358
|
+
{ top: !0 }
|
|
2359
|
+
]])]),
|
|
2360
|
+
_: 2
|
|
2361
|
+
}, [w(S).footer ? {
|
|
2362
|
+
name: "footer",
|
|
2363
|
+
fn: k((e) => [b(n.$slots, "footer", h(d(e)))]),
|
|
2364
|
+
key: "0"
|
|
2365
|
+
} : void 0]), 1032, [
|
|
2366
|
+
"modelValue",
|
|
2367
|
+
"option-group-label",
|
|
2368
|
+
"option-group-children",
|
|
2369
|
+
"suggestions",
|
|
2370
|
+
"data-key",
|
|
2371
|
+
"option-label",
|
|
2372
|
+
"placeholder",
|
|
2373
|
+
"multiple",
|
|
2374
|
+
"min-length",
|
|
2375
|
+
"disabled",
|
|
2376
|
+
"show-clear",
|
|
2377
|
+
"invalid",
|
|
2378
|
+
"force-selection",
|
|
2379
|
+
"virtual-scroller-options",
|
|
2380
|
+
"pt"
|
|
2381
|
+
])], 34));
|
|
2382
|
+
}
|
|
2383
|
+
}), Gn = /* @__PURE__ */ u({
|
|
2384
|
+
inheritAttrs: !1,
|
|
2385
|
+
__name: "TopTabs",
|
|
2386
|
+
props: {
|
|
2387
|
+
modelValue: {},
|
|
2388
|
+
tabs: {},
|
|
2389
|
+
lazy: {
|
|
2390
|
+
type: Boolean,
|
|
2391
|
+
default: !1
|
|
2392
|
+
},
|
|
2393
|
+
scrollable: {
|
|
2394
|
+
type: Boolean,
|
|
2395
|
+
default: !0
|
|
2396
|
+
}
|
|
2397
|
+
},
|
|
2398
|
+
emits: ["update:modelValue"],
|
|
2399
|
+
setup(t, { emit: n }) {
|
|
2400
|
+
let i = n;
|
|
2401
|
+
function o(e) {
|
|
2402
|
+
return String(e.value);
|
|
2403
|
+
}
|
|
2404
|
+
return (n, s) => (_(), r(w(H), f(n.$attrs, {
|
|
2405
|
+
class: "top-tabs top-solutions-component w-full min-w-0",
|
|
2406
|
+
value: t.modelValue,
|
|
2407
|
+
lazy: t.lazy,
|
|
2408
|
+
scrollable: t.scrollable,
|
|
2409
|
+
"onUpdate:value": s[0] ||= (e) => i("update:modelValue", e)
|
|
2410
|
+
}), {
|
|
2411
|
+
default: k(() => [l(w(B), null, {
|
|
2412
|
+
default: k(() => [(_(!0), a(e, null, y(t.tabs, (e) => (_(), r(w(z), {
|
|
2413
|
+
key: e.value,
|
|
2414
|
+
value: e.value,
|
|
2415
|
+
disabled: e.disabled
|
|
2416
|
+
}, {
|
|
2417
|
+
default: k(() => [c(C(e.label), 1)]),
|
|
2418
|
+
_: 2
|
|
2419
|
+
}, 1032, ["value", "disabled"]))), 128))]),
|
|
2420
|
+
_: 1
|
|
2421
|
+
}), l(w(ae), null, {
|
|
2422
|
+
default: k(() => [(_(!0), a(e, null, y(t.tabs, (e) => (_(), r(w(V), {
|
|
2423
|
+
key: e.value,
|
|
2424
|
+
value: e.value
|
|
2425
|
+
}, {
|
|
2426
|
+
default: k(() => [b(n.$slots, o(e), {
|
|
2427
|
+
tab: e,
|
|
2428
|
+
active: t.modelValue === e.value
|
|
2429
|
+
})]),
|
|
2430
|
+
_: 2
|
|
2431
|
+
}, 1032, ["value"]))), 128))]),
|
|
2432
|
+
_: 3
|
|
2433
|
+
})]),
|
|
2434
|
+
_: 3
|
|
2435
|
+
}, 16, [
|
|
2436
|
+
"value",
|
|
2437
|
+
"lazy",
|
|
2438
|
+
"scrollable"
|
|
2439
|
+
]));
|
|
2440
|
+
}
|
|
2441
|
+
}), Kn = { class: "top-toast__content" }, qn = { class: "top-toast__detail" }, Jn = ["onClick"], Yn = {
|
|
2442
|
+
key: 0,
|
|
2443
|
+
class: "top-toast__footer"
|
|
2444
|
+
}, Xn = /* @__PURE__ */ u({
|
|
2445
|
+
__name: "TopToast",
|
|
2446
|
+
props: { baseZIndex: { default: 3e4 } },
|
|
2447
|
+
setup(e) {
|
|
2448
|
+
function t(e) {
|
|
2449
|
+
return e.data?.footer;
|
|
2450
|
+
}
|
|
2451
|
+
function n(e) {
|
|
2452
|
+
return e.data?.action;
|
|
2453
|
+
}
|
|
2454
|
+
function s(e) {
|
|
2455
|
+
n(e)?.onClick?.();
|
|
2456
|
+
}
|
|
2457
|
+
function l(e) {
|
|
2458
|
+
return t(e) !== void 0;
|
|
2459
|
+
}
|
|
2460
|
+
function u(e) {
|
|
2461
|
+
return !!n(e);
|
|
2462
|
+
}
|
|
2463
|
+
function d(e, t) {
|
|
2464
|
+
return `top-toast__${t}--${e.severity ?? "info"}`;
|
|
2465
|
+
}
|
|
2466
|
+
return (f, p) => (_(), r(w(U), {
|
|
2467
|
+
position: "top-right",
|
|
2468
|
+
"base-z-index": e.baseZIndex
|
|
2469
|
+
}, {
|
|
2470
|
+
message: k((e) => [o("div", Kn, [
|
|
2471
|
+
o("div", { class: m(["top-toast__summary", d(e.message, "summary")]) }, C(e.message.summary), 3),
|
|
2472
|
+
o("div", qn, C(e.message.detail), 1),
|
|
2473
|
+
u(e.message) ? b(f.$slots, "action", {
|
|
2474
|
+
action: n(e.message),
|
|
2475
|
+
message: e.message,
|
|
2476
|
+
run: () => s(e.message)
|
|
2477
|
+
}, () => [n(e.message) ? (_(), a("button", {
|
|
2478
|
+
key: 0,
|
|
2479
|
+
class: m(["top-toast__action", d(e.message, "action")]),
|
|
2480
|
+
type: "button",
|
|
2481
|
+
onClick: (t) => s(e.message)
|
|
2482
|
+
}, [n(e.message)?.icon ? (_(), a("i", {
|
|
2483
|
+
key: 0,
|
|
2484
|
+
class: m(n(e.message)?.icon),
|
|
2485
|
+
"aria-hidden": "true"
|
|
2486
|
+
}, null, 2)) : i("", !0), c(" " + C(n(e.message)?.label), 1)], 10, Jn)) : i("", !0)], void 0, 0) : i("", !0),
|
|
2487
|
+
l(e.message) ? b(f.$slots, "footer", {
|
|
2488
|
+
message: e.message,
|
|
2489
|
+
footer: t(e.message)
|
|
2490
|
+
}, () => [t(e.message) === void 0 ? i("", !0) : (_(), a("div", Yn, C(t(e.message)), 1))], void 0, 1) : i("", !0)
|
|
2491
|
+
])]),
|
|
2492
|
+
_: 3
|
|
2493
|
+
}, 8, ["base-z-index"]));
|
|
2494
|
+
}
|
|
2495
|
+
});
|
|
2496
|
+
//#endregion
|
|
2497
|
+
export { ze as a, le as c, On as i, se as l, Gn as n, Fe as o, Wn as r, me as s, Xn as t, oe as u };
|
|
2498
|
+
|
|
2499
|
+
//# sourceMappingURL=TopToast-ZB64v4w6.js.map
|