@nubisco/ui 5.0.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Blueprint-zT-ZOWep.cjs → Blueprint-C819Fit5.cjs} +1 -1
- package/dist/{Blueprint-BssBWGv5.js → Blueprint-fhDJzNS2.js} +2 -2
- package/dist/{BlueprintCard-CS_ZWdB0.js → BlueprintCard-B2S3dtFk.js} +1 -1
- package/dist/{BlueprintCard-CYXyeph3.cjs → BlueprintCard-s0ss_fab.cjs} +1 -1
- package/dist/CommandPalette-CPJKTiDt.cjs +1 -0
- package/dist/CommandPalette-iaEdat_y.js +223 -0
- package/dist/{InlineLoading-DQZ1capH.cjs → InlineLoading-8HdPSyXm.cjs} +1 -1
- package/dist/{InlineLoading-DA8__t0M.js → InlineLoading-ZeqQTbY1.js} +1 -1
- package/dist/{NotificationCenter-Duu3XZC3.js → NotificationCenter-BAncrTOw.js} +3 -3
- package/dist/{NotificationCenter-oOzClQI-.cjs → NotificationCenter-Cw2YXNQj.cjs} +1 -1
- package/dist/SidebarCollapseToggle-BQuF6kSO.js +48 -0
- package/dist/SidebarCollapseToggle-DM1899Ee.cjs +1 -0
- package/dist/SidebarMenuItem-B-H0berP.js +246 -0
- package/dist/SidebarMenuItem-COd8DP6e.cjs +1 -0
- package/dist/{Skeleton-DP9iM6Ku.cjs → Skeleton-C7qpz76n.cjs} +1 -1
- package/dist/{Skeleton-sox6qUDk.js → Skeleton-D8_ZS3rD.js} +1 -1
- package/dist/{Slider-C0761rBk.js → Slider-BJcuzn-P.js} +1 -1
- package/dist/{Slider-BNiQaaVa.cjs → Slider-CyAUWetS.cjs} +1 -1
- package/dist/{Spinner-CqSN2vaR.cjs → Spinner-0U-QK2re.cjs} +1 -1
- package/dist/{Spinner-BEYUpJdP.js → Spinner-CcKjiWEY.js} +1 -1
- package/dist/{Stepper-2WscvFLm.cjs → Stepper-Dthh04Y2.cjs} +1 -1
- package/dist/{Stepper-Ce3Qa_7z.js → Stepper-yBAsjyhx.js} +1 -1
- package/dist/{StepperStep-B9JEE6WJ.cjs → StepperStep-IoUSk6oB.cjs} +1 -1
- package/dist/{StepperStep-DFeOJ1ju.js → StepperStep-r0LjQQI9.js} +1 -1
- package/dist/{Toaster-Dz_o--LF.cjs → Toaster-D9lIWrdC.cjs} +1 -1
- package/dist/{Toaster-C1Uyr6O7.js → Toaster-DRVC544c.js} +1 -1
- package/dist/{Tree-D2gEoq-H.cjs → Tree-BLqp392K.cjs} +1 -1
- package/dist/{Tree-BXEqU6js.js → Tree-Ol3M-fjh.js} +1 -1
- package/dist/{TreeNode-DB7ipWCg.cjs → TreeNode-C4ukoVd5.cjs} +1 -1
- package/dist/{TreeNode-a0MHLI27.js → TreeNode-COO-Fyys.js} +1 -1
- package/dist/UserMenu-Cmk1RDMh.cjs +1 -0
- package/dist/UserMenu-D1TNnwFB.js +305 -0
- package/dist/all.cjs +1 -1
- package/dist/all.mjs +92 -89
- package/dist/component-styles.json +4 -0
- package/dist/components/AiLabel.cjs +1 -1
- package/dist/components/AiLabel.mjs +1 -1
- package/dist/components/Blueprint.cjs +1 -1
- package/dist/components/Blueprint.mjs +1 -1
- package/dist/components/BlueprintBackground.cjs +1 -1
- package/dist/components/BlueprintBackground.mjs +1 -1
- package/dist/components/BlueprintCard.cjs +1 -1
- package/dist/components/BlueprintCard.mjs +1 -1
- package/dist/components/BlueprintControls.cjs +1 -1
- package/dist/components/BlueprintControls.mjs +1 -1
- package/dist/components/BlueprintMinimap.cjs +1 -1
- package/dist/components/BlueprintMinimap.mjs +1 -1
- package/dist/components/BottomPanel.cjs +1 -1
- package/dist/components/BottomPanel.mjs +1 -1
- package/dist/components/Charts/Sparkline.cjs +1 -1
- package/dist/components/Charts/Sparkline.mjs +1 -1
- package/dist/components/CommandPalette.cjs +1 -1
- package/dist/components/CommandPalette.d.ts +28 -0
- package/dist/components/CommandPalette.mjs +1 -1
- package/dist/components/CommandPalette.vue.d.ts +2 -0
- package/dist/components/CommandPalette.vue.d.ts.map +1 -1
- package/dist/components/FileUploader.cjs +1 -1
- package/dist/components/FileUploader.mjs +1 -1
- package/dist/components/Form.cjs +1 -1
- package/dist/components/Form.mjs +1 -1
- package/dist/components/ImageCropper.cjs +1 -1
- package/dist/components/ImageCropper.mjs +1 -1
- package/dist/components/InlineEdit.cjs +1 -1
- package/dist/components/InlineEdit.mjs +1 -1
- package/dist/components/InlineLoading.cjs +1 -1
- package/dist/components/InlineLoading.mjs +1 -1
- package/dist/components/NotificationCenter.cjs +1 -1
- package/dist/components/NotificationCenter.mjs +1 -1
- package/dist/components/NotificationCenterItem.cjs +1 -1
- package/dist/components/NotificationCenterItem.mjs +1 -1
- package/dist/components/NumberInput.cjs +1 -1
- package/dist/components/NumberInput.mjs +1 -1
- package/dist/components/ProgressBar.cjs +1 -1
- package/dist/components/ProgressBar.mjs +1 -1
- package/dist/components/Radio.cjs +1 -1
- package/dist/components/Radio.mjs +1 -1
- package/dist/components/ShellPanel.cjs +1 -1
- package/dist/components/ShellPanel.mjs +1 -1
- package/dist/components/SidebarCollapseToggle.cjs +1 -0
- package/dist/components/SidebarCollapseToggle.d.ts +14 -0
- package/dist/components/SidebarCollapseToggle.mjs +2 -0
- package/dist/components/SidebarCollapseToggle.vue.d.ts +12 -0
- package/dist/components/SidebarCollapseToggle.vue.d.ts.map +1 -0
- package/dist/components/SidebarLink.cjs +1 -1
- package/dist/components/SidebarLink.mjs +1 -1
- package/dist/components/SidebarMenu.cjs +1 -1
- package/dist/components/SidebarMenu.mjs +1 -1
- package/dist/components/SidebarMenuGroup.cjs +1 -1
- package/dist/components/SidebarMenuGroup.mjs +1 -1
- package/dist/components/SidebarMenuItem.cjs +1 -1
- package/dist/components/SidebarMenuItem.mjs +1 -1
- package/dist/components/SidebarMenuItem.vue.d.ts +3 -3
- package/dist/components/SidebarMenuItem.vue.d.ts.map +1 -1
- package/dist/components/Skeleton.cjs +1 -1
- package/dist/components/Skeleton.mjs +1 -1
- package/dist/components/Slider.cjs +1 -1
- package/dist/components/Slider.mjs +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/Spinner.mjs +1 -1
- package/dist/components/Stepper.cjs +1 -1
- package/dist/components/Stepper.mjs +1 -1
- package/dist/components/StepperStep.cjs +1 -1
- package/dist/components/StepperStep.mjs +1 -1
- package/dist/components/Tabs.cjs +1 -1
- package/dist/components/Tabs.mjs +1 -1
- package/dist/components/Toast.cjs +1 -1
- package/dist/components/Toast.mjs +1 -1
- package/dist/components/Toaster.cjs +1 -1
- package/dist/components/Toaster.mjs +1 -1
- package/dist/components/Tree.cjs +1 -1
- package/dist/components/Tree.mjs +1 -1
- package/dist/components/TreeNode.cjs +1 -1
- package/dist/components/TreeNode.mjs +1 -1
- package/dist/components/UserMenu.cjs +1 -1
- package/dist/components/UserMenu.d.ts +21 -0
- package/dist/components/UserMenu.mjs +1 -1
- package/dist/components/UserMenu.vue.d.ts +3 -1
- package/dist/components/UserMenu.vue.d.ts.map +1 -1
- package/dist/components/Walkthrough.cjs +1 -1
- package/dist/components/Walkthrough.mjs +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/manifest.d.ts +1 -0
- package/dist/components/manifest.d.ts.map +1 -1
- package/dist/components/manifest.js +1 -0
- package/dist/composables/useBlueprint.composable.cjs +1 -1
- package/dist/composables/useBlueprint.composable.mjs +1 -1
- package/dist/composables/useInlineLoading.composable.cjs +1 -1
- package/dist/composables/useInlineLoading.composable.mjs +1 -1
- package/dist/composables/useLoadingAnnouncer.composable.cjs +1 -1
- package/dist/composables/useLoadingAnnouncer.composable.mjs +1 -1
- package/dist/composables/useSidebarVariant.composable.cjs +1 -0
- package/dist/composables/useSidebarVariant.composable.d.ts +44 -0
- package/dist/composables/useSidebarVariant.composable.d.ts.map +1 -0
- package/dist/composables/useSidebarVariant.composable.mjs +34 -0
- package/dist/global.d.ts +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +52 -50
- package/dist/main.d.ts +6 -2
- package/dist/main.d.ts.map +1 -1
- package/dist/styles/SidebarMenuItem.css +1 -1
- package/dist/styles/UserMenu.css +1 -1
- package/dist/ui.css +2 -2
- package/package.json +1 -1
- package/src/styles/presets/_classic-fields.scss +1 -1
- package/dist/CommandPalette-BNXzQurN.js +0 -174
- package/dist/CommandPalette-DBjeOPtA.cjs +0 -1
- package/dist/SidebarMenuItem-Dc6oh2Nc.cjs +0 -1
- package/dist/SidebarMenuItem-Dpqr9e0A.js +0 -170
- package/dist/UserMenu-CFJBVNEU.cjs +0 -1
- package/dist/UserMenu-a4P_4Yau.js +0 -265
- /package/dist/{AiLabel-DtM5ZCQC.cjs → AiLabel-B-nN5dz3.cjs} +0 -0
- /package/dist/{AiLabel-Ci7eROcw.js → AiLabel-BYVf6DKC.js} +0 -0
- /package/dist/{Blueprint.context-CFxL4QTQ.cjs → Blueprint.context-CFUllT-M.cjs} +0 -0
- /package/dist/{Blueprint.context-CFdYIXJd.js → Blueprint.context-M8FbIHtQ.js} +0 -0
- /package/dist/{BlueprintBackground-Cfr5Xqcc.cjs → BlueprintBackground-CwzmUWRZ.cjs} +0 -0
- /package/dist/{BlueprintBackground-Bm9-bZiz.js → BlueprintBackground-SShbMh4a.js} +0 -0
- /package/dist/{BlueprintControls-CdvNvRkW.cjs → BlueprintControls-C2x7gjPJ.cjs} +0 -0
- /package/dist/{BlueprintControls-BkwhsHI8.js → BlueprintControls-C5kAAVIV.js} +0 -0
- /package/dist/{BlueprintMinimap-QAw6aiCc.js → BlueprintMinimap-CoA82G-Y.js} +0 -0
- /package/dist/{BlueprintMinimap-BIBsnBFs.cjs → BlueprintMinimap-DnCeuLvK.cjs} +0 -0
- /package/dist/{BottomPanel-BoBCdANz.js → BottomPanel-BV9xSzmN.js} +0 -0
- /package/dist/{BottomPanel-dbllmH2v.cjs → BottomPanel-CuaR0raL.cjs} +0 -0
- /package/dist/{FileUploader-BJdRC-Kp.cjs → FileUploader-B6Uty0Ya.cjs} +0 -0
- /package/dist/{FileUploader-BO2cDUwP.js → FileUploader-BfnrcMOa.js} +0 -0
- /package/dist/{Form-MtBoH-yt.cjs → Form-DE_I3zEv.cjs} +0 -0
- /package/dist/{Form-z5burrVK.js → Form-SCxw_ZSP.js} +0 -0
- /package/dist/{ImageCropper-D7mr-xRE.cjs → ImageCropper-96gRzxtH.cjs} +0 -0
- /package/dist/{ImageCropper-DEaGU0cZ.js → ImageCropper-Ded-xHG3.js} +0 -0
- /package/dist/{InlineEdit-D95I45Vt.cjs → InlineEdit-BEsB1dcq.cjs} +0 -0
- /package/dist/{InlineEdit-DrhJ0AX2.js → InlineEdit-BpdGtf_0.js} +0 -0
- /package/dist/{NotificationCenterItem-ZkLsiQIV.js → NotificationCenterItem-CH-V1S51.js} +0 -0
- /package/dist/{NotificationCenterItem-Clhhma6H.cjs → NotificationCenterItem-D2TueTtH.cjs} +0 -0
- /package/dist/{NumberInput-_ff3Xi2r.js → NumberInput-Dq5-rq78.js} +0 -0
- /package/dist/{NumberInput-DKZsdWLv.cjs → NumberInput-jrHPvBH3.cjs} +0 -0
- /package/dist/{ProgressBar-aF2zBoRA.js → ProgressBar-CCkhkJCY.js} +0 -0
- /package/dist/{ProgressBar-CbqsSdZZ.cjs → ProgressBar-DEVGzMmq.cjs} +0 -0
- /package/dist/{Radio-BqjtCaST.cjs → Radio-BSjYK8vn.cjs} +0 -0
- /package/dist/{Radio-BnI7bi9Y.js → Radio-xIeFUWBJ.js} +0 -0
- /package/dist/{ShellPanel-ChujN0eX.cjs → ShellPanel-CYFImHWL.cjs} +0 -0
- /package/dist/{ShellPanel-B3vZcQhX.js → ShellPanel-Dxs-yyJW.js} +0 -0
- /package/dist/{SidebarLink-B_CGHs0b.js → SidebarLink-DfWX2gXM.js} +0 -0
- /package/dist/{SidebarLink-CZrDLC8g.cjs → SidebarLink-Q3APfpMA.cjs} +0 -0
- /package/dist/{SidebarMenu-LLy6Fora.js → SidebarMenu-B9-8XELL.js} +0 -0
- /package/dist/{SidebarMenu-f3GDn1-I.cjs → SidebarMenu-Cbn_syLg.cjs} +0 -0
- /package/dist/{SidebarMenuGroup-B4jMOWcm.js → SidebarMenuGroup-BlmhsFfz.js} +0 -0
- /package/dist/{SidebarMenuGroup-Bb6qRMwk.cjs → SidebarMenuGroup-sMHiDmvz.cjs} +0 -0
- /package/dist/{Sparkline-DgYLtmOW.cjs → Sparkline-BaGrganz.cjs} +0 -0
- /package/dist/{Sparkline-DpyFwHrc.js → Sparkline-DOXwM53Q.js} +0 -0
- /package/dist/{Stepper.context-CKSUoiem.js → Stepper.context-DE2-4Awo.js} +0 -0
- /package/dist/{Stepper.context-BOGBVJcj.cjs → Stepper.context-ZHRlJj2r.cjs} +0 -0
- /package/dist/{Tabs-Dp27EDrK.cjs → Tabs-4ar_u69q.cjs} +0 -0
- /package/dist/{Tabs-CQP9zwDw.js → Tabs-BY0w2xIE.js} +0 -0
- /package/dist/{Toast-BBsrCQK8.cjs → Toast-DxqsMIum.cjs} +0 -0
- /package/dist/{Toast-cisfK5Zd.js → Toast-LmQbzDjd.js} +0 -0
- /package/dist/{TreeContext-Chb7z8Xc.cjs → TreeContext-CzS1Wz-R.cjs} +0 -0
- /package/dist/{TreeContext-DMZ0w_tb.js → TreeContext-qAmvKbZg.js} +0 -0
- /package/dist/{Walkthrough-qaQ1rved.js → Walkthrough-CDJ_L5v6.js} +0 -0
- /package/dist/{Walkthrough-YD3YYxxM.cjs → Walkthrough-sxBesCKN.cjs} +0 -0
- /package/dist/{pixi-scene-CO-pr1Vt.cjs → pixi-scene-DD4f6Hr_.cjs} +0 -0
- /package/dist/{pixi-scene-BsU_T9YR.js → pixi-scene-zrD35mCw.js} +0 -0
- /package/dist/{useLoadingAnnouncer.composable-DjrPyN_4.cjs → useLoadingAnnouncer.composable-0p9NR_9q.cjs} +0 -0
- /package/dist/{useLoadingAnnouncer.composable-CUiJu52w.js → useLoadingAnnouncer.composable-_dHf3wif.js} +0 -0
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-O4QQSku4.js";
|
|
2
|
-
import { t } from "./Icon-rREAqsu0.js";
|
|
3
|
-
import { useRouterLink as n } from "./composables/useRouterLink.composable.mjs";
|
|
4
|
-
import { hasRenderableContent as r } from "./utils/slotContent.helper.mjs";
|
|
5
|
-
import { Fragment as i, Teleport as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, defineComponent as d, inject as f, mergeProps as p, normalizeClass as m, normalizeStyle as h, openBlock as g, provide as _, ref as v, renderSlot as y, resolveDynamicComponent as b, toDisplayString as x, toRef as S, unref as C, useSlots as w, vShow as T, withCtx as E, withDirectives as D } from "vue";
|
|
6
|
-
import { regular as O } from "@nubisco/ui/icons/caret-right";
|
|
7
|
-
//#endregion
|
|
8
|
-
//#region src/components/SidebarVariantScope.vue
|
|
9
|
-
var k = /* @__PURE__ */ d({
|
|
10
|
-
__name: "SidebarVariantScope",
|
|
11
|
-
props: { variant: {} },
|
|
12
|
-
setup(e) {
|
|
13
|
-
return _("nb-shell-sidebar-variant", S(e, "variant")), (e, t) => y(e.$slots, "default");
|
|
14
|
-
}
|
|
15
|
-
}), A = { class: "nb-sidebar-menu-item__label" }, j = ["title"], M = {
|
|
16
|
-
key: 0,
|
|
17
|
-
class: "nb-sidebar-menu-item__children",
|
|
18
|
-
role: "group"
|
|
19
|
-
}, N = { class: "nb-sidebar-menu-item__flyout-header" }, P = { class: "nb-sidebar-menu-item__flyout-label" }, F = { class: "nb-sidebar-menu-item__flyout-children" }, I = /* @__PURE__ */ e(/* @__PURE__ */ d({
|
|
20
|
-
__name: "SidebarMenuItem",
|
|
21
|
-
props: {
|
|
22
|
-
label: {},
|
|
23
|
-
icon: { default: void 0 },
|
|
24
|
-
to: { default: void 0 },
|
|
25
|
-
href: { default: void 0 },
|
|
26
|
-
active: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: !1
|
|
29
|
-
},
|
|
30
|
-
disabled: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: !1
|
|
33
|
-
},
|
|
34
|
-
defaultExpanded: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: !1
|
|
37
|
-
},
|
|
38
|
-
badge: { default: void 0 },
|
|
39
|
-
badgeVariant: { default: "neutral" }
|
|
40
|
-
},
|
|
41
|
-
emits: ["click"],
|
|
42
|
-
setup(e, { emit: d }) {
|
|
43
|
-
let _ = e, S = d, I = f("nb-shell-sidebar-variant", v("verbose")), L = o(() => I.value), R = w(), z = o(() => {
|
|
44
|
-
let e = R.default?.();
|
|
45
|
-
return e ? r(e) : !1;
|
|
46
|
-
}), B = v(_.defaultExpanded || _.active), V = n(), H = o(() => {
|
|
47
|
-
if (typeof _.to == "string") return _.to;
|
|
48
|
-
if (_.href) return _.href;
|
|
49
|
-
}), U = o(() => z.value), W = o(() => _.to != null && !U.value && !!V.value), G = o(() => U.value ? "button" : W.value ? V.value : H.value ? "a" : "button"), K = o(() => G.value === "a" ? { href: H.value } : {});
|
|
50
|
-
function q(e) {
|
|
51
|
-
if (_.disabled) {
|
|
52
|
-
e.preventDefault();
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
if (U.value && L.value === "verbose") {
|
|
56
|
-
B.value = !B.value;
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
S("click", e);
|
|
60
|
-
}
|
|
61
|
-
let J = v(null), Y = v(!1), X = v({}), Z = null;
|
|
62
|
-
function Q() {
|
|
63
|
-
if (L.value !== "compact") return;
|
|
64
|
-
Z &&= (clearTimeout(Z), null);
|
|
65
|
-
let e = J.value;
|
|
66
|
-
if (!e) return;
|
|
67
|
-
let t = e.getBoundingClientRect();
|
|
68
|
-
X.value = {
|
|
69
|
-
top: `${t.top}px`,
|
|
70
|
-
left: `${t.right + 8}px`
|
|
71
|
-
}, Y.value = !0;
|
|
72
|
-
}
|
|
73
|
-
function $() {
|
|
74
|
-
Z && clearTimeout(Z), Z = setTimeout(() => {
|
|
75
|
-
Y.value = !1, Z = null;
|
|
76
|
-
}, 120);
|
|
77
|
-
}
|
|
78
|
-
function ee() {
|
|
79
|
-
Q();
|
|
80
|
-
}
|
|
81
|
-
function te() {
|
|
82
|
-
$();
|
|
83
|
-
}
|
|
84
|
-
function ne() {
|
|
85
|
-
Z &&= (clearTimeout(Z), null);
|
|
86
|
-
}
|
|
87
|
-
function re() {
|
|
88
|
-
$();
|
|
89
|
-
}
|
|
90
|
-
return (n, r) => (g(), l("li", {
|
|
91
|
-
class: m(["nb-sidebar-menu-item", [`nb-sidebar-menu-item--${L.value}`]]),
|
|
92
|
-
role: "none",
|
|
93
|
-
onMouseenter: ee,
|
|
94
|
-
onMouseleave: te
|
|
95
|
-
}, [
|
|
96
|
-
(g(), s(b(G.value), p({
|
|
97
|
-
ref_key: "rowRef",
|
|
98
|
-
ref: J,
|
|
99
|
-
class: ["nb-sidebar-menu-item__row", {
|
|
100
|
-
"nb-sidebar-menu-item__row--active": e.active,
|
|
101
|
-
"nb-sidebar-menu-item__row--disabled": e.disabled,
|
|
102
|
-
"nb-sidebar-menu-item__row--expandable": z.value && L.value === "verbose",
|
|
103
|
-
"nb-sidebar-menu-item__row--compact": L.value === "compact"
|
|
104
|
-
}],
|
|
105
|
-
type: G.value === "button" ? "button" : void 0,
|
|
106
|
-
to: W.value ? e.to : void 0
|
|
107
|
-
}, K.value, {
|
|
108
|
-
disabled: G.value === "button" && !z.value && e.disabled || void 0,
|
|
109
|
-
"aria-disabled": e.disabled || void 0,
|
|
110
|
-
"aria-expanded": z.value && L.value === "verbose" ? B.value : void 0,
|
|
111
|
-
"aria-label": L.value === "compact" ? e.label : void 0,
|
|
112
|
-
role: "menuitem",
|
|
113
|
-
onClick: q
|
|
114
|
-
}), {
|
|
115
|
-
default: E(() => [e.icon ? (g(), s(t, {
|
|
116
|
-
key: 0,
|
|
117
|
-
class: "nb-sidebar-menu-item__icon",
|
|
118
|
-
name: e.icon,
|
|
119
|
-
size: L.value === "compact" ? 18 : 16
|
|
120
|
-
}, null, 8, ["name", "size"])) : c("", !0), L.value === "verbose" ? (g(), l(i, { key: 1 }, [
|
|
121
|
-
u("span", A, x(e.label), 1),
|
|
122
|
-
e.badge === void 0 ? c("", !0) : (g(), l("span", {
|
|
123
|
-
key: 0,
|
|
124
|
-
class: m(["nb-sidebar-menu-item__badge", [`nb-sidebar-menu-item__badge--${e.badgeVariant}`]])
|
|
125
|
-
}, x(e.badge), 3)),
|
|
126
|
-
z.value ? (g(), s(t, {
|
|
127
|
-
key: 1,
|
|
128
|
-
class: m(["nb-sidebar-menu-item__caret", { "nb-sidebar-menu-item__caret--expanded": B.value }]),
|
|
129
|
-
name: C(O),
|
|
130
|
-
size: 12
|
|
131
|
-
}, null, 8, ["class", "name"])) : c("", !0)
|
|
132
|
-
], 64)) : e.badge === void 0 ? c("", !0) : (g(), l("span", {
|
|
133
|
-
key: 2,
|
|
134
|
-
class: m(["nb-sidebar-menu-item__badge-dot", [`nb-sidebar-menu-item__badge-dot--${e.badgeVariant}`]]),
|
|
135
|
-
title: String(e.badge)
|
|
136
|
-
}, null, 10, j))]),
|
|
137
|
-
_: 1
|
|
138
|
-
}, 16, [
|
|
139
|
-
"class",
|
|
140
|
-
"type",
|
|
141
|
-
"to",
|
|
142
|
-
"disabled",
|
|
143
|
-
"aria-disabled",
|
|
144
|
-
"aria-expanded",
|
|
145
|
-
"aria-label"
|
|
146
|
-
])),
|
|
147
|
-
z.value && L.value === "verbose" ? D((g(), l("ul", M, [y(n.$slots, "default", {}, void 0, !0)], 512)), [[T, B.value]]) : c("", !0),
|
|
148
|
-
L.value === "compact" && Y.value ? (g(), s(a, {
|
|
149
|
-
key: 1,
|
|
150
|
-
to: "body"
|
|
151
|
-
}, [u("div", {
|
|
152
|
-
class: "nb-sidebar-menu-item__flyout",
|
|
153
|
-
style: h(X.value),
|
|
154
|
-
onMouseenter: ne,
|
|
155
|
-
onMouseleave: re
|
|
156
|
-
}, [u("div", N, [u("span", P, x(e.label), 1), e.badge === void 0 ? c("", !0) : (g(), l("span", {
|
|
157
|
-
key: 0,
|
|
158
|
-
class: m(["nb-sidebar-menu-item__badge", [`nb-sidebar-menu-item__badge--${e.badgeVariant}`]])
|
|
159
|
-
}, x(e.badge), 3))]), z.value ? (g(), s(k, {
|
|
160
|
-
key: 0,
|
|
161
|
-
variant: "verbose"
|
|
162
|
-
}, {
|
|
163
|
-
default: E(() => [u("ul", F, [y(n.$slots, "default", {}, void 0, !0)])]),
|
|
164
|
-
_: 3
|
|
165
|
-
})) : c("", !0)], 36)])) : c("", !0)
|
|
166
|
-
], 34));
|
|
167
|
-
}
|
|
168
|
-
}), [["__scopeId", "data-v-4a61ab32"]]);
|
|
169
|
-
//#endregion
|
|
170
|
-
export { I as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./chunk-D-qHiVGv.cjs`);const e=require(`./Icon-C8R_r_In.cjs`),t=require(`./NubiscoPlatformMark-fSckbyzw.cjs`),n=require(`./vue-i18n-BSi_lDPp.cjs`);let r=require(`vue`),i=require(`@nubisco/ui/icons/x`),a=require(`@nubisco/ui/icons/check`),o=require(`@nubisco/ui/icons/users`),s=require(`@nubisco/ui/icons/plus`),c=require(`@nubisco/ui/icons/user`),l=require(`@nubisco/ui/icons/sign-out`);var u=[`title`,`aria-label`,`aria-expanded`,`disabled`],d={class:`nb-user-menu__label`},f={class:`nb-user-menu__email`},p=[`disabled`,`onClick`],m={class:`nb-user-menu__account-main`},h={class:`nb-user-menu__account-email`},g={key:0,class:`nb-user-menu__account-name`},_={class:`nb-user-menu__brand`},v={class:`nb-user-menu__brand-line`},y={class:`nb-user-menu__brand-name`},b=`Nubisco Platform`,x=(0,r.defineComponent)({__name:`UserMenu`,props:{user:{},accounts:{default:void 0},accountsUnknown:{type:Boolean,default:!1},showAccountActions:{type:Boolean,default:!0},showProfile:{type:Boolean,default:!0},brand:{default:`footer`},placement:{default:`right-end`},disabled:{type:Boolean,default:!1}},emits:[`switch`,`remove`,`switch-account`,`add-account`,`profile`,`sign-out`,`open`,`close`],setup(x,{expose:S,emit:C}){let w={en:{ACCOUNT_MENU:`Account menu`,SIGNED_IN_AS:`Signed in as`,SWITCH_ACCOUNT:`Switch account`,USE_ANOTHER_ACCOUNT:`Use another account`,REMOVE_ACCOUNT:`Sign this account out of this browser`,PROFILE:`Profile`,SIGN_OUT:`Sign out`,poweredBy:`Powered by Nubisco Platform`},pt:{ACCOUNT_MENU:`Menu de conta`,SIGNED_IN_AS:`Sessão iniciada como`,SWITCH_ACCOUNT:`Mudar de conta`,USE_ANOTHER_ACCOUNT:`Usar outra conta`,REMOVE_ACCOUNT:`Terminar a sessão desta conta neste browser`,PROFILE:`Perfil`,SIGN_OUT:`Terminar sessão`,poweredBy:`Fornecido pela Nubisco Platform`}},{t:T,te:E,locale:D}=n.t({useScope:`global`});function O(e){if(E(e))return T(e);let t=e.slice(9);return w[String(D.value).toLowerCase().split(`-`)[0]]?.[t]??w.en[t]??e}let k=x,A=(0,r.computed)(()=>{let e=O(`userMenu.poweredBy`),t=e.indexOf(b);return t<0?{prefix:``,name:e}:{prefix:e.slice(0,t),name:e.slice(t)}}),j=C,M=(0,r.ref)(null),N=(0,r.ref)(null),P=(0,r.ref)(!1),F=(0,r.ref)({});function I(e){let t=e.name?.trim();if(t){let e=t.split(/\s+/);return((e[0]?.[0]??``)+(e.length>1?e[e.length-1]?.[0]??``:``)).toUpperCase()}return(e.email.split(`@`)[0]??``).slice(0,2).toUpperCase()}function L(){let e=M.value?.getBoundingClientRect();e&&(k.placement===`top-start`?F.value={left:`${Math.round(e.left)}px`,bottom:`${Math.round(window.innerHeight-e.top+8)}px`}:F.value={left:`${Math.round(e.right+12)}px`,bottom:`${Math.round(window.innerHeight-e.bottom)}px`})}function R(){k.disabled||(P.value?z():(L(),P.value=!0,j(`open`)))}function z(){P.value&&(P.value=!1,j(`close`))}function B(e){e.current||(z(),j(`switch`,e))}function V(e){j(`remove`,e)}function H(){z(),j(`switch-account`)}function U(){z(),j(`add-account`)}function W(){z(),j(`profile`)}function G(){z(),j(`sign-out`)}function K(e){if(!P.value)return;let t=e.target;M.value?.contains(t)||N.value?.contains(t)||z()}function q(e){e.key===`Escape`&&z()}return(0,r.onMounted)(()=>{document.addEventListener(`click`,K),document.addEventListener(`keydown`,q)}),(0,r.onBeforeUnmount)(()=>{document.removeEventListener(`click`,K),document.removeEventListener(`keydown`,q)}),S({open:P,toggle:R,close:z}),(n,b)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{ref_key:`rootRef`,ref:M,class:`nb-user-menu`},[(0,r.renderSlot)(n.$slots,`trigger`,{open:P.value,toggle:R},()=>[(0,r.createElementVNode)(`button`,{type:`button`,class:`nb-user-menu__avatar`,title:k.user.email,"aria-label":O(`userMenu.ACCOUNT_MENU`),"aria-haspopup":`menu`,"aria-expanded":P.value,disabled:x.disabled,onClick:R},(0,r.toDisplayString)(I(k.user)),9,u)]),((0,r.openBlock)(),(0,r.createBlock)(r.Teleport,{to:`body`},[(0,r.createVNode)(r.Transition,{name:`nb-user-menu-pop`},{default:(0,r.withCtx)(()=>[P.value?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{key:0,ref_key:`panelRef`,ref:N,class:`nb-user-menu__panel`,style:(0,r.normalizeStyle)(F.value),role:`menu`},[(0,r.createElementVNode)(`p`,d,(0,r.toDisplayString)(O(`userMenu.SIGNED_IN_AS`)),1),(0,r.createElementVNode)(`p`,f,(0,r.toDisplayString)(k.user.email),1),x.showAccountActions?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[b[0]||=(0,r.createElementVNode)(`div`,{class:`nb-user-menu__divider`,role:`separator`},null,-1),k.accounts&&k.accounts.length?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:0},(0,r.renderList)(k.accounts,t=>((0,r.openBlock)(),(0,r.createElementBlock)(`button`,{key:t.id,type:`button`,role:`menuitem`,class:(0,r.normalizeClass)([`nb-user-menu__account`,{"nb-user-menu__account--current":t.current}]),disabled:t.current,onClick:e=>B(t)},[(0,r.createElementVNode)(`span`,m,[(0,r.createElementVNode)(`span`,h,(0,r.toDisplayString)(t.email),1),t.name?((0,r.openBlock)(),(0,r.createElementBlock)(`span`,g,(0,r.toDisplayString)(t.name),1)):(0,r.createCommentVNode)(``,!0)]),t.current?((0,r.openBlock)(),(0,r.createBlock)(e.t,{key:0,name:(0,r.unref)(a.regular),size:14,class:`nb-user-menu__check`},null,8,[`name`])):t.removable===!1?(0,r.createCommentVNode)(``,!0):((0,r.openBlock)(),(0,r.createBlock)(e.t,{key:1,name:(0,r.unref)(i.regular),size:13,class:`nb-user-menu__remove`,title:O(`userMenu.REMOVE_ACCOUNT`),onClick:(0,r.withModifiers)(e=>V(t),[`stop`])},null,8,[`name`,`title`,`onClick`]))],10,p))),128)):k.accountsUnknown?((0,r.openBlock)(),(0,r.createElementBlock)(`button`,{key:1,type:`button`,role:`menuitem`,class:`nb-user-menu__action`,onClick:H},[(0,r.createVNode)(e.t,{name:(0,r.unref)(o.regular),size:15},null,8,[`name`]),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(O(`userMenu.SWITCH_ACCOUNT`)),1)])):(0,r.createCommentVNode)(``,!0),(0,r.createElementVNode)(`button`,{type:`button`,role:`menuitem`,class:`nb-user-menu__action`,onClick:U},[(0,r.createVNode)(e.t,{name:(0,r.unref)(s.regular),size:15},null,8,[`name`]),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(O(`userMenu.USE_ANOTHER_ACCOUNT`)),1)])],64)):(0,r.createCommentVNode)(``,!0),n.$slots.default?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:1},[b[1]||=(0,r.createElementVNode)(`div`,{class:`nb-user-menu__divider`,role:`separator`},null,-1),(0,r.renderSlot)(n.$slots,`default`,{close:z})],64)):(0,r.createCommentVNode)(``,!0),b[3]||=(0,r.createElementVNode)(`div`,{class:`nb-user-menu__divider`,role:`separator`},null,-1),x.showProfile?((0,r.openBlock)(),(0,r.createElementBlock)(`button`,{key:2,type:`button`,role:`menuitem`,class:`nb-user-menu__action`,onClick:W},[(0,r.createVNode)(e.t,{name:(0,r.unref)(c.regular),size:15},null,8,[`name`]),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(O(`userMenu.PROFILE`)),1)])):(0,r.createCommentVNode)(``,!0),(0,r.createElementVNode)(`button`,{type:`button`,role:`menuitem`,class:`nb-user-menu__action nb-user-menu__action--danger`,onClick:G},[(0,r.createVNode)(e.t,{name:(0,r.unref)(l.regular),size:15},null,8,[`name`]),(0,r.createTextVNode)(` `+(0,r.toDisplayString)(O(`userMenu.SIGN_OUT`)),1)]),k.brand===`none`?(0,r.createCommentVNode)(``,!0):((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:3},[b[2]||=(0,r.createElementVNode)(`div`,{class:`nb-user-menu__divider`,role:`separator`},null,-1),(0,r.renderSlot)(n.$slots,`brand`,{},()=>[(0,r.createElementVNode)(`p`,_,[(0,r.createVNode)(t.t,{size:13,class:`nb-user-menu__mark`}),(0,r.createElementVNode)(`span`,v,[(0,r.createTextVNode)((0,r.toDisplayString)(A.value.prefix),1),(0,r.createElementVNode)(`span`,y,(0,r.toDisplayString)(A.value.name),1)])])])],64))],4)):(0,r.createCommentVNode)(``,!0)]),_:3})]))],512))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return x}});
|
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./Icon-rREAqsu0.js";
|
|
2
|
-
import { t } from "./NubiscoPlatformMark-w4E95eRE.js";
|
|
3
|
-
import { t as n } from "./vue-i18n-KFH4YCAW.js";
|
|
4
|
-
import { Fragment as r, Teleport as i, Transition as ee, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, normalizeClass as p, normalizeStyle as m, onBeforeUnmount as h, onMounted as g, openBlock as _, ref as v, renderList as te, renderSlot as y, toDisplayString as b, unref as x, withCtx as S, withModifiers as ne } from "vue";
|
|
5
|
-
import { regular as re } from "@nubisco/ui/icons/x";
|
|
6
|
-
import { regular as C } from "@nubisco/ui/icons/check";
|
|
7
|
-
import { regular as w } from "@nubisco/ui/icons/users";
|
|
8
|
-
import { regular as T } from "@nubisco/ui/icons/plus";
|
|
9
|
-
import { regular as E } from "@nubisco/ui/icons/user";
|
|
10
|
-
import { regular as ie } from "@nubisco/ui/icons/sign-out";
|
|
11
|
-
//#region src/components/UserMenu.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var ae = [
|
|
13
|
-
"title",
|
|
14
|
-
"aria-label",
|
|
15
|
-
"aria-expanded",
|
|
16
|
-
"disabled"
|
|
17
|
-
], D = { class: "nb-user-menu__label" }, O = { class: "nb-user-menu__email" }, k = ["disabled", "onClick"], A = { class: "nb-user-menu__account-main" }, j = { class: "nb-user-menu__account-email" }, M = {
|
|
18
|
-
key: 0,
|
|
19
|
-
class: "nb-user-menu__account-name"
|
|
20
|
-
}, N = { class: "nb-user-menu__brand" }, P = { class: "nb-user-menu__brand-line" }, F = { class: "nb-user-menu__brand-name" }, I = "Nubisco Platform", L = /* @__PURE__ */ f({
|
|
21
|
-
__name: "UserMenu",
|
|
22
|
-
props: {
|
|
23
|
-
user: {},
|
|
24
|
-
accounts: { default: void 0 },
|
|
25
|
-
accountsUnknown: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: !1
|
|
28
|
-
},
|
|
29
|
-
showAccountActions: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: !0
|
|
32
|
-
},
|
|
33
|
-
showProfile: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: !0
|
|
36
|
-
},
|
|
37
|
-
brand: { default: "footer" },
|
|
38
|
-
placement: { default: "right-end" },
|
|
39
|
-
disabled: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
default: !1
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
emits: [
|
|
45
|
-
"switch",
|
|
46
|
-
"remove",
|
|
47
|
-
"switch-account",
|
|
48
|
-
"add-account",
|
|
49
|
-
"profile",
|
|
50
|
-
"sign-out",
|
|
51
|
-
"open",
|
|
52
|
-
"close"
|
|
53
|
-
],
|
|
54
|
-
setup(f, { expose: L, emit: R }) {
|
|
55
|
-
let z = {
|
|
56
|
-
en: {
|
|
57
|
-
ACCOUNT_MENU: "Account menu",
|
|
58
|
-
SIGNED_IN_AS: "Signed in as",
|
|
59
|
-
SWITCH_ACCOUNT: "Switch account",
|
|
60
|
-
USE_ANOTHER_ACCOUNT: "Use another account",
|
|
61
|
-
REMOVE_ACCOUNT: "Sign this account out of this browser",
|
|
62
|
-
PROFILE: "Profile",
|
|
63
|
-
SIGN_OUT: "Sign out",
|
|
64
|
-
poweredBy: "Powered by Nubisco Platform"
|
|
65
|
-
},
|
|
66
|
-
pt: {
|
|
67
|
-
ACCOUNT_MENU: "Menu de conta",
|
|
68
|
-
SIGNED_IN_AS: "Sessão iniciada como",
|
|
69
|
-
SWITCH_ACCOUNT: "Mudar de conta",
|
|
70
|
-
USE_ANOTHER_ACCOUNT: "Usar outra conta",
|
|
71
|
-
REMOVE_ACCOUNT: "Terminar a sessão desta conta neste browser",
|
|
72
|
-
PROFILE: "Perfil",
|
|
73
|
-
SIGN_OUT: "Terminar sessão",
|
|
74
|
-
poweredBy: "Fornecido pela Nubisco Platform"
|
|
75
|
-
}
|
|
76
|
-
}, { t: B, te: V, locale: oe } = n({ useScope: "global" });
|
|
77
|
-
function H(e) {
|
|
78
|
-
if (V(e)) return B(e);
|
|
79
|
-
let t = e.slice(9);
|
|
80
|
-
return z[String(oe.value).toLowerCase().split("-")[0]]?.[t] ?? z.en[t] ?? e;
|
|
81
|
-
}
|
|
82
|
-
let U = f, W = a(() => {
|
|
83
|
-
let e = H("userMenu.poweredBy"), t = e.indexOf(I);
|
|
84
|
-
return t < 0 ? {
|
|
85
|
-
prefix: "",
|
|
86
|
-
name: e
|
|
87
|
-
} : {
|
|
88
|
-
prefix: e.slice(0, t),
|
|
89
|
-
name: e.slice(t)
|
|
90
|
-
};
|
|
91
|
-
}), G = R, K = v(null), q = v(null), J = v(!1), Y = v({});
|
|
92
|
-
function se(e) {
|
|
93
|
-
let t = e.name?.trim();
|
|
94
|
-
if (t) {
|
|
95
|
-
let e = t.split(/\s+/);
|
|
96
|
-
return ((e[0]?.[0] ?? "") + (e.length > 1 ? e[e.length - 1]?.[0] ?? "" : "")).toUpperCase();
|
|
97
|
-
}
|
|
98
|
-
return (e.email.split("@")[0] ?? "").slice(0, 2).toUpperCase();
|
|
99
|
-
}
|
|
100
|
-
function ce() {
|
|
101
|
-
let e = K.value?.getBoundingClientRect();
|
|
102
|
-
e && (U.placement === "top-start" ? Y.value = {
|
|
103
|
-
left: `${Math.round(e.left)}px`,
|
|
104
|
-
bottom: `${Math.round(window.innerHeight - e.top + 8)}px`
|
|
105
|
-
} : Y.value = {
|
|
106
|
-
left: `${Math.round(e.right + 12)}px`,
|
|
107
|
-
bottom: `${Math.round(window.innerHeight - e.bottom)}px`
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
function X() {
|
|
111
|
-
U.disabled || (J.value ? Z() : (ce(), J.value = !0, G("open")));
|
|
112
|
-
}
|
|
113
|
-
function Z() {
|
|
114
|
-
J.value && (J.value = !1, G("close"));
|
|
115
|
-
}
|
|
116
|
-
function le(e) {
|
|
117
|
-
e.current || (Z(), G("switch", e));
|
|
118
|
-
}
|
|
119
|
-
function ue(e) {
|
|
120
|
-
G("remove", e);
|
|
121
|
-
}
|
|
122
|
-
function de() {
|
|
123
|
-
Z(), G("switch-account");
|
|
124
|
-
}
|
|
125
|
-
function fe() {
|
|
126
|
-
Z(), G("add-account");
|
|
127
|
-
}
|
|
128
|
-
function pe() {
|
|
129
|
-
Z(), G("profile");
|
|
130
|
-
}
|
|
131
|
-
function me() {
|
|
132
|
-
Z(), G("sign-out");
|
|
133
|
-
}
|
|
134
|
-
function Q(e) {
|
|
135
|
-
if (!J.value) return;
|
|
136
|
-
let t = e.target;
|
|
137
|
-
K.value?.contains(t) || q.value?.contains(t) || Z();
|
|
138
|
-
}
|
|
139
|
-
function $(e) {
|
|
140
|
-
e.key === "Escape" && Z();
|
|
141
|
-
}
|
|
142
|
-
return g(() => {
|
|
143
|
-
document.addEventListener("click", Q), document.addEventListener("keydown", $);
|
|
144
|
-
}), h(() => {
|
|
145
|
-
document.removeEventListener("click", Q), document.removeEventListener("keydown", $);
|
|
146
|
-
}), L({
|
|
147
|
-
open: J,
|
|
148
|
-
toggle: X,
|
|
149
|
-
close: Z
|
|
150
|
-
}), (n, a) => (_(), c("div", {
|
|
151
|
-
ref_key: "rootRef",
|
|
152
|
-
ref: K,
|
|
153
|
-
class: "nb-user-menu"
|
|
154
|
-
}, [y(n.$slots, "trigger", {
|
|
155
|
-
open: J.value,
|
|
156
|
-
toggle: X
|
|
157
|
-
}, () => [l("button", {
|
|
158
|
-
type: "button",
|
|
159
|
-
class: "nb-user-menu__avatar",
|
|
160
|
-
title: U.user.email,
|
|
161
|
-
"aria-label": H("userMenu.ACCOUNT_MENU"),
|
|
162
|
-
"aria-haspopup": "menu",
|
|
163
|
-
"aria-expanded": J.value,
|
|
164
|
-
disabled: f.disabled,
|
|
165
|
-
onClick: X
|
|
166
|
-
}, b(se(U.user)), 9, ae)]), (_(), o(i, { to: "body" }, [d(ee, { name: "nb-user-menu-pop" }, {
|
|
167
|
-
default: S(() => [J.value ? (_(), c("div", {
|
|
168
|
-
key: 0,
|
|
169
|
-
ref_key: "panelRef",
|
|
170
|
-
ref: q,
|
|
171
|
-
class: "nb-user-menu__panel",
|
|
172
|
-
style: m(Y.value),
|
|
173
|
-
role: "menu"
|
|
174
|
-
}, [
|
|
175
|
-
l("p", D, b(H("userMenu.SIGNED_IN_AS")), 1),
|
|
176
|
-
l("p", O, b(U.user.email), 1),
|
|
177
|
-
f.showAccountActions ? (_(), c(r, { key: 0 }, [
|
|
178
|
-
a[0] ||= l("div", {
|
|
179
|
-
class: "nb-user-menu__divider",
|
|
180
|
-
role: "separator"
|
|
181
|
-
}, null, -1),
|
|
182
|
-
U.accounts && U.accounts.length ? (_(!0), c(r, { key: 0 }, te(U.accounts, (t) => (_(), c("button", {
|
|
183
|
-
key: t.id,
|
|
184
|
-
type: "button",
|
|
185
|
-
role: "menuitem",
|
|
186
|
-
class: p(["nb-user-menu__account", { "nb-user-menu__account--current": t.current }]),
|
|
187
|
-
disabled: t.current,
|
|
188
|
-
onClick: (e) => le(t)
|
|
189
|
-
}, [l("span", A, [l("span", j, b(t.email), 1), t.name ? (_(), c("span", M, b(t.name), 1)) : s("", !0)]), t.current ? (_(), o(e, {
|
|
190
|
-
key: 0,
|
|
191
|
-
name: x(C),
|
|
192
|
-
size: 14,
|
|
193
|
-
class: "nb-user-menu__check"
|
|
194
|
-
}, null, 8, ["name"])) : t.removable === !1 ? s("", !0) : (_(), o(e, {
|
|
195
|
-
key: 1,
|
|
196
|
-
name: x(re),
|
|
197
|
-
size: 13,
|
|
198
|
-
class: "nb-user-menu__remove",
|
|
199
|
-
title: H("userMenu.REMOVE_ACCOUNT"),
|
|
200
|
-
onClick: ne((e) => ue(t), ["stop"])
|
|
201
|
-
}, null, 8, [
|
|
202
|
-
"name",
|
|
203
|
-
"title",
|
|
204
|
-
"onClick"
|
|
205
|
-
]))], 10, k))), 128)) : U.accountsUnknown ? (_(), c("button", {
|
|
206
|
-
key: 1,
|
|
207
|
-
type: "button",
|
|
208
|
-
role: "menuitem",
|
|
209
|
-
class: "nb-user-menu__action",
|
|
210
|
-
onClick: de
|
|
211
|
-
}, [d(e, {
|
|
212
|
-
name: x(w),
|
|
213
|
-
size: 15
|
|
214
|
-
}, null, 8, ["name"]), u(" " + b(H("userMenu.SWITCH_ACCOUNT")), 1)])) : s("", !0),
|
|
215
|
-
l("button", {
|
|
216
|
-
type: "button",
|
|
217
|
-
role: "menuitem",
|
|
218
|
-
class: "nb-user-menu__action",
|
|
219
|
-
onClick: fe
|
|
220
|
-
}, [d(e, {
|
|
221
|
-
name: x(T),
|
|
222
|
-
size: 15
|
|
223
|
-
}, null, 8, ["name"]), u(" " + b(H("userMenu.USE_ANOTHER_ACCOUNT")), 1)])
|
|
224
|
-
], 64)) : s("", !0),
|
|
225
|
-
n.$slots.default ? (_(), c(r, { key: 1 }, [a[1] ||= l("div", {
|
|
226
|
-
class: "nb-user-menu__divider",
|
|
227
|
-
role: "separator"
|
|
228
|
-
}, null, -1), y(n.$slots, "default", { close: Z })], 64)) : s("", !0),
|
|
229
|
-
a[3] ||= l("div", {
|
|
230
|
-
class: "nb-user-menu__divider",
|
|
231
|
-
role: "separator"
|
|
232
|
-
}, null, -1),
|
|
233
|
-
f.showProfile ? (_(), c("button", {
|
|
234
|
-
key: 2,
|
|
235
|
-
type: "button",
|
|
236
|
-
role: "menuitem",
|
|
237
|
-
class: "nb-user-menu__action",
|
|
238
|
-
onClick: pe
|
|
239
|
-
}, [d(e, {
|
|
240
|
-
name: x(E),
|
|
241
|
-
size: 15
|
|
242
|
-
}, null, 8, ["name"]), u(" " + b(H("userMenu.PROFILE")), 1)])) : s("", !0),
|
|
243
|
-
l("button", {
|
|
244
|
-
type: "button",
|
|
245
|
-
role: "menuitem",
|
|
246
|
-
class: "nb-user-menu__action nb-user-menu__action--danger",
|
|
247
|
-
onClick: me
|
|
248
|
-
}, [d(e, {
|
|
249
|
-
name: x(ie),
|
|
250
|
-
size: 15
|
|
251
|
-
}, null, 8, ["name"]), u(" " + b(H("userMenu.SIGN_OUT")), 1)]),
|
|
252
|
-
U.brand === "none" ? s("", !0) : (_(), c(r, { key: 3 }, [a[2] ||= l("div", {
|
|
253
|
-
class: "nb-user-menu__divider",
|
|
254
|
-
role: "separator"
|
|
255
|
-
}, null, -1), y(n.$slots, "brand", {}, () => [l("p", N, [d(t, {
|
|
256
|
-
size: 13,
|
|
257
|
-
class: "nb-user-menu__mark"
|
|
258
|
-
}), l("span", P, [u(b(W.value.prefix), 1), l("span", F, b(W.value.name), 1)])])])], 64))
|
|
259
|
-
], 4)) : s("", !0)]),
|
|
260
|
-
_: 3
|
|
261
|
-
})]))], 512));
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
//#endregion
|
|
265
|
-
export { L as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|