@alfadocs/ui-kit 0.1.5 → 0.1.7

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.
Files changed (53) hide show
  1. package/README.md +26 -0
  2. package/dist/_chunks/{balance-cell-renderer-BRWt3neo.js → balance-cell-renderer-BWm3knY9.js} +2 -2
  3. package/dist/_chunks/{balance-cell-renderer-BRWt3neo.js.map → balance-cell-renderer-BWm3knY9.js.map} +1 -1
  4. package/dist/_chunks/{chat-container-BZvQ3_yT.js → chat-container-Cm3SlR2p.js} +12 -12
  5. package/dist/_chunks/{chat-container-BZvQ3_yT.js.map → chat-container-Cm3SlR2p.js.map} +1 -1
  6. package/dist/_chunks/{chat-input-DsIrWM4f.js → chat-input-DreOPP8A.js} +36 -31
  7. package/dist/_chunks/chat-input-DreOPP8A.js.map +1 -0
  8. package/dist/_chunks/{dropdown-menu-JNo66A-j.js → dropdown-menu-Cw3EyPZv.js} +35 -31
  9. package/dist/_chunks/dropdown-menu-Cw3EyPZv.js.map +1 -0
  10. package/dist/_chunks/{leo-sidebar-BzN4pJ7j.js → leo-sidebar-nbHib2D-.js} +136 -128
  11. package/dist/_chunks/leo-sidebar-nbHib2D-.js.map +1 -0
  12. package/dist/_chunks/{notification-tray-Bq-08ReD.js → notification-tray-B7U5YZYg.js} +5 -2
  13. package/dist/_chunks/notification-tray-B7U5YZYg.js.map +1 -0
  14. package/dist/_chunks/{patient-shell-DP54y6rc.js → patient-shell-7cXqIMFg.js} +2 -2
  15. package/dist/_chunks/{patient-shell-DP54y6rc.js.map → patient-shell-7cXqIMFg.js.map} +1 -1
  16. package/dist/_chunks/{popover-DvAtFOi-.js → popover-C3CTUsqh.js} +20 -16
  17. package/dist/_chunks/popover-C3CTUsqh.js.map +1 -0
  18. package/dist/_chunks/{privacy-lock-DS6QRo2N.js → privacy-lock-CQpgkLec.js} +23 -23
  19. package/dist/_chunks/{privacy-lock-DS6QRo2N.js.map → privacy-lock-CQpgkLec.js.map} +1 -1
  20. package/dist/_chunks/{suggestion-chip-6AB40rxz.js → suggestion-chip-BNJ2M8Os.js} +3 -3
  21. package/dist/_chunks/suggestion-chip-BNJ2M8Os.js.map +1 -0
  22. package/dist/_chunks/{theme-toggle-COHFwO2H.js → theme-toggle-BHiMMEQN.js} +2 -2
  23. package/dist/_chunks/{theme-toggle-COHFwO2H.js.map → theme-toggle-BHiMMEQN.js.map} +1 -1
  24. package/dist/_chunks/{workflow-map-DGJwVcO-.js → workflow-map-XeqHDFvp.js} +2 -2
  25. package/dist/_chunks/{workflow-map-DGJwVcO-.js.map → workflow-map-XeqHDFvp.js.map} +1 -1
  26. package/dist/agent-catalog.json +1 -1
  27. package/dist/components/chat-container/index.js +1 -1
  28. package/dist/components/chat-input/chat-input.d.ts.map +1 -1
  29. package/dist/components/chat-input/index.js +1 -1
  30. package/dist/components/data-table/index.js +1 -1
  31. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  32. package/dist/components/dropdown-menu/index.js +1 -1
  33. package/dist/components/notification-tray/index.js +1 -1
  34. package/dist/components/notification-tray/notification-tray.d.ts.map +1 -1
  35. package/dist/components/popover/index.js +1 -1
  36. package/dist/components/popover/popover.d.ts.map +1 -1
  37. package/dist/components/privacy-lock/index.js +1 -1
  38. package/dist/components/suggestion-chip/index.js +1 -1
  39. package/dist/components/theme-toggle/index.js +1 -1
  40. package/dist/components/workflow/index.js +1 -1
  41. package/dist/index.js +12 -12
  42. package/dist/patterns/leo-assistant/index.js +1 -1
  43. package/dist/patterns/leo-assistant/leo-chat-surface.d.ts.map +1 -1
  44. package/dist/patterns/leo-assistant/leo-sidebar.d.ts.map +1 -1
  45. package/dist/patterns/patient-shell/index.js +1 -1
  46. package/dist/tokens.css +1 -1
  47. package/package.json +1 -1
  48. package/dist/_chunks/chat-input-DsIrWM4f.js.map +0 -1
  49. package/dist/_chunks/dropdown-menu-JNo66A-j.js.map +0 -1
  50. package/dist/_chunks/leo-sidebar-BzN4pJ7j.js.map +0 -1
  51. package/dist/_chunks/notification-tray-Bq-08ReD.js.map +0 -1
  52. package/dist/_chunks/popover-DvAtFOi-.js.map +0 -1
  53. package/dist/_chunks/suggestion-chip-6AB40rxz.js.map +0 -1
@@ -1,19 +1,19 @@
1
1
  import { jsx as e, jsxs as c, Fragment as A } from "react/jsx-runtime";
2
- import { forwardRef as L, useMemo as U } from "react";
2
+ import { forwardRef as k, useMemo as U } from "react";
3
3
  import * as ee from "@radix-ui/react-dialog";
4
4
  import { useTranslation as y } from "react-i18next";
5
5
  import { F as se } from "./floating-action-button-Cnw-f6AG.js";
6
6
  import { I as B } from "./icon-button-Wnnde5lc.js";
7
7
  import { S as E } from "./sheet-BhNpLHc9.js";
8
8
  import { X as de } from "./x-CCcI3eJp.js";
9
- import { A as C } from "./avatar-Dcr6XuDQ.js";
9
+ import { A as L } from "./avatar-Dcr6XuDQ.js";
10
10
  import { B as D } from "./button-7mLWcMp_.js";
11
- import { C as re } from "./chat-container-BZvQ3_yT.js";
12
- import { C as ae } from "./chat-message-ByouZpPP.js";
13
- import { C as le } from "./chat-input-DsIrWM4f.js";
14
- import { S as oe } from "./streaming-text-BgjCTVOw.js";
15
- import { a as q, S as O } from "./suggestion-chip-6AB40rxz.js";
16
- import { T as ie } from "./typing-indicator-CbUBf-Dx.js";
11
+ import { C as ae } from "./chat-container-Cm3SlR2p.js";
12
+ import { C as re } from "./chat-message-ByouZpPP.js";
13
+ import { C as le } from "./chat-input-DreOPP8A.js";
14
+ import { S as ie } from "./streaming-text-BgjCTVOw.js";
15
+ import { a as q, S as O } from "./suggestion-chip-BNJ2M8Os.js";
16
+ import { T as oe } from "./typing-indicator-CbUBf-Dx.js";
17
17
  import { P as te } from "./progress-B4Of_pzz.js";
18
18
  import { S as ne } from "./square-CZoGU14v.js";
19
19
  import { c as ce } from "./createLucideIcon-CrFbzy84.js";
@@ -51,16 +51,16 @@ const ge = [
51
51
  icon: "ds:size-8"
52
52
  }
53
53
  };
54
- function j({
54
+ function w({
55
55
  size: s,
56
- label: r
56
+ label: a
57
57
  }) {
58
- const a = Q[s];
58
+ const r = Q[s];
59
59
  return /* @__PURE__ */ e(
60
60
  "span",
61
61
  {
62
62
  role: "img",
63
- "aria-label": r,
63
+ "aria-label": a,
64
64
  className: [
65
65
  "ds:inline-flex ds:shrink-0 ds:items-center ds:justify-center",
66
66
  "ds:rounded-[var(--radius-full)]",
@@ -71,43 +71,43 @@ function j({
71
71
  // forced-colors: UA strips color-mix backgrounds; fall back to
72
72
  // a bordered disc so the identity still reads in HCM.
73
73
  "ds:forced-colors:bg-transparent ds:forced-colors:border ds:forced-colors:border-[CanvasText]",
74
- a.box
74
+ r.box
75
75
  ].join(" "),
76
- children: /* @__PURE__ */ e(M, { "aria-hidden": "true", className: a.icon })
76
+ children: /* @__PURE__ */ e(M, { "aria-hidden": "true", className: r.icon })
77
77
  }
78
78
  );
79
79
  }
80
- function be({
80
+ function he({
81
81
  size: s,
82
- label: r
82
+ label: a
83
83
  }) {
84
- const a = Q[s];
84
+ const r = Q[s];
85
85
  return /* @__PURE__ */ e(
86
86
  "span",
87
87
  {
88
88
  role: "img",
89
- "aria-label": r,
89
+ "aria-label": a,
90
90
  className: [
91
91
  "ds:inline-flex ds:shrink-0 ds:items-center ds:justify-center",
92
92
  "ds:rounded-[var(--radius-full)]",
93
93
  "ds:bg-[color-mix(in_srgb,var(--muted-foreground)_14%,transparent)]",
94
94
  "ds:text-[color:var(--muted-foreground)]",
95
95
  "ds:forced-colors:bg-transparent ds:forced-colors:border ds:forced-colors:border-[CanvasText]",
96
- a.box
96
+ r.box
97
97
  ].join(" "),
98
- children: /* @__PURE__ */ e(pe, { "aria-hidden": "true", className: a.icon })
98
+ children: /* @__PURE__ */ e(pe, { "aria-hidden": "true", className: r.icon })
99
99
  }
100
100
  );
101
101
  }
102
- function he(s, r) {
103
- return s ? s.slot ? { slot: s.slot } : { name: s.name, src: s.src } : { slot: /* @__PURE__ */ e(be, { size: "sm", label: r }) };
102
+ function be(s, a) {
103
+ return s ? s.slot ? { slot: s.slot } : { name: s.name, src: s.src } : { slot: /* @__PURE__ */ e(he, { size: "sm", label: a }) };
104
104
  }
105
105
  function ve({
106
106
  assistantName: s,
107
- avatarSrc: r,
108
- greeting: a,
109
- subtitle: i,
110
- suggestions: o,
107
+ avatarSrc: a,
108
+ greeting: r,
109
+ subtitle: o,
110
+ suggestions: i,
111
111
  onSuggestion: t
112
112
  }) {
113
113
  const { t: u } = y(), l = "leo-empty-state-heading";
@@ -125,24 +125,24 @@ function ve({
125
125
  ].join(" "),
126
126
  "data-testid": "leo-empty-state",
127
127
  children: [
128
- r ? /* @__PURE__ */ e(C, { name: s, src: r, size: "xl" }) : /* @__PURE__ */ e(j, { size: "xl", label: s }),
128
+ a ? /* @__PURE__ */ e(L, { name: s, src: a, size: "xl" }) : /* @__PURE__ */ e(w, { size: "xl", label: s }),
129
129
  /* @__PURE__ */ c("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)] ds:max-w-[32rem]", children: [
130
130
  /* @__PURE__ */ e(
131
131
  "h2",
132
132
  {
133
133
  id: l,
134
134
  className: "type-title-section ds:m-0 ds:text-[color:var(--foreground)]",
135
- children: a
135
+ children: r
136
136
  }
137
137
  ),
138
- /* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: i })
138
+ /* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: o })
139
139
  ] }),
140
- o && o.length > 0 ? /* @__PURE__ */ e("div", { className: "ds:w-full ds:max-w-[40rem]", children: /* @__PURE__ */ e(
140
+ i && i.length > 0 ? /* @__PURE__ */ e("div", { className: "ds:w-full ds:max-w-[40rem]", children: /* @__PURE__ */ e(
141
141
  q,
142
142
  {
143
143
  label: u("leo.exampleQuestions"),
144
144
  className: "ds:justify-center",
145
- children: o.map((n) => /* @__PURE__ */ e(
145
+ children: i.map((n) => /* @__PURE__ */ e(
146
146
  O,
147
147
  {
148
148
  intent: "suggestion",
@@ -161,25 +161,25 @@ function ve({
161
161
  }
162
162
  function xe({
163
163
  message: s,
164
- assistantName: r,
165
- avatarSrc: a,
166
- renderMarkdown: i
164
+ assistantName: a,
165
+ avatarSrc: r,
166
+ renderMarkdown: o
167
167
  }) {
168
- const { t: o, i18n: t } = y(), u = o("chat.message.role.assistant"), l = U(() => {
168
+ const { t: i, i18n: t } = y(), u = i("chat.message.role.assistant"), l = U(() => {
169
169
  if (!s.timestamp) return null;
170
170
  const m = s.timestamp instanceof Date ? s.timestamp : new Date(s.timestamp);
171
171
  return Number.isNaN(m.getTime()) ? null : new Intl.DateTimeFormat(t.language, {
172
172
  hour: "2-digit",
173
173
  minute: "2-digit"
174
174
  }).format(m);
175
- }, [s.timestamp, t.language]), n = l ? o("chat.message.label", { role: u, time: l }) : o("chat.message.labelNoTime", { role: u });
175
+ }, [s.timestamp, t.language]), n = l ? i("chat.message.label", { role: u, time: l }) : i("chat.message.labelNoTime", { role: u });
176
176
  return /* @__PURE__ */ c(
177
177
  "article",
178
178
  {
179
179
  "aria-label": n,
180
180
  className: "ds:flex ds:w-full ds:items-start ds:flex-row ds:gap-[var(--spacing-sm)]",
181
181
  children: [
182
- a ? /* @__PURE__ */ e(C, { name: r, src: a, size: "sm" }) : /* @__PURE__ */ e(j, { size: "sm", label: r }),
182
+ r ? /* @__PURE__ */ e(L, { name: a, src: r, size: "sm" }) : /* @__PURE__ */ e(w, { size: "sm", label: a }),
183
183
  /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:items-start", children: /* @__PURE__ */ e(
184
184
  "div",
185
185
  {
@@ -194,11 +194,11 @@ function xe({
194
194
  "ds:rounded-[var(--radius-md)] ds:rounded-es-[var(--radius-sm)]"
195
195
  ].join(" "),
196
196
  children: /* @__PURE__ */ e(
197
- oe,
197
+ ie,
198
198
  {
199
199
  content: s.content,
200
200
  isStreaming: !0,
201
- renderMarkdown: i
201
+ renderMarkdown: o
202
202
  }
203
203
  )
204
204
  }
@@ -209,10 +209,10 @@ function xe({
209
209
  }
210
210
  function Ne({
211
211
  assistantName: s,
212
- avatarSrc: r,
213
- onNewConversation: a,
214
- headerEndSlot: i,
215
- density: o
212
+ avatarSrc: a,
213
+ onNewConversation: r,
214
+ headerEndSlot: o,
215
+ density: i
216
216
  }) {
217
217
  const { t } = y();
218
218
  return /* @__PURE__ */ c(
@@ -221,59 +221,62 @@ function Ne({
221
221
  "aria-label": t("leo.headerLabel"),
222
222
  className: [
223
223
  "ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-sm)]",
224
- "ds:border-b ds:border-[color:var(--border)]",
224
+ // Soft drop-shadow on the block-end edge in place of a `border-b`
225
+ // against `--border` — same rationale as the Leo sidebar's inline
226
+ // edge (see leo-sidebar.tsx).
227
+ "ds:shadow-[var(--shadow-chrome-down)]",
225
228
  "ds:bg-[var(--background)]",
226
229
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
227
- o === "compact" ? "ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]" : "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]"
230
+ i === "compact" ? "ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]" : "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]"
228
231
  ].join(" "),
229
232
  "data-testid": "leo-header",
230
233
  children: [
231
- r ? /* @__PURE__ */ e(
232
- C,
234
+ a ? /* @__PURE__ */ e(
235
+ L,
233
236
  {
234
237
  name: s,
235
- src: r,
236
- size: o === "compact" ? "sm" : "md"
238
+ src: a,
239
+ size: i === "compact" ? "sm" : "md"
237
240
  }
238
241
  ) : /* @__PURE__ */ e(
239
- j,
242
+ w,
240
243
  {
241
- size: o === "compact" ? "sm" : "md",
244
+ size: i === "compact" ? "sm" : "md",
242
245
  label: s
243
246
  }
244
247
  ),
245
248
  /* @__PURE__ */ e("span", { className: "type-title-item ds:text-[color:var(--foreground)]", children: s }),
246
249
  /* @__PURE__ */ c("div", { className: "ds:ms-auto ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
247
- a ? /* @__PURE__ */ e(
250
+ r ? /* @__PURE__ */ e(
248
251
  D,
249
252
  {
250
253
  intent: "ghost",
251
254
  size: "sm",
252
255
  startIcon: /* @__PURE__ */ e(me, { "aria-hidden": "true" }),
253
- onClick: a,
256
+ onClick: r,
254
257
  children: t("leo.newConversation")
255
258
  }
256
259
  ) : null,
257
- i
260
+ o
258
261
  ] })
259
262
  ]
260
263
  }
261
264
  );
262
265
  }
263
- const w = L(
266
+ const C = k(
264
267
  ({
265
268
  messages: s,
266
- onSend: r,
267
- onRetry: a,
268
- onSuggestion: i,
269
- suggestions: o,
269
+ onSend: a,
270
+ onRetry: r,
271
+ onSuggestion: o,
272
+ suggestions: i,
270
273
  isGenerating: t = !1,
271
274
  onStopGenerating: u,
272
275
  usage: l,
273
276
  onUpgrade: n,
274
277
  assistantName: m,
275
278
  assistantAvatar: d,
276
- userAvatar: h,
279
+ userAvatar: b,
277
280
  greeting: v,
278
281
  subtitle: I,
279
282
  density: x = "default",
@@ -283,26 +286,26 @@ const w = L(
283
286
  acceptedFileTypes: Z,
284
287
  headerEndSlot: $
285
288
  }, J) => {
286
- const { t: p } = y(), f = m ?? p("leo.name"), K = v ?? p("leo.greeting"), V = I ?? p("leo.subtitle"), g = s[s.length - 1], k = (g == null ? void 0 : g.role) === "assistant" && g.streaming === !0, P = k ? s.slice(0, -1) : s, Y = U(() => {
287
- const N = p("chat.message.role.user"), T = P.map((b) => {
289
+ const { t: p } = y(), f = m ?? p("leo.name"), K = v ?? p("leo.greeting"), V = I ?? p("leo.subtitle"), g = s[s.length - 1], j = (g == null ? void 0 : g.role) === "assistant" && g.streaming === !0, P = j ? s.slice(0, -1) : s, Y = U(() => {
290
+ const N = p("chat.message.role.user"), T = P.map((h) => {
288
291
  let _;
289
- return b.role === "assistant" ? _ = d != null && d.src ? { name: f, src: d.src } : { slot: /* @__PURE__ */ e(j, { size: "sm", label: f }) } : b.role === "user" && (_ = he(h, N)), {
290
- id: b.id,
292
+ return h.role === "assistant" ? _ = d != null && d.src ? { name: f, src: d.src } : { slot: /* @__PURE__ */ e(w, { size: "sm", label: f }) } : h.role === "user" && (_ = be(b, N)), {
293
+ id: h.id,
291
294
  node: /* @__PURE__ */ e(
292
- ae,
295
+ re,
293
296
  {
294
- role: b.role,
295
- content: b.content,
297
+ role: h.role,
298
+ content: h.content,
296
299
  avatar: _,
297
- timestamp: b.timestamp,
298
- status: b.status,
300
+ timestamp: h.timestamp,
301
+ status: h.status,
299
302
  renderMarkdown: S,
300
- onRetry: a ? () => a(b.id) : void 0
303
+ onRetry: r ? () => r(h.id) : void 0
301
304
  }
302
305
  )
303
306
  };
304
307
  });
305
- return k && g && T.push({
308
+ return j && g && T.push({
306
309
  id: g.id,
307
310
  node: /* @__PURE__ */ e(
308
311
  xe,
@@ -313,17 +316,17 @@ const w = L(
313
316
  renderMarkdown: S
314
317
  }
315
318
  )
316
- }), t && !k && T.push({
319
+ }), t && !j && T.push({
317
320
  id: "__leo-typing__",
318
321
  node: /* @__PURE__ */ c("div", { className: "ds:flex ds:w-full ds:items-start ds:gap-[var(--spacing-sm)]", children: [
319
322
  d != null && d.src ? /* @__PURE__ */ e(
320
- C,
323
+ L,
321
324
  {
322
325
  name: f,
323
326
  src: d.src,
324
327
  size: "sm"
325
328
  }
326
- ) : /* @__PURE__ */ e(j, { size: "sm", label: f }),
329
+ ) : /* @__PURE__ */ e(w, { size: "sm", label: f }),
327
330
  /* @__PURE__ */ e(
328
331
  "div",
329
332
  {
@@ -334,7 +337,7 @@ const w = L(
334
337
  "ds:bg-muted/40"
335
338
  ].join(" "),
336
339
  children: /* @__PURE__ */ e(
337
- ie,
340
+ oe,
338
341
  {
339
342
  label: p("chat.typing"),
340
343
  density: x
@@ -346,14 +349,14 @@ const w = L(
346
349
  }), T;
347
350
  }, [
348
351
  P,
349
- k,
352
+ j,
350
353
  g,
351
354
  t,
352
355
  f,
353
356
  d == null ? void 0 : d.src,
354
- h,
357
+ b,
355
358
  S,
356
- a,
359
+ r,
357
360
  x,
358
361
  p
359
362
  ]), G = l ? Math.min(100, Math.max(0, l.current / Math.max(1, l.limit) * 100)) : 0, z = l ? l.current >= l.limit : !1, F = l ? l.label ?? p("leo.usageLabel", {
@@ -390,18 +393,18 @@ const w = L(
390
393
  }
391
394
  )
392
395
  ] }) : null,
393
- !R && o && o.length > 0 && !t ? /* @__PURE__ */ e(
396
+ !R && i && i.length > 0 && !t ? /* @__PURE__ */ e(
394
397
  q,
395
398
  {
396
399
  label: p("leo.exampleQuestions"),
397
400
  "data-testid": "leo-followup-suggestions",
398
- children: o.map((N) => /* @__PURE__ */ e(
401
+ children: i.map((N) => /* @__PURE__ */ e(
399
402
  O,
400
403
  {
401
404
  intent: "followup",
402
405
  startIcon: N.icon,
403
406
  keepOnSelect: !0,
404
- onSelect: () => i == null ? void 0 : i(N),
407
+ onSelect: () => o == null ? void 0 : o(N),
405
408
  children: N.label
406
409
  },
407
410
  N.id
@@ -413,7 +416,7 @@ const w = L(
413
416
  le,
414
417
  {
415
418
  submitOnEnter: !0,
416
- onSubmit: r,
419
+ onSubmit: a,
417
420
  onAttach: X,
418
421
  accept: Z,
419
422
  disabled: z,
@@ -461,16 +464,21 @@ const w = L(
461
464
  avatarSrc: d == null ? void 0 : d.src,
462
465
  greeting: K,
463
466
  subtitle: V,
464
- suggestions: o,
465
- onSuggestion: i
467
+ suggestions: i,
468
+ onSuggestion: o
466
469
  }
467
470
  ),
468
471
  /* @__PURE__ */ e(
469
472
  "div",
470
473
  {
471
474
  className: [
472
- "ds:shrink-0 ds:border-t ds:border-[color:var(--border)]",
473
- "ds:bg-[var(--background)]",
475
+ // No top divider — the ChatInput's own soft shadow + the
476
+ // border-radius give it enough visual containment, and a
477
+ // surface-level separator here read as a sharp line at
478
+ // 1px-equivalent shadow blur. Keep the bg explicit so
479
+ // the chat-input chrome paints over the messages-area
480
+ // background instead of mixing with it.
481
+ "ds:shrink-0 ds:bg-[var(--background)]",
474
482
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
475
483
  "ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]"
476
484
  ].join(" "),
@@ -478,7 +486,7 @@ const w = L(
478
486
  }
479
487
  )
480
488
  ] }) : /* @__PURE__ */ e(
481
- re,
489
+ ae,
482
490
  {
483
491
  messages: Y,
484
492
  density: x,
@@ -491,12 +499,12 @@ const w = L(
491
499
  );
492
500
  }
493
501
  );
494
- w.displayName = "LeoChatSurface";
495
- const ye = L(
496
- ({ headerSlot: s, ...r }, a) => /* @__PURE__ */ c(
502
+ C.displayName = "LeoChatSurface";
503
+ const ye = k(
504
+ ({ headerSlot: s, ...a }, r) => /* @__PURE__ */ c(
497
505
  "div",
498
506
  {
499
- ref: a,
507
+ ref: r,
500
508
  className: [
501
509
  "ds:flex ds:min-h-0 ds:flex-1 ds:flex-col",
502
510
  "ds:bg-[var(--background)] ds:text-[color:var(--foreground)]",
@@ -524,7 +532,7 @@ const ye = L(
524
532
  "ds:[max-inline-size:48rem]",
525
533
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]"
526
534
  ].join(" "),
527
- children: /* @__PURE__ */ e(w, { ...r })
535
+ children: /* @__PURE__ */ e(C, { ...a })
528
536
  }
529
537
  ) })
530
538
  ]
@@ -535,17 +543,17 @@ ye.displayName = "LeoEmbedded";
535
543
  function ze(s) {
536
544
  return s > 99 ? "99+" : String(s);
537
545
  }
538
- const je = L(
546
+ const we = k(
539
547
  ({
540
548
  open: s,
541
- onOpenChange: r,
542
- position: a = "bottom-end",
543
- unseenCount: i,
544
- assistantName: o,
549
+ onOpenChange: a,
550
+ position: r = "bottom-end",
551
+ unseenCount: o,
552
+ assistantName: i,
545
553
  assistantAvatar: t,
546
554
  ...u
547
555
  }, l) => {
548
- const { t: n } = y(), m = o || n("leo.name"), d = typeof i == "number" && i > 0, h = d ? n("leo.unseenCount", { count: i }) : n("leo.open"), v = /* @__PURE__ */ e(ee.Close, { asChild: !0, children: /* @__PURE__ */ e(
556
+ const { t: n } = y(), m = i || n("leo.name"), d = typeof o == "number" && o > 0, b = d ? n("leo.unseenCount", { count: o }) : n("leo.open"), v = /* @__PURE__ */ e(ee.Close, { asChild: !0, children: /* @__PURE__ */ e(
549
557
  B,
550
558
  {
551
559
  icon: /* @__PURE__ */ e(de, { "aria-hidden": "true" }),
@@ -555,7 +563,7 @@ const je = L(
555
563
  "data-testid": "leo-popout-close"
556
564
  }
557
565
  ) });
558
- return /* @__PURE__ */ c(E.Root, { open: s, onOpenChange: r, children: [
566
+ return /* @__PURE__ */ c(E.Root, { open: s, onOpenChange: a, children: [
559
567
  /* @__PURE__ */ e(
560
568
  "div",
561
569
  {
@@ -563,7 +571,7 @@ const je = L(
563
571
  className: [
564
572
  "ds:fixed ds:z-[var(--z-fixed)]",
565
573
  "ds:bottom-[calc(var(--spacing-lg)+env(safe-area-inset-bottom,0px))]",
566
- a === "bottom-end" ? "ds:end-[var(--spacing-lg)]" : "ds:start-[var(--spacing-lg)]"
574
+ r === "bottom-end" ? "ds:end-[var(--spacing-lg)]" : "ds:start-[var(--spacing-lg)]"
567
575
  ].join(" "),
568
576
  "data-testid": "leo-popout-fab-wrapper",
569
577
  children: /* @__PURE__ */ c("div", { className: "ds:relative", children: [
@@ -571,11 +579,11 @@ const je = L(
571
579
  se,
572
580
  {
573
581
  icon: /* @__PURE__ */ e(M, { "aria-hidden": "true" }),
574
- "aria-label": h,
582
+ "aria-label": b,
575
583
  variant: "primary",
576
584
  size: "md",
577
585
  position: "static",
578
- onClick: () => r(!0),
586
+ onClick: () => a(!0),
579
587
  "data-testid": "leo-popout-fab"
580
588
  }
581
589
  ),
@@ -596,7 +604,7 @@ const je = L(
596
604
  "ds:pointer-events-none ds:select-none",
597
605
  "ds:forced-colors:outline ds:forced-colors:outline-1 ds:forced-colors:outline-[CanvasText]"
598
606
  ].join(" "),
599
- children: ze(i)
607
+ children: ze(o)
600
608
  }
601
609
  ) : null
602
610
  ] })
@@ -613,7 +621,7 @@ const je = L(
613
621
  children: [
614
622
  /* @__PURE__ */ e(E.Title, { className: "ds:sr-only", children: m }),
615
623
  /* @__PURE__ */ e(
616
- w,
624
+ C,
617
625
  {
618
626
  ...u,
619
627
  assistantName: m,
@@ -628,22 +636,22 @@ const je = L(
628
636
  ] });
629
637
  }
630
638
  );
631
- je.displayName = "LeoPopout";
632
- function ke(s) {
639
+ we.displayName = "LeoPopout";
640
+ function je(s) {
633
641
  return s > 99 ? "99+" : String(s);
634
642
  }
635
- const Le = "ds:[inline-size:22rem]", Ce = "ds:[inline-size:3rem]", we = L(
643
+ const ke = "ds:[inline-size:22rem]", Le = "ds:[inline-size:3rem]", Ce = k(
636
644
  ({
637
645
  open: s,
638
- onOpenChange: r,
639
- side: a = "end",
640
- unseenCount: i,
641
- footerSlot: o,
646
+ onOpenChange: a,
647
+ side: r = "end",
648
+ unseenCount: o,
649
+ footerSlot: i,
642
650
  assistantName: t,
643
651
  assistantAvatar: u,
644
652
  ...l
645
653
  }, n) => {
646
- const { t: m } = y(), d = t || m("leo.name"), h = typeof i == "number" && i > 0, v = a === "end" ? "ds:border-s ds:border-[color:var(--border)]" : "ds:border-e ds:border-[color:var(--border)]", I = h ? m("leo.unseenCount", { count: i }) : m("leo.open");
654
+ const { t: m } = y(), d = t || m("leo.name"), b = typeof o == "number" && o > 0, v = r === "end" ? "ds:shadow-[var(--shadow-chrome-start)]" : "ds:shadow-[var(--shadow-chrome-end)]", I = b ? m("leo.unseenCount", { count: o }) : m("leo.open");
647
655
  if (!s)
648
656
  return /* @__PURE__ */ e(
649
657
  "aside",
@@ -655,7 +663,7 @@ const Le = "ds:[inline-size:22rem]", Ce = "ds:[inline-size:3rem]", we = L(
655
663
  "ds:bg-[var(--background)]",
656
664
  v,
657
665
  "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]",
658
- Ce
666
+ Le
659
667
  ].join(" "),
660
668
  "data-testid": "leo-sidebar-rail",
661
669
  "data-leo-sidebar-state": "collapsed",
@@ -668,11 +676,11 @@ const Le = "ds:[inline-size:22rem]", Ce = "ds:[inline-size:3rem]", we = L(
668
676
  "aria-expanded": "false",
669
677
  intent: "ghost",
670
678
  size: "sm",
671
- onClick: () => r(!0),
679
+ onClick: () => a(!0),
672
680
  "data-testid": "leo-sidebar-rail-trigger"
673
681
  }
674
682
  ),
675
- h ? /* @__PURE__ */ e(
683
+ b ? /* @__PURE__ */ e(
676
684
  "span",
677
685
  {
678
686
  "aria-hidden": "true",
@@ -689,7 +697,7 @@ const Le = "ds:[inline-size:22rem]", Ce = "ds:[inline-size:3rem]", we = L(
689
697
  "ds:pointer-events-none ds:select-none",
690
698
  "ds:forced-colors:outline ds:forced-colors:outline-1 ds:forced-colors:outline-[CanvasText]"
691
699
  ].join(" "),
692
- children: ke(i)
700
+ children: je(o)
693
701
  }
694
702
  ) : null
695
703
  ] })
@@ -698,12 +706,12 @@ const Le = "ds:[inline-size:22rem]", Ce = "ds:[inline-size:3rem]", we = L(
698
706
  const x = /* @__PURE__ */ e(
699
707
  B,
700
708
  {
701
- icon: a === "end" ? /* @__PURE__ */ e(ue, {}) : /* @__PURE__ */ e(fe, {}),
709
+ icon: r === "end" ? /* @__PURE__ */ e(ue, {}) : /* @__PURE__ */ e(fe, {}),
702
710
  intent: "ghost",
703
711
  size: "sm",
704
712
  "aria-label": m("leo.close"),
705
713
  "aria-expanded": "true",
706
- onClick: () => r(!1),
714
+ onClick: () => a(!1),
707
715
  "data-testid": "leo-sidebar-collapse"
708
716
  }
709
717
  );
@@ -716,14 +724,14 @@ const Le = "ds:[inline-size:22rem]", Ce = "ds:[inline-size:3rem]", we = L(
716
724
  "ds:flex ds:shrink-0 ds:flex-col ds:min-h-0",
717
725
  "ds:bg-[var(--background)]",
718
726
  v,
719
- Le,
727
+ ke,
720
728
  "ds:h-full"
721
729
  ].join(" "),
722
730
  "data-testid": "leo-sidebar",
723
731
  "data-leo-sidebar-state": "expanded",
724
732
  children: [
725
733
  /* @__PURE__ */ e("div", { className: "ds:flex ds:min-h-0 ds:flex-1 ds:flex-col", children: /* @__PURE__ */ e(
726
- w,
734
+ C,
727
735
  {
728
736
  ...l,
729
737
  assistantName: d,
@@ -732,12 +740,12 @@ const Le = "ds:[inline-size:22rem]", Ce = "ds:[inline-size:3rem]", we = L(
732
740
  headerEndSlot: x
733
741
  }
734
742
  ) }),
735
- o ? /* @__PURE__ */ e(
743
+ i ? /* @__PURE__ */ e(
736
744
  "div",
737
745
  {
738
746
  "data-testid": "leo-sidebar-footer-slot",
739
- className: "ds:shrink-0 ds:border-t ds:border-[color:var(--border)]",
740
- children: o
747
+ className: "ds:shrink-0 ds:shadow-[var(--shadow-chrome-up)]",
748
+ children: i
741
749
  }
742
750
  ) : null
743
751
  ]
@@ -745,11 +753,11 @@ const Le = "ds:[inline-size:22rem]", Ce = "ds:[inline-size:3rem]", we = L(
745
753
  );
746
754
  }
747
755
  );
748
- we.displayName = "LeoSidebar";
756
+ Ce.displayName = "LeoSidebar";
749
757
  export {
750
- w as L,
758
+ C as L,
751
759
  ye as a,
752
- je as b,
753
- we as c
760
+ we as b,
761
+ Ce as c
754
762
  };
755
- //# sourceMappingURL=leo-sidebar-BzN4pJ7j.js.map
763
+ //# sourceMappingURL=leo-sidebar-nbHib2D-.js.map