@factorialco/f0-react 12.1.0 → 12.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ChatPostComposerDialog-NEIFDJib.js → ChatPostComposerDialog-DxjgJvww.js} +3 -3
- package/dist/{CoachmarkProvider-BR6fdrrh.js → CoachmarkProvider-DxxTrrK0.js} +27397 -27397
- package/dist/{DocumentToolbar-Cb3E9RnA.js → DocumentToolbar-MbpAP2xa.js} +5 -5
- package/dist/{DocxViewer-pfu-5v_l.js → DocxViewer-DLnunbBn.js} +2 -2
- package/dist/{F0AiProcessingOverlay-O9SpiZk4.js → F0AiProcessingOverlay-cNJdJNme.js} +1058 -1042
- package/dist/{F0CanvasPanel-Dn-Gkmsz.js → F0CanvasPanel-d0ARNvCs.js} +7890 -7886
- package/dist/F0DocumentViewer-CMTc9-v6.js +3 -0
- package/dist/{F0DocumentViewer-CRPMDWGj.js → F0DocumentViewer-DU0u8sE9.js} +37 -37
- package/dist/{F0Map-toEYLWLQ.js → F0Map-Ytutlfjd.js} +100 -100
- package/dist/{F0Select-BMzj1oyt.js → F0Select-DKCy1C1n.js} +1030 -1030
- package/dist/{F0Text-CjR98zwA.js → F0Text-BtzfLrwP.js} +10 -10
- package/dist/F0VideoPlayer-BZmP3fGi.js +1 -0
- package/dist/{F0VideoPlayer-BmbFZEII.js → F0VideoPlayer-DWE0J3NR.js} +290 -290
- package/dist/{Map-Cakv1wM4.js → Map-DyNfwVdY.js} +20 -20
- package/dist/{PdfThumbnail-Bxzk7G0u.js → PdfThumbnail-C-F-aujX.js} +1 -1
- package/dist/{SheetViewer-zNoFISP0.js → SheetViewer-BRTqhc5o.js} +6 -6
- package/dist/{TextViewer-BTRJxwwJ.js → TextViewer-_rXZwM4E.js} +2 -2
- package/dist/ai.js +4 -4
- package/dist/component-status.js +2 -2
- package/dist/{dist-UTTWm0CV.js → dist-DvxtFKDL.js} +1 -1
- package/dist/experimental.d.ts +7 -1
- package/dist/experimental.js +4531 -4704
- package/dist/f0.d.ts +1 -1
- package/dist/f0.js +477 -477
- package/dist/{maplibre-C5htrHET.js → maplibre-BMdn9aMc.js} +1 -1
- package/dist/{pdfWorker-B4yvX0G-.js → pdfWorker-YDigL1gB.js} +1 -1
- package/dist/{popover-B-ET_Kay.js → popover-BjrPOMeQ.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{types-CUKMWWRC.d.ts → types-DiDeZRzi.d.ts} +4 -0
- package/dist/{useData-DWwEymV5.js → useData-BPTvQHGp.js} +291 -291
- package/package.json +1 -1
- package/dist/F0DocumentViewer-DzZu9sCO.js +0 -3
- package/dist/F0VideoPlayer-DsHl-sBd.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as e } from "./rolldown-runtime-BItFwnF5.js";
|
|
2
|
-
import {
|
|
2
|
+
import { A as t, D as n, E as r, N as i, T as a, U as o, Xt as s, a as c, ar as l, b as u, bt as d, gn as f, hn as p, i as m, in as h, ir as g, j as _, k as v, kt as y, ln as b, on as x, p as S, rn as C, rr as w, t as T, x as E, y as D, yt as O, zt as k } from "./popover-BjrPOMeQ.js";
|
|
3
3
|
import { L as A, R as ee } from "./tooltip-BX4dSfeL.js";
|
|
4
4
|
import { t as j } from "./dist-Cuwaibqg.js";
|
|
5
5
|
import * as M from "react";
|
|
@@ -1093,7 +1093,7 @@ function Ee(e, t) {
|
|
|
1093
1093
|
}
|
|
1094
1094
|
//#endregion
|
|
1095
1095
|
//#region src/elements/F0Box/F0Box.tsx
|
|
1096
|
-
var De =
|
|
1096
|
+
var De = p({
|
|
1097
1097
|
base: "",
|
|
1098
1098
|
variants: {
|
|
1099
1099
|
...fe,
|
|
@@ -1198,10 +1198,10 @@ var De = E({
|
|
|
1198
1198
|
});
|
|
1199
1199
|
});
|
|
1200
1200
|
ke.displayName = "F0Box";
|
|
1201
|
-
var Ae =
|
|
1201
|
+
var Ae = x({
|
|
1202
1202
|
name: "F0Box",
|
|
1203
1203
|
type: "layout"
|
|
1204
|
-
}, ke), je =
|
|
1204
|
+
}, ke), je = p({
|
|
1205
1205
|
base: "text-base text-f1-foreground",
|
|
1206
1206
|
variants: {
|
|
1207
1207
|
variant: {
|
|
@@ -1253,69 +1253,69 @@ var Ae = y({
|
|
|
1253
1253
|
"positive-strong": "p",
|
|
1254
1254
|
"info-strong": "p",
|
|
1255
1255
|
code: "code"
|
|
1256
|
-
}, Ne = P(({ content: e, variant: t, align: n, className:
|
|
1257
|
-
let
|
|
1256
|
+
}, Ne = P(({ content: e, variant: t, align: n, className: r, as: i, ellipsis: a, noEllipsisTooltip: o, markdown: s, required: c, ...l }, u) => {
|
|
1257
|
+
let f = i ?? Me[t ?? "body"], p = c ? /* @__PURE__ */ U("span", {
|
|
1258
1258
|
className: "text-f1-foreground-critical",
|
|
1259
1259
|
"aria-hidden": "true",
|
|
1260
1260
|
children: " *"
|
|
1261
1261
|
}) : null;
|
|
1262
|
-
if (
|
|
1263
|
-
let
|
|
1264
|
-
return
|
|
1265
|
-
...
|
|
1262
|
+
if (a !== void 0) {
|
|
1263
|
+
let i = typeof a == "number" ? a : 1;
|
|
1264
|
+
return p ? N(f, {
|
|
1265
|
+
...l,
|
|
1266
1266
|
className: A(je({
|
|
1267
1267
|
variant: t,
|
|
1268
1268
|
align: n
|
|
1269
|
-
}),
|
|
1270
|
-
ref:
|
|
1271
|
-
}, /* @__PURE__ */ U(
|
|
1272
|
-
lines:
|
|
1273
|
-
noTooltip:
|
|
1269
|
+
}), r, "inline-flex gap-0.5"),
|
|
1270
|
+
ref: u
|
|
1271
|
+
}, /* @__PURE__ */ U(O, {
|
|
1272
|
+
lines: i,
|
|
1273
|
+
noTooltip: o,
|
|
1274
1274
|
tag: "span",
|
|
1275
1275
|
className: "min-w-0",
|
|
1276
|
-
markdown:
|
|
1276
|
+
markdown: s,
|
|
1277
1277
|
children: e
|
|
1278
|
-
}),
|
|
1279
|
-
ref:
|
|
1280
|
-
lines:
|
|
1281
|
-
noTooltip:
|
|
1282
|
-
tag:
|
|
1278
|
+
}), p) : /* @__PURE__ */ U(O, {
|
|
1279
|
+
ref: u,
|
|
1280
|
+
lines: i,
|
|
1281
|
+
noTooltip: o,
|
|
1282
|
+
tag: f,
|
|
1283
1283
|
className: A(je({
|
|
1284
1284
|
variant: t,
|
|
1285
1285
|
align: n
|
|
1286
|
-
}),
|
|
1287
|
-
markdown:
|
|
1288
|
-
...
|
|
1286
|
+
}), r),
|
|
1287
|
+
markdown: s,
|
|
1288
|
+
...l,
|
|
1289
1289
|
children: e
|
|
1290
1290
|
});
|
|
1291
1291
|
}
|
|
1292
|
-
if (
|
|
1293
|
-
let
|
|
1294
|
-
return
|
|
1295
|
-
...
|
|
1292
|
+
if (s) {
|
|
1293
|
+
let i = d(e);
|
|
1294
|
+
return p ? N(f, {
|
|
1295
|
+
...l,
|
|
1296
1296
|
className: A(je({
|
|
1297
1297
|
variant: t,
|
|
1298
1298
|
align: n
|
|
1299
|
-
}),
|
|
1300
|
-
ref:
|
|
1301
|
-
}, /* @__PURE__ */ U("span", { dangerouslySetInnerHTML: { __html:
|
|
1302
|
-
...
|
|
1299
|
+
}), r),
|
|
1300
|
+
ref: u
|
|
1301
|
+
}, /* @__PURE__ */ U("span", { dangerouslySetInnerHTML: { __html: i } }), p) : N(f, {
|
|
1302
|
+
...l,
|
|
1303
1303
|
className: A(je({
|
|
1304
1304
|
variant: t,
|
|
1305
1305
|
align: n
|
|
1306
|
-
}),
|
|
1307
|
-
ref:
|
|
1308
|
-
dangerouslySetInnerHTML: { __html:
|
|
1306
|
+
}), r),
|
|
1307
|
+
ref: u,
|
|
1308
|
+
dangerouslySetInnerHTML: { __html: i }
|
|
1309
1309
|
});
|
|
1310
1310
|
}
|
|
1311
|
-
return N(
|
|
1312
|
-
...
|
|
1311
|
+
return N(f, {
|
|
1312
|
+
...l,
|
|
1313
1313
|
className: A(je({
|
|
1314
1314
|
variant: t,
|
|
1315
1315
|
align: n
|
|
1316
|
-
}),
|
|
1317
|
-
ref:
|
|
1318
|
-
}, e,
|
|
1316
|
+
}), r),
|
|
1317
|
+
ref: u
|
|
1318
|
+
}, e, p);
|
|
1319
1319
|
});
|
|
1320
1320
|
Ne.displayName = "Text";
|
|
1321
1321
|
//#endregion
|
|
@@ -1344,7 +1344,7 @@ var Pe = {
|
|
|
1344
1344
|
});
|
|
1345
1345
|
};
|
|
1346
1346
|
Ie.displayName = "ColorAvatar";
|
|
1347
|
-
var Le =
|
|
1347
|
+
var Le = l(w("F0AvatarColor", Ie)), Re = {
|
|
1348
1348
|
xs: {
|
|
1349
1349
|
box: "h-5 min-w-5",
|
|
1350
1350
|
circle: "size-4",
|
|
@@ -1398,7 +1398,7 @@ var Le = m(x("F0AvatarColor", Ie)), Re = {
|
|
|
1398
1398
|
});
|
|
1399
1399
|
};
|
|
1400
1400
|
ze.displayName = "ColorListAvatar";
|
|
1401
|
-
var Be =
|
|
1401
|
+
var Be = l(w("F0AvatarColorList", ze)), Ve = P((e, t) => /* @__PURE__ */ W("svg", {
|
|
1402
1402
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1403
1403
|
fill: "none",
|
|
1404
1404
|
viewBox: "0 0 24 24",
|
|
@@ -2161,7 +2161,7 @@ var Be = m(x("F0AvatarColorList", ze)), Ve = P((e, t) => /* @__PURE__ */ W("svg"
|
|
|
2161
2161
|
timeoff: Ot,
|
|
2162
2162
|
workflows: Mt,
|
|
2163
2163
|
whats_new: st
|
|
2164
|
-
}, Pt =
|
|
2164
|
+
}, Pt = p({
|
|
2165
2165
|
base: "relative flex shrink-0 items-center justify-center",
|
|
2166
2166
|
variants: { size: {
|
|
2167
2167
|
"4xs": "h-2.5 w-2.5",
|
|
@@ -2173,7 +2173,7 @@ var Be = m(x("F0AvatarColorList", ze)), Ve = P((e, t) => /* @__PURE__ */ W("svg"
|
|
|
2173
2173
|
lg: "h-10 w-10"
|
|
2174
2174
|
} },
|
|
2175
2175
|
defaultVariants: { size: "sm" }
|
|
2176
|
-
}), Ft =
|
|
2176
|
+
}), Ft = p({
|
|
2177
2177
|
base: "relative text-f1-foreground-inverse drop-shadow",
|
|
2178
2178
|
variants: { size: {
|
|
2179
2179
|
"4xs": "h-[7px] w-[7px]",
|
|
@@ -2226,7 +2226,7 @@ function Lt({ size: e = "sm", module: t, ...n }) {
|
|
|
2226
2226
|
}), r ? /* @__PURE__ */ U(r, { className: Ft({ size: e }) }) : null]
|
|
2227
2227
|
});
|
|
2228
2228
|
}
|
|
2229
|
-
var Rt =
|
|
2229
|
+
var Rt = l(Lt), zt = p({
|
|
2230
2230
|
base: "flex shrink-0 items-center justify-center rounded-full",
|
|
2231
2231
|
variants: {
|
|
2232
2232
|
type: {
|
|
@@ -2252,12 +2252,12 @@ var Rt = m(Lt), zt = E({
|
|
|
2252
2252
|
sm: "xs",
|
|
2253
2253
|
md: "sm",
|
|
2254
2254
|
lg: "md"
|
|
2255
|
-
}, Vt =
|
|
2255
|
+
}, Vt = l(w("Badge", ({ type: e, size: t = "md", icon: n }) => /* @__PURE__ */ U("div", {
|
|
2256
2256
|
className: zt({
|
|
2257
2257
|
type: e,
|
|
2258
2258
|
size: t
|
|
2259
2259
|
}),
|
|
2260
|
-
children: /* @__PURE__ */ U(
|
|
2260
|
+
children: /* @__PURE__ */ U(h, {
|
|
2261
2261
|
icon: n,
|
|
2262
2262
|
size: Bt[t]
|
|
2263
2263
|
})
|
|
@@ -2267,7 +2267,7 @@ var Rt = m(Lt), zt = E({
|
|
|
2267
2267
|
scope: n,
|
|
2268
2268
|
imageLoadingStatus: i,
|
|
2269
2269
|
onImageLoadingStatusChange: a,
|
|
2270
|
-
children: /* @__PURE__ */ U(
|
|
2270
|
+
children: /* @__PURE__ */ U(E.span, {
|
|
2271
2271
|
...r,
|
|
2272
2272
|
ref: t
|
|
2273
2273
|
})
|
|
@@ -2275,15 +2275,15 @@ var Rt = m(Lt), zt = E({
|
|
|
2275
2275
|
});
|
|
2276
2276
|
qt.displayName = Ht;
|
|
2277
2277
|
var Jt = "AvatarImage", Yt = M.forwardRef((e, t) => {
|
|
2278
|
-
let { __scopeAvatar:
|
|
2278
|
+
let { __scopeAvatar: i, src: a, onLoadingStatusChange: o = () => {}, ...s } = e, c = Kt(Jt, i), l = Qt(a, s.referrerPolicy), u = n((e) => {
|
|
2279
2279
|
o(e), c.onImageLoadingStatusChange(e);
|
|
2280
2280
|
});
|
|
2281
|
-
return
|
|
2281
|
+
return r(() => {
|
|
2282
2282
|
l !== "idle" && u(l);
|
|
2283
|
-
}, [l, u]), l === "loaded" ? /* @__PURE__ */ U(
|
|
2283
|
+
}, [l, u]), l === "loaded" ? /* @__PURE__ */ U(E.img, {
|
|
2284
2284
|
...s,
|
|
2285
2285
|
ref: t,
|
|
2286
|
-
src:
|
|
2286
|
+
src: a
|
|
2287
2287
|
}) : null;
|
|
2288
2288
|
});
|
|
2289
2289
|
Yt.displayName = Jt;
|
|
@@ -2294,23 +2294,23 @@ var Xt = "AvatarFallback", Zt = M.forwardRef((e, t) => {
|
|
|
2294
2294
|
let e = window.setTimeout(() => s(!0), r);
|
|
2295
2295
|
return () => window.clearTimeout(e);
|
|
2296
2296
|
}
|
|
2297
|
-
}, [r]), o && a.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ U(
|
|
2297
|
+
}, [r]), o && a.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ U(E.span, {
|
|
2298
2298
|
...i,
|
|
2299
2299
|
ref: t
|
|
2300
2300
|
}) : null;
|
|
2301
2301
|
});
|
|
2302
2302
|
Zt.displayName = Xt;
|
|
2303
2303
|
function Qt(e, t) {
|
|
2304
|
-
let [n,
|
|
2305
|
-
return
|
|
2304
|
+
let [n, i] = M.useState("idle");
|
|
2305
|
+
return r(() => {
|
|
2306
2306
|
if (!e) {
|
|
2307
|
-
|
|
2307
|
+
i("error");
|
|
2308
2308
|
return;
|
|
2309
2309
|
}
|
|
2310
|
-
let n = !0,
|
|
2311
|
-
n &&
|
|
2310
|
+
let n = !0, r = new window.Image(), a = (e) => () => {
|
|
2311
|
+
n && i(e);
|
|
2312
2312
|
};
|
|
2313
|
-
return
|
|
2313
|
+
return i("loading"), r.onload = a("loaded"), r.onerror = a("error"), r.src = e, t && (r.referrerPolicy = t), () => {
|
|
2314
2314
|
n = !1;
|
|
2315
2315
|
};
|
|
2316
2316
|
}, [e, t]), n;
|
|
@@ -2330,7 +2330,7 @@ var $t = qt, en = Yt, tn = Zt, nn = te(void 0), rn = ({ children: e, ...t }) =>
|
|
|
2330
2330
|
...e,
|
|
2331
2331
|
...r
|
|
2332
2332
|
});
|
|
2333
|
-
}), sn =
|
|
2333
|
+
}), sn = p({
|
|
2334
2334
|
base: "relative flex shrink-0 items-center justify-center overflow-hidden text-center font-semibold ring-1 ring-inset ring-f1-border-secondary",
|
|
2335
2335
|
variants: {
|
|
2336
2336
|
size: {
|
|
@@ -2514,32 +2514,32 @@ var gn = {
|
|
|
2514
2514
|
lg: "md",
|
|
2515
2515
|
xl: "lg",
|
|
2516
2516
|
"2xl": "lg"
|
|
2517
|
-
}, xn = (e) => fn.includes(e), Sn = (e) => e && !xn(e) ? (console.warn(`The avatar size: ${e} is deprecated. Use ${pn[e]} instead.`), pn[e] ?? yn) : e ?? yn, Cn = ({ icon: e, src: t, flag: n }) => e ? "bg-f1-background-secondary" : t || n ? "bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary" : "", wn = P(({ src: e, name:
|
|
2518
|
-
let f = z(() => Object.fromEntries(Object.entries(pn).map(([e, t]) => [t, e])), []), p = Sn(
|
|
2517
|
+
}, xn = (e) => fn.includes(e), Sn = (e) => e && !xn(e) ? (console.warn(`The avatar size: ${e} is deprecated. Use ${pn[e]} instead.`), pn[e] ?? yn) : e ?? yn, Cn = ({ icon: e, src: t, flag: n }) => e ? "bg-f1-background-secondary" : t || n ? "bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary" : "", wn = P(({ src: e, name: t, size: n, type: r = "base", color: i = "random", "aria-label": a, "aria-labelledby": o, badge: c, flag: l, icon: u }, d) => {
|
|
2518
|
+
let f = z(() => Object.fromEntries(Object.entries(pn).map(([e, t]) => [t, e])), []), p = Sn(n), m = mn(t, p), g = i === "random" ? hn(Array.isArray(t) ? t.join("") : t) : i, _ = !!(a || o), v = _n(p), y = vn(p), b = z(() => c ? /* @__PURE__ */ W(H, { children: [c.type === "module" ? /* @__PURE__ */ U(Rt, {
|
|
2519
2519
|
module: c.module,
|
|
2520
|
-
size:
|
|
2520
|
+
size: y
|
|
2521
2521
|
}) : null, c.type === "module" ? null : /* @__PURE__ */ U(Vt, {
|
|
2522
2522
|
type: c.type,
|
|
2523
2523
|
icon: c.icon,
|
|
2524
|
-
size:
|
|
2524
|
+
size: v
|
|
2525
2525
|
})] }) : null, [
|
|
2526
2526
|
c,
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
]),
|
|
2527
|
+
v,
|
|
2528
|
+
y
|
|
2529
|
+
]), x = /* @__PURE__ */ W("div", {
|
|
2530
2530
|
className: "relative inline-flex h-fit w-fit",
|
|
2531
2531
|
children: [/* @__PURE__ */ U("div", {
|
|
2532
2532
|
className: "relative h-fit w-fit",
|
|
2533
|
-
style: c ? { clipPath: gn.get(
|
|
2533
|
+
style: c ? { clipPath: gn.get(r === "rounded" ? "rounded" : "base", p, c.type === "module" ? "module" : "default") } : void 0,
|
|
2534
2534
|
children: /* @__PURE__ */ U(cn, {
|
|
2535
2535
|
size: f[p] || "small",
|
|
2536
|
-
type:
|
|
2537
|
-
color:
|
|
2536
|
+
type: r,
|
|
2537
|
+
color: g,
|
|
2538
2538
|
ref: d,
|
|
2539
2539
|
role: "img",
|
|
2540
|
-
"aria-hidden": !
|
|
2541
|
-
"aria-label":
|
|
2542
|
-
"aria-labelledby":
|
|
2540
|
+
"aria-hidden": !_,
|
|
2541
|
+
"aria-label": a,
|
|
2542
|
+
"aria-labelledby": o,
|
|
2543
2543
|
translate: "no",
|
|
2544
2544
|
"data-a11y-color-contrast-ignore": !0,
|
|
2545
2545
|
className: Cn({
|
|
@@ -2547,7 +2547,7 @@ var gn = {
|
|
|
2547
2547
|
src: e,
|
|
2548
2548
|
flag: l
|
|
2549
2549
|
}),
|
|
2550
|
-
children: u ? /* @__PURE__ */ U(
|
|
2550
|
+
children: u ? /* @__PURE__ */ U(h, {
|
|
2551
2551
|
icon: u.icon,
|
|
2552
2552
|
color: u.color,
|
|
2553
2553
|
size: bn[p]
|
|
@@ -2565,13 +2565,13 @@ var gn = {
|
|
|
2565
2565
|
})
|
|
2566
2566
|
}), c ? /* @__PURE__ */ U("div", {
|
|
2567
2567
|
className: "absolute -bottom-0.5 -right-0.5",
|
|
2568
|
-
children:
|
|
2568
|
+
children: b
|
|
2569
2569
|
}) : null]
|
|
2570
2570
|
});
|
|
2571
|
-
return c?.tooltip ? /* @__PURE__ */ U(
|
|
2571
|
+
return c?.tooltip ? /* @__PURE__ */ U(s, {
|
|
2572
2572
|
description: c.tooltip,
|
|
2573
|
-
children:
|
|
2574
|
-
}) :
|
|
2573
|
+
children: x
|
|
2574
|
+
}) : x;
|
|
2575
2575
|
});
|
|
2576
2576
|
wn.displayName = "BaseAvatar";
|
|
2577
2577
|
//#endregion
|
|
@@ -2587,7 +2587,7 @@ var Tn = ({ name: e, src: t, size: n, "aria-label": r, "aria-labelledby": i, bad
|
|
|
2587
2587
|
badge: a
|
|
2588
2588
|
});
|
|
2589
2589
|
Tn.displayName = "CompanyAvatar";
|
|
2590
|
-
var En =
|
|
2590
|
+
var En = l(Tn), Dn = [
|
|
2591
2591
|
"xs",
|
|
2592
2592
|
"sm",
|
|
2593
2593
|
"md",
|
|
@@ -2609,13 +2609,13 @@ var En = m(Tn), Dn = [
|
|
|
2609
2609
|
className: A("flex aspect-square items-center justify-center border border-solid border-f1-border-secondary bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary", On[t]),
|
|
2610
2610
|
"aria-label": n,
|
|
2611
2611
|
"aria-labelledby": r,
|
|
2612
|
-
children: /* @__PURE__ */ U(
|
|
2612
|
+
children: /* @__PURE__ */ U(y, {
|
|
2613
2613
|
emoji: e,
|
|
2614
2614
|
size: kn[t]
|
|
2615
2615
|
})
|
|
2616
2616
|
}));
|
|
2617
2617
|
An.displayName = "EmojiAvatar";
|
|
2618
|
-
var jn =
|
|
2618
|
+
var jn = l(An), Mn = {
|
|
2619
2619
|
pdf: {
|
|
2620
2620
|
type: "PDF",
|
|
2621
2621
|
color: "text-f1-foreground-accent"
|
|
@@ -2745,16 +2745,16 @@ var jn = m(An), Mn = {
|
|
|
2745
2745
|
sm: "xs"
|
|
2746
2746
|
};
|
|
2747
2747
|
return e && t[e] ? t[e] : t.sm;
|
|
2748
|
-
}, Rn = P(({ file: e, badge:
|
|
2749
|
-
let { type:
|
|
2750
|
-
module:
|
|
2748
|
+
}, Rn = P(({ file: e, badge: t, dataTestId: n, ...r }, i) => {
|
|
2749
|
+
let { type: a, color: o } = Fn(e), c = z(() => Object.fromEntries(Object.entries(pn).map(([e, t]) => [t, e])), [])[r.size] ?? "small", l = In(r.size), u = Ln(r.size), d = z(() => t ? /* @__PURE__ */ W(H, { children: [t.type === "module" ? /* @__PURE__ */ U(Rt, {
|
|
2750
|
+
module: t.module,
|
|
2751
2751
|
size: u
|
|
2752
|
-
}) : null,
|
|
2753
|
-
type:
|
|
2754
|
-
icon:
|
|
2752
|
+
}) : null, t.type === "module" ? null : /* @__PURE__ */ U(Vt, {
|
|
2753
|
+
type: t.type,
|
|
2754
|
+
icon: t.icon,
|
|
2755
2755
|
size: l
|
|
2756
2756
|
})] }) : null, [
|
|
2757
|
-
|
|
2757
|
+
t,
|
|
2758
2758
|
l,
|
|
2759
2759
|
u
|
|
2760
2760
|
]), f = z(() => {
|
|
@@ -2764,22 +2764,22 @@ var jn = m(An), Mn = {
|
|
|
2764
2764
|
md: "text-sm",
|
|
2765
2765
|
lg: "text-sm"
|
|
2766
2766
|
};
|
|
2767
|
-
return e[
|
|
2768
|
-
}, [
|
|
2769
|
-
return /* @__PURE__ */ U(
|
|
2770
|
-
dataTestId:
|
|
2767
|
+
return e[r.size || "sm"] ?? e.sm;
|
|
2768
|
+
}, [r]);
|
|
2769
|
+
return /* @__PURE__ */ U(g, {
|
|
2770
|
+
dataTestId: n,
|
|
2771
2771
|
children: /* @__PURE__ */ W(cn, {
|
|
2772
|
-
ref:
|
|
2772
|
+
ref: i,
|
|
2773
2773
|
className: A("bg-f1-background", "overflow-visible"),
|
|
2774
|
-
...
|
|
2774
|
+
...r,
|
|
2775
2775
|
size: c,
|
|
2776
2776
|
children: [/* @__PURE__ */ U(un, {
|
|
2777
|
-
className: A("select-none font-semibold", f,
|
|
2778
|
-
children:
|
|
2779
|
-
}),
|
|
2777
|
+
className: A("select-none font-semibold", f, o),
|
|
2778
|
+
children: a
|
|
2779
|
+
}), t ? /* @__PURE__ */ U("div", {
|
|
2780
2780
|
className: "absolute -bottom-0.5 -right-0.5",
|
|
2781
|
-
children:
|
|
2782
|
-
description:
|
|
2781
|
+
children: t.tooltip ? /* @__PURE__ */ U(s, {
|
|
2782
|
+
description: t.tooltip,
|
|
2783
2783
|
children: /* @__PURE__ */ U("div", {
|
|
2784
2784
|
className: "cursor-help",
|
|
2785
2785
|
children: d
|
|
@@ -17457,7 +17457,7 @@ var od = (e) => {
|
|
|
17457
17457
|
if (!t) console.warn(`Flag component for code "${e}" not found`);
|
|
17458
17458
|
else return t;
|
|
17459
17459
|
}, sd = ({ flag: e, size: t, "aria-label": n, "aria-labelledby": r, badge: i }) => {
|
|
17460
|
-
let a = od(e), o =
|
|
17460
|
+
let a = od(e), o = C().countries[e] ?? e;
|
|
17461
17461
|
return /* @__PURE__ */ U(wn, {
|
|
17462
17462
|
type: "base",
|
|
17463
17463
|
name: o,
|
|
@@ -17470,7 +17470,7 @@ var od = (e) => {
|
|
|
17470
17470
|
});
|
|
17471
17471
|
};
|
|
17472
17472
|
sd.displayName = "FlagAvatar";
|
|
17473
|
-
var cd =
|
|
17473
|
+
var cd = l(sd), ld = [
|
|
17474
17474
|
"xs",
|
|
17475
17475
|
"sm",
|
|
17476
17476
|
"md",
|
|
@@ -17484,7 +17484,7 @@ var cd = m(sd), ld = [
|
|
|
17484
17484
|
className: A("flex aspect-square items-center justify-center border border-solid border-f1-border-secondary bg-f1-background", ud[t]),
|
|
17485
17485
|
"aria-label": r,
|
|
17486
17486
|
"aria-labelledby": i,
|
|
17487
|
-
children: /* @__PURE__ */ U(
|
|
17487
|
+
children: /* @__PURE__ */ U(h, {
|
|
17488
17488
|
icon: e,
|
|
17489
17489
|
size: t,
|
|
17490
17490
|
state: n,
|
|
@@ -17492,7 +17492,7 @@ var cd = m(sd), ld = [
|
|
|
17492
17492
|
})
|
|
17493
17493
|
});
|
|
17494
17494
|
dd.displayName = "IconAvatar";
|
|
17495
|
-
var fd =
|
|
17495
|
+
var fd = l(dd), pd = ({ firstName: e, lastName: t, src: n, size: r, "aria-label": i, "aria-labelledby": a, badge: o, deactivated: s, pending: c }) => {
|
|
17496
17496
|
let l = s ? oe : c ? J : void 0;
|
|
17497
17497
|
return /* @__PURE__ */ U(wn, {
|
|
17498
17498
|
type: "rounded",
|
|
@@ -17510,7 +17510,7 @@ var fd = m(dd), pd = ({ firstName: e, lastName: t, src: n, size: r, "aria-label"
|
|
|
17510
17510
|
});
|
|
17511
17511
|
};
|
|
17512
17512
|
pd.displayName = "PersonAvatar";
|
|
17513
|
-
var md =
|
|
17513
|
+
var md = l(pd), hd = ({ name: e, src: t, size: n, "aria-label": r, "aria-labelledby": i, badge: a }) => /* @__PURE__ */ U(wn, {
|
|
17514
17514
|
type: "base",
|
|
17515
17515
|
name: e,
|
|
17516
17516
|
src: t,
|
|
@@ -17521,10 +17521,10 @@ var md = m(pd), hd = ({ name: e, src: t, size: n, "aria-label": r, "aria-labelle
|
|
|
17521
17521
|
badge: a
|
|
17522
17522
|
});
|
|
17523
17523
|
hd.displayName = "TeamAvatar";
|
|
17524
|
-
var gd =
|
|
17524
|
+
var gd = l(hd), _d = A("opacity-0 transition-opacity motion-reduce:transition-none", "group-hover/avatar-action:opacity-100 has-[:focus-visible]:opacity-100", "[@media(hover:none)]:opacity-100"), vd = ({ label: e, icon: t, critical: n = !1, onSelect: r }) => /* @__PURE__ */ W(i, {
|
|
17525
17525
|
className: A("flex w-full cursor-pointer items-start gap-1.5", n && "text-f1-foreground-critical"),
|
|
17526
17526
|
onSelect: r,
|
|
17527
|
-
children: [t ? /* @__PURE__ */ U(
|
|
17527
|
+
children: [t ? /* @__PURE__ */ U(h, {
|
|
17528
17528
|
icon: t,
|
|
17529
17529
|
size: "md",
|
|
17530
17530
|
className: n ? "text-f1-icon-critical" : "text-f1-icon"
|
|
@@ -17532,8 +17532,8 @@ var gd = m(hd), _d = A("opacity-0 transition-opacity motion-reduce:transition-no
|
|
|
17532
17532
|
className: "truncate",
|
|
17533
17533
|
children: e
|
|
17534
17534
|
})]
|
|
17535
|
-
}), yd = ({ actions: e, children:
|
|
17536
|
-
let r =
|
|
17535
|
+
}), yd = ({ actions: e, children: n }) => {
|
|
17536
|
+
let r = C(), [i, a] = V(!1), [s, c] = V(!1), l = async (e) => {
|
|
17537
17537
|
if (e instanceof Promise) {
|
|
17538
17538
|
a(!0);
|
|
17539
17539
|
try {
|
|
@@ -17542,35 +17542,35 @@ var gd = m(hd), _d = A("opacity-0 transition-opacity motion-reduce:transition-no
|
|
|
17542
17542
|
a(!1);
|
|
17543
17543
|
}
|
|
17544
17544
|
}
|
|
17545
|
-
}, [
|
|
17546
|
-
icon:
|
|
17547
|
-
label:
|
|
17545
|
+
}, [d] = e, f = e.length > 1, p = /* @__PURE__ */ U(u, {
|
|
17546
|
+
icon: f ? ae : d.icon ?? ae,
|
|
17547
|
+
label: f ? r.actions.edit : d.label,
|
|
17548
17548
|
hideLabel: !0,
|
|
17549
17549
|
size: "sm",
|
|
17550
17550
|
variant: "ghost",
|
|
17551
17551
|
loading: i,
|
|
17552
|
-
onClick:
|
|
17552
|
+
onClick: f ? void 0 : () => void l(d.onClick())
|
|
17553
17553
|
});
|
|
17554
17554
|
return /* @__PURE__ */ W("div", {
|
|
17555
17555
|
className: "group/avatar-action relative inline-flex h-fit w-fit",
|
|
17556
|
-
children: [
|
|
17557
|
-
className: A("absolute -bottom-1 -right-1 inline-flex rounded-sm border border-solid border-f1-border-secondary bg-f1-background", _d, (i ||
|
|
17558
|
-
children:
|
|
17559
|
-
open:
|
|
17560
|
-
onOpenChange:
|
|
17561
|
-
children: [/* @__PURE__ */ U(
|
|
17556
|
+
children: [n, /* @__PURE__ */ U("div", {
|
|
17557
|
+
className: A("absolute -bottom-1 -right-1 inline-flex rounded-sm border border-solid border-f1-border-secondary bg-f1-background", _d, (i || s) && "opacity-100"),
|
|
17558
|
+
children: f ? /* @__PURE__ */ W(t, {
|
|
17559
|
+
open: s,
|
|
17560
|
+
onOpenChange: c,
|
|
17561
|
+
children: [/* @__PURE__ */ U(o, {
|
|
17562
17562
|
asChild: !0,
|
|
17563
|
-
children:
|
|
17563
|
+
children: p
|
|
17564
17564
|
}), /* @__PURE__ */ U(_, {
|
|
17565
17565
|
align: "start",
|
|
17566
17566
|
children: e.map((e) => /* @__PURE__ */ U(vd, {
|
|
17567
17567
|
label: e.label,
|
|
17568
17568
|
icon: e.icon,
|
|
17569
17569
|
critical: e.critical,
|
|
17570
|
-
onSelect: () => void
|
|
17570
|
+
onSelect: () => void l(e.onClick())
|
|
17571
17571
|
}, e.label))
|
|
17572
17572
|
})]
|
|
17573
|
-
}) :
|
|
17573
|
+
}) : p
|
|
17574
17574
|
})]
|
|
17575
17575
|
});
|
|
17576
17576
|
}, bd = (e, t, n) => t.find((t) => t === e) ?? n, xd = ({ avatar: e, size: t = "xs", dataTestId: n }) => {
|
|
@@ -17655,8 +17655,8 @@ var gd = m(hd), _d = A("opacity-0 transition-opacity motion-reduce:transition-no
|
|
|
17655
17655
|
}, Sd = ({ actions: e, ...t }) => e?.length ? /* @__PURE__ */ U(yd, {
|
|
17656
17656
|
actions: e,
|
|
17657
17657
|
children: /* @__PURE__ */ U(xd, { ...t })
|
|
17658
|
-
}) : /* @__PURE__ */ U(xd, { ...t }), Cd =
|
|
17659
|
-
let r =
|
|
17658
|
+
}) : /* @__PURE__ */ U(xd, { ...t }), Cd = l(Sd), wd = f.create(h), Td = ({ count: e, totalItemsCount: t, isOpen: n }) => {
|
|
17659
|
+
let r = C();
|
|
17660
17660
|
return /* @__PURE__ */ W("div", {
|
|
17661
17661
|
className: A("flex items-center gap-1 rounded py-1.5 pl-3 pr-2 text-base font-medium text-f1-foreground transition-colors hover:bg-f1-background-secondary", n && "bg-f1-background-secondary"),
|
|
17662
17662
|
children: [
|
|
@@ -17679,20 +17679,20 @@ Td.displayName = "OverflowIndicator";
|
|
|
17679
17679
|
//#region src/elements/OverflowList/useOverflowCalculation.ts
|
|
17680
17680
|
var Ed = 20;
|
|
17681
17681
|
function Dd(e, t, n) {
|
|
17682
|
-
let r = B(null), i = B(null), a = B(null),
|
|
17683
|
-
|
|
17682
|
+
let r = B(null), i = B(null), a = B(null), o = B(null), s = B(null), [c, l] = V(null), [u, d] = V(!1);
|
|
17683
|
+
k({
|
|
17684
17684
|
ref: r,
|
|
17685
17685
|
onResize: () => {
|
|
17686
|
-
|
|
17686
|
+
m();
|
|
17687
17687
|
}
|
|
17688
17688
|
});
|
|
17689
|
-
let
|
|
17689
|
+
let f = F(() => {
|
|
17690
17690
|
if (n?.itemsWidth) return Array.isArray(n.itemsWidth) ? n.itemsWidth : Array(e.length).fill(n.itemsWidth);
|
|
17691
|
-
if (!
|
|
17692
|
-
let t =
|
|
17691
|
+
if (!o.current) return [];
|
|
17692
|
+
let t = o.current.children, r = [];
|
|
17693
17693
|
for (let e of t) r.push(e.getBoundingClientRect().width);
|
|
17694
17694
|
return r;
|
|
17695
|
-
}, [n?.itemsWidth, e.length]),
|
|
17695
|
+
}, [n?.itemsWidth, e.length]), p = F(({ itemWidths: t, availableWidth: r }) => {
|
|
17696
17696
|
let i = 0, a = 0;
|
|
17697
17697
|
for (let e of t) {
|
|
17698
17698
|
let t = a + e;
|
|
@@ -17704,65 +17704,65 @@ function Dd(e, t, n) {
|
|
|
17704
17704
|
n?.max,
|
|
17705
17705
|
n?.min,
|
|
17706
17706
|
e.length
|
|
17707
|
-
]),
|
|
17707
|
+
]), m = F(() => {
|
|
17708
17708
|
if (e.length === 0 || !r.current) return;
|
|
17709
|
-
let o = r.current.clientWidth,
|
|
17709
|
+
let o = r.current.clientWidth, c = i.current?.offsetWidth || a.current?.offsetWidth || 32, u = f(), d = u.map((e) => e + t), m = o - c - t, h = p({
|
|
17710
17710
|
itemWidths: d,
|
|
17711
|
-
availableWidth:
|
|
17711
|
+
availableWidth: m
|
|
17712
17712
|
});
|
|
17713
|
-
h >= e.length && (n?.max === void 0 || e.length <= n.max) && (h =
|
|
17713
|
+
h >= e.length && (n?.max === void 0 || e.length <= n.max) && (h = p({
|
|
17714
17714
|
itemWidths: d,
|
|
17715
17715
|
availableWidth: o
|
|
17716
17716
|
}));
|
|
17717
|
-
let g = h >= e.length ? o :
|
|
17717
|
+
let g = h >= e.length ? o : m, _ = s.current;
|
|
17718
17718
|
if (_ !== null && h > _) {
|
|
17719
|
-
let e =
|
|
17719
|
+
let e = p({
|
|
17720
17720
|
itemWidths: d,
|
|
17721
17721
|
availableWidth: g - Ed
|
|
17722
17722
|
});
|
|
17723
17723
|
e < h && (h = Math.max(e, _));
|
|
17724
17724
|
}
|
|
17725
|
-
|
|
17725
|
+
s.current = h, e.length - h === 1 && h > 0 && u.length > 0 && c === u[u.length - 1] - t && (h = e.length), l(h);
|
|
17726
17726
|
}, [
|
|
17727
17727
|
e,
|
|
17728
17728
|
t,
|
|
17729
|
+
f,
|
|
17729
17730
|
p,
|
|
17730
|
-
m,
|
|
17731
17731
|
n?.max
|
|
17732
17732
|
]);
|
|
17733
17733
|
L(() => {
|
|
17734
|
-
|
|
17734
|
+
s.current = null;
|
|
17735
17735
|
}, [e.length]), L(() => {
|
|
17736
|
-
|
|
17737
|
-
}, [
|
|
17738
|
-
|
|
17736
|
+
m();
|
|
17737
|
+
}, [m]), L(() => {
|
|
17738
|
+
d(!0);
|
|
17739
17739
|
}, []);
|
|
17740
|
-
let { visibleItems:
|
|
17740
|
+
let { visibleItems: h, overflowItems: g } = z(() => c === null ? {
|
|
17741
17741
|
visibleItems: [],
|
|
17742
17742
|
overflowItems: []
|
|
17743
17743
|
} : {
|
|
17744
|
-
visibleItems: e.slice(0,
|
|
17745
|
-
overflowItems: e.slice(
|
|
17746
|
-
}, [e,
|
|
17744
|
+
visibleItems: e.slice(0, c),
|
|
17745
|
+
overflowItems: e.slice(c)
|
|
17746
|
+
}, [e, c]);
|
|
17747
17747
|
return {
|
|
17748
17748
|
containerRef: r,
|
|
17749
17749
|
overflowButtonRef: i,
|
|
17750
17750
|
customOverflowIndicatorRef: a,
|
|
17751
|
-
measurementContainerRef:
|
|
17752
|
-
visibleItems:
|
|
17753
|
-
overflowItems:
|
|
17754
|
-
isInitialized:
|
|
17751
|
+
measurementContainerRef: o,
|
|
17752
|
+
visibleItems: h,
|
|
17753
|
+
overflowItems: g,
|
|
17754
|
+
isInitialized: u
|
|
17755
17755
|
};
|
|
17756
17756
|
}
|
|
17757
17757
|
//#endregion
|
|
17758
17758
|
//#region src/elements/OverflowList/OverflowList.tsx
|
|
17759
|
-
var Od = function({ items: e, renderListItem: t, renderDropdownItem: n, overflowIndicatorWithPopover: r = !0, renderOverflowIndicator: i, forceShowingOverflowIndicator: a = !1, className: o = "", gap: s = 8, max:
|
|
17760
|
-
let [p,
|
|
17761
|
-
|
|
17762
|
-
}, []), { containerRef:
|
|
17763
|
-
max:
|
|
17764
|
-
min:
|
|
17765
|
-
itemsWidth:
|
|
17759
|
+
var Od = function({ items: e, renderListItem: t, renderDropdownItem: n, overflowIndicatorWithPopover: r = !0, renderOverflowIndicator: i, forceShowingOverflowIndicator: a = !1, className: o = "", gap: s = 8, max: l, min: u = 0, fluidItems: d = !1, itemsWidth: f }) {
|
|
17760
|
+
let [p, h] = V(!1), g = F((e) => {
|
|
17761
|
+
h(e);
|
|
17762
|
+
}, []), { containerRef: _, overflowButtonRef: v, customOverflowIndicatorRef: y, measurementContainerRef: x, visibleItems: S, overflowItems: C, isInitialized: w } = Dd(e, s, {
|
|
17763
|
+
max: l,
|
|
17764
|
+
min: u,
|
|
17765
|
+
itemsWidth: f
|
|
17766
17766
|
}), E = z(() => /* @__PURE__ */ U(Td, {
|
|
17767
17767
|
totalItemsCount: e.length,
|
|
17768
17768
|
isOpen: p,
|
|
@@ -17771,16 +17771,16 @@ var Od = function({ items: e, renderListItem: t, renderDropdownItem: n, overflow
|
|
|
17771
17771
|
e.length,
|
|
17772
17772
|
p,
|
|
17773
17773
|
C.length
|
|
17774
|
-
]), D = z(() => w ? null : e.map((e, t) => /* @__PURE__ */ U(
|
|
17774
|
+
]), D = z(() => w ? null : e.map((e, t) => /* @__PURE__ */ U(b, { className: "h-2 w-20 rounded-md" }, `placeholder-${t}`)), [e, w]), O = a || C.length > 0, k = "flex min-w-0 items-center justify-start whitespace-nowrap";
|
|
17775
17775
|
return /* @__PURE__ */ W("div", {
|
|
17776
|
-
ref:
|
|
17776
|
+
ref: _,
|
|
17777
17777
|
className: A("relative flex items-center", o),
|
|
17778
17778
|
style: {
|
|
17779
17779
|
gap: s > 0 ? `${s}px` : void 0,
|
|
17780
17780
|
marginLeft: s < 0 ? `${-s}px` : void 0
|
|
17781
17781
|
},
|
|
17782
17782
|
children: [
|
|
17783
|
-
|
|
17783
|
+
f ? null : /* @__PURE__ */ U("div", {
|
|
17784
17784
|
ref: x,
|
|
17785
17785
|
"aria-hidden": "true",
|
|
17786
17786
|
className: A("pointer-events-none invisible absolute left-0 top-0 w-max opacity-0", k),
|
|
@@ -17793,7 +17793,7 @@ var Od = function({ items: e, renderListItem: t, renderDropdownItem: n, overflow
|
|
|
17793
17793
|
}, `measure-${n}`))
|
|
17794
17794
|
}),
|
|
17795
17795
|
/* @__PURE__ */ W("div", {
|
|
17796
|
-
className: A(k,
|
|
17796
|
+
className: A(k, d && "[&>*]:min-w-0"),
|
|
17797
17797
|
style: { gap: s > 0 ? `${s}px` : void 0 },
|
|
17798
17798
|
"data-testid": "overflow-visible-container",
|
|
17799
17799
|
children: [w ? S.map((e, n) => /* @__PURE__ */ U("div", {
|
|
@@ -17805,15 +17805,15 @@ var Od = function({ items: e, renderListItem: t, renderDropdownItem: n, overflow
|
|
|
17805
17805
|
}),
|
|
17806
17806
|
O ? /* @__PURE__ */ U(H, { children: r ? /* @__PURE__ */ W(T, {
|
|
17807
17807
|
open: p,
|
|
17808
|
-
onOpenChange:
|
|
17809
|
-
children: [/* @__PURE__ */ U(
|
|
17808
|
+
onOpenChange: g,
|
|
17809
|
+
children: [/* @__PURE__ */ U(c, {
|
|
17810
17810
|
asChild: !0,
|
|
17811
17811
|
children: /* @__PURE__ */ U("button", {
|
|
17812
|
-
ref:
|
|
17812
|
+
ref: v,
|
|
17813
17813
|
className: A("inline-flex flex-shrink-0 items-center", ee()),
|
|
17814
17814
|
children: i?.(C.length, p) ?? E
|
|
17815
17815
|
})
|
|
17816
|
-
}), /* @__PURE__ */ U(
|
|
17816
|
+
}), /* @__PURE__ */ U(m, {
|
|
17817
17817
|
className: "rounded-md border border-solid border-f1-border-secondary p-1 shadow-md",
|
|
17818
17818
|
align: "end",
|
|
17819
17819
|
children: /* @__PURE__ */ U("div", {
|
|
@@ -17822,7 +17822,7 @@ var Od = function({ items: e, renderListItem: t, renderDropdownItem: n, overflow
|
|
|
17822
17822
|
})
|
|
17823
17823
|
})]
|
|
17824
17824
|
}) : /* @__PURE__ */ U("div", {
|
|
17825
|
-
ref:
|
|
17825
|
+
ref: y,
|
|
17826
17826
|
children: i?.(C.length, !1) ?? E
|
|
17827
17827
|
}) }) : null
|
|
17828
17828
|
]
|
|
@@ -17847,14 +17847,14 @@ function Md(e, t) {
|
|
|
17847
17847
|
return M.useReducer((e, n) => t[e][n] ?? e, e);
|
|
17848
17848
|
}
|
|
17849
17849
|
var Nd = "ScrollArea", [Pd, Fd] = v(Nd), [Id, Q] = Pd(Nd), Ld = M.forwardRef((e, t) => {
|
|
17850
|
-
let { __scopeScrollArea: n, type: r = "hover", dir: i, scrollHideDelay:
|
|
17850
|
+
let { __scopeScrollArea: n, type: r = "hover", dir: i, scrollHideDelay: o = 600, ...s } = e, [c, l] = M.useState(null), [u, d] = M.useState(null), [f, p] = M.useState(null), [m, h] = M.useState(null), [g, _] = M.useState(null), [v, y] = M.useState(0), [b, x] = M.useState(0), [S, C] = M.useState(!1), [w, T] = M.useState(!1), D = a(t, (e) => l(e)), O = Ad(i);
|
|
17851
17851
|
return /* @__PURE__ */ U(Id, {
|
|
17852
17852
|
scope: n,
|
|
17853
17853
|
type: r,
|
|
17854
17854
|
dir: O,
|
|
17855
|
-
scrollHideDelay:
|
|
17856
|
-
scrollArea:
|
|
17857
|
-
viewport:
|
|
17855
|
+
scrollHideDelay: o,
|
|
17856
|
+
scrollArea: c,
|
|
17857
|
+
viewport: u,
|
|
17858
17858
|
onViewportChange: d,
|
|
17859
17859
|
content: f,
|
|
17860
17860
|
onContentChange: p,
|
|
@@ -17868,10 +17868,10 @@ var Nd = "ScrollArea", [Pd, Fd] = v(Nd), [Id, Q] = Pd(Nd), Ld = M.forwardRef((e,
|
|
|
17868
17868
|
onScrollbarYEnabledChange: T,
|
|
17869
17869
|
onCornerWidthChange: y,
|
|
17870
17870
|
onCornerHeightChange: x,
|
|
17871
|
-
children: /* @__PURE__ */ U(
|
|
17871
|
+
children: /* @__PURE__ */ U(E.div, {
|
|
17872
17872
|
dir: O,
|
|
17873
|
-
...
|
|
17874
|
-
ref:
|
|
17873
|
+
...s,
|
|
17874
|
+
ref: D,
|
|
17875
17875
|
style: {
|
|
17876
17876
|
position: "relative",
|
|
17877
17877
|
"--radix-scroll-area-corner-width": v + "px",
|
|
@@ -17883,21 +17883,21 @@ var Nd = "ScrollArea", [Pd, Fd] = v(Nd), [Id, Q] = Pd(Nd), Ld = M.forwardRef((e,
|
|
|
17883
17883
|
});
|
|
17884
17884
|
Ld.displayName = Nd;
|
|
17885
17885
|
var Rd = "ScrollAreaViewport", zd = M.forwardRef((e, t) => {
|
|
17886
|
-
let { __scopeScrollArea: n, children: r, nonce: i, ...
|
|
17886
|
+
let { __scopeScrollArea: n, children: r, nonce: i, ...o } = e, s = Q(Rd, n), c = M.useRef(null), l = a(t, c, s.onViewportChange);
|
|
17887
17887
|
return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("style", {
|
|
17888
17888
|
dangerouslySetInnerHTML: { __html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}" },
|
|
17889
17889
|
nonce: i
|
|
17890
|
-
}), /* @__PURE__ */ U(
|
|
17890
|
+
}), /* @__PURE__ */ U(E.div, {
|
|
17891
17891
|
"data-radix-scroll-area-viewport": "",
|
|
17892
|
-
...
|
|
17893
|
-
ref:
|
|
17892
|
+
...o,
|
|
17893
|
+
ref: l,
|
|
17894
17894
|
style: {
|
|
17895
|
-
overflowX:
|
|
17896
|
-
overflowY:
|
|
17895
|
+
overflowX: s.scrollbarXEnabled ? "scroll" : "hidden",
|
|
17896
|
+
overflowY: s.scrollbarYEnabled ? "scroll" : "hidden",
|
|
17897
17897
|
...e.style
|
|
17898
17898
|
},
|
|
17899
17899
|
children: /* @__PURE__ */ U("div", {
|
|
17900
|
-
ref:
|
|
17900
|
+
ref: s.onContentChange,
|
|
17901
17901
|
style: {
|
|
17902
17902
|
minWidth: "100%",
|
|
17903
17903
|
display: "table"
|
|
@@ -18001,8 +18001,8 @@ var Vd = M.forwardRef((e, t) => {
|
|
|
18001
18001
|
"data-state": s === "hidden" ? "hidden" : "visible",
|
|
18002
18002
|
...r,
|
|
18003
18003
|
ref: t,
|
|
18004
|
-
onPointerEnter:
|
|
18005
|
-
onPointerLeave:
|
|
18004
|
+
onPointerEnter: D(e.onPointerEnter, () => c("POINTER_ENTER")),
|
|
18005
|
+
onPointerLeave: D(e.onPointerLeave, () => c("POINTER_LEAVE"))
|
|
18006
18006
|
})
|
|
18007
18007
|
});
|
|
18008
18008
|
}), Ud = M.forwardRef((e, t) => {
|
|
@@ -18073,54 +18073,54 @@ var Vd = M.forwardRef((e, t) => {
|
|
|
18073
18073
|
}
|
|
18074
18074
|
}) : null;
|
|
18075
18075
|
}), Gd = M.forwardRef((e, t) => {
|
|
18076
|
-
let { sizes: n, onSizesChange: r, ...i } = e,
|
|
18076
|
+
let { sizes: n, onSizesChange: r, ...i } = e, o = Q($, e.__scopeScrollArea), [s, c] = M.useState(), l = M.useRef(null), u = a(t, l, o.onScrollbarXChange);
|
|
18077
18077
|
return M.useEffect(() => {
|
|
18078
|
-
|
|
18079
|
-
}, [
|
|
18078
|
+
l.current && c(getComputedStyle(l.current));
|
|
18079
|
+
}, [l]), /* @__PURE__ */ U(Yd, {
|
|
18080
18080
|
"data-orientation": "horizontal",
|
|
18081
18081
|
...i,
|
|
18082
|
-
ref:
|
|
18082
|
+
ref: u,
|
|
18083
18083
|
sizes: n,
|
|
18084
18084
|
style: {
|
|
18085
18085
|
bottom: 0,
|
|
18086
|
-
left:
|
|
18087
|
-
right:
|
|
18086
|
+
left: o.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
18087
|
+
right: o.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
18088
18088
|
"--radix-scroll-area-thumb-width": af(n) + "px",
|
|
18089
18089
|
...e.style
|
|
18090
18090
|
},
|
|
18091
18091
|
onThumbPointerDown: (t) => e.onThumbPointerDown(t.x),
|
|
18092
18092
|
onDragScroll: (t) => e.onDragScroll(t.x),
|
|
18093
18093
|
onWheelScroll: (t, n) => {
|
|
18094
|
-
if (
|
|
18095
|
-
let r =
|
|
18094
|
+
if (o.viewport) {
|
|
18095
|
+
let r = o.viewport.scrollLeft + t.deltaX;
|
|
18096
18096
|
e.onWheelScroll(r), lf(r, n) && t.preventDefault();
|
|
18097
18097
|
}
|
|
18098
18098
|
},
|
|
18099
18099
|
onResize: () => {
|
|
18100
|
-
|
|
18101
|
-
content:
|
|
18102
|
-
viewport:
|
|
18100
|
+
l.current && o.viewport && s && r({
|
|
18101
|
+
content: o.viewport.scrollWidth,
|
|
18102
|
+
viewport: o.viewport.offsetWidth,
|
|
18103
18103
|
scrollbar: {
|
|
18104
|
-
size:
|
|
18105
|
-
paddingStart: nf(
|
|
18106
|
-
paddingEnd: nf(
|
|
18104
|
+
size: l.current.clientWidth,
|
|
18105
|
+
paddingStart: nf(s.paddingLeft),
|
|
18106
|
+
paddingEnd: nf(s.paddingRight)
|
|
18107
18107
|
}
|
|
18108
18108
|
});
|
|
18109
18109
|
}
|
|
18110
18110
|
});
|
|
18111
18111
|
}), Kd = M.forwardRef((e, t) => {
|
|
18112
|
-
let { sizes: n, onSizesChange: r, ...i } = e,
|
|
18112
|
+
let { sizes: n, onSizesChange: r, ...i } = e, o = Q($, e.__scopeScrollArea), [s, c] = M.useState(), l = M.useRef(null), u = a(t, l, o.onScrollbarYChange);
|
|
18113
18113
|
return M.useEffect(() => {
|
|
18114
|
-
|
|
18115
|
-
}, [
|
|
18114
|
+
l.current && c(getComputedStyle(l.current));
|
|
18115
|
+
}, [l]), /* @__PURE__ */ U(Yd, {
|
|
18116
18116
|
"data-orientation": "vertical",
|
|
18117
18117
|
...i,
|
|
18118
|
-
ref:
|
|
18118
|
+
ref: u,
|
|
18119
18119
|
sizes: n,
|
|
18120
18120
|
style: {
|
|
18121
18121
|
top: 0,
|
|
18122
|
-
right:
|
|
18123
|
-
left:
|
|
18122
|
+
right: o.dir === "ltr" ? 0 : void 0,
|
|
18123
|
+
left: o.dir === "rtl" ? 0 : void 0,
|
|
18124
18124
|
bottom: "var(--radix-scroll-area-corner-height)",
|
|
18125
18125
|
"--radix-scroll-area-thumb-height": af(n) + "px",
|
|
18126
18126
|
...e.style
|
|
@@ -18128,26 +18128,26 @@ var Vd = M.forwardRef((e, t) => {
|
|
|
18128
18128
|
onThumbPointerDown: (t) => e.onThumbPointerDown(t.y),
|
|
18129
18129
|
onDragScroll: (t) => e.onDragScroll(t.y),
|
|
18130
18130
|
onWheelScroll: (t, n) => {
|
|
18131
|
-
if (
|
|
18132
|
-
let r =
|
|
18131
|
+
if (o.viewport) {
|
|
18132
|
+
let r = o.viewport.scrollTop + t.deltaY;
|
|
18133
18133
|
e.onWheelScroll(r), lf(r, n) && t.preventDefault();
|
|
18134
18134
|
}
|
|
18135
18135
|
},
|
|
18136
18136
|
onResize: () => {
|
|
18137
|
-
|
|
18138
|
-
content:
|
|
18139
|
-
viewport:
|
|
18137
|
+
l.current && o.viewport && s && r({
|
|
18138
|
+
content: o.viewport.scrollHeight,
|
|
18139
|
+
viewport: o.viewport.offsetHeight,
|
|
18140
18140
|
scrollbar: {
|
|
18141
|
-
size:
|
|
18142
|
-
paddingStart: nf(
|
|
18143
|
-
paddingEnd: nf(
|
|
18141
|
+
size: l.current.clientHeight,
|
|
18142
|
+
paddingStart: nf(s.paddingTop),
|
|
18143
|
+
paddingEnd: nf(s.paddingBottom)
|
|
18144
18144
|
}
|
|
18145
18145
|
});
|
|
18146
18146
|
}
|
|
18147
18147
|
});
|
|
18148
18148
|
}), [qd, Jd] = Pd($), Yd = M.forwardRef((e, t) => {
|
|
18149
|
-
let { __scopeScrollArea:
|
|
18150
|
-
function
|
|
18149
|
+
let { __scopeScrollArea: r, sizes: i, hasThumb: o, onThumbChange: s, onThumbPointerUp: c, onThumbPointerDown: l, onThumbPositionChange: u, onDragScroll: d, onWheelScroll: f, onResize: p, ...m } = e, h = Q($, r), [g, _] = M.useState(null), v = a(t, (e) => _(e)), y = M.useRef(null), b = M.useRef(""), x = h.viewport, S = i.content - i.viewport, C = n(f), w = n(u), T = df(p, 10);
|
|
18150
|
+
function O(e) {
|
|
18151
18151
|
if (y.current) {
|
|
18152
18152
|
let t = e.clientX - y.current.left, n = e.clientY - y.current.top;
|
|
18153
18153
|
d({
|
|
@@ -18167,26 +18167,26 @@ var Vd = M.forwardRef((e, t) => {
|
|
|
18167
18167
|
g,
|
|
18168
18168
|
S,
|
|
18169
18169
|
C
|
|
18170
|
-
]), M.useEffect(w, [
|
|
18171
|
-
scope:
|
|
18170
|
+
]), M.useEffect(w, [i, w]), ff(g, T), ff(h.content, T), /* @__PURE__ */ U(qd, {
|
|
18171
|
+
scope: r,
|
|
18172
18172
|
scrollbar: g,
|
|
18173
|
-
hasThumb:
|
|
18174
|
-
onThumbChange:
|
|
18175
|
-
onThumbPointerUp:
|
|
18173
|
+
hasThumb: o,
|
|
18174
|
+
onThumbChange: n(s),
|
|
18175
|
+
onThumbPointerUp: n(c),
|
|
18176
18176
|
onThumbPositionChange: w,
|
|
18177
|
-
onThumbPointerDown:
|
|
18178
|
-
children: /* @__PURE__ */ U(
|
|
18177
|
+
onThumbPointerDown: n(l),
|
|
18178
|
+
children: /* @__PURE__ */ U(E.div, {
|
|
18179
18179
|
...m,
|
|
18180
18180
|
ref: v,
|
|
18181
18181
|
style: {
|
|
18182
18182
|
position: "absolute",
|
|
18183
18183
|
...m.style
|
|
18184
18184
|
},
|
|
18185
|
-
onPointerDown:
|
|
18186
|
-
e.button === 0 && (e.target.setPointerCapture(e.pointerId), y.current = g.getBoundingClientRect(), b.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", h.viewport && (h.viewport.style.scrollBehavior = "auto"),
|
|
18185
|
+
onPointerDown: D(e.onPointerDown, (e) => {
|
|
18186
|
+
e.button === 0 && (e.target.setPointerCapture(e.pointerId), y.current = g.getBoundingClientRect(), b.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", h.viewport && (h.viewport.style.scrollBehavior = "auto"), O(e));
|
|
18187
18187
|
}),
|
|
18188
|
-
onPointerMove:
|
|
18189
|
-
onPointerUp:
|
|
18188
|
+
onPointerMove: D(e.onPointerMove, O),
|
|
18189
|
+
onPointerUp: D(e.onPointerUp, (e) => {
|
|
18190
18190
|
let t = e.target;
|
|
18191
18191
|
t.hasPointerCapture(e.pointerId) && t.releasePointerCapture(e.pointerId), document.body.style.webkitUserSelect = b.current, h.viewport && (h.viewport.style.scrollBehavior = ""), y.current = null;
|
|
18192
18192
|
})
|
|
@@ -18202,41 +18202,41 @@ var Vd = M.forwardRef((e, t) => {
|
|
|
18202
18202
|
})
|
|
18203
18203
|
});
|
|
18204
18204
|
}), Qd = M.forwardRef((e, t) => {
|
|
18205
|
-
let { __scopeScrollArea: n, style: r, ...i } = e,
|
|
18206
|
-
|
|
18205
|
+
let { __scopeScrollArea: n, style: r, ...i } = e, o = Q(Xd, n), s = Jd(Xd, n), { onThumbPositionChange: c } = s, l = a(t, (e) => s.onThumbChange(e)), u = M.useRef(void 0), d = df(() => {
|
|
18206
|
+
u.current &&= (u.current(), void 0);
|
|
18207
18207
|
}, 100);
|
|
18208
18208
|
return M.useEffect(() => {
|
|
18209
|
-
let e =
|
|
18209
|
+
let e = o.viewport;
|
|
18210
18210
|
if (e) {
|
|
18211
18211
|
let t = () => {
|
|
18212
|
-
if (d(), !
|
|
18213
|
-
let t = uf(e,
|
|
18214
|
-
|
|
18212
|
+
if (d(), !u.current) {
|
|
18213
|
+
let t = uf(e, c);
|
|
18214
|
+
u.current = t, c();
|
|
18215
18215
|
}
|
|
18216
18216
|
};
|
|
18217
|
-
return
|
|
18217
|
+
return c(), e.addEventListener("scroll", t), () => e.removeEventListener("scroll", t);
|
|
18218
18218
|
}
|
|
18219
18219
|
}, [
|
|
18220
|
-
|
|
18220
|
+
o.viewport,
|
|
18221
18221
|
d,
|
|
18222
|
-
|
|
18223
|
-
]), /* @__PURE__ */ U(
|
|
18224
|
-
"data-state":
|
|
18222
|
+
c
|
|
18223
|
+
]), /* @__PURE__ */ U(E.div, {
|
|
18224
|
+
"data-state": s.hasThumb ? "visible" : "hidden",
|
|
18225
18225
|
...i,
|
|
18226
|
-
ref:
|
|
18226
|
+
ref: l,
|
|
18227
18227
|
style: {
|
|
18228
18228
|
width: "var(--radix-scroll-area-thumb-width)",
|
|
18229
18229
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
18230
18230
|
...r
|
|
18231
18231
|
},
|
|
18232
|
-
onPointerDownCapture:
|
|
18232
|
+
onPointerDownCapture: D(e.onPointerDownCapture, (e) => {
|
|
18233
18233
|
let t = e.target.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top;
|
|
18234
|
-
|
|
18234
|
+
s.onThumbPointerDown({
|
|
18235
18235
|
x: n,
|
|
18236
18236
|
y: r
|
|
18237
18237
|
});
|
|
18238
18238
|
}),
|
|
18239
|
-
onPointerUp:
|
|
18239
|
+
onPointerUp: D(e.onPointerUp, s.onThumbPointerUp)
|
|
18240
18240
|
});
|
|
18241
18241
|
});
|
|
18242
18242
|
Zd.displayName = Xd;
|
|
@@ -18256,7 +18256,7 @@ var tf = M.forwardRef((e, t) => {
|
|
|
18256
18256
|
}), ff(i.scrollbarY, () => {
|
|
18257
18257
|
let e = i.scrollbarY?.offsetWidth || 0;
|
|
18258
18258
|
i.onCornerWidthChange(e), o(e);
|
|
18259
|
-
}), l ? /* @__PURE__ */ U(
|
|
18259
|
+
}), l ? /* @__PURE__ */ U(E.div, {
|
|
18260
18260
|
...r,
|
|
18261
18261
|
ref: t,
|
|
18262
18262
|
style: {
|
|
@@ -18313,24 +18313,24 @@ var uf = (e, t = () => {}) => {
|
|
|
18313
18313
|
})(), () => window.cancelAnimationFrame(r);
|
|
18314
18314
|
};
|
|
18315
18315
|
function df(e, t) {
|
|
18316
|
-
let
|
|
18317
|
-
return M.useEffect(() => () => window.clearTimeout(
|
|
18318
|
-
window.clearTimeout(
|
|
18319
|
-
}, [
|
|
18316
|
+
let r = n(e), i = M.useRef(0);
|
|
18317
|
+
return M.useEffect(() => () => window.clearTimeout(i.current), []), M.useCallback(() => {
|
|
18318
|
+
window.clearTimeout(i.current), i.current = window.setTimeout(r, t);
|
|
18319
|
+
}, [r, t]);
|
|
18320
18320
|
}
|
|
18321
18321
|
function ff(e, t) {
|
|
18322
|
-
let
|
|
18323
|
-
|
|
18322
|
+
let i = n(t);
|
|
18323
|
+
r(() => {
|
|
18324
18324
|
let t = 0;
|
|
18325
18325
|
if (e) {
|
|
18326
|
-
let
|
|
18327
|
-
cancelAnimationFrame(t), t = window.requestAnimationFrame(
|
|
18326
|
+
let n = new ResizeObserver(() => {
|
|
18327
|
+
cancelAnimationFrame(t), t = window.requestAnimationFrame(i);
|
|
18328
18328
|
});
|
|
18329
|
-
return
|
|
18330
|
-
window.cancelAnimationFrame(t),
|
|
18329
|
+
return n.observe(e), () => {
|
|
18330
|
+
window.cancelAnimationFrame(t), n.unobserve(e);
|
|
18331
18331
|
};
|
|
18332
18332
|
}
|
|
18333
|
-
}, [e,
|
|
18333
|
+
}, [e, i]);
|
|
18334
18334
|
}
|
|
18335
18335
|
var pf = Ld, mf = zd, hf = ef, gf = P(({ className: e, children: t, showBar: n = !0, viewportRef: r, onScrollTop: i, onScrollBottom: a, focusableViewport: o = !0, scrollMargin: s = 0, ...c }, l) => {
|
|
18336
18336
|
let u = B(null), d = r ?? u;
|
|
@@ -18407,7 +18407,7 @@ function bf(e, t) {
|
|
|
18407
18407
|
}
|
|
18408
18408
|
//#endregion
|
|
18409
18409
|
//#region src/elements/avatars/F0AvatarList/components/MaxCounter.tsx
|
|
18410
|
-
var xf =
|
|
18410
|
+
var xf = p({
|
|
18411
18411
|
base: "flex shrink-0 items-center justify-center bg-f1-background-secondary font-medium text-f1-foreground-secondary",
|
|
18412
18412
|
variants: {
|
|
18413
18413
|
size: {
|
|
@@ -18434,13 +18434,13 @@ var xf = E({
|
|
|
18434
18434
|
type: "base"
|
|
18435
18435
|
}
|
|
18436
18436
|
}), Sf = ({ count: e, size: t = "md", type: n, list: r, avatarType: i = "person" }) => {
|
|
18437
|
-
let [a, o] = V(!1), s = B(!1),
|
|
18438
|
-
L(() => () => clearTimeout(
|
|
18439
|
-
let
|
|
18440
|
-
|
|
18437
|
+
let [a, o] = V(!1), s = B(!1), l = B(null), u = B(void 0);
|
|
18438
|
+
L(() => () => clearTimeout(u.current), []);
|
|
18439
|
+
let d = () => clearTimeout(u.current), f = () => {
|
|
18440
|
+
d(), s.current = !0, o(!0);
|
|
18441
18441
|
}, p = () => {
|
|
18442
|
-
|
|
18443
|
-
},
|
|
18442
|
+
d(), u.current = setTimeout(() => o(!1), 150);
|
|
18443
|
+
}, g = t === "xs" ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(h, {
|
|
18444
18444
|
icon: K,
|
|
18445
18445
|
size: "xs"
|
|
18446
18446
|
}), /* @__PURE__ */ W("span", {
|
|
@@ -18452,9 +18452,9 @@ var xf = E({
|
|
|
18452
18452
|
size: t,
|
|
18453
18453
|
type: n
|
|
18454
18454
|
})),
|
|
18455
|
-
children:
|
|
18455
|
+
children: g
|
|
18456
18456
|
});
|
|
18457
|
-
let
|
|
18457
|
+
let _ = r.map((e, t) => {
|
|
18458
18458
|
let n = e.tooltipDescription;
|
|
18459
18459
|
return /* @__PURE__ */ W("div", {
|
|
18460
18460
|
className: "flex w-[180px] min-w-0 items-center gap-1.5 px-2 py-1 [&:first-child]:pt-2 [&:last-child]:pb-2",
|
|
@@ -18482,26 +18482,26 @@ var xf = E({
|
|
|
18482
18482
|
return /* @__PURE__ */ W(T, {
|
|
18483
18483
|
open: a,
|
|
18484
18484
|
onOpenChange: o,
|
|
18485
|
-
children: [/* @__PURE__ */ U(
|
|
18485
|
+
children: [/* @__PURE__ */ U(c, {
|
|
18486
18486
|
asChild: !0,
|
|
18487
18487
|
children: /* @__PURE__ */ U("button", {
|
|
18488
18488
|
type: "button",
|
|
18489
|
-
onPointerEnter:
|
|
18489
|
+
onPointerEnter: f,
|
|
18490
18490
|
onPointerLeave: p,
|
|
18491
18491
|
onClick: (e) => {
|
|
18492
|
-
s.current = !1, a && (e.preventDefault(),
|
|
18492
|
+
s.current = !1, a && (e.preventDefault(), l.current?.focus());
|
|
18493
18493
|
},
|
|
18494
18494
|
className: A("cursor-pointer font-medium transition hover:bg-f1-background-secondary-hover", xf({
|
|
18495
18495
|
size: t,
|
|
18496
18496
|
type: n
|
|
18497
18497
|
}), ee()),
|
|
18498
|
-
children:
|
|
18498
|
+
children: g
|
|
18499
18499
|
})
|
|
18500
|
-
}), /* @__PURE__ */ U(
|
|
18501
|
-
ref:
|
|
18500
|
+
}), /* @__PURE__ */ U(m, {
|
|
18501
|
+
ref: l,
|
|
18502
18502
|
side: "top",
|
|
18503
18503
|
className: "w-[200px] overflow-hidden rounded border-0 bg-f1-background-inverse p-0 font-medium text-f1-foreground-inverse shadow-none dark:border dark:border-solid dark:border-f1-border-secondary dark:bg-f1-background",
|
|
18504
|
-
onPointerEnter:
|
|
18504
|
+
onPointerEnter: d,
|
|
18505
18505
|
onPointerLeave: p,
|
|
18506
18506
|
onOpenAutoFocus: (e) => {
|
|
18507
18507
|
s.current && e.preventDefault();
|
|
@@ -18511,7 +18511,7 @@ var xf = E({
|
|
|
18511
18511
|
},
|
|
18512
18512
|
children: /* @__PURE__ */ W(_f, {
|
|
18513
18513
|
className: "[*[data-state=visible]_div]:bg-f1-foreground-inverse flex max-h-[172px] flex-col",
|
|
18514
|
-
children: [
|
|
18514
|
+
children: [_, /* @__PURE__ */ U(yf, {
|
|
18515
18515
|
orientation: "vertical",
|
|
18516
18516
|
className: "[&_div]:bg-f1-foreground-inverse"
|
|
18517
18517
|
})]
|
|
@@ -18533,70 +18533,70 @@ var xf = E({
|
|
|
18533
18533
|
sm: "path('M21.3746 4.50813C19.1755 1.76008 15.7933 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24C15.7933 24 19.1755 22.2399 21.3746 19.4919C19.8788 17.3743 19 14.7898 19 12C19 9.21023 19.8788 6.62571 21.3746 4.50813Z')",
|
|
18534
18534
|
xs: "path('M18 4.19899C16.7442 5.95406 16 8.13577 16 10.5C16 12.8642 16.7442 15.0459 18 16.801C16.1755 19.3508 13.2712 21 10 21C4.47716 21 0 16.299 0 10.5C0 4.70102 4.47716 0 10 0C13.2712 0 16.1755 1.64923 18 4.19899Z')"
|
|
18535
18535
|
}
|
|
18536
|
-
}, Tf = ({ avatars: e, size:
|
|
18537
|
-
if (
|
|
18536
|
+
}, Tf = ({ avatars: e, size: t = "md", type: n, noTooltip: r = !1, remainingCount: i, max: a, tooltipScroll: o, layout: c }) => {
|
|
18537
|
+
if (t && !Cf.includes(t)) {
|
|
18538
18538
|
let e = {
|
|
18539
18539
|
small: "sm",
|
|
18540
18540
|
medium: "md",
|
|
18541
18541
|
xsmall: "xs"
|
|
18542
18542
|
};
|
|
18543
|
-
console.warn(`The avatar list size: ${
|
|
18543
|
+
console.warn(`The avatar list size: ${t} is deprecated. Use ${e[t]} instead.`), t = e[t] ?? "md";
|
|
18544
18544
|
}
|
|
18545
18545
|
let l = {
|
|
18546
18546
|
xs: -2,
|
|
18547
18547
|
sm: -3,
|
|
18548
18548
|
md: -4
|
|
18549
|
-
}[
|
|
18549
|
+
}[t] ?? 0, u = z(() => ({
|
|
18550
18550
|
xs: 20,
|
|
18551
18551
|
sm: 24,
|
|
18552
18552
|
md: 32
|
|
18553
|
-
})[
|
|
18553
|
+
})[t], [t]);
|
|
18554
18554
|
return /* @__PURE__ */ U(Od, {
|
|
18555
|
-
max:
|
|
18556
|
-
min:
|
|
18555
|
+
max: a,
|
|
18556
|
+
min: a,
|
|
18557
18557
|
items: e.map((e) => ({
|
|
18558
|
-
type:
|
|
18558
|
+
type: n,
|
|
18559
18559
|
...e
|
|
18560
18560
|
})),
|
|
18561
18561
|
gap: l,
|
|
18562
18562
|
itemsWidth: u,
|
|
18563
18563
|
className: "flex items-center",
|
|
18564
|
-
renderListItem: (
|
|
18565
|
-
let c = bf(
|
|
18564
|
+
renderListItem: (a, o) => {
|
|
18565
|
+
let c = bf(n, a), l = a.tooltipDescription, u = !!a.badge, d = o === e.length - 1, f = /* @__PURE__ */ U("div", {
|
|
18566
18566
|
className: "flex h-fit w-fit shrink-0 items-center justify-center",
|
|
18567
|
-
style: (!d || d &&
|
|
18567
|
+
style: (!d || d && i !== void 0) && !u ? { clipPath: wf[n === "person" ? "rounded" : "base"][t] } : void 0,
|
|
18568
18568
|
children: /* @__PURE__ */ U(Cd, {
|
|
18569
18569
|
avatar: {
|
|
18570
|
-
...
|
|
18571
|
-
type:
|
|
18570
|
+
...a,
|
|
18571
|
+
type: n
|
|
18572
18572
|
},
|
|
18573
|
-
size:
|
|
18573
|
+
size: t
|
|
18574
18574
|
})
|
|
18575
18575
|
});
|
|
18576
|
-
return /* @__PURE__ */ U("div", { children:
|
|
18576
|
+
return /* @__PURE__ */ U("div", { children: r ? f : /* @__PURE__ */ U(s, {
|
|
18577
18577
|
label: c,
|
|
18578
18578
|
description: l,
|
|
18579
18579
|
children: f
|
|
18580
|
-
}) },
|
|
18580
|
+
}) }, o);
|
|
18581
18581
|
},
|
|
18582
18582
|
renderDropdownItem: () => null,
|
|
18583
|
-
forceShowingOverflowIndicator:
|
|
18584
|
-
renderOverflowIndicator: (
|
|
18583
|
+
forceShowingOverflowIndicator: i !== void 0,
|
|
18584
|
+
renderOverflowIndicator: (r) => /* @__PURE__ */ U("div", {
|
|
18585
18585
|
className: "flex h-fit w-fit items-center",
|
|
18586
18586
|
style: { marginLeft: l },
|
|
18587
18587
|
children: /* @__PURE__ */ U(Sf, {
|
|
18588
|
-
count: (
|
|
18589
|
-
size:
|
|
18590
|
-
type:
|
|
18591
|
-
avatarType:
|
|
18592
|
-
list:
|
|
18588
|
+
count: (i ?? 0) + r,
|
|
18589
|
+
size: t,
|
|
18590
|
+
type: n === "person" ? "rounded" : "base",
|
|
18591
|
+
avatarType: n,
|
|
18592
|
+
list: i ? void 0 : e.slice(e.length - r)
|
|
18593
18593
|
})
|
|
18594
18594
|
}),
|
|
18595
18595
|
overflowIndicatorWithPopover: !1
|
|
18596
18596
|
});
|
|
18597
18597
|
};
|
|
18598
18598
|
Tf.displayName = "AvatarList";
|
|
18599
|
-
var Ef =
|
|
18599
|
+
var Ef = l(Tf);
|
|
18600
18600
|
//#endregion
|
|
18601
18601
|
//#region ../../node_modules/.pnpm/zen-observable-ts@1.1.0/node_modules/zen-observable-ts/module.js
|
|
18602
18602
|
function Df(e, t) {
|