@alfadocs/ui-kit 0.17.1 → 0.17.2
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/_chunks/{accordion-DOmxGEWU.js → accordion-CNcodXuO.js} +6 -6
- package/dist/_chunks/{ai-prompt-input-DEiQwIMn.js → ai-prompt-input-B-w5Rx3V.js} +184 -181
- package/dist/_chunks/{alert-pgdXrEO5.js → alert-DBnawbmf.js} +64 -59
- package/dist/_chunks/{audio-recorder-CRh4uyFL.js → audio-recorder-DNkQLW1G.js} +3 -3
- package/dist/_chunks/{autocomplete-mOg7WLOh.js → autocomplete-BxfabhZ8.js} +167 -164
- package/dist/_chunks/{balance-cell-renderer-DWWtX-VM.js → balance-cell-renderer-DJB6WDPe.js} +2 -2
- package/dist/_chunks/{chat-input-UK-bXU7u.js → chat-input-B3XmFGDw.js} +123 -122
- package/dist/_chunks/checkbox-group-Bwmt1ovQ.js +213 -0
- package/dist/_chunks/{checkbox-D5EHnB14.js → checkbox-mwbrPZDY.js} +75 -70
- package/dist/_chunks/{collapsible-CuxUBoHJ.js → collapsible-hHiyZp0b.js} +61 -63
- package/dist/_chunks/{color-picker-BPfcByHH.js → color-picker-Bm-gzpsh.js} +2 -2
- package/dist/_chunks/{combobox-D5tWe0t_.js → combobox-Da9eq00i.js} +214 -211
- package/dist/_chunks/{copy-field-BCHAZ8QV.js → copy-field-BAF4mt9h.js} +95 -132
- package/dist/_chunks/{date-picker-BlhtBhPo.js → date-picker-BIoSLRly.js} +222 -219
- package/dist/_chunks/{date-range-picker-C2hRu_Ke.js → date-range-picker-9gANFNG9.js} +81 -78
- package/dist/_chunks/{date-time-picker-B67mPZmP.js → date-time-picker-DG7BiGdb.js} +98 -95
- package/dist/_chunks/{dialog-DRp6Dejy.js → dialog-DUomPCRS.js} +69 -71
- package/dist/_chunks/{dropdown-menu-dyV7gHh_.js → dropdown-menu-DZxwF23X.js} +108 -110
- package/dist/_chunks/{freemium-paywall-BTEiVkes.js → freemium-paywall-DXc7XlGE.js} +98 -97
- package/dist/_chunks/{leo-sidebar-D3TuyH5_.js → leo-sidebar-DIsiTju3.js} +2 -2
- package/dist/_chunks/{list-DcjV0m5B.js → list-BdvDctBz.js} +184 -180
- package/dist/_chunks/{message-tray-Fsend-du.js → message-tray-BNAS8al4.js} +111 -111
- package/dist/_chunks/{multi-select-DooDzQIp.js → multi-select-CyspR5ZF.js} +157 -154
- package/dist/_chunks/{navigation-menu-DdufF-_4.js → navigation-menu-CyS1fBJ7.js} +85 -87
- package/dist/_chunks/{notification-tray-C3dYdLAF.js → notification-tray-D_69dXFY.js} +114 -114
- package/dist/_chunks/{number-input-DH00o0DN.js → number-input-BZXu6bPY.js} +92 -89
- package/dist/_chunks/{otp-input-BBXYvLx5.js → otp-input-BDF_iNpa.js} +92 -93
- package/dist/_chunks/{pagination-F1ei4khE.js → pagination-BWaXF7W0.js} +194 -211
- package/dist/_chunks/{patient-shell-BE0CdPOJ.js → patient-shell-BOOaWZA9.js} +3 -3
- package/dist/_chunks/{payment-form-CI77oIx1.js → payment-form-BjkuQeqR.js} +2 -2
- package/dist/_chunks/{pdf-viewer-CnEJvmXC.js → pdf-viewer-BG_nsFT5.js} +2 -2
- package/dist/_chunks/{radio-group-Cz1a4QCA.js → radio-group-BHZOxrIK.js} +4 -4
- package/dist/_chunks/{select-Ca6ibiDL.js → select-C92AT_OZ.js} +7 -7
- package/dist/_chunks/{sidebar-D8Lq065m.js → sidebar-BqzlRBvC.js} +271 -291
- package/dist/_chunks/{slider-CkR6CLun.js → slider-CfEzeseL.js} +4 -4
- package/dist/_chunks/{tabs-CRCyPpJo.js → tabs-aEQfQV3x.js} +8 -8
- package/dist/_chunks/{theme-toggle-B3meAb3y.js → theme-toggle-BswYl0Yp.js} +2 -2
- package/dist/_chunks/use-controllable-state-BiY4xTzM.js +23 -0
- package/dist/_chunks/use-copy-to-clipboard-Cyfc_dlv.js +43 -0
- package/dist/_chunks/use-persistent-state-i23OWy6G.js +24 -0
- package/dist/_chunks/{warning-stack-CeRihME9.js → warning-stack-CDH9TudY.js} +2 -2
- package/dist/_chunks/{workflow-map-D3MvrsZV.js → workflow-map-BeKe23uw.js} +3 -3
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/use-debounced-callback.d.ts +1 -5
- package/dist/components/_shared/use-direction.d.ts +1 -18
- package/dist/components/_shared/use-focus-trap.d.ts +1 -31
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/command-palette/command-palette.d.ts +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/icon-button-group/icon-button-group.d.ts +14 -14
- package/dist/components/list/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/navigation-menu/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/sidebar/index.js +8 -7
- package/dist/components/sidebar/sidebar.d.ts +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/index.js +98 -15
- package/dist/hooks/use-debounced-callback.d.ts +19 -0
- package/dist/hooks/use-debounced-value.d.ts +16 -0
- package/dist/hooks/use-direction.d.ts +19 -0
- package/dist/hooks/use-focus-trap.d.ts +32 -0
- package/dist/hooks/use-isomorphic-layout-effect.d.ts +13 -0
- package/dist/hooks/use-persistent-state.d.ts +16 -0
- package/dist/index.js +493 -492
- package/dist/patterns/leo-assistant/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +4 -2
- package/dist/_chunks/checkbox-group-Qkm3Rg1S.js +0 -208
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { jsx as t, jsxs as c, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import * as
|
|
1
|
+
import { jsx as t, jsxs as c, Fragment as L } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ne, useState as se, useCallback as oe, useLayoutEffect as re, useEffect as _, useRef as f, useMemo as de, useImperativeHandle as ce } from "react";
|
|
3
|
+
import * as y from "@radix-ui/react-popover";
|
|
4
4
|
import { c as C } from "./index-D2ZczOXr.js";
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { S as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
5
|
+
import { useTranslation as F } from "react-i18next";
|
|
6
|
+
import { u as le } from "./use-controllable-state-BiY4xTzM.js";
|
|
7
|
+
import { I as fe } from "./icon-button-C4CGcYuz.js";
|
|
8
|
+
import { B as E } from "./button-DD_0Xdmr.js";
|
|
9
|
+
import { S as q } from "./separator-CYU_bGFn.js";
|
|
10
|
+
import { S as x } from "./skeleton-CZbwyJAA.js";
|
|
11
|
+
import { N as pe } from "./notification-card-ejOw5g6g.js";
|
|
12
|
+
import { u as ue } from "./registry-C9nwlNyL.js";
|
|
13
|
+
import { c as me } from "./createLucideIcon-CrFbzy84.js";
|
|
13
14
|
/**
|
|
14
15
|
* @license lucide-react v1.8.0 - ISC
|
|
15
16
|
*
|
|
16
17
|
* This source code is licensed under the ISC license.
|
|
17
18
|
* See the LICENSE file in the root directory of this source tree.
|
|
18
19
|
*/
|
|
19
|
-
const
|
|
20
|
+
const ge = [
|
|
20
21
|
["path", { d: "M10.268 21a2 2 0 0 0 3.464 0", key: "vwvbt9" }],
|
|
21
22
|
[
|
|
22
23
|
"path",
|
|
@@ -25,7 +26,7 @@ const ve = [
|
|
|
25
26
|
key: "11g9vi"
|
|
26
27
|
}
|
|
27
28
|
]
|
|
28
|
-
],
|
|
29
|
+
], H = me("bell", ge), ve = {
|
|
29
30
|
id: "notification-tray",
|
|
30
31
|
capabilities: ["open", "close", "select_single", "dismiss"],
|
|
31
32
|
state: {
|
|
@@ -122,7 +123,7 @@ const ve = [
|
|
|
122
123
|
size: "md"
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
|
-
),
|
|
126
|
+
), ye = C(
|
|
126
127
|
[
|
|
127
128
|
"ds:flex ds:flex-col",
|
|
128
129
|
"ds:bg-[var(--popover)] ds:text-[var(--popover-foreground)]",
|
|
@@ -163,7 +164,7 @@ const ve = [
|
|
|
163
164
|
size: "md"
|
|
164
165
|
}
|
|
165
166
|
}
|
|
166
|
-
),
|
|
167
|
+
), xe = C(
|
|
167
168
|
[
|
|
168
169
|
// Anchored to the top-end corner of the trigger, nudged outward so
|
|
169
170
|
// the bell icon isn't covered.
|
|
@@ -178,28 +179,28 @@ const ve = [
|
|
|
178
179
|
"ds:forced-colors:outline ds:forced-colors:outline-1 ds:forced-colors:outline-[CanvasText]"
|
|
179
180
|
].join(" ")
|
|
180
181
|
);
|
|
181
|
-
function
|
|
182
|
+
function Ne(i, a) {
|
|
182
183
|
return i > 99 ? a : String(i);
|
|
183
184
|
}
|
|
184
|
-
function
|
|
185
|
+
function z() {
|
|
185
186
|
return /* @__PURE__ */ c(
|
|
186
187
|
"div",
|
|
187
188
|
{
|
|
188
189
|
"aria-hidden": "true",
|
|
189
190
|
className: "ds:flex ds:items-start ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]",
|
|
190
191
|
children: [
|
|
191
|
-
/* @__PURE__ */ t(
|
|
192
|
+
/* @__PURE__ */ t(x, { variant: "circular", size: "sm" }),
|
|
192
193
|
/* @__PURE__ */ c("div", { className: "ds:flex-1 ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
193
|
-
/* @__PURE__ */ t(
|
|
194
|
-
/* @__PURE__ */ t(
|
|
195
|
-
/* @__PURE__ */ t(
|
|
194
|
+
/* @__PURE__ */ t(x, { variant: "text", size: "md", width: "70%" }),
|
|
195
|
+
/* @__PURE__ */ t(x, { variant: "text", size: "sm", width: "90%" }),
|
|
196
|
+
/* @__PURE__ */ t(x, { variant: "text", size: "sm", width: "30%" })
|
|
196
197
|
] })
|
|
197
198
|
]
|
|
198
199
|
}
|
|
199
200
|
);
|
|
200
201
|
}
|
|
201
|
-
function
|
|
202
|
-
const { t: i } =
|
|
202
|
+
function be() {
|
|
203
|
+
const { t: i } = F();
|
|
203
204
|
return /* @__PURE__ */ c(
|
|
204
205
|
"div",
|
|
205
206
|
{
|
|
@@ -212,7 +213,7 @@ function Te() {
|
|
|
212
213
|
{
|
|
213
214
|
"aria-hidden": "true",
|
|
214
215
|
className: "ds:inline-flex ds:items-center ds:justify-center ds:size-10 ds:rounded-[var(--radius-full)] ds:bg-[color:var(--muted)] ds:text-[color:var(--muted-foreground)] ds:[&>svg]:size-5",
|
|
215
|
-
children: /* @__PURE__ */ t(
|
|
216
|
+
children: /* @__PURE__ */ t(H, {})
|
|
216
217
|
}
|
|
217
218
|
),
|
|
218
219
|
/* @__PURE__ */ t("p", { className: "type-title-item ds:text-[color:var(--foreground)]", children: i("notificationTray.noNotifications", "No notifications") }),
|
|
@@ -224,48 +225,47 @@ function Te() {
|
|
|
224
225
|
}
|
|
225
226
|
);
|
|
226
227
|
}
|
|
227
|
-
const
|
|
228
|
+
const Te = ne(
|
|
228
229
|
({
|
|
229
230
|
id: i,
|
|
230
231
|
items: a,
|
|
231
|
-
unseenCount:
|
|
232
|
-
open:
|
|
233
|
-
onOpenChange:
|
|
232
|
+
unseenCount: N,
|
|
233
|
+
open: U,
|
|
234
|
+
onOpenChange: W,
|
|
234
235
|
onItemClick: p,
|
|
235
236
|
onDismiss: u,
|
|
236
|
-
onMarkRead:
|
|
237
|
-
onMarkAllRead:
|
|
238
|
-
loading:
|
|
239
|
-
maxVisible:
|
|
240
|
-
viewAllLabel:
|
|
241
|
-
onViewAll:
|
|
242
|
-
align:
|
|
243
|
-
side:
|
|
244
|
-
size:
|
|
245
|
-
className:
|
|
246
|
-
...
|
|
247
|
-
},
|
|
248
|
-
var
|
|
249
|
-
const { t: r } =
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
), [m, O] = F(
|
|
237
|
+
onMarkRead: g,
|
|
238
|
+
onMarkAllRead: R,
|
|
239
|
+
loading: k = !1,
|
|
240
|
+
maxVisible: Y,
|
|
241
|
+
viewAllLabel: S,
|
|
242
|
+
onViewAll: G,
|
|
243
|
+
align: J = "end",
|
|
244
|
+
side: M = "bottom",
|
|
245
|
+
size: b = "md",
|
|
246
|
+
className: Q,
|
|
247
|
+
...X
|
|
248
|
+
}, Z) => {
|
|
249
|
+
var B;
|
|
250
|
+
const { t: r } = F(), [$, v] = le({
|
|
251
|
+
value: U,
|
|
252
|
+
defaultValue: !1,
|
|
253
|
+
onChange: W
|
|
254
|
+
}), T = $ ?? !1, [m, O] = se(
|
|
255
255
|
() => a.map((e) => ({ item: e, leaving: !1 }))
|
|
256
|
-
),
|
|
256
|
+
), j = oe(() => {
|
|
257
257
|
if (typeof window > "u") return 200;
|
|
258
258
|
const e = window.getComputedStyle(document.documentElement).getPropertyValue("--animation-duration");
|
|
259
259
|
if (!e) return 200;
|
|
260
260
|
const n = e.trim(), s = parseFloat(n);
|
|
261
261
|
return Number.isFinite(s) ? n.endsWith("ms") ? s : s * 1e3 : 200;
|
|
262
262
|
}, []);
|
|
263
|
-
|
|
263
|
+
re(() => {
|
|
264
264
|
O((e) => {
|
|
265
265
|
const n = new Set(a.map((o) => o.id)), s = new Set(e.map((o) => o.item.id)), d = e.map((o) => {
|
|
266
266
|
if (n.has(o.item.id)) {
|
|
267
|
-
const
|
|
268
|
-
return
|
|
267
|
+
const P = a.find((ae) => ae.id === o.item.id);
|
|
268
|
+
return P ? { item: P, leaving: !1 } : { ...o, leaving: !0 };
|
|
269
269
|
}
|
|
270
270
|
return { ...o, leaving: !0 };
|
|
271
271
|
});
|
|
@@ -273,20 +273,20 @@ const we = de(
|
|
|
273
273
|
s.has(o.id) || d.push({ item: o, leaving: !1 });
|
|
274
274
|
return d;
|
|
275
275
|
});
|
|
276
|
-
}, [a]),
|
|
276
|
+
}, [a]), _(() => {
|
|
277
277
|
if (!m.some((s) => s.leaving)) return;
|
|
278
|
-
const e =
|
|
278
|
+
const e = j(), n = setTimeout(() => {
|
|
279
279
|
O((s) => s.filter((d) => !d.leaving));
|
|
280
280
|
}, e);
|
|
281
281
|
return () => clearTimeout(n);
|
|
282
|
-
}, [m,
|
|
283
|
-
const
|
|
284
|
-
|
|
282
|
+
}, [m, j]);
|
|
283
|
+
const w = f(null), I = f((B = a[0]) == null ? void 0 : B.id);
|
|
284
|
+
_(() => {
|
|
285
285
|
var s;
|
|
286
|
-
const e = (s = a[0]) == null ? void 0 : s.id, n =
|
|
287
|
-
if (n && e && n !== e &&
|
|
286
|
+
const e = (s = a[0]) == null ? void 0 : s.id, n = I.current;
|
|
287
|
+
if (n && e && n !== e && w.current) {
|
|
288
288
|
const d = a[0];
|
|
289
|
-
d && !d.read && (
|
|
289
|
+
d && !d.read && (w.current.textContent = r(
|
|
290
290
|
"notificationTray.newNotification",
|
|
291
291
|
{
|
|
292
292
|
title: d.title,
|
|
@@ -294,58 +294,58 @@ const we = de(
|
|
|
294
294
|
}
|
|
295
295
|
));
|
|
296
296
|
}
|
|
297
|
-
|
|
297
|
+
I.current = e;
|
|
298
298
|
}, [a, r]);
|
|
299
|
-
const h =
|
|
299
|
+
const h = N ?? 0, D = h > 0 ? r("notificationTray.triggerLabel", {
|
|
300
300
|
count: h,
|
|
301
301
|
defaultValue: "Notifications, {{count}} unread"
|
|
302
|
-
}) : r("notificationTray.triggerLabelNone", "Notifications, none unread"),
|
|
302
|
+
}) : r("notificationTray.triggerLabelNone", "Notifications, none unread"), ee = Ne(
|
|
303
303
|
h,
|
|
304
304
|
r("notificationTray.badgeCountOverflow", "99+")
|
|
305
|
-
),
|
|
305
|
+
), te = ye({ size: b }), l = f(a);
|
|
306
306
|
l.current = a;
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
const
|
|
310
|
-
|
|
311
|
-
const
|
|
307
|
+
const V = f(N);
|
|
308
|
+
V.current = N;
|
|
309
|
+
const K = f(T);
|
|
310
|
+
K.current = T;
|
|
311
|
+
const ie = de(
|
|
312
312
|
() => ({
|
|
313
|
-
open: () =>
|
|
314
|
-
close: () =>
|
|
315
|
-
isOpen: () =>
|
|
313
|
+
open: () => v(!0),
|
|
314
|
+
close: () => v(!1),
|
|
315
|
+
isOpen: () => K.current,
|
|
316
316
|
getItems: () => l.current.map((e) => ({ id: e.id, read: !!e.read })),
|
|
317
|
-
getUnreadCount: () =>
|
|
317
|
+
getUnreadCount: () => V.current ?? l.current.filter((e) => !e.read).length,
|
|
318
318
|
selectItem: (e) => {
|
|
319
319
|
const n = l.current.find((s) => s.id === e);
|
|
320
320
|
n && (p == null || p(n));
|
|
321
321
|
},
|
|
322
322
|
markRead: (e) => {
|
|
323
323
|
const n = l.current.find((s) => s.id === e);
|
|
324
|
-
n && (
|
|
324
|
+
n && (g == null || g(n));
|
|
325
325
|
},
|
|
326
326
|
dismiss: (e) => {
|
|
327
327
|
const n = l.current.find((s) => s.id === e);
|
|
328
328
|
n && (u == null || u(n));
|
|
329
329
|
}
|
|
330
330
|
}),
|
|
331
|
-
[
|
|
332
|
-
),
|
|
333
|
-
return
|
|
331
|
+
[v, p, g, u]
|
|
332
|
+
), A = f(null);
|
|
333
|
+
return ce(Z, () => A.current, []), ue(ve, ie, i), /* @__PURE__ */ t(
|
|
334
334
|
"div",
|
|
335
335
|
{
|
|
336
|
-
ref:
|
|
336
|
+
ref: A,
|
|
337
337
|
"data-component": "notification-tray",
|
|
338
338
|
"data-component-id": i,
|
|
339
|
-
className: [he({ size:
|
|
340
|
-
...
|
|
341
|
-
children: /* @__PURE__ */ c(
|
|
342
|
-
/* @__PURE__ */ t(
|
|
343
|
-
|
|
339
|
+
className: [he({ size: b }), Q].filter(Boolean).join(" "),
|
|
340
|
+
...X,
|
|
341
|
+
children: /* @__PURE__ */ c(y.Root, { open: T, onOpenChange: v, children: [
|
|
342
|
+
/* @__PURE__ */ t(y.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
|
|
343
|
+
fe,
|
|
344
344
|
{
|
|
345
|
-
icon: /* @__PURE__ */ t(
|
|
345
|
+
icon: /* @__PURE__ */ t(H, {}),
|
|
346
346
|
intent: "outline",
|
|
347
|
-
size:
|
|
348
|
-
"aria-label":
|
|
347
|
+
size: b === "sm" ? "sm" : "md",
|
|
348
|
+
"aria-label": D,
|
|
349
349
|
"aria-haspopup": "dialog"
|
|
350
350
|
}
|
|
351
351
|
) }),
|
|
@@ -354,56 +354,56 @@ const we = de(
|
|
|
354
354
|
{
|
|
355
355
|
"aria-hidden": "true",
|
|
356
356
|
"data-testid": "notification-tray-badge",
|
|
357
|
-
className:
|
|
358
|
-
children:
|
|
357
|
+
className: xe(),
|
|
358
|
+
children: ee
|
|
359
359
|
}
|
|
360
360
|
) : null,
|
|
361
361
|
/* @__PURE__ */ t(
|
|
362
362
|
"div",
|
|
363
363
|
{
|
|
364
|
-
ref:
|
|
364
|
+
ref: w,
|
|
365
365
|
"aria-live": "polite",
|
|
366
366
|
"aria-atomic": "true",
|
|
367
367
|
className: "ds:sr-only"
|
|
368
368
|
}
|
|
369
369
|
),
|
|
370
|
-
/* @__PURE__ */ t(
|
|
371
|
-
|
|
370
|
+
/* @__PURE__ */ t(y.Portal, { children: /* @__PURE__ */ c(
|
|
371
|
+
y.Content,
|
|
372
372
|
{
|
|
373
373
|
role: "dialog",
|
|
374
374
|
"aria-label": r("notificationTray.panelTitle", "Notifications"),
|
|
375
|
-
side:
|
|
376
|
-
align:
|
|
375
|
+
side: M,
|
|
376
|
+
align: J,
|
|
377
377
|
sideOffset: 8,
|
|
378
378
|
collisionPadding: 16,
|
|
379
|
-
className:
|
|
379
|
+
className: te,
|
|
380
380
|
children: [
|
|
381
381
|
/* @__PURE__ */ c("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:pb-[var(--spacing-xs)]", children: [
|
|
382
382
|
/* @__PURE__ */ t("h3", { className: "ds:m-0 type-title-card ds:text-[color:var(--foreground)]", children: r("notificationTray.panelTitle", "Notifications") }),
|
|
383
|
-
|
|
384
|
-
|
|
383
|
+
R && a.some((e) => !e.read) ? /* @__PURE__ */ t(
|
|
384
|
+
E,
|
|
385
385
|
{
|
|
386
386
|
intent: "link",
|
|
387
387
|
size: "sm",
|
|
388
|
-
onClick:
|
|
388
|
+
onClick: R,
|
|
389
389
|
className: "ds:text-[length:var(--font-size-xs)]",
|
|
390
390
|
children: r("notificationTray.markAllRead", "Mark all as read")
|
|
391
391
|
}
|
|
392
392
|
) : null
|
|
393
393
|
] }),
|
|
394
|
-
/* @__PURE__ */ t(
|
|
394
|
+
/* @__PURE__ */ t(q, {}),
|
|
395
395
|
/* @__PURE__ */ t(
|
|
396
396
|
"div",
|
|
397
397
|
{
|
|
398
|
-
role:
|
|
399
|
-
"data-max-visible":
|
|
398
|
+
role: k || m.length === 0 ? void 0 : "list",
|
|
399
|
+
"data-max-visible": Y,
|
|
400
400
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:overflow-y-auto ds:pt-[var(--spacing-xs)] ds:flex-1 ds:sm:flex-none ds:sm:[max-block-size:var(--notification-tray-max-block-size,24rem)]",
|
|
401
|
-
children:
|
|
402
|
-
/* @__PURE__ */ t(
|
|
403
|
-
/* @__PURE__ */ t(
|
|
404
|
-
/* @__PURE__ */ t(
|
|
405
|
-
] }) : m.length === 0 ? /* @__PURE__ */ t(
|
|
406
|
-
|
|
401
|
+
children: k ? /* @__PURE__ */ c(L, { children: [
|
|
402
|
+
/* @__PURE__ */ t(z, {}),
|
|
403
|
+
/* @__PURE__ */ t(z, {}),
|
|
404
|
+
/* @__PURE__ */ t(z, {})
|
|
405
|
+
] }) : m.length === 0 ? /* @__PURE__ */ t(be, {}) : m.map(({ item: e, leaving: n }) => /* @__PURE__ */ t(
|
|
406
|
+
pe,
|
|
407
407
|
{
|
|
408
408
|
item: e,
|
|
409
409
|
variant: "compact",
|
|
@@ -416,16 +416,16 @@ const we = de(
|
|
|
416
416
|
))
|
|
417
417
|
}
|
|
418
418
|
),
|
|
419
|
-
|
|
420
|
-
/* @__PURE__ */ t(
|
|
419
|
+
S ? /* @__PURE__ */ c(L, { children: [
|
|
420
|
+
/* @__PURE__ */ t(q, {}),
|
|
421
421
|
/* @__PURE__ */ t("div", { className: "ds:pt-[var(--spacing-xs)]", children: /* @__PURE__ */ t(
|
|
422
|
-
|
|
422
|
+
E,
|
|
423
423
|
{
|
|
424
424
|
intent: "link",
|
|
425
425
|
size: "sm",
|
|
426
|
-
onClick:
|
|
426
|
+
onClick: G,
|
|
427
427
|
className: "ds:w-full ds:justify-center",
|
|
428
|
-
children:
|
|
428
|
+
children: S
|
|
429
429
|
}
|
|
430
430
|
) })
|
|
431
431
|
] }) : null
|
|
@@ -437,9 +437,9 @@ const we = de(
|
|
|
437
437
|
);
|
|
438
438
|
}
|
|
439
439
|
);
|
|
440
|
-
|
|
440
|
+
Te.displayName = "NotificationTray";
|
|
441
441
|
export {
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
Te as N,
|
|
443
|
+
ve as n
|
|
444
444
|
};
|
|
445
|
-
//# sourceMappingURL=notification-tray-
|
|
445
|
+
//# sourceMappingURL=notification-tray-D_69dXFY.js.map
|