@alfadocs/ui-kit 0.50.1 → 0.52.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/{agenda-card-BaSfVfrL.js → agenda-card-Bl-SBiCh.js} +55 -45
- package/dist/_chunks/agenda-tray-DA6qj8BL.js +203 -0
- package/dist/_chunks/{ai-consent-banner-F2md5JD3.js → ai-consent-banner-DBKV27je.js} +2 -2
- package/dist/_chunks/ai-tools-rail-7tC3GT4h.js +340 -0
- package/dist/_chunks/{alert-CUTxnym2.js → alert-_mUKLmwA.js} +54 -44
- package/dist/_chunks/{audio-recorder-DVJXV7_k.js → audio-recorder-D6OVfNiZ.js} +2 -2
- package/dist/_chunks/{booking-DljH0JkS.js → booking-BUV9fspj.js} +2 -2
- package/dist/_chunks/{document-scanner-Cxqvq7GR.js → document-scanner-biBS_f6c.js} +2 -2
- package/dist/_chunks/dropdown-menu-DwwPovMZ.js +354 -0
- package/dist/_chunks/{editable-currency-cell-renderer-Bh48OHRv.js → editable-currency-cell-renderer-D5C5tCfu.js} +3 -3
- package/dist/_chunks/{freemium-paywall-BWaLWje-.js → freemium-paywall-gHGA44dW.js} +2 -2
- package/dist/_chunks/{header-settings-Bx0Biimh.js → header-settings-D5Z2B_Yz.js} +3 -3
- package/dist/_chunks/{logo-yituK7sE.js → logo-1FuSGx0n.js} +2 -1
- package/dist/_chunks/marketplace-app-shell-C4OYAC22.js +513 -0
- package/dist/_chunks/maximize-2-Cm9OUQ2m.js +17 -0
- package/dist/_chunks/{patient-search-BJOmTmDA.js → patient-search-CArmRKeg.js} +3 -3
- package/dist/_chunks/patient-shell-Coarf346.js +162 -0
- package/dist/_chunks/{payment-form-xmeCkxas.js → payment-form-DJ9vnzrT.js} +2 -2
- package/dist/_chunks/{pdf-viewer-q1D3Uion.js → pdf-viewer-4odMFuFW.js} +2 -2
- package/dist/_chunks/{practice-results-Cq1y8JFD.js → practice-results-CtfciF2v.js} +3 -3
- package/dist/_chunks/{pregnancy-dating-DT_244bG.js → pregnancy-dating-BA37LSkF.js} +15 -15
- package/dist/_chunks/{privacy-lock-BmX_gkvt.js → privacy-lock-BN3L-alb.js} +2 -2
- package/dist/_chunks/{public-footer.agent-okt8ZRc5.js → public-footer.agent-CfXuW1x6.js} +2 -2
- package/dist/_chunks/{recaptcha-widget-CFYyLSEX.js → recaptcha-widget-BCNHsgqt.js} +2 -2
- package/dist/_chunks/{sidebar-h78cTNLh.js → sidebar-DPEHzxLZ.js} +397 -346
- package/dist/_chunks/{sign-document-CZkAf28g.js → sign-document-Bzld9jVM.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-CuYn_kKP.js → sign-in-with-alfadocs-button-BpAjVmsI.js} +2 -2
- package/dist/_chunks/{task-card-CPyQ5AXC.js → task-card-BwY9jaV1.js} +48 -42
- package/dist/_chunks/task-tray-Cb_hK4yb.js +234 -0
- package/dist/_chunks/{theme-toggle-ClATnY4Q.js → theme-toggle-DAW7uC0B.js} +3 -3
- package/dist/_chunks/use-edge-resize-ZnGG7gyO.js +139 -0
- package/dist/_chunks/use-theme-CAuo6EYT.js +159 -0
- package/dist/_chunks/{warning-stack-CXfoAT-_.js → warning-stack-Cv4fr5zo.js} +2 -2
- package/dist/_chunks/{workflow-map-DzX_LI4y.js → workflow-map-BJDUNYlX.js} +3 -3
- package/dist/agent-catalog.json +1 -1
- package/dist/brand/product-lockup/product-lockup.d.ts +47 -12
- package/dist/components/agenda-card/agenda-card.d.ts +19 -2
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/agenda-tray.d.ts +24 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +8 -0
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button-group/button-group.d.ts +1 -1
- package/dist/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +2 -0
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/form-field/form-field.d.ts +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/icon-button-group/icon-button-group.d.ts +15 -15
- package/dist/components/key-value-pair/key-value-pair.d.ts +1 -1
- package/dist/components/logo/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/radio-group/radio-group.d.ts +1 -1
- package/dist/components/recaptcha-widget/index.js +1 -1
- package/dist/components/separator/separator.d.ts +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sidebar/sidebar.d.ts +8 -0
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/tabs/tabs.d.ts +2 -2
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-card/task-card.d.ts +15 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/task-tray/task-tray.d.ts +24 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/components/workflow/workflow-map.d.ts +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +12 -10
- package/dist/hooks/use-edge-resize.d.ts +78 -0
- package/dist/i18n/locales/ar.d.ts +4 -0
- package/dist/i18n/locales/ar.js +7 -3
- package/dist/i18n/locales/de.d.ts +4 -0
- package/dist/i18n/locales/de.js +7 -3
- package/dist/i18n/locales/el.d.ts +4 -0
- package/dist/i18n/locales/el.js +7 -3
- package/dist/i18n/locales/en.d.ts +4 -0
- package/dist/i18n/locales/en.js +7 -3
- package/dist/i18n/locales/es.d.ts +4 -0
- package/dist/i18n/locales/es.js +7 -3
- package/dist/i18n/locales/fr.d.ts +4 -0
- package/dist/i18n/locales/fr.js +7 -3
- package/dist/i18n/locales/hi.d.ts +4 -0
- package/dist/i18n/locales/hi.js +7 -3
- package/dist/i18n/locales/it.d.ts +4 -0
- package/dist/i18n/locales/it.js +7 -3
- package/dist/i18n/locales/ja.d.ts +4 -0
- package/dist/i18n/locales/ja.js +7 -3
- package/dist/i18n/locales/nl.d.ts +4 -0
- package/dist/i18n/locales/nl.js +7 -3
- package/dist/i18n/locales/pl.d.ts +4 -0
- package/dist/i18n/locales/pl.js +7 -3
- package/dist/i18n/locales/pt.d.ts +4 -0
- package/dist/i18n/locales/pt.js +7 -3
- package/dist/i18n/locales/ro.d.ts +4 -0
- package/dist/i18n/locales/ro.js +7 -3
- package/dist/i18n/locales/ru.d.ts +4 -0
- package/dist/i18n/locales/ru.js +7 -3
- package/dist/i18n/locales/sq.d.ts +4 -0
- package/dist/i18n/locales/sq.js +7 -3
- package/dist/i18n/locales/sv.d.ts +4 -0
- package/dist/i18n/locales/sv.js +7 -3
- package/dist/i18n/locales/tr.d.ts +4 -0
- package/dist/i18n/locales/tr.js +7 -3
- package/dist/i18n/locales/zh.d.ts +4 -0
- package/dist/i18n/locales/zh.js +7 -3
- package/dist/index.js +31 -31
- package/dist/locales/ar.json +7 -3
- package/dist/locales/de.json +7 -3
- package/dist/locales/el.json +7 -3
- package/dist/locales/en.json +7 -3
- package/dist/locales/es.json +7 -3
- package/dist/locales/fr.json +7 -3
- package/dist/locales/hi.json +7 -3
- package/dist/locales/it.json +7 -3
- package/dist/locales/ja.json +7 -3
- package/dist/locales/nl.json +7 -3
- package/dist/locales/pl.json +7 -3
- package/dist/locales/pt.json +7 -3
- package/dist/locales/ro.json +7 -3
- package/dist/locales/ru.json +7 -3
- package/dist/locales/sq.json +7 -3
- package/dist/locales/sv.json +7 -3
- package/dist/locales/tr.json +7 -3
- package/dist/locales/zh.json +7 -3
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +8 -6
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/agenda-tray-DQayYmQ0.js +0 -165
- package/dist/_chunks/ai-tools-rail-CYLWrRmm.js +0 -280
- package/dist/_chunks/circle-arrow-up-CC_85SuH.js +0 -16
- package/dist/_chunks/dropdown-menu-CUEXqKis.js +0 -299
- package/dist/_chunks/marketplace-app-shell-UKSLx9K_.js +0 -428
- package/dist/_chunks/patient-shell-DUmhXnFq.js +0 -174
- package/dist/_chunks/task-tray-B8jFv5FV.js +0 -196
- package/dist/_chunks/use-theme-C2dHKUAN.js +0 -145
|
@@ -2,7 +2,7 @@ import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as ce, useId as le, useMemo as G, useRef as L, useState as x, useEffect as _, useCallback as l, useImperativeHandle as ue } from "react";
|
|
3
3
|
import { c as i } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as me } from "react-i18next";
|
|
5
|
-
import { P as ge } from "./pdf-viewer-
|
|
5
|
+
import { P as ge } from "./pdf-viewer-4odMFuFW.js";
|
|
6
6
|
import { S as pe } from "./signature-capture-CpMBhqQ9.js";
|
|
7
7
|
import { u as fe } from "./registry-nPAVE19X.js";
|
|
8
8
|
import { C as J } from "./circle-check-9AeSgJD_.js";
|
|
@@ -341,4 +341,4 @@ export {
|
|
|
341
341
|
je as S,
|
|
342
342
|
ve as s
|
|
343
343
|
};
|
|
344
|
-
//# sourceMappingURL=sign-document-
|
|
344
|
+
//# sourceMappingURL=sign-document-Bzld9jVM.js.map
|
|
@@ -2,7 +2,7 @@ import { jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as L, useRef as c, useEffect as b } from "react";
|
|
3
3
|
import { useTranslation as y } from "react-i18next";
|
|
4
4
|
import { B as E } from "./button-DD_0Xdmr.js";
|
|
5
|
-
import { L as I } from "./logo-
|
|
5
|
+
import { L as I } from "./logo-1FuSGx0n.js";
|
|
6
6
|
import { S as g } from "./spinner-OjQNn8oN.js";
|
|
7
7
|
const A = /* @__PURE__ */ new Set([
|
|
8
8
|
"primary",
|
|
@@ -46,4 +46,4 @@ B.displayName = "SignInWithAlfadocsButton";
|
|
|
46
46
|
export {
|
|
47
47
|
B as S
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=sign-in-with-alfadocs-button-
|
|
49
|
+
//# sourceMappingURL=sign-in-with-alfadocs-button-BpAjVmsI.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { C as
|
|
6
|
-
import { S as
|
|
7
|
-
import { C } from "./circle-alert-ChA9opNA.js";
|
|
8
|
-
import { S as
|
|
9
|
-
const
|
|
1
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b } from "react";
|
|
3
|
+
import { c as g } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as x } from "react-i18next";
|
|
5
|
+
import { C as y } from "./chevron-right-BrpYejk0.js";
|
|
6
|
+
import { S as N } from "./square-check-big-Jr-0202D.js";
|
|
7
|
+
import { C as k } from "./circle-alert-ChA9opNA.js";
|
|
8
|
+
import { S as C } from "./square-CZoGU14v.js";
|
|
9
|
+
const L = g(
|
|
10
10
|
[
|
|
11
11
|
"ds:relative ds:flex ds:items-start ds:gap-[var(--spacing-sm)]",
|
|
12
12
|
"ds:rounded-[var(--radius-sm)]",
|
|
@@ -32,7 +32,7 @@ const k = b(
|
|
|
32
32
|
interactive: !1
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
),
|
|
35
|
+
), u = [
|
|
36
36
|
"ds:focus-visible:outline-none",
|
|
37
37
|
"ds:after:content-[''] ds:after:absolute ds:after:inset-0 ds:after:rounded-[var(--radius-sm)]",
|
|
38
38
|
"ds:after:pointer-events-auto",
|
|
@@ -42,64 +42,70 @@ const k = b(
|
|
|
42
42
|
"ds:focus-visible:after:outline-offset-[length:var(--focus-ring-offset)]",
|
|
43
43
|
"ds:forced-colors:focus-visible:after:outline-[CanvasText]"
|
|
44
44
|
].join(" ");
|
|
45
|
-
function
|
|
45
|
+
function w(s) {
|
|
46
46
|
return /^(https?:\/\/(?!\/)|\/(?!\/)|#)/.test(s);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function z({
|
|
49
49
|
status: s,
|
|
50
50
|
priority: a
|
|
51
51
|
}) {
|
|
52
|
-
const
|
|
53
|
-
return s === "done" ? /* @__PURE__ */
|
|
52
|
+
const e = a === "high" ? "ds:text-[color:var(--destructive)]" : "ds:text-[color:var(--muted-foreground)]";
|
|
53
|
+
return s === "done" ? /* @__PURE__ */ r(N, { "aria-hidden": "true", className: `ds:size-4 ${e}` }) : a === "high" ? /* @__PURE__ */ r(k, { "aria-hidden": "true", className: `ds:size-4 ${e}` }) : /* @__PURE__ */ r(C, { "aria-hidden": "true", className: `ds:size-4 ${e}` });
|
|
54
54
|
}
|
|
55
|
-
const
|
|
56
|
-
({ item: s, size: a = "sm", onActivate:
|
|
57
|
-
const { t:
|
|
55
|
+
const S = b(
|
|
56
|
+
({ item: s, size: a = "sm", onActivate: e, actions: l, className: f, ...p }, m) => {
|
|
57
|
+
const { t: h } = x(), t = !!e, v = !!s.url && w(s.url), i = h("taskCard.itemLabel", {
|
|
58
58
|
title: s.title,
|
|
59
59
|
due: s.dueLabel ?? "",
|
|
60
60
|
defaultValue: '{{title}}{{due, prepend, " · "}}'
|
|
61
|
-
}),
|
|
61
|
+
}), n = /* @__PURE__ */ r("span", { className: "ds:flex-1 ds:min-w-0 ds:truncate type-body-sm ds:text-[color:var(--foreground)]", children: s.title });
|
|
62
62
|
let d;
|
|
63
|
-
return t &&
|
|
63
|
+
return t && v ? d = /* @__PURE__ */ r(
|
|
64
64
|
"a",
|
|
65
65
|
{
|
|
66
66
|
href: s.url,
|
|
67
|
-
"aria-label":
|
|
68
|
-
className:
|
|
67
|
+
"aria-label": i,
|
|
68
|
+
className: u + " ds:contents",
|
|
69
69
|
onClick: (o) => {
|
|
70
|
-
o.defaultPrevented || o.metaKey || o.ctrlKey || o.shiftKey ||
|
|
70
|
+
o.defaultPrevented || o.metaKey || o.ctrlKey || o.shiftKey || e == null || e(s);
|
|
71
71
|
},
|
|
72
|
-
children:
|
|
72
|
+
children: n
|
|
73
73
|
}
|
|
74
|
-
) : t ? d = /* @__PURE__ */
|
|
74
|
+
) : t ? d = /* @__PURE__ */ r(
|
|
75
75
|
"button",
|
|
76
76
|
{
|
|
77
77
|
type: "button",
|
|
78
|
-
"aria-label":
|
|
79
|
-
className:
|
|
80
|
-
onClick: () =>
|
|
81
|
-
children:
|
|
78
|
+
"aria-label": i,
|
|
79
|
+
className: u + " ds:contents ds:bg-transparent ds:border-0 ds:p-0 ds:text-start",
|
|
80
|
+
onClick: () => e == null ? void 0 : e(s),
|
|
81
|
+
children: n
|
|
82
82
|
}
|
|
83
|
-
) : d =
|
|
83
|
+
) : d = n, /* @__PURE__ */ c(
|
|
84
84
|
"div",
|
|
85
85
|
{
|
|
86
|
-
ref:
|
|
86
|
+
ref: m,
|
|
87
87
|
role: "listitem",
|
|
88
88
|
"data-component": "task-card",
|
|
89
89
|
"data-component-id": s.id,
|
|
90
90
|
"data-status": s.status ?? "open",
|
|
91
91
|
"data-priority": s.priority ?? "normal",
|
|
92
|
-
className:
|
|
93
|
-
...
|
|
92
|
+
className: L({ size: a, interactive: t, className: f }),
|
|
93
|
+
...p,
|
|
94
94
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ r("span", { className: "ds:mt-[var(--spacing-2xs)] ds:shrink-0", children: /* @__PURE__ */ r(z, { status: s.status, priority: s.priority }) }),
|
|
96
|
+
/* @__PURE__ */ c("div", { className: "ds:flex-1 ds:min-w-0 ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
97
97
|
d,
|
|
98
|
-
s.description ? /* @__PURE__ */
|
|
99
|
-
s.
|
|
98
|
+
s.description ? /* @__PURE__ */ r("span", { className: "type-body-sm ds:text-[color:var(--muted-foreground)] ds:truncate", children: s.description }) : null,
|
|
99
|
+
s.note ? /* @__PURE__ */ r("span", { className: "type-body-sm ds:text-[color:var(--muted-foreground)] ds:line-clamp-2", children: s.note }) : null,
|
|
100
|
+
s.linkedLabel ? /* @__PURE__ */ r("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)] ds:truncate", children: s.linkedLabel }) : null,
|
|
101
|
+
s.dueLabel ? /* @__PURE__ */ r("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)]", children: s.dueLabel }) : null
|
|
100
102
|
] }),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
+
l ? (
|
|
104
|
+
// Above the stretched-link overlay so the buttons stay clickable.
|
|
105
|
+
/* @__PURE__ */ r("span", { className: "ds:relative ds:z-[1] ds:flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:shrink-0", children: l })
|
|
106
|
+
) : null,
|
|
107
|
+
t ? /* @__PURE__ */ r(
|
|
108
|
+
y,
|
|
103
109
|
{
|
|
104
110
|
"aria-hidden": "true",
|
|
105
111
|
className: "ds:mt-[var(--spacing-2xs)] ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:opacity-0 ds:transition-opacity ds:motion-reduce:transition-none ds:group-hover:opacity-100 ds:group-focus-within:opacity-100 ds:rtl:rotate-180"
|
|
@@ -110,9 +116,9 @@ const w = v(
|
|
|
110
116
|
);
|
|
111
117
|
}
|
|
112
118
|
);
|
|
113
|
-
|
|
119
|
+
S.displayName = "TaskCard";
|
|
114
120
|
export {
|
|
115
|
-
|
|
116
|
-
|
|
121
|
+
S as T,
|
|
122
|
+
w as i
|
|
117
123
|
};
|
|
118
|
-
//# sourceMappingURL=task-card-
|
|
124
|
+
//# sourceMappingURL=task-card-BwY9jaV1.js.map
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { jsx as s, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as K, useRef as N, useMemo as E, useImperativeHandle as P } from "react";
|
|
3
|
+
import { c as B } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as H } from "react-i18next";
|
|
5
|
+
import { I as L } from "./icon-button-CKEOrN37.js";
|
|
6
|
+
import { S as A } from "./skeleton-CZbwyJAA.js";
|
|
7
|
+
import { E as V } from "./empty-state-BLy7tigq.js";
|
|
8
|
+
import { T as F } from "./task-card-BwY9jaV1.js";
|
|
9
|
+
import { u as G } from "./registry-nPAVE19X.js";
|
|
10
|
+
import { c as J } from "./createLucideIcon-CrFbzy84.js";
|
|
11
|
+
import { P as Q } from "./plus-CYKNmfuA.js";
|
|
12
|
+
/**
|
|
13
|
+
* @license lucide-react v1.8.0 - ISC
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the ISC license.
|
|
16
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/
|
|
18
|
+
const U = [
|
|
19
|
+
["path", { d: "M13 5h8", key: "a7qcls" }],
|
|
20
|
+
["path", { d: "M13 12h8", key: "h98zly" }],
|
|
21
|
+
["path", { d: "M13 19h8", key: "c3s6r1" }],
|
|
22
|
+
["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }],
|
|
23
|
+
["rect", { x: "3", y: "4", width: "6", height: "6", rx: "1", key: "cif1o7" }]
|
|
24
|
+
], W = J("list-todo", U), X = {
|
|
25
|
+
id: "task-tray",
|
|
26
|
+
capabilities: ["select_single", "dismiss"],
|
|
27
|
+
state: {
|
|
28
|
+
items: {
|
|
29
|
+
type: "Array<{ id: string; status: string }>",
|
|
30
|
+
descriptionKey: "ui.agent.taskTray.state.items",
|
|
31
|
+
description: "Currently-displayed tasks. Ids + status only — never task title / patient.",
|
|
32
|
+
read: (e) => e.getItems()
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
actions: {
|
|
36
|
+
select_item: {
|
|
37
|
+
safety: "read",
|
|
38
|
+
argsType: "{ id: string }",
|
|
39
|
+
descriptionKey: "ui.agent.taskTray.actions.selectItem",
|
|
40
|
+
description: "Activate the task with the given id.",
|
|
41
|
+
invoke: (e, a) => {
|
|
42
|
+
e.selectItem(a.id);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
toggle_done: {
|
|
46
|
+
safety: "write",
|
|
47
|
+
argsType: "{ id: string }",
|
|
48
|
+
descriptionKey: "ui.agent.taskTray.actions.toggleDone",
|
|
49
|
+
description: "Request the host to toggle the done state of a task.",
|
|
50
|
+
invoke: (e, a) => {
|
|
51
|
+
e.toggleDone(a.id);
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
dismiss: {
|
|
55
|
+
safety: "destructive",
|
|
56
|
+
argsType: "{ id: string }",
|
|
57
|
+
descriptionKey: "ui.agent.taskTray.actions.dismiss",
|
|
58
|
+
description: "Request the host to dismiss / remove the task with the given id.",
|
|
59
|
+
invoke: (e, a) => {
|
|
60
|
+
e.dismiss(a.id);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
domHooks: {
|
|
65
|
+
root: {
|
|
66
|
+
attr: "data-component",
|
|
67
|
+
value: "task-tray",
|
|
68
|
+
description: "Marks the TaskTray wrapper."
|
|
69
|
+
},
|
|
70
|
+
instanceId: {
|
|
71
|
+
attr: "data-component-id",
|
|
72
|
+
sourceProp: "id",
|
|
73
|
+
description: "Sourced from the id prop. Required to address a specific tray from the agent."
|
|
74
|
+
},
|
|
75
|
+
item: {
|
|
76
|
+
attr: "data-task-id",
|
|
77
|
+
description: "Stable task id emitted on each rendered TaskCard inside the tray."
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}, Y = B(
|
|
81
|
+
[
|
|
82
|
+
"ds:flex ds:flex-col",
|
|
83
|
+
"ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)]",
|
|
84
|
+
"ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2",
|
|
85
|
+
"ds:bg-[color:var(--card)] ds:text-[color:var(--card-foreground)]",
|
|
86
|
+
"ds:overflow-hidden"
|
|
87
|
+
].join(" "),
|
|
88
|
+
{
|
|
89
|
+
variants: {
|
|
90
|
+
size: {
|
|
91
|
+
sm: "",
|
|
92
|
+
md: ""
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
defaultVariants: {
|
|
96
|
+
size: "sm"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
), Z = K(
|
|
100
|
+
({
|
|
101
|
+
id: e,
|
|
102
|
+
items: a,
|
|
103
|
+
title: T,
|
|
104
|
+
size: v = "sm",
|
|
105
|
+
onOpenTask: r,
|
|
106
|
+
onToggleDone: n,
|
|
107
|
+
onDismissTask: c,
|
|
108
|
+
onAddTask: g,
|
|
109
|
+
addLabel: I,
|
|
110
|
+
loading: p = !1,
|
|
111
|
+
emptyTitle: R,
|
|
112
|
+
emptyDescription: _,
|
|
113
|
+
emptyAction: j,
|
|
114
|
+
viewAllLabel: k,
|
|
115
|
+
onViewAll: b,
|
|
116
|
+
renderItemActions: f,
|
|
117
|
+
scrollable: u = !1,
|
|
118
|
+
className: z,
|
|
119
|
+
...C
|
|
120
|
+
}, q) => {
|
|
121
|
+
const { t: l } = H(), h = T ?? l("taskTray.title", "Tasks"), M = I ?? l("taskTray.add", "Add task"), x = !p && a.length === 0;
|
|
122
|
+
let m;
|
|
123
|
+
p ? m = /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [0, 1, 2].map((t) => /* @__PURE__ */ s(A, { variant: "rectangular", height: "2.5rem" }, t)) }) : x ? m = /* @__PURE__ */ s("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ s(
|
|
124
|
+
V,
|
|
125
|
+
{
|
|
126
|
+
variant: "first-use",
|
|
127
|
+
size: "sm",
|
|
128
|
+
title: R ?? l("taskTray.empty.title", "No tasks yet"),
|
|
129
|
+
description: _ ?? l("taskTray.empty.description", "New tasks will appear here."),
|
|
130
|
+
primaryAction: j
|
|
131
|
+
}
|
|
132
|
+
) }) : m = /* @__PURE__ */ s(
|
|
133
|
+
"ul",
|
|
134
|
+
{
|
|
135
|
+
className: [
|
|
136
|
+
// flex-1 unconditionally so a footer pins to the tray's
|
|
137
|
+
// bottom edge in equal-height grid rows.
|
|
138
|
+
"ds:flex ds:list-none ds:flex-col ds:flex-1 ds:min-h-0",
|
|
139
|
+
// Keyboard-focusable when it scrolls (axe
|
|
140
|
+
// scrollable-region-focusable) — pair with a height on the
|
|
141
|
+
// tray's className.
|
|
142
|
+
u ? "ds:overflow-y-auto" : ""
|
|
143
|
+
].filter(Boolean).join(" "),
|
|
144
|
+
tabIndex: u ? 0 : void 0,
|
|
145
|
+
"aria-label": u ? h : void 0,
|
|
146
|
+
children: a.map((t) => /* @__PURE__ */ s(
|
|
147
|
+
F,
|
|
148
|
+
{
|
|
149
|
+
item: t,
|
|
150
|
+
size: v,
|
|
151
|
+
onActivate: r,
|
|
152
|
+
actions: f == null ? void 0 : f(t),
|
|
153
|
+
"data-task-id": t.id
|
|
154
|
+
},
|
|
155
|
+
t.id
|
|
156
|
+
))
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
const d = N(a);
|
|
160
|
+
d.current = a;
|
|
161
|
+
const S = E(
|
|
162
|
+
() => ({
|
|
163
|
+
getItems: () => d.current.map((t) => ({
|
|
164
|
+
id: t.id,
|
|
165
|
+
status: t.status ?? "open"
|
|
166
|
+
})),
|
|
167
|
+
selectItem: (t) => {
|
|
168
|
+
const i = d.current.find((o) => o.id === t);
|
|
169
|
+
i && (r == null || r(i));
|
|
170
|
+
},
|
|
171
|
+
toggleDone: (t) => {
|
|
172
|
+
const i = d.current.find((o) => o.id === t);
|
|
173
|
+
i && (n == null || n(i));
|
|
174
|
+
},
|
|
175
|
+
dismiss: (t) => {
|
|
176
|
+
const i = d.current.find((o) => o.id === t);
|
|
177
|
+
i && (c == null || c(i));
|
|
178
|
+
}
|
|
179
|
+
}),
|
|
180
|
+
[r, n, c]
|
|
181
|
+
), w = N(null);
|
|
182
|
+
return P(q, () => w.current, []), G(X, S, e), /* @__PURE__ */ y(
|
|
183
|
+
"section",
|
|
184
|
+
{
|
|
185
|
+
ref: w,
|
|
186
|
+
"aria-label": h,
|
|
187
|
+
"data-component": "task-tray",
|
|
188
|
+
"data-component-id": e,
|
|
189
|
+
className: Y({ size: v, className: z }),
|
|
190
|
+
...C,
|
|
191
|
+
children: [
|
|
192
|
+
/* @__PURE__ */ y("header", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [
|
|
193
|
+
/* @__PURE__ */ y("h3", { className: "ds:m-0 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-card", children: [
|
|
194
|
+
/* @__PURE__ */ s(W, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
195
|
+
h
|
|
196
|
+
] }),
|
|
197
|
+
g ? /* @__PURE__ */ s(
|
|
198
|
+
L,
|
|
199
|
+
{
|
|
200
|
+
icon: /* @__PURE__ */ s(Q, {}),
|
|
201
|
+
intent: "outline",
|
|
202
|
+
size: "sm",
|
|
203
|
+
"aria-label": M,
|
|
204
|
+
onClick: g
|
|
205
|
+
}
|
|
206
|
+
) : null
|
|
207
|
+
] }),
|
|
208
|
+
m,
|
|
209
|
+
k && b && !x && !p ? /* @__PURE__ */ s("footer", { className: "ds:[border-block-start:var(--border-width-sm)_solid_var(--card-border)] ds:p-[var(--spacing-sm)]", children: /* @__PURE__ */ s(
|
|
210
|
+
"button",
|
|
211
|
+
{
|
|
212
|
+
type: "button",
|
|
213
|
+
onClick: b,
|
|
214
|
+
className: [
|
|
215
|
+
"type-label ds:text-[color:var(--link)] ds:underline ds:underline-offset-2 ds:hover:no-underline",
|
|
216
|
+
"ds:rounded-[var(--radius-sm)] ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]",
|
|
217
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
218
|
+
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
219
|
+
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
220
|
+
].join(" "),
|
|
221
|
+
children: k
|
|
222
|
+
}
|
|
223
|
+
) }) : null
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
Z.displayName = "TaskTray";
|
|
230
|
+
export {
|
|
231
|
+
Z as T,
|
|
232
|
+
X as t
|
|
233
|
+
};
|
|
234
|
+
//# sourceMappingURL=task-tray-Cb_hK4yb.js.map
|
|
@@ -5,8 +5,8 @@ import { useTranslation as g } from "react-i18next";
|
|
|
5
5
|
import { I as y } from "./icon-button-CKEOrN37.js";
|
|
6
6
|
import { I as K } from "./icon-button-group-C48khLE0.js";
|
|
7
7
|
import { S as x } from "./switch-BJ6HD3Mn.js";
|
|
8
|
-
import { D as o } from "./dropdown-menu-
|
|
9
|
-
import { u as z } from "./use-theme-
|
|
8
|
+
import { D as o } from "./dropdown-menu-DwwPovMZ.js";
|
|
9
|
+
import { u as z } from "./use-theme-CAuo6EYT.js";
|
|
10
10
|
import { u as D } from "./registry-nPAVE19X.js";
|
|
11
11
|
import { M as v, S as C } from "./sun-BuXE0xUS.js";
|
|
12
12
|
import { M as w } from "./monitor-D-SFdbrU.js";
|
|
@@ -352,4 +352,4 @@ export {
|
|
|
352
352
|
O as T,
|
|
353
353
|
H as t
|
|
354
354
|
};
|
|
355
|
-
//# sourceMappingURL=theme-toggle-
|
|
355
|
+
//# sourceMappingURL=theme-toggle-DAW7uC0B.js.map
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { useState as X, useRef as T, useCallback as o } from "react";
|
|
2
|
+
import { useTranslation as B } from "react-i18next";
|
|
3
|
+
import { u as L } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
4
|
+
const S = 16, Y = 64;
|
|
5
|
+
function O({
|
|
6
|
+
edge: I,
|
|
7
|
+
targetRef: e,
|
|
8
|
+
cssProperty: d,
|
|
9
|
+
minSize: i,
|
|
10
|
+
maxSize: p,
|
|
11
|
+
defaultSize: C,
|
|
12
|
+
disabled: c = !1,
|
|
13
|
+
onResize: n
|
|
14
|
+
}) {
|
|
15
|
+
const { t: b } = B(), [f, E] = X(null), [x, P] = X(!1), h = T(null), m = T(null);
|
|
16
|
+
L(() => {
|
|
17
|
+
const t = e.current;
|
|
18
|
+
if (!t) return;
|
|
19
|
+
const r = t.getBoundingClientRect().width;
|
|
20
|
+
r > 0 && (h.current = r);
|
|
21
|
+
});
|
|
22
|
+
const y = o(
|
|
23
|
+
(t) => Math.min(p, Math.max(i, t)),
|
|
24
|
+
[i, p]
|
|
25
|
+
), s = o(() => {
|
|
26
|
+
if (f !== null) return f;
|
|
27
|
+
const t = e.current;
|
|
28
|
+
if (t) {
|
|
29
|
+
const r = t.getBoundingClientRect().width;
|
|
30
|
+
if (r > 0)
|
|
31
|
+
return h.current = r, r;
|
|
32
|
+
}
|
|
33
|
+
return h.current ?? C;
|
|
34
|
+
}, [f, C, e]), a = o(
|
|
35
|
+
(t) => {
|
|
36
|
+
var u;
|
|
37
|
+
const r = y(t);
|
|
38
|
+
return E(r), (u = e.current) == null || u.style.setProperty(d, `${r}px`), r;
|
|
39
|
+
},
|
|
40
|
+
[y, d, e]
|
|
41
|
+
), w = o(() => {
|
|
42
|
+
var t;
|
|
43
|
+
E(null), (t = e.current) == null || t.style.removeProperty(d), h.current = null, n == null || n(null);
|
|
44
|
+
}, [d, n, e]), g = o(() => {
|
|
45
|
+
const t = e.current, r = t ? getComputedStyle(t).direction === "rtl" : !1;
|
|
46
|
+
return (I === "inline-end" ? 1 : -1) * (r ? -1 : 1);
|
|
47
|
+
}, [I, e]), A = o(
|
|
48
|
+
(t) => {
|
|
49
|
+
c || !t.isPrimary || (t.currentTarget.setPointerCapture(t.pointerId), m.current = {
|
|
50
|
+
pointerId: t.pointerId,
|
|
51
|
+
startX: t.clientX,
|
|
52
|
+
startSize: s(),
|
|
53
|
+
sign: g()
|
|
54
|
+
}, P(!0));
|
|
55
|
+
},
|
|
56
|
+
[c, s, g]
|
|
57
|
+
), K = o(
|
|
58
|
+
(t) => {
|
|
59
|
+
const r = m.current;
|
|
60
|
+
!r || t.pointerId !== r.pointerId || a(r.startSize + r.sign * (t.clientX - r.startX));
|
|
61
|
+
},
|
|
62
|
+
[a]
|
|
63
|
+
), k = o(
|
|
64
|
+
(t) => {
|
|
65
|
+
const r = m.current;
|
|
66
|
+
if (!r || t.pointerId !== r.pointerId) return;
|
|
67
|
+
t.currentTarget.releasePointerCapture(t.pointerId), m.current = null, P(!1);
|
|
68
|
+
const u = a(
|
|
69
|
+
r.startSize + r.sign * (t.clientX - r.startX)
|
|
70
|
+
);
|
|
71
|
+
n == null || n(u);
|
|
72
|
+
},
|
|
73
|
+
[a, n]
|
|
74
|
+
), M = o(
|
|
75
|
+
(t) => {
|
|
76
|
+
if (c) return;
|
|
77
|
+
const r = t.shiftKey ? Y : S, u = g();
|
|
78
|
+
let l = null;
|
|
79
|
+
switch (t.key) {
|
|
80
|
+
case "ArrowRight":
|
|
81
|
+
l = s() + u * r;
|
|
82
|
+
break;
|
|
83
|
+
case "ArrowLeft":
|
|
84
|
+
l = s() - u * r;
|
|
85
|
+
break;
|
|
86
|
+
case "Home":
|
|
87
|
+
l = i;
|
|
88
|
+
break;
|
|
89
|
+
case "End":
|
|
90
|
+
l = p;
|
|
91
|
+
break;
|
|
92
|
+
case "Enter":
|
|
93
|
+
t.preventDefault(), w();
|
|
94
|
+
return;
|
|
95
|
+
default:
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (l === null) return;
|
|
99
|
+
t.preventDefault();
|
|
100
|
+
const _ = a(l);
|
|
101
|
+
n == null || n(_);
|
|
102
|
+
},
|
|
103
|
+
[
|
|
104
|
+
a,
|
|
105
|
+
s,
|
|
106
|
+
c,
|
|
107
|
+
p,
|
|
108
|
+
i,
|
|
109
|
+
n,
|
|
110
|
+
w,
|
|
111
|
+
g
|
|
112
|
+
]
|
|
113
|
+
), D = Math.round(s());
|
|
114
|
+
return {
|
|
115
|
+
separatorProps: {
|
|
116
|
+
role: "separator",
|
|
117
|
+
tabIndex: c ? -1 : 0,
|
|
118
|
+
"aria-orientation": "vertical",
|
|
119
|
+
"aria-valuemin": i,
|
|
120
|
+
"aria-valuemax": p,
|
|
121
|
+
"aria-valuenow": D,
|
|
122
|
+
"aria-valuetext": b("resizable.widthAnnounce", { width: D }),
|
|
123
|
+
"aria-disabled": c || void 0,
|
|
124
|
+
onPointerDown: A,
|
|
125
|
+
onPointerMove: K,
|
|
126
|
+
onPointerUp: k,
|
|
127
|
+
onPointerCancel: k,
|
|
128
|
+
onKeyDown: M,
|
|
129
|
+
onDoubleClick: w
|
|
130
|
+
},
|
|
131
|
+
isResizing: x,
|
|
132
|
+
isResized: f !== null,
|
|
133
|
+
reset: w
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
export {
|
|
137
|
+
O as u
|
|
138
|
+
};
|
|
139
|
+
//# sourceMappingURL=use-edge-resize-ZnGG7gyO.js.map
|