@alfadocs/ui-kit 0.73.0 → 0.77.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 (199) hide show
  1. package/dist/_chunks/actions-cell-renderer-DLrcSTK_.js +1546 -0
  2. package/dist/_chunks/{address-fields-COyjgqxA.js → address-fields-7k59FnJ6.js} +2 -2
  3. package/dist/_chunks/{ai-prompt-input-DFm58UjY.js → ai-prompt-input-DziJCGLe.js} +2 -2
  4. package/dist/_chunks/{audio-recorder-CjAY0GAc.js → audio-recorder-Cc3KuL9y.js} +2 -2
  5. package/dist/_chunks/{bishop-score-Bs6t6Zv1.js → bishop-score-DDW5-gb9.js} +2 -2
  6. package/dist/_chunks/{booking-CWnZhZ5g.js → booking-CLmeXtGv.js} +3 -3
  7. package/dist/_chunks/{care-plan-card-CfIP3Vc1.js → care-plan-card-BrwhyIJI.js} +2 -2
  8. package/dist/_chunks/{care-plan-entry-card-CRbS-G00.js → care-plan-entry-card-DWEdCQM3.js} +2 -2
  9. package/dist/_chunks/{country-select-DYHDLEjG.js → country-select-BN9nedAp.js} +2 -2
  10. package/dist/_chunks/data-table-tabs-BEUXiRlu.js +710 -0
  11. package/dist/_chunks/document-preview-CvHnHf6T.js +243 -0
  12. package/dist/_chunks/{document-scanner-BE6Jz4Ob.js → document-scanner-B6h1Ir56.js} +2 -2
  13. package/dist/_chunks/{field-value-DCXJXKab.js → field-value-DHG6gEKS.js} +2 -2
  14. package/dist/_chunks/file-Cwe9VC1A.js +40 -0
  15. package/dist/_chunks/file-manager-DfTG7bxx.js +1771 -0
  16. package/dist/_chunks/{file-upload-B2SXhRiN.js → file-upload-DENvuhfs.js} +98 -129
  17. package/dist/_chunks/flag-Cnmivlrl.js +641 -0
  18. package/dist/_chunks/{gestational-age-calculator-C9Dfis4I.js → gestational-age-calculator-BpYw-WF-.js} +2 -2
  19. package/dist/_chunks/{header-settings-CRQDCYgr.js → header-settings-DMfdx0Vq.js} +2 -2
  20. package/dist/_chunks/{icon-picker-BePK27S-.js → icon-picker-CM9ubkew.js} +2 -2
  21. package/dist/_chunks/link-cell-renderer-BQGUs45d.js +711 -0
  22. package/dist/_chunks/{locale-picker-Cbfqc0_N.js → locale-picker-EyvPrwDc.js} +3 -3
  23. package/dist/_chunks/{marketplace-app-shell-Dm6S-hun.js → marketplace-app-shell-Bxq1PYAj.js} +3 -3
  24. package/dist/_chunks/{muscle-scheme-B9MIkuj0.js → muscle-scheme-CFBE2dme.js} +6 -14
  25. package/dist/_chunks/{notes-panel-B_8-Mebz.js → notes-panel-Cvdp818a.js} +2 -2
  26. package/dist/_chunks/{optical-prescription-BQ75_kf6.js → optical-prescription-BEjYQjiO.js} +2 -2
  27. package/dist/_chunks/{patient-details-JkOI3Ijd.js → patient-details-zy76MRh7.js} +5 -5
  28. package/dist/_chunks/{patient-summary-card-CQOLMH3E.js → patient-summary-card-D6kgdTNn.js} +2 -2
  29. package/dist/_chunks/{patient-table-B_mOe-ZT.js → patient-table-DweKjiXg.js} +122 -118
  30. package/dist/_chunks/periodontal-chart-CYBhr9vc.js +1305 -0
  31. package/dist/_chunks/periodontal-diagnosis-cco40xTa.js +345 -0
  32. package/dist/_chunks/periodontal-risk-chart-bUGkMwDg.js +334 -0
  33. package/dist/_chunks/{phone-input-dtnrvnZf.js → phone-input-D00ZBAm-.js} +2 -2
  34. package/dist/_chunks/{popover-DGTKfLWh.js → popover-Cc0a69sw.js} +31 -28
  35. package/dist/_chunks/{pregnancy-dating-IsDVfqJX.js → pregnancy-dating-msMl_6wz.js} +2 -2
  36. package/dist/_chunks/{radiograph-panel.agent-e488ooH8.js → radiograph-panel.agent-CxF9pVxd.js} +2 -2
  37. package/dist/_chunks/{rich-text-editor-CgA2bYwi.js → rich-text-editor-CCWjNkbx.js} +186 -177
  38. package/dist/_chunks/{select-BmCbJMJS.js → select-BW5ecXlX.js} +13 -13
  39. package/dist/_chunks/{sidebar-CtU35PIX.js → sidebar-C0PbwJBc.js} +357 -320
  40. package/dist/_chunks/signature-request-C-mskXwi.js +318 -0
  41. package/dist/_chunks/{tabs-DVQ941Sj.js → tabs-CVTukWRD.js} +2 -2
  42. package/dist/_chunks/{tasks-panel-LCK5ZXvU.js → tasks-panel-CjGAhIN8.js} +2 -2
  43. package/dist/_chunks/tooth-data-BwuoKFf4.js +660 -0
  44. package/dist/_chunks/tooth-scheme-BzJ6rcte.js +1483 -0
  45. package/dist/_chunks/{unit-converter-3uL_tMCm.js → unit-converter-CSLWFDQh.js} +2 -2
  46. package/dist/agent-catalog.json +1430 -213
  47. package/dist/agent-i18n/en.json +86 -5
  48. package/dist/components/_shared/entity-card/entity-card.d.ts +1 -1
  49. package/dist/components/address-fields/index.js +1 -1
  50. package/dist/components/ai-prompt-input/index.js +1 -1
  51. package/dist/components/anamnesis-card/anamnesis-card.d.ts +1 -1
  52. package/dist/components/appointment-card/appointment-card.d.ts +1 -1
  53. package/dist/components/audio-recorder/index.js +1 -1
  54. package/dist/components/bishop-score/index.js +1 -1
  55. package/dist/components/booking/index.js +1 -1
  56. package/dist/components/card/card.d.ts +1 -1
  57. package/dist/components/care-plan-card/index.js +1 -1
  58. package/dist/components/care-plan-entry-card/index.js +1 -1
  59. package/dist/components/clinical-note-card/clinical-note-card.d.ts +1 -1
  60. package/dist/components/contact-profile-card/contact-profile-card.d.ts +1 -1
  61. package/dist/components/country-select/index.js +1 -1
  62. package/dist/components/data-table/index.js +35 -34
  63. package/dist/components/data-table/toolbar.d.ts +1 -1
  64. package/dist/components/data-table-tabs/data-table-tabs.agent.d.ts +4 -0
  65. package/dist/components/data-table-tabs/data-table-tabs.d.ts +93 -0
  66. package/dist/components/data-table-tabs/index.d.ts +5 -0
  67. package/dist/components/data-table-tabs/index.js +8 -0
  68. package/dist/components/data-table-tabs/use-data-table-filter-tabs.d.ts +63 -0
  69. package/dist/components/document-preview/document-preview.agent.d.ts +4 -0
  70. package/dist/components/document-preview/document-preview.d.ts +64 -0
  71. package/dist/components/document-preview/index.d.ts +4 -0
  72. package/dist/components/document-preview/index.js +6 -0
  73. package/dist/components/document-scanner/index.js +1 -1
  74. package/dist/components/file-manager/dialogs.d.ts +48 -0
  75. package/dist/components/file-manager/file-manager.agent.d.ts +4 -0
  76. package/dist/components/file-manager/file-manager.d.ts +82 -0
  77. package/dist/components/file-manager/folder-tree.d.ts +12 -0
  78. package/dist/components/file-manager/index.d.ts +5 -0
  79. package/dist/components/file-manager/index.js +6 -0
  80. package/dist/components/file-manager/list-view.d.ts +49 -0
  81. package/dist/components/file-manager/toolbar.d.ts +15 -0
  82. package/dist/components/file-manager/types.d.ts +167 -0
  83. package/dist/components/file-manager/utils.d.ts +34 -0
  84. package/dist/components/file-upload/index.js +1 -1
  85. package/dist/components/flag/index.js +1 -1
  86. package/dist/components/gestational-age-calculator/index.js +1 -1
  87. package/dist/components/header-settings/index.js +1 -1
  88. package/dist/components/icon-picker/index.js +1 -1
  89. package/dist/components/index.d.ts +7 -0
  90. package/dist/components/locale-picker/index.js +1 -1
  91. package/dist/components/message-card/message-card.d.ts +1 -1
  92. package/dist/components/muscle-scheme/index.js +1 -1
  93. package/dist/components/notes-panel/index.js +1 -1
  94. package/dist/components/notification-card/notification-card.d.ts +1 -1
  95. package/dist/components/operator-hero/operator-hero.d.ts +1 -1
  96. package/dist/components/optical-prescription/index.js +1 -1
  97. package/dist/components/patient-details/index.js +1 -1
  98. package/dist/components/patient-summary-card/index.js +1 -1
  99. package/dist/components/patient-summary-card/patient-summary-card.d.ts +1 -1
  100. package/dist/components/patient-table/index.js +1 -1
  101. package/dist/components/payment-card/payment-card.d.ts +1 -1
  102. package/dist/components/payment-card/payment-request-card.d.ts +1 -1
  103. package/dist/components/periodontal-chart/index.d.ts +6 -0
  104. package/dist/components/periodontal-chart/index.js +23 -0
  105. package/dist/components/periodontal-chart/periodontal-chart-data.d.ts +164 -0
  106. package/dist/components/periodontal-chart/periodontal-chart.agent.d.ts +4 -0
  107. package/dist/components/periodontal-chart/periodontal-chart.d.ts +71 -0
  108. package/dist/components/periodontal-chart-card/periodontal-chart-card.d.ts +1 -1
  109. package/dist/components/periodontal-diagnosis/index.d.ts +6 -0
  110. package/dist/components/periodontal-diagnosis/index.js +13 -0
  111. package/dist/components/periodontal-diagnosis/periodontal-diagnosis-data.d.ts +30 -0
  112. package/dist/components/periodontal-diagnosis/periodontal-diagnosis.agent.d.ts +4 -0
  113. package/dist/components/periodontal-diagnosis/periodontal-diagnosis.d.ts +44 -0
  114. package/dist/components/periodontal-risk-chart/index.d.ts +6 -0
  115. package/dist/components/periodontal-risk-chart/index.js +9 -0
  116. package/dist/components/periodontal-risk-chart/periodontal-risk-chart.agent.d.ts +4 -0
  117. package/dist/components/periodontal-risk-chart/periodontal-risk-chart.d.ts +28 -0
  118. package/dist/components/periodontal-risk-chart/periodontal-risk-data.d.ts +47 -0
  119. package/dist/components/phone-input/index.js +1 -1
  120. package/dist/components/popover/index.js +1 -1
  121. package/dist/components/popover/popover.d.ts +1 -0
  122. package/dist/components/pregnancy-dating/index.js +1 -1
  123. package/dist/components/product-hub-tray/product-hub-panel.d.ts +1 -1
  124. package/dist/components/radiograph-panel/index.js +1 -1
  125. package/dist/components/rich-text-editor/index.js +1 -1
  126. package/dist/components/select/index.js +1 -1
  127. package/dist/components/sidebar/index.js +1 -1
  128. package/dist/components/sidebar/sidebar.d.ts +9 -0
  129. package/dist/components/skeleton-scheme/index.js +5 -13
  130. package/dist/components/stat/stat.d.ts +1 -1
  131. package/dist/components/tabs/index.js +1 -1
  132. package/dist/components/tasks-panel/index.js +1 -1
  133. package/dist/components/tooth-scheme/index.js +29 -28
  134. package/dist/components/unit-converter/index.js +1 -1
  135. package/dist/i18n/locales/ar.d.ts +321 -0
  136. package/dist/i18n/locales/ar.js +321 -0
  137. package/dist/i18n/locales/de.d.ts +321 -0
  138. package/dist/i18n/locales/de.js +321 -0
  139. package/dist/i18n/locales/el.d.ts +321 -0
  140. package/dist/i18n/locales/el.js +321 -0
  141. package/dist/i18n/locales/en.d.ts +321 -0
  142. package/dist/i18n/locales/en.js +321 -0
  143. package/dist/i18n/locales/es.d.ts +321 -0
  144. package/dist/i18n/locales/es.js +321 -0
  145. package/dist/i18n/locales/fr.d.ts +321 -0
  146. package/dist/i18n/locales/fr.js +321 -0
  147. package/dist/i18n/locales/hi.d.ts +321 -0
  148. package/dist/i18n/locales/hi.js +321 -0
  149. package/dist/i18n/locales/it.d.ts +321 -0
  150. package/dist/i18n/locales/it.js +321 -0
  151. package/dist/i18n/locales/ja.d.ts +321 -0
  152. package/dist/i18n/locales/ja.js +321 -0
  153. package/dist/i18n/locales/nl.d.ts +321 -0
  154. package/dist/i18n/locales/nl.js +321 -0
  155. package/dist/i18n/locales/pl.d.ts +321 -0
  156. package/dist/i18n/locales/pl.js +321 -0
  157. package/dist/i18n/locales/pt.d.ts +321 -0
  158. package/dist/i18n/locales/pt.js +321 -0
  159. package/dist/i18n/locales/ro.d.ts +321 -0
  160. package/dist/i18n/locales/ro.js +321 -0
  161. package/dist/i18n/locales/ru.d.ts +321 -0
  162. package/dist/i18n/locales/ru.js +321 -0
  163. package/dist/i18n/locales/sq.d.ts +321 -0
  164. package/dist/i18n/locales/sq.js +321 -0
  165. package/dist/i18n/locales/sv.d.ts +321 -0
  166. package/dist/i18n/locales/sv.js +321 -0
  167. package/dist/i18n/locales/tr.d.ts +321 -0
  168. package/dist/i18n/locales/tr.js +321 -0
  169. package/dist/i18n/locales/zh.d.ts +321 -0
  170. package/dist/i18n/locales/zh.js +321 -0
  171. package/dist/index.js +834 -783
  172. package/dist/locales/ar.json +321 -0
  173. package/dist/locales/de.json +321 -0
  174. package/dist/locales/el.json +321 -0
  175. package/dist/locales/en.json +321 -0
  176. package/dist/locales/es.json +321 -0
  177. package/dist/locales/fr.json +321 -0
  178. package/dist/locales/hi.json +321 -0
  179. package/dist/locales/it.json +321 -0
  180. package/dist/locales/ja.json +321 -0
  181. package/dist/locales/nl.json +321 -0
  182. package/dist/locales/pl.json +321 -0
  183. package/dist/locales/pt.json +321 -0
  184. package/dist/locales/ro.json +321 -0
  185. package/dist/locales/ru.json +321 -0
  186. package/dist/locales/sq.json +321 -0
  187. package/dist/locales/sv.json +321 -0
  188. package/dist/locales/tr.json +321 -0
  189. package/dist/locales/zh.json +321 -0
  190. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  191. package/dist/patterns/signature-request/index.d.ts +3 -0
  192. package/dist/patterns/signature-request/index.js +5 -0
  193. package/dist/patterns/signature-request/signature-request.d.ts +81 -0
  194. package/dist/tokens.css +1 -1
  195. package/package.json +29 -1
  196. package/dist/_chunks/columns-2-8lq4-b8e.js +0 -15
  197. package/dist/_chunks/flag-DZ6V7-hU.js +0 -637
  198. package/dist/_chunks/link-cell-renderer-CLI7sBkX.js +0 -2210
  199. package/dist/_chunks/tooth-scheme-CX49GycY.js +0 -2133
@@ -0,0 +1,243 @@
1
+ import { jsxs as d, Fragment as g, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as j, useMemo as S, useState as C, useImperativeHandle as W } from "react";
3
+ import { c as U } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as $ } from "react-i18next";
5
+ import { B as h } from "./badge-DCOqV9mI.js";
6
+ import { E as G } from "./empty-state-CrLsi0XI.js";
7
+ import { P as Y } from "./panel-header-D313n_9-.js";
8
+ import { P as q } from "./pdf-viewer-DF3VMaPo.js";
9
+ import { T as J, b as O, c as Q, a as X } from "./tabs-CVTukWRD.js";
10
+ import { u as Z } from "./registry-DvAUVLHh.js";
11
+ import { F as ee, a as te } from "./file-Cwe9VC1A.js";
12
+ import { F as ae } from "./file-text-5yv6r2ls.js";
13
+ import { c as ie } 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 ne = [
21
+ ["path", { d: "M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8", key: "14sh0y" }],
22
+ [
23
+ "path",
24
+ {
25
+ d: "M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",
26
+ key: "1970lx"
27
+ }
28
+ ],
29
+ ["path", { d: "M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1", key: "l4dndm" }]
30
+ ], se = ie("files", ne), re = {
31
+ id: "document-preview",
32
+ capabilities: [],
33
+ state: {
34
+ kind: {
35
+ type: "'pdf' | 'image' | 'metadata' | 'empty'",
36
+ descriptionKey: "ui.agent.documentPreview.state.kind",
37
+ description: "Which render branch is active: pdf, image, metadata (no inline preview), or empty (no document). Structural — never the document name.",
38
+ read: (i) => i.getKind()
39
+ }
40
+ },
41
+ actions: {
42
+ get_name: {
43
+ // phi (not read): resolves the document display name, which can identify
44
+ // patients. PRS §26 — phi outranks read so the host gates it behind
45
+ // stricter confirm + audit. The always-on kind slot stays name-free.
46
+ safety: "phi",
47
+ returns: "string | undefined",
48
+ returnsSchema: { type: ["string", "null"] },
49
+ idempotent: !0,
50
+ descriptionKey: "ui.agent.documentPreview.actions.getName",
51
+ description: "Read the display name of the previewed document. May identify a patient (PHI).",
52
+ invoke: (i) => i.getName()
53
+ }
54
+ },
55
+ domHooks: {
56
+ root: {
57
+ attr: "data-component",
58
+ value: "document-preview",
59
+ description: "Marks the DocumentPreview region."
60
+ },
61
+ instanceId: {
62
+ attr: "data-component-id",
63
+ sourceProp: "id",
64
+ description: "Sourced from the id prop."
65
+ }
66
+ }
67
+ }, de = U(
68
+ [
69
+ "ds:flex ds:h-full ds:min-h-0 ds:min-w-0 ds:flex-col ds:overflow-auto",
70
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
71
+ "ds:focus-visible:outline-solid",
72
+ "ds:focus-visible:outline-ring"
73
+ ].join(" ")
74
+ ), me = {
75
+ signed: "success",
76
+ pending: "warning"
77
+ };
78
+ function k(i, n, l) {
79
+ if (!i) return "empty";
80
+ const r = n ?? "";
81
+ return r === "application/pdf" && l ? "pdf" : r.startsWith("image/") && l ? "image" : "metadata";
82
+ }
83
+ function B(i) {
84
+ const n = i ?? "";
85
+ return n.startsWith("image/") ? ee : n === "application/pdf" || n.startsWith("text/") || n.includes("word") ? ae : te;
86
+ }
87
+ const oe = [
88
+ "documentPreview.units.bytes",
89
+ "documentPreview.units.kilobytes",
90
+ "documentPreview.units.megabytes",
91
+ "documentPreview.units.gigabytes"
92
+ ], M = ["B", "KB", "MB", "GB"];
93
+ function le(i, n, l) {
94
+ let r = i, m = 0;
95
+ for (; r >= 1024 && m < M.length - 1; )
96
+ r /= 1024, m++;
97
+ return `${new Intl.NumberFormat(n, {
98
+ maximumFractionDigits: m === 0 ? 0 : 1
99
+ }).format(r)} ${l(oe[m], M[m])}`;
100
+ }
101
+ const ce = j(({ id: i, name: n, mimeType: l, src: r, metadata: m, documents: u, className: K }, D) => {
102
+ const { t: s, i18n: v } = $(), o = S(() => u && u.length > 0 ? u : n ? [{ id: i ?? n, name: n, mimeType: l, src: r, metadata: m }] : [], [u, i, n, l, r, m]), w = o.length > 1, [L, _] = C(void 0), a = o.find((e) => e.id === L) ?? o[0], y = S(
103
+ () => ({
104
+ getKind: () => a ? k(a.name, a.mimeType, a.src) : "empty",
105
+ getName: () => a == null ? void 0 : a.name
106
+ }),
107
+ [a]
108
+ );
109
+ W(D, () => y, [y]), Z(re, y, i);
110
+ const b = (e) => {
111
+ var N, P, x, T, I, z, A, F;
112
+ const f = k(e.name, e.mimeType, e.src);
113
+ if (f === "pdf" && e.src)
114
+ return /* @__PURE__ */ t(
115
+ q,
116
+ {
117
+ src: e.src,
118
+ toolbarVariant: "minimal",
119
+ ariaLabel: e.name,
120
+ className: "ds:h-full"
121
+ }
122
+ );
123
+ if (f === "image" && e.src)
124
+ return /* @__PURE__ */ t(
125
+ "img",
126
+ {
127
+ src: e.src,
128
+ alt: s("documentPreview.imageAlt", "Preview of {{name}}", {
129
+ name: e.name
130
+ }),
131
+ className: "ds:max-h-full ds:max-w-full ds:ms-auto ds:me-auto ds:object-contain"
132
+ }
133
+ );
134
+ const c = (N = e.metadata) == null ? void 0 : N.signatureStatus, R = !!((P = e.metadata) != null && P.documentType) || !!((x = e.metadata) != null && x.clinical) || c !== void 0 && c !== "none";
135
+ return /* @__PURE__ */ d("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
136
+ R && /* @__PURE__ */ d("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
137
+ ((T = e.metadata) == null ? void 0 : T.documentType) && /* @__PURE__ */ t(h, { variant: "neutral", size: "sm", children: e.metadata.documentType }),
138
+ ((I = e.metadata) == null ? void 0 : I.clinical) && /* @__PURE__ */ t(h, { variant: "info", size: "sm", children: s("documentPreview.clinical", "Clinical") }),
139
+ c && c !== "none" && /* @__PURE__ */ t(h, { variant: me[c], size: "sm", withDot: !0, children: s(`documentPreview.signature.${c}`, c) })
140
+ ] }),
141
+ /* @__PURE__ */ d("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
+ ((z = e.metadata) == null ? void 0 : z.size) !== void 0 && /* @__PURE__ */ d(g, { children: [
143
+ /* @__PURE__ */ t("dt", { className: "ds:text-muted-foreground", children: s("documentPreview.fields.size", "Size") }),
144
+ /* @__PURE__ */ t("dd", { className: "ds:m-0", children: le(e.metadata.size, v.language, s) })
145
+ ] }),
146
+ ((A = e.metadata) == null ? void 0 : A.updatedAt) && /* @__PURE__ */ d(g, { children: [
147
+ /* @__PURE__ */ t("dt", { className: "ds:text-muted-foreground", children: s("documentPreview.fields.modified", "Modified") }),
148
+ /* @__PURE__ */ t("dd", { className: "ds:m-0", children: new Intl.DateTimeFormat(v.language, {
149
+ dateStyle: "medium"
150
+ }).format(new Date(e.metadata.updatedAt)) })
151
+ ] }),
152
+ ((F = e.metadata) == null ? void 0 : F.expiresAt) && /* @__PURE__ */ d(g, { children: [
153
+ /* @__PURE__ */ t("dt", { className: "ds:text-muted-foreground", children: s("documentPreview.fields.expires", "Expires") }),
154
+ /* @__PURE__ */ t("dd", { className: "ds:m-0", children: new Intl.DateTimeFormat(v.language, {
155
+ dateStyle: "medium"
156
+ }).format(new Date(e.metadata.expiresAt)) })
157
+ ] })
158
+ ] }),
159
+ /* @__PURE__ */ t("p", { className: "type-body-sm ds:m-0 ds:text-muted-foreground", children: s("documentPreview.noPreview", "No preview available.") })
160
+ ] });
161
+ }, V = B(a == null ? void 0 : a.mimeType), E = w ? /* @__PURE__ */ t(se, { "aria-hidden": "true" }) : /* @__PURE__ */ t(V, { "aria-hidden": "true" }), H = w ? /* @__PURE__ */ d(g, { children: [
162
+ s("documentPreview.multiTitle", "Documents"),
163
+ /* @__PURE__ */ t(h, { variant: "neutral", size: "sm", children: o.length })
164
+ ] }) : a == null ? void 0 : a.name;
165
+ let p;
166
+ return o.length === 0 ? p = /* @__PURE__ */ t(
167
+ G,
168
+ {
169
+ variant: "first-use",
170
+ size: "sm",
171
+ title: s("documentPreview.emptyTitle", "No document selected"),
172
+ description: s(
173
+ "documentPreview.emptyDescription",
174
+ "Select a document to preview it here."
175
+ )
176
+ }
177
+ ) : w ? p = /* @__PURE__ */ d(
178
+ J,
179
+ {
180
+ value: (a == null ? void 0 : a.id) ?? "",
181
+ onValueChange: _,
182
+ variant: "underlined",
183
+ size: "sm",
184
+ className: "ds:min-h-0 ds:flex-1 ds:pt-[var(--spacing-sm)]",
185
+ children: [
186
+ /* @__PURE__ */ t(
187
+ O,
188
+ {
189
+ "aria-label": s("documentPreview.tabsLabel", "Selected documents"),
190
+ className: "ds:gap-[var(--spacing-sm)]",
191
+ children: o.map((e) => {
192
+ const f = B(e.mimeType);
193
+ return /* @__PURE__ */ t(
194
+ Q,
195
+ {
196
+ value: e.id,
197
+ icon: /* @__PURE__ */ t(
198
+ f,
199
+ {
200
+ "aria-hidden": "true",
201
+ className: "ds:size-4 ds:text-[color:var(--accent)]"
202
+ }
203
+ ),
204
+ className: "ds:[min-inline-size:0]",
205
+ children: /* @__PURE__ */ t("span", { className: "ds:block ds:truncate ds:[min-inline-size:0]", children: e.name })
206
+ },
207
+ e.id
208
+ );
209
+ })
210
+ }
211
+ ),
212
+ o.map((e) => /* @__PURE__ */ t(
213
+ X,
214
+ {
215
+ value: e.id,
216
+ className: "ds:min-h-0 ds:flex-1",
217
+ children: b(e)
218
+ },
219
+ e.id
220
+ ))
221
+ ]
222
+ }
223
+ ) : p = b(a), /* @__PURE__ */ d(
224
+ "section",
225
+ {
226
+ "data-component": "document-preview",
227
+ "data-component-id": i,
228
+ tabIndex: 0,
229
+ "aria-label": s("documentPreview.regionLabel", "Document preview"),
230
+ className: de({ className: K }),
231
+ children: [
232
+ o.length > 0 && /* @__PURE__ */ t(Y, { sticky: !0, icon: E, title: H }),
233
+ p
234
+ ]
235
+ }
236
+ );
237
+ });
238
+ ce.displayName = "DocumentPreview";
239
+ export {
240
+ ce as D,
241
+ re as d
242
+ };
243
+ //# sourceMappingURL=document-preview-CvHnHf6T.js.map
@@ -4,7 +4,7 @@ import { c as k } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as Ye } from "react-i18next";
5
5
  import { B as K } from "./button-CPGiR_bH.js";
6
6
  import { A as ae } from "./alert-KJbsPYkI.js";
7
- import { L as he, F as Xe } from "./file-upload-B2SXhRiN.js";
7
+ import { L as he, F as Xe } from "./file-upload-DENvuhfs.js";
8
8
  import { u as Ze } from "./use-controllable-state-BiY4xTzM.js";
9
9
  import { u as $e } from "./registry-DvAUVLHh.js";
10
10
  import { R as Ge } from "./rotate-ccw-BBQnIVTr.js";
@@ -676,4 +676,4 @@ export {
676
676
  or as D,
677
677
  Qe as d
678
678
  };
679
- //# sourceMappingURL=document-scanner-BE6Jz4Ob.js.map
679
+ //# sourceMappingURL=document-scanner-B6h1Ir56.js.map
@@ -5,7 +5,7 @@ import { useTranslation as z } from "react-i18next";
5
5
  import { B as W } from "./button-CPGiR_bH.js";
6
6
  import { I as $ } from "./icon-button-C_kbcd7I.js";
7
7
  import { C as j } from "./checkbox-BuZ1u__2.js";
8
- import { P as T } from "./popover-DGTKfLWh.js";
8
+ import { P as T } from "./popover-Cc0a69sw.js";
9
9
  import { S as Y } from "./separator-CYU_bGFn.js";
10
10
  import { c as P } from "./createLucideIcon-DhHxpK9K.js";
11
11
  import { G as Z } from "./grip-vertical-onSb1JXO.js";
@@ -412,4 +412,4 @@ export {
412
412
  _e as r,
413
413
  ze as u
414
414
  };
415
- //# sourceMappingURL=field-value-DCXJXKab.js.map
415
+ //# sourceMappingURL=field-value-DHG6gEKS.js.map
@@ -0,0 +1,40 @@
1
+ import { c as a } 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 e = [
9
+ [
10
+ "path",
11
+ {
12
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
13
+ key: "1oefj6"
14
+ }
15
+ ],
16
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
17
+ ["circle", { cx: "10", cy: "12", r: "2", key: "737tya" }],
18
+ ["path", { d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22", key: "wt3hpn" }]
19
+ ], t = a("file-image", e);
20
+ /**
21
+ * @license lucide-react v1.22.0 - ISC
22
+ *
23
+ * This source code is licensed under the ISC license.
24
+ * See the LICENSE file in the root directory of this source tree.
25
+ */
26
+ const c = [
27
+ [
28
+ "path",
29
+ {
30
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
31
+ key: "1oefj6"
32
+ }
33
+ ],
34
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
35
+ ], h = a("file", c);
36
+ export {
37
+ t as F,
38
+ h as a
39
+ };
40
+ //# sourceMappingURL=file-Cwe9VC1A.js.map