@alfadocs/ui-kit 0.17.0 → 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/{carousel.agent-OTn-kMQg.js → carousel.agent-Xuw9LPZN.js} +14 -7
- 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/{public-header.agent-sDi9N9su.js → public-header.agent-BIBQzkeV.js} +7 -12
- 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/carousel/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/public-header/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts +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,16 +1,17 @@
|
|
|
1
|
-
import { jsx as s, jsxs as c, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import * as
|
|
4
|
-
import { c as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { jsx as s, jsxs as c, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as re, useState as ne, useCallback as ie, useLayoutEffect as de, useEffect as A, useRef as m, useMemo as oe, useImperativeHandle as ce } from "react";
|
|
3
|
+
import * as x from "@radix-ui/react-popover";
|
|
4
|
+
import { c as C } from "./index-D2ZczOXr.js";
|
|
5
|
+
import { useTranslation as q } from "react-i18next";
|
|
6
|
+
import { u as le } from "./use-controllable-state-BiY4xTzM.js";
|
|
7
|
+
import { I as me } from "./icon-button-C4CGcYuz.js";
|
|
8
|
+
import { B as E } from "./button-DD_0Xdmr.js";
|
|
9
|
+
import { S as L } from "./separator-CYU_bGFn.js";
|
|
9
10
|
import { S as f } from "./skeleton-CZbwyJAA.js";
|
|
10
|
-
import { M as
|
|
11
|
-
import { u as
|
|
12
|
-
import { M as
|
|
13
|
-
const
|
|
11
|
+
import { M as pe } from "./message-card-c6R0-qXq.js";
|
|
12
|
+
import { u as ue } from "./registry-C9nwlNyL.js";
|
|
13
|
+
import { M as F } from "./mail-C8irm52s.js";
|
|
14
|
+
const ge = {
|
|
14
15
|
id: "message-tray",
|
|
15
16
|
capabilities: ["open", "close", "select_single", "dismiss"],
|
|
16
17
|
state: {
|
|
@@ -94,7 +95,7 @@ const fe = {
|
|
|
94
95
|
description: "Stable message id emitted on each rendered MessageCard inside the tray."
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
|
-
},
|
|
98
|
+
}, fe = C("ds:relative ds:inline-flex ds:items-center", {
|
|
98
99
|
variants: {
|
|
99
100
|
size: {
|
|
100
101
|
sm: "",
|
|
@@ -104,7 +105,7 @@ const fe = {
|
|
|
104
105
|
defaultVariants: {
|
|
105
106
|
size: "md"
|
|
106
107
|
}
|
|
107
|
-
}),
|
|
108
|
+
}), ve = C(
|
|
108
109
|
[
|
|
109
110
|
"ds:flex ds:flex-col",
|
|
110
111
|
"ds:bg-[var(--popover)] ds:text-[var(--popover-foreground)]",
|
|
@@ -140,7 +141,7 @@ const fe = {
|
|
|
140
141
|
size: "md"
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
|
-
), he =
|
|
144
|
+
), he = C(
|
|
144
145
|
[
|
|
145
146
|
"ds:absolute ds:-top-[var(--spacing-xs)] ds:-end-[var(--spacing-xs)]",
|
|
146
147
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
@@ -152,10 +153,10 @@ const fe = {
|
|
|
152
153
|
"ds:forced-colors:outline ds:forced-colors:outline-1 ds:forced-colors:outline-[CanvasText]"
|
|
153
154
|
].join(" ")
|
|
154
155
|
);
|
|
155
|
-
function
|
|
156
|
+
function ye(a, t) {
|
|
156
157
|
return a > 99 ? t : String(a);
|
|
157
158
|
}
|
|
158
|
-
function
|
|
159
|
+
function z() {
|
|
159
160
|
return /* @__PURE__ */ c(
|
|
160
161
|
"div",
|
|
161
162
|
{
|
|
@@ -173,8 +174,8 @@ function R() {
|
|
|
173
174
|
}
|
|
174
175
|
);
|
|
175
176
|
}
|
|
176
|
-
function
|
|
177
|
-
const { t: a } =
|
|
177
|
+
function xe() {
|
|
178
|
+
const { t: a } = q();
|
|
178
179
|
return /* @__PURE__ */ c(
|
|
179
180
|
"div",
|
|
180
181
|
{
|
|
@@ -187,7 +188,7 @@ function be() {
|
|
|
187
188
|
{
|
|
188
189
|
"aria-hidden": "true",
|
|
189
190
|
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",
|
|
190
|
-
children: /* @__PURE__ */ s(
|
|
191
|
+
children: /* @__PURE__ */ s(F, {})
|
|
191
192
|
}
|
|
192
193
|
),
|
|
193
194
|
/* @__PURE__ */ s("p", { className: "type-title-item ds:text-[color:var(--foreground)]", children: a("messageTray.noMessages", "No messages") }),
|
|
@@ -196,48 +197,47 @@ function be() {
|
|
|
196
197
|
}
|
|
197
198
|
);
|
|
198
199
|
}
|
|
199
|
-
const
|
|
200
|
+
const be = re(
|
|
200
201
|
({
|
|
201
202
|
id: a,
|
|
202
203
|
items: t,
|
|
203
|
-
unreadCount:
|
|
204
|
-
open:
|
|
205
|
-
onOpenChange:
|
|
204
|
+
unreadCount: b,
|
|
205
|
+
open: H,
|
|
206
|
+
onOpenChange: _,
|
|
206
207
|
onItemClick: p,
|
|
207
208
|
onDismiss: u,
|
|
208
|
-
onMarkRead:
|
|
209
|
-
onMarkAllRead:
|
|
210
|
-
loading:
|
|
211
|
-
maxVisible:
|
|
212
|
-
viewAllLabel:
|
|
213
|
-
onViewAll:
|
|
214
|
-
align:
|
|
215
|
-
side:
|
|
216
|
-
size:
|
|
217
|
-
className:
|
|
218
|
-
...
|
|
219
|
-
},
|
|
220
|
-
var
|
|
221
|
-
const { t: d } =
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
), [g, I] = q(
|
|
209
|
+
onMarkRead: v,
|
|
210
|
+
onMarkAllRead: M,
|
|
211
|
+
loading: U = !1,
|
|
212
|
+
maxVisible: W,
|
|
213
|
+
viewAllLabel: R,
|
|
214
|
+
onViewAll: Y,
|
|
215
|
+
align: G = "end",
|
|
216
|
+
side: J = "bottom",
|
|
217
|
+
size: T = "md",
|
|
218
|
+
className: Q,
|
|
219
|
+
...X
|
|
220
|
+
}, Z) => {
|
|
221
|
+
var K;
|
|
222
|
+
const { t: d } = q(), [$, h] = le({
|
|
223
|
+
value: H,
|
|
224
|
+
defaultValue: !1,
|
|
225
|
+
onChange: _
|
|
226
|
+
}), w = $ ?? !1, [g, S] = ne(
|
|
227
227
|
() => t.map((e) => ({ item: e, leaving: !1 }))
|
|
228
|
-
),
|
|
228
|
+
), O = ie(() => {
|
|
229
229
|
if (typeof window > "u") return 200;
|
|
230
230
|
const e = window.getComputedStyle(document.documentElement).getPropertyValue("--animation-duration");
|
|
231
231
|
if (!e) return 200;
|
|
232
232
|
const r = e.trim(), n = parseFloat(r);
|
|
233
233
|
return Number.isFinite(n) ? r.endsWith("ms") ? n : n * 1e3 : 200;
|
|
234
234
|
}, []);
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
de(() => {
|
|
236
|
+
S((e) => {
|
|
237
237
|
const r = new Set(t.map((i) => i.id)), n = new Set(e.map((i) => i.item.id)), o = e.map((i) => {
|
|
238
238
|
if (r.has(i.item.id)) {
|
|
239
|
-
const
|
|
240
|
-
return
|
|
239
|
+
const P = t.find((te) => te.id === i.item.id);
|
|
240
|
+
return P ? { item: P, leaving: !1 } : { ...i, leaving: !0 };
|
|
241
241
|
}
|
|
242
242
|
return { ...i, leaving: !0 };
|
|
243
243
|
});
|
|
@@ -245,134 +245,134 @@ const Te = oe(
|
|
|
245
245
|
n.has(i.id) || o.push({ item: i, leaving: !1 });
|
|
246
246
|
return o;
|
|
247
247
|
});
|
|
248
|
-
}, [t]),
|
|
248
|
+
}, [t]), A(() => {
|
|
249
249
|
if (!g.some((n) => n.leaving)) return;
|
|
250
|
-
const e =
|
|
251
|
-
|
|
250
|
+
const e = O(), r = setTimeout(() => {
|
|
251
|
+
S((n) => n.filter((o) => !o.leaving));
|
|
252
252
|
}, e);
|
|
253
253
|
return () => clearTimeout(r);
|
|
254
|
-
}, [g,
|
|
255
|
-
const
|
|
256
|
-
|
|
254
|
+
}, [g, O]);
|
|
255
|
+
const N = m(null), k = m((K = t[0]) == null ? void 0 : K.id);
|
|
256
|
+
A(() => {
|
|
257
257
|
var n;
|
|
258
|
-
const e = (n = t[0]) == null ? void 0 : n.id, r =
|
|
259
|
-
if (r && e && r !== e &&
|
|
258
|
+
const e = (n = t[0]) == null ? void 0 : n.id, r = k.current;
|
|
259
|
+
if (r && e && r !== e && N.current) {
|
|
260
260
|
const o = t[0];
|
|
261
|
-
o && !o.read && (
|
|
261
|
+
o && !o.read && (N.current.textContent = d("messageTray.newMessage", {
|
|
262
262
|
sender: o.sender.name,
|
|
263
263
|
defaultValue: "New message from {{sender}}"
|
|
264
264
|
}));
|
|
265
265
|
}
|
|
266
|
-
|
|
266
|
+
k.current = e;
|
|
267
267
|
}, [t, d]);
|
|
268
|
-
const
|
|
269
|
-
count:
|
|
268
|
+
const y = b ?? 0, D = y > 0 ? d("messageTray.triggerLabel", {
|
|
269
|
+
count: y,
|
|
270
270
|
defaultValue: "Messages, {{count}} unread"
|
|
271
|
-
}) : d("messageTray.triggerLabelNone", "Messages, none unread"),
|
|
272
|
-
|
|
271
|
+
}) : d("messageTray.triggerLabelNone", "Messages, none unread"), ee = ye(
|
|
272
|
+
y,
|
|
273
273
|
d("messageTray.badgeCountOverflow", "99+")
|
|
274
|
-
),
|
|
274
|
+
), se = ve({ size: T }), l = m(t);
|
|
275
275
|
l.current = t;
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
const
|
|
279
|
-
|
|
280
|
-
const
|
|
276
|
+
const j = m(b);
|
|
277
|
+
j.current = b;
|
|
278
|
+
const I = m(w);
|
|
279
|
+
I.current = w;
|
|
280
|
+
const ae = oe(
|
|
281
281
|
() => ({
|
|
282
282
|
open: () => h(!0),
|
|
283
283
|
close: () => h(!1),
|
|
284
|
-
isOpen: () =>
|
|
284
|
+
isOpen: () => I.current,
|
|
285
285
|
getItems: () => l.current.map((e) => ({ id: e.id, read: !!e.read })),
|
|
286
|
-
getUnreadCount: () =>
|
|
286
|
+
getUnreadCount: () => j.current ?? l.current.filter((e) => !e.read).length,
|
|
287
287
|
selectItem: (e) => {
|
|
288
288
|
const r = l.current.find((n) => n.id === e);
|
|
289
289
|
r && (p == null || p(r));
|
|
290
290
|
},
|
|
291
291
|
markRead: (e) => {
|
|
292
292
|
const r = l.current.find((n) => n.id === e);
|
|
293
|
-
r && (
|
|
293
|
+
r && (v == null || v(r));
|
|
294
294
|
},
|
|
295
295
|
dismiss: (e) => {
|
|
296
296
|
const r = l.current.find((n) => n.id === e);
|
|
297
297
|
r && (u == null || u(r));
|
|
298
298
|
}
|
|
299
299
|
}),
|
|
300
|
-
[h, p,
|
|
301
|
-
),
|
|
302
|
-
return
|
|
300
|
+
[h, p, v, u]
|
|
301
|
+
), V = m(null);
|
|
302
|
+
return ce(Z, () => V.current, []), ue(ge, ae, a), /* @__PURE__ */ s(
|
|
303
303
|
"div",
|
|
304
304
|
{
|
|
305
|
-
ref:
|
|
305
|
+
ref: V,
|
|
306
306
|
"data-component": "message-tray",
|
|
307
307
|
"data-component-id": a,
|
|
308
|
-
className: [
|
|
309
|
-
...
|
|
310
|
-
children: /* @__PURE__ */ c(
|
|
311
|
-
/* @__PURE__ */ s(
|
|
312
|
-
|
|
308
|
+
className: [fe({ size: T }), Q].filter(Boolean).join(" "),
|
|
309
|
+
...X,
|
|
310
|
+
children: /* @__PURE__ */ c(x.Root, { open: w, onOpenChange: h, children: [
|
|
311
|
+
/* @__PURE__ */ s(x.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
312
|
+
me,
|
|
313
313
|
{
|
|
314
|
-
icon: /* @__PURE__ */ s(
|
|
314
|
+
icon: /* @__PURE__ */ s(F, {}),
|
|
315
315
|
intent: "outline",
|
|
316
|
-
size:
|
|
317
|
-
"aria-label":
|
|
316
|
+
size: T === "sm" ? "sm" : "md",
|
|
317
|
+
"aria-label": D,
|
|
318
318
|
"aria-haspopup": "dialog"
|
|
319
319
|
}
|
|
320
320
|
) }),
|
|
321
|
-
|
|
321
|
+
y > 0 ? /* @__PURE__ */ s(
|
|
322
322
|
"span",
|
|
323
323
|
{
|
|
324
324
|
"aria-hidden": "true",
|
|
325
325
|
"data-testid": "message-tray-badge",
|
|
326
326
|
className: he(),
|
|
327
|
-
children:
|
|
327
|
+
children: ee
|
|
328
328
|
}
|
|
329
329
|
) : null,
|
|
330
330
|
/* @__PURE__ */ s(
|
|
331
331
|
"div",
|
|
332
332
|
{
|
|
333
|
-
ref:
|
|
333
|
+
ref: N,
|
|
334
334
|
"aria-live": "polite",
|
|
335
335
|
"aria-atomic": "true",
|
|
336
336
|
className: "ds:sr-only"
|
|
337
337
|
}
|
|
338
338
|
),
|
|
339
|
-
/* @__PURE__ */ s(
|
|
340
|
-
|
|
339
|
+
/* @__PURE__ */ s(x.Portal, { children: /* @__PURE__ */ c(
|
|
340
|
+
x.Content,
|
|
341
341
|
{
|
|
342
342
|
role: "dialog",
|
|
343
343
|
"aria-label": d("messageTray.panelTitle", "Messages"),
|
|
344
|
-
side:
|
|
345
|
-
align:
|
|
344
|
+
side: J,
|
|
345
|
+
align: G,
|
|
346
346
|
sideOffset: 8,
|
|
347
347
|
collisionPadding: 16,
|
|
348
|
-
className:
|
|
348
|
+
className: se,
|
|
349
349
|
children: [
|
|
350
350
|
/* @__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: [
|
|
351
351
|
/* @__PURE__ */ s("h3", { className: "ds:m-0 type-title-card ds:text-[color:var(--foreground)]", children: d("messageTray.panelTitle", "Messages") }),
|
|
352
|
-
|
|
353
|
-
|
|
352
|
+
M && t.some((e) => !e.read) ? /* @__PURE__ */ s(
|
|
353
|
+
E,
|
|
354
354
|
{
|
|
355
355
|
intent: "link",
|
|
356
356
|
size: "sm",
|
|
357
|
-
onClick:
|
|
357
|
+
onClick: M,
|
|
358
358
|
className: "ds:text-[length:var(--font-size-xs)]",
|
|
359
359
|
children: d("messageTray.markAllRead", "Mark all as read")
|
|
360
360
|
}
|
|
361
361
|
) : null
|
|
362
362
|
] }),
|
|
363
|
-
/* @__PURE__ */ s(
|
|
363
|
+
/* @__PURE__ */ s(L, {}),
|
|
364
364
|
/* @__PURE__ */ s(
|
|
365
365
|
"div",
|
|
366
366
|
{
|
|
367
367
|
role: g.length > 0 ? "list" : void 0,
|
|
368
|
-
"data-max-visible":
|
|
368
|
+
"data-max-visible": W,
|
|
369
369
|
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(--message-tray-max-block-size,26rem)]",
|
|
370
|
-
children:
|
|
371
|
-
/* @__PURE__ */ s(
|
|
372
|
-
/* @__PURE__ */ s(
|
|
373
|
-
/* @__PURE__ */ s(
|
|
374
|
-
] }) : g.length === 0 ? /* @__PURE__ */ s(
|
|
375
|
-
|
|
370
|
+
children: U ? /* @__PURE__ */ c(B, { children: [
|
|
371
|
+
/* @__PURE__ */ s(z, {}),
|
|
372
|
+
/* @__PURE__ */ s(z, {}),
|
|
373
|
+
/* @__PURE__ */ s(z, {})
|
|
374
|
+
] }) : g.length === 0 ? /* @__PURE__ */ s(xe, {}) : g.map(({ item: e, leaving: r }) => /* @__PURE__ */ s(
|
|
375
|
+
pe,
|
|
376
376
|
{
|
|
377
377
|
item: e,
|
|
378
378
|
variant: "compact",
|
|
@@ -385,16 +385,16 @@ const Te = oe(
|
|
|
385
385
|
))
|
|
386
386
|
}
|
|
387
387
|
),
|
|
388
|
-
|
|
389
|
-
/* @__PURE__ */ s(
|
|
388
|
+
R ? /* @__PURE__ */ c(B, { children: [
|
|
389
|
+
/* @__PURE__ */ s(L, {}),
|
|
390
390
|
/* @__PURE__ */ s("div", { className: "ds:pt-[var(--spacing-xs)]", children: /* @__PURE__ */ s(
|
|
391
|
-
|
|
391
|
+
E,
|
|
392
392
|
{
|
|
393
393
|
intent: "link",
|
|
394
394
|
size: "sm",
|
|
395
|
-
onClick:
|
|
395
|
+
onClick: Y,
|
|
396
396
|
className: "ds:w-full ds:justify-center",
|
|
397
|
-
children:
|
|
397
|
+
children: R
|
|
398
398
|
}
|
|
399
399
|
) })
|
|
400
400
|
] }) : null
|
|
@@ -406,9 +406,9 @@ const Te = oe(
|
|
|
406
406
|
);
|
|
407
407
|
}
|
|
408
408
|
);
|
|
409
|
-
|
|
409
|
+
be.displayName = "MessageTray";
|
|
410
410
|
export {
|
|
411
|
-
|
|
412
|
-
|
|
411
|
+
be as M,
|
|
412
|
+
ge as m
|
|
413
413
|
};
|
|
414
|
-
//# sourceMappingURL=message-tray-
|
|
414
|
+
//# sourceMappingURL=message-tray-BNAS8al4.js.map
|