@alfadocs/ui-kit 0.38.0 → 0.40.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 (144) hide show
  1. package/dist/_chunks/{accordion-bSU21uTV.js → accordion-9lJSMMsZ.js} +6 -6
  2. package/dist/_chunks/{agenda-tray-By_asPN9.js → agenda-tray-Dyj9ChHC.js} +22 -21
  3. package/dist/_chunks/{bmi-calculator-BRUru9QX.js → bmi-calculator-DnEr513I.js} +2 -2
  4. package/dist/_chunks/{booking-DK_BPHnQ.js → booking-4mCw3Mpl.js} +2 -2
  5. package/dist/_chunks/{chart-DnHvmiDX.js → chart-Cbt0_sKv.js} +46 -37
  6. package/dist/_chunks/{collapsible-CERONory.js → collapsible-X3oaLPU3.js} +5 -5
  7. package/dist/_chunks/{document-scanner-CdHQ6lTN.js → document-scanner-CqS_klIr.js} +56 -55
  8. package/dist/_chunks/{editable-currency-cell-renderer-DGKuRNVG.js → editable-currency-cell-renderer-DgkCIIcO.js} +2 -2
  9. package/dist/_chunks/{file-upload-CnzRcErt.js → file-upload-BosbPDb1.js} +2 -2
  10. package/dist/_chunks/{freemium-paywall-D1N02Oam.js → freemium-paywall-BAk3a6er.js} +7 -7
  11. package/dist/_chunks/header-settings-CBLwUK6t.js +244 -0
  12. package/dist/_chunks/{map-view-vD5pvWs9.js → map-view-qJLybrmN.js} +2 -2
  13. package/dist/_chunks/marketplace-app-shell-BlxVizU4.js +296 -0
  14. package/dist/_chunks/{message-card-BbRhZkDI.js → message-card-DSPw5ghw.js} +20 -19
  15. package/dist/_chunks/{message-tray-B762TKuv.js → message-tray-hSQff9u4.js} +3 -3
  16. package/dist/_chunks/{notification-card-DMdO4g54.js → notification-card-CObnGdJu.js} +22 -21
  17. package/dist/_chunks/{notification-tray-Dl3FTleW.js → notification-tray-BWHDIjgd.js} +2 -2
  18. package/dist/_chunks/{otp-input-CDTWT5EK.js → otp-input-CMphfBxZ.js} +70 -71
  19. package/dist/_chunks/{patient-shell-Bz3CdO84.js → patient-shell-DF81lALv.js} +36 -35
  20. package/dist/_chunks/{payment-form-D5rgnZu7.js → payment-form-Dy3WIIsC.js} +18 -18
  21. package/dist/_chunks/{pdf-viewer-DvtEHcEP.js → pdf-viewer-Cy6Ul3hZ.js} +2 -2
  22. package/dist/_chunks/{practice-results-C8ciLQap.js → practice-results-C0d4IL5E.js} +2 -2
  23. package/dist/_chunks/{public-footer.agent-zw1vFin_.js → public-footer.agent-okt8ZRc5.js} +2 -2
  24. package/dist/_chunks/{reviews-panel-Dow8Dzoa.js → reviews-panel-CPrXu5TX.js} +2 -2
  25. package/dist/_chunks/{sidebar-BbR8f6oe.js → sidebar-_vJXI9rB.js} +2 -2
  26. package/dist/_chunks/sign-document-CpLDZ6Db.js +316 -0
  27. package/dist/_chunks/{signature-capture-C-fF71xI.js → signature-capture-DoiBd6i3.js} +138 -143
  28. package/dist/_chunks/{sparkline-DEROcSl0.js → sparkline-DGhCSw8M.js} +55 -46
  29. package/dist/_chunks/{stepper-accordion-BfS6lUB9.js → stepper-accordion-Dki6r9ZE.js} +2 -2
  30. package/dist/_chunks/{tag-CyoaEmf_.js → tag-CdA0s_VV.js} +16 -16
  31. package/dist/_chunks/{task-card-BUVMh6HN.js → task-card-CPyQ5AXC.js} +6 -5
  32. package/dist/_chunks/{task-tray-DRK0b0Qb.js → task-tray-B8jFv5FV.js} +36 -35
  33. package/dist/_chunks/{transcript-panel-DyhTpAP7.js → transcript-panel-CR7VY1uw.js} +8 -7
  34. package/dist/_chunks/{warning-stack-bDicCvxs.js → warning-stack-DNR3-IbP.js} +17 -16
  35. package/dist/_chunks/{workflow-map-uSiHbOWQ.js → workflow-map-C3gB0FvB.js} +3 -2
  36. package/dist/agent-catalog.json +39 -1
  37. package/dist/components/accordion/index.js +1 -1
  38. package/dist/components/agenda-tray/index.js +1 -1
  39. package/dist/components/bmi-calculator/index.js +1 -1
  40. package/dist/components/booking/index.js +1 -1
  41. package/dist/components/chart/chart.d.ts +1 -1
  42. package/dist/components/chart/index.js +1 -1
  43. package/dist/components/collapsible/index.js +1 -1
  44. package/dist/components/data-table/index.js +1 -1
  45. package/dist/components/document-scanner/index.js +1 -1
  46. package/dist/components/file-upload/index.js +1 -1
  47. package/dist/components/freemium-paywall/index.js +1 -1
  48. package/dist/components/header-settings/header-settings.agent.d.ts +4 -0
  49. package/dist/components/header-settings/header-settings.d.ts +36 -0
  50. package/dist/components/header-settings/index.d.ts +2 -0
  51. package/dist/components/header-settings/index.js +2 -241
  52. package/dist/components/index.d.ts +1 -0
  53. package/dist/components/locale-picker/locale-picker.agent.d.ts +4 -0
  54. package/dist/components/locale-picker/locale-picker.d.ts +80 -0
  55. package/dist/components/map-view/index.js +1 -1
  56. package/dist/components/message-card/index.js +1 -1
  57. package/dist/components/message-tray/index.js +1 -1
  58. package/dist/components/notification-card/index.js +1 -1
  59. package/dist/components/notification-tray/index.js +1 -1
  60. package/dist/components/otp-input/index.d.ts +1 -1
  61. package/dist/components/otp-input/index.js +1 -1
  62. package/dist/components/otp-input/otp-input.d.ts +1 -1
  63. package/dist/components/payment-form/index.js +1 -1
  64. package/dist/components/pdf-viewer/index.js +1 -1
  65. package/dist/components/practice-results/index.js +1 -1
  66. package/dist/components/public-footer/index.js +1 -1
  67. package/dist/components/reviews-panel/index.js +1 -1
  68. package/dist/components/sidebar/index.js +1 -1
  69. package/dist/components/sign-document/index.d.ts +4 -0
  70. package/dist/components/sign-document/index.js +6 -0
  71. package/dist/components/sign-document/sign-document.agent.d.ts +4 -0
  72. package/dist/components/sign-document/sign-document.d.ts +47 -0
  73. package/dist/components/signature-capture/index.js +1 -1
  74. package/dist/components/sparkline/index.js +1 -1
  75. package/dist/components/sparkline/sparkline.d.ts +1 -1
  76. package/dist/components/stepper-accordion/index.js +1 -1
  77. package/dist/components/tag/index.js +1 -1
  78. package/dist/components/task-card/index.js +1 -1
  79. package/dist/components/task-tray/index.js +1 -1
  80. package/dist/components/transcript-panel/index.js +1 -1
  81. package/dist/components/warning-stack/index.js +1 -1
  82. package/dist/components/workflow/index.js +1 -1
  83. package/dist/i18n/locale-meta.d.ts +56 -0
  84. package/dist/i18n/locales/ar.d.ts +22 -0
  85. package/dist/i18n/locales/ar.js +22 -0
  86. package/dist/i18n/locales/de.d.ts +22 -0
  87. package/dist/i18n/locales/de.js +22 -0
  88. package/dist/i18n/locales/el.d.ts +22 -0
  89. package/dist/i18n/locales/el.js +22 -0
  90. package/dist/i18n/locales/en.d.ts +22 -0
  91. package/dist/i18n/locales/en.js +22 -0
  92. package/dist/i18n/locales/es.d.ts +22 -0
  93. package/dist/i18n/locales/es.js +22 -0
  94. package/dist/i18n/locales/fr.d.ts +22 -0
  95. package/dist/i18n/locales/fr.js +22 -0
  96. package/dist/i18n/locales/hi.d.ts +22 -0
  97. package/dist/i18n/locales/hi.js +22 -0
  98. package/dist/i18n/locales/it.d.ts +22 -0
  99. package/dist/i18n/locales/it.js +22 -0
  100. package/dist/i18n/locales/ja.d.ts +22 -0
  101. package/dist/i18n/locales/ja.js +22 -0
  102. package/dist/i18n/locales/nl.d.ts +22 -0
  103. package/dist/i18n/locales/nl.js +22 -0
  104. package/dist/i18n/locales/pl.d.ts +22 -0
  105. package/dist/i18n/locales/pl.js +22 -0
  106. package/dist/i18n/locales/pt.d.ts +22 -0
  107. package/dist/i18n/locales/pt.js +22 -0
  108. package/dist/i18n/locales/ro.d.ts +22 -0
  109. package/dist/i18n/locales/ro.js +22 -0
  110. package/dist/i18n/locales/ru.d.ts +22 -0
  111. package/dist/i18n/locales/ru.js +22 -0
  112. package/dist/i18n/locales/sq.d.ts +22 -0
  113. package/dist/i18n/locales/sq.js +22 -0
  114. package/dist/i18n/locales/sv.d.ts +22 -0
  115. package/dist/i18n/locales/sv.js +22 -0
  116. package/dist/i18n/locales/tr.d.ts +22 -0
  117. package/dist/i18n/locales/tr.js +22 -0
  118. package/dist/i18n/locales/zh.d.ts +22 -0
  119. package/dist/i18n/locales/zh.js +22 -0
  120. package/dist/index.js +110 -107
  121. package/dist/locales/ar.json +22 -0
  122. package/dist/locales/de.json +22 -0
  123. package/dist/locales/el.json +22 -0
  124. package/dist/locales/en.json +22 -0
  125. package/dist/locales/es.json +22 -0
  126. package/dist/locales/fr.json +22 -0
  127. package/dist/locales/hi.json +22 -0
  128. package/dist/locales/it.json +22 -0
  129. package/dist/locales/ja.json +22 -0
  130. package/dist/locales/nl.json +22 -0
  131. package/dist/locales/pl.json +22 -0
  132. package/dist/locales/pt.json +22 -0
  133. package/dist/locales/ro.json +22 -0
  134. package/dist/locales/ru.json +22 -0
  135. package/dist/locales/sq.json +22 -0
  136. package/dist/locales/sv.json +22 -0
  137. package/dist/locales/tr.json +22 -0
  138. package/dist/locales/zh.json +22 -0
  139. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  140. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +12 -8
  141. package/dist/patterns/patient-shell/index.js +1 -1
  142. package/dist/tokens.css +1 -1
  143. package/package.json +5 -1
  144. package/dist/_chunks/marketplace-app-shell-BnClrL2B.js +0 -295
@@ -0,0 +1,244 @@
1
+ import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
+ import { forwardRef as A, useRef as p, useImperativeHandle as C, useCallback as x, useMemo as I } from "react";
3
+ import { c as N } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as E } from "react-i18next";
5
+ import { I as o } from "./icon-button-CKEOrN37.js";
6
+ import { I as M } from "./icon-button-group-C48khLE0.js";
7
+ import { D as r } from "./dropdown-menu-BC5ZdOMo.js";
8
+ import { S as R } from "./switch-BJ6HD3Mn.js";
9
+ import { c as v, a as H, L as _ } from "./locale-picker-D99UyZVJ.js";
10
+ import { u as O } from "./use-locale-BkCIHujH.js";
11
+ import { u as P } from "./use-theme-C2dHKUAN.js";
12
+ import { u as j } from "./registry-nPAVE19X.js";
13
+ import { S as K } from "./settings-ca2Yi9R8.js";
14
+ import { S as D, M as z } from "./sun-BuXE0xUS.js";
15
+ import { M as V } from "./monitor-D-SFdbrU.js";
16
+ const B = {
17
+ id: "header-settings",
18
+ capabilities: ["view_change"],
19
+ state: {},
20
+ actions: {
21
+ set_locale: {
22
+ safety: "write",
23
+ argsType: "{ locale: string }",
24
+ descriptionKey: "ui.agent.headerSettings.actions.setLocale",
25
+ description: "Switch the active locale to the given IETF tag.",
26
+ invoke: (t, i) => {
27
+ t.setLocale(i.locale);
28
+ }
29
+ },
30
+ set_theme: {
31
+ safety: "write",
32
+ argsType: '{ theme: "light" | "dark" | "system" }',
33
+ descriptionKey: "ui.agent.headerSettings.actions.setTheme",
34
+ description: "Switch the theme preference.",
35
+ invoke: (t, i) => {
36
+ t.setTheme(i.theme);
37
+ }
38
+ },
39
+ set_accessibility: {
40
+ safety: "write",
41
+ argsType: '{ accessibility: "default" | "accessible" }',
42
+ descriptionKey: "ui.agent.headerSettings.actions.setAccessibility",
43
+ description: "Switch the accessibility preference.",
44
+ invoke: (t, i) => {
45
+ t.setAccessibility(i.accessibility);
46
+ }
47
+ }
48
+ },
49
+ domHooks: {
50
+ root: {
51
+ attr: "data-component",
52
+ value: "header-settings",
53
+ description: "Marks the HeaderSettings wrapper."
54
+ }
55
+ }
56
+ };
57
+ function G(t, i) {
58
+ if (!(typeof window > "u"))
59
+ try {
60
+ window.localStorage.setItem(t, i);
61
+ } catch {
62
+ }
63
+ }
64
+ function W(t) {
65
+ if (typeof document > "u") return;
66
+ const i = document.documentElement;
67
+ i.lang = t, i.dir = v[t].dir;
68
+ }
69
+ const F = N("ds:inline-flex ds:items-center", {
70
+ variants: {
71
+ align: {
72
+ start: "",
73
+ end: ""
74
+ }
75
+ },
76
+ defaultVariants: { align: "end" }
77
+ }), U = [
78
+ "ds:w-[20rem] ds:p-[var(--spacing-xs)]",
79
+ "ds:rounded-[var(--radius-md)] ds:border ds:border-border",
80
+ "ds:bg-background ds:text-foreground ds:shadow-[var(--shadow-lg)]"
81
+ ].join(" "), Y = A(
82
+ (t, i) => {
83
+ const {
84
+ align: g = "end",
85
+ size: y = "md",
86
+ disabled: S = !1,
87
+ className: w,
88
+ id: m,
89
+ ...L
90
+ } = t, { t: s } = E(), n = P(), { setLocale: h } = O(), u = p(null);
91
+ C(i, () => u.current, []);
92
+ const f = x(
93
+ (a) => {
94
+ h(a), W(a), G(_, a);
95
+ },
96
+ [h]
97
+ ), b = p(f);
98
+ b.current = f;
99
+ const c = p(n);
100
+ c.current = n;
101
+ const k = I(
102
+ () => ({
103
+ setLocale: (a) => {
104
+ Object.prototype.hasOwnProperty.call(v, a) && b.current(a);
105
+ },
106
+ setTheme: (a) => c.current.setTheme(a),
107
+ setAccessibility: (a) => c.current.setAccessibility(a)
108
+ }),
109
+ []
110
+ );
111
+ j(B, k, m);
112
+ const T = n.accessibility === "accessible";
113
+ return /* @__PURE__ */ e(
114
+ "div",
115
+ {
116
+ ref: u,
117
+ "data-component": "header-settings",
118
+ "data-component-id": m,
119
+ className: F({ align: g, className: w }),
120
+ ...L,
121
+ children: /* @__PURE__ */ l(r.Root, { children: [
122
+ /* @__PURE__ */ e(r.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
123
+ o,
124
+ {
125
+ size: y,
126
+ disabled: S,
127
+ icon: /* @__PURE__ */ e(K, { "aria-hidden": !0 }),
128
+ "aria-label": s("navigation.headerSettings.trigger")
129
+ }
130
+ ) }),
131
+ /* @__PURE__ */ e(r.Portal, { children: /* @__PURE__ */ l(
132
+ r.Content,
133
+ {
134
+ align: g,
135
+ sideOffset: 8,
136
+ className: U,
137
+ onKeyDownCapture: (a) => {
138
+ const d = a.target;
139
+ (d == null ? void 0 : d.tagName) === "INPUT" && // Always allow Escape so the menu can close.
140
+ a.key !== "Escape" && a.stopPropagation();
141
+ },
142
+ children: [
143
+ /* @__PURE__ */ e(r.Label, { children: s("navigation.headerSettings.language.label") }),
144
+ /* @__PURE__ */ e(
145
+ "div",
146
+ {
147
+ role: "group",
148
+ "aria-label": s("navigation.headerSettings.language.label"),
149
+ className: [
150
+ "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
151
+ // Stretch the compact LocalePicker to the full menu
152
+ // width so it reads as a single row affordance (not
153
+ // a centred pill). The picker's root is
154
+ // inline-flex; the `*:` child selector + `flex-1`
155
+ // gives it `flex: 1 1 0%` once it's a child of the
156
+ // flex container we make this div into.
157
+ "ds:flex ds:[&>*]:flex-1"
158
+ ].join(" "),
159
+ children: /* @__PURE__ */ e(H, { variant: "compact", popoverSide: "end" })
160
+ }
161
+ ),
162
+ /* @__PURE__ */ e(r.Separator, {}),
163
+ /* @__PURE__ */ e(r.Label, { children: s("navigation.headerSettings.appearance.label") }),
164
+ /* @__PURE__ */ e(
165
+ "div",
166
+ {
167
+ role: "group",
168
+ "aria-label": s("navigation.headerSettings.appearance.label"),
169
+ className: "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
170
+ children: /* @__PURE__ */ l(
171
+ M,
172
+ {
173
+ role: "radiogroup",
174
+ mode: "toggle-single",
175
+ size: "sm",
176
+ "aria-label": s("navigation.headerSettings.appearance.label"),
177
+ value: n.theme,
178
+ onValueChange: (a) => n.setTheme(a),
179
+ children: [
180
+ /* @__PURE__ */ e(
181
+ o,
182
+ {
183
+ icon: /* @__PURE__ */ e(D, { "aria-hidden": !0 }),
184
+ "aria-label": s("navigation.headerSettings.appearance.light"),
185
+ value: "light"
186
+ }
187
+ ),
188
+ /* @__PURE__ */ e(
189
+ o,
190
+ {
191
+ icon: /* @__PURE__ */ e(z, { "aria-hidden": !0 }),
192
+ "aria-label": s("navigation.headerSettings.appearance.dark"),
193
+ value: "dark"
194
+ }
195
+ ),
196
+ /* @__PURE__ */ e(
197
+ o,
198
+ {
199
+ icon: /* @__PURE__ */ e(V, { "aria-hidden": !0 }),
200
+ "aria-label": s(
201
+ "navigation.headerSettings.appearance.system"
202
+ ),
203
+ value: "system"
204
+ }
205
+ )
206
+ ]
207
+ }
208
+ )
209
+ }
210
+ ),
211
+ /* @__PURE__ */ e(r.Separator, {}),
212
+ /* @__PURE__ */ e(
213
+ "div",
214
+ {
215
+ role: "group",
216
+ "aria-label": s(
217
+ "navigation.headerSettings.appearance.accessible"
218
+ ),
219
+ className: "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]",
220
+ children: /* @__PURE__ */ e(
221
+ R,
222
+ {
223
+ label: s("navigation.headerSettings.appearance.accessible"),
224
+ labelSide: "start",
225
+ size: "sm",
226
+ checked: T,
227
+ onCheckedChange: (a) => n.setAccessibility(a ? "accessible" : "default")
228
+ }
229
+ )
230
+ }
231
+ )
232
+ ]
233
+ }
234
+ ) })
235
+ ] })
236
+ }
237
+ );
238
+ }
239
+ );
240
+ Y.displayName = "HeaderSettings";
241
+ export {
242
+ Y as H
243
+ };
244
+ //# sourceMappingURL=header-settings-CBLwUK6t.js.map
@@ -1584,7 +1584,7 @@ const Bt = {
1584
1584
  },
1585
1585
  surface: {
1586
1586
  bordered: "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
1587
- elevated: "ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)]",
1587
+ elevated: "ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)] ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2",
1588
1588
  bare: "ds:rounded-none ds:border-0"
1589
1589
  }
1590
1590
  },
@@ -1847,4 +1847,4 @@ Zt.displayName = "MapView";
1847
1847
  export {
1848
1848
  Zt as M
1849
1849
  };
1850
- //# sourceMappingURL=map-view-vD5pvWs9.js.map
1850
+ //# sourceMappingURL=map-view-qJLybrmN.js.map
@@ -0,0 +1,296 @@
1
+ import { jsxs as t, jsx as e, Fragment as M } from "react/jsx-runtime";
2
+ import { forwardRef as f, useState as T } from "react";
3
+ import { useTranslation as k } from "react-i18next";
4
+ import { A as B } from "./app-frame-BYx1gcV7.js";
5
+ import { A as I } from "./avatar-BNQNhoyL.js";
6
+ import { A as L } from "./alert-ywPR59NE.js";
7
+ import { C as x } from "./card-DPmk26CL.js";
8
+ import { D as i } from "./dropdown-menu-BC5ZdOMo.js";
9
+ import { H as O, g as j, f as P, e as W, a as R, c as D, d as E } from "./header-CTZWX-tm.js";
10
+ import { H as $ } from "./header-settings-CBLwUK6t.js";
11
+ import { S as F } from "./sign-in-with-alfadocs-button-DeHBFRNS.js";
12
+ import { S as V, a as q, h as G, j as J, k as K, i as Q } from "./sidebar-_vJXI9rB.js";
13
+ import { T as U } from "./theme-root-BOO73p5t.js";
14
+ import { a as X } from "./tooltip-DvmfrNvB.js";
15
+ import { u as Y } from "./use-theme-C2dHKUAN.js";
16
+ import { c as N } from "./index-D2ZczOXr.js";
17
+ import { L as Z } from "./logo-yituK7sE.js";
18
+ const _ = N("ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]"), ee = N(
19
+ [
20
+ "ds:[font-family:var(--font-serif)]",
21
+ "ds:font-semibold",
22
+ "ds:leading-none",
23
+ "ds:tracking-[0.01em]",
24
+ "ds:whitespace-nowrap",
25
+ // Forced-colors: drop the transparent text-fill and paint the label
26
+ // as solid CanvasText so it never disappears under Windows HCM —
27
+ // a gradient/transparent fill has no meaning there.
28
+ "ds:forced-colors:text-[CanvasText]",
29
+ "ds:forced-colors:[-webkit-text-fill-color:CanvasText]"
30
+ ],
31
+ {
32
+ variants: {
33
+ size: {
34
+ sm: "ds:text-[calc(var(--logo-size-sm)*0.95)]",
35
+ md: "ds:text-[calc(var(--logo-size-md)*0.95)]",
36
+ lg: "ds:text-[calc(var(--logo-size-lg)*0.95)]",
37
+ xl: "ds:text-[calc(var(--logo-size-xl)*0.95)]"
38
+ },
39
+ tone: {
40
+ // Brand gradient filled into the glyphs via background-clip:text.
41
+ // `--gradient-wordmark` rides the theme aliases, so it stays
42
+ // AA-safe and adapts per theme on its own (and flattens to a solid
43
+ // ink in the accessible / forced-colors blocks — see tokens).
44
+ gradient: [
45
+ "ds:italic",
46
+ "ds:bg-[image:var(--gradient-wordmark)]",
47
+ "ds:bg-clip-text",
48
+ "ds:text-transparent",
49
+ "ds:[-webkit-text-fill-color:transparent]"
50
+ ],
51
+ // Monochrome: solid currentColor ink, upright, no gradient — for
52
+ // print, single-colour work, and coloured chrome (e.g. app-shell
53
+ // headers) where the lockup must ride the surrounding ink.
54
+ solid: "ds:text-current"
55
+ }
56
+ },
57
+ defaultVariants: { size: "md", tone: "gradient" }
58
+ }
59
+ ), u = f(
60
+ ({ name: s, monochrome: a = !1, size: r = "md", className: n, ...l }, d) => /* @__PURE__ */ t(
61
+ "span",
62
+ {
63
+ ref: d,
64
+ role: "img",
65
+ "aria-label": `Alfadocs ${s}`.trim(),
66
+ className: _({ className: n }),
67
+ "data-component": "product-lockup",
68
+ ...l,
69
+ children: [
70
+ /* @__PURE__ */ e(
71
+ Z,
72
+ {
73
+ variant: a ? "monochrome" : "wordmark",
74
+ size: r,
75
+ decorative: !0
76
+ }
77
+ ),
78
+ /* @__PURE__ */ e(
79
+ "span",
80
+ {
81
+ "aria-hidden": !0,
82
+ className: ee({
83
+ size: r,
84
+ tone: a ? "solid" : "gradient"
85
+ }),
86
+ children: s
87
+ }
88
+ )
89
+ ]
90
+ }
91
+ )
92
+ );
93
+ u.displayName = "ProductLockup";
94
+ function ae(s) {
95
+ return s > 99 ? "99+" : String(s);
96
+ }
97
+ function se({
98
+ user: s,
99
+ labels: a,
100
+ onSignOut: r,
101
+ onToggleFullscreen: n
102
+ }) {
103
+ const { t: l } = k(), d = a.fullscreen ?? l("patientShell.settings.fullscreen");
104
+ return (
105
+ // Non-modal: an account menu shouldn't inert/aria-hide the whole shell
106
+ // behind it (which leaves the still-focusable chrome inside an
107
+ // aria-hidden region — an `aria-hidden-focus` violation).
108
+ /* @__PURE__ */ t(i.Root, { modal: !1, children: [
109
+ /* @__PURE__ */ e(i.Trigger, { asChild: !0, children: /* @__PURE__ */ t(
110
+ "button",
111
+ {
112
+ type: "button",
113
+ "aria-label": a.accountMenu,
114
+ "data-testid": "marketplace-account-trigger",
115
+ className: "ds:rounded-full ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)] ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)] ds:justify-center 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)] ds:forced-colors:focus-visible:outline-[CanvasText]",
116
+ children: [
117
+ /* @__PURE__ */ e(I, { name: s.name, src: s.avatarSrc, size: "md" }),
118
+ /* @__PURE__ */ e("span", { className: "ds:hidden ds:sm:inline", children: s.name })
119
+ ]
120
+ }
121
+ ) }),
122
+ /* @__PURE__ */ t(i.Content, { align: "end", children: [
123
+ /* @__PURE__ */ e(i.Label, { children: /* @__PURE__ */ t("span", { className: "ds:flex ds:flex-col", children: [
124
+ /* @__PURE__ */ e("span", { className: "ds:font-medium", children: s.name }),
125
+ s.email ? /* @__PURE__ */ e("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: s.email }) : null
126
+ ] }) }),
127
+ n ? /* @__PURE__ */ t(M, { children: [
128
+ /* @__PURE__ */ e(i.Separator, {}),
129
+ /* @__PURE__ */ e(
130
+ i.Item,
131
+ {
132
+ onSelect: n,
133
+ "data-testid": "marketplace-fullscreen",
134
+ children: d
135
+ }
136
+ )
137
+ ] }) : null,
138
+ /* @__PURE__ */ e(i.Separator, {}),
139
+ /* @__PURE__ */ e(
140
+ i.Item,
141
+ {
142
+ onSelect: r,
143
+ "data-testid": "marketplace-sign-out",
144
+ children: a.signOut
145
+ }
146
+ )
147
+ ] })
148
+ ] })
149
+ );
150
+ }
151
+ function te({ nav: s }) {
152
+ return /* @__PURE__ */ e(q, { children: s.map((a) => {
153
+ const r = typeof a.badgeCount == "number" && a.badgeCount > 0 ? a.badgeCount : void 0;
154
+ return /* @__PURE__ */ t(
155
+ G,
156
+ {
157
+ href: a.href,
158
+ "aria-label": a.label,
159
+ isActive: a.isActive,
160
+ children: [
161
+ a.icon ? /* @__PURE__ */ e(J, { children: a.icon }) : null,
162
+ /* @__PURE__ */ e(K, { children: a.label }),
163
+ r !== void 0 ? /* @__PURE__ */ e(Q, { children: ae(r) }) : null
164
+ ]
165
+ },
166
+ a.id
167
+ );
168
+ }) });
169
+ }
170
+ const re = f(
171
+ ({
172
+ productName: s,
173
+ productHref: a = "/",
174
+ nav: r,
175
+ user: n,
176
+ labels: l,
177
+ onSignOut: d,
178
+ onToggleFullscreen: c,
179
+ sidebarState: o,
180
+ mainAriaLabel: m,
181
+ children: p
182
+ }, h) => {
183
+ const { t: S } = k(), { theme: y, accessibility: C, resolvedTheme: g } = Y(), w = y !== "system" || C !== "system", A = g.startsWith("dark") ? "dark" : "light", z = g.endsWith("-accessible"), [H, v] = T(!1), b = /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(
184
+ B,
185
+ {
186
+ mainAriaLabel: m,
187
+ mainClassName: "ds:bg-[color:var(--app-shell-background)]",
188
+ header: /* @__PURE__ */ t(O, { children: [
189
+ /* @__PURE__ */ t(j, { children: [
190
+ /* @__PURE__ */ e(P, { href: "#main-content" }),
191
+ /* @__PURE__ */ e(W, { onMenuOpen: () => v(!0) }),
192
+ /* @__PURE__ */ e(
193
+ R,
194
+ {
195
+ href: a,
196
+ logo: /* @__PURE__ */ e(u, { name: s, size: "md", monochrome: !0 })
197
+ }
198
+ )
199
+ ] }),
200
+ /* @__PURE__ */ e(D, {}),
201
+ /* @__PURE__ */ t(E, { children: [
202
+ /* @__PURE__ */ e($, { size: "sm" }),
203
+ /* @__PURE__ */ e(
204
+ se,
205
+ {
206
+ user: n,
207
+ labels: l,
208
+ onSignOut: d,
209
+ onToggleFullscreen: c
210
+ }
211
+ )
212
+ ] })
213
+ ] }),
214
+ sidebar: /* @__PURE__ */ e(
215
+ V,
216
+ {
217
+ ...o !== void 0 ? { state: o } : { defaultState: "expanded" },
218
+ open: H,
219
+ onOpenChange: v,
220
+ "aria-label": S("navigation.sidebar.label"),
221
+ "data-testid": "marketplace-app-shell-sidebar",
222
+ children: /* @__PURE__ */ e(te, { nav: r })
223
+ }
224
+ ),
225
+ children: p
226
+ }
227
+ ) });
228
+ return w ? /* @__PURE__ */ e(
229
+ U,
230
+ {
231
+ ref: h,
232
+ theme: A,
233
+ accessible: z,
234
+ className: "ds:contents",
235
+ "data-component": "marketplace-app-shell",
236
+ children: b
237
+ }
238
+ ) : /* @__PURE__ */ e(
239
+ "div",
240
+ {
241
+ ref: h,
242
+ className: "ds:contents",
243
+ "data-component": "marketplace-app-shell",
244
+ children: b
245
+ }
246
+ );
247
+ }
248
+ );
249
+ re.displayName = "MarketplaceAppShell";
250
+ const ne = f(
251
+ ({
252
+ productName: s,
253
+ title: a,
254
+ description: r,
255
+ connectLabel: n,
256
+ status: l = "idle",
257
+ error: d,
258
+ onConnect: c,
259
+ footer: o,
260
+ className: m
261
+ }, p) => /* @__PURE__ */ e(
262
+ "div",
263
+ {
264
+ ref: p,
265
+ "data-component": "connect-with-alfadocs",
266
+ className: `ds:flex ds:min-h-dvh ds:items-center ds:justify-center ds:bg-[color:var(--app-shell-background)] ds:p-[var(--spacing-lg)] ${m ?? ""}`,
267
+ children: /* @__PURE__ */ e(x, { className: "ds:w-full ds:max-w-[400px]", children: /* @__PURE__ */ t(x.Body, { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-lg)] ds:text-center", children: [
268
+ /* @__PURE__ */ e(u, { name: s, size: "lg" }),
269
+ /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
270
+ /* @__PURE__ */ e("h1", { className: "type-title-card", children: a }),
271
+ /* @__PURE__ */ e("p", { className: "type-body-sm ds:text-[color:var(--muted-foreground)]", children: r })
272
+ ] }),
273
+ l === "error" && d ? /* @__PURE__ */ e(L, { variant: "error", className: "ds:w-full ds:text-start", children: d }) : null,
274
+ /* @__PURE__ */ e(
275
+ F,
276
+ {
277
+ intent: "primary",
278
+ className: "ds:w-full",
279
+ loading: l === "connecting",
280
+ onClick: c,
281
+ label: n,
282
+ "data-testid": "connect-with-alfadocs-button"
283
+ }
284
+ ),
285
+ o ? /* @__PURE__ */ e("div", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: o }) : null
286
+ ] }) })
287
+ }
288
+ )
289
+ );
290
+ ne.displayName = "ConnectWithAlfadocs";
291
+ export {
292
+ ne as C,
293
+ re as M,
294
+ u as P
295
+ };
296
+ //# sourceMappingURL=marketplace-app-shell-BlxVizU4.js.map