@alfadocs/ui-kit 1.148.0 → 1.149.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 (90) hide show
  1. package/dist/_chunks/{calendar-appointment-editor-dialog-Cz8F2H4M.js → calendar-appointment-editor-dialog-Dx9_KIWA.js} +5 -5
  2. package/dist/_chunks/{calendar-waiting-list-panel-C4T85b4q.js → calendar-waiting-list-panel-BKBHfBpn.js} +2 -2
  3. package/dist/_chunks/{calendar.sheets-DsgPdycU.js → calendar.sheets-lgAqJB34.js} +2 -2
  4. package/dist/_chunks/notes-panel-Cw06dLDm.js +1135 -0
  5. package/dist/_chunks/rich-text-editor-eGdYDPK2.js +4405 -0
  6. package/dist/_chunks/task-editor-4zFL10oM.js +1153 -0
  7. package/dist/_chunks/{tasks-panel-DufAoAxG.js → tasks-panel-BDPQPOP6.js} +475 -461
  8. package/dist/_chunks/{use-appointment-details-read-kYp-gfhb.js → use-appointment-details-read-Bl1DHXQ2.js} +568 -554
  9. package/dist/agent-catalog.json +9 -7
  10. package/dist/agent-i18n/en.json +4 -4
  11. package/dist/appointment-editor-panel/index.js +1 -1
  12. package/dist/aws-transcribe/index.js +287 -181
  13. package/dist/browser-support.js +1 -1
  14. package/dist/components/_shared/save-outcome.d.ts +23 -0
  15. package/dist/components/appointment-details-panel/index.js +1 -1
  16. package/dist/components/index.d.ts +1 -0
  17. package/dist/components/notes-panel/index.js +1 -1
  18. package/dist/components/rich-text-editor/help-me-write-overlay.d.ts +12 -1
  19. package/dist/components/rich-text-editor/index.js +1 -1
  20. package/dist/components/rich-text-editor/rich-text-editor.d.ts +5 -3
  21. package/dist/components/task-editor/index.js +1 -1
  22. package/dist/components/task-editor/use-task-editor-form.d.ts +7 -1
  23. package/dist/components/tasks-panel/index.js +1 -1
  24. package/dist/core.css +1 -1
  25. package/dist/find-free-slots-panel/index.js +1 -1
  26. package/dist/i18n/locales/ar.d.ts +1 -0
  27. package/dist/i18n/locales/ar.js +2 -1
  28. package/dist/i18n/locales/de.d.ts +1 -0
  29. package/dist/i18n/locales/de.js +2 -1
  30. package/dist/i18n/locales/el.d.ts +1 -0
  31. package/dist/i18n/locales/el.js +2 -1
  32. package/dist/i18n/locales/en.d.ts +1 -0
  33. package/dist/i18n/locales/en.js +2 -1
  34. package/dist/i18n/locales/es.d.ts +1 -0
  35. package/dist/i18n/locales/es.js +2 -1
  36. package/dist/i18n/locales/fr.d.ts +1 -0
  37. package/dist/i18n/locales/fr.js +2 -1
  38. package/dist/i18n/locales/hi.d.ts +1 -0
  39. package/dist/i18n/locales/hi.js +2 -1
  40. package/dist/i18n/locales/it.d.ts +1 -0
  41. package/dist/i18n/locales/it.js +2 -1
  42. package/dist/i18n/locales/ja.d.ts +1 -0
  43. package/dist/i18n/locales/ja.js +2 -1
  44. package/dist/i18n/locales/nl.d.ts +1 -0
  45. package/dist/i18n/locales/nl.js +2 -1
  46. package/dist/i18n/locales/pl.d.ts +1 -0
  47. package/dist/i18n/locales/pl.js +2 -1
  48. package/dist/i18n/locales/pt.d.ts +1 -0
  49. package/dist/i18n/locales/pt.js +2 -1
  50. package/dist/i18n/locales/ro.d.ts +1 -0
  51. package/dist/i18n/locales/ro.js +2 -1
  52. package/dist/i18n/locales/ru.d.ts +1 -0
  53. package/dist/i18n/locales/ru.js +2 -1
  54. package/dist/i18n/locales/sq.d.ts +1 -0
  55. package/dist/i18n/locales/sq.js +2 -1
  56. package/dist/i18n/locales/sv.d.ts +1 -0
  57. package/dist/i18n/locales/sv.js +2 -1
  58. package/dist/i18n/locales/tr.d.ts +1 -0
  59. package/dist/i18n/locales/tr.js +2 -1
  60. package/dist/i18n/locales/zh.d.ts +1 -0
  61. package/dist/i18n/locales/zh.js +2 -1
  62. package/dist/index.js +1407 -1403
  63. package/dist/locales/ar.json +2 -1
  64. package/dist/locales/de.json +2 -1
  65. package/dist/locales/el.json +2 -1
  66. package/dist/locales/en.json +2 -1
  67. package/dist/locales/es.json +2 -1
  68. package/dist/locales/fr.json +2 -1
  69. package/dist/locales/hi.json +2 -1
  70. package/dist/locales/it.json +2 -1
  71. package/dist/locales/ja.json +2 -1
  72. package/dist/locales/nl.json +2 -1
  73. package/dist/locales/pl.json +2 -1
  74. package/dist/locales/pt.json +2 -1
  75. package/dist/locales/ro.json +2 -1
  76. package/dist/locales/ru.json +2 -1
  77. package/dist/locales/sq.json +2 -1
  78. package/dist/locales/sv.json +2 -1
  79. package/dist/locales/tr.json +2 -1
  80. package/dist/locales/zh.json +2 -1
  81. package/dist/online-bookings-panel/index.js +1 -1
  82. package/dist/patterns/calendar/index.js +2 -2
  83. package/dist/save-outcome/index.js +20 -0
  84. package/dist/speech/aws-transcribe.d.ts +30 -6
  85. package/dist/tokens.css +1 -1
  86. package/dist/waiting-list-panel/index.js +2 -2
  87. package/package.json +5 -1
  88. package/dist/_chunks/notes-panel-BHMnLbEH.js +0 -1116
  89. package/dist/_chunks/rich-text-editor-BAcJq1PO.js +0 -4359
  90. package/dist/_chunks/task-editor-B9YpfwcW.js +0 -1095
@@ -1,49 +1,50 @@
1
- import { jsx as c, jsxs as b, Fragment as we } from "react/jsx-runtime";
2
- import { forwardRef as Ms, useId as Rt, useMemo as z, useState as R, useCallback as Me, useRef as v, useEffect as G, useImperativeHandle as Is } from "react";
3
- import { c as Hs } from "./index-D2ZczOXr.js";
4
- import { useTranslation as $s } from "react-i18next";
5
- import { A as Ie } from "./alert-C4WKViaS.js";
6
- import { B as qs } from "./badge-BUk4RjTS.js";
7
- import { B as Pe } from "./button-Dp4j9ygh.js";
8
- import { I as He } from "./icon-button-u9VMQn3x.js";
9
- import { B as Et } from "./button-group-CHQD8GJ0.js";
10
- import { P as Ws } from "./panel-header-CbtlTe85.js";
11
- import { S as Ot } from "./select-Bw5FvGJ7.js";
12
- import { S as Ks } from "./switch-DO6uC4HJ.js";
13
- import { S as Vs } from "./skeleton-tTWJpvAq.js";
14
- import { E as $e } from "./empty-state-5REM7oDM.js";
15
- import { T as Cs } from "./task-card-BNbkwIYM.js";
1
+ import { jsx as c, jsxs as w, Fragment as Te } from "react/jsx-runtime";
2
+ import { forwardRef as Is, useId as Dt, useMemo as z, useState as R, useCallback as Ie, useRef as m, useEffect as $, useImperativeHandle as Hs } from "react";
3
+ import { c as $s } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as qs } from "react-i18next";
5
+ import { isSaveOutcomeUnknownError as Bt } from "../save-outcome/index.js";
6
+ import { A as He } from "./alert-C4WKViaS.js";
7
+ import { B as Ws } from "./badge-BUk4RjTS.js";
8
+ import { B as Re } from "./button-Dp4j9ygh.js";
9
+ import { I as $e } from "./icon-button-u9VMQn3x.js";
10
+ import { B as Nt } from "./button-group-CHQD8GJ0.js";
11
+ import { P as Ks } from "./panel-header-CbtlTe85.js";
12
+ import { S as jt } from "./select-Bw5FvGJ7.js";
13
+ import { S as Vs } from "./switch-DO6uC4HJ.js";
14
+ import { S as Cs } from "./skeleton-tTWJpvAq.js";
15
+ import { E as qe } from "./empty-state-5REM7oDM.js";
16
+ import { T as Us } from "./task-card-BNbkwIYM.js";
16
17
  import { V as Gs } from "./visually-hidden-BHxEUGyT.js";
17
- import { u as Us } from "./use-check-animation--I3cS00X.js";
18
- import { a as Ys, u as Dt, R as At } from "./use-list-reflow-C7O4Uqnl.js";
19
- import { u as Fs } from "./use-resolved-theme-B0f1_oyq.js";
20
- import { u as qe } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
21
- import { u as Qs } from "./registry-DvAUVLHh.js";
22
- import { P as Xs } from "./plus-DzMQ_c6b.js";
23
- import { C as Js } from "./clipboard-check-BeAGxDVT.js";
24
- import { P as Zs } from "./pencil-B1sKKyuT.js";
25
- import { X as en } from "./x-B5YnXwCz.js";
26
- import { c as Ke } from "./createLucideIcon-DhHxpK9K.js";
27
- import { M as tn } from "./megaphone-CzeTT9B3.js";
18
+ import { u as Ys } from "./use-check-animation--I3cS00X.js";
19
+ import { a as Fs, u as At, R as Lt } from "./use-list-reflow-C7O4Uqnl.js";
20
+ import { u as Qs } from "./use-resolved-theme-B0f1_oyq.js";
21
+ import { u as We } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
22
+ import { u as Xs } from "./registry-DvAUVLHh.js";
23
+ import { P as Js } from "./plus-DzMQ_c6b.js";
24
+ import { C as Zs } from "./clipboard-check-BeAGxDVT.js";
25
+ import { P as en } from "./pencil-B1sKKyuT.js";
26
+ import { X as tn } from "./x-B5YnXwCz.js";
27
+ import { c as Ve } from "./createLucideIcon-DhHxpK9K.js";
28
+ import { M as sn } from "./megaphone-CzeTT9B3.js";
28
29
  /**
29
30
  * @license lucide-react v1.22.0 - ISC
30
31
  *
31
32
  * This source code is licensed under the ISC license.
32
33
  * See the LICENSE file in the root directory of this source tree.
33
34
  */
34
- const sn = [
35
+ const nn = [
35
36
  ["path", { d: "M13.744 17.736a6 6 0 1 1-7.48-7.48", key: "bq4yh3" }],
36
37
  ["path", { d: "M15 6h1v4", key: "11y1tn" }],
37
38
  ["path", { d: "m6.134 14.768.866-.5 2 3.464", key: "17snzx" }],
38
39
  ["circle", { cx: "16", cy: "8", r: "6", key: "14bfc9" }]
39
- ], nn = Ke("coins", sn);
40
+ ], rn = Ve("coins", nn);
40
41
  /**
41
42
  * @license lucide-react v1.22.0 - ISC
42
43
  *
43
44
  * This source code is licensed under the ISC license.
44
45
  * See the LICENSE file in the root directory of this source tree.
45
46
  */
46
- const rn = [
47
+ const on = [
47
48
  ["path", { d: "M10.5 3 8 9l4 13 4-13-2.5-6", key: "b3dvk1" }],
48
49
  [
49
50
  "path",
@@ -53,14 +54,14 @@ const rn = [
53
54
  }
54
55
  ],
55
56
  ["path", { d: "M2 9h20", key: "16fsjt" }]
56
- ], on = Ke("gem", rn);
57
+ ], an = Ve("gem", on);
57
58
  /**
58
59
  * @license lucide-react v1.22.0 - ISC
59
60
  *
60
61
  * This source code is licensed under the ISC license.
61
62
  * See the LICENSE file in the root directory of this source tree.
62
63
  */
63
- const an = [
64
+ const cn = [
64
65
  [
65
66
  "path",
66
67
  {
@@ -69,7 +70,7 @@ const an = [
69
70
  }
70
71
  ],
71
72
  ["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }]
72
- ], _t = Ke("tag", an), cn = {
73
+ ], Mt = Ve("tag", cn), dn = {
73
74
  id: "tasks-panel",
74
75
  // 'pick' backs select_item (non-persisting activation, matching
75
76
  // AppointmentTimeline); 'dismiss' backs dismiss; 'scroll' backs
@@ -209,39 +210,39 @@ const an = [
209
210
  description: "Stable task id emitted on each rendered TaskCard inside the panel."
210
211
  }
211
212
  }
212
- }, dn = 96, ln = {
213
+ }, ln = 96, un = {
213
214
  status: "todo",
214
215
  type: null,
215
216
  assignee: null,
216
217
  overdueOnly: !1
217
- }, Nt = /* @__PURE__ */ new Map(), jt = /* @__PURE__ */ new Set();
218
- function We(a) {
218
+ }, _t = /* @__PURE__ */ new Map(), zt = /* @__PURE__ */ new Set();
219
+ function Ke(a) {
219
220
  return a.map((o) => `${o.id}:${o.status ?? "open"}`).join("|");
220
221
  }
221
- function un(a, o) {
222
+ function fn(a, o) {
222
223
  return a.status === o.status && a.type === o.type && a.assignee === o.assignee && a.overdueOnly === o.overdueOnly;
223
224
  }
224
- function fn(a, o) {
225
+ function pn(a, o) {
225
226
  return a.status === o.status && (a.type || null) === (o.type || null) && (a.assignee || null) === (o.assignee || null) && a.overdueOnly === o.overdueOnly;
226
227
  }
227
- function xe(a) {
228
+ function Ee(a) {
228
229
  const o = Promise.reject(a);
229
230
  return o.catch(() => {
230
231
  }), o;
231
232
  }
232
- function pn(a) {
233
+ function mn(a) {
233
234
  try {
234
235
  return new Intl.NumberFormat(a);
235
236
  } catch {
236
237
  return new Intl.NumberFormat();
237
238
  }
238
239
  }
239
- function mn(a) {
240
+ function vn(a) {
240
241
  const o = Promise.resolve(a);
241
242
  return o.catch(() => {
242
243
  }), o;
243
244
  }
244
- const vn = Hs(
245
+ const hn = $s(
245
246
  [
246
247
  "ds:flex ds:flex-col ds:h-full ds:min-h-0",
247
248
  "ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]"
@@ -263,31 +264,39 @@ const vn = Hs(
263
264
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
264
265
  "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:[outline-offset:-2px]",
265
266
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
266
- ].join(" "), hn = [
267
+ ].join(" "), kn = [
267
268
  "ds:shadow-[var(--shadow-card)] ds:bg-[color:var(--card)]",
268
269
  // Declared at rest, not only while leaving: a transition added at the
269
270
  // same moment as the value it animates has nothing to move from.
270
271
  "ds:transition-opacity ds:duration-[var(--animation-duration)]",
271
272
  "ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
272
- ].join(" "), zt = "ds:opacity-0", yn = 12;
273
- function kn({
273
+ ].join(" "), It = "ds:opacity-0", yn = 12;
274
+ function bn({
274
275
  item: a,
275
276
  checked: o,
276
277
  pending: g,
277
- label: h,
278
- reduceMotion: k,
279
- onToggle: u
278
+ label: k,
279
+ reduceMotion: y,
280
+ releaseKey: u,
281
+ onToggle: h
280
282
  }) {
281
283
  const {
282
- checked: f,
283
- drawing: y,
284
+ checked: v,
285
+ drawing: B,
284
286
  toggle: E
285
- } = Us({
287
+ } = Ys({
286
288
  checked: o,
287
- reduceMotion: k
288
- }), D = v({ shown: f, checked: o, toggle: E });
289
- D.current = { shown: f, checked: o, toggle: E };
290
- const oe = f ? (
289
+ reduceMotion: y
290
+ }), q = m({ shown: v, checked: o, toggle: E });
291
+ q.current = { shown: v, checked: o, toggle: E };
292
+ const D = m(!1), Q = m(u);
293
+ $(() => {
294
+ if (Q.current === u || (Q.current = u, !D.current)) return;
295
+ D.current = !1;
296
+ const P = q.current;
297
+ P.shown !== P.checked && P.toggle();
298
+ }, [u]);
299
+ const N = v ? (
291
300
  // `--accent` is magenta-700 in light, the step that clears AA there.
292
301
  "ds:text-[color:var(--accent)]"
293
302
  ) : a.priority === "high" ? "ds:text-[color:var(--destructive)]" : "ds:text-[color:var(--muted-foreground)]";
@@ -296,17 +305,21 @@ function kn({
296
305
  {
297
306
  type: "button",
298
307
  role: "checkbox",
299
- "aria-checked": f,
300
- "aria-label": h,
308
+ "aria-checked": v,
309
+ "aria-label": k,
301
310
  "aria-disabled": g || void 0,
302
311
  "data-action": "toggle-done",
303
- "data-drawing": y ? "" : void 0,
312
+ "data-drawing": B ? "" : void 0,
304
313
  onClick: () => {
305
314
  if (g) return;
306
- const N = !f, U = u(a, N);
307
- U.started && (E(), U.result.catch(() => {
308
- const S = D.current;
309
- S.shown === N && S.checked !== N && S.toggle();
315
+ const P = !v, W = h(a, P);
316
+ W.started && (E(), W.result.catch((X) => {
317
+ if (Bt(X)) {
318
+ D.current = !0;
319
+ return;
320
+ }
321
+ const J = q.current;
322
+ J.shown === P && J.checked !== P && J.toggle();
310
323
  }));
311
324
  },
312
325
  className: [
@@ -317,9 +330,9 @@ function kn({
317
330
  "ds:[min-block-size:var(--accessible-target-floor,auto)] ds:[min-inline-size:var(--accessible-target-floor,auto)]",
318
331
  "ds:hover:bg-[color:var(--muted)]/40 ds:aria-disabled:cursor-progress",
319
332
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:forced-colors:focus-visible:outline-[CanvasText]",
320
- oe
333
+ N
321
334
  ].join(" "),
322
- children: /* @__PURE__ */ b(
335
+ children: /* @__PURE__ */ w(
323
336
  "svg",
324
337
  {
325
338
  viewBox: "0 0 18 18",
@@ -341,7 +354,7 @@ function kn({
341
354
  "path",
342
355
  {
343
356
  d: "M5 9.25 L7.75 12 L13 6.25",
344
- strokeDashoffset: f ? 0 : yn,
357
+ strokeDashoffset: v ? 0 : yn,
345
358
  className: "ds:fill-none ds:stroke-current ds:[stroke-width:2] ds:[stroke-linecap:round] ds:[stroke-linejoin:round] ds:[stroke-dasharray:12] ds:transition-[stroke-dashoffset] ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
346
359
  }
347
360
  )
@@ -351,12 +364,12 @@ function kn({
351
364
  }
352
365
  );
353
366
  }
354
- const bn = {
355
- recall: { variant: "info", Icon: tn },
356
- payment: { variant: "warning", Icon: on },
357
- collection: { variant: "error", Icon: nn },
358
- other: { variant: "neutral", Icon: _t }
359
- }, wn = [
367
+ const wn = {
368
+ recall: { variant: "info", Icon: sn },
369
+ payment: { variant: "warning", Icon: an },
370
+ collection: { variant: "error", Icon: rn },
371
+ other: { variant: "neutral", Icon: Mt }
372
+ }, Pn = [
360
373
  "overdue",
361
374
  "today",
362
375
  "tomorrow",
@@ -364,328 +377,328 @@ const bn = {
364
377
  "later",
365
378
  "done"
366
379
  ];
367
- function Pn(a) {
380
+ function xn(a) {
368
381
  return new Date(a.getFullYear(), a.getMonth(), a.getDate());
369
382
  }
370
- function Bt(a) {
371
- const o = Pn(a), g = new Date(o);
383
+ function Ht(a) {
384
+ const o = xn(a), g = new Date(o);
372
385
  g.setDate(o.getDate() + 1);
373
- const h = new Date(o);
374
- h.setDate(o.getDate() + 2);
375
- const k = (o.getDay() + 6) % 7, u = new Date(o);
376
- return u.setDate(o.getDate() + (7 - k)), {
386
+ const k = new Date(o);
387
+ k.setDate(o.getDate() + 2);
388
+ const y = (o.getDay() + 6) % 7, u = new Date(o);
389
+ return u.setDate(o.getDate() + (7 - y)), {
377
390
  startOfToday: +o,
378
391
  startOfTomorrow: +g,
379
- startOfDayAfter: +h,
392
+ startOfDayAfter: +k,
380
393
  startOfNextWeek: +u
381
394
  };
382
395
  }
383
- function xn(a, o, g) {
396
+ function Sn(a, o, g) {
384
397
  if (o) return "done";
385
- const { startOfToday: h, startOfTomorrow: k, startOfDayAfter: u, startOfNextWeek: f } = Bt(g), y = +new Date(a.dueIso);
386
- return y < h ? "overdue" : y < k ? "today" : y < u ? "tomorrow" : y < f ? "thisWeek" : "later";
398
+ const { startOfToday: k, startOfTomorrow: y, startOfDayAfter: u, startOfNextWeek: h } = Ht(g), v = +new Date(a.dueIso);
399
+ return v < k ? "overdue" : v < y ? "today" : v < u ? "tomorrow" : v < h ? "thisWeek" : "later";
387
400
  }
388
- function Sn(a, o) {
389
- return a.status === "done" ? !1 : +new Date(a.dueIso) < Bt(o).startOfTomorrow;
401
+ function Tn(a, o) {
402
+ return a.status === "done" ? !1 : +new Date(a.dueIso) < Ht(o).startOfTomorrow;
390
403
  }
391
- function Tn(a, o, g) {
392
- const h = /* @__PURE__ */ new Map();
404
+ function Rn(a, o, g) {
405
+ const k = /* @__PURE__ */ new Map();
393
406
  for (const u of a) {
394
- const f = xn(u, g(u), o), y = h.get(f);
395
- y ? y.push(u) : h.set(f, [u]);
407
+ const h = Sn(u, g(u), o), v = k.get(h);
408
+ v ? v.push(u) : k.set(h, [u]);
396
409
  }
397
- const k = [];
398
- for (const u of wn) {
399
- const f = h.get(u);
400
- !f || f.length === 0 || (f.sort((y, E) => +new Date(y.dueIso) - +new Date(E.dueIso)), k.push({ key: u, items: f }));
410
+ const y = [];
411
+ for (const u of Pn) {
412
+ const h = k.get(u);
413
+ !h || h.length === 0 || (h.sort((v, B) => +new Date(v.dueIso) - +new Date(B.dueIso)), y.push({ key: u, items: h }));
401
414
  }
402
- return k;
415
+ return y;
403
416
  }
404
- const Rn = Ms(
417
+ const En = Is(
405
418
  ({
406
419
  id: a,
407
420
  items: o,
408
421
  nowIso: g,
409
- title: h,
410
- icon: k,
422
+ title: k,
423
+ icon: y,
411
424
  totalCount: u,
412
- size: f = "sm",
413
- filtering: y = "client",
414
- onOpenTask: E,
415
- onToggleDone: D,
416
- onEditTask: oe,
417
- onDismissTask: N,
418
- onAddTask: U,
419
- readOnly: S = !1,
420
- renderItemActions: Se,
421
- renderItemExtraActions: Te,
422
- scope: Re,
423
- defaultScope: Lt,
424
- onScopeChange: ae,
425
- availableScopes: B,
426
- onLoadMore: H,
427
- hasMore: Ee,
428
- loadingMore: Y = !1,
429
- loading: w = !1,
430
- error: P = !1,
431
- onRetry: ie,
432
- showFilters: Mt = !0,
433
- defaultFilters: It,
434
- onFiltersChange: L,
435
- statusFilter: Ve,
436
- defaultStatusFilter: Ht,
437
- onStatusFilterChange: ce,
438
- typeOptions: de,
439
- typeFilter: Oe,
440
- onTypeFilterChange: le,
441
- assigneeOptions: ue,
442
- assigneeFilter: De,
443
- onAssigneeFilterChange: fe,
444
- overdueOnly: Ce,
445
- defaultOverdueOnly: $t,
446
- onOverdueOnlyChange: pe,
447
- emptyTitle: qt,
448
- emptyDescription: Wt,
449
- emptyAction: Kt,
450
- className: Vt,
425
+ size: h = "sm",
426
+ filtering: v = "client",
427
+ onOpenTask: B,
428
+ onToggleDone: E,
429
+ onEditTask: q,
430
+ onDismissTask: D,
431
+ onAddTask: Q,
432
+ readOnly: N = !1,
433
+ renderItemActions: P,
434
+ renderItemExtraActions: W,
435
+ scope: X,
436
+ defaultScope: J,
437
+ onScopeChange: le,
438
+ availableScopes: L,
439
+ onLoadMore: K,
440
+ hasMore: Oe,
441
+ loadingMore: Z = !1,
442
+ loading: b = !1,
443
+ error: x = !1,
444
+ onRetry: ue,
445
+ showFilters: $t = !0,
446
+ defaultFilters: qt,
447
+ onFiltersChange: M,
448
+ statusFilter: Ce,
449
+ defaultStatusFilter: Wt,
450
+ onStatusFilterChange: fe,
451
+ typeOptions: pe,
452
+ typeFilter: De,
453
+ onTypeFilterChange: me,
454
+ assigneeOptions: ve,
455
+ assigneeFilter: Ne,
456
+ onAssigneeFilterChange: he,
457
+ overdueOnly: Ue,
458
+ defaultOverdueOnly: Kt,
459
+ onOverdueOnlyChange: ge,
460
+ emptyTitle: Vt,
461
+ emptyDescription: Ct,
462
+ emptyAction: Ut,
463
+ className: Gt,
451
464
  "aria-label": Ge,
452
- ...Ct
453
- }, Gt) => {
454
- const { t: d, i18n: Ue } = $s("ui"), Ye = Rt(), Ut = Rt(), Ne = h ?? d("tasksPanel.title"), p = y === "server", $ = {
455
- status: !p || !!L || !!ce,
456
- type: !p || !!L || !!le,
457
- assignee: !p || !!L || !!fe,
458
- overdueOnly: !p || !!L || !!pe
459
- }, Yt = {
465
+ ...Yt
466
+ }, Ft) => {
467
+ const { t: d, i18n: Ye } = qs("ui"), Fe = Dt(), Qt = Dt(), je = k ?? d("tasksPanel.title"), f = v === "server", V = {
468
+ status: !f || !!M || !!fe,
469
+ type: !f || !!M || !!me,
470
+ assignee: !f || !!M || !!he,
471
+ overdueOnly: !f || !!M || !!ge
472
+ }, Xt = {
460
473
  todo: d("tasksPanel.status.todo"),
461
474
  done: d("tasksPanel.status.done"),
462
475
  all: d("tasksPanel.status.all")
463
- }, Ft = {
476
+ }, Jt = {
464
477
  patient: d("tasksPanel.scope.patient"),
465
478
  mine: d("tasksPanel.scope.mine")
466
- }, Qt = {
479
+ }, Zt = {
467
480
  overdue: d("tasksPanel.buckets.overdue"),
468
481
  today: d("tasksPanel.buckets.today"),
469
482
  tomorrow: d("tasksPanel.buckets.tomorrow"),
470
483
  thisWeek: d("tasksPanel.buckets.thisWeek"),
471
484
  later: d("tasksPanel.buckets.later"),
472
485
  done: d("tasksPanel.buckets.done")
473
- }, Xt = {
486
+ }, es = {
474
487
  recall: d("tasksPanel.types.recall"),
475
488
  payment: d("tasksPanel.types.payment"),
476
489
  collection: d("tasksPanel.types.collection"),
477
490
  other: d("tasksPanel.types.other")
478
- }, me = z(
491
+ }, ke = z(
479
492
  () => g ? new Date(g) : /* @__PURE__ */ new Date(),
480
493
  [g]
481
- ), Fe = z(
482
- () => pn(Ue.language),
483
- [Ue.language]
484
- ), Qe = (e) => d("tasksPanel.bracketedCount", { value: Fe.format(e) }), [Jt, Zt] = R(
485
- Lt ?? (B == null ? void 0 : B[0]) ?? "patient"
486
- ), es = Re ?? Jt, Xe = Me(
494
+ ), Qe = z(
495
+ () => mn(Ye.language),
496
+ [Ye.language]
497
+ ), Xe = (e) => d("tasksPanel.bracketedCount", { value: Qe.format(e) }), [ts, ss] = R(
498
+ J ?? (L == null ? void 0 : L[0]) ?? "patient"
499
+ ), ns = X ?? ts, Je = Ie(
487
500
  (e) => {
488
- Re === void 0 && Zt(e), ae == null || ae(e);
501
+ X === void 0 && ss(e), le == null || le(e);
489
502
  },
490
- [Re, ae]
491
- ), j = It ?? ln, [ts, ss] = R(
492
- Ht ?? j.status
493
- ), [ns, rs] = R(j.type), [os, as] = R(
503
+ [X, le]
504
+ ), j = qt ?? un, [rs, os] = R(
505
+ Wt ?? j.status
506
+ ), [as, is] = R(j.type), [cs, ds] = R(
494
507
  j.assignee
495
- ), [is, cs] = R(
496
- $t ?? j.overdueOnly
497
- ), O = Ve ?? ts, M = Oe !== void 0 ? Oe : ns, I = De !== void 0 ? De : os, q = Ce ?? is, Je = p ? q && O !== "done" : q, ve = v({
508
+ ), [ls, us] = R(
509
+ Kt ?? j.overdueOnly
510
+ ), O = Ce ?? rs, I = De !== void 0 ? De : as, H = Ne !== void 0 ? Ne : cs, C = Ue ?? ls, Ze = f ? C && O !== "done" : C, ye = m({
498
511
  status: O,
499
- type: M,
500
- assignee: I,
501
- overdueOnly: q
512
+ type: I,
513
+ assignee: H,
514
+ overdueOnly: C
502
515
  });
503
- ve.current = {
516
+ ye.current = {
504
517
  status: O,
505
- type: M,
506
- assignee: I,
507
- overdueOnly: q
518
+ type: I,
519
+ assignee: H,
520
+ overdueOnly: C
508
521
  };
509
- const W = (e) => {
522
+ const U = (e) => {
510
523
  const t = Object.fromEntries(
511
524
  Object.entries(e).filter(
512
- ([l]) => $[l]
525
+ ([l]) => V[l]
513
526
  )
514
527
  );
515
528
  if (Object.keys(e).length > 0 && Object.keys(t).length === 0)
516
529
  return;
517
- const s = ve.current, r = p && s.status === "done" && s.overdueOnly ? { ...s, overdueOnly: !1 } : s, n = { ...r, ...t }, i = new Set(Object.keys(t));
518
- r !== s && i.add("overdueOnly"), p && n.status === "done" && n.overdueOnly && (t.status !== void 0 ? (n.overdueOnly = !1, i.add("overdueOnly")) : (n.status = j.status === "done" ? "todo" : j.status, i.add("status"))), ve.current = n, Ve === void 0 && ss(n.status), Oe === void 0 && rs(n.type), De === void 0 && as(n.assignee), Ce === void 0 && cs(n.overdueOnly), i.has("status") && (ce == null || ce(n.status)), i.has("type") && (le == null || le(n.type)), i.has("assignee") && (fe == null || fe(n.assignee)), i.has("overdueOnly") && (pe == null || pe(n.overdueOnly)), un(s, n) || L == null || L(n);
519
- }, ds = () => W({ ...j }), [F, ls] = R(Nt), T = v(Nt), [Ze, us] = R(jt), Q = v(jt), X = v(!0), je = v(/* @__PURE__ */ new Set());
520
- G(() => {
521
- X.current = !0;
522
- const e = je.current;
530
+ const s = ye.current, r = f && s.status === "done" && s.overdueOnly ? { ...s, overdueOnly: !1 } : s, n = { ...r, ...t }, i = new Set(Object.keys(t));
531
+ r !== s && i.add("overdueOnly"), f && n.status === "done" && n.overdueOnly && (t.status !== void 0 ? (n.overdueOnly = !1, i.add("overdueOnly")) : (n.status = j.status === "done" ? "todo" : j.status, i.add("status"))), ye.current = n, Ce === void 0 && os(n.status), De === void 0 && is(n.type), Ne === void 0 && ds(n.assignee), Ue === void 0 && us(n.overdueOnly), i.has("status") && (fe == null || fe(n.status)), i.has("type") && (me == null || me(n.type)), i.has("assignee") && (he == null || he(n.assignee)), i.has("overdueOnly") && (ge == null || ge(n.overdueOnly)), fn(s, n) || M == null || M(n);
532
+ }, fs = () => U({ ...j }), [ee, ps] = R(_t), T = m(_t), [et, ms] = R(zt), te = m(zt), se = m(!0), Ae = m(/* @__PURE__ */ new Set());
533
+ $(() => {
534
+ se.current = !0;
535
+ const e = Ae.current;
523
536
  return () => {
524
- X.current = !1, e.forEach(
537
+ se.current = !1, e.forEach(
525
538
  (t) => t(new Error("TasksPanel: closed before the host was told."))
526
539
  ), e.clear();
527
540
  };
528
541
  }, []);
529
542
  const A = (e) => {
530
543
  const t = new Map(T.current);
531
- e(t), T.current = t, ls(t);
532
- }, Ae = (e) => {
533
- const t = new Set(Q.current);
534
- e(t), Q.current = t, us(t);
535
- }, K = z(() => p ? o.filter((e) => !Ze.has(e.id)) : o.filter((e) => {
544
+ e(t), T.current = t, ps(t);
545
+ }, _e = (e) => {
546
+ const t = new Set(te.current);
547
+ e(t), te.current = t, ms(t);
548
+ }, G = z(() => f ? o.filter((e) => !et.has(e.id)) : o.filter((e) => {
536
549
  const t = e.status === "done";
537
- return !(O === "todo" && t || O === "done" && !t || M && e.type !== M || I && (e.assignee ?? "") !== I || q && !Sn(e, me));
550
+ return !(O === "todo" && t || O === "done" && !t || I && e.type !== I || H && (e.assignee ?? "") !== H || C && !Tn(e, ke));
538
551
  }), [
539
- p,
540
- Ze,
552
+ f,
553
+ et,
541
554
  o,
542
555
  O,
543
- M,
544
556
  I,
545
- q,
546
- me
547
- ]), ge = z(() => Tn(K, me, (t) => {
548
- if (p) {
549
- const s = F.get(t.id);
557
+ H,
558
+ C,
559
+ ke
560
+ ]), be = z(() => Rn(G, ke, (t) => {
561
+ if (f) {
562
+ const s = ee.get(t.id);
550
563
  if ((s == null ? void 0 : s.kind) === "done" && s.next !== void 0 && !s.leaves)
551
564
  return s.next;
552
565
  }
553
566
  return t.status === "done";
554
- }), [K, me, p, F]), _e = z(
555
- () => ge.flatMap((e) => e.items.map((t) => t.id)),
556
- [ge]
557
- ), J = v(null), et = v(null), [fs, ps] = R(!1), [ms, vs] = R(!1), Z = Me(() => {
558
- const e = J.current;
567
+ }), [G, ke, f, ee]), ze = z(
568
+ () => be.flatMap((e) => e.items.map((t) => t.id)),
569
+ [be]
570
+ ), ne = m(null), tt = m(null), [vs, hs] = R(!1), [gs, ks] = R(!1), re = Ie(() => {
571
+ const e = ne.current;
559
572
  if (!e) return;
560
573
  const { scrollTop: t, scrollHeight: s, clientHeight: r } = e;
561
- ps(t > 1), vs(t + r < s - 1);
574
+ hs(t > 1), ks(t + r < s - 1);
562
575
  }, []);
563
- qe(() => {
564
- Z();
565
- }, [ge, Z]), qe(() => {
566
- const e = J.current;
576
+ We(() => {
577
+ re();
578
+ }, [be, re]), We(() => {
579
+ const e = ne.current;
567
580
  if (!e || typeof ResizeObserver > "u") return;
568
- const t = new ResizeObserver(Z);
581
+ const t = new ResizeObserver(re);
569
582
  return t.observe(e), () => t.disconnect();
570
- }, [Z]);
571
- const tt = p ? Ee === !0 : Ee ?? !!H, _ = v(o);
583
+ }, [re]);
584
+ const st = f ? Oe === !0 : Oe ?? !!K, _ = m(o);
572
585
  _.current = o;
573
- const gs = z(() => We(o), [o]), he = z(
586
+ const nt = z(() => Ke(o), [o]), we = z(
574
587
  () => o.map((e) => e.id).join("|"),
575
588
  [o]
576
- ), st = v(he);
577
- st.current = he;
578
- const ee = v(0), nt = v(w);
579
- G(() => {
580
- nt.current && !w && !P && (ee.current += 1), nt.current = w;
581
- }, [w, P]);
582
- const ye = v(!0), rt = v(""), ot = v(0), ze = () => {
583
- ye.current = !1, rt.current = st.current, ot.current = ee.current, H == null || H();
589
+ ), rt = m(we);
590
+ rt.current = we;
591
+ const oe = m(0), ot = m(b);
592
+ $(() => {
593
+ ot.current && !b && !x && (oe.current += 1), ot.current = b;
594
+ }, [b, x]);
595
+ const Pe = m(!0), at = m(""), it = m(0), Be = () => {
596
+ Pe.current = !1, at.current = rt.current, it.current = oe.current, K == null || K();
584
597
  };
585
- G(() => {
586
- ye.current || (he !== rt.current || ee.current > ot.current) && (ye.current = !0);
587
- }, [he, w, P]);
588
- const hs = () => {
589
- Z();
590
- const e = J.current;
598
+ $(() => {
599
+ Pe.current || (we !== at.current || oe.current > it.current) && (Pe.current = !0);
600
+ }, [we, b, x]);
601
+ const ys = () => {
602
+ re();
603
+ const e = ne.current;
591
604
  if (!e) return;
592
605
  const { scrollTop: t, scrollHeight: s, clientHeight: r } = e;
593
- H && tt && !w && !Y && ye.current && s - t - r <= dn && ze();
594
- }, te = v(null), { isAccessible: ys } = Fs(te), ke = ys || void 0, { containerRef: ks } = Ys({
595
- key: _e.join(),
596
- reduceMotion: ke
597
- }), se = Dt({ delayMs: 200, reduceMotion: ke }), ne = Dt({ reduceMotion: ke }), Be = (e) => se.isLeaving(e) || ne.isLeaving(e), bs = (e) => {
598
- const { status: t, overdueOnly: s } = ve.current;
599
- return t === "todo" && e || t === "done" && !e || (p ? s && t !== "done" : s) && e;
600
- }, at = (e) => {
601
- T.current.has(e) && A((t) => t.delete(e)), Q.current.has(e) && Ae((t) => t.delete(e)), se.cancel(e), ne.cancel(e);
602
- }, it = () => {
603
- const e = _.current, t = We(e), s = new Map(e.map((i) => [i.id, i])), r = [], n = [];
606
+ K && st && !b && !Z && Pe.current && s - t - r <= ln && Be();
607
+ }, ae = m(null), { isAccessible: bs } = Qs(ae), xe = bs || void 0, { containerRef: ws } = Fs({
608
+ key: ze.join(),
609
+ reduceMotion: xe
610
+ }), ie = At({ delayMs: 200, reduceMotion: xe }), ce = At({ reduceMotion: xe }), Le = (e) => ie.isLeaving(e) || ce.isLeaving(e), Ps = (e) => {
611
+ const { status: t, overdueOnly: s } = ye.current;
612
+ return t === "todo" && e || t === "done" && !e || (f ? s && t !== "done" : s) && e;
613
+ }, ct = (e) => {
614
+ T.current.has(e) && A((t) => t.delete(e)), te.current.has(e) && _e((t) => t.delete(e)), ie.cancel(e), ce.cancel(e);
615
+ }, dt = () => {
616
+ const e = _.current, t = Ke(e), s = new Map(e.map((i) => [i.id, i])), r = [], n = [];
604
617
  T.current.forEach((i, l) => {
605
- const m = s.get(l);
606
- if (!m) {
618
+ const p = s.get(l);
619
+ if (!p) {
607
620
  r.push(l);
608
621
  return;
609
622
  }
610
623
  if (!i.settled) return;
611
- const Bs = i.kind === "done" && m.status === "done" === i.next, Ls = ee.current > i.edgeAtSettle || t !== i.sigAtSettle;
612
- (Bs || Ls) && (r.push(l), n.push(l));
613
- }), r.length !== 0 && (A((i) => r.forEach((l) => i.delete(l))), r.some((i) => Q.current.has(i)) && Ae((i) => r.forEach((l) => i.delete(l))), n.forEach((i) => {
614
- se.cancel(i), ne.cancel(i);
624
+ const Ls = i.kind === "done" && p.status === "done" === i.next, Ms = oe.current > i.edgeAtSettle || t !== i.sigAtSettle;
625
+ (Ls || Ms) && (r.push(l), n.push(l));
626
+ }), r.length !== 0 && (A((i) => r.forEach((l) => i.delete(l))), r.some((i) => te.current.has(i)) && _e((i) => r.forEach((l) => i.delete(l))), n.forEach((i) => {
627
+ ie.cancel(i), ce.cancel(i);
615
628
  }));
616
- }, ws = (e) => {
629
+ }, lt = (e) => {
617
630
  const t = T.current.get(e);
618
631
  t && (A(
619
632
  (s) => s.set(e, {
620
633
  ...t,
621
634
  settled: !0,
622
- edgeAtSettle: ee.current,
623
- sigAtSettle: We(_.current)
635
+ edgeAtSettle: oe.current,
636
+ sigAtSettle: Ke(_.current)
624
637
  })
625
- ), it());
638
+ ), dt());
626
639
  };
627
- G(() => {
628
- p && it();
629
- }, [p, gs, w, P]);
630
- const ct = (e, t, s, r) => {
640
+ $(() => {
641
+ f && dt();
642
+ }, [f, nt, b, x]);
643
+ const ut = (e, t, s, r) => {
631
644
  const n = e.id;
632
- A((m) => m.set(n, t));
645
+ A((p) => p.set(n, t));
633
646
  let i;
634
647
  try {
635
648
  i = s();
636
- } catch (m) {
637
- return at(n), { started: !1, result: xe(m) };
649
+ } catch (p) {
650
+ return ct(n), { started: !1, result: Ee(p) };
638
651
  }
639
652
  t.leaves && r.leave(n, () => {
640
- T.current.has(n) && Ae((m) => m.add(n));
653
+ T.current.has(n) && _e((p) => p.add(n));
641
654
  });
642
655
  const l = Promise.resolve(i);
643
656
  return l.then(
644
657
  () => {
645
- X.current && ws(n);
658
+ se.current && lt(n);
646
659
  },
647
- () => {
648
- X.current && at(n);
660
+ (p) => {
661
+ se.current && (Bt(p) && t.kind === "done" && !t.leaves ? lt(n) : ct(n));
649
662
  }
650
663
  ), { started: !0, result: l };
651
- }, V = (e) => ({
664
+ }, Y = (e) => ({
652
665
  started: !1,
653
- result: xe(new Error(`TasksPanel: ${e}`))
654
- }), re = (e) => {
655
- X.current && T.current.has(e) && A((t) => t.delete(e));
656
- }, dt = (e, t, s) => {
666
+ result: Ee(new Error(`TasksPanel: ${e}`))
667
+ }), de = (e) => {
668
+ se.current && T.current.has(e) && A((t) => t.delete(e));
669
+ }, ft = (e, t, s) => {
657
670
  let r, n;
658
- const i = new Promise((l, m) => {
659
- r = l, n = m;
671
+ const i = new Promise((l, p) => {
672
+ r = l, n = p;
660
673
  });
661
674
  return i.catch(() => {
662
- }), je.current.add(n), t.leave(e, () => {
663
- je.current.delete(n);
675
+ }), Ae.current.add(n), t.leave(e, () => {
676
+ Ae.current.delete(n);
664
677
  let l;
665
678
  try {
666
679
  l = s();
667
- } catch (m) {
668
- re(e), n(m);
680
+ } catch (p) {
681
+ de(e), n(p);
669
682
  return;
670
683
  }
671
684
  Promise.resolve(l).then(
672
685
  () => {
673
- re(e), r();
686
+ de(e), r();
674
687
  },
675
- (m) => {
676
- re(e), n(m);
688
+ (p) => {
689
+ de(e), n(p);
677
690
  }
678
691
  );
679
692
  }), i;
680
- }, lt = (e, t) => {
681
- if (S) return V("the panel is read-only.");
682
- if (!D) return V("the host gave no onToggleDone.");
693
+ }, pt = (e, t) => {
694
+ if (N) return Y("the panel is read-only.");
695
+ if (!E) return Y("the host gave no onToggleDone.");
683
696
  const s = e.id;
684
697
  if (T.current.has(s))
685
- return V("a change to this task is already pending.");
686
- const r = t ?? e.status !== "done", n = bs(r);
687
- if (p)
688
- return ct(
698
+ return Y("a change to this task is already pending.");
699
+ const r = t ?? e.status !== "done", n = Ps(r);
700
+ if (f)
701
+ return ut(
689
702
  e,
690
703
  {
691
704
  kind: "done",
@@ -695,15 +708,15 @@ const Rn = Ms(
695
708
  edgeAtSettle: 0,
696
709
  sigAtSettle: ""
697
710
  },
698
- () => D(e, r),
699
- se
711
+ () => E(e, r),
712
+ ie
700
713
  );
701
714
  if (!n) {
702
715
  let i;
703
716
  try {
704
- i = D(e, r);
717
+ i = E(e, r);
705
718
  } catch (l) {
706
- return { started: !1, result: xe(l) };
719
+ return { started: !1, result: Ee(l) };
707
720
  }
708
721
  return i instanceof Promise && (A(
709
722
  (l) => l.set(s, {
@@ -714,9 +727,9 @@ const Rn = Ms(
714
727
  sigAtSettle: ""
715
728
  })
716
729
  ), i.then(
717
- () => re(s),
718
- () => re(s)
719
- )), { started: !0, result: mn(i) };
730
+ () => de(s),
731
+ () => de(s)
732
+ )), { started: !0, result: vn(i) };
720
733
  }
721
734
  return A(
722
735
  (i) => i.set(s, {
@@ -729,14 +742,14 @@ const Rn = Ms(
729
742
  })
730
743
  ), {
731
744
  started: !0,
732
- result: dt(s, se, () => D(e, r))
745
+ result: ft(s, ie, () => E(e, r))
733
746
  };
734
- }, ut = (e) => {
735
- if (S) return V("the panel is read-only.");
736
- if (!N) return V("the host gave no onDismissTask.");
747
+ }, mt = (e) => {
748
+ if (N) return Y("the panel is read-only.");
749
+ if (!D) return Y("the host gave no onDismissTask.");
737
750
  const t = e.id;
738
751
  if (T.current.has(t))
739
- return V("a change to this task is already pending.");
752
+ return Y("a change to this task is already pending.");
740
753
  const s = {
741
754
  kind: "dismiss",
742
755
  leaves: !0,
@@ -744,17 +757,17 @@ const Rn = Ms(
744
757
  edgeAtSettle: 0,
745
758
  sigAtSettle: ""
746
759
  };
747
- return p ? ct(
760
+ return f ? ut(
748
761
  e,
749
762
  s,
750
- () => N(e),
751
- ne
763
+ () => D(e),
764
+ ce
752
765
  ) : (A((r) => r.set(t, s)), {
753
766
  started: !0,
754
- result: dt(t, ne, () => N(e))
767
+ result: ft(t, ce, () => D(e))
755
768
  });
756
- }, ft = Me(() => {
757
- const e = J.current, t = et.current;
769
+ }, vt = Ie(() => {
770
+ const e = ne.current, t = tt.current;
758
771
  if (!e || !t) {
759
772
  e == null || e.scrollTo({ top: 0 });
760
773
  return;
@@ -762,68 +775,68 @@ const Rn = Ms(
762
775
  const s = t.getBoundingClientRect().top - e.getBoundingClientRect().top;
763
776
  e.scrollTo({ top: e.scrollTop + s });
764
777
  }, []);
765
- Is(Gt, () => te.current, []);
766
- const C = v(null), be = v(_e);
767
- be.current = _e, G(() => {
768
- const e = te.current;
778
+ Hs(Ft, () => ae.current, []);
779
+ const F = m(null), Se = m(ze);
780
+ Se.current = ze, $(() => {
781
+ const e = ae.current;
769
782
  if (!e) return;
770
783
  const t = (r) => {
771
- var l, m;
784
+ var l, p;
772
785
  const n = r.target;
773
786
  if (!(n instanceof HTMLElement)) return;
774
787
  const i = ((l = n.closest("[data-task-id]")) == null ? void 0 : l.dataset.taskId) ?? null;
775
- C.current = {
788
+ F.current = {
776
789
  el: n,
777
790
  rowId: i,
778
- action: ((m = n.closest("[data-action]")) == null ? void 0 : m.dataset.action) ?? null,
779
- index: i ? be.current.indexOf(i) : -1
791
+ action: ((p = n.closest("[data-action]")) == null ? void 0 : p.dataset.action) ?? null,
792
+ index: i ? Se.current.indexOf(i) : -1
780
793
  };
781
794
  }, s = (r) => {
782
795
  const n = r.relatedTarget;
783
796
  if (n instanceof Node) {
784
- e.contains(n) || (C.current = null);
797
+ e.contains(n) || (F.current = null);
785
798
  return;
786
799
  }
787
800
  const i = r.target;
788
801
  queueMicrotask(() => {
789
- const l = C.current;
790
- l && l.el === i && l.el.isConnected && document.activeElement !== l.el && (C.current = null);
802
+ const l = F.current;
803
+ l && l.el === i && l.el.isConnected && document.activeElement !== l.el && (F.current = null);
791
804
  });
792
805
  };
793
806
  return e.addEventListener("focusin", t), e.addEventListener("focusout", s), () => {
794
807
  e.removeEventListener("focusin", t), e.removeEventListener("focusout", s);
795
808
  };
796
- }, []), qe(() => {
797
- const e = C.current, t = te.current;
809
+ }, []), We(() => {
810
+ const e = F.current, t = ae.current;
798
811
  if (!e || !t) return;
799
812
  if (e.el.isConnected) {
800
- e.rowId && (e.index = be.current.indexOf(e.rowId));
813
+ e.rowId && (e.index = Se.current.indexOf(e.rowId));
801
814
  return;
802
815
  }
803
- C.current = null;
816
+ F.current = null;
804
817
  const s = document.activeElement;
805
818
  if (s && s !== document.body) return;
806
- const r = be.current, n = (m) => m && e.action ? t.querySelector(
807
- `[data-task-id="${CSS.escape(m)}"] [data-action="${CSS.escape(e.action)}"]`
819
+ const r = Se.current, n = (p) => p && e.action ? t.querySelector(
820
+ `[data-task-id="${CSS.escape(p)}"] [data-action="${CSS.escape(e.action)}"]`
808
821
  ) : null, l = (e.rowId ? n(e.rowId) : null) ?? (e.rowId && e.index >= 0 ? n(r[e.index]) ?? n(r[e.index - 1]) : null) ?? t.querySelector("[data-tasks-panel-region]") ?? t.querySelector(
809
822
  '[data-status-filter][aria-pressed="true"]'
810
823
  );
811
824
  l == null || l.focus();
812
825
  });
813
- const pt = v(null);
814
- pt.current = {
815
- toggleDone: (e) => lt(e),
816
- dismiss: (e) => ut(e),
817
- onOpenTask: E,
818
- loadMore: ze,
819
- changeScope: Xe,
820
- commitFilters: W,
821
- serverMode: p
826
+ const ht = m(null);
827
+ ht.current = {
828
+ toggleDone: (e) => pt(e),
829
+ dismiss: (e) => mt(e),
830
+ onOpenTask: B,
831
+ loadMore: Be,
832
+ changeScope: Je,
833
+ commitFilters: U,
834
+ serverMode: f
822
835
  };
823
- const Ps = z(() => {
824
- const e = () => pt.current, t = (s) => xe(new Error(`TasksPanel: no task "${s}".`));
836
+ const xs = z(() => {
837
+ const e = () => ht.current, t = (s) => Ee(new Error(`TasksPanel: no task "${s}".`));
825
838
  return {
826
- getItems: () => e().serverMode ? _.current.filter((s) => !Q.current.has(s.id)).map((s) => {
839
+ getItems: () => e().serverMode ? _.current.filter((s) => !te.current.has(s.id)).map((s) => {
827
840
  const r = T.current.get(s.id), n = (r == null ? void 0 : r.kind) === "done" && r.next !== void 0 ? r.next ? "done" : "open" : s.status ?? "open";
828
841
  return { id: s.id, status: n };
829
842
  }) : _.current.map((s) => ({
@@ -843,7 +856,7 @@ const Rn = Ms(
843
856
  const r = _.current.find((n) => n.id === s);
844
857
  return r ? e().dismiss(r).result : t(s);
845
858
  },
846
- jumpToOverdue: ft,
859
+ jumpToOverdue: vt,
847
860
  setFilter: (s) => {
848
861
  const r = {};
849
862
  s.status !== void 0 && (r.status = s.status), s.type !== void 0 && (r.type = s.type), s.assignee !== void 0 && (r.assignee = s.assignee), s.overdueOnly !== void 0 && (r.overdueOnly = s.overdueOnly), e().commitFilters(r);
@@ -851,13 +864,13 @@ const Rn = Ms(
851
864
  changeScope: (s) => e().changeScope(s),
852
865
  loadMore: () => e().loadMore()
853
866
  };
854
- }, [ft]);
855
- Qs(cn, Ps, a);
856
- const xs = (e) => {
867
+ }, [vt]);
868
+ Xs(dn, xs, a);
869
+ const Ss = (e) => {
857
870
  if (!e.type) return null;
858
- const t = bn[e.type], s = (t == null ? void 0 : t.variant) ?? "neutral", r = (t == null ? void 0 : t.Icon) ?? _t, n = e.typeLabel || Xt[e.type] || d("tasksPanel.types.other");
871
+ const t = wn[e.type], s = (t == null ? void 0 : t.variant) ?? "neutral", r = (t == null ? void 0 : t.Icon) ?? Mt, n = e.typeLabel || es[e.type] || d("tasksPanel.types.other");
859
872
  return /* @__PURE__ */ c(
860
- qs,
873
+ Ws,
861
874
  {
862
875
  variant: s,
863
876
  size: "sm",
@@ -865,141 +878,142 @@ const Rn = Ms(
865
878
  children: n
866
879
  }
867
880
  );
868
- }, Ss = (e) => S ? null : /* @__PURE__ */ b(we, { children: [
869
- oe ? /* @__PURE__ */ c(
870
- He,
881
+ }, Ts = (e) => N ? null : /* @__PURE__ */ w(Te, { children: [
882
+ q ? /* @__PURE__ */ c(
883
+ $e,
871
884
  {
872
- icon: /* @__PURE__ */ c(Zs, {}),
885
+ icon: /* @__PURE__ */ c(en, {}),
873
886
  intent: "ghost",
874
887
  size: "sm",
875
888
  "aria-label": d("tasksPanel.edit"),
876
889
  "data-action": "edit-task",
877
- onClick: () => oe(e)
890
+ onClick: () => q(e)
878
891
  }
879
892
  ) : null,
880
- N ? /* @__PURE__ */ c(
881
- He,
893
+ D ? /* @__PURE__ */ c(
894
+ $e,
882
895
  {
883
- icon: /* @__PURE__ */ c(en, {}),
896
+ icon: /* @__PURE__ */ c(tn, {}),
884
897
  intent: "ghost",
885
898
  size: "sm",
886
899
  "aria-label": d("tasksPanel.dismiss"),
887
900
  "data-action": "dismiss-task",
888
901
  onClick: () => {
889
- ut(e);
902
+ mt(e);
890
903
  }
891
904
  }
892
905
  ) : null
893
- ] }), Ts = (e) => {
894
- const t = (Te == null ? void 0 : Te(e)) ?? null, r = (S ? null : Se == null ? void 0 : Se(e)) ?? Ss(e), n = xs(e);
906
+ ] }), Rs = (e) => {
907
+ const t = (W == null ? void 0 : W(e)) ?? null, r = (N ? null : P == null ? void 0 : P(e)) ?? Ts(e), n = Ss(e);
895
908
  if (!(!n && !t && !r))
896
- return /* @__PURE__ */ b(we, { children: [
909
+ return /* @__PURE__ */ w(Te, { children: [
897
910
  n,
898
911
  t,
899
912
  r
900
913
  ] });
901
- }, Rs = (e, t) => lt(e, t), mt = (e) => /* @__PURE__ */ c(
914
+ }, Es = (e, t) => pt(e, t), gt = (e) => /* @__PURE__ */ c(
902
915
  "div",
903
916
  {
904
917
  "aria-hidden": "true",
905
918
  className: "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
906
- children: /* @__PURE__ */ c(Vs, { variant: "rectangular", height: "3.5rem" })
919
+ children: /* @__PURE__ */ c(Cs, { variant: "rectangular", height: "3.5rem" })
907
920
  },
908
921
  e
909
- ), vt = /* @__PURE__ */ c("div", { className: "ds:flex-1 ds:min-h-0 ds:p-[var(--spacing-md)]", children: typeof P == "boolean" ? /* @__PURE__ */ c(
910
- $e,
922
+ ), kt = /* @__PURE__ */ c("div", { className: "ds:flex-1 ds:min-h-0 ds:p-[var(--spacing-md)]", children: typeof x == "boolean" ? /* @__PURE__ */ c(
923
+ qe,
911
924
  {
912
925
  variant: "error",
913
926
  size: "sm",
914
927
  title: d("tasksPanel.error.title"),
915
928
  description: d("tasksPanel.error.description"),
916
- primaryAction: ie ? { label: d("emptyState.error.cta"), onClick: ie } : void 0
929
+ primaryAction: ue ? { label: d("emptyState.error.cta"), onClick: ue } : void 0
917
930
  }
918
- ) : P }), Le = /* @__PURE__ */ c("div", { className: "ds:flex-1 ds:min-h-0 ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [0, 1, 2, 3].map((e) => mt(`skeleton-${e}`)) }), gt = /* @__PURE__ */ c("div", { className: "ds:flex-1 ds:min-h-0 ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ c(
919
- $e,
931
+ ) : x }), Me = /* @__PURE__ */ c("div", { className: "ds:flex-1 ds:min-h-0 ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [0, 1, 2, 3].map((e) => gt(`skeleton-${e}`)) }), yt = /* @__PURE__ */ c("div", { className: "ds:flex-1 ds:min-h-0 ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ c(
932
+ qe,
920
933
  {
921
934
  variant: "first-use",
922
935
  size: "sm",
923
- title: qt ?? d("tasksPanel.empty.title"),
924
- description: Wt ?? d("tasksPanel.empty.description"),
925
- primaryAction: Kt
936
+ title: Vt ?? d("tasksPanel.empty.title"),
937
+ description: Ct ?? d("tasksPanel.empty.description"),
938
+ primaryAction: Ut
926
939
  }
927
- ) }), Es = Object.values($).some(Boolean), ht = /* @__PURE__ */ c("div", { className: "ds:flex-1 ds:min-h-0 ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ c(
928
- $e,
940
+ ) }), Os = Object.values(V).some(Boolean), bt = /* @__PURE__ */ c("div", { className: "ds:flex-1 ds:min-h-0 ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ c(
941
+ qe,
929
942
  {
930
943
  variant: "no-results",
931
944
  size: "sm",
932
945
  title: d("tasksPanel.filteredEmpty.title"),
933
946
  description: d("tasksPanel.filteredEmpty.description"),
934
- primaryAction: Es ? {
947
+ primaryAction: Os ? {
935
948
  label: d("tasksPanel.filteredEmpty.clear"),
936
- onClick: ds
949
+ onClick: fs
937
950
  } : void 0
938
951
  }
939
- ) }), Os = p && P ? /* @__PURE__ */ c("div", { className: "ds:shrink-0 ds:px-[var(--spacing-md)] ds:pt-[var(--spacing-xs)]", children: typeof P == "boolean" ? /* @__PURE__ */ b(Ie, { variant: "error", children: [
940
- /* @__PURE__ */ c(Ie.Title, { as: "p", children: d("tasksPanel.error.title") }),
941
- ie ? /* @__PURE__ */ c(Ie.Action, { children: /* @__PURE__ */ c(Pe, { intent: "outline", size: "sm", onClick: ie, children: d("emptyState.error.cta") }) }) : null
942
- ] }) : P }) : null, yt = /* @__PURE__ */ b(we, { children: [
943
- Os,
944
- /* @__PURE__ */ b(
952
+ ) }), Ds = f && x ? /* @__PURE__ */ c("div", { className: "ds:shrink-0 ds:px-[var(--spacing-md)] ds:pt-[var(--spacing-xs)]", children: typeof x == "boolean" ? /* @__PURE__ */ w(He, { variant: "error", children: [
953
+ /* @__PURE__ */ c(He.Title, { as: "p", children: d("tasksPanel.error.title") }),
954
+ ue ? /* @__PURE__ */ c(He.Action, { children: /* @__PURE__ */ c(Re, { intent: "outline", size: "sm", onClick: ue, children: d("emptyState.error.cta") }) }) : null
955
+ ] }) : x }) : null, wt = /* @__PURE__ */ w(Te, { children: [
956
+ Ds,
957
+ /* @__PURE__ */ w(
945
958
  "div",
946
959
  {
947
960
  ref: (e) => {
948
- J.current = e, ks.current = e;
961
+ ne.current = e, ws.current = e;
949
962
  },
950
963
  tabIndex: 0,
951
- onScroll: hs,
964
+ onScroll: ys,
952
965
  "data-tasks-panel-region": "",
953
- "data-fade-top": fs ? "true" : void 0,
954
- "data-fade-bottom": ms ? "true" : void 0,
966
+ "data-fade-top": vs ? "true" : void 0,
967
+ "data-fade-bottom": gs ? "true" : void 0,
955
968
  className: gn,
956
969
  children: [
957
970
  /* @__PURE__ */ c(
958
971
  "ol",
959
972
  {
960
- "aria-busy": w || void 0,
973
+ "aria-busy": b || void 0,
961
974
  className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-md)] ds:p-0",
962
- children: ge.map((e) => /* @__PURE__ */ b(
975
+ children: be.map((e) => /* @__PURE__ */ w(
963
976
  "li",
964
977
  {
965
978
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
966
979
  children: [
967
980
  /* @__PURE__ */ c(
968
- En,
981
+ On,
969
982
  {
970
983
  bucketKey: e.key,
971
- countLabel: Qe(e.items.length),
972
- showCount: !(p && Ee === !0),
973
- label: Qt[e.key],
974
- headerRef: e.key === "overdue" ? et : void 0,
984
+ countLabel: Xe(e.items.length),
985
+ showCount: !(f && Oe === !0),
986
+ label: Zt[e.key],
987
+ headerRef: e.key === "overdue" ? tt : void 0,
975
988
  reflowId: `bucket-${e.key}`,
976
- leaving: e.items.every((t) => Be(t.id))
989
+ leaving: e.items.every((t) => Le(t.id))
977
990
  }
978
991
  ),
979
992
  /* @__PURE__ */ c("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0", children: e.items.map((t) => {
980
993
  var s;
981
994
  return /* @__PURE__ */ c(
982
- Cs,
995
+ Us,
983
996
  {
984
997
  item: t,
985
- size: f,
986
- onActivate: E ? () => E(t) : void 0,
987
- actions: Ts(t),
988
- leading: D && !S ? /* @__PURE__ */ c(
989
- kn,
998
+ size: h,
999
+ onActivate: B ? () => B(t) : void 0,
1000
+ actions: Rs(t),
1001
+ leading: E && !N ? /* @__PURE__ */ c(
1002
+ bn,
990
1003
  {
991
1004
  item: t,
992
- checked: ((s = F.get(t.id)) == null ? void 0 : s.next) ?? t.status === "done",
993
- pending: F.has(t.id),
1005
+ checked: ((s = ee.get(t.id)) == null ? void 0 : s.next) ?? t.status === "done",
1006
+ pending: ee.has(t.id),
994
1007
  label: d("tasksPanel.doneItem", {
995
1008
  title: t.title
996
1009
  }),
997
- reduceMotion: ke,
998
- onToggle: Rs
1010
+ reduceMotion: xe,
1011
+ releaseKey: `${nt}|${b ? 1 : 0}`,
1012
+ onToggle: Es
999
1013
  }
1000
1014
  ) : void 0,
1001
- className: `${hn} ${At}${Be(t.id) ? ` ${zt}` : ""}`,
1002
- "data-leaving": Be(t.id) ? "" : void 0,
1015
+ className: `${kn} ${Lt}${Le(t.id) ? ` ${It}` : ""}`,
1016
+ "data-leaving": Le(t.id) ? "" : void 0,
1003
1017
  "data-reflow-id": t.id,
1004
1018
  "data-task-id": t.id
1005
1019
  },
@@ -1012,16 +1026,16 @@ const Rn = Ms(
1012
1026
  ))
1013
1027
  }
1014
1028
  ),
1015
- Y ? mt("loading-more") : null,
1016
- tt && H && !w ? /* @__PURE__ */ c("div", { className: "ds:flex ds:justify-center ds:py-[var(--spacing-sm)]", children: /* @__PURE__ */ c(
1017
- Pe,
1029
+ Z ? gt("loading-more") : null,
1030
+ st && K && !b ? /* @__PURE__ */ c("div", { className: "ds:flex ds:justify-center ds:py-[var(--spacing-sm)]", children: /* @__PURE__ */ c(
1031
+ Re,
1018
1032
  {
1019
1033
  intent: "ghost",
1020
1034
  size: "sm",
1021
- "aria-busy": Y || void 0,
1022
- "aria-disabled": Y || void 0,
1035
+ "aria-busy": Z || void 0,
1036
+ "aria-disabled": Z || void 0,
1023
1037
  onClick: () => {
1024
- Y || ze();
1038
+ Z || Be();
1025
1039
  },
1026
1040
  children: d("tasksPanel.loadMore")
1027
1041
  }
@@ -1030,172 +1044,172 @@ const Rn = Ms(
1030
1044
  }
1031
1045
  )
1032
1046
  ] });
1033
- let x;
1034
- if (p) {
1035
- const e = [...F.values()].some((s) => !s.settled), t = !fn(
1047
+ let S;
1048
+ if (f) {
1049
+ const e = [...ee.values()].some((s) => !s.settled), t = !pn(
1036
1050
  {
1037
1051
  status: O,
1038
- type: M,
1039
- assignee: I,
1040
- overdueOnly: Je
1052
+ type: I,
1053
+ assignee: H,
1054
+ overdueOnly: Ze
1041
1055
  },
1042
1056
  j
1043
1057
  );
1044
- P && K.length === 0 ? x = vt : K.length === 0 && (w || e) ? x = Le : K.length === 0 ? x = t ? ht : gt : x = yt;
1045
- } else P ? x = vt : w ? x = Le : o.length === 0 ? x = gt : K.length === 0 ? x = ht : x = yt;
1046
- const kt = x === Le, [Ds, Ns] = R(!1);
1047
- G(() => {
1048
- Ns(kt);
1049
- }, [kt]);
1050
- const js = u === void 0 ? Ne : /* @__PURE__ */ b(we, { children: [
1051
- Ne,
1058
+ x && G.length === 0 ? S = kt : G.length === 0 && (b || e) ? S = Me : G.length === 0 ? S = t ? bt : yt : S = wt;
1059
+ } else x ? S = kt : b ? S = Me : o.length === 0 ? S = yt : G.length === 0 ? S = bt : S = wt;
1060
+ const Pt = S === Me, [Ns, js] = R(!1);
1061
+ $(() => {
1062
+ js(Pt);
1063
+ }, [Pt]);
1064
+ const As = u === void 0 ? je : /* @__PURE__ */ w(Te, { children: [
1065
+ je,
1052
1066
  /* @__PURE__ */ c(
1053
1067
  "span",
1054
1068
  {
1055
1069
  "aria-hidden": "true",
1056
1070
  "data-total-count": "",
1057
1071
  className: "ds:ms-[var(--spacing-2xs)] ds:text-[color:var(--muted-foreground)]",
1058
- children: Qe(u)
1072
+ children: Xe(u)
1059
1073
  }
1060
1074
  ),
1061
1075
  /* @__PURE__ */ c(Gs, { children: ` ${d("tasksPanel.totalCount", { count: u })}` })
1062
- ] }), bt = ((B == null ? void 0 : B.length) ?? 0) > 1, As = ["todo", "done", "all"], _s = U && !S ? /* @__PURE__ */ c(
1063
- He,
1076
+ ] }), xt = ((L == null ? void 0 : L.length) ?? 0) > 1, _s = ["todo", "done", "all"], zs = Q && !N ? /* @__PURE__ */ c(
1077
+ $e,
1064
1078
  {
1065
- icon: /* @__PURE__ */ c(Xs, {}),
1079
+ icon: /* @__PURE__ */ c(Js, {}),
1066
1080
  intent: "outline",
1067
1081
  size: "sm",
1068
1082
  "aria-label": d("tasksPanel.add"),
1069
1083
  "data-action": "add-task",
1070
- onClick: U
1084
+ onClick: Q
1071
1085
  }
1072
- ) : void 0, wt = $.status, Pt = !!(de != null && de.length) && $.type, xt = !!(ue != null && ue.length) && $.assignee, St = $.overdueOnly, Tt = Mt && (wt || Pt || xt || St), zs = bt || Tt ? /* @__PURE__ */ b("div", { className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1073
- bt ? /* @__PURE__ */ c(Et, { label: d("tasksPanel.scope.label"), children: B.map((e) => {
1074
- const t = es === e;
1086
+ ) : void 0, St = V.status, Tt = !!(pe != null && pe.length) && V.type, Rt = !!(ve != null && ve.length) && V.assignee, Et = V.overdueOnly, Ot = $t && (St || Tt || Rt || Et), Bs = xt || Ot ? /* @__PURE__ */ w("div", { className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1087
+ xt ? /* @__PURE__ */ c(Nt, { label: d("tasksPanel.scope.label"), children: L.map((e) => {
1088
+ const t = ns === e;
1075
1089
  return /* @__PURE__ */ c(
1076
- Pe,
1090
+ Re,
1077
1091
  {
1078
1092
  intent: t ? "primary" : "outline",
1079
1093
  size: "sm",
1080
1094
  "aria-pressed": t,
1081
- onClick: () => Xe(e),
1082
- children: Ft[e]
1095
+ onClick: () => Je(e),
1096
+ children: Jt[e]
1083
1097
  },
1084
1098
  e
1085
1099
  );
1086
1100
  }) }) : null,
1087
- Tt ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1088
- wt ? /* @__PURE__ */ c(Et, { label: d("tasksPanel.status.label"), children: As.map((e) => {
1101
+ Ot ? /* @__PURE__ */ w("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1102
+ St ? /* @__PURE__ */ c(Nt, { label: d("tasksPanel.status.label"), children: _s.map((e) => {
1089
1103
  const t = O === e;
1090
1104
  return /* @__PURE__ */ c(
1091
- Pe,
1105
+ Re,
1092
1106
  {
1093
1107
  intent: t ? "primary" : "outline",
1094
1108
  size: "sm",
1095
1109
  "aria-pressed": t,
1096
1110
  "data-status-filter": e,
1097
- onClick: () => W({ status: e }),
1098
- children: Yt[e]
1111
+ onClick: () => U({ status: e }),
1112
+ children: Xt[e]
1099
1113
  },
1100
1114
  e
1101
1115
  );
1102
1116
  }) }) : null,
1103
- Pt ? /* @__PURE__ */ c(
1104
- Ot,
1117
+ Tt ? /* @__PURE__ */ c(
1118
+ jt,
1105
1119
  {
1106
1120
  size: "sm",
1107
1121
  clearable: !0,
1108
1122
  "aria-label": d("tasksPanel.type.label"),
1109
1123
  placeholder: d("tasksPanel.type.placeholder"),
1110
- options: de,
1111
- value: M ?? "",
1112
- onValueChange: (e) => W({ type: e || null })
1124
+ options: pe,
1125
+ value: I ?? "",
1126
+ onValueChange: (e) => U({ type: e || null })
1113
1127
  }
1114
1128
  ) : null,
1115
- xt ? /* @__PURE__ */ c(
1116
- Ot,
1129
+ Rt ? /* @__PURE__ */ c(
1130
+ jt,
1117
1131
  {
1118
1132
  size: "sm",
1119
1133
  clearable: !0,
1120
1134
  "aria-label": d("tasksPanel.assignee.label"),
1121
1135
  placeholder: d("tasksPanel.assignee.placeholder"),
1122
- options: ue,
1123
- value: I ?? "",
1124
- onValueChange: (e) => W({ assignee: e || null })
1136
+ options: ve,
1137
+ value: H ?? "",
1138
+ onValueChange: (e) => U({ assignee: e || null })
1125
1139
  }
1126
1140
  ) : null,
1127
- St ? /* @__PURE__ */ c(
1128
- Ks,
1141
+ Et ? /* @__PURE__ */ c(
1142
+ Vs,
1129
1143
  {
1130
- id: Ut,
1144
+ id: Qt,
1131
1145
  size: "sm",
1132
1146
  label: d("tasksPanel.overdueOnly"),
1133
- checked: Je,
1134
- disabled: p && O === "done",
1135
- onCheckedChange: (e) => W({ overdueOnly: e })
1147
+ checked: Ze,
1148
+ disabled: f && O === "done",
1149
+ onCheckedChange: (e) => U({ overdueOnly: e })
1136
1150
  }
1137
1151
  ) : null
1138
1152
  ] }) : null
1139
1153
  ] }) : void 0;
1140
- return /* @__PURE__ */ b(
1154
+ return /* @__PURE__ */ w(
1141
1155
  "section",
1142
1156
  {
1143
- ref: te,
1157
+ ref: ae,
1144
1158
  "data-component": "tasks-panel",
1145
1159
  "data-component-id": a,
1146
- "aria-labelledby": Ge ? void 0 : Ye,
1160
+ "aria-labelledby": Ge ? void 0 : Fe,
1147
1161
  "aria-label": Ge,
1148
- className: vn({ size: f, className: Vt }),
1149
- ...Ct,
1162
+ className: hn({ size: h, className: Gt }),
1163
+ ...Yt,
1150
1164
  children: [
1151
1165
  /* @__PURE__ */ c(
1152
- Ws,
1166
+ Ks,
1153
1167
  {
1154
- title: js,
1168
+ title: As,
1155
1169
  titleTooltip: u === void 0 ? void 0 : d("tasksPanel.titleWithCount", {
1156
- title: Ne,
1157
- value: Fe.format(u)
1170
+ title: je,
1171
+ value: Qe.format(u)
1158
1172
  }),
1159
- icon: k ?? /* @__PURE__ */ c(Js, {}),
1160
- headingId: Ye,
1161
- actions: _s,
1162
- filters: zs
1173
+ icon: y ?? /* @__PURE__ */ c(Zs, {}),
1174
+ headingId: Fe,
1175
+ actions: zs,
1176
+ filters: Bs
1163
1177
  }
1164
1178
  ),
1165
- /* @__PURE__ */ c("p", { role: "status", className: "ds:sr-only", children: Ds ? d("common.loading") : null }),
1166
- x
1179
+ /* @__PURE__ */ c("p", { role: "status", className: "ds:sr-only", children: Ns ? d("common.loading") : null }),
1180
+ S
1167
1181
  ]
1168
1182
  }
1169
1183
  );
1170
1184
  }
1171
1185
  );
1172
- Rn.displayName = "TasksPanel";
1173
- function En({
1186
+ En.displayName = "TasksPanel";
1187
+ function On({
1174
1188
  bucketKey: a,
1175
1189
  countLabel: o,
1176
1190
  showCount: g = !0,
1177
- label: h,
1178
- headerRef: k,
1191
+ label: k,
1192
+ headerRef: y,
1179
1193
  reflowId: u,
1180
- leaving: f = !1
1194
+ leaving: h = !1
1181
1195
  }) {
1182
- return /* @__PURE__ */ b(
1196
+ return /* @__PURE__ */ w(
1183
1197
  "div",
1184
1198
  {
1185
- ref: k,
1199
+ ref: y,
1186
1200
  "data-bucket": a,
1187
1201
  "data-reflow-id": u,
1188
- "data-leaving": f ? "" : void 0,
1202
+ "data-leaving": h ? "" : void 0,
1189
1203
  className: [
1190
1204
  "ds:sticky ds:top-0 ds:z-[2] ds:bg-[color:var(--card)] ds:py-[var(--spacing-2xs)]",
1191
1205
  "ds:flex ds:items-center ds:gap-[var(--spacing-2xs)] type-eyebrow",
1192
1206
  // A header travels with its bucket, and leaves with it: a heading
1193
1207
  // left standing over nothing, or snapping while its rows glide,
1194
1208
  // reads as two lists rather than one.
1195
- At,
1209
+ Lt,
1196
1210
  "ds:transition-opacity ds:duration-[var(--animation-duration)]",
1197
1211
  "ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none",
1198
- f ? zt : "",
1212
+ h ? It : "",
1199
1213
  a === "overdue" ? "ds:text-[color:var(--destructive)] ds:font-semibold" : a === "today" ? "ds:text-[color:var(--primary)] ds:font-semibold" : "ds:text-[color:var(--muted-foreground)]"
1200
1214
  ].filter(Boolean).join(" "),
1201
1215
  children: [
@@ -1206,7 +1220,7 @@ function En({
1206
1220
  className: "ds:size-1.5 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[color:var(--primary)]"
1207
1221
  }
1208
1222
  ) : null,
1209
- h,
1223
+ k,
1210
1224
  g ? /* @__PURE__ */ c(
1211
1225
  "span",
1212
1226
  {
@@ -1220,7 +1234,7 @@ function En({
1220
1234
  );
1221
1235
  }
1222
1236
  export {
1223
- Rn as T,
1224
- cn as t
1237
+ En as T,
1238
+ dn as t
1225
1239
  };
1226
- //# sourceMappingURL=tasks-panel-DufAoAxG.js.map
1240
+ //# sourceMappingURL=tasks-panel-BDPQPOP6.js.map