@alfadocs/ui-kit 1.134.0 → 1.135.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/dist/_chunks/ai-summary-panel-B70S2lgC.js +455 -0
  2. package/dist/_chunks/{alia-sidebar-CK1zw_Bc.js → alia-sidebar-CtwhdASP.js} +3 -3
  3. package/dist/_chunks/{appointment-card-DG3m9yN-.js → appointment-card-BT1cMZIX.js} +2 -2
  4. package/dist/_chunks/{appointment-peek-BK0tDs4C.js → appointment-peek-BP_ACFz5.js} +2 -2
  5. package/dist/_chunks/{appointment-timeline-BiI2riRZ.js → appointment-timeline-Dy4YQJ17.js} +2 -2
  6. package/dist/_chunks/{appointment-tray-ClJCtYQj.js → appointment-tray-B3gSHL1j.js} +2 -2
  7. package/dist/_chunks/{calendar-appointment-editor-dialog-BSkIYGlW.js → calendar-appointment-editor-dialog-I5PfWudy.js} +8 -8
  8. package/dist/_chunks/{chat-container-B83b4hut.js → chat-container-CoOT7dzB.js} +37 -36
  9. package/dist/_chunks/{chat-input-DwQ4_WXK.js → chat-input-CX4dxBq7.js} +85 -84
  10. package/dist/_chunks/communications-panel-BKPHCiMB.js +973 -0
  11. package/dist/_chunks/{entity-summary-KHM0PnSI.js → entity-summary-CpNk6ybN.js} +70 -69
  12. package/dist/_chunks/get-error-message-DbFUzuja.js +7 -0
  13. package/dist/_chunks/handled-rejection-C-6Dq0As.js +9 -0
  14. package/dist/_chunks/megaphone-CzeTT9B3.js +22 -0
  15. package/dist/_chunks/{notes-panel-BAyPOr8N.js → notes-panel-BvjAo4RQ.js} +5 -4
  16. package/dist/_chunks/{patient-account-settings-BkAtIxJW.js → patient-account-settings-B2XbN_Fe.js} +2 -2
  17. package/dist/_chunks/{patient-check-in-resume-xhqjC6gf.js → patient-check-in-resume-B7NY-6KI.js} +4 -4
  18. package/dist/_chunks/{portal-details-CTEsm705.js → portal-details-DCIiGkHA.js} +2 -2
  19. package/dist/_chunks/{portal-documents-D8skew0h.js → portal-documents-DJOH8pZx.js} +2 -2
  20. package/dist/_chunks/{portal-parts-BdR29P7z.js → portal-parts-Br8wuala.js} +2 -2
  21. package/dist/_chunks/signing-end-screen-BdhbkPKO.js +1355 -0
  22. package/dist/_chunks/{task-editor-g1AGfxhr.js → task-editor-DvwqPfFR.js} +3 -2
  23. package/dist/_chunks/{tasks-panel-BE3zaayj.js → tasks-panel-6EzdnwT8.js} +155 -171
  24. package/dist/_chunks/{use-appointment-details-read-Dzc6fEzG.js → use-appointment-details-read-6_OmOwUs.js} +110 -109
  25. package/dist/_chunks/{workflow-status-D1WgGVTP.js → workflow-status-CO0mxXs2.js} +3 -2
  26. package/dist/agent-catalog.json +251 -1
  27. package/dist/agent-i18n/en.json +28 -0
  28. package/dist/browser-support.js +1 -1
  29. package/dist/components/_shared/sms-segments.d.ts +43 -0
  30. package/dist/components/ai-summary-panel/ai-summary-panel.agent.d.ts +4 -0
  31. package/dist/components/ai-summary-panel/ai-summary-panel.d.ts +71 -0
  32. package/dist/components/ai-summary-panel/index.d.ts +4 -0
  33. package/dist/components/ai-summary-panel/index.js +6 -0
  34. package/dist/components/appointment-card/index.js +2 -2
  35. package/dist/components/appointment-details-panel/index.js +1 -1
  36. package/dist/components/appointment-peek/index.js +1 -1
  37. package/dist/components/appointment-timeline/index.js +1 -1
  38. package/dist/components/chat-container/chat-container.d.ts +7 -0
  39. package/dist/components/chat-container/index.js +1 -1
  40. package/dist/components/chat-input/chat-input.d.ts +3 -0
  41. package/dist/components/chat-input/index.js +1 -1
  42. package/dist/components/communications-panel/communications-panel.agent.d.ts +4 -0
  43. package/dist/components/communications-panel/communications-panel.d.ts +136 -0
  44. package/dist/components/communications-panel/index.d.ts +6 -0
  45. package/dist/components/communications-panel/index.js +7 -0
  46. package/dist/components/entity-summary/entity-summary.d.ts +8 -0
  47. package/dist/components/entity-summary/index.js +1 -1
  48. package/dist/components/index.d.ts +2 -0
  49. package/dist/components/notes-panel/index.js +1 -1
  50. package/dist/components/task-editor/index.js +1 -1
  51. package/dist/components/tasks-panel/index.js +1 -1
  52. package/dist/components/workflow-status/index.js +1 -1
  53. package/dist/core.css +1 -1
  54. package/dist/host-compat.css +10 -4
  55. package/dist/i18n/locales/ar.d.ts +93 -0
  56. package/dist/i18n/locales/ar.js +94 -0
  57. package/dist/i18n/locales/de.d.ts +93 -0
  58. package/dist/i18n/locales/de.js +94 -0
  59. package/dist/i18n/locales/el.d.ts +93 -0
  60. package/dist/i18n/locales/el.js +94 -0
  61. package/dist/i18n/locales/en.d.ts +93 -0
  62. package/dist/i18n/locales/en.js +94 -0
  63. package/dist/i18n/locales/es.d.ts +93 -0
  64. package/dist/i18n/locales/es.js +94 -0
  65. package/dist/i18n/locales/fr.d.ts +93 -0
  66. package/dist/i18n/locales/fr.js +94 -0
  67. package/dist/i18n/locales/hi.d.ts +93 -0
  68. package/dist/i18n/locales/hi.js +94 -0
  69. package/dist/i18n/locales/it.d.ts +93 -0
  70. package/dist/i18n/locales/it.js +94 -0
  71. package/dist/i18n/locales/ja.d.ts +93 -0
  72. package/dist/i18n/locales/ja.js +94 -0
  73. package/dist/i18n/locales/nl.d.ts +93 -0
  74. package/dist/i18n/locales/nl.js +94 -0
  75. package/dist/i18n/locales/pl.d.ts +93 -0
  76. package/dist/i18n/locales/pl.js +94 -0
  77. package/dist/i18n/locales/pt.d.ts +93 -0
  78. package/dist/i18n/locales/pt.js +94 -0
  79. package/dist/i18n/locales/ro.d.ts +93 -0
  80. package/dist/i18n/locales/ro.js +94 -0
  81. package/dist/i18n/locales/ru.d.ts +93 -0
  82. package/dist/i18n/locales/ru.js +94 -0
  83. package/dist/i18n/locales/sq.d.ts +93 -0
  84. package/dist/i18n/locales/sq.js +94 -0
  85. package/dist/i18n/locales/sv.d.ts +93 -0
  86. package/dist/i18n/locales/sv.js +94 -0
  87. package/dist/i18n/locales/tr.d.ts +93 -0
  88. package/dist/i18n/locales/tr.js +94 -0
  89. package/dist/i18n/locales/zh.d.ts +93 -0
  90. package/dist/i18n/locales/zh.js +94 -0
  91. package/dist/index.js +893 -886
  92. package/dist/locales/ar.json +93 -0
  93. package/dist/locales/de.json +93 -0
  94. package/dist/locales/el.json +93 -0
  95. package/dist/locales/en.json +93 -0
  96. package/dist/locales/es.json +93 -0
  97. package/dist/locales/fr.json +93 -0
  98. package/dist/locales/hi.json +93 -0
  99. package/dist/locales/it.json +93 -0
  100. package/dist/locales/ja.json +93 -0
  101. package/dist/locales/nl.json +93 -0
  102. package/dist/locales/pl.json +93 -0
  103. package/dist/locales/pt.json +93 -0
  104. package/dist/locales/ro.json +93 -0
  105. package/dist/locales/ru.json +93 -0
  106. package/dist/locales/sq.json +93 -0
  107. package/dist/locales/sv.json +93 -0
  108. package/dist/locales/tr.json +93 -0
  109. package/dist/locales/zh.json +93 -0
  110. package/dist/patterns/alia-assistant/index.js +1 -1
  111. package/dist/patterns/calendar/calendar.journey.d.ts +7 -0
  112. package/dist/patterns/calendar/index.js +1 -1
  113. package/dist/patterns/patient-account-settings/index.js +1 -1
  114. package/dist/patterns/patient-check-in/index.js +1 -1
  115. package/dist/patterns/patient-portal/index.js +2 -2
  116. package/dist/patterns/signing/index.d.ts +1 -0
  117. package/dist/patterns/signing/index.js +1 -1
  118. package/dist/patterns/signing/multi-field-signer.d.ts +22 -1
  119. package/dist/patterns/signing/signing-checkbox-pill.d.ts +66 -0
  120. package/dist/patterns/signing/signing-checkbox-sheet.d.ts +16 -0
  121. package/dist/patterns/signing/signing-document-screen.d.ts +18 -1
  122. package/dist/tokens.css +1 -1
  123. package/package.json +9 -1
  124. package/dist/_chunks/handled-rejection-6gqCf5vt.js +0 -13
  125. package/dist/_chunks/signing-end-screen-an9P8DOT.js +0 -1041
@@ -31,6 +31,9 @@ export interface ChatInputProps extends NativeTextareaProps, VariantProps<typeof
31
31
  accept?: string;
32
32
  /** Controls whether the textarea is disabled and submit is blocked. */
33
33
  disabled?: boolean;
34
+ /** Disables only the Send button (the textarea stays editable), and blocks
35
+ * submit. Use it when the host owns a rule such as an over-long draft. */
36
+ submitDisabled?: boolean;
34
37
  /** Optional slot placed between the textarea and the send button. */
35
38
  toolbar?: ReactNode;
36
39
  /** Visible label above the textarea. When omitted, a visually-hidden label is used. */
@@ -1,4 +1,4 @@
1
- import { C as n, c as p } from "../../_chunks/chat-input-DwQ4_WXK.js";
1
+ import { C as n, c as p } from "../../_chunks/chat-input-CX4dxBq7.js";
2
2
  export {
3
3
  n as ChatInput,
4
4
  p as chatInputAgent
@@ -0,0 +1,4 @@
1
+ import type { AgentAdapter } from '../../agent/types';
2
+ import type { CommunicationsPanelHandle } from './communications-panel';
3
+ export declare const communicationsPanelAgent: AgentAdapter<CommunicationsPanelHandle>;
4
+ //# sourceMappingURL=communications-panel.agent.d.ts.map
@@ -0,0 +1,136 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ /** A channel a message travelled by. Platform: the logged message type. */
3
+ export type CommsChannel = 'app' | 'sms' | 'email' | 'whatsapp';
4
+ /** The channels the composer can send by. WhatsApp is a hand-off. */
5
+ export type CommsSendChannel = 'app' | 'sms' | 'email';
6
+ /** Delivery state of an SMS the practice sent. */
7
+ export type CommsSmsStatus = 'sending' | 'awaiting' | 'delivered' | 'not-delivered' | 'out-of-credit';
8
+ /** What caused a message the practice did not type by hand. */
9
+ export type CommsProvenanceKind = 'campaign' | 'workflow' | 'document-share';
10
+ /** One message in the thread. */
11
+ export interface CommsMessage {
12
+ id: string;
13
+ /** `out`: the practice wrote it. `in`: the patient wrote it. */
14
+ direction: 'out' | 'in';
15
+ channel: CommsChannel;
16
+ /** ISO-8601 instant the message was logged. */
17
+ createdAtIso: string;
18
+ /** Plain text. The only body an SMS shows, and the fallback for the rest. */
19
+ body: string;
20
+ /**
21
+ * HTML body (App, email, WhatsApp rows only). Sanitised by `SafeHtml`
22
+ * with the `email` profile. An SMS row ignores it.
23
+ */
24
+ bodyHtml?: string;
25
+ /** Where an outgoing message went (a number or an address). */
26
+ recipient?: string;
27
+ /** Not seen yet. The panel marks it with a "New" badge on this view. */
28
+ isNew?: boolean;
29
+ /** Delivery state. Shown for outgoing SMS only. */
30
+ smsStatus?: CommsSmsStatus;
31
+ /** A campaign, workflow or shared document sent this message. */
32
+ provenance?: {
33
+ kind: CommsProvenanceKind;
34
+ id?: string;
35
+ name?: string;
36
+ };
37
+ /** A shared document, shown as a file tile. */
38
+ attachment?: {
39
+ id: string;
40
+ name: string;
41
+ };
42
+ }
43
+ /** Whether the practice can use one channel for this patient. */
44
+ export interface CommsChannelState {
45
+ available: boolean;
46
+ /** Where a message goes: the mobile number or the address. */
47
+ recipient?: string;
48
+ }
49
+ /** The practice's WhatsApp set-up for this patient. */
50
+ export type CommsWhatsAppState = 'off' | 'no-phone' | 'no-sms-phone' | 'ready';
51
+ export interface CommsSendRequest {
52
+ channel: CommsSendChannel;
53
+ body: string;
54
+ }
55
+ /** A write the host refused, as `onWriteError` hears it. */
56
+ export interface CommunicationsPanelWriteFailure {
57
+ /** `send` is the composer; `mark-seen` is the unread flag. */
58
+ kind: 'send' | 'mark-seen';
59
+ /** The channel written to. Absent for `mark-seen`. */
60
+ id?: string;
61
+ /** What the handler rejected or threw with. */
62
+ error: unknown;
63
+ /** Whether the panel told the reader. A failed `mark-seen` is silent. */
64
+ shown: boolean;
65
+ }
66
+ /**
67
+ * Curated agent handle. Structural state only: counts and flags, never a
68
+ * message body or recipient. The writes reject, without calling the host,
69
+ * on a read-only panel or under privacy.
70
+ */
71
+ export interface CommunicationsPanelHandle {
72
+ getState: () => {
73
+ channel: CommsSendChannel | null;
74
+ messageCount: number;
75
+ unreadCount: number;
76
+ status: 'ready' | 'loading' | 'error';
77
+ limitReached: boolean;
78
+ privacy: boolean;
79
+ };
80
+ selectChannel: (channel: CommsSendChannel) => Promise<void>;
81
+ markSeen: () => Promise<void>;
82
+ sendMessage: (request: CommsSendRequest) => Promise<void>;
83
+ }
84
+ export interface CommunicationsPanelProps extends Omit<HTMLAttributes<HTMLElement>, 'title' | 'children'> {
85
+ /** Stable instance id, emitted as `data-component-id`. */
86
+ id?: string;
87
+ /** Panel title. Defaults to the localised "Communications". */
88
+ title?: string;
89
+ 'aria-label'?: string;
90
+ /** "Now" as an ISO-8601 instant. Day separators drop the year this year. */
91
+ nowIso?: string;
92
+ /** BCP-47 locale for dates. Defaults to the active language. */
93
+ locale?: string;
94
+ /** The thread, in any order. The panel shows it oldest first. */
95
+ messages: CommsMessage[];
96
+ /** The host's read. `'loading'` and `'error'` replace the thread. */
97
+ status?: 'ready' | 'loading' | 'error';
98
+ /** Retry a failed read. Renders the retry button in the error face. */
99
+ onRetry?: () => void;
100
+ /** Which channels the practice can use for this patient. */
101
+ channels: Record<CommsSendChannel, CommsChannelState>;
102
+ /** The channel the composer opens on, when it is available. */
103
+ defaultChannel?: CommsSendChannel;
104
+ /** The practice sender name, added to the end of every SMS. */
105
+ senderName: string;
106
+ /** The staff user sent too many SMS or emails in 24 hours. App stays. */
107
+ limitReached?: boolean;
108
+ /** WhatsApp set-up. Omit to leave the WhatsApp action out. */
109
+ whatsApp?: CommsWhatsAppState;
110
+ /** Privacy mode: the thread and composer are withheld, not mounted. */
111
+ privacy?: boolean;
112
+ /** Hide the composer and the enable prompts. The handle writes reject. */
113
+ readOnly?: boolean;
114
+ /**
115
+ * Send a message. Return a promise to keep the draft until the host has
116
+ * sent it: a rejection keeps the text and shows the error. A rejection
117
+ * with `status: 429` also marks the limit as reached.
118
+ */
119
+ onSend?: (request: CommsSendRequest) => void | Promise<void>;
120
+ /** The reader saw these unread messages. The host clears its unread flag. */
121
+ onMessagesSeen?: (ids: string[]) => void | Promise<void>;
122
+ /** A write the host refused. Toast it when `shown` is false. */
123
+ onWriteError?: (failure: CommunicationsPanelWriteFailure) => void;
124
+ /** Open the host's way to enable a channel (patient edit, invitation). */
125
+ onEnableChannel?: (channel: CommsSendChannel) => void;
126
+ /** Open the host's WhatsApp message picker. */
127
+ onOpenWhatsApp?: () => void;
128
+ /** Open the host's WhatsApp purchase flow. */
129
+ onBuyWhatsApp?: () => void;
130
+ /** Open the campaign, workflow or document behind a message. */
131
+ onOpenProvenance?: (kind: CommsProvenanceKind, id?: string) => void;
132
+ /** Open a shared document. */
133
+ onOpenAttachment?: (id: string) => void;
134
+ }
135
+ export declare const CommunicationsPanel: import("react").ForwardRefExoticComponent<CommunicationsPanelProps & import("react").RefAttributes<HTMLElement>>;
136
+ //# sourceMappingURL=communications-panel.d.ts.map
@@ -0,0 +1,6 @@
1
+ export { CommunicationsPanel } from './communications-panel';
2
+ export type { CommunicationsPanelProps, CommunicationsPanelHandle, CommunicationsPanelWriteFailure, CommsChannel, CommsSendChannel, CommsSendRequest, CommsSmsStatus, CommsProvenanceKind, CommsMessage, CommsChannelState, CommsWhatsAppState, } from './communications-panel';
3
+ export { communicationsPanelAgent } from './communications-panel.agent';
4
+ export { smsMessageInfo } from '../_shared/sms-segments';
5
+ export type { SmsMessageInfo } from '../_shared/sms-segments';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { C as n, c as o, s as e } from "../../_chunks/communications-panel-BKPHCiMB.js";
2
+ export {
3
+ n as CommunicationsPanel,
4
+ o as communicationsPanelAgent,
5
+ e as smsMessageInfo
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -85,6 +85,14 @@ export interface EntitySummaryProps extends Omit<HTMLAttributes<HTMLElement>, 't
85
85
  disclaimer?: ReactNode;
86
86
  /** BCP-47 locale for the generated-at timestamp. */
87
87
  locale?: string;
88
+ /**
89
+ * Render the panel's own sticky header (title, regenerate, close).
90
+ * Default `true`. Pass `false` when the host draws one header for several
91
+ * faces, as `AiSummaryPanel` does. The regenerate and close affordances
92
+ * are not drawn, so the host owns them, and the section is a region only
93
+ * if you pass `aria-label`: the host's own region names the summary.
94
+ */
95
+ showHeader?: boolean;
88
96
  /** Accessible name for the panel region (defaults to `title`). */
89
97
  'aria-label'?: string;
90
98
  }
@@ -1,4 +1,4 @@
1
- import { E as t } from "../../_chunks/entity-summary-KHM0PnSI.js";
1
+ import { E as t } from "../../_chunks/entity-summary-CpNk6ybN.js";
2
2
  export {
3
3
  t as EntitySummary
4
4
  };
@@ -161,6 +161,7 @@ export * from './notification-card';
161
161
  export * from './notification-tray';
162
162
  export * from './notice-group';
163
163
  export * from './notes-panel';
164
+ export * from './communications-panel';
164
165
  export * from './popover';
165
166
  export * from './radiograph-panel';
166
167
  export * from './pregnancy-weight-gain';
@@ -196,6 +197,7 @@ export * from './chat-container';
196
197
  export * from './chat-input';
197
198
  export * from './chat-message';
198
199
  export * from './entity-summary';
200
+ export * from './ai-summary-panel';
199
201
  export * from './freemium-paywall';
200
202
  export * from './streaming-text';
201
203
  export * from './suggestion-chip';
@@ -1,4 +1,4 @@
1
- import { N as a } from "../../_chunks/notes-panel-BAyPOr8N.js";
1
+ import { N as a } from "../../_chunks/notes-panel-BvjAo4RQ.js";
2
2
  export {
3
3
  a as NotesPanel
4
4
  };
@@ -1,4 +1,4 @@
1
- import { T as o, t as r } from "../../_chunks/task-editor-g1AGfxhr.js";
1
+ import { T as o, t as r } from "../../_chunks/task-editor-DvwqPfFR.js";
2
2
  export {
3
3
  o as TaskEditor,
4
4
  r as taskEditorAgent
@@ -1,4 +1,4 @@
1
- import { T as e, t } from "../../_chunks/tasks-panel-BE3zaayj.js";
1
+ import { T as e, t } from "../../_chunks/tasks-panel-6EzdnwT8.js";
2
2
  export {
3
3
  e as TasksPanel,
4
4
  t as tasksPanelAgent
@@ -1,4 +1,4 @@
1
- import { W as o, a as s, w as r } from "../../_chunks/workflow-status-D1WgGVTP.js";
1
+ import { W as o, a as s, w as r } from "../../_chunks/workflow-status-CO0mxXs2.js";
2
2
  import { A as T, a as e, i as l, u } from "../../_chunks/appointment-workflow-status-S-lx81Yz.js";
3
3
  export {
4
4
  T as APPOINTMENT_NO_STATUS,