@alfadocs/ui-kit 0.52.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 (80) hide show
  1. package/dist/_chunks/{otp-input-CMphfBxZ.js → otp-input-Chb9r5vf.js} +89 -87
  2. package/dist/_chunks/{public-header.agent-BY6FH71R.js → public-header.agent-DyVpPwmv.js} +72 -62
  3. package/dist/_chunks/{sign-document-Bzld9jVM.js → sign-document-BzHTjMVC.js} +2 -2
  4. package/dist/_chunks/{signature-capture-CpMBhqQ9.js → signature-capture-CHbrKoA_.js} +163 -152
  5. package/dist/_chunks/signature-field-DhscKdgk.js +152 -0
  6. package/dist/_chunks/use-signing-session-C5evzYmo.js +108 -0
  7. package/dist/agent-catalog.json +1 -1
  8. package/dist/components/index.d.ts +3 -2
  9. package/dist/components/otp-input/index.js +1 -1
  10. package/dist/components/otp-input/otp-input.d.ts +6 -0
  11. package/dist/components/pdf-viewer/index.d.ts +1 -1
  12. package/dist/components/public-header/index.js +1 -1
  13. package/dist/components/public-header/public-header.d.ts +1 -1
  14. package/dist/components/sign-document/index.js +1 -1
  15. package/dist/components/signature-capture/index.js +1 -1
  16. package/dist/components/signature-capture/signature-capture.d.ts +7 -0
  17. package/dist/components/signature-field/index.d.ts +3 -0
  18. package/dist/components/signature-field/index.js +6 -0
  19. package/dist/components/signature-field/signature-field.d.ts +35 -0
  20. package/dist/hooks/index.d.ts +1 -0
  21. package/dist/hooks/index.js +42 -41
  22. package/dist/hooks/use-signing-session.d.ts +36 -0
  23. package/dist/i18n/locales/ar.d.ts +8 -0
  24. package/dist/i18n/locales/ar.js +8 -0
  25. package/dist/i18n/locales/de.d.ts +8 -0
  26. package/dist/i18n/locales/de.js +8 -0
  27. package/dist/i18n/locales/el.d.ts +8 -0
  28. package/dist/i18n/locales/el.js +8 -0
  29. package/dist/i18n/locales/en.d.ts +8 -0
  30. package/dist/i18n/locales/en.js +8 -0
  31. package/dist/i18n/locales/es.d.ts +8 -0
  32. package/dist/i18n/locales/es.js +8 -0
  33. package/dist/i18n/locales/fr.d.ts +8 -0
  34. package/dist/i18n/locales/fr.js +8 -0
  35. package/dist/i18n/locales/hi.d.ts +8 -0
  36. package/dist/i18n/locales/hi.js +8 -0
  37. package/dist/i18n/locales/it.d.ts +8 -0
  38. package/dist/i18n/locales/it.js +8 -0
  39. package/dist/i18n/locales/ja.d.ts +8 -0
  40. package/dist/i18n/locales/ja.js +8 -0
  41. package/dist/i18n/locales/nl.d.ts +8 -0
  42. package/dist/i18n/locales/nl.js +8 -0
  43. package/dist/i18n/locales/pl.d.ts +8 -0
  44. package/dist/i18n/locales/pl.js +8 -0
  45. package/dist/i18n/locales/pt.d.ts +8 -0
  46. package/dist/i18n/locales/pt.js +8 -0
  47. package/dist/i18n/locales/ro.d.ts +8 -0
  48. package/dist/i18n/locales/ro.js +8 -0
  49. package/dist/i18n/locales/ru.d.ts +8 -0
  50. package/dist/i18n/locales/ru.js +8 -0
  51. package/dist/i18n/locales/sq.d.ts +8 -0
  52. package/dist/i18n/locales/sq.js +8 -0
  53. package/dist/i18n/locales/sv.d.ts +8 -0
  54. package/dist/i18n/locales/sv.js +8 -0
  55. package/dist/i18n/locales/tr.d.ts +8 -0
  56. package/dist/i18n/locales/tr.js +8 -0
  57. package/dist/i18n/locales/zh.d.ts +8 -0
  58. package/dist/i18n/locales/zh.js +8 -0
  59. package/dist/index.js +701 -697
  60. package/dist/locales/ar.json +8 -0
  61. package/dist/locales/de.json +8 -0
  62. package/dist/locales/el.json +8 -0
  63. package/dist/locales/en.json +8 -0
  64. package/dist/locales/es.json +8 -0
  65. package/dist/locales/fr.json +8 -0
  66. package/dist/locales/hi.json +8 -0
  67. package/dist/locales/it.json +8 -0
  68. package/dist/locales/ja.json +8 -0
  69. package/dist/locales/nl.json +8 -0
  70. package/dist/locales/pl.json +8 -0
  71. package/dist/locales/pt.json +8 -0
  72. package/dist/locales/ro.json +8 -0
  73. package/dist/locales/ru.json +8 -0
  74. package/dist/locales/sq.json +8 -0
  75. package/dist/locales/sv.json +8 -0
  76. package/dist/locales/tr.json +8 -0
  77. package/dist/locales/zh.json +8 -0
  78. package/dist/tokens.css +1 -1
  79. package/package.json +5 -1
  80. package/dist/_chunks/use-scroll-to-first-error-4Za-u5Nw.js +0 -43
@@ -1,12 +1,12 @@
1
- import { jsxs as x, jsx as R } from "react/jsx-runtime";
2
- import { forwardRef as ee, useId as te, useRef as M, useState as se, useEffect as re, useCallback as N, useMemo as ae, useImperativeHandle as oe } from "react";
3
- import { c as O } from "./index-D2ZczOXr.js";
4
- import { useTranslation as ie } from "react-i18next";
5
- import { u as ne } from "./use-controllable-state-BiY4xTzM.js";
6
- import { u as ce } from "./use-web-otp-D_utzp6S.js";
7
- import { u as ue } from "./form-field-context-B3APVHKx.js";
8
- import { u as le } from "./registry-nPAVE19X.js";
9
- const de = {
1
+ import { jsxs as ee, jsx as y } from "react/jsx-runtime";
2
+ import { forwardRef as te, useId as re, useRef as M, useState as se, useEffect as ae, useCallback as N, useMemo as oe, useImperativeHandle as ie } from "react";
3
+ import { c as S } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as ne } from "react-i18next";
5
+ import { u as ce } from "./use-controllable-state-BiY4xTzM.js";
6
+ import { u as ue } from "./use-web-otp-D_utzp6S.js";
7
+ import { u as le } from "./form-field-context-B3APVHKx.js";
8
+ import { u as de } from "./registry-nPAVE19X.js";
9
+ const pe = {
10
10
  id: "otp-input",
11
11
  capabilities: ["edit_inline", "submit"],
12
12
  state: {
@@ -62,7 +62,7 @@ const de = {
62
62
  description: "Sourced from the id prop."
63
63
  }
64
64
  }
65
- }, pe = O("ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]"), fe = O(
65
+ }, fe = S("ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]"), me = S(
66
66
  [
67
67
  "ds:w-[var(--min-target-size)] ds:h-[var(--min-target-size)]",
68
68
  "ds:rounded-[var(--radius-sm)]",
@@ -86,95 +86,96 @@ const de = {
86
86
  function F(e) {
87
87
  return e.replace(/[\u0660-\u0669]/g, (a) => String(a.charCodeAt(0) - 1632)).replace(/[\u06F0-\u06F9]/g, (a) => String(a.charCodeAt(0) - 1776));
88
88
  }
89
- function y(e, a) {
89
+ function w(e, a) {
90
90
  return F(e).replace(/\D/g, "").slice(0, a);
91
91
  }
92
- function me(e, a) {
93
- const m = y(e, a), l = new Array(a).fill("");
92
+ function ve(e, a) {
93
+ const m = w(e, a), l = new Array(a).fill("");
94
94
  for (let n = 0; n < m.length; n += 1)
95
95
  l[n] = m[n];
96
96
  return l;
97
97
  }
98
- const ve = ee(
98
+ const be = te(
99
99
  ({
100
100
  length: e = 6,
101
101
  value: a,
102
102
  defaultValue: m,
103
103
  onChange: l,
104
104
  onComplete: n,
105
- disabled: S,
106
- error: H,
107
- label: w,
105
+ disabled: H,
106
+ error: $,
107
+ label: I,
108
108
  id: K,
109
- className: $,
110
- webOtp: j = !1
111
- }, z) => {
112
- const { t: W } = ie(), v = ue(), _ = te(), C = w ? _ : void 0, [q, P] = ne({
109
+ className: j,
110
+ webOtp: z = !1,
111
+ name: C
112
+ }, W) => {
113
+ const { t: _ } = ne(), v = le(), q = re(), O = I ? q : void 0, [G, P] = ce({
113
114
  value: a,
114
- defaultValue: y(m ?? "", e)
115
- }), p = y(q ?? "", e), G = me(p, e), b = v.disabled || !!S, B = v.invalid || !!H, J = B ? "error" : "default", E = M([]), I = M(p.length === e), d = M(p);
115
+ defaultValue: w(m ?? "", e)
116
+ }), p = w(G ?? "", e), J = ve(p, e), b = v.disabled || !!H, B = v.invalid || !!$, Q = B ? "error" : "default", E = M([]), h = M(p.length === e), d = M(p);
116
117
  d.current = p;
117
- const Q = () => {
118
- const s = p.length;
119
- return s >= e ? e - 1 : s;
120
- }, [f, h] = se(Q);
121
- re(() => {
122
- f >= e && h(e - 1);
118
+ const U = () => {
119
+ const r = p.length;
120
+ return r >= e ? e - 1 : r;
121
+ }, [f, k] = se(U);
122
+ ae(() => {
123
+ f >= e && k(e - 1);
123
124
  }, [f, e]);
124
125
  const c = N(
125
- (s) => {
126
- const t = Math.max(0, Math.min(e - 1, s));
127
- h(t);
128
- const r = E.current[t];
129
- r && (r.focus(), r.select());
126
+ (r) => {
127
+ const t = Math.max(0, Math.min(e - 1, r));
128
+ k(t);
129
+ const s = E.current[t];
130
+ s && (s.focus(), s.select());
130
131
  },
131
132
  [e]
132
133
  ), u = N(
133
- (s) => {
134
- const t = y(s, e);
135
- P(t), d.current = t, l == null || l(t), t.length === e ? I.current || (I.current = !0, n == null || n(t)) : I.current = !1;
134
+ (r) => {
135
+ const t = w(r, e);
136
+ P(t), d.current = t, l == null || l(t), t.length === e ? h.current || (h.current = !0, n == null || n(t)) : h.current = !1;
136
137
  },
137
138
  [P, e, l, n]
138
139
  );
139
- ce({
140
- enabled: j && !b,
140
+ ue({
141
+ enabled: z && !b,
141
142
  onCode: u
142
143
  });
143
- const U = (s) => (t) => {
144
- const r = t.target.value, o = F(r).replace(/\D/g, ""), i = d.current;
144
+ const X = (r) => (t) => {
145
+ const s = t.target.value, o = F(s).replace(/\D/g, ""), i = d.current;
145
146
  if (o.length === 0) {
146
- if (r === "" && s < i.length) {
147
- const A = i.slice(0, s) + i.slice(s + 1);
148
- u(A);
147
+ if (s === "" && r < i.length) {
148
+ const R = i.slice(0, r) + i.slice(r + 1);
149
+ u(R);
149
150
  }
150
151
  return;
151
152
  }
152
- const g = i.slice(0, s), V = i.slice(s + o.length), D = (g + o + V).slice(0, e);
153
- u(D);
154
- const T = Math.min(s + o.length, e - 1);
155
- c(T);
156
- }, X = (s) => (t) => {
157
- const r = d.current;
153
+ const g = i.slice(0, r), D = i.slice(r + o.length), T = (g + o + D).slice(0, e);
154
+ u(T);
155
+ const A = Math.min(r + o.length, e - 1);
156
+ c(A);
157
+ }, Y = (r) => (t) => {
158
+ const s = d.current;
158
159
  if (t.key === "Backspace") {
159
- if (r[s]) {
160
+ if (s[r]) {
160
161
  t.preventDefault();
161
- const o = r.slice(0, s) + r.slice(s + 1);
162
+ const o = s.slice(0, r) + s.slice(r + 1);
162
163
  u(o);
163
164
  return;
164
165
  }
165
- if (s > 0) {
166
+ if (r > 0) {
166
167
  t.preventDefault();
167
- const o = r.slice(0, s - 1) + r.slice(s);
168
- u(o), c(s - 1);
168
+ const o = s.slice(0, r - 1) + s.slice(r);
169
+ u(o), c(r - 1);
169
170
  }
170
171
  return;
171
172
  }
172
173
  if (t.key === "ArrowLeft") {
173
- t.preventDefault(), s > 0 && c(s - 1);
174
+ t.preventDefault(), r > 0 && c(r - 1);
174
175
  return;
175
176
  }
176
177
  if (t.key === "ArrowRight") {
177
- t.preventDefault(), s < e - 1 && c(s + 1);
178
+ t.preventDefault(), r < e - 1 && c(r + 1);
178
179
  return;
179
180
  }
180
181
  if (t.key === "Home") {
@@ -182,51 +183,51 @@ const ve = ee(
182
183
  return;
183
184
  }
184
185
  t.key === "End" && (t.preventDefault(), c(e - 1));
185
- }, Y = (s) => (t) => {
186
+ }, Z = (r) => (t) => {
186
187
  const o = t.clipboardData.getData("text").replace(/\s+/g, ""), i = F(o);
187
188
  if (!/^[0-9]+$/.test(i)) return;
188
189
  t.preventDefault();
189
- const g = d.current, V = g.slice(0, s), D = g.slice(s + i.length), T = (V + i + D).slice(0, e);
190
- u(T);
191
- const A = Math.min(s + i.length, e - 1);
192
- c(A);
193
- }, Z = (s) => (t) => {
194
- h(s), t.currentTarget.select();
195
- }, L = v.id, k = ae(
190
+ const g = d.current, D = g.slice(0, r), T = g.slice(r + i.length), A = (D + i + T).slice(0, e);
191
+ u(A);
192
+ const R = Math.min(r + i.length, e - 1);
193
+ c(R);
194
+ }, x = (r) => (t) => {
195
+ k(r), t.currentTarget.select();
196
+ }, L = v.id, V = oe(
196
197
  () => ({
197
198
  getValue: () => d.current,
198
- setValue: (s) => u(s),
199
+ setValue: (r) => u(r),
199
200
  clear: () => u(""),
200
201
  focus: () => c(f),
201
202
  isComplete: () => d.current.length === e
202
203
  }),
203
204
  [u, c, f, e]
204
205
  );
205
- return le(de, k, K), oe(z, () => k, [k]), /* @__PURE__ */ x("div", { className: pe({ className: $ }), children: [
206
- w ? /* @__PURE__ */ R(
206
+ return de(pe, V, K), ie(W, () => V, [V]), /* @__PURE__ */ ee("div", { className: fe({ className: j }), children: [
207
+ I ? /* @__PURE__ */ y(
207
208
  "label",
208
209
  {
209
- id: C,
210
+ id: O,
210
211
  htmlFor: `${L}-0`,
211
212
  className: "type-label ds:text-foreground",
212
- children: w
213
+ children: I
213
214
  }
214
215
  ) : null,
215
- /* @__PURE__ */ R(
216
+ /* @__PURE__ */ y(
216
217
  "div",
217
218
  {
218
219
  role: "group",
219
220
  dir: "ltr",
220
- "aria-labelledby": C,
221
+ "aria-labelledby": O,
221
222
  "aria-invalid": B || void 0,
222
223
  "aria-describedby": v.describedBy || void 0,
223
224
  "aria-disabled": b || void 0,
224
225
  "data-component": "otp-input",
225
226
  "data-component-id": K,
226
227
  className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]",
227
- children: G.map((s, t) => {
228
- const r = !b && t === f;
229
- return /* @__PURE__ */ R(
228
+ children: J.map((r, t) => {
229
+ const s = !b && t === f;
230
+ return /* @__PURE__ */ y(
230
231
  "input",
231
232
  {
232
233
  ref: (o) => {
@@ -238,29 +239,30 @@ const ve = ee(
238
239
  pattern: "[0-9]*",
239
240
  autoComplete: t === 0 ? "one-time-code" : "off",
240
241
  maxLength: 1,
241
- value: s,
242
+ value: r,
242
243
  disabled: b,
243
- tabIndex: r ? 0 : -1,
244
- "aria-label": W("inputs.otp.digitLabel", {
244
+ tabIndex: s ? 0 : -1,
245
+ "aria-label": _("inputs.otp.digitLabel", {
245
246
  current: t + 1,
246
247
  total: e
247
248
  }),
248
- onChange: U(t),
249
- onKeyDown: X(t),
250
- onPaste: Y(t),
251
- onFocus: Z(t),
252
- className: fe({ tone: J })
249
+ onChange: X(t),
250
+ onKeyDown: Y(t),
251
+ onPaste: Z(t),
252
+ onFocus: x(t),
253
+ className: me({ tone: Q })
253
254
  },
254
255
  t
255
256
  );
256
257
  })
257
258
  }
258
- )
259
+ ),
260
+ C ? /* @__PURE__ */ y("input", { type: "hidden", name: C, value: p, readOnly: !0 }) : null
259
261
  ] });
260
262
  }
261
263
  );
262
- ve.displayName = "OTPInput";
264
+ be.displayName = "OTPInput";
263
265
  export {
264
- ve as O
266
+ be as O
265
267
  };
266
- //# sourceMappingURL=otp-input-CMphfBxZ.js.map
268
+ //# sourceMappingURL=otp-input-Chb9r5vf.js.map
@@ -1,4 +1,4 @@
1
- import { jsx as s, jsxs as i, Fragment as _ } from "react/jsx-runtime";
1
+ import { jsx as s, jsxs as t, Fragment as _ } from "react/jsx-runtime";
2
2
  import { forwardRef as h, useId as Q, useState as y, useCallback as M, useImperativeHandle as U, useContext as N, useEffect as B, useRef as D, createContext as Z } from "react";
3
3
  import { c as C } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as ss } from "react-i18next";
@@ -8,7 +8,7 @@ import { S as f } from "./sheet-xbzu4YiY.js";
8
8
  import { C as I } from "./chevron-down-BX_NP2Yh.js";
9
9
  import { X as ds } from "./x-CCcI3eJp.js";
10
10
  import { M as as } from "./menu-XRhW3_99.js";
11
- const g = Z("desktop"), ns = C(
11
+ const g = Z("desktop"), rs = C(
12
12
  [
13
13
  "ds:w-full ds:z-[var(--z-sticky)]",
14
14
  "ds:transition-[background-color,box-shadow,transform] ds:duration-[var(--animation-duration)]",
@@ -48,6 +48,16 @@ const g = Z("desktop"), ns = C(
48
48
  "ds:h-14 ds:md:h-16",
49
49
  "theme-dark ds:bg-[var(--background)] ds:text-[var(--foreground)]"
50
50
  ].join(" "),
51
+ // brand: on-primary bar for public signer/marketing surfaces —
52
+ // e.g. sign.alfadocs.com signing nav. Tokens only; logo should be
53
+ // <Logo variant="monochrome" tone="inherit" /> to read on the
54
+ // primary fill.
55
+ brand: [
56
+ "ds:flex ds:items-center ds:gap-[var(--spacing-md)]",
57
+ "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:sm:ps-[var(--spacing-lg)] ds:sm:pe-[var(--spacing-lg)]",
58
+ "ds:h-14 ds:md:h-16",
59
+ "ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]"
60
+ ].join(" "),
51
61
  // `pill` matches alfadocs.com's floating rounded-pill header.
52
62
  // The outer header is fully transparent (no border, no bg) and
53
63
  // simply provides a top-side gutter so the inner container reads
@@ -73,7 +83,7 @@ const g = Z("desktop"), ns = C(
73
83
  },
74
84
  defaultVariants: { variant: "pill", sticky: "none" }
75
85
  }
76
- ), rs = [
86
+ ), ns = [
77
87
  "ds:flex ds:items-center ds:gap-[var(--spacing-md)]",
78
88
  "ds:w-full ds:max-w-[1400px] ds:mx-auto",
79
89
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:sm:ps-[var(--spacing-lg)] ds:sm:pe-[var(--spacing-lg)]",
@@ -108,7 +118,7 @@ const g = Z("desktop"), ns = C(
108
118
  "ds:data-[active=true]:text-[var(--primary)]",
109
119
  "ds:data-[active=true]:[box-shadow:inset_0_-2px_0_var(--primary)]"
110
120
  ].join(" ")
111
- ), ts = [
121
+ ), is = [
112
122
  "ds:group ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
113
123
  "type-body-sm ds:font-medium",
114
124
  // Mirror the navLinkVariants colour + inline padding so triggers and
@@ -122,7 +132,7 @@ const g = Z("desktop"), ns = C(
122
132
  "ds:hover:text-[var(--primary)]",
123
133
  "ds:data-[state=open]:text-[var(--primary)]",
124
134
  "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
125
- ].join(" "), is = [
135
+ ].join(" "), ts = [
126
136
  "ds:size-3 ds:shrink-0",
127
137
  "ds:transition-transform ds:duration-[var(--animation-duration)]",
128
138
  "ds:group-data-[state=open]:rotate-180",
@@ -199,21 +209,21 @@ const g = Z("desktop"), ns = C(
199
209
  "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
200
210
  ].join(" ");
201
211
  function ps() {
202
- const [e, n] = y(() => typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches);
212
+ const [e, r] = y(() => typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches);
203
213
  return B(() => {
204
214
  if (typeof window > "u" || !window.matchMedia) return;
205
- const d = window.matchMedia("(prefers-reduced-motion: reduce)"), a = () => n(d.matches);
215
+ const d = window.matchMedia("(prefers-reduced-motion: reduce)"), a = () => r(d.matches);
206
216
  return d.addEventListener("change", a), () => d.removeEventListener("change", a);
207
217
  }, []), e;
208
218
  }
209
- function vs(e, n, d) {
210
- const [a, t] = y(!1), [r, o] = y(!1), c = D(0), p = D(!1);
219
+ function vs(e, r, d) {
220
+ const [a, i] = y(!1), [n, o] = y(!1), c = D(0), p = D(!1);
211
221
  return B(() => {
212
222
  if (!e || typeof window > "u") return;
213
223
  c.current = window.scrollY;
214
224
  const l = () => {
215
225
  const v = window.scrollY;
216
- if (t(v > d), n === "scroll-up") {
226
+ if (i(v > d), r === "scroll-up") {
217
227
  const b = v - c.current;
218
228
  b > 4 && v > d ? o(!0) : (b < -4 || v <= d) && o(!1);
219
229
  }
@@ -224,44 +234,44 @@ function vs(e, n, d) {
224
234
  return window.addEventListener("scroll", u, { passive: !0 }), l(), () => {
225
235
  window.removeEventListener("scroll", u);
226
236
  };
227
- }, [e, n, d]), { stuck: a, hidden: r };
237
+ }, [e, r, d]), { stuck: a, hidden: n };
228
238
  }
229
239
  function R({
230
240
  logo: e,
231
- homeHref: n,
241
+ homeHref: r,
232
242
  resolvedHomeLabel: d,
233
243
  resolvedNavLabel: a,
234
- resolvedMenuLabel: t,
235
- navSlot: r,
244
+ resolvedMenuLabel: i,
245
+ navSlot: n,
236
246
  actionsSlot: o,
237
247
  menuOpen: c,
238
248
  setMenuOpen: p,
239
249
  sheetId: l
240
250
  }) {
241
- return /* @__PURE__ */ i(_, { children: [
251
+ return /* @__PURE__ */ t(_, { children: [
242
252
  /* @__PURE__ */ s(
243
253
  "a",
244
254
  {
245
- href: n,
255
+ href: r,
246
256
  "aria-label": d,
247
257
  className: "ds:inline-flex ds:items-center ds:rounded-[var(--radius-sm)] ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
248
258
  children: e
249
259
  }
250
260
  ),
251
- r ? /* @__PURE__ */ s(g.Provider, { value: "desktop", children: /* @__PURE__ */ i(
261
+ n ? /* @__PURE__ */ s(g.Provider, { value: "desktop", children: /* @__PURE__ */ t(
252
262
  m.Root,
253
263
  {
254
264
  "aria-label": a,
255
265
  className: "ds:hidden ds:md:flex ds:relative ds:items-center ds:ms-[var(--spacing-lg)] ds:flex-1 ds:[&>div:first-of-type]:flex ds:[&>div:first-of-type]:flex-1",
256
266
  delayDuration: 150,
257
267
  children: [
258
- /* @__PURE__ */ s(m.List, { className: "ds:flex ds:flex-1 ds:items-center ds:justify-center ds:gap-[var(--spacing-md)] ds:list-none ds:m-0 ds:ps-0", children: r }),
268
+ /* @__PURE__ */ s(m.List, { className: "ds:flex ds:flex-1 ds:items-center ds:justify-center ds:gap-[var(--spacing-md)] ds:list-none ds:m-0 ds:ps-0", children: n }),
259
269
  /* @__PURE__ */ s("div", { className: "ds:absolute ds:top-full ds:start-0 ds:end-0 ds:flex ds:justify-center ds:pointer-events-none", children: /* @__PURE__ */ s("div", { className: "ds:pointer-events-auto", children: /* @__PURE__ */ s(m.Viewport, { className: ls }) }) })
260
270
  ]
261
271
  }
262
272
  ) }) : null,
263
273
  o ? /* @__PURE__ */ s("div", { className: "ds:hidden ds:md:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:ms-auto", children: o }) : null,
264
- /* @__PURE__ */ i(f, { open: c, onOpenChange: p, children: [
274
+ /* @__PURE__ */ t(f, { open: c, onOpenChange: p, children: [
265
275
  /* @__PURE__ */ s(f.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
266
276
  es,
267
277
  {
@@ -271,19 +281,19 @@ function R({
271
281
  icon: c ? /* @__PURE__ */ s(ds, { "aria-hidden": "true" }) : /* @__PURE__ */ s(as, { "aria-hidden": "true" }),
272
282
  "aria-controls": l,
273
283
  "aria-expanded": c,
274
- "aria-label": t
284
+ "aria-label": i
275
285
  }
276
286
  ) }),
277
- /* @__PURE__ */ i(f.Content, { side: "end", size: "md", id: l, children: [
287
+ /* @__PURE__ */ t(f.Content, { side: "end", size: "md", id: l, children: [
278
288
  /* @__PURE__ */ s(f.Header, { children: /* @__PURE__ */ s(f.Title, { children: a }) }),
279
- /* @__PURE__ */ s(f.Body, { children: /* @__PURE__ */ i("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
280
- r ? /* @__PURE__ */ s(g.Provider, { value: "mobile", children: /* @__PURE__ */ s(
289
+ /* @__PURE__ */ s(f.Body, { children: /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
290
+ n ? /* @__PURE__ */ s(g.Provider, { value: "mobile", children: /* @__PURE__ */ s(
281
291
  "nav",
282
292
  {
283
293
  "aria-label": a,
284
294
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
285
295
  "data-mobile-nav": "true",
286
- children: r
296
+ children: n
287
297
  }
288
298
  ) }) : null,
289
299
  o ? /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:mt-[var(--spacing-md)]", children: o }) : null
@@ -295,11 +305,11 @@ function R({
295
305
  const E = h(
296
306
  ({
297
307
  logo: e,
298
- homeHref: n = "/",
308
+ homeHref: r = "/",
299
309
  homeLabel: d,
300
310
  navSlot: a,
301
- actionsSlot: t,
302
- variant: r = "pill",
311
+ actionsSlot: i,
312
+ variant: n = "pill",
303
313
  sticky: o = "none",
304
314
  stickyOffset: c = 80,
305
315
  menuLabel: p,
@@ -308,7 +318,7 @@ const E = h(
308
318
  className: v,
309
319
  ...b
310
320
  }, A) => {
311
- const { t: x } = ss(), j = ps(), Y = Q(), q = `${u ?? Y}-sheet`, [w, k] = y(!1), F = r === "transparent" || o === "scroll-up", { stuck: W, hidden: X } = vs(
321
+ const { t: x } = ss(), j = ps(), Y = Q(), q = `${u ?? Y}-sheet`, [w, k] = y(!1), F = n === "transparent" || o === "scroll-up", { stuck: W, hidden: X } = vs(
312
322
  F,
313
323
  o,
314
324
  c
@@ -324,12 +334,12 @@ const E = h(
324
334
  );
325
335
  const G = d ?? x("publicHeader.homeLabel", "AlfaDocs — home"), J = l ?? x("publicHeader.primaryNavLabel", "Primary"), K = p ?? (w ? x("publicHeader.closeMenu", "Close menu") : x("publicHeader.openMenu", "Open menu")), P = {
326
336
  logo: e,
327
- homeHref: n,
337
+ homeHref: r,
328
338
  resolvedHomeLabel: G,
329
339
  resolvedNavLabel: J,
330
340
  resolvedMenuLabel: K,
331
341
  navSlot: a,
332
- actionsSlot: t,
342
+ actionsSlot: i,
333
343
  menuOpen: w,
334
344
  setMenuOpen: k,
335
345
  sheetId: q
@@ -340,16 +350,16 @@ const E = h(
340
350
  ...b,
341
351
  "data-component": "public-header",
342
352
  "data-component-id": u,
343
- "data-variant": r,
353
+ "data-variant": n,
344
354
  "data-stuck": W ? "true" : void 0,
345
355
  "data-hidden": $ ? "true" : void 0,
346
356
  "data-state": j ? "reduced-motion" : void 0,
347
- className: ns({ variant: r, sticky: o, className: v }),
348
- children: r === "pill" ? /* @__PURE__ */ s(
357
+ className: rs({ variant: n, sticky: o, className: v }),
358
+ children: n === "pill" ? /* @__PURE__ */ s(
349
359
  "div",
350
360
  {
351
361
  "data-component": "public-header-container",
352
- className: rs,
362
+ className: ns,
353
363
  children: /* @__PURE__ */ s(R, { ...P })
354
364
  }
355
365
  ) : /* @__PURE__ */ s(R, { ...P })
@@ -358,10 +368,10 @@ const E = h(
358
368
  }
359
369
  );
360
370
  E.displayName = "PublicHeader";
361
- const T = h(({ active: e, className: n, children: d, ...a }, t) => N(g) === "mobile" ? /* @__PURE__ */ s(
371
+ const T = h(({ active: e, className: r, children: d, ...a }, i) => N(g) === "mobile" ? /* @__PURE__ */ s(
362
372
  "a",
363
373
  {
364
- ref: t,
374
+ ref: i,
365
375
  ...a,
366
376
  "data-active": e ? "true" : void 0,
367
377
  "aria-current": e ? "page" : void 0,
@@ -376,30 +386,30 @@ const T = h(({ active: e, className: n, children: d, ...a }, t) => N(g) === "mob
376
386
  "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
377
387
  "ds:data-[active=true]:text-[var(--primary)]",
378
388
  "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
379
- n
389
+ r
380
390
  ].filter(Boolean).join(" "),
381
391
  children: d
382
392
  }
383
393
  ) : /* @__PURE__ */ s(m.Item, { children: /* @__PURE__ */ s(m.Link, { asChild: !0, active: e, children: /* @__PURE__ */ s(
384
394
  "a",
385
395
  {
386
- ref: t,
396
+ ref: i,
387
397
  ...a,
388
398
  "data-active": e ? "true" : void 0,
389
399
  "aria-current": e ? "page" : void 0,
390
- className: [os(), n].filter(Boolean).join(" "),
400
+ className: [os(), r].filter(Boolean).join(" "),
391
401
  children: d
392
402
  }
393
403
  ) }) }));
394
404
  T.displayName = "PublicHeader.NavLink";
395
- const V = h(({ label: e, wide: n = !1, children: d, id: a }, t) => N(g) === "mobile" ? /* @__PURE__ */ i(
405
+ const V = h(({ label: e, wide: r = !1, children: d, id: a }, i) => N(g) === "mobile" ? /* @__PURE__ */ t(
396
406
  "details",
397
407
  {
398
408
  id: a,
399
409
  "data-component": "public-header-nav-dropdown",
400
410
  className: "ds:group ds:border-b ds:border-[color:var(--border)]",
401
411
  children: [
402
- /* @__PURE__ */ i(
412
+ /* @__PURE__ */ t(
403
413
  "summary",
404
414
  {
405
415
  className: [
@@ -425,38 +435,38 @@ const V = h(({ label: e, wide: n = !1, children: d, id: a }, t) => N(g) === "mob
425
435
  /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]", children: d })
426
436
  ]
427
437
  }
428
- ) : /* @__PURE__ */ i(m.Item, { "data-component": "public-header-nav-dropdown", children: [
429
- /* @__PURE__ */ i(
438
+ ) : /* @__PURE__ */ t(m.Item, { "data-component": "public-header-nav-dropdown", children: [
439
+ /* @__PURE__ */ t(
430
440
  m.Trigger,
431
441
  {
432
- ref: t,
442
+ ref: i,
433
443
  id: a,
434
- className: ts,
444
+ className: is,
435
445
  children: [
436
446
  e,
437
- /* @__PURE__ */ s(I, { "aria-hidden": "true", className: is })
447
+ /* @__PURE__ */ s(I, { "aria-hidden": "true", className: ts })
438
448
  ]
439
449
  }
440
450
  ),
441
451
  /* @__PURE__ */ s(
442
452
  m.Content,
443
453
  {
444
- className: cs({ wide: n }),
454
+ className: cs({ wide: r }),
445
455
  children: d
446
456
  }
447
457
  )
448
458
  ] }));
449
459
  V.displayName = "PublicHeader.NavDropdown";
450
- const O = h(({ href: e, title: n, subtitle: d, children: a }, t) => {
451
- const r = N(g), o = /* @__PURE__ */ s(
460
+ const O = h(({ href: e, title: r, subtitle: d, children: a }, i) => {
461
+ const n = N(g), o = /* @__PURE__ */ s(
452
462
  "span",
453
463
  {
454
464
  "data-card-title": !0,
455
465
  className: "type-title-card ds:text-[var(--foreground)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
456
- children: n
466
+ children: r
457
467
  }
458
- ), l = /* @__PURE__ */ i(_, { children: [
459
- /* @__PURE__ */ i("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
468
+ ), l = /* @__PURE__ */ t(_, { children: [
469
+ /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
460
470
  o,
461
471
  d ? /* @__PURE__ */ s("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: d }) : null
462
472
  ] }),
@@ -466,7 +476,7 @@ const O = h(({ href: e, title: n, subtitle: d, children: a }, t) => {
466
476
  "data-card-arrow": !0,
467
477
  "aria-hidden": "true",
468
478
  className: "ds:flex-none ds:text-[var(--muted-foreground)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:rtl:-scale-x-100",
469
- children: /* @__PURE__ */ i(
479
+ children: /* @__PURE__ */ t(
470
480
  "svg",
471
481
  {
472
482
  xmlns: "http://www.w3.org/2000/svg",
@@ -488,13 +498,13 @@ const O = h(({ href: e, title: n, subtitle: d, children: a }, t) => {
488
498
  )
489
499
  ] });
490
500
  let u;
491
- return e ? r === "mobile" ? u = /* @__PURE__ */ s("a", { href: e, className: z, children: l }) : u = /* @__PURE__ */ s(m.Link, { asChild: !0, children: /* @__PURE__ */ s("a", { href: e, className: z, children: l }) }) : u = /* @__PURE__ */ i("div", { className: us, children: [
501
+ return e ? n === "mobile" ? u = /* @__PURE__ */ s("a", { href: e, className: z, children: l }) : u = /* @__PURE__ */ s(m.Link, { asChild: !0, children: /* @__PURE__ */ s("a", { href: e, className: z, children: l }) }) : u = /* @__PURE__ */ t("div", { className: us, children: [
492
502
  o,
493
503
  d ? /* @__PURE__ */ s("span", { className: "ds:block type-body-sm ds:text-[var(--muted-foreground)] ds:mt-[var(--spacing-xs)]", children: d }) : null
494
- ] }), /* @__PURE__ */ i(
504
+ ] }), /* @__PURE__ */ t(
495
505
  "div",
496
506
  {
497
- ref: t,
507
+ ref: i,
498
508
  "data-component": "public-header-dropdown-card",
499
509
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
500
510
  children: [
@@ -505,19 +515,19 @@ const O = h(({ href: e, title: n, subtitle: d, children: a }, t) => {
505
515
  );
506
516
  });
507
517
  O.displayName = "PublicHeader.DropdownCard";
508
- const S = h(({ active: e, className: n, children: d, ...a }, t) => {
509
- const r = N(g), o = /* @__PURE__ */ s(
518
+ const S = h(({ active: e, className: r, children: d, ...a }, i) => {
519
+ const n = N(g), o = /* @__PURE__ */ s(
510
520
  "a",
511
521
  {
512
- ref: t,
522
+ ref: i,
513
523
  ...a,
514
524
  "data-active": e ? "true" : void 0,
515
525
  "aria-current": e ? "page" : void 0,
516
- className: [ms, n].filter(Boolean).join(" "),
526
+ className: [ms, r].filter(Boolean).join(" "),
517
527
  children: d
518
528
  }
519
529
  );
520
- return /* @__PURE__ */ s("li", { "data-component": "public-header-dropdown-link", children: r === "mobile" ? o : /* @__PURE__ */ s(m.Link, { asChild: !0, active: e, children: o }) });
530
+ return /* @__PURE__ */ s("li", { "data-component": "public-header-dropdown-link", children: n === "mobile" ? o : /* @__PURE__ */ s(m.Link, { asChild: !0, active: e, children: o }) });
521
531
  });
522
532
  S.displayName = "PublicHeader.DropdownLink";
523
533
  const Cs = Object.assign(E, {
@@ -564,4 +574,4 @@ export {
564
574
  Cs as P,
565
575
  js as p
566
576
  };
567
- //# sourceMappingURL=public-header.agent-BY6FH71R.js.map
577
+ //# sourceMappingURL=public-header.agent-DyVpPwmv.js.map