@alfadocs/ui-kit 0.47.0 → 0.48.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-CFyWSX7Z.js → agenda-card-BaSfVfrL.js} +25 -29
- package/dist/_chunks/{agenda-tray-Dyj9ChHC.js → agenda-tray-DQayYmQ0.js} +50 -67
- package/dist/_chunks/ai-consent-banner-DO5ingMq.js +169 -0
- package/dist/_chunks/ai-tools-rail-CxYG04cw.js +280 -0
- package/dist/_chunks/{alia-sidebar-CVIPrdc9.js → alia-sidebar-DlvyXgVC.js} +3 -2
- package/dist/_chunks/anamnesis-card-CmkBVAln.js +156 -0
- package/dist/_chunks/appointment-tray-BwDHhWWC.js +419 -0
- package/dist/_chunks/{bmi-calculator-CQqXTVNL.js → bmi-calculator-DdylQzT6.js} +2 -2
- package/dist/_chunks/{booking-DlDVuWMd.js → booking-WV2GSru5.js} +291 -303
- package/dist/_chunks/{calculator-dialog-D-nfvteH.js → calculator-dialog-CFk4I91b.js} +2 -2
- package/dist/_chunks/calendar-days-C4BmpCZg.js +23 -0
- package/dist/_chunks/{calendar-YHFknAGv.js → calendar-oYWOCrnf.js} +195 -210
- package/dist/_chunks/care-plan-card-QmNpGggC.js +252 -0
- package/dist/_chunks/care-plan-entry-card-Cnra7vUc.js +318 -0
- package/dist/_chunks/{chat-message-B5JpFj0F.js → chat-message-Dm8U2RY1.js} +36 -35
- package/dist/_chunks/clinical-note-card-BYo437dU.js +333 -0
- package/dist/_chunks/{contact-profile-card-DHyuAPXM.js → contact-profile-card-DvvVfAA2.js} +102 -115
- package/dist/_chunks/{cycle-calculator-KxA8dqDf.js → cycle-calculator-DYvGm_m1.js} +2 -2
- package/dist/_chunks/{dialog-BTpZV6It.js → dialog-DMGnSelc.js} +55 -55
- package/dist/_chunks/{due-date-calculator-mFxpHLml.js → due-date-calculator-BXd3ANj7.js} +2 -2
- package/dist/_chunks/entity-card-COhmqHly.js +69 -0
- package/dist/_chunks/{gestational-age-calculator-gWI_uRA1.js → gestational-age-calculator-Crj6FgZw.js} +2 -2
- package/dist/_chunks/{insert-result-C5ABnzDl.js → insert-result-DNdi_JYW.js} +140 -168
- package/dist/_chunks/is-safe-url-DkETxeHz.js +7 -0
- package/dist/_chunks/languages-DsVf_WzT.js +19 -0
- package/dist/_chunks/layers-pzGcbLPj.js +34 -0
- package/dist/_chunks/{message-card-DSPw5ghw.js → message-card-Dvl1TgaN.js} +15 -19
- package/dist/_chunks/{message-tray-hSQff9u4.js → message-tray-Dl6GQaaV.js} +2 -2
- package/dist/_chunks/operator-hero-CM8949Hd.js +198 -0
- package/dist/_chunks/patient-summary-card-BnTqxcTr.js +443 -0
- package/dist/_chunks/payment-request-card-B_lyobd0.js +478 -0
- package/dist/_chunks/{pdf-viewer-CWEXTlwq.js → pdf-viewer-G8SU6Azw.js} +3 -3
- package/dist/_chunks/periodontal-chart-card-BYs9hax1.js +455 -0
- package/dist/_chunks/phone-Bi5yUm4I.js +20 -0
- package/dist/_chunks/{practice-results-DDi-kvaD.js → practice-results-BFL_mcDW.js} +3 -2
- package/dist/_chunks/{pregnancy-weight-gain-BtEHaSqy.js → pregnancy-weight-gain-C7dK89jE.js} +2 -2
- package/dist/_chunks/scan-line-lGioFwLC.js +18 -0
- package/dist/_chunks/shield-check-BjCGH_Sr.js +21 -0
- package/dist/_chunks/{sign-document-BCyLpFHJ.js → sign-document-DPI2pY9V.js} +2 -2
- package/dist/_chunks/{transaction-chip-B8ujzowA.js → transaction-chip-BZCa6XDn.js} +8 -6
- package/dist/_chunks/{unit-converter-u3CwNDpP.js → unit-converter-jWp3Z85y.js} +2 -2
- package/dist/_chunks/user-cog-BS_qc8nA.js +24 -0
- package/dist/_chunks/video-BAeICxCT.js +21 -0
- package/dist/_chunks/{workflow-map-Djn1QMJc.js → workflow-map-ZXw-zsZ8.js} +138 -156
- package/dist/agent-catalog.json +324 -1
- package/dist/components/_shared/entity-card/entity-card.d.ts +40 -0
- package/dist/components/_shared/entity-card/index.d.ts +3 -0
- package/dist/components/_shared/index.d.ts +2 -0
- package/dist/components/_shared/is-safe-url.d.ts +13 -0
- package/dist/components/agenda-card/agenda-card.d.ts +1 -2
- package/dist/components/agenda-card/index.d.ts +2 -1
- package/dist/components/agenda-card/index.js +6 -5
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/ai-consent-banner.agent.d.ts +4 -0
- package/dist/components/ai-consent-banner/ai-consent-banner.d.ts +45 -0
- package/dist/components/ai-consent-banner/index.d.ts +4 -0
- package/dist/components/ai-consent-banner/index.js +6 -0
- package/dist/components/ai-tools-rail/ai-tools-rail.agent.d.ts +4 -0
- package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +60 -0
- package/dist/components/ai-tools-rail/index.d.ts +4 -0
- package/dist/components/ai-tools-rail/index.js +6 -0
- package/dist/components/anamnesis-card/anamnesis-card.d.ts +68 -0
- package/dist/components/anamnesis-card/index.d.ts +3 -0
- package/dist/components/anamnesis-card/index.js +5 -0
- package/dist/components/appointment-card/appointment-card.agent.d.ts +3 -0
- package/dist/components/appointment-card/appointment-card.d.ts +93 -0
- package/dist/components/appointment-card/appointment-tray.agent.d.ts +4 -0
- package/dist/components/appointment-card/appointment-tray.d.ts +48 -0
- package/dist/components/appointment-card/index.d.ts +8 -0
- package/dist/components/appointment-card/index.js +10 -0
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/care-plan-card/care-plan-card.agent.d.ts +4 -0
- package/dist/components/care-plan-card/care-plan-card.d.ts +102 -0
- package/dist/components/care-plan-card/index.d.ts +4 -0
- package/dist/components/care-plan-card/index.js +6 -0
- package/dist/components/care-plan-entry-card/care-plan-entry-card.agent.d.ts +4 -0
- package/dist/components/care-plan-entry-card/care-plan-entry-card.d.ts +110 -0
- package/dist/components/care-plan-entry-card/index.d.ts +4 -0
- package/dist/components/care-plan-entry-card/index.js +6 -0
- package/dist/components/chat-message/chat-message.d.ts +7 -0
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/clinical-note-card/clinical-note-card.agent.d.ts +4 -0
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +98 -0
- package/dist/components/clinical-note-card/index.d.ts +4 -0
- package/dist/components/clinical-note-card/index.js +6 -0
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +7 -0
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/index.d.ts +10 -0
- package/dist/components/message-card/index.js +5 -4
- package/dist/components/message-card/message-card.d.ts +1 -2
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/operator-hero/operator-hero.d.ts +9 -0
- package/dist/components/patient-summary-card/index.d.ts +4 -0
- package/dist/components/patient-summary-card/index.js +6 -0
- package/dist/components/patient-summary-card/patient-summary-card.agent.d.ts +4 -0
- package/dist/components/patient-summary-card/patient-summary-card.d.ts +120 -0
- package/dist/components/payment-card/index.d.ts +7 -0
- package/dist/components/payment-card/index.js +8 -0
- package/dist/components/payment-card/payment-card.agent.d.ts +4 -0
- package/dist/components/payment-card/payment-card.d.ts +71 -0
- package/dist/components/payment-card/payment-request-card.agent.d.ts +4 -0
- package/dist/components/payment-card/payment-request-card.d.ts +43 -0
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.d.ts +4 -0
- package/dist/components/periodontal-chart-card/index.js +7 -0
- package/dist/components/periodontal-chart-card/periodontal-chart-card.agent.d.ts +4 -0
- package/dist/components/periodontal-chart-card/periodontal-chart-card.d.ts +74 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/stat/stat.d.ts +1 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +351 -0
- package/dist/i18n/locales/ar.js +351 -0
- package/dist/i18n/locales/de.d.ts +351 -0
- package/dist/i18n/locales/de.js +351 -0
- package/dist/i18n/locales/el.d.ts +351 -0
- package/dist/i18n/locales/el.js +351 -0
- package/dist/i18n/locales/en.d.ts +351 -0
- package/dist/i18n/locales/en.js +351 -0
- package/dist/i18n/locales/es.d.ts +351 -0
- package/dist/i18n/locales/es.js +351 -0
- package/dist/i18n/locales/fr.d.ts +351 -0
- package/dist/i18n/locales/fr.js +351 -0
- package/dist/i18n/locales/hi.d.ts +351 -0
- package/dist/i18n/locales/hi.js +351 -0
- package/dist/i18n/locales/it.d.ts +351 -0
- package/dist/i18n/locales/it.js +351 -0
- package/dist/i18n/locales/ja.d.ts +351 -0
- package/dist/i18n/locales/ja.js +351 -0
- package/dist/i18n/locales/nl.d.ts +351 -0
- package/dist/i18n/locales/nl.js +351 -0
- package/dist/i18n/locales/pl.d.ts +351 -0
- package/dist/i18n/locales/pl.js +351 -0
- package/dist/i18n/locales/pt.d.ts +351 -0
- package/dist/i18n/locales/pt.js +351 -0
- package/dist/i18n/locales/ro.d.ts +351 -0
- package/dist/i18n/locales/ro.js +351 -0
- package/dist/i18n/locales/ru.d.ts +351 -0
- package/dist/i18n/locales/ru.js +351 -0
- package/dist/i18n/locales/sq.d.ts +351 -0
- package/dist/i18n/locales/sq.js +351 -0
- package/dist/i18n/locales/sv.d.ts +351 -0
- package/dist/i18n/locales/sv.js +351 -0
- package/dist/i18n/locales/tr.d.ts +351 -0
- package/dist/i18n/locales/tr.js +351 -0
- package/dist/i18n/locales/zh.d.ts +351 -0
- package/dist/i18n/locales/zh.js +351 -0
- package/dist/index.js +527 -491
- package/dist/locales/ar.json +351 -0
- package/dist/locales/de.json +351 -0
- package/dist/locales/el.json +351 -0
- package/dist/locales/en.json +351 -0
- package/dist/locales/es.json +351 -0
- package/dist/locales/fr.json +351 -0
- package/dist/locales/hi.json +351 -0
- package/dist/locales/it.json +351 -0
- package/dist/locales/ja.json +351 -0
- package/dist/locales/nl.json +351 -0
- package/dist/locales/pl.json +351 -0
- package/dist/locales/pt.json +351 -0
- package/dist/locales/ro.json +351 -0
- package/dist/locales/ru.json +351 -0
- package/dist/locales/sq.json +351 -0
- package/dist/locales/sv.json +351 -0
- package/dist/locales/tr.json +351 -0
- package/dist/locales/zh.json +351 -0
- package/dist/patterns/alia-assistant/alia-types.d.ts +15 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +42 -1
- package/dist/_chunks/operator-hero-7LiiP7zi.js +0 -171
- package/dist/_chunks/shield-check-C73ma9Cs.js +0 -36
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { jsxs as j, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as M, useRef as v, useState as O, useMemo as k, useCallback as D, useEffect as G, useImperativeHandle as J } from "react";
|
|
3
|
+
import { c as b } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as Q } from "react-i18next";
|
|
5
|
+
import { I as X } from "./icon-button-CKEOrN37.js";
|
|
6
|
+
import { S as Y } from "./scroll-area-BWqCkEGz.js";
|
|
7
|
+
import { a as Z } from "./tooltip-DvmfrNvB.js";
|
|
8
|
+
import { u as $ } from "./use-controllable-state-BiY4xTzM.js";
|
|
9
|
+
import { u as ee } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
10
|
+
import { u as ae } from "./registry-nPAVE19X.js";
|
|
11
|
+
const te = {
|
|
12
|
+
id: "ai-tools-rail",
|
|
13
|
+
capabilities: ["open", "close", "select_single"],
|
|
14
|
+
state: {
|
|
15
|
+
activeToolId: {
|
|
16
|
+
type: "string | null",
|
|
17
|
+
descriptionKey: "ui.aiToolsRail.agent.state.activeToolId",
|
|
18
|
+
description: "Id of the tool whose panel is currently open, or null when the rail is collapsed to its strip. No panel content is ever exposed.",
|
|
19
|
+
read: (n) => n.getActiveToolId()
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
actions: {
|
|
23
|
+
open: {
|
|
24
|
+
safety: "read",
|
|
25
|
+
argsType: "{ id: string }",
|
|
26
|
+
descriptionKey: "ui.aiToolsRail.agent.actions.open",
|
|
27
|
+
description: "Open the given tool's panel.",
|
|
28
|
+
invoke: (n, a) => {
|
|
29
|
+
n.open(a.id);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
close: {
|
|
33
|
+
safety: "read",
|
|
34
|
+
descriptionKey: "ui.aiToolsRail.agent.actions.close",
|
|
35
|
+
description: "Collapse the rail to its strip (no active tool).",
|
|
36
|
+
invoke: (n) => {
|
|
37
|
+
n.close();
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
select_tool: {
|
|
41
|
+
safety: "read",
|
|
42
|
+
argsType: "{ id: string | null }",
|
|
43
|
+
descriptionKey: "ui.aiToolsRail.agent.actions.selectTool",
|
|
44
|
+
description: "Set the active tool by id (opens its panel), or pass null to collapse.",
|
|
45
|
+
invoke: (n, a) => {
|
|
46
|
+
n.setActiveTool(a.id);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
domHooks: {
|
|
51
|
+
root: {
|
|
52
|
+
attr: "data-component",
|
|
53
|
+
value: "ai-tools-rail",
|
|
54
|
+
description: "Marks the AiToolsRail wrapper."
|
|
55
|
+
},
|
|
56
|
+
instanceId: {
|
|
57
|
+
attr: "data-component-id",
|
|
58
|
+
sourceProp: "id",
|
|
59
|
+
description: "Sourced from the id prop. Required to address a specific rail from the agent."
|
|
60
|
+
},
|
|
61
|
+
item: {
|
|
62
|
+
attr: "data-tool-id",
|
|
63
|
+
description: "Stable tool id emitted on each strip IconButton. The active icon also carries data-active set to its id."
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}, se = "ds:[inline-size:3rem]", ne = "ds:[inline-size:22rem]", ie = b(
|
|
67
|
+
["ds:flex ds:shrink-0 ds:h-full", "ds:bg-[var(--background)]"].join(" "),
|
|
68
|
+
{
|
|
69
|
+
variants: {
|
|
70
|
+
side: {
|
|
71
|
+
// Strip docks inline-end; the panel mounts inline-start of it
|
|
72
|
+
// (flex-row, panel rendered first). Shadow faces the main area.
|
|
73
|
+
end: "ds:flex-row ds:shadow-[var(--shadow-chrome-start)]",
|
|
74
|
+
// Strip docks inline-start; the panel mounts inline-end of it.
|
|
75
|
+
start: "ds:flex-row-reverse ds:shadow-[var(--shadow-chrome-end)]"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
defaultVariants: { side: "end" }
|
|
79
|
+
}
|
|
80
|
+
), oe = b(
|
|
81
|
+
[
|
|
82
|
+
"ds:flex ds:shrink-0 ds:flex-col ds:items-center",
|
|
83
|
+
"ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]",
|
|
84
|
+
"ds:gap-[var(--spacing-xs)]",
|
|
85
|
+
se
|
|
86
|
+
].join(" ")
|
|
87
|
+
), re = b(
|
|
88
|
+
[
|
|
89
|
+
"ds:flex ds:min-h-0 ds:flex-col ds:h-full",
|
|
90
|
+
"ds:bg-[var(--background)]",
|
|
91
|
+
ne
|
|
92
|
+
].join(" ")
|
|
93
|
+
), le = b(
|
|
94
|
+
[
|
|
95
|
+
"ds:absolute ds:-top-[var(--spacing-xs)] ds:-end-[var(--spacing-xs)]",
|
|
96
|
+
"ds:inline-flex ds:items-center ds:justify-center",
|
|
97
|
+
"ds:min-w-[calc(var(--spacing-md)+var(--spacing-xs))]",
|
|
98
|
+
"ds:h-[calc(var(--spacing-md)+var(--spacing-xs))]",
|
|
99
|
+
"ds:ps-[calc(var(--spacing-xs)/1.5)] ds:pe-[calc(var(--spacing-xs)/1.5)]",
|
|
100
|
+
"ds:rounded-[var(--radius-full)]",
|
|
101
|
+
"ds:bg-[color:var(--destructive)] ds:text-[color:var(--destructive-foreground)]",
|
|
102
|
+
"ds:text-[length:var(--font-size-xs)] ds:font-semibold ds:leading-none",
|
|
103
|
+
"ds:pointer-events-none ds:select-none",
|
|
104
|
+
"ds:forced-colors:outline ds:forced-colors:outline-1 ds:forced-colors:outline-[CanvasText]"
|
|
105
|
+
].join(" ")
|
|
106
|
+
);
|
|
107
|
+
function de(n, a) {
|
|
108
|
+
return n > 99 ? a : String(n);
|
|
109
|
+
}
|
|
110
|
+
const ce = M(
|
|
111
|
+
({
|
|
112
|
+
id: n,
|
|
113
|
+
tools: a,
|
|
114
|
+
activeToolId: S,
|
|
115
|
+
defaultActiveToolId: L = null,
|
|
116
|
+
onActiveToolChange: B,
|
|
117
|
+
side: R = "end",
|
|
118
|
+
railLabel: H,
|
|
119
|
+
className: z
|
|
120
|
+
}, _) => {
|
|
121
|
+
var E;
|
|
122
|
+
const { t: m } = Q(), [F, l] = $({
|
|
123
|
+
value: S,
|
|
124
|
+
defaultValue: L,
|
|
125
|
+
onChange: B
|
|
126
|
+
}), d = F ?? null, h = v([]), I = v(null), [y, x] = O(0), u = v(!1), T = v(!1), c = k(
|
|
127
|
+
() => a.findIndex((e) => e.id === d),
|
|
128
|
+
[a, d]
|
|
129
|
+
), p = c >= 0 ? a[c] : null, P = k(
|
|
130
|
+
() => a.findIndex((e) => !e.disabled),
|
|
131
|
+
[a]
|
|
132
|
+
), g = c >= 0 ? c : y >= 0 && !((E = a[y]) != null && E.disabled) ? y : P, U = D(
|
|
133
|
+
(e, t) => {
|
|
134
|
+
const s = a.find((r) => r.id === e);
|
|
135
|
+
!s || s.disabled || (u.current = t, l(d === e ? null : e));
|
|
136
|
+
},
|
|
137
|
+
[a, d, l]
|
|
138
|
+
), W = D(
|
|
139
|
+
(e) => {
|
|
140
|
+
var K, N, V;
|
|
141
|
+
const t = a.length;
|
|
142
|
+
if (t === 0) return;
|
|
143
|
+
let s = null;
|
|
144
|
+
if (e.key === "ArrowDown" ? s = (g + 1) % t : e.key === "ArrowUp" ? s = (g - 1 + t) % t : e.key === "Home" ? s = 0 : e.key === "End" && (s = t - 1), s === null) return;
|
|
145
|
+
const r = e.key === "ArrowUp" || e.key === "End";
|
|
146
|
+
let i = s, o = 0;
|
|
147
|
+
for (; o < t && ((K = a[i]) != null && K.disabled); )
|
|
148
|
+
i = r ? (i - 1 + t) % t : (i + 1) % t, o += 1;
|
|
149
|
+
(N = a[i]) != null && N.disabled || (e.preventDefault(), x(i), (V = h.current[i]) == null || V.focus());
|
|
150
|
+
},
|
|
151
|
+
[a, g]
|
|
152
|
+
), A = v(null);
|
|
153
|
+
G(() => {
|
|
154
|
+
const e = A.current;
|
|
155
|
+
if (!e) return;
|
|
156
|
+
const t = (s) => {
|
|
157
|
+
if (s.key !== "Escape" || c < 0) return;
|
|
158
|
+
s.preventDefault();
|
|
159
|
+
const r = c;
|
|
160
|
+
l(null), x(r), requestAnimationFrame(() => {
|
|
161
|
+
var i;
|
|
162
|
+
(i = h.current[r]) == null || i.focus();
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
|
|
166
|
+
}, [c, l]), ee(() => {
|
|
167
|
+
var e;
|
|
168
|
+
p && u.current && ((e = I.current) == null || e.focus()), u.current = !1;
|
|
169
|
+
}, [p]);
|
|
170
|
+
const C = v(d);
|
|
171
|
+
C.current = d;
|
|
172
|
+
const w = k(
|
|
173
|
+
() => ({
|
|
174
|
+
getActiveToolId: () => C.current,
|
|
175
|
+
setActiveTool: (e) => {
|
|
176
|
+
u.current = !1, l(e);
|
|
177
|
+
},
|
|
178
|
+
open: (e) => {
|
|
179
|
+
const t = a.find((s) => s.id === e);
|
|
180
|
+
!t || t.disabled || (u.current = !1, l(e));
|
|
181
|
+
},
|
|
182
|
+
close: () => {
|
|
183
|
+
u.current = !1, l(null);
|
|
184
|
+
}
|
|
185
|
+
}),
|
|
186
|
+
[a, l]
|
|
187
|
+
);
|
|
188
|
+
J(_, () => w, [w]), ae(te, w, n);
|
|
189
|
+
const q = m("aiToolsRail.badgeCountOverflow", {
|
|
190
|
+
defaultValue: "99+"
|
|
191
|
+
});
|
|
192
|
+
return /* @__PURE__ */ j(
|
|
193
|
+
"div",
|
|
194
|
+
{
|
|
195
|
+
ref: A,
|
|
196
|
+
"data-component": "ai-tools-rail",
|
|
197
|
+
"data-component-id": n,
|
|
198
|
+
"data-side": R,
|
|
199
|
+
className: [ie({ side: R }), z].filter(Boolean).join(" "),
|
|
200
|
+
children: [
|
|
201
|
+
p ? /* @__PURE__ */ f(
|
|
202
|
+
"aside",
|
|
203
|
+
{
|
|
204
|
+
ref: I,
|
|
205
|
+
tabIndex: -1,
|
|
206
|
+
"aria-label": m("aiToolsRail.panelLabel", {
|
|
207
|
+
tool: p.label,
|
|
208
|
+
defaultValue: "{{tool}} panel"
|
|
209
|
+
}),
|
|
210
|
+
"data-ai-tools-rail-state": "expanded",
|
|
211
|
+
"data-active-tool": p.id,
|
|
212
|
+
className: [re(), "ds:focus-visible:outline-none"].join(
|
|
213
|
+
" "
|
|
214
|
+
),
|
|
215
|
+
children: /* @__PURE__ */ f(Y, { orientation: "vertical", className: "ds:flex-1 ds:min-h-0", children: p.panel })
|
|
216
|
+
}
|
|
217
|
+
) : null,
|
|
218
|
+
/* @__PURE__ */ f(Z, { children: /* @__PURE__ */ f(
|
|
219
|
+
"div",
|
|
220
|
+
{
|
|
221
|
+
role: "toolbar",
|
|
222
|
+
"aria-orientation": "vertical",
|
|
223
|
+
"aria-label": H ?? m("aiToolsRail.railLabel", { defaultValue: "AI tools" }),
|
|
224
|
+
className: oe(),
|
|
225
|
+
onKeyDown: W,
|
|
226
|
+
children: a.map((e, t) => {
|
|
227
|
+
const s = e.id === d, r = typeof e.badgeCount == "number" && e.badgeCount > 0, i = r ? m("aiToolsRail.toolWithCount", {
|
|
228
|
+
tool: e.label,
|
|
229
|
+
count: e.badgeCount,
|
|
230
|
+
defaultValue: "{{tool}}, {{count}} updates"
|
|
231
|
+
}) : e.label;
|
|
232
|
+
return /* @__PURE__ */ j("div", { className: "ds:relative", children: [
|
|
233
|
+
/* @__PURE__ */ f(
|
|
234
|
+
X,
|
|
235
|
+
{
|
|
236
|
+
ref: (o) => {
|
|
237
|
+
h.current[t] = o;
|
|
238
|
+
},
|
|
239
|
+
icon: e.icon,
|
|
240
|
+
tooltip: e.label,
|
|
241
|
+
"aria-label": i,
|
|
242
|
+
intent: "ghost",
|
|
243
|
+
size: "sm",
|
|
244
|
+
disabled: e.disabled,
|
|
245
|
+
"aria-pressed": s,
|
|
246
|
+
"aria-expanded": s,
|
|
247
|
+
"data-active": s ? e.id : void 0,
|
|
248
|
+
"data-tool-id": e.id,
|
|
249
|
+
tabIndex: t === g ? 0 : -1,
|
|
250
|
+
onFocus: () => {
|
|
251
|
+
e.disabled || x(t);
|
|
252
|
+
},
|
|
253
|
+
onClick: () => U(e.id, T.current),
|
|
254
|
+
onKeyDown: (o) => {
|
|
255
|
+
(o.key === "Enter" || o.key === " ") && (T.current = !0);
|
|
256
|
+
},
|
|
257
|
+
onKeyUp: (o) => {
|
|
258
|
+
(o.key === "Enter" || o.key === " ") && (T.current = !1);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
),
|
|
262
|
+
r ? /* @__PURE__ */ f("span", { "aria-hidden": "true", className: le(), children: de(
|
|
263
|
+
e.badgeCount,
|
|
264
|
+
q
|
|
265
|
+
) }) : null
|
|
266
|
+
] }, e.id);
|
|
267
|
+
})
|
|
268
|
+
}
|
|
269
|
+
) })
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
);
|
|
275
|
+
ce.displayName = "AiToolsRail";
|
|
276
|
+
export {
|
|
277
|
+
ce as A,
|
|
278
|
+
te as a
|
|
279
|
+
};
|
|
280
|
+
//# sourceMappingURL=ai-tools-rail-CxYG04cw.js.map
|
|
@@ -10,7 +10,7 @@ import { S as Y } from "./sparkles-CuYXqQLg.js";
|
|
|
10
10
|
import { A as F } from "./avatar-BNQNhoyL.js";
|
|
11
11
|
import { B as S } from "./button-DD_0Xdmr.js";
|
|
12
12
|
import { C as Ie } from "./chat-container-ogB4OskO.js";
|
|
13
|
-
import { C as Ee } from "./chat-message-
|
|
13
|
+
import { C as Ee } from "./chat-message-Dm8U2RY1.js";
|
|
14
14
|
import { C as ne, P as _e } from "./chat-input-CFwc7JxL.js";
|
|
15
15
|
import { S as Re } from "./spinner-OjQNn8oN.js";
|
|
16
16
|
import { S as Pe } from "./streaming-text-CfhDqtIT.js";
|
|
@@ -618,6 +618,7 @@ const O = D(
|
|
|
618
618
|
{
|
|
619
619
|
role: u.role,
|
|
620
620
|
content: u.content,
|
|
621
|
+
body: u.body,
|
|
621
622
|
avatar: K,
|
|
622
623
|
timestamp: u.timestamp,
|
|
623
624
|
status: u.status,
|
|
@@ -1122,4 +1123,4 @@ export {
|
|
|
1122
1123
|
us as b,
|
|
1123
1124
|
vs as c
|
|
1124
1125
|
};
|
|
1125
|
-
//# sourceMappingURL=alia-sidebar-
|
|
1126
|
+
//# sourceMappingURL=alia-sidebar-DlvyXgVC.js.map
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as M, useId as C, useMemo as R } from "react";
|
|
3
|
+
import { c as q } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as z } from "react-i18next";
|
|
5
|
+
import { B as n } from "./badge-zsf5i5bH.js";
|
|
6
|
+
import { C as N } from "./card-DPmk26CL.js";
|
|
7
|
+
import { A as G, b as O, c as Q, a as S } from "./accordion-9lJSMMsZ.js";
|
|
8
|
+
import { D as t } from "./description-list-BEbK2g93.js";
|
|
9
|
+
import { T as w } from "./timestamp-BV2lC-wV.js";
|
|
10
|
+
import { T as y } from "./triangle-alert-CBPUIzQo.js";
|
|
11
|
+
const H = q("ds:w-full ds:text-[color:var(--foreground)]", {
|
|
12
|
+
variants: {
|
|
13
|
+
// Matches the kit's other `surface` props. `'elevated'` (default)
|
|
14
|
+
// wraps in `<Card variant="elevated">`; `'flat'` drops the chrome
|
|
15
|
+
// for use inside an existing Card / Sheet.
|
|
16
|
+
surface: {
|
|
17
|
+
flat: "",
|
|
18
|
+
elevated: ""
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: { surface: "elevated" }
|
|
22
|
+
}), J = M(
|
|
23
|
+
({
|
|
24
|
+
dateIso: V,
|
|
25
|
+
createdAtIso: u,
|
|
26
|
+
formName: T,
|
|
27
|
+
highlightedAnswerCount: o = 0,
|
|
28
|
+
status: s,
|
|
29
|
+
answers: d,
|
|
30
|
+
surface: p = "elevated",
|
|
31
|
+
"aria-label": A,
|
|
32
|
+
id: f,
|
|
33
|
+
className: D,
|
|
34
|
+
...F
|
|
35
|
+
}, I) => {
|
|
36
|
+
const { t: a } = z(), h = C(), L = C(), v = T ?? a("anamnesisCard.defaultFormName", { defaultValue: "Medical history" }), B = A ?? v, i = o > 0, c = (s == null ? void 0 : s.expired) === !0, m = (s == null ? void 0 : s.corrupted) === !0, g = (d == null ? void 0 : d.length) ?? 0, x = R(() => !i && !c && !m ? null : /* @__PURE__ */ r(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
role: "list",
|
|
40
|
+
"aria-label": a("anamnesisCard.statusGroupLabel", {
|
|
41
|
+
defaultValue: "Questionnaire status"
|
|
42
|
+
}),
|
|
43
|
+
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
44
|
+
children: [
|
|
45
|
+
i ? /* @__PURE__ */ e(
|
|
46
|
+
n,
|
|
47
|
+
{
|
|
48
|
+
variant: "error",
|
|
49
|
+
withDot: !0,
|
|
50
|
+
leading: /* @__PURE__ */ e(y, { "aria-hidden": "true" }),
|
|
51
|
+
role: "listitem",
|
|
52
|
+
children: a("anamnesisCard.status.highlighted", {
|
|
53
|
+
count: o,
|
|
54
|
+
defaultValue: "{{count}} flagged answers"
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
) : null,
|
|
58
|
+
c ? /* @__PURE__ */ e(n, { variant: "warning", withDot: !0, role: "listitem", children: a("anamnesisCard.status.expired", { defaultValue: "Expired" }) }) : null,
|
|
59
|
+
m ? /* @__PURE__ */ e(n, { variant: "error", withDot: !0, role: "listitem", children: a("anamnesisCard.status.corrupted", {
|
|
60
|
+
defaultValue: "Corrupted"
|
|
61
|
+
}) }) : null
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
), [i, c, m, o, a]), j = /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
65
|
+
/* @__PURE__ */ r("div", { className: "ds:flex ds:flex-wrap ds:items-start ds:gap-[var(--spacing-sm)]", children: [
|
|
66
|
+
/* @__PURE__ */ e(
|
|
67
|
+
"h3",
|
|
68
|
+
{
|
|
69
|
+
id: h,
|
|
70
|
+
className: "type-title-card ds:m-0 ds:text-[color:var(--foreground)]",
|
|
71
|
+
children: v
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
x ? /* @__PURE__ */ e("div", { className: "ds:ms-auto ds:flex ds:shrink-0 ds:items-center", children: x }) : null
|
|
75
|
+
] }),
|
|
76
|
+
/* @__PURE__ */ r("p", { className: "type-body-sm ds:m-0 ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
|
|
77
|
+
/* @__PURE__ */ r("span", { children: [
|
|
78
|
+
a("anamnesisCard.compiledOn", { defaultValue: "Compiled" }),
|
|
79
|
+
" ",
|
|
80
|
+
/* @__PURE__ */ e(w, { value: V, format: "absolute", shape: "bare" })
|
|
81
|
+
] }),
|
|
82
|
+
u ? /* @__PURE__ */ r("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
83
|
+
/* @__PURE__ */ e("span", { "aria-hidden": "true", children: "·" }),
|
|
84
|
+
/* @__PURE__ */ r("span", { children: [
|
|
85
|
+
a("anamnesisCard.submitted", { defaultValue: "Submitted" }),
|
|
86
|
+
" ",
|
|
87
|
+
/* @__PURE__ */ e(
|
|
88
|
+
w,
|
|
89
|
+
{
|
|
90
|
+
value: u,
|
|
91
|
+
format: "relative",
|
|
92
|
+
shape: "bare"
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
] })
|
|
96
|
+
] }) : null
|
|
97
|
+
] })
|
|
98
|
+
] }), k = g > 0 ? /* @__PURE__ */ e(t, { layout: "stacked", density: "compact", divider: "between", children: d.map((l, E) => /* @__PURE__ */ r(
|
|
99
|
+
t.Row,
|
|
100
|
+
{
|
|
101
|
+
className: l.highlight ? "ds:border ds:border-[color:var(--destructive)] ds:rounded-[var(--radius-sm)] ds:p-[var(--spacing-sm)]" : void 0,
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ e(t.Term, { children: /* @__PURE__ */ r("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
104
|
+
/* @__PURE__ */ e("span", { children: l.question }),
|
|
105
|
+
l.highlight ? /* @__PURE__ */ e(
|
|
106
|
+
n,
|
|
107
|
+
{
|
|
108
|
+
variant: "error",
|
|
109
|
+
size: "sm",
|
|
110
|
+
withDot: !0,
|
|
111
|
+
leading: /* @__PURE__ */ e(y, { "aria-hidden": "true" }),
|
|
112
|
+
"aria-label": a("anamnesisCard.answerFlagLabel", {
|
|
113
|
+
defaultValue: "Flagged answer"
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
) : null
|
|
117
|
+
] }) }),
|
|
118
|
+
/* @__PURE__ */ e(t.Detail, { children: l.answer })
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
E
|
|
122
|
+
)) }) : /* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesisCard.empty", {
|
|
123
|
+
defaultValue: "No answers were recorded."
|
|
124
|
+
}) }), b = /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
125
|
+
j,
|
|
126
|
+
/* @__PURE__ */ e(G, { type: "single", collapsible: !0, variant: "separated", children: /* @__PURE__ */ r(O, { value: L, children: [
|
|
127
|
+
/* @__PURE__ */ e(Q, { children: a("anamnesisCard.interviewToggle", {
|
|
128
|
+
count: g,
|
|
129
|
+
defaultValue: "Interview ({{count}} answers)"
|
|
130
|
+
}) }),
|
|
131
|
+
/* @__PURE__ */ e(S, { children: k })
|
|
132
|
+
] }) })
|
|
133
|
+
] });
|
|
134
|
+
return /* @__PURE__ */ e(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
ref: I,
|
|
138
|
+
role: "region",
|
|
139
|
+
"aria-label": B,
|
|
140
|
+
"aria-labelledby": h,
|
|
141
|
+
"data-component": "anamnesis-card",
|
|
142
|
+
"data-component-id": f,
|
|
143
|
+
"data-has-flags": i || void 0,
|
|
144
|
+
id: f,
|
|
145
|
+
className: H({ surface: p, className: D }),
|
|
146
|
+
...F,
|
|
147
|
+
children: p === "elevated" ? /* @__PURE__ */ e(N, { variant: "elevated", children: /* @__PURE__ */ e(N.Body, { children: b }) }) : b
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
J.displayName = "AnamnesisCard";
|
|
153
|
+
export {
|
|
154
|
+
J as A
|
|
155
|
+
};
|
|
156
|
+
//# sourceMappingURL=anamnesis-card-CmkBVAln.js.map
|