@alfadocs/ui-kit-debug 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.
Files changed (151) hide show
  1. package/dist/_chunks/{address-fields-COyjgqxA.js → address-fields-7k59FnJ6.js} +2 -2
  2. package/dist/_chunks/{address-fields-COyjgqxA.js.map → address-fields-7k59FnJ6.js.map} +1 -1
  3. package/dist/_chunks/{booking-B1Qkcl3c.js → booking-CLmeXtGv.js} +2 -2
  4. package/dist/_chunks/{booking-B1Qkcl3c.js.map → booking-CLmeXtGv.js.map} +1 -1
  5. package/dist/_chunks/{country-select-DYHDLEjG.js → country-select-BN9nedAp.js} +2 -2
  6. package/dist/_chunks/{country-select-DYHDLEjG.js.map → country-select-BN9nedAp.js.map} +1 -1
  7. package/dist/_chunks/document-preview-nwfulDEs.js +290 -0
  8. package/dist/_chunks/document-preview-nwfulDEs.js.map +1 -0
  9. package/dist/_chunks/{file-manager-UF8dkQF1.js → file-manager-DfTG7bxx.js} +394 -399
  10. package/dist/_chunks/file-manager-DfTG7bxx.js.map +1 -0
  11. package/dist/_chunks/flag-Cnmivlrl.js +641 -0
  12. package/dist/_chunks/{flag-DZ6V7-hU.js.map → flag-Cnmivlrl.js.map} +1 -1
  13. package/dist/_chunks/{header-settings-4cwQzeFc.js → header-settings-DMfdx0Vq.js} +2 -2
  14. package/dist/_chunks/{header-settings-4cwQzeFc.js.map → header-settings-DMfdx0Vq.js.map} +1 -1
  15. package/dist/_chunks/{locale-picker-GNF3lo8K.js → locale-picker-EyvPrwDc.js} +2 -2
  16. package/dist/_chunks/{locale-picker-GNF3lo8K.js.map → locale-picker-EyvPrwDc.js.map} +1 -1
  17. package/dist/_chunks/{marketplace-app-shell-D_1tF4La.js → marketplace-app-shell-Bxq1PYAj.js} +2 -2
  18. package/dist/_chunks/{marketplace-app-shell-D_1tF4La.js.map → marketplace-app-shell-Bxq1PYAj.js.map} +1 -1
  19. package/dist/_chunks/{patient-details-DP4wKyq4.js → patient-details-zy76MRh7.js} +3 -3
  20. package/dist/_chunks/{patient-details-DP4wKyq4.js.map → patient-details-zy76MRh7.js.map} +1 -1
  21. package/dist/_chunks/periodontal-chart-CYBhr9vc.js +1305 -0
  22. package/dist/_chunks/periodontal-chart-CYBhr9vc.js.map +1 -0
  23. package/dist/_chunks/{phone-input-dtnrvnZf.js → phone-input-D00ZBAm-.js} +2 -2
  24. package/dist/_chunks/{phone-input-dtnrvnZf.js.map → phone-input-D00ZBAm-.js.map} +1 -1
  25. package/dist/agent-catalog.json +149 -1
  26. package/dist/agent-i18n/en.json +2 -0
  27. package/dist/components/address-fields/index.js +1 -1
  28. package/dist/components/booking/index.js +1 -1
  29. package/dist/components/country-select/index.js +1 -1
  30. package/dist/components/document-preview/document-preview.d.ts +35 -2
  31. package/dist/components/document-preview/document-preview.d.ts.map +1 -1
  32. package/dist/components/document-preview/index.d.ts +1 -1
  33. package/dist/components/document-preview/index.d.ts.map +1 -1
  34. package/dist/components/document-preview/index.js +1 -1
  35. package/dist/components/file-manager/file-manager.d.ts.map +1 -1
  36. package/dist/components/file-manager/index.js +1 -1
  37. package/dist/components/file-manager/list-view.d.ts.map +1 -1
  38. package/dist/components/flag/flag.d.ts.map +1 -1
  39. package/dist/components/flag/index.js +1 -1
  40. package/dist/components/header-settings/index.js +1 -1
  41. package/dist/components/locale-picker/index.js +1 -1
  42. package/dist/components/patient-details/index.js +1 -1
  43. package/dist/components/periodontal-chart/index.d.ts +2 -2
  44. package/dist/components/periodontal-chart/index.d.ts.map +1 -1
  45. package/dist/components/periodontal-chart/index.js +8 -7
  46. package/dist/components/periodontal-chart/periodontal-chart-data.d.ts +45 -0
  47. package/dist/components/periodontal-chart/periodontal-chart-data.d.ts.map +1 -1
  48. package/dist/components/periodontal-chart/periodontal-chart.agent.d.ts.map +1 -1
  49. package/dist/components/periodontal-chart/periodontal-chart.d.ts +3 -1
  50. package/dist/components/periodontal-chart/periodontal-chart.d.ts.map +1 -1
  51. package/dist/components/phone-input/index.js +1 -1
  52. package/dist/i18n/locales/ar.d.ts +8 -1
  53. package/dist/i18n/locales/ar.d.ts.map +1 -1
  54. package/dist/i18n/locales/ar.js +8 -1
  55. package/dist/i18n/locales/ar.js.map +1 -1
  56. package/dist/i18n/locales/de.d.ts +8 -1
  57. package/dist/i18n/locales/de.d.ts.map +1 -1
  58. package/dist/i18n/locales/de.js +8 -1
  59. package/dist/i18n/locales/de.js.map +1 -1
  60. package/dist/i18n/locales/el.d.ts +8 -1
  61. package/dist/i18n/locales/el.d.ts.map +1 -1
  62. package/dist/i18n/locales/el.js +8 -1
  63. package/dist/i18n/locales/el.js.map +1 -1
  64. package/dist/i18n/locales/en.d.ts +8 -1
  65. package/dist/i18n/locales/en.d.ts.map +1 -1
  66. package/dist/i18n/locales/en.js +8 -1
  67. package/dist/i18n/locales/en.js.map +1 -1
  68. package/dist/i18n/locales/es.d.ts +8 -1
  69. package/dist/i18n/locales/es.d.ts.map +1 -1
  70. package/dist/i18n/locales/es.js +8 -1
  71. package/dist/i18n/locales/es.js.map +1 -1
  72. package/dist/i18n/locales/fr.d.ts +8 -1
  73. package/dist/i18n/locales/fr.d.ts.map +1 -1
  74. package/dist/i18n/locales/fr.js +8 -1
  75. package/dist/i18n/locales/fr.js.map +1 -1
  76. package/dist/i18n/locales/hi.d.ts +8 -1
  77. package/dist/i18n/locales/hi.d.ts.map +1 -1
  78. package/dist/i18n/locales/hi.js +8 -1
  79. package/dist/i18n/locales/hi.js.map +1 -1
  80. package/dist/i18n/locales/it.d.ts +8 -1
  81. package/dist/i18n/locales/it.d.ts.map +1 -1
  82. package/dist/i18n/locales/it.js +8 -1
  83. package/dist/i18n/locales/it.js.map +1 -1
  84. package/dist/i18n/locales/ja.d.ts +8 -1
  85. package/dist/i18n/locales/ja.d.ts.map +1 -1
  86. package/dist/i18n/locales/ja.js +8 -1
  87. package/dist/i18n/locales/ja.js.map +1 -1
  88. package/dist/i18n/locales/nl.d.ts +8 -1
  89. package/dist/i18n/locales/nl.d.ts.map +1 -1
  90. package/dist/i18n/locales/nl.js +8 -1
  91. package/dist/i18n/locales/nl.js.map +1 -1
  92. package/dist/i18n/locales/pl.d.ts +8 -1
  93. package/dist/i18n/locales/pl.d.ts.map +1 -1
  94. package/dist/i18n/locales/pl.js +8 -1
  95. package/dist/i18n/locales/pl.js.map +1 -1
  96. package/dist/i18n/locales/pt.d.ts +8 -1
  97. package/dist/i18n/locales/pt.d.ts.map +1 -1
  98. package/dist/i18n/locales/pt.js +8 -1
  99. package/dist/i18n/locales/pt.js.map +1 -1
  100. package/dist/i18n/locales/ro.d.ts +8 -1
  101. package/dist/i18n/locales/ro.d.ts.map +1 -1
  102. package/dist/i18n/locales/ro.js +8 -1
  103. package/dist/i18n/locales/ro.js.map +1 -1
  104. package/dist/i18n/locales/ru.d.ts +8 -1
  105. package/dist/i18n/locales/ru.d.ts.map +1 -1
  106. package/dist/i18n/locales/ru.js +8 -1
  107. package/dist/i18n/locales/ru.js.map +1 -1
  108. package/dist/i18n/locales/sq.d.ts +8 -1
  109. package/dist/i18n/locales/sq.d.ts.map +1 -1
  110. package/dist/i18n/locales/sq.js +8 -1
  111. package/dist/i18n/locales/sq.js.map +1 -1
  112. package/dist/i18n/locales/sv.d.ts +8 -1
  113. package/dist/i18n/locales/sv.d.ts.map +1 -1
  114. package/dist/i18n/locales/sv.js +8 -1
  115. package/dist/i18n/locales/sv.js.map +1 -1
  116. package/dist/i18n/locales/tr.d.ts +8 -1
  117. package/dist/i18n/locales/tr.d.ts.map +1 -1
  118. package/dist/i18n/locales/tr.js +8 -1
  119. package/dist/i18n/locales/tr.js.map +1 -1
  120. package/dist/i18n/locales/zh.d.ts +8 -1
  121. package/dist/i18n/locales/zh.d.ts.map +1 -1
  122. package/dist/i18n/locales/zh.js +8 -1
  123. package/dist/i18n/locales/zh.js.map +1 -1
  124. package/dist/index.js +217 -216
  125. package/dist/locales/ar.json +8 -1
  126. package/dist/locales/de.json +8 -1
  127. package/dist/locales/el.json +8 -1
  128. package/dist/locales/en.json +8 -1
  129. package/dist/locales/es.json +8 -1
  130. package/dist/locales/fr.json +8 -1
  131. package/dist/locales/hi.json +8 -1
  132. package/dist/locales/it.json +8 -1
  133. package/dist/locales/ja.json +8 -1
  134. package/dist/locales/nl.json +8 -1
  135. package/dist/locales/pl.json +8 -1
  136. package/dist/locales/pt.json +8 -1
  137. package/dist/locales/ro.json +8 -1
  138. package/dist/locales/ru.json +8 -1
  139. package/dist/locales/sq.json +8 -1
  140. package/dist/locales/sv.json +8 -1
  141. package/dist/locales/tr.json +8 -1
  142. package/dist/locales/zh.json +8 -1
  143. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  144. package/dist/tokens.css +2 -1
  145. package/package.json +1 -1
  146. package/dist/_chunks/document-preview-CGSM_au9.js +0 -181
  147. package/dist/_chunks/document-preview-CGSM_au9.js.map +0 -1
  148. package/dist/_chunks/file-manager-UF8dkQF1.js.map +0 -1
  149. package/dist/_chunks/flag-DZ6V7-hU.js +0 -637
  150. package/dist/_chunks/periodontal-chart-D8hOFmde.js +0 -1173
  151. package/dist/_chunks/periodontal-chart-D8hOFmde.js.map +0 -1
@@ -1,38 +1,38 @@
1
1
  import { jsx as n, jsxs as x } from "react/jsx-runtime";
2
- import { useMemo as O, useState as te, useRef as ee, useEffect as ne, useId as je, useCallback as y, forwardRef as ht, useImperativeHandle as yt } from "react";
3
- import { c as Pe } from "./index-D2ZczOXr.js";
2
+ import { useMemo as O, useState as te, useRef as ee, useEffect as ne, useId as Pe, useCallback as y, forwardRef as yt, useImperativeHandle as bt } from "react";
3
+ import { c as Ve } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as J } from "react-i18next";
5
- import { B as vt, b as Be, c as ge } from "./breadcrumb-agut0PwN.js";
6
- import { E as bt } from "./empty-state-CrLsi0XI.js";
5
+ import { B as vt, b as He, c as ge } from "./breadcrumb-agut0PwN.js";
6
+ import { E as kt } from "./empty-state-CrLsi0XI.js";
7
7
  import { S as he } from "./skeleton-CZbwyJAA.js";
8
- import { u as kt } from "./use-controllable-state-BiY4xTzM.js";
9
- import { u as Mt } from "./registry-DvAUVLHh.js";
8
+ import { u as Mt } from "./use-controllable-state-BiY4xTzM.js";
9
+ import { u as Ct } from "./registry-DvAUVLHh.js";
10
10
  import { B as X } from "./button-CPGiR_bH.js";
11
11
  import { D as m } from "./dialog-UbKJCi1X.js";
12
- import { a as wt, F as Ct, C as xt } from "./file-upload-DENvuhfs.js";
13
- import { T as Ve } from "./text-input-CUvCb6ST.js";
12
+ import { a as wt, F as xt, C as St } from "./file-upload-DENvuhfs.js";
13
+ import { T as We } from "./text-input-CUvCb6ST.js";
14
14
  import { c as ie } from "./createLucideIcon-DhHxpK9K.js";
15
- import { F as St, a as Nt } from "./file-Cwe9VC1A.js";
16
- import { F as Tt } from "./file-text-5yv6r2ls.js";
17
- import { F as Ft } from "./file-spreadsheet-DmwyfV4O.js";
18
- import { C as At } from "./chevron-right-I9AeSxH2.js";
19
- import { A as Dt, d as It, D as Te } from "./actions-cell-renderer-DLrcSTK_.js";
20
- import { B as We } from "./badge-DCOqV9mI.js";
21
- import { D as $e } from "./download-CfYKJO_j.js";
22
- import { P as Rt } from "./pen-line-D0De5zdl.js";
23
- import { P as Ge } from "./pencil-B1sKKyuT.js";
24
- import { T as Ue } from "./trash-2-uumy3fy1.js";
15
+ import { F as Nt, a as Tt } from "./file-Cwe9VC1A.js";
16
+ import { F as Ft } from "./file-text-5yv6r2ls.js";
17
+ import { F as At } from "./file-spreadsheet-DmwyfV4O.js";
18
+ import { C as Dt } from "./chevron-right-I9AeSxH2.js";
19
+ import { A as Rt, d as It, D as Te } from "./actions-cell-renderer-DLrcSTK_.js";
20
+ import { B as $e } from "./badge-DCOqV9mI.js";
21
+ import { D as Ge } from "./download-CfYKJO_j.js";
22
+ import { P as zt } from "./pen-line-D0De5zdl.js";
23
+ import { P as Ue } from "./pencil-B1sKKyuT.js";
24
+ import { T as Ye } from "./trash-2-uumy3fy1.js";
25
25
  import { I as Q } from "./icon-button-C_kbcd7I.js";
26
- import { I as zt } from "./icon-button-group-C_lqXTAj.js";
27
- import { U as _t } from "./upload-BfT2hzMg.js";
28
- import { P as Lt } from "./plus-DzMQ_c6b.js";
26
+ import { I as _t } from "./icon-button-group-C_lqXTAj.js";
27
+ import { U as Lt } from "./upload-BfT2hzMg.js";
28
+ import { P as Kt } from "./plus-DzMQ_c6b.js";
29
29
  /**
30
30
  * @license lucide-react v1.22.0 - ISC
31
31
  *
32
32
  * This source code is licensed under the ISC license.
33
33
  * See the LICENSE file in the root directory of this source tree.
34
34
  */
35
- const Kt = [
35
+ const Et = [
36
36
  [
37
37
  "path",
38
38
  {
@@ -48,14 +48,14 @@ const Kt = [
48
48
  key: "1etmh7"
49
49
  }
50
50
  ]
51
- ], Et = ie("file-headphone", Kt);
51
+ ], Bt = ie("file-headphone", Et);
52
52
  /**
53
53
  * @license lucide-react v1.22.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
57
  */
58
- const Bt = [
58
+ const Ht = [
59
59
  [
60
60
  "path",
61
61
  {
@@ -71,14 +71,14 @@ const Bt = [
71
71
  key: "1tzo1f"
72
72
  }
73
73
  ]
74
- ], Ht = ie("file-play", Bt);
74
+ ], Ot = ie("file-play", Ht);
75
75
  /**
76
76
  * @license lucide-react v1.22.0 - ISC
77
77
  *
78
78
  * This source code is licensed under the ISC license.
79
79
  * See the LICENSE file in the root directory of this source tree.
80
80
  */
81
- const Ot = [
81
+ const qt = [
82
82
  [
83
83
  "path",
84
84
  {
@@ -88,14 +88,14 @@ const Ot = [
88
88
  ],
89
89
  ["path", { d: "M2 13h10", key: "pgb2dq" }],
90
90
  ["path", { d: "m9 16 3-3-3-3", key: "6m91ic" }]
91
- ], Ye = ie("folder-input", Ot);
91
+ ], Ze = ie("folder-input", qt);
92
92
  /**
93
93
  * @license lucide-react v1.22.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
97
  */
98
- const qt = [
98
+ const jt = [
99
99
  [
100
100
  "path",
101
101
  {
@@ -103,14 +103,14 @@ const qt = [
103
103
  key: "usdka0"
104
104
  }
105
105
  ]
106
- ], jt = ie("folder-open", qt);
106
+ ], Pt = ie("folder-open", jt);
107
107
  /**
108
108
  * @license lucide-react v1.22.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
112
  */
113
- const Pt = [
113
+ const Vt = [
114
114
  ["path", { d: "M12 10v6", key: "1bos4e" }],
115
115
  ["path", { d: "M9 13h6", key: "1uhe8q" }],
116
116
  [
@@ -120,14 +120,14 @@ const Pt = [
120
120
  key: "1kt360"
121
121
  }
122
122
  ]
123
- ], Vt = ie("folder-plus", Pt);
123
+ ], Wt = ie("folder-plus", Vt);
124
124
  /**
125
125
  * @license lucide-react v1.22.0 - ISC
126
126
  *
127
127
  * This source code is licensed under the ISC license.
128
128
  * See the LICENSE file in the root directory of this source tree.
129
129
  */
130
- const Wt = [
130
+ const $t = [
131
131
  [
132
132
  "path",
133
133
  {
@@ -135,20 +135,20 @@ const Wt = [
135
135
  key: "1kt360"
136
136
  }
137
137
  ]
138
- ], Ze = ie("folder", Wt);
138
+ ], Xe = ie("folder", $t);
139
139
  /**
140
140
  * @license lucide-react v1.22.0 - ISC
141
141
  *
142
142
  * This source code is licensed under the ISC license.
143
143
  * See the LICENSE file in the root directory of this source tree.
144
144
  */
145
- const $t = [
145
+ const Gt = [
146
146
  ["circle", { cx: "18", cy: "5", r: "3", key: "gq8acd" }],
147
147
  ["circle", { cx: "6", cy: "12", r: "3", key: "w7nqdw" }],
148
148
  ["circle", { cx: "18", cy: "19", r: "3", key: "1xt0gg" }],
149
149
  ["line", { x1: "8.59", x2: "15.42", y1: "13.51", y2: "17.49", key: "47mynk" }],
150
150
  ["line", { x1: "15.41", x2: "8.59", y1: "6.51", y2: "10.49", key: "1n3mei" }]
151
- ], Xe = ie("share-2", $t), Gt = {
151
+ ], Je = ie("share-2", Gt), Ut = {
152
152
  type: "array",
153
153
  items: {
154
154
  type: "object",
@@ -172,7 +172,7 @@ const $t = [
172
172
  },
173
173
  required: ["id", "kind", "parentId"]
174
174
  }
175
- }, Ut = {
175
+ }, Yt = {
176
176
  id: "file-manager",
177
177
  // select_multiple → select_items / clear_selection; navigate → navigate;
178
178
  // filter → set_type_filter (proxied to the DataTable's documentType column);
@@ -321,7 +321,7 @@ const $t = [
321
321
  }
322
322
  },
323
323
  returns: "Array<{ id, kind, parentId, size, updatedAt }>",
324
- returnsSchema: Gt,
324
+ returnsSchema: Ut,
325
325
  idempotent: !0,
326
326
  descriptionKey: "ui.agent.fileManager.actions.listItems",
327
327
  description: "List structural metadata (ids, kinds, sizes, dates — never names) for a folder or the whole tree.",
@@ -379,33 +379,33 @@ const $t = [
379
379
  description: "Grid cards and folder-tree nodes carry the item id as data-item-id (ids only — never names). List-view rows are AG Grid rows inside the composed DataTable and carry its native row-id attribute keyed to the same ids."
380
380
  }
381
381
  }
382
- }, Yt = [
382
+ }, Zt = [
383
383
  "fileManager.units.bytes",
384
384
  "fileManager.units.kilobytes",
385
385
  "fileManager.units.megabytes",
386
386
  "fileManager.units.gigabytes"
387
- ], He = ["B", "KB", "MB", "GB"];
388
- function Zt(t, r, l) {
387
+ ], Oe = ["B", "KB", "MB", "GB"];
388
+ function Xt(t, r, l) {
389
389
  let i = t, a = 0;
390
- for (; i >= 1024 && a < He.length - 1; )
390
+ for (; i >= 1024 && a < Oe.length - 1; )
391
391
  i /= 1024, a++;
392
392
  return `${new Intl.NumberFormat(r, {
393
393
  maximumFractionDigits: a === 0 ? 0 : 1
394
- }).format(i)} ${l(Yt[a], He[a])}`;
394
+ }).format(i)} ${l(Zt[a], Oe[a])}`;
395
395
  }
396
- function Xt(t) {
397
- if (t.kind === "folder") return Ze;
396
+ function Jt(t) {
397
+ if (t.kind === "folder") return Xe;
398
398
  const r = t.mimeType ?? "";
399
- return r.startsWith("image/") ? St : r.startsWith("audio/") ? Et : r.startsWith("video/") ? Ht : r === "application/pdf" || r.startsWith("text/") || r.includes("word") || r.includes("rtf") ? Tt : r.includes("zip") || r.includes("compressed") || r.includes("tar") ? wt : r.includes("spreadsheet") || r.includes("excel") || r === "text/csv" ? Ft : Nt;
399
+ return r.startsWith("image/") ? Nt : r.startsWith("audio/") ? Bt : r.startsWith("video/") ? Ot : r === "application/pdf" || r.startsWith("text/") || r.includes("word") || r.includes("rtf") ? Ft : r.includes("zip") || r.includes("compressed") || r.includes("tar") ? wt : r.includes("spreadsheet") || r.includes("excel") || r === "text/csv" ? At : Tt;
400
400
  }
401
- function Je(t, r, l) {
401
+ function Qe(t, r, l) {
402
402
  const i = new Intl.Collator(l, {
403
403
  numeric: !0,
404
404
  sensitivity: "base"
405
405
  });
406
406
  return t.filter((a) => a.parentId === r).sort((a, u) => a.kind !== u.kind ? a.kind === "folder" ? -1 : 1 : i.compare(a.name, u.name));
407
407
  }
408
- function Jt(t, r, l) {
408
+ function Qt(t, r, l) {
409
409
  const i = /* @__PURE__ */ new Set();
410
410
  for (const c of t)
411
411
  c.parentId === r && i.add(c.id);
@@ -421,7 +421,7 @@ function Jt(t, r, l) {
421
421
  });
422
422
  return t.filter((c) => i.has(c.id)).sort((c, F) => c.kind !== F.kind ? c.kind === "folder" ? -1 : 1 : u.compare(c.name, F.name));
423
423
  }
424
- function Qt(t, r, l) {
424
+ function en(t, r, l) {
425
425
  const i = [];
426
426
  let a = t;
427
427
  const u = /* @__PURE__ */ new Set();
@@ -429,7 +429,7 @@ function Qt(t, r, l) {
429
429
  a = a.parentId === null ? void 0 : r.get(a.parentId);
430
430
  return i;
431
431
  }
432
- function en(t, r) {
432
+ function tn(t, r) {
433
433
  const l = new Map(t.map((c) => [c.id, c])), i = [];
434
434
  let a = r === null ? void 0 : l.get(r);
435
435
  const u = /* @__PURE__ */ new Set();
@@ -437,7 +437,7 @@ function en(t, r) {
437
437
  u.add(a.id), i.unshift(a), a = a.parentId === null ? void 0 : l.get(a.parentId);
438
438
  return i;
439
439
  }
440
- function tn(t, r) {
440
+ function nn(t, r) {
441
441
  const l = new Set(r);
442
442
  let i = !0;
443
443
  for (; i; ) {
@@ -447,12 +447,12 @@ function tn(t, r) {
447
447
  }
448
448
  return l;
449
449
  }
450
- function Qe(t, r) {
450
+ function et(t, r) {
451
451
  if (t.length !== r.length) return !1;
452
452
  const l = new Set(t);
453
453
  return r.every((i) => l.has(i));
454
454
  }
455
- const pe = "__root__", se = (t) => t ?? pe, nn = Pe(
455
+ const pe = "__root__", se = (t) => t ?? pe, rn = Ve(
456
456
  [
457
457
  "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
458
458
  "ds:min-h-[var(--min-target-size)] ds:w-full",
@@ -472,8 +472,8 @@ const pe = "__root__", se = (t) => t ?? pe, nn = Pe(
472
472
  defaultVariants: { selected: !1 }
473
473
  }
474
474
  );
475
- function rn(t, r, l) {
476
- const i = (a) => Je(t, a, r).filter((u) => u.kind === "folder" && !(l != null && l.has(u.id))).map((u) => ({
475
+ function an(t, r, l) {
476
+ const i = (a) => Qe(t, a, r).filter((u) => u.kind === "folder" && !(l != null && l.has(u.id))).map((u) => ({
477
477
  key: se(u.id),
478
478
  folderId: u.id,
479
479
  item: u,
@@ -481,17 +481,17 @@ function rn(t, r, l) {
481
481
  }));
482
482
  return { key: pe, folderId: null, children: i(null) };
483
483
  }
484
- function an(t, r) {
484
+ function on(t, r) {
485
485
  const l = [], i = (a) => {
486
486
  l.push(a), r.has(a.key) && a.children.forEach(i);
487
487
  };
488
488
  return i(t), l;
489
489
  }
490
- function on(t) {
490
+ function ln(t) {
491
491
  var r;
492
492
  return t.folderId === null ? null : se(((r = t.item) == null ? void 0 : r.parentId) ?? null);
493
493
  }
494
- function et({
494
+ function tt({
495
495
  items: t,
496
496
  selectedFolderId: r,
497
497
  onSelectFolder: l,
@@ -499,71 +499,71 @@ function et({
499
499
  excludeIds: a
500
500
  }) {
501
501
  const { t: u, i18n: c } = J(), F = c.dir() === "rtl", S = O(
502
- () => rn(t, c.language, a),
502
+ () => an(t, c.language, a),
503
503
  [t, c.language, a]
504
- ), [v, b] = te(
504
+ ), [b, k] = te(
505
505
  () => /* @__PURE__ */ new Set([pe])
506
- ), [D, _] = te(se(r)), I = ee(/* @__PURE__ */ new Map());
506
+ ), [D, z] = te(se(r)), R = ee(/* @__PURE__ */ new Map());
507
507
  ne(() => {
508
- b((o) => {
509
- const C = new Set(o);
510
- C.add(pe);
508
+ k((o) => {
509
+ const v = new Set(o);
510
+ v.add(pe);
511
511
  const A = new Map(t.map((B) => [B.id, B]));
512
512
  let g = r ? A.get(r) : void 0;
513
513
  const E = /* @__PURE__ */ new Set();
514
514
  for (; g && !E.has(g.id); )
515
- E.add(g.id), g.parentId !== null && C.add(se(g.parentId)), g = g.parentId === null ? void 0 : A.get(g.parentId);
516
- return C;
517
- }), _(se(r));
515
+ E.add(g.id), g.parentId !== null && v.add(se(g.parentId)), g = g.parentId === null ? void 0 : A.get(g.parentId);
516
+ return v;
517
+ }), z(se(r));
518
518
  }, [r, t]);
519
- const k = O(
520
- () => an(S, v),
521
- [S, v]
519
+ const M = O(
520
+ () => on(S, b),
521
+ [S, b]
522
522
  );
523
523
  ne(() => {
524
524
  var o;
525
- k.some((C) => C.key === D) || _(((o = k[0]) == null ? void 0 : o.key) ?? pe);
526
- }, [k, D]);
527
- const L = (o) => {
528
- var C;
529
- _(o), (C = I.current.get(o)) == null || C.focus();
530
- }, V = (o, C) => {
531
- b((A) => {
525
+ M.some((v) => v.key === D) || z(((o = M[0]) == null ? void 0 : o.key) ?? pe);
526
+ }, [M, D]);
527
+ const _ = (o) => {
528
+ var v;
529
+ z(o), (v = R.current.get(o)) == null || v.focus();
530
+ }, V = (o, v) => {
531
+ k((A) => {
532
532
  const g = new Set(A);
533
- return C ?? !g.has(o) ? g.add(o) : g.delete(o), g;
533
+ return v ?? !g.has(o) ? g.add(o) : g.delete(o), g;
534
534
  });
535
535
  }, P = (o) => {
536
- const C = o.target.closest(
536
+ const v = o.target.closest(
537
537
  "[data-tree-key]"
538
- ), A = C == null ? void 0 : C.getAttribute("data-tree-key");
538
+ ), A = v == null ? void 0 : v.getAttribute("data-tree-key");
539
539
  if (!A) return;
540
- const g = k.findIndex((K) => K.key === A);
540
+ const g = M.findIndex((L) => L.key === A);
541
541
  if (g < 0) return;
542
- const E = k[g], B = E.children.length > 0, G = v.has(A), re = F ? "ArrowLeft" : "ArrowRight", N = F ? "ArrowRight" : "ArrowLeft";
542
+ const E = M[g], B = E.children.length > 0, G = b.has(A), re = F ? "ArrowLeft" : "ArrowRight", T = F ? "ArrowRight" : "ArrowLeft";
543
543
  switch (o.key) {
544
544
  case "ArrowDown":
545
- g < k.length - 1 && L(k[g + 1].key);
545
+ g < M.length - 1 && _(M[g + 1].key);
546
546
  break;
547
547
  case "ArrowUp":
548
- g > 0 && L(k[g - 1].key);
548
+ g > 0 && _(M[g - 1].key);
549
549
  break;
550
550
  case re:
551
- B && !G ? V(A, !0) : B && G && L(E.children[0].key);
551
+ B && !G ? V(A, !0) : B && G && _(E.children[0].key);
552
552
  break;
553
- case N: {
553
+ case T: {
554
554
  if (B && G)
555
555
  V(A, !1);
556
556
  else {
557
- const K = on(E);
558
- K !== null && L(K);
557
+ const L = ln(E);
558
+ L !== null && _(L);
559
559
  }
560
560
  break;
561
561
  }
562
562
  case "Home":
563
- L(k[0].key);
563
+ _(M[0].key);
564
564
  break;
565
565
  case "End":
566
- L(k[k.length - 1].key);
566
+ _(M[M.length - 1].key);
567
567
  break;
568
568
  case "Enter":
569
569
  case " ":
@@ -574,35 +574,35 @@ function et({
574
574
  }
575
575
  o.preventDefault(), o.stopPropagation();
576
576
  }, W = (o) => {
577
- var N;
578
- const C = se(r) === o.key, A = v.has(o.key), g = o.children.length > 0, E = o.folderId === null ? u("fileManager.rootLabel", "All files") : ((N = o.item) == null ? void 0 : N.name) ?? "", B = A && g ? jt : Ze, G = (K) => {
579
- K.stopPropagation(), _(o.key), l(o.folderId), g && V(o.key, !0);
580
- }, re = (K) => {
581
- K.stopPropagation(), V(o.key);
577
+ var T;
578
+ const v = se(r) === o.key, A = b.has(o.key), g = o.children.length > 0, E = o.folderId === null ? u("fileManager.rootLabel", "All files") : ((T = o.item) == null ? void 0 : T.name) ?? "", B = A && g ? Pt : Xe, G = (L) => {
579
+ L.stopPropagation(), z(o.key), l(o.folderId), g && V(o.key, !0);
580
+ }, re = (L) => {
581
+ L.stopPropagation(), V(o.key);
582
582
  };
583
583
  return (
584
584
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events -- treeitem row; keyboard operation is handled at the role="tree" container via roving tabindex + onKeyDown
585
585
  /* @__PURE__ */ x(
586
586
  "li",
587
587
  {
588
- ref: (K) => {
589
- K ? I.current.set(o.key, K) : I.current.delete(o.key);
588
+ ref: (L) => {
589
+ L ? R.current.set(o.key, L) : R.current.delete(o.key);
590
590
  },
591
591
  role: "treeitem",
592
592
  "aria-expanded": g ? A : void 0,
593
- "aria-selected": C,
593
+ "aria-selected": v,
594
594
  tabIndex: D === o.key ? 0 : -1,
595
595
  "data-tree-key": o.key,
596
596
  "data-item-id": o.folderId ?? void 0,
597
597
  onClick: G,
598
- onFocus: () => _(o.key),
598
+ onFocus: () => z(o.key),
599
599
  className: [
600
600
  "ds:list-none ds:rounded-[var(--radius-md)]",
601
601
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
602
602
  "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
603
603
  ].join(" "),
604
604
  children: [
605
- /* @__PURE__ */ x("div", { className: nn({ selected: C }), children: [
605
+ /* @__PURE__ */ x("div", { className: rn({ selected: v }), children: [
606
606
  g ? /* @__PURE__ */ n(
607
607
  "span",
608
608
  {
@@ -610,7 +610,7 @@ function et({
610
610
  onClick: re,
611
611
  className: "ds:inline-flex ds:size-5 ds:shrink-0 ds:items-center ds:justify-center ds:text-muted-foreground",
612
612
  children: /* @__PURE__ */ n(
613
- At,
613
+ Dt,
614
614
  {
615
615
  className: [
616
616
  "ds:size-4",
@@ -656,23 +656,23 @@ function et({
656
656
  }
657
657
  );
658
658
  }
659
- const ln = /[\\/:*?"<>|]/g, Ae = 128;
660
- function tt(t) {
661
- return t.replace(ln, "").slice(0, Ae);
659
+ const sn = /[\\/:*?"<>|]/g, Ae = 128;
660
+ function nt(t) {
661
+ return t.replace(sn, "").slice(0, Ae);
662
662
  }
663
- function sn({
663
+ function dn({
664
664
  open: t,
665
665
  onOpenChange: r,
666
666
  onSubmit: l
667
667
  }) {
668
- const { t: i } = J(), a = je(), [u, c] = te("");
668
+ const { t: i } = J(), a = Pe(), [u, c] = te("");
669
669
  ne(() => {
670
670
  t && c("");
671
671
  }, [t]);
672
672
  const F = (S) => {
673
673
  S.preventDefault();
674
- const v = u.trim();
675
- v.length !== 0 && l(v);
674
+ const b = u.trim();
675
+ b.length !== 0 && l(b);
676
676
  };
677
677
  return /* @__PURE__ */ n(m.Root, { open: t, onOpenChange: r, children: /* @__PURE__ */ x(m.Content, { size: "sm", children: [
678
678
  /* @__PURE__ */ n(m.Header, { children: /* @__PURE__ */ n(m.Title, { children: i("fileManager.dialogs.createFolder.title", "New folder") }) }),
@@ -687,12 +687,12 @@ function sn({
687
687
  }
688
688
  ),
689
689
  /* @__PURE__ */ n(
690
- Ve,
690
+ We,
691
691
  {
692
692
  id: a,
693
693
  value: u,
694
694
  maxLength: Ae,
695
- onChange: (S) => c(tt(S.target.value)),
695
+ onChange: (S) => c(nt(S.target.value)),
696
696
  autoFocus: !0
697
697
  }
698
698
  )
@@ -712,7 +712,7 @@ function sn({
712
712
  ] })
713
713
  ] }) });
714
714
  }
715
- function dn({
715
+ function cn({
716
716
  open: t,
717
717
  onOpenChange: r,
718
718
  onUpload: l,
@@ -725,7 +725,7 @@ function dn({
725
725
  folder: i
726
726
  }) }) }),
727
727
  /* @__PURE__ */ n(m.Body, { children: /* @__PURE__ */ n(
728
- Ct,
728
+ xt,
729
729
  {
730
730
  variant: "both",
731
731
  multiple: (a == null ? void 0 : a.multiple) ?? !0,
@@ -737,20 +737,20 @@ function dn({
737
737
  /* @__PURE__ */ n(m.Footer, { children: /* @__PURE__ */ n(m.Close, { asChild: !0, children: /* @__PURE__ */ n(X, { type: "button", intent: "outline", children: u("fileManager.dialogs.upload.close", "Done") }) }) })
738
738
  ] }) });
739
739
  }
740
- function cn({
740
+ function un({
741
741
  open: t,
742
742
  onOpenChange: r,
743
743
  initialName: l,
744
744
  onSubmit: i
745
745
  }) {
746
- const { t: a } = J(), u = je(), [c, F] = te(l);
746
+ const { t: a } = J(), u = Pe(), [c, F] = te(l);
747
747
  ne(() => {
748
748
  t && F(l);
749
749
  }, [t, l]);
750
- const S = (v) => {
751
- v.preventDefault();
752
- const b = c.trim();
753
- b.length !== 0 && i(b);
750
+ const S = (b) => {
751
+ b.preventDefault();
752
+ const k = c.trim();
753
+ k.length !== 0 && i(k);
754
754
  };
755
755
  return /* @__PURE__ */ n(m.Root, { open: t, onOpenChange: r, children: /* @__PURE__ */ x(m.Content, { size: "sm", children: [
756
756
  /* @__PURE__ */ n(m.Header, { children: /* @__PURE__ */ n(m.Title, { children: a("fileManager.dialogs.rename.title", "Rename") }) }),
@@ -765,12 +765,12 @@ function cn({
765
765
  }
766
766
  ),
767
767
  /* @__PURE__ */ n(
768
- Ve,
768
+ We,
769
769
  {
770
770
  id: u,
771
771
  value: c,
772
772
  maxLength: Ae,
773
- onChange: (v) => F(tt(v.target.value)),
773
+ onChange: (b) => F(nt(b.target.value)),
774
774
  autoFocus: !0
775
775
  }
776
776
  )
@@ -790,7 +790,7 @@ function cn({
790
790
  ] })
791
791
  ] }) });
792
792
  }
793
- function un({
793
+ function fn({
794
794
  open: t,
795
795
  onOpenChange: r,
796
796
  count: l,
@@ -811,7 +811,7 @@ function un({
811
811
  ] })
812
812
  ] }) });
813
813
  }
814
- function fn({
814
+ function pn({
815
815
  open: t,
816
816
  onOpenChange: r,
817
817
  items: l,
@@ -823,13 +823,13 @@ function fn({
823
823
  ne(() => {
824
824
  t && S(a);
825
825
  }, [t, a]);
826
- const v = tn(l, i);
826
+ const b = nn(l, i);
827
827
  return /* @__PURE__ */ n(m.Root, { open: t, onOpenChange: r, children: /* @__PURE__ */ x(m.Content, { size: "sm", children: [
828
828
  /* @__PURE__ */ n(m.Header, { children: /* @__PURE__ */ n(m.Title, { children: c("fileManager.dialogs.move.title", "Move {{count}} items", {
829
829
  count: i.length
830
830
  }) }) }),
831
831
  /* @__PURE__ */ n(m.Body, { children: /* @__PURE__ */ n("div", { className: "ds:max-h-72 ds:overflow-y-auto ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)] ds:p-[var(--spacing-xs)]", children: /* @__PURE__ */ n(
832
- et,
832
+ tt,
833
833
  {
834
834
  items: l,
835
835
  selectedFolderId: F,
@@ -838,7 +838,7 @@ function fn({
838
838
  "fileManager.dialogs.move.treeLabel",
839
839
  "Destination folder"
840
840
  ),
841
- excludeIds: v
841
+ excludeIds: b
842
842
  }
843
843
  ) }) }),
844
844
  /* @__PURE__ */ x(m.Footer, { children: [
@@ -855,19 +855,19 @@ function fn({
855
855
  ] })
856
856
  ] }) });
857
857
  }
858
- const pn = {
858
+ const mn = {
859
859
  signed: "success",
860
860
  pending: "warning"
861
861
  };
862
- function Oe(t) {
862
+ function qe(t) {
863
863
  return function(l) {
864
864
  const i = l.data;
865
865
  if (!i) return null;
866
- const a = Xt(i), u = !!t && i.id === t;
866
+ const a = Jt(i), u = !!t && i.id === t;
867
867
  return /* @__PURE__ */ x(
868
868
  "span",
869
869
  {
870
- className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:min-w-0",
870
+ className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:[inline-size:100%] ds:[min-inline-size:0]",
871
871
  "aria-current": u ? "true" : void 0,
872
872
  children: [
873
873
  /* @__PURE__ */ n(
@@ -876,28 +876,30 @@ function Oe(t) {
876
876
  "aria-hidden": "true",
877
877
  className: [
878
878
  "ds:size-4 ds:shrink-0",
879
- i.kind === "folder" ? "ds:text-primary" : "ds:text-muted-foreground"
879
+ // Folders keep the brand primary; file glyphs take the accent, so
880
+ // they read as documents and match the DocumentPreview header icon.
881
+ i.kind === "folder" ? "ds:text-primary" : "ds:text-[color:var(--accent)]"
880
882
  ].join(" ")
881
883
  }
882
884
  ),
883
- /* @__PURE__ */ n("span", { className: "ds:truncate", children: i.name })
885
+ /* @__PURE__ */ n("span", { className: "ds:truncate ds:[min-inline-size:0]", children: i.name })
884
886
  ]
885
887
  }
886
888
  );
887
889
  };
888
890
  }
889
- function mn(t) {
891
+ function gn(t) {
890
892
  const r = t.data;
891
- return !r || !r.documentType ? null : /* @__PURE__ */ n(We, { variant: "neutral", size: "sm", children: r.documentType });
893
+ return !r || !r.documentType ? null : /* @__PURE__ */ n($e, { variant: "neutral", size: "sm", children: r.documentType });
892
894
  }
893
- function gn(t) {
895
+ function hn(t) {
894
896
  return function(l) {
895
897
  var a;
896
898
  const i = (a = l.data) == null ? void 0 : a.signatureStatus;
897
- return !i || i === "none" ? null : /* @__PURE__ */ n(We, { variant: pn[i], size: "sm", withDot: !0, children: t(`fileManager.signature.${i}`, i) });
899
+ return !i || i === "none" ? null : /* @__PURE__ */ n($e, { variant: mn[i], size: "sm", withDot: !0, children: t(`fileManager.signature.${i}`, i) });
898
900
  };
899
901
  }
900
- function hn({
902
+ function yn({
901
903
  items: t,
902
904
  selectedIds: r,
903
905
  previewedItemId: l,
@@ -907,18 +909,18 @@ function hn({
907
909
  can: c,
908
910
  onRequestRename: F,
909
911
  onRequestMove: S,
910
- onRequestDelete: v,
911
- onDownload: b,
912
+ onRequestDelete: b,
913
+ onDownload: k,
912
914
  onShare: D,
913
- onRequestSignature: _,
914
- itemActions: I,
915
- groupByFolder: k = !1,
916
- currentFolderId: L,
915
+ onRequestSignature: z,
916
+ itemActions: R,
917
+ groupByFolder: M = !1,
918
+ currentFolderId: _,
917
919
  gridId: V,
918
920
  tableRef: P,
919
921
  toolbarActions: W
920
922
  }) {
921
- const { t: o, i18n: C } = J(), A = O(
923
+ const { t: o, i18n: v } = J(), A = O(
922
924
  () => new Map(t.map((f) => [f.id, f])),
923
925
  [t]
924
926
  ), g = O(
@@ -936,53 +938,53 @@ function hn({
936
938
  }, [r, t]);
937
939
  const B = O(() => {
938
940
  const f = [];
939
- if (b && f.push({
940
- icon: /* @__PURE__ */ n($e, {}),
941
+ if (k && f.push({
942
+ icon: /* @__PURE__ */ n(Ge, {}),
941
943
  label: o("fileManager.toolbar.download", "Download"),
942
- onClick: (d) => b([d.id]),
944
+ onClick: (d) => k([d.id]),
943
945
  hidden: (d) => d.kind === "folder" || !c(d).download
944
- }), _ && f.push({
945
- icon: /* @__PURE__ */ n(Rt, {}),
946
+ }), z && f.push({
947
+ icon: /* @__PURE__ */ n(zt, {}),
946
948
  label: o("fileManager.toolbar.requestSignature", "Request signature"),
947
- onClick: (d) => _(d),
949
+ onClick: (d) => z(d),
948
950
  hidden: (d) => d.signatureStatus !== "pending"
949
951
  }), D && f.push({
950
- icon: /* @__PURE__ */ n(Xe, {}),
952
+ icon: /* @__PURE__ */ n(Je, {}),
951
953
  label: o("fileManager.toolbar.share", "Share"),
952
954
  onClick: (d) => D([d.id]),
953
955
  hidden: (d) => !c(d).share
954
956
  }), f.push({
955
- icon: /* @__PURE__ */ n(Ge, {}),
957
+ icon: /* @__PURE__ */ n(Ue, {}),
956
958
  label: o("fileManager.toolbar.rename", "Rename"),
957
959
  onClick: (d) => F(d.id),
958
960
  hidden: (d) => !c(d).rename
959
961
  }), f.push({
960
- icon: /* @__PURE__ */ n(Ye, {}),
962
+ icon: /* @__PURE__ */ n(Ze, {}),
961
963
  label: o("fileManager.toolbar.move", "Move"),
962
964
  onClick: (d) => S([d.id]),
963
965
  hidden: (d) => !c(d).move
964
966
  }), f.push({
965
- icon: /* @__PURE__ */ n(Ue, {}),
967
+ icon: /* @__PURE__ */ n(Ye, {}),
966
968
  label: o("fileManager.toolbar.delete", "Delete"),
967
- onClick: (d) => v([d.id]),
969
+ onClick: (d) => b([d.id]),
968
970
  variant: "destructive",
969
971
  hidden: (d) => !c(d).delete
970
- }), I) {
972
+ }), R) {
971
973
  const d = /* @__PURE__ */ new Set();
972
974
  for (const h of t)
973
- for (const R of I(h)) {
974
- if (d.has(R.id)) continue;
975
- d.add(R.id);
976
- const $ = R.id;
975
+ for (const I of R(h)) {
976
+ if (d.has(I.id)) continue;
977
+ d.add(I.id);
978
+ const $ = I.id;
977
979
  f.push({
978
- icon: R.icon ?? /* @__PURE__ */ n("span", { "aria-hidden": "true" }),
979
- label: R.label,
980
- onClick: (M) => {
981
- var z;
982
- return (z = I(M).find((de) => de.id === $)) == null ? void 0 : z.onSelect(M);
980
+ icon: I.icon ?? /* @__PURE__ */ n("span", { "aria-hidden": "true" }),
981
+ label: I.label,
982
+ onClick: (w) => {
983
+ var K;
984
+ return (K = R(w).find((de) => de.id === $)) == null ? void 0 : K.onSelect(w);
983
985
  },
984
- variant: R.destructive ? "destructive" : "default",
985
- hidden: (M) => !I(M).some((z) => z.id === $)
986
+ variant: I.destructive ? "destructive" : "default",
987
+ hidden: (w) => !R(w).some((K) => K.id === $)
986
988
  });
987
989
  }
988
990
  }
@@ -990,17 +992,17 @@ function hn({
990
992
  }, [
991
993
  t,
992
994
  c,
993
- b,
995
+ k,
994
996
  D,
995
- _,
997
+ z,
996
998
  F,
997
999
  S,
998
- v,
999
- I,
1000
+ b,
1001
+ R,
1000
1002
  o
1001
1003
  ]), G = O(() => {
1002
- const f = gn(o), d = Oe(l), h = [];
1003
- return k || h.push({
1004
+ const f = hn(o), d = qe(l), h = [];
1005
+ return M || h.push({
1004
1006
  colId: "name",
1005
1007
  field: "name",
1006
1008
  headerName: o("fileManager.columns.name", "Name"),
@@ -1011,7 +1013,7 @@ function hn({
1011
1013
  colId: "documentType",
1012
1014
  field: "documentType",
1013
1015
  headerName: o("fileManager.columns.type", "Type"),
1014
- cellRenderer: mn,
1016
+ cellRenderer: gn,
1015
1017
  flex: 1,
1016
1018
  minWidth: 120
1017
1019
  }), g && h.push({
@@ -1025,9 +1027,9 @@ function hn({
1025
1027
  colId: "size",
1026
1028
  field: "size",
1027
1029
  headerName: o("fileManager.columns.size", "Size"),
1028
- valueFormatter: (R) => {
1030
+ valueFormatter: (I) => {
1029
1031
  var $;
1030
- return (($ = R.data) == null ? void 0 : $.kind) === "file" && R.data.size !== void 0 ? Zt(R.data.size, C.language, o) : o("fileManager.emptyCell", "—");
1032
+ return (($ = I.data) == null ? void 0 : $.kind) === "file" && I.data.size !== void 0 ? Xt(I.data.size, v.language, o) : o("fileManager.emptyCell", "—");
1031
1033
  },
1032
1034
  filter: !1,
1033
1035
  flex: 1,
@@ -1036,11 +1038,11 @@ function hn({
1036
1038
  colId: "updatedAt",
1037
1039
  field: "updatedAt",
1038
1040
  headerName: o("fileManager.columns.modified", "Modified"),
1039
- valueFormatter: (R) => {
1041
+ valueFormatter: (I) => {
1040
1042
  var $;
1041
- return ($ = R.data) != null && $.updatedAt ? new Intl.DateTimeFormat(C.language, {
1043
+ return ($ = I.data) != null && $.updatedAt ? new Intl.DateTimeFormat(v.language, {
1042
1044
  dateStyle: "medium"
1043
- }).format(new Date(R.data.updatedAt)) : o("fileManager.emptyCell", "—");
1045
+ }).format(new Date(I.data.updatedAt)) : o("fileManager.emptyCell", "—");
1044
1046
  },
1045
1047
  filter: !1,
1046
1048
  flex: 1,
@@ -1048,7 +1050,7 @@ function hn({
1048
1050
  }), B.length > 0 && h.push({
1049
1051
  colId: "actions",
1050
1052
  headerName: o("fileManager.rowActions", "Item actions"),
1051
- cellRenderer: Dt,
1053
+ cellRenderer: Rt,
1052
1054
  cellRendererParams: {
1053
1055
  actions: B,
1054
1056
  group: !0,
@@ -1064,15 +1066,15 @@ function hn({
1064
1066
  E,
1065
1067
  g,
1066
1068
  l,
1067
- k,
1069
+ M,
1068
1070
  o,
1069
- C.language
1071
+ v.language
1070
1072
  ]), re = O(() => {
1071
1073
  const f = {
1072
1074
  getRowId: (d) => d.data.id,
1073
1075
  onRowClicked: (d) => {
1074
- const h = d.event, R = h == null ? void 0 : h.target;
1075
- R != null && R.closest(
1076
+ const h = d.event, I = h == null ? void 0 : h.target;
1077
+ I != null && I.closest(
1076
1078
  '.ag-selection-checkbox, .ag-checkbox-input-wrapper, [col-id="actions"], [data-item-kebab], .ag-group-contracted, .ag-group-expanded'
1077
1079
  ) || d.data && u(d.data);
1078
1080
  },
@@ -1080,9 +1082,9 @@ function hn({
1080
1082
  d.data && a(d.data);
1081
1083
  }
1082
1084
  };
1083
- if (k) {
1084
- const d = Oe(l);
1085
- f.treeData = !0, f.getDataPath = (h) => Qt(h, A, L), f.groupDefaultExpanded = 1, f.autoGroupColumnDef = {
1085
+ if (M) {
1086
+ const d = qe(l);
1087
+ f.treeData = !0, f.getDataPath = (h) => en(h, A, _), f.groupDefaultExpanded = 1, f.autoGroupColumnDef = {
1086
1088
  headerName: o("fileManager.columns.name", "Name"),
1087
1089
  flex: 2,
1088
1090
  minWidth: 200,
@@ -1096,15 +1098,15 @@ function hn({
1096
1098
  }, [
1097
1099
  a,
1098
1100
  u,
1099
- k,
1101
+ M,
1100
1102
  l,
1101
1103
  o,
1102
1104
  A,
1103
- L
1104
- ]), N = (f) => {
1105
+ _
1106
+ ]), T = (f) => {
1105
1107
  const d = f.map((h) => h.id);
1106
- Qe(d, r) || i(d);
1107
- }, K = y(
1108
+ et(d, r) || i(d);
1109
+ }, L = y(
1108
1110
  (f) => {
1109
1111
  var d;
1110
1112
  return l && ((d = f.data) == null ? void 0 : d.id) === l ? "ag-row-selected" : void 0;
@@ -1120,14 +1122,14 @@ function hn({
1120
1122
  rowData: t,
1121
1123
  rowSelection: "multiple",
1122
1124
  gridOptions: re,
1123
- getRowClass: K,
1124
- onSelectionChanged: N,
1125
+ getRowClass: L,
1126
+ onSelectionChanged: T,
1125
1127
  heightClass: "ds:h-[420px]",
1126
1128
  children: /* @__PURE__ */ n(Te.Toolbar, { children: /* @__PURE__ */ n(Te.Toolbar.Actions, { children: W }) })
1127
1129
  }
1128
1130
  );
1129
1131
  }
1130
- function yn({
1132
+ function bn({
1131
1133
  selectedIds: t,
1132
1134
  permissions: r,
1133
1135
  onRequestCreateFolder: l,
@@ -1137,77 +1139,77 @@ function yn({
1137
1139
  onRequestMove: c,
1138
1140
  onRequestDelete: F,
1139
1141
  onDownload: S,
1140
- onShare: v
1142
+ onShare: b
1141
1143
  }) {
1142
- const { t: b } = J(), D = t.length > 0, _ = t.length === 1, I = r.upload && !!i, k = r.download && !!S, L = r.share && !!v, V = a ?? [];
1143
- return I || r.createFolder || V.length > 0 || k || L || r.rename || r.move || r.delete ? /* @__PURE__ */ x(
1144
- zt,
1144
+ const { t: k } = J(), D = t.length > 0, z = t.length === 1, R = r.upload && !!i, M = r.download && !!S, _ = r.share && !!b, V = a ?? [];
1145
+ return R || r.createFolder || V.length > 0 || M || _ || r.rename || r.move || r.delete ? /* @__PURE__ */ x(
1146
+ _t,
1145
1147
  {
1146
1148
  role: "toolbar",
1147
1149
  overflow: "menu",
1148
1150
  size: "sm",
1149
- "aria-label": b("fileManager.toolbarLabel", "File actions"),
1151
+ "aria-label": k("fileManager.toolbarLabel", "File actions"),
1150
1152
  "data-testid": "file-manager-toolbar",
1151
1153
  children: [
1152
- I && /* @__PURE__ */ n(
1154
+ R && /* @__PURE__ */ n(
1153
1155
  Q,
1154
1156
  {
1155
1157
  intent: "primary",
1156
1158
  "data-overflow-pin": !0,
1157
- icon: /* @__PURE__ */ n(_t, {}),
1158
- tooltip: b("fileManager.toolbar.upload", "Upload files"),
1159
+ icon: /* @__PURE__ */ n(Lt, {}),
1160
+ tooltip: k("fileManager.toolbar.upload", "Upload files"),
1159
1161
  onClick: () => i == null ? void 0 : i()
1160
1162
  }
1161
1163
  ),
1162
1164
  r.createFolder && /* @__PURE__ */ n(
1163
1165
  Q,
1164
1166
  {
1165
- icon: /* @__PURE__ */ n(Vt, {}),
1166
- tooltip: b("fileManager.toolbar.newFolder", "New folder"),
1167
+ icon: /* @__PURE__ */ n(Wt, {}),
1168
+ tooltip: k("fileManager.toolbar.newFolder", "New folder"),
1167
1169
  onClick: l
1168
1170
  }
1169
1171
  ),
1170
1172
  V.map((W) => /* @__PURE__ */ n(
1171
1173
  Q,
1172
1174
  {
1173
- icon: W.icon ?? /* @__PURE__ */ n(Lt, {}),
1175
+ icon: W.icon ?? /* @__PURE__ */ n(Kt, {}),
1174
1176
  tooltip: W.label,
1175
1177
  onClick: () => W.onSelect()
1176
1178
  },
1177
1179
  W.id
1178
1180
  )),
1179
- k && /* @__PURE__ */ n(
1181
+ M && /* @__PURE__ */ n(
1180
1182
  Q,
1181
1183
  {
1182
- icon: /* @__PURE__ */ n($e, {}),
1183
- tooltip: b("fileManager.toolbar.download", "Download"),
1184
+ icon: /* @__PURE__ */ n(Ge, {}),
1185
+ tooltip: k("fileManager.toolbar.download", "Download"),
1184
1186
  disabled: !D,
1185
1187
  onClick: () => S == null ? void 0 : S(t)
1186
1188
  }
1187
1189
  ),
1188
- L && /* @__PURE__ */ n(
1190
+ _ && /* @__PURE__ */ n(
1189
1191
  Q,
1190
1192
  {
1191
- icon: /* @__PURE__ */ n(Xe, {}),
1192
- tooltip: b("fileManager.toolbar.share", "Share"),
1193
+ icon: /* @__PURE__ */ n(Je, {}),
1194
+ tooltip: k("fileManager.toolbar.share", "Share"),
1193
1195
  disabled: !D,
1194
- onClick: () => v == null ? void 0 : v(t)
1196
+ onClick: () => b == null ? void 0 : b(t)
1195
1197
  }
1196
1198
  ),
1197
1199
  r.rename && /* @__PURE__ */ n(
1198
1200
  Q,
1199
1201
  {
1200
- icon: /* @__PURE__ */ n(Ge, {}),
1201
- tooltip: b("fileManager.toolbar.rename", "Rename"),
1202
- disabled: !_,
1202
+ icon: /* @__PURE__ */ n(Ue, {}),
1203
+ tooltip: k("fileManager.toolbar.rename", "Rename"),
1204
+ disabled: !z,
1203
1205
  onClick: () => u(t[0])
1204
1206
  }
1205
1207
  ),
1206
1208
  r.move && /* @__PURE__ */ n(
1207
1209
  Q,
1208
1210
  {
1209
- icon: /* @__PURE__ */ n(Ye, {}),
1210
- tooltip: b("fileManager.toolbar.move", "Move"),
1211
+ icon: /* @__PURE__ */ n(Ze, {}),
1212
+ tooltip: k("fileManager.toolbar.move", "Move"),
1211
1213
  disabled: !D,
1212
1214
  onClick: () => c(t)
1213
1215
  }
@@ -1215,8 +1217,8 @@ function yn({
1215
1217
  r.delete && /* @__PURE__ */ n(
1216
1218
  Q,
1217
1219
  {
1218
- icon: /* @__PURE__ */ n(Ue, {}),
1219
- tooltip: b("fileManager.toolbar.delete", "Delete"),
1220
+ icon: /* @__PURE__ */ n(Ye, {}),
1221
+ tooltip: k("fileManager.toolbar.delete", "Delete"),
1220
1222
  disabled: !D,
1221
1223
  onClick: () => F(t)
1222
1224
  }
@@ -1225,7 +1227,7 @@ function yn({
1225
1227
  }
1226
1228
  ) : null;
1227
1229
  }
1228
- const qe = Pe(
1230
+ const je = Ve(
1229
1231
  "ds:relative ds:flex ds:w-full ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-md)]",
1230
1232
  {
1231
1233
  variants: {
@@ -1244,7 +1246,7 @@ const qe = Pe(
1244
1246
  move: !0,
1245
1247
  delete: !0,
1246
1248
  share: !0
1247
- }, vn = ht(
1249
+ }, vn = yt(
1248
1250
  ({
1249
1251
  id: t,
1250
1252
  items: r,
@@ -1255,224 +1257,224 @@ const qe = Pe(
1255
1257
  onSelectionChange: c,
1256
1258
  showTree: F = !1,
1257
1259
  isLoading: S = !1,
1258
- onOpenFile: v,
1259
- onCreateFolder: b,
1260
+ onOpenFile: b,
1261
+ onCreateFolder: k,
1260
1262
  onRenameItem: D,
1261
- onDeleteItems: _,
1262
- onMoveItems: I,
1263
- onDownloadItems: k,
1264
- onShare: L,
1263
+ onDeleteItems: z,
1264
+ onMoveItems: R,
1265
+ onDownloadItems: M,
1266
+ onShare: _,
1265
1267
  onRequestSignature: V,
1266
1268
  onUpload: P,
1267
1269
  uploadConfig: W,
1268
1270
  onPreviewItem: o,
1269
- previewedItemId: C,
1271
+ previewedItemId: v,
1270
1272
  itemActions: A,
1271
1273
  addMenuItems: g,
1272
1274
  groupByFolder: E = !1,
1273
1275
  bordered: B,
1274
1276
  className: G
1275
1277
  }, re) => {
1276
- var Ee;
1277
- const { t: N, i18n: K } = J(), f = y(
1278
+ var Be;
1279
+ const { t: T, i18n: L } = J(), f = y(
1278
1280
  (e) => typeof l == "function" ? e ? { ...Fe, ...l(e) } : Fe : { ...Fe, ...l ?? {} },
1279
1281
  [l]
1280
1282
  ), d = O(() => f(), [f]), h = y(
1281
1283
  (e) => f(e),
1282
1284
  [f]
1283
- ), [R, $] = kt({
1285
+ ), [I, $] = Mt({
1284
1286
  value: i,
1285
1287
  defaultValue: a,
1286
1288
  onChange: u
1287
- }), M = R ?? null, [z, de] = te([]), [w, De] = te({
1289
+ }), w = I ?? null, [K, de] = te([]), [C, De] = te({
1288
1290
  type: "none"
1289
- }), [nt, ye] = te(!1), ce = ee(0), ve = ee(null), be = ee(null), Ie = y((e) => {
1290
- be.current && (be.current.textContent = e);
1291
- }, []), Re = ee(null), ke = ee(!1), T = O(
1291
+ }), [rt, ye] = te(!1), ce = ee(0), be = ee(null), ve = ee(null), Re = y((e) => {
1292
+ ve.current && (ve.current.textContent = e);
1293
+ }, []), Ie = ee(null), ke = ee(!1), N = O(
1292
1294
  () => new Map(r.map((e) => [e.id, e])),
1293
1295
  [r]
1294
1296
  ), Y = y(
1295
1297
  (e) => {
1296
1298
  de((s) => {
1297
- const p = e.filter((H) => T.has(H));
1298
- return Qe(s, p) ? s : (c == null || c(p), p);
1299
+ const p = e.filter((H) => N.has(H));
1300
+ return et(s, p) ? s : (c == null || c(p), p);
1299
1301
  });
1300
1302
  },
1301
- [T, c]
1303
+ [N, c]
1302
1304
  );
1303
1305
  ne(() => {
1304
1306
  de((e) => {
1305
- const s = e.filter((p) => T.has(p));
1307
+ const s = e.filter((p) => N.has(p));
1306
1308
  return s.length === e.length ? e : s;
1307
1309
  });
1308
- }, [T]);
1310
+ }, [N]);
1309
1311
  const Z = y(
1310
1312
  (e) => {
1311
1313
  var p;
1312
1314
  if (e !== null) {
1313
- const H = T.get(e);
1315
+ const H = N.get(e);
1314
1316
  if (!H || H.kind !== "folder") return;
1315
1317
  }
1316
1318
  $(e), de([]), ke.current = !0;
1317
- const s = e === null ? N("fileManager.rootLabel", "All files") : ((p = T.get(e)) == null ? void 0 : p.name) ?? "";
1318
- Ie(
1319
- N("fileManager.announce.navigated", "Opened {{name}}", { name: s })
1319
+ const s = e === null ? T("fileManager.rootLabel", "All files") : ((p = N.get(e)) == null ? void 0 : p.name) ?? "";
1320
+ Re(
1321
+ T("fileManager.announce.navigated", "Opened {{name}}", { name: s })
1320
1322
  );
1321
1323
  },
1322
- [T, $, Ie, N]
1324
+ [N, $, Re, T]
1323
1325
  );
1324
1326
  ne(() => {
1325
1327
  var e;
1326
- ke.current && (ke.current = !1, (e = Re.current) == null || e.focus());
1327
- }, [M]);
1328
- const Me = O(
1329
- () => en(r, M),
1330
- [r, M]
1328
+ ke.current && (ke.current = !1, (e = Ie.current) == null || e.focus());
1329
+ }, [w]);
1330
+ const ze = v && N.has(v) ? v : w, Me = O(
1331
+ () => tn(r, ze),
1332
+ [r, ze]
1331
1333
  ), ue = O(
1332
- () => Je(r, M, K.language),
1333
- [r, M, K.language]
1334
- ), rt = O(
1335
- () => E ? Jt(r, M, K.language) : ue,
1336
- [E, r, M, K.language, ue]
1337
- ), ze = M === null ? N("fileManager.rootLabel", "All files") : ((Ee = T.get(M)) == null ? void 0 : Ee.name) ?? "", U = y((e) => {
1334
+ () => Qe(r, w, L.language),
1335
+ [r, w, L.language]
1336
+ ), at = O(
1337
+ () => E ? Qt(r, w, L.language) : ue,
1338
+ [E, r, w, L.language, ue]
1339
+ ), _e = w === null ? T("fileManager.rootLabel", "All files") : ((Be = N.get(w)) == null ? void 0 : Be.name) ?? "", U = y((e) => {
1338
1340
  De((s) => s.type === "none" ? e : s);
1339
1341
  }, []), q = y(() => {
1340
1342
  De({ type: "none" });
1341
- }, []), at = y(() => {
1342
- !d.createFolder || !b || U({ type: "create-folder" });
1343
- }, [d.createFolder, b, U]), we = y(() => {
1343
+ }, []), it = y(() => {
1344
+ !d.createFolder || !k || U({ type: "create-folder" });
1345
+ }, [d.createFolder, k, U]), Ce = y(() => {
1344
1346
  !d.upload || !P || U({ type: "upload" });
1345
1347
  }, [d.upload, P, U]), oe = y(
1346
1348
  (e) => {
1347
- const s = T.get(e);
1349
+ const s = N.get(e);
1348
1350
  !s || !h(s).rename || !D || U({ type: "rename", itemId: e });
1349
1351
  },
1350
- [h, D, T, U]
1352
+ [h, D, N, U]
1351
1353
  ), me = y(
1352
1354
  (e) => {
1353
- if (!_ || e.length === 0) return;
1355
+ if (!z || e.length === 0) return;
1354
1356
  const s = e.filter((p) => {
1355
- const H = T.get(p);
1357
+ const H = N.get(p);
1356
1358
  return H ? h(H).delete : !1;
1357
1359
  });
1358
1360
  s.length !== 0 && U({ type: "delete", itemIds: s });
1359
1361
  },
1360
- [h, _, T, U]
1361
- ), _e = y(
1362
+ [h, z, N, U]
1363
+ ), Le = y(
1362
1364
  (e) => {
1363
- if (!I || e.length === 0) return;
1365
+ if (!R || e.length === 0) return;
1364
1366
  const s = e.filter((p) => {
1365
- const H = T.get(p);
1367
+ const H = N.get(p);
1366
1368
  return H ? h(H).move : !1;
1367
1369
  });
1368
1370
  s.length !== 0 && U({ type: "move", itemIds: s });
1369
1371
  },
1370
- [h, I, T, U]
1371
- ), Le = y(
1372
+ [h, R, N, U]
1373
+ ), Ke = y(
1372
1374
  (e) => {
1373
- if (!k || e.length === 0) return;
1375
+ if (!M || e.length === 0) return;
1374
1376
  const s = e.filter((p) => {
1375
- const H = T.get(p);
1377
+ const H = N.get(p);
1376
1378
  return H ? h(H).download : !1;
1377
1379
  });
1378
- s.length > 0 && k(s);
1380
+ s.length > 0 && M(s);
1379
1381
  },
1380
- [h, k, T]
1381
- ), Ke = y(
1382
+ [h, M, N]
1383
+ ), Ee = y(
1382
1384
  (e) => {
1383
- if (!L || e.length === 0) return;
1385
+ if (!_ || e.length === 0) return;
1384
1386
  const s = e.filter((p) => {
1385
- const H = T.get(p);
1387
+ const H = N.get(p);
1386
1388
  return H ? h(H).share : !1;
1387
1389
  });
1388
- s.length > 0 && L(s);
1390
+ s.length > 0 && _(s);
1389
1391
  },
1390
- [h, L, T]
1392
+ [h, _, N]
1391
1393
  ), fe = y(
1392
1394
  (e) => {
1393
- e.kind === "folder" ? Z(e.id) : v == null || v(e);
1395
+ e.kind === "folder" ? Z(e.id) : b == null || b(e);
1394
1396
  },
1395
- [Z, v]
1396
- ), Ce = y(
1397
+ [Z, b]
1398
+ ), we = y(
1397
1399
  (e) => {
1398
1400
  e.kind === "folder" ? Z(e.id) : (Y([e.id]), o == null || o(e));
1399
1401
  },
1400
1402
  [Z, Y, o]
1401
- ), it = y(
1403
+ ), ot = y(
1402
1404
  (e) => {
1403
- b == null || b(e, M), q();
1405
+ k == null || k(e, w), q();
1404
1406
  },
1405
- [b, M, q]
1406
- ), ot = y(
1407
+ [k, w, q]
1408
+ ), lt = y(
1407
1409
  (e) => {
1408
- w.type === "rename" && (D == null || D(w.itemId, e)), q();
1410
+ C.type === "rename" && (D == null || D(C.itemId, e)), q();
1409
1411
  },
1410
- [w, D, q]
1411
- ), lt = y(() => {
1412
- w.type === "delete" && (_ == null || _(w.itemIds), Y([])), q();
1413
- }, [w, _, Y, q]), st = y(
1412
+ [C, D, q]
1413
+ ), st = y(() => {
1414
+ C.type === "delete" && (z == null || z(C.itemIds), Y([])), q();
1415
+ }, [C, z, Y, q]), dt = y(
1414
1416
  (e) => {
1415
- w.type === "move" && (I == null || I(w.itemIds, e)), q();
1417
+ C.type === "move" && (R == null || R(C.itemIds, e)), q();
1416
1418
  },
1417
- [w, I, q]
1418
- ), dt = y(
1419
- (e, s) => P ? P(e, s, M) : Promise.resolve(),
1420
- [P, M]
1419
+ [C, R, q]
1420
+ ), ct = y(
1421
+ (e, s) => P ? P(e, s, w) : Promise.resolve(),
1422
+ [P, w]
1421
1423
  ), j = d.upload && !!P, xe = (e) => {
1422
1424
  var s;
1423
1425
  return Array.from(((s = e.dataTransfer) == null ? void 0 : s.types) ?? []).includes("Files");
1424
- }, ct = y(
1426
+ }, ut = y(
1425
1427
  (e) => {
1426
1428
  !j || !xe(e) || (e.preventDefault(), ce.current += 1, ye(!0));
1427
1429
  },
1428
1430
  [j]
1429
- ), ut = y(
1431
+ ), ft = y(
1430
1432
  (e) => {
1431
1433
  !j || !xe(e) || e.preventDefault();
1432
1434
  },
1433
1435
  [j]
1434
- ), ft = y(() => {
1436
+ ), pt = y(() => {
1435
1437
  j && (ce.current = Math.max(0, ce.current - 1), ce.current === 0 && ye(!1));
1436
- }, [j]), pt = y(
1438
+ }, [j]), mt = y(
1437
1439
  (e) => {
1438
- !j || !xe(e) || (e.preventDefault(), ce.current = 0, ye(!1), we());
1440
+ !j || !xe(e) || (e.preventDefault(), ce.current = 0, ye(!1), Ce());
1439
1441
  },
1440
- [j, we]
1441
- ), mt = y(
1442
+ [j, Ce]
1443
+ ), gt = y(
1442
1444
  (e) => {
1443
- if (!(w.type !== "none" || e.target.closest('input, textarea, [contenteditable="true"]')))
1444
- if (e.key === "F2" && z.length === 1)
1445
- e.preventDefault(), oe(z[0]);
1446
- else if (e.key === "Delete" && z.length > 0)
1447
- e.preventDefault(), me(z);
1448
- else if (e.key === "Enter" && z.length === 1) {
1449
- const p = T.get(z[0]);
1450
- p && (e.preventDefault(), p.kind === "file" && o ? Ce(p) : fe(p));
1445
+ if (!(C.type !== "none" || e.target.closest('input, textarea, [contenteditable="true"]')))
1446
+ if (e.key === "F2" && K.length === 1)
1447
+ e.preventDefault(), oe(K[0]);
1448
+ else if (e.key === "Delete" && K.length > 0)
1449
+ e.preventDefault(), me(K);
1450
+ else if (e.key === "Enter" && K.length === 1) {
1451
+ const p = N.get(K[0]);
1452
+ p && (e.preventDefault(), p.kind === "file" && o ? we(p) : fe(p));
1451
1453
  } else e.key.toLowerCase() === "a" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), Y(ue.map((p) => p.id)));
1452
1454
  },
1453
1455
  [
1454
- w.type,
1455
- z,
1456
- T,
1456
+ C.type,
1457
+ K,
1458
+ N,
1457
1459
  oe,
1458
1460
  me,
1459
1461
  fe,
1460
- Ce,
1462
+ we,
1461
1463
  o,
1462
1464
  Y,
1463
1465
  ue
1464
1466
  ]
1465
1467
  ), ae = ee({
1466
- selectedIds: z,
1467
- currentFolderId: M,
1468
+ selectedIds: K,
1469
+ currentFolderId: w,
1468
1470
  items: r,
1469
- activeAction: w
1471
+ activeAction: C
1470
1472
  });
1471
1473
  ae.current = {
1472
- selectedIds: z,
1473
- currentFolderId: M,
1474
+ selectedIds: K,
1475
+ currentFolderId: w,
1474
1476
  items: r,
1475
- activeAction: w
1477
+ activeAction: C
1476
1478
  };
1477
1479
  const le = ee({
1478
1480
  setSelection: Y,
@@ -1495,12 +1497,12 @@ const qe = Pe(
1495
1497
  navigateTo: (e) => le.current.navigateTo(e),
1496
1498
  getTypeFilter: () => {
1497
1499
  var p;
1498
- const s = (((p = ve.current) == null ? void 0 : p.getFilter()) ?? {}).documentType;
1500
+ const s = (((p = be.current) == null ? void 0 : p.getFilter()) ?? {}).documentType;
1499
1501
  return typeof (s == null ? void 0 : s.filter) == "string" ? [s.filter] : [];
1500
1502
  },
1501
1503
  setTypeFilter: (e) => {
1502
1504
  var p;
1503
- const s = (p = ve.current) == null ? void 0 : p.getRawApi();
1505
+ const s = (p = be.current) == null ? void 0 : p.getRawApi();
1504
1506
  if (s) {
1505
1507
  if (e.length === 0) {
1506
1508
  s.destroyFilter("documentType");
@@ -1536,8 +1538,8 @@ const qe = Pe(
1536
1538
  }),
1537
1539
  []
1538
1540
  );
1539
- yt(re, () => Se, [Se]), Mt(Ut, Se, t);
1540
- const Ne = w.type === "rename" ? T.get(w.itemId) : void 0;
1541
+ bt(re, () => Se, [Se]), Ct(Yt, Se, t);
1542
+ const Ne = C.type === "rename" ? N.get(C.itemId) : void 0;
1541
1543
  if (S)
1542
1544
  return /* @__PURE__ */ x(
1543
1545
  "div",
@@ -1545,9 +1547,9 @@ const qe = Pe(
1545
1547
  "data-component": "file-manager",
1546
1548
  "data-component-id": t,
1547
1549
  role: "region",
1548
- "aria-label": N("fileManager.regionLabel", "File manager"),
1550
+ "aria-label": T("fileManager.regionLabel", "File manager"),
1549
1551
  "aria-busy": "true",
1550
- className: qe({ bordered: B, className: G }),
1552
+ className: je({ bordered: B, className: G }),
1551
1553
  children: [
1552
1554
  /* @__PURE__ */ x("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1553
1555
  /* @__PURE__ */ n(he, { variant: "rectangular", size: "sm", className: "ds:w-24" }),
@@ -1565,19 +1567,19 @@ const qe = Pe(
1565
1567
  ]
1566
1568
  }
1567
1569
  );
1568
- const gt = /* @__PURE__ */ n(
1569
- yn,
1570
+ const ht = /* @__PURE__ */ n(
1571
+ bn,
1570
1572
  {
1571
- selectedIds: z,
1573
+ selectedIds: K,
1572
1574
  permissions: d,
1573
- onRequestCreateFolder: at,
1574
- onRequestUpload: j ? we : void 0,
1575
+ onRequestCreateFolder: it,
1576
+ onRequestUpload: j ? Ce : void 0,
1575
1577
  addMenuItems: g,
1576
1578
  onRequestRename: oe,
1577
- onRequestMove: _e,
1579
+ onRequestMove: Le,
1578
1580
  onRequestDelete: me,
1579
- onDownload: d.download && k ? Le : void 0,
1580
- onShare: d.share && L ? Ke : void 0
1581
+ onDownload: d.download && M ? Ke : void 0,
1582
+ onShare: d.share && _ ? Ee : void 0
1581
1583
  }
1582
1584
  );
1583
1585
  return (
@@ -1588,40 +1590,40 @@ const qe = Pe(
1588
1590
  "data-component": "file-manager",
1589
1591
  "data-component-id": t,
1590
1592
  role: "region",
1591
- "aria-label": N("fileManager.regionLabel", "File manager"),
1592
- onKeyDown: mt,
1593
- onDragEnter: j ? ct : void 0,
1594
- onDragOver: j ? ut : void 0,
1595
- onDragLeave: j ? ft : void 0,
1596
- onDrop: j ? pt : void 0,
1597
- className: qe({ bordered: B, className: G }),
1593
+ "aria-label": T("fileManager.regionLabel", "File manager"),
1594
+ onKeyDown: gt,
1595
+ onDragEnter: j ? ut : void 0,
1596
+ onDragOver: j ? ft : void 0,
1597
+ onDragLeave: j ? pt : void 0,
1598
+ onDrop: j ? mt : void 0,
1599
+ className: je({ bordered: B, className: G }),
1598
1600
  children: [
1599
1601
  /* @__PURE__ */ x("div", { className: "ds:flex ds:min-h-0 ds:items-start ds:gap-[var(--spacing-md)]", children: [
1600
1602
  F && /* @__PURE__ */ n("div", { className: "ds:hidden ds:w-56 ds:shrink-0 ds:md:block", children: /* @__PURE__ */ n(
1601
- et,
1603
+ tt,
1602
1604
  {
1603
1605
  items: r,
1604
- selectedFolderId: M,
1606
+ selectedFolderId: w,
1605
1607
  onSelectFolder: Z,
1606
- "aria-label": N("fileManager.treeLabel", "Folders")
1608
+ "aria-label": T("fileManager.treeLabel", "Folders")
1607
1609
  }
1608
1610
  ) }),
1609
1611
  /* @__PURE__ */ n(
1610
1612
  "div",
1611
1613
  {
1612
- ref: Re,
1614
+ ref: Ie,
1613
1615
  tabIndex: -1,
1614
1616
  className: "ds:min-w-0 ds:flex-1 ds:outline-none",
1615
1617
  children: ue.length === 0 ? /* @__PURE__ */ n(
1616
- bt,
1618
+ kt,
1617
1619
  {
1618
1620
  variant: "first-use",
1619
1621
  size: "sm",
1620
- title: N(
1622
+ title: T(
1621
1623
  "fileManager.empty.folderTitle",
1622
1624
  "This folder is empty"
1623
1625
  ),
1624
- description: N(
1626
+ description: T(
1625
1627
  "fileManager.empty.folderDescription",
1626
1628
  "Upload files or create a folder to get started."
1627
1629
  )
@@ -1630,29 +1632,29 @@ const qe = Pe(
1630
1632
  /* Remount on folder change so the DataTable's column filters
1631
1633
  reset cleanly for the new folder. */
1632
1634
  /* @__PURE__ */ n(
1633
- hn,
1635
+ yn,
1634
1636
  {
1635
- items: rt,
1636
- currentFolderId: M,
1637
- selectedIds: z,
1638
- previewedItemId: C ?? null,
1637
+ items: at,
1638
+ currentFolderId: w,
1639
+ selectedIds: K,
1640
+ previewedItemId: v ?? null,
1639
1641
  onSelectionChange: Y,
1640
1642
  onOpen: fe,
1641
- onRowActivate: Ce,
1643
+ onRowActivate: we,
1642
1644
  can: h,
1643
1645
  onRequestRename: oe,
1644
- onRequestMove: _e,
1646
+ onRequestMove: Le,
1645
1647
  onRequestDelete: me,
1646
- onDownload: d.download && k ? Le : void 0,
1647
- onShare: d.share && L ? Ke : void 0,
1648
+ onDownload: d.download && M ? Ke : void 0,
1649
+ onShare: d.share && _ ? Ee : void 0,
1648
1650
  onRequestSignature: V,
1649
1651
  itemActions: A,
1650
1652
  groupByFolder: E,
1651
1653
  gridId: t ? `${t}-list` : void 0,
1652
- tableRef: ve,
1653
- toolbarActions: gt
1654
+ tableRef: be,
1655
+ toolbarActions: ht
1654
1656
  },
1655
- M ?? "__root__"
1657
+ w ?? "__root__"
1656
1658
  )
1657
1659
  )
1658
1660
  }
@@ -1661,36 +1663,29 @@ const qe = Pe(
1661
1663
  /* @__PURE__ */ n("div", { className: "ds:mt-[var(--spacing-sm)] ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-sm)] ds:text-muted-foreground", children: /* @__PURE__ */ x(
1662
1664
  vt,
1663
1665
  {
1664
- "aria-label": N("fileManager.breadcrumbLabel", "Folder path"),
1666
+ "aria-label": T("fileManager.breadcrumbLabel", "Folder path"),
1667
+ disableCollapse: !0,
1665
1668
  children: [
1666
- /* @__PURE__ */ n(Be, { children: Me.length === 0 ? /* @__PURE__ */ n(ge, { children: N("fileManager.rootLabel", "All files") }) : /* @__PURE__ */ n(ge, { asChild: !0, children: /* @__PURE__ */ n("button", { type: "button", onClick: () => Z(null), children: N("fileManager.rootLabel", "All files") }) }) }),
1667
- Me.map((e, s) => /* @__PURE__ */ n(Be, { children: s === Me.length - 1 ? /* @__PURE__ */ n(ge, { children: e.name }) : /* @__PURE__ */ n(ge, { asChild: !0, children: /* @__PURE__ */ n("button", { type: "button", onClick: () => Z(e.id), children: e.name }) }) }, e.id))
1669
+ /* @__PURE__ */ n(He, { children: Me.length === 0 ? /* @__PURE__ */ n(ge, { children: T("fileManager.rootLabel", "All files") }) : /* @__PURE__ */ n(ge, { asChild: !0, children: /* @__PURE__ */ n("button", { type: "button", onClick: () => Z(null), children: T("fileManager.rootLabel", "All files") }) }) }),
1670
+ Me.map((e, s) => /* @__PURE__ */ n(He, { children: s === Me.length - 1 ? /* @__PURE__ */ n(ge, { children: e.name }) : /* @__PURE__ */ n(ge, { asChild: !0, children: /* @__PURE__ */ n("button", { type: "button", onClick: () => Z(e.id), children: e.name }) }) }, e.id))
1668
1671
  ]
1669
1672
  }
1670
1673
  ) }),
1671
- /* @__PURE__ */ n(
1672
- "p",
1673
- {
1674
- role: "status",
1675
- "aria-live": "polite",
1676
- className: z.length > 0 ? "type-meta ds:m-0 ds:text-muted-foreground" : "ds:sr-only",
1677
- children: z.length > 0 ? N("fileManager.selected", "{{count}} items selected", {
1678
- count: z.length
1679
- }) : ""
1680
- }
1681
- ),
1682
- nt && /* @__PURE__ */ x(
1674
+ /* @__PURE__ */ n("p", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: K.length > 0 ? T("fileManager.selected", "{{count}} items selected", {
1675
+ count: K.length
1676
+ }) : "" }),
1677
+ rt && /* @__PURE__ */ x(
1683
1678
  "div",
1684
1679
  {
1685
1680
  "aria-hidden": "true",
1686
1681
  className: "ds:pointer-events-none ds:absolute ds:inset-0 ds:z-20 ds:flex ds:flex-col ds:items-center ds:justify-center ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-lg)] ds:border-2 ds:border-dashed ds:border-primary ds:bg-primary/10",
1687
1682
  children: [
1688
- /* @__PURE__ */ n(xt, { className: "ds:size-8 ds:text-primary" }),
1689
- /* @__PURE__ */ n("span", { className: "type-label ds:text-primary", children: N(
1683
+ /* @__PURE__ */ n(St, { className: "ds:size-8 ds:text-primary" }),
1684
+ /* @__PURE__ */ n("span", { className: "type-label ds:text-primary", children: T(
1690
1685
  "fileManager.dropOverlay",
1691
1686
  "Drop files to upload to {{folder}}",
1692
1687
  {
1693
- folder: ze
1688
+ folder: _e
1694
1689
  }
1695
1690
  ) })
1696
1691
  ]
@@ -1699,67 +1694,67 @@ const qe = Pe(
1699
1694
  /* @__PURE__ */ n(
1700
1695
  "span",
1701
1696
  {
1702
- ref: be,
1697
+ ref: ve,
1703
1698
  role: "status",
1704
1699
  "aria-live": "polite",
1705
1700
  className: "ds:sr-only"
1706
1701
  }
1707
1702
  ),
1708
1703
  /* @__PURE__ */ n(
1709
- sn,
1704
+ dn,
1710
1705
  {
1711
- open: w.type === "create-folder",
1706
+ open: C.type === "create-folder",
1712
1707
  onOpenChange: (e) => {
1713
1708
  e || q();
1714
1709
  },
1715
- onSubmit: it
1710
+ onSubmit: ot
1716
1711
  }
1717
1712
  ),
1718
1713
  /* @__PURE__ */ n(
1719
- dn,
1714
+ cn,
1720
1715
  {
1721
- open: w.type === "upload",
1716
+ open: C.type === "upload",
1722
1717
  onOpenChange: (e) => {
1723
1718
  e || q();
1724
1719
  },
1725
- onUpload: dt,
1726
- destinationLabel: ze,
1720
+ onUpload: ct,
1721
+ destinationLabel: _e,
1727
1722
  config: W
1728
1723
  }
1729
1724
  ),
1730
1725
  /* @__PURE__ */ n(
1731
- cn,
1726
+ un,
1732
1727
  {
1733
- open: w.type === "rename",
1728
+ open: C.type === "rename",
1734
1729
  onOpenChange: (e) => {
1735
1730
  e || q();
1736
1731
  },
1737
1732
  initialName: (Ne == null ? void 0 : Ne.name) ?? "",
1738
- onSubmit: ot
1733
+ onSubmit: lt
1739
1734
  }
1740
1735
  ),
1741
1736
  /* @__PURE__ */ n(
1742
- un,
1737
+ fn,
1743
1738
  {
1744
- open: w.type === "delete",
1739
+ open: C.type === "delete",
1745
1740
  onOpenChange: (e) => {
1746
1741
  e || q();
1747
1742
  },
1748
- count: w.type === "delete" ? w.itemIds.length : 0,
1749
- onConfirm: lt
1743
+ count: C.type === "delete" ? C.itemIds.length : 0,
1744
+ onConfirm: st
1750
1745
  }
1751
1746
  ),
1752
1747
  /* @__PURE__ */ n(
1753
- fn,
1748
+ pn,
1754
1749
  {
1755
- open: w.type === "move",
1750
+ open: C.type === "move",
1756
1751
  onOpenChange: (e) => {
1757
1752
  e || q();
1758
1753
  },
1759
1754
  items: r,
1760
- movingIds: w.type === "move" ? w.itemIds : [],
1761
- currentFolderId: M,
1762
- onConfirm: st
1755
+ movingIds: C.type === "move" ? C.itemIds : [],
1756
+ currentFolderId: w,
1757
+ onConfirm: dt
1763
1758
  }
1764
1759
  )
1765
1760
  ]
@@ -1771,6 +1766,6 @@ const qe = Pe(
1771
1766
  vn.displayName = "FileManager";
1772
1767
  export {
1773
1768
  vn as F,
1774
- Ut as f
1769
+ Yt as f
1775
1770
  };
1776
- //# sourceMappingURL=file-manager-UF8dkQF1.js.map
1771
+ //# sourceMappingURL=file-manager-DfTG7bxx.js.map