@alfadocs/ui-kit 1.90.2 → 1.91.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/{agenda-card-BDuvreCe.js → agenda-card-BhY342MA.js} +2 -2
- package/dist/_chunks/{agenda-tray-D-jvptdo.js → agenda-tray-BmxBGEci.js} +2 -2
- package/dist/_chunks/{alia-sidebar-CsTRAxC8.js → alia-sidebar-ovRX_oti.js} +3 -3
- package/dist/_chunks/{appointment-card-5JMWi9_f.js → appointment-card-Bstc1p7a.js} +2 -2
- package/dist/_chunks/{appointment-peek-39BwVMUf.js → appointment-peek-C0kKqnFk.js} +2 -2
- package/dist/_chunks/{appointment-timeline-1-Za2miy.js → appointment-timeline-rbt9AwHO.js} +2 -2
- package/dist/_chunks/{appointment-tray-Dwc8MSIQ.js → appointment-tray-6zd8RLIL.js} +2 -2
- package/dist/_chunks/{avatar-BPiPL7ND.js → avatar-a6042Ox2.js} +52 -52
- package/dist/_chunks/{balance-badge-cell-D9VhFp0L.js → balance-badge-cell-BtJvre1-.js} +2 -2
- package/dist/_chunks/booking-opt_h7Uc.js +4590 -0
- package/dist/_chunks/{calendar-ClB-jWH1.js → calendar-CmiMS4FJ.js} +2 -2
- package/dist/_chunks/{calendar-appointment-editor-dialog-CiAGAX2t.js → calendar-appointment-editor-dialog-sJKLoVJ2.js} +7 -7
- package/dist/_chunks/{care-plan-card-BYCPNDvA.js → care-plan-card-DD9rEWYN.js} +2 -2
- package/dist/_chunks/{care-plan-header-BzsAg6oY.js → care-plan-header-CXUJQt8Q.js} +2 -2
- package/dist/_chunks/{chat-message-CmFJdEre.js → chat-message-LRO_6Ee3.js} +2 -2
- package/dist/_chunks/{clinical-note-card-Caidqcwa.js → clinical-note-card-Cut2lNmu.js} +3 -3
- package/dist/_chunks/{contact-card-Czu60UvU.js → contact-card-ClvEDM9e.js} +2 -2
- package/dist/_chunks/{contact-profile-card-Da1vmJQI.js → contact-profile-card-CX45mZA3.js} +106 -95
- package/dist/_chunks/{dependent-selector-C4kOgO8b.js → dependent-selector-CyNi7M_f.js} +2 -2
- package/dist/_chunks/{entity-summary-BLxzSSXK.js → entity-summary-B_bOloqP.js} +3 -3
- package/dist/_chunks/error-page-B0fGNTRB.js +419 -0
- package/dist/_chunks/{languages-CZqBaPwI.js → languages-CGLX6Qpe.js} +3 -15
- package/dist/_chunks/link-DtCfnLnF.js +332 -0
- package/dist/_chunks/{link-cell-renderer-CnCgudvq.js → link-cell-renderer-BS3V4LA6.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-CmZx0Oam.js → marketplace-app-shell-CJQtx3sv.js} +2 -2
- package/dist/_chunks/{message-card-CvCnCssc.js → message-card-B6SduXJv.js} +2 -2
- package/dist/_chunks/{message-tray-IJYvy6Cf.js → message-tray-Cllf-v0G.js} +2 -2
- package/dist/_chunks/{nav-grid-Oc4aCPrg.js → nav-grid-D2xVcHTO.js} +2 -2
- package/dist/_chunks/{note-attachment-DIlIQ7JF.js → note-attachment-cnj2JRrg.js} +2 -2
- package/dist/_chunks/{note-timeline-KzL52MmB.js → note-timeline-BrjHBQfx.js} +2 -2
- package/dist/_chunks/{notes-panel-Dywo6R55.js → notes-panel-ib7I3aNf.js} +2 -2
- package/dist/_chunks/{operator-hero-6aAIQaFZ.js → operator-hero-C_5B-8Qp.js} +43 -41
- package/dist/_chunks/{patient-details-BUr7Oemx.js → patient-details-BjcUpD9S.js} +3 -3
- package/dist/_chunks/{patient-field-row-bJk8Q_qr.js → patient-field-row-B0tdiaWi.js} +2 -2
- package/dist/_chunks/{patient-summary-card-CCQZ8X37.js → patient-summary-card-Cvv6_Ugk.js} +4 -4
- package/dist/_chunks/{payment-request-card-MndSlVoK.js → payment-request-card-BfGauFY0.js} +2 -2
- package/dist/_chunks/{practice-profile-hero-qfrsFQI_.js → practice-profile-hero-ClzE-4CB.js} +76 -73
- package/dist/_chunks/{practice-results-DQuOfqej.js → practice-results-CQ_KvEXK.js} +517 -514
- package/dist/_chunks/{product-hub-panel-Blag8t8f.js → product-hub-panel-bHi7lkVD.js} +2 -2
- package/dist/_chunks/public-footer-IoRWoAMz.js +596 -0
- package/dist/_chunks/{signature-request-DjY-X62H.js → signature-request-DvhyrRpn.js} +3 -3
- package/dist/_chunks/{signed-out-frame-G-3ATOdu.js → signed-out-frame-CgRXOUzi.js} +2 -2
- package/dist/_chunks/{slot-grid-DrwynKeN.js → slot-grid-B-IAFX3C.js} +180 -169
- package/dist/_chunks/{timeline-wUuTDFY_.js → timeline-BcYHdP56.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-BytPq3Ux.js → use-appointment-details-read-D8vDg0sg.js} +5 -5
- package/dist/agent-catalog.json +2 -2
- package/dist/components/_shared/social-brand-icons.d.ts +29 -0
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/avatar/avatar.d.ts +14 -0
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/booking/booking-types.d.ts +26 -0
- package/dist/components/booking/index.js +1 -1
- package/dist/components/booking/slot-load-state.d.ts +11 -0
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/contact-card/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/link/link.d.ts +10 -1
- package/dist/components/link/social-url.d.ts +71 -0
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/nav-grid/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/operator-hero/operator-hero.d.ts +6 -0
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-profile-hero/practice-profile-hero.d.ts +6 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +8 -2
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-footer/index.js +1 -1
- package/dist/components/public-footer/public-footer.d.ts +13 -1
- package/dist/components/public-footer/socials.d.ts +6 -5
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/slot-grid/slot-grid.d.ts +2 -0
- package/dist/components/timeline/index.js +1 -1
- package/dist/i18n/config.js +224 -96
- package/dist/i18n/locales/ar.d.ts +3 -0
- package/dist/i18n/locales/ar.js +4 -1
- package/dist/i18n/locales/de.d.ts +3 -0
- package/dist/i18n/locales/de.js +4 -1
- package/dist/i18n/locales/el.d.ts +3 -0
- package/dist/i18n/locales/el.js +4 -1
- package/dist/i18n/locales/en.d.ts +3 -0
- package/dist/i18n/locales/en.js +3 -0
- package/dist/i18n/locales/es.d.ts +3 -0
- package/dist/i18n/locales/es.js +4 -1
- package/dist/i18n/locales/fr.d.ts +3 -0
- package/dist/i18n/locales/fr.js +4 -1
- package/dist/i18n/locales/hi.d.ts +3 -0
- package/dist/i18n/locales/hi.js +4 -1
- package/dist/i18n/locales/it.d.ts +3 -0
- package/dist/i18n/locales/it.js +4 -1
- package/dist/i18n/locales/ja.d.ts +3 -0
- package/dist/i18n/locales/ja.js +4 -1
- package/dist/i18n/locales/nl.d.ts +3 -0
- package/dist/i18n/locales/nl.js +4 -1
- package/dist/i18n/locales/pl.d.ts +3 -0
- package/dist/i18n/locales/pl.js +4 -1
- package/dist/i18n/locales/pt.d.ts +3 -0
- package/dist/i18n/locales/pt.js +4 -1
- package/dist/i18n/locales/ro.d.ts +3 -0
- package/dist/i18n/locales/ro.js +4 -1
- package/dist/i18n/locales/ru.d.ts +3 -0
- package/dist/i18n/locales/ru.js +4 -1
- package/dist/i18n/locales/sq.d.ts +3 -0
- package/dist/i18n/locales/sq.js +4 -1
- package/dist/i18n/locales/sv.d.ts +3 -0
- package/dist/i18n/locales/sv.js +4 -1
- package/dist/i18n/locales/tr.d.ts +3 -0
- package/dist/i18n/locales/tr.js +4 -1
- package/dist/i18n/locales/zh.d.ts +3 -0
- package/dist/i18n/locales/zh.js +4 -1
- package/dist/index.js +42 -42
- package/dist/locales/ar.json +4 -1
- package/dist/locales/de.json +4 -1
- package/dist/locales/el.json +4 -1
- package/dist/locales/en.json +3 -0
- package/dist/locales/es.json +4 -1
- package/dist/locales/fr.json +4 -1
- package/dist/locales/hi.json +4 -1
- package/dist/locales/it.json +4 -1
- package/dist/locales/ja.json +4 -1
- package/dist/locales/nl.json +4 -1
- package/dist/locales/pl.json +4 -1
- package/dist/locales/pt.json +4 -1
- package/dist/locales/ro.json +4 -1
- package/dist/locales/ru.json +4 -1
- package/dist/locales/sq.json +4 -1
- package/dist/locales/sv.json +4 -1
- package/dist/locales/tr.json +4 -1
- package/dist/locales/zh.json +4 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/error-page/error-page-english.d.ts +71 -0
- package/dist/patterns/error-page/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signed-out-frame/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/booking-CcE_oviI.js +0 -4373
- package/dist/_chunks/error-page-Bhai-spN.js +0 -344
- package/dist/_chunks/link-N5_YpLtm.js +0 -138
- package/dist/_chunks/public-footer-CXOrdAaS.js +0 -568
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import { jsx as t, jsxs as L } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ue, useMemo as ge, useState as W, useEffect as I, useRef as Y, useId as he } from "react";
|
|
3
|
+
import { useTranslation as fe } from "react-i18next";
|
|
4
|
+
import { c as pe } from "./index-D2ZczOXr.js";
|
|
5
|
+
import { B as S } from "./button-DohK_Ak_.js";
|
|
6
|
+
import { L as ye } from "./logo-hIsyVE96.js";
|
|
7
|
+
import { i as be } from "./is-development-CLUAnsU7.js";
|
|
8
|
+
import { i as ve } from "./safe-href-5dbsfbQn.js";
|
|
9
|
+
import { a as ke } from "./error-page-illustration-BdJLuMdV.js";
|
|
10
|
+
import { loadLocale as we, LOCALES_WITH_BUNDLES as Pe } from "../i18n/config.js";
|
|
11
|
+
import { R as xe } from "./rotate-ccw-BBQnIVTr.js";
|
|
12
|
+
import { L as Ee } from "./log-in-OQUEoGhX.js";
|
|
13
|
+
import { c as V } from "./createLucideIcon-DhHxpK9K.js";
|
|
14
|
+
/**
|
|
15
|
+
* @license lucide-react v1.22.0 - ISC
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the ISC license.
|
|
18
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/
|
|
20
|
+
const Le = [
|
|
21
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
22
|
+
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
23
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
24
|
+
], Se = V("circle-question-mark", Le);
|
|
25
|
+
/**
|
|
26
|
+
* @license lucide-react v1.22.0 - ISC
|
|
27
|
+
*
|
|
28
|
+
* This source code is licensed under the ISC license.
|
|
29
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
30
|
+
*/
|
|
31
|
+
const Ne = [
|
|
32
|
+
["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
|
|
33
|
+
[
|
|
34
|
+
"path",
|
|
35
|
+
{
|
|
36
|
+
d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",
|
|
37
|
+
key: "r6nss1"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
], Re = V("house", Ne), Te = [
|
|
41
|
+
400,
|
|
42
|
+
401,
|
|
43
|
+
403,
|
|
44
|
+
404,
|
|
45
|
+
405,
|
|
46
|
+
410,
|
|
47
|
+
419,
|
|
48
|
+
429,
|
|
49
|
+
500,
|
|
50
|
+
502,
|
|
51
|
+
503,
|
|
52
|
+
504,
|
|
53
|
+
"offline",
|
|
54
|
+
"maintenance"
|
|
55
|
+
], j = {
|
|
56
|
+
400: { key: "badRequest", mood: "jumbled", primary: "home" },
|
|
57
|
+
401: { key: "unauthorised", mood: "locked", primary: "login" },
|
|
58
|
+
403: { key: "forbidden", mood: "roped", primary: "home" },
|
|
59
|
+
404: { key: "notFound", mood: "lost", primary: "home" },
|
|
60
|
+
405: { key: "methodNotAllowed", mood: "wrong-way", primary: "home" },
|
|
61
|
+
410: { key: "gone", mood: "vanished", primary: "home" },
|
|
62
|
+
419: { key: "expired", mood: "asleep", primary: "login" },
|
|
63
|
+
429: { key: "tooManyRequests", mood: "melt", primary: "retry" },
|
|
64
|
+
500: { key: "serverError", mood: "patched", primary: "retry" },
|
|
65
|
+
502: { key: "badGateway", mood: "unplugged", primary: "retry" },
|
|
66
|
+
503: { key: "maintenance", mood: "rebuild", primary: "retry" },
|
|
67
|
+
504: { key: "timeout", mood: "snail", primary: "retry" },
|
|
68
|
+
offline: { key: "offline", mood: "adrift", primary: "retry" },
|
|
69
|
+
maintenance: { key: "maintenance", mood: "rebuild", primary: "retry" },
|
|
70
|
+
generic: { key: "generic", mood: "puzzled", primary: "home" }
|
|
71
|
+
};
|
|
72
|
+
function Ce(e) {
|
|
73
|
+
return Te.includes(e) ? j[e] : j.generic;
|
|
74
|
+
}
|
|
75
|
+
const Ie = {
|
|
76
|
+
statusLabel: "Error {{status}}",
|
|
77
|
+
reference: "Reference: {{id}}",
|
|
78
|
+
referenceHint: "If you contact support, quote this reference.",
|
|
79
|
+
backAt: "We expect to be back by {{time}}.",
|
|
80
|
+
actions: {
|
|
81
|
+
home: "Go to the home page",
|
|
82
|
+
retry: "Try again",
|
|
83
|
+
login: "Log in",
|
|
84
|
+
support: "Contact support"
|
|
85
|
+
},
|
|
86
|
+
status: {
|
|
87
|
+
badRequest: {
|
|
88
|
+
title: "We couldn't handle that request",
|
|
89
|
+
message: "Something in the request was not right. Please try again."
|
|
90
|
+
},
|
|
91
|
+
unauthorised: {
|
|
92
|
+
title: "Please log in",
|
|
93
|
+
message: "You need to log in to see this page."
|
|
94
|
+
},
|
|
95
|
+
forbidden: {
|
|
96
|
+
title: "You don't have access to this page",
|
|
97
|
+
message: "If you think you should, contact support."
|
|
98
|
+
},
|
|
99
|
+
notFound: {
|
|
100
|
+
title: "We can't find this page",
|
|
101
|
+
message: "The link may be wrong, or the page may have moved."
|
|
102
|
+
},
|
|
103
|
+
methodNotAllowed: {
|
|
104
|
+
title: "This page can't be opened this way",
|
|
105
|
+
message: "Go to the home page and try again from there."
|
|
106
|
+
},
|
|
107
|
+
gone: {
|
|
108
|
+
title: "This page is no longer available",
|
|
109
|
+
message: "It has been removed."
|
|
110
|
+
},
|
|
111
|
+
expired: {
|
|
112
|
+
title: "This page has expired",
|
|
113
|
+
message: "For your security, please start again."
|
|
114
|
+
},
|
|
115
|
+
tooManyRequests: {
|
|
116
|
+
title: "Too many attempts",
|
|
117
|
+
message: "Please wait a minute, then try again."
|
|
118
|
+
},
|
|
119
|
+
serverError: {
|
|
120
|
+
title: "Something went wrong on our side",
|
|
121
|
+
message: "It's not your fault. Please try again in a few minutes."
|
|
122
|
+
},
|
|
123
|
+
badGateway: {
|
|
124
|
+
title: "We can't reach the service right now",
|
|
125
|
+
message: "Please try again in a few minutes."
|
|
126
|
+
},
|
|
127
|
+
maintenance: {
|
|
128
|
+
title: "We're doing some maintenance",
|
|
129
|
+
message: "We'll be back soon. Thanks for your patience."
|
|
130
|
+
},
|
|
131
|
+
timeout: {
|
|
132
|
+
title: "This is taking too long",
|
|
133
|
+
message: "The service didn't answer in time. Please try again."
|
|
134
|
+
},
|
|
135
|
+
offline: {
|
|
136
|
+
title: "You're offline",
|
|
137
|
+
message: "Check your internet connection, then try again."
|
|
138
|
+
},
|
|
139
|
+
generic: {
|
|
140
|
+
title: "Something went wrong",
|
|
141
|
+
message: "Please try again, or go to the home page."
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}, _e = "alfadocs-ui.locale", ze = "it", $e = (e) => {
|
|
145
|
+
if (!e) return;
|
|
146
|
+
const a = e.toLowerCase().replaceAll("_", "-").split("-")[0], n = a === "cn" ? "zh" : a;
|
|
147
|
+
return Pe.includes(n) ? n : void 0;
|
|
148
|
+
}, Be = () => {
|
|
149
|
+
try {
|
|
150
|
+
return window.localStorage.getItem(_e);
|
|
151
|
+
} catch {
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
function De(e = {}) {
|
|
156
|
+
var f;
|
|
157
|
+
const a = typeof window < "u", n = e.saved !== void 0 ? e.saved : a ? Be() : null, m = e.browser ?? (a && typeof navigator < "u" ? (f = navigator.languages) != null && f.length ? navigator.languages : [navigator.language] : []), h = e.document ?? (typeof document < "u" ? document.documentElement.lang : ""), b = [
|
|
158
|
+
e.locale,
|
|
159
|
+
n,
|
|
160
|
+
...m,
|
|
161
|
+
e.hostLocaleIsDefault ? void 0 : h
|
|
162
|
+
];
|
|
163
|
+
for (const v of b) {
|
|
164
|
+
const p = $e(v);
|
|
165
|
+
if (p) return p;
|
|
166
|
+
}
|
|
167
|
+
return ze;
|
|
168
|
+
}
|
|
169
|
+
const H = (e, a) => we(e, a), Fe = pe(
|
|
170
|
+
"ds:flex ds:flex-col ds:items-center ds:justify-center ds:bg-[var(--background)] ds:text-[var(--foreground)] ds:px-[var(--spacing-md)] ds:py-[var(--spacing-2xl)]",
|
|
171
|
+
{
|
|
172
|
+
variants: {
|
|
173
|
+
layout: {
|
|
174
|
+
/** Fills the viewport: the whole page is the error. */
|
|
175
|
+
page: "ds:min-h-screen",
|
|
176
|
+
/** Fills its container, under the host's own header. */
|
|
177
|
+
embedded: "ds:[min-block-size:100%]"
|
|
178
|
+
},
|
|
179
|
+
surface: {
|
|
180
|
+
/** The page background. */
|
|
181
|
+
background: "",
|
|
182
|
+
/** A card's surface, for a page set inside a `Card`. The mark
|
|
183
|
+
* cuts its holes with `--background`, so that is re-pointed too. */
|
|
184
|
+
card: "ds:[--background:var(--card)] ds:[--foreground:var(--card-foreground)]"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
defaultVariants: { layout: "page", surface: "background" }
|
|
188
|
+
}
|
|
189
|
+
), Ge = /* @__PURE__ */ new Set(["ar"]), Ae = 1500;
|
|
190
|
+
function Me(e, a) {
|
|
191
|
+
const n = e instanceof Date ? e : new Date(e);
|
|
192
|
+
if (Number.isNaN(n.getTime())) return;
|
|
193
|
+
const m = /* @__PURE__ */ new Date(), h = m.toDateString() === n.toDateString() ? {} : {
|
|
194
|
+
day: "numeric",
|
|
195
|
+
month: "short",
|
|
196
|
+
...m.getFullYear() === n.getFullYear() ? {} : { year: "numeric" }
|
|
197
|
+
};
|
|
198
|
+
return new Intl.DateTimeFormat(a === "en" ? "en-GB" : a, {
|
|
199
|
+
...h,
|
|
200
|
+
hour: "2-digit",
|
|
201
|
+
minute: "2-digit"
|
|
202
|
+
}).format(n);
|
|
203
|
+
}
|
|
204
|
+
const _ = (e, a) => !!e.getResource(a, "ui", "errorPage"), O = (e) => ve(e) ? e : "#", qe = ue(
|
|
205
|
+
({
|
|
206
|
+
status: e,
|
|
207
|
+
homeHref: a = "/",
|
|
208
|
+
loginHref: n,
|
|
209
|
+
supportHref: m,
|
|
210
|
+
onRetry: h,
|
|
211
|
+
requestId: b,
|
|
212
|
+
backAt: f,
|
|
213
|
+
locale: v,
|
|
214
|
+
hostLocaleIsDefault: p = !1,
|
|
215
|
+
title: U,
|
|
216
|
+
message: K,
|
|
217
|
+
primaryAction: s,
|
|
218
|
+
showHomeLink: Q = !0,
|
|
219
|
+
mood: J,
|
|
220
|
+
showStatusLabel: X = !0,
|
|
221
|
+
showLogo: Z = !0,
|
|
222
|
+
as: ee,
|
|
223
|
+
focusHeading: z = !0,
|
|
224
|
+
focusKey: te,
|
|
225
|
+
scrollOnFocus: $ = !1,
|
|
226
|
+
headingLevel: re = 1,
|
|
227
|
+
layout: ae,
|
|
228
|
+
surface: B,
|
|
229
|
+
className: oe,
|
|
230
|
+
...ne
|
|
231
|
+
}, se) => {
|
|
232
|
+
const { i18n: d } = fe("ui", { useSuspense: !1 }), o = ge(
|
|
233
|
+
() => De({ locale: v, hostLocaleIsDefault: p }),
|
|
234
|
+
[v, p]
|
|
235
|
+
), [k, D] = W(() => ({
|
|
236
|
+
for: o,
|
|
237
|
+
shown: _(d, o) ? o : null
|
|
238
|
+
})), i = k.shown, [, ie] = W(0);
|
|
239
|
+
I(() => {
|
|
240
|
+
let r = !0;
|
|
241
|
+
const P = _(d, o), x = (l) => D(
|
|
242
|
+
(C) => C.for === o && C.shown === l ? C : { for: o, shown: l }
|
|
243
|
+
), E = () => D(
|
|
244
|
+
(l) => l.for === o && l.shown ? l : { for: o, shown: "en" }
|
|
245
|
+
);
|
|
246
|
+
x(P ? o : null), _(d, "en") || d.addResourceBundle(
|
|
247
|
+
"en",
|
|
248
|
+
"ui",
|
|
249
|
+
{ errorPage: Ie },
|
|
250
|
+
!0,
|
|
251
|
+
!1
|
|
252
|
+
);
|
|
253
|
+
const q = () => r && ie((l) => l + 1);
|
|
254
|
+
H("en", d).then(q).catch(() => {
|
|
255
|
+
});
|
|
256
|
+
const me = P ? void 0 : setTimeout(() => r && E(), Ae);
|
|
257
|
+
return H(o, d).then(() => {
|
|
258
|
+
r && (x(o), q());
|
|
259
|
+
}).catch(() => r && E()), () => {
|
|
260
|
+
r = !1, clearTimeout(me);
|
|
261
|
+
};
|
|
262
|
+
}, [d, o]);
|
|
263
|
+
const c = d.getFixedT(
|
|
264
|
+
i && i !== "en" ? [i, "en"] : "en",
|
|
265
|
+
"ui"
|
|
266
|
+
), u = Ce(e), N = u.key === "maintenance" && f ? Me(f, i ?? "en") : void 0, F = Y(null), y = he(), R = `${String(e)}:${te ?? ""}`, G = Y(null);
|
|
267
|
+
I(() => {
|
|
268
|
+
if (!z || !k.shown || k.for !== o || G.current === R) return;
|
|
269
|
+
G.current = R;
|
|
270
|
+
const r = F.current;
|
|
271
|
+
r == null || r.focus({ preventScroll: !0 }), $ && (r == null || r.scrollIntoView({ block: "nearest" }));
|
|
272
|
+
}, [k, o, z, R, $]);
|
|
273
|
+
const de = ["h1", "h2", "h3"][re - 1], A = s !== void 0 && (typeof s.label != "string" || s.label.trim() === "");
|
|
274
|
+
I(() => {
|
|
275
|
+
A && be() && console.warn(
|
|
276
|
+
"ErrorPage: `primaryAction.label` is empty, so its button has no accessible name. Pass the label, already translated."
|
|
277
|
+
);
|
|
278
|
+
}, [A]);
|
|
279
|
+
const M = B === "card", ce = ee ?? (M ? "div" : "main"), le = h ?? (() => window.location.reload()), w = u.primary === "login" && !n ? "retry" : u.primary, T = (r, P, x, E) => /* @__PURE__ */ t(
|
|
280
|
+
S,
|
|
281
|
+
{
|
|
282
|
+
intent: E,
|
|
283
|
+
size: "lg",
|
|
284
|
+
flipIconInRtl: r === "login",
|
|
285
|
+
asChild: !0,
|
|
286
|
+
startIcon: x,
|
|
287
|
+
"data-action": r,
|
|
288
|
+
children: /* @__PURE__ */ t("a", { href: O(P), children: c(`errorPage.actions.${r}`) })
|
|
289
|
+
},
|
|
290
|
+
r
|
|
291
|
+
), g = [];
|
|
292
|
+
return s ? g.push(
|
|
293
|
+
typeof s.href == "string" ? /* @__PURE__ */ t(
|
|
294
|
+
S,
|
|
295
|
+
{
|
|
296
|
+
intent: "primary",
|
|
297
|
+
size: "lg",
|
|
298
|
+
asChild: !0,
|
|
299
|
+
startIcon: s.icon,
|
|
300
|
+
"data-action": "custom",
|
|
301
|
+
children: /* @__PURE__ */ t(
|
|
302
|
+
"a",
|
|
303
|
+
{
|
|
304
|
+
href: O(s.href),
|
|
305
|
+
onClick: s.onClick,
|
|
306
|
+
children: s.label
|
|
307
|
+
}
|
|
308
|
+
)
|
|
309
|
+
},
|
|
310
|
+
"custom"
|
|
311
|
+
) : /* @__PURE__ */ t(
|
|
312
|
+
S,
|
|
313
|
+
{
|
|
314
|
+
intent: "primary",
|
|
315
|
+
size: "lg",
|
|
316
|
+
startIcon: s.icon,
|
|
317
|
+
onClick: s.onClick,
|
|
318
|
+
"data-action": "custom",
|
|
319
|
+
children: s.label
|
|
320
|
+
},
|
|
321
|
+
"custom"
|
|
322
|
+
)
|
|
323
|
+
) : w === "retry" ? g.push(
|
|
324
|
+
/* @__PURE__ */ t(
|
|
325
|
+
S,
|
|
326
|
+
{
|
|
327
|
+
intent: "primary",
|
|
328
|
+
size: "lg",
|
|
329
|
+
startIcon: /* @__PURE__ */ t(xe, { "aria-hidden": "true" }),
|
|
330
|
+
onClick: le,
|
|
331
|
+
"data-action": "retry",
|
|
332
|
+
children: c("errorPage.actions.retry")
|
|
333
|
+
},
|
|
334
|
+
"retry"
|
|
335
|
+
)
|
|
336
|
+
) : w === "login" && n && g.push(
|
|
337
|
+
T("login", n, /* @__PURE__ */ t(Ee, { "aria-hidden": "true" }), "primary")
|
|
338
|
+
), Q && e !== "offline" && u.key !== "maintenance" && !(s && w === "home") && g.push(
|
|
339
|
+
T(
|
|
340
|
+
"home",
|
|
341
|
+
a,
|
|
342
|
+
/* @__PURE__ */ t(Re, { "aria-hidden": "true" }),
|
|
343
|
+
w === "home" ? "primary" : "secondary"
|
|
344
|
+
)
|
|
345
|
+
), m && g.push(
|
|
346
|
+
T(
|
|
347
|
+
"support",
|
|
348
|
+
m,
|
|
349
|
+
/* @__PURE__ */ t(Se, { "aria-hidden": "true" }),
|
|
350
|
+
"ghost"
|
|
351
|
+
)
|
|
352
|
+
), /* @__PURE__ */ t(
|
|
353
|
+
ce,
|
|
354
|
+
{
|
|
355
|
+
ref: se,
|
|
356
|
+
"data-component": "error-page",
|
|
357
|
+
"data-status": String(e),
|
|
358
|
+
lang: i ?? void 0,
|
|
359
|
+
"aria-busy": i ? void 0 : !0,
|
|
360
|
+
dir: i && Ge.has(i) ? "rtl" : "ltr",
|
|
361
|
+
className: Fe({
|
|
362
|
+
layout: ae ?? (M ? "embedded" : void 0),
|
|
363
|
+
surface: B,
|
|
364
|
+
className: oe
|
|
365
|
+
}),
|
|
366
|
+
...ne,
|
|
367
|
+
children: /* @__PURE__ */ L(
|
|
368
|
+
"div",
|
|
369
|
+
{
|
|
370
|
+
className: i ? "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-lg)] ds:text-center ds:[max-inline-size:32rem]" : "ds:invisible",
|
|
371
|
+
children: [
|
|
372
|
+
/* @__PURE__ */ t(ke, { mood: J ?? u.mood }),
|
|
373
|
+
/* @__PURE__ */ L("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
374
|
+
/* @__PURE__ */ L(
|
|
375
|
+
de,
|
|
376
|
+
{
|
|
377
|
+
ref: F,
|
|
378
|
+
tabIndex: -1,
|
|
379
|
+
"aria-describedby": N ? `${y}-message ${y}-back` : `${y}-message`,
|
|
380
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:outline-none",
|
|
381
|
+
children: [
|
|
382
|
+
X && typeof e == "number" && /* @__PURE__ */ t("span", { className: "type-label ds:text-[var(--muted-foreground)]", children: c("errorPage.statusLabel", { status: e }) }),
|
|
383
|
+
/* @__PURE__ */ t("span", { className: "type-title-page", children: U ?? c(`errorPage.status.${u.key}.title`) })
|
|
384
|
+
]
|
|
385
|
+
}
|
|
386
|
+
),
|
|
387
|
+
/* @__PURE__ */ t(
|
|
388
|
+
"p",
|
|
389
|
+
{
|
|
390
|
+
id: `${y}-message`,
|
|
391
|
+
className: "type-body ds:text-[var(--muted-foreground)]",
|
|
392
|
+
children: K ?? c(`errorPage.status.${u.key}.message`)
|
|
393
|
+
}
|
|
394
|
+
),
|
|
395
|
+
N && /* @__PURE__ */ t("p", { id: `${y}-back`, className: "type-body ds:font-semibold", children: c("errorPage.backAt", { time: N }) })
|
|
396
|
+
] }),
|
|
397
|
+
g.length > 0 && /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-center ds:gap-[var(--spacing-sm)]", children: g }),
|
|
398
|
+
b && /* @__PURE__ */ L("p", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: [
|
|
399
|
+
c("errorPage.reference", { id: b }),
|
|
400
|
+
/* @__PURE__ */ t("br", {}),
|
|
401
|
+
c("errorPage.referenceHint")
|
|
402
|
+
] }),
|
|
403
|
+
Z && /* @__PURE__ */ t(ye, { decorative: !0, size: "sm", className: "ds:opacity-70" })
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
)
|
|
407
|
+
}
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
);
|
|
411
|
+
qe.displayName = "ErrorPage";
|
|
412
|
+
export {
|
|
413
|
+
ze as E,
|
|
414
|
+
Te as a,
|
|
415
|
+
qe as b,
|
|
416
|
+
Ce as e,
|
|
417
|
+
De as r
|
|
418
|
+
};
|
|
419
|
+
//# sourceMappingURL=error-page-B0fGNTRB.js.map
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
import { c as e } from "./createLucideIcon-DhHxpK9K.js";
|
|
2
|
-
/**
|
|
3
|
-
* @license lucide-react v1.22.0 - ISC
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the ISC license.
|
|
6
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
const t = [
|
|
9
|
-
["rect", { width: "20", height: "12", x: "2", y: "6", rx: "2", key: "9lu3g6" }],
|
|
10
|
-
["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }],
|
|
11
|
-
["path", { d: "M6 12h.01M18 12h.01", key: "113zkx" }]
|
|
12
|
-
], h = e("banknote", t);
|
|
13
2
|
/**
|
|
14
3
|
* @license lucide-react v1.22.0 - ISC
|
|
15
4
|
*
|
|
@@ -23,9 +12,8 @@ const a = [
|
|
|
23
12
|
["path", { d: "M7 2h1", key: "1t2jsx" }],
|
|
24
13
|
["path", { d: "m22 22-5-10-5 10", key: "don7ne" }],
|
|
25
14
|
["path", { d: "M14 18h6", key: "1m8k6r" }]
|
|
26
|
-
],
|
|
15
|
+
], d = e("languages", a);
|
|
27
16
|
export {
|
|
28
|
-
|
|
29
|
-
o as L
|
|
17
|
+
d as L
|
|
30
18
|
};
|
|
31
|
-
//# sourceMappingURL=languages-
|
|
19
|
+
//# sourceMappingURL=languages-CGLX6Qpe.js.map
|