@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.
Files changed (186) hide show
  1. package/dist/_chunks/{agenda-card-CFyWSX7Z.js → agenda-card-BaSfVfrL.js} +25 -29
  2. package/dist/_chunks/{agenda-tray-Dyj9ChHC.js → agenda-tray-DQayYmQ0.js} +50 -67
  3. package/dist/_chunks/ai-consent-banner-DO5ingMq.js +169 -0
  4. package/dist/_chunks/ai-tools-rail-CxYG04cw.js +280 -0
  5. package/dist/_chunks/{alia-sidebar-CVIPrdc9.js → alia-sidebar-DlvyXgVC.js} +3 -2
  6. package/dist/_chunks/anamnesis-card-CmkBVAln.js +156 -0
  7. package/dist/_chunks/appointment-tray-BwDHhWWC.js +419 -0
  8. package/dist/_chunks/{bmi-calculator-CQqXTVNL.js → bmi-calculator-DdylQzT6.js} +2 -2
  9. package/dist/_chunks/{booking-DlDVuWMd.js → booking-WV2GSru5.js} +291 -303
  10. package/dist/_chunks/{calculator-dialog-D-nfvteH.js → calculator-dialog-CFk4I91b.js} +2 -2
  11. package/dist/_chunks/calendar-days-C4BmpCZg.js +23 -0
  12. package/dist/_chunks/{calendar-YHFknAGv.js → calendar-oYWOCrnf.js} +195 -210
  13. package/dist/_chunks/care-plan-card-QmNpGggC.js +252 -0
  14. package/dist/_chunks/care-plan-entry-card-Cnra7vUc.js +318 -0
  15. package/dist/_chunks/{chat-message-B5JpFj0F.js → chat-message-Dm8U2RY1.js} +36 -35
  16. package/dist/_chunks/clinical-note-card-BYo437dU.js +333 -0
  17. package/dist/_chunks/{contact-profile-card-DHyuAPXM.js → contact-profile-card-DvvVfAA2.js} +102 -115
  18. package/dist/_chunks/{cycle-calculator-KxA8dqDf.js → cycle-calculator-DYvGm_m1.js} +2 -2
  19. package/dist/_chunks/{dialog-BTpZV6It.js → dialog-DMGnSelc.js} +55 -55
  20. package/dist/_chunks/{due-date-calculator-mFxpHLml.js → due-date-calculator-BXd3ANj7.js} +2 -2
  21. package/dist/_chunks/entity-card-COhmqHly.js +69 -0
  22. package/dist/_chunks/{gestational-age-calculator-gWI_uRA1.js → gestational-age-calculator-Crj6FgZw.js} +2 -2
  23. package/dist/_chunks/{insert-result-C5ABnzDl.js → insert-result-DNdi_JYW.js} +140 -168
  24. package/dist/_chunks/is-safe-url-DkETxeHz.js +7 -0
  25. package/dist/_chunks/languages-DsVf_WzT.js +19 -0
  26. package/dist/_chunks/layers-pzGcbLPj.js +34 -0
  27. package/dist/_chunks/{message-card-DSPw5ghw.js → message-card-Dvl1TgaN.js} +15 -19
  28. package/dist/_chunks/{message-tray-hSQff9u4.js → message-tray-Dl6GQaaV.js} +2 -2
  29. package/dist/_chunks/operator-hero-CM8949Hd.js +198 -0
  30. package/dist/_chunks/patient-summary-card-BnTqxcTr.js +443 -0
  31. package/dist/_chunks/payment-request-card-B_lyobd0.js +478 -0
  32. package/dist/_chunks/{pdf-viewer-CWEXTlwq.js → pdf-viewer-G8SU6Azw.js} +3 -3
  33. package/dist/_chunks/periodontal-chart-card-BYs9hax1.js +455 -0
  34. package/dist/_chunks/phone-Bi5yUm4I.js +20 -0
  35. package/dist/_chunks/{practice-results-DDi-kvaD.js → practice-results-BFL_mcDW.js} +3 -2
  36. package/dist/_chunks/{pregnancy-weight-gain-BtEHaSqy.js → pregnancy-weight-gain-C7dK89jE.js} +2 -2
  37. package/dist/_chunks/scan-line-lGioFwLC.js +18 -0
  38. package/dist/_chunks/shield-check-BjCGH_Sr.js +21 -0
  39. package/dist/_chunks/{sign-document-BCyLpFHJ.js → sign-document-DPI2pY9V.js} +2 -2
  40. package/dist/_chunks/{transaction-chip-B8ujzowA.js → transaction-chip-BZCa6XDn.js} +8 -6
  41. package/dist/_chunks/{unit-converter-u3CwNDpP.js → unit-converter-jWp3Z85y.js} +2 -2
  42. package/dist/_chunks/user-cog-BS_qc8nA.js +24 -0
  43. package/dist/_chunks/video-BAeICxCT.js +21 -0
  44. package/dist/_chunks/{workflow-map-Djn1QMJc.js → workflow-map-ZXw-zsZ8.js} +138 -156
  45. package/dist/agent-catalog.json +324 -1
  46. package/dist/components/_shared/entity-card/entity-card.d.ts +40 -0
  47. package/dist/components/_shared/entity-card/index.d.ts +3 -0
  48. package/dist/components/_shared/index.d.ts +2 -0
  49. package/dist/components/_shared/is-safe-url.d.ts +13 -0
  50. package/dist/components/agenda-card/agenda-card.d.ts +1 -2
  51. package/dist/components/agenda-card/index.d.ts +2 -1
  52. package/dist/components/agenda-card/index.js +6 -5
  53. package/dist/components/agenda-tray/index.js +1 -1
  54. package/dist/components/ai-consent-banner/ai-consent-banner.agent.d.ts +4 -0
  55. package/dist/components/ai-consent-banner/ai-consent-banner.d.ts +45 -0
  56. package/dist/components/ai-consent-banner/index.d.ts +4 -0
  57. package/dist/components/ai-consent-banner/index.js +6 -0
  58. package/dist/components/ai-tools-rail/ai-tools-rail.agent.d.ts +4 -0
  59. package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +60 -0
  60. package/dist/components/ai-tools-rail/index.d.ts +4 -0
  61. package/dist/components/ai-tools-rail/index.js +6 -0
  62. package/dist/components/anamnesis-card/anamnesis-card.d.ts +68 -0
  63. package/dist/components/anamnesis-card/index.d.ts +3 -0
  64. package/dist/components/anamnesis-card/index.js +5 -0
  65. package/dist/components/appointment-card/appointment-card.agent.d.ts +3 -0
  66. package/dist/components/appointment-card/appointment-card.d.ts +93 -0
  67. package/dist/components/appointment-card/appointment-tray.agent.d.ts +4 -0
  68. package/dist/components/appointment-card/appointment-tray.d.ts +48 -0
  69. package/dist/components/appointment-card/index.d.ts +8 -0
  70. package/dist/components/appointment-card/index.js +10 -0
  71. package/dist/components/badge/badge.d.ts +1 -1
  72. package/dist/components/bmi-calculator/index.js +1 -1
  73. package/dist/components/booking/index.js +1 -1
  74. package/dist/components/calculator-dialog/index.js +1 -1
  75. package/dist/components/calendar/index.js +1 -1
  76. package/dist/components/card/card.d.ts +1 -1
  77. package/dist/components/care-plan-card/care-plan-card.agent.d.ts +4 -0
  78. package/dist/components/care-plan-card/care-plan-card.d.ts +102 -0
  79. package/dist/components/care-plan-card/index.d.ts +4 -0
  80. package/dist/components/care-plan-card/index.js +6 -0
  81. package/dist/components/care-plan-entry-card/care-plan-entry-card.agent.d.ts +4 -0
  82. package/dist/components/care-plan-entry-card/care-plan-entry-card.d.ts +110 -0
  83. package/dist/components/care-plan-entry-card/index.d.ts +4 -0
  84. package/dist/components/care-plan-entry-card/index.js +6 -0
  85. package/dist/components/chat-message/chat-message.d.ts +7 -0
  86. package/dist/components/chat-message/index.js +1 -1
  87. package/dist/components/clinical-note-card/clinical-note-card.agent.d.ts +4 -0
  88. package/dist/components/clinical-note-card/clinical-note-card.d.ts +98 -0
  89. package/dist/components/clinical-note-card/index.d.ts +4 -0
  90. package/dist/components/clinical-note-card/index.js +6 -0
  91. package/dist/components/contact-profile-card/index.js +1 -1
  92. package/dist/components/cycle-calculator/index.js +1 -1
  93. package/dist/components/dialog/dialog.d.ts +7 -0
  94. package/dist/components/dialog/index.js +1 -1
  95. package/dist/components/due-date-calculator/index.js +1 -1
  96. package/dist/components/gestational-age-calculator/index.js +1 -1
  97. package/dist/components/index.d.ts +10 -0
  98. package/dist/components/message-card/index.js +5 -4
  99. package/dist/components/message-card/message-card.d.ts +1 -2
  100. package/dist/components/message-tray/index.js +1 -1
  101. package/dist/components/operator-hero/index.js +1 -1
  102. package/dist/components/operator-hero/operator-hero.d.ts +9 -0
  103. package/dist/components/patient-summary-card/index.d.ts +4 -0
  104. package/dist/components/patient-summary-card/index.js +6 -0
  105. package/dist/components/patient-summary-card/patient-summary-card.agent.d.ts +4 -0
  106. package/dist/components/patient-summary-card/patient-summary-card.d.ts +120 -0
  107. package/dist/components/payment-card/index.d.ts +7 -0
  108. package/dist/components/payment-card/index.js +8 -0
  109. package/dist/components/payment-card/payment-card.agent.d.ts +4 -0
  110. package/dist/components/payment-card/payment-card.d.ts +71 -0
  111. package/dist/components/payment-card/payment-request-card.agent.d.ts +4 -0
  112. package/dist/components/payment-card/payment-request-card.d.ts +43 -0
  113. package/dist/components/pdf-viewer/index.js +1 -1
  114. package/dist/components/periodontal-chart-card/index.d.ts +4 -0
  115. package/dist/components/periodontal-chart-card/index.js +7 -0
  116. package/dist/components/periodontal-chart-card/periodontal-chart-card.agent.d.ts +4 -0
  117. package/dist/components/periodontal-chart-card/periodontal-chart-card.d.ts +74 -0
  118. package/dist/components/practice-results/index.js +1 -1
  119. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  120. package/dist/components/public-header/public-header.d.ts +1 -1
  121. package/dist/components/sign-document/index.js +1 -1
  122. package/dist/components/stat/stat.d.ts +1 -1
  123. package/dist/components/transaction-chip/index.js +1 -1
  124. package/dist/components/unit-converter/index.js +1 -1
  125. package/dist/components/workflow/index.js +1 -1
  126. package/dist/i18n/locales/ar.d.ts +351 -0
  127. package/dist/i18n/locales/ar.js +351 -0
  128. package/dist/i18n/locales/de.d.ts +351 -0
  129. package/dist/i18n/locales/de.js +351 -0
  130. package/dist/i18n/locales/el.d.ts +351 -0
  131. package/dist/i18n/locales/el.js +351 -0
  132. package/dist/i18n/locales/en.d.ts +351 -0
  133. package/dist/i18n/locales/en.js +351 -0
  134. package/dist/i18n/locales/es.d.ts +351 -0
  135. package/dist/i18n/locales/es.js +351 -0
  136. package/dist/i18n/locales/fr.d.ts +351 -0
  137. package/dist/i18n/locales/fr.js +351 -0
  138. package/dist/i18n/locales/hi.d.ts +351 -0
  139. package/dist/i18n/locales/hi.js +351 -0
  140. package/dist/i18n/locales/it.d.ts +351 -0
  141. package/dist/i18n/locales/it.js +351 -0
  142. package/dist/i18n/locales/ja.d.ts +351 -0
  143. package/dist/i18n/locales/ja.js +351 -0
  144. package/dist/i18n/locales/nl.d.ts +351 -0
  145. package/dist/i18n/locales/nl.js +351 -0
  146. package/dist/i18n/locales/pl.d.ts +351 -0
  147. package/dist/i18n/locales/pl.js +351 -0
  148. package/dist/i18n/locales/pt.d.ts +351 -0
  149. package/dist/i18n/locales/pt.js +351 -0
  150. package/dist/i18n/locales/ro.d.ts +351 -0
  151. package/dist/i18n/locales/ro.js +351 -0
  152. package/dist/i18n/locales/ru.d.ts +351 -0
  153. package/dist/i18n/locales/ru.js +351 -0
  154. package/dist/i18n/locales/sq.d.ts +351 -0
  155. package/dist/i18n/locales/sq.js +351 -0
  156. package/dist/i18n/locales/sv.d.ts +351 -0
  157. package/dist/i18n/locales/sv.js +351 -0
  158. package/dist/i18n/locales/tr.d.ts +351 -0
  159. package/dist/i18n/locales/tr.js +351 -0
  160. package/dist/i18n/locales/zh.d.ts +351 -0
  161. package/dist/i18n/locales/zh.js +351 -0
  162. package/dist/index.js +527 -491
  163. package/dist/locales/ar.json +351 -0
  164. package/dist/locales/de.json +351 -0
  165. package/dist/locales/el.json +351 -0
  166. package/dist/locales/en.json +351 -0
  167. package/dist/locales/es.json +351 -0
  168. package/dist/locales/fr.json +351 -0
  169. package/dist/locales/hi.json +351 -0
  170. package/dist/locales/it.json +351 -0
  171. package/dist/locales/ja.json +351 -0
  172. package/dist/locales/nl.json +351 -0
  173. package/dist/locales/pl.json +351 -0
  174. package/dist/locales/pt.json +351 -0
  175. package/dist/locales/ro.json +351 -0
  176. package/dist/locales/ru.json +351 -0
  177. package/dist/locales/sq.json +351 -0
  178. package/dist/locales/sv.json +351 -0
  179. package/dist/locales/tr.json +351 -0
  180. package/dist/locales/zh.json +351 -0
  181. package/dist/patterns/alia-assistant/alia-types.d.ts +15 -0
  182. package/dist/patterns/alia-assistant/index.js +1 -1
  183. package/dist/tokens.css +1 -1
  184. package/package.json +42 -1
  185. package/dist/_chunks/operator-hero-7LiiP7zi.js +0 -171
  186. package/dist/_chunks/shield-check-C73ma9Cs.js +0 -36
@@ -1,11 +1,12 @@
1
- import { jsx as e, jsxs as c } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as c } from "react/jsx-runtime";
2
2
  import { forwardRef as v } from "react";
3
3
  import { c as h } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as b } from "react-i18next";
5
5
  import { A as x } from "./avatar-BNQNhoyL.js";
6
6
  import { B as y } from "./badge-zsf5i5bH.js";
7
- import { C as N } from "./chevron-right-BrpYejk0.js";
8
- const C = h(
7
+ import { i as N } from "./is-safe-url-DkETxeHz.js";
8
+ import { C } from "./chevron-right-BrpYejk0.js";
9
+ const w = h(
9
10
  [
10
11
  "ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
11
12
  "ds:rounded-[var(--radius-sm)]",
@@ -39,44 +40,40 @@ const C = h(
39
40
  "ds:focus-visible:after:outline-[color:var(--ring)]",
40
41
  "ds:focus-visible:after:outline-offset-[length:var(--focus-ring-offset)]",
41
42
  "ds:forced-colors:focus-visible:after:outline-[CanvasText]"
42
- ].join(" ");
43
- function w(s) {
44
- return /^(https?:\/\/(?!\/)|\/(?!\/)|#)/.test(s);
45
- }
46
- const k = {
43
+ ].join(" "), k = {
47
44
  confirmed: "success",
48
45
  pending: "warning",
49
46
  cancelled: "error"
50
47
  }, T = v(
51
- ({ item: s, size: o = "sm", onActivate: a, className: f, ...m }, p) => {
52
- const { t: i } = b(), r = !!a, g = !!s.url && w(s.url), l = i("agendaCard.itemLabel", {
48
+ ({ item: s, size: o = "sm", onActivate: e, className: f, ...m }, p) => {
49
+ const { t: i } = b(), r = !!e, g = !!s.url && N(s.url), l = i("agendaCard.itemLabel", {
53
50
  time: s.time,
54
51
  patient: s.patient.name,
55
52
  treatment: s.treatment ?? "",
56
53
  defaultValue: '{{time}} · {{patient}}{{treatment, prepend, " · "}}'
57
- }), d = /* @__PURE__ */ e("span", { className: "ds:flex-1 ds:min-w-0 ds:truncate type-body-sm ds:text-[color:var(--foreground)]", children: s.patient.name });
54
+ }), n = /* @__PURE__ */ a("span", { className: "ds:flex-1 ds:min-w-0 ds:truncate type-body-sm ds:text-[color:var(--foreground)]", children: s.patient.name });
58
55
  let t;
59
- return r && g ? t = /* @__PURE__ */ e(
56
+ return r && g ? t = /* @__PURE__ */ a(
60
57
  "a",
61
58
  {
62
59
  href: s.url,
63
60
  "aria-label": l,
64
61
  className: u + " ds:contents",
65
- onClick: (n) => {
66
- n.defaultPrevented || n.metaKey || n.ctrlKey || n.shiftKey || a == null || a(s);
62
+ onClick: (d) => {
63
+ d.defaultPrevented || d.metaKey || d.ctrlKey || d.shiftKey || e == null || e(s);
67
64
  },
68
- children: d
65
+ children: n
69
66
  }
70
- ) : r ? t = /* @__PURE__ */ e(
67
+ ) : r ? t = /* @__PURE__ */ a(
71
68
  "button",
72
69
  {
73
70
  type: "button",
74
71
  "aria-label": l,
75
72
  className: u + " ds:contents ds:bg-transparent ds:border-0 ds:p-0 ds:text-start",
76
- onClick: () => a == null ? void 0 : a(s),
77
- children: d
73
+ onClick: () => e == null ? void 0 : e(s),
74
+ children: n
78
75
  }
79
- ) : t = d, /* @__PURE__ */ c(
76
+ ) : t = n, /* @__PURE__ */ c(
80
77
  "div",
81
78
  {
82
79
  ref: p,
@@ -84,10 +81,10 @@ const k = {
84
81
  "data-component": "agenda-card",
85
82
  "data-component-id": s.id,
86
83
  "data-status": s.status ?? "confirmed",
87
- className: C({ size: o, interactive: r, className: f }),
84
+ className: w({ size: o, interactive: r, className: f }),
88
85
  ...m,
89
86
  children: [
90
- /* @__PURE__ */ e(
87
+ /* @__PURE__ */ a(
91
88
  "span",
92
89
  {
93
90
  "aria-hidden": "true",
@@ -95,7 +92,7 @@ const k = {
95
92
  children: s.time
96
93
  }
97
94
  ),
98
- /* @__PURE__ */ e(
95
+ /* @__PURE__ */ a(
99
96
  x,
100
97
  {
101
98
  name: s.patient.name,
@@ -109,9 +106,9 @@ const k = {
109
106
  ),
110
107
  /* @__PURE__ */ c("div", { className: "ds:flex-1 ds:min-w-0 ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
111
108
  t,
112
- s.treatment ? /* @__PURE__ */ e("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)] ds:truncate", children: s.treatment }) : null
109
+ s.treatment ? /* @__PURE__ */ a("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)] ds:truncate", children: s.treatment }) : null
113
110
  ] }),
114
- s.status && s.status !== "confirmed" ? /* @__PURE__ */ e(
111
+ s.status && s.status !== "confirmed" ? /* @__PURE__ */ a(
115
112
  y,
116
113
  {
117
114
  variant: k[s.status],
@@ -121,8 +118,8 @@ const k = {
121
118
  children: i(`agendaCard.status.${s.status}`, s.status)
122
119
  }
123
120
  ) : null,
124
- r ? /* @__PURE__ */ e(
125
- N,
121
+ r ? /* @__PURE__ */ a(
122
+ C,
126
123
  {
127
124
  "aria-hidden": "true",
128
125
  className: "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"
@@ -135,7 +132,6 @@ const k = {
135
132
  );
136
133
  T.displayName = "AgendaCard";
137
134
  export {
138
- T as A,
139
- w as i
135
+ T as A
140
136
  };
141
- //# sourceMappingURL=agenda-card-CFyWSX7Z.js.map
137
+ //# sourceMappingURL=agenda-card-BaSfVfrL.js.map
@@ -1,32 +1,15 @@
1
1
  import { jsx as a, jsxs as n } from "react/jsx-runtime";
2
- import { forwardRef as R, useRef as f, useImperativeHandle as z, useMemo as C } from "react";
3
- import { c as S } from "./index-D2ZczOXr.js";
4
- import { useTranslation as _ } from "react-i18next";
5
- import { I as j } from "./icon-button-CKEOrN37.js";
6
- import { S as E } from "./skeleton-CZbwyJAA.js";
7
- import { E as P } from "./empty-state-BLy7tigq.js";
8
- import { A as H } from "./agenda-card-CFyWSX7Z.js";
9
- import { u as K } from "./registry-nPAVE19X.js";
10
- import { c as L } from "./createLucideIcon-CrFbzy84.js";
11
- import { P as V } 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 q = [
19
- ["path", { d: "M8 2v4", key: "1cmpym" }],
20
- ["path", { d: "M16 2v4", key: "4m81vk" }],
21
- ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
22
- ["path", { d: "M3 10h18", key: "8toen8" }],
23
- ["path", { d: "M8 14h.01", key: "6423bh" }],
24
- ["path", { d: "M12 14h.01", key: "1etili" }],
25
- ["path", { d: "M16 14h.01", key: "1gbofw" }],
26
- ["path", { d: "M8 18h.01", key: "lrp35t" }],
27
- ["path", { d: "M12 18h.01", key: "mhygvu" }],
28
- ["path", { d: "M16 18h.01", key: "kzsmim" }]
29
- ], B = L("calendar-days", q), D = {
2
+ import { forwardRef as k, useRef as y, useImperativeHandle as S, useMemo as j } from "react";
3
+ import { c as z } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as E } from "react-i18next";
5
+ import { I as P } from "./icon-button-CKEOrN37.js";
6
+ import { S as _ } from "./skeleton-CZbwyJAA.js";
7
+ import { E as H } from "./empty-state-BLy7tigq.js";
8
+ import { A as K } from "./agenda-card-BaSfVfrL.js";
9
+ import { u as M } from "./registry-nPAVE19X.js";
10
+ import { C as V } from "./calendar-days-C4BmpCZg.js";
11
+ import { P as q } from "./plus-CYKNmfuA.js";
12
+ const B = {
30
13
  id: "agenda-tray",
31
14
  capabilities: ["select_single"],
32
15
  state: {
@@ -34,7 +17,7 @@ const q = [
34
17
  type: "Array<{ id: string; status: string }>",
35
18
  descriptionKey: "ui.agent.agendaTray.state.items",
36
19
  description: "Currently-displayed appointments. Ids + status only — never patient identity.",
37
- read: (t) => t.getItems()
20
+ read: (s) => s.getItems()
38
21
  }
39
22
  },
40
23
  actions: {
@@ -43,8 +26,8 @@ const q = [
43
26
  argsType: "{ id: string }",
44
27
  descriptionKey: "ui.agent.agendaTray.actions.selectItem",
45
28
  description: "Activate the appointment with the given id.",
46
- invoke: (t, s) => {
47
- t.selectItem(s.id);
29
+ invoke: (s, t) => {
30
+ s.selectItem(t.id);
48
31
  }
49
32
  }
50
33
  },
@@ -64,7 +47,7 @@ const q = [
64
47
  description: "Stable appointment id emitted on each rendered AgendaCard inside the tray."
65
48
  }
66
49
  }
67
- }, F = S(
50
+ }, D = z(
68
51
  [
69
52
  "ds:flex ds:flex-col",
70
53
  "ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)]",
@@ -83,11 +66,11 @@ const q = [
83
66
  size: "sm"
84
67
  }
85
68
  }
86
- ), G = R(
69
+ ), L = k(
87
70
  ({
88
- id: t,
89
- items: s,
90
- title: u,
71
+ id: s,
72
+ items: t,
73
+ title: h,
91
74
  caption: c,
92
75
  size: l = "sm",
93
76
  onOpenAppointment: r,
@@ -95,25 +78,25 @@ const q = [
95
78
  addLabel: v,
96
79
  loading: p = !1,
97
80
  emptyTitle: x,
98
- emptyDescription: k,
99
- className: b,
100
- ...T
81
+ emptyDescription: b,
82
+ className: T,
83
+ ...N
101
84
  }, w) => {
102
- const { t: d } = _(), y = u ?? d("agendaTray.title", "Today's appointments"), N = v ?? d("agendaTray.add", "Add appointment"), I = !p && s.length === 0;
85
+ const { t: d } = E(), g = h ?? d("agendaTray.title", "Today's appointments"), I = v ?? d("agendaTray.add", "Add appointment"), A = !p && t.length === 0;
103
86
  let i;
104
- p ? i = /* @__PURE__ */ a("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [0, 1, 2].map((e) => /* @__PURE__ */ a(E, { variant: "rectangular", height: "2.5rem" }, e)) }) : I ? i = /* @__PURE__ */ a("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ a(
105
- P,
87
+ p ? i = /* @__PURE__ */ a("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [0, 1, 2].map((e) => /* @__PURE__ */ a(_, { variant: "rectangular", height: "2.5rem" }, e)) }) : A ? i = /* @__PURE__ */ a("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ a(
88
+ H,
106
89
  {
107
90
  variant: "first-use",
108
91
  size: "sm",
109
92
  title: x ?? d("agendaTray.empty.title", "No appointments"),
110
- description: k ?? d(
93
+ description: b ?? d(
111
94
  "agendaTray.empty.description",
112
95
  "New appointments will appear here."
113
96
  )
114
97
  }
115
- ) }) : i = /* @__PURE__ */ a("ul", { className: "ds:flex ds:list-none ds:flex-col", children: s.map((e) => /* @__PURE__ */ a(
116
- H,
98
+ ) }) : i = /* @__PURE__ */ a("ul", { className: "ds:flex ds:list-none ds:flex-col", children: t.map((e) => /* @__PURE__ */ a(
99
+ K,
117
100
  {
118
101
  item: e,
119
102
  size: l,
@@ -122,48 +105,48 @@ const q = [
122
105
  },
123
106
  e.id
124
107
  )) });
125
- const o = f(s);
126
- o.current = s;
127
- const h = f(null);
128
- z(w, () => h.current, []);
129
- const M = C(
108
+ const o = y(t);
109
+ o.current = t;
110
+ const f = y(null);
111
+ S(w, () => f.current, []);
112
+ const C = j(
130
113
  () => ({
131
114
  getItems: () => o.current.map((e) => ({
132
115
  id: e.id,
133
116
  status: e.status ?? "confirmed"
134
117
  })),
135
118
  selectItem: (e) => {
136
- const g = o.current.find((A) => A.id === e);
137
- g && (r == null || r(g));
119
+ const u = o.current.find((R) => R.id === e);
120
+ u && (r == null || r(u));
138
121
  }
139
122
  }),
140
123
  [r]
141
124
  );
142
- return K(D, M, t), /* @__PURE__ */ n(
125
+ return M(B, C, s), /* @__PURE__ */ n(
143
126
  "section",
144
127
  {
145
- ref: h,
146
- "aria-label": y,
128
+ ref: f,
129
+ "aria-label": g,
147
130
  "data-component": "agenda-tray",
148
- "data-component-id": t,
149
- className: F({ size: l, className: b }),
150
- ...T,
131
+ "data-component-id": s,
132
+ className: D({ size: l, className: T }),
133
+ ...N,
151
134
  children: [
152
135
  /* @__PURE__ */ n("header", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [
153
136
  /* @__PURE__ */ n("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:min-w-0", children: [
154
137
  /* @__PURE__ */ n("h3", { className: "ds:m-0 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-card", children: [
155
- /* @__PURE__ */ a(B, { "aria-hidden": "true", className: "ds:size-4" }),
156
- y
138
+ /* @__PURE__ */ a(V, { "aria-hidden": "true", className: "ds:size-4" }),
139
+ g
157
140
  ] }),
158
141
  c ? /* @__PURE__ */ a("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)]", children: c }) : null
159
142
  ] }),
160
143
  m ? /* @__PURE__ */ a(
161
- j,
144
+ P,
162
145
  {
163
- icon: /* @__PURE__ */ a(V, {}),
146
+ icon: /* @__PURE__ */ a(q, {}),
164
147
  intent: "outline",
165
148
  size: "sm",
166
- "aria-label": N,
149
+ "aria-label": I,
167
150
  onClick: m
168
151
  }
169
152
  ) : null
@@ -174,9 +157,9 @@ const q = [
174
157
  );
175
158
  }
176
159
  );
177
- G.displayName = "AgendaTray";
160
+ L.displayName = "AgendaTray";
178
161
  export {
179
- G as A,
180
- D as a
162
+ L as A,
163
+ B as a
181
164
  };
182
- //# sourceMappingURL=agenda-tray-Dyj9ChHC.js.map
165
+ //# sourceMappingURL=agenda-tray-DQayYmQ0.js.map
@@ -0,0 +1,169 @@
1
+ import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
+ import { forwardRef as N, useState as k, useRef as q, useMemo as I } from "react";
3
+ import { c as L } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as R } from "react-i18next";
5
+ import { A as d } from "./alert-ywPR59NE.js";
6
+ import { B as w } from "./badge-zsf5i5bH.js";
7
+ import { B as T } from "./button-DD_0Xdmr.js";
8
+ import { C as V } from "./checkbox-DRcOdmXv.js";
9
+ import { S as j } from "./spinner-OjQNn8oN.js";
10
+ import { T as z } from "./timestamp-BV2lC-wV.js";
11
+ import { u as G } from "./registry-nPAVE19X.js";
12
+ const K = {
13
+ id: "ai-consent-banner",
14
+ capabilities: [],
15
+ state: {
16
+ consentState: {
17
+ type: "'granted' | 'required' | 'pending'",
18
+ descriptionKey: "ui.agent.aiConsentBanner.state.consentState",
19
+ description: "Current consent state. Structural only — never the grantee identity.",
20
+ read: (a) => a.getState()
21
+ },
22
+ armed: {
23
+ type: "boolean",
24
+ descriptionKey: "ui.agent.aiConsentBanner.state.armed",
25
+ description: "Whether the consent confirmation checkbox is ticked (required state only).",
26
+ read: (a) => a.isArmed()
27
+ }
28
+ },
29
+ actions: {},
30
+ domHooks: {
31
+ root: {
32
+ attr: "data-component",
33
+ value: "ai-consent-banner",
34
+ description: "Marks the AiConsentBanner root region."
35
+ },
36
+ instanceId: {
37
+ attr: "data-component-id",
38
+ sourceProp: "id",
39
+ description: "Sourced from the id prop. Required to address a specific banner from the agent."
40
+ }
41
+ }
42
+ }, M = L("ds:w-full ds:text-[color:var(--foreground)]", {
43
+ variants: {
44
+ state: {
45
+ granted: "",
46
+ required: "",
47
+ pending: ""
48
+ }
49
+ },
50
+ defaultVariants: {
51
+ state: "required"
52
+ }
53
+ });
54
+ function u(a, s) {
55
+ return s ? "pending" : a ? "granted" : "required";
56
+ }
57
+ const P = N(
58
+ ({
59
+ id: a,
60
+ granted: s,
61
+ grantedAt: l,
62
+ grantedBy: m,
63
+ canGrant: f = !0,
64
+ pending: c = !1,
65
+ onGrantConsent: g,
66
+ "aria-label": h,
67
+ className: v,
68
+ ...b
69
+ }, C) => {
70
+ const { t: e } = R(), t = u(s, c), [o, B] = k(!1), p = q(o);
71
+ p.current = o;
72
+ const y = I(
73
+ () => ({
74
+ getState: () => u(s, c),
75
+ isArmed: () => p.current
76
+ }),
77
+ [s, c]
78
+ );
79
+ G(K, y, a);
80
+ const A = h ?? e("aiConsentBanner.regionLabel", "AI assistance consent"), x = t === "granted" ? "success" : "info";
81
+ let i;
82
+ return t === "granted" ? i = /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
83
+ /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
84
+ /* @__PURE__ */ n(w, { variant: "success", children: e("aiConsentBanner.badge.granted", "Consent granted") }),
85
+ l !== void 0 ? /* @__PURE__ */ r("span", { className: "type-body-sm ds:text-[color:var(--muted-foreground)]", children: [
86
+ e("aiConsentBanner.grantedAtPrefix", "Granted"),
87
+ " ",
88
+ /* @__PURE__ */ n(z, { value: l, format: "relative", shape: "inline" })
89
+ ] }) : null
90
+ ] }),
91
+ m ? /* @__PURE__ */ n("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: e("aiConsentBanner.grantedBy", {
92
+ name: m,
93
+ defaultValue: "By {{name}}"
94
+ }) }) : null
95
+ ] }) : t === "pending" ? i = /* @__PURE__ */ r("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
96
+ /* @__PURE__ */ n(
97
+ j,
98
+ {
99
+ size: "sm",
100
+ label: e("aiConsentBanner.pendingLabel", "Saving consent…")
101
+ }
102
+ ),
103
+ /* @__PURE__ */ n("span", { className: "type-body-sm ds:text-[color:var(--muted-foreground)]", children: e("aiConsentBanner.pendingLabel", "Saving consent…") })
104
+ ] }) : i = f ? /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
105
+ /* @__PURE__ */ n(
106
+ V,
107
+ {
108
+ checked: o,
109
+ onCheckedChange: (S) => B(S === !0),
110
+ label: e(
111
+ "aiConsentBanner.confirmLabel",
112
+ "I confirm consent has been obtained for AI assistance."
113
+ )
114
+ }
115
+ ),
116
+ /* @__PURE__ */ n(d.Action, { children: /* @__PURE__ */ n(
117
+ T,
118
+ {
119
+ intent: "primary",
120
+ size: "sm",
121
+ disabled: !o,
122
+ onClick: g,
123
+ children: e("aiConsentBanner.grantButton", "Grant consent")
124
+ }
125
+ ) })
126
+ ] }) : /* @__PURE__ */ n("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: e(
127
+ "aiConsentBanner.notAllowed",
128
+ "You do not have permission to grant AI assistance consent."
129
+ ) }), /* @__PURE__ */ n(
130
+ "div",
131
+ {
132
+ ref: C,
133
+ role: "region",
134
+ "aria-label": A,
135
+ "aria-busy": t === "pending" ? !0 : void 0,
136
+ "data-component": "ai-consent-banner",
137
+ "data-component-id": a,
138
+ "data-state": t,
139
+ id: a,
140
+ className: M({ state: t, className: v }),
141
+ ...b,
142
+ children: /* @__PURE__ */ r(
143
+ d,
144
+ {
145
+ variant: x,
146
+ icon: t === "pending" ? null : void 0,
147
+ children: [
148
+ /* @__PURE__ */ n(d.Title, { children: e("aiConsentBanner.title", "AI assistance consent") }),
149
+ /* @__PURE__ */ n(d.Description, { children: t === "granted" ? e(
150
+ "aiConsentBanner.description.granted",
151
+ "AI assistance is enabled for this record."
152
+ ) : e(
153
+ "aiConsentBanner.description.required",
154
+ "AI assistance requires recorded consent before it can run."
155
+ ) }),
156
+ i
157
+ ]
158
+ }
159
+ )
160
+ }
161
+ );
162
+ }
163
+ );
164
+ P.displayName = "AiConsentBanner";
165
+ export {
166
+ P as A,
167
+ K as a
168
+ };
169
+ //# sourceMappingURL=ai-consent-banner-DO5ingMq.js.map