@sovereignfs/ui 0.98.0 → 0.101.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/CHANGELOG.md +27 -0
- package/dist/AppTile.module.css +22 -0
- package/dist/InstallPrompt.module.css +44 -0
- package/dist/UpdateNotice.module.css +31 -0
- package/dist/index.d.ts +81 -4
- package/dist/index.js +777 -614
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5600,19 +5600,44 @@ function AppTile({
|
|
|
5600
5600
|
tags,
|
|
5601
5601
|
href,
|
|
5602
5602
|
variant = "solid",
|
|
5603
|
+
external = false,
|
|
5604
|
+
monochrome = false,
|
|
5605
|
+
onClick,
|
|
5603
5606
|
className
|
|
5604
5607
|
}) {
|
|
5605
|
-
const
|
|
5608
|
+
const opensElsewhere = external && href !== void 0;
|
|
5609
|
+
const classes = [
|
|
5610
|
+
styles39.tile,
|
|
5611
|
+
variant === "ghost" && styles39.ghost,
|
|
5612
|
+
href && styles39.link,
|
|
5613
|
+
monochrome && styles39.monochrome,
|
|
5614
|
+
className
|
|
5615
|
+
].filter(Boolean).join(" ");
|
|
5606
5616
|
const content = /* @__PURE__ */ jsxs134(Fragment6, { children: [
|
|
5607
5617
|
/* @__PURE__ */ jsx161("span", { className: styles39.icon, "aria-hidden": "true", children: icon }),
|
|
5608
|
-
/* @__PURE__ */
|
|
5618
|
+
/* @__PURE__ */ jsxs134("span", { className: styles39.name, children: [
|
|
5619
|
+
name,
|
|
5620
|
+
opensElsewhere ? /* @__PURE__ */ jsxs134(Fragment6, { children: [
|
|
5621
|
+
/* @__PURE__ */ jsx161(Icon, { name: "external-link", size: "sm", "aria-hidden": true, className: styles39.external }),
|
|
5622
|
+
/* @__PURE__ */ jsx161("span", { className: styles39.hidden, children: " (opens in a new tab)" })
|
|
5623
|
+
] }) : null
|
|
5624
|
+
] }),
|
|
5609
5625
|
description ? /* @__PURE__ */ jsx161("span", { className: styles39.description, children: description }) : /* @__PURE__ */ jsx161("span", { className: styles39.fill }),
|
|
5610
5626
|
tags ? /* @__PURE__ */ jsxs134(Fragment6, { children: [
|
|
5611
5627
|
/* @__PURE__ */ jsx161("span", { className: styles39.separator, "aria-hidden": "true" }),
|
|
5612
5628
|
/* @__PURE__ */ jsx161("span", { className: styles39.tags, children: tags })
|
|
5613
5629
|
] }) : null
|
|
5614
5630
|
] });
|
|
5615
|
-
return href ? /* @__PURE__ */ jsx161(
|
|
5631
|
+
return href ? /* @__PURE__ */ jsx161(
|
|
5632
|
+
"a",
|
|
5633
|
+
{
|
|
5634
|
+
className: classes,
|
|
5635
|
+
href,
|
|
5636
|
+
...opensElsewhere ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
5637
|
+
...onClick ? { onClick } : {},
|
|
5638
|
+
children: content
|
|
5639
|
+
}
|
|
5640
|
+
) : /* @__PURE__ */ jsx161("div", { className: classes, children: content });
|
|
5616
5641
|
}
|
|
5617
5642
|
|
|
5618
5643
|
// src/components/CardTile/CardTile.tsx
|
|
@@ -6238,16 +6263,149 @@ function OfflineGate({ children, surfaceName, className }) {
|
|
|
6238
6263
|
);
|
|
6239
6264
|
}
|
|
6240
6265
|
|
|
6266
|
+
// src/components/InstallPrompt/InstallPrompt.tsx
|
|
6267
|
+
import { useCallback as useCallback5, useEffect as useEffect12, useState as useState16 } from "react";
|
|
6268
|
+
import styles51 from "./InstallPrompt.module.css";
|
|
6269
|
+
import { jsx as jsx176, jsxs as jsxs145 } from "react/jsx-runtime";
|
|
6270
|
+
function InstallHint({ appName, kind, onInstall, onDismiss, className }) {
|
|
6271
|
+
return /* @__PURE__ */ jsxs145(
|
|
6272
|
+
"section",
|
|
6273
|
+
{
|
|
6274
|
+
"aria-label": `Install ${appName}`,
|
|
6275
|
+
className: [styles51.hint, className].filter(Boolean).join(" "),
|
|
6276
|
+
children: [
|
|
6277
|
+
/* @__PURE__ */ jsx176("span", { className: styles51.icon, "aria-hidden": true, children: /* @__PURE__ */ jsx176(Icon, { name: kind === "ios" ? "smartphone" : "download", size: "md", "aria-hidden": true }) }),
|
|
6278
|
+
/* @__PURE__ */ jsxs145("div", { className: styles51.body, children: [
|
|
6279
|
+
/* @__PURE__ */ jsxs145("p", { className: styles51.title, children: [
|
|
6280
|
+
"Install ",
|
|
6281
|
+
appName
|
|
6282
|
+
] }),
|
|
6283
|
+
/* @__PURE__ */ jsx176("p", { className: styles51.text, children: kind === "ios" ? "Open it from your Home Screen, in a window of its own: tap Share, then Add to Home Screen." : "Open it from your home screen or app list, in a window of its own." })
|
|
6284
|
+
] }),
|
|
6285
|
+
/* @__PURE__ */ jsxs145("div", { className: styles51.actions, children: [
|
|
6286
|
+
kind === "prompt" ? /* @__PURE__ */ jsx176(Button, { size: "sm", onClick: onInstall, children: "Install" }) : null,
|
|
6287
|
+
/* @__PURE__ */ jsx176(Button, { size: "sm", variant: "ghost", onClick: onDismiss, children: "Not now" })
|
|
6288
|
+
] })
|
|
6289
|
+
]
|
|
6290
|
+
}
|
|
6291
|
+
);
|
|
6292
|
+
}
|
|
6293
|
+
function isInstalledDisplay() {
|
|
6294
|
+
if (typeof window === "undefined") return false;
|
|
6295
|
+
const standalone = navigator.standalone === true;
|
|
6296
|
+
return standalone || ["standalone", "minimal-ui", "fullscreen", "window-controls-overlay"].some(
|
|
6297
|
+
(mode) => window.matchMedia?.(`(display-mode: ${mode})`).matches
|
|
6298
|
+
);
|
|
6299
|
+
}
|
|
6300
|
+
function isAppleMobile() {
|
|
6301
|
+
const ua = navigator.userAgent;
|
|
6302
|
+
return /iPhone|iPad|iPod/.test(ua) || /Macintosh/.test(ua) && navigator.maxTouchPoints > 1;
|
|
6303
|
+
}
|
|
6304
|
+
function readDismissed(key) {
|
|
6305
|
+
try {
|
|
6306
|
+
return window.localStorage.getItem(key) === "1";
|
|
6307
|
+
} catch {
|
|
6308
|
+
return false;
|
|
6309
|
+
}
|
|
6310
|
+
}
|
|
6311
|
+
function writeDismissed(key) {
|
|
6312
|
+
try {
|
|
6313
|
+
window.localStorage.setItem(key, "1");
|
|
6314
|
+
} catch {
|
|
6315
|
+
}
|
|
6316
|
+
}
|
|
6317
|
+
function useInstallPrompt(storageKey = "sv-install-dismissed") {
|
|
6318
|
+
const [kind, setKind] = useState16(null);
|
|
6319
|
+
const [deferred, setDeferred] = useState16(null);
|
|
6320
|
+
useEffect12(() => {
|
|
6321
|
+
if (isInstalledDisplay() || readDismissed(storageKey)) return;
|
|
6322
|
+
if (isAppleMobile()) setKind("ios");
|
|
6323
|
+
const offered = (event) => {
|
|
6324
|
+
event.preventDefault();
|
|
6325
|
+
setDeferred(event);
|
|
6326
|
+
setKind("prompt");
|
|
6327
|
+
};
|
|
6328
|
+
const installed = () => {
|
|
6329
|
+
setDeferred(null);
|
|
6330
|
+
setKind(null);
|
|
6331
|
+
};
|
|
6332
|
+
window.addEventListener("beforeinstallprompt", offered);
|
|
6333
|
+
window.addEventListener("appinstalled", installed);
|
|
6334
|
+
return () => {
|
|
6335
|
+
window.removeEventListener("beforeinstallprompt", offered);
|
|
6336
|
+
window.removeEventListener("appinstalled", installed);
|
|
6337
|
+
};
|
|
6338
|
+
}, [storageKey]);
|
|
6339
|
+
const install = useCallback5(async () => {
|
|
6340
|
+
if (!deferred) return;
|
|
6341
|
+
await deferred.prompt();
|
|
6342
|
+
const { outcome } = await deferred.userChoice;
|
|
6343
|
+
setDeferred(null);
|
|
6344
|
+
setKind(null);
|
|
6345
|
+
if (outcome === "dismissed") writeDismissed(storageKey);
|
|
6346
|
+
}, [deferred, storageKey]);
|
|
6347
|
+
const dismiss = useCallback5(() => {
|
|
6348
|
+
writeDismissed(storageKey);
|
|
6349
|
+
setKind(null);
|
|
6350
|
+
}, [storageKey]);
|
|
6351
|
+
return { kind, install, dismiss };
|
|
6352
|
+
}
|
|
6353
|
+
function InstallPrompt({ appName, storageKey, className }) {
|
|
6354
|
+
const { kind, install, dismiss } = useInstallPrompt(storageKey);
|
|
6355
|
+
if (!kind) return null;
|
|
6356
|
+
return /* @__PURE__ */ jsx176(
|
|
6357
|
+
InstallHint,
|
|
6358
|
+
{
|
|
6359
|
+
appName,
|
|
6360
|
+
kind,
|
|
6361
|
+
onInstall: () => void install(),
|
|
6362
|
+
onDismiss: dismiss,
|
|
6363
|
+
...className ? { className } : {}
|
|
6364
|
+
}
|
|
6365
|
+
);
|
|
6366
|
+
}
|
|
6367
|
+
|
|
6368
|
+
// src/components/UpdateNotice/UpdateNotice.tsx
|
|
6369
|
+
import styles52 from "./UpdateNotice.module.css";
|
|
6370
|
+
import { jsx as jsx177, jsxs as jsxs146 } from "react/jsx-runtime";
|
|
6371
|
+
function UpdateNotice({
|
|
6372
|
+
appName,
|
|
6373
|
+
onReload,
|
|
6374
|
+
onDismiss,
|
|
6375
|
+
reloading = false,
|
|
6376
|
+
className
|
|
6377
|
+
}) {
|
|
6378
|
+
return /* @__PURE__ */ jsxs146(
|
|
6379
|
+
"div",
|
|
6380
|
+
{
|
|
6381
|
+
role: "status",
|
|
6382
|
+
"aria-live": "polite",
|
|
6383
|
+
className: [styles52.notice, className].filter(Boolean).join(" "),
|
|
6384
|
+
children: [
|
|
6385
|
+
/* @__PURE__ */ jsxs146("p", { className: styles52.text, children: [
|
|
6386
|
+
"A new version of ",
|
|
6387
|
+
appName,
|
|
6388
|
+
" is ready."
|
|
6389
|
+
] }),
|
|
6390
|
+
/* @__PURE__ */ jsxs146("div", { className: styles52.actions, children: [
|
|
6391
|
+
onDismiss ? /* @__PURE__ */ jsx177(Button, { size: "sm", variant: "ghost", onClick: onDismiss, disabled: reloading, children: "Later" }) : null,
|
|
6392
|
+
/* @__PURE__ */ jsx177(Button, { size: "sm", onClick: onReload, disabled: reloading, children: reloading ? "Reloading\u2026" : "Reload" })
|
|
6393
|
+
] })
|
|
6394
|
+
]
|
|
6395
|
+
}
|
|
6396
|
+
);
|
|
6397
|
+
}
|
|
6398
|
+
|
|
6241
6399
|
// src/components/DeviceOnlyGate/DeviceOnlyGate.tsx
|
|
6242
|
-
import { Fragment as Fragment10, jsx as
|
|
6400
|
+
import { Fragment as Fragment10, jsx as jsx178 } from "react/jsx-runtime";
|
|
6243
6401
|
function DeviceOnlyGate({
|
|
6244
6402
|
children,
|
|
6245
6403
|
surfaceName,
|
|
6246
6404
|
available,
|
|
6247
6405
|
className
|
|
6248
6406
|
}) {
|
|
6249
|
-
if (available) return /* @__PURE__ */
|
|
6250
|
-
return /* @__PURE__ */
|
|
6407
|
+
if (available) return /* @__PURE__ */ jsx178(Fragment10, { children });
|
|
6408
|
+
return /* @__PURE__ */ jsx178(
|
|
6251
6409
|
EmptyState,
|
|
6252
6410
|
{
|
|
6253
6411
|
icon: "smartphone",
|
|
@@ -6259,7 +6417,7 @@ function DeviceOnlyGate({
|
|
|
6259
6417
|
}
|
|
6260
6418
|
|
|
6261
6419
|
// src/components/DeviceStorageKeyGate/DeviceStorageKeyGate.tsx
|
|
6262
|
-
import { Fragment as Fragment11, jsx as
|
|
6420
|
+
import { Fragment as Fragment11, jsx as jsx179 } from "react/jsx-runtime";
|
|
6263
6421
|
function DeviceStorageKeyGate({
|
|
6264
6422
|
children,
|
|
6265
6423
|
surfaceName,
|
|
@@ -6268,9 +6426,9 @@ function DeviceStorageKeyGate({
|
|
|
6268
6426
|
className
|
|
6269
6427
|
}) {
|
|
6270
6428
|
if (status === "checking") return null;
|
|
6271
|
-
if (status === "set-up") return /* @__PURE__ */
|
|
6429
|
+
if (status === "set-up") return /* @__PURE__ */ jsx179(Fragment11, { children });
|
|
6272
6430
|
if (status === "unsupported") {
|
|
6273
|
-
return /* @__PURE__ */
|
|
6431
|
+
return /* @__PURE__ */ jsx179(
|
|
6274
6432
|
EmptyState,
|
|
6275
6433
|
{
|
|
6276
6434
|
icon: "smartphone",
|
|
@@ -6281,7 +6439,7 @@ function DeviceStorageKeyGate({
|
|
|
6281
6439
|
);
|
|
6282
6440
|
}
|
|
6283
6441
|
if (status === "no-device-auth") {
|
|
6284
|
-
return /* @__PURE__ */
|
|
6442
|
+
return /* @__PURE__ */ jsx179(
|
|
6285
6443
|
EmptyState,
|
|
6286
6444
|
{
|
|
6287
6445
|
icon: "alert-triangle",
|
|
@@ -6291,7 +6449,7 @@ function DeviceStorageKeyGate({
|
|
|
6291
6449
|
}
|
|
6292
6450
|
);
|
|
6293
6451
|
}
|
|
6294
|
-
return /* @__PURE__ */
|
|
6452
|
+
return /* @__PURE__ */ jsx179(
|
|
6295
6453
|
EmptyState,
|
|
6296
6454
|
{
|
|
6297
6455
|
icon: "lock",
|
|
@@ -6304,31 +6462,31 @@ function DeviceStorageKeyGate({
|
|
|
6304
6462
|
}
|
|
6305
6463
|
|
|
6306
6464
|
// src/components/Avatar/Avatar.tsx
|
|
6307
|
-
import { useState as
|
|
6308
|
-
import
|
|
6309
|
-
import { jsx as
|
|
6465
|
+
import { useState as useState17 } from "react";
|
|
6466
|
+
import styles53 from "./Avatar.module.css";
|
|
6467
|
+
import { jsx as jsx180 } from "react/jsx-runtime";
|
|
6310
6468
|
function initials2(name) {
|
|
6311
6469
|
const parts = name.trim().split(/\s+/);
|
|
6312
6470
|
if (parts.length === 1) return (parts[0] ?? "").slice(0, 2).toUpperCase();
|
|
6313
6471
|
return ((parts[0]?.[0] ?? "") + (parts[parts.length - 1]?.[0] ?? "")).toUpperCase();
|
|
6314
6472
|
}
|
|
6315
6473
|
var sizeClass2 = {
|
|
6316
|
-
sm:
|
|
6317
|
-
md:
|
|
6318
|
-
lg:
|
|
6474
|
+
sm: styles53.sm,
|
|
6475
|
+
md: styles53.md,
|
|
6476
|
+
lg: styles53.lg
|
|
6319
6477
|
};
|
|
6320
6478
|
function Avatar({ name, src, size = "md", className }) {
|
|
6321
|
-
const [imgFailed, setImgFailed] =
|
|
6322
|
-
const cls = [
|
|
6479
|
+
const [imgFailed, setImgFailed] = useState17(false);
|
|
6480
|
+
const cls = [styles53.avatar, sizeClass2[size], className].filter(Boolean).join(" ");
|
|
6323
6481
|
if (src && !imgFailed) {
|
|
6324
|
-
return /* @__PURE__ */
|
|
6482
|
+
return /* @__PURE__ */ jsx180("span", { className: cls, "aria-label": name, children: /* @__PURE__ */ jsx180("img", { src, alt: name, className: styles53.img, onError: () => setImgFailed(true) }) });
|
|
6325
6483
|
}
|
|
6326
|
-
return /* @__PURE__ */
|
|
6484
|
+
return /* @__PURE__ */ jsx180("span", { className: cls, "aria-label": name, children: initials2(name) });
|
|
6327
6485
|
}
|
|
6328
6486
|
|
|
6329
6487
|
// src/components/AvatarStack/AvatarStack.tsx
|
|
6330
|
-
import
|
|
6331
|
-
import { jsx as
|
|
6488
|
+
import styles54 from "./AvatarStack.module.css";
|
|
6489
|
+
import { jsx as jsx181, jsxs as jsxs147 } from "react/jsx-runtime";
|
|
6332
6490
|
function namesOf(people) {
|
|
6333
6491
|
const names = people.map((person) => person.name.trim()).filter((name) => name !== "");
|
|
6334
6492
|
if (names.length <= 1) return names[0] ?? "";
|
|
@@ -6341,10 +6499,10 @@ function AvatarStack({ people, max = 4, size = "md", label, className }) {
|
|
|
6341
6499
|
const shown = hidden > 0 ? people.slice(0, limit) : people;
|
|
6342
6500
|
const names = namesOf(people);
|
|
6343
6501
|
const accessible = label ? `${label}: ${names}` : names;
|
|
6344
|
-
const cls = [
|
|
6345
|
-
return /* @__PURE__ */
|
|
6346
|
-
shown.map((person, index) => /* @__PURE__ */
|
|
6347
|
-
hidden > 0 ? /* @__PURE__ */
|
|
6502
|
+
const cls = [styles54.stack, styles54[size], className].filter(Boolean).join(" ");
|
|
6503
|
+
return /* @__PURE__ */ jsxs147("span", { className: cls, role: "img", "aria-label": accessible, children: [
|
|
6504
|
+
shown.map((person, index) => /* @__PURE__ */ jsx181("span", { className: styles54.item, "aria-hidden": "true", children: /* @__PURE__ */ jsx181(Avatar, { name: person.name, ...person.src ? { src: person.src } : {}, size }) }, `${index}:${person.name}`)),
|
|
6505
|
+
hidden > 0 ? /* @__PURE__ */ jsxs147("span", { className: `${styles54.item} ${styles54.more}`, "aria-hidden": "true", children: [
|
|
6348
6506
|
"+",
|
|
6349
6507
|
hidden
|
|
6350
6508
|
] }) : null
|
|
@@ -6353,22 +6511,22 @@ function AvatarStack({ people, max = 4, size = "md", label, className }) {
|
|
|
6353
6511
|
|
|
6354
6512
|
// src/components/NavTabs/NavTabs.tsx
|
|
6355
6513
|
import { Fragment as Fragment12 } from "react";
|
|
6356
|
-
import
|
|
6357
|
-
import { jsx as
|
|
6514
|
+
import styles55 from "./NavTabs.module.css";
|
|
6515
|
+
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
6358
6516
|
function NavTabs({ items, className, "aria-label": ariaLabel, renderLink }) {
|
|
6359
|
-
return /* @__PURE__ */
|
|
6517
|
+
return /* @__PURE__ */ jsx182(
|
|
6360
6518
|
"nav",
|
|
6361
6519
|
{
|
|
6362
|
-
className: [
|
|
6520
|
+
className: [styles55.nav, className].filter(Boolean).join(" "),
|
|
6363
6521
|
"aria-label": ariaLabel ?? "Page navigation",
|
|
6364
6522
|
children: items.map((item) => {
|
|
6365
6523
|
const linkProps = {
|
|
6366
6524
|
href: item.href,
|
|
6367
|
-
className: [
|
|
6525
|
+
className: [styles55.link, item.active && styles55.active].filter(Boolean).join(" "),
|
|
6368
6526
|
"aria-current": item.active ? "page" : void 0,
|
|
6369
6527
|
children: item.label
|
|
6370
6528
|
};
|
|
6371
|
-
return /* @__PURE__ */
|
|
6529
|
+
return /* @__PURE__ */ jsx182(Fragment12, { children: renderLink ? renderLink(item, linkProps) : /* @__PURE__ */ jsx182(
|
|
6372
6530
|
"a",
|
|
6373
6531
|
{
|
|
6374
6532
|
href: linkProps.href,
|
|
@@ -6384,26 +6542,26 @@ function NavTabs({ items, className, "aria-label": ariaLabel, renderLink }) {
|
|
|
6384
6542
|
|
|
6385
6543
|
// src/components/Tooltip/Tooltip.tsx
|
|
6386
6544
|
import { useId as useId5 } from "react";
|
|
6387
|
-
import
|
|
6388
|
-
import { jsx as
|
|
6545
|
+
import styles56 from "./Tooltip.module.css";
|
|
6546
|
+
import { jsx as jsx183, jsxs as jsxs148 } from "react/jsx-runtime";
|
|
6389
6547
|
var sideClass = {
|
|
6390
|
-
top:
|
|
6391
|
-
bottom:
|
|
6392
|
-
left:
|
|
6393
|
-
right:
|
|
6548
|
+
top: styles56.top,
|
|
6549
|
+
bottom: styles56.bottom,
|
|
6550
|
+
left: styles56.left,
|
|
6551
|
+
right: styles56.right
|
|
6394
6552
|
};
|
|
6395
6553
|
function Tooltip({ content, children, side = "top" }) {
|
|
6396
6554
|
const tipId = useId5();
|
|
6397
|
-
return /* @__PURE__ */
|
|
6398
|
-
/* @__PURE__ */
|
|
6399
|
-
/* @__PURE__ */
|
|
6555
|
+
return /* @__PURE__ */ jsxs148("span", { className: styles56.wrapper, children: [
|
|
6556
|
+
/* @__PURE__ */ jsx183("span", { "aria-describedby": tipId, children }),
|
|
6557
|
+
/* @__PURE__ */ jsx183("span", { id: tipId, role: "tooltip", className: [styles56.tip, sideClass[side]].join(" "), children: content })
|
|
6400
6558
|
] });
|
|
6401
6559
|
}
|
|
6402
6560
|
|
|
6403
6561
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
6404
6562
|
import { useId as useId6 } from "react";
|
|
6405
|
-
import
|
|
6406
|
-
import { jsx as
|
|
6563
|
+
import styles57 from "./RadioGroup.module.css";
|
|
6564
|
+
import { jsx as jsx184, jsxs as jsxs149 } from "react/jsx-runtime";
|
|
6407
6565
|
function RadioGroup({
|
|
6408
6566
|
items,
|
|
6409
6567
|
value,
|
|
@@ -6420,7 +6578,7 @@ function RadioGroup({
|
|
|
6420
6578
|
}) {
|
|
6421
6579
|
const generatedName = useId6();
|
|
6422
6580
|
const groupName = name ?? generatedName;
|
|
6423
|
-
return /* @__PURE__ */
|
|
6581
|
+
return /* @__PURE__ */ jsx184(
|
|
6424
6582
|
"div",
|
|
6425
6583
|
{
|
|
6426
6584
|
id,
|
|
@@ -6430,19 +6588,19 @@ function RadioGroup({
|
|
|
6430
6588
|
"aria-describedby": ariaDescribedBy,
|
|
6431
6589
|
"aria-invalid": ariaInvalid,
|
|
6432
6590
|
"aria-required": required,
|
|
6433
|
-
className: [
|
|
6591
|
+
className: [styles57.root, className].filter(Boolean).join(" "),
|
|
6434
6592
|
children: items.map((item) => {
|
|
6435
6593
|
const checked = item.value === value;
|
|
6436
6594
|
const itemDisabled = disabled || item.disabled;
|
|
6437
6595
|
const inputId = `${groupName}-${item.value}`;
|
|
6438
|
-
return /* @__PURE__ */
|
|
6596
|
+
return /* @__PURE__ */ jsxs149(
|
|
6439
6597
|
"label",
|
|
6440
6598
|
{
|
|
6441
6599
|
htmlFor: inputId,
|
|
6442
|
-
className: [
|
|
6600
|
+
className: [styles57.option, itemDisabled ? styles57.disabled : ""].filter(Boolean).join(" "),
|
|
6443
6601
|
children: [
|
|
6444
|
-
/* @__PURE__ */
|
|
6445
|
-
/* @__PURE__ */
|
|
6602
|
+
/* @__PURE__ */ jsxs149("span", { className: [styles57.circle, checked ? styles57.checked : ""].join(" "), children: [
|
|
6603
|
+
/* @__PURE__ */ jsx184(
|
|
6446
6604
|
"input",
|
|
6447
6605
|
{
|
|
6448
6606
|
id: inputId,
|
|
@@ -6452,13 +6610,13 @@ function RadioGroup({
|
|
|
6452
6610
|
checked,
|
|
6453
6611
|
disabled: itemDisabled,
|
|
6454
6612
|
required,
|
|
6455
|
-
className:
|
|
6613
|
+
className: styles57.input,
|
|
6456
6614
|
onChange: () => onChange(item.value)
|
|
6457
6615
|
}
|
|
6458
6616
|
),
|
|
6459
|
-
checked && /* @__PURE__ */
|
|
6617
|
+
checked && /* @__PURE__ */ jsx184("span", { className: styles57.dot })
|
|
6460
6618
|
] }),
|
|
6461
|
-
/* @__PURE__ */
|
|
6619
|
+
/* @__PURE__ */ jsx184("span", { className: styles57.optionLabel, children: item.label })
|
|
6462
6620
|
]
|
|
6463
6621
|
},
|
|
6464
6622
|
item.value
|
|
@@ -6470,8 +6628,8 @@ function RadioGroup({
|
|
|
6470
6628
|
|
|
6471
6629
|
// src/components/Slider/Slider.tsx
|
|
6472
6630
|
import { useId as useId7 } from "react";
|
|
6473
|
-
import
|
|
6474
|
-
import { jsx as
|
|
6631
|
+
import styles58 from "./Slider.module.css";
|
|
6632
|
+
import { jsx as jsx185, jsxs as jsxs150 } from "react/jsx-runtime";
|
|
6475
6633
|
function Slider({
|
|
6476
6634
|
value,
|
|
6477
6635
|
onChange,
|
|
@@ -6490,9 +6648,9 @@ function Slider({
|
|
|
6490
6648
|
const generatedId = useId7();
|
|
6491
6649
|
const inputId = id ?? generatedId;
|
|
6492
6650
|
const fillPercent = max > min ? (value - min) / (max - min) * 100 : 0;
|
|
6493
|
-
return /* @__PURE__ */
|
|
6494
|
-
label && /* @__PURE__ */
|
|
6495
|
-
/* @__PURE__ */
|
|
6651
|
+
return /* @__PURE__ */ jsxs150("div", { className: [styles58.root, className].filter(Boolean).join(" "), children: [
|
|
6652
|
+
label && /* @__PURE__ */ jsx185("label", { htmlFor: inputId, className: styles58.label, children: label }),
|
|
6653
|
+
/* @__PURE__ */ jsx185(
|
|
6496
6654
|
"input",
|
|
6497
6655
|
{
|
|
6498
6656
|
id: inputId,
|
|
@@ -6506,7 +6664,7 @@ function Slider({
|
|
|
6506
6664
|
"aria-label": label ? void 0 : ariaLabel,
|
|
6507
6665
|
"aria-describedby": ariaDescribedBy,
|
|
6508
6666
|
"aria-invalid": ariaInvalid,
|
|
6509
|
-
className:
|
|
6667
|
+
className: styles58.slider,
|
|
6510
6668
|
style: { "--slider-fill": `${fillPercent}%` },
|
|
6511
6669
|
onChange: (e) => onChange(Number(e.target.value))
|
|
6512
6670
|
}
|
|
@@ -6515,11 +6673,11 @@ function Slider({
|
|
|
6515
6673
|
}
|
|
6516
6674
|
|
|
6517
6675
|
// src/components/Progress/Progress.tsx
|
|
6518
|
-
import
|
|
6519
|
-
import { jsx as
|
|
6676
|
+
import styles59 from "./Progress.module.css";
|
|
6677
|
+
import { jsx as jsx186 } from "react/jsx-runtime";
|
|
6520
6678
|
function Progress({ value, label, id, className }) {
|
|
6521
6679
|
const clamped = Math.min(100, Math.max(0, value));
|
|
6522
|
-
return /* @__PURE__ */
|
|
6680
|
+
return /* @__PURE__ */ jsx186(
|
|
6523
6681
|
"div",
|
|
6524
6682
|
{
|
|
6525
6683
|
id,
|
|
@@ -6528,37 +6686,37 @@ function Progress({ value, label, id, className }) {
|
|
|
6528
6686
|
"aria-valuemin": 0,
|
|
6529
6687
|
"aria-valuemax": 100,
|
|
6530
6688
|
"aria-label": label,
|
|
6531
|
-
className: [
|
|
6532
|
-
children: /* @__PURE__ */
|
|
6689
|
+
className: [styles59.track, className].filter(Boolean).join(" "),
|
|
6690
|
+
children: /* @__PURE__ */ jsx186("div", { className: styles59.fill, style: { width: `${clamped}%` } })
|
|
6533
6691
|
}
|
|
6534
6692
|
);
|
|
6535
6693
|
}
|
|
6536
6694
|
|
|
6537
6695
|
// src/components/Table/Table.tsx
|
|
6538
|
-
import
|
|
6539
|
-
import { jsx as
|
|
6696
|
+
import styles60 from "./Table.module.css";
|
|
6697
|
+
import { jsx as jsx187 } from "react/jsx-runtime";
|
|
6540
6698
|
function Table({ children, className }) {
|
|
6541
|
-
return /* @__PURE__ */
|
|
6699
|
+
return /* @__PURE__ */ jsx187("div", { className: styles60.scrollContainer, children: /* @__PURE__ */ jsx187("table", { className: [styles60.table, className].filter(Boolean).join(" "), children }) });
|
|
6542
6700
|
}
|
|
6543
6701
|
function TableHead({ children }) {
|
|
6544
|
-
return /* @__PURE__ */
|
|
6702
|
+
return /* @__PURE__ */ jsx187("thead", { className: styles60.head, children });
|
|
6545
6703
|
}
|
|
6546
6704
|
function TableBody({ children }) {
|
|
6547
|
-
return /* @__PURE__ */
|
|
6705
|
+
return /* @__PURE__ */ jsx187("tbody", { className: styles60.body, children });
|
|
6548
6706
|
}
|
|
6549
6707
|
function TableRow({ children }) {
|
|
6550
|
-
return /* @__PURE__ */
|
|
6708
|
+
return /* @__PURE__ */ jsx187("tr", { className: styles60.row, children });
|
|
6551
6709
|
}
|
|
6552
6710
|
function TableHeaderCell({ children, ...rest }) {
|
|
6553
|
-
return /* @__PURE__ */
|
|
6711
|
+
return /* @__PURE__ */ jsx187("th", { className: styles60.th, ...rest, children });
|
|
6554
6712
|
}
|
|
6555
6713
|
function TableCell({ children, ...rest }) {
|
|
6556
|
-
return /* @__PURE__ */
|
|
6714
|
+
return /* @__PURE__ */ jsx187("td", { className: styles60.td, ...rest, children });
|
|
6557
6715
|
}
|
|
6558
6716
|
|
|
6559
6717
|
// src/components/Alert/Alert.tsx
|
|
6560
|
-
import
|
|
6561
|
-
import { jsx as
|
|
6718
|
+
import styles61 from "./Alert.module.css";
|
|
6719
|
+
import { jsx as jsx188, jsxs as jsxs151 } from "react/jsx-runtime";
|
|
6562
6720
|
var DEFAULT_ICON = {
|
|
6563
6721
|
info: "info",
|
|
6564
6722
|
success: "circle-check",
|
|
@@ -6568,17 +6726,17 @@ var DEFAULT_ICON = {
|
|
|
6568
6726
|
};
|
|
6569
6727
|
function Alert({ variant, heading, icon, children, id, className }) {
|
|
6570
6728
|
const resolvedIcon = icon === void 0 ? DEFAULT_ICON[variant] : icon || void 0;
|
|
6571
|
-
return /* @__PURE__ */
|
|
6729
|
+
return /* @__PURE__ */ jsxs151(
|
|
6572
6730
|
"div",
|
|
6573
6731
|
{
|
|
6574
6732
|
id,
|
|
6575
6733
|
role: variant === "error" ? "alert" : "status",
|
|
6576
|
-
className: [
|
|
6734
|
+
className: [styles61.alert, styles61[variant], className].filter(Boolean).join(" "),
|
|
6577
6735
|
children: [
|
|
6578
|
-
resolvedIcon && /* @__PURE__ */
|
|
6579
|
-
/* @__PURE__ */
|
|
6580
|
-
heading && /* @__PURE__ */
|
|
6581
|
-
/* @__PURE__ */
|
|
6736
|
+
resolvedIcon && /* @__PURE__ */ jsx188(Icon, { name: resolvedIcon, size: "sm", className: styles61.icon, "aria-hidden": true }),
|
|
6737
|
+
/* @__PURE__ */ jsxs151("div", { className: styles61.content, children: [
|
|
6738
|
+
heading && /* @__PURE__ */ jsx188("p", { className: styles61.heading, children: heading }),
|
|
6739
|
+
/* @__PURE__ */ jsx188("div", { className: styles61.body, children })
|
|
6582
6740
|
] })
|
|
6583
6741
|
]
|
|
6584
6742
|
}
|
|
@@ -6586,26 +6744,26 @@ function Alert({ variant, heading, icon, children, id, className }) {
|
|
|
6586
6744
|
}
|
|
6587
6745
|
|
|
6588
6746
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
6589
|
-
import
|
|
6590
|
-
import { jsx as
|
|
6747
|
+
import styles62 from "./Breadcrumb.module.css";
|
|
6748
|
+
import { jsx as jsx189, jsxs as jsxs152 } from "react/jsx-runtime";
|
|
6591
6749
|
function Breadcrumb({
|
|
6592
6750
|
items,
|
|
6593
6751
|
renderLink,
|
|
6594
6752
|
className,
|
|
6595
6753
|
"aria-label": ariaLabel = "Breadcrumb"
|
|
6596
6754
|
}) {
|
|
6597
|
-
return /* @__PURE__ */
|
|
6755
|
+
return /* @__PURE__ */ jsx189("nav", { "aria-label": ariaLabel, className: [styles62.nav, className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsx189("ol", { className: styles62.list, children: items.map((item, index) => {
|
|
6598
6756
|
const isLast = index === items.length - 1;
|
|
6599
|
-
return /* @__PURE__ */
|
|
6600
|
-
item.href ? renderLink ? renderLink(item, item.label) : /* @__PURE__ */
|
|
6601
|
-
!isLast && /* @__PURE__ */
|
|
6757
|
+
return /* @__PURE__ */ jsxs152("li", { className: styles62.item, children: [
|
|
6758
|
+
item.href ? renderLink ? renderLink(item, item.label) : /* @__PURE__ */ jsx189("a", { href: item.href, className: styles62.link, children: item.label }) : /* @__PURE__ */ jsx189("span", { className: styles62.current, "aria-current": "page", children: item.label }),
|
|
6759
|
+
!isLast && /* @__PURE__ */ jsx189(Icon, { name: "chevron-right", size: "xs", "aria-hidden": true, className: styles62.separator })
|
|
6602
6760
|
] }, item.label + index);
|
|
6603
6761
|
}) }) });
|
|
6604
6762
|
}
|
|
6605
6763
|
|
|
6606
6764
|
// src/components/Pagination/Pagination.tsx
|
|
6607
|
-
import
|
|
6608
|
-
import { jsx as
|
|
6765
|
+
import styles63 from "./Pagination.module.css";
|
|
6766
|
+
import { jsx as jsx190, jsxs as jsxs153 } from "react/jsx-runtime";
|
|
6609
6767
|
function getPageList(page, totalPages) {
|
|
6610
6768
|
if (totalPages <= 1) return [1];
|
|
6611
6769
|
const siblingCount = 1;
|
|
@@ -6628,24 +6786,24 @@ function Pagination({
|
|
|
6628
6786
|
"aria-label": ariaLabel = "Pagination"
|
|
6629
6787
|
}) {
|
|
6630
6788
|
const pages = getPageList(page, totalPages);
|
|
6631
|
-
return /* @__PURE__ */
|
|
6632
|
-
/* @__PURE__ */
|
|
6789
|
+
return /* @__PURE__ */ jsxs153("nav", { "aria-label": ariaLabel, className: [styles63.nav, className].filter(Boolean).join(" "), children: [
|
|
6790
|
+
/* @__PURE__ */ jsx190(
|
|
6633
6791
|
"button",
|
|
6634
6792
|
{
|
|
6635
6793
|
type: "button",
|
|
6636
|
-
className:
|
|
6794
|
+
className: styles63.navButton,
|
|
6637
6795
|
onClick: () => onChange(page - 1),
|
|
6638
6796
|
disabled: page <= 1,
|
|
6639
6797
|
"aria-label": "Previous page",
|
|
6640
|
-
children: /* @__PURE__ */
|
|
6798
|
+
children: /* @__PURE__ */ jsx190(Icon, { name: "chevron-left", size: "sm", "aria-hidden": true })
|
|
6641
6799
|
}
|
|
6642
6800
|
),
|
|
6643
|
-
/* @__PURE__ */
|
|
6644
|
-
(p, index) => p === "ellipsis" ? /* @__PURE__ */
|
|
6801
|
+
/* @__PURE__ */ jsx190("ul", { className: styles63.list, children: pages.map(
|
|
6802
|
+
(p, index) => p === "ellipsis" ? /* @__PURE__ */ jsx190("li", { className: styles63.ellipsis, "aria-hidden": "true", children: "\u2026" }, `ellipsis-${index}`) : /* @__PURE__ */ jsx190("li", { children: /* @__PURE__ */ jsx190(
|
|
6645
6803
|
"button",
|
|
6646
6804
|
{
|
|
6647
6805
|
type: "button",
|
|
6648
|
-
className: [
|
|
6806
|
+
className: [styles63.pageButton, p === page ? styles63.active : ""].filter(Boolean).join(" "),
|
|
6649
6807
|
onClick: () => onChange(p),
|
|
6650
6808
|
"aria-current": p === page ? "page" : void 0,
|
|
6651
6809
|
"aria-label": `Page ${p}`,
|
|
@@ -6653,31 +6811,31 @@ function Pagination({
|
|
|
6653
6811
|
}
|
|
6654
6812
|
) }, p)
|
|
6655
6813
|
) }),
|
|
6656
|
-
/* @__PURE__ */
|
|
6814
|
+
/* @__PURE__ */ jsx190(
|
|
6657
6815
|
"button",
|
|
6658
6816
|
{
|
|
6659
6817
|
type: "button",
|
|
6660
|
-
className:
|
|
6818
|
+
className: styles63.navButton,
|
|
6661
6819
|
onClick: () => onChange(page + 1),
|
|
6662
6820
|
disabled: page >= totalPages,
|
|
6663
6821
|
"aria-label": "Next page",
|
|
6664
|
-
children: /* @__PURE__ */
|
|
6822
|
+
children: /* @__PURE__ */ jsx190(Icon, { name: "chevron-right", size: "sm", "aria-hidden": true })
|
|
6665
6823
|
}
|
|
6666
6824
|
)
|
|
6667
6825
|
] });
|
|
6668
6826
|
}
|
|
6669
6827
|
|
|
6670
6828
|
// src/components/Kbd/Kbd.tsx
|
|
6671
|
-
import
|
|
6672
|
-
import { jsx as
|
|
6829
|
+
import styles64 from "./Kbd.module.css";
|
|
6830
|
+
import { jsx as jsx191 } from "react/jsx-runtime";
|
|
6673
6831
|
function Kbd({ children, className }) {
|
|
6674
|
-
return /* @__PURE__ */
|
|
6832
|
+
return /* @__PURE__ */ jsx191("kbd", { className: [styles64.kbd, className].filter(Boolean).join(" "), children });
|
|
6675
6833
|
}
|
|
6676
6834
|
|
|
6677
6835
|
// src/components/Collapsible/Collapsible.tsx
|
|
6678
6836
|
import { useId as useId8 } from "react";
|
|
6679
|
-
import
|
|
6680
|
-
import { jsx as
|
|
6837
|
+
import styles65 from "./Collapsible.module.css";
|
|
6838
|
+
import { jsx as jsx192, jsxs as jsxs154 } from "react/jsx-runtime";
|
|
6681
6839
|
function Collapsible({
|
|
6682
6840
|
open,
|
|
6683
6841
|
onOpenChange,
|
|
@@ -6688,45 +6846,45 @@ function Collapsible({
|
|
|
6688
6846
|
}) {
|
|
6689
6847
|
const generatedId = useId8();
|
|
6690
6848
|
const contentId = `${id ?? generatedId}-content`;
|
|
6691
|
-
return /* @__PURE__ */
|
|
6692
|
-
/* @__PURE__ */
|
|
6849
|
+
return /* @__PURE__ */ jsxs154("div", { className: [styles65.root, className].filter(Boolean).join(" "), children: [
|
|
6850
|
+
/* @__PURE__ */ jsxs154(
|
|
6693
6851
|
"button",
|
|
6694
6852
|
{
|
|
6695
6853
|
type: "button",
|
|
6696
|
-
className:
|
|
6854
|
+
className: styles65.trigger,
|
|
6697
6855
|
"aria-expanded": open,
|
|
6698
6856
|
"aria-controls": contentId,
|
|
6699
6857
|
onClick: () => onOpenChange(!open),
|
|
6700
6858
|
children: [
|
|
6701
|
-
/* @__PURE__ */
|
|
6702
|
-
/* @__PURE__ */
|
|
6859
|
+
/* @__PURE__ */ jsx192("span", { className: styles65.triggerLabel, children: trigger }),
|
|
6860
|
+
/* @__PURE__ */ jsx192(
|
|
6703
6861
|
Icon,
|
|
6704
6862
|
{
|
|
6705
6863
|
name: "chevron-down",
|
|
6706
6864
|
size: "sm",
|
|
6707
6865
|
"aria-hidden": true,
|
|
6708
|
-
className: [
|
|
6866
|
+
className: [styles65.chevron, open ? styles65.chevronOpen : ""].filter(Boolean).join(" ")
|
|
6709
6867
|
}
|
|
6710
6868
|
)
|
|
6711
6869
|
]
|
|
6712
6870
|
}
|
|
6713
6871
|
),
|
|
6714
|
-
/* @__PURE__ */
|
|
6872
|
+
/* @__PURE__ */ jsx192(
|
|
6715
6873
|
"div",
|
|
6716
6874
|
{
|
|
6717
6875
|
id: contentId,
|
|
6718
|
-
className:
|
|
6876
|
+
className: styles65.contentWrapper,
|
|
6719
6877
|
"data-open": open,
|
|
6720
6878
|
inert: !open || void 0,
|
|
6721
|
-
children: /* @__PURE__ */
|
|
6879
|
+
children: /* @__PURE__ */ jsx192("div", { className: styles65.contentInner, children })
|
|
6722
6880
|
}
|
|
6723
6881
|
)
|
|
6724
6882
|
] });
|
|
6725
6883
|
}
|
|
6726
6884
|
|
|
6727
6885
|
// src/components/Accordion/Accordion.tsx
|
|
6728
|
-
import
|
|
6729
|
-
import { jsx as
|
|
6886
|
+
import styles66 from "./Accordion.module.css";
|
|
6887
|
+
import { jsx as jsx193 } from "react/jsx-runtime";
|
|
6730
6888
|
function Accordion({ items, type, openIds, onOpenIdsChange, className }) {
|
|
6731
6889
|
function handleOpenChange(id, open) {
|
|
6732
6890
|
if (type === "single") {
|
|
@@ -6735,7 +6893,7 @@ function Accordion({ items, type, openIds, onOpenIdsChange, className }) {
|
|
|
6735
6893
|
}
|
|
6736
6894
|
onOpenIdsChange(open ? [...openIds, id] : openIds.filter((openId) => openId !== id));
|
|
6737
6895
|
}
|
|
6738
|
-
return /* @__PURE__ */
|
|
6896
|
+
return /* @__PURE__ */ jsx193("div", { className: [styles66.root, className].filter(Boolean).join(" "), children: items.map((item) => /* @__PURE__ */ jsx193(
|
|
6739
6897
|
Collapsible,
|
|
6740
6898
|
{
|
|
6741
6899
|
id: item.id,
|
|
@@ -6749,13 +6907,13 @@ function Accordion({ items, type, openIds, onOpenIdsChange, className }) {
|
|
|
6749
6907
|
}
|
|
6750
6908
|
|
|
6751
6909
|
// src/components/AspectRatio/AspectRatio.tsx
|
|
6752
|
-
import
|
|
6753
|
-
import { jsx as
|
|
6910
|
+
import styles67 from "./AspectRatio.module.css";
|
|
6911
|
+
import { jsx as jsx194 } from "react/jsx-runtime";
|
|
6754
6912
|
function AspectRatio({ ratio, children, className }) {
|
|
6755
|
-
return /* @__PURE__ */
|
|
6913
|
+
return /* @__PURE__ */ jsx194(
|
|
6756
6914
|
"div",
|
|
6757
6915
|
{
|
|
6758
|
-
className: [
|
|
6916
|
+
className: [styles67.root, className].filter(Boolean).join(" "),
|
|
6759
6917
|
style: { aspectRatio: ratio },
|
|
6760
6918
|
children
|
|
6761
6919
|
}
|
|
@@ -6763,8 +6921,8 @@ function AspectRatio({ ratio, children, className }) {
|
|
|
6763
6921
|
}
|
|
6764
6922
|
|
|
6765
6923
|
// src/components/ButtonLink/ButtonLink.tsx
|
|
6766
|
-
import
|
|
6767
|
-
import { jsx as
|
|
6924
|
+
import styles68 from "./Button.module.css";
|
|
6925
|
+
import { jsx as jsx195 } from "react/jsx-runtime";
|
|
6768
6926
|
function ButtonLink({
|
|
6769
6927
|
variant = "primary",
|
|
6770
6928
|
size = "md",
|
|
@@ -6773,29 +6931,29 @@ function ButtonLink({
|
|
|
6773
6931
|
renderLink,
|
|
6774
6932
|
...rest
|
|
6775
6933
|
}) {
|
|
6776
|
-
const classes = [
|
|
6934
|
+
const classes = [styles68.button, styles68[variant], styles68[size], styles68.link, className].filter(Boolean).join(" ");
|
|
6777
6935
|
const props = { ...rest, className: classes, children };
|
|
6778
|
-
return renderLink ? renderLink(props) : /* @__PURE__ */
|
|
6936
|
+
return renderLink ? renderLink(props) : /* @__PURE__ */ jsx195("a", { ...rest, className: classes, children });
|
|
6779
6937
|
}
|
|
6780
6938
|
|
|
6781
6939
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
6782
|
-
import
|
|
6783
|
-
import { jsx as
|
|
6940
|
+
import styles69 from "./ButtonGroup.module.css";
|
|
6941
|
+
import { jsx as jsx196 } from "react/jsx-runtime";
|
|
6784
6942
|
function ButtonGroup({ children, className, "aria-label": ariaLabel }) {
|
|
6785
|
-
return /* @__PURE__ */
|
|
6943
|
+
return /* @__PURE__ */ jsx196(
|
|
6786
6944
|
"div",
|
|
6787
6945
|
{
|
|
6788
6946
|
role: "group",
|
|
6789
6947
|
"aria-label": ariaLabel,
|
|
6790
|
-
className: [
|
|
6948
|
+
className: [styles69.root, className].filter(Boolean).join(" "),
|
|
6791
6949
|
children
|
|
6792
6950
|
}
|
|
6793
6951
|
);
|
|
6794
6952
|
}
|
|
6795
6953
|
|
|
6796
6954
|
// src/components/Item/Item.tsx
|
|
6797
|
-
import
|
|
6798
|
-
import { Fragment as Fragment13, jsx as
|
|
6955
|
+
import styles70 from "./Item.module.css";
|
|
6956
|
+
import { Fragment as Fragment13, jsx as jsx197, jsxs as jsxs155 } from "react/jsx-runtime";
|
|
6799
6957
|
function Item({
|
|
6800
6958
|
leading,
|
|
6801
6959
|
title,
|
|
@@ -6806,29 +6964,29 @@ function Item({
|
|
|
6806
6964
|
className
|
|
6807
6965
|
}) {
|
|
6808
6966
|
const interactive = Boolean(onClick);
|
|
6809
|
-
const classes = [
|
|
6810
|
-
const content = /* @__PURE__ */
|
|
6811
|
-
leading && /* @__PURE__ */
|
|
6812
|
-
/* @__PURE__ */
|
|
6813
|
-
/* @__PURE__ */
|
|
6814
|
-
description && /* @__PURE__ */
|
|
6967
|
+
const classes = [styles70.root, interactive ? styles70.interactive : "", className].filter(Boolean).join(" ");
|
|
6968
|
+
const content = /* @__PURE__ */ jsxs155(Fragment13, { children: [
|
|
6969
|
+
leading && /* @__PURE__ */ jsx197("span", { className: styles70.leading, children: leading }),
|
|
6970
|
+
/* @__PURE__ */ jsxs155("span", { className: styles70.content, children: [
|
|
6971
|
+
/* @__PURE__ */ jsx197("span", { className: styles70.title, children: title }),
|
|
6972
|
+
description && /* @__PURE__ */ jsx197("span", { className: styles70.description, children: description })
|
|
6815
6973
|
] }),
|
|
6816
|
-
trailing && /* @__PURE__ */
|
|
6974
|
+
trailing && /* @__PURE__ */ jsx197("span", { className: styles70.trailing, children: trailing })
|
|
6817
6975
|
] });
|
|
6818
6976
|
if (interactive) {
|
|
6819
|
-
return /* @__PURE__ */
|
|
6977
|
+
return /* @__PURE__ */ jsx197("button", { type: "button", onClick, disabled, className: classes, children: content });
|
|
6820
6978
|
}
|
|
6821
|
-
return /* @__PURE__ */
|
|
6979
|
+
return /* @__PURE__ */ jsx197("div", { className: classes, children: content });
|
|
6822
6980
|
}
|
|
6823
6981
|
|
|
6824
6982
|
// src/components/Label/Label.tsx
|
|
6825
|
-
import
|
|
6826
|
-
import { jsx as
|
|
6983
|
+
import styles71 from "./Label.module.css";
|
|
6984
|
+
import { jsx as jsx198 } from "react/jsx-runtime";
|
|
6827
6985
|
function Label({ disabled, className, children, ...rest }) {
|
|
6828
|
-
return /* @__PURE__ */
|
|
6986
|
+
return /* @__PURE__ */ jsx198(
|
|
6829
6987
|
"label",
|
|
6830
6988
|
{
|
|
6831
|
-
className: [
|
|
6989
|
+
className: [styles71.label, disabled ? styles71.disabled : "", className].filter(Boolean).join(" "),
|
|
6832
6990
|
...rest,
|
|
6833
6991
|
children
|
|
6834
6992
|
}
|
|
@@ -6836,18 +6994,18 @@ function Label({ disabled, className, children, ...rest }) {
|
|
|
6836
6994
|
}
|
|
6837
6995
|
|
|
6838
6996
|
// src/components/ScrollArea/ScrollArea.tsx
|
|
6839
|
-
import
|
|
6840
|
-
import { jsx as
|
|
6997
|
+
import styles72 from "./ScrollArea.module.css";
|
|
6998
|
+
import { jsx as jsx199 } from "react/jsx-runtime";
|
|
6841
6999
|
function ScrollArea({ children, maxHeight, maxWidth, className }) {
|
|
6842
7000
|
const style = {};
|
|
6843
7001
|
if (maxHeight !== void 0) style.maxHeight = maxHeight;
|
|
6844
7002
|
if (maxWidth !== void 0) style.maxWidth = maxWidth;
|
|
6845
|
-
return /* @__PURE__ */
|
|
7003
|
+
return /* @__PURE__ */ jsx199("div", { className: [styles72.root, className].filter(Boolean).join(" "), style, children });
|
|
6846
7004
|
}
|
|
6847
7005
|
|
|
6848
7006
|
// src/components/FloatingActionButton/FloatingActionButton.tsx
|
|
6849
|
-
import
|
|
6850
|
-
import { Fragment as Fragment14, jsx as
|
|
7007
|
+
import styles73 from "./FloatingActionButton.module.css";
|
|
7008
|
+
import { Fragment as Fragment14, jsx as jsx200, jsxs as jsxs156 } from "react/jsx-runtime";
|
|
6851
7009
|
function FloatingActionButton({
|
|
6852
7010
|
label,
|
|
6853
7011
|
icon,
|
|
@@ -6860,13 +7018,13 @@ function FloatingActionButton({
|
|
|
6860
7018
|
target,
|
|
6861
7019
|
...rest
|
|
6862
7020
|
}) {
|
|
6863
|
-
const cls = [
|
|
6864
|
-
const content = /* @__PURE__ */
|
|
6865
|
-
/* @__PURE__ */
|
|
6866
|
-
extended ? /* @__PURE__ */
|
|
7021
|
+
const cls = [styles73.fab, extended ? styles73.extended : "", className].filter(Boolean).join(" ");
|
|
7022
|
+
const content = /* @__PURE__ */ jsxs156(Fragment14, { children: [
|
|
7023
|
+
/* @__PURE__ */ jsx200("span", { className: styles73.icon, "aria-hidden": "true", children: icon }),
|
|
7024
|
+
extended ? /* @__PURE__ */ jsx200("span", { className: styles73.label, children: label }) : null
|
|
6867
7025
|
] });
|
|
6868
7026
|
if (href !== void 0) {
|
|
6869
|
-
return /* @__PURE__ */
|
|
7027
|
+
return /* @__PURE__ */ jsx200(
|
|
6870
7028
|
"a",
|
|
6871
7029
|
{
|
|
6872
7030
|
...rest,
|
|
@@ -6879,18 +7037,18 @@ function FloatingActionButton({
|
|
|
6879
7037
|
}
|
|
6880
7038
|
);
|
|
6881
7039
|
}
|
|
6882
|
-
return /* @__PURE__ */
|
|
7040
|
+
return /* @__PURE__ */ jsx200("button", { ...rest, type, disabled, className: cls, "aria-label": label, children: content });
|
|
6883
7041
|
}
|
|
6884
7042
|
|
|
6885
7043
|
// src/components/PhotoViewer/PhotoGrid.tsx
|
|
6886
|
-
import { useState as
|
|
7044
|
+
import { useState as useState19 } from "react";
|
|
6887
7045
|
|
|
6888
7046
|
// src/components/PhotoViewer/PhotoViewer.tsx
|
|
6889
7047
|
import {
|
|
6890
|
-
useCallback as
|
|
6891
|
-
useEffect as
|
|
7048
|
+
useCallback as useCallback6,
|
|
7049
|
+
useEffect as useEffect13,
|
|
6892
7050
|
useRef as useRef19,
|
|
6893
|
-
useState as
|
|
7051
|
+
useState as useState18
|
|
6894
7052
|
} from "react";
|
|
6895
7053
|
import { createPortal as createPortal4 } from "react-dom";
|
|
6896
7054
|
|
|
@@ -6948,8 +7106,8 @@ var doubleTapScale = (scale) => scale > MIN_SCALE + 0.01 ? MIN_SCALE : DOUBLE_TA
|
|
|
6948
7106
|
var stepIndex = (index, step, count) => clamp2(index + step, 0, Math.max(0, count - 1));
|
|
6949
7107
|
|
|
6950
7108
|
// src/components/PhotoViewer/PhotoViewer.tsx
|
|
6951
|
-
import
|
|
6952
|
-
import { jsx as
|
|
7109
|
+
import styles74 from "./PhotoViewer.module.css";
|
|
7110
|
+
import { jsx as jsx201, jsxs as jsxs157 } from "react/jsx-runtime";
|
|
6953
7111
|
var TAP_SLOP_PX = 8;
|
|
6954
7112
|
function PhotoViewer({
|
|
6955
7113
|
photos,
|
|
@@ -6974,11 +7132,11 @@ function PhotoViewer({
|
|
|
6974
7132
|
const count = photos.length;
|
|
6975
7133
|
const current = clamp2(index, 0, Math.max(0, count - 1));
|
|
6976
7134
|
const photo = photos[current];
|
|
6977
|
-
const [scale, setScale] =
|
|
6978
|
-
const [pan, setPan] =
|
|
6979
|
-
const [drag, setDrag] =
|
|
6980
|
-
const [dragging, setDragging] =
|
|
6981
|
-
const [failed, setFailed] =
|
|
7135
|
+
const [scale, setScale] = useState18(MIN_SCALE);
|
|
7136
|
+
const [pan, setPan] = useState18({ x: 0, y: 0 });
|
|
7137
|
+
const [drag, setDrag] = useState18({ x: 0, y: 0 });
|
|
7138
|
+
const [dragging, setDragging] = useState18(false);
|
|
7139
|
+
const [failed, setFailed] = useState18(false);
|
|
6982
7140
|
const pointers = useRef19(/* @__PURE__ */ new Map());
|
|
6983
7141
|
const gesture = useRef19({
|
|
6984
7142
|
startScale: 1,
|
|
@@ -6991,26 +7149,26 @@ function PhotoViewer({
|
|
|
6991
7149
|
pinched: false
|
|
6992
7150
|
});
|
|
6993
7151
|
const lastTap = useRef19(void 0);
|
|
6994
|
-
|
|
7152
|
+
useEffect13(() => {
|
|
6995
7153
|
setScale(MIN_SCALE);
|
|
6996
7154
|
setPan({ x: 0, y: 0 });
|
|
6997
7155
|
setDrag({ x: 0, y: 0 });
|
|
6998
7156
|
setFailed(false);
|
|
6999
7157
|
}, [current, open]);
|
|
7000
|
-
|
|
7158
|
+
useEffect13(() => {
|
|
7001
7159
|
if (!open) return;
|
|
7002
7160
|
for (const next of [photos[current - 1], photos[current + 1]]) {
|
|
7003
7161
|
if (next) new Image().src = next.src;
|
|
7004
7162
|
}
|
|
7005
7163
|
}, [open, current, photos]);
|
|
7006
|
-
const go =
|
|
7164
|
+
const go = useCallback6(
|
|
7007
7165
|
(step) => {
|
|
7008
7166
|
const next = stepIndex(current, step, count);
|
|
7009
7167
|
if (next !== current) onIndexChange(next);
|
|
7010
7168
|
},
|
|
7011
7169
|
[current, count, onIndexChange]
|
|
7012
7170
|
);
|
|
7013
|
-
const sizes =
|
|
7171
|
+
const sizes = useCallback6(() => {
|
|
7014
7172
|
const stage = stageRef.current?.getBoundingClientRect();
|
|
7015
7173
|
const image = imageRef.current;
|
|
7016
7174
|
const box = { width: stage?.width ?? 0, height: stage?.height ?? 0 };
|
|
@@ -7021,7 +7179,7 @@ function PhotoViewer({
|
|
|
7021
7179
|
const fit = Math.min(box.width / natural.width, box.height / natural.height) || 1;
|
|
7022
7180
|
return { box, size: { width: natural.width * fit, height: natural.height * fit } };
|
|
7023
7181
|
}, []);
|
|
7024
|
-
const zoomTo =
|
|
7182
|
+
const zoomTo = useCallback6(
|
|
7025
7183
|
(next, focus = { x: 0, y: 0 }) => {
|
|
7026
7184
|
const to = clampScale(next);
|
|
7027
7185
|
const { box, size } = sizes();
|
|
@@ -7030,7 +7188,7 @@ function PhotoViewer({
|
|
|
7030
7188
|
},
|
|
7031
7189
|
[scale, sizes]
|
|
7032
7190
|
);
|
|
7033
|
-
|
|
7191
|
+
useEffect13(() => {
|
|
7034
7192
|
if (!open) return;
|
|
7035
7193
|
function onKey(event) {
|
|
7036
7194
|
if (event.key === "ArrowRight") go(1);
|
|
@@ -7168,12 +7326,12 @@ function PhotoViewer({
|
|
|
7168
7326
|
const fade = clamp2(1 - drag.y / 400, 0.3, 1);
|
|
7169
7327
|
const transform = `translate3d(${pan.x + drag.x}px, ${pan.y + drag.y}px, 0) scale(${scale})`;
|
|
7170
7328
|
return createPortal4(
|
|
7171
|
-
/* @__PURE__ */
|
|
7329
|
+
/* @__PURE__ */ jsx201(
|
|
7172
7330
|
"div",
|
|
7173
7331
|
{
|
|
7174
|
-
className: [
|
|
7332
|
+
className: [styles74.scrim, isOpenPhase ? styles74.scrimOpen : ""].filter(Boolean).join(" "),
|
|
7175
7333
|
style: { ["--photo-fade"]: String(fade) },
|
|
7176
|
-
children: /* @__PURE__ */
|
|
7334
|
+
children: /* @__PURE__ */ jsxs157(
|
|
7177
7335
|
"div",
|
|
7178
7336
|
{
|
|
7179
7337
|
ref: panelRef,
|
|
@@ -7182,35 +7340,35 @@ function PhotoViewer({
|
|
|
7182
7340
|
"aria-label": label,
|
|
7183
7341
|
"aria-roledescription": "photo viewer",
|
|
7184
7342
|
tabIndex: -1,
|
|
7185
|
-
className:
|
|
7343
|
+
className: styles74.panel,
|
|
7186
7344
|
children: [
|
|
7187
|
-
/* @__PURE__ */
|
|
7188
|
-
/* @__PURE__ */
|
|
7345
|
+
/* @__PURE__ */ jsxs157("div", { className: styles74.bar, children: [
|
|
7346
|
+
/* @__PURE__ */ jsxs157("span", { className: styles74.count, "aria-live": "polite", "aria-atomic": "true", children: [
|
|
7189
7347
|
current + 1,
|
|
7190
7348
|
" of ",
|
|
7191
7349
|
count
|
|
7192
7350
|
] }),
|
|
7193
|
-
/* @__PURE__ */
|
|
7351
|
+
/* @__PURE__ */ jsx201("button", { type: "button", className: styles74.control, "aria-label": "Close", onClick: onClose, children: /* @__PURE__ */ jsx201(Icon, { name: "x", size: "md", "aria-hidden": true }) })
|
|
7194
7352
|
] }),
|
|
7195
|
-
/* @__PURE__ */
|
|
7353
|
+
/* @__PURE__ */ jsx201(
|
|
7196
7354
|
"div",
|
|
7197
7355
|
{
|
|
7198
7356
|
ref: stageRef,
|
|
7199
|
-
className:
|
|
7357
|
+
className: styles74.stage,
|
|
7200
7358
|
onPointerDown,
|
|
7201
7359
|
onPointerMove,
|
|
7202
7360
|
onPointerUp,
|
|
7203
7361
|
onPointerCancel,
|
|
7204
7362
|
onWheel,
|
|
7205
7363
|
onKeyDown: onStageKeyDown,
|
|
7206
|
-
children: failed ? /* @__PURE__ */
|
|
7364
|
+
children: failed ? /* @__PURE__ */ jsx201("p", { className: styles74.failed, role: "status", children: "This photo could not be shown." }) : /* @__PURE__ */ jsx201(
|
|
7207
7365
|
"img",
|
|
7208
7366
|
{
|
|
7209
7367
|
ref: imageRef,
|
|
7210
7368
|
src: photo.src,
|
|
7211
7369
|
alt: photo.alt,
|
|
7212
7370
|
draggable: false,
|
|
7213
|
-
className: [
|
|
7371
|
+
className: [styles74.image, dragging ? styles74.dragging : ""].filter(Boolean).join(" "),
|
|
7214
7372
|
style: { transform },
|
|
7215
7373
|
onError: () => setFailed(true)
|
|
7216
7374
|
},
|
|
@@ -7218,27 +7376,27 @@ function PhotoViewer({
|
|
|
7218
7376
|
)
|
|
7219
7377
|
}
|
|
7220
7378
|
),
|
|
7221
|
-
current > 0 ? /* @__PURE__ */
|
|
7379
|
+
current > 0 ? /* @__PURE__ */ jsx201(
|
|
7222
7380
|
"button",
|
|
7223
7381
|
{
|
|
7224
7382
|
type: "button",
|
|
7225
|
-
className: [
|
|
7383
|
+
className: [styles74.control, styles74.previous].join(" "),
|
|
7226
7384
|
"aria-label": "Previous photo",
|
|
7227
7385
|
onClick: () => go(-1),
|
|
7228
|
-
children: /* @__PURE__ */
|
|
7386
|
+
children: /* @__PURE__ */ jsx201(Icon, { name: "chevron-left", size: "md", "aria-hidden": true })
|
|
7229
7387
|
}
|
|
7230
7388
|
) : null,
|
|
7231
|
-
current < count - 1 ? /* @__PURE__ */
|
|
7389
|
+
current < count - 1 ? /* @__PURE__ */ jsx201(
|
|
7232
7390
|
"button",
|
|
7233
7391
|
{
|
|
7234
7392
|
type: "button",
|
|
7235
|
-
className: [
|
|
7393
|
+
className: [styles74.control, styles74.next].join(" "),
|
|
7236
7394
|
"aria-label": "Next photo",
|
|
7237
7395
|
onClick: () => go(1),
|
|
7238
|
-
children: /* @__PURE__ */
|
|
7396
|
+
children: /* @__PURE__ */ jsx201(Icon, { name: "chevron-right", size: "md", "aria-hidden": true })
|
|
7239
7397
|
}
|
|
7240
7398
|
) : null,
|
|
7241
|
-
photo.caption ? /* @__PURE__ */
|
|
7399
|
+
photo.caption ? /* @__PURE__ */ jsx201("div", { className: styles74.caption, children: photo.caption }) : null
|
|
7242
7400
|
]
|
|
7243
7401
|
}
|
|
7244
7402
|
)
|
|
@@ -7249,18 +7407,18 @@ function PhotoViewer({
|
|
|
7249
7407
|
}
|
|
7250
7408
|
|
|
7251
7409
|
// src/components/PhotoViewer/PhotoGrid.tsx
|
|
7252
|
-
import
|
|
7253
|
-
import { Fragment as Fragment15, jsx as
|
|
7410
|
+
import styles75 from "./PhotoGrid.module.css";
|
|
7411
|
+
import { Fragment as Fragment15, jsx as jsx202, jsxs as jsxs158 } from "react/jsx-runtime";
|
|
7254
7412
|
function PhotoGrid({ photos, onOpen, label = "Photos", className }) {
|
|
7255
7413
|
if (photos.length === 0) return null;
|
|
7256
|
-
return /* @__PURE__ */
|
|
7414
|
+
return /* @__PURE__ */ jsx202("ul", { className: [styles75.grid, className].filter(Boolean).join(" "), "aria-label": label, children: photos.map((photo, index) => /* @__PURE__ */ jsx202("li", { className: styles75.cell, children: /* @__PURE__ */ jsx202(
|
|
7257
7415
|
"button",
|
|
7258
7416
|
{
|
|
7259
7417
|
type: "button",
|
|
7260
|
-
className:
|
|
7418
|
+
className: styles75.thumb,
|
|
7261
7419
|
"aria-label": `Photo ${index + 1} of ${photos.length}: ${photo.alt}`,
|
|
7262
7420
|
onClick: () => onOpen(index),
|
|
7263
|
-
children: /* @__PURE__ */
|
|
7421
|
+
children: /* @__PURE__ */ jsx202(
|
|
7264
7422
|
"img",
|
|
7265
7423
|
{
|
|
7266
7424
|
src: photo.thumbSrc ?? photo.src,
|
|
@@ -7268,17 +7426,17 @@ function PhotoGrid({ photos, onOpen, label = "Photos", className }) {
|
|
|
7268
7426
|
loading: "lazy",
|
|
7269
7427
|
decoding: "async",
|
|
7270
7428
|
draggable: false,
|
|
7271
|
-
className:
|
|
7429
|
+
className: styles75.img
|
|
7272
7430
|
}
|
|
7273
7431
|
)
|
|
7274
7432
|
}
|
|
7275
7433
|
) }, photo.id)) });
|
|
7276
7434
|
}
|
|
7277
7435
|
function PhotoGallery({ photos, label, className, onView }) {
|
|
7278
|
-
const [open, setOpen] =
|
|
7279
|
-
const [index, setIndex] =
|
|
7280
|
-
return /* @__PURE__ */
|
|
7281
|
-
/* @__PURE__ */
|
|
7436
|
+
const [open, setOpen] = useState19(false);
|
|
7437
|
+
const [index, setIndex] = useState19(0);
|
|
7438
|
+
return /* @__PURE__ */ jsxs158(Fragment15, { children: [
|
|
7439
|
+
/* @__PURE__ */ jsx202(
|
|
7282
7440
|
PhotoGrid,
|
|
7283
7441
|
{
|
|
7284
7442
|
photos,
|
|
@@ -7291,7 +7449,7 @@ function PhotoGallery({ photos, label, className, onView }) {
|
|
|
7291
7449
|
}
|
|
7292
7450
|
}
|
|
7293
7451
|
),
|
|
7294
|
-
/* @__PURE__ */
|
|
7452
|
+
/* @__PURE__ */ jsx202(
|
|
7295
7453
|
PhotoViewer,
|
|
7296
7454
|
{
|
|
7297
7455
|
photos,
|
|
@@ -7309,40 +7467,40 @@ function PhotoGallery({ photos, label, className, onView }) {
|
|
|
7309
7467
|
}
|
|
7310
7468
|
|
|
7311
7469
|
// src/components/Marker/Marker.tsx
|
|
7312
|
-
import
|
|
7313
|
-
import { jsx as
|
|
7470
|
+
import styles76 from "./Marker.module.css";
|
|
7471
|
+
import { jsx as jsx203 } from "react/jsx-runtime";
|
|
7314
7472
|
function Marker({ index, label, onClick, className }) {
|
|
7315
|
-
const classes = [
|
|
7473
|
+
const classes = [styles76.marker, className].filter(Boolean).join(" ");
|
|
7316
7474
|
if (onClick) {
|
|
7317
|
-
return /* @__PURE__ */
|
|
7475
|
+
return /* @__PURE__ */ jsx203("button", { type: "button", onClick, "aria-label": label, className: classes, children: index });
|
|
7318
7476
|
}
|
|
7319
|
-
return /* @__PURE__ */
|
|
7477
|
+
return /* @__PURE__ */ jsx203("span", { "aria-label": label, className: classes, children: index });
|
|
7320
7478
|
}
|
|
7321
7479
|
|
|
7322
7480
|
// src/components/Message/Message.tsx
|
|
7323
|
-
import
|
|
7324
|
-
import { jsx as
|
|
7481
|
+
import styles77 from "./Message.module.css";
|
|
7482
|
+
import { jsx as jsx204, jsxs as jsxs159 } from "react/jsx-runtime";
|
|
7325
7483
|
function Message({ sender, children, pending, actions, className }) {
|
|
7326
|
-
return /* @__PURE__ */
|
|
7327
|
-
/* @__PURE__ */
|
|
7328
|
-
/* @__PURE__ */
|
|
7329
|
-
/* @__PURE__ */
|
|
7330
|
-
/* @__PURE__ */
|
|
7484
|
+
return /* @__PURE__ */ jsxs159("div", { className: [styles77.row, styles77[sender], className].filter(Boolean).join(" "), children: [
|
|
7485
|
+
/* @__PURE__ */ jsx204("div", { className: styles77.bubble, children: pending ? /* @__PURE__ */ jsxs159("span", { className: styles77.typingDots, "aria-label": "Thinking", children: [
|
|
7486
|
+
/* @__PURE__ */ jsx204("span", { className: styles77.dot }),
|
|
7487
|
+
/* @__PURE__ */ jsx204("span", { className: styles77.dot }),
|
|
7488
|
+
/* @__PURE__ */ jsx204("span", { className: styles77.dot })
|
|
7331
7489
|
] }) : children }),
|
|
7332
|
-
actions && !pending && /* @__PURE__ */
|
|
7490
|
+
actions && !pending && /* @__PURE__ */ jsx204("div", { className: styles77.actions, children: actions })
|
|
7333
7491
|
] });
|
|
7334
7492
|
}
|
|
7335
7493
|
|
|
7336
7494
|
// src/components/MessageScroller/MessageScroller.tsx
|
|
7337
|
-
import { useEffect as
|
|
7338
|
-
import
|
|
7339
|
-
import { jsx as
|
|
7495
|
+
import { useEffect as useEffect14, useRef as useRef20, useState as useState20 } from "react";
|
|
7496
|
+
import styles78 from "./MessageScroller.module.css";
|
|
7497
|
+
import { jsx as jsx205, jsxs as jsxs160 } from "react/jsx-runtime";
|
|
7340
7498
|
var NEAR_BOTTOM_THRESHOLD_PX = 80;
|
|
7341
7499
|
function MessageScroller({ children, className }) {
|
|
7342
7500
|
const containerRef = useRef20(null);
|
|
7343
7501
|
const isNearBottomRef = useRef20(true);
|
|
7344
|
-
const [hasNewMessages, setHasNewMessages] =
|
|
7345
|
-
|
|
7502
|
+
const [hasNewMessages, setHasNewMessages] = useState20(false);
|
|
7503
|
+
useEffect14(() => {
|
|
7346
7504
|
const el = containerRef.current;
|
|
7347
7505
|
if (!el) return;
|
|
7348
7506
|
if (isNearBottomRef.current) {
|
|
@@ -7367,24 +7525,24 @@ function MessageScroller({ children, className }) {
|
|
|
7367
7525
|
isNearBottomRef.current = true;
|
|
7368
7526
|
setHasNewMessages(false);
|
|
7369
7527
|
}
|
|
7370
|
-
return /* @__PURE__ */
|
|
7371
|
-
/* @__PURE__ */
|
|
7372
|
-
/* @__PURE__ */
|
|
7528
|
+
return /* @__PURE__ */ jsxs160("div", { className: [styles78.root, className].filter(Boolean).join(" "), children: [
|
|
7529
|
+
/* @__PURE__ */ jsxs160("div", { className: styles78.scrollContainer, ref: containerRef, onScroll: handleScroll, children: [
|
|
7530
|
+
/* @__PURE__ */ jsx205("div", { className: styles78.spacer, "aria-hidden": "true" }),
|
|
7373
7531
|
children
|
|
7374
7532
|
] }),
|
|
7375
|
-
hasNewMessages && /* @__PURE__ */
|
|
7533
|
+
hasNewMessages && /* @__PURE__ */ jsx205("button", { type: "button", className: styles78.jumpButton, onClick: scrollToBottom, children: "New messages \u2193" })
|
|
7376
7534
|
] });
|
|
7377
7535
|
}
|
|
7378
7536
|
|
|
7379
7537
|
// src/components/HoverCard/HoverCard.tsx
|
|
7380
|
-
import { cloneElement, useEffect as
|
|
7381
|
-
import
|
|
7382
|
-
import { jsx as
|
|
7538
|
+
import { cloneElement, useEffect as useEffect15, useRef as useRef21, useState as useState21 } from "react";
|
|
7539
|
+
import styles79 from "./HoverCard.module.css";
|
|
7540
|
+
import { jsx as jsx206 } from "react/jsx-runtime";
|
|
7383
7541
|
var OPEN_DELAY_MS = 400;
|
|
7384
7542
|
var CLOSE_DELAY_MS = 150;
|
|
7385
7543
|
function useHoverCapable() {
|
|
7386
|
-
const [hoverCapable, setHoverCapable] =
|
|
7387
|
-
|
|
7544
|
+
const [hoverCapable, setHoverCapable] = useState21(true);
|
|
7545
|
+
useEffect15(() => {
|
|
7388
7546
|
const mql = window.matchMedia("(hover: hover)");
|
|
7389
7547
|
setHoverCapable(mql.matches);
|
|
7390
7548
|
function handleChange(e) {
|
|
@@ -7402,7 +7560,7 @@ function HoverCard({
|
|
|
7402
7560
|
width,
|
|
7403
7561
|
"aria-label": ariaLabel
|
|
7404
7562
|
}) {
|
|
7405
|
-
const [open, setOpen] =
|
|
7563
|
+
const [open, setOpen] = useState21(false);
|
|
7406
7564
|
const hoverCapable = useHoverCapable();
|
|
7407
7565
|
const openTimer = useRef21(void 0);
|
|
7408
7566
|
const closeTimer = useRef21(void 0);
|
|
@@ -7424,13 +7582,13 @@ function HoverCard({
|
|
|
7424
7582
|
onBlur: scheduleClose
|
|
7425
7583
|
} : { onClick: () => setOpen((o) => !o) };
|
|
7426
7584
|
const wrappedTrigger = cloneElement(trigger, triggerHandlers);
|
|
7427
|
-
return /* @__PURE__ */
|
|
7585
|
+
return /* @__PURE__ */ jsx206(
|
|
7428
7586
|
"div",
|
|
7429
7587
|
{
|
|
7430
|
-
className:
|
|
7588
|
+
className: styles79.root,
|
|
7431
7589
|
onMouseEnter: hoverCapable ? cancelScheduledClose : void 0,
|
|
7432
7590
|
onMouseLeave: hoverCapable ? scheduleClose : void 0,
|
|
7433
|
-
children: /* @__PURE__ */
|
|
7591
|
+
children: /* @__PURE__ */ jsx206(
|
|
7434
7592
|
Popover,
|
|
7435
7593
|
{
|
|
7436
7594
|
trigger: wrappedTrigger,
|
|
@@ -7447,12 +7605,12 @@ function HoverCard({
|
|
|
7447
7605
|
}
|
|
7448
7606
|
|
|
7449
7607
|
// src/components/ContextMenu/ContextMenu.tsx
|
|
7450
|
-
import { cloneElement as cloneElement2, useState as
|
|
7451
|
-
import { Fragment as Fragment16, jsx as
|
|
7608
|
+
import { cloneElement as cloneElement2, useState as useState22 } from "react";
|
|
7609
|
+
import { Fragment as Fragment16, jsx as jsx207, jsxs as jsxs161 } from "react/jsx-runtime";
|
|
7452
7610
|
function ContextMenu({ children, items, "aria-label": ariaLabel }) {
|
|
7453
7611
|
const isMobile = useIsMobile();
|
|
7454
|
-
const [open, setOpen] =
|
|
7455
|
-
const [point, setPoint] =
|
|
7612
|
+
const [open, setOpen] = useState22(false);
|
|
7613
|
+
const [point, setPoint] = useState22({ x: 0, y: 0 });
|
|
7456
7614
|
const longPressHandlers = useLongPress({
|
|
7457
7615
|
onLongPress: () => setOpen(true),
|
|
7458
7616
|
disabled: !isMobile
|
|
@@ -7466,7 +7624,7 @@ function ContextMenu({ children, items, "aria-label": ariaLabel }) {
|
|
|
7466
7624
|
children,
|
|
7467
7625
|
isMobile ? longPressHandlers : { onContextMenu: handleContextMenu }
|
|
7468
7626
|
);
|
|
7469
|
-
const list = /* @__PURE__ */
|
|
7627
|
+
const list = /* @__PURE__ */ jsx207(
|
|
7470
7628
|
MenuEntries,
|
|
7471
7629
|
{
|
|
7472
7630
|
items,
|
|
@@ -7477,17 +7635,17 @@ function ContextMenu({ children, items, "aria-label": ariaLabel }) {
|
|
|
7477
7635
|
}
|
|
7478
7636
|
);
|
|
7479
7637
|
if (isMobile) {
|
|
7480
|
-
return /* @__PURE__ */
|
|
7638
|
+
return /* @__PURE__ */ jsxs161(Fragment16, { children: [
|
|
7481
7639
|
wrappedChild,
|
|
7482
|
-
/* @__PURE__ */
|
|
7640
|
+
/* @__PURE__ */ jsx207(Drawer, { open, onClose: () => setOpen(false), "aria-label": ariaLabel, children: list })
|
|
7483
7641
|
] });
|
|
7484
7642
|
}
|
|
7485
|
-
return /* @__PURE__ */
|
|
7643
|
+
return /* @__PURE__ */ jsxs161(Fragment16, { children: [
|
|
7486
7644
|
wrappedChild,
|
|
7487
|
-
open && /* @__PURE__ */
|
|
7645
|
+
open && /* @__PURE__ */ jsx207("div", { style: { position: "fixed", left: point.x, top: point.y, width: 0, height: 0 }, children: /* @__PURE__ */ jsx207(
|
|
7488
7646
|
Popover,
|
|
7489
7647
|
{
|
|
7490
|
-
trigger: /* @__PURE__ */
|
|
7648
|
+
trigger: /* @__PURE__ */ jsx207("span", {}),
|
|
7491
7649
|
open,
|
|
7492
7650
|
onClose: () => setOpen(false),
|
|
7493
7651
|
"aria-label": ariaLabel,
|
|
@@ -7498,15 +7656,15 @@ function ContextMenu({ children, items, "aria-label": ariaLabel }) {
|
|
|
7498
7656
|
}
|
|
7499
7657
|
|
|
7500
7658
|
// src/components/NavigationMenu/NavigationMenu.tsx
|
|
7501
|
-
import { useRef as useRef22, useState as
|
|
7502
|
-
import
|
|
7503
|
-
import { jsx as
|
|
7659
|
+
import { useRef as useRef22, useState as useState23 } from "react";
|
|
7660
|
+
import styles80 from "./NavigationMenu.module.css";
|
|
7661
|
+
import { jsx as jsx208 } from "react/jsx-runtime";
|
|
7504
7662
|
function NavigationMenu({
|
|
7505
7663
|
items,
|
|
7506
7664
|
renderLink,
|
|
7507
7665
|
"aria-label": ariaLabel
|
|
7508
7666
|
}) {
|
|
7509
|
-
const [openIndex, setOpenIndex] =
|
|
7667
|
+
const [openIndex, setOpenIndex] = useState23(null);
|
|
7510
7668
|
const triggerRefs = useRef22([]);
|
|
7511
7669
|
function handleKeyDown(e, index) {
|
|
7512
7670
|
if (e.key === "Escape") {
|
|
@@ -7521,26 +7679,26 @@ function NavigationMenu({
|
|
|
7521
7679
|
triggerRefs.current[nextIndex]?.focus();
|
|
7522
7680
|
}
|
|
7523
7681
|
}
|
|
7524
|
-
return /* @__PURE__ */
|
|
7682
|
+
return /* @__PURE__ */ jsx208("nav", { "aria-label": ariaLabel, className: styles80.nav, children: /* @__PURE__ */ jsx208("ul", { className: styles80.list, children: items.map((item, index) => {
|
|
7525
7683
|
if (!item.content) {
|
|
7526
7684
|
const linkChildren = item.label;
|
|
7527
|
-
return /* @__PURE__ */
|
|
7685
|
+
return /* @__PURE__ */ jsx208("li", { children: item.href && renderLink ? renderLink(item.href, linkChildren) : /* @__PURE__ */ jsx208("a", { href: item.href, className: styles80.link, children: linkChildren }) }, item.label);
|
|
7528
7686
|
}
|
|
7529
7687
|
const isOpen = openIndex === index;
|
|
7530
|
-
return /* @__PURE__ */
|
|
7688
|
+
return /* @__PURE__ */ jsx208("li", { children: /* @__PURE__ */ jsx208(
|
|
7531
7689
|
Popover,
|
|
7532
7690
|
{
|
|
7533
7691
|
"aria-label": item.label,
|
|
7534
7692
|
open: isOpen,
|
|
7535
7693
|
onClose: () => setOpenIndex((current) => current === index ? null : current),
|
|
7536
|
-
trigger: /* @__PURE__ */
|
|
7694
|
+
trigger: /* @__PURE__ */ jsx208(
|
|
7537
7695
|
"button",
|
|
7538
7696
|
{
|
|
7539
7697
|
ref: (el) => {
|
|
7540
7698
|
triggerRefs.current[index] = el;
|
|
7541
7699
|
},
|
|
7542
7700
|
type: "button",
|
|
7543
|
-
className: [
|
|
7701
|
+
className: [styles80.trigger, isOpen ? styles80.triggerOpen : ""].filter(Boolean).join(" "),
|
|
7544
7702
|
"aria-expanded": isOpen,
|
|
7545
7703
|
onClick: () => setOpenIndex((current) => current === index ? null : index),
|
|
7546
7704
|
onMouseEnter: () => {
|
|
@@ -7557,15 +7715,15 @@ function NavigationMenu({
|
|
|
7557
7715
|
}
|
|
7558
7716
|
|
|
7559
7717
|
// src/components/Menubar/Menubar.tsx
|
|
7560
|
-
import { jsx as
|
|
7718
|
+
import { jsx as jsx209 } from "react/jsx-runtime";
|
|
7561
7719
|
function Menubar({ menus, "aria-label": ariaLabel = "Menu bar" }) {
|
|
7562
|
-
return /* @__PURE__ */
|
|
7720
|
+
return /* @__PURE__ */ jsx209(
|
|
7563
7721
|
NavigationMenu,
|
|
7564
7722
|
{
|
|
7565
7723
|
"aria-label": ariaLabel,
|
|
7566
7724
|
items: menus.map((menu) => ({
|
|
7567
7725
|
label: menu.label,
|
|
7568
|
-
content: (close) => /* @__PURE__ */
|
|
7726
|
+
content: (close) => /* @__PURE__ */ jsx209(
|
|
7569
7727
|
MenuEntries,
|
|
7570
7728
|
{
|
|
7571
7729
|
items: menu.items,
|
|
@@ -7581,9 +7739,9 @@ function Menubar({ menus, "aria-label": ariaLabel = "Menu bar" }) {
|
|
|
7581
7739
|
}
|
|
7582
7740
|
|
|
7583
7741
|
// src/components/Command/Command.tsx
|
|
7584
|
-
import { useEffect as
|
|
7585
|
-
import
|
|
7586
|
-
import { jsx as
|
|
7742
|
+
import { useEffect as useEffect16, useId as useId9, useMemo as useMemo3, useRef as useRef23, useState as useState24 } from "react";
|
|
7743
|
+
import styles81 from "./Command.module.css";
|
|
7744
|
+
import { jsx as jsx210, jsxs as jsxs162 } from "react/jsx-runtime";
|
|
7587
7745
|
function matches(item, query) {
|
|
7588
7746
|
if (!query) return true;
|
|
7589
7747
|
const haystack = `${item.label} ${item.keywords ?? ""}`.toLowerCase();
|
|
@@ -7596,15 +7754,15 @@ function Command({
|
|
|
7596
7754
|
placeholder = "Type a command\u2026",
|
|
7597
7755
|
"aria-label": ariaLabel = "Command palette"
|
|
7598
7756
|
}) {
|
|
7599
|
-
const [query, setQuery] =
|
|
7600
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
7757
|
+
const [query, setQuery] = useState24("");
|
|
7758
|
+
const [highlightedIndex, setHighlightedIndex] = useState24(0);
|
|
7601
7759
|
const inputRef = useRef23(null);
|
|
7602
7760
|
const listId = useId9();
|
|
7603
7761
|
const filtered = useMemo3(() => items.filter((item) => matches(item, query)), [items, query]);
|
|
7604
|
-
|
|
7762
|
+
useEffect16(() => {
|
|
7605
7763
|
setHighlightedIndex(0);
|
|
7606
7764
|
}, [query, open]);
|
|
7607
|
-
|
|
7765
|
+
useEffect16(() => {
|
|
7608
7766
|
if (open) {
|
|
7609
7767
|
setQuery("");
|
|
7610
7768
|
requestAnimationFrame(() => inputRef.current?.focus());
|
|
@@ -7641,8 +7799,8 @@ function Command({
|
|
|
7641
7799
|
return order.map((group) => ({ group, items: byGroup.get(group) ?? [] }));
|
|
7642
7800
|
}, [filtered]);
|
|
7643
7801
|
const highlightedId = filtered[highlightedIndex] ? `${listId}-${filtered[highlightedIndex].id}` : void 0;
|
|
7644
|
-
return /* @__PURE__ */
|
|
7645
|
-
/* @__PURE__ */
|
|
7802
|
+
return /* @__PURE__ */ jsx210(Dialog, { open, onClose, "aria-label": ariaLabel, size: "sm", children: /* @__PURE__ */ jsxs162("div", { className: styles81.root, children: [
|
|
7803
|
+
/* @__PURE__ */ jsx210(
|
|
7646
7804
|
"input",
|
|
7647
7805
|
{
|
|
7648
7806
|
ref: inputRef,
|
|
@@ -7652,35 +7810,35 @@ function Command({
|
|
|
7652
7810
|
"aria-controls": listId,
|
|
7653
7811
|
"aria-activedescendant": highlightedId,
|
|
7654
7812
|
"aria-autocomplete": "list",
|
|
7655
|
-
className:
|
|
7813
|
+
className: styles81.input,
|
|
7656
7814
|
placeholder,
|
|
7657
7815
|
value: query,
|
|
7658
7816
|
onChange: (e) => setQuery(e.target.value),
|
|
7659
7817
|
onKeyDown: handleKeyDown
|
|
7660
7818
|
}
|
|
7661
7819
|
),
|
|
7662
|
-
/* @__PURE__ */
|
|
7663
|
-
filtered.length === 0 && /* @__PURE__ */
|
|
7664
|
-
groups.map(({ group, items: groupItems }) => /* @__PURE__ */
|
|
7665
|
-
group && /* @__PURE__ */
|
|
7666
|
-
/* @__PURE__ */
|
|
7820
|
+
/* @__PURE__ */ jsxs162("ul", { id: listId, role: "listbox", className: styles81.list, children: [
|
|
7821
|
+
filtered.length === 0 && /* @__PURE__ */ jsx210("li", { className: styles81.empty, children: "No matching commands." }),
|
|
7822
|
+
groups.map(({ group, items: groupItems }) => /* @__PURE__ */ jsxs162("li", { children: [
|
|
7823
|
+
group && /* @__PURE__ */ jsx210("div", { className: styles81.groupLabel, children: group }),
|
|
7824
|
+
/* @__PURE__ */ jsx210("ul", { className: styles81.groupList, children: groupItems.map((item) => {
|
|
7667
7825
|
const index = filtered.indexOf(item);
|
|
7668
7826
|
const isHighlighted = index === highlightedIndex;
|
|
7669
|
-
return /* @__PURE__ */
|
|
7827
|
+
return /* @__PURE__ */ jsx210("li", { children: /* @__PURE__ */ jsxs162(
|
|
7670
7828
|
"button",
|
|
7671
7829
|
{
|
|
7672
7830
|
id: `${listId}-${item.id}`,
|
|
7673
7831
|
type: "button",
|
|
7674
7832
|
role: "option",
|
|
7675
7833
|
"aria-selected": isHighlighted,
|
|
7676
|
-
className: [
|
|
7834
|
+
className: [styles81.item, isHighlighted ? styles81.itemHighlighted : ""].filter(Boolean).join(" "),
|
|
7677
7835
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
7678
7836
|
onClick: () => {
|
|
7679
7837
|
onClose();
|
|
7680
7838
|
item.onSelect();
|
|
7681
7839
|
},
|
|
7682
7840
|
children: [
|
|
7683
|
-
item.icon && /* @__PURE__ */
|
|
7841
|
+
item.icon && /* @__PURE__ */ jsx210(Icon, { name: item.icon, size: "sm", "aria-hidden": true }),
|
|
7684
7842
|
item.label
|
|
7685
7843
|
]
|
|
7686
7844
|
}
|
|
@@ -7692,11 +7850,11 @@ function Command({
|
|
|
7692
7850
|
}
|
|
7693
7851
|
|
|
7694
7852
|
// src/components/Resizable/Resizable.tsx
|
|
7695
|
-
import { Children, isValidElement, useEffect as
|
|
7696
|
-
import
|
|
7697
|
-
import { jsx as
|
|
7853
|
+
import { Children, isValidElement, useEffect as useEffect17, useRef as useRef24, useState as useState25 } from "react";
|
|
7854
|
+
import styles82 from "./Resizable.module.css";
|
|
7855
|
+
import { jsx as jsx211 } from "react/jsx-runtime";
|
|
7698
7856
|
function ResizablePanel({ children, className, style }) {
|
|
7699
|
-
return /* @__PURE__ */
|
|
7857
|
+
return /* @__PURE__ */ jsx211("div", { className: [styles82.panel, className].filter(Boolean).join(" "), style, children });
|
|
7700
7858
|
}
|
|
7701
7859
|
function ResizableHandle({
|
|
7702
7860
|
"aria-label": ariaLabel = "Resize panels",
|
|
@@ -7709,10 +7867,10 @@ function ResizableHandle({
|
|
|
7709
7867
|
}) {
|
|
7710
7868
|
return (
|
|
7711
7869
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/no-noninteractive-tabindex -- WAI-ARIA "window splitter" pattern: a focusable, keyboard-operable separator is the documented exception to role="separator" being non-interactive (https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/). */
|
|
7712
|
-
/* @__PURE__ */
|
|
7870
|
+
/* @__PURE__ */ jsx211(
|
|
7713
7871
|
"div",
|
|
7714
7872
|
{
|
|
7715
|
-
className: [
|
|
7873
|
+
className: [styles82.handle, direction === "vertical" ? styles82.handleVertical : ""].filter(Boolean).join(" "),
|
|
7716
7874
|
role: "separator",
|
|
7717
7875
|
tabIndex: 0,
|
|
7718
7876
|
"aria-orientation": direction === "horizontal" ? "vertical" : "horizontal",
|
|
@@ -7738,7 +7896,7 @@ function ResizablePanelGroup({ direction, children, className }) {
|
|
|
7738
7896
|
maxSize: props.maxSize ?? 90
|
|
7739
7897
|
};
|
|
7740
7898
|
});
|
|
7741
|
-
const [sizes, setSizes] =
|
|
7899
|
+
const [sizes, setSizes] = useState25(() => constraints.map((c) => c.defaultSize));
|
|
7742
7900
|
if (sizes.length !== constraints.length) {
|
|
7743
7901
|
setSizes(constraints.map((c) => c.defaultSize));
|
|
7744
7902
|
}
|
|
@@ -7764,7 +7922,7 @@ function ResizablePanelGroup({ direction, children, className }) {
|
|
|
7764
7922
|
return next;
|
|
7765
7923
|
});
|
|
7766
7924
|
}
|
|
7767
|
-
|
|
7925
|
+
useEffect17(() => {
|
|
7768
7926
|
function handlePointerMove(event) {
|
|
7769
7927
|
const drag = dragState.current;
|
|
7770
7928
|
const rect = containerRef.current?.getBoundingClientRect();
|
|
@@ -7823,16 +7981,16 @@ function ResizablePanelGroup({ direction, children, className }) {
|
|
|
7823
7981
|
}
|
|
7824
7982
|
let panelIndex = -1;
|
|
7825
7983
|
let handleIndex = -1;
|
|
7826
|
-
return /* @__PURE__ */
|
|
7984
|
+
return /* @__PURE__ */ jsx211(
|
|
7827
7985
|
"div",
|
|
7828
7986
|
{
|
|
7829
7987
|
ref: containerRef,
|
|
7830
|
-
className: [
|
|
7988
|
+
className: [styles82.group, direction === "vertical" ? styles82.groupVertical : "", className].filter(Boolean).join(" "),
|
|
7831
7989
|
children: elements.map((element, key) => {
|
|
7832
7990
|
if (element.type === ResizablePanel) {
|
|
7833
7991
|
panelIndex += 1;
|
|
7834
7992
|
const size = sizes[panelIndex] ?? constraints[panelIndex]?.defaultSize ?? 0;
|
|
7835
|
-
return /* @__PURE__ */
|
|
7993
|
+
return /* @__PURE__ */ jsx211(
|
|
7836
7994
|
ResizablePanelClone,
|
|
7837
7995
|
{
|
|
7838
7996
|
element,
|
|
@@ -7845,7 +8003,7 @@ function ResizablePanelGroup({ direction, children, className }) {
|
|
|
7845
8003
|
handleIndex += 1;
|
|
7846
8004
|
const index = handleIndex;
|
|
7847
8005
|
const constraint = constraints[index];
|
|
7848
|
-
return /* @__PURE__ */
|
|
8006
|
+
return /* @__PURE__ */ jsx211(
|
|
7849
8007
|
ResizableHandleClone,
|
|
7850
8008
|
{
|
|
7851
8009
|
element,
|
|
@@ -7874,19 +8032,19 @@ function ResizablePanelClone({
|
|
|
7874
8032
|
flexGrow: 0,
|
|
7875
8033
|
flexShrink: 0
|
|
7876
8034
|
};
|
|
7877
|
-
return /* @__PURE__ */
|
|
8035
|
+
return /* @__PURE__ */ jsx211(ResizablePanel, { ...element.props, style });
|
|
7878
8036
|
}
|
|
7879
8037
|
function ResizableHandleClone({
|
|
7880
8038
|
element,
|
|
7881
8039
|
...injected
|
|
7882
8040
|
}) {
|
|
7883
|
-
return /* @__PURE__ */
|
|
8041
|
+
return /* @__PURE__ */ jsx211(ResizableHandle, { ...element.props, ...injected });
|
|
7884
8042
|
}
|
|
7885
8043
|
|
|
7886
8044
|
// src/components/DataTable/DataTable.tsx
|
|
7887
|
-
import { useMemo as useMemo4, useState as
|
|
7888
|
-
import
|
|
7889
|
-
import { jsx as
|
|
8045
|
+
import { useMemo as useMemo4, useState as useState26 } from "react";
|
|
8046
|
+
import styles83 from "./DataTable.module.css";
|
|
8047
|
+
import { jsx as jsx212, jsxs as jsxs163 } from "react/jsx-runtime";
|
|
7890
8048
|
function compareValues(a, b) {
|
|
7891
8049
|
if (typeof a === "number" && typeof b === "number") return a - b;
|
|
7892
8050
|
return String(a).localeCompare(String(b));
|
|
@@ -7900,8 +8058,8 @@ function DataTable({
|
|
|
7900
8058
|
emptyMessage = "No results.",
|
|
7901
8059
|
className
|
|
7902
8060
|
}) {
|
|
7903
|
-
const [sortKey, setSortKey] =
|
|
7904
|
-
const [sortDirection, setSortDirection] =
|
|
8061
|
+
const [sortKey, setSortKey] = useState26(defaultSortKey);
|
|
8062
|
+
const [sortDirection, setSortDirection] = useState26(defaultSortDirection);
|
|
7905
8063
|
const sortColumn = columns.find((c) => c.key === sortKey);
|
|
7906
8064
|
const sortedData = useMemo4(() => {
|
|
7907
8065
|
if (!sortColumn) return data;
|
|
@@ -7922,26 +8080,26 @@ function DataTable({
|
|
|
7922
8080
|
}
|
|
7923
8081
|
}
|
|
7924
8082
|
if (data.length === 0) {
|
|
7925
|
-
return /* @__PURE__ */
|
|
8083
|
+
return /* @__PURE__ */ jsx212(EmptyState, { heading: emptyMessage });
|
|
7926
8084
|
}
|
|
7927
|
-
return /* @__PURE__ */
|
|
7928
|
-
/* @__PURE__ */
|
|
8085
|
+
return /* @__PURE__ */ jsxs163(Table, { className, children: [
|
|
8086
|
+
/* @__PURE__ */ jsx212(TableHead, { children: /* @__PURE__ */ jsx212(TableRow, { children: columns.map((column) => {
|
|
7929
8087
|
const isSorted = sortKey === column.key;
|
|
7930
8088
|
const ariaSort = !column.sortable ? void 0 : isSorted ? sortDirection === "asc" ? "ascending" : "descending" : "none";
|
|
7931
|
-
return /* @__PURE__ */
|
|
8089
|
+
return /* @__PURE__ */ jsx212(
|
|
7932
8090
|
TableHeaderCell,
|
|
7933
8091
|
{
|
|
7934
8092
|
"aria-sort": ariaSort,
|
|
7935
8093
|
style: column.align === "end" ? { textAlign: "end" } : void 0,
|
|
7936
|
-
children: column.sortable ? /* @__PURE__ */
|
|
8094
|
+
children: column.sortable ? /* @__PURE__ */ jsxs163(
|
|
7937
8095
|
"button",
|
|
7938
8096
|
{
|
|
7939
8097
|
type: "button",
|
|
7940
|
-
className:
|
|
8098
|
+
className: styles83.sortButton,
|
|
7941
8099
|
onClick: () => handleSort(column),
|
|
7942
8100
|
children: [
|
|
7943
8101
|
column.header,
|
|
7944
|
-
/* @__PURE__ */
|
|
8102
|
+
/* @__PURE__ */ jsx212("span", { className: styles83.sortIcon, children: isSorted && /* @__PURE__ */ jsx212(
|
|
7945
8103
|
Icon,
|
|
7946
8104
|
{
|
|
7947
8105
|
name: sortDirection === "asc" ? "chevron-up" : "chevron-down",
|
|
@@ -7956,7 +8114,7 @@ function DataTable({
|
|
|
7956
8114
|
column.key
|
|
7957
8115
|
);
|
|
7958
8116
|
}) }) }),
|
|
7959
|
-
/* @__PURE__ */
|
|
8117
|
+
/* @__PURE__ */ jsx212(TableBody, { children: sortedData.map((row) => /* @__PURE__ */ jsx212(TableRow, { children: columns.map((column) => /* @__PURE__ */ jsx212(
|
|
7960
8118
|
TableCell,
|
|
7961
8119
|
{
|
|
7962
8120
|
style: column.align === "end" ? { textAlign: "end" } : void 0,
|
|
@@ -7968,9 +8126,9 @@ function DataTable({
|
|
|
7968
8126
|
}
|
|
7969
8127
|
|
|
7970
8128
|
// src/components/Combobox/Combobox.tsx
|
|
7971
|
-
import { useEffect as
|
|
7972
|
-
import
|
|
7973
|
-
import { Fragment as Fragment17, jsx as
|
|
8129
|
+
import { useEffect as useEffect18, useId as useId10, useMemo as useMemo5, useRef as useRef25, useState as useState27 } from "react";
|
|
8130
|
+
import styles84 from "./Combobox.module.css";
|
|
8131
|
+
import { Fragment as Fragment17, jsx as jsx213, jsxs as jsxs164 } from "react/jsx-runtime";
|
|
7974
8132
|
function matches2(option, query) {
|
|
7975
8133
|
if (!query) return true;
|
|
7976
8134
|
return option.label.toLowerCase().includes(query.toLowerCase());
|
|
@@ -7986,9 +8144,9 @@ function Combobox({
|
|
|
7986
8144
|
disabled = false,
|
|
7987
8145
|
className
|
|
7988
8146
|
}) {
|
|
7989
|
-
const [open, setOpen] =
|
|
7990
|
-
const [query, setQuery] =
|
|
7991
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
8147
|
+
const [open, setOpen] = useState27(false);
|
|
8148
|
+
const [query, setQuery] = useState27("");
|
|
8149
|
+
const [highlightedIndex, setHighlightedIndex] = useState27(0);
|
|
7992
8150
|
const isMobile = useIsMobile();
|
|
7993
8151
|
const inputRef = useRef25(null);
|
|
7994
8152
|
const listId = useId10();
|
|
@@ -7997,10 +8155,10 @@ function Combobox({
|
|
|
7997
8155
|
() => options.filter((option) => matches2(option, query)),
|
|
7998
8156
|
[options, query]
|
|
7999
8157
|
);
|
|
8000
|
-
|
|
8158
|
+
useEffect18(() => {
|
|
8001
8159
|
setHighlightedIndex(0);
|
|
8002
8160
|
}, [query, open]);
|
|
8003
|
-
|
|
8161
|
+
useEffect18(() => {
|
|
8004
8162
|
if (open) {
|
|
8005
8163
|
setQuery("");
|
|
8006
8164
|
requestAnimationFrame(() => inputRef.current?.focus());
|
|
@@ -8024,24 +8182,24 @@ function Combobox({
|
|
|
8024
8182
|
}
|
|
8025
8183
|
}
|
|
8026
8184
|
const highlightedId = filtered[highlightedIndex] ? `${listId}-${filtered[highlightedIndex].value}` : void 0;
|
|
8027
|
-
const trigger = /* @__PURE__ */
|
|
8185
|
+
const trigger = /* @__PURE__ */ jsxs164(
|
|
8028
8186
|
"button",
|
|
8029
8187
|
{
|
|
8030
8188
|
type: "button",
|
|
8031
|
-
className: [
|
|
8189
|
+
className: [styles84.trigger, className].filter(Boolean).join(" "),
|
|
8032
8190
|
disabled,
|
|
8033
8191
|
"aria-label": ariaLabel,
|
|
8034
8192
|
"aria-haspopup": "listbox",
|
|
8035
8193
|
"aria-expanded": open,
|
|
8036
8194
|
onClick: () => setOpen((o) => !o),
|
|
8037
8195
|
children: [
|
|
8038
|
-
/* @__PURE__ */
|
|
8039
|
-
/* @__PURE__ */
|
|
8196
|
+
/* @__PURE__ */ jsx213("span", { className: selected ? styles84.triggerValue : styles84.triggerPlaceholder, children: selected ? selected.label : placeholder }),
|
|
8197
|
+
/* @__PURE__ */ jsx213(Icon, { name: "chevron-down", size: "sm", "aria-hidden": true })
|
|
8040
8198
|
]
|
|
8041
8199
|
}
|
|
8042
8200
|
);
|
|
8043
|
-
const body = /* @__PURE__ */
|
|
8044
|
-
/* @__PURE__ */
|
|
8201
|
+
const body = /* @__PURE__ */ jsxs164("div", { className: styles84.body, children: [
|
|
8202
|
+
/* @__PURE__ */ jsx213(
|
|
8045
8203
|
"input",
|
|
8046
8204
|
{
|
|
8047
8205
|
ref: inputRef,
|
|
@@ -8051,30 +8209,30 @@ function Combobox({
|
|
|
8051
8209
|
"aria-controls": listId,
|
|
8052
8210
|
"aria-activedescendant": highlightedId,
|
|
8053
8211
|
"aria-autocomplete": "list",
|
|
8054
|
-
className:
|
|
8212
|
+
className: styles84.search,
|
|
8055
8213
|
placeholder: searchPlaceholder,
|
|
8056
8214
|
value: query,
|
|
8057
8215
|
onChange: (e) => setQuery(e.target.value),
|
|
8058
8216
|
onKeyDown: handleKeyDown
|
|
8059
8217
|
}
|
|
8060
8218
|
),
|
|
8061
|
-
/* @__PURE__ */
|
|
8062
|
-
filtered.length === 0 && /* @__PURE__ */
|
|
8219
|
+
/* @__PURE__ */ jsxs164("ul", { id: listId, role: "listbox", className: styles84.list, children: [
|
|
8220
|
+
filtered.length === 0 && /* @__PURE__ */ jsx213("li", { className: styles84.empty, children: emptyMessage }),
|
|
8063
8221
|
filtered.map((option, index) => {
|
|
8064
8222
|
const isHighlighted = index === highlightedIndex;
|
|
8065
8223
|
const isSelected = option.value === value;
|
|
8066
|
-
return /* @__PURE__ */
|
|
8224
|
+
return /* @__PURE__ */ jsx213("li", { children: /* @__PURE__ */ jsxs164(
|
|
8067
8225
|
"button",
|
|
8068
8226
|
{
|
|
8069
8227
|
id: `${listId}-${option.value}`,
|
|
8070
8228
|
type: "button",
|
|
8071
8229
|
role: "option",
|
|
8072
8230
|
"aria-selected": isSelected,
|
|
8073
|
-
className: [
|
|
8231
|
+
className: [styles84.option, isHighlighted ? styles84.optionHighlighted : ""].filter(Boolean).join(" "),
|
|
8074
8232
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
8075
8233
|
onClick: () => commit(option),
|
|
8076
8234
|
children: [
|
|
8077
|
-
/* @__PURE__ */
|
|
8235
|
+
/* @__PURE__ */ jsx213("span", { className: styles84.check, children: isSelected && /* @__PURE__ */ jsx213(Icon, { name: "check", size: "sm", "aria-hidden": true }) }),
|
|
8078
8236
|
option.label
|
|
8079
8237
|
]
|
|
8080
8238
|
}
|
|
@@ -8083,12 +8241,12 @@ function Combobox({
|
|
|
8083
8241
|
] })
|
|
8084
8242
|
] });
|
|
8085
8243
|
if (isMobile) {
|
|
8086
|
-
return /* @__PURE__ */
|
|
8244
|
+
return /* @__PURE__ */ jsxs164(Fragment17, { children: [
|
|
8087
8245
|
trigger,
|
|
8088
|
-
/* @__PURE__ */
|
|
8246
|
+
/* @__PURE__ */ jsx213(Drawer, { open, onClose: () => setOpen(false), "aria-label": ariaLabel, children: body })
|
|
8089
8247
|
] });
|
|
8090
8248
|
}
|
|
8091
|
-
return /* @__PURE__ */
|
|
8249
|
+
return /* @__PURE__ */ jsx213(
|
|
8092
8250
|
Popover,
|
|
8093
8251
|
{
|
|
8094
8252
|
trigger,
|
|
@@ -8102,9 +8260,9 @@ function Combobox({
|
|
|
8102
8260
|
}
|
|
8103
8261
|
|
|
8104
8262
|
// src/components/GripIcon/GripIcon.tsx
|
|
8105
|
-
import { jsx as
|
|
8263
|
+
import { jsx as jsx214 } from "react/jsx-runtime";
|
|
8106
8264
|
function GripIcon({ size = 14, className }) {
|
|
8107
|
-
return /* @__PURE__ */
|
|
8265
|
+
return /* @__PURE__ */ jsx214(
|
|
8108
8266
|
"svg",
|
|
8109
8267
|
{
|
|
8110
8268
|
width: size,
|
|
@@ -8114,15 +8272,15 @@ function GripIcon({ size = 14, className }) {
|
|
|
8114
8272
|
"aria-hidden": "true",
|
|
8115
8273
|
className,
|
|
8116
8274
|
children: [3, 7, 11].map(
|
|
8117
|
-
(cy) => [4, 10].map((cx) => /* @__PURE__ */
|
|
8275
|
+
(cy) => [4, 10].map((cx) => /* @__PURE__ */ jsx214("circle", { cx, cy, r: 1.2, fill: "currentColor" }, `${cx}-${cy}`))
|
|
8118
8276
|
)
|
|
8119
8277
|
}
|
|
8120
8278
|
);
|
|
8121
8279
|
}
|
|
8122
8280
|
|
|
8123
8281
|
// src/components/DragHandleRow/DragHandleRow.tsx
|
|
8124
|
-
import
|
|
8125
|
-
import { jsx as
|
|
8282
|
+
import styles85 from "./DragHandleRow.module.css";
|
|
8283
|
+
import { jsx as jsx215, jsxs as jsxs165 } from "react/jsx-runtime";
|
|
8126
8284
|
function DragHandleRow({
|
|
8127
8285
|
children,
|
|
8128
8286
|
handleProps,
|
|
@@ -8130,32 +8288,32 @@ function DragHandleRow({
|
|
|
8130
8288
|
className,
|
|
8131
8289
|
...rest
|
|
8132
8290
|
}) {
|
|
8133
|
-
return /* @__PURE__ */
|
|
8291
|
+
return /* @__PURE__ */ jsxs165(
|
|
8134
8292
|
"div",
|
|
8135
8293
|
{
|
|
8136
8294
|
...rest,
|
|
8137
|
-
className: [
|
|
8295
|
+
className: [styles85.row, isDragging ? styles85.dragging : "", className].filter(Boolean).join(" "),
|
|
8138
8296
|
children: [
|
|
8139
|
-
/* @__PURE__ */
|
|
8297
|
+
/* @__PURE__ */ jsx215(
|
|
8140
8298
|
"button",
|
|
8141
8299
|
{
|
|
8142
8300
|
type: "button",
|
|
8143
8301
|
"aria-label": "Drag to reorder",
|
|
8144
|
-
className:
|
|
8302
|
+
className: styles85.handle,
|
|
8145
8303
|
tabIndex: -1,
|
|
8146
8304
|
...handleProps,
|
|
8147
|
-
children: /* @__PURE__ */
|
|
8305
|
+
children: /* @__PURE__ */ jsx215(GripIcon, { className: styles85.icon })
|
|
8148
8306
|
}
|
|
8149
8307
|
),
|
|
8150
|
-
/* @__PURE__ */
|
|
8308
|
+
/* @__PURE__ */ jsx215("div", { className: styles85.content, children })
|
|
8151
8309
|
]
|
|
8152
8310
|
}
|
|
8153
8311
|
);
|
|
8154
8312
|
}
|
|
8155
8313
|
|
|
8156
8314
|
// src/components/StepStrip/StepStrip.tsx
|
|
8157
|
-
import
|
|
8158
|
-
import { jsx as
|
|
8315
|
+
import styles86 from "./StepStrip.module.css";
|
|
8316
|
+
import { jsx as jsx216, jsxs as jsxs166 } from "react/jsx-runtime";
|
|
8159
8317
|
function StepStrip({
|
|
8160
8318
|
items,
|
|
8161
8319
|
activeId,
|
|
@@ -8165,28 +8323,28 @@ function StepStrip({
|
|
|
8165
8323
|
className,
|
|
8166
8324
|
"aria-label": ariaLabel
|
|
8167
8325
|
}) {
|
|
8168
|
-
return /* @__PURE__ */
|
|
8326
|
+
return /* @__PURE__ */ jsxs166(
|
|
8169
8327
|
"div",
|
|
8170
8328
|
{
|
|
8171
|
-
className: [
|
|
8329
|
+
className: [styles86.strip, className].filter(Boolean).join(" "),
|
|
8172
8330
|
role: "list",
|
|
8173
8331
|
"aria-label": ariaLabel,
|
|
8174
8332
|
children: [
|
|
8175
|
-
items.map((item, index) => /* @__PURE__ */
|
|
8333
|
+
items.map((item, index) => /* @__PURE__ */ jsxs166("div", { className: styles86.step, role: "listitem", children: [
|
|
8176
8334
|
renderItem(item, { isActive: item.id === activeId, index }),
|
|
8177
|
-
(index < items.length - 1 || onAdd) && /* @__PURE__ */
|
|
8335
|
+
(index < items.length - 1 || onAdd) && /* @__PURE__ */ jsx216(
|
|
8178
8336
|
"div",
|
|
8179
8337
|
{
|
|
8180
8338
|
className: [
|
|
8181
|
-
|
|
8182
|
-
index === items.length - 1 ?
|
|
8339
|
+
styles86.connector,
|
|
8340
|
+
index === items.length - 1 ? styles86.connectorDashed : ""
|
|
8183
8341
|
].filter(Boolean).join(" "),
|
|
8184
8342
|
"aria-hidden": "true"
|
|
8185
8343
|
}
|
|
8186
8344
|
)
|
|
8187
8345
|
] }, item.id)),
|
|
8188
|
-
onAdd && /* @__PURE__ */
|
|
8189
|
-
/* @__PURE__ */
|
|
8346
|
+
onAdd && /* @__PURE__ */ jsxs166("button", { type: "button", className: styles86.addChip, onClick: onAdd, children: [
|
|
8347
|
+
/* @__PURE__ */ jsx216(Icon, { name: "plus", size: "sm", "aria-hidden": true }),
|
|
8190
8348
|
addLabel
|
|
8191
8349
|
] })
|
|
8192
8350
|
]
|
|
@@ -8195,9 +8353,9 @@ function StepStrip({
|
|
|
8195
8353
|
}
|
|
8196
8354
|
|
|
8197
8355
|
// src/components/FileDropzone/FileDropzone.tsx
|
|
8198
|
-
import { useRef as useRef26, useState as
|
|
8199
|
-
import
|
|
8200
|
-
import { jsx as
|
|
8356
|
+
import { useRef as useRef26, useState as useState28 } from "react";
|
|
8357
|
+
import styles87 from "./FileDropzone.module.css";
|
|
8358
|
+
import { jsx as jsx217, jsxs as jsxs167 } from "react/jsx-runtime";
|
|
8201
8359
|
function FileDropzone({
|
|
8202
8360
|
name,
|
|
8203
8361
|
accept,
|
|
@@ -8209,15 +8367,15 @@ function FileDropzone({
|
|
|
8209
8367
|
disabled,
|
|
8210
8368
|
className
|
|
8211
8369
|
}) {
|
|
8212
|
-
const [dragging, setDragging] =
|
|
8370
|
+
const [dragging, setDragging] = useState28(false);
|
|
8213
8371
|
const inputRef = useRef26(null);
|
|
8214
|
-
return /* @__PURE__ */
|
|
8372
|
+
return /* @__PURE__ */ jsxs167(
|
|
8215
8373
|
"label",
|
|
8216
8374
|
{
|
|
8217
8375
|
className: [
|
|
8218
|
-
|
|
8219
|
-
dragging ?
|
|
8220
|
-
disabled ?
|
|
8376
|
+
styles87.dropzone,
|
|
8377
|
+
dragging ? styles87.dropzoneActive : "",
|
|
8378
|
+
disabled ? styles87.dropzoneDisabled : "",
|
|
8221
8379
|
className
|
|
8222
8380
|
].filter(Boolean).join(" "),
|
|
8223
8381
|
onDragOver: (event) => {
|
|
@@ -8240,12 +8398,12 @@ function FileDropzone({
|
|
|
8240
8398
|
onFileSelect(dropped);
|
|
8241
8399
|
},
|
|
8242
8400
|
children: [
|
|
8243
|
-
/* @__PURE__ */
|
|
8244
|
-
/* @__PURE__ */
|
|
8245
|
-
/* @__PURE__ */
|
|
8246
|
-
hint && /* @__PURE__ */
|
|
8401
|
+
/* @__PURE__ */ jsx217("span", { className: styles87.icon, "aria-hidden": "true", children: icon ?? /* @__PURE__ */ jsx217(Icon, { name: "file", size: "lg", "aria-hidden": true }) }),
|
|
8402
|
+
/* @__PURE__ */ jsxs167("span", { className: styles87.text, children: [
|
|
8403
|
+
/* @__PURE__ */ jsx217("span", { className: styles87.title, children: label }),
|
|
8404
|
+
hint && /* @__PURE__ */ jsx217("span", { className: styles87.hint, children: hint })
|
|
8247
8405
|
] }),
|
|
8248
|
-
/* @__PURE__ */
|
|
8406
|
+
/* @__PURE__ */ jsx217(
|
|
8249
8407
|
"input",
|
|
8250
8408
|
{
|
|
8251
8409
|
ref: inputRef,
|
|
@@ -8255,7 +8413,7 @@ function FileDropzone({
|
|
|
8255
8413
|
accept,
|
|
8256
8414
|
disabled,
|
|
8257
8415
|
onChange: (event) => onFileSelect(event.target.files?.[0] ?? null),
|
|
8258
|
-
className:
|
|
8416
|
+
className: styles87.hiddenInput
|
|
8259
8417
|
}
|
|
8260
8418
|
)
|
|
8261
8419
|
]
|
|
@@ -8264,7 +8422,7 @@ function FileDropzone({
|
|
|
8264
8422
|
}
|
|
8265
8423
|
|
|
8266
8424
|
// src/components/Calendar/Calendar.tsx
|
|
8267
|
-
import { useRef as useRef27, useState as
|
|
8425
|
+
import { useRef as useRef27, useState as useState29 } from "react";
|
|
8268
8426
|
|
|
8269
8427
|
// src/components/Calendar/dateUtils.ts
|
|
8270
8428
|
function startOfMonth(date) {
|
|
@@ -8330,8 +8488,8 @@ function formatDateLabel(date) {
|
|
|
8330
8488
|
}
|
|
8331
8489
|
|
|
8332
8490
|
// src/components/Calendar/Calendar.tsx
|
|
8333
|
-
import
|
|
8334
|
-
import { jsx as
|
|
8491
|
+
import styles88 from "./Calendar.module.css";
|
|
8492
|
+
import { jsx as jsx218, jsxs as jsxs168 } from "react/jsx-runtime";
|
|
8335
8493
|
var WEEKDAY_LABEL_WEEK = getMonthGrid(new Date(2026, 0, 1))[0] ?? [];
|
|
8336
8494
|
function Calendar({
|
|
8337
8495
|
value,
|
|
@@ -8340,8 +8498,8 @@ function Calendar({
|
|
|
8340
8498
|
maxDate,
|
|
8341
8499
|
"aria-label": ariaLabel
|
|
8342
8500
|
}) {
|
|
8343
|
-
const [displayedMonth, setDisplayedMonth] =
|
|
8344
|
-
const [focusedDate, setFocusedDate] =
|
|
8501
|
+
const [displayedMonth, setDisplayedMonth] = useState29(() => startOfMonth(value ?? /* @__PURE__ */ new Date()));
|
|
8502
|
+
const [focusedDate, setFocusedDate] = useState29(() => value ?? /* @__PURE__ */ new Date());
|
|
8345
8503
|
const gridRef = useRef27(null);
|
|
8346
8504
|
const weeks = getMonthGrid(displayedMonth);
|
|
8347
8505
|
function goToMonth(next) {
|
|
@@ -8401,51 +8559,51 @@ function Calendar({
|
|
|
8401
8559
|
default:
|
|
8402
8560
|
}
|
|
8403
8561
|
}
|
|
8404
|
-
return /* @__PURE__ */
|
|
8405
|
-
/* @__PURE__ */
|
|
8406
|
-
/* @__PURE__ */
|
|
8562
|
+
return /* @__PURE__ */ jsxs168("div", { className: styles88.calendar, "aria-label": ariaLabel, children: [
|
|
8563
|
+
/* @__PURE__ */ jsxs168("div", { className: styles88.header, children: [
|
|
8564
|
+
/* @__PURE__ */ jsx218(
|
|
8407
8565
|
"button",
|
|
8408
8566
|
{
|
|
8409
8567
|
type: "button",
|
|
8410
|
-
className:
|
|
8568
|
+
className: styles88.navButton,
|
|
8411
8569
|
"aria-label": "Previous month",
|
|
8412
8570
|
onClick: () => goToMonth(addMonths(displayedMonth, -1)),
|
|
8413
|
-
children: /* @__PURE__ */
|
|
8571
|
+
children: /* @__PURE__ */ jsx218(Icon, { name: "chevron-left", size: "sm", "aria-hidden": true })
|
|
8414
8572
|
}
|
|
8415
8573
|
),
|
|
8416
|
-
/* @__PURE__ */
|
|
8417
|
-
/* @__PURE__ */
|
|
8574
|
+
/* @__PURE__ */ jsx218("span", { className: styles88.monthLabel, children: formatMonthYear(displayedMonth) }),
|
|
8575
|
+
/* @__PURE__ */ jsx218(
|
|
8418
8576
|
"button",
|
|
8419
8577
|
{
|
|
8420
8578
|
type: "button",
|
|
8421
|
-
className:
|
|
8579
|
+
className: styles88.navButton,
|
|
8422
8580
|
"aria-label": "Next month",
|
|
8423
8581
|
onClick: () => goToMonth(addMonths(displayedMonth, 1)),
|
|
8424
|
-
children: /* @__PURE__ */
|
|
8582
|
+
children: /* @__PURE__ */ jsx218(Icon, { name: "chevron-right", size: "sm", "aria-hidden": true })
|
|
8425
8583
|
}
|
|
8426
8584
|
)
|
|
8427
8585
|
] }),
|
|
8428
|
-
/* @__PURE__ */
|
|
8586
|
+
/* @__PURE__ */ jsxs168(
|
|
8429
8587
|
"div",
|
|
8430
8588
|
{
|
|
8431
8589
|
ref: gridRef,
|
|
8432
8590
|
role: "grid",
|
|
8433
8591
|
"aria-label": formatMonthYear(displayedMonth),
|
|
8434
|
-
className:
|
|
8592
|
+
className: styles88.grid,
|
|
8435
8593
|
onKeyDown: handleKeyDown,
|
|
8436
8594
|
tabIndex: -1,
|
|
8437
8595
|
children: [
|
|
8438
|
-
/* @__PURE__ */
|
|
8596
|
+
/* @__PURE__ */ jsx218("div", { role: "row", className: styles88.weekdayRow, children: WEEKDAY_LABEL_WEEK.map((d) => /* @__PURE__ */ jsx218("span", { role: "columnheader", className: styles88.weekday, "aria-hidden": true, children: formatWeekdayShort(d) }, d.getDay())) }),
|
|
8439
8597
|
weeks.map((week) => {
|
|
8440
8598
|
const firstDayOfWeek = week[0];
|
|
8441
8599
|
if (!firstDayOfWeek) return null;
|
|
8442
|
-
return /* @__PURE__ */
|
|
8600
|
+
return /* @__PURE__ */ jsx218("div", { role: "row", className: styles88.week, children: week.map((date) => {
|
|
8443
8601
|
const isCurrentMonth = isSameMonth(date, displayedMonth);
|
|
8444
8602
|
const isSelected = value !== null && isSameDay(date, value);
|
|
8445
8603
|
const isToday = isSameDay(date, /* @__PURE__ */ new Date());
|
|
8446
8604
|
const isFocusTarget = isSameDay(date, focusedDate);
|
|
8447
8605
|
const disabled = !isWithinRange(date, minDate, maxDate);
|
|
8448
|
-
return /* @__PURE__ */
|
|
8606
|
+
return /* @__PURE__ */ jsx218("div", { role: "gridcell", "aria-selected": isSelected, children: /* @__PURE__ */ jsx218(
|
|
8449
8607
|
"button",
|
|
8450
8608
|
{
|
|
8451
8609
|
type: "button",
|
|
@@ -8454,10 +8612,10 @@ function Calendar({
|
|
|
8454
8612
|
"aria-current": isToday ? "date" : void 0,
|
|
8455
8613
|
"aria-label": formatDateLabel(date),
|
|
8456
8614
|
className: [
|
|
8457
|
-
|
|
8458
|
-
!isCurrentMonth ?
|
|
8459
|
-
isSelected ?
|
|
8460
|
-
isToday && !isSelected ?
|
|
8615
|
+
styles88.day,
|
|
8616
|
+
!isCurrentMonth ? styles88.dayOutside : "",
|
|
8617
|
+
isSelected ? styles88.daySelected : "",
|
|
8618
|
+
isToday && !isSelected ? styles88.dayToday : ""
|
|
8461
8619
|
].filter(Boolean).join(" "),
|
|
8462
8620
|
onClick: () => selectDate(date),
|
|
8463
8621
|
onFocus: () => setFocusedDate(date),
|
|
@@ -8473,9 +8631,9 @@ function Calendar({
|
|
|
8473
8631
|
}
|
|
8474
8632
|
|
|
8475
8633
|
// src/components/DatePicker/DatePicker.tsx
|
|
8476
|
-
import { useState as
|
|
8477
|
-
import
|
|
8478
|
-
import { Fragment as Fragment18, jsx as
|
|
8634
|
+
import { useState as useState30 } from "react";
|
|
8635
|
+
import styles89 from "./DatePicker.module.css";
|
|
8636
|
+
import { Fragment as Fragment18, jsx as jsx219, jsxs as jsxs169 } from "react/jsx-runtime";
|
|
8479
8637
|
var POPOVER_WIDTH = 320;
|
|
8480
8638
|
function DatePicker({
|
|
8481
8639
|
value,
|
|
@@ -8486,29 +8644,29 @@ function DatePicker({
|
|
|
8486
8644
|
"aria-label": ariaLabel,
|
|
8487
8645
|
disabled = false
|
|
8488
8646
|
}) {
|
|
8489
|
-
const [open, setOpen] =
|
|
8647
|
+
const [open, setOpen] = useState30(false);
|
|
8490
8648
|
const isMobile = useIsMobile();
|
|
8491
8649
|
function handleSelect(date) {
|
|
8492
8650
|
onChange(date);
|
|
8493
8651
|
setOpen(false);
|
|
8494
8652
|
}
|
|
8495
|
-
const trigger = /* @__PURE__ */
|
|
8653
|
+
const trigger = /* @__PURE__ */ jsxs169(
|
|
8496
8654
|
"button",
|
|
8497
8655
|
{
|
|
8498
8656
|
type: "button",
|
|
8499
|
-
className:
|
|
8657
|
+
className: styles89.trigger,
|
|
8500
8658
|
disabled,
|
|
8501
8659
|
"aria-label": ariaLabel,
|
|
8502
8660
|
"aria-haspopup": "dialog",
|
|
8503
8661
|
"aria-expanded": open,
|
|
8504
8662
|
onClick: () => setOpen((o) => !o),
|
|
8505
8663
|
children: [
|
|
8506
|
-
/* @__PURE__ */
|
|
8507
|
-
/* @__PURE__ */
|
|
8664
|
+
/* @__PURE__ */ jsx219("span", { className: value ? styles89.triggerValue : styles89.triggerPlaceholder, children: value ? formatDateShort(value) : placeholder }),
|
|
8665
|
+
/* @__PURE__ */ jsx219(Icon, { name: "calendar", size: "sm", "aria-hidden": true })
|
|
8508
8666
|
]
|
|
8509
8667
|
}
|
|
8510
8668
|
);
|
|
8511
|
-
const calendar = /* @__PURE__ */
|
|
8669
|
+
const calendar = /* @__PURE__ */ jsx219(
|
|
8512
8670
|
Calendar,
|
|
8513
8671
|
{
|
|
8514
8672
|
value,
|
|
@@ -8519,12 +8677,12 @@ function DatePicker({
|
|
|
8519
8677
|
}
|
|
8520
8678
|
);
|
|
8521
8679
|
if (isMobile) {
|
|
8522
|
-
return /* @__PURE__ */
|
|
8680
|
+
return /* @__PURE__ */ jsxs169(Fragment18, { children: [
|
|
8523
8681
|
trigger,
|
|
8524
|
-
/* @__PURE__ */
|
|
8682
|
+
/* @__PURE__ */ jsx219(Drawer, { open, onClose: () => setOpen(false), "aria-label": ariaLabel, children: /* @__PURE__ */ jsx219("div", { className: styles89.drawerBody, children: calendar }) })
|
|
8525
8683
|
] });
|
|
8526
8684
|
}
|
|
8527
|
-
return /* @__PURE__ */
|
|
8685
|
+
return /* @__PURE__ */ jsx219(
|
|
8528
8686
|
Popover,
|
|
8529
8687
|
{
|
|
8530
8688
|
trigger,
|
|
@@ -8532,17 +8690,17 @@ function DatePicker({
|
|
|
8532
8690
|
onClose: () => setOpen(false),
|
|
8533
8691
|
"aria-label": ariaLabel,
|
|
8534
8692
|
width: POPOVER_WIDTH,
|
|
8535
|
-
children: /* @__PURE__ */
|
|
8693
|
+
children: /* @__PURE__ */ jsx219("div", { className: styles89.popoverBody, children: calendar })
|
|
8536
8694
|
}
|
|
8537
8695
|
);
|
|
8538
8696
|
}
|
|
8539
8697
|
|
|
8540
8698
|
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
8541
|
-
import { useState as
|
|
8699
|
+
import { useState as useState32 } from "react";
|
|
8542
8700
|
import pickerStyles from "./DatePicker.module.css";
|
|
8543
8701
|
|
|
8544
8702
|
// src/components/DateRangePicker/RangeCalendar.tsx
|
|
8545
|
-
import { useRef as useRef28, useState as
|
|
8703
|
+
import { useRef as useRef28, useState as useState31 } from "react";
|
|
8546
8704
|
import calendarStyles from "./Calendar.module.css";
|
|
8547
8705
|
|
|
8548
8706
|
// src/components/DateRangePicker/rangeUtils.ts
|
|
@@ -8571,8 +8729,8 @@ function rangeOf(first, second) {
|
|
|
8571
8729
|
}
|
|
8572
8730
|
|
|
8573
8731
|
// src/components/DateRangePicker/RangeCalendar.tsx
|
|
8574
|
-
import
|
|
8575
|
-
import { jsx as
|
|
8732
|
+
import styles90 from "./DateRangePicker.module.css";
|
|
8733
|
+
import { jsx as jsx220, jsxs as jsxs170 } from "react/jsx-runtime";
|
|
8576
8734
|
var WEEKDAY_LABEL_WEEK2 = getMonthGrid(new Date(2026, 0, 1))[0] ?? [];
|
|
8577
8735
|
function RangeCalendar({
|
|
8578
8736
|
value,
|
|
@@ -8581,12 +8739,12 @@ function RangeCalendar({
|
|
|
8581
8739
|
maxDate,
|
|
8582
8740
|
"aria-label": ariaLabel
|
|
8583
8741
|
}) {
|
|
8584
|
-
const [displayedMonth, setDisplayedMonth] =
|
|
8742
|
+
const [displayedMonth, setDisplayedMonth] = useState31(
|
|
8585
8743
|
() => startOfMonth(value?.start ?? /* @__PURE__ */ new Date())
|
|
8586
8744
|
);
|
|
8587
|
-
const [focusedDate, setFocusedDate] =
|
|
8588
|
-
const [first, setFirst] =
|
|
8589
|
-
const [hover, setHover] =
|
|
8745
|
+
const [focusedDate, setFocusedDate] = useState31(() => value?.start ?? /* @__PURE__ */ new Date());
|
|
8746
|
+
const [first, setFirst] = useState31(null);
|
|
8747
|
+
const [hover, setHover] = useState31(null);
|
|
8590
8748
|
const gridRef = useRef28(null);
|
|
8591
8749
|
const weeks = getMonthGrid(displayedMonth);
|
|
8592
8750
|
const shown = first ? rangeOf(first, hover ?? first) : value;
|
|
@@ -8654,31 +8812,31 @@ function RangeCalendar({
|
|
|
8654
8812
|
}
|
|
8655
8813
|
}
|
|
8656
8814
|
const nights = shown ? nightsBetween(shown.start, shown.end) : null;
|
|
8657
|
-
return /* @__PURE__ */
|
|
8658
|
-
/* @__PURE__ */
|
|
8659
|
-
/* @__PURE__ */
|
|
8815
|
+
return /* @__PURE__ */ jsxs170("div", { className: calendarStyles.calendar, "aria-label": ariaLabel, children: [
|
|
8816
|
+
/* @__PURE__ */ jsxs170("div", { className: calendarStyles.header, children: [
|
|
8817
|
+
/* @__PURE__ */ jsx220(
|
|
8660
8818
|
"button",
|
|
8661
8819
|
{
|
|
8662
8820
|
type: "button",
|
|
8663
8821
|
className: calendarStyles.navButton,
|
|
8664
8822
|
"aria-label": "Previous month",
|
|
8665
8823
|
onClick: () => goToMonth(addMonths(displayedMonth, -1)),
|
|
8666
|
-
children: /* @__PURE__ */
|
|
8824
|
+
children: /* @__PURE__ */ jsx220(Icon, { name: "chevron-left", size: "sm", "aria-hidden": true })
|
|
8667
8825
|
}
|
|
8668
8826
|
),
|
|
8669
|
-
/* @__PURE__ */
|
|
8670
|
-
/* @__PURE__ */
|
|
8827
|
+
/* @__PURE__ */ jsx220("span", { className: calendarStyles.monthLabel, children: formatMonthYear(displayedMonth) }),
|
|
8828
|
+
/* @__PURE__ */ jsx220(
|
|
8671
8829
|
"button",
|
|
8672
8830
|
{
|
|
8673
8831
|
type: "button",
|
|
8674
8832
|
className: calendarStyles.navButton,
|
|
8675
8833
|
"aria-label": "Next month",
|
|
8676
8834
|
onClick: () => goToMonth(addMonths(displayedMonth, 1)),
|
|
8677
|
-
children: /* @__PURE__ */
|
|
8835
|
+
children: /* @__PURE__ */ jsx220(Icon, { name: "chevron-right", size: "sm", "aria-hidden": true })
|
|
8678
8836
|
}
|
|
8679
8837
|
)
|
|
8680
8838
|
] }),
|
|
8681
|
-
/* @__PURE__ */
|
|
8839
|
+
/* @__PURE__ */ jsxs170(
|
|
8682
8840
|
"div",
|
|
8683
8841
|
{
|
|
8684
8842
|
ref: gridRef,
|
|
@@ -8688,7 +8846,7 @@ function RangeCalendar({
|
|
|
8688
8846
|
onKeyDown: handleKeyDown,
|
|
8689
8847
|
tabIndex: -1,
|
|
8690
8848
|
children: [
|
|
8691
|
-
/* @__PURE__ */
|
|
8849
|
+
/* @__PURE__ */ jsx220("div", { role: "row", className: calendarStyles.weekdayRow, children: WEEKDAY_LABEL_WEEK2.map((d) => /* @__PURE__ */ jsx220(
|
|
8692
8850
|
"span",
|
|
8693
8851
|
{
|
|
8694
8852
|
role: "columnheader",
|
|
@@ -8701,25 +8859,25 @@ function RangeCalendar({
|
|
|
8701
8859
|
weeks.map((week) => {
|
|
8702
8860
|
const firstDayOfWeek = week[0];
|
|
8703
8861
|
if (!firstDayOfWeek) return null;
|
|
8704
|
-
return /* @__PURE__ */
|
|
8862
|
+
return /* @__PURE__ */ jsx220("div", { role: "row", className: calendarStyles.week, children: week.map((date) => {
|
|
8705
8863
|
const isCurrentMonth = isSameMonth(date, displayedMonth);
|
|
8706
8864
|
const isStart = shown !== null && isSameDay(date, shown.start);
|
|
8707
8865
|
const isEnd = shown !== null && isSameDay(date, shown.end);
|
|
8708
8866
|
const inside = shown !== null && nightsBetween(shown.start, date) > 0 && nightsBetween(date, shown.end) > 0;
|
|
8709
8867
|
const isToday = isSameDay(date, /* @__PURE__ */ new Date());
|
|
8710
8868
|
const disabled = !isWithinRange(date, minDate, maxDate);
|
|
8711
|
-
return /* @__PURE__ */
|
|
8869
|
+
return /* @__PURE__ */ jsx220(
|
|
8712
8870
|
"div",
|
|
8713
8871
|
{
|
|
8714
8872
|
role: "gridcell",
|
|
8715
8873
|
"aria-selected": isStart || isEnd || inside,
|
|
8716
8874
|
className: [
|
|
8717
|
-
|
|
8718
|
-
inside ?
|
|
8719
|
-
isStart && !isEnd ?
|
|
8720
|
-
isEnd && !isStart ?
|
|
8875
|
+
styles90.cell,
|
|
8876
|
+
inside ? styles90.cellInside : "",
|
|
8877
|
+
isStart && !isEnd ? styles90.cellStart : "",
|
|
8878
|
+
isEnd && !isStart ? styles90.cellEnd : ""
|
|
8721
8879
|
].filter(Boolean).join(" "),
|
|
8722
|
-
children: /* @__PURE__ */
|
|
8880
|
+
children: /* @__PURE__ */ jsx220(
|
|
8723
8881
|
"button",
|
|
8724
8882
|
{
|
|
8725
8883
|
type: "button",
|
|
@@ -8751,12 +8909,12 @@ function RangeCalendar({
|
|
|
8751
8909
|
]
|
|
8752
8910
|
}
|
|
8753
8911
|
),
|
|
8754
|
-
/* @__PURE__ */
|
|
8912
|
+
/* @__PURE__ */ jsx220("p", { className: styles90.summary, role: "status", children: first ? "Now choose the last day." : nights === null ? "Choose the first day." : nightsLabel(nights) })
|
|
8755
8913
|
] });
|
|
8756
8914
|
}
|
|
8757
8915
|
|
|
8758
8916
|
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
8759
|
-
import { Fragment as Fragment19, jsx as
|
|
8917
|
+
import { Fragment as Fragment19, jsx as jsx221, jsxs as jsxs171 } from "react/jsx-runtime";
|
|
8760
8918
|
var POPOVER_WIDTH2 = 320;
|
|
8761
8919
|
function DateRangePicker({
|
|
8762
8920
|
value,
|
|
@@ -8767,7 +8925,7 @@ function DateRangePicker({
|
|
|
8767
8925
|
"aria-label": ariaLabel,
|
|
8768
8926
|
disabled = false
|
|
8769
8927
|
}) {
|
|
8770
|
-
const [open, setOpen] =
|
|
8928
|
+
const [open, setOpen] = useState32(false);
|
|
8771
8929
|
const isMobile = useIsMobile();
|
|
8772
8930
|
const start = parseIso(value.start);
|
|
8773
8931
|
const end = parseIso(value.end);
|
|
@@ -8776,7 +8934,7 @@ function DateRangePicker({
|
|
|
8776
8934
|
onChange({ start: toIso(next.start), end: toIso(next.end) });
|
|
8777
8935
|
setOpen(false);
|
|
8778
8936
|
}
|
|
8779
|
-
const trigger = /* @__PURE__ */
|
|
8937
|
+
const trigger = /* @__PURE__ */ jsxs171(
|
|
8780
8938
|
"button",
|
|
8781
8939
|
{
|
|
8782
8940
|
type: "button",
|
|
@@ -8787,12 +8945,12 @@ function DateRangePicker({
|
|
|
8787
8945
|
"aria-expanded": open,
|
|
8788
8946
|
onClick: () => setOpen((o) => !o),
|
|
8789
8947
|
children: [
|
|
8790
|
-
/* @__PURE__ */
|
|
8791
|
-
/* @__PURE__ */
|
|
8948
|
+
/* @__PURE__ */ jsx221("span", { className: range ? pickerStyles.triggerValue : pickerStyles.triggerPlaceholder, children: range ? `${formatDateShort(range.start)} \u2013 ${formatDateShort(range.end)} \xB7 ${nightsLabel(nightsBetween(range.start, range.end))}` : placeholder }),
|
|
8949
|
+
/* @__PURE__ */ jsx221(Icon, { name: "calendar", size: "sm", "aria-hidden": true })
|
|
8792
8950
|
]
|
|
8793
8951
|
}
|
|
8794
8952
|
);
|
|
8795
|
-
const calendar = /* @__PURE__ */
|
|
8953
|
+
const calendar = /* @__PURE__ */ jsx221(
|
|
8796
8954
|
RangeCalendar,
|
|
8797
8955
|
{
|
|
8798
8956
|
value: range,
|
|
@@ -8803,12 +8961,12 @@ function DateRangePicker({
|
|
|
8803
8961
|
}
|
|
8804
8962
|
);
|
|
8805
8963
|
if (isMobile) {
|
|
8806
|
-
return /* @__PURE__ */
|
|
8964
|
+
return /* @__PURE__ */ jsxs171(Fragment19, { children: [
|
|
8807
8965
|
trigger,
|
|
8808
|
-
/* @__PURE__ */
|
|
8966
|
+
/* @__PURE__ */ jsx221(Drawer, { open, onClose: () => setOpen(false), "aria-label": ariaLabel, children: /* @__PURE__ */ jsx221("div", { className: pickerStyles.drawerBody, children: calendar }) })
|
|
8809
8967
|
] });
|
|
8810
8968
|
}
|
|
8811
|
-
return /* @__PURE__ */
|
|
8969
|
+
return /* @__PURE__ */ jsx221(
|
|
8812
8970
|
Popover,
|
|
8813
8971
|
{
|
|
8814
8972
|
trigger,
|
|
@@ -8816,15 +8974,15 @@ function DateRangePicker({
|
|
|
8816
8974
|
onClose: () => setOpen(false),
|
|
8817
8975
|
"aria-label": ariaLabel,
|
|
8818
8976
|
width: POPOVER_WIDTH2,
|
|
8819
|
-
children: /* @__PURE__ */
|
|
8977
|
+
children: /* @__PURE__ */ jsx221("div", { className: pickerStyles.popoverBody, children: calendar })
|
|
8820
8978
|
}
|
|
8821
8979
|
);
|
|
8822
8980
|
}
|
|
8823
8981
|
|
|
8824
8982
|
// src/components/SuggestionInput/SuggestionInput.tsx
|
|
8825
|
-
import { useId as useId11, useRef as useRef29, useState as
|
|
8826
|
-
import
|
|
8827
|
-
import { Fragment as Fragment20, jsx as
|
|
8983
|
+
import { useId as useId11, useRef as useRef29, useState as useState33 } from "react";
|
|
8984
|
+
import styles91 from "./SuggestionInput.module.css";
|
|
8985
|
+
import { Fragment as Fragment20, jsx as jsx222, jsxs as jsxs172 } from "react/jsx-runtime";
|
|
8828
8986
|
function SuggestionInput({
|
|
8829
8987
|
value,
|
|
8830
8988
|
onChange,
|
|
@@ -8843,8 +9001,8 @@ function SuggestionInput({
|
|
|
8843
9001
|
const inputId = id ?? generatedId;
|
|
8844
9002
|
const listId = `${inputId}-suggestions`;
|
|
8845
9003
|
const inputRef = useRef29(null);
|
|
8846
|
-
const [focused, setFocused] =
|
|
8847
|
-
const [activeIndex, setActiveIndex] =
|
|
9004
|
+
const [focused, setFocused] = useState33(false);
|
|
9005
|
+
const [activeIndex, setActiveIndex] = useState33(-1);
|
|
8848
9006
|
const showCreateRow = Boolean(onCreate && createLabel && value.trim());
|
|
8849
9007
|
const rowCount = options.length + (showCreateRow ? 1 : 0);
|
|
8850
9008
|
const open = focused && (rowCount > 0 || loading);
|
|
@@ -8881,7 +9039,7 @@ function SuggestionInput({
|
|
|
8881
9039
|
close();
|
|
8882
9040
|
}
|
|
8883
9041
|
}
|
|
8884
|
-
const trigger = /* @__PURE__ */
|
|
9042
|
+
const trigger = /* @__PURE__ */ jsx222(
|
|
8885
9043
|
"input",
|
|
8886
9044
|
{
|
|
8887
9045
|
ref: inputRef,
|
|
@@ -8893,7 +9051,7 @@ function SuggestionInput({
|
|
|
8893
9051
|
"aria-autocomplete": "list",
|
|
8894
9052
|
"aria-activedescendant": activeIndex >= 0 ? `${listId}-option-${activeIndex}` : void 0,
|
|
8895
9053
|
"aria-label": ariaLabel,
|
|
8896
|
-
className: [
|
|
9054
|
+
className: [styles91.input, className].filter(Boolean).join(" "),
|
|
8897
9055
|
value,
|
|
8898
9056
|
placeholder,
|
|
8899
9057
|
disabled,
|
|
@@ -8906,7 +9064,7 @@ function SuggestionInput({
|
|
|
8906
9064
|
onKeyDown: handleKeyDown
|
|
8907
9065
|
}
|
|
8908
9066
|
);
|
|
8909
|
-
return /* @__PURE__ */
|
|
9067
|
+
return /* @__PURE__ */ jsx222(
|
|
8910
9068
|
Popover,
|
|
8911
9069
|
{
|
|
8912
9070
|
trigger,
|
|
@@ -8914,29 +9072,29 @@ function SuggestionInput({
|
|
|
8914
9072
|
onClose: close,
|
|
8915
9073
|
width: "trigger",
|
|
8916
9074
|
"aria-label": `${ariaLabel} suggestions`,
|
|
8917
|
-
children: /* @__PURE__ */
|
|
8918
|
-
options.map((option, index) => /* @__PURE__ */
|
|
9075
|
+
children: /* @__PURE__ */ jsx222("ul", { id: listId, role: "listbox", className: styles91.list, children: loading ? /* @__PURE__ */ jsx222("li", { className: styles91.status, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs172(Fragment20, { children: [
|
|
9076
|
+
options.map((option, index) => /* @__PURE__ */ jsx222("li", { role: "none", children: /* @__PURE__ */ jsxs172(
|
|
8919
9077
|
"button",
|
|
8920
9078
|
{
|
|
8921
9079
|
id: `${listId}-option-${index}`,
|
|
8922
9080
|
role: "option",
|
|
8923
9081
|
"aria-selected": index === activeIndex,
|
|
8924
9082
|
type: "button",
|
|
8925
|
-
className: [
|
|
9083
|
+
className: [styles91.option, index === activeIndex ? styles91.optionActive : ""].filter(Boolean).join(" "),
|
|
8926
9084
|
onMouseDown: (e) => {
|
|
8927
9085
|
e.preventDefault();
|
|
8928
9086
|
commitIndex(index);
|
|
8929
9087
|
},
|
|
8930
9088
|
children: [
|
|
8931
|
-
option.icon && /* @__PURE__ */
|
|
8932
|
-
/* @__PURE__ */
|
|
8933
|
-
option.meta && /* @__PURE__ */
|
|
9089
|
+
option.icon && /* @__PURE__ */ jsx222("span", { className: styles91.optionIcon, children: option.icon }),
|
|
9090
|
+
/* @__PURE__ */ jsx222("span", { className: styles91.optionLabel, children: option.label }),
|
|
9091
|
+
option.meta && /* @__PURE__ */ jsx222("span", { className: styles91.optionMeta, children: option.meta })
|
|
8934
9092
|
]
|
|
8935
9093
|
}
|
|
8936
9094
|
) }, option.id)),
|
|
8937
|
-
showCreateRow && createLabel && /* @__PURE__ */
|
|
8938
|
-
options.length > 0 && /* @__PURE__ */
|
|
8939
|
-
/* @__PURE__ */
|
|
9095
|
+
showCreateRow && createLabel && /* @__PURE__ */ jsxs172("li", { role: "none", children: [
|
|
9096
|
+
options.length > 0 && /* @__PURE__ */ jsx222("div", { className: styles91.divider }),
|
|
9097
|
+
/* @__PURE__ */ jsx222(
|
|
8940
9098
|
"button",
|
|
8941
9099
|
{
|
|
8942
9100
|
id: `${listId}-option-${options.length}`,
|
|
@@ -8944,9 +9102,9 @@ function SuggestionInput({
|
|
|
8944
9102
|
"aria-selected": options.length === activeIndex,
|
|
8945
9103
|
type: "button",
|
|
8946
9104
|
className: [
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
options.length === activeIndex ?
|
|
9105
|
+
styles91.option,
|
|
9106
|
+
styles91.optionCreate,
|
|
9107
|
+
options.length === activeIndex ? styles91.optionActive : ""
|
|
8950
9108
|
].filter(Boolean).join(" "),
|
|
8951
9109
|
onMouseDown: (e) => {
|
|
8952
9110
|
e.preventDefault();
|
|
@@ -8962,9 +9120,9 @@ function SuggestionInput({
|
|
|
8962
9120
|
}
|
|
8963
9121
|
|
|
8964
9122
|
// src/components/IconPicker/IconPicker.tsx
|
|
8965
|
-
import { useState as
|
|
8966
|
-
import
|
|
8967
|
-
import { jsx as
|
|
9123
|
+
import { useState as useState34 } from "react";
|
|
9124
|
+
import styles92 from "./IconPicker.module.css";
|
|
9125
|
+
import { jsx as jsx223, jsxs as jsxs173 } from "react/jsx-runtime";
|
|
8968
9126
|
function IconPicker({
|
|
8969
9127
|
value,
|
|
8970
9128
|
onChange,
|
|
@@ -8974,24 +9132,24 @@ function IconPicker({
|
|
|
8974
9132
|
disabled = false,
|
|
8975
9133
|
className
|
|
8976
9134
|
}) {
|
|
8977
|
-
const [open, setOpen] =
|
|
8978
|
-
const trigger = /* @__PURE__ */
|
|
9135
|
+
const [open, setOpen] = useState34(false);
|
|
9136
|
+
const trigger = /* @__PURE__ */ jsxs173(
|
|
8979
9137
|
"button",
|
|
8980
9138
|
{
|
|
8981
9139
|
type: "button",
|
|
8982
|
-
className: [
|
|
9140
|
+
className: [styles92.trigger, className].filter(Boolean).join(" "),
|
|
8983
9141
|
onClick: () => setOpen((o) => !o),
|
|
8984
9142
|
disabled,
|
|
8985
9143
|
"aria-label": ariaLabel,
|
|
8986
9144
|
"aria-haspopup": "true",
|
|
8987
9145
|
"aria-expanded": open,
|
|
8988
9146
|
children: [
|
|
8989
|
-
value ? /* @__PURE__ */
|
|
8990
|
-
triggerLabel && /* @__PURE__ */
|
|
9147
|
+
value ? /* @__PURE__ */ jsx223(Icon, { name: value, size: "md", "aria-hidden": true }) : /* @__PURE__ */ jsx223("span", { className: styles92.placeholder, "aria-hidden": true, children: "?" }),
|
|
9148
|
+
triggerLabel && /* @__PURE__ */ jsx223("span", { className: styles92.triggerLabel, children: triggerLabel })
|
|
8991
9149
|
]
|
|
8992
9150
|
}
|
|
8993
9151
|
);
|
|
8994
|
-
return /* @__PURE__ */
|
|
9152
|
+
return /* @__PURE__ */ jsx223(
|
|
8995
9153
|
Popover,
|
|
8996
9154
|
{
|
|
8997
9155
|
trigger,
|
|
@@ -8999,18 +9157,18 @@ function IconPicker({
|
|
|
8999
9157
|
onClose: () => setOpen(false),
|
|
9000
9158
|
width: 240,
|
|
9001
9159
|
"aria-label": `${ariaLabel} options`,
|
|
9002
|
-
children: /* @__PURE__ */
|
|
9160
|
+
children: /* @__PURE__ */ jsx223("div", { className: styles92.grid, role: "listbox", "aria-label": ariaLabel, children: options.map((name) => /* @__PURE__ */ jsx223(
|
|
9003
9161
|
"button",
|
|
9004
9162
|
{
|
|
9005
9163
|
type: "button",
|
|
9006
9164
|
role: "option",
|
|
9007
9165
|
"aria-selected": name === value,
|
|
9008
|
-
className: [
|
|
9166
|
+
className: [styles92.option, name === value ? styles92.optionSelected : ""].filter(Boolean).join(" "),
|
|
9009
9167
|
onClick: () => {
|
|
9010
9168
|
onChange(name);
|
|
9011
9169
|
setOpen(false);
|
|
9012
9170
|
},
|
|
9013
|
-
children: /* @__PURE__ */
|
|
9171
|
+
children: /* @__PURE__ */ jsx223(Icon, { name, size: "md", "aria-hidden": true })
|
|
9014
9172
|
},
|
|
9015
9173
|
name
|
|
9016
9174
|
)) })
|
|
@@ -9019,8 +9177,8 @@ function IconPicker({
|
|
|
9019
9177
|
}
|
|
9020
9178
|
|
|
9021
9179
|
// src/components/ColorPicker/ColorPicker.tsx
|
|
9022
|
-
import
|
|
9023
|
-
import { jsx as
|
|
9180
|
+
import styles93 from "./ColorPicker.module.css";
|
|
9181
|
+
import { jsx as jsx224, jsxs as jsxs174 } from "react/jsx-runtime";
|
|
9024
9182
|
function normalize(hex) {
|
|
9025
9183
|
return hex.toLowerCase();
|
|
9026
9184
|
}
|
|
@@ -9040,14 +9198,14 @@ function ColorPicker({
|
|
|
9040
9198
|
const matchedSwatch = swatches.find((s) => normalize(s.value) === normalizedValue);
|
|
9041
9199
|
const isCustomActive = normalizedValue !== null && !matchedSwatch;
|
|
9042
9200
|
const customDialValue = isCustomActive && value ? value : swatches[0]?.value ?? "#000000";
|
|
9043
|
-
return /* @__PURE__ */
|
|
9201
|
+
return /* @__PURE__ */ jsxs174(
|
|
9044
9202
|
"div",
|
|
9045
9203
|
{
|
|
9046
|
-
className: [
|
|
9204
|
+
className: [styles93.row, className].filter(Boolean).join(" "),
|
|
9047
9205
|
role: "group",
|
|
9048
9206
|
"aria-label": ariaLabel,
|
|
9049
9207
|
children: [
|
|
9050
|
-
allowNone && /* @__PURE__ */
|
|
9208
|
+
allowNone && /* @__PURE__ */ jsx224(
|
|
9051
9209
|
"button",
|
|
9052
9210
|
{
|
|
9053
9211
|
type: "button",
|
|
@@ -9056,15 +9214,15 @@ function ColorPicker({
|
|
|
9056
9214
|
"aria-label": noneLabel,
|
|
9057
9215
|
title: noneLabel,
|
|
9058
9216
|
disabled,
|
|
9059
|
-
className: [
|
|
9217
|
+
className: [styles93.swatch, styles93.swatchNone, value === null ? styles93.swatchSelected : ""].filter(Boolean).join(" "),
|
|
9060
9218
|
onClick: () => {
|
|
9061
9219
|
onChange(null);
|
|
9062
9220
|
onSelectionComplete?.();
|
|
9063
9221
|
},
|
|
9064
|
-
children: /* @__PURE__ */
|
|
9222
|
+
children: /* @__PURE__ */ jsx224(Icon, { name: "x", size: "sm", "aria-hidden": true })
|
|
9065
9223
|
}
|
|
9066
9224
|
),
|
|
9067
|
-
swatches.map((s) => /* @__PURE__ */
|
|
9225
|
+
swatches.map((s) => /* @__PURE__ */ jsx224(
|
|
9068
9226
|
"button",
|
|
9069
9227
|
{
|
|
9070
9228
|
type: "button",
|
|
@@ -9074,8 +9232,8 @@ function ColorPicker({
|
|
|
9074
9232
|
title: s.label,
|
|
9075
9233
|
disabled,
|
|
9076
9234
|
className: [
|
|
9077
|
-
|
|
9078
|
-
normalize(s.value) === normalizedValue ?
|
|
9235
|
+
styles93.swatch,
|
|
9236
|
+
normalize(s.value) === normalizedValue ? styles93.swatchSelected : ""
|
|
9079
9237
|
].filter(Boolean).join(" "),
|
|
9080
9238
|
style: { backgroundColor: s.value },
|
|
9081
9239
|
onClick: () => {
|
|
@@ -9085,19 +9243,19 @@ function ColorPicker({
|
|
|
9085
9243
|
},
|
|
9086
9244
|
s.value
|
|
9087
9245
|
)),
|
|
9088
|
-
/* @__PURE__ */
|
|
9246
|
+
/* @__PURE__ */ jsxs174(
|
|
9089
9247
|
"span",
|
|
9090
9248
|
{
|
|
9091
9249
|
className: [
|
|
9092
|
-
|
|
9093
|
-
isCustomActive ?
|
|
9250
|
+
styles93.customWrapper,
|
|
9251
|
+
isCustomActive ? styles93.swatchSelected : styles93.customWrapperEmpty
|
|
9094
9252
|
].filter(Boolean).join(" "),
|
|
9095
9253
|
children: [
|
|
9096
|
-
/* @__PURE__ */
|
|
9254
|
+
/* @__PURE__ */ jsx224(
|
|
9097
9255
|
"input",
|
|
9098
9256
|
{
|
|
9099
9257
|
type: "color",
|
|
9100
|
-
className:
|
|
9258
|
+
className: styles93.customInput,
|
|
9101
9259
|
"aria-label": customLabel,
|
|
9102
9260
|
title: customLabel,
|
|
9103
9261
|
disabled,
|
|
@@ -9105,7 +9263,7 @@ function ColorPicker({
|
|
|
9105
9263
|
onChange: (e) => onChange(e.target.value)
|
|
9106
9264
|
}
|
|
9107
9265
|
),
|
|
9108
|
-
!isCustomActive && /* @__PURE__ */
|
|
9266
|
+
!isCustomActive && /* @__PURE__ */ jsx224(Icon, { name: "plus", size: "sm", "aria-hidden": true, className: styles93.customPlusIcon })
|
|
9109
9267
|
]
|
|
9110
9268
|
}
|
|
9111
9269
|
)
|
|
@@ -9116,8 +9274,8 @@ function ColorPicker({
|
|
|
9116
9274
|
|
|
9117
9275
|
// src/components/QuantityStepper/QuantityStepper.tsx
|
|
9118
9276
|
import { useId as useId12 } from "react";
|
|
9119
|
-
import
|
|
9120
|
-
import { jsx as
|
|
9277
|
+
import styles94 from "./QuantityStepper.module.css";
|
|
9278
|
+
import { jsx as jsx225, jsxs as jsxs175 } from "react/jsx-runtime";
|
|
9121
9279
|
function QuantityStepper({
|
|
9122
9280
|
value,
|
|
9123
9281
|
onChange,
|
|
@@ -9144,24 +9302,24 @@ function QuantityStepper({
|
|
|
9144
9302
|
}
|
|
9145
9303
|
const decrementDisabled = disabled || min !== void 0 && value <= min;
|
|
9146
9304
|
const incrementDisabled = disabled || max !== void 0 && value >= max;
|
|
9147
|
-
return /* @__PURE__ */
|
|
9148
|
-
/* @__PURE__ */
|
|
9305
|
+
return /* @__PURE__ */ jsxs175("div", { className: [styles94.root, className].filter(Boolean).join(" "), children: [
|
|
9306
|
+
/* @__PURE__ */ jsx225(
|
|
9149
9307
|
"button",
|
|
9150
9308
|
{
|
|
9151
9309
|
type: "button",
|
|
9152
|
-
className:
|
|
9310
|
+
className: styles94.button,
|
|
9153
9311
|
onClick: () => onChange(clamp4(value - step)),
|
|
9154
9312
|
disabled: decrementDisabled,
|
|
9155
9313
|
"aria-label": `Decrease ${ariaLabel}`,
|
|
9156
9314
|
children: "\u2212"
|
|
9157
9315
|
}
|
|
9158
9316
|
),
|
|
9159
|
-
/* @__PURE__ */
|
|
9317
|
+
/* @__PURE__ */ jsx225(
|
|
9160
9318
|
"input",
|
|
9161
9319
|
{
|
|
9162
9320
|
id: inputId,
|
|
9163
9321
|
type: "number",
|
|
9164
|
-
className:
|
|
9322
|
+
className: styles94.input,
|
|
9165
9323
|
value,
|
|
9166
9324
|
onChange: handleInputChange,
|
|
9167
9325
|
min,
|
|
@@ -9171,12 +9329,12 @@ function QuantityStepper({
|
|
|
9171
9329
|
"aria-label": ariaLabel
|
|
9172
9330
|
}
|
|
9173
9331
|
),
|
|
9174
|
-
unit && /* @__PURE__ */
|
|
9175
|
-
/* @__PURE__ */
|
|
9332
|
+
unit && /* @__PURE__ */ jsx225("span", { className: styles94.unit, "aria-hidden": true, children: unit }),
|
|
9333
|
+
/* @__PURE__ */ jsx225(
|
|
9176
9334
|
"button",
|
|
9177
9335
|
{
|
|
9178
9336
|
type: "button",
|
|
9179
|
-
className:
|
|
9337
|
+
className: styles94.button,
|
|
9180
9338
|
onClick: () => onChange(clamp4(value + step)),
|
|
9181
9339
|
disabled: incrementDisabled,
|
|
9182
9340
|
"aria-label": `Increase ${ariaLabel}`,
|
|
@@ -9187,8 +9345,8 @@ function QuantityStepper({
|
|
|
9187
9345
|
}
|
|
9188
9346
|
|
|
9189
9347
|
// src/components/CheckableListRow/CheckableListRow.tsx
|
|
9190
|
-
import
|
|
9191
|
-
import { jsx as
|
|
9348
|
+
import styles95 from "./CheckableListRow.module.css";
|
|
9349
|
+
import { jsx as jsx226, jsxs as jsxs176 } from "react/jsx-runtime";
|
|
9192
9350
|
function CheckableListRow({
|
|
9193
9351
|
checked,
|
|
9194
9352
|
onCheckedChange,
|
|
@@ -9207,8 +9365,8 @@ function CheckableListRow({
|
|
|
9207
9365
|
toggle();
|
|
9208
9366
|
}
|
|
9209
9367
|
}
|
|
9210
|
-
return /* @__PURE__ */
|
|
9211
|
-
/* @__PURE__ */
|
|
9368
|
+
return /* @__PURE__ */ jsxs176("div", { className: [styles95.row, className].filter(Boolean).join(" "), children: [
|
|
9369
|
+
/* @__PURE__ */ jsxs176(
|
|
9212
9370
|
"div",
|
|
9213
9371
|
{
|
|
9214
9372
|
role: "checkbox",
|
|
@@ -9216,11 +9374,11 @@ function CheckableListRow({
|
|
|
9216
9374
|
"aria-label": label,
|
|
9217
9375
|
"aria-disabled": disabled || void 0,
|
|
9218
9376
|
tabIndex: disabled ? -1 : 0,
|
|
9219
|
-
className:
|
|
9377
|
+
className: styles95.tapTarget,
|
|
9220
9378
|
onClick: toggle,
|
|
9221
9379
|
onKeyDown: handleKeyDown,
|
|
9222
9380
|
children: [
|
|
9223
|
-
/* @__PURE__ */
|
|
9381
|
+
/* @__PURE__ */ jsx226("span", { className: [styles95.box, checked ? styles95.checked : ""].filter(Boolean).join(" "), children: checked && /* @__PURE__ */ jsx226("svg", { className: styles95.tick, viewBox: "0 0 10 8", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx226(
|
|
9224
9382
|
"path",
|
|
9225
9383
|
{
|
|
9226
9384
|
d: "M1 4l3 3 5-6",
|
|
@@ -9230,18 +9388,18 @@ function CheckableListRow({
|
|
|
9230
9388
|
strokeLinejoin: "round"
|
|
9231
9389
|
}
|
|
9232
9390
|
) }) }),
|
|
9233
|
-
icon && /* @__PURE__ */
|
|
9234
|
-
/* @__PURE__ */
|
|
9391
|
+
icon && /* @__PURE__ */ jsx226("span", { className: styles95.icon, children: icon }),
|
|
9392
|
+
/* @__PURE__ */ jsx226("span", { className: [styles95.label, checked ? styles95.struck : ""].filter(Boolean).join(" "), children: label })
|
|
9235
9393
|
]
|
|
9236
9394
|
}
|
|
9237
9395
|
),
|
|
9238
|
-
trailing && /* @__PURE__ */
|
|
9396
|
+
trailing && /* @__PURE__ */ jsx226("span", { className: styles95.trailing, children: trailing })
|
|
9239
9397
|
] });
|
|
9240
9398
|
}
|
|
9241
9399
|
|
|
9242
9400
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
9243
|
-
import { useState as
|
|
9244
|
-
import { jsx as
|
|
9401
|
+
import { useState as useState35 } from "react";
|
|
9402
|
+
import { jsx as jsx227 } from "react/jsx-runtime";
|
|
9245
9403
|
function minorToText(minor, decimals) {
|
|
9246
9404
|
return (minor / 10 ** decimals).toFixed(decimals);
|
|
9247
9405
|
}
|
|
@@ -9258,13 +9416,13 @@ function CurrencyInput({
|
|
|
9258
9416
|
decimals = 2,
|
|
9259
9417
|
...rest
|
|
9260
9418
|
}) {
|
|
9261
|
-
const [text, setText] =
|
|
9419
|
+
const [text, setText] = useState35(
|
|
9262
9420
|
() => valueCents != null ? minorToText(valueCents, decimals) : ""
|
|
9263
9421
|
);
|
|
9264
9422
|
if (textToMinor(text, decimals) !== valueCents) {
|
|
9265
9423
|
setText(valueCents != null ? minorToText(valueCents, decimals) : "");
|
|
9266
9424
|
}
|
|
9267
|
-
return /* @__PURE__ */
|
|
9425
|
+
return /* @__PURE__ */ jsx227(
|
|
9268
9426
|
Input,
|
|
9269
9427
|
{
|
|
9270
9428
|
...rest,
|
|
@@ -9281,19 +9439,19 @@ function CurrencyInput({
|
|
|
9281
9439
|
}
|
|
9282
9440
|
|
|
9283
9441
|
// src/components/BalanceChip/BalanceChip.tsx
|
|
9284
|
-
import
|
|
9285
|
-
import { jsx as
|
|
9442
|
+
import styles96 from "./BalanceChip.module.css";
|
|
9443
|
+
import { jsx as jsx228 } from "react/jsx-runtime";
|
|
9286
9444
|
function formatAbsCents(cents) {
|
|
9287
9445
|
return (Math.abs(cents) / 100).toFixed(2);
|
|
9288
9446
|
}
|
|
9289
9447
|
function BalanceChip({ amountCents, currency, className }) {
|
|
9290
9448
|
const direction = amountCents > 0 ? "owed" : amountCents < 0 ? "owes" : "settled";
|
|
9291
9449
|
const text = direction === "settled" ? "Settled up" : `${direction === "owed" ? "Owed" : "Owes"} ${currency} ${formatAbsCents(amountCents)}`;
|
|
9292
|
-
return /* @__PURE__ */
|
|
9450
|
+
return /* @__PURE__ */ jsx228("span", { className: [styles96.chip, styles96[direction], className].filter(Boolean).join(" "), children: text });
|
|
9293
9451
|
}
|
|
9294
9452
|
|
|
9295
9453
|
// src/components/SplitMethodSelector/SplitMethodSelector.tsx
|
|
9296
|
-
import { jsx as
|
|
9454
|
+
import { jsx as jsx229 } from "react/jsx-runtime";
|
|
9297
9455
|
var OPTIONS = [
|
|
9298
9456
|
{ label: "Equal", value: "equal" },
|
|
9299
9457
|
{ label: "Amount", value: "amount" },
|
|
@@ -9306,7 +9464,7 @@ function SplitMethodSelector({
|
|
|
9306
9464
|
size = "sm",
|
|
9307
9465
|
"aria-label": ariaLabel = "Split method"
|
|
9308
9466
|
}) {
|
|
9309
|
-
return /* @__PURE__ */
|
|
9467
|
+
return /* @__PURE__ */ jsx229(
|
|
9310
9468
|
SegmentedControl,
|
|
9311
9469
|
{
|
|
9312
9470
|
value,
|
|
@@ -9319,8 +9477,8 @@ function SplitMethodSelector({
|
|
|
9319
9477
|
}
|
|
9320
9478
|
|
|
9321
9479
|
// src/components/MemberMultiSelect/MemberMultiSelect.tsx
|
|
9322
|
-
import
|
|
9323
|
-
import { jsx as
|
|
9480
|
+
import styles97 from "./MemberMultiSelect.module.css";
|
|
9481
|
+
import { jsx as jsx230, jsxs as jsxs177 } from "react/jsx-runtime";
|
|
9324
9482
|
function MemberMultiSelect({
|
|
9325
9483
|
options,
|
|
9326
9484
|
selectedIds,
|
|
@@ -9330,12 +9488,12 @@ function MemberMultiSelect({
|
|
|
9330
9488
|
hint,
|
|
9331
9489
|
className
|
|
9332
9490
|
}) {
|
|
9333
|
-
return /* @__PURE__ */
|
|
9334
|
-
label && /* @__PURE__ */
|
|
9491
|
+
return /* @__PURE__ */ jsxs177("div", { className: [styles97.group, className].filter(Boolean).join(" "), children: [
|
|
9492
|
+
label && /* @__PURE__ */ jsx230("span", { className: styles97.label, children: label }),
|
|
9335
9493
|
options.map((option) => {
|
|
9336
9494
|
const checked = selectedIds.has(option.id);
|
|
9337
|
-
return /* @__PURE__ */
|
|
9338
|
-
/* @__PURE__ */
|
|
9495
|
+
return /* @__PURE__ */ jsxs177("div", { className: styles97.row, children: [
|
|
9496
|
+
/* @__PURE__ */ jsx230(
|
|
9339
9497
|
Checkbox,
|
|
9340
9498
|
{
|
|
9341
9499
|
checked,
|
|
@@ -9343,16 +9501,16 @@ function MemberMultiSelect({
|
|
|
9343
9501
|
label: option.label
|
|
9344
9502
|
}
|
|
9345
9503
|
),
|
|
9346
|
-
checked && renderTrailing && /* @__PURE__ */
|
|
9504
|
+
checked && renderTrailing && /* @__PURE__ */ jsx230("span", { className: styles97.trailing, children: renderTrailing(option.id) })
|
|
9347
9505
|
] }, option.id);
|
|
9348
9506
|
}),
|
|
9349
|
-
hint && /* @__PURE__ */
|
|
9507
|
+
hint && /* @__PURE__ */ jsx230("span", { className: styles97.hint, children: hint })
|
|
9350
9508
|
] });
|
|
9351
9509
|
}
|
|
9352
9510
|
|
|
9353
9511
|
// src/components/SwipableMobileCarouselDots/SwipableMobileCarouselDots.tsx
|
|
9354
|
-
import
|
|
9355
|
-
import { jsx as
|
|
9512
|
+
import styles98 from "./SwipableMobileCarouselDots.module.css";
|
|
9513
|
+
import { jsx as jsx231 } from "react/jsx-runtime";
|
|
9356
9514
|
function SwipableMobileCarouselDots({
|
|
9357
9515
|
count,
|
|
9358
9516
|
activeIndex,
|
|
@@ -9362,23 +9520,23 @@ function SwipableMobileCarouselDots({
|
|
|
9362
9520
|
density = "default",
|
|
9363
9521
|
className
|
|
9364
9522
|
}) {
|
|
9365
|
-
return /* @__PURE__ */
|
|
9523
|
+
return /* @__PURE__ */ jsx231(
|
|
9366
9524
|
"div",
|
|
9367
9525
|
{
|
|
9368
9526
|
role: "tablist",
|
|
9369
9527
|
"aria-label": ariaLabel,
|
|
9370
|
-
className: [
|
|
9528
|
+
className: [styles98.dots, density === "compact" ? styles98.dotsCompact : "", className].filter(Boolean).join(" "),
|
|
9371
9529
|
children: Array.from({ length: count }, (_, i) => {
|
|
9372
9530
|
const active = i === activeIndex;
|
|
9373
9531
|
const label = labels?.[i] ?? `Slide ${i + 1} of ${count}`;
|
|
9374
|
-
return /* @__PURE__ */
|
|
9532
|
+
return /* @__PURE__ */ jsx231(
|
|
9375
9533
|
"button",
|
|
9376
9534
|
{
|
|
9377
9535
|
type: "button",
|
|
9378
9536
|
role: "tab",
|
|
9379
9537
|
"aria-selected": active,
|
|
9380
9538
|
"aria-label": label,
|
|
9381
|
-
className: [
|
|
9539
|
+
className: [styles98.dot, active ? styles98.dotActive : ""].filter(Boolean).join(" "),
|
|
9382
9540
|
onClick: () => onJump(i)
|
|
9383
9541
|
},
|
|
9384
9542
|
i
|
|
@@ -9392,7 +9550,7 @@ function SwipableMobileCarouselDots({
|
|
|
9392
9550
|
import {
|
|
9393
9551
|
Children as Children2,
|
|
9394
9552
|
isValidElement as isValidElement2,
|
|
9395
|
-
useEffect as
|
|
9553
|
+
useEffect as useEffect19,
|
|
9396
9554
|
useLayoutEffect as useLayoutEffect4,
|
|
9397
9555
|
useMemo as useMemo6,
|
|
9398
9556
|
useRef as useRef30
|
|
@@ -9406,16 +9564,16 @@ import { createContext as createContext3 } from "react";
|
|
|
9406
9564
|
var CarouselSlideMountContext = createContext3(null);
|
|
9407
9565
|
|
|
9408
9566
|
// src/components/SwipableMobileCarousel/SwipableMobileCarouselSlide.tsx
|
|
9409
|
-
import { Fragment as Fragment21, jsx as
|
|
9567
|
+
import { Fragment as Fragment21, jsx as jsx232 } from "react/jsx-runtime";
|
|
9410
9568
|
function SwipableMobileCarouselSlide({ children }) {
|
|
9411
9569
|
const ctx = useContext3(CarouselSlideMountContext);
|
|
9412
9570
|
if (!ctx?.isMounted) return null;
|
|
9413
|
-
return /* @__PURE__ */
|
|
9571
|
+
return /* @__PURE__ */ jsx232(Fragment21, { children });
|
|
9414
9572
|
}
|
|
9415
9573
|
|
|
9416
9574
|
// src/components/SwipableMobileCarousel/SwipableMobileCarousel.tsx
|
|
9417
|
-
import
|
|
9418
|
-
import { jsx as
|
|
9575
|
+
import styles99 from "./SwipableMobileCarousel.module.css";
|
|
9576
|
+
import { jsx as jsx233, jsxs as jsxs178 } from "react/jsx-runtime";
|
|
9419
9577
|
function describeChild(child) {
|
|
9420
9578
|
if (isValidElement2(child)) {
|
|
9421
9579
|
const type = child.type;
|
|
@@ -9475,7 +9633,7 @@ function SwipableMobileCarousel({
|
|
|
9475
9633
|
scrollToIndex(initialActiveIndexRef.current, "instant");
|
|
9476
9634
|
}, []);
|
|
9477
9635
|
const didMountActiveIndexSyncRef = useRef30(false);
|
|
9478
|
-
|
|
9636
|
+
useEffect19(() => {
|
|
9479
9637
|
if (!didMountActiveIndexSyncRef.current) {
|
|
9480
9638
|
didMountActiveIndexSyncRef.current = true;
|
|
9481
9639
|
return;
|
|
@@ -9506,7 +9664,7 @@ function SwipableMobileCarousel({
|
|
|
9506
9664
|
onSettle(index);
|
|
9507
9665
|
}
|
|
9508
9666
|
const labels = slides.map((s) => s.label);
|
|
9509
|
-
const indicator = renderIndicator === null ? null : renderIndicator ? renderIndicator({ count, activeIndex: clampedActiveIndex, labels, onJump: handleJump }) : /* @__PURE__ */
|
|
9667
|
+
const indicator = renderIndicator === null ? null : renderIndicator ? renderIndicator({ count, activeIndex: clampedActiveIndex, labels, onJump: handleJump }) : /* @__PURE__ */ jsx233(
|
|
9510
9668
|
SwipableMobileCarouselDots,
|
|
9511
9669
|
{
|
|
9512
9670
|
count,
|
|
@@ -9516,8 +9674,8 @@ function SwipableMobileCarousel({
|
|
|
9516
9674
|
onJump: handleJump
|
|
9517
9675
|
}
|
|
9518
9676
|
);
|
|
9519
|
-
return /* @__PURE__ */
|
|
9520
|
-
/* @__PURE__ */
|
|
9677
|
+
return /* @__PURE__ */ jsxs178("div", { className: [styles99.wrap, className].filter(Boolean).join(" "), children: [
|
|
9678
|
+
/* @__PURE__ */ jsx233("div", { className: styles99.scroller, ref: scrollRef, role: "region", "aria-label": ariaLabel, children: slides.map((slide, i) => /* @__PURE__ */ jsx233("div", { className: styles99.slide, children: /* @__PURE__ */ jsx233(
|
|
9521
9679
|
CarouselSlideMountContext.Provider,
|
|
9522
9680
|
{
|
|
9523
9681
|
value: {
|
|
@@ -9535,61 +9693,61 @@ function SwipableMobileCarousel({
|
|
|
9535
9693
|
children: slide.element
|
|
9536
9694
|
}
|
|
9537
9695
|
) }, slide.key)) }),
|
|
9538
|
-
indicator && /* @__PURE__ */
|
|
9696
|
+
indicator && /* @__PURE__ */ jsx233("div", { className: styles99.indicatorSlot, children: indicator })
|
|
9539
9697
|
] });
|
|
9540
9698
|
}
|
|
9541
9699
|
|
|
9542
9700
|
// src/components/SwipableMobileCarousel/SwipableMobileCarouselSlideHeader.tsx
|
|
9543
|
-
import
|
|
9544
|
-
import { jsx as
|
|
9701
|
+
import styles100 from "./SwipableMobileCarouselSlideParts.module.css";
|
|
9702
|
+
import { jsx as jsx234 } from "react/jsx-runtime";
|
|
9545
9703
|
function SwipableMobileCarouselSlideHeader({
|
|
9546
9704
|
children,
|
|
9547
9705
|
className
|
|
9548
9706
|
}) {
|
|
9549
|
-
return /* @__PURE__ */
|
|
9707
|
+
return /* @__PURE__ */ jsx234("div", { className: [styles100.header, className].filter(Boolean).join(" "), children });
|
|
9550
9708
|
}
|
|
9551
9709
|
|
|
9552
9710
|
// src/components/SwipableMobileCarousel/SwipableMobileCarouselSlideBody.tsx
|
|
9553
|
-
import
|
|
9554
|
-
import { jsx as
|
|
9555
|
-
var defaultLoadingFallback = /* @__PURE__ */
|
|
9711
|
+
import styles101 from "./SwipableMobileCarouselSlideParts.module.css";
|
|
9712
|
+
import { jsx as jsx235 } from "react/jsx-runtime";
|
|
9713
|
+
var defaultLoadingFallback = /* @__PURE__ */ jsx235("div", { className: styles101.loading, children: "Loading\u2026" });
|
|
9556
9714
|
function SwipableMobileCarouselSlideBody({
|
|
9557
9715
|
children,
|
|
9558
9716
|
loading = false,
|
|
9559
9717
|
loadingFallback,
|
|
9560
9718
|
className
|
|
9561
9719
|
}) {
|
|
9562
|
-
return /* @__PURE__ */
|
|
9720
|
+
return /* @__PURE__ */ jsx235("div", { className: [styles101.body, className].filter(Boolean).join(" "), children: loading ? loadingFallback ?? defaultLoadingFallback : children });
|
|
9563
9721
|
}
|
|
9564
9722
|
|
|
9565
9723
|
// src/components/SwipableMobileCarousel/SwipableMobileCarouselSlideFooter.tsx
|
|
9566
|
-
import
|
|
9567
|
-
import { jsx as
|
|
9724
|
+
import styles102 from "./SwipableMobileCarouselSlideParts.module.css";
|
|
9725
|
+
import { jsx as jsx236 } from "react/jsx-runtime";
|
|
9568
9726
|
function SwipableMobileCarouselSlideFooter({
|
|
9569
9727
|
children,
|
|
9570
9728
|
className
|
|
9571
9729
|
}) {
|
|
9572
|
-
return /* @__PURE__ */
|
|
9730
|
+
return /* @__PURE__ */ jsx236("div", { className: [styles102.footer, className].filter(Boolean).join(" "), children });
|
|
9573
9731
|
}
|
|
9574
9732
|
|
|
9575
9733
|
// src/components/SwipeStack/SwipeStack.tsx
|
|
9576
|
-
import { Children as Children3, isValidElement as isValidElement3, useEffect as
|
|
9734
|
+
import { Children as Children3, isValidElement as isValidElement3, useEffect as useEffect20, useRef as useRef31, useState as useState36 } from "react";
|
|
9577
9735
|
|
|
9578
9736
|
// src/components/SwipeStack/SwipeStackCard.tsx
|
|
9579
|
-
import { Fragment as Fragment22, jsx as
|
|
9737
|
+
import { Fragment as Fragment22, jsx as jsx237 } from "react/jsx-runtime";
|
|
9580
9738
|
function SwipeStackCard({ children }) {
|
|
9581
|
-
return /* @__PURE__ */
|
|
9739
|
+
return /* @__PURE__ */ jsx237(Fragment22, { children });
|
|
9582
9740
|
}
|
|
9583
9741
|
|
|
9584
9742
|
// src/components/SwipeStack/SwipeStack.tsx
|
|
9585
|
-
import
|
|
9586
|
-
import { jsx as
|
|
9743
|
+
import styles103 from "./SwipeStack.module.css";
|
|
9744
|
+
import { jsx as jsx238, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
9587
9745
|
var DIRECTION_KEYS = ["up", "down", "left", "right"];
|
|
9588
9746
|
var STAMP_CLASS = {
|
|
9589
|
-
up:
|
|
9590
|
-
down:
|
|
9591
|
-
left:
|
|
9592
|
-
right:
|
|
9747
|
+
up: styles103.stampUp,
|
|
9748
|
+
down: styles103.stampDown,
|
|
9749
|
+
left: styles103.stampLeft,
|
|
9750
|
+
right: styles103.stampRight
|
|
9593
9751
|
};
|
|
9594
9752
|
function describeChild2(child) {
|
|
9595
9753
|
if (isValidElement3(child)) {
|
|
@@ -9630,10 +9788,10 @@ function SwipeStack({
|
|
|
9630
9788
|
children
|
|
9631
9789
|
}) {
|
|
9632
9790
|
const cards = resolveCards(children);
|
|
9633
|
-
const [dismissed, setDismissed] =
|
|
9634
|
-
const [exiting, setExiting] =
|
|
9791
|
+
const [dismissed, setDismissed] = useState36(() => /* @__PURE__ */ new Set());
|
|
9792
|
+
const [exiting, setExiting] = useState36(null);
|
|
9635
9793
|
const exitTimerRef = useRef31(null);
|
|
9636
|
-
|
|
9794
|
+
useEffect20(
|
|
9637
9795
|
() => () => {
|
|
9638
9796
|
if (exitTimerRef.current) clearTimeout(exitTimerRef.current);
|
|
9639
9797
|
},
|
|
@@ -9660,33 +9818,33 @@ function SwipeStack({
|
|
|
9660
9818
|
onSwipe(direction, committed.key);
|
|
9661
9819
|
}
|
|
9662
9820
|
});
|
|
9663
|
-
return /* @__PURE__ */
|
|
9664
|
-
/* @__PURE__ */
|
|
9665
|
-
peek && /* @__PURE__ */
|
|
9666
|
-
current && /* @__PURE__ */
|
|
9821
|
+
return /* @__PURE__ */ jsxs179("div", { className: [styles103.wrap, className].filter(Boolean).join(" "), children: [
|
|
9822
|
+
/* @__PURE__ */ jsxs179("div", { className: styles103.stack, role: "region", "aria-label": ariaLabel, children: [
|
|
9823
|
+
peek && /* @__PURE__ */ jsx238("div", { className: styles103.peek, "aria-hidden": "true", children: peek.element }, peek.key),
|
|
9824
|
+
current && /* @__PURE__ */ jsxs179("div", { className: styles103.cardSlot, ref: wrapRef, children: [
|
|
9667
9825
|
liveDirections.map((d) => {
|
|
9668
9826
|
const meta = directions[d];
|
|
9669
9827
|
if (!meta) return null;
|
|
9670
|
-
return /* @__PURE__ */
|
|
9828
|
+
return /* @__PURE__ */ jsxs179(
|
|
9671
9829
|
"div",
|
|
9672
9830
|
{
|
|
9673
|
-
className: [
|
|
9831
|
+
className: [styles103.stamp, STAMP_CLASS[d]].join(" "),
|
|
9674
9832
|
"aria-hidden": "true",
|
|
9675
9833
|
children: [
|
|
9676
|
-
meta.icon && /* @__PURE__ */
|
|
9677
|
-
/* @__PURE__ */
|
|
9834
|
+
meta.icon && /* @__PURE__ */ jsx238(Icon, { name: meta.icon, size: "sm", "aria-hidden": true }),
|
|
9835
|
+
/* @__PURE__ */ jsx238("span", { children: meta.label })
|
|
9678
9836
|
]
|
|
9679
9837
|
},
|
|
9680
9838
|
d
|
|
9681
9839
|
);
|
|
9682
9840
|
}),
|
|
9683
|
-
/* @__PURE__ */
|
|
9841
|
+
/* @__PURE__ */ jsx238("div", { className: styles103.card, ref: cardRef, style: { touchAction }, ...handlers, children: current.element })
|
|
9684
9842
|
] }, current.key)
|
|
9685
9843
|
] }),
|
|
9686
|
-
liveDirections.length > 0 && /* @__PURE__ */
|
|
9844
|
+
liveDirections.length > 0 && /* @__PURE__ */ jsx238("div", { className: styles103.actions, role: "group", "aria-label": `${ariaLabel} actions`, children: liveDirections.map((d) => {
|
|
9687
9845
|
const meta = directions[d];
|
|
9688
9846
|
if (!meta) return null;
|
|
9689
|
-
return /* @__PURE__ */
|
|
9847
|
+
return /* @__PURE__ */ jsxs179(
|
|
9690
9848
|
Button,
|
|
9691
9849
|
{
|
|
9692
9850
|
variant: "secondary",
|
|
@@ -9694,7 +9852,7 @@ function SwipeStack({
|
|
|
9694
9852
|
disabled: !current,
|
|
9695
9853
|
onClick: () => triggerCommit(d),
|
|
9696
9854
|
children: [
|
|
9697
|
-
meta.icon && /* @__PURE__ */
|
|
9855
|
+
meta.icon && /* @__PURE__ */ jsx238(Icon, { name: meta.icon, size: "sm", "aria-hidden": true }),
|
|
9698
9856
|
meta.label
|
|
9699
9857
|
]
|
|
9700
9858
|
},
|
|
@@ -9706,8 +9864,8 @@ function SwipeStack({
|
|
|
9706
9864
|
|
|
9707
9865
|
// src/components/ThreeColumnLayout/ThreeColumnLayout.tsx
|
|
9708
9866
|
import { Children as Children4 } from "react";
|
|
9709
|
-
import
|
|
9710
|
-
import { jsx as
|
|
9867
|
+
import styles104 from "./ThreeColumnLayout.module.css";
|
|
9868
|
+
import { jsx as jsx239, jsxs as jsxs180 } from "react/jsx-runtime";
|
|
9711
9869
|
function ThreeColumnLayout({
|
|
9712
9870
|
children,
|
|
9713
9871
|
sidebarWidth = 280,
|
|
@@ -9722,24 +9880,24 @@ function ThreeColumnLayout({
|
|
|
9722
9880
|
);
|
|
9723
9881
|
}
|
|
9724
9882
|
const [sidebar, main, detail] = items;
|
|
9725
|
-
return /* @__PURE__ */
|
|
9726
|
-
/* @__PURE__ */
|
|
9883
|
+
return /* @__PURE__ */ jsxs180("div", { className: [styles104.shell, className].filter(Boolean).join(" "), children: [
|
|
9884
|
+
/* @__PURE__ */ jsx239(
|
|
9727
9885
|
"div",
|
|
9728
9886
|
{
|
|
9729
|
-
className: [
|
|
9887
|
+
className: [styles104.sidebar, sidebarHidden && styles104.sidebarHidden].filter(Boolean).join(" "),
|
|
9730
9888
|
style: sidebarHidden ? void 0 : { width: sidebarWidth },
|
|
9731
9889
|
hidden: sidebarHidden,
|
|
9732
9890
|
children: sidebar
|
|
9733
9891
|
}
|
|
9734
9892
|
),
|
|
9735
|
-
/* @__PURE__ */
|
|
9736
|
-
detail && /* @__PURE__ */
|
|
9893
|
+
/* @__PURE__ */ jsx239("div", { className: styles104.main, children: main }),
|
|
9894
|
+
detail && /* @__PURE__ */ jsx239("div", { className: styles104.detail, style: { width: detailWidth }, children: detail })
|
|
9737
9895
|
] });
|
|
9738
9896
|
}
|
|
9739
9897
|
|
|
9740
9898
|
// src/components/HeaderFooterLayout/HeaderFooterLayout.tsx
|
|
9741
|
-
import
|
|
9742
|
-
import { jsx as
|
|
9899
|
+
import styles105 from "./HeaderFooterLayout.module.css";
|
|
9900
|
+
import { jsx as jsx240, jsxs as jsxs181 } from "react/jsx-runtime";
|
|
9743
9901
|
function HeaderFooterLayout({
|
|
9744
9902
|
children,
|
|
9745
9903
|
header,
|
|
@@ -9748,17 +9906,17 @@ function HeaderFooterLayout({
|
|
|
9748
9906
|
footerHeight = 60,
|
|
9749
9907
|
className
|
|
9750
9908
|
}) {
|
|
9751
|
-
return /* @__PURE__ */
|
|
9752
|
-
header && /* @__PURE__ */
|
|
9753
|
-
/* @__PURE__ */
|
|
9754
|
-
footer && /* @__PURE__ */
|
|
9909
|
+
return /* @__PURE__ */ jsxs181("div", { className: [styles105.shell, className].filter(Boolean).join(" "), children: [
|
|
9910
|
+
header && /* @__PURE__ */ jsx240("div", { className: styles105.header, style: { height: headerHeight }, children: header }),
|
|
9911
|
+
/* @__PURE__ */ jsx240("div", { className: styles105.main, children }),
|
|
9912
|
+
footer && /* @__PURE__ */ jsx240("div", { className: styles105.footer, style: { height: footerHeight }, children: footer })
|
|
9755
9913
|
] });
|
|
9756
9914
|
}
|
|
9757
9915
|
|
|
9758
9916
|
// src/components/RootLayout/RootLayout.tsx
|
|
9759
9917
|
import { Children as Children5 } from "react";
|
|
9760
|
-
import
|
|
9761
|
-
import { Fragment as Fragment23, jsx as
|
|
9918
|
+
import styles106 from "./RootLayout.module.css";
|
|
9919
|
+
import { Fragment as Fragment23, jsx as jsx241, jsxs as jsxs182 } from "react/jsx-runtime";
|
|
9762
9920
|
var EXPECTED_CHILD_COUNT = {
|
|
9763
9921
|
plain: 1,
|
|
9764
9922
|
sidebar: 2,
|
|
@@ -9768,17 +9926,17 @@ var EXPECTED_CHILD_COUNT = {
|
|
|
9768
9926
|
function RootLayoutWeb({ variant, items, sidebarWidth, headerHeight }) {
|
|
9769
9927
|
if (variant === "sidebar") {
|
|
9770
9928
|
const [sidebar, main2] = items;
|
|
9771
|
-
return /* @__PURE__ */
|
|
9929
|
+
return /* @__PURE__ */ jsxs182(ThreeColumnLayout, { sidebarWidth, children: [
|
|
9772
9930
|
sidebar,
|
|
9773
9931
|
main2
|
|
9774
9932
|
] });
|
|
9775
9933
|
}
|
|
9776
9934
|
if (variant === "header") {
|
|
9777
9935
|
const [header, main2] = items;
|
|
9778
|
-
return /* @__PURE__ */
|
|
9936
|
+
return /* @__PURE__ */ jsx241(HeaderFooterLayout, { header, headerHeight, children: main2 });
|
|
9779
9937
|
}
|
|
9780
9938
|
const main = variant === "shell" ? items[1] : items[0];
|
|
9781
|
-
return /* @__PURE__ */
|
|
9939
|
+
return /* @__PURE__ */ jsx241(Fragment23, { children: main });
|
|
9782
9940
|
}
|
|
9783
9941
|
function RootLayoutMobile({
|
|
9784
9942
|
variant,
|
|
@@ -9788,11 +9946,11 @@ function RootLayoutMobile({
|
|
|
9788
9946
|
}) {
|
|
9789
9947
|
if (variant === "header") {
|
|
9790
9948
|
const [header, main2] = items;
|
|
9791
|
-
return /* @__PURE__ */
|
|
9949
|
+
return /* @__PURE__ */ jsx241(HeaderFooterLayout, { header, headerHeight: mobileHeaderHeight, children: main2 });
|
|
9792
9950
|
}
|
|
9793
9951
|
if (variant === "shell") {
|
|
9794
9952
|
const [header, main2, footer] = items;
|
|
9795
|
-
return /* @__PURE__ */
|
|
9953
|
+
return /* @__PURE__ */ jsx241(
|
|
9796
9954
|
HeaderFooterLayout,
|
|
9797
9955
|
{
|
|
9798
9956
|
header,
|
|
@@ -9804,7 +9962,7 @@ function RootLayoutMobile({
|
|
|
9804
9962
|
);
|
|
9805
9963
|
}
|
|
9806
9964
|
const main = variant === "sidebar" ? items[1] : items[0];
|
|
9807
|
-
return /* @__PURE__ */
|
|
9965
|
+
return /* @__PURE__ */ jsx241(Fragment23, { children: main });
|
|
9808
9966
|
}
|
|
9809
9967
|
function RootLayout({
|
|
9810
9968
|
variant = "plain",
|
|
@@ -9821,10 +9979,10 @@ function RootLayout({
|
|
|
9821
9979
|
`[RootLayout] variant="${variant}" expects ${EXPECTED_CHILD_COUNT[variant]} children; received ${items.length}.`
|
|
9822
9980
|
);
|
|
9823
9981
|
}
|
|
9824
|
-
return /* @__PURE__ */
|
|
9982
|
+
return /* @__PURE__ */ jsx241("div", { className: [styles106.root, className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsx241(
|
|
9825
9983
|
ResponsiveSurface,
|
|
9826
9984
|
{
|
|
9827
|
-
web: /* @__PURE__ */
|
|
9985
|
+
web: /* @__PURE__ */ jsx241(
|
|
9828
9986
|
RootLayoutWeb,
|
|
9829
9987
|
{
|
|
9830
9988
|
variant,
|
|
@@ -9833,7 +9991,7 @@ function RootLayout({
|
|
|
9833
9991
|
headerHeight
|
|
9834
9992
|
}
|
|
9835
9993
|
),
|
|
9836
|
-
mobile: /* @__PURE__ */
|
|
9994
|
+
mobile: /* @__PURE__ */ jsx241(
|
|
9837
9995
|
RootLayoutMobile,
|
|
9838
9996
|
{
|
|
9839
9997
|
variant,
|
|
@@ -9847,25 +10005,25 @@ function RootLayout({
|
|
|
9847
10005
|
}
|
|
9848
10006
|
|
|
9849
10007
|
// src/components/PageLayout/PageLayout.tsx
|
|
9850
|
-
import
|
|
9851
|
-
import { jsx as
|
|
10008
|
+
import styles107 from "./PageLayout.module.css";
|
|
10009
|
+
import { jsx as jsx242, jsxs as jsxs183 } from "react/jsx-runtime";
|
|
9852
10010
|
var paddingClass3 = {
|
|
9853
|
-
none:
|
|
9854
|
-
sm:
|
|
9855
|
-
md:
|
|
9856
|
-
lg:
|
|
10011
|
+
none: styles107.padNone,
|
|
10012
|
+
sm: styles107.padSm,
|
|
10013
|
+
md: styles107.padMd,
|
|
10014
|
+
lg: styles107.padLg
|
|
9857
10015
|
};
|
|
9858
10016
|
function PageLayout({ header, padding = "none", children, className }) {
|
|
9859
|
-
return /* @__PURE__ */
|
|
9860
|
-
header && /* @__PURE__ */
|
|
9861
|
-
/* @__PURE__ */
|
|
10017
|
+
return /* @__PURE__ */ jsxs183("div", { className: [styles107.root, className].filter(Boolean).join(" "), children: [
|
|
10018
|
+
header && /* @__PURE__ */ jsx242("div", { className: styles107.header, children: header }),
|
|
10019
|
+
/* @__PURE__ */ jsx242("div", { className: [styles107.content, paddingClass3[padding]].join(" "), children })
|
|
9862
10020
|
] });
|
|
9863
10021
|
}
|
|
9864
10022
|
|
|
9865
10023
|
// src/components/NavList/NavList.tsx
|
|
9866
10024
|
import { Fragment as Fragment24 } from "react";
|
|
9867
|
-
import
|
|
9868
|
-
import { Fragment as Fragment25, jsx as
|
|
10025
|
+
import styles108 from "./NavList.module.css";
|
|
10026
|
+
import { Fragment as Fragment25, jsx as jsx243, jsxs as jsxs184 } from "react/jsx-runtime";
|
|
9869
10027
|
function NavList({
|
|
9870
10028
|
groups,
|
|
9871
10029
|
variant,
|
|
@@ -9874,28 +10032,28 @@ function NavList({
|
|
|
9874
10032
|
className,
|
|
9875
10033
|
renderLink
|
|
9876
10034
|
}) {
|
|
9877
|
-
return /* @__PURE__ */
|
|
10035
|
+
return /* @__PURE__ */ jsx243(
|
|
9878
10036
|
"nav",
|
|
9879
10037
|
{
|
|
9880
|
-
className: [
|
|
10038
|
+
className: [styles108.nav, styles108[variant], density === "compact" && styles108.compact, className].filter(Boolean).join(" "),
|
|
9881
10039
|
"aria-label": ariaLabel,
|
|
9882
|
-
children: groups.map((group) => /* @__PURE__ */
|
|
9883
|
-
group.label && /* @__PURE__ */
|
|
10040
|
+
children: groups.map((group) => /* @__PURE__ */ jsxs184("div", { className: styles108.group, children: [
|
|
10041
|
+
group.label && /* @__PURE__ */ jsx243("div", { className: styles108.groupLabel, children: group.label }),
|
|
9884
10042
|
group.items.map((item) => {
|
|
9885
10043
|
const isActive = variant === "static" && !!item.active;
|
|
9886
|
-
const rowContent = /* @__PURE__ */
|
|
9887
|
-
/* @__PURE__ */
|
|
9888
|
-
/* @__PURE__ */
|
|
9889
|
-
item.badge && /* @__PURE__ */
|
|
9890
|
-
variant === "drilldown" && /* @__PURE__ */
|
|
10044
|
+
const rowContent = /* @__PURE__ */ jsxs184(Fragment25, { children: [
|
|
10045
|
+
/* @__PURE__ */ jsx243(Icon, { name: item.icon, size: "sm", "aria-hidden": true, className: styles108.icon }),
|
|
10046
|
+
/* @__PURE__ */ jsx243("span", { className: styles108.label, children: item.label }),
|
|
10047
|
+
item.badge && /* @__PURE__ */ jsx243("span", { className: styles108.badge, children: item.badge }),
|
|
10048
|
+
variant === "drilldown" && /* @__PURE__ */ jsx243(Icon, { name: "chevron-right", size: "sm", "aria-hidden": true, className: styles108.chevron })
|
|
9891
10049
|
] });
|
|
9892
10050
|
const linkProps = {
|
|
9893
10051
|
href: item.href,
|
|
9894
|
-
className: [
|
|
10052
|
+
className: [styles108.row, isActive && styles108.rowActive].filter(Boolean).join(" "),
|
|
9895
10053
|
"aria-current": isActive ? "page" : void 0,
|
|
9896
10054
|
children: rowContent
|
|
9897
10055
|
};
|
|
9898
|
-
return /* @__PURE__ */
|
|
10056
|
+
return /* @__PURE__ */ jsx243(Fragment24, { children: renderLink ? renderLink(item, linkProps) : /* @__PURE__ */ jsx243(
|
|
9899
10057
|
"a",
|
|
9900
10058
|
{
|
|
9901
10059
|
href: linkProps.href,
|
|
@@ -9953,8 +10111,8 @@ var THEME_PRESETS = {
|
|
|
9953
10111
|
};
|
|
9954
10112
|
|
|
9955
10113
|
// src/components/CopyButton/CopyButton.tsx
|
|
9956
|
-
import { useState as
|
|
9957
|
-
import { jsx as
|
|
10114
|
+
import { useState as useState37 } from "react";
|
|
10115
|
+
import { jsx as jsx244 } from "react/jsx-runtime";
|
|
9958
10116
|
function CopyButton({
|
|
9959
10117
|
text,
|
|
9960
10118
|
label,
|
|
@@ -9963,7 +10121,7 @@ function CopyButton({
|
|
|
9963
10121
|
variant = "secondary",
|
|
9964
10122
|
size = "sm"
|
|
9965
10123
|
}) {
|
|
9966
|
-
const [state, setState] =
|
|
10124
|
+
const [state, setState] = useState37("idle");
|
|
9967
10125
|
async function copy() {
|
|
9968
10126
|
try {
|
|
9969
10127
|
await navigator.clipboard.writeText(text);
|
|
@@ -9972,12 +10130,12 @@ function CopyButton({
|
|
|
9972
10130
|
setState("failed");
|
|
9973
10131
|
}
|
|
9974
10132
|
}
|
|
9975
|
-
return /* @__PURE__ */
|
|
10133
|
+
return /* @__PURE__ */ jsx244(Button, { type: "button", variant, size, onClick: () => void copy(), children: state === "copied" ? copiedLabel : state === "failed" ? failedLabel : label });
|
|
9976
10134
|
}
|
|
9977
10135
|
|
|
9978
10136
|
// src/components/QrCode/QrCode.tsx
|
|
9979
|
-
import
|
|
9980
|
-
import { jsx as
|
|
10137
|
+
import styles109 from "./QrCode.module.css";
|
|
10138
|
+
import { jsx as jsx245 } from "react/jsx-runtime";
|
|
9981
10139
|
var QUIET_ZONE = 2;
|
|
9982
10140
|
function QrCode({ modules, label }) {
|
|
9983
10141
|
const size = modules.length + QUIET_ZONE * 2;
|
|
@@ -9987,7 +10145,7 @@ function QrCode({ modules, label }) {
|
|
|
9987
10145
|
if (dark) path += `M${x + QUIET_ZONE} ${y + QUIET_ZONE}h1v1h-1z`;
|
|
9988
10146
|
});
|
|
9989
10147
|
});
|
|
9990
|
-
return /* @__PURE__ */
|
|
10148
|
+
return /* @__PURE__ */ jsx245("div", { className: styles109.qr, children: /* @__PURE__ */ jsx245(
|
|
9991
10149
|
"svg",
|
|
9992
10150
|
{
|
|
9993
10151
|
viewBox: `0 0 ${size} ${size}`,
|
|
@@ -9995,7 +10153,7 @@ function QrCode({ modules, label }) {
|
|
|
9995
10153
|
"aria-label": label,
|
|
9996
10154
|
shapeRendering: "crispEdges",
|
|
9997
10155
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9998
|
-
children: /* @__PURE__ */
|
|
10156
|
+
children: /* @__PURE__ */ jsx245("path", { d: path })
|
|
9999
10157
|
}
|
|
10000
10158
|
) });
|
|
10001
10159
|
}
|
|
@@ -10061,6 +10219,8 @@ export {
|
|
|
10061
10219
|
Icon,
|
|
10062
10220
|
IconPicker,
|
|
10063
10221
|
Input,
|
|
10222
|
+
InstallHint,
|
|
10223
|
+
InstallPrompt,
|
|
10064
10224
|
Item,
|
|
10065
10225
|
Kbd,
|
|
10066
10226
|
Label,
|
|
@@ -10141,13 +10301,16 @@ export {
|
|
|
10141
10301
|
Toggle,
|
|
10142
10302
|
Tooltip,
|
|
10143
10303
|
Typography,
|
|
10304
|
+
UpdateNotice,
|
|
10144
10305
|
UserMenu,
|
|
10306
|
+
isInstalledDisplay,
|
|
10145
10307
|
recoveryKitFileName,
|
|
10146
10308
|
recoveryKitFileText,
|
|
10147
10309
|
shouldHandleDndEvent,
|
|
10148
10310
|
useCarouselRouteSync,
|
|
10149
10311
|
useCommitOnEnterOrBlur,
|
|
10150
10312
|
useDoubleTapHandler,
|
|
10313
|
+
useInstallPrompt,
|
|
10151
10314
|
useIsMobile,
|
|
10152
10315
|
useIsOffline,
|
|
10153
10316
|
useLongPress,
|