@alfadocs/ui-kit 1.134.0 → 1.135.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.
Files changed (125) hide show
  1. package/dist/_chunks/ai-summary-panel-B70S2lgC.js +455 -0
  2. package/dist/_chunks/{alia-sidebar-CK1zw_Bc.js → alia-sidebar-CtwhdASP.js} +3 -3
  3. package/dist/_chunks/{appointment-card-DG3m9yN-.js → appointment-card-BT1cMZIX.js} +2 -2
  4. package/dist/_chunks/{appointment-peek-BK0tDs4C.js → appointment-peek-BP_ACFz5.js} +2 -2
  5. package/dist/_chunks/{appointment-timeline-BiI2riRZ.js → appointment-timeline-Dy4YQJ17.js} +2 -2
  6. package/dist/_chunks/{appointment-tray-ClJCtYQj.js → appointment-tray-B3gSHL1j.js} +2 -2
  7. package/dist/_chunks/{calendar-appointment-editor-dialog-BSkIYGlW.js → calendar-appointment-editor-dialog-I5PfWudy.js} +8 -8
  8. package/dist/_chunks/{chat-container-B83b4hut.js → chat-container-CoOT7dzB.js} +37 -36
  9. package/dist/_chunks/{chat-input-DwQ4_WXK.js → chat-input-CX4dxBq7.js} +85 -84
  10. package/dist/_chunks/communications-panel-BKPHCiMB.js +973 -0
  11. package/dist/_chunks/{entity-summary-KHM0PnSI.js → entity-summary-CpNk6ybN.js} +70 -69
  12. package/dist/_chunks/get-error-message-DbFUzuja.js +7 -0
  13. package/dist/_chunks/handled-rejection-C-6Dq0As.js +9 -0
  14. package/dist/_chunks/megaphone-CzeTT9B3.js +22 -0
  15. package/dist/_chunks/{notes-panel-BAyPOr8N.js → notes-panel-BvjAo4RQ.js} +5 -4
  16. package/dist/_chunks/{patient-account-settings-BkAtIxJW.js → patient-account-settings-B2XbN_Fe.js} +2 -2
  17. package/dist/_chunks/{patient-check-in-resume-xhqjC6gf.js → patient-check-in-resume-B7NY-6KI.js} +4 -4
  18. package/dist/_chunks/{portal-details-CTEsm705.js → portal-details-DCIiGkHA.js} +2 -2
  19. package/dist/_chunks/{portal-documents-D8skew0h.js → portal-documents-DJOH8pZx.js} +2 -2
  20. package/dist/_chunks/{portal-parts-BdR29P7z.js → portal-parts-Br8wuala.js} +2 -2
  21. package/dist/_chunks/signing-end-screen-BdhbkPKO.js +1355 -0
  22. package/dist/_chunks/{task-editor-g1AGfxhr.js → task-editor-DvwqPfFR.js} +3 -2
  23. package/dist/_chunks/{tasks-panel-BE3zaayj.js → tasks-panel-6EzdnwT8.js} +155 -171
  24. package/dist/_chunks/{use-appointment-details-read-Dzc6fEzG.js → use-appointment-details-read-6_OmOwUs.js} +110 -109
  25. package/dist/_chunks/{workflow-status-D1WgGVTP.js → workflow-status-CO0mxXs2.js} +3 -2
  26. package/dist/agent-catalog.json +251 -1
  27. package/dist/agent-i18n/en.json +28 -0
  28. package/dist/browser-support.js +1 -1
  29. package/dist/components/_shared/sms-segments.d.ts +43 -0
  30. package/dist/components/ai-summary-panel/ai-summary-panel.agent.d.ts +4 -0
  31. package/dist/components/ai-summary-panel/ai-summary-panel.d.ts +71 -0
  32. package/dist/components/ai-summary-panel/index.d.ts +4 -0
  33. package/dist/components/ai-summary-panel/index.js +6 -0
  34. package/dist/components/appointment-card/index.js +2 -2
  35. package/dist/components/appointment-details-panel/index.js +1 -1
  36. package/dist/components/appointment-peek/index.js +1 -1
  37. package/dist/components/appointment-timeline/index.js +1 -1
  38. package/dist/components/chat-container/chat-container.d.ts +7 -0
  39. package/dist/components/chat-container/index.js +1 -1
  40. package/dist/components/chat-input/chat-input.d.ts +3 -0
  41. package/dist/components/chat-input/index.js +1 -1
  42. package/dist/components/communications-panel/communications-panel.agent.d.ts +4 -0
  43. package/dist/components/communications-panel/communications-panel.d.ts +136 -0
  44. package/dist/components/communications-panel/index.d.ts +6 -0
  45. package/dist/components/communications-panel/index.js +7 -0
  46. package/dist/components/entity-summary/entity-summary.d.ts +8 -0
  47. package/dist/components/entity-summary/index.js +1 -1
  48. package/dist/components/index.d.ts +2 -0
  49. package/dist/components/notes-panel/index.js +1 -1
  50. package/dist/components/task-editor/index.js +1 -1
  51. package/dist/components/tasks-panel/index.js +1 -1
  52. package/dist/components/workflow-status/index.js +1 -1
  53. package/dist/core.css +1 -1
  54. package/dist/host-compat.css +10 -4
  55. package/dist/i18n/locales/ar.d.ts +93 -0
  56. package/dist/i18n/locales/ar.js +94 -0
  57. package/dist/i18n/locales/de.d.ts +93 -0
  58. package/dist/i18n/locales/de.js +94 -0
  59. package/dist/i18n/locales/el.d.ts +93 -0
  60. package/dist/i18n/locales/el.js +94 -0
  61. package/dist/i18n/locales/en.d.ts +93 -0
  62. package/dist/i18n/locales/en.js +94 -0
  63. package/dist/i18n/locales/es.d.ts +93 -0
  64. package/dist/i18n/locales/es.js +94 -0
  65. package/dist/i18n/locales/fr.d.ts +93 -0
  66. package/dist/i18n/locales/fr.js +94 -0
  67. package/dist/i18n/locales/hi.d.ts +93 -0
  68. package/dist/i18n/locales/hi.js +94 -0
  69. package/dist/i18n/locales/it.d.ts +93 -0
  70. package/dist/i18n/locales/it.js +94 -0
  71. package/dist/i18n/locales/ja.d.ts +93 -0
  72. package/dist/i18n/locales/ja.js +94 -0
  73. package/dist/i18n/locales/nl.d.ts +93 -0
  74. package/dist/i18n/locales/nl.js +94 -0
  75. package/dist/i18n/locales/pl.d.ts +93 -0
  76. package/dist/i18n/locales/pl.js +94 -0
  77. package/dist/i18n/locales/pt.d.ts +93 -0
  78. package/dist/i18n/locales/pt.js +94 -0
  79. package/dist/i18n/locales/ro.d.ts +93 -0
  80. package/dist/i18n/locales/ro.js +94 -0
  81. package/dist/i18n/locales/ru.d.ts +93 -0
  82. package/dist/i18n/locales/ru.js +94 -0
  83. package/dist/i18n/locales/sq.d.ts +93 -0
  84. package/dist/i18n/locales/sq.js +94 -0
  85. package/dist/i18n/locales/sv.d.ts +93 -0
  86. package/dist/i18n/locales/sv.js +94 -0
  87. package/dist/i18n/locales/tr.d.ts +93 -0
  88. package/dist/i18n/locales/tr.js +94 -0
  89. package/dist/i18n/locales/zh.d.ts +93 -0
  90. package/dist/i18n/locales/zh.js +94 -0
  91. package/dist/index.js +893 -886
  92. package/dist/locales/ar.json +93 -0
  93. package/dist/locales/de.json +93 -0
  94. package/dist/locales/el.json +93 -0
  95. package/dist/locales/en.json +93 -0
  96. package/dist/locales/es.json +93 -0
  97. package/dist/locales/fr.json +93 -0
  98. package/dist/locales/hi.json +93 -0
  99. package/dist/locales/it.json +93 -0
  100. package/dist/locales/ja.json +93 -0
  101. package/dist/locales/nl.json +93 -0
  102. package/dist/locales/pl.json +93 -0
  103. package/dist/locales/pt.json +93 -0
  104. package/dist/locales/ro.json +93 -0
  105. package/dist/locales/ru.json +93 -0
  106. package/dist/locales/sq.json +93 -0
  107. package/dist/locales/sv.json +93 -0
  108. package/dist/locales/tr.json +93 -0
  109. package/dist/locales/zh.json +93 -0
  110. package/dist/patterns/alia-assistant/index.js +1 -1
  111. package/dist/patterns/calendar/calendar.journey.d.ts +7 -0
  112. package/dist/patterns/calendar/index.js +1 -1
  113. package/dist/patterns/patient-account-settings/index.js +1 -1
  114. package/dist/patterns/patient-check-in/index.js +1 -1
  115. package/dist/patterns/patient-portal/index.js +2 -2
  116. package/dist/patterns/signing/index.d.ts +1 -0
  117. package/dist/patterns/signing/index.js +1 -1
  118. package/dist/patterns/signing/multi-field-signer.d.ts +22 -1
  119. package/dist/patterns/signing/signing-checkbox-pill.d.ts +66 -0
  120. package/dist/patterns/signing/signing-checkbox-sheet.d.ts +16 -0
  121. package/dist/patterns/signing/signing-document-screen.d.ts +18 -1
  122. package/dist/tokens.css +1 -1
  123. package/package.json +9 -1
  124. package/dist/_chunks/handled-rejection-6gqCf5vt.js +0 -13
  125. package/dist/_chunks/signing-end-screen-an9P8DOT.js +0 -1041
@@ -1,14 +1,14 @@
1
1
  import { jsxs as u, jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as V, useRef as i, useState as M, useCallback as H, useImperativeHandle as L, useMemo as S, useEffect as j } from "react";
2
+ import { forwardRef as M, useRef as i, useState as H, useCallback as L, useImperativeHandle as S, useMemo as j, useEffect as E } from "react";
3
3
  import { c as C } from "./index-D2ZczOXr.js";
4
- import { useTranslation as E } from "react-i18next";
5
- import { u as K } from "./registry-DvAUVLHh.js";
6
- import { u as O } from "./index-Bze5jCG_.js";
7
- import { F } from "./floating-action-button-BesoUmO_.js";
8
- import { u as P } from "./use-prefers-reduced-motion-BMwIQRjB.js";
9
- import { u as $ } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
10
- import { C as D } from "./chevron-down-DWE7GSq9.js";
11
- const U = {
4
+ import { useTranslation as K } from "react-i18next";
5
+ import { u as O } from "./registry-DvAUVLHh.js";
6
+ import { u as F } from "./index-Bze5jCG_.js";
7
+ import { F as P } from "./floating-action-button-BesoUmO_.js";
8
+ import { u as $ } from "./use-prefers-reduced-motion-BMwIQRjB.js";
9
+ import { u as D } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
10
+ import { C as U } from "./chevron-down-DWE7GSq9.js";
11
+ const X = {
12
12
  id: "chat-container",
13
13
  // Scrolling the log viewport is pure ephemeral view state — `scroll`,
14
14
  // not `navigate` (nothing routes; the conversation stays in place).
@@ -61,7 +61,7 @@ const U = {
61
61
  description: "Sourced from the id prop."
62
62
  }
63
63
  }
64
- }, X = C(
64
+ }, Y = C(
65
65
  "ds:relative ds:flex ds:w-full ds:flex-col ds:overflow-hidden ds:bg-background",
66
66
  {
67
67
  variants: {
@@ -72,7 +72,7 @@ const U = {
72
72
  },
73
73
  defaultVariants: { density: "default" }
74
74
  }
75
- ), Y = C(
75
+ ), Z = C(
76
76
  [
77
77
  "ds:flex-1 ds:min-h-0 ds:overflow-y-auto ds:overflow-x-hidden",
78
78
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
@@ -91,7 +91,7 @@ const U = {
91
91
  "ds:motion-reduce:[mask-image:none]",
92
92
  "ds:forced-colors:[mask-image:none]"
93
93
  ].join(" ")
94
- ), Z = 100, q = 48, G = V(
94
+ ), q = 100, G = 48, J = M(
95
95
  ({
96
96
  messages: t,
97
97
  composer: d,
@@ -100,9 +100,10 @@ const U = {
100
100
  id: p,
101
101
  onAutoScrollChange: c,
102
102
  showScrollToLatest: N = !1,
103
- ...B
104
- }, I) => {
105
- const { t: f } = E("ui"), n = i(null), h = i(null), [a, R] = M(!0), v = P(), r = H(
103
+ logLabel: B,
104
+ ...I
105
+ }, R) => {
106
+ const { t: f } = K("ui"), n = i(null), h = i(null), [a, _] = H(!0), v = $(), r = L(
106
107
  (e) => {
107
108
  const s = n.current;
108
109
  if (!s) return;
@@ -114,12 +115,12 @@ const U = {
114
115
  },
115
116
  [v]
116
117
  ), g = i(null);
117
- L(I, () => g.current, []);
118
+ S(R, () => g.current, []);
118
119
  const b = i(a);
119
120
  b.current = a;
120
121
  const x = i(t.length);
121
122
  x.current = t.length;
122
- const _ = S(
123
+ const A = j(
123
124
  () => ({
124
125
  scrollToBottom: r,
125
126
  getScrollViewport: () => n.current,
@@ -128,28 +129,28 @@ const U = {
128
129
  }),
129
130
  [r]
130
131
  );
131
- K(U, _, p), j(() => {
132
+ O(X, A, p), E(() => {
132
133
  const e = n.current, s = h.current;
133
134
  if (!e || !s) return;
134
135
  const l = new IntersectionObserver(
135
- (z) => {
136
- const w = z[0];
137
- R(w.isIntersecting), c == null || c(w.isIntersecting);
136
+ (V) => {
137
+ const w = V[0];
138
+ _(w.isIntersecting), c == null || c(w.isIntersecting);
138
139
  },
139
140
  {
140
141
  root: e,
141
142
  // Fire when the sentinel is within BOTTOM_SLACK_PX of being visible.
142
- rootMargin: `0px 0px ${q}px 0px`,
143
+ rootMargin: `0px 0px ${G}px 0px`,
143
144
  threshold: 0
144
145
  }
145
146
  );
146
147
  return l.observe(s), () => l.disconnect();
147
148
  }, [c]);
148
- const A = t.length;
149
- $(() => {
149
+ const z = t.length;
150
+ D(() => {
150
151
  a && r({ smooth: !1 });
151
- }, [A, a, r]);
152
- const y = t.length > Z, m = O({
152
+ }, [z, a, r]);
153
+ const y = t.length > q, m = F({
153
154
  count: y ? t.length : 0,
154
155
  getScrollElement: () => n.current,
155
156
  estimateSize: () => 80,
@@ -163,10 +164,10 @@ const U = {
163
164
  "div",
164
165
  {
165
166
  ref: g,
166
- className: X({ density: T, className: k }),
167
+ className: Y({ density: T, className: k }),
167
168
  "data-component": "chat-container",
168
169
  "data-component-id": p,
169
- ...B,
170
+ ...I,
170
171
  children: [
171
172
  /* @__PURE__ */ u("div", { className: "ds:relative ds:flex-1 ds:min-h-0 ds:flex ds:flex-col", children: [
172
173
  /* @__PURE__ */ u(
@@ -176,9 +177,9 @@ const U = {
176
177
  role: "log",
177
178
  "aria-live": "polite",
178
179
  "aria-relevant": "additions",
179
- "aria-label": f("chat.container"),
180
+ "aria-label": B ?? f("chat.container"),
180
181
  tabIndex: 0,
181
- className: Y(),
182
+ className: Z(),
182
183
  children: [
183
184
  y ? /* @__PURE__ */ o(
184
185
  "ol",
@@ -232,9 +233,9 @@ const U = {
232
233
  "ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]"
233
234
  ].join(" "),
234
235
  children: /* @__PURE__ */ o("div", { className: "ds:pointer-events-auto", children: /* @__PURE__ */ o(
235
- F,
236
+ P,
236
237
  {
237
- icon: /* @__PURE__ */ o(D, {}),
238
+ icon: /* @__PURE__ */ o(U, {}),
238
239
  "aria-label": f("chat.scrollToLatest"),
239
240
  size: "sm",
240
241
  variant: "secondary",
@@ -251,9 +252,9 @@ const U = {
251
252
  );
252
253
  }
253
254
  );
254
- G.displayName = "ChatContainer";
255
+ J.displayName = "ChatContainer";
255
256
  export {
256
- G as C,
257
- U as c
257
+ J as C,
258
+ X as c
258
259
  };
259
- //# sourceMappingURL=chat-container-B83b4hut.js.map
260
+ //# sourceMappingURL=chat-container-CoOT7dzB.js.map
@@ -1,21 +1,21 @@
1
- import { jsxs as v, jsx as o, Fragment as ge } from "react/jsx-runtime";
2
- import { forwardRef as ve, useId as ye, useRef as w, useCallback as W, useImperativeHandle as be, useMemo as xe } from "react";
3
- import { c as Ie } from "./index-D2ZczOXr.js";
4
- import { useTranslation as ke } from "react-i18next";
5
- import { I as q } from "./icon-button-S8_weU3g.js";
6
- import { u as we } from "./use-controllable-state-BiY4xTzM.js";
7
- import { u as Ce } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
8
- import { u as Ne } from "./registry-DvAUVLHh.js";
9
- import { c as Ve } from "./createLucideIcon-DhHxpK9K.js";
10
- import { C as je } from "./circle-alert-rGDZ73Wh.js";
11
- import { S as ze } from "./send-C5kDJ-Mz.js";
1
+ import { jsxs as v, jsx as o, Fragment as ve } from "react/jsx-runtime";
2
+ import { forwardRef as ye, useId as be, useRef as w, useCallback as q, useImperativeHandle as xe, useMemo as Ie } from "react";
3
+ import { c as ke } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as we } from "react-i18next";
5
+ import { I as A } from "./icon-button-S8_weU3g.js";
6
+ import { u as Ce } from "./use-controllable-state-BiY4xTzM.js";
7
+ import { u as Ne } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
8
+ import { u as Ve } from "./registry-DvAUVLHh.js";
9
+ import { c as je } from "./createLucideIcon-DhHxpK9K.js";
10
+ import { C as ze } from "./circle-alert-rGDZ73Wh.js";
11
+ import { S as He } from "./send-C5kDJ-Mz.js";
12
12
  /**
13
13
  * @license lucide-react v1.22.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
16
16
  * See the LICENSE file in the root directory of this source tree.
17
17
  */
18
- const He = [
18
+ const Se = [
19
19
  [
20
20
  "path",
21
21
  {
@@ -23,7 +23,7 @@ const He = [
23
23
  key: "1miecu"
24
24
  }
25
25
  ]
26
- ], Se = Ve("paperclip", He), Te = {
26
+ ], Te = je("paperclip", Se), Ee = {
27
27
  id: "chat-input",
28
28
  capabilities: ["edit_inline", "submit"],
29
29
  state: {
@@ -103,7 +103,7 @@ const He = [
103
103
  description: "Sourced from the id prop."
104
104
  }
105
105
  }
106
- }, Ee = Ie(
106
+ }, Me = ke(
107
107
  [
108
108
  "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full",
109
109
  // Uses the kit's shared input-chrome tokens — `--input` for fill,
@@ -134,7 +134,7 @@ const He = [
134
134
  defaultVariants: { size: "md" }
135
135
  }
136
136
  );
137
- function Me(t, a) {
137
+ function Fe(t, a) {
138
138
  if (typeof Intl < "u" && typeof Intl.Segmenter == "function")
139
139
  try {
140
140
  const l = new Intl.Segmenter(a, { granularity: "grapheme" });
@@ -145,7 +145,7 @@ function Me(t, a) {
145
145
  }
146
146
  return Array.from(t).length;
147
147
  }
148
- function Fe(t, a, l) {
148
+ function Ke(t, a, l) {
149
149
  if (typeof Intl < "u" && typeof Intl.Segmenter == "function")
150
150
  try {
151
151
  const y = new Intl.Segmenter(l, { granularity: "grapheme" }), i = [];
@@ -158,7 +158,7 @@ function Fe(t, a, l) {
158
158
  const r = Array.from(t);
159
159
  return r.length <= a ? t : r.slice(0, a).join("");
160
160
  }
161
- const Ke = ve(
161
+ const Re = ye(
162
162
  ({
163
163
  size: t = "md",
164
164
  value: a,
@@ -169,48 +169,49 @@ const Ke = ve(
169
169
  maxRows: d = 8,
170
170
  onSubmit: u,
171
171
  onAttach: b,
172
- accept: A,
172
+ accept: G,
173
173
  disabled: x,
174
- toolbar: G,
175
- label: T,
176
- placeholder: U,
177
- className: Y,
174
+ submitDisabled: T = !1,
175
+ toolbar: U,
176
+ label: E,
177
+ placeholder: Y,
178
+ className: J,
178
179
  onChange: C,
179
180
  onKeyDown: N,
180
181
  onCompositionStart: V,
181
182
  onCompositionEnd: j,
182
183
  id: z,
183
- ...J
184
- }, L) => {
185
- const { t: c, i18n: E } = ke("ui"), O = ye(), p = w(!1), M = w(null), I = w(null), Q = W((e) => {
184
+ ...L
185
+ }, O) => {
186
+ const { t: c, i18n: M } = we("ui"), Q = be(), p = w(!1), F = w(null), I = w(null), X = q((e) => {
186
187
  I.current = e;
187
- }, []), [X, m] = we({
188
+ }, []), [Z, m] = Ce({
188
189
  value: a === void 0 ? void 0 : String(a),
189
190
  defaultValue: String(l ?? "")
190
- }), n = X ?? "", H = Me(n, E.language), f = typeof r == "number" && r > 0, Z = f ? Math.max(0, r - H) : 0, D = f && H > r * 0.9, h = f && H >= r, F = W(() => {
191
+ }), n = Z ?? "", H = Fe(n, M.language), f = typeof r == "number" && r > 0, D = f ? Math.max(0, r - H) : 0, ee = f && H > r * 0.9, h = f && H >= r, K = q(() => {
191
192
  const e = I.current;
192
193
  if (!e) return;
193
- const s = window.getComputedStyle(e), k = parseFloat(s.lineHeight) || 24, de = parseFloat(s.paddingTop) || 0, ue = parseFloat(s.paddingBottom) || 0, pe = parseFloat(s.borderTopWidth) || 0, me = parseFloat(s.borderBottomWidth) || 0, _ = de + ue + pe + me, fe = k * i + _, $ = k * d + _;
194
+ const s = window.getComputedStyle(e), k = parseFloat(s.lineHeight) || 24, ue = parseFloat(s.paddingTop) || 0, pe = parseFloat(s.paddingBottom) || 0, me = parseFloat(s.borderTopWidth) || 0, fe = parseFloat(s.borderBottomWidth) || 0, $ = ue + pe + me + fe, he = k * i + $, W = k * d + $;
194
195
  e.style.height = "auto";
195
- const he = Math.max(fe, Math.min(e.scrollHeight, $));
196
- e.style.height = `${he}px`, e.style.overflowY = e.scrollHeight > $ ? "auto" : "hidden";
196
+ const ge = Math.max(he, Math.min(e.scrollHeight, W));
197
+ e.style.height = `${ge}px`, e.style.overflowY = e.scrollHeight > W ? "auto" : "hidden";
197
198
  }, [i, d]);
198
- Ce(() => {
199
- F();
200
- }, [F, n]);
201
- const ee = (e) => {
199
+ Ne(() => {
200
+ K();
201
+ }, [K, n]);
202
+ const te = (e) => {
202
203
  let s = e.target.value;
203
- f && !p.current && (s = Fe(s, r, E.language)), m(s), !p.current && (C == null || C(e));
204
- }, te = (e) => {
205
- p.current = !0, V == null || V(e);
204
+ f && !p.current && (s = Ke(s, r, M.language)), m(s), !p.current && (C == null || C(e));
206
205
  }, se = (e) => {
206
+ p.current = !0, V == null || V(e);
207
+ }, re = (e) => {
207
208
  p.current = !1, j == null || j(e);
208
- }, re = (e) => e.nativeEvent.isComposing || e.keyCode === 229 || p.current, S = () => {
209
+ }, ae = (e) => e.nativeEvent.isComposing || e.keyCode === 229 || p.current, S = () => {
209
210
  var s;
210
- !n.trim() || x || h || (u == null || u(n), m(""), (s = I.current) == null || s.focus());
211
- }, K = w(null);
212
- be(L, () => K.current, []);
213
- const ae = xe(
211
+ !n.trim() || x || T || h || (u == null || u(n), m(""), (s = I.current) == null || s.focus());
212
+ }, R = w(null);
213
+ xe(O, () => R.current, []);
214
+ const ne = Ie(
214
215
  () => ({
215
216
  getValue: () => n,
216
217
  isEmpty: () => !n.trim(),
@@ -234,51 +235,51 @@ const Ke = ve(
234
235
  // eslint-disable-next-line react-hooks/exhaustive-deps
235
236
  [n, m]
236
237
  );
237
- Ne(Te, ae, z);
238
- const ne = (e) => {
239
- if (N == null || N(e), !e.defaultPrevented && !re(e) && e.key === "Enter") {
238
+ Ve(Ee, ne, z);
239
+ const oe = (e) => {
240
+ if (N == null || N(e), !e.defaultPrevented && !ae(e) && e.key === "Enter") {
240
241
  const s = e.metaKey || e.ctrlKey, k = y && !e.shiftKey;
241
242
  (s || k) && (e.preventDefault(), S());
242
243
  }
243
- }, oe = () => {
244
+ }, ie = () => {
244
245
  var e;
245
- (e = M.current) == null || e.click();
246
- }, ie = (e) => {
246
+ (e = F.current) == null || e.click();
247
+ }, ce = (e) => {
247
248
  e.target.files && e.target.files.length > 0 && (b == null || b(e.target.files)), e.target.value = "";
248
- }, g = z ?? O, R = `${g}-label`, B = f ? `${g}-counter` : void 0, P = `${g}-hint`, ce = U ?? c("chat.input.placeholder"), le = T ?? c("chat.prompt");
249
+ }, g = z ?? Q, B = `${g}-label`, P = f ? `${g}-counter` : void 0, _ = `${g}-hint`, le = Y ?? c("chat.input.placeholder"), de = E ?? c("chat.prompt");
249
250
  return /* @__PURE__ */ v(
250
251
  "div",
251
252
  {
252
- ref: K,
253
+ ref: R,
253
254
  "data-component": "chat-input",
254
255
  "data-component-id": z,
255
- className: Ee({ size: t, className: Y }),
256
+ className: Me({ size: t, className: J }),
256
257
  children: [
257
258
  /* @__PURE__ */ o(
258
259
  "label",
259
260
  {
260
- id: R,
261
+ id: B,
261
262
  htmlFor: g,
262
- className: T ? "type-label ds:ps-[var(--spacing-sm)] ds:pt-[var(--spacing-sm)]" : "ds:sr-only",
263
- children: le
263
+ className: E ? "type-label ds:ps-[var(--spacing-sm)] ds:pt-[var(--spacing-sm)]" : "ds:sr-only",
264
+ children: de
264
265
  }
265
266
  ),
266
267
  /* @__PURE__ */ o(
267
268
  "textarea",
268
269
  {
269
- ref: Q,
270
+ ref: X,
270
271
  id: g,
271
272
  value: n,
272
273
  disabled: x,
273
274
  rows: i,
274
- placeholder: ce,
275
- "aria-labelledby": R,
276
- "aria-describedby": [B, P].filter(Boolean).join(" ") || void 0,
275
+ placeholder: le,
276
+ "aria-labelledby": B,
277
+ "aria-describedby": [P, _].filter(Boolean).join(" ") || void 0,
277
278
  "aria-invalid": h || void 0,
278
- onChange: ee,
279
- onKeyDown: ne,
280
- onCompositionStart: te,
281
- onCompositionEnd: se,
279
+ onChange: te,
280
+ onKeyDown: oe,
281
+ onCompositionStart: se,
282
+ onCompositionEnd: re,
282
283
  className: [
283
284
  "ds:w-full ds:resize-none ds:bg-transparent",
284
285
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-xs)]",
@@ -288,42 +289,42 @@ const Ke = ve(
288
289
  // The box draws the focus ring (see rootVariants).
289
290
  "ds:outline-none"
290
291
  ].join(" "),
291
- ...J
292
+ ...L
292
293
  }
293
294
  ),
294
295
  /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]", children: [
295
- b ? /* @__PURE__ */ v(ge, { children: [
296
+ b ? /* @__PURE__ */ v(ve, { children: [
296
297
  /* @__PURE__ */ o(
297
298
  "input",
298
299
  {
299
- ref: M,
300
+ ref: F,
300
301
  type: "file",
301
302
  className: "ds:sr-only",
302
303
  multiple: !0,
303
- accept: A,
304
- onChange: ie,
304
+ accept: G,
305
+ onChange: ce,
305
306
  "aria-label": c("chat.input.attach"),
306
307
  tabIndex: -1
307
308
  }
308
309
  ),
309
310
  /* @__PURE__ */ o(
310
- q,
311
+ A,
311
312
  {
312
- icon: /* @__PURE__ */ o(Se, {}),
313
+ icon: /* @__PURE__ */ o(Te, {}),
313
314
  "aria-label": c("chat.input.attach"),
314
315
  intent: "ghost",
315
316
  size: "sm",
316
- onClick: oe,
317
+ onClick: ie,
317
318
  disabled: x
318
319
  }
319
320
  )
320
321
  ] }) : null,
321
- G,
322
+ U,
322
323
  /* @__PURE__ */ v("div", { className: "ds:ms-auto ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
323
- D ? /* @__PURE__ */ v(
324
+ ee ? /* @__PURE__ */ v(
324
325
  "span",
325
326
  {
326
- id: B,
327
+ id: P,
327
328
  "aria-live": "polite",
328
329
  className: [
329
330
  "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
@@ -334,21 +335,21 @@ const Ke = ve(
334
335
  h ? (
335
336
  // Icon pairs with --destructive colour so the at-limit
336
337
  // state is not conveyed by hue alone (WCAG 1.4.1).
337
- /* @__PURE__ */ o(je, { "aria-hidden": "true", className: "ds:size-3.5" })
338
+ /* @__PURE__ */ o(ze, { "aria-hidden": "true", className: "ds:size-3.5" })
338
339
  ) : null,
339
- c("chat.input.remaining", { count: Z })
340
+ c("chat.input.remaining", { count: D })
340
341
  ]
341
342
  }
342
343
  ) : null,
343
- /* @__PURE__ */ o("span", { id: P, className: "ds:sr-only", children: c("chat.input.sendHint") }),
344
+ /* @__PURE__ */ o("span", { id: _, className: "ds:sr-only", children: c("chat.input.sendHint") }),
344
345
  /* @__PURE__ */ o(
345
- q,
346
+ A,
346
347
  {
347
- icon: /* @__PURE__ */ o(ze, {}),
348
+ icon: /* @__PURE__ */ o(He, {}),
348
349
  "aria-label": c("chat.send"),
349
350
  intent: "primary",
350
351
  size: "sm",
351
- disabled: x || !n.trim() || h,
352
+ disabled: x || T || !n.trim() || h,
352
353
  onClick: S,
353
354
  "aria-keyshortcuts": "Meta+Enter Control+Enter"
354
355
  }
@@ -360,10 +361,10 @@ const Ke = ve(
360
361
  );
361
362
  }
362
363
  );
363
- Ke.displayName = "ChatInput";
364
+ Re.displayName = "ChatInput";
364
365
  export {
365
- Ke as C,
366
- Se as P,
367
- Te as c
366
+ Re as C,
367
+ Te as P,
368
+ Ee as c
368
369
  };
369
- //# sourceMappingURL=chat-input-DwQ4_WXK.js.map
370
+ //# sourceMappingURL=chat-input-CX4dxBq7.js.map