@nubisco/ui 5.54.0 → 5.55.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/{AccordionItem--XeLRz2P.js → AccordionItem-BY-p8UkV.js} +1 -1
- package/dist/{AccordionItem-BYSH6dZK.cjs → AccordionItem-p0mYXIj8.cjs} +1 -1
- package/dist/{ActionGroup-Cn22xj1t.js → ActionGroup-CjRSKyOa.js} +1 -1
- package/dist/{ActionGroup-0rG92kFk.cjs → ActionGroup-DIMZhC7N.cjs} +1 -1
- package/dist/AiLabel-BDccQ2iQ.js +242 -0
- package/dist/AiLabel-jRrBTu6c.cjs +1 -0
- package/dist/{AiProvider-CLtCD_UR.cjs → AiProvider-CGB9EiSf.cjs} +1 -1
- package/dist/{AiProvider-gprbR5ts.js → AiProvider-CMbPWtU-.js} +2 -2
- package/dist/{BatchActions-Ckx8kyZt.js → BatchActions-Kr2S6CJI.js} +1 -1
- package/dist/{BatchActions-6IO5GRFm.cjs → BatchActions-jfvfpZeT.cjs} +1 -1
- package/dist/{Board-BdqGOVNF.js → Board-C3_cXRl6.js} +177 -176
- package/dist/Board-D6A-irdx.cjs +1 -0
- package/dist/{Breadcrumbs-BzyDVvEk.cjs → Breadcrumbs-0rRFiO31.cjs} +1 -1
- package/dist/{Breadcrumbs-Bc-acmPE.js → Breadcrumbs-DqagVknq.js} +1 -1
- package/dist/{Briefing-DwKWCOGm.cjs → Briefing-B-O-9bhN.cjs} +1 -1
- package/dist/{Briefing-BiEICh1u.js → Briefing-DNH-707q.js} +1 -1
- package/dist/{ChatMessage-1L_xCXZF.cjs → ChatMessage-B45Xhl8x.cjs} +1 -1
- package/dist/{ChatMessage-C2Ecm175.js → ChatMessage-BDOdvI4h.js} +1 -1
- package/dist/{ChatThread-B_F3xTdE.cjs → ChatThread-B7F1r4t4.cjs} +1 -1
- package/dist/{ChatThread-COdOb1rH.js → ChatThread-DqvsnVOr.js} +1 -1
- package/dist/CommandPalette-BaRqoURY.cjs +1 -0
- package/dist/CommandPalette-DWv1UV8r.js +294 -0
- package/dist/{Confirm-Baz2WG7b.cjs → Confirm-B5vMzPbN.cjs} +1 -1
- package/dist/{Confirm-CvMuXK9Q.js → Confirm-C4lT-6HD.js} +1 -1
- package/dist/{DataTable-B8THDBLS.js → DataTable-CcwD0PSJ.js} +2 -2
- package/dist/{DataTable-DeFzOlcP.cjs → DataTable-xEw-NvHM.cjs} +1 -1
- package/dist/{DatePicker-BrUXcNUj.js → DatePicker-3pCNky8d.js} +234 -230
- package/dist/DatePicker-BrMicYUx.cjs +1 -0
- package/dist/FloatingToolbar-BV-iGNxe.js +120 -0
- package/dist/FloatingToolbar-C8xB4BzH.cjs +1 -0
- package/dist/{ImagePicker-vhg7b-UL.cjs → ImagePicker-5qPI77Jo.cjs} +1 -1
- package/dist/{ImagePicker-LhpR7jjR.js → ImagePicker-BnHg403Q.js} +1 -1
- package/dist/InfoHint-CdluaJqE.cjs +1 -0
- package/dist/InfoHint-zMuSw_99.js +182 -0
- package/dist/{InlineLoading-CA0_IT29.cjs → InlineLoading-CqGrNWHf.cjs} +1 -1
- package/dist/{InlineLoading-Cknqq0vv.js → InlineLoading-_j2KKhNQ.js} +1 -1
- package/dist/Menu-CWxBEMC4.js +193 -0
- package/dist/Menu-D0TerdRm.cjs +1 -0
- package/dist/{MenuBarItem-yr5aizl3.js → MenuBarItem-BYh4YWR4.js} +1 -1
- package/dist/{MenuBarItem-DlnIAhRw.cjs → MenuBarItem-DTOqacvg.cjs} +1 -1
- package/dist/Modal-CmGFLEo4.cjs +1 -0
- package/dist/{Modal-CESCi2dE.js → Modal-DwL90AoV.js} +73 -69
- package/dist/NotificationCenter-EMlV-oPh.cjs +1 -0
- package/dist/{NotificationCenter-DkGc0ETD.js → NotificationCenter-YZnPMH7c.js} +217 -213
- package/dist/{OverflowMenu-BWZ7c8oI.js → OverflowMenu-DliuDrTK.js} +1 -1
- package/dist/{OverflowMenu-C8q28FrD.cjs → OverflowMenu-DuRgj1DU.cjs} +1 -1
- package/dist/{PageHeader-DElq_kdh.cjs → PageHeader-BoEdR_T5.cjs} +1 -1
- package/dist/{PageHeader-DOYN9sto.js → PageHeader-c6117xYf.js} +1 -1
- package/dist/{Pagination-9mPN8ych.cjs → Pagination-B3lmxggo.cjs} +1 -1
- package/dist/{Pagination-CxBHFwy0.js → Pagination-DwAc-4d9.js} +1 -1
- package/dist/Select-CDs-7QtW.js +619 -0
- package/dist/Select-CJqwMI69.cjs +1 -0
- package/dist/{SidebarCollapseToggle-DraqbhwM.js → SidebarCollapseToggle-C38R19gG.js} +1 -1
- package/dist/{SidebarCollapseToggle-CABmF-PC.cjs → SidebarCollapseToggle-DOck3Txy.cjs} +1 -1
- package/dist/SidebarMenuItem-DzJ_R2__.cjs +1 -0
- package/dist/SidebarMenuItem-E410HTei.js +302 -0
- package/dist/Spinner-BlzVODzE.js +161 -0
- package/dist/Spinner-Bpfgl-mN.cjs +1 -0
- package/dist/{Stat-BCvXYr-z.cjs → Stat-BByeMKkT.cjs} +1 -1
- package/dist/{Stat-No3RhGB3.js → Stat-DWliDbWE.js} +1 -1
- package/dist/Submenu-BkHGYo7X.js +168 -0
- package/dist/Submenu-CCQnBpln.cjs +1 -0
- package/dist/{SuggestionList-Cxy4jjjd.cjs → SuggestionList-C61Dj6en.cjs} +1 -1
- package/dist/{SuggestionList-Dv4yQAi-.js → SuggestionList-D48Ojcf3.js} +1 -1
- package/dist/Toaster-Dwjm0bsR.js +285 -0
- package/dist/Toaster-aJJvxlEr.cjs +1 -0
- package/dist/{UserMenu-CjmhyTwN.js → UserMenu-BTihjCKC.js} +94 -90
- package/dist/UserMenu-CHkbByFS.cjs +1 -0
- package/dist/{Walkthrough-DYYqtpwJ.js → Walkthrough-BqGB1yaX.js} +63 -59
- package/dist/Walkthrough-sGAypY5d.cjs +1 -0
- package/dist/all.cjs +1 -1
- package/dist/all.mjs +284 -283
- package/dist/components/AccordionItem.cjs +1 -1
- package/dist/components/AccordionItem.mjs +1 -1
- package/dist/components/ActionGroup.cjs +1 -1
- package/dist/components/ActionGroup.mjs +1 -1
- package/dist/components/AiLabel.cjs +1 -1
- package/dist/components/AiLabel.mjs +1 -1
- package/dist/components/AiLabel.vue.d.ts.map +1 -1
- package/dist/components/AiProvider.cjs +1 -1
- package/dist/components/AiProvider.mjs +1 -1
- package/dist/components/BatchActions.cjs +1 -1
- package/dist/components/BatchActions.mjs +1 -1
- package/dist/components/Board.cjs +1 -1
- package/dist/components/Board.mjs +1 -1
- package/dist/components/Board.vue.d.ts.map +1 -1
- package/dist/components/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs.mjs +1 -1
- package/dist/components/Briefing.cjs +1 -1
- package/dist/components/Briefing.mjs +1 -1
- package/dist/components/ChatMessage.cjs +1 -1
- package/dist/components/ChatMessage.mjs +1 -1
- package/dist/components/ChatThread.cjs +1 -1
- package/dist/components/ChatThread.mjs +1 -1
- package/dist/components/CommandPalette.cjs +1 -1
- package/dist/components/CommandPalette.mjs +1 -1
- package/dist/components/CommandPalette.vue.d.ts.map +1 -1
- package/dist/components/Confirm.cjs +1 -1
- package/dist/components/Confirm.mjs +1 -1
- package/dist/components/DataTable.cjs +1 -1
- package/dist/components/DataTable.mjs +1 -1
- package/dist/components/DatePicker.cjs +1 -1
- package/dist/components/DatePicker.mjs +1 -1
- package/dist/components/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/FloatingToolbar.cjs +1 -1
- package/dist/components/FloatingToolbar.mjs +1 -1
- package/dist/components/FloatingToolbar.vue.d.ts.map +1 -1
- package/dist/components/ImagePicker.cjs +1 -1
- package/dist/components/ImagePicker.mjs +1 -1
- package/dist/components/InfoHint.cjs +1 -1
- package/dist/components/InfoHint.mjs +1 -1
- package/dist/components/InfoHint.vue.d.ts.map +1 -1
- package/dist/components/InlineLoading.cjs +1 -1
- package/dist/components/InlineLoading.mjs +1 -1
- package/dist/components/Menu.cjs +1 -1
- package/dist/components/Menu.mjs +1 -1
- package/dist/components/Menu.vue.d.ts.map +1 -1
- package/dist/components/MenuBarItem.cjs +1 -1
- package/dist/components/MenuBarItem.mjs +1 -1
- package/dist/components/Modal.cjs +1 -1
- package/dist/components/Modal.mjs +1 -1
- package/dist/components/Modal.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenter.cjs +1 -1
- package/dist/components/NotificationCenter.mjs +1 -1
- package/dist/components/NotificationCenter.vue.d.ts.map +1 -1
- package/dist/components/OverflowMenu.cjs +1 -1
- package/dist/components/OverflowMenu.mjs +1 -1
- package/dist/components/PageHeader.cjs +1 -1
- package/dist/components/PageHeader.mjs +1 -1
- package/dist/components/Pagination.cjs +1 -1
- package/dist/components/Pagination.mjs +1 -1
- package/dist/components/Select.cjs +1 -1
- package/dist/components/Select.mjs +1 -1
- package/dist/components/Select.vue.d.ts.map +1 -1
- package/dist/components/SidebarCollapseToggle.cjs +1 -1
- package/dist/components/SidebarCollapseToggle.mjs +1 -1
- package/dist/components/SidebarMenuItem.cjs +1 -1
- package/dist/components/SidebarMenuItem.mjs +1 -1
- package/dist/components/SidebarMenuItem.vue.d.ts.map +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/Spinner.mjs +1 -1
- package/dist/components/Spinner.vue.d.ts.map +1 -1
- package/dist/components/Stat.cjs +1 -1
- package/dist/components/Stat.mjs +1 -1
- package/dist/components/Submenu.cjs +1 -1
- package/dist/components/Submenu.mjs +1 -1
- package/dist/components/Submenu.vue.d.ts.map +1 -1
- package/dist/components/SuggestionList.cjs +1 -1
- package/dist/components/SuggestionList.mjs +1 -1
- package/dist/components/Toaster.cjs +1 -1
- package/dist/components/Toaster.mjs +1 -1
- package/dist/components/Toaster.vue.d.ts.map +1 -1
- package/dist/components/UserMenu.cjs +1 -1
- package/dist/components/UserMenu.mjs +1 -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/Walkthrough.vue.d.ts.map +1 -1
- package/dist/composables/useConfirm.composable.cjs +1 -1
- package/dist/composables/useConfirm.composable.mjs +2 -2
- package/dist/composables/useTeleportReady.composable.cjs +1 -0
- package/dist/composables/useTeleportReady.composable.d.ts +30 -0
- package/dist/composables/useTeleportReady.composable.d.ts.map +1 -0
- package/dist/composables/useTeleportReady.composable.mjs +11 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +152 -151
- package/dist/main-BMIeIxGV.cjs +4 -0
- package/dist/{main-D6qY7QeE.js → main-BXz7vG2i.js} +167 -157
- package/dist/main.d.ts +10 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/styles/AiLabel.css +1 -1
- package/dist/styles/FloatingToolbar.css +1 -1
- package/dist/styles/InfoHint.css +1 -1
- package/dist/styles/Modal.css +1 -1
- package/dist/styles/SidebarMenuItem.css +1 -1
- package/dist/styles/Spinner.css +1 -1
- package/dist/styles/Toaster.css +1 -1
- package/dist/styles/Walkthrough.css +1 -1
- package/dist/ui.css +8 -8
- package/package.json +1 -1
- package/dist/AiLabel-AGSSBanb.cjs +0 -1
- package/dist/AiLabel-D32aNf1F.js +0 -240
- package/dist/Board-DtOWyvKh.cjs +0 -1
- package/dist/CommandPalette-CC_Aj4Uh.cjs +0 -1
- package/dist/CommandPalette-zqTMjpm8.js +0 -290
- package/dist/DatePicker-B5YRb64p.cjs +0 -1
- package/dist/FloatingToolbar-BikX_AsP.js +0 -116
- package/dist/FloatingToolbar-DWVY8Fxo.cjs +0 -1
- package/dist/InfoHint-BEzkNQTM.cjs +0 -1
- package/dist/InfoHint-BlHxrTw6.js +0 -178
- package/dist/Menu-7EgnchVu.js +0 -189
- package/dist/Menu-Bs2Co1sl.cjs +0 -1
- package/dist/Modal-C_EWDvmH.cjs +0 -1
- package/dist/NotificationCenter-DxZgHQyt.cjs +0 -1
- package/dist/Select-7gJ3_fWh.js +0 -615
- package/dist/Select-Dg4HSHOu.cjs +0 -1
- package/dist/SidebarMenuItem-DQRQtqrp.js +0 -300
- package/dist/SidebarMenuItem-Dwk7vKN5.cjs +0 -1
- package/dist/Spinner-DYFhiTB1.js +0 -160
- package/dist/Spinner-j13gRoUF.cjs +0 -1
- package/dist/Submenu-BDs-yAqv.js +0 -164
- package/dist/Submenu-BLjx2kWl.cjs +0 -1
- package/dist/Toaster-ByObLDkk.js +0 -284
- package/dist/Toaster-CJAbZ9pv.cjs +0 -1
- package/dist/UserMenu-BjSO_Uml.cjs +0 -1
- package/dist/Walkthrough-DxAIdo3M.cjs +0 -1
- package/dist/main-Cs0FFBfV.cjs +0 -4
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { t as e } from "./Button-DmJ_J3UO.js";
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as a } from "./
|
|
7
|
-
import { t as o } from "./
|
|
8
|
-
import { t as s } from "./
|
|
9
|
-
import { t as c } from "./
|
|
10
|
-
import {
|
|
2
|
+
import { useTeleportReady as t } from "./composables/useTeleportReady.composable.mjs";
|
|
3
|
+
import { t as n } from "./Icon-B2tiGiqZ.js";
|
|
4
|
+
import { usePhoneLayout as r } from "./composables/usePhoneLayout.composable.mjs";
|
|
5
|
+
import { useNbStrings as i } from "./composables/useNbStrings.composable.mjs";
|
|
6
|
+
import { t as a } from "./Spinner-BlzVODzE.js";
|
|
7
|
+
import { t as o } from "./EmptyState-DE1pPuw-.js";
|
|
8
|
+
import { t as s } from "./CloseButton-CAPfd6yf.js";
|
|
9
|
+
import { t as c } from "./Skeleton-DFi5DNiP.js";
|
|
10
|
+
import { t as l } from "./NotificationCenterItem-Hf0S6Jls.js";
|
|
11
|
+
import { Fragment as u, Teleport as ee, Transition as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createSlots as te, createTextVNode as ne, createVNode as _, defineComponent as v, mergeProps as re, nextTick as y, normalizeClass as ie, normalizeStyle as ae, onBeforeUnmount as oe, openBlock as b, ref as x, renderList as se, renderSlot as S, toDisplayString as C, unref as ce, useId as le, useSlots as ue, watch as w, withCtx as T } from "vue";
|
|
11
12
|
import { regular as de } from "@nubisco/ui/icons/warning-circle";
|
|
12
13
|
import * as fe from "@nubisco/ui/icons/bell";
|
|
13
14
|
//#region src/components/NotificationCenter.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -24,30 +25,30 @@ var pe = {
|
|
|
24
25
|
}, xe = {
|
|
25
26
|
key: 5,
|
|
26
27
|
class: "nb-notification-center__footer"
|
|
27
|
-
},
|
|
28
|
+
}, E = /* @__PURE__ */ new Set(), D = 8, O = 8, k = 96, A = 88, j = 200;
|
|
28
29
|
function Se(e, { align: t, side: n, width: r, maxHeight: i, viewport: a }) {
|
|
29
30
|
let o = e.left + e.width;
|
|
30
|
-
if (n === "right" && a.width - o -
|
|
31
|
-
let n = e.top + e.height, r = t === "end" ? n -
|
|
31
|
+
if (n === "right" && a.width - o - D - O >= r) {
|
|
32
|
+
let n = e.top + e.height, r = t === "end" ? n - O : a.height - e.top - O, s = Math.max(A + k, r), c = Math.min(i + k, s), l = Math.max(A, Math.min(i, s - k));
|
|
32
33
|
return t === "end" ? {
|
|
33
|
-
top: Math.max(
|
|
34
|
-
bottom: Math.max(
|
|
35
|
-
left: o +
|
|
34
|
+
top: Math.max(O, n - c),
|
|
35
|
+
bottom: Math.max(O, a.height - n),
|
|
36
|
+
left: o + D,
|
|
36
37
|
side: "right",
|
|
37
38
|
maxListHeight: l
|
|
38
39
|
} : {
|
|
39
|
-
top: Math.max(
|
|
40
|
-
left: o +
|
|
40
|
+
top: Math.max(O, Math.min(e.top, a.height - O - c)),
|
|
41
|
+
left: o + D,
|
|
41
42
|
side: "right",
|
|
42
43
|
maxListHeight: l
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
|
-
let s = t === "start" ? e.left : e.left + e.width - r, c = Math.min(Math.max(s,
|
|
46
|
+
let s = t === "start" ? e.left : e.left + e.width - r, c = Math.min(Math.max(s, O), Math.max(O, a.width - r - O)), l = e.top + e.height, u = a.height - l - D - O, ee = e.top - D - O, d = u < j && ee > u ? "top" : "bottom", f = Math.max(A, d === "top" ? ee : u), p = Math.max(A, Math.min(i, f - k)), m = Math.min(i + k, f);
|
|
46
47
|
return {
|
|
47
|
-
top:
|
|
48
|
+
top: d === "top" ? Math.max(O, e.top - D - m) : l + D,
|
|
48
49
|
left: c,
|
|
49
|
-
side:
|
|
50
|
-
maxListHeight:
|
|
50
|
+
side: d,
|
|
51
|
+
maxListHeight: p
|
|
51
52
|
};
|
|
52
53
|
}
|
|
53
54
|
function Ce(e, t) {
|
|
@@ -55,7 +56,7 @@ function Ce(e, t) {
|
|
|
55
56
|
}
|
|
56
57
|
//#endregion
|
|
57
58
|
//#region src/components/NotificationCenter.vue
|
|
58
|
-
var
|
|
59
|
+
var M = /* @__PURE__ */ v({
|
|
59
60
|
__name: "NotificationCenter",
|
|
60
61
|
props: {
|
|
61
62
|
items: { default: () => [] },
|
|
@@ -134,50 +135,50 @@ var j = /* @__PURE__ */ v({
|
|
|
134
135
|
"mark-all-read",
|
|
135
136
|
"retry"
|
|
136
137
|
],
|
|
137
|
-
setup(v, { expose:
|
|
138
|
-
let
|
|
139
|
-
if (typeof
|
|
140
|
-
if (!
|
|
141
|
-
}),
|
|
142
|
-
if (
|
|
143
|
-
let e =
|
|
144
|
-
return
|
|
145
|
-
}),
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
!!
|
|
149
|
-
|
|
138
|
+
setup(v, { expose: D, emit: O }) {
|
|
139
|
+
let k = t(), A = i(), j = v, M = f(() => j.icon ?? fe), N = O, P = ue(), F = `nb-notification-center-${le()}`, we = `${F}-title`, Te = `${F}-trigger`, I = `${F}-error`, L = x(null), Ee = x(null), R = x(null), z = x(null), De = x(!1), B = f(() => j.open === void 0 ? De.value : j.open), V = f(() => typeof j.unreadCount == "number" ? Math.max(0, j.unreadCount) : j.items.filter((e) => !e.read).length), Oe = f(() => V.value > j.maxCount ? `${j.maxCount}+` : String(V.value)), ke = f(() => V.value > 0 ? `${j.label}, ${j.formatUnread(V.value)}` : j.label), Ae = f(() => {
|
|
140
|
+
if (typeof j.itemCount == "number") return Math.max(0, j.itemCount);
|
|
141
|
+
if (!P.default) return j.items.length;
|
|
142
|
+
}), je = f(() => (Ae.value ?? 0) > 0), H = f(() => {
|
|
143
|
+
if (j.loading) return "loading";
|
|
144
|
+
let e = Ae.value;
|
|
145
|
+
return j.error && (e === void 0 || e === 0) ? "error" : e === void 0 || e > 0 ? "list" : "empty";
|
|
146
|
+
}), Me = f(() => j.error && !j.loading && H.value === "list" && je.value);
|
|
147
|
+
x(!1), w(() => [
|
|
148
|
+
B.value,
|
|
149
|
+
!!P.default,
|
|
150
|
+
j.itemCount
|
|
150
151
|
], ([e, t, n]) => {}, { immediate: !0 });
|
|
151
|
-
function
|
|
152
|
-
|
|
152
|
+
function Ne() {
|
|
153
|
+
N("retry");
|
|
153
154
|
}
|
|
154
155
|
let Pe = f(() => ({
|
|
155
156
|
id: Te,
|
|
156
157
|
"aria-haspopup": "dialog",
|
|
157
|
-
"aria-expanded":
|
|
158
|
-
"aria-controls":
|
|
159
|
-
"aria-label":
|
|
160
|
-
disabled:
|
|
158
|
+
"aria-expanded": B.value ? "true" : "false",
|
|
159
|
+
"aria-controls": B.value ? F : void 0,
|
|
160
|
+
"aria-label": ke.value,
|
|
161
|
+
disabled: j.disabled || void 0
|
|
161
162
|
})), Fe = f(() => ({
|
|
162
163
|
type: "button",
|
|
163
|
-
disabled:
|
|
164
|
-
"aria-disabled":
|
|
165
|
-
"aria-busy":
|
|
166
|
-
onClick:
|
|
167
|
-
})), Ie = f(() =>
|
|
164
|
+
disabled: V.value === 0 && !j.markAllPending,
|
|
165
|
+
"aria-disabled": j.markAllPending ? "true" : void 0,
|
|
166
|
+
"aria-busy": j.markAllPending ? "true" : void 0,
|
|
167
|
+
onClick: st
|
|
168
|
+
})), Ie = f(() => Me.value || H.value === "error" ? I : void 0);
|
|
168
169
|
function Le(e) {
|
|
169
170
|
if (!e) {
|
|
170
|
-
|
|
171
|
+
R.value = null;
|
|
171
172
|
return;
|
|
172
173
|
}
|
|
173
174
|
let t = e instanceof HTMLElement ? e : e.$el;
|
|
174
|
-
|
|
175
|
+
R.value = t instanceof HTMLElement ? t : null;
|
|
175
176
|
}
|
|
176
|
-
let
|
|
177
|
+
let U = x({
|
|
177
178
|
top: 0,
|
|
178
179
|
left: 0,
|
|
179
180
|
side: "bottom",
|
|
180
|
-
maxListHeight:
|
|
181
|
+
maxListHeight: j.maxHeight
|
|
181
182
|
});
|
|
182
183
|
function Re() {
|
|
183
184
|
return {
|
|
@@ -185,77 +186,77 @@ var j = /* @__PURE__ */ v({
|
|
|
185
186
|
height: window.innerHeight
|
|
186
187
|
};
|
|
187
188
|
}
|
|
188
|
-
function
|
|
189
|
-
let e =
|
|
190
|
-
e && (
|
|
191
|
-
align:
|
|
192
|
-
side:
|
|
193
|
-
width:
|
|
194
|
-
maxHeight:
|
|
189
|
+
function ze() {
|
|
190
|
+
let e = L.value?.getBoundingClientRect();
|
|
191
|
+
e && (U.value = Se(e, {
|
|
192
|
+
align: j.align,
|
|
193
|
+
side: j.side,
|
|
194
|
+
width: j.width,
|
|
195
|
+
maxHeight: j.maxHeight,
|
|
195
196
|
viewport: Re()
|
|
196
197
|
}));
|
|
197
198
|
}
|
|
198
|
-
let { phone:
|
|
199
|
-
if (!
|
|
200
|
-
top: `${Math.round(
|
|
201
|
-
left: `${Math.round(
|
|
202
|
-
width: `${
|
|
199
|
+
let { phone: Be } = r(), W = f(() => Be.value), Ve = f(() => {
|
|
200
|
+
if (!W.value) return U.value.bottom === void 0 ? {
|
|
201
|
+
top: `${Math.round(U.value.top)}px`,
|
|
202
|
+
left: `${Math.round(U.value.left)}px`,
|
|
203
|
+
width: `${j.width}px`
|
|
203
204
|
} : {
|
|
204
|
-
bottom: `${Math.round(
|
|
205
|
-
left: `${Math.round(
|
|
206
|
-
width: `${
|
|
205
|
+
bottom: `${Math.round(U.value.bottom)}px`,
|
|
206
|
+
left: `${Math.round(U.value.left)}px`,
|
|
207
|
+
width: `${j.width}px`
|
|
207
208
|
};
|
|
208
|
-
}),
|
|
209
|
-
"nb-notification-center__panel--sheet":
|
|
210
|
-
"nb-notification-center__panel--start":
|
|
211
|
-
"nb-notification-center__panel--above": !
|
|
212
|
-
"nb-notification-center__panel--beside": !
|
|
209
|
+
}), He = f(() => W.value ? void 0 : { maxHeight: `${Math.round(U.value.maxListHeight)}px` }), Ue = f(() => ({
|
|
210
|
+
"nb-notification-center__panel--sheet": W.value,
|
|
211
|
+
"nb-notification-center__panel--start": j.align === "start",
|
|
212
|
+
"nb-notification-center__panel--above": !W.value && U.value.side === "top",
|
|
213
|
+
"nb-notification-center__panel--beside": !W.value && U.value.side === "right"
|
|
213
214
|
}));
|
|
214
|
-
function
|
|
215
|
-
|
|
215
|
+
function We(e) {
|
|
216
|
+
j.open === void 0 && (De.value = e), N("update:open", e);
|
|
216
217
|
}
|
|
217
|
-
function
|
|
218
|
-
|
|
218
|
+
function Ge() {
|
|
219
|
+
j.disabled || B.value || (ze(), We(!0), N("open"));
|
|
219
220
|
}
|
|
220
221
|
function G(e = {}) {
|
|
221
|
-
if (!
|
|
222
|
-
let t =
|
|
223
|
-
|
|
222
|
+
if (!B.value) return;
|
|
223
|
+
let t = z.value?.contains(document.activeElement);
|
|
224
|
+
We(!1), N("close"), (e.restoreFocus ?? t) && y(Ke);
|
|
224
225
|
}
|
|
225
|
-
function
|
|
226
|
-
let e =
|
|
226
|
+
function Ke() {
|
|
227
|
+
let e = R.value;
|
|
227
228
|
if (e?.isConnected) {
|
|
228
229
|
e.focus();
|
|
229
230
|
return;
|
|
230
231
|
}
|
|
231
|
-
(
|
|
232
|
+
(L.value?.querySelector($e))?.focus();
|
|
232
233
|
}
|
|
233
|
-
function
|
|
234
|
-
|
|
234
|
+
function qe() {
|
|
235
|
+
B.value ? G({ restoreFocus: !0 }) : Ge();
|
|
235
236
|
}
|
|
236
|
-
let K =
|
|
237
|
+
let K = x(0), Je = new Set([
|
|
237
238
|
"button",
|
|
238
239
|
"link",
|
|
239
240
|
"menuitem",
|
|
240
241
|
"option"
|
|
241
242
|
]);
|
|
242
|
-
function
|
|
243
|
+
function Ye(e) {
|
|
243
244
|
if (e.tagName === "BUTTON") return !e.hasAttribute("disabled");
|
|
244
245
|
if (e.tagName === "A") return e.hasAttribute("href");
|
|
245
246
|
let t = e.getAttribute("role");
|
|
246
|
-
return t !== null &&
|
|
247
|
+
return t !== null && Je.has(t);
|
|
247
248
|
}
|
|
248
249
|
function q() {
|
|
249
|
-
return
|
|
250
|
+
return z.value ? Array.from(z.value.querySelectorAll("[data-nb-notification-item]")).filter((e) => !!Ye(e)) : [];
|
|
250
251
|
}
|
|
251
|
-
let
|
|
252
|
-
function
|
|
253
|
-
let t =
|
|
254
|
-
|
|
252
|
+
let Xe = x(void 0);
|
|
253
|
+
function Ze(e) {
|
|
254
|
+
let t = Ee.value;
|
|
255
|
+
Xe.value = t && t.childElementCount > 0 && e.length === 0 ? 0 : void 0;
|
|
255
256
|
}
|
|
256
257
|
function J(e) {
|
|
257
258
|
let t = q();
|
|
258
|
-
|
|
259
|
+
Ze(t), t.length && (K.value = Math.min(Math.max(e, 0), t.length - 1), t.forEach((e, t) => {
|
|
259
260
|
e.setAttribute("tabindex", t === K.value ? "0" : "-1");
|
|
260
261
|
}));
|
|
261
262
|
}
|
|
@@ -265,28 +266,28 @@ var j = /* @__PURE__ */ v({
|
|
|
265
266
|
let n = Math.min(Math.max(e, 0), t.length - 1);
|
|
266
267
|
return J(n), t[n]?.focus(), !0;
|
|
267
268
|
}
|
|
268
|
-
function
|
|
269
|
+
function Qe(e) {
|
|
269
270
|
let t = e.target?.closest("[data-nb-notification-item]");
|
|
270
271
|
if (!t) return;
|
|
271
272
|
let n = q().indexOf(t);
|
|
272
273
|
n >= 0 && J(n);
|
|
273
274
|
}
|
|
274
|
-
let
|
|
275
|
-
function
|
|
275
|
+
let $e = "a[href]:not([tabindex=\"-1\"]), button:not([disabled]):not([tabindex=\"-1\"]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex=\"0\"]";
|
|
276
|
+
function et(e) {
|
|
276
277
|
return !!e?.closest?.("input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"]");
|
|
277
278
|
}
|
|
278
|
-
function
|
|
279
|
+
function tt(e) {
|
|
279
280
|
let t = q(), n = e.target?.closest("[data-nb-notification-item]"), r = n ? t.indexOf(n) : -1;
|
|
280
281
|
if (e.key === "Escape") {
|
|
281
|
-
if (!
|
|
282
|
+
if (!nt(e)) return;
|
|
282
283
|
e.preventDefault(), e.stopPropagation(), G({ restoreFocus: !0 });
|
|
283
284
|
return;
|
|
284
285
|
}
|
|
285
286
|
if (e.key === "Tab") {
|
|
286
|
-
|
|
287
|
+
rt(e);
|
|
287
288
|
return;
|
|
288
289
|
}
|
|
289
|
-
if (!
|
|
290
|
+
if (!et(e.target)) switch (e.key) {
|
|
290
291
|
case "ArrowDown":
|
|
291
292
|
Y(r < 0 ? 0 : r + 1) && e.preventDefault();
|
|
292
293
|
break;
|
|
@@ -302,243 +303,246 @@ var j = /* @__PURE__ */ v({
|
|
|
302
303
|
default: break;
|
|
303
304
|
}
|
|
304
305
|
}
|
|
305
|
-
function
|
|
306
|
+
function nt(e) {
|
|
306
307
|
if (e.defaultPrevented) return !1;
|
|
307
308
|
let t = (e.target ?? document.activeElement)?.closest?.("[aria-modal=\"true\"]");
|
|
308
|
-
return !(t && t !==
|
|
309
|
+
return !(t && t !== z.value);
|
|
309
310
|
}
|
|
310
|
-
function
|
|
311
|
-
let t =
|
|
311
|
+
function rt(e) {
|
|
312
|
+
let t = z.value;
|
|
312
313
|
if (!t) return;
|
|
313
|
-
let n = Array.from(t.querySelectorAll(
|
|
314
|
+
let n = Array.from(t.querySelectorAll($e)), r = document.activeElement, i = n[0], a = n[n.length - 1], o = !n.length || r === i || !t.contains(r), s = !n.length || r === a;
|
|
314
315
|
if (e.shiftKey ? !o : !s) return;
|
|
315
316
|
e.preventDefault();
|
|
316
|
-
let c = e.shiftKey ?
|
|
317
|
+
let c = e.shiftKey ? R.value : it();
|
|
317
318
|
G({ restoreFocus: !1 }), y(() => {
|
|
318
|
-
c?.isConnected ? c.focus() :
|
|
319
|
+
c?.isConnected ? c.focus() : Ke();
|
|
319
320
|
});
|
|
320
321
|
}
|
|
321
|
-
function
|
|
322
|
-
let e =
|
|
322
|
+
function it() {
|
|
323
|
+
let e = R.value;
|
|
323
324
|
if (!e) return null;
|
|
324
|
-
let t = Array.from(document.querySelectorAll(
|
|
325
|
+
let t = Array.from(document.querySelectorAll($e)).filter((e) => !z.value?.contains(e)).filter((e) => e.tabIndex >= 0), n = t.indexOf(e);
|
|
325
326
|
return n < 0 ? null : t[n + 1] ?? null;
|
|
326
327
|
}
|
|
327
|
-
function
|
|
328
|
-
|
|
328
|
+
function at(e, t) {
|
|
329
|
+
N("select", e, t), j.closeOnSelect && G({ restoreFocus: !1 });
|
|
329
330
|
}
|
|
330
|
-
function
|
|
331
|
-
if (!
|
|
331
|
+
function ot(e) {
|
|
332
|
+
if (!P.default) return;
|
|
332
333
|
let t = e.target?.closest("[data-nb-notification-item]");
|
|
333
|
-
if (t &&
|
|
334
|
+
if (t && Ye(t)) {
|
|
334
335
|
if (e.type === "keydown") {
|
|
335
336
|
let n = e.key;
|
|
336
337
|
if (n !== "Enter" && n !== " " || t.tagName === "BUTTON" || t.tagName === "A") return;
|
|
337
338
|
e.preventDefault();
|
|
338
339
|
}
|
|
339
|
-
|
|
340
|
+
N("select", null, e), j.closeOnSelect && G({ restoreFocus: !1 });
|
|
340
341
|
}
|
|
341
342
|
}
|
|
342
|
-
function
|
|
343
|
-
|
|
343
|
+
function st() {
|
|
344
|
+
j.markAllPending || N("mark-all-read");
|
|
344
345
|
}
|
|
345
|
-
function
|
|
346
|
+
function ct(e) {
|
|
346
347
|
let t = e.target;
|
|
347
|
-
|
|
348
|
+
L.value?.contains(t) || z.value?.contains(t) || G({ restoreFocus: !1 });
|
|
348
349
|
}
|
|
349
|
-
function
|
|
350
|
-
e.key === "Escape" && (
|
|
350
|
+
function lt(e) {
|
|
351
|
+
e.key === "Escape" && (z.value?.contains(document.activeElement) || nt(e) && G({ restoreFocus: L.value?.contains(document.activeElement) ?? !1 }));
|
|
351
352
|
}
|
|
352
353
|
let X = 0;
|
|
353
354
|
function Z() {
|
|
354
|
-
!
|
|
355
|
-
X = 0,
|
|
355
|
+
!B.value || X || (X = requestAnimationFrame(() => {
|
|
356
|
+
X = 0, dt();
|
|
356
357
|
}));
|
|
357
358
|
}
|
|
358
|
-
function
|
|
359
|
+
function ut() {
|
|
359
360
|
X &&= (cancelAnimationFrame(X), 0);
|
|
360
361
|
}
|
|
361
|
-
function
|
|
362
|
-
if (!
|
|
363
|
-
let e =
|
|
362
|
+
function dt() {
|
|
363
|
+
if (!B.value || W.value) return;
|
|
364
|
+
let e = L.value?.getBoundingClientRect();
|
|
364
365
|
if (e && !Ce(e, Re())) {
|
|
365
366
|
G({ restoreFocus: !1 });
|
|
366
367
|
return;
|
|
367
368
|
}
|
|
368
|
-
|
|
369
|
+
ze();
|
|
369
370
|
}
|
|
370
371
|
function Q() {
|
|
371
|
-
|
|
372
|
+
j.closeOnNavigate && G({ restoreFocus: !1 });
|
|
372
373
|
}
|
|
373
|
-
function
|
|
374
|
+
function ft() {
|
|
374
375
|
return window.navigation;
|
|
375
376
|
}
|
|
376
|
-
function
|
|
377
|
-
document.addEventListener("mousedown",
|
|
377
|
+
function pt() {
|
|
378
|
+
document.addEventListener("mousedown", ct), document.addEventListener("keydown", lt), window.addEventListener("resize", Z), window.addEventListener("scroll", Z, !0), window.addEventListener("popstate", Q), window.addEventListener("hashchange", Q), ft()?.addEventListener("navigate", Q);
|
|
378
379
|
}
|
|
379
|
-
function
|
|
380
|
-
|
|
380
|
+
function mt() {
|
|
381
|
+
ut(), document.removeEventListener("mousedown", ct), document.removeEventListener("keydown", lt), window.removeEventListener("resize", Z), window.removeEventListener("scroll", Z, !0), window.removeEventListener("popstate", Q), window.removeEventListener("hashchange", Q), ft()?.removeEventListener("navigate", Q);
|
|
381
382
|
}
|
|
382
383
|
let $ = () => G({ restoreFocus: !1 });
|
|
383
|
-
return
|
|
384
|
+
return w(B, (e) => {
|
|
384
385
|
if (e) {
|
|
385
|
-
for (let e of [...
|
|
386
|
-
|
|
387
|
-
|
|
386
|
+
for (let e of [...E]) e !== $ && e();
|
|
387
|
+
E.add($), pt(), y(() => {
|
|
388
|
+
ze(), J(0), Y(0) || z.value?.focus();
|
|
388
389
|
});
|
|
389
|
-
} else
|
|
390
|
-
}),
|
|
391
|
-
|
|
392
|
-
}),
|
|
393
|
-
|
|
394
|
-
let e =
|
|
390
|
+
} else E.delete($), mt(), K.value = 0;
|
|
391
|
+
}), w(() => [j.items.length, H.value], () => {
|
|
392
|
+
B.value && y(() => J(K.value));
|
|
393
|
+
}), oe(() => {
|
|
394
|
+
mt(), E.delete($);
|
|
395
|
+
let e = z.value;
|
|
395
396
|
e?.isConnected && e.remove();
|
|
396
|
-
}),
|
|
397
|
-
show:
|
|
397
|
+
}), D({
|
|
398
|
+
show: Ge,
|
|
398
399
|
close: G,
|
|
399
|
-
toggle:
|
|
400
|
-
isOpen:
|
|
401
|
-
unreadCount:
|
|
402
|
-
}), (
|
|
400
|
+
toggle: qe,
|
|
401
|
+
isOpen: B,
|
|
402
|
+
unreadCount: V
|
|
403
|
+
}), (t, r) => (b(), h("div", {
|
|
403
404
|
ref_key: "rootRef",
|
|
404
|
-
ref:
|
|
405
|
+
ref: L,
|
|
405
406
|
class: "nb-notification-center"
|
|
406
|
-
}, [
|
|
407
|
-
open:
|
|
408
|
-
toggle:
|
|
409
|
-
show:
|
|
407
|
+
}, [S(t.$slots, "trigger", {
|
|
408
|
+
open: B.value,
|
|
409
|
+
toggle: qe,
|
|
410
|
+
show: Ge,
|
|
410
411
|
close: G,
|
|
411
|
-
unreadCount:
|
|
412
|
-
badge:
|
|
413
|
-
panelId:
|
|
412
|
+
unreadCount: V.value,
|
|
413
|
+
badge: Oe.value,
|
|
414
|
+
panelId: F,
|
|
414
415
|
triggerProps: Pe.value,
|
|
415
416
|
setTriggerRef: Le
|
|
416
|
-
}, () => [_(e,
|
|
417
|
+
}, () => [_(e, re({
|
|
417
418
|
ref: Le,
|
|
418
|
-
class: ["nb-notification-center__trigger", { "nb-notification-center__trigger--active":
|
|
419
|
+
class: ["nb-notification-center__trigger", { "nb-notification-center__trigger--active": B.value }],
|
|
419
420
|
variant: "ghost",
|
|
420
421
|
size: "sm",
|
|
421
|
-
icon:
|
|
422
|
+
icon: M.value,
|
|
422
423
|
label: v.label
|
|
423
|
-
}, Pe.value, { onClick:
|
|
424
|
+
}, Pe.value, { onClick: qe }), null, 16, [
|
|
424
425
|
"class",
|
|
425
426
|
"icon",
|
|
426
427
|
"label"
|
|
427
|
-
]),
|
|
428
|
-
|
|
428
|
+
]), V.value > 0 ? (b(), h("span", pe, C(Oe.value), 1)) : m("", !0)]), (b(), p(ee, {
|
|
429
|
+
to: "body",
|
|
430
|
+
disabled: !ce(k)
|
|
431
|
+
}, [_(d, { name: "nb-notification-center-pop" }, {
|
|
432
|
+
default: T(() => [B.value ? (b(), h("div", {
|
|
429
433
|
key: 0,
|
|
430
|
-
id:
|
|
434
|
+
id: F,
|
|
431
435
|
ref_key: "panelRef",
|
|
432
|
-
ref:
|
|
433
|
-
class:
|
|
434
|
-
style:
|
|
436
|
+
ref: z,
|
|
437
|
+
class: ie(["nb-notification-center__panel", Ue.value]),
|
|
438
|
+
style: ae(Ve.value),
|
|
435
439
|
role: "dialog",
|
|
436
440
|
tabindex: "-1",
|
|
437
441
|
"aria-labelledby": we,
|
|
438
442
|
"aria-describedby": Ie.value,
|
|
439
443
|
"aria-busy": v.loading ? "true" : void 0,
|
|
440
|
-
onKeydown:
|
|
441
|
-
onFocusin:
|
|
444
|
+
onKeydown: tt,
|
|
445
|
+
onFocusin: Qe
|
|
442
446
|
}, [
|
|
443
447
|
g("div", he, [
|
|
444
448
|
g("h2", {
|
|
445
449
|
id: we,
|
|
446
450
|
class: "nb-notification-center__title"
|
|
447
|
-
},
|
|
448
|
-
|
|
451
|
+
}, C(v.label), 1),
|
|
452
|
+
S(t.$slots, "header-start", {
|
|
449
453
|
close: G,
|
|
450
|
-
unreadCount:
|
|
454
|
+
unreadCount: V.value
|
|
451
455
|
}),
|
|
452
|
-
|
|
456
|
+
S(t.$slots, "header-actions", {
|
|
453
457
|
close: G,
|
|
454
|
-
unreadCount:
|
|
455
|
-
markAllRead:
|
|
458
|
+
unreadCount: V.value,
|
|
459
|
+
markAllRead: st,
|
|
456
460
|
markAllPending: v.markAllPending,
|
|
457
461
|
markAllProps: Fe.value,
|
|
458
462
|
markAllText: v.markAllPending ? v.markAllPendingLabel : v.markAllLabel
|
|
459
|
-
}, () => [v.showMarkAll ? (
|
|
463
|
+
}, () => [v.showMarkAll ? (b(), h("button", re({
|
|
460
464
|
key: 0,
|
|
461
465
|
class: "nb-notification-center__mark-all"
|
|
462
|
-
}, Fe.value), [v.markAllPending ? (
|
|
466
|
+
}, Fe.value), [v.markAllPending ? (b(), p(a, {
|
|
463
467
|
key: 0,
|
|
464
468
|
size: "xs",
|
|
465
469
|
tone: "inherit",
|
|
466
470
|
decorative: ""
|
|
467
|
-
})) : m("", !0),
|
|
468
|
-
|
|
471
|
+
})) : m("", !0), ne(" " + C(v.markAllPending ? v.markAllPendingLabel : v.markAllLabel), 1)], 16)) : m("", !0)]),
|
|
472
|
+
W.value ? (b(), p(s, {
|
|
469
473
|
key: 0,
|
|
470
474
|
class: "nb-notification-center__close",
|
|
471
475
|
size: "lg",
|
|
472
|
-
label: v.closeLabel ??
|
|
476
|
+
label: v.closeLabel ?? ce(A).notificationCenterClose,
|
|
473
477
|
onClick: r[0] ||= (e) => G()
|
|
474
478
|
}, null, 8, ["label"])) : m("", !0)
|
|
475
479
|
]),
|
|
476
|
-
g("span", ge,
|
|
477
|
-
|
|
480
|
+
g("span", ge, C(v.markAllPending ? v.markAllPendingLabel : ""), 1),
|
|
481
|
+
Me.value ? (b(), h("div", {
|
|
478
482
|
key: 0,
|
|
479
|
-
id:
|
|
483
|
+
id: I,
|
|
480
484
|
class: "nb-notification-center__stale",
|
|
481
485
|
role: "status"
|
|
482
486
|
}, [
|
|
483
|
-
_(
|
|
484
|
-
name:
|
|
487
|
+
_(n, {
|
|
488
|
+
name: ce(de),
|
|
485
489
|
size: "sm",
|
|
486
490
|
"aria-hidden": "true"
|
|
487
491
|
}, null, 8, ["name"]),
|
|
488
|
-
g("span", _e,
|
|
489
|
-
v.showRetry ? (
|
|
492
|
+
g("span", _e, C(v.errorStaleLabel), 1),
|
|
493
|
+
v.showRetry ? (b(), h("button", {
|
|
490
494
|
key: 0,
|
|
491
495
|
type: "button",
|
|
492
496
|
class: "nb-notification-center__retry",
|
|
493
|
-
onClick:
|
|
494
|
-
},
|
|
497
|
+
onClick: Ne
|
|
498
|
+
}, C(v.retryLabel), 1)) : m("", !0)
|
|
495
499
|
])) : m("", !0),
|
|
496
|
-
|
|
500
|
+
H.value === "loading" ? (b(), h("div", {
|
|
497
501
|
key: 1,
|
|
498
502
|
class: "nb-notification-center__loading",
|
|
499
503
|
role: "status",
|
|
500
|
-
style:
|
|
501
|
-
}, [g("span", ve,
|
|
504
|
+
style: ae(He.value)
|
|
505
|
+
}, [g("span", ve, C(v.loadingLabel), 1), (b(), h(u, null, se(3, (e) => _(c, {
|
|
502
506
|
key: e,
|
|
503
507
|
variant: "text",
|
|
504
508
|
type: "body-sm",
|
|
505
509
|
lines: 2,
|
|
506
510
|
"last-line-width": "60%"
|
|
507
|
-
})), 64))], 4)) :
|
|
511
|
+
})), 64))], 4)) : H.value === "error" ? (b(), h("div", {
|
|
508
512
|
key: 2,
|
|
509
|
-
id:
|
|
513
|
+
id: I,
|
|
510
514
|
class: "nb-notification-center__error",
|
|
511
515
|
role: "alert"
|
|
512
|
-
}, [
|
|
516
|
+
}, [S(t.$slots, "error", { retry: Ne }, () => [_(o, {
|
|
513
517
|
size: "sm",
|
|
514
518
|
kind: "error",
|
|
515
519
|
title: v.errorTitle,
|
|
516
520
|
description: v.errorDescription
|
|
517
|
-
},
|
|
521
|
+
}, te({ _: 2 }, [v.showRetry ? {
|
|
518
522
|
name: "actions",
|
|
519
|
-
fn:
|
|
523
|
+
fn: T(() => [_(e, {
|
|
520
524
|
size: "sm",
|
|
521
525
|
variant: "secondary",
|
|
522
|
-
onClick:
|
|
526
|
+
onClick: Ne
|
|
523
527
|
}, {
|
|
524
|
-
default:
|
|
528
|
+
default: T(() => [ne(C(v.retryLabel), 1)]),
|
|
525
529
|
_: 1
|
|
526
530
|
})]),
|
|
527
531
|
key: "0"
|
|
528
|
-
} : void 0]), 1032, ["title", "description"])])])) :
|
|
532
|
+
} : void 0]), 1032, ["title", "description"])])])) : H.value === "list" ? (b(), h("ul", {
|
|
529
533
|
key: 3,
|
|
530
534
|
ref_key: "listRef",
|
|
531
|
-
ref:
|
|
535
|
+
ref: Ee,
|
|
532
536
|
class: "nb-notification-center__list",
|
|
533
537
|
role: "list",
|
|
534
|
-
tabindex:
|
|
535
|
-
style:
|
|
536
|
-
onClick:
|
|
537
|
-
onKeydown:
|
|
538
|
-
}, [
|
|
538
|
+
tabindex: Xe.value,
|
|
539
|
+
style: ae(He.value),
|
|
540
|
+
onClick: ot,
|
|
541
|
+
onKeydown: ot
|
|
542
|
+
}, [S(t.$slots, "default", {
|
|
539
543
|
close: G,
|
|
540
544
|
items: v.items
|
|
541
|
-
}, () => [(
|
|
545
|
+
}, () => [(b(!0), h(u, null, se(v.items, (e) => (b(), p(l, {
|
|
542
546
|
key: e.id,
|
|
543
547
|
title: e.title,
|
|
544
548
|
body: e.body,
|
|
@@ -552,7 +556,7 @@ var j = /* @__PURE__ */ v({
|
|
|
552
556
|
locale: v.locale,
|
|
553
557
|
"unread-label": v.unreadLabel,
|
|
554
558
|
"read-label": v.readLabel,
|
|
555
|
-
onSelect: (t) =>
|
|
559
|
+
onSelect: (t) => at(e, t)
|
|
556
560
|
}, null, 8, [
|
|
557
561
|
"title",
|
|
558
562
|
"body",
|
|
@@ -567,9 +571,9 @@ var j = /* @__PURE__ */ v({
|
|
|
567
571
|
"unread-label",
|
|
568
572
|
"read-label",
|
|
569
573
|
"onSelect"
|
|
570
|
-
]))), 128))])], 44, ye)) :
|
|
574
|
+
]))), 128))])], 44, ye)) : H.value === "empty" ? (b(), h("div", be, [S(t.$slots, "empty", {}, () => [_(o, {
|
|
571
575
|
size: "sm",
|
|
572
|
-
icon:
|
|
576
|
+
icon: M.value,
|
|
573
577
|
title: v.emptyTitle,
|
|
574
578
|
description: v.emptyDescription
|
|
575
579
|
}, null, 8, [
|
|
@@ -577,11 +581,11 @@ var j = /* @__PURE__ */ v({
|
|
|
577
581
|
"title",
|
|
578
582
|
"description"
|
|
579
583
|
])])])) : m("", !0),
|
|
580
|
-
|
|
584
|
+
t.$slots.footer ? (b(), h("div", xe, [S(t.$slots, "footer", { close: G })])) : m("", !0)
|
|
581
585
|
], 46, me)) : m("", !0)]),
|
|
582
586
|
_: 3
|
|
583
|
-
})]))], 512));
|
|
587
|
+
})], 8, ["disabled"]))], 512));
|
|
584
588
|
}
|
|
585
589
|
});
|
|
586
590
|
//#endregion
|
|
587
|
-
export {
|
|
591
|
+
export { M as t };
|