@alfadocs/ui-kit 0.84.0 → 0.85.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 (66) hide show
  1. package/dist/_chunks/{ai-consent-banner-DUhr1yNj.js → ai-consent-banner-BXD7W6FI.js} +2 -2
  2. package/dist/_chunks/{alert-KJbsPYkI.js → alert-Cxaqd-QO.js} +12 -12
  3. package/dist/_chunks/{audio-recorder-Cc3KuL9y.js → audio-recorder-BjnB7V8n.js} +2 -2
  4. package/dist/_chunks/{booking-CLmeXtGv.js → booking-BvCu2XWY.js} +2 -2
  5. package/dist/_chunks/{document-preview-nwfulDEs.js → document-preview-DXl9migE.js} +2 -2
  6. package/dist/_chunks/{document-scanner-B6h1Ir56.js → document-scanner-cS_ispQs.js} +3 -3
  7. package/dist/_chunks/{entity-summary--vP698Jn.js → entity-summary-BILN4wEG.js} +2 -2
  8. package/dist/_chunks/{field-value-DHG6gEKS.js → field-value-BRVbZJej.js} +133 -144
  9. package/dist/_chunks/{file-manager-DLJlinIO.js → file-manager-B9LZzT5E.js} +129 -129
  10. package/dist/_chunks/{file-upload-DENvuhfs.js → file-upload-CwxdqkMK.js} +134 -146
  11. package/dist/_chunks/{freemium-paywall-CmV642PA.js → freemium-paywall-Dr2342_S.js} +2 -2
  12. package/dist/_chunks/{marketplace-app-shell-Br2yebEK.js → marketplace-app-shell-Chcj4q4z.js} +2 -2
  13. package/dist/_chunks/message-square-Bye4ATvx.js +20 -0
  14. package/dist/_chunks/{notes-panel-Cvdp818a.js → notes-panel-BLjlYBt-.js} +2 -2
  15. package/dist/_chunks/{patient-details-COvYWp2e.js → patient-details-B9LCdyWW.js} +2 -2
  16. package/dist/_chunks/{patient-search-BaUJ_Y-N.js → patient-search-vtRTSdf6.js} +2 -2
  17. package/dist/_chunks/{patient-summary-card-D6kgdTNn.js → patient-summary-card-vn1H4xWj.js} +2 -2
  18. package/dist/_chunks/{patient-table-BHzmUbzu.js → patient-table-B6AKMTm3.js} +182 -196
  19. package/dist/_chunks/{payment-form-DL9xk9BA.js → payment-form-BoGxEmGn.js} +2 -2
  20. package/dist/_chunks/{payment-request-card-d-RmzsUd.js → payment-request-card-CygO1anM.js} +72 -70
  21. package/dist/_chunks/{pdf-viewer-DF3VMaPo.js → pdf-viewer-CcOuR2wj.js} +2 -2
  22. package/dist/_chunks/{practice-results-BCr7jMt1.js → practice-results-yKbwIxqa.js} +2 -2
  23. package/dist/_chunks/{radiograph-panel.agent-CxF9pVxd.js → radiograph-panel.agent-M9XD4ze4.js} +2 -2
  24. package/dist/_chunks/{rich-text-editor-CCWjNkbx.js → rich-text-editor-RRkBN_WB.js} +2 -2
  25. package/dist/_chunks/{session-countdown-C8AsE072.js → session-countdown-Bc70VXN1.js} +58 -48
  26. package/dist/_chunks/{sign-document-Bfk0WpWV.js → sign-document-DI561d1C.js} +2 -2
  27. package/dist/_chunks/{signature-request-CEOrCDyk.js → signature-request-D_6jgDZd.js} +60 -77
  28. package/dist/_chunks/{task-tray-Br3vc0O1.js → task-tray-CLIqIXUZ.js} +58 -70
  29. package/dist/_chunks/{toast.agent-uV8CeAy6.js → toast.agent-Iw2jWdce.js} +2 -2
  30. package/dist/_chunks/{warning-stack-BlG_Ujy3.js → warning-stack-CAHQ0xxS.js} +2 -2
  31. package/dist/_chunks/{workflow-map-C643Q43h.js → workflow-map-SIfAhmWz.js} +2 -2
  32. package/dist/agent-catalog.json +1 -1
  33. package/dist/components/ai-consent-banner/index.js +1 -1
  34. package/dist/components/alert/index.js +1 -1
  35. package/dist/components/audio-recorder/index.js +1 -1
  36. package/dist/components/booking/index.js +1 -1
  37. package/dist/components/document-preview/index.js +1 -1
  38. package/dist/components/document-scanner/index.js +1 -1
  39. package/dist/components/entity-summary/index.js +1 -1
  40. package/dist/components/file-manager/index.js +1 -1
  41. package/dist/components/file-upload/index.js +1 -1
  42. package/dist/components/freemium-paywall/index.js +1 -1
  43. package/dist/components/notes-panel/index.js +1 -1
  44. package/dist/components/patient-details/index.js +1 -1
  45. package/dist/components/patient-search/index.js +1 -1
  46. package/dist/components/patient-summary-card/index.js +1 -1
  47. package/dist/components/patient-table/index.js +1 -1
  48. package/dist/components/payment-card/index.js +1 -1
  49. package/dist/components/payment-form/index.js +1 -1
  50. package/dist/components/pdf-viewer/index.js +1 -1
  51. package/dist/components/practice-results/index.js +1 -1
  52. package/dist/components/radiograph-panel/index.js +1 -1
  53. package/dist/components/rich-text-editor/index.js +1 -1
  54. package/dist/components/select/select.d.ts +8 -5
  55. package/dist/components/session-countdown/index.js +1 -1
  56. package/dist/components/sign-document/index.js +1 -1
  57. package/dist/components/task-tray/index.js +1 -1
  58. package/dist/components/toast/index.js +1 -1
  59. package/dist/components/warning-stack/index.js +1 -1
  60. package/dist/components/workflow/index.js +1 -1
  61. package/dist/index.js +434 -445
  62. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  63. package/dist/patterns/signature-request/index.js +1 -1
  64. package/dist/tokens.css +1 -1
  65. package/package.json +5 -3
  66. package/dist/_chunks/circle-x-W8Enq3i4.js +0 -16
@@ -1,25 +1,35 @@
1
1
  import { jsxs as k, jsx as t } from "react/jsx-runtime";
2
2
  import { forwardRef as H, useEffect as b, useMemo as v, useRef as W, useState as X } from "react";
3
3
  import { c as Z } from "./index-D2ZczOXr.js";
4
- import { useTranslation as $ } from "react-i18next";
5
- import { B as G } from "./button-CPGiR_bH.js";
6
- import { P as J } from "./progress-DA413-zn.js";
7
- import { L as Q } from "./live-region-C41SO3cA.js";
8
- import { u as Y } from "./registry-DvAUVLHh.js";
9
- import { C as E } from "./circle-x-W8Enq3i4.js";
4
+ import { useTranslation as G } from "react-i18next";
5
+ import { B as J } from "./button-CPGiR_bH.js";
6
+ import { P as Q } from "./progress-DA413-zn.js";
7
+ import { L as Y } from "./live-region-C41SO3cA.js";
8
+ import { u as E } from "./registry-DvAUVLHh.js";
9
+ import { c as L } from "./createLucideIcon-DhHxpK9K.js";
10
10
  import { T as nn } from "./triangle-alert-CBnO6nq_.js";
11
- import { c as en } from "./createLucideIcon-DhHxpK9K.js";
12
11
  /**
13
12
  * @license lucide-react v1.22.0 - ISC
14
13
  *
15
14
  * This source code is licensed under the ISC license.
16
15
  * See the LICENSE file in the root directory of this source tree.
17
16
  */
18
- const on = [
17
+ const en = [
18
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
19
+ ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
20
+ ["path", { d: "m9 9 6 6", key: "z0biqf" }]
21
+ ], on = L("circle-x", en);
22
+ /**
23
+ * @license lucide-react v1.22.0 - ISC
24
+ *
25
+ * This source code is licensed under the ISC license.
26
+ * See the LICENSE file in the root directory of this source tree.
27
+ */
28
+ const sn = [
19
29
  ["line", { x1: "10", x2: "14", y1: "2", y2: "2", key: "14vaq8" }],
20
30
  ["line", { x1: "12", x2: "15", y1: "14", y2: "11", key: "17fdiu" }],
21
31
  ["circle", { cx: "12", cy: "14", r: "8", key: "1e1u0o" }]
22
- ], sn = en("timer", on), rn = {
32
+ ], rn = L("timer", sn), tn = {
23
33
  id: "session-countdown",
24
34
  capabilities: [],
25
35
  state: {},
@@ -31,7 +41,7 @@ const on = [
31
41
  description: 'Marks the element as a kit SessionCountdown banner. The root also emits `data-tone="running" | "warning" | "expired"` (derived from the remaining time). The accessible remaining-time announcement is surfaced via the region\'s aria-label and a nested polite live region.'
32
42
  }
33
43
  }
34
- }, g = 1e3, h = 60 * g, tn = 15 * h, an = 2 * h, dn = Z(
44
+ }, g = 1e3, h = 60 * g, an = 15 * h, dn = 2 * h, cn = Z(
35
45
  [
36
46
  "ds:break-words",
37
47
  "ds:flex ds:w-full ds:flex-col",
@@ -73,21 +83,21 @@ const on = [
73
83
  tone: "running"
74
84
  }
75
85
  }
76
- ), cn = {
86
+ ), ln = {
77
87
  sm: "ds:size-4",
78
88
  md: "ds:size-5",
79
89
  lg: "ds:size-6"
80
90
  };
81
- function ln(n, e) {
91
+ function un(n, e) {
82
92
  return n <= 0 ? "expired" : n <= e ? "warning" : "running";
83
93
  }
84
- function un(n) {
94
+ function mn(n) {
85
95
  return n <= 0 ? 0 : n <= 30 * g ? 10 : n <= 60 * g ? 30 : Math.floor(n / h) * 60;
86
96
  }
87
- function mn(n) {
97
+ function fn(n) {
88
98
  return n instanceof Date ? n.getTime() : typeof n == "number" ? n : new Date(n).getTime();
89
99
  }
90
- function fn(n, e, d) {
100
+ function gn(n, e, d) {
91
101
  const [w, s] = X(() => Date.now()), c = n !== void 0;
92
102
  return b(() => {
93
103
  if (c || e === void 0 || (s(Date.now()), e - Date.now() <= 0)) return;
@@ -101,64 +111,64 @@ function fn(n, e, d) {
101
111
  return () => window.clearInterval(a);
102
112
  }, [c, e, d]), c ? Math.max(0, n) : e === void 0 ? 0 : Math.max(0, e - w);
103
113
  }
104
- const gn = H(
114
+ const wn = H(
105
115
  ({
106
116
  remainingMs: n,
107
117
  expiresAt: e,
108
- totalMs: d = tn,
109
- warnAtMs: w = an,
118
+ totalMs: d = an,
119
+ warnAtMs: w = dn,
110
120
  size: s = "md",
111
121
  showProgress: c = !1,
112
122
  onExpire: a,
113
123
  onRestart: l,
114
124
  restarting: x = !1,
115
- tickMs: L = 1e3,
116
- locale: M,
117
- label: D,
118
- className: I,
119
- id: C,
120
- ...j
121
- }, R) => {
122
- const { t: o, i18n: A } = $(), y = M ?? A.language ?? "en";
125
+ tickMs: M = 1e3,
126
+ locale: D,
127
+ label: I,
128
+ className: j,
129
+ id: y,
130
+ ...R
131
+ }, z) => {
132
+ const { t: o, i18n: A } = G(), C = D ?? A.language ?? "en";
123
133
  b(() => {
124
134
  }, [n, e]);
125
135
  const F = v(
126
- () => n === void 0 && e !== void 0 ? mn(e) : void 0,
136
+ () => n === void 0 && e !== void 0 ? fn(e) : void 0,
127
137
  [n, e]
128
- ), i = fn(n, F, L), u = ln(i, w), r = u === "expired", f = W(!1);
138
+ ), i = gn(n, F, M), u = un(i, w), r = u === "expired", f = W(!1);
129
139
  b(() => {
130
140
  i <= 0 && !f.current && (f.current = !0, a == null || a()), i > 0 && f.current && (f.current = !1);
131
141
  }, [i, a]);
132
142
  const p = v(
133
- () => new Intl.NumberFormat(y, { maximumFractionDigits: 0 }),
134
- [y]
143
+ () => new Intl.NumberFormat(C, { maximumFractionDigits: 0 }),
144
+ [C]
135
145
  ), _ = Math.ceil(i / g), N = Math.floor(_ / 60), S = _ % 60, B = N > 0 ? o("sessionCountdown.timeMinutesSeconds", {
136
146
  minutes: p.format(N),
137
147
  seconds: p.format(S)
138
148
  }) : o("sessionCountdown.timeSecondsOnly", {
139
149
  seconds: p.format(S)
140
- }), m = un(i), T = v(() => m <= 0 ? o("sessionCountdown.expiredAnnouncement") : m < 60 ? o("sessionCountdown.secondsRemaining", { count: m }) : o("sessionCountdown.minutesRemaining", { count: m / 60 }), [m, o]), O = o("sessionCountdown.expiredAnnouncement"), z = D ?? (r ? void 0 : o("sessionCountdown.ariaLabel", { time: T })), U = dn({
150
+ }), m = mn(i), T = v(() => m <= 0 ? o("sessionCountdown.expiredAnnouncement") : m < 60 ? o("sessionCountdown.secondsRemaining", { count: m }) : o("sessionCountdown.minutesRemaining", { count: m / 60 }), [m, o]), O = o("sessionCountdown.expiredAnnouncement"), U = I ?? (r ? void 0 : o("sessionCountdown.ariaLabel", { time: T })), q = cn({
141
151
  size: s,
142
152
  tone: u,
143
- className: I
153
+ className: j
144
154
  }), K = r ? "alert" : "timer";
145
- Y(rn, null, C);
146
- const P = r ? E : u === "warning" ? nn : sn, V = Math.min(d, Math.max(0, d - i)), q = o(r ? "sessionCountdown.expired" : u === "warning" ? "sessionCountdown.warning" : "sessionCountdown.remainingBanner", { time: B });
155
+ E(tn, null, y);
156
+ const P = r ? on : u === "warning" ? nn : rn, V = Math.min(d, Math.max(0, d - i)), $ = o(r ? "sessionCountdown.expired" : u === "warning" ? "sessionCountdown.warning" : "sessionCountdown.remainingBanner", { time: B });
147
157
  return /* @__PURE__ */ k(
148
158
  "div",
149
159
  {
150
- ref: R,
151
- id: C,
160
+ ref: z,
161
+ id: y,
152
162
  role: K,
153
- "aria-label": z,
163
+ "aria-label": U,
154
164
  "data-component": "session-countdown",
155
165
  "data-tone": u,
156
- className: U,
157
- ...j,
166
+ className: q,
167
+ ...R,
158
168
  children: [
159
169
  r ? /* @__PURE__ */ t("span", { className: "ds:sr-only", children: O }) : null,
160
170
  /* @__PURE__ */ k("div", { className: "ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)]", children: [
161
- /* @__PURE__ */ t("span", { className: `ds:shrink-0 ${cn[s]}`, children: /* @__PURE__ */ t(P, { "aria-hidden": "true", className: "ds:size-full" }) }),
171
+ /* @__PURE__ */ t("span", { className: `ds:shrink-0 ${ln[s]}`, children: /* @__PURE__ */ t(P, { "aria-hidden": "true", className: "ds:size-full" }) }),
162
172
  /* @__PURE__ */ t(
163
173
  "p",
164
174
  {
@@ -167,11 +177,11 @@ const gn = H(
167
177
  s === "lg" ? "type-body" : "type-body-sm"
168
178
  ].join(" "),
169
179
  "aria-hidden": "true",
170
- children: q
180
+ children: $
171
181
  }
172
182
  ),
173
183
  r && l ? /* @__PURE__ */ t(
174
- G,
184
+ J,
175
185
  {
176
186
  type: "button",
177
187
  intent: "tonal",
@@ -190,7 +200,7 @@ const gn = H(
190
200
  // is aria-hidden: the timer region already conveys remaining
191
201
  // time, so a second progressbar would double-announce.
192
202
  /* @__PURE__ */ t("div", { "aria-hidden": "true", className: "ds:w-full", children: /* @__PURE__ */ t(
193
- J,
203
+ Q,
194
204
  {
195
205
  value: V,
196
206
  max: d,
@@ -200,15 +210,15 @@ const gn = H(
200
210
  }
201
211
  ) })
202
212
  ) : null,
203
- /* @__PURE__ */ t(Q, { politeness: "polite", atomic: !0, children: r ? "" : T })
213
+ /* @__PURE__ */ t(Y, { politeness: "polite", atomic: !0, children: r ? "" : T })
204
214
  ]
205
215
  }
206
216
  );
207
217
  }
208
218
  );
209
- gn.displayName = "SessionCountdown";
219
+ wn.displayName = "SessionCountdown";
210
220
  export {
211
- gn as S,
212
- rn as s
221
+ wn as S,
222
+ tn as s
213
223
  };
214
- //# sourceMappingURL=session-countdown-C8AsE072.js.map
224
+ //# sourceMappingURL=session-countdown-Bc70VXN1.js.map
@@ -2,7 +2,7 @@ import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as ce, useId as le, useMemo as M, useRef as R, useState as x, useEffect as V, useCallback as l, useImperativeHandle as ue } from "react";
3
3
  import { c as i } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as me } from "react-i18next";
5
- import { P as ge } from "./pdf-viewer-DF3VMaPo.js";
5
+ import { P as ge } from "./pdf-viewer-CcOuR2wj.js";
6
6
  import { S as pe } from "./signature-capture-DN52VNKL.js";
7
7
  import { u as fe } from "./registry-DvAUVLHh.js";
8
8
  import { C as Z } from "./circle-check-BN6rz4NV.js";
@@ -367,4 +367,4 @@ export {
367
367
  je as S,
368
368
  ve as s
369
369
  };
370
- //# sourceMappingURL=sign-document-Bfk0WpWV.js.map
370
+ //# sourceMappingURL=sign-document-DI561d1C.js.map
@@ -1,5 +1,5 @@
1
1
  import { jsx as s, jsxs as i } from "react/jsx-runtime";
2
- import { forwardRef as ne, useRef as C, useState as H, useEffect as te } from "react";
2
+ import { forwardRef as ne, useRef as C, useState as E, useEffect as te } from "react";
3
3
  import { useTranslation as re } from "react-i18next";
4
4
  import { D as u } from "./dialog-UbKJCi1X.js";
5
5
  import { B as q } from "./button-CPGiR_bH.js";
@@ -8,79 +8,62 @@ import { C as le } from "./checkbox-BuZ1u__2.js";
8
8
  import { a as de } from "./whatsapp-button-BIy6NaJK.js";
9
9
  import { S as L } from "./select-BW5ecXlX.js";
10
10
  import { S as ce } from "./switch-OILsBLWo.js";
11
- import { A as p } from "./alert-KJbsPYkI.js";
11
+ import { A as h } from "./alert-Cxaqd-QO.js";
12
12
  import { S as oe } from "./separator-CYU_bGFn.js";
13
13
  import { A as F } from "./avatar-BNQNhoyL.js";
14
- import { c as _ } from "./createLucideIcon-DhHxpK9K.js";
14
+ import { c as W } from "./createLucideIcon-DhHxpK9K.js";
15
15
  import { P as ue } from "./plus-DzMQ_c6b.js";
16
16
  import { X as me } from "./x-B5YnXwCz.js";
17
- import { P as he } from "./pen-line-D0De5zdl.js";
18
- import { M as pe } from "./mail-BqXVF2zH.js";
17
+ import { P as pe } from "./pen-line-D0De5zdl.js";
18
+ import { M as he } from "./mail-BqXVF2zH.js";
19
+ import { M as ge } from "./message-square-Bye4ATvx.js";
19
20
  /**
20
21
  * @license lucide-react v1.22.0 - ISC
21
22
  *
22
23
  * This source code is licensed under the ISC license.
23
24
  * See the LICENSE file in the root directory of this source tree.
24
25
  */
25
- const ge = [
26
- [
27
- "path",
28
- {
29
- d: "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",
30
- key: "18887p"
31
- }
32
- ],
33
- ["path", { d: "M7 11h10", key: "1twpyw" }],
34
- ["path", { d: "M7 15h6", key: "d9of3u" }],
35
- ["path", { d: "M7 7h8", key: "af5zfr" }]
36
- ], ve = _("message-square-text", ge);
37
- /**
38
- * @license lucide-react v1.22.0 - ISC
39
- *
40
- * This source code is licensed under the ISC license.
41
- * See the LICENSE file in the root directory of this source tree.
42
- */
43
- const fe = [
26
+ const ve = [
44
27
  ["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2", key: "76otgf" }],
45
28
  ["line", { x1: "12", x2: "12.01", y1: "18", y2: "18", key: "1dp563" }]
46
- ], xe = _("tablet", fe);
29
+ ], fe = W("tablet", ve);
47
30
  /**
48
31
  * @license lucide-react v1.22.0 - ISC
49
32
  *
50
33
  * This source code is licensed under the ISC license.
51
34
  * See the LICENSE file in the root directory of this source tree.
52
35
  */
53
- const Re = [
36
+ const xe = [
54
37
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
55
38
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
56
39
  ["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
57
40
  ["line", { x1: "22", x2: "16", y1: "11", y2: "11", key: "1shjgl" }]
58
- ], qe = _("user-plus", Re), g = "__assign-later__", V = [
41
+ ], Re = W("user-plus", xe), g = "__assign-later__", H = [
59
42
  "sms",
60
43
  "email",
61
44
  "whatsapp",
62
45
  "on-device"
63
46
  ];
64
- function W(m, w) {
47
+ function V(m, w) {
65
48
  var o;
66
49
  return ((o = m.find((c) => c.value === w)) == null ? void 0 : o.label) ?? "";
67
50
  }
68
- const we = ne(
51
+ const qe = ne(
69
52
  ({
70
53
  open: m,
71
54
  onOpenChange: w,
72
55
  operators: o,
73
56
  signerOptions: c,
74
- currentOperatorId: z,
75
- allowAssignLater: N = !0,
76
- initialOperatorId: M,
77
- initialSigners: b,
57
+ currentOperatorId: _,
58
+ allowAssignLater: b = !0,
59
+ initialOperatorId: z,
60
+ initialSigners: I,
78
61
  maxSigners: G = 2,
79
62
  busy: d = !1,
80
- error: A,
63
+ error: M,
81
64
  title: U,
82
- description: $,
83
- onRequestSignature: X,
65
+ description: X,
66
+ onRequestSignature: $,
84
67
  contentProps: J
85
68
  }, K) => {
86
69
  const { t: a } = re(), D = C(0), O = C(null), P = (e) => {
@@ -88,33 +71,33 @@ const we = ne(
88
71
  const n = (r = c.find(
89
72
  (l) => l.value === e
90
73
  )) == null ? void 0 : r.availableChannels;
91
- return n && n.length > 0 ? V.filter((l) => n.includes(l)) : V;
92
- }, y = (e, n) => {
74
+ return n && n.length > 0 ? H.filter((l) => n.includes(l)) : H;
75
+ }, N = (e, n) => {
93
76
  const r = P(e);
94
77
  return r.includes(n) ? n : r[0];
95
- }, T = () => {
78
+ }, A = () => {
96
79
  var e, n;
97
- return M === null ? N ? g : ((e = o[0]) == null ? void 0 : e.value) ?? g : M ?? ((n = o[0]) == null ? void 0 : n.value) ?? (N ? g : "");
98
- }, B = () => (b && b.length > 0 ? b : c.length > 0 ? [
80
+ return z === null ? b ? g : ((e = o[0]) == null ? void 0 : e.value) ?? g : z ?? ((n = o[0]) == null ? void 0 : n.value) ?? (b ? g : "");
81
+ }, B = () => (I && I.length > 0 ? I : c.length > 0 ? [
99
82
  {
100
83
  signerId: c[0].value,
101
- channel: y(c[0].value, "on-device")
84
+ channel: N(c[0].value, "on-device")
102
85
  }
103
- ] : []).map((n) => ({ ...n, rowId: D.current++ })), [v, I] = H(T), [h, f] = H(B), j = C(m);
86
+ ] : []).map((n) => ({ ...n, rowId: D.current++ })), [v, S] = E(A), [p, f] = E(B), T = C(m);
104
87
  te(() => {
105
- m && !j.current && (I(T()), f(B())), j.current = m;
88
+ m && !T.current && (S(A()), f(B())), T.current = m;
106
89
  }, [m]);
107
- const Q = N ? [
90
+ const Q = b ? [
108
91
  ...o,
109
92
  { value: g, label: a("signatureRequest.assignLater") }
110
93
  ] : o, k = v === g, Y = {
111
94
  sms: {
112
95
  label: a("signatureRequest.viaSms"),
113
- icon: /* @__PURE__ */ s(ve, { className: "ds:size-4", "aria-hidden": !0 })
96
+ icon: /* @__PURE__ */ s(ge, { className: "ds:size-4", "aria-hidden": !0 })
114
97
  },
115
98
  email: {
116
99
  label: a("signatureRequest.viaEmail"),
117
- icon: /* @__PURE__ */ s(pe, { className: "ds:size-4", "aria-hidden": !0 })
100
+ icon: /* @__PURE__ */ s(he, { className: "ds:size-4", "aria-hidden": !0 })
118
101
  },
119
102
  whatsapp: {
120
103
  label: a("signatureRequest.viaWhatsapp"),
@@ -122,11 +105,11 @@ const we = ne(
122
105
  },
123
106
  "on-device": {
124
107
  label: a("signatureRequest.onThisDevice"),
125
- icon: /* @__PURE__ */ s(xe, { className: "ds:size-4", "aria-hidden": !0 })
108
+ icon: /* @__PURE__ */ s(fe, { className: "ds:size-4", "aria-hidden": !0 })
126
109
  }
127
- }, E = h.map((e) => e.signerId), x = c.find(
128
- (e) => !E.includes(e.value)
129
- ), Z = !d && h.length < G && x !== void 0, S = (e, n) => {
110
+ }, j = p.map((e) => e.signerId), x = c.find(
111
+ (e) => !j.includes(e.value)
112
+ ), Z = !d && p.length < G && x !== void 0, y = (e, n) => {
130
113
  f(
131
114
  (r) => r.map(
132
115
  (l) => l.rowId === e ? { ...l, ...n } : l
@@ -137,7 +120,7 @@ const we = ne(
137
120
  ...e,
138
121
  {
139
122
  signerId: x.value,
140
- channel: y(x.value, "sms"),
123
+ channel: N(x.value, "sms"),
141
124
  rowId: D.current++
142
125
  }
143
126
  ]);
@@ -147,28 +130,28 @@ const we = ne(
147
130
  (r) => r.filter((l) => l.rowId !== e)
148
131
  );
149
132
  }, ae = () => {
150
- X({
133
+ $({
151
134
  operatorId: k ? null : v,
152
- signers: h.map(({ rowId: e, ...n }) => n)
135
+ signers: p.map(({ rowId: e, ...n }) => n)
153
136
  });
154
137
  };
155
138
  return /* @__PURE__ */ s("div", { ref: K, className: "ds:contents", "data-component": "signature-request", children: /* @__PURE__ */ s(u, { open: m, onOpenChange: w, children: /* @__PURE__ */ i(u.Content, { size: "lg", hideCloseButton: !0, ...J, children: [
156
139
  /* @__PURE__ */ i(u.Header, { children: [
157
140
  /* @__PURE__ */ s(u.Title, { children: U ?? a("signatureRequest.title") }),
158
- /* @__PURE__ */ s(u.Description, { children: $ ?? a("signatureRequest.noSignedVersions") })
141
+ /* @__PURE__ */ s(u.Description, { children: X ?? a("signatureRequest.noSignedVersions") })
159
142
  ] }),
160
143
  /* @__PURE__ */ i(u.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
161
144
  /* @__PURE__ */ i("section", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
162
145
  /* @__PURE__ */ i("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
163
146
  /* @__PURE__ */ s("p", { className: "type-eyebrow ds:text-start ds:text-[color:var(--muted-foreground)]", children: a("signatureRequest.operatorSection") }),
164
- z !== void 0 ? /* @__PURE__ */ s(
147
+ _ !== void 0 ? /* @__PURE__ */ s(
165
148
  q,
166
149
  {
167
150
  intent: "primary",
168
151
  size: "sm",
169
- startIcon: /* @__PURE__ */ s(qe, {}),
152
+ startIcon: /* @__PURE__ */ s(Re, {}),
170
153
  disabled: d,
171
- onClick: () => I(z),
154
+ onClick: () => S(_),
172
155
  children: a("signatureRequest.assignToMe")
173
156
  }
174
157
  ) : null
@@ -178,7 +161,7 @@ const we = ne(
178
161
  F,
179
162
  {
180
163
  "aria-hidden": "true",
181
- name: k ? void 0 : W(o, v),
164
+ name: k ? void 0 : V(o, v),
182
165
  size: "sm"
183
166
  }
184
167
  ),
@@ -187,7 +170,7 @@ const we = ne(
187
170
  {
188
171
  options: Q,
189
172
  value: v,
190
- onValueChange: (e) => e && I(e),
173
+ onValueChange: (e) => e && S(e),
191
174
  required: !0,
192
175
  disabled: d,
193
176
  placeholder: a("signatureRequest.operatorPlaceholder"),
@@ -195,7 +178,7 @@ const we = ne(
195
178
  }
196
179
  ) })
197
180
  ] }),
198
- k ? null : /* @__PURE__ */ s(p, { variant: "info", children: /* @__PURE__ */ s(p.Description, { children: a("signatureRequest.operatorHint") }) })
181
+ k ? null : /* @__PURE__ */ s(h, { variant: "info", children: /* @__PURE__ */ s(h.Description, { children: a("signatureRequest.operatorHint") }) })
199
182
  ] }),
200
183
  /* @__PURE__ */ s(oe, { decorative: !0 }),
201
184
  /* @__PURE__ */ i("section", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:text-start", children: [
@@ -214,10 +197,10 @@ const we = ne(
214
197
  }
215
198
  )
216
199
  ] }),
217
- h.map((e) => {
200
+ p.map((e) => {
218
201
  const n = c.filter(
219
- (t) => t.value === e.signerId || !E.includes(t.value)
220
- ), r = W(c, e.signerId), l = P(e.signerId).map(
202
+ (t) => t.value === e.signerId || !j.includes(t.value)
203
+ ), r = V(c, e.signerId), l = P(e.signerId).map(
221
204
  (t) => ({ value: t, ...Y[t] })
222
205
  );
223
206
  return /* @__PURE__ */ i(
@@ -236,11 +219,11 @@ const we = ne(
236
219
  value: e.signerId,
237
220
  onValueChange: (t) => {
238
221
  if (!t) return;
239
- const R = y(
222
+ const R = N(
240
223
  t,
241
224
  e.channel
242
225
  );
243
- S(e.rowId, {
226
+ y(e.rowId, {
244
227
  signerId: t,
245
228
  channel: R,
246
229
  skipOtp: R === "on-device" ? e.skipOtp : void 0
@@ -254,7 +237,7 @@ const we = ne(
254
237
  "aria-label": a("signatureRequest.signerPlaceholder")
255
238
  }
256
239
  ) }),
257
- h.length > 1 ? /* @__PURE__ */ s(
240
+ p.length > 1 ? /* @__PURE__ */ s(
258
241
  ie,
259
242
  {
260
243
  intent: "ghost",
@@ -277,7 +260,7 @@ const we = ne(
277
260
  {
278
261
  checked: e.channel === t.value,
279
262
  disabled: d,
280
- onCheckedChange: (R) => R === !0 && S(e.rowId, {
263
+ onCheckedChange: (R) => R === !0 && y(e.rowId, {
281
264
  channel: t.value,
282
265
  skipOtp: void 0
283
266
  }),
@@ -303,7 +286,7 @@ const we = ne(
303
286
  label: a("signatureRequest.noOtp"),
304
287
  checked: e.skipOtp === !0,
305
288
  disabled: d,
306
- onCheckedChange: (t) => S(e.rowId, { skipOtp: t })
289
+ onCheckedChange: (t) => y(e.rowId, { skipOtp: t })
307
290
  }
308
291
  ) }) : null
309
292
  ]
@@ -312,19 +295,19 @@ const we = ne(
312
295
  );
313
296
  })
314
297
  ] }),
315
- h.some(
298
+ p.some(
316
299
  (e) => e.channel === "on-device" && e.skipOtp === !0
317
- ) ? /* @__PURE__ */ s(p, { variant: "warning", children: /* @__PURE__ */ s(p.Description, { children: a("signatureRequest.noOtpWarning") }) }) : null,
318
- A ? /* @__PURE__ */ s(p, { variant: "error", children: /* @__PURE__ */ s(p.Description, { children: A }) }) : null
300
+ ) ? /* @__PURE__ */ s(h, { variant: "warning", children: /* @__PURE__ */ s(h.Description, { children: a("signatureRequest.noOtpWarning") }) }) : null,
301
+ M ? /* @__PURE__ */ s(h, { variant: "error", children: /* @__PURE__ */ s(h.Description, { children: M }) }) : null
319
302
  ] }),
320
303
  /* @__PURE__ */ i(u.Footer, { children: [
321
304
  /* @__PURE__ */ s(
322
305
  q,
323
306
  {
324
307
  intent: "primary",
325
- startIcon: /* @__PURE__ */ s(he, {}),
308
+ startIcon: /* @__PURE__ */ s(pe, {}),
326
309
  onClick: ae,
327
- disabled: d || h.length === 0,
310
+ disabled: d || p.length === 0,
328
311
  loading: d,
329
312
  children: a("signatureRequest.requestSignature")
330
313
  }
@@ -334,8 +317,8 @@ const we = ne(
334
317
  ] }) }) });
335
318
  }
336
319
  );
337
- we.displayName = "SignatureRequestModal";
320
+ qe.displayName = "SignatureRequestModal";
338
321
  export {
339
- we as S
322
+ qe as S
340
323
  };
341
- //# sourceMappingURL=signature-request-CEOrCDyk.js.map
324
+ //# sourceMappingURL=signature-request-D_6jgDZd.js.map