@alfadocs/ui-kit-debug 1.32.0 → 1.34.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.
- package/dist/_chunks/{appointment-card-D-oj_ugh.js → appointment-card-D6mk39NB.js} +3 -3
- package/dist/_chunks/{appointment-card-D-oj_ugh.js.map → appointment-card-D6mk39NB.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-CymGHyIP.js → appointment-timeline-D-V97Bhc.js} +2 -2
- package/dist/_chunks/{appointment-timeline-CymGHyIP.js.map → appointment-timeline-D-V97Bhc.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-DCk8gHod.js → appointment-tray-6rg071CL.js} +2 -2
- package/dist/_chunks/{appointment-tray-DCk8gHod.js.map → appointment-tray-6rg071CL.js.map} +1 -1
- package/dist/_chunks/{booking-l6UGNiE1.js → booking-BqkEtsKx.js} +777 -747
- package/dist/_chunks/{booking-l6UGNiE1.js.map → booking-BqkEtsKx.js.map} +1 -1
- package/dist/_chunks/{calendar-workspace-BX-zDyVR.js → calendar-workspace-4NH1Z47_.js} +7 -7
- package/dist/_chunks/{calendar-workspace-BX-zDyVR.js.map → calendar-workspace-4NH1Z47_.js.map} +1 -1
- package/dist/_chunks/{clinical-note-card-D2WTV2CO.js → clinical-note-card-CTRzmqvv.js} +83 -81
- package/dist/_chunks/clinical-note-card-CTRzmqvv.js.map +1 -0
- package/dist/_chunks/{contact-profile-card-BZqi8Hck.js → contact-profile-card-DSI9uumA.js} +17 -16
- package/dist/_chunks/{contact-profile-card-BZqi8Hck.js.map → contact-profile-card-DSI9uumA.js.map} +1 -1
- package/dist/_chunks/{control-room-rail-iO_BCaq1.js → control-room-rail-5MbhjsxN.js} +2 -2
- package/dist/_chunks/{control-room-rail-iO_BCaq1.js.map → control-room-rail-5MbhjsxN.js.map} +1 -1
- package/dist/_chunks/format-price-BkMEbeW3.js +47 -0
- package/dist/_chunks/format-price-BkMEbeW3.js.map +1 -0
- package/dist/_chunks/{format-price-DNqXPa_q.js → languages-CZqBaPwI.js} +8 -38
- package/dist/_chunks/languages-CZqBaPwI.js.map +1 -0
- package/dist/_chunks/money.agent-Dw55UxUA.js +116 -0
- package/dist/_chunks/money.agent-Dw55UxUA.js.map +1 -0
- package/dist/_chunks/notes-panel-BjLt-kiP.js +469 -0
- package/dist/_chunks/notes-panel-BjLt-kiP.js.map +1 -0
- package/dist/_chunks/{practice-results-DjEzPgAK.js → practice-results-kayDEorM.js} +15 -14
- package/dist/_chunks/{practice-results-DjEzPgAK.js.map → practice-results-kayDEorM.js.map} +1 -1
- package/dist/_chunks/{rich-text-editor-CQ7yZdG3.js → rich-text-editor-CCI-Y3DN.js} +3 -5
- package/dist/_chunks/rich-text-editor-CCI-Y3DN.js.map +1 -0
- package/dist/_chunks/{task-card-BUgK6yZT.js → task-card-BalrLkSz.js} +41 -40
- package/dist/_chunks/task-card-BalrLkSz.js.map +1 -0
- package/dist/_chunks/{task-tray-CYG6rj2s.js → task-tray-COo-RlDv.js} +2 -2
- package/dist/_chunks/{task-tray-CYG6rj2s.js.map → task-tray-COo-RlDv.js.map} +1 -1
- package/dist/_chunks/tasks-panel-DLKpSNoE.js +844 -0
- package/dist/_chunks/tasks-panel-DLKpSNoE.js.map +1 -0
- package/dist/_chunks/tool-rail-ONaV-Nzz.js +588 -0
- package/dist/_chunks/tool-rail-ONaV-Nzz.js.map +1 -0
- package/dist/_chunks/use-check-animation--I3cS00X.js +28 -0
- package/dist/_chunks/use-check-animation--I3cS00X.js.map +1 -0
- package/dist/_chunks/use-list-reflow-Cw43nxw5.js +100 -0
- package/dist/_chunks/use-list-reflow-Cw43nxw5.js.map +1 -0
- package/dist/agent-catalog.json +15 -1
- package/dist/components/_shared/format-price.d.ts +15 -0
- package/dist/components/_shared/format-price.d.ts.map +1 -1
- package/dist/components/appointment-card/appointment-card.d.ts.map +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +8 -1
- package/dist/components/clinical-note-card/clinical-note-card.d.ts.map +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/command-palette/command-palette.d.ts +7 -7
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/money/index.d.ts +4 -0
- package/dist/components/money/index.d.ts.map +1 -0
- package/dist/components/money/index.js +6 -0
- package/dist/components/money/index.js.map +1 -0
- package/dist/components/money/money.agent.d.ts +3 -0
- package/dist/components/money/money.agent.d.ts.map +1 -0
- package/dist/components/money/money.d.ts +38 -0
- package/dist/components/money/money.d.ts.map +1 -0
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +16 -1
- package/dist/components/notes-panel/notes-panel.d.ts.map +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/rich-text-editor/help-me-write-overlay.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-card/task-card.d.ts +11 -3
- package/dist/components/task-card/task-card.d.ts.map +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/tasks-panel/tasks-panel.d.ts +1 -1
- package/dist/components/tasks-panel/tasks-panel.d.ts.map +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tool-rail/tool-rail.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +43 -37
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/use-check-animation.d.ts +53 -0
- package/dist/hooks/use-check-animation.d.ts.map +1 -0
- package/dist/hooks/use-exit-transition.d.ts +48 -0
- package/dist/hooks/use-exit-transition.d.ts.map +1 -0
- package/dist/hooks/use-list-reflow.d.ts +47 -0
- package/dist/hooks/use-list-reflow.d.ts.map +1 -0
- package/dist/host-compat.css +8 -2
- package/dist/i18n/locales/ar.d.ts +5 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +6 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +5 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +6 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +5 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +6 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +5 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +6 -1
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +5 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +6 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +5 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +6 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +5 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +6 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +5 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +6 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +5 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +6 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +5 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +6 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +5 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +6 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +5 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +6 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +5 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +6 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +5 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +6 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +5 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +6 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +5 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +6 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +5 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +6 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +5 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +6 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +919 -916
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +6 -1
- package/dist/locales/de.json +6 -1
- package/dist/locales/el.json +6 -1
- package/dist/locales/en.json +6 -1
- package/dist/locales/es.json +6 -1
- package/dist/locales/fr.json +6 -1
- package/dist/locales/hi.json +6 -1
- package/dist/locales/it.json +6 -1
- package/dist/locales/ja.json +6 -1
- package/dist/locales/nl.json +6 -1
- package/dist/locales/pl.json +6 -1
- package/dist/locales/pt.json +6 -1
- package/dist/locales/ro.json +6 -1
- package/dist/locales/ru.json +6 -1
- package/dist/locales/sq.json +6 -1
- package/dist/locales/sv.json +6 -1
- package/dist/locales/tr.json +6 -1
- package/dist/locales/zh.json +6 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/tokens.css +2 -1
- package/package.json +5 -1
- package/dist/_chunks/clinical-note-card-D2WTV2CO.js.map +0 -1
- package/dist/_chunks/format-price-DNqXPa_q.js.map +0 -1
- package/dist/_chunks/notes-panel-C4G-mhZ9.js +0 -380
- package/dist/_chunks/notes-panel-C4G-mhZ9.js.map +0 -1
- package/dist/_chunks/rich-text-editor-CQ7yZdG3.js.map +0 -1
- package/dist/_chunks/task-card-BUgK6yZT.js.map +0 -1
- package/dist/_chunks/tasks-panel-DQuaVvl5.js +0 -757
- package/dist/_chunks/tasks-panel-DQuaVvl5.js.map +0 -1
- package/dist/_chunks/tool-rail-8Scslq3X.js +0 -524
- package/dist/_chunks/tool-rail-8Scslq3X.js.map +0 -1
|
@@ -0,0 +1,844 @@
|
|
|
1
|
+
import { jsx as a, jsxs as m, Fragment as we } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Pt, useId as Pe, useMemo as O, useState as h, useCallback as f, useRef as V, useImperativeHandle as xt } from "react";
|
|
3
|
+
import { c as Nt } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as _t } from "react-i18next";
|
|
5
|
+
import { B as Dt } from "./badge-sTusUqZD.js";
|
|
6
|
+
import { B as oe } from "./button-nJaPh_HC.js";
|
|
7
|
+
import { I as ne } from "./icon-button-DA2CAGHZ.js";
|
|
8
|
+
import { B as xe } from "./button-group-CaxRJsNG.js";
|
|
9
|
+
import { P as Rt } from "./panel-header-D313n_9-.js";
|
|
10
|
+
import { S as Ne } from "./select-CLSUnKjF.js";
|
|
11
|
+
import { S as Tt } from "./switch-OILsBLWo.js";
|
|
12
|
+
import { S as St } from "./skeleton-CZbwyJAA.js";
|
|
13
|
+
import { E as re } from "./empty-state-X0sVPfVo.js";
|
|
14
|
+
import { T as zt } from "./task-card-BalrLkSz.js";
|
|
15
|
+
import { u as Et } from "./use-check-animation--I3cS00X.js";
|
|
16
|
+
import { a as It, u as _e, R as Re } from "./use-list-reflow-Cw43nxw5.js";
|
|
17
|
+
import { u as jt } from "./use-theme-CAuo6EYT.js";
|
|
18
|
+
import { u as De } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
19
|
+
import { u as Bt } from "./registry-DvAUVLHh.js";
|
|
20
|
+
import { P as At } from "./plus-DzMQ_c6b.js";
|
|
21
|
+
import { C as Ht } from "./clipboard-check-BeAGxDVT.js";
|
|
22
|
+
import { P as qt } from "./pencil-B1sKKyuT.js";
|
|
23
|
+
import { X as Wt } from "./x-B5YnXwCz.js";
|
|
24
|
+
import { c as G } from "./createLucideIcon-DhHxpK9K.js";
|
|
25
|
+
/**
|
|
26
|
+
* @license lucide-react v1.22.0 - ISC
|
|
27
|
+
*
|
|
28
|
+
* This source code is licensed under the ISC license.
|
|
29
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
30
|
+
*/
|
|
31
|
+
const $t = [
|
|
32
|
+
["path", { d: "M13.744 17.736a6 6 0 1 1-7.48-7.48", key: "bq4yh3" }],
|
|
33
|
+
["path", { d: "M15 6h1v4", key: "11y1tn" }],
|
|
34
|
+
["path", { d: "m6.134 14.768.866-.5 2 3.464", key: "17snzx" }],
|
|
35
|
+
["circle", { cx: "16", cy: "8", r: "6", key: "14bfc9" }]
|
|
36
|
+
], Ct = G("coins", $t);
|
|
37
|
+
/**
|
|
38
|
+
* @license lucide-react v1.22.0 - ISC
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the ISC license.
|
|
41
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/
|
|
43
|
+
const Lt = [
|
|
44
|
+
["path", { d: "M10.5 3 8 9l4 13 4-13-2.5-6", key: "b3dvk1" }],
|
|
45
|
+
[
|
|
46
|
+
"path",
|
|
47
|
+
{
|
|
48
|
+
d: "M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z",
|
|
49
|
+
key: "7w4byz"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
["path", { d: "M2 9h20", key: "16fsjt" }]
|
|
53
|
+
], Mt = G("gem", Lt);
|
|
54
|
+
/**
|
|
55
|
+
* @license lucide-react v1.22.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/
|
|
60
|
+
const Kt = [
|
|
61
|
+
[
|
|
62
|
+
"path",
|
|
63
|
+
{
|
|
64
|
+
d: "M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",
|
|
65
|
+
key: "q8bfy3"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
["path", { d: "M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14", key: "1853fq" }],
|
|
69
|
+
["path", { d: "M8 6v8", key: "15ugcq" }]
|
|
70
|
+
], Ot = G("megaphone", Kt);
|
|
71
|
+
/**
|
|
72
|
+
* @license lucide-react v1.22.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/
|
|
77
|
+
const Vt = [
|
|
78
|
+
[
|
|
79
|
+
"path",
|
|
80
|
+
{
|
|
81
|
+
d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",
|
|
82
|
+
key: "vktsd0"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }]
|
|
86
|
+
], Te = G("tag", Vt), Gt = {
|
|
87
|
+
id: "tasks-panel",
|
|
88
|
+
// 'pick' backs select_item (non-persisting activation, matching
|
|
89
|
+
// AppointmentTimeline); 'dismiss' backs dismiss; 'scroll' backs
|
|
90
|
+
// jump_to_overdue (re-anchors the viewport); 'filter' backs set_filter (the
|
|
91
|
+
// status / type / assignee / overdue filter bar is genuinely stateful);
|
|
92
|
+
// 'view_change' backs change_scope (the patient ↔ mine segment); 'paginate'
|
|
93
|
+
// backs load_more (append the next page of tasks).
|
|
94
|
+
capabilities: [
|
|
95
|
+
"pick",
|
|
96
|
+
"dismiss",
|
|
97
|
+
"scroll",
|
|
98
|
+
"filter",
|
|
99
|
+
"view_change",
|
|
100
|
+
"paginate"
|
|
101
|
+
],
|
|
102
|
+
state: {
|
|
103
|
+
items: {
|
|
104
|
+
type: "Array<{ id: string; status: string }>",
|
|
105
|
+
descriptionKey: "ui.agent.tasksPanel.state.items",
|
|
106
|
+
description: "Currently-rendered tasks. Ids + status only — never task note / patient.",
|
|
107
|
+
read: (s) => s.getItems()
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
actions: {
|
|
111
|
+
select_item: {
|
|
112
|
+
safety: "read",
|
|
113
|
+
argsType: "{ id: string }",
|
|
114
|
+
argsSchema: {
|
|
115
|
+
type: "object",
|
|
116
|
+
properties: { id: { type: "string" } },
|
|
117
|
+
required: ["id"]
|
|
118
|
+
},
|
|
119
|
+
idempotent: !0,
|
|
120
|
+
descriptionKey: "ui.agent.tasksPanel.actions.selectItem",
|
|
121
|
+
description: "Activate the task with the given id.",
|
|
122
|
+
invoke: (s, n) => {
|
|
123
|
+
s.selectItem(n.id);
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
toggle_done: {
|
|
127
|
+
safety: "write",
|
|
128
|
+
argsType: "{ id: string }",
|
|
129
|
+
argsSchema: {
|
|
130
|
+
type: "object",
|
|
131
|
+
properties: { id: { type: "string" } },
|
|
132
|
+
required: ["id"]
|
|
133
|
+
},
|
|
134
|
+
descriptionKey: "ui.agent.tasksPanel.actions.toggleDone",
|
|
135
|
+
description: "Request the host to toggle the done state of a task.",
|
|
136
|
+
invoke: (s, n) => {
|
|
137
|
+
s.toggleDone(n.id);
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
dismiss: {
|
|
141
|
+
safety: "destructive",
|
|
142
|
+
argsType: "{ id: string }",
|
|
143
|
+
argsSchema: {
|
|
144
|
+
type: "object",
|
|
145
|
+
properties: { id: { type: "string" } },
|
|
146
|
+
required: ["id"]
|
|
147
|
+
},
|
|
148
|
+
idempotent: !0,
|
|
149
|
+
descriptionKey: "ui.agent.tasksPanel.actions.dismiss",
|
|
150
|
+
description: "Request the host to dismiss / remove the task with the given id.",
|
|
151
|
+
invoke: (s, n) => {
|
|
152
|
+
s.dismiss(n.id);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
jump_to_overdue: {
|
|
156
|
+
safety: "read",
|
|
157
|
+
idempotent: !0,
|
|
158
|
+
descriptionKey: "ui.agent.tasksPanel.actions.jumpToOverdue",
|
|
159
|
+
description: "Re-anchor the panel scroll on the overdue tasks.",
|
|
160
|
+
invoke: (s) => {
|
|
161
|
+
s.jumpToOverdue();
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
set_filter: {
|
|
165
|
+
safety: "read",
|
|
166
|
+
argsType: "{ status?: 'todo' | 'done' | 'all'; type?: string | null; assignee?: string | null; overdueOnly?: boolean }",
|
|
167
|
+
argsSchema: {
|
|
168
|
+
type: "object",
|
|
169
|
+
properties: {
|
|
170
|
+
status: { type: "string", enum: ["todo", "done", "all"] },
|
|
171
|
+
type: { type: ["string", "null"] },
|
|
172
|
+
assignee: { type: ["string", "null"] },
|
|
173
|
+
overdueOnly: { type: "boolean" }
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
idempotent: !0,
|
|
177
|
+
descriptionKey: "ui.agent.tasksPanel.actions.setFilter",
|
|
178
|
+
description: "Set the task filters (status segment, type, assignee, overdue-only). Omitted keys are left unchanged.",
|
|
179
|
+
invoke: (s, n) => {
|
|
180
|
+
s.setFilter(n);
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
change_scope: {
|
|
184
|
+
safety: "read",
|
|
185
|
+
argsType: "{ scope: 'patient' | 'mine' }",
|
|
186
|
+
argsSchema: {
|
|
187
|
+
type: "object",
|
|
188
|
+
properties: { scope: { type: "string", enum: ["patient", "mine"] } },
|
|
189
|
+
required: ["scope"]
|
|
190
|
+
},
|
|
191
|
+
idempotent: !0,
|
|
192
|
+
descriptionKey: "ui.agent.tasksPanel.actions.changeScope",
|
|
193
|
+
description: "Switch the task scope segment between this patient ('patient') and the operator's own tasks ('mine'). The host re-feeds the items.",
|
|
194
|
+
invoke: (s, n) => {
|
|
195
|
+
s.changeScope(n.scope);
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
load_more: {
|
|
199
|
+
safety: "read",
|
|
200
|
+
// Requests the host to append the next page — not idempotent (each call
|
|
201
|
+
// advances the page) and reaches the host data source.
|
|
202
|
+
openWorld: !0,
|
|
203
|
+
descriptionKey: "ui.agent.tasksPanel.actions.loadMore",
|
|
204
|
+
description: "Request the host to append the next page of tasks.",
|
|
205
|
+
invoke: (s) => {
|
|
206
|
+
s.loadMore();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
domHooks: {
|
|
211
|
+
root: {
|
|
212
|
+
attr: "data-component",
|
|
213
|
+
value: "tasks-panel",
|
|
214
|
+
description: "Marks the TasksPanel wrapper."
|
|
215
|
+
},
|
|
216
|
+
instanceId: {
|
|
217
|
+
attr: "data-component-id",
|
|
218
|
+
sourceProp: "id",
|
|
219
|
+
description: "Sourced from the id prop. Required to address a specific panel from the agent."
|
|
220
|
+
},
|
|
221
|
+
item: {
|
|
222
|
+
attr: "data-task-id",
|
|
223
|
+
description: "Stable task id emitted on each rendered TaskCard inside the panel."
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}, Yt = 96, Ut = Nt(
|
|
227
|
+
[
|
|
228
|
+
"ds:flex ds:flex-col ds:h-full ds:min-h-0",
|
|
229
|
+
"ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]"
|
|
230
|
+
].join(" "),
|
|
231
|
+
{
|
|
232
|
+
variants: { size: { xs: "", sm: "", md: "" } },
|
|
233
|
+
defaultVariants: { size: "sm" }
|
|
234
|
+
}
|
|
235
|
+
), Xt = [
|
|
236
|
+
"ds:flex-1 ds:min-h-0 ds:overflow-y-auto",
|
|
237
|
+
"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
238
|
+
"ds:px-[var(--spacing-md)] ds:py-[var(--spacing-xs)]",
|
|
239
|
+
"ds:[--tpl-mask-top:black] ds:[--tpl-mask-bottom:black]",
|
|
240
|
+
"ds:data-[fade-top=true]:[--tpl-mask-top:transparent]",
|
|
241
|
+
"ds:data-[fade-bottom=true]:[--tpl-mask-bottom:transparent]",
|
|
242
|
+
"ds:[mask-image:linear-gradient(to_bottom,var(--tpl-mask-top)_0,black_var(--tpl-fade-distance,var(--spacing-lg)),black_calc(100%-var(--tpl-fade-distance,var(--spacing-lg))),var(--tpl-mask-bottom)_100%)]",
|
|
243
|
+
"ds:motion-reduce:[mask-image:none]",
|
|
244
|
+
"ds:[.theme-accessible_&]:[mask-image:none]",
|
|
245
|
+
"ds:forced-colors:[mask-image:none]",
|
|
246
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
247
|
+
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:[outline-offset:-2px]",
|
|
248
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
249
|
+
].join(" "), Jt = [
|
|
250
|
+
"ds:shadow-[var(--shadow-card)] ds:bg-[color:var(--card)]",
|
|
251
|
+
// Declared at rest, not only while leaving: a transition added at the
|
|
252
|
+
// same moment as the value it animates has nothing to move from.
|
|
253
|
+
"ds:transition-opacity ds:duration-[var(--animation-duration)]",
|
|
254
|
+
"ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
|
|
255
|
+
].join(" "), Se = "ds:opacity-0", Qt = 12;
|
|
256
|
+
function Zt({
|
|
257
|
+
item: s,
|
|
258
|
+
label: n,
|
|
259
|
+
labelChecked: l,
|
|
260
|
+
reduceMotion: u,
|
|
261
|
+
onToggle: c
|
|
262
|
+
}) {
|
|
263
|
+
const { checked: r, drawing: i, toggle: k } = Et({
|
|
264
|
+
checked: s.status === "done",
|
|
265
|
+
reduceMotion: u
|
|
266
|
+
}), y = r ? (
|
|
267
|
+
// `--accent` is magenta-700 in light, the step that clears AA there.
|
|
268
|
+
"ds:text-[color:var(--accent)]"
|
|
269
|
+
) : s.priority === "high" ? "ds:text-[color:var(--destructive)]" : "ds:text-[color:var(--muted-foreground)]";
|
|
270
|
+
return /* @__PURE__ */ a(
|
|
271
|
+
"button",
|
|
272
|
+
{
|
|
273
|
+
type: "button",
|
|
274
|
+
role: "checkbox",
|
|
275
|
+
"aria-checked": r,
|
|
276
|
+
"aria-label": r ? l : n,
|
|
277
|
+
"data-action": "toggle-done",
|
|
278
|
+
"data-drawing": i ? "" : void 0,
|
|
279
|
+
onClick: () => {
|
|
280
|
+
k(), c(s);
|
|
281
|
+
},
|
|
282
|
+
className: `ds:group/check ds:flex ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)] ds:p-[var(--spacing-2xs)] ds:hover:bg-[color:var(--muted)]/40 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] ${y}`,
|
|
283
|
+
children: /* @__PURE__ */ m(
|
|
284
|
+
"svg",
|
|
285
|
+
{
|
|
286
|
+
viewBox: "0 0 18 18",
|
|
287
|
+
"aria-hidden": "true",
|
|
288
|
+
className: "ds:size-4 ds:transition-transform ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)] ds:group-data-[drawing]/check:scale-110 ds:motion-reduce:transition-none",
|
|
289
|
+
children: [
|
|
290
|
+
/* @__PURE__ */ a(
|
|
291
|
+
"rect",
|
|
292
|
+
{
|
|
293
|
+
x: "1.5",
|
|
294
|
+
y: "1.5",
|
|
295
|
+
width: "15",
|
|
296
|
+
height: "15",
|
|
297
|
+
rx: "4",
|
|
298
|
+
className: "ds:fill-none ds:stroke-current ds:[stroke-width:1.5]"
|
|
299
|
+
}
|
|
300
|
+
),
|
|
301
|
+
/* @__PURE__ */ a(
|
|
302
|
+
"path",
|
|
303
|
+
{
|
|
304
|
+
d: "M5 9.25 L7.75 12 L13 6.25",
|
|
305
|
+
strokeDashoffset: r ? 0 : Qt,
|
|
306
|
+
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"
|
|
307
|
+
}
|
|
308
|
+
)
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
)
|
|
312
|
+
}
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
const Ft = {
|
|
316
|
+
recall: { variant: "info", Icon: Ot },
|
|
317
|
+
payment: { variant: "warning", Icon: Mt },
|
|
318
|
+
collection: { variant: "error", Icon: Ct },
|
|
319
|
+
other: { variant: "neutral", Icon: Te }
|
|
320
|
+
}, es = [
|
|
321
|
+
"overdue",
|
|
322
|
+
"today",
|
|
323
|
+
"tomorrow",
|
|
324
|
+
"thisWeek",
|
|
325
|
+
"later",
|
|
326
|
+
"done"
|
|
327
|
+
];
|
|
328
|
+
function ts(s) {
|
|
329
|
+
return new Date(s.getFullYear(), s.getMonth(), s.getDate());
|
|
330
|
+
}
|
|
331
|
+
function ze(s) {
|
|
332
|
+
const n = ts(s), l = new Date(n);
|
|
333
|
+
l.setDate(n.getDate() + 1);
|
|
334
|
+
const u = new Date(n);
|
|
335
|
+
u.setDate(n.getDate() + 2);
|
|
336
|
+
const c = (n.getDay() + 6) % 7, r = new Date(n);
|
|
337
|
+
return r.setDate(n.getDate() + (7 - c)), {
|
|
338
|
+
startOfToday: +n,
|
|
339
|
+
startOfTomorrow: +l,
|
|
340
|
+
startOfDayAfter: +u,
|
|
341
|
+
startOfNextWeek: +r
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
function ss(s, n) {
|
|
345
|
+
if (s.status === "done") return "done";
|
|
346
|
+
const { startOfToday: l, startOfTomorrow: u, startOfDayAfter: c, startOfNextWeek: r } = ze(n), i = +new Date(s.dueIso);
|
|
347
|
+
return i < l ? "overdue" : i < u ? "today" : i < c ? "tomorrow" : i < r ? "thisWeek" : "later";
|
|
348
|
+
}
|
|
349
|
+
function as(s, n) {
|
|
350
|
+
return s.status === "done" ? !1 : +new Date(s.dueIso) < ze(n).startOfTomorrow;
|
|
351
|
+
}
|
|
352
|
+
function os(s, n) {
|
|
353
|
+
const l = /* @__PURE__ */ new Map();
|
|
354
|
+
for (const c of s) {
|
|
355
|
+
const r = ss(c, n), i = l.get(r);
|
|
356
|
+
i ? i.push(c) : l.set(r, [c]);
|
|
357
|
+
}
|
|
358
|
+
const u = [];
|
|
359
|
+
for (const c of es) {
|
|
360
|
+
const r = l.get(c);
|
|
361
|
+
!r || r.length === 0 || (r.sort((i, k) => +new Date(i.dueIso) - +new Date(k.dueIso)), u.push({ key: c, items: r }));
|
|
362
|
+
}
|
|
363
|
+
return u;
|
|
364
|
+
}
|
|
365
|
+
const ns = Pt(
|
|
366
|
+
({
|
|
367
|
+
id: s,
|
|
368
|
+
items: n,
|
|
369
|
+
nowIso: l,
|
|
370
|
+
title: u,
|
|
371
|
+
size: c = "sm",
|
|
372
|
+
onOpenTask: r,
|
|
373
|
+
onToggleDone: i,
|
|
374
|
+
onEditTask: k,
|
|
375
|
+
onDismissTask: y,
|
|
376
|
+
onAddTask: ie,
|
|
377
|
+
readOnly: z = !1,
|
|
378
|
+
renderItemActions: Y,
|
|
379
|
+
scope: U,
|
|
380
|
+
defaultScope: Ee,
|
|
381
|
+
onScopeChange: E,
|
|
382
|
+
availableScopes: g,
|
|
383
|
+
onLoadMore: p,
|
|
384
|
+
hasMore: Ie,
|
|
385
|
+
loadingMore: I = !1,
|
|
386
|
+
loading: X = !1,
|
|
387
|
+
error: x = !1,
|
|
388
|
+
showFilters: de = !0,
|
|
389
|
+
statusFilter: J,
|
|
390
|
+
defaultStatusFilter: je,
|
|
391
|
+
onStatusFilterChange: j,
|
|
392
|
+
typeOptions: Q,
|
|
393
|
+
typeFilter: B,
|
|
394
|
+
onTypeFilterChange: A,
|
|
395
|
+
assigneeOptions: Z,
|
|
396
|
+
assigneeFilter: H,
|
|
397
|
+
onAssigneeFilterChange: q,
|
|
398
|
+
overdueOnly: F,
|
|
399
|
+
defaultOverdueOnly: Be,
|
|
400
|
+
onOverdueOnlyChange: W,
|
|
401
|
+
emptyTitle: Ae,
|
|
402
|
+
emptyDescription: He,
|
|
403
|
+
emptyAction: qe,
|
|
404
|
+
className: We,
|
|
405
|
+
"aria-label": ce,
|
|
406
|
+
...$e
|
|
407
|
+
}, Ce) => {
|
|
408
|
+
const { t: o } = _t(), le = Pe(), Le = Pe(), Me = u ?? o("tasksPanel.title"), Ke = {
|
|
409
|
+
todo: o("tasksPanel.status.todo"),
|
|
410
|
+
done: o("tasksPanel.status.done"),
|
|
411
|
+
all: o("tasksPanel.status.all")
|
|
412
|
+
}, Oe = {
|
|
413
|
+
patient: o("tasksPanel.scope.patient"),
|
|
414
|
+
mine: o("tasksPanel.scope.mine")
|
|
415
|
+
}, Ve = {
|
|
416
|
+
overdue: o("tasksPanel.buckets.overdue"),
|
|
417
|
+
today: o("tasksPanel.buckets.today"),
|
|
418
|
+
tomorrow: o("tasksPanel.buckets.tomorrow"),
|
|
419
|
+
thisWeek: o("tasksPanel.buckets.thisWeek"),
|
|
420
|
+
later: o("tasksPanel.buckets.later"),
|
|
421
|
+
done: o("tasksPanel.buckets.done")
|
|
422
|
+
}, Ge = {
|
|
423
|
+
recall: o("tasksPanel.types.recall"),
|
|
424
|
+
payment: o("tasksPanel.types.payment"),
|
|
425
|
+
collection: o("tasksPanel.types.collection"),
|
|
426
|
+
other: o("tasksPanel.types.other")
|
|
427
|
+
}, $ = O(
|
|
428
|
+
() => l ? new Date(l) : /* @__PURE__ */ new Date(),
|
|
429
|
+
[l]
|
|
430
|
+
), [Ye, Ue] = h(
|
|
431
|
+
Ee ?? (g == null ? void 0 : g[0]) ?? "patient"
|
|
432
|
+
), Xe = U ?? Ye, ee = f(
|
|
433
|
+
(e) => {
|
|
434
|
+
U === void 0 && Ue(e), E == null || E(e);
|
|
435
|
+
},
|
|
436
|
+
[U, E]
|
|
437
|
+
), [Je, Qe] = h(
|
|
438
|
+
je ?? "todo"
|
|
439
|
+
), b = J ?? Je, N = f(
|
|
440
|
+
(e) => {
|
|
441
|
+
J === void 0 && Qe(e), j == null || j(e);
|
|
442
|
+
},
|
|
443
|
+
[J, j]
|
|
444
|
+
), [Ze, Fe] = h(null), C = B !== void 0 ? B : Ze, _ = f(
|
|
445
|
+
(e) => {
|
|
446
|
+
B === void 0 && Fe(e), A == null || A(e);
|
|
447
|
+
},
|
|
448
|
+
[B, A]
|
|
449
|
+
), [et, tt] = h(null), L = H !== void 0 ? H : et, D = f(
|
|
450
|
+
(e) => {
|
|
451
|
+
H === void 0 && tt(e), q == null || q(e);
|
|
452
|
+
},
|
|
453
|
+
[H, q]
|
|
454
|
+
), [st, at] = h(
|
|
455
|
+
Be ?? !1
|
|
456
|
+
), te = F ?? st, R = f(
|
|
457
|
+
(e) => {
|
|
458
|
+
F === void 0 && at(e), W == null || W(e);
|
|
459
|
+
},
|
|
460
|
+
[F, W]
|
|
461
|
+
), ot = f(() => {
|
|
462
|
+
N("todo"), _(null), D(null), R(!1);
|
|
463
|
+
}, [N, _, D, R]), M = O(() => n.filter((e) => {
|
|
464
|
+
const t = e.status === "done";
|
|
465
|
+
return !(b === "todo" && t || b === "done" && !t || C && e.type !== C || L && (e.assignee ?? "") !== L || te && !as(e, $));
|
|
466
|
+
}), [
|
|
467
|
+
n,
|
|
468
|
+
b,
|
|
469
|
+
C,
|
|
470
|
+
L,
|
|
471
|
+
te,
|
|
472
|
+
$
|
|
473
|
+
]), ue = O(
|
|
474
|
+
() => os(M, $),
|
|
475
|
+
[M, $]
|
|
476
|
+
), T = V(null), pe = V(null), [nt, rt] = h(!1), [it, dt] = h(!1), w = f(() => {
|
|
477
|
+
const e = T.current;
|
|
478
|
+
if (!e) return;
|
|
479
|
+
const { scrollTop: t, scrollHeight: d, clientHeight: v } = e;
|
|
480
|
+
rt(t > 1), dt(t + v < d - 1);
|
|
481
|
+
}, []);
|
|
482
|
+
De(() => {
|
|
483
|
+
w();
|
|
484
|
+
}, [ue, w]), De(() => {
|
|
485
|
+
const e = T.current;
|
|
486
|
+
if (!e || typeof ResizeObserver > "u") return;
|
|
487
|
+
const t = new ResizeObserver(w);
|
|
488
|
+
return t.observe(e), () => t.disconnect();
|
|
489
|
+
}, [w]);
|
|
490
|
+
const se = Ie ?? !!p, ct = f(() => {
|
|
491
|
+
w();
|
|
492
|
+
const e = T.current;
|
|
493
|
+
if (!e) return;
|
|
494
|
+
const { scrollTop: t, scrollHeight: d, clientHeight: v } = e;
|
|
495
|
+
p && se && !I && d - t - v <= Yt && p();
|
|
496
|
+
}, [w, p, se, I]), { resolvedTheme: lt } = jt(), K = lt.endsWith("-accessible") || void 0, { containerRef: ut } = It({
|
|
497
|
+
key: M.map((e) => e.id).join(),
|
|
498
|
+
reduceMotion: K
|
|
499
|
+
}), fe = _e({ delayMs: 200, reduceMotion: K }), me = _e({ reduceMotion: K }), ae = (e) => fe.isLeaving(e) || me.isLeaving(e), ve = (e) => {
|
|
500
|
+
if (!i) return;
|
|
501
|
+
const t = e.status === "done";
|
|
502
|
+
b === "todo" && !t || b === "done" && t ? fe.leave(e.id, () => i(e)) : i(e);
|
|
503
|
+
}, ge = (e) => {
|
|
504
|
+
y && me.leave(e.id, () => y(e));
|
|
505
|
+
}, he = f(() => {
|
|
506
|
+
const e = T.current, t = pe.current;
|
|
507
|
+
if (!e || !t) {
|
|
508
|
+
e == null || e.scrollTo({ top: 0 });
|
|
509
|
+
return;
|
|
510
|
+
}
|
|
511
|
+
const d = t.getBoundingClientRect().top - e.getBoundingClientRect().top;
|
|
512
|
+
e.scrollTo({ top: e.scrollTop + d });
|
|
513
|
+
}, []), S = V(n);
|
|
514
|
+
S.current = n;
|
|
515
|
+
const ke = V(null);
|
|
516
|
+
xt(Ce, () => ke.current, []);
|
|
517
|
+
const pt = O(
|
|
518
|
+
() => ({
|
|
519
|
+
getItems: () => S.current.map((e) => ({
|
|
520
|
+
id: e.id,
|
|
521
|
+
status: e.status ?? "open"
|
|
522
|
+
})),
|
|
523
|
+
selectItem: (e) => {
|
|
524
|
+
const t = S.current.find((d) => d.id === e);
|
|
525
|
+
t && (r == null || r(t));
|
|
526
|
+
},
|
|
527
|
+
toggleDone: (e) => {
|
|
528
|
+
const t = S.current.find((d) => d.id === e);
|
|
529
|
+
t && ve(t);
|
|
530
|
+
},
|
|
531
|
+
dismiss: (e) => {
|
|
532
|
+
const t = S.current.find((d) => d.id === e);
|
|
533
|
+
t && ge(t);
|
|
534
|
+
},
|
|
535
|
+
jumpToOverdue: he,
|
|
536
|
+
setFilter: (e) => {
|
|
537
|
+
e.status !== void 0 && N(e.status), e.type !== void 0 && _(e.type), e.assignee !== void 0 && D(e.assignee), e.overdueOnly !== void 0 && R(e.overdueOnly);
|
|
538
|
+
},
|
|
539
|
+
changeScope: ee,
|
|
540
|
+
loadMore: () => p == null ? void 0 : p()
|
|
541
|
+
}),
|
|
542
|
+
[
|
|
543
|
+
r,
|
|
544
|
+
i,
|
|
545
|
+
y,
|
|
546
|
+
he,
|
|
547
|
+
N,
|
|
548
|
+
_,
|
|
549
|
+
D,
|
|
550
|
+
R,
|
|
551
|
+
ee,
|
|
552
|
+
p
|
|
553
|
+
]
|
|
554
|
+
);
|
|
555
|
+
Bt(Gt, pt, s);
|
|
556
|
+
const ft = (e) => {
|
|
557
|
+
if (!e.type) return null;
|
|
558
|
+
const t = Ft[e.type], d = (t == null ? void 0 : t.variant) ?? "neutral", v = (t == null ? void 0 : t.Icon) ?? Te, wt = e.typeLabel ?? Ge[e.type] ?? e.type;
|
|
559
|
+
return /* @__PURE__ */ a(
|
|
560
|
+
Dt,
|
|
561
|
+
{
|
|
562
|
+
variant: d,
|
|
563
|
+
size: "sm",
|
|
564
|
+
leading: /* @__PURE__ */ a(v, { "aria-hidden": "true" }),
|
|
565
|
+
children: wt
|
|
566
|
+
}
|
|
567
|
+
);
|
|
568
|
+
}, mt = (e) => z ? null : /* @__PURE__ */ m(we, { children: [
|
|
569
|
+
k ? /* @__PURE__ */ a(
|
|
570
|
+
ne,
|
|
571
|
+
{
|
|
572
|
+
icon: /* @__PURE__ */ a(qt, {}),
|
|
573
|
+
intent: "ghost",
|
|
574
|
+
size: "sm",
|
|
575
|
+
"aria-label": o("tasksPanel.edit"),
|
|
576
|
+
onClick: () => k(e)
|
|
577
|
+
}
|
|
578
|
+
) : null,
|
|
579
|
+
y ? /* @__PURE__ */ a(
|
|
580
|
+
ne,
|
|
581
|
+
{
|
|
582
|
+
icon: /* @__PURE__ */ a(Wt, {}),
|
|
583
|
+
intent: "ghost",
|
|
584
|
+
size: "sm",
|
|
585
|
+
"aria-label": o("tasksPanel.dismiss"),
|
|
586
|
+
onClick: () => ge(e)
|
|
587
|
+
}
|
|
588
|
+
) : null
|
|
589
|
+
] }), vt = (e) => {
|
|
590
|
+
const d = (z ? null : Y == null ? void 0 : Y(e)) ?? mt(e), v = ft(e);
|
|
591
|
+
if (!(!v && !d))
|
|
592
|
+
return /* @__PURE__ */ m(we, { children: [
|
|
593
|
+
v,
|
|
594
|
+
d
|
|
595
|
+
] });
|
|
596
|
+
}, gt = !X && !x && n.length === 0, ht = !X && !x && n.length > 0 && M.length === 0, ye = (e) => /* @__PURE__ */ a(
|
|
597
|
+
"div",
|
|
598
|
+
{
|
|
599
|
+
"aria-hidden": "true",
|
|
600
|
+
className: "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
|
|
601
|
+
children: /* @__PURE__ */ a(St, { variant: "rectangular", height: "3.5rem" })
|
|
602
|
+
},
|
|
603
|
+
e
|
|
604
|
+
);
|
|
605
|
+
let P;
|
|
606
|
+
x ? P = /* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-h-0 ds:p-[var(--spacing-md)]", children: typeof x == "boolean" ? /* @__PURE__ */ a(
|
|
607
|
+
re,
|
|
608
|
+
{
|
|
609
|
+
variant: "error",
|
|
610
|
+
size: "sm",
|
|
611
|
+
title: o("tasksPanel.error.title"),
|
|
612
|
+
description: o("tasksPanel.error.description")
|
|
613
|
+
}
|
|
614
|
+
) : x }) : X ? P = /* @__PURE__ */ a("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) => ye(`skeleton-${e}`)) }) : gt ? P = /* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-h-0 ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ a(
|
|
615
|
+
re,
|
|
616
|
+
{
|
|
617
|
+
variant: "first-use",
|
|
618
|
+
size: "sm",
|
|
619
|
+
title: Ae ?? o("tasksPanel.empty.title"),
|
|
620
|
+
description: He ?? o("tasksPanel.empty.description"),
|
|
621
|
+
primaryAction: qe
|
|
622
|
+
}
|
|
623
|
+
) }) : ht ? P = /* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-h-0 ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ a(
|
|
624
|
+
re,
|
|
625
|
+
{
|
|
626
|
+
variant: "no-results",
|
|
627
|
+
size: "sm",
|
|
628
|
+
title: o("tasksPanel.filteredEmpty.title"),
|
|
629
|
+
description: o("tasksPanel.filteredEmpty.description"),
|
|
630
|
+
primaryAction: {
|
|
631
|
+
label: o("tasksPanel.filteredEmpty.clear"),
|
|
632
|
+
onClick: ot
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
) }) : P = /* @__PURE__ */ m(
|
|
636
|
+
"div",
|
|
637
|
+
{
|
|
638
|
+
ref: (e) => {
|
|
639
|
+
T.current = e, ut.current = e;
|
|
640
|
+
},
|
|
641
|
+
tabIndex: 0,
|
|
642
|
+
onScroll: ct,
|
|
643
|
+
"data-fade-top": nt ? "true" : void 0,
|
|
644
|
+
"data-fade-bottom": it ? "true" : void 0,
|
|
645
|
+
className: Xt,
|
|
646
|
+
children: [
|
|
647
|
+
/* @__PURE__ */ a("ol", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-md)] ds:p-0", children: ue.map((e) => /* @__PURE__ */ m(
|
|
648
|
+
"li",
|
|
649
|
+
{
|
|
650
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
|
|
651
|
+
children: [
|
|
652
|
+
/* @__PURE__ */ a(
|
|
653
|
+
rs,
|
|
654
|
+
{
|
|
655
|
+
bucketKey: e.key,
|
|
656
|
+
count: e.items.length,
|
|
657
|
+
label: Ve[e.key],
|
|
658
|
+
headerRef: e.key === "overdue" ? pe : void 0,
|
|
659
|
+
reflowId: `bucket-${e.key}`,
|
|
660
|
+
leaving: e.items.every((t) => ae(t.id))
|
|
661
|
+
}
|
|
662
|
+
),
|
|
663
|
+
/* @__PURE__ */ a("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) => /* @__PURE__ */ a(
|
|
664
|
+
zt,
|
|
665
|
+
{
|
|
666
|
+
item: t,
|
|
667
|
+
size: c,
|
|
668
|
+
onActivate: r ? () => r(t) : void 0,
|
|
669
|
+
actions: vt(t),
|
|
670
|
+
leading: i && !z ? /* @__PURE__ */ a(
|
|
671
|
+
Zt,
|
|
672
|
+
{
|
|
673
|
+
item: t,
|
|
674
|
+
label: o("tasksPanel.markDone"),
|
|
675
|
+
labelChecked: o("tasksPanel.markNotDone"),
|
|
676
|
+
reduceMotion: K,
|
|
677
|
+
onToggle: ve
|
|
678
|
+
}
|
|
679
|
+
) : void 0,
|
|
680
|
+
className: `${Jt} ${Re}${ae(t.id) ? ` ${Se}` : ""}`,
|
|
681
|
+
"data-leaving": ae(t.id) ? "" : void 0,
|
|
682
|
+
"data-reflow-id": t.id,
|
|
683
|
+
"data-task-id": t.id
|
|
684
|
+
},
|
|
685
|
+
t.id
|
|
686
|
+
)) })
|
|
687
|
+
]
|
|
688
|
+
},
|
|
689
|
+
e.key
|
|
690
|
+
)) }),
|
|
691
|
+
I ? ye("loading-more") : null,
|
|
692
|
+
!I && se && p ? /* @__PURE__ */ a("div", { className: "ds:flex ds:justify-center ds:py-[var(--spacing-sm)]", children: /* @__PURE__ */ a(oe, { intent: "ghost", size: "sm", onClick: p, children: o("tasksPanel.loadMore") }) }) : null
|
|
693
|
+
]
|
|
694
|
+
}
|
|
695
|
+
);
|
|
696
|
+
const be = ((g == null ? void 0 : g.length) ?? 0) > 1, kt = ["todo", "done", "all"], yt = ie && !z ? /* @__PURE__ */ a(
|
|
697
|
+
ne,
|
|
698
|
+
{
|
|
699
|
+
icon: /* @__PURE__ */ a(At, {}),
|
|
700
|
+
intent: "outline",
|
|
701
|
+
size: "sm",
|
|
702
|
+
"aria-label": o("tasksPanel.add"),
|
|
703
|
+
onClick: ie
|
|
704
|
+
}
|
|
705
|
+
) : void 0, bt = be || de ? /* @__PURE__ */ m("div", { className: "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
706
|
+
be ? /* @__PURE__ */ a(xe, { label: o("tasksPanel.scope.label"), children: g.map((e) => {
|
|
707
|
+
const t = Xe === e;
|
|
708
|
+
return /* @__PURE__ */ a(
|
|
709
|
+
oe,
|
|
710
|
+
{
|
|
711
|
+
intent: t ? "primary" : "outline",
|
|
712
|
+
size: "sm",
|
|
713
|
+
"aria-pressed": t,
|
|
714
|
+
onClick: () => ee(e),
|
|
715
|
+
children: Oe[e]
|
|
716
|
+
},
|
|
717
|
+
e
|
|
718
|
+
);
|
|
719
|
+
}) }) : null,
|
|
720
|
+
de ? /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
721
|
+
/* @__PURE__ */ a(xe, { label: o("tasksPanel.status.label"), children: kt.map((e) => {
|
|
722
|
+
const t = b === e;
|
|
723
|
+
return /* @__PURE__ */ a(
|
|
724
|
+
oe,
|
|
725
|
+
{
|
|
726
|
+
intent: t ? "primary" : "outline",
|
|
727
|
+
size: "sm",
|
|
728
|
+
"aria-pressed": t,
|
|
729
|
+
onClick: () => N(e),
|
|
730
|
+
children: Ke[e]
|
|
731
|
+
},
|
|
732
|
+
e
|
|
733
|
+
);
|
|
734
|
+
}) }),
|
|
735
|
+
Q && Q.length > 0 ? /* @__PURE__ */ a(
|
|
736
|
+
Ne,
|
|
737
|
+
{
|
|
738
|
+
size: "sm",
|
|
739
|
+
clearable: !0,
|
|
740
|
+
"aria-label": o("tasksPanel.type.label"),
|
|
741
|
+
placeholder: o("tasksPanel.type.placeholder"),
|
|
742
|
+
options: Q,
|
|
743
|
+
value: C ?? "",
|
|
744
|
+
onValueChange: (e) => _(e || null)
|
|
745
|
+
}
|
|
746
|
+
) : null,
|
|
747
|
+
Z && Z.length > 0 ? /* @__PURE__ */ a(
|
|
748
|
+
Ne,
|
|
749
|
+
{
|
|
750
|
+
size: "sm",
|
|
751
|
+
clearable: !0,
|
|
752
|
+
"aria-label": o("tasksPanel.assignee.label"),
|
|
753
|
+
placeholder: o("tasksPanel.assignee.placeholder"),
|
|
754
|
+
options: Z,
|
|
755
|
+
value: L ?? "",
|
|
756
|
+
onValueChange: (e) => D(e || null)
|
|
757
|
+
}
|
|
758
|
+
) : null,
|
|
759
|
+
/* @__PURE__ */ a(
|
|
760
|
+
Tt,
|
|
761
|
+
{
|
|
762
|
+
id: Le,
|
|
763
|
+
size: "sm",
|
|
764
|
+
label: o("tasksPanel.overdueOnly"),
|
|
765
|
+
checked: te,
|
|
766
|
+
onCheckedChange: R
|
|
767
|
+
}
|
|
768
|
+
)
|
|
769
|
+
] }) : null
|
|
770
|
+
] }) : void 0;
|
|
771
|
+
return /* @__PURE__ */ m(
|
|
772
|
+
"section",
|
|
773
|
+
{
|
|
774
|
+
ref: ke,
|
|
775
|
+
"data-component": "tasks-panel",
|
|
776
|
+
"data-component-id": s,
|
|
777
|
+
"aria-labelledby": ce ? void 0 : le,
|
|
778
|
+
"aria-label": ce,
|
|
779
|
+
className: Ut({ size: c, className: We }),
|
|
780
|
+
...$e,
|
|
781
|
+
children: [
|
|
782
|
+
/* @__PURE__ */ a(
|
|
783
|
+
Rt,
|
|
784
|
+
{
|
|
785
|
+
title: Me,
|
|
786
|
+
icon: /* @__PURE__ */ a(Ht, {}),
|
|
787
|
+
headingId: le,
|
|
788
|
+
actions: yt,
|
|
789
|
+
filters: bt
|
|
790
|
+
}
|
|
791
|
+
),
|
|
792
|
+
P
|
|
793
|
+
]
|
|
794
|
+
}
|
|
795
|
+
);
|
|
796
|
+
}
|
|
797
|
+
);
|
|
798
|
+
ns.displayName = "TasksPanel";
|
|
799
|
+
function rs({
|
|
800
|
+
bucketKey: s,
|
|
801
|
+
count: n,
|
|
802
|
+
label: l,
|
|
803
|
+
headerRef: u,
|
|
804
|
+
reflowId: c,
|
|
805
|
+
leaving: r = !1
|
|
806
|
+
}) {
|
|
807
|
+
return /* @__PURE__ */ m(
|
|
808
|
+
"div",
|
|
809
|
+
{
|
|
810
|
+
ref: u,
|
|
811
|
+
"data-bucket": s,
|
|
812
|
+
"data-reflow-id": c,
|
|
813
|
+
"data-leaving": r ? "" : void 0,
|
|
814
|
+
className: [
|
|
815
|
+
"ds:sticky ds:top-0 ds:z-[2] ds:bg-[color:var(--card)] ds:py-[var(--spacing-2xs)]",
|
|
816
|
+
"ds:flex ds:items-center ds:gap-[var(--spacing-2xs)] type-eyebrow",
|
|
817
|
+
// A header travels with its bucket, and leaves with it: a heading
|
|
818
|
+
// left standing over nothing, or snapping while its rows glide,
|
|
819
|
+
// reads as two lists rather than one.
|
|
820
|
+
Re,
|
|
821
|
+
"ds:transition-opacity ds:duration-[var(--animation-duration)]",
|
|
822
|
+
"ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none",
|
|
823
|
+
r ? Se : "",
|
|
824
|
+
s === "overdue" ? "ds:text-[color:var(--destructive)] ds:font-semibold" : s === "today" ? "ds:text-[color:var(--primary)] ds:font-semibold" : "ds:text-[color:var(--muted-foreground)]"
|
|
825
|
+
].filter(Boolean).join(" "),
|
|
826
|
+
children: [
|
|
827
|
+
s === "today" ? /* @__PURE__ */ a(
|
|
828
|
+
"span",
|
|
829
|
+
{
|
|
830
|
+
"aria-hidden": "true",
|
|
831
|
+
className: "ds:size-1.5 ds:shrink-0 ds:rounded-[var(--radius-full)] ds:bg-[color:var(--primary)]"
|
|
832
|
+
}
|
|
833
|
+
) : null,
|
|
834
|
+
l,
|
|
835
|
+
/* @__PURE__ */ a("span", { className: "ds:text-[color:var(--muted-foreground)]", children: `(${n})` })
|
|
836
|
+
]
|
|
837
|
+
}
|
|
838
|
+
);
|
|
839
|
+
}
|
|
840
|
+
export {
|
|
841
|
+
ns as T,
|
|
842
|
+
Gt as t
|
|
843
|
+
};
|
|
844
|
+
//# sourceMappingURL=tasks-panel-DLKpSNoE.js.map
|