@alfadocs/ui-kit-debug 0.51.0 → 0.53.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 (164) hide show
  1. package/dist/_chunks/{logo-yituK7sE.js → logo-1FuSGx0n.js} +2 -1
  2. package/dist/_chunks/{logo-yituK7sE.js.map → logo-1FuSGx0n.js.map} +1 -1
  3. package/dist/_chunks/marketplace-app-shell-C4OYAC22.js +513 -0
  4. package/dist/_chunks/marketplace-app-shell-C4OYAC22.js.map +1 -0
  5. package/dist/_chunks/maximize-2-Cm9OUQ2m.js +17 -0
  6. package/dist/_chunks/maximize-2-Cm9OUQ2m.js.map +1 -0
  7. package/dist/_chunks/{otp-input-CMphfBxZ.js → otp-input-Chb9r5vf.js} +89 -87
  8. package/dist/_chunks/{otp-input-CMphfBxZ.js.map → otp-input-Chb9r5vf.js.map} +1 -1
  9. package/dist/_chunks/patient-shell-Coarf346.js +162 -0
  10. package/dist/_chunks/patient-shell-Coarf346.js.map +1 -0
  11. package/dist/_chunks/{privacy-lock-BmX_gkvt.js → privacy-lock-BN3L-alb.js} +2 -2
  12. package/dist/_chunks/{privacy-lock-BmX_gkvt.js.map → privacy-lock-BN3L-alb.js.map} +1 -1
  13. package/dist/_chunks/{public-footer.agent-okt8ZRc5.js → public-footer.agent-CfXuW1x6.js} +2 -2
  14. package/dist/_chunks/{public-footer.agent-okt8ZRc5.js.map → public-footer.agent-CfXuW1x6.js.map} +1 -1
  15. package/dist/_chunks/{public-header.agent-BY6FH71R.js → public-header.agent-DyVpPwmv.js} +72 -62
  16. package/dist/_chunks/public-header.agent-DyVpPwmv.js.map +1 -0
  17. package/dist/_chunks/{sign-document-Bzld9jVM.js → sign-document-BzHTjMVC.js} +2 -2
  18. package/dist/_chunks/{sign-document-Bzld9jVM.js.map → sign-document-BzHTjMVC.js.map} +1 -1
  19. package/dist/_chunks/{sign-in-with-alfadocs-button-CuYn_kKP.js → sign-in-with-alfadocs-button-BpAjVmsI.js} +2 -2
  20. package/dist/_chunks/{sign-in-with-alfadocs-button-CuYn_kKP.js.map → sign-in-with-alfadocs-button-BpAjVmsI.js.map} +1 -1
  21. package/dist/_chunks/{signature-capture-CpMBhqQ9.js → signature-capture-CHbrKoA_.js} +163 -152
  22. package/dist/_chunks/signature-capture-CHbrKoA_.js.map +1 -0
  23. package/dist/_chunks/signature-field-DhscKdgk.js +152 -0
  24. package/dist/_chunks/signature-field-DhscKdgk.js.map +1 -0
  25. package/dist/_chunks/use-signing-session-C5evzYmo.js +108 -0
  26. package/dist/_chunks/use-signing-session-C5evzYmo.js.map +1 -0
  27. package/dist/agent-catalog.json +1 -1
  28. package/dist/brand/product-lockup/product-lockup.d.ts +47 -12
  29. package/dist/brand/product-lockup/product-lockup.d.ts.map +1 -1
  30. package/dist/components/index.d.ts +3 -2
  31. package/dist/components/index.d.ts.map +1 -1
  32. package/dist/components/logo/index.js +1 -1
  33. package/dist/components/otp-input/index.js +1 -1
  34. package/dist/components/otp-input/otp-input.d.ts +6 -0
  35. package/dist/components/otp-input/otp-input.d.ts.map +1 -1
  36. package/dist/components/pdf-viewer/index.d.ts +1 -1
  37. package/dist/components/pdf-viewer/index.d.ts.map +1 -1
  38. package/dist/components/privacy-lock/index.js +1 -1
  39. package/dist/components/public-footer/index.js +1 -1
  40. package/dist/components/public-header/index.js +1 -1
  41. package/dist/components/public-header/public-header.d.ts +1 -1
  42. package/dist/components/public-header/public-header.d.ts.map +1 -1
  43. package/dist/components/sign-document/index.js +1 -1
  44. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  45. package/dist/components/signature-capture/index.js +1 -1
  46. package/dist/components/signature-capture/signature-capture.d.ts +7 -0
  47. package/dist/components/signature-capture/signature-capture.d.ts.map +1 -1
  48. package/dist/components/signature-field/index.d.ts +3 -0
  49. package/dist/components/signature-field/index.d.ts.map +1 -0
  50. package/dist/components/signature-field/index.js +6 -0
  51. package/dist/components/signature-field/index.js.map +1 -0
  52. package/dist/components/signature-field/signature-field.d.ts +35 -0
  53. package/dist/components/signature-field/signature-field.d.ts.map +1 -0
  54. package/dist/hooks/index.d.ts +1 -0
  55. package/dist/hooks/index.d.ts.map +1 -1
  56. package/dist/hooks/index.js +42 -41
  57. package/dist/hooks/use-signing-session.d.ts +36 -0
  58. package/dist/hooks/use-signing-session.d.ts.map +1 -0
  59. package/dist/i18n/locales/ar.d.ts +8 -0
  60. package/dist/i18n/locales/ar.d.ts.map +1 -1
  61. package/dist/i18n/locales/ar.js +8 -0
  62. package/dist/i18n/locales/ar.js.map +1 -1
  63. package/dist/i18n/locales/de.d.ts +8 -0
  64. package/dist/i18n/locales/de.d.ts.map +1 -1
  65. package/dist/i18n/locales/de.js +8 -0
  66. package/dist/i18n/locales/de.js.map +1 -1
  67. package/dist/i18n/locales/el.d.ts +8 -0
  68. package/dist/i18n/locales/el.d.ts.map +1 -1
  69. package/dist/i18n/locales/el.js +8 -0
  70. package/dist/i18n/locales/el.js.map +1 -1
  71. package/dist/i18n/locales/en.d.ts +8 -0
  72. package/dist/i18n/locales/en.d.ts.map +1 -1
  73. package/dist/i18n/locales/en.js +8 -0
  74. package/dist/i18n/locales/en.js.map +1 -1
  75. package/dist/i18n/locales/es.d.ts +8 -0
  76. package/dist/i18n/locales/es.d.ts.map +1 -1
  77. package/dist/i18n/locales/es.js +8 -0
  78. package/dist/i18n/locales/es.js.map +1 -1
  79. package/dist/i18n/locales/fr.d.ts +8 -0
  80. package/dist/i18n/locales/fr.d.ts.map +1 -1
  81. package/dist/i18n/locales/fr.js +8 -0
  82. package/dist/i18n/locales/fr.js.map +1 -1
  83. package/dist/i18n/locales/hi.d.ts +8 -0
  84. package/dist/i18n/locales/hi.d.ts.map +1 -1
  85. package/dist/i18n/locales/hi.js +8 -0
  86. package/dist/i18n/locales/hi.js.map +1 -1
  87. package/dist/i18n/locales/it.d.ts +8 -0
  88. package/dist/i18n/locales/it.d.ts.map +1 -1
  89. package/dist/i18n/locales/it.js +8 -0
  90. package/dist/i18n/locales/it.js.map +1 -1
  91. package/dist/i18n/locales/ja.d.ts +8 -0
  92. package/dist/i18n/locales/ja.d.ts.map +1 -1
  93. package/dist/i18n/locales/ja.js +8 -0
  94. package/dist/i18n/locales/ja.js.map +1 -1
  95. package/dist/i18n/locales/nl.d.ts +8 -0
  96. package/dist/i18n/locales/nl.d.ts.map +1 -1
  97. package/dist/i18n/locales/nl.js +8 -0
  98. package/dist/i18n/locales/nl.js.map +1 -1
  99. package/dist/i18n/locales/pl.d.ts +8 -0
  100. package/dist/i18n/locales/pl.d.ts.map +1 -1
  101. package/dist/i18n/locales/pl.js +8 -0
  102. package/dist/i18n/locales/pl.js.map +1 -1
  103. package/dist/i18n/locales/pt.d.ts +8 -0
  104. package/dist/i18n/locales/pt.d.ts.map +1 -1
  105. package/dist/i18n/locales/pt.js +8 -0
  106. package/dist/i18n/locales/pt.js.map +1 -1
  107. package/dist/i18n/locales/ro.d.ts +8 -0
  108. package/dist/i18n/locales/ro.d.ts.map +1 -1
  109. package/dist/i18n/locales/ro.js +8 -0
  110. package/dist/i18n/locales/ro.js.map +1 -1
  111. package/dist/i18n/locales/ru.d.ts +8 -0
  112. package/dist/i18n/locales/ru.d.ts.map +1 -1
  113. package/dist/i18n/locales/ru.js +8 -0
  114. package/dist/i18n/locales/ru.js.map +1 -1
  115. package/dist/i18n/locales/sq.d.ts +8 -0
  116. package/dist/i18n/locales/sq.d.ts.map +1 -1
  117. package/dist/i18n/locales/sq.js +8 -0
  118. package/dist/i18n/locales/sq.js.map +1 -1
  119. package/dist/i18n/locales/sv.d.ts +8 -0
  120. package/dist/i18n/locales/sv.d.ts.map +1 -1
  121. package/dist/i18n/locales/sv.js +8 -0
  122. package/dist/i18n/locales/sv.js.map +1 -1
  123. package/dist/i18n/locales/tr.d.ts +8 -0
  124. package/dist/i18n/locales/tr.d.ts.map +1 -1
  125. package/dist/i18n/locales/tr.js +8 -0
  126. package/dist/i18n/locales/tr.js.map +1 -1
  127. package/dist/i18n/locales/zh.d.ts +8 -0
  128. package/dist/i18n/locales/zh.d.ts.map +1 -1
  129. package/dist/i18n/locales/zh.js +8 -0
  130. package/dist/i18n/locales/zh.js.map +1 -1
  131. package/dist/index.js +701 -697
  132. package/dist/index.js.map +1 -1
  133. package/dist/locales/ar.json +8 -0
  134. package/dist/locales/de.json +8 -0
  135. package/dist/locales/el.json +8 -0
  136. package/dist/locales/en.json +8 -0
  137. package/dist/locales/es.json +8 -0
  138. package/dist/locales/fr.json +8 -0
  139. package/dist/locales/hi.json +8 -0
  140. package/dist/locales/it.json +8 -0
  141. package/dist/locales/ja.json +8 -0
  142. package/dist/locales/nl.json +8 -0
  143. package/dist/locales/pl.json +8 -0
  144. package/dist/locales/pt.json +8 -0
  145. package/dist/locales/ro.json +8 -0
  146. package/dist/locales/ru.json +8 -0
  147. package/dist/locales/sq.json +8 -0
  148. package/dist/locales/sv.json +8 -0
  149. package/dist/locales/tr.json +8 -0
  150. package/dist/locales/zh.json +8 -0
  151. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  152. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +8 -6
  153. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts.map +1 -1
  154. package/dist/patterns/patient-shell/index.js +1 -1
  155. package/dist/tokens.css +1 -1
  156. package/package.json +5 -1
  157. package/dist/_chunks/marketplace-app-shell-Dmo1S9av.js +0 -428
  158. package/dist/_chunks/marketplace-app-shell-Dmo1S9av.js.map +0 -1
  159. package/dist/_chunks/patient-shell-c2YixkQw.js +0 -174
  160. package/dist/_chunks/patient-shell-c2YixkQw.js.map +0 -1
  161. package/dist/_chunks/public-header.agent-BY6FH71R.js.map +0 -1
  162. package/dist/_chunks/signature-capture-CpMBhqQ9.js.map +0 -1
  163. package/dist/_chunks/use-scroll-to-first-error-4Za-u5Nw.js +0 -43
  164. package/dist/_chunks/use-scroll-to-first-error-4Za-u5Nw.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit-debug",
3
- "version": "0.51.0",
3
+ "version": "0.53.0",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe. (debug build — identical runtime to @alfadocs/ui-kit, ships source maps for symbolication).",
6
6
  "license": "BUSL-1.1",
@@ -491,6 +491,10 @@
491
491
  "types": "./dist/components/signature-capture/index.d.ts",
492
492
  "import": "./dist/components/signature-capture/index.js"
493
493
  },
494
+ "./signature-field": {
495
+ "types": "./dist/components/signature-field/index.d.ts",
496
+ "import": "./dist/components/signature-field/index.js"
497
+ },
494
498
  "./skeleton": {
495
499
  "types": "./dist/components/skeleton/index.d.ts",
496
500
  "import": "./dist/components/skeleton/index.js"
@@ -1,428 +0,0 @@
1
- import { jsxs as n, jsx as e, Fragment as T } from "react/jsx-runtime";
2
- import { forwardRef as b, useState as P } from "react";
3
- import { useTranslation as M } from "react-i18next";
4
- import { c as p } from "./index-D2ZczOXr.js";
5
- import { A as E } from "./app-frame-BYx1gcV7.js";
6
- import { A as $ } from "./avatar-BNQNhoyL.js";
7
- import { A as D } from "./alert-_mUKLmwA.js";
8
- import { C } from "./card-DPmk26CL.js";
9
- import { D as i } from "./dropdown-menu-DwwPovMZ.js";
10
- import { T as F } from "./tab-bar-Xetknddo.js";
11
- import { a as S, H as q, g as G, f as w, e as J, c as K, d as Q } from "./header-Ce1Br27u.js";
12
- import { H as U } from "./header-settings-D5Z2B_Yz.js";
13
- import { S as X } from "./sign-in-with-alfadocs-button-CuYn_kKP.js";
14
- import { S as Y, a as Z, j as _, k as ee, i as ae, h as A } from "./sidebar-DPEHzxLZ.js";
15
- import { T as se } from "./theme-root-BOO73p5t.js";
16
- import { a as te } from "./tooltip-DvmfrNvB.js";
17
- import { u as re } from "./use-theme-CAuo6EYT.js";
18
- import { L as ne } from "./logo-yituK7sE.js";
19
- const de = p("ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]"), le = p(
20
- [
21
- "ds:[font-family:var(--font-serif)]",
22
- "ds:font-semibold",
23
- "ds:leading-none",
24
- "ds:tracking-[0.01em]",
25
- "ds:whitespace-nowrap",
26
- // Forced-colors: drop the transparent text-fill and paint the label
27
- // as solid CanvasText so it never disappears under Windows HCM —
28
- // a gradient/transparent fill has no meaning there.
29
- "ds:forced-colors:text-[CanvasText]",
30
- "ds:forced-colors:[-webkit-text-fill-color:CanvasText]"
31
- ],
32
- {
33
- variants: {
34
- size: {
35
- sm: "ds:text-[calc(var(--logo-size-sm)*0.95)]",
36
- md: "ds:text-[calc(var(--logo-size-md)*0.95)]",
37
- lg: "ds:text-[calc(var(--logo-size-lg)*0.95)]",
38
- xl: "ds:text-[calc(var(--logo-size-xl)*0.95)]"
39
- },
40
- tone: {
41
- // Brand gradient filled into the glyphs via background-clip:text.
42
- // `--gradient-wordmark` rides the theme aliases, so it stays
43
- // AA-safe and adapts per theme on its own (and flattens to a solid
44
- // ink in the accessible / forced-colors blocks — see tokens).
45
- gradient: [
46
- "ds:italic",
47
- "ds:bg-[image:var(--gradient-wordmark)]",
48
- "ds:bg-clip-text",
49
- "ds:text-transparent",
50
- "ds:[-webkit-text-fill-color:transparent]"
51
- ],
52
- // Monochrome: solid currentColor ink, upright, no gradient — for
53
- // print, single-colour work, and coloured chrome (e.g. app-shell
54
- // headers) where the lockup must ride the surrounding ink.
55
- solid: "ds:text-current"
56
- }
57
- },
58
- defaultVariants: { size: "md", tone: "gradient" }
59
- }
60
- ), h = b(
61
- ({
62
- name: s,
63
- monochrome: r = !1,
64
- tone: a = "auto",
65
- size: t = "md",
66
- className: d,
67
- ...l
68
- }, o) => /* @__PURE__ */ n(
69
- "span",
70
- {
71
- ref: o,
72
- role: "img",
73
- "aria-label": `Alfadocs ${s}`.trim(),
74
- className: de({ className: d }),
75
- "data-component": "product-lockup",
76
- ...l,
77
- children: [
78
- /* @__PURE__ */ e(
79
- ne,
80
- {
81
- variant: r ? "monochrome" : "wordmark",
82
- tone: a,
83
- size: t,
84
- decorative: !0
85
- }
86
- ),
87
- /* @__PURE__ */ e(
88
- "span",
89
- {
90
- "aria-hidden": !0,
91
- className: le({
92
- size: t,
93
- tone: r ? "solid" : "gradient"
94
- }),
95
- children: s
96
- }
97
- )
98
- ]
99
- }
100
- )
101
- );
102
- h.displayName = "ProductLockup";
103
- function ie(s) {
104
- return s > 99 ? "99+" : String(s);
105
- }
106
- function oe({
107
- user: s,
108
- labels: r,
109
- onSignOut: a,
110
- onToggleFullscreen: t
111
- }) {
112
- const { t: d } = M(), l = r.fullscreen ?? d("patientShell.settings.fullscreen");
113
- return (
114
- // Non-modal: an account menu shouldn't inert/aria-hide the whole shell
115
- // behind it (which leaves the still-focusable chrome inside an
116
- // aria-hidden region — an `aria-hidden-focus` violation).
117
- /* @__PURE__ */ n(i.Root, { modal: !1, children: [
118
- /* @__PURE__ */ e(i.Trigger, { asChild: !0, children: /* @__PURE__ */ n(
119
- "button",
120
- {
121
- type: "button",
122
- "aria-label": r.accountMenu,
123
- "data-testid": "marketplace-account-trigger",
124
- 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]",
125
- children: [
126
- /* @__PURE__ */ e($, { name: s.name, src: s.avatarSrc, size: "md" }),
127
- /* @__PURE__ */ e("span", { className: "ds:hidden ds:sm:inline", children: s.name })
128
- ]
129
- }
130
- ) }),
131
- /* @__PURE__ */ n(i.Content, { align: "end", children: [
132
- /* @__PURE__ */ e(i.Label, { children: /* @__PURE__ */ n("span", { className: "ds:flex ds:flex-col", children: [
133
- /* @__PURE__ */ e("span", { className: "ds:font-medium", children: s.name }),
134
- s.email ? /* @__PURE__ */ e("span", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", children: s.email }) : null
135
- ] }) }),
136
- t ? /* @__PURE__ */ n(T, { children: [
137
- /* @__PURE__ */ e(i.Separator, {}),
138
- /* @__PURE__ */ e(
139
- i.Item,
140
- {
141
- onSelect: t,
142
- "data-testid": "marketplace-fullscreen",
143
- children: l
144
- }
145
- )
146
- ] }) : null,
147
- /* @__PURE__ */ e(i.Separator, {}),
148
- /* @__PURE__ */ e(
149
- i.Item,
150
- {
151
- onSelect: a,
152
- "data-testid": "marketplace-sign-out",
153
- children: r.signOut
154
- }
155
- )
156
- ] })
157
- ] })
158
- );
159
- }
160
- function ce({
161
- nav: s,
162
- renderLink: r
163
- }) {
164
- return /* @__PURE__ */ e(Z, { children: s.map((a) => {
165
- const t = typeof a.badgeCount == "number" && a.badgeCount > 0 ? a.badgeCount : void 0, d = /* @__PURE__ */ n(T, { children: [
166
- a.icon ? /* @__PURE__ */ e(_, { children: a.icon }) : null,
167
- /* @__PURE__ */ e(ee, { children: a.label }),
168
- t !== void 0 ? /* @__PURE__ */ e(ae, { children: ie(t) }) : null
169
- ] });
170
- return r ? /* @__PURE__ */ e(A, { asChild: !0, isActive: a.isActive, children: r({
171
- href: a.href,
172
- children: d,
173
- "aria-current": a.isActive ? "page" : void 0
174
- }) }, a.id) : /* @__PURE__ */ e(
175
- A,
176
- {
177
- href: a.href,
178
- "aria-label": a.label,
179
- isActive: a.isActive,
180
- ...a.onClick ? { onClick: a.onClick } : {},
181
- children: d
182
- },
183
- a.id
184
- );
185
- }) });
186
- }
187
- const z = p("ds:bg-[color:var(--app-shell-background)]", {
188
- variants: {
189
- variant: {
190
- standalone: "",
191
- embedded: [
192
- "ds:flex-1",
193
- "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
194
- "ds:pt-[var(--spacing-lg)] ds:pb-[var(--spacing-md)]"
195
- ].join(" ")
196
- }
197
- },
198
- defaultVariants: { variant: "standalone" }
199
- });
200
- function me({
201
- nav: s,
202
- ariaLabel: r,
203
- renderLink: a
204
- }) {
205
- const t = a ? ({
206
- href: d,
207
- className: l,
208
- children: o,
209
- "aria-current": m
210
- }) => a({ href: d, className: l, children: o, "aria-current": m }) : void 0;
211
- return /* @__PURE__ */ e(
212
- F,
213
- {
214
- items: s,
215
- ariaLabel: r,
216
- ...t ? { renderLink: t } : {}
217
- }
218
- );
219
- }
220
- const pe = b(
221
- ({
222
- productName: s,
223
- productHref: r = "/",
224
- nav: a,
225
- renderLink: t,
226
- user: d,
227
- labels: l,
228
- onSignOut: o,
229
- onToggleFullscreen: m,
230
- sidebarState: c,
231
- mainAriaLabel: f,
232
- variant: g = "standalone",
233
- children: u
234
- }, x) => {
235
- const { t: v } = M(), B = t ? /* @__PURE__ */ e(S, { asChild: !0, children: t({
236
- href: r,
237
- children: /* @__PURE__ */ e(h, { name: s, size: "md", monochrome: !0 })
238
- }) }) : /* @__PURE__ */ e(
239
- S,
240
- {
241
- href: r,
242
- logo: /* @__PURE__ */ e(h, { name: s, size: "md", monochrome: !0 })
243
- }
244
- ), { theme: H, accessibility: I, resolvedTheme: k } = re(), V = H !== "system" || I !== "system", j = k.startsWith("dark") ? "dark" : "light", L = k.endsWith("-accessible"), [O, N] = P(!1), W = /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
245
- E,
246
- {
247
- mainAriaLabel: f,
248
- mainClassName: z({ variant: "standalone" }),
249
- header: /* @__PURE__ */ n(q, { children: [
250
- /* @__PURE__ */ n(G, { children: [
251
- /* @__PURE__ */ e(w, { href: "#main-content" }),
252
- /* @__PURE__ */ e(J, { onMenuOpen: () => N(!0) }),
253
- B
254
- ] }),
255
- /* @__PURE__ */ e(K, {}),
256
- /* @__PURE__ */ n(Q, { children: [
257
- /* @__PURE__ */ e(U, { size: "sm" }),
258
- /* @__PURE__ */ e(
259
- oe,
260
- {
261
- user: d,
262
- labels: l,
263
- onSignOut: o,
264
- onToggleFullscreen: m
265
- }
266
- )
267
- ] })
268
- ] }),
269
- sidebar: /* @__PURE__ */ e(
270
- Y,
271
- {
272
- ...c !== void 0 ? { state: c } : { defaultState: "expanded" },
273
- open: O,
274
- onOpenChange: N,
275
- "aria-label": v("navigation.sidebar.label"),
276
- "data-testid": "marketplace-app-shell-sidebar",
277
- children: /* @__PURE__ */ e(ce, { nav: a, renderLink: t })
278
- }
279
- ),
280
- children: u
281
- }
282
- ) }), R = (
283
- // The shell owns the warm-grey canvas; TabBar's strip is transparent and
284
- // floats its pill on it, and `<main>` continues the same surface.
285
- /* @__PURE__ */ n("div", { className: "ds:flex ds:min-h-dvh ds:flex-col ds:bg-[color:var(--app-shell-background)]", children: [
286
- /* @__PURE__ */ e(w, { href: "#main-content" }),
287
- /* @__PURE__ */ e(
288
- me,
289
- {
290
- nav: a,
291
- ariaLabel: v("navigation.sidebar.label"),
292
- renderLink: t
293
- }
294
- ),
295
- /* @__PURE__ */ e(
296
- "main",
297
- {
298
- id: "main-content",
299
- tabIndex: -1,
300
- "aria-label": f ?? v("navigation.main.label", "Main content"),
301
- className: z({ variant: "embedded" }),
302
- children: u
303
- }
304
- )
305
- ] })
306
- ), y = g === "embedded" ? R : W;
307
- return V ? /* @__PURE__ */ e(
308
- se,
309
- {
310
- ref: x,
311
- theme: j,
312
- accessible: L,
313
- className: "ds:contents",
314
- "data-component": "marketplace-app-shell",
315
- children: y
316
- }
317
- ) : /* @__PURE__ */ e(
318
- "div",
319
- {
320
- ref: x,
321
- className: "ds:contents",
322
- "data-component": "marketplace-app-shell",
323
- children: y
324
- }
325
- );
326
- }
327
- );
328
- pe.displayName = "MarketplaceAppShell";
329
- const fe = p(
330
- "ds:flex ds:min-h-dvh ds:bg-[color:var(--app-shell-background)]",
331
- {
332
- variants: {
333
- layout: {
334
- card: "",
335
- split: "ds:flex-col ds:lg:flex-row"
336
- }
337
- },
338
- defaultVariants: { layout: "card" }
339
- }
340
- ), he = p("ds:w-full", {
341
- variants: {
342
- layout: {
343
- card: "ds:max-w-[400px]",
344
- split: "ds:max-w-[400px] ds:lg:max-w-[480px]"
345
- }
346
- },
347
- defaultVariants: { layout: "card" }
348
- }), ue = p("", {
349
- variants: {
350
- layout: { card: "", split: "ds:lg:hidden" }
351
- },
352
- defaultVariants: { layout: "card" }
353
- }), ge = b(
354
- ({
355
- productName: s,
356
- title: r,
357
- description: a,
358
- connectLabel: t,
359
- status: d = "idle",
360
- error: l,
361
- onConnect: o,
362
- footer: m,
363
- layout: c = "card",
364
- brandPanel: f,
365
- className: g
366
- }, u) => /* @__PURE__ */ n(
367
- "div",
368
- {
369
- ref: u,
370
- "data-component": "connect-with-alfadocs",
371
- className: `${fe({ layout: c })} ${g ?? ""}`,
372
- children: [
373
- c === "split" ? (
374
- // Desktop brand panel (lg+ only): a bold `--primary` surface with the
375
- // monochrome lockup riding the `--primary-foreground` ink, plus an
376
- // optional `brandPanel` slot. Decorative — the card carries the real
377
- // heading + CTA, and shows its own lockup below `lg:`.
378
- /* @__PURE__ */ n("div", { className: "ds:hidden ds:lg:flex ds:lg:w-[55%] ds:flex-col ds:items-center ds:justify-center ds:gap-[var(--spacing-lg)] ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:ps-[var(--spacing-2xl)] ds:pe-[var(--spacing-2xl)] ds:pt-[var(--spacing-2xl)] ds:pb-[var(--spacing-2xl)] ds:text-start", children: [
379
- /* @__PURE__ */ e(
380
- h,
381
- {
382
- name: s,
383
- size: "lg",
384
- monochrome: !0,
385
- tone: "inherit"
386
- }
387
- ),
388
- f ? /* @__PURE__ */ e("div", { className: "type-body ds:max-w-[28rem] ds:text-start", children: f }) : null
389
- ] })
390
- ) : null,
391
- /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-1 ds:items-center ds:justify-center ds:p-[var(--spacing-lg)]", children: /* @__PURE__ */ e(C, { className: he({ layout: c }), children: /* @__PURE__ */ n(C.Body, { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-lg)] ds:text-center", children: [
392
- /* @__PURE__ */ e(
393
- h,
394
- {
395
- name: s,
396
- size: "lg",
397
- className: ue({ layout: c })
398
- }
399
- ),
400
- /* @__PURE__ */ n("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
401
- /* @__PURE__ */ e("h1", { className: "type-title-card", children: r }),
402
- /* @__PURE__ */ e("p", { className: "type-body-sm ds:text-[color:var(--muted-foreground)]", children: a })
403
- ] }),
404
- d === "error" && l ? /* @__PURE__ */ e(D, { variant: "error", className: "ds:w-full ds:text-start", children: l }) : null,
405
- /* @__PURE__ */ e(
406
- X,
407
- {
408
- intent: "primary",
409
- className: "ds:w-full",
410
- loading: d === "connecting",
411
- onClick: o,
412
- label: t,
413
- "data-testid": "connect-with-alfadocs-button"
414
- }
415
- ),
416
- m ? /* @__PURE__ */ e("div", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: m }) : null
417
- ] }) }) })
418
- ]
419
- }
420
- )
421
- );
422
- ge.displayName = "ConnectWithAlfadocs";
423
- export {
424
- ge as C,
425
- pe as M,
426
- h as P
427
- };
428
- //# sourceMappingURL=marketplace-app-shell-Dmo1S9av.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"marketplace-app-shell-Dmo1S9av.js","sources":["../../src/brand/product-lockup/product-lockup.tsx","../../src/patterns/marketplace-app-shell/marketplace-app-shell.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Logo } from '../../components/logo/logo';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\n// Outer lockup row. ~4px logical gap between the wordmark and the product\n// name (`--spacing-xs`), centre-aligned so the name's cap height sits\n// against the wordmark's letterforms.\nconst lockup = cva('ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]');\n\n// The product name. Marketing serif (Fraunces, `--font-serif`) — permitted\n// here because this file lives under `src/brand/`, never in `src/components/`\n// or `src/patterns/` (constraint 10). Sized to ~95% of the wordmark height so\n// its cap height matches the logo letterforms across every size and theme\n// (the `--logo-size-*` tokens shift up in the accessible themes; the calc\n// keeps the name proportional for free).\nconst productName = cva(\n [\n 'ds:[font-family:var(--font-serif)]',\n 'ds:font-semibold',\n 'ds:leading-none',\n 'ds:tracking-[0.01em]',\n 'ds:whitespace-nowrap',\n // Forced-colors: drop the transparent text-fill and paint the label\n // as solid CanvasText so it never disappears under Windows HCM —\n // a gradient/transparent fill has no meaning there.\n 'ds:forced-colors:text-[CanvasText]',\n 'ds:forced-colors:[-webkit-text-fill-color:CanvasText]',\n ],\n {\n variants: {\n size: {\n sm: 'ds:text-[calc(var(--logo-size-sm)*0.95)]',\n md: 'ds:text-[calc(var(--logo-size-md)*0.95)]',\n lg: 'ds:text-[calc(var(--logo-size-lg)*0.95)]',\n xl: 'ds:text-[calc(var(--logo-size-xl)*0.95)]',\n },\n tone: {\n // Brand gradient filled into the glyphs via background-clip:text.\n // `--gradient-wordmark` rides the theme aliases, so it stays\n // AA-safe and adapts per theme on its own (and flattens to a solid\n // ink in the accessible / forced-colors blocks — see tokens).\n gradient: [\n 'ds:italic',\n 'ds:bg-[image:var(--gradient-wordmark)]',\n 'ds:bg-clip-text',\n 'ds:text-transparent',\n 'ds:[-webkit-text-fill-color:transparent]',\n ],\n // Monochrome: solid currentColor ink, upright, no gradient — for\n // print, single-colour work, and coloured chrome (e.g. app-shell\n // headers) where the lockup must ride the surrounding ink.\n solid: 'ds:text-current',\n },\n },\n defaultVariants: { size: 'md', tone: 'gradient' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\ntype LockupSize = NonNullable<VariantProps<typeof productName>['size']>;\n\nexport type ProductLockupProps = {\n /**\n * The product name paired with the Alfadocs wordmark — e.g. `\"Builders\"`\n * renders as \"Alfadocs Builders\". Passed verbatim (product names are not\n * translated); the lockup's accessible name becomes `Alfadocs <name>`.\n */\n name: string;\n /**\n * Render the name as a solid `--foreground` ink, upright (no gradient, no\n * italic), and pair it with the monochrome wordmark. Use for print,\n * single-colour reproductions, or any constrained context where the\n * gradient/serif treatment is inappropriate.\n */\n monochrome?: boolean;\n /**\n * Ink resolution. `'auto'` (default) uses the lockup's intended ink\n * (`--foreground` for monochrome). `'inherit'` makes the whole lockup ride\n * `currentColor` — use it with `monochrome` on a coloured brand surface (a\n * tinted header or split-login panel) so the wordmark + name both take the\n * surface's text colour rather than clashing with a fixed `--foreground`.\n */\n tone?: 'auto' | 'inherit';\n /** Lockup size. Drives both the wordmark and the name's cap height. */\n size?: LockupSize;\n className?: string;\n} & Omit<\n ComponentPropsWithoutRef<'span'>,\n 'role' | 'aria-label' | 'aria-hidden' | 'children' | 'className'\n>;\n\n/* ------------------------------------------------------------------ */\n/* ProductLockup */\n/* ------------------------------------------------------------------ */\n\n/**\n * The standard lockup pairing the Alfadocs wordmark with a product name\n * (\"Alfadocs Builders\", \"Alfadocs MyApp\"). Every marketplace app should use\n * this rather than hand-rolling a wordmark + typed span.\n *\n * The whole lockup is exposed to assistive tech as a single `img` named\n * `Alfadocs <name>`; the inner wordmark and the visible name are both\n * decorative so the brand isn't announced twice.\n */\nexport const ProductLockup = forwardRef<HTMLSpanElement, ProductLockupProps>(\n (\n {\n name,\n monochrome = false,\n tone = 'auto',\n size = 'md',\n className,\n ...props\n },\n ref,\n ) => {\n if (import.meta.env.DEV && !name.trim()) {\n console.warn(\n '[ProductLockup] `name` is empty — the lockup will render the bare wordmark with no product name. Pass the product name (e.g. \"Builders\").',\n );\n }\n\n return (\n <span\n ref={ref}\n role=\"img\"\n aria-label={`Alfadocs ${name}`.trim()}\n className={lockup({ className })}\n data-component=\"product-lockup\"\n {...props}\n >\n <Logo\n variant={monochrome ? 'monochrome' : 'wordmark'}\n tone={tone}\n size={size}\n decorative\n />\n <span\n aria-hidden\n className={productName({\n size,\n tone: monochrome ? 'solid' : 'gradient',\n })}\n >\n {name}\n </span>\n </span>\n );\n },\n);\nProductLockup.displayName = 'ProductLockup';\n","/**\n * Marketplace App Shell — the standard chrome for an app built on top of\n * AlfaDocs (the kind a partner scaffolds with Claude Code, Lovable, etc.).\n *\n * It is a thin, opinionated composition of kit primitives: an `AppFrame` with\n * a branded `Header` (the canonical `ProductLockup` — \"Alfadocs <Product>\" —\n * rendered `monochrome` so it rides the header's ink), a `Sidebar` for app\n * navigation, `HeaderSettings` (theme/locale/accessibility), and an Avatar\n * account menu (fullscreen + sign-out). `ConnectWithAlfadocs` is the matching\n * pre-auth screen, with the full-colour lockup and `SignInWithAlfadocsButton`.\n *\n * Like `PatientShell`, this pattern ships a RUNTIME component (surfaced via\n * `src/patterns/index.ts` and the library bundle) because consuming apps mount\n * it in production rather than copying the source.\n *\n * Auth is intentionally decoupled: the shell takes the signed-in `user` and an\n * `onSignOut` callback as props, and `ConnectWithAlfadocs` takes a `status` +\n * `onConnect`. Wire them to `@alfadocs/auth/react`'s `useAlfadocsAuth()` in the\n * consuming app — the kit never touches OAuth or secrets (those live in the\n * server-side `@alfadocs/auth` BFF).\n *\n * All user-visible copy is consumer-provided (props) so each app localises in\n * its own i18n; the only kit-owned strings reuse existing translated `ui.*`\n * keys (sidebar label, skip link, menu button).\n */\nimport { forwardRef, useState, type MouseEvent, type ReactNode } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cva } from 'class-variance-authority';\n\nimport { AppFrame } from '../../components/app-frame';\nimport { Avatar } from '../../components/avatar';\nimport { Alert } from '../../components/alert';\nimport { Card } from '../../components/card';\nimport { DropdownMenu } from '../../components/dropdown-menu';\nimport { TabBar } from '../../components/tab-bar';\nimport {\n Header,\n HeaderBrand,\n HeaderCenter,\n HeaderEnd,\n HeaderMenuButton,\n HeaderSkipLink,\n HeaderStart,\n} from '../../components/header';\nimport { HeaderSettings } from '../../components/header-settings';\nimport { ProductLockup } from '../../brand/product-lockup';\nimport { SignInWithAlfadocsButton } from '../../components/sign-in-with-alfadocs-button';\nimport {\n Sidebar,\n SidebarBody,\n SidebarItem,\n SidebarItemBadge,\n SidebarItemIcon,\n SidebarItemLabel,\n type SidebarMode,\n} from '../../components/sidebar';\nimport { ThemeRoot } from '../../components/theme-root';\nimport { TooltipProvider } from '../../components/tooltip';\nimport { useTheme } from '../../hooks/use-theme';\n\n/* ------------------------------------------------------------------ */\n/* Public API */\n/* ------------------------------------------------------------------ */\n\nexport interface MarketplaceNavItem {\n id: string;\n /** Pre-translated label — apps localise their own nav copy. */\n label: string;\n href: string;\n /** Optional leading icon (a lucide-react element or equivalent). */\n icon?: ReactNode;\n /** Optional unseen-item count rendered as a pill badge. */\n badgeCount?: number;\n /** Mark the item as the current page (`aria-current='page'`). */\n isActive?: boolean;\n /**\n * Optional click handler threaded onto the nav link's `<a>`. The lightweight\n * alternative to `renderLink`: intercept a same-origin click (call\n * `event.preventDefault()`) and route client-side without a full page load —\n * no router `<Link>` needed. Applies to both the standalone sidebar item and\n * the embedded tab. When `renderLink` is supplied it's handed through to the\n * consumer's link element instead.\n */\n onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n}\n\n/**\n * Props the shell hands to `renderLink` for each nav item. The consumer returns\n * their router's `<Link to={href}>` carrying the same `className` (the kit's\n * active styling) and `aria-current` (`'page'` on the active item) so a tab /\n * sidebar-item click is a client-side route change, not a full page reload.\n */\nexport interface MarketplaceRenderLinkProps {\n /** The item's destination — feed it to your router's `to` / `href`. */\n href: string;\n /** The kit's classes — apply verbatim to the link element. */\n className?: string;\n /** Icon + label + badge — render as the link's children. */\n children: ReactNode;\n /** `'page'` on the active item, otherwise omitted — forward to the link. */\n 'aria-current'?: 'page';\n}\n\n/**\n * Render a nav item through the consumer's router instead of the kit's own\n * `<a>`. Returned by the consumer; the shell forwards `href`, the kit's\n * `className`, the item children, and `aria-current` so the active styling and\n * the `aria-current=\"page\"` marker survive a client-side route change.\n */\nexport type MarketplaceRenderLink = (\n props: MarketplaceRenderLinkProps,\n) => ReactNode;\n\nexport interface MarketplaceAppUser {\n /** Display name — drives the avatar initials + the account-menu header. */\n name: string;\n /** Optional email shown under the name in the account menu. */\n email?: string;\n /** Optional avatar image URL. */\n avatarSrc?: string;\n}\n\nexport interface MarketplaceAppShellLabels {\n /** Accessible name for the account-menu trigger, e.g. \"Account menu\". */\n accountMenu: string;\n /** The sign-out menu item, e.g. \"Sign out\". */\n signOut: string;\n /**\n * Optional fullscreen menu item label, e.g. \"Toggle fullscreen\". The item\n * renders whenever `onToggleFullscreen` is supplied; when this label is\n * omitted it falls back to the translated `ui.*` \"Toggle fullscreen\" string.\n */\n fullscreen?: string;\n}\n\nexport interface MarketplaceAppShellProps {\n /** Product name paired with the Alfadocs wordmark — renders \"Alfadocs <productName>\". */\n productName: string;\n /** Link target for the brand lockup. Default `'/'`. */\n productHref?: string;\n /** Sidebar nav items, in order. */\n nav: MarketplaceNavItem[];\n /**\n * Render nav items (and the brand lockup) through the consumer's router so a\n * tab / item click is a client-side route change with **no full-page reload\n * or session flash**. Wire it to your router's `<Link>`:\n *\n * ```tsx\n * import { Link } from '@tanstack/react-router';\n * <MarketplaceAppShell\n * nav={nav}\n * renderLink={({ href, className, children, ...rest }) => (\n * <Link to={href} className={className} {...rest}>{children}</Link>\n * )}\n * />\n * ```\n *\n * Threaded to the standalone sidebar items, the embedded top tab strip, and\n * the brand lockup. The kit forwards the same `className` + `aria-current` so\n * the active styling and the `aria-current=\"page\"` marker survive in both\n * modes. Omit it to render the plain `<a href>` exactly as before — non-routed\n * consumers are byte-for-byte unaffected. A per-item `onClick` (a\n * click-interceptor shim) is the lighter alternative when you don't want to\n * thread a router `<Link>`.\n */\n renderLink?: MarketplaceRenderLink;\n /** The signed-in user shown in the account menu. */\n user: MarketplaceAppUser;\n /** Consumer-localised chrome labels owned by the shell. */\n labels: MarketplaceAppShellLabels;\n /** Fires when the user picks \"Sign out\". Wire to `useAlfadocsAuth().signOut`. */\n onSignOut?: () => void;\n /** Fires when the user toggles fullscreen. Omit to hide the fullscreen item. */\n onToggleFullscreen?: () => void;\n /**\n * Force the sidebar into a specific mode. Apps typically flip to `'overlay'`\n * on narrow viewports and leave this undefined elsewhere (defaults to\n * `'expanded'`).\n */\n sidebarState?: SidebarMode;\n /** Override the accessible name of the `<main>` landmark. */\n mainAriaLabel?: string;\n /**\n * Chrome variant. `'standalone'` (default) renders the full shell — branded\n * Header, Sidebar, and account menu. `'embedded'` is for apps running INSIDE\n * the AlfaDocs platform iframe (consumers detect this with\n * `window !== window.top`): it drops the Header, Sidebar, account menu, and\n * product lockup — the platform already brands and identifies the session\n * around the iframe — and renders the `nav` items as a single slim top tab\n * strip. `onSignOut`, `onToggleFullscreen`, `productName`, `productHref`, and\n * `sidebarState` are ignored in `'embedded'`; the `<main>` landmark,\n * `mainAriaLabel`, and the skip link are kept.\n */\n variant?: 'standalone' | 'embedded';\n /** Children render inside the main content region. */\n children: ReactNode;\n}\n\n/* ------------------------------------------------------------------ */\n/* Internals */\n/* ------------------------------------------------------------------ */\n\nfunction formatBadgeCount(count: number): string {\n return count > 99 ? '99+' : String(count);\n}\n\nfunction AccountMenu({\n user,\n labels,\n onSignOut,\n onToggleFullscreen,\n}: {\n user: MarketplaceAppUser;\n labels: MarketplaceAppShellLabels;\n onSignOut?: () => void;\n onToggleFullscreen?: () => void;\n}) {\n const { t } = useTranslation();\n // Default to the translated `ui.*` label so a consumer that wires\n // `onToggleFullscreen` but omits the label still gets a localised item.\n const fullscreenLabel =\n labels.fullscreen ?? t('patientShell.settings.fullscreen');\n return (\n // Non-modal: an account menu shouldn't inert/aria-hide the whole shell\n // behind it (which leaves the still-focusable chrome inside an\n // aria-hidden region — an `aria-hidden-focus` violation).\n <DropdownMenu.Root modal={false}>\n <DropdownMenu.Trigger asChild>\n <button\n type=\"button\"\n aria-label={labels.accountMenu}\n data-testid=\"marketplace-account-trigger\"\n 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]\"\n >\n <Avatar name={user.name} src={user.avatarSrc} size=\"md\" />\n <span className=\"ds:hidden ds:sm:inline\">{user.name}</span>\n </button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"end\">\n <DropdownMenu.Label>\n <span className=\"ds:flex ds:flex-col\">\n <span className=\"ds:font-medium\">{user.name}</span>\n {user.email ? (\n <span className=\"ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]\">\n {user.email}\n </span>\n ) : null}\n </span>\n </DropdownMenu.Label>\n {onToggleFullscreen ? (\n <>\n <DropdownMenu.Separator />\n <DropdownMenu.Item\n onSelect={onToggleFullscreen}\n data-testid=\"marketplace-fullscreen\"\n >\n {fullscreenLabel}\n </DropdownMenu.Item>\n </>\n ) : null}\n <DropdownMenu.Separator />\n <DropdownMenu.Item\n onSelect={onSignOut}\n data-testid=\"marketplace-sign-out\"\n >\n {labels.signOut}\n </DropdownMenu.Item>\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n );\n}\n\nfunction MarketplaceSidebarNav({\n nav,\n renderLink,\n}: {\n nav: MarketplaceNavItem[];\n renderLink?: MarketplaceRenderLink;\n}) {\n return (\n <SidebarBody>\n {nav.map((item) => {\n const badge =\n typeof item.badgeCount === 'number' && item.badgeCount > 0\n ? item.badgeCount\n : undefined;\n const inner = (\n <>\n {item.icon ? <SidebarItemIcon>{item.icon}</SidebarItemIcon> : null}\n <SidebarItemLabel>{item.label}</SidebarItemLabel>\n {badge !== undefined ? (\n <SidebarItemBadge>{formatBadgeCount(badge)}</SidebarItemBadge>\n ) : null}\n </>\n );\n\n // Consumer-router mode: render the item through Radix `Slot`\n // (`SidebarItem asChild`) so the consumer's `<Link>` takes over the\n // anchor while keeping the kit's item styling + `aria-current=\"page\"`.\n // Clicking routes client-side — no full-page reload.\n if (renderLink) {\n return (\n <SidebarItem key={item.id} asChild isActive={item.isActive}>\n {renderLink({\n href: item.href,\n children: inner,\n 'aria-current': item.isActive ? 'page' : undefined,\n })}\n </SidebarItem>\n );\n }\n\n // Default: plain anchor — byte-identical to before when no per-item\n // `onClick` is supplied (it's omitted entirely, not passed as\n // undefined, so the rendered `<a>` is unchanged).\n return (\n <SidebarItem\n key={item.id}\n href={item.href}\n aria-label={item.label}\n isActive={item.isActive}\n {...(item.onClick ? { onClick: item.onClick } : {})}\n >\n {inner}\n </SidebarItem>\n );\n })}\n </SidebarBody>\n );\n}\n\n/* CVA for the chrome variant — drives the `<main>` surface; the structural\n header/sidebar-vs-tab-strip difference is conditional in the render.\n\n The `standalone` `<main>` gets its content inset from AppFrame's own\n `mainVariants({ padded: true })` (`--spacing-md` on every logical side), so\n this variant only carries the canvas colour there. The `embedded` `<main>`\n is a plain element (no AppFrame), so it has to supply its own inset:\n `--spacing-md` inline + block-end to match the standalone inset, and a\n larger `--spacing-lg` block-start so content clears the floating tab strip's\n pill instead of butting up against it. All logical — RTL mirrors for free. */\nconst shellMainVariants = cva('ds:bg-[color:var(--app-shell-background)]', {\n variants: {\n variant: {\n standalone: '',\n embedded: [\n 'ds:flex-1',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:pt-[var(--spacing-lg)] ds:pb-[var(--spacing-md)]',\n ].join(' '),\n },\n },\n defaultVariants: { variant: 'standalone' },\n});\n\n/**\n * Embedded chrome: the slim floating tab strip (no Header / Sidebar / account\n * menu) for apps running inside the AlfaDocs platform iframe. It's the shared\n * {@link TabBar} fed the shell's nav items — the platform brands and identifies\n * the session around the iframe, so the strip is the only chrome. The\n * `MarketplaceNavItem` shape is structurally a `TabBarItem`, so the nav passes\n * straight through.\n */\nfunction EmbeddedTabStrip({\n nav,\n ariaLabel,\n renderLink,\n}: {\n nav: MarketplaceNavItem[];\n ariaLabel: string;\n renderLink?: MarketplaceRenderLink;\n}) {\n // Adapt the shell's `renderLink` to TabBar's `renderLink` signature — TabBar\n // also offers the per-item `onClick`, but in consumer-router mode the\n // `<Link>` owns navigation (matching the standalone sidebar), so we forward\n // only `href` / `className` / `children` / `aria-current`. With `renderLink`\n // omitted, TabBar renders its own plain `<a href>` exactly as before, and a\n // per-item `onClick` rides through `nav` → `TabBarItem` untouched.\n const tabRenderLink = renderLink\n ? ({\n href,\n className,\n children,\n 'aria-current': ariaCurrent,\n }: {\n href: string;\n className: string;\n children: ReactNode;\n 'aria-current'?: 'page';\n }) =>\n renderLink({ href, className, children, 'aria-current': ariaCurrent })\n : undefined;\n\n return (\n <TabBar\n items={nav}\n ariaLabel={ariaLabel}\n {...(tabRenderLink ? { renderLink: tabRenderLink } : {})}\n />\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* MarketplaceAppShell */\n/* ------------------------------------------------------------------ */\n\nexport const MarketplaceAppShell = forwardRef<\n HTMLDivElement,\n MarketplaceAppShellProps\n>(\n (\n {\n productName,\n productHref = '/',\n nav,\n renderLink,\n user,\n labels,\n onSignOut,\n onToggleFullscreen,\n sidebarState,\n mainAriaLabel,\n variant = 'standalone',\n children,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n\n // The brand lockup as a consumer-router link: when `renderLink` is\n // supplied, the brand anchor routes client-side too (no session flash when\n // jumping home). The visible `productName` inside the monochrome lockup is\n // the link's accessible name, matching the default `HeaderBrand` anchor.\n const headerBrand = renderLink ? (\n <HeaderBrand asChild>\n {renderLink({\n href: productHref,\n children: <ProductLockup name={productName} size=\"md\" monochrome />,\n })}\n </HeaderBrand>\n ) : (\n <HeaderBrand\n href={productHref}\n logo={<ProductLockup name={productName} size=\"md\" monochrome />}\n />\n );\n\n // Mirror PatientShell: only wrap in a nested ThemeRoot when the user has an\n // explicit theme/accessibility override, so we don't clobber the consuming\n // app's (or Storybook's) outer theme cascade.\n const { theme: themePref, accessibility, resolvedTheme } = useTheme();\n const hasExplicitOverride =\n themePref !== 'system' || accessibility !== 'system';\n const themeBase = resolvedTheme.startsWith('dark') ? 'dark' : 'light';\n const themeAccessible = resolvedTheme.endsWith('-accessible');\n\n // Narrow-viewport overlay: HeaderMenuButton only renders below `md`.\n const [sidebarOpen, setSidebarOpen] = useState(false);\n\n const shell = (\n <TooltipProvider>\n <AppFrame\n mainAriaLabel={mainAriaLabel}\n mainClassName={shellMainVariants({ variant: 'standalone' })}\n header={\n <Header>\n <HeaderStart>\n <HeaderSkipLink href=\"#main-content\" />\n <HeaderMenuButton onMenuOpen={() => setSidebarOpen(true)} />\n {headerBrand}\n </HeaderStart>\n <HeaderCenter />\n <HeaderEnd>\n <HeaderSettings size=\"sm\" />\n <AccountMenu\n user={user}\n labels={labels}\n onSignOut={onSignOut}\n onToggleFullscreen={onToggleFullscreen}\n />\n </HeaderEnd>\n </Header>\n }\n sidebar={\n <Sidebar\n {...(sidebarState !== undefined\n ? { state: sidebarState }\n : { defaultState: 'expanded' as const })}\n open={sidebarOpen}\n onOpenChange={setSidebarOpen}\n aria-label={t('navigation.sidebar.label')}\n data-testid=\"marketplace-app-shell-sidebar\"\n >\n <MarketplaceSidebarNav nav={nav} renderLink={renderLink} />\n </Sidebar>\n }\n >\n {children}\n </AppFrame>\n </TooltipProvider>\n );\n\n const embedded = (\n // The shell owns the warm-grey canvas; TabBar's strip is transparent and\n // floats its pill on it, and `<main>` continues the same surface.\n <div className=\"ds:flex ds:min-h-dvh ds:flex-col ds:bg-[color:var(--app-shell-background)]\">\n <HeaderSkipLink href=\"#main-content\" />\n <EmbeddedTabStrip\n nav={nav}\n ariaLabel={t('navigation.sidebar.label')}\n renderLink={renderLink}\n />\n <main\n id=\"main-content\"\n tabIndex={-1}\n aria-label={\n mainAriaLabel ?? t('navigation.main.label', 'Main content')\n }\n className={shellMainVariants({ variant: 'embedded' })}\n >\n {children}\n </main>\n </div>\n );\n\n const content = variant === 'embedded' ? embedded : shell;\n\n if (!hasExplicitOverride) {\n return (\n <div\n ref={ref}\n className=\"ds:contents\"\n data-component=\"marketplace-app-shell\"\n >\n {content}\n </div>\n );\n }\n\n return (\n <ThemeRoot\n ref={ref}\n theme={themeBase}\n accessible={themeAccessible}\n className=\"ds:contents\"\n data-component=\"marketplace-app-shell\"\n >\n {content}\n </ThemeRoot>\n );\n },\n);\n\nMarketplaceAppShell.displayName = 'MarketplaceAppShell';\n\n/* ------------------------------------------------------------------ */\n/* ConnectWithAlfadocs */\n/* ------------------------------------------------------------------ */\n\nexport type ConnectStatus = 'idle' | 'connecting' | 'error';\n\nexport interface ConnectWithAlfadocsProps {\n /** Product name shown next to the wordmark at the top of the card. */\n productName: string;\n /** Heading, e.g. \"Connect your AlfaDocs account\". */\n title: string;\n /** Supporting copy below the heading. */\n description: ReactNode;\n /** The connect button label, e.g. \"Connect with AlfaDocs\". */\n connectLabel: string;\n /** Connection lifecycle. `connecting` shows a loading button; `error` shows the alert. */\n status?: ConnectStatus;\n /** Error message shown (as an alert) when `status === 'error'`. */\n error?: ReactNode;\n /** Fires when the connect button is pressed. Wire to `useAlfadocsAuth().connect`. */\n onConnect?: () => void;\n /** Optional footer content below the button (e.g. a \"what's this?\" link). */\n footer?: ReactNode;\n /**\n * Visual layout. `'card'` (default) is the centred card on the warm-grey\n * canvas — unchanged. `'split'` adds, at `lg:` and up, a two-panel desktop\n * layout: a brand panel on the inline-start and the connect card on the\n * inline-end. Below `lg:`, `'split'` collapses to exactly the card layout —\n * so it falls back gracefully inside iframes / embeds that never reach\n * desktop width. Use `'split'` for full-page desktop logins.\n */\n layout?: 'card' | 'split';\n /**\n * Optional content shown under the lockup in the `'split'` brand panel (a\n * tagline, value props, an illustration). Ignored in `'card'` and below `lg:`.\n */\n brandPanel?: ReactNode;\n className?: string;\n}\n\n/* Split-layout CVAs (lg+ two-panel; collapses to the centred card below lg). */\nconst connectRootVariants = cva(\n 'ds:flex ds:min-h-dvh ds:bg-[color:var(--app-shell-background)]',\n {\n variants: {\n layout: {\n card: '',\n split: 'ds:flex-col ds:lg:flex-row',\n },\n },\n defaultVariants: { layout: 'card' },\n },\n);\n\nconst connectCardWidthVariants = cva('ds:w-full', {\n variants: {\n layout: {\n card: 'ds:max-w-[400px]',\n split: 'ds:max-w-[400px] ds:lg:max-w-[480px]',\n },\n },\n defaultVariants: { layout: 'card' },\n});\n\n// The card's own lockup hides at lg+ in `split` (the brand panel shows it there).\nconst connectCardLockupVariants = cva('', {\n variants: {\n layout: { card: '', split: 'ds:lg:hidden' },\n },\n defaultVariants: { layout: 'card' },\n});\n\n/**\n * The pre-auth \"Connect with AlfaDocs\" screen. Centred white card on the\n * warm-grey canvas with the AlfaDocs wordmark + product name, copy, an error\n * slot, and the primary connect CTA. An opt-in `layout=\"split\"` adds a desktop\n * two-panel brand layout (lg+). Presentational — `onConnect` should call\n * `useAlfadocsAuth().connect()`, which redirects the browser to the server-side\n * BFF that runs the real OAuth2 + PKCE flow.\n */\nexport const ConnectWithAlfadocs = forwardRef<\n HTMLDivElement,\n ConnectWithAlfadocsProps\n>(\n (\n {\n productName,\n title,\n description,\n connectLabel,\n status = 'idle',\n error,\n onConnect,\n footer,\n layout = 'card',\n brandPanel,\n className,\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n data-component=\"connect-with-alfadocs\"\n className={`${connectRootVariants({ layout })} ${className ?? ''}`}\n >\n {layout === 'split' ? (\n // Desktop brand panel (lg+ only): a bold `--primary` surface with the\n // monochrome lockup riding the `--primary-foreground` ink, plus an\n // optional `brandPanel` slot. Decorative — the card carries the real\n // heading + CTA, and shows its own lockup below `lg:`.\n <div className=\"ds:hidden ds:lg:flex ds:lg:w-[55%] ds:flex-col ds:items-center ds:justify-center ds:gap-[var(--spacing-lg)] ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:ps-[var(--spacing-2xl)] ds:pe-[var(--spacing-2xl)] ds:pt-[var(--spacing-2xl)] ds:pb-[var(--spacing-2xl)] ds:text-start\">\n <ProductLockup\n name={productName}\n size=\"lg\"\n monochrome\n tone=\"inherit\"\n />\n {brandPanel ? (\n <div className=\"type-body ds:max-w-[28rem] ds:text-start\">\n {brandPanel}\n </div>\n ) : null}\n </div>\n ) : null}\n <div className=\"ds:flex ds:flex-1 ds:items-center ds:justify-center ds:p-[var(--spacing-lg)]\">\n <Card className={connectCardWidthVariants({ layout })}>\n <Card.Body className=\"ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-lg)] ds:text-center\">\n <ProductLockup\n name={productName}\n size=\"lg\"\n className={connectCardLockupVariants({ layout })}\n />\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <h1 className=\"type-title-card\">{title}</h1>\n <p className=\"type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {description}\n </p>\n </div>\n {status === 'error' && error ? (\n <Alert variant=\"error\" className=\"ds:w-full ds:text-start\">\n {error}\n </Alert>\n ) : null}\n <SignInWithAlfadocsButton\n intent=\"primary\"\n className=\"ds:w-full\"\n loading={status === 'connecting'}\n onClick={onConnect}\n label={connectLabel}\n data-testid=\"connect-with-alfadocs-button\"\n />\n {footer ? (\n <div className=\"type-meta ds:text-[color:var(--muted-foreground)]\">\n {footer}\n </div>\n ) : null}\n </Card.Body>\n </Card>\n </div>\n </div>\n );\n },\n);\n\nConnectWithAlfadocs.displayName = 'ConnectWithAlfadocs';\n"],"names":["lockup","cva","productName","ProductLockup","forwardRef","name","monochrome","tone","size","className","props","ref","jsxs","jsx","Logo","formatBadgeCount","count","AccountMenu","user","labels","onSignOut","onToggleFullscreen","t","useTranslation","fullscreenLabel","DropdownMenu","Avatar","Fragment","MarketplaceSidebarNav","nav","renderLink","SidebarBody","item","badge","inner","SidebarItemIcon","SidebarItemLabel","SidebarItemBadge","SidebarItem","shellMainVariants","EmbeddedTabStrip","ariaLabel","tabRenderLink","href","children","ariaCurrent","TabBar","MarketplaceAppShell","productHref","sidebarState","mainAriaLabel","variant","headerBrand","HeaderBrand","themePref","accessibility","resolvedTheme","useTheme","hasExplicitOverride","themeBase","themeAccessible","sidebarOpen","setSidebarOpen","useState","shell","TooltipProvider","AppFrame","Header","HeaderStart","HeaderSkipLink","HeaderMenuButton","HeaderCenter","HeaderEnd","HeaderSettings","Sidebar","embedded","content","ThemeRoot","connectRootVariants","connectCardWidthVariants","connectCardLockupVariants","ConnectWithAlfadocs","title","description","connectLabel","status","error","onConnect","footer","layout","brandPanel","Card","Alert","SignInWithAlfadocsButton"],"mappings":";;;;;;;;;;;;;;;;;;AAWA,MAAMA,KAASC,EAAI,2DAA2D,GAQxEC,KAAcD;AAAA,EAClB;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,MAEN,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,QAKJ,UAAU;AAAA,UACR;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA;AAAA;AAAA;AAAA,QAKF,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,iBAAiB,EAAE,MAAM,MAAM,MAAM,WAAA;AAAA,EAAW;AAEpD,GAmDaE,IAAgBC;AAAA,EAC3B,CACE;AAAA,IACE,MAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,MAAAC,IAAO;AAAA,IACP,MAAAC,IAAO;AAAA,IACP,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MASE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,MAAK;AAAA,MACL,cAAY,YAAYN,CAAI,GAAG,KAAA;AAAA,MAC/B,WAAWL,GAAO,EAAE,WAAAS,GAAW;AAAA,MAC/B,kBAAe;AAAA,MACd,GAAGC;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAG;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,SAASR,IA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