@alfadocs/ui-kit 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.
- package/dist/_chunks/{logo-yituK7sE.js → logo-1FuSGx0n.js} +2 -1
- package/dist/_chunks/marketplace-app-shell-C4OYAC22.js +513 -0
- package/dist/_chunks/maximize-2-Cm9OUQ2m.js +17 -0
- package/dist/_chunks/{otp-input-CMphfBxZ.js → otp-input-Chb9r5vf.js} +89 -87
- package/dist/_chunks/patient-shell-Coarf346.js +162 -0
- package/dist/_chunks/{privacy-lock-BmX_gkvt.js → privacy-lock-BN3L-alb.js} +2 -2
- package/dist/_chunks/{public-footer.agent-okt8ZRc5.js → public-footer.agent-CfXuW1x6.js} +2 -2
- package/dist/_chunks/{public-header.agent-BY6FH71R.js → public-header.agent-DyVpPwmv.js} +72 -62
- package/dist/_chunks/{sign-document-Bzld9jVM.js → sign-document-BzHTjMVC.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-CuYn_kKP.js → sign-in-with-alfadocs-button-BpAjVmsI.js} +2 -2
- package/dist/_chunks/{signature-capture-CpMBhqQ9.js → signature-capture-CHbrKoA_.js} +163 -152
- package/dist/_chunks/signature-field-DhscKdgk.js +152 -0
- package/dist/_chunks/use-signing-session-C5evzYmo.js +108 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/brand/product-lockup/product-lockup.d.ts +47 -12
- package/dist/components/index.d.ts +3 -2
- package/dist/components/logo/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/otp-input/otp-input.d.ts +6 -0
- package/dist/components/pdf-viewer/index.d.ts +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/signature-capture/index.js +1 -1
- package/dist/components/signature-capture/signature-capture.d.ts +7 -0
- package/dist/components/signature-field/index.d.ts +3 -0
- package/dist/components/signature-field/index.js +6 -0
- package/dist/components/signature-field/signature-field.d.ts +35 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +42 -41
- package/dist/hooks/use-signing-session.d.ts +36 -0
- package/dist/i18n/locales/ar.d.ts +8 -0
- package/dist/i18n/locales/ar.js +8 -0
- package/dist/i18n/locales/de.d.ts +8 -0
- package/dist/i18n/locales/de.js +8 -0
- package/dist/i18n/locales/el.d.ts +8 -0
- package/dist/i18n/locales/el.js +8 -0
- package/dist/i18n/locales/en.d.ts +8 -0
- package/dist/i18n/locales/en.js +8 -0
- package/dist/i18n/locales/es.d.ts +8 -0
- package/dist/i18n/locales/es.js +8 -0
- package/dist/i18n/locales/fr.d.ts +8 -0
- package/dist/i18n/locales/fr.js +8 -0
- package/dist/i18n/locales/hi.d.ts +8 -0
- package/dist/i18n/locales/hi.js +8 -0
- package/dist/i18n/locales/it.d.ts +8 -0
- package/dist/i18n/locales/it.js +8 -0
- package/dist/i18n/locales/ja.d.ts +8 -0
- package/dist/i18n/locales/ja.js +8 -0
- package/dist/i18n/locales/nl.d.ts +8 -0
- package/dist/i18n/locales/nl.js +8 -0
- package/dist/i18n/locales/pl.d.ts +8 -0
- package/dist/i18n/locales/pl.js +8 -0
- package/dist/i18n/locales/pt.d.ts +8 -0
- package/dist/i18n/locales/pt.js +8 -0
- package/dist/i18n/locales/ro.d.ts +8 -0
- package/dist/i18n/locales/ro.js +8 -0
- package/dist/i18n/locales/ru.d.ts +8 -0
- package/dist/i18n/locales/ru.js +8 -0
- package/dist/i18n/locales/sq.d.ts +8 -0
- package/dist/i18n/locales/sq.js +8 -0
- package/dist/i18n/locales/sv.d.ts +8 -0
- package/dist/i18n/locales/sv.js +8 -0
- package/dist/i18n/locales/tr.d.ts +8 -0
- package/dist/i18n/locales/tr.js +8 -0
- package/dist/i18n/locales/zh.d.ts +8 -0
- package/dist/i18n/locales/zh.js +8 -0
- package/dist/index.js +701 -697
- package/dist/locales/ar.json +8 -0
- package/dist/locales/de.json +8 -0
- package/dist/locales/el.json +8 -0
- package/dist/locales/en.json +8 -0
- package/dist/locales/es.json +8 -0
- package/dist/locales/fr.json +8 -0
- package/dist/locales/hi.json +8 -0
- package/dist/locales/it.json +8 -0
- package/dist/locales/ja.json +8 -0
- package/dist/locales/nl.json +8 -0
- package/dist/locales/pl.json +8 -0
- package/dist/locales/pt.json +8 -0
- package/dist/locales/ro.json +8 -0
- package/dist/locales/ru.json +8 -0
- package/dist/locales/sq.json +8 -0
- package/dist/locales/sv.json +8 -0
- package/dist/locales/tr.json +8 -0
- package/dist/locales/zh.json +8 -0
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +8 -6
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +5 -1
- package/dist/_chunks/marketplace-app-shell-Dmo1S9av.js +0 -428
- package/dist/_chunks/patient-shell-c2YixkQw.js +0 -174
- package/dist/_chunks/use-scroll-to-first-error-4Za-u5Nw.js +0 -43
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
const
|
|
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
|
-
},
|
|
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
|
|
89
|
+
function w(e, a) {
|
|
90
90
|
return F(e).replace(/\D/g, "").slice(0, a);
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
const m =
|
|
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
|
|
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:
|
|
106
|
-
error:
|
|
107
|
-
label:
|
|
105
|
+
disabled: H,
|
|
106
|
+
error: $,
|
|
107
|
+
label: I,
|
|
108
108
|
id: K,
|
|
109
|
-
className:
|
|
110
|
-
webOtp:
|
|
111
|
-
|
|
112
|
-
|
|
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:
|
|
115
|
-
}), 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
|
|
118
|
-
const
|
|
119
|
-
return
|
|
120
|
-
}, [f,
|
|
121
|
-
|
|
122
|
-
f >= e &&
|
|
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
|
-
(
|
|
126
|
-
const t = Math.max(0, Math.min(e - 1,
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
|
|
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
|
-
(
|
|
134
|
-
const t =
|
|
135
|
-
P(t), d.current = t, l == null || l(t), t.length === e ?
|
|
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
|
-
|
|
140
|
-
enabled:
|
|
140
|
+
ue({
|
|
141
|
+
enabled: z && !b,
|
|
141
142
|
onCode: u
|
|
142
143
|
});
|
|
143
|
-
const
|
|
144
|
-
const
|
|
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 (
|
|
147
|
-
const
|
|
148
|
-
u(
|
|
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,
|
|
153
|
-
u(
|
|
154
|
-
const
|
|
155
|
-
c(
|
|
156
|
-
},
|
|
157
|
-
const
|
|
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
|
|
160
|
+
if (s[r]) {
|
|
160
161
|
t.preventDefault();
|
|
161
|
-
const o =
|
|
162
|
+
const o = s.slice(0, r) + s.slice(r + 1);
|
|
162
163
|
u(o);
|
|
163
164
|
return;
|
|
164
165
|
}
|
|
165
|
-
if (
|
|
166
|
+
if (r > 0) {
|
|
166
167
|
t.preventDefault();
|
|
167
|
-
const o =
|
|
168
|
-
u(o), c(
|
|
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(),
|
|
174
|
+
t.preventDefault(), r > 0 && c(r - 1);
|
|
174
175
|
return;
|
|
175
176
|
}
|
|
176
177
|
if (t.key === "ArrowRight") {
|
|
177
|
-
t.preventDefault(),
|
|
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
|
-
},
|
|
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,
|
|
190
|
-
u(
|
|
191
|
-
const
|
|
192
|
-
c(
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
}, L = v.id,
|
|
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: (
|
|
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
|
|
206
|
-
|
|
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:
|
|
210
|
+
id: O,
|
|
210
211
|
htmlFor: `${L}-0`,
|
|
211
212
|
className: "type-label ds:text-foreground",
|
|
212
|
-
children:
|
|
213
|
+
children: I
|
|
213
214
|
}
|
|
214
215
|
) : null,
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ y(
|
|
216
217
|
"div",
|
|
217
218
|
{
|
|
218
219
|
role: "group",
|
|
219
220
|
dir: "ltr",
|
|
220
|
-
"aria-labelledby":
|
|
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:
|
|
228
|
-
const
|
|
229
|
-
return /* @__PURE__ */
|
|
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:
|
|
242
|
+
value: r,
|
|
242
243
|
disabled: b,
|
|
243
|
-
tabIndex:
|
|
244
|
-
"aria-label":
|
|
244
|
+
tabIndex: s ? 0 : -1,
|
|
245
|
+
"aria-label": _("inputs.otp.digitLabel", {
|
|
245
246
|
current: t + 1,
|
|
246
247
|
total: e
|
|
247
248
|
}),
|
|
248
|
-
onChange:
|
|
249
|
-
onKeyDown:
|
|
250
|
-
onPaste:
|
|
251
|
-
onFocus:
|
|
252
|
-
className:
|
|
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
|
-
|
|
264
|
+
be.displayName = "OTPInput";
|
|
263
265
|
export {
|
|
264
|
-
|
|
266
|
+
be as O
|
|
265
267
|
};
|
|
266
|
-
//# sourceMappingURL=otp-input-
|
|
268
|
+
//# sourceMappingURL=otp-input-Chb9r5vf.js.map
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as w, useState as C } from "react";
|
|
3
|
+
import { useTranslation as m } from "react-i18next";
|
|
4
|
+
import { A as y } from "./app-frame-BYx1gcV7.js";
|
|
5
|
+
import { I as H } from "./icon-button-CKEOrN37.js";
|
|
6
|
+
import { D as n } from "./dropdown-menu-DwwPovMZ.js";
|
|
7
|
+
import { H as B, g as N, f as T, e as k, a as x, c as M, d as O } from "./header-Ce1Br27u.js";
|
|
8
|
+
import { L as P } from "./logo-1FuSGx0n.js";
|
|
9
|
+
import { S as W, a as R, h as j, j as z, k as D, i as E } from "./sidebar-DPEHzxLZ.js";
|
|
10
|
+
import { T as _ } from "./theme-root-BOO73p5t.js";
|
|
11
|
+
import { a as F } from "./tooltip-DvmfrNvB.js";
|
|
12
|
+
import { u as U } from "./use-theme-CAuo6EYT.js";
|
|
13
|
+
import { S as q } from "./settings-ca2Yi9R8.js";
|
|
14
|
+
import { M as G } from "./maximize-2-Cm9OUQ2m.js";
|
|
15
|
+
import { L as J } from "./log-out-616hnn2-.js";
|
|
16
|
+
function K(r) {
|
|
17
|
+
return r > 99 ? "99+" : String(r);
|
|
18
|
+
}
|
|
19
|
+
function Q(r) {
|
|
20
|
+
if (r.startsWith("/") || r.startsWith("#") || r.startsWith("?"))
|
|
21
|
+
return !0;
|
|
22
|
+
try {
|
|
23
|
+
const t = new URL(r, window.location.origin);
|
|
24
|
+
return t.protocol === "http:" || t.protocol === "https:";
|
|
25
|
+
} catch {
|
|
26
|
+
return !1;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function V({
|
|
30
|
+
logoutHref: r,
|
|
31
|
+
onToggleFullscreen: t
|
|
32
|
+
}) {
|
|
33
|
+
const { t: a } = m();
|
|
34
|
+
return /* @__PURE__ */ i(n.Root, { children: [
|
|
35
|
+
/* @__PURE__ */ e(n.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
|
|
36
|
+
H,
|
|
37
|
+
{
|
|
38
|
+
icon: /* @__PURE__ */ e(q, { "aria-hidden": "true" }),
|
|
39
|
+
"aria-label": a("patientShell.settings.triggerAria"),
|
|
40
|
+
tooltip: a("patientShell.settings.triggerAria"),
|
|
41
|
+
"data-testid": "patient-shell-settings-trigger"
|
|
42
|
+
}
|
|
43
|
+
) }),
|
|
44
|
+
/* @__PURE__ */ i(n.Content, { align: "end", children: [
|
|
45
|
+
/* @__PURE__ */ e(
|
|
46
|
+
n.Item,
|
|
47
|
+
{
|
|
48
|
+
startIcon: /* @__PURE__ */ e(G, { "aria-hidden": "true" }),
|
|
49
|
+
onSelect: t,
|
|
50
|
+
"data-testid": "patient-shell-fullscreen",
|
|
51
|
+
children: a("patientShell.settings.fullscreen")
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ e(n.Separator, {}),
|
|
55
|
+
/* @__PURE__ */ e(
|
|
56
|
+
n.Item,
|
|
57
|
+
{
|
|
58
|
+
startIcon: /* @__PURE__ */ e(J, { "aria-hidden": "true" }),
|
|
59
|
+
onSelect: () => {
|
|
60
|
+
typeof window > "u" || Q(r) && window.location.assign(r);
|
|
61
|
+
},
|
|
62
|
+
"data-testid": "patient-shell-logout",
|
|
63
|
+
children: a("patientShell.settings.logout")
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] })
|
|
67
|
+
] });
|
|
68
|
+
}
|
|
69
|
+
function X({ menuItems: r }) {
|
|
70
|
+
return /* @__PURE__ */ e(R, { children: r.map((t) => {
|
|
71
|
+
const a = typeof t.badgeCount == "number" && t.badgeCount > 0 ? t.badgeCount : void 0;
|
|
72
|
+
return /* @__PURE__ */ i(
|
|
73
|
+
j,
|
|
74
|
+
{
|
|
75
|
+
href: t.href,
|
|
76
|
+
"aria-label": t.label,
|
|
77
|
+
isActive: t.isActive,
|
|
78
|
+
children: [
|
|
79
|
+
t.icon ? /* @__PURE__ */ e(z, { children: t.icon }) : null,
|
|
80
|
+
/* @__PURE__ */ e(D, { children: t.label }),
|
|
81
|
+
a !== void 0 ? /* @__PURE__ */ e(E, { children: K(a) }) : null
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
t.id
|
|
85
|
+
);
|
|
86
|
+
}) });
|
|
87
|
+
}
|
|
88
|
+
const Y = w(
|
|
89
|
+
({
|
|
90
|
+
menuItems: r,
|
|
91
|
+
logoutHref: t,
|
|
92
|
+
onToggleFullscreen: a,
|
|
93
|
+
brandLogo: p,
|
|
94
|
+
brandHref: u = "/",
|
|
95
|
+
mainAriaLabel: f,
|
|
96
|
+
sidebarState: o,
|
|
97
|
+
children: g,
|
|
98
|
+
// `userName` and `userAvatarSrc` are declared on the public API
|
|
99
|
+
// for forward-compatibility (future profile-pill work) — they are
|
|
100
|
+
// intentionally unused today because the legacy patient chrome
|
|
101
|
+
// carries no profile pill.
|
|
102
|
+
userName: Z,
|
|
103
|
+
userAvatarSrc: $
|
|
104
|
+
}, s) => {
|
|
105
|
+
const { t: l } = m(), { theme: b, accessibility: S, resolvedTheme: d } = U(), v = b !== "system" || S !== "system", I = d.startsWith("dark") ? "dark" : "light", L = d.endsWith("-accessible"), [A, c] = C(!1), h = /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(
|
|
106
|
+
y,
|
|
107
|
+
{
|
|
108
|
+
mainAriaLabel: f,
|
|
109
|
+
mainClassName: "ds:bg-[color:var(--app-shell-background)]",
|
|
110
|
+
header: /* @__PURE__ */ i(B, { children: [
|
|
111
|
+
/* @__PURE__ */ i(N, { children: [
|
|
112
|
+
/* @__PURE__ */ e(T, { href: "#main-content" }),
|
|
113
|
+
/* @__PURE__ */ e(k, { onMenuOpen: () => c(!0) }),
|
|
114
|
+
/* @__PURE__ */ e(
|
|
115
|
+
x,
|
|
116
|
+
{
|
|
117
|
+
logo: p ?? /* @__PURE__ */ e(P, { variant: "monochrome", size: "md", decorative: !0 }),
|
|
118
|
+
href: u,
|
|
119
|
+
"aria-label": l("patientShell.brand.homeAria")
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
] }),
|
|
123
|
+
/* @__PURE__ */ e(M, {}),
|
|
124
|
+
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
|
|
125
|
+
V,
|
|
126
|
+
{
|
|
127
|
+
logoutHref: t,
|
|
128
|
+
onToggleFullscreen: a
|
|
129
|
+
}
|
|
130
|
+
) })
|
|
131
|
+
] }),
|
|
132
|
+
sidebar: /* @__PURE__ */ e(
|
|
133
|
+
W,
|
|
134
|
+
{
|
|
135
|
+
...o !== void 0 ? { state: o } : { defaultState: "expanded" },
|
|
136
|
+
open: A,
|
|
137
|
+
onOpenChange: c,
|
|
138
|
+
"aria-label": l("patientShell.sidebar.panelLabel"),
|
|
139
|
+
"data-testid": "patient-shell-sidebar",
|
|
140
|
+
children: /* @__PURE__ */ e(X, { menuItems: r })
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
children: g
|
|
144
|
+
}
|
|
145
|
+
) });
|
|
146
|
+
return v ? /* @__PURE__ */ e(
|
|
147
|
+
_,
|
|
148
|
+
{
|
|
149
|
+
ref: s,
|
|
150
|
+
theme: I,
|
|
151
|
+
accessible: L,
|
|
152
|
+
className: "ds:contents",
|
|
153
|
+
children: h
|
|
154
|
+
}
|
|
155
|
+
) : /* @__PURE__ */ e("div", { ref: s, className: "ds:contents", children: h });
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
Y.displayName = "PatientShell";
|
|
159
|
+
export {
|
|
160
|
+
Y as P
|
|
161
|
+
};
|
|
162
|
+
//# sourceMappingURL=patient-shell-Coarf346.js.map
|
|
@@ -4,7 +4,7 @@ import { useTranslation as V } from "react-i18next";
|
|
|
4
4
|
import * as i from "@radix-ui/react-dialog";
|
|
5
5
|
import { B as u } from "./button-DD_0Xdmr.js";
|
|
6
6
|
import { I as W } from "./icon-button-CKEOrN37.js";
|
|
7
|
-
import { L as X } from "./logo-
|
|
7
|
+
import { L as X } from "./logo-1FuSGx0n.js";
|
|
8
8
|
import { u as Y } from "./registry-nPAVE19X.js";
|
|
9
9
|
import { E as h } from "./eye-off-xEXDAh5z.js";
|
|
10
10
|
import { U as Z } from "./user-CPxpqFjJ.js";
|
|
@@ -190,4 +190,4 @@ export {
|
|
|
190
190
|
ee as P,
|
|
191
191
|
$ as p
|
|
192
192
|
};
|
|
193
|
-
//# sourceMappingURL=privacy-lock-
|
|
193
|
+
//# sourceMappingURL=privacy-lock-BN3L-alb.js.map
|
|
@@ -4,7 +4,7 @@ import { c as R } from "./index-D2ZczOXr.js";
|
|
|
4
4
|
import { useTranslation as S } from "react-i18next";
|
|
5
5
|
import { L as f } from "./link-DrD_cRUg.js";
|
|
6
6
|
import { S as m } from "./separator-CYU_bGFn.js";
|
|
7
|
-
import { L as T } from "./logo-
|
|
7
|
+
import { L as T } from "./logo-1FuSGx0n.js";
|
|
8
8
|
import { A as D, b as G, c as U, a as O } from "./accordion-9lJSMMsZ.js";
|
|
9
9
|
const L = "https://www.alfadocs.com", F = {
|
|
10
10
|
privacy: "/privacy-prenotazione-online",
|
|
@@ -588,4 +588,4 @@ export {
|
|
|
588
588
|
W as c,
|
|
589
589
|
ye as p
|
|
590
590
|
};
|
|
591
|
-
//# sourceMappingURL=public-footer.agent-
|
|
591
|
+
//# sourceMappingURL=public-footer.agent-CfXuW1x6.js.map
|