@alfadocs/ui-kit 1.66.0 → 1.67.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 (143) hide show
  1. package/dist/_chunks/ai-credits-exhausted-notice-DfAgfZDF.js +287 -0
  2. package/dist/_chunks/ai-credits-exhausted-notice.agent-DgTSTgez.js +43 -0
  3. package/dist/_chunks/ai-credits-notice-DQ-r3iQU.js +191 -0
  4. package/dist/_chunks/{ai-permission-notice-DpRmZ9Q3.js → ai-permission-notice-qsdm4Sx4.js} +2 -2
  5. package/dist/_chunks/{alert-DdDpOi-P.js → alert-DjsJMGRE.js} +3 -2
  6. package/dist/_chunks/{anamnesis-summary-rows-BIfw890v.js → anamnesis-summary-rows-BQ_EokKz.js} +2 -2
  7. package/dist/_chunks/{audio-recorder-DR-u1qbl.js → audio-recorder-B11RR-rC.js} +2 -2
  8. package/dist/_chunks/{auth-form-parts-Cmb41LSQ.js → auth-form-parts-DwUTH6YN.js} +2 -2
  9. package/dist/_chunks/{booking-DkjatiXc.js → booking-tTVxKPQY.js} +2 -2
  10. package/dist/_chunks/{calendar-workspace-Cp8yTZ1g.js → calendar-workspace-MRrzcxAy.js} +6 -6
  11. package/dist/_chunks/{document-preview-B1dQm292.js → document-preview-VyQOjFVL.js} +2 -2
  12. package/dist/_chunks/{document-scanner-CVPVLK7z.js → document-scanner-CXH_GYh4.js} +2 -2
  13. package/dist/_chunks/{entity-summary-BQ9_KA8S.js → entity-summary-Bj-Wxq7Y.js} +2 -2
  14. package/dist/_chunks/{error-summary-DrUfuKu1.js → error-summary-PUE5Zxp9.js} +2 -2
  15. package/dist/_chunks/{forgot-password-form-CgZkEvZy.js → forgot-password-form-CPOfRE0C.js} +4 -4
  16. package/dist/_chunks/{freemium-paywall-DKJHRFpp.js → freemium-paywall-6DO7noHX.js} +2 -2
  17. package/dist/_chunks/help-me-write-templates-Bw3Q58x-.js +687 -0
  18. package/dist/_chunks/hourglass-BEAzW1wE.js +26 -0
  19. package/dist/_chunks/{login-dev-card-PnADNcI9.js → login-dev-card-A-CL3mjt.js} +3 -3
  20. package/dist/_chunks/{marketplace-app-shell-C-2e4eCD.js → marketplace-app-shell-DtSX8sYb.js} +2 -2
  21. package/dist/_chunks/{notes-panel-uEGIL7mi.js → notes-panel-IdsmqRFC.js} +3 -3
  22. package/dist/_chunks/{patient-details-4P1vA9Ls.js → patient-details-C-EWQTms.js} +2 -2
  23. package/dist/_chunks/{patient-field-row-CBXhlfGD.js → patient-field-row-lY-Tb5Mo.js} +155 -176
  24. package/dist/_chunks/{patient-search-DOnDUVsl.js → patient-search-DpAKidZ5.js} +2 -2
  25. package/dist/_chunks/{patient-summary-card-CuDLo8MP.js → patient-summary-card-Bpto_VCD.js} +2 -2
  26. package/dist/_chunks/{payment-automation-upsell-C8MEu0t6.js → payment-automation-upsell-BQ307qEX.js} +2 -2
  27. package/dist/_chunks/{payment-form-C3dGY7v4.js → payment-form-XKtinW8r.js} +2 -2
  28. package/dist/_chunks/{pdf-viewer-DJ9VN7cu.js → pdf-viewer-BvoVMjH4.js} +2 -2
  29. package/dist/_chunks/{practice-results-8h2Utpt3.js → practice-results-BrUDDMXC.js} +2 -2
  30. package/dist/_chunks/{registration-form-BQyT_kBX.js → registration-form-BxwqUZzk.js} +3 -3
  31. package/dist/_chunks/{rich-text-editor-M2gT_E7f.js → rich-text-editor-aCIoptbg.js} +1653 -1743
  32. package/dist/_chunks/{sign-document-CY7xTXbm.js → sign-document-D1P1nUQA.js} +2 -2
  33. package/dist/_chunks/{signature-request-BMCHy2ZO.js → signature-request-3u6TvRt2.js} +2 -2
  34. package/dist/_chunks/{task-editor-CifOznfq.js → task-editor-Bb5MMcid.js} +2 -2
  35. package/dist/_chunks/{tasks-panel-8nLwBw6P.js → tasks-panel-BOb57Ysw.js} +2 -2
  36. package/dist/_chunks/{use-appointment-details-read-B-FEWbQM.js → use-appointment-details-read-CVSPoP5j.js} +4 -4
  37. package/dist/_chunks/voice-control-panel-BJIEbDq6.js +1148 -0
  38. package/dist/_chunks/{warning-stack-HYWAytZV.js → warning-stack-BdY-0bd3.js} +2 -2
  39. package/dist/_chunks/{workflow-map-C2B2qIr1.js → workflow-map-CYbRD9ek.js} +2 -2
  40. package/dist/agent-catalog.json +50 -3
  41. package/dist/agent-i18n/en.json +7 -4
  42. package/dist/components/ai-credits-notice/ai-credits-exhausted-notice.agent.d.ts +4 -0
  43. package/dist/components/ai-credits-notice/ai-credits-exhausted-notice.d.ts +96 -0
  44. package/dist/components/ai-credits-notice/ai-credits-notice.d.ts +30 -4
  45. package/dist/components/ai-credits-notice/index.d.ts +3 -0
  46. package/dist/components/ai-credits-notice/index.js +10 -4
  47. package/dist/components/ai-permission-notice/index.js +1 -1
  48. package/dist/components/alert/index.js +1 -1
  49. package/dist/components/appointment-details-panel/index.js +1 -1
  50. package/dist/components/audio-recorder/index.js +1 -1
  51. package/dist/components/booking/index.js +1 -1
  52. package/dist/components/document-preview/index.js +1 -1
  53. package/dist/components/document-scanner/index.js +1 -1
  54. package/dist/components/entity-summary/index.js +1 -1
  55. package/dist/components/error-summary/index.js +1 -1
  56. package/dist/components/freemium-paywall/index.js +1 -1
  57. package/dist/components/notes-panel/index.js +1 -1
  58. package/dist/components/patient-details/index.js +1 -1
  59. package/dist/components/patient-search/index.js +1 -1
  60. package/dist/components/patient-summary-card/index.js +1 -1
  61. package/dist/components/payment-form/index.js +1 -1
  62. package/dist/components/pdf-viewer/index.js +1 -1
  63. package/dist/components/practice-results/index.js +1 -1
  64. package/dist/components/rich-text-editor/index.js +1 -1
  65. package/dist/components/sign-document/index.js +1 -1
  66. package/dist/components/task-editor/index.js +1 -1
  67. package/dist/components/tasks-panel/index.js +1 -1
  68. package/dist/components/voice-control-panel/index.d.ts +2 -1
  69. package/dist/components/voice-control-panel/index.js +1 -1
  70. package/dist/components/voice-control-panel/voice-control-panel.d.ts +43 -3
  71. package/dist/components/warning-stack/index.js +1 -1
  72. package/dist/components/workflow/index.js +1 -1
  73. package/dist/i18n/locales/ar.d.ts +27 -12
  74. package/dist/i18n/locales/ar.js +27 -12
  75. package/dist/i18n/locales/de.d.ts +27 -12
  76. package/dist/i18n/locales/de.js +27 -12
  77. package/dist/i18n/locales/el.d.ts +27 -12
  78. package/dist/i18n/locales/el.js +27 -12
  79. package/dist/i18n/locales/en.d.ts +27 -12
  80. package/dist/i18n/locales/en.js +27 -12
  81. package/dist/i18n/locales/es.d.ts +27 -12
  82. package/dist/i18n/locales/es.js +27 -12
  83. package/dist/i18n/locales/fr.d.ts +27 -12
  84. package/dist/i18n/locales/fr.js +27 -12
  85. package/dist/i18n/locales/hi.d.ts +27 -12
  86. package/dist/i18n/locales/hi.js +27 -12
  87. package/dist/i18n/locales/it.d.ts +27 -12
  88. package/dist/i18n/locales/it.js +27 -12
  89. package/dist/i18n/locales/ja.d.ts +27 -12
  90. package/dist/i18n/locales/ja.js +27 -12
  91. package/dist/i18n/locales/nl.d.ts +27 -12
  92. package/dist/i18n/locales/nl.js +27 -12
  93. package/dist/i18n/locales/pl.d.ts +27 -12
  94. package/dist/i18n/locales/pl.js +27 -12
  95. package/dist/i18n/locales/pt.d.ts +27 -12
  96. package/dist/i18n/locales/pt.js +27 -12
  97. package/dist/i18n/locales/ro.d.ts +27 -12
  98. package/dist/i18n/locales/ro.js +27 -12
  99. package/dist/i18n/locales/ru.d.ts +27 -12
  100. package/dist/i18n/locales/ru.js +27 -12
  101. package/dist/i18n/locales/sq.d.ts +27 -12
  102. package/dist/i18n/locales/sq.js +27 -12
  103. package/dist/i18n/locales/sv.d.ts +27 -12
  104. package/dist/i18n/locales/sv.js +27 -12
  105. package/dist/i18n/locales/tr.d.ts +27 -12
  106. package/dist/i18n/locales/tr.js +27 -12
  107. package/dist/i18n/locales/zh.d.ts +27 -12
  108. package/dist/i18n/locales/zh.js +27 -12
  109. package/dist/index.js +814 -809
  110. package/dist/locales/ar.json +27 -12
  111. package/dist/locales/de.json +27 -12
  112. package/dist/locales/el.json +27 -12
  113. package/dist/locales/en.json +27 -12
  114. package/dist/locales/es.json +27 -12
  115. package/dist/locales/fr.json +27 -12
  116. package/dist/locales/hi.json +27 -12
  117. package/dist/locales/it.json +27 -12
  118. package/dist/locales/ja.json +27 -12
  119. package/dist/locales/nl.json +27 -12
  120. package/dist/locales/pl.json +27 -12
  121. package/dist/locales/pt.json +27 -12
  122. package/dist/locales/ro.json +27 -12
  123. package/dist/locales/ru.json +27 -12
  124. package/dist/locales/sq.json +27 -12
  125. package/dist/locales/sv.json +27 -12
  126. package/dist/locales/tr.json +27 -12
  127. package/dist/locales/zh.json +27 -12
  128. package/dist/patterns/anamnesis/index.js +1 -1
  129. package/dist/patterns/calendar/index.js +1 -1
  130. package/dist/patterns/forgot-password-form/index.js +1 -1
  131. package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +6 -23
  132. package/dist/patterns/help-me-write-templates/index.js +8 -7
  133. package/dist/patterns/login-form/index.js +1 -1
  134. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  135. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  136. package/dist/patterns/registration-form/index.js +1 -1
  137. package/dist/patterns/signature-request/index.js +1 -1
  138. package/dist/tokens.css +1 -1
  139. package/package.json +1 -1
  140. package/dist/_chunks/ai-credits-notice-pK9BOmEz.js +0 -90
  141. package/dist/_chunks/ai-credits-notice.agent-C9L7orrP.js +0 -17
  142. package/dist/_chunks/help-me-write-templates-DFmqnsAa.js +0 -747
  143. package/dist/_chunks/voice-control-panel-C0BfY23Y.js +0 -1009
@@ -0,0 +1,287 @@
1
+ import { jsx as a, jsxs as r } from "react/jsx-runtime";
2
+ import { forwardRef as S, useId as E } from "react";
3
+ import { c as x } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as A } from "react-i18next";
5
+ import { C as P, A as b } from "./alert-DjsJMGRE.js";
6
+ import { B as U } from "./button-D-MQxsA_.js";
7
+ import { P as _ } from "./progress-D_g_Sl2g.js";
8
+ import { f as j, n as F } from "./intl-locale-FWh-Y5_3.js";
9
+ import { T as H } from "./trending-up-C_luYBzS.js";
10
+ import { c as M } from "./createLucideIcon-DhHxpK9K.js";
11
+ import { A as k } from "./astroid-BN4f5VXU.js";
12
+ import { A as O } from "./arrow-left-BfaGqVam.js";
13
+ import { H as W } from "./hourglass-BEAzW1wE.js";
14
+ /**
15
+ * @license lucide-react v1.22.0 - ISC
16
+ *
17
+ * This source code is licensed under the ISC license.
18
+ * See the LICENSE file in the root directory of this source tree.
19
+ */
20
+ const G = [
21
+ [
22
+ "path",
23
+ {
24
+ d: "M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",
25
+ key: "12oyoe"
26
+ }
27
+ ],
28
+ ["path", { d: "M21 16v2a4 4 0 0 1-4 4h-5", key: "1x7m43" }]
29
+ ], q = M("headset", G), Z = 0.8;
30
+ function $(n) {
31
+ if (!n) return !1;
32
+ if (n.runningLow !== void 0) return n.runningLow;
33
+ const { remaining: i, limit: o } = n;
34
+ return i === void 0 || o === void 0 || o <= 0 ? !1 : i > 0 && o - i >= o * Z;
35
+ }
36
+ function J(n) {
37
+ return (n == null ? void 0 : n.renewsOn) ?? (n == null ? void 0 : n.resetsOn);
38
+ }
39
+ function V() {
40
+ const { i18n: n } = A("ui"), i = j(n.language), o = new Intl.NumberFormat(F(i), {
41
+ maximumFractionDigits: 1
42
+ }), g = new Intl.DateTimeFormat(i, {
43
+ day: "numeric",
44
+ month: "long",
45
+ year: "numeric"
46
+ });
47
+ return {
48
+ number: (d) => o.format(d),
49
+ date: (d) => g.format(d)
50
+ };
51
+ }
52
+ const z = "ds:min-h-[var(--min-target-size)]", K = [
53
+ z,
54
+ "ds:!h-auto ds:!whitespace-normal ds:text-start ds:[overflow-wrap:anywhere]",
55
+ "ds:py-[var(--spacing-xs)]"
56
+ ].join(" "), L = x(
57
+ [
58
+ "ds:inline-flex ds:items-center ds:min-h-[var(--min-target-size)]",
59
+ "ds:rounded-[var(--radius-sm)] ds:ps-[var(--spacing-2xs)] ds:pe-[var(--spacing-2xs)]",
60
+ "type-body-sm ds:font-medium ds:underline ds:underline-offset-2 ds:hover:no-underline ds:cursor-pointer",
61
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
62
+ "ds:forced-colors:text-[color:LinkText]"
63
+ ].join(" "),
64
+ {
65
+ variants: {
66
+ tone: {
67
+ inherit: "ds:text-[color:inherit]",
68
+ link: "ds:text-[color:var(--link)]"
69
+ }
70
+ },
71
+ defaultVariants: { tone: "link" }
72
+ }
73
+ ), Q = x(
74
+ "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"
75
+ ), X = "ds:m-0 ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", Y = S(
76
+ ({
77
+ credits: n,
78
+ onBack: i,
79
+ footnote: o,
80
+ headingLevel: g = 2,
81
+ announce: d,
82
+ className: l,
83
+ ...m
84
+ }, f) => {
85
+ var R;
86
+ const { t: e } = A("ui"), u = V(), c = E(), t = n == null ? void 0 : n.limit, h = (n == null ? void 0 : n.remaining) ?? 0, p = t !== void 0 && t > 0 ? e("aiCredits.remaining", {
87
+ remaining: u.number(h),
88
+ limit: u.number(t)
89
+ }) : void 0, I = J(n), v = I ? u.date(I) : void 0, y = [
90
+ n != null && n.onBuyCredits ? {
91
+ key: "buy",
92
+ label: e("aiCredits.buy"),
93
+ icon: /* @__PURE__ */ a(H, { "aria-hidden": "true" }),
94
+ onClick: n.onBuyCredits
95
+ } : null,
96
+ n != null && n.onUpgrade ? {
97
+ key: "upgrade",
98
+ label: e("aiCredits.upgrade"),
99
+ icon: /* @__PURE__ */ a(P, { "aria-hidden": "true" }),
100
+ onClick: n.onUpgrade
101
+ } : null,
102
+ n != null && n.onContactSupport ? {
103
+ key: "support",
104
+ label: e("aiCredits.contactSupport"),
105
+ icon: /* @__PURE__ */ a(q, { "aria-hidden": "true" }),
106
+ onClick: n.onContactSupport
107
+ } : null
108
+ ].filter((s) => s !== null), C = (R = y[0]) == null ? void 0 : R.key, B = C === "buy" ? e("aiCredits.bodyBuy") : C === "upgrade" ? e("aiCredits.bodyUpgrade") : C === "support" ? e("aiCredits.bodySupport") : v ? e("aiCredits.bodyRenews", { date: v }) : e("aiCredits.bodyNone"), T = C && v ? v : void 0;
109
+ return /* @__PURE__ */ r(
110
+ "div",
111
+ {
112
+ ...m,
113
+ ref: f,
114
+ "data-component": "ai-credits-exhausted-notice",
115
+ role: "group",
116
+ "aria-labelledby": c,
117
+ className: Q({ className: l }),
118
+ children: [
119
+ /* @__PURE__ */ r(
120
+ b,
121
+ {
122
+ variant: "promo",
123
+ announce: d,
124
+ icon: /* @__PURE__ */ a(k, { "aria-hidden": "true" }),
125
+ className: "ds:[--ring:var(--promo-foreground)]",
126
+ children: [
127
+ /* @__PURE__ */ a(b.Title, { as: `h${g}`, id: c, children: e("aiCredits.title") }),
128
+ /* @__PURE__ */ a(b.Description, { children: B }),
129
+ T ? /* @__PURE__ */ a(
130
+ "p",
131
+ {
132
+ className: "ds:m-0 ds:[margin-block-start:var(--spacing-2xs)] type-body-sm",
133
+ "data-credits-renews": "",
134
+ children: e("aiCredits.renewsOn", { date: T })
135
+ }
136
+ ) : null,
137
+ p && t !== void 0 ? /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:[margin-block-start:var(--spacing-sm)]", children: [
138
+ /* @__PURE__ */ r("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
139
+ /* @__PURE__ */ a("span", { className: "type-label", children: e("aiCredits.meterLabel") }),
140
+ /* @__PURE__ */ a("span", { className: "type-label ds:ms-auto ds:tabular-nums", children: p })
141
+ ] }),
142
+ /* @__PURE__ */ a(
143
+ _,
144
+ {
145
+ value: Math.max(0, t - h),
146
+ max: t,
147
+ size: "sm",
148
+ ariaLabel: e("aiCredits.meterLabel"),
149
+ ariaValueText: p
150
+ }
151
+ )
152
+ ] }) : null,
153
+ y.length > 0 || n != null && n.onSeeCosts ? /* @__PURE__ */ r(b.Action, { children: [
154
+ y.map(
155
+ (s, D) => D === 0 ? /* @__PURE__ */ a(
156
+ U,
157
+ {
158
+ intent: "tonal",
159
+ size: "md",
160
+ startIcon: s.icon,
161
+ onClick: s.onClick,
162
+ className: K,
163
+ "data-credits-action": s.key,
164
+ children: s.label
165
+ },
166
+ s.key
167
+ ) : /* @__PURE__ */ a(
168
+ "button",
169
+ {
170
+ type: "button",
171
+ onClick: s.onClick,
172
+ className: L({ tone: "inherit" }),
173
+ "data-credits-action": s.key,
174
+ children: s.label
175
+ },
176
+ s.key
177
+ )
178
+ ),
179
+ n != null && n.onSeeCosts ? /* @__PURE__ */ a(
180
+ "button",
181
+ {
182
+ type: "button",
183
+ onClick: n.onSeeCosts,
184
+ className: L({ tone: "inherit" }),
185
+ "data-credits-action": "costs",
186
+ children: e("aiCredits.seeCosts")
187
+ }
188
+ ) : null
189
+ ] }) : null
190
+ ]
191
+ }
192
+ ),
193
+ i || o ? /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
194
+ i ? /* @__PURE__ */ a(
195
+ U,
196
+ {
197
+ intent: "ghost",
198
+ startIcon: /* @__PURE__ */ a(O, {}),
199
+ flipIconInRtl: !0,
200
+ onClick: i,
201
+ className: z,
202
+ children: e("aiCredits.back")
203
+ }
204
+ ) : null,
205
+ o ? /* @__PURE__ */ a("p", { className: X, children: o }) : null
206
+ ] }) : null
207
+ ]
208
+ }
209
+ );
210
+ }
211
+ );
212
+ Y.displayName = "AiCreditsExhaustedNotice";
213
+ const w = x(
214
+ "ds:m-0 ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-xs)] type-body-sm",
215
+ {
216
+ variants: {
217
+ // Quiet: muted text and no tint, so it never competes with the
218
+ // promo notice. Out of credits reads in the body colour.
219
+ emphasis: {
220
+ quiet: "ds:text-[color:var(--muted-foreground)]",
221
+ plain: "ds:text-[color:var(--foreground)]"
222
+ }
223
+ },
224
+ defaultVariants: { emphasis: "quiet" }
225
+ }
226
+ ), nn = x(
227
+ "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]"
228
+ ), N = "ds:size-4 ds:shrink-0", an = S(({ credits: n, exhausted: i = !1, className: o, ...g }, d) => {
229
+ const { t: l } = A("ui"), m = V(), f = !i && $(n), e = n != null && n.expiring ? Math.round(n.expiring.amount * 10) / 10 : 0, u = !i && (n != null && n.expiring) && e > 0 ? n.expiring : void 0;
230
+ if (!i && !f && !u) return null;
231
+ const { remaining: c, limit: t } = n ?? {}, h = c !== void 0 && t !== void 0 && t > 0 ? l("aiCredits.runningLow", {
232
+ remaining: m.number(c),
233
+ limit: m.number(t)
234
+ }) : c !== void 0 ? l("aiCredits.runningLowCount", {
235
+ remaining: m.number(c)
236
+ }) : l("aiCredits.runningLowPlain"), p = n != null && n.onBuyCredits ? { label: l("aiCredits.buy"), onClick: n.onBuyCredits } : n != null && n.onUpgrade ? { label: l("aiCredits.upgrade"), onClick: n.onUpgrade } : void 0;
237
+ return /* @__PURE__ */ r(
238
+ "div",
239
+ {
240
+ ...g,
241
+ ref: d,
242
+ "data-component": "ai-credits-warning",
243
+ className: nn({ className: o }),
244
+ children: [
245
+ i ? /* @__PURE__ */ r(
246
+ "p",
247
+ {
248
+ className: w({ emphasis: "plain" }),
249
+ "data-credits-line": "exhausted",
250
+ children: [
251
+ /* @__PURE__ */ a(k, { "aria-hidden": "true", className: N }),
252
+ /* @__PURE__ */ a("span", { children: l("aiCredits.title") })
253
+ ]
254
+ }
255
+ ) : null,
256
+ f ? /* @__PURE__ */ r("p", { className: w(), "data-credits-line": "low", children: [
257
+ /* @__PURE__ */ a(k, { "aria-hidden": "true", className: N }),
258
+ /* @__PURE__ */ a("span", { children: h }),
259
+ p ? /* @__PURE__ */ a(
260
+ "button",
261
+ {
262
+ type: "button",
263
+ onClick: p.onClick,
264
+ className: L({ tone: "link" }),
265
+ children: p.label
266
+ }
267
+ ) : null
268
+ ] }) : null,
269
+ u ? /* @__PURE__ */ r("p", { className: w(), "data-credits-line": "expiring", children: [
270
+ /* @__PURE__ */ a(W, { "aria-hidden": "true", className: N }),
271
+ /* @__PURE__ */ a("span", { children: l("aiCredits.expiring", {
272
+ count: e,
273
+ amount: m.number(e),
274
+ date: m.date(u.date)
275
+ }) })
276
+ ] }) : null
277
+ ]
278
+ }
279
+ );
280
+ });
281
+ an.displayName = "AiCreditsWarning";
282
+ export {
283
+ Y as A,
284
+ an as a,
285
+ $ as i
286
+ };
287
+ //# sourceMappingURL=ai-credits-exhausted-notice-DfAgfZDF.js.map
@@ -0,0 +1,43 @@
1
+ const t = {
2
+ id: "ai-credits-notice",
3
+ capabilities: [],
4
+ state: {},
5
+ actions: {},
6
+ domHooks: {
7
+ root: {
8
+ attr: "data-component",
9
+ value: "ai-credits-notice",
10
+ description: 'Marks the element as a kit AiCreditsNotice card body. Carries a sibling `data-mode="included|bundles"` attribute for which notice is showing.'
11
+ }
12
+ }
13
+ }, i = {
14
+ id: "ai-credits-exhausted-notice",
15
+ capabilities: [],
16
+ state: {},
17
+ actions: {},
18
+ domHooks: {
19
+ root: {
20
+ attr: "data-component",
21
+ value: "ai-credits-exhausted-notice",
22
+ description: 'Marks the out-of-credits notice. Each next-step button carries `data-credits-action="buy|upgrade|support|costs"`.'
23
+ }
24
+ }
25
+ }, e = {
26
+ id: "ai-credits-warning",
27
+ capabilities: [],
28
+ state: {},
29
+ actions: {},
30
+ domHooks: {
31
+ root: {
32
+ attr: "data-component",
33
+ value: "ai-credits-warning",
34
+ description: 'Marks the quiet credit lines. Each line carries `data-credits-line="low|expiring|exhausted"`.'
35
+ }
36
+ }
37
+ };
38
+ export {
39
+ i as a,
40
+ t as b,
41
+ e as c
42
+ };
43
+ //# sourceMappingURL=ai-credits-exhausted-notice.agent-DgTSTgez.js.map
@@ -0,0 +1,191 @@
1
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as L, useState as x, useMemo as B, useRef as y, useCallback as u, useEffect as D } from "react";
3
+ import { c as S } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as T } from "react-i18next";
5
+ import { B as C } from "./button-D-MQxsA_.js";
6
+ import { P as p } from "./progress-D_g_Sl2g.js";
7
+ import { H as a, u as z } from "./hover-card-CTNhQXWS.js";
8
+ import { f as O } from "./intl-locale-FWh-Y5_3.js";
9
+ const P = S("ds:flex ds:flex-col ds:items-start", {
10
+ variants: {
11
+ mode: {
12
+ included: "",
13
+ bundles: ""
14
+ }
15
+ },
16
+ defaultVariants: {
17
+ mode: "included"
18
+ }
19
+ }), k = L((e, o) => {
20
+ const { t: i, i18n: r } = T("ui"), { allowance: n, className: d, mode: s, ...h } = e, {
21
+ onLearnMore: N,
22
+ onDismiss: c,
23
+ onViewBundles: b,
24
+ onSeeCosts: g,
25
+ ...f
26
+ } = h, m = !!(n && n.limit > 0), v = m && (n != null && n.resetsOn) ? (
27
+ // The allowance is yearly, so the year is part of the date.
28
+ new Intl.DateTimeFormat(O(r.language), {
29
+ day: "numeric",
30
+ month: "long",
31
+ year: "numeric"
32
+ }).format(n.resetsOn)
33
+ ) : void 0, w = m ? i("aiCreditsNotice.included.allowance", {
34
+ remaining: n.remaining,
35
+ limit: n.limit
36
+ }) : void 0, A = s === "included" ? i("aiCreditsNotice.included.heading") : m ? i("aiCreditsNotice.bundles.headingWithAllowance", {
37
+ remaining: n.remaining,
38
+ limit: n.limit
39
+ }) : i("aiCreditsNotice.bundles.eyebrow"), M = s === "included" ? i("aiCreditsNotice.included.body") : m ? i("aiCreditsNotice.bundles.body", { limit: n.limit }) : i("aiCreditsNotice.bundles.bodyGeneric");
40
+ return /* @__PURE__ */ l(
41
+ "div",
42
+ {
43
+ ...f,
44
+ ref: o,
45
+ "data-component": "ai-credits-notice",
46
+ "data-mode": s,
47
+ className: P({ mode: s, className: d }),
48
+ children: [
49
+ /* @__PURE__ */ t(a.Eyebrow, { children: i(s === "included" ? "aiCreditsNotice.included.eyebrow" : "aiCreditsNotice.bundles.eyebrow") }),
50
+ /* @__PURE__ */ t(a.Heading, { children: A }),
51
+ /* @__PURE__ */ l(a.Body, { children: [
52
+ /* @__PURE__ */ t("p", { className: "ds:m-0", children: M }),
53
+ s === "included" && m ? /* @__PURE__ */ l("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:[margin-block-start:var(--spacing-sm)]", children: [
54
+ /* @__PURE__ */ t("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: /* @__PURE__ */ t("span", { className: "type-label", children: w }) }),
55
+ /* @__PURE__ */ t(
56
+ p,
57
+ {
58
+ value: Math.max(0, n.limit - n.remaining),
59
+ max: n.limit,
60
+ size: "sm",
61
+ ariaLabel: i("aiCreditsNotice.included.eyebrow"),
62
+ ariaValueText: w
63
+ }
64
+ ),
65
+ v ? /* @__PURE__ */ t("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: i("aiCreditsNotice.included.resetsOn", { date: v }) }) : null
66
+ ] }) : null
67
+ ] }),
68
+ s === "included" ? e.onLearnMore || e.onDismiss ? /* @__PURE__ */ l(a.Footer, { children: [
69
+ e.onDismiss ? /* @__PURE__ */ t(
70
+ C,
71
+ {
72
+ intent: "link",
73
+ size: "sm",
74
+ onClick: e.onDismiss,
75
+ className: "ds:me-auto",
76
+ children: i("aiCreditsNotice.dismiss")
77
+ }
78
+ ) : null,
79
+ e.onLearnMore ? /* @__PURE__ */ t(C, { intent: "link", size: "sm", onClick: e.onLearnMore, children: i("aiCreditsNotice.included.learnMore") }) : null
80
+ ] }) : null : /* @__PURE__ */ l(a.Footer, { children: [
81
+ e.onSeeCosts || e.onDismiss ? /* @__PURE__ */ l("div", { className: "ds:me-auto ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
82
+ e.onSeeCosts ? /* @__PURE__ */ t(C, { intent: "link", size: "sm", onClick: e.onSeeCosts, children: i("aiCreditsNotice.bundles.seeCosts") }) : null,
83
+ e.onDismiss ? /* @__PURE__ */ t(C, { intent: "link", size: "sm", onClick: e.onDismiss, children: i("aiCreditsNotice.dismiss") }) : null
84
+ ] }) : null,
85
+ /* @__PURE__ */ t(C, { intent: "tonal", size: "sm", onClick: e.onViewBundles, children: i("aiCreditsNotice.bundles.viewBundles") })
86
+ ] })
87
+ ]
88
+ }
89
+ );
90
+ });
91
+ k.displayName = "AiCreditsNotice";
92
+ function F({
93
+ notice: e,
94
+ side: o,
95
+ children: i
96
+ }) {
97
+ const [r, n] = x(!1);
98
+ return /* @__PURE__ */ l(a, { open: r, onOpenChange: n, children: [
99
+ /* @__PURE__ */ t(
100
+ H,
101
+ {
102
+ onOpen: () => n(!0),
103
+ onPress: () => n(!1),
104
+ children: i
105
+ }
106
+ ),
107
+ /* @__PURE__ */ t(
108
+ a.Content,
109
+ {
110
+ side: o,
111
+ align: "start",
112
+ size: "sm",
113
+ collisionPadding: 8,
114
+ children: /* @__PURE__ */ t(k, { ...e })
115
+ }
116
+ )
117
+ ] });
118
+ }
119
+ function H({
120
+ onOpen: e,
121
+ onPress: o,
122
+ children: i
123
+ }) {
124
+ const { cancelClose: r, closeWithDelay: n } = z(), d = y(null), s = u(() => {
125
+ d.current && (clearTimeout(d.current), d.current = null);
126
+ }, []);
127
+ D(() => s, [s]);
128
+ const h = u(() => {
129
+ s(), r(), d.current = setTimeout(e, 300);
130
+ }, [s, r, e]), N = u(() => {
131
+ s(), n();
132
+ }, [s, n]), c = y(!1), b = u(() => {
133
+ c.current = !0, s(), o();
134
+ }, [s, o]);
135
+ D(() => {
136
+ const f = () => {
137
+ c.current = !1;
138
+ };
139
+ return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
140
+ }, []);
141
+ const g = u(() => {
142
+ if (c.current) {
143
+ c.current = !1;
144
+ return;
145
+ }
146
+ s(), r(), e();
147
+ }, [s, r, e]);
148
+ return (
149
+ // `ds:inline-flex`, NOT `ds:contents`, so this span has a real box
150
+ // that hugs the button and Floating UI has a real rect to measure.
151
+ // `display: contents` generates no box of its own; inside the pill's
152
+ // flex/absolute layout that collapsed to a zero-size rect at the
153
+ // editor's origin, so the card rendered top-left instead of at the
154
+ // trigger (caught in review on :6007).
155
+ /* @__PURE__ */ t(a.Anchor, { asChild: !0, children: /* @__PURE__ */ t(
156
+ "span",
157
+ {
158
+ className: "ds:inline-flex",
159
+ onMouseEnter: h,
160
+ onMouseLeave: N,
161
+ onPointerDown: b,
162
+ onFocusCapture: g,
163
+ onBlurCapture: N,
164
+ children: i
165
+ }
166
+ ) })
167
+ );
168
+ }
169
+ function U(e, o, i = "bottom") {
170
+ return o ? /* @__PURE__ */ t(F, { notice: o, side: i, children: e }) : e;
171
+ }
172
+ function q(e) {
173
+ const [o, i] = x(() => /* @__PURE__ */ new Set());
174
+ return B(() => {
175
+ if (!e || o.has(e.mode)) return;
176
+ if (!e.onDismiss) return e;
177
+ const r = e.onDismiss, n = e.mode;
178
+ return {
179
+ ...e,
180
+ onDismiss: () => {
181
+ i((d) => new Set(d).add(n)), r();
182
+ }
183
+ };
184
+ }, [e, o]);
185
+ }
186
+ export {
187
+ k as A,
188
+ q as u,
189
+ U as w
190
+ };
191
+ //# sourceMappingURL=ai-credits-notice-DQ-r3iQU.js.map
@@ -2,7 +2,7 @@ import { jsxs as d, jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as z, useState as C, useRef as E, useMemo as F } from "react";
3
3
  import { c as M } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as P } from "react-i18next";
5
- import { A as g } from "./alert-DdDpOi-P.js";
5
+ import { A as g } from "./alert-DjsJMGRE.js";
6
6
  import { B as D } from "./badge-BUk4RjTS.js";
7
7
  import { B as H } from "./button-D-MQxsA_.js";
8
8
  import { C as J } from "./checkbox-BjDv-r3o.js";
@@ -203,4 +203,4 @@ export {
203
203
  Q as A,
204
204
  $ as a
205
205
  };
206
- //# sourceMappingURL=ai-permission-notice-DpRmZ9Q3.js.map
206
+ //# sourceMappingURL=ai-permission-notice-qsdm4Sx4.js.map
@@ -314,6 +314,7 @@ const Ne = Object.assign(B, {
314
314
  Action: z
315
315
  });
316
316
  export {
317
- Ne as A
317
+ Ne as A,
318
+ re as C
318
319
  };
319
- //# sourceMappingURL=alert-DdDpOi-P.js.map
320
+ //# sourceMappingURL=alert-DjsJMGRE.js.map
@@ -17,7 +17,7 @@ import { T as na } from "./text-area-COMVJ1yE.js";
17
17
  import { S as te } from "./state-backed-text-input-Cgh4ms3p.js";
18
18
  import { T as Ze } from "./timestamp-DPLDWdxA.js";
19
19
  import { D as sn } from "./date-picker-KcoNNsM0.js";
20
- import { A as Ue } from "./alert-DdDpOi-P.js";
20
+ import { A as Ue } from "./alert-DjsJMGRE.js";
21
21
  import { D as L } from "./description-list-Q8640NHu.js";
22
22
  import { c as Xt } from "./index-D2ZczOXr.js";
23
23
  import { S as dn } from "./sparkline-SnniCoCl.js";
@@ -20924,4 +20924,4 @@ export {
20924
20924
  Vi as t,
20925
20925
  nd as u
20926
20926
  };
20927
- //# sourceMappingURL=anamnesis-summary-rows-BIfw890v.js.map
20927
+ //# sourceMappingURL=anamnesis-summary-rows-BQ_EokKz.js.map
@@ -6,7 +6,7 @@ import { B as G } from "./button-D-MQxsA_.js";
6
6
  import { I as D } from "./icon-button-C_1TgRiK.js";
7
7
  import { S as pe } from "./select-k4gBdS8N.js";
8
8
  import { A as le } from "./audio-visualiser-CK2JyQW1.js";
9
- import { A as F } from "./alert-DdDpOi-P.js";
9
+ import { A as F } from "./alert-DjsJMGRE.js";
10
10
  import { u as me } from "./registry-DvAUVLHh.js";
11
11
  import { M as fe } from "./mic-CUklMZGF.js";
12
12
  import { c as J } from "./createLucideIcon-DhHxpK9K.js";
@@ -446,4 +446,4 @@ export {
446
446
  De as A,
447
447
  Re as a
448
448
  };
449
- //# sourceMappingURL=audio-recorder-DR-u1qbl.js.map
449
+ //# sourceMappingURL=audio-recorder-B11RR-rC.js.map
@@ -2,7 +2,7 @@ import { jsxs as m, jsx as r, Fragment as v } from "react/jsx-runtime";
2
2
  import { useEffect as f, forwardRef as h } from "react";
3
3
  import { c as l } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as g } from "react-i18next";
5
- import { A as c } from "./alert-DdDpOi-P.js";
5
+ import { A as c } from "./alert-DjsJMGRE.js";
6
6
  import { i as u } from "./is-development-CLUAnsU7.js";
7
7
  import { a as p } from "./safe-href-5dbsfbQn.js";
8
8
  import { B as b } from "./use-registration-submit-eWAECgUC.js";
@@ -83,4 +83,4 @@ export {
83
83
  S as d,
84
84
  D as u
85
85
  };
86
- //# sourceMappingURL=auth-form-parts-Cmb41LSQ.js.map
86
+ //# sourceMappingURL=auth-form-parts-DwUTH6YN.js.map
@@ -3,7 +3,7 @@ import { forwardRef as ms, useId as Rt, useRef as _, useCallback as ye, useState
3
3
  import { c as It } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as W, Trans as zs } from "react-i18next";
5
5
  import { u as js } from "./registry-DvAUVLHh.js";
6
- import { A as ie } from "./alert-DdDpOi-P.js";
6
+ import { A as ie } from "./alert-DjsJMGRE.js";
7
7
  import { B as et } from "./button-D-MQxsA_.js";
8
8
  import { C as at } from "./checkbox-BjDv-r3o.js";
9
9
  import { C as Us } from "./checkbox-group-Cw2H5qaq.js";
@@ -3812,4 +3812,4 @@ export {
3812
3812
  _e as O,
3813
3813
  $n as b
3814
3814
  };
3815
- //# sourceMappingURL=booking-DkjatiXc.js.map
3815
+ //# sourceMappingURL=booking-tTVxKPQY.js.map
@@ -10,21 +10,21 @@ import { S as $t, C as di } from "./skeleton-B1KTdJ4N.js";
10
10
  import { G as qa, h as Er, c as co, A as lo, C as li } from "./color-picker-BsggJovx.js";
11
11
  import { s as uo, S as po } from "./signature-status-chip-pIoQjvH8.js";
12
12
  import { b as ho } from "./appointment-workflow-status-DMjuIK90.js";
13
- import { b as ja, f as fn, c as mo, d as go, e as vo, A as ui, u as fo, g as bo, D as pi, M as ko, C as Or, h as Io, i as Co, R as hi, j as No, k as yo, l as Na, I as xo, s as So } from "./use-appointment-details-read-B-FEWbQM.js";
13
+ import { b as ja, f as fn, c as mo, d as go, e as vo, A as ui, u as fo, g as bo, D as pi, M as ko, C as Or, h as Io, i as Co, R as hi, j as No, k as yo, l as Na, I as xo, s as So } from "./use-appointment-details-read-CVSPoP5j.js";
14
14
  import { A as Rr, a as mi } from "./entity-card-fpm-KUKc.js";
15
15
  import { S as xs } from "./stethoscope-sZXGC43m.js";
16
- import { T as Do, P as wo, E as gi, S as To } from "./task-editor-CifOznfq.js";
16
+ import { T as Do, P as wo, E as gi, S as To } from "./task-editor-Bb5MMcid.js";
17
17
  import { C as Lo, a as Ao, u as vi, d as Eo } from "./control-room-rail-DUerqHeo.js";
18
18
  import { S as ir } from "./scroll-area-CY5SLYNw.js";
19
19
  import { d as vn, c as Mr, b as aa } from "./toast-6T519aLz.js";
20
20
  import { T as Ua, a as Oo } from "./tooltip-uEBdD1-5.js";
21
- import { A as ue } from "./alert-DdDpOi-P.js";
21
+ import { A as ue } from "./alert-DjsJMGRE.js";
22
22
  import { B as ke } from "./button-D-MQxsA_.js";
23
23
  import { V as pa } from "./visually-hidden-BHxEUGyT.js";
24
24
  import { createPortal as Ro } from "react-dom";
25
25
  import { R as xn } from "./radio-BZQs6_36.js";
26
26
  import { R as Ca } from "./radio-group-ChIKyeSJ.js";
27
- import { N as Mo } from "./notes-panel-uEGIL7mi.js";
27
+ import { N as Mo } from "./notes-panel-IdsmqRFC.js";
28
28
  import { E as or } from "./empty-state-pL1qum99.js";
29
29
  import { P as ds } from "./panel-header-BJkaUwnl.js";
30
30
  import { P as fi } from "./panel-subview-yP4qIbKS.js";
@@ -81,7 +81,7 @@ import { c as gs } from "./createLucideIcon-DhHxpK9K.js";
81
81
  import { U as wi } from "./user-cog-BTn98Arm.js";
82
82
  import { S as Yo } from "./settings-d25ju_6L.js";
83
83
  import { R as js } from "./rotate-ccw-BBQnIVTr.js";
84
- import { H as Ra } from "./patient-field-row-CBXhlfGD.js";
84
+ import { H as Ra } from "./hourglass-BEAzW1wE.js";
85
85
  import { C as Xo } from "./calendar-BhN-jisv.js";
86
86
  import { C as ps } from "./card-BA4Ig_kn.js";
87
87
  import { K as Jo } from "./kbd-Bx7eQv9f.js";
@@ -10590,4 +10590,4 @@ export {
10590
10590
  Dh as r,
10591
10591
  zt as u
10592
10592
  };
10593
- //# sourceMappingURL=calendar-workspace-Cp8yTZ1g.js.map
10593
+ //# sourceMappingURL=calendar-workspace-MRrzcxAy.js.map
@@ -6,7 +6,7 @@ import { B as b } from "./badge-BUk4RjTS.js";
6
6
  import { C as B } from "./card-BA4Ig_kn.js";
7
7
  import { E as G } from "./empty-state-pL1qum99.js";
8
8
  import { P as Y } from "./panel-header-BJkaUwnl.js";
9
- import { P as J } from "./pdf-viewer-DJ9VN7cu.js";
9
+ import { P as J } from "./pdf-viewer-BvoVMjH4.js";
10
10
  import { T as O, b as Q, c as X, a as Z } from "./tabs-2x3L13jn.js";
11
11
  import { u as ee } from "./registry-DvAUVLHh.js";
12
12
  import { F as ie } from "./file-image-cDgE-BTy.js";
@@ -288,4 +288,4 @@ export {
288
288
  ue as D,
289
289
  de as d
290
290
  };
291
- //# sourceMappingURL=document-preview-B1dQm292.js.map
291
+ //# sourceMappingURL=document-preview-VyQOjFVL.js.map