@alfadocs/ui-kit 0.75.0 → 0.78.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/{address-fields-COyjgqxA.js → address-fields-7k59FnJ6.js} +2 -2
- package/dist/_chunks/{booking-B1Qkcl3c.js → booking-CLmeXtGv.js} +2 -2
- package/dist/_chunks/{country-select-DYHDLEjG.js → country-select-BN9nedAp.js} +2 -2
- package/dist/_chunks/document-preview-nwfulDEs.js +290 -0
- package/dist/_chunks/{file-manager-UF8dkQF1.js → file-manager-DfTG7bxx.js} +394 -399
- package/dist/_chunks/flag-Cnmivlrl.js +641 -0
- package/dist/_chunks/{header-settings-4cwQzeFc.js → header-settings-DMfdx0Vq.js} +2 -2
- package/dist/_chunks/{locale-picker-GNF3lo8K.js → locale-picker-EyvPrwDc.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-D_1tF4La.js → marketplace-app-shell-Bxq1PYAj.js} +2 -2
- package/dist/_chunks/{patient-details-DP4wKyq4.js → patient-details-zy76MRh7.js} +3 -3
- package/dist/_chunks/periodontal-chart-CYBhr9vc.js +1305 -0
- package/dist/_chunks/{phone-input-dtnrvnZf.js → phone-input-D00ZBAm-.js} +2 -2
- package/dist/agent-catalog.json +149 -1
- package/dist/agent-i18n/en.json +2 -0
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/document-preview/document-preview.d.ts +35 -2
- package/dist/components/document-preview/index.d.ts +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/flag/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/periodontal-chart/index.d.ts +2 -2
- package/dist/components/periodontal-chart/index.js +8 -7
- package/dist/components/periodontal-chart/periodontal-chart-data.d.ts +45 -0
- package/dist/components/periodontal-chart/periodontal-chart.d.ts +3 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +8 -1
- package/dist/i18n/locales/ar.js +8 -1
- package/dist/i18n/locales/de.d.ts +8 -1
- package/dist/i18n/locales/de.js +8 -1
- package/dist/i18n/locales/el.d.ts +8 -1
- package/dist/i18n/locales/el.js +8 -1
- package/dist/i18n/locales/en.d.ts +8 -1
- package/dist/i18n/locales/en.js +8 -1
- package/dist/i18n/locales/es.d.ts +8 -1
- package/dist/i18n/locales/es.js +8 -1
- package/dist/i18n/locales/fr.d.ts +8 -1
- package/dist/i18n/locales/fr.js +8 -1
- package/dist/i18n/locales/hi.d.ts +8 -1
- package/dist/i18n/locales/hi.js +8 -1
- package/dist/i18n/locales/it.d.ts +8 -1
- package/dist/i18n/locales/it.js +8 -1
- package/dist/i18n/locales/ja.d.ts +8 -1
- package/dist/i18n/locales/ja.js +8 -1
- package/dist/i18n/locales/nl.d.ts +8 -1
- package/dist/i18n/locales/nl.js +8 -1
- package/dist/i18n/locales/pl.d.ts +8 -1
- package/dist/i18n/locales/pl.js +8 -1
- package/dist/i18n/locales/pt.d.ts +8 -1
- package/dist/i18n/locales/pt.js +8 -1
- package/dist/i18n/locales/ro.d.ts +8 -1
- package/dist/i18n/locales/ro.js +8 -1
- package/dist/i18n/locales/ru.d.ts +8 -1
- package/dist/i18n/locales/ru.js +8 -1
- package/dist/i18n/locales/sq.d.ts +8 -1
- package/dist/i18n/locales/sq.js +8 -1
- package/dist/i18n/locales/sv.d.ts +8 -1
- package/dist/i18n/locales/sv.js +8 -1
- package/dist/i18n/locales/tr.d.ts +8 -1
- package/dist/i18n/locales/tr.js +8 -1
- package/dist/i18n/locales/zh.d.ts +8 -1
- package/dist/i18n/locales/zh.js +8 -1
- package/dist/index.js +217 -216
- package/dist/locales/ar.json +8 -1
- package/dist/locales/de.json +8 -1
- package/dist/locales/el.json +8 -1
- package/dist/locales/en.json +8 -1
- package/dist/locales/es.json +8 -1
- package/dist/locales/fr.json +8 -1
- package/dist/locales/hi.json +8 -1
- package/dist/locales/it.json +8 -1
- package/dist/locales/ja.json +8 -1
- package/dist/locales/nl.json +8 -1
- package/dist/locales/pl.json +8 -1
- package/dist/locales/pt.json +8 -1
- package/dist/locales/ro.json +8 -1
- package/dist/locales/ru.json +8 -1
- package/dist/locales/sq.json +8 -1
- package/dist/locales/sv.json +8 -1
- package/dist/locales/tr.json +8 -1
- package/dist/locales/zh.json +8 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +2 -1
- package/package.json +1 -1
- package/dist/_chunks/document-preview-CGSM_au9.js +0 -181
- package/dist/_chunks/flag-DZ6V7-hU.js +0 -637
- package/dist/_chunks/periodontal-chart-D8hOFmde.js +0 -1173
package/package.json
CHANGED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import { jsx as i, jsxs as c, Fragment as p } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as P, useMemo as N, useImperativeHandle as b, useRef as D } from "react";
|
|
3
|
-
import { c as I } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as F } from "react-i18next";
|
|
5
|
-
import { B as a } from "./badge-DCOqV9mI.js";
|
|
6
|
-
import { E as A } from "./empty-state-CrLsi0XI.js";
|
|
7
|
-
import { P as S } from "./pdf-viewer-DF3VMaPo.js";
|
|
8
|
-
import { u as B } from "./registry-DvAUVLHh.js";
|
|
9
|
-
import { F as T, a as z } from "./file-Cwe9VC1A.js";
|
|
10
|
-
import { F as k } from "./file-text-5yv6r2ls.js";
|
|
11
|
-
const K = {
|
|
12
|
-
id: "document-preview",
|
|
13
|
-
capabilities: [],
|
|
14
|
-
state: {
|
|
15
|
-
kind: {
|
|
16
|
-
type: "'pdf' | 'image' | 'metadata' | 'empty'",
|
|
17
|
-
descriptionKey: "ui.agent.documentPreview.state.kind",
|
|
18
|
-
description: "Which render branch is active: pdf, image, metadata (no inline preview), or empty (no document). Structural — never the document name.",
|
|
19
|
-
read: (s) => s.getKind()
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
actions: {
|
|
23
|
-
get_name: {
|
|
24
|
-
// phi (not read): resolves the document display name, which can identify
|
|
25
|
-
// patients. PRS §26 — phi outranks read so the host gates it behind
|
|
26
|
-
// stricter confirm + audit. The always-on kind slot stays name-free.
|
|
27
|
-
safety: "phi",
|
|
28
|
-
returns: "string | undefined",
|
|
29
|
-
returnsSchema: { type: ["string", "null"] },
|
|
30
|
-
idempotent: !0,
|
|
31
|
-
descriptionKey: "ui.agent.documentPreview.actions.getName",
|
|
32
|
-
description: "Read the display name of the previewed document. May identify a patient (PHI).",
|
|
33
|
-
invoke: (s) => s.getName()
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
domHooks: {
|
|
37
|
-
root: {
|
|
38
|
-
attr: "data-component",
|
|
39
|
-
value: "document-preview",
|
|
40
|
-
description: "Marks the DocumentPreview region."
|
|
41
|
-
},
|
|
42
|
-
instanceId: {
|
|
43
|
-
attr: "data-component-id",
|
|
44
|
-
sourceProp: "id",
|
|
45
|
-
description: "Sourced from the id prop."
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}, R = I(
|
|
49
|
-
[
|
|
50
|
-
"ds:flex ds:h-full ds:min-h-0 ds:min-w-0 ds:flex-col ds:overflow-auto",
|
|
51
|
-
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
52
|
-
"ds:focus-visible:outline-solid",
|
|
53
|
-
"ds:focus-visible:outline-ring"
|
|
54
|
-
].join(" ")
|
|
55
|
-
), M = {
|
|
56
|
-
signed: "success",
|
|
57
|
-
pending: "warning"
|
|
58
|
-
};
|
|
59
|
-
function E(s, n, o) {
|
|
60
|
-
if (!s) return "empty";
|
|
61
|
-
const r = n ?? "";
|
|
62
|
-
return r === "application/pdf" && o ? "pdf" : r.startsWith("image/") && o ? "image" : "metadata";
|
|
63
|
-
}
|
|
64
|
-
function L(s) {
|
|
65
|
-
const n = s ?? "";
|
|
66
|
-
return n.startsWith("image/") ? T : n === "application/pdf" || n.startsWith("text/") || n.includes("word") ? k : z;
|
|
67
|
-
}
|
|
68
|
-
const _ = [
|
|
69
|
-
"documentPreview.units.bytes",
|
|
70
|
-
"documentPreview.units.kilobytes",
|
|
71
|
-
"documentPreview.units.megabytes",
|
|
72
|
-
"documentPreview.units.gigabytes"
|
|
73
|
-
], g = ["B", "KB", "MB", "GB"];
|
|
74
|
-
function j(s, n, o) {
|
|
75
|
-
let r = s, e = 0;
|
|
76
|
-
for (; r >= 1024 && e < g.length - 1; )
|
|
77
|
-
r /= 1024, e++;
|
|
78
|
-
return `${new Intl.NumberFormat(n, {
|
|
79
|
-
maximumFractionDigits: e === 0 ? 0 : 1
|
|
80
|
-
}).format(r)} ${o(_[e], g[e])}`;
|
|
81
|
-
}
|
|
82
|
-
const V = P(({ id: s, name: n, mimeType: o, src: r, metadata: e, className: f }, v) => {
|
|
83
|
-
const { t, i18n: u } = F(), l = E(n, o, r), m = N(
|
|
84
|
-
() => ({
|
|
85
|
-
getKind: () => l,
|
|
86
|
-
getName: () => n
|
|
87
|
-
}),
|
|
88
|
-
[l, n]
|
|
89
|
-
);
|
|
90
|
-
b(v, () => m, [m]), B(K, m, s);
|
|
91
|
-
const w = D(null), h = (() => {
|
|
92
|
-
if (l === "empty")
|
|
93
|
-
return /* @__PURE__ */ i(
|
|
94
|
-
A,
|
|
95
|
-
{
|
|
96
|
-
variant: "first-use",
|
|
97
|
-
size: "sm",
|
|
98
|
-
title: t("documentPreview.emptyTitle", "No document selected"),
|
|
99
|
-
description: t(
|
|
100
|
-
"documentPreview.emptyDescription",
|
|
101
|
-
"Select a document to preview it here."
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
if (l === "pdf" && r)
|
|
106
|
-
return /* @__PURE__ */ i(
|
|
107
|
-
S,
|
|
108
|
-
{
|
|
109
|
-
src: r,
|
|
110
|
-
toolbarVariant: "minimal",
|
|
111
|
-
ariaLabel: t("documentPreview.pdfLabel", "Document preview"),
|
|
112
|
-
className: "ds:h-full"
|
|
113
|
-
}
|
|
114
|
-
);
|
|
115
|
-
if (l === "image" && r)
|
|
116
|
-
return /* @__PURE__ */ i(
|
|
117
|
-
"img",
|
|
118
|
-
{
|
|
119
|
-
src: r,
|
|
120
|
-
alt: t("documentPreview.imageAlt", "Preview of {{name}}", { name: n }),
|
|
121
|
-
className: "ds:max-h-full ds:max-w-full ds:ms-auto ds:me-auto ds:object-contain"
|
|
122
|
-
}
|
|
123
|
-
);
|
|
124
|
-
const y = L(o), d = e == null ? void 0 : e.signatureStatus, x = !!(e != null && e.documentType) || !!(e != null && e.clinical) || d !== void 0 && d !== "none";
|
|
125
|
-
return /* @__PURE__ */ c("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
|
|
126
|
-
/* @__PURE__ */ c("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
127
|
-
/* @__PURE__ */ i(
|
|
128
|
-
y,
|
|
129
|
-
{
|
|
130
|
-
"aria-hidden": "true",
|
|
131
|
-
className: "ds:size-8 ds:shrink-0 ds:text-muted-foreground"
|
|
132
|
-
}
|
|
133
|
-
),
|
|
134
|
-
/* @__PURE__ */ i("span", { className: "type-title-card ds:min-w-0 ds:truncate", children: n })
|
|
135
|
-
] }),
|
|
136
|
-
x && /* @__PURE__ */ c("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
137
|
-
(e == null ? void 0 : e.documentType) && /* @__PURE__ */ i(a, { variant: "neutral", size: "sm", children: e.documentType }),
|
|
138
|
-
(e == null ? void 0 : e.clinical) && /* @__PURE__ */ i(a, { variant: "info", size: "sm", children: t("documentPreview.clinical", "Clinical") }),
|
|
139
|
-
d && d !== "none" && /* @__PURE__ */ i(a, { variant: M[d], size: "sm", withDot: !0, children: t(`documentPreview.signature.${d}`, d) })
|
|
140
|
-
] }),
|
|
141
|
-
/* @__PURE__ */ c("dl", { className: "ds:grid ds:grid-cols-[auto_1fr] ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] type-body-sm", children: [
|
|
142
|
-
(e == null ? void 0 : e.size) !== void 0 && /* @__PURE__ */ c(p, { children: [
|
|
143
|
-
/* @__PURE__ */ i("dt", { className: "ds:text-muted-foreground", children: t("documentPreview.fields.size", "Size") }),
|
|
144
|
-
/* @__PURE__ */ i("dd", { className: "ds:m-0", children: j(e.size, u.language, t) })
|
|
145
|
-
] }),
|
|
146
|
-
(e == null ? void 0 : e.updatedAt) && /* @__PURE__ */ c(p, { children: [
|
|
147
|
-
/* @__PURE__ */ i("dt", { className: "ds:text-muted-foreground", children: t("documentPreview.fields.modified", "Modified") }),
|
|
148
|
-
/* @__PURE__ */ i("dd", { className: "ds:m-0", children: new Intl.DateTimeFormat(u.language, {
|
|
149
|
-
dateStyle: "medium"
|
|
150
|
-
}).format(new Date(e.updatedAt)) })
|
|
151
|
-
] }),
|
|
152
|
-
(e == null ? void 0 : e.expiresAt) && /* @__PURE__ */ c(p, { children: [
|
|
153
|
-
/* @__PURE__ */ i("dt", { className: "ds:text-muted-foreground", children: t("documentPreview.fields.expires", "Expires") }),
|
|
154
|
-
/* @__PURE__ */ i("dd", { className: "ds:m-0", children: new Intl.DateTimeFormat(u.language, {
|
|
155
|
-
dateStyle: "medium"
|
|
156
|
-
}).format(new Date(e.expiresAt)) })
|
|
157
|
-
] })
|
|
158
|
-
] }),
|
|
159
|
-
/* @__PURE__ */ i("p", { className: "type-body-sm ds:m-0 ds:text-muted-foreground", children: t("documentPreview.noPreview", "No preview available.") })
|
|
160
|
-
] });
|
|
161
|
-
})();
|
|
162
|
-
return /* @__PURE__ */ i(
|
|
163
|
-
"div",
|
|
164
|
-
{
|
|
165
|
-
ref: w,
|
|
166
|
-
"data-component": "document-preview",
|
|
167
|
-
"data-component-id": s,
|
|
168
|
-
tabIndex: 0,
|
|
169
|
-
role: "group",
|
|
170
|
-
"aria-label": t("documentPreview.regionLabel", "Document preview"),
|
|
171
|
-
className: R({ className: f }),
|
|
172
|
-
children: h
|
|
173
|
-
}
|
|
174
|
-
);
|
|
175
|
-
});
|
|
176
|
-
V.displayName = "DocumentPreview";
|
|
177
|
-
export {
|
|
178
|
-
V as D,
|
|
179
|
-
K as d
|
|
180
|
-
};
|
|
181
|
-
//# sourceMappingURL=document-preview-CGSM_au9.js.map
|