@alfadocs/ui-kit 0.45.0 → 0.47.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 (85) hide show
  1. package/dist/_chunks/alia-sidebar-CVIPrdc9.js +1125 -0
  2. package/dist/_chunks/{audio-recorder-C1rhKhSN.js → audio-recorder-DC-v9YFW.js} +81 -91
  3. package/dist/_chunks/{chat-input-CQe7nR_v.js → chat-input-CFwc7JxL.js} +2 -1
  4. package/dist/_chunks/{chat-message-ASgGtj-L.js → chat-message-B5JpFj0F.js} +79 -73
  5. package/dist/_chunks/code-block-HoddNOKJ.js +106 -0
  6. package/dist/_chunks/download-CDF1sbL9.js +16 -0
  7. package/dist/_chunks/{editable-currency-cell-renderer-BEBUQl9P.js → editable-currency-cell-renderer-CLil9B29.js} +283 -293
  8. package/dist/_chunks/{freemium-paywall-BYist2sJ.js → freemium-paywall-DzpD63WY.js} +2 -2
  9. package/dist/_chunks/mic-B4Gog3Gi.js +16 -0
  10. package/dist/_chunks/{payment-form-DqEiEJRO.js → payment-form-BNTx4876.js} +225 -196
  11. package/dist/_chunks/pencil-CfQX-0Qc.js +21 -0
  12. package/dist/_chunks/{streaming-text-GH07yIYh.js → streaming-text-CfhDqtIT.js} +49 -45
  13. package/dist/_chunks/{workflow-map-BFNpzTiw.js → workflow-map-Djn1QMJc.js} +135 -150
  14. package/dist/agent-catalog.json +1 -1
  15. package/dist/components/_shared/code-block.d.ts +39 -0
  16. package/dist/components/audio-recorder/index.js +1 -1
  17. package/dist/components/chat-input/index.js +1 -1
  18. package/dist/components/chat-message/chat-message.d.ts +6 -0
  19. package/dist/components/chat-message/index.js +1 -1
  20. package/dist/components/data-table/index.js +1 -1
  21. package/dist/components/freemium-paywall/index.js +1 -1
  22. package/dist/components/payment-form/index.js +1 -1
  23. package/dist/components/payment-form/payment-form.d.ts +6 -0
  24. package/dist/components/streaming-text/index.js +1 -1
  25. package/dist/components/workflow/index.js +1 -1
  26. package/dist/i18n/locales/ar.d.ts +15 -0
  27. package/dist/i18n/locales/ar.js +16 -1
  28. package/dist/i18n/locales/de.d.ts +15 -0
  29. package/dist/i18n/locales/de.js +16 -1
  30. package/dist/i18n/locales/el.d.ts +15 -0
  31. package/dist/i18n/locales/el.js +16 -1
  32. package/dist/i18n/locales/en.d.ts +15 -0
  33. package/dist/i18n/locales/en.js +16 -1
  34. package/dist/i18n/locales/es.d.ts +15 -0
  35. package/dist/i18n/locales/es.js +16 -1
  36. package/dist/i18n/locales/fr.d.ts +15 -0
  37. package/dist/i18n/locales/fr.js +16 -1
  38. package/dist/i18n/locales/hi.d.ts +15 -0
  39. package/dist/i18n/locales/hi.js +16 -1
  40. package/dist/i18n/locales/it.d.ts +15 -0
  41. package/dist/i18n/locales/it.js +16 -1
  42. package/dist/i18n/locales/ja.d.ts +15 -0
  43. package/dist/i18n/locales/ja.js +16 -1
  44. package/dist/i18n/locales/nl.d.ts +15 -0
  45. package/dist/i18n/locales/nl.js +16 -1
  46. package/dist/i18n/locales/pl.d.ts +15 -0
  47. package/dist/i18n/locales/pl.js +16 -1
  48. package/dist/i18n/locales/pt.d.ts +15 -0
  49. package/dist/i18n/locales/pt.js +16 -1
  50. package/dist/i18n/locales/ro.d.ts +15 -0
  51. package/dist/i18n/locales/ro.js +16 -1
  52. package/dist/i18n/locales/ru.d.ts +15 -0
  53. package/dist/i18n/locales/ru.js +16 -1
  54. package/dist/i18n/locales/sq.d.ts +15 -0
  55. package/dist/i18n/locales/sq.js +16 -1
  56. package/dist/i18n/locales/sv.d.ts +15 -0
  57. package/dist/i18n/locales/sv.js +16 -1
  58. package/dist/i18n/locales/tr.d.ts +15 -0
  59. package/dist/i18n/locales/tr.js +16 -1
  60. package/dist/i18n/locales/zh.d.ts +15 -0
  61. package/dist/i18n/locales/zh.js +16 -1
  62. package/dist/index.js +9 -9
  63. package/dist/locales/ar.json +16 -1
  64. package/dist/locales/de.json +16 -1
  65. package/dist/locales/el.json +16 -1
  66. package/dist/locales/en.json +16 -1
  67. package/dist/locales/es.json +16 -1
  68. package/dist/locales/fr.json +16 -1
  69. package/dist/locales/hi.json +16 -1
  70. package/dist/locales/it.json +16 -1
  71. package/dist/locales/ja.json +16 -1
  72. package/dist/locales/nl.json +16 -1
  73. package/dist/locales/pl.json +16 -1
  74. package/dist/locales/pt.json +16 -1
  75. package/dist/locales/ro.json +16 -1
  76. package/dist/locales/ru.json +16 -1
  77. package/dist/locales/sq.json +16 -1
  78. package/dist/locales/sv.json +16 -1
  79. package/dist/locales/tr.json +16 -1
  80. package/dist/locales/zh.json +16 -1
  81. package/dist/patterns/alia-assistant/alia-types.d.ts +61 -0
  82. package/dist/patterns/alia-assistant/index.js +1 -1
  83. package/dist/tokens.css +1 -1
  84. package/package.json +1 -1
  85. package/dist/_chunks/alia-sidebar-Be8FhKYd.js +0 -837
@@ -1,13 +1,14 @@
1
1
  import { jsx as t, jsxs as u, Fragment as ve } from "react/jsx-runtime";
2
- import { forwardRef as O, useMemo as W, useRef as j, useCallback as $, useState as ge, useImperativeHandle as ke, useEffect as ye } from "react";
3
- import { c as L } from "./index-D2ZczOXr.js";
4
- import { useTranslation as z } from "react-i18next";
2
+ import { forwardRef as O, useMemo as W, useRef as j, useCallback as $, useState as ge, useImperativeHandle as ke, useEffect as be } from "react";
3
+ import { c as D } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as S } from "react-i18next";
5
5
  import { C } from "./card-DPmk26CL.js";
6
- import { B as be } from "./badge-zsf5i5bH.js";
6
+ import { B as ye } from "./badge-zsf5i5bH.js";
7
7
  import { a as Z } from "./key-value-pair-CkQIb9EG.js";
8
8
  import { T as xe } from "./timestamp-BV2lC-wV.js";
9
- import { I as S } from "./icon-button-CKEOrN37.js";
10
- import { c as _ } from "./createLucideIcon-CrFbzy84.js";
9
+ import { I as M } from "./icon-button-CKEOrN37.js";
10
+ import { P as U } from "./pencil-CfQX-0Qc.js";
11
+ import { c as z } from "./createLucideIcon-CrFbzy84.js";
11
12
  import { C as Ne } from "./circle-BkqTgYmt.js";
12
13
  import { u as Ce } from "./registry-nPAVE19X.js";
13
14
  import { A as V } from "./alert-ywPR59NE.js";
@@ -38,7 +39,7 @@ const je = [
38
39
  ["path", { d: "M21.818 10.1a10 10 0 0 1 0 3.8", key: "qkgqxc" }],
39
40
  ["path", { d: "M3.721 6.391a10 10 0 0 1 2.7-2.69", key: "1mcia2" }],
40
41
  ["path", { d: "M6.391 20.279a10 10 0 0 1-2.69-2.7", key: "1fvljs" }]
41
- ], Ae = _("circle-dashed", je);
42
+ ], Ae = z("circle-dashed", je);
42
43
  /**
43
44
  * @license lucide-react v1.8.0 - ISC
44
45
  *
@@ -49,7 +50,7 @@ const Ie = [
49
50
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
50
51
  ["line", { x1: "10", x2: "10", y1: "15", y2: "9", key: "c1nkhi" }],
51
52
  ["line", { x1: "14", x2: "14", y1: "15", y2: "9", key: "h65svq" }]
52
- ], Te = _("circle-pause", Ie);
53
+ ], Te = z("circle-pause", Ie);
53
54
  /**
54
55
  * @license lucide-react v1.8.0 - ISC
55
56
  *
@@ -62,75 +63,59 @@ const Ee = [
62
63
  ["path", { d: "M13 19h8", key: "c3s6r1" }],
63
64
  ["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }],
64
65
  ["path", { d: "m3 7 2 2 4-4", key: "1obspn" }]
65
- ], Le = _("list-checks", Ee);
66
+ ], De = z("list-checks", Ee);
66
67
  /**
67
68
  * @license lucide-react v1.8.0 - ISC
68
69
  *
69
70
  * This source code is licensed under the ISC license.
70
71
  * See the LICENSE file in the root directory of this source tree.
71
72
  */
72
- const De = [
73
- [
74
- "path",
75
- {
76
- d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
77
- key: "1a8usu"
78
- }
79
- ],
80
- ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
81
- ], U = _("pencil", De);
82
- /**
83
- * @license lucide-react v1.8.0 - ISC
84
- *
85
- * This source code is licensed under the ISC license.
86
- * See the LICENSE file in the root directory of this source tree.
87
- */
88
- const Ke = [
73
+ const Le = [
89
74
  ["path", { d: "M18.36 6.64A9 9 0 0 1 20.77 15", key: "dxknvb" }],
90
75
  ["path", { d: "M6.16 6.16a9 9 0 1 0 12.68 12.68", key: "1x7qb5" }],
91
76
  ["path", { d: "M12 2v4", key: "3427ic" }],
92
77
  ["path", { d: "m2 2 20 20", key: "1ooewy" }]
93
- ], Be = _("power-off", Ke);
78
+ ], Ke = z("power-off", Le);
94
79
  /**
95
80
  * @license lucide-react v1.8.0 - ISC
96
81
  *
97
82
  * This source code is licensed under the ISC license.
98
83
  * See the LICENSE file in the root directory of this source tree.
99
84
  */
100
- const qe = [
85
+ const Be = [
101
86
  ["path", { d: "M12 2v10", key: "mnfbl" }],
102
87
  ["path", { d: "M18.4 6.6a9 9 0 1 1-12.77.04", key: "obofu9" }]
103
- ], Pe = _("power", qe);
88
+ ], Pe = z("power", Be);
104
89
  /**
105
90
  * @license lucide-react v1.8.0 - ISC
106
91
  *
107
92
  * This source code is licensed under the ISC license.
108
93
  * See the LICENSE file in the root directory of this source tree.
109
94
  */
110
- const Re = [
95
+ const qe = [
111
96
  ["rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2", key: "1yt0o3" }],
112
97
  ["path", { d: "M12 18h.01", key: "mhygvu" }]
113
- ], ue = _("smartphone", Re);
98
+ ], ue = z("smartphone", qe);
114
99
  /**
115
100
  * @license lucide-react v1.8.0 - ISC
116
101
  *
117
102
  * This source code is licensed under the ISC license.
118
103
  * See the LICENSE file in the root directory of this source tree.
119
104
  */
120
- const We = [
105
+ const Re = [
121
106
  ["path", { d: "M10 11v6", key: "nco0om" }],
122
107
  ["path", { d: "M14 11v6", key: "outv1u" }],
123
108
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
124
109
  ["path", { d: "M3 6h18", key: "d0wm0j" }],
125
110
  ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
126
- ], fe = _("trash-2", We);
111
+ ], fe = z("trash-2", Re);
127
112
  /**
128
113
  * @license lucide-react v1.8.0 - ISC
129
114
  *
130
115
  * This source code is licensed under the ISC license.
131
116
  * See the LICENSE file in the root directory of this source tree.
132
117
  */
133
- const $e = [
118
+ const We = [
134
119
  ["path", { d: "M10 15H6a4 4 0 0 0-4 4v2", key: "1nfge6" }],
135
120
  ["path", { d: "m14.305 16.53.923-.382", key: "1itpsq" }],
136
121
  ["path", { d: "m15.228 13.852-.923-.383", key: "eplpkm" }],
@@ -142,7 +127,7 @@ const $e = [
142
127
  ["path", { d: "m20.772 16.148.924.383", key: "1g6xey" }],
143
128
  ["circle", { cx: "18", cy: "15", r: "3", key: "gjjjvw" }],
144
129
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
145
- ], me = _("user-cog", $e), Fe = L("ds:relative ds:w-full", {
130
+ ], me = z("user-cog", We), $e = D("ds:relative ds:w-full", {
146
131
  variants: {
147
132
  density: {
148
133
  comfortable: "",
@@ -153,7 +138,7 @@ const $e = [
153
138
  density: "comfortable"
154
139
  }
155
140
  });
156
- function Ve(e) {
141
+ function Fe(e) {
157
142
  switch (e) {
158
143
  case "active":
159
144
  return {
@@ -173,7 +158,7 @@ function Ve(e) {
173
158
  };
174
159
  }
175
160
  }
176
- const He = O(
161
+ const Ve = O(
177
162
  function({
178
163
  workflow: s,
179
164
  density: r = "comfortable",
@@ -183,10 +168,10 @@ const He = O(
183
168
  onToggleActive: a,
184
169
  className: p
185
170
  }, m) {
186
- const { t: c } = z(), d = Ve(s.status), l = s.status === "active", v = r === "compact", h = (w) => (y) => {
187
- y.stopPropagation(), w == null || w();
188
- }, b = /* @__PURE__ */ t(
189
- be,
171
+ const { t: c } = S(), d = Fe(s.status), l = s.status === "active", v = r === "compact", h = (w) => (b) => {
172
+ b.stopPropagation(), w == null || w();
173
+ }, y = /* @__PURE__ */ t(
174
+ ye,
190
175
  {
191
176
  variant: d.badgeVariant,
192
177
  leading: d.icon,
@@ -199,7 +184,7 @@ const He = O(
199
184
  {
200
185
  ref: m,
201
186
  variant: "default",
202
- className: Fe({ density: r, className: p }),
187
+ className: $e({ density: r, className: p }),
203
188
  "data-component": "workflow-card",
204
189
  "data-component-id": s.id,
205
190
  children: [
@@ -232,7 +217,7 @@ const He = O(
232
217
  /* @__PURE__ */ t("span", { className: "ds:font-medium ds:text-[color:var(--foreground)]", children: s.stats.activeEnrollments })
233
218
  ] })
234
219
  ] }),
235
- /* @__PURE__ */ t("div", { className: "ds:shrink-0", children: b })
220
+ /* @__PURE__ */ t("div", { className: "ds:shrink-0", children: y })
236
221
  ] }) }),
237
222
  !v && /* @__PURE__ */ u(C.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
238
223
  /* @__PURE__ */ t(
@@ -266,7 +251,7 @@ const He = O(
266
251
  ] }),
267
252
  /* @__PURE__ */ u("div", { className: "ds:relative ds:z-10 ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-xs)] ds:ms-auto", children: [
268
253
  i && /* @__PURE__ */ t(
269
- S,
254
+ M,
270
255
  {
271
256
  icon: /* @__PURE__ */ t(U, {}),
272
257
  size: "sm",
@@ -276,9 +261,9 @@ const He = O(
276
261
  }
277
262
  ),
278
263
  a && /* @__PURE__ */ t(
279
- S,
264
+ M,
280
265
  {
281
- icon: l ? /* @__PURE__ */ t(Be, {}) : /* @__PURE__ */ t(Pe, {}),
266
+ icon: l ? /* @__PURE__ */ t(Ke, {}) : /* @__PURE__ */ t(Pe, {}),
282
267
  size: "sm",
283
268
  intent: "ghost",
284
269
  "aria-label": c(
@@ -288,7 +273,7 @@ const He = O(
288
273
  }
289
274
  ),
290
275
  n && /* @__PURE__ */ t(
291
- S,
276
+ M,
292
277
  {
293
278
  icon: /* @__PURE__ */ t(fe, {}),
294
279
  size: "sm",
@@ -304,7 +289,7 @@ const He = O(
304
289
  );
305
290
  }
306
291
  );
307
- He.displayName = "WorkflowCard";
292
+ Ve.displayName = "WorkflowCard";
308
293
  const Wt = {
309
294
  id: "workflow-card",
310
295
  capabilities: ["navigate"],
@@ -343,7 +328,7 @@ const Wt = {
343
328
  description: "Stable opaque workflow node id emitted on each step."
344
329
  }
345
330
  }
346
- }, Oe = {
331
+ }, He = {
347
332
  id: "workflow-editor",
348
333
  capabilities: ["navigate", "expand"],
349
334
  state: {
@@ -452,9 +437,9 @@ function ee(e, s) {
452
437
  edges: n
453
438
  };
454
439
  }
455
- function Ue(e, s, r) {
440
+ function Oe(e, s, r) {
456
441
  var h;
457
- const o = G(e), i = o.findIndex((b) => b.id === s);
442
+ const o = G(e), i = o.findIndex((y) => y.id === s);
458
443
  if (i === -1) return e;
459
444
  const n = r === "up" ? i - 1 : i + 1;
460
445
  if (n < 0 || n >= o.length) return e;
@@ -463,7 +448,7 @@ function Ue(e, s, r) {
463
448
  const m = ee(ee(e, a.id), p.id), c = r === "up" ? a : p, d = r === "up" ? p : a, l = ((h = o[Math.min(i, n) - 1]) == null ? void 0 : h.id) ?? null, v = H(m, l, c);
464
449
  return H(v, c.id, d);
465
450
  }
466
- const Ge = /* @__PURE__ */ new Set([
451
+ const Ue = /* @__PURE__ */ new Set([
467
452
  "dateOfBirth",
468
453
  "date_of_birth",
469
454
  "firstName",
@@ -483,10 +468,10 @@ const Ge = /* @__PURE__ */ new Set([
483
468
  "address",
484
469
  "id"
485
470
  ]);
486
- function Ye(e) {
487
- return Ge.has(e);
471
+ function Ge(e) {
472
+ return Ue.has(e);
488
473
  }
489
- const D = {
474
+ const L = {
490
475
  add_delay: {
491
476
  labelKey: "workflow.action.addDelay",
492
477
  iconName: "Clock"
@@ -515,7 +500,7 @@ const D = {
515
500
  labelKey: "workflow.action.webhook",
516
501
  iconName: "Globe"
517
502
  }
518
- }, Je = {
503
+ }, Ye = {
519
504
  Clock: ce,
520
505
  Mail: le,
521
506
  Smartphone: ue,
@@ -528,14 +513,14 @@ function Y({
528
513
  iconName: e,
529
514
  className: s
530
515
  }) {
531
- const r = Je[e];
516
+ const r = Ye[e];
532
517
  return /* @__PURE__ */ t(r, { "aria-hidden": "true", className: s ?? "ds:size-4" });
533
518
  }
534
- const Qe = 40, Xe = 60;
519
+ const Je = 40, Qe = 60;
535
520
  function te(e, s) {
536
521
  return e.length <= s ? e : `${e.slice(0, s - 1)}…`;
537
522
  }
538
- function Ze(e, s) {
523
+ function Xe(e, s) {
539
524
  switch (e.kind) {
540
525
  case "add_delay": {
541
526
  const r = e.days ?? 0, o = s("workflow.delay.summary", { count: r });
@@ -543,11 +528,11 @@ function Ze(e, s) {
543
528
  }
544
529
  case "send_email": {
545
530
  const r = e.subject ?? "", i = `${s("workflow.action.sendEmail")}: ${r}`;
546
- return { text: te(i, Qe), full: i };
531
+ return { text: te(i, Je), full: i };
547
532
  }
548
533
  case "send_sms": {
549
534
  const r = e.body ?? "";
550
- return { text: te(r, Xe), full: r };
535
+ return { text: te(r, Qe), full: r };
551
536
  }
552
537
  case "create_task": {
553
538
  const r = e.title ?? "";
@@ -574,7 +559,7 @@ const se = [
574
559
  "ds:border-inline-start-[var(--border-width-hairline)]",
575
560
  "ds:border-solid",
576
561
  "ds:border-[color:var(--border)]"
577
- ].join(" "), et = [
562
+ ].join(" "), Ze = [
578
563
  "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
579
564
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
580
565
  "ds:rounded-[var(--radius-full)]",
@@ -589,21 +574,21 @@ const se = [
589
574
  "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
590
575
  "ds:forced-colors:focus-visible:outline-[CanvasText]",
591
576
  "ds:disabled:opacity-50 ds:disabled:cursor-not-allowed"
592
- ].join(" "), tt = [
577
+ ].join(" "), et = [
593
578
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
594
579
  "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
595
580
  "ds:forced-colors:focus-visible:outline-[CanvasText]",
596
581
  "ds:rounded-[var(--radius-lg)]"
597
- ].join(" "), st = Object.keys(
598
- D
582
+ ].join(" "), tt = Object.keys(
583
+ L
599
584
  );
600
585
  let re = 0;
601
- function rt() {
586
+ function st() {
602
587
  re += 1;
603
588
  const e = Math.random().toString(36).slice(2, 8);
604
589
  return `wf-node-${Date.now()}-${re}-${e}`;
605
590
  }
606
- function ot(e) {
591
+ function rt(e) {
607
592
  switch (e) {
608
593
  case "add_delay":
609
594
  return { kind: "add_delay", days: 1 };
@@ -626,13 +611,13 @@ function ot(e) {
626
611
  return { kind: "webhook", url: "", method: "POST" };
627
612
  }
628
613
  }
629
- function at(e = 0) {
614
+ function ot(e = 0) {
630
615
  const s = j(e), r = $((o) => {
631
616
  s.current = o;
632
617
  }, []);
633
618
  return [s, r];
634
619
  }
635
- function nt({
620
+ function at({
636
621
  node: e,
637
622
  position: s,
638
623
  total: r,
@@ -642,26 +627,26 @@ function nt({
642
627
  onMove: a,
643
628
  registerRef: p
644
629
  }) {
645
- const { t: m } = z(), c = D[e.type], d = j(null), [l, v] = at(0), h = $(
630
+ const { t: m } = S(), c = L[e.type], d = j(null), [l, v] = ot(0), h = $(
646
631
  (g) => {
647
- var q, P;
648
- const M = (q = d.current) == null ? void 0 : q.querySelectorAll(
632
+ var P, q;
633
+ const _ = (P = d.current) == null ? void 0 : P.querySelectorAll(
649
634
  "button[data-wf-control]:not([disabled])"
650
635
  );
651
- if (!M || M.length === 0) return;
652
- const B = Math.max(0, Math.min(g, M.length - 1));
653
- (P = M[B]) == null || P.focus(), v(B);
636
+ if (!_ || _.length === 0) return;
637
+ const B = Math.max(0, Math.min(g, _.length - 1));
638
+ (q = _[B]) == null || q.focus(), v(B);
654
639
  },
655
640
  [v]
656
- ), b = (g) => {
641
+ ), y = (g) => {
657
642
  g.target === g.currentTarget && (g.key === "ArrowRight" || g.key === "ArrowDown") && (g.preventDefault(), h(0));
658
643
  }, x = (g) => {
659
644
  g.key === "ArrowRight" ? (g.preventDefault(), h(l.current + 1)) : g.key === "ArrowLeft" ? (g.preventDefault(), h(l.current - 1)) : g.key === "Home" ? (g.preventDefault(), h(0)) : g.key === "End" && (g.preventDefault(), h(Number.POSITIVE_INFINITY));
660
- }, w = Ze(e.settings, m), y = m(c.labelKey), A = s > 0, I = s < r - 1, K = m("workflow.editor.position", {
645
+ }, w = Xe(e.settings, m), b = m(c.labelKey), A = s > 0, I = s < r - 1, K = m("workflow.editor.position", {
661
646
  current: s + 1,
662
647
  total: r
663
648
  }), T = m("workflow.editor.nodeAriaLabel", {
664
- type: y,
649
+ type: b,
665
650
  current: s + 1,
666
651
  total: r
667
652
  });
@@ -672,10 +657,10 @@ function nt({
672
657
  {
673
658
  ref: (g) => p(e.id, g),
674
659
  tabIndex: o ? -1 : 0,
675
- onKeyDown: b,
660
+ onKeyDown: y,
676
661
  "aria-label": T,
677
662
  "data-node-id": e.id,
678
- className: tt,
663
+ className: et,
679
664
  children: /* @__PURE__ */ u(C, { variant: "outlined", children: [
680
665
  /* @__PURE__ */ t(C.Header, { className: "ds:pb-[var(--spacing-sm)]", children: /* @__PURE__ */ u("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
681
666
  /* @__PURE__ */ t(
@@ -687,7 +672,7 @@ function nt({
687
672
  }
688
673
  ),
689
674
  /* @__PURE__ */ u("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col", children: [
690
- /* @__PURE__ */ t("span", { className: "ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-semibold)] ds:text-[color:var(--foreground)] ds:[overflow-wrap:anywhere] ds:break-words", children: y }),
675
+ /* @__PURE__ */ t("span", { className: "ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-semibold)] ds:text-[color:var(--foreground)] ds:[overflow-wrap:anywhere] ds:break-words", children: b }),
691
676
  /* @__PURE__ */ t("span", { className: "ds:text-[length:var(--font-size-xs)] ds:text-[color:var(--muted-foreground)]", children: K })
692
677
  ] }),
693
678
  /* @__PURE__ */ u(
@@ -698,7 +683,7 @@ function nt({
698
683
  className: "ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-xs)] ds:ms-auto",
699
684
  children: [
700
685
  i ? /* @__PURE__ */ t(
701
- S,
686
+ M,
702
687
  {
703
688
  "data-wf-control": "edit",
704
689
  icon: /* @__PURE__ */ t(U, {}),
@@ -711,7 +696,7 @@ function nt({
711
696
  }
712
697
  ) : null,
713
698
  /* @__PURE__ */ t(
714
- S,
699
+ M,
715
700
  {
716
701
  "data-wf-control": "up",
717
702
  icon: /* @__PURE__ */ t(Me, {}),
@@ -724,7 +709,7 @@ function nt({
724
709
  }
725
710
  ),
726
711
  /* @__PURE__ */ t(
727
- S,
712
+ M,
728
713
  {
729
714
  "data-wf-control": "down",
730
715
  icon: /* @__PURE__ */ t(Se, {}),
@@ -737,7 +722,7 @@ function nt({
737
722
  }
738
723
  ),
739
724
  n ? /* @__PURE__ */ t(
740
- S,
725
+ M,
741
726
  {
742
727
  "data-wf-control": "delete",
743
728
  icon: /* @__PURE__ */ t(fe, {}),
@@ -761,7 +746,7 @@ function nt({
761
746
  children: w.text
762
747
  }
763
748
  ) }) : null,
764
- e.settings.kind === "update_patient_field" && Ye(e.settings.fieldId) ? /* @__PURE__ */ t(C.Body, { className: "ds:pt-0", children: /* @__PURE__ */ t(V, { variant: "error", "data-testid": "workflow-editor-invalid-field", children: m("workflow.editor.invalidField") }) }) : null
749
+ e.settings.kind === "update_patient_field" && Ge(e.settings.fieldId) ? /* @__PURE__ */ t(C.Body, { className: "ds:pt-0", children: /* @__PURE__ */ t(V, { variant: "error", "data-testid": "workflow-editor-invalid-field", children: m("workflow.editor.invalidField") }) }) : null
765
750
  ] })
766
751
  }
767
752
  )
@@ -774,7 +759,7 @@ function oe({
774
759
  label: o,
775
760
  compact: i = !0
776
761
  }) {
777
- const { t: n } = z();
762
+ const { t: n } = S();
778
763
  return /* @__PURE__ */ u(N.Root, { children: [
779
764
  /* @__PURE__ */ t(N.Trigger, { asChild: !0, children: /* @__PURE__ */ u(
780
765
  "button",
@@ -782,7 +767,7 @@ function oe({
782
767
  type: "button",
783
768
  disabled: r,
784
769
  "aria-label": o,
785
- className: et,
770
+ className: Ze,
786
771
  children: [
787
772
  /* @__PURE__ */ t(ae, { "aria-hidden": "true", className: "ds:size-4" }),
788
773
  i ? null : /* @__PURE__ */ t("span", { className: "ds:text-[length:var(--font-size-sm)]", children: o })
@@ -792,7 +777,7 @@ function oe({
792
777
  /* @__PURE__ */ u(N.Content, { align: "start", sideOffset: 6, children: [
793
778
  /* @__PURE__ */ t(N.Label, { children: n("workflow.editor.addAction") }),
794
779
  e.map((a) => {
795
- const p = D[a];
780
+ const p = L[a];
796
781
  return /* @__PURE__ */ t(
797
782
  N.Item,
798
783
  {
@@ -806,15 +791,15 @@ function oe({
806
791
  ] })
807
792
  ] });
808
793
  }
809
- function dt({ criteria: e, onEdit: s, disabled: r }) {
810
- const { t: o } = z(), i = (e == null ? void 0 : e.ruleCount) ?? 0, n = i > 0 ? o("workflow.editor.criteriaCount", { count: i }) : o("workflow.editor.noCriteria");
794
+ function nt({ criteria: e, onEdit: s, disabled: r }) {
795
+ const { t: o } = S(), i = (e == null ? void 0 : e.ruleCount) ?? 0, n = i > 0 ? o("workflow.editor.criteriaCount", { count: i }) : o("workflow.editor.noCriteria");
811
796
  return /* @__PURE__ */ t(C, { variant: "outlined", children: /* @__PURE__ */ t(C.Header, { className: "ds:pb-[var(--spacing-sm)]", children: /* @__PURE__ */ u("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
812
797
  /* @__PURE__ */ u("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col", children: [
813
798
  /* @__PURE__ */ t("span", { className: "ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-semibold)] ds:text-[color:var(--foreground)]", children: o("workflow.editor.enrollmentCriteria") }),
814
799
  /* @__PURE__ */ t("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)] ds:[overflow-wrap:anywhere] ds:break-words", children: (e == null ? void 0 : e.summary) ?? n })
815
800
  ] }),
816
801
  s ? /* @__PURE__ */ t(
817
- S,
802
+ M,
818
803
  {
819
804
  icon: /* @__PURE__ */ t(U, {}),
820
805
  size: "sm",
@@ -826,7 +811,7 @@ function dt({ criteria: e, onEdit: s, disabled: r }) {
826
811
  ) : null
827
812
  ] }) }) });
828
813
  }
829
- const it = O(
814
+ const dt = O(
830
815
  function({
831
816
  graph: s,
832
817
  onChange: r,
@@ -838,13 +823,13 @@ const it = O(
838
823
  onDeleteNode: m,
839
824
  className: c
840
825
  }, d) {
841
- const { t: l } = z(), v = a ?? st, h = W(() => G(s), [s]), b = j(/* @__PURE__ */ new Map()), x = j(null), w = $(
826
+ const { t: l } = S(), v = a ?? tt, h = W(() => G(s), [s]), y = j(/* @__PURE__ */ new Map()), x = j(null), w = $(
842
827
  (f) => {
843
828
  n || r(f);
844
829
  },
845
830
  [n, r]
846
- ), y = $((f, k) => {
847
- k ? b.current.set(f, k) : b.current.delete(f);
831
+ ), b = $((f, k) => {
832
+ k ? y.current.set(f, k) : y.current.delete(f);
848
833
  }, []), [A, I] = ge(null), K = j(null);
849
834
  K.current = A;
850
835
  const T = j(null);
@@ -854,35 +839,35 @@ const it = O(
854
839
  getTotalSteps: () => h.length,
855
840
  getCurrentStep: () => K.current,
856
841
  gotoStep: (f) => {
857
- const k = b.current.get(f);
842
+ const k = y.current.get(f);
858
843
  k && (k.focus(), I(f));
859
844
  }
860
845
  }),
861
846
  [h.length]
862
847
  );
863
- Ce(Oe, g, void 0), ye(() => {
848
+ Ce(He, g, void 0), be(() => {
864
849
  const f = x.current;
865
850
  if (!f) return;
866
- const k = b.current.get(f);
851
+ const k = y.current.get(f);
867
852
  k && (k.focus(), x.current = null);
868
853
  });
869
- const M = (f, k) => {
854
+ const _ = (f, k) => {
870
855
  if (n) return;
871
856
  const R = {
872
- id: rt(),
857
+ id: st(),
873
858
  type: k,
874
- settings: ot(k)
859
+ settings: rt(k)
875
860
  };
876
861
  x.current = R.id, w(H(s, f, R));
877
862
  }, B = (f, k) => {
878
- n || (x.current = f, w(Ue(s, f, k)));
879
- }, q = (f) => {
880
- n || !p || p(f);
863
+ n || (x.current = f, w(Oe(s, f, k)));
881
864
  }, P = (f) => {
865
+ n || !p || p(f);
866
+ }, q = (f) => {
882
867
  n || !m || m(f);
883
868
  }, J = () => n ? /* @__PURE__ */ t(V, { variant: "warning", children: /* @__PURE__ */ t(V.Title, { as: "p", children: l("workflow.editor.activeLock") }) }) : null, Q = () => o || i ? /* @__PURE__ */ u(ve, { children: [
884
869
  /* @__PURE__ */ t(
885
- dt,
870
+ nt,
886
871
  {
887
872
  criteria: o,
888
873
  onEdit: i,
@@ -960,12 +945,12 @@ const it = O(
960
945
  /* @__PURE__ */ u(N.Content, { align: "center", sideOffset: 6, children: [
961
946
  /* @__PURE__ */ t(N.Label, { children: l("workflow.editor.addAction") }),
962
947
  v.map((f) => {
963
- const k = D[f];
948
+ const k = L[f];
964
949
  return /* @__PURE__ */ t(
965
950
  N.Item,
966
951
  {
967
952
  startIcon: /* @__PURE__ */ t(Y, { iconName: k.iconName }),
968
- onSelect: () => M(null, f),
953
+ onSelect: () => _(null, f),
969
954
  children: l(k.labelKey)
970
955
  },
971
956
  f
@@ -993,7 +978,7 @@ const it = O(
993
978
  availableActions: v,
994
979
  disabled: n,
995
980
  label: l("workflow.editor.addAction"),
996
- onSelect: (f) => M(null, f)
981
+ onSelect: (f) => _(null, f)
997
982
  }
998
983
  ) }),
999
984
  /* @__PURE__ */ t(
@@ -1005,16 +990,16 @@ const it = O(
1005
990
  children: h.map((f, k) => /* @__PURE__ */ u("li", { className: "ds:list-none ds:flex ds:flex-col", children: [
1006
991
  /* @__PURE__ */ t("span", { "aria-hidden": "true", className: F }),
1007
992
  /* @__PURE__ */ t(
1008
- nt,
993
+ at,
1009
994
  {
1010
995
  node: f,
1011
996
  position: k,
1012
997
  total: X,
1013
998
  disabled: n,
1014
- onEdit: p ? q : void 0,
1015
- onDelete: m ? P : void 0,
999
+ onEdit: p ? P : void 0,
1000
+ onDelete: m ? q : void 0,
1016
1001
  onMove: B,
1017
- registerRef: y
1002
+ registerRef: b
1018
1003
  }
1019
1004
  ),
1020
1005
  /* @__PURE__ */ t("span", { "aria-hidden": "true", className: F }),
@@ -1024,7 +1009,7 @@ const it = O(
1024
1009
  availableActions: v,
1025
1010
  disabled: n,
1026
1011
  label: l("workflow.editor.addActionAfter"),
1027
- onSelect: (R) => M(f.id, R)
1012
+ onSelect: (R) => _(f.id, R)
1028
1013
  }
1029
1014
  ) })
1030
1015
  ] }, f.id))
@@ -1035,8 +1020,8 @@ const it = O(
1035
1020
  );
1036
1021
  }
1037
1022
  );
1038
- it.displayName = "WorkflowEditor";
1039
- const lt = {
1023
+ dt.displayName = "WorkflowEditor";
1024
+ const it = {
1040
1025
  Clock: ce,
1041
1026
  Mail: le,
1042
1027
  Smartphone: ue,
@@ -1044,7 +1029,7 @@ const lt = {
1044
1029
  MessageCircle: de,
1045
1030
  UserCog: me,
1046
1031
  Globe: ne
1047
- }, ct = L(
1032
+ }, lt = D(
1048
1033
  // The map is a list of steps — never a list of meaningful controls.
1049
1034
  // Layout via logical properties only; connectors are sibling spacers
1050
1035
  // styled with border-inline-start / border-block-end (see node/spacer).
@@ -1065,14 +1050,14 @@ const lt = {
1065
1050
  compact: !1
1066
1051
  }
1067
1052
  }
1068
- ), pe = L("ds:flex", {
1053
+ ), pe = D("ds:flex", {
1069
1054
  variants: {
1070
1055
  orientation: {
1071
1056
  vertical: "ds:flex-col ds:items-stretch",
1072
1057
  horizontal: "ds:flex-row ds:items-center"
1073
1058
  }
1074
1059
  }
1075
- }), he = L(
1060
+ }), he = D(
1076
1061
  [
1077
1062
  "ds:relative ds:flex ds:items-center",
1078
1063
  "ds:gap-[var(--spacing-sm)]",
@@ -1118,7 +1103,7 @@ const lt = {
1118
1103
  }
1119
1104
  }
1120
1105
  }
1121
- ), we = L(
1106
+ ), we = D(
1122
1107
  ["ds:block", "ds:border-solid", "ds:border-[color:var(--border)]"].join(" "),
1123
1108
  {
1124
1109
  variants: {
@@ -1167,7 +1152,7 @@ const lt = {
1167
1152
  ]
1168
1153
  }
1169
1154
  );
1170
- function ut(e) {
1155
+ function ct(e) {
1171
1156
  switch (e.kind) {
1172
1157
  case "add_delay":
1173
1158
  return typeof e.days == "number" && e.days > 0 ? {
@@ -1196,11 +1181,11 @@ function ut(e) {
1196
1181
  return;
1197
1182
  }
1198
1183
  }
1199
- function ft(e, s) {
1184
+ function ut(e, s) {
1200
1185
  if (e !== void 0)
1201
1186
  return typeof e == "string" ? e : s(e.key, e.options);
1202
1187
  }
1203
- const mt = O(
1188
+ const ft = O(
1204
1189
  function({
1205
1190
  graph: s,
1206
1191
  activeNodeId: r,
@@ -1212,10 +1197,10 @@ const mt = O(
1212
1197
  "aria-label": m,
1213
1198
  ...c
1214
1199
  }, d) {
1215
- const { t: l } = z(), v = W(() => G(s), [s]), h = W(
1200
+ const { t: l } = S(), v = W(() => G(s), [s]), h = W(
1216
1201
  () => r ? v.findIndex((w) => w.id === r) : -1,
1217
1202
  [v, r]
1218
- ), b = m ?? l("workflow.map.label", { count: v.length }), x = (w) => h === -1 ? "neutral" : w === h ? "current" : w < h ? "completed" : "pending";
1203
+ ), y = m ?? l("workflow.map.label", { count: v.length }), x = (w) => h === -1 ? "neutral" : w === h ? "current" : w < h ? "completed" : "pending";
1219
1204
  return (
1220
1205
  // eslint-disable-next-line jsx-a11y/no-redundant-roles -- Safari strips the implicit list role on <ol> with list-style:none; this guard puts it back in the accessibility tree
1221
1206
  /* @__PURE__ */ u(
@@ -1223,24 +1208,24 @@ const mt = O(
1223
1208
  {
1224
1209
  ref: d,
1225
1210
  role: "list",
1226
- "aria-label": b,
1211
+ "aria-label": y,
1227
1212
  "data-component": "workflow-map",
1228
1213
  "data-component-id": c.id,
1229
- className: ct({ orientation: n, compact: a, className: p }),
1214
+ className: lt({ orientation: n, compact: a, className: p }),
1230
1215
  ...c,
1231
1216
  children: [
1232
1217
  i ? /* @__PURE__ */ t(
1233
- ht,
1218
+ pt,
1234
1219
  {
1235
1220
  orientation: n,
1236
1221
  compact: a,
1237
1222
  criteria: i
1238
1223
  }
1239
1224
  ) : null,
1240
- v.map((w, y) => {
1241
- const A = x(y), I = y === v.length - 1;
1225
+ v.map((w, b) => {
1226
+ const A = x(b), I = b === v.length - 1;
1242
1227
  return /* @__PURE__ */ t(
1243
- pt,
1228
+ mt,
1244
1229
  {
1245
1230
  node: w,
1246
1231
  state: A,
@@ -1258,8 +1243,8 @@ const mt = O(
1258
1243
  );
1259
1244
  }
1260
1245
  );
1261
- mt.displayName = "WorkflowMap";
1262
- function pt({
1246
+ ft.displayName = "WorkflowMap";
1247
+ function mt({
1263
1248
  node: e,
1264
1249
  state: s,
1265
1250
  orientation: r,
@@ -1267,10 +1252,10 @@ function pt({
1267
1252
  isLast: i,
1268
1253
  onNodeClick: n
1269
1254
  }) {
1270
- const { t: a } = z(), p = D[e.type], m = lt[p.iconName], c = a(p.labelKey), d = ft(ut(e.settings), a), l = typeof n == "function", v = s === "current", h = s === "completed", b = (y) => {
1271
- l && (y.preventDefault(), n == null || n(e.id));
1272
- }, x = (y) => {
1273
- l && (y.key === "Enter" || y.key === " ") && (y.preventDefault(), n == null || n(e.id));
1255
+ const { t: a } = S(), p = L[e.type], m = it[p.iconName], c = a(p.labelKey), d = ut(ct(e.settings), a), l = typeof n == "function", v = s === "current", h = s === "completed", y = (b) => {
1256
+ l && (b.preventDefault(), n == null || n(e.id));
1257
+ }, x = (b) => {
1258
+ l && (b.key === "Enter" || b.key === " ") && (b.preventDefault(), n == null || n(e.id));
1274
1259
  }, w = v ? a("workflow.map.current") : h ? a("workflow.map.completed") : s === "pending" ? a("workflow.map.pending") : null;
1275
1260
  return (
1276
1261
  // `<li>` has implicit role="listitem"; no explicit role needed.
@@ -1289,7 +1274,7 @@ function pt({
1289
1274
  type: c,
1290
1275
  summary: d
1291
1276
  }) : void 0,
1292
- onClick: l ? b : void 0,
1277
+ onClick: l ? y : void 0,
1293
1278
  onKeyDown: l ? x : void 0,
1294
1279
  className: he({
1295
1280
  orientation: r,
@@ -1340,12 +1325,12 @@ function pt({
1340
1325
  ] })
1341
1326
  );
1342
1327
  }
1343
- function ht({
1328
+ function pt({
1344
1329
  orientation: e,
1345
1330
  compact: s,
1346
1331
  criteria: r
1347
1332
  }) {
1348
- const { t: o } = z();
1333
+ const { t: o } = S();
1349
1334
  return /* @__PURE__ */ u("li", { className: pe({ orientation: e }), children: [
1350
1335
  /* @__PURE__ */ u(
1351
1336
  "div",
@@ -1363,7 +1348,7 @@ function ht({
1363
1348
  {
1364
1349
  "aria-hidden": "true",
1365
1350
  className: "ds:flex ds:items-center ds:justify-center ds:shrink-0 ds:size-[var(--spacing-md)] ds:text-[var(--muted-foreground)]",
1366
- children: /* @__PURE__ */ t(Le, { className: "ds:size-[var(--spacing-md)]" })
1351
+ children: /* @__PURE__ */ t(De, { className: "ds:size-[var(--spacing-md)]" })
1367
1352
  }
1368
1353
  ),
1369
1354
  /* @__PURE__ */ u("span", { className: "ds:flex ds:flex-col ds:min-w-0 ds:flex-1", children: [
@@ -1385,18 +1370,18 @@ function ht({
1385
1370
  ] });
1386
1371
  }
1387
1372
  export {
1388
- Ge as C,
1389
- He as W,
1390
- it as a,
1391
- mt as b,
1373
+ Ue as C,
1374
+ Ve as W,
1375
+ dt as a,
1376
+ ft as b,
1392
1377
  H as c,
1393
1378
  Wt as d,
1394
- Oe as e,
1379
+ He as e,
1395
1380
  $t as f,
1396
- Ye as i,
1381
+ Ge as i,
1397
1382
  G as l,
1398
- Ue as m,
1383
+ Oe as m,
1399
1384
  ee as r,
1400
- D as w
1385
+ L as w
1401
1386
  };
1402
- //# sourceMappingURL=workflow-map-BFNpzTiw.js.map
1387
+ //# sourceMappingURL=workflow-map-Djn1QMJc.js.map