@sovereignfs/ui 0.96.1 → 0.99.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 +45 -0
- package/README.md +2 -0
- package/dist/AppTile.module.css +22 -0
- package/dist/RecoveryKit.module.css +114 -0
- package/dist/index.d.ts +61 -3
- package/dist/index.js +805 -653
- package/package.json +11 -10
package/dist/index.js
CHANGED
|
@@ -5600,19 +5600,42 @@ function AppTile({
|
|
|
5600
5600
|
tags,
|
|
5601
5601
|
href,
|
|
5602
5602
|
variant = "solid",
|
|
5603
|
+
external = false,
|
|
5604
|
+
monochrome = false,
|
|
5603
5605
|
className
|
|
5604
5606
|
}) {
|
|
5605
|
-
const
|
|
5607
|
+
const opensElsewhere = external && href !== void 0;
|
|
5608
|
+
const classes = [
|
|
5609
|
+
styles39.tile,
|
|
5610
|
+
variant === "ghost" && styles39.ghost,
|
|
5611
|
+
href && styles39.link,
|
|
5612
|
+
monochrome && styles39.monochrome,
|
|
5613
|
+
className
|
|
5614
|
+
].filter(Boolean).join(" ");
|
|
5606
5615
|
const content = /* @__PURE__ */ jsxs134(Fragment6, { children: [
|
|
5607
5616
|
/* @__PURE__ */ jsx161("span", { className: styles39.icon, "aria-hidden": "true", children: icon }),
|
|
5608
|
-
/* @__PURE__ */
|
|
5617
|
+
/* @__PURE__ */ jsxs134("span", { className: styles39.name, children: [
|
|
5618
|
+
name,
|
|
5619
|
+
opensElsewhere ? /* @__PURE__ */ jsxs134(Fragment6, { children: [
|
|
5620
|
+
/* @__PURE__ */ jsx161(Icon, { name: "external-link", size: "sm", "aria-hidden": true, className: styles39.external }),
|
|
5621
|
+
/* @__PURE__ */ jsx161("span", { className: styles39.hidden, children: " (opens in a new tab)" })
|
|
5622
|
+
] }) : null
|
|
5623
|
+
] }),
|
|
5609
5624
|
description ? /* @__PURE__ */ jsx161("span", { className: styles39.description, children: description }) : /* @__PURE__ */ jsx161("span", { className: styles39.fill }),
|
|
5610
5625
|
tags ? /* @__PURE__ */ jsxs134(Fragment6, { children: [
|
|
5611
5626
|
/* @__PURE__ */ jsx161("span", { className: styles39.separator, "aria-hidden": "true" }),
|
|
5612
5627
|
/* @__PURE__ */ jsx161("span", { className: styles39.tags, children: tags })
|
|
5613
5628
|
] }) : null
|
|
5614
5629
|
] });
|
|
5615
|
-
return href ? /* @__PURE__ */ jsx161(
|
|
5630
|
+
return href ? /* @__PURE__ */ jsx161(
|
|
5631
|
+
"a",
|
|
5632
|
+
{
|
|
5633
|
+
className: classes,
|
|
5634
|
+
href,
|
|
5635
|
+
...opensElsewhere ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
5636
|
+
children: content
|
|
5637
|
+
}
|
|
5638
|
+
) : /* @__PURE__ */ jsx161("div", { className: classes, children: content });
|
|
5616
5639
|
}
|
|
5617
5640
|
|
|
5618
5641
|
// src/components/CardTile/CardTile.tsx
|
|
@@ -6043,12 +6066,191 @@ function EmptyState({ icon, heading, description, action, className }) {
|
|
|
6043
6066
|
] });
|
|
6044
6067
|
}
|
|
6045
6068
|
|
|
6069
|
+
// src/components/LockedState/LockedState.tsx
|
|
6070
|
+
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
6071
|
+
function LockedState({ reason, appName, sharedBy, action, className }) {
|
|
6072
|
+
if (reason === "removed") {
|
|
6073
|
+
return /* @__PURE__ */ jsx172(
|
|
6074
|
+
EmptyState,
|
|
6075
|
+
{
|
|
6076
|
+
icon: "user-x",
|
|
6077
|
+
heading: "You no longer have access",
|
|
6078
|
+
description: sharedBy ? `${sharedBy} stopped sharing this with you. Ask them if you still need it.` : "This is no longer shared with you. Ask the person who shared it if you still need it.",
|
|
6079
|
+
action,
|
|
6080
|
+
className
|
|
6081
|
+
}
|
|
6082
|
+
);
|
|
6083
|
+
}
|
|
6084
|
+
return /* @__PURE__ */ jsx172(
|
|
6085
|
+
EmptyState,
|
|
6086
|
+
{
|
|
6087
|
+
icon: "lock",
|
|
6088
|
+
heading: "Unlock to see this",
|
|
6089
|
+
description: `${appName} keeps this encrypted, so only you and the people you share it with can read it. Unlock with your password or a passkey to open it on this browser.`,
|
|
6090
|
+
action,
|
|
6091
|
+
className
|
|
6092
|
+
}
|
|
6093
|
+
);
|
|
6094
|
+
}
|
|
6095
|
+
|
|
6096
|
+
// src/components/RecoveryKit/RecoveryKit.tsx
|
|
6097
|
+
import { useState as useState15 } from "react";
|
|
6098
|
+
|
|
6099
|
+
// src/components/Checkbox/Checkbox.tsx
|
|
6100
|
+
import styles49 from "./Checkbox.module.css";
|
|
6101
|
+
import { jsx as jsx173, jsxs as jsxs143 } from "react/jsx-runtime";
|
|
6102
|
+
function Checkbox({
|
|
6103
|
+
checked,
|
|
6104
|
+
onChange,
|
|
6105
|
+
label,
|
|
6106
|
+
strikeThrough = false,
|
|
6107
|
+
disabled,
|
|
6108
|
+
className,
|
|
6109
|
+
id,
|
|
6110
|
+
...rest
|
|
6111
|
+
}) {
|
|
6112
|
+
const inputId = id ?? `checkbox-${label.toLowerCase().replace(/\s+/g, "-")}`;
|
|
6113
|
+
return /* @__PURE__ */ jsxs143("span", { className: [styles49.root, className].filter(Boolean).join(" "), children: [
|
|
6114
|
+
/* @__PURE__ */ jsxs143("span", { className: [styles49.box, checked ? styles49.checked : ""].filter(Boolean).join(" "), children: [
|
|
6115
|
+
/* @__PURE__ */ jsx173(
|
|
6116
|
+
"input",
|
|
6117
|
+
{
|
|
6118
|
+
...rest,
|
|
6119
|
+
id: inputId,
|
|
6120
|
+
type: "checkbox",
|
|
6121
|
+
checked,
|
|
6122
|
+
disabled,
|
|
6123
|
+
className: styles49.input,
|
|
6124
|
+
onChange: (e) => onChange(e.target.checked)
|
|
6125
|
+
}
|
|
6126
|
+
),
|
|
6127
|
+
checked && /* @__PURE__ */ jsx173("svg", { className: styles49.tick, viewBox: "0 0 10 8", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx173(
|
|
6128
|
+
"path",
|
|
6129
|
+
{
|
|
6130
|
+
d: "M1 4l3 3 5-6",
|
|
6131
|
+
stroke: "currentColor",
|
|
6132
|
+
strokeWidth: "1.5",
|
|
6133
|
+
strokeLinecap: "round",
|
|
6134
|
+
strokeLinejoin: "round"
|
|
6135
|
+
}
|
|
6136
|
+
) })
|
|
6137
|
+
] }),
|
|
6138
|
+
label && /* @__PURE__ */ jsx173(
|
|
6139
|
+
"label",
|
|
6140
|
+
{
|
|
6141
|
+
htmlFor: inputId,
|
|
6142
|
+
className: [
|
|
6143
|
+
styles49.label,
|
|
6144
|
+
strikeThrough && checked ? styles49.struck : "",
|
|
6145
|
+
disabled ? styles49.disabled : ""
|
|
6146
|
+
].filter(Boolean).join(" "),
|
|
6147
|
+
children: label
|
|
6148
|
+
}
|
|
6149
|
+
)
|
|
6150
|
+
] });
|
|
6151
|
+
}
|
|
6152
|
+
|
|
6153
|
+
// src/components/RecoveryKit/RecoveryKit.tsx
|
|
6154
|
+
import styles50 from "./RecoveryKit.module.css";
|
|
6155
|
+
import { jsx as jsx174, jsxs as jsxs144 } from "react/jsx-runtime";
|
|
6156
|
+
function recoveryKitFileName(instanceName) {
|
|
6157
|
+
const slug = instanceName.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean).join("-");
|
|
6158
|
+
return `${slug || "sovereign"}-recovery-kit.txt`;
|
|
6159
|
+
}
|
|
6160
|
+
function recoveryKitFileText(kit, instanceName, ownerCanRecover = false) {
|
|
6161
|
+
return [
|
|
6162
|
+
`Recovery kit for ${instanceName}`,
|
|
6163
|
+
"",
|
|
6164
|
+
kit,
|
|
6165
|
+
"",
|
|
6166
|
+
ownerCanRecover ? `Keep this somewhere safe. If you forget your password and have no passkey, it is your own way back to your encrypted data. The owner of ${instanceName} can also recover it.` : "Keep this somewhere safe. If you forget your password and have no passkey, it is the only way back to your encrypted data.",
|
|
6167
|
+
""
|
|
6168
|
+
].join("\n");
|
|
6169
|
+
}
|
|
6170
|
+
function RecoveryKit({
|
|
6171
|
+
kit,
|
|
6172
|
+
instanceName,
|
|
6173
|
+
onContinue,
|
|
6174
|
+
continuing = false,
|
|
6175
|
+
ownerCanRecover = false,
|
|
6176
|
+
className
|
|
6177
|
+
}) {
|
|
6178
|
+
const [kept, setKept] = useState15(false);
|
|
6179
|
+
const groups = kit.split(/[\s-]+/).filter(Boolean);
|
|
6180
|
+
const save = () => {
|
|
6181
|
+
const url = URL.createObjectURL(
|
|
6182
|
+
new Blob([recoveryKitFileText(kit, instanceName, ownerCanRecover)], {
|
|
6183
|
+
type: "text/plain;charset=utf-8"
|
|
6184
|
+
})
|
|
6185
|
+
);
|
|
6186
|
+
const link = document.createElement("a");
|
|
6187
|
+
link.href = url;
|
|
6188
|
+
link.download = recoveryKitFileName(instanceName);
|
|
6189
|
+
link.click();
|
|
6190
|
+
URL.revokeObjectURL(url);
|
|
6191
|
+
};
|
|
6192
|
+
return /* @__PURE__ */ jsxs144(
|
|
6193
|
+
"section",
|
|
6194
|
+
{
|
|
6195
|
+
className: [styles50.root, className].filter(Boolean).join(" "),
|
|
6196
|
+
"aria-labelledby": "recovery-kit-heading",
|
|
6197
|
+
children: [
|
|
6198
|
+
/* @__PURE__ */ jsx174("h2", { id: "recovery-kit-heading", className: styles50.heading, children: "Save your recovery kit" }),
|
|
6199
|
+
ownerCanRecover ? /* @__PURE__ */ jsxs144("p", { className: styles50.explain, children: [
|
|
6200
|
+
"If you forget your password and have no passkey, this kit is your own way back to your encrypted data. The owner of ",
|
|
6201
|
+
instanceName,
|
|
6202
|
+
" has turned on recovery, so they can also recover it for you."
|
|
6203
|
+
] }) : /* @__PURE__ */ jsx174("p", { className: styles50.explain, children: "If you forget your password and have no passkey, this kit is the only way back to your encrypted data. Nobody else can get it back for you, not even this service\u2019s operators." }),
|
|
6204
|
+
/* @__PURE__ */ jsxs144("div", { className: styles50.printable, children: [
|
|
6205
|
+
/* @__PURE__ */ jsxs144("p", { className: styles50.printTitle, children: [
|
|
6206
|
+
"Recovery kit for ",
|
|
6207
|
+
instanceName
|
|
6208
|
+
] }),
|
|
6209
|
+
/* @__PURE__ */ jsx174("ol", { className: styles50.groups, "aria-label": "Your recovery kit, in groups of four", children: groups.map((group, index) => /* @__PURE__ */ jsx174(
|
|
6210
|
+
"li",
|
|
6211
|
+
{
|
|
6212
|
+
className: [styles50.group, index === groups.length - 1 ? styles50.check : ""].filter(Boolean).join(" "),
|
|
6213
|
+
"aria-label": [...group].join(" "),
|
|
6214
|
+
children: group
|
|
6215
|
+
},
|
|
6216
|
+
index
|
|
6217
|
+
)) }),
|
|
6218
|
+
/* @__PURE__ */ jsx174("p", { className: styles50.note, children: "The last group checks the others for typos." })
|
|
6219
|
+
] }),
|
|
6220
|
+
/* @__PURE__ */ jsxs144("div", { className: styles50.actions, children: [
|
|
6221
|
+
/* @__PURE__ */ jsx174(Button, { variant: "secondary", onClick: () => window.print(), children: "Print" }),
|
|
6222
|
+
/* @__PURE__ */ jsx174(Button, { variant: "secondary", onClick: save, children: "Save as a file" })
|
|
6223
|
+
] }),
|
|
6224
|
+
/* @__PURE__ */ jsx174(
|
|
6225
|
+
Checkbox,
|
|
6226
|
+
{
|
|
6227
|
+
id: "recovery-kit-kept",
|
|
6228
|
+
checked: kept,
|
|
6229
|
+
onChange: setKept,
|
|
6230
|
+
label: "I've kept my recovery kit somewhere safe"
|
|
6231
|
+
}
|
|
6232
|
+
),
|
|
6233
|
+
/* @__PURE__ */ jsx174(
|
|
6234
|
+
Button,
|
|
6235
|
+
{
|
|
6236
|
+
className: styles50.continue,
|
|
6237
|
+
disabled: !kept,
|
|
6238
|
+
loading: continuing,
|
|
6239
|
+
onClick: onContinue,
|
|
6240
|
+
children: continuing ? "Continuing\u2026" : "Continue"
|
|
6241
|
+
}
|
|
6242
|
+
)
|
|
6243
|
+
]
|
|
6244
|
+
}
|
|
6245
|
+
);
|
|
6246
|
+
}
|
|
6247
|
+
|
|
6046
6248
|
// src/components/OfflineGate/OfflineGate.tsx
|
|
6047
|
-
import { Fragment as Fragment9, jsx as
|
|
6249
|
+
import { Fragment as Fragment9, jsx as jsx175 } from "react/jsx-runtime";
|
|
6048
6250
|
function OfflineGate({ children, surfaceName, className }) {
|
|
6049
6251
|
const isOffline = useIsOffline();
|
|
6050
|
-
if (!isOffline) return /* @__PURE__ */
|
|
6051
|
-
return /* @__PURE__ */
|
|
6252
|
+
if (!isOffline) return /* @__PURE__ */ jsx175(Fragment9, { children });
|
|
6253
|
+
return /* @__PURE__ */ jsx175(
|
|
6052
6254
|
EmptyState,
|
|
6053
6255
|
{
|
|
6054
6256
|
icon: "alert-triangle",
|
|
@@ -6060,15 +6262,15 @@ function OfflineGate({ children, surfaceName, className }) {
|
|
|
6060
6262
|
}
|
|
6061
6263
|
|
|
6062
6264
|
// src/components/DeviceOnlyGate/DeviceOnlyGate.tsx
|
|
6063
|
-
import { Fragment as Fragment10, jsx as
|
|
6265
|
+
import { Fragment as Fragment10, jsx as jsx176 } from "react/jsx-runtime";
|
|
6064
6266
|
function DeviceOnlyGate({
|
|
6065
6267
|
children,
|
|
6066
6268
|
surfaceName,
|
|
6067
6269
|
available,
|
|
6068
6270
|
className
|
|
6069
6271
|
}) {
|
|
6070
|
-
if (available) return /* @__PURE__ */
|
|
6071
|
-
return /* @__PURE__ */
|
|
6272
|
+
if (available) return /* @__PURE__ */ jsx176(Fragment10, { children });
|
|
6273
|
+
return /* @__PURE__ */ jsx176(
|
|
6072
6274
|
EmptyState,
|
|
6073
6275
|
{
|
|
6074
6276
|
icon: "smartphone",
|
|
@@ -6080,7 +6282,7 @@ function DeviceOnlyGate({
|
|
|
6080
6282
|
}
|
|
6081
6283
|
|
|
6082
6284
|
// src/components/DeviceStorageKeyGate/DeviceStorageKeyGate.tsx
|
|
6083
|
-
import { Fragment as Fragment11, jsx as
|
|
6285
|
+
import { Fragment as Fragment11, jsx as jsx177 } from "react/jsx-runtime";
|
|
6084
6286
|
function DeviceStorageKeyGate({
|
|
6085
6287
|
children,
|
|
6086
6288
|
surfaceName,
|
|
@@ -6089,9 +6291,9 @@ function DeviceStorageKeyGate({
|
|
|
6089
6291
|
className
|
|
6090
6292
|
}) {
|
|
6091
6293
|
if (status === "checking") return null;
|
|
6092
|
-
if (status === "set-up") return /* @__PURE__ */
|
|
6294
|
+
if (status === "set-up") return /* @__PURE__ */ jsx177(Fragment11, { children });
|
|
6093
6295
|
if (status === "unsupported") {
|
|
6094
|
-
return /* @__PURE__ */
|
|
6296
|
+
return /* @__PURE__ */ jsx177(
|
|
6095
6297
|
EmptyState,
|
|
6096
6298
|
{
|
|
6097
6299
|
icon: "smartphone",
|
|
@@ -6102,7 +6304,7 @@ function DeviceStorageKeyGate({
|
|
|
6102
6304
|
);
|
|
6103
6305
|
}
|
|
6104
6306
|
if (status === "no-device-auth") {
|
|
6105
|
-
return /* @__PURE__ */
|
|
6307
|
+
return /* @__PURE__ */ jsx177(
|
|
6106
6308
|
EmptyState,
|
|
6107
6309
|
{
|
|
6108
6310
|
icon: "alert-triangle",
|
|
@@ -6112,7 +6314,7 @@ function DeviceStorageKeyGate({
|
|
|
6112
6314
|
}
|
|
6113
6315
|
);
|
|
6114
6316
|
}
|
|
6115
|
-
return /* @__PURE__ */
|
|
6317
|
+
return /* @__PURE__ */ jsx177(
|
|
6116
6318
|
EmptyState,
|
|
6117
6319
|
{
|
|
6118
6320
|
icon: "lock",
|
|
@@ -6125,31 +6327,31 @@ function DeviceStorageKeyGate({
|
|
|
6125
6327
|
}
|
|
6126
6328
|
|
|
6127
6329
|
// src/components/Avatar/Avatar.tsx
|
|
6128
|
-
import { useState as
|
|
6129
|
-
import
|
|
6130
|
-
import { jsx as
|
|
6330
|
+
import { useState as useState16 } from "react";
|
|
6331
|
+
import styles51 from "./Avatar.module.css";
|
|
6332
|
+
import { jsx as jsx178 } from "react/jsx-runtime";
|
|
6131
6333
|
function initials2(name) {
|
|
6132
6334
|
const parts = name.trim().split(/\s+/);
|
|
6133
6335
|
if (parts.length === 1) return (parts[0] ?? "").slice(0, 2).toUpperCase();
|
|
6134
6336
|
return ((parts[0]?.[0] ?? "") + (parts[parts.length - 1]?.[0] ?? "")).toUpperCase();
|
|
6135
6337
|
}
|
|
6136
6338
|
var sizeClass2 = {
|
|
6137
|
-
sm:
|
|
6138
|
-
md:
|
|
6139
|
-
lg:
|
|
6339
|
+
sm: styles51.sm,
|
|
6340
|
+
md: styles51.md,
|
|
6341
|
+
lg: styles51.lg
|
|
6140
6342
|
};
|
|
6141
6343
|
function Avatar({ name, src, size = "md", className }) {
|
|
6142
|
-
const [imgFailed, setImgFailed] =
|
|
6143
|
-
const cls = [
|
|
6344
|
+
const [imgFailed, setImgFailed] = useState16(false);
|
|
6345
|
+
const cls = [styles51.avatar, sizeClass2[size], className].filter(Boolean).join(" ");
|
|
6144
6346
|
if (src && !imgFailed) {
|
|
6145
|
-
return /* @__PURE__ */
|
|
6347
|
+
return /* @__PURE__ */ jsx178("span", { className: cls, "aria-label": name, children: /* @__PURE__ */ jsx178("img", { src, alt: name, className: styles51.img, onError: () => setImgFailed(true) }) });
|
|
6146
6348
|
}
|
|
6147
|
-
return /* @__PURE__ */
|
|
6349
|
+
return /* @__PURE__ */ jsx178("span", { className: cls, "aria-label": name, children: initials2(name) });
|
|
6148
6350
|
}
|
|
6149
6351
|
|
|
6150
6352
|
// src/components/AvatarStack/AvatarStack.tsx
|
|
6151
|
-
import
|
|
6152
|
-
import { jsx as
|
|
6353
|
+
import styles52 from "./AvatarStack.module.css";
|
|
6354
|
+
import { jsx as jsx179, jsxs as jsxs145 } from "react/jsx-runtime";
|
|
6153
6355
|
function namesOf(people) {
|
|
6154
6356
|
const names = people.map((person) => person.name.trim()).filter((name) => name !== "");
|
|
6155
6357
|
if (names.length <= 1) return names[0] ?? "";
|
|
@@ -6162,10 +6364,10 @@ function AvatarStack({ people, max = 4, size = "md", label, className }) {
|
|
|
6162
6364
|
const shown = hidden > 0 ? people.slice(0, limit) : people;
|
|
6163
6365
|
const names = namesOf(people);
|
|
6164
6366
|
const accessible = label ? `${label}: ${names}` : names;
|
|
6165
|
-
const cls = [
|
|
6166
|
-
return /* @__PURE__ */
|
|
6167
|
-
shown.map((person, index) => /* @__PURE__ */
|
|
6168
|
-
hidden > 0 ? /* @__PURE__ */
|
|
6367
|
+
const cls = [styles52.stack, styles52[size], className].filter(Boolean).join(" ");
|
|
6368
|
+
return /* @__PURE__ */ jsxs145("span", { className: cls, role: "img", "aria-label": accessible, children: [
|
|
6369
|
+
shown.map((person, index) => /* @__PURE__ */ jsx179("span", { className: styles52.item, "aria-hidden": "true", children: /* @__PURE__ */ jsx179(Avatar, { name: person.name, ...person.src ? { src: person.src } : {}, size }) }, `${index}:${person.name}`)),
|
|
6370
|
+
hidden > 0 ? /* @__PURE__ */ jsxs145("span", { className: `${styles52.item} ${styles52.more}`, "aria-hidden": "true", children: [
|
|
6169
6371
|
"+",
|
|
6170
6372
|
hidden
|
|
6171
6373
|
] }) : null
|
|
@@ -6174,22 +6376,22 @@ function AvatarStack({ people, max = 4, size = "md", label, className }) {
|
|
|
6174
6376
|
|
|
6175
6377
|
// src/components/NavTabs/NavTabs.tsx
|
|
6176
6378
|
import { Fragment as Fragment12 } from "react";
|
|
6177
|
-
import
|
|
6178
|
-
import { jsx as
|
|
6379
|
+
import styles53 from "./NavTabs.module.css";
|
|
6380
|
+
import { jsx as jsx180 } from "react/jsx-runtime";
|
|
6179
6381
|
function NavTabs({ items, className, "aria-label": ariaLabel, renderLink }) {
|
|
6180
|
-
return /* @__PURE__ */
|
|
6382
|
+
return /* @__PURE__ */ jsx180(
|
|
6181
6383
|
"nav",
|
|
6182
6384
|
{
|
|
6183
|
-
className: [
|
|
6385
|
+
className: [styles53.nav, className].filter(Boolean).join(" "),
|
|
6184
6386
|
"aria-label": ariaLabel ?? "Page navigation",
|
|
6185
6387
|
children: items.map((item) => {
|
|
6186
6388
|
const linkProps = {
|
|
6187
6389
|
href: item.href,
|
|
6188
|
-
className: [
|
|
6390
|
+
className: [styles53.link, item.active && styles53.active].filter(Boolean).join(" "),
|
|
6189
6391
|
"aria-current": item.active ? "page" : void 0,
|
|
6190
6392
|
children: item.label
|
|
6191
6393
|
};
|
|
6192
|
-
return /* @__PURE__ */
|
|
6394
|
+
return /* @__PURE__ */ jsx180(Fragment12, { children: renderLink ? renderLink(item, linkProps) : /* @__PURE__ */ jsx180(
|
|
6193
6395
|
"a",
|
|
6194
6396
|
{
|
|
6195
6397
|
href: linkProps.href,
|
|
@@ -6205,80 +6407,26 @@ function NavTabs({ items, className, "aria-label": ariaLabel, renderLink }) {
|
|
|
6205
6407
|
|
|
6206
6408
|
// src/components/Tooltip/Tooltip.tsx
|
|
6207
6409
|
import { useId as useId5 } from "react";
|
|
6208
|
-
import
|
|
6209
|
-
import { jsx as
|
|
6410
|
+
import styles54 from "./Tooltip.module.css";
|
|
6411
|
+
import { jsx as jsx181, jsxs as jsxs146 } from "react/jsx-runtime";
|
|
6210
6412
|
var sideClass = {
|
|
6211
|
-
top:
|
|
6212
|
-
bottom:
|
|
6213
|
-
left:
|
|
6214
|
-
right:
|
|
6413
|
+
top: styles54.top,
|
|
6414
|
+
bottom: styles54.bottom,
|
|
6415
|
+
left: styles54.left,
|
|
6416
|
+
right: styles54.right
|
|
6215
6417
|
};
|
|
6216
6418
|
function Tooltip({ content, children, side = "top" }) {
|
|
6217
6419
|
const tipId = useId5();
|
|
6218
|
-
return /* @__PURE__ */
|
|
6219
|
-
/* @__PURE__ */
|
|
6220
|
-
/* @__PURE__ */
|
|
6221
|
-
] });
|
|
6222
|
-
}
|
|
6223
|
-
|
|
6224
|
-
// src/components/Checkbox/Checkbox.tsx
|
|
6225
|
-
import styles53 from "./Checkbox.module.css";
|
|
6226
|
-
import { jsx as jsx179, jsxs as jsxs145 } from "react/jsx-runtime";
|
|
6227
|
-
function Checkbox({
|
|
6228
|
-
checked,
|
|
6229
|
-
onChange,
|
|
6230
|
-
label,
|
|
6231
|
-
strikeThrough = false,
|
|
6232
|
-
disabled,
|
|
6233
|
-
className,
|
|
6234
|
-
id,
|
|
6235
|
-
...rest
|
|
6236
|
-
}) {
|
|
6237
|
-
const inputId = id ?? `checkbox-${label.toLowerCase().replace(/\s+/g, "-")}`;
|
|
6238
|
-
return /* @__PURE__ */ jsxs145("span", { className: [styles53.root, className].filter(Boolean).join(" "), children: [
|
|
6239
|
-
/* @__PURE__ */ jsxs145("span", { className: [styles53.box, checked ? styles53.checked : ""].filter(Boolean).join(" "), children: [
|
|
6240
|
-
/* @__PURE__ */ jsx179(
|
|
6241
|
-
"input",
|
|
6242
|
-
{
|
|
6243
|
-
...rest,
|
|
6244
|
-
id: inputId,
|
|
6245
|
-
type: "checkbox",
|
|
6246
|
-
checked,
|
|
6247
|
-
disabled,
|
|
6248
|
-
className: styles53.input,
|
|
6249
|
-
onChange: (e) => onChange(e.target.checked)
|
|
6250
|
-
}
|
|
6251
|
-
),
|
|
6252
|
-
checked && /* @__PURE__ */ jsx179("svg", { className: styles53.tick, viewBox: "0 0 10 8", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx179(
|
|
6253
|
-
"path",
|
|
6254
|
-
{
|
|
6255
|
-
d: "M1 4l3 3 5-6",
|
|
6256
|
-
stroke: "currentColor",
|
|
6257
|
-
strokeWidth: "1.5",
|
|
6258
|
-
strokeLinecap: "round",
|
|
6259
|
-
strokeLinejoin: "round"
|
|
6260
|
-
}
|
|
6261
|
-
) })
|
|
6262
|
-
] }),
|
|
6263
|
-
label && /* @__PURE__ */ jsx179(
|
|
6264
|
-
"label",
|
|
6265
|
-
{
|
|
6266
|
-
htmlFor: inputId,
|
|
6267
|
-
className: [
|
|
6268
|
-
styles53.label,
|
|
6269
|
-
strikeThrough && checked ? styles53.struck : "",
|
|
6270
|
-
disabled ? styles53.disabled : ""
|
|
6271
|
-
].filter(Boolean).join(" "),
|
|
6272
|
-
children: label
|
|
6273
|
-
}
|
|
6274
|
-
)
|
|
6420
|
+
return /* @__PURE__ */ jsxs146("span", { className: styles54.wrapper, children: [
|
|
6421
|
+
/* @__PURE__ */ jsx181("span", { "aria-describedby": tipId, children }),
|
|
6422
|
+
/* @__PURE__ */ jsx181("span", { id: tipId, role: "tooltip", className: [styles54.tip, sideClass[side]].join(" "), children: content })
|
|
6275
6423
|
] });
|
|
6276
6424
|
}
|
|
6277
6425
|
|
|
6278
6426
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
6279
6427
|
import { useId as useId6 } from "react";
|
|
6280
|
-
import
|
|
6281
|
-
import { jsx as
|
|
6428
|
+
import styles55 from "./RadioGroup.module.css";
|
|
6429
|
+
import { jsx as jsx182, jsxs as jsxs147 } from "react/jsx-runtime";
|
|
6282
6430
|
function RadioGroup({
|
|
6283
6431
|
items,
|
|
6284
6432
|
value,
|
|
@@ -6295,7 +6443,7 @@ function RadioGroup({
|
|
|
6295
6443
|
}) {
|
|
6296
6444
|
const generatedName = useId6();
|
|
6297
6445
|
const groupName = name ?? generatedName;
|
|
6298
|
-
return /* @__PURE__ */
|
|
6446
|
+
return /* @__PURE__ */ jsx182(
|
|
6299
6447
|
"div",
|
|
6300
6448
|
{
|
|
6301
6449
|
id,
|
|
@@ -6305,19 +6453,19 @@ function RadioGroup({
|
|
|
6305
6453
|
"aria-describedby": ariaDescribedBy,
|
|
6306
6454
|
"aria-invalid": ariaInvalid,
|
|
6307
6455
|
"aria-required": required,
|
|
6308
|
-
className: [
|
|
6456
|
+
className: [styles55.root, className].filter(Boolean).join(" "),
|
|
6309
6457
|
children: items.map((item) => {
|
|
6310
6458
|
const checked = item.value === value;
|
|
6311
6459
|
const itemDisabled = disabled || item.disabled;
|
|
6312
6460
|
const inputId = `${groupName}-${item.value}`;
|
|
6313
|
-
return /* @__PURE__ */
|
|
6461
|
+
return /* @__PURE__ */ jsxs147(
|
|
6314
6462
|
"label",
|
|
6315
6463
|
{
|
|
6316
6464
|
htmlFor: inputId,
|
|
6317
|
-
className: [
|
|
6465
|
+
className: [styles55.option, itemDisabled ? styles55.disabled : ""].filter(Boolean).join(" "),
|
|
6318
6466
|
children: [
|
|
6319
|
-
/* @__PURE__ */
|
|
6320
|
-
/* @__PURE__ */
|
|
6467
|
+
/* @__PURE__ */ jsxs147("span", { className: [styles55.circle, checked ? styles55.checked : ""].join(" "), children: [
|
|
6468
|
+
/* @__PURE__ */ jsx182(
|
|
6321
6469
|
"input",
|
|
6322
6470
|
{
|
|
6323
6471
|
id: inputId,
|
|
@@ -6327,13 +6475,13 @@ function RadioGroup({
|
|
|
6327
6475
|
checked,
|
|
6328
6476
|
disabled: itemDisabled,
|
|
6329
6477
|
required,
|
|
6330
|
-
className:
|
|
6478
|
+
className: styles55.input,
|
|
6331
6479
|
onChange: () => onChange(item.value)
|
|
6332
6480
|
}
|
|
6333
6481
|
),
|
|
6334
|
-
checked && /* @__PURE__ */
|
|
6482
|
+
checked && /* @__PURE__ */ jsx182("span", { className: styles55.dot })
|
|
6335
6483
|
] }),
|
|
6336
|
-
/* @__PURE__ */
|
|
6484
|
+
/* @__PURE__ */ jsx182("span", { className: styles55.optionLabel, children: item.label })
|
|
6337
6485
|
]
|
|
6338
6486
|
},
|
|
6339
6487
|
item.value
|
|
@@ -6345,8 +6493,8 @@ function RadioGroup({
|
|
|
6345
6493
|
|
|
6346
6494
|
// src/components/Slider/Slider.tsx
|
|
6347
6495
|
import { useId as useId7 } from "react";
|
|
6348
|
-
import
|
|
6349
|
-
import { jsx as
|
|
6496
|
+
import styles56 from "./Slider.module.css";
|
|
6497
|
+
import { jsx as jsx183, jsxs as jsxs148 } from "react/jsx-runtime";
|
|
6350
6498
|
function Slider({
|
|
6351
6499
|
value,
|
|
6352
6500
|
onChange,
|
|
@@ -6365,9 +6513,9 @@ function Slider({
|
|
|
6365
6513
|
const generatedId = useId7();
|
|
6366
6514
|
const inputId = id ?? generatedId;
|
|
6367
6515
|
const fillPercent = max > min ? (value - min) / (max - min) * 100 : 0;
|
|
6368
|
-
return /* @__PURE__ */
|
|
6369
|
-
label && /* @__PURE__ */
|
|
6370
|
-
/* @__PURE__ */
|
|
6516
|
+
return /* @__PURE__ */ jsxs148("div", { className: [styles56.root, className].filter(Boolean).join(" "), children: [
|
|
6517
|
+
label && /* @__PURE__ */ jsx183("label", { htmlFor: inputId, className: styles56.label, children: label }),
|
|
6518
|
+
/* @__PURE__ */ jsx183(
|
|
6371
6519
|
"input",
|
|
6372
6520
|
{
|
|
6373
6521
|
id: inputId,
|
|
@@ -6381,7 +6529,7 @@ function Slider({
|
|
|
6381
6529
|
"aria-label": label ? void 0 : ariaLabel,
|
|
6382
6530
|
"aria-describedby": ariaDescribedBy,
|
|
6383
6531
|
"aria-invalid": ariaInvalid,
|
|
6384
|
-
className:
|
|
6532
|
+
className: styles56.slider,
|
|
6385
6533
|
style: { "--slider-fill": `${fillPercent}%` },
|
|
6386
6534
|
onChange: (e) => onChange(Number(e.target.value))
|
|
6387
6535
|
}
|
|
@@ -6390,11 +6538,11 @@ function Slider({
|
|
|
6390
6538
|
}
|
|
6391
6539
|
|
|
6392
6540
|
// src/components/Progress/Progress.tsx
|
|
6393
|
-
import
|
|
6394
|
-
import { jsx as
|
|
6541
|
+
import styles57 from "./Progress.module.css";
|
|
6542
|
+
import { jsx as jsx184 } from "react/jsx-runtime";
|
|
6395
6543
|
function Progress({ value, label, id, className }) {
|
|
6396
6544
|
const clamped = Math.min(100, Math.max(0, value));
|
|
6397
|
-
return /* @__PURE__ */
|
|
6545
|
+
return /* @__PURE__ */ jsx184(
|
|
6398
6546
|
"div",
|
|
6399
6547
|
{
|
|
6400
6548
|
id,
|
|
@@ -6403,37 +6551,37 @@ function Progress({ value, label, id, className }) {
|
|
|
6403
6551
|
"aria-valuemin": 0,
|
|
6404
6552
|
"aria-valuemax": 100,
|
|
6405
6553
|
"aria-label": label,
|
|
6406
|
-
className: [
|
|
6407
|
-
children: /* @__PURE__ */
|
|
6554
|
+
className: [styles57.track, className].filter(Boolean).join(" "),
|
|
6555
|
+
children: /* @__PURE__ */ jsx184("div", { className: styles57.fill, style: { width: `${clamped}%` } })
|
|
6408
6556
|
}
|
|
6409
6557
|
);
|
|
6410
6558
|
}
|
|
6411
6559
|
|
|
6412
6560
|
// src/components/Table/Table.tsx
|
|
6413
|
-
import
|
|
6414
|
-
import { jsx as
|
|
6561
|
+
import styles58 from "./Table.module.css";
|
|
6562
|
+
import { jsx as jsx185 } from "react/jsx-runtime";
|
|
6415
6563
|
function Table({ children, className }) {
|
|
6416
|
-
return /* @__PURE__ */
|
|
6564
|
+
return /* @__PURE__ */ jsx185("div", { className: styles58.scrollContainer, children: /* @__PURE__ */ jsx185("table", { className: [styles58.table, className].filter(Boolean).join(" "), children }) });
|
|
6417
6565
|
}
|
|
6418
6566
|
function TableHead({ children }) {
|
|
6419
|
-
return /* @__PURE__ */
|
|
6567
|
+
return /* @__PURE__ */ jsx185("thead", { className: styles58.head, children });
|
|
6420
6568
|
}
|
|
6421
6569
|
function TableBody({ children }) {
|
|
6422
|
-
return /* @__PURE__ */
|
|
6570
|
+
return /* @__PURE__ */ jsx185("tbody", { className: styles58.body, children });
|
|
6423
6571
|
}
|
|
6424
6572
|
function TableRow({ children }) {
|
|
6425
|
-
return /* @__PURE__ */
|
|
6573
|
+
return /* @__PURE__ */ jsx185("tr", { className: styles58.row, children });
|
|
6426
6574
|
}
|
|
6427
6575
|
function TableHeaderCell({ children, ...rest }) {
|
|
6428
|
-
return /* @__PURE__ */
|
|
6576
|
+
return /* @__PURE__ */ jsx185("th", { className: styles58.th, ...rest, children });
|
|
6429
6577
|
}
|
|
6430
6578
|
function TableCell({ children, ...rest }) {
|
|
6431
|
-
return /* @__PURE__ */
|
|
6579
|
+
return /* @__PURE__ */ jsx185("td", { className: styles58.td, ...rest, children });
|
|
6432
6580
|
}
|
|
6433
6581
|
|
|
6434
6582
|
// src/components/Alert/Alert.tsx
|
|
6435
|
-
import
|
|
6436
|
-
import { jsx as
|
|
6583
|
+
import styles59 from "./Alert.module.css";
|
|
6584
|
+
import { jsx as jsx186, jsxs as jsxs149 } from "react/jsx-runtime";
|
|
6437
6585
|
var DEFAULT_ICON = {
|
|
6438
6586
|
info: "info",
|
|
6439
6587
|
success: "circle-check",
|
|
@@ -6443,17 +6591,17 @@ var DEFAULT_ICON = {
|
|
|
6443
6591
|
};
|
|
6444
6592
|
function Alert({ variant, heading, icon, children, id, className }) {
|
|
6445
6593
|
const resolvedIcon = icon === void 0 ? DEFAULT_ICON[variant] : icon || void 0;
|
|
6446
|
-
return /* @__PURE__ */
|
|
6594
|
+
return /* @__PURE__ */ jsxs149(
|
|
6447
6595
|
"div",
|
|
6448
6596
|
{
|
|
6449
6597
|
id,
|
|
6450
6598
|
role: variant === "error" ? "alert" : "status",
|
|
6451
|
-
className: [
|
|
6599
|
+
className: [styles59.alert, styles59[variant], className].filter(Boolean).join(" "),
|
|
6452
6600
|
children: [
|
|
6453
|
-
resolvedIcon && /* @__PURE__ */
|
|
6454
|
-
/* @__PURE__ */
|
|
6455
|
-
heading && /* @__PURE__ */
|
|
6456
|
-
/* @__PURE__ */
|
|
6601
|
+
resolvedIcon && /* @__PURE__ */ jsx186(Icon, { name: resolvedIcon, size: "sm", className: styles59.icon, "aria-hidden": true }),
|
|
6602
|
+
/* @__PURE__ */ jsxs149("div", { className: styles59.content, children: [
|
|
6603
|
+
heading && /* @__PURE__ */ jsx186("p", { className: styles59.heading, children: heading }),
|
|
6604
|
+
/* @__PURE__ */ jsx186("div", { className: styles59.body, children })
|
|
6457
6605
|
] })
|
|
6458
6606
|
]
|
|
6459
6607
|
}
|
|
@@ -6461,26 +6609,26 @@ function Alert({ variant, heading, icon, children, id, className }) {
|
|
|
6461
6609
|
}
|
|
6462
6610
|
|
|
6463
6611
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
6464
|
-
import
|
|
6465
|
-
import { jsx as
|
|
6612
|
+
import styles60 from "./Breadcrumb.module.css";
|
|
6613
|
+
import { jsx as jsx187, jsxs as jsxs150 } from "react/jsx-runtime";
|
|
6466
6614
|
function Breadcrumb({
|
|
6467
6615
|
items,
|
|
6468
6616
|
renderLink,
|
|
6469
6617
|
className,
|
|
6470
6618
|
"aria-label": ariaLabel = "Breadcrumb"
|
|
6471
6619
|
}) {
|
|
6472
|
-
return /* @__PURE__ */
|
|
6620
|
+
return /* @__PURE__ */ jsx187("nav", { "aria-label": ariaLabel, className: [styles60.nav, className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsx187("ol", { className: styles60.list, children: items.map((item, index) => {
|
|
6473
6621
|
const isLast = index === items.length - 1;
|
|
6474
|
-
return /* @__PURE__ */
|
|
6475
|
-
item.href ? renderLink ? renderLink(item, item.label) : /* @__PURE__ */
|
|
6476
|
-
!isLast && /* @__PURE__ */
|
|
6622
|
+
return /* @__PURE__ */ jsxs150("li", { className: styles60.item, children: [
|
|
6623
|
+
item.href ? renderLink ? renderLink(item, item.label) : /* @__PURE__ */ jsx187("a", { href: item.href, className: styles60.link, children: item.label }) : /* @__PURE__ */ jsx187("span", { className: styles60.current, "aria-current": "page", children: item.label }),
|
|
6624
|
+
!isLast && /* @__PURE__ */ jsx187(Icon, { name: "chevron-right", size: "xs", "aria-hidden": true, className: styles60.separator })
|
|
6477
6625
|
] }, item.label + index);
|
|
6478
6626
|
}) }) });
|
|
6479
6627
|
}
|
|
6480
6628
|
|
|
6481
6629
|
// src/components/Pagination/Pagination.tsx
|
|
6482
|
-
import
|
|
6483
|
-
import { jsx as
|
|
6630
|
+
import styles61 from "./Pagination.module.css";
|
|
6631
|
+
import { jsx as jsx188, jsxs as jsxs151 } from "react/jsx-runtime";
|
|
6484
6632
|
function getPageList(page, totalPages) {
|
|
6485
6633
|
if (totalPages <= 1) return [1];
|
|
6486
6634
|
const siblingCount = 1;
|
|
@@ -6503,24 +6651,24 @@ function Pagination({
|
|
|
6503
6651
|
"aria-label": ariaLabel = "Pagination"
|
|
6504
6652
|
}) {
|
|
6505
6653
|
const pages = getPageList(page, totalPages);
|
|
6506
|
-
return /* @__PURE__ */
|
|
6507
|
-
/* @__PURE__ */
|
|
6654
|
+
return /* @__PURE__ */ jsxs151("nav", { "aria-label": ariaLabel, className: [styles61.nav, className].filter(Boolean).join(" "), children: [
|
|
6655
|
+
/* @__PURE__ */ jsx188(
|
|
6508
6656
|
"button",
|
|
6509
6657
|
{
|
|
6510
6658
|
type: "button",
|
|
6511
|
-
className:
|
|
6659
|
+
className: styles61.navButton,
|
|
6512
6660
|
onClick: () => onChange(page - 1),
|
|
6513
6661
|
disabled: page <= 1,
|
|
6514
6662
|
"aria-label": "Previous page",
|
|
6515
|
-
children: /* @__PURE__ */
|
|
6663
|
+
children: /* @__PURE__ */ jsx188(Icon, { name: "chevron-left", size: "sm", "aria-hidden": true })
|
|
6516
6664
|
}
|
|
6517
6665
|
),
|
|
6518
|
-
/* @__PURE__ */
|
|
6519
|
-
(p, index) => p === "ellipsis" ? /* @__PURE__ */
|
|
6666
|
+
/* @__PURE__ */ jsx188("ul", { className: styles61.list, children: pages.map(
|
|
6667
|
+
(p, index) => p === "ellipsis" ? /* @__PURE__ */ jsx188("li", { className: styles61.ellipsis, "aria-hidden": "true", children: "\u2026" }, `ellipsis-${index}`) : /* @__PURE__ */ jsx188("li", { children: /* @__PURE__ */ jsx188(
|
|
6520
6668
|
"button",
|
|
6521
6669
|
{
|
|
6522
6670
|
type: "button",
|
|
6523
|
-
className: [
|
|
6671
|
+
className: [styles61.pageButton, p === page ? styles61.active : ""].filter(Boolean).join(" "),
|
|
6524
6672
|
onClick: () => onChange(p),
|
|
6525
6673
|
"aria-current": p === page ? "page" : void 0,
|
|
6526
6674
|
"aria-label": `Page ${p}`,
|
|
@@ -6528,31 +6676,31 @@ function Pagination({
|
|
|
6528
6676
|
}
|
|
6529
6677
|
) }, p)
|
|
6530
6678
|
) }),
|
|
6531
|
-
/* @__PURE__ */
|
|
6679
|
+
/* @__PURE__ */ jsx188(
|
|
6532
6680
|
"button",
|
|
6533
6681
|
{
|
|
6534
6682
|
type: "button",
|
|
6535
|
-
className:
|
|
6683
|
+
className: styles61.navButton,
|
|
6536
6684
|
onClick: () => onChange(page + 1),
|
|
6537
6685
|
disabled: page >= totalPages,
|
|
6538
6686
|
"aria-label": "Next page",
|
|
6539
|
-
children: /* @__PURE__ */
|
|
6687
|
+
children: /* @__PURE__ */ jsx188(Icon, { name: "chevron-right", size: "sm", "aria-hidden": true })
|
|
6540
6688
|
}
|
|
6541
6689
|
)
|
|
6542
6690
|
] });
|
|
6543
6691
|
}
|
|
6544
6692
|
|
|
6545
6693
|
// src/components/Kbd/Kbd.tsx
|
|
6546
|
-
import
|
|
6547
|
-
import { jsx as
|
|
6694
|
+
import styles62 from "./Kbd.module.css";
|
|
6695
|
+
import { jsx as jsx189 } from "react/jsx-runtime";
|
|
6548
6696
|
function Kbd({ children, className }) {
|
|
6549
|
-
return /* @__PURE__ */
|
|
6697
|
+
return /* @__PURE__ */ jsx189("kbd", { className: [styles62.kbd, className].filter(Boolean).join(" "), children });
|
|
6550
6698
|
}
|
|
6551
6699
|
|
|
6552
6700
|
// src/components/Collapsible/Collapsible.tsx
|
|
6553
6701
|
import { useId as useId8 } from "react";
|
|
6554
|
-
import
|
|
6555
|
-
import { jsx as
|
|
6702
|
+
import styles63 from "./Collapsible.module.css";
|
|
6703
|
+
import { jsx as jsx190, jsxs as jsxs152 } from "react/jsx-runtime";
|
|
6556
6704
|
function Collapsible({
|
|
6557
6705
|
open,
|
|
6558
6706
|
onOpenChange,
|
|
@@ -6563,45 +6711,45 @@ function Collapsible({
|
|
|
6563
6711
|
}) {
|
|
6564
6712
|
const generatedId = useId8();
|
|
6565
6713
|
const contentId = `${id ?? generatedId}-content`;
|
|
6566
|
-
return /* @__PURE__ */
|
|
6567
|
-
/* @__PURE__ */
|
|
6714
|
+
return /* @__PURE__ */ jsxs152("div", { className: [styles63.root, className].filter(Boolean).join(" "), children: [
|
|
6715
|
+
/* @__PURE__ */ jsxs152(
|
|
6568
6716
|
"button",
|
|
6569
6717
|
{
|
|
6570
6718
|
type: "button",
|
|
6571
|
-
className:
|
|
6719
|
+
className: styles63.trigger,
|
|
6572
6720
|
"aria-expanded": open,
|
|
6573
6721
|
"aria-controls": contentId,
|
|
6574
6722
|
onClick: () => onOpenChange(!open),
|
|
6575
6723
|
children: [
|
|
6576
|
-
/* @__PURE__ */
|
|
6577
|
-
/* @__PURE__ */
|
|
6724
|
+
/* @__PURE__ */ jsx190("span", { className: styles63.triggerLabel, children: trigger }),
|
|
6725
|
+
/* @__PURE__ */ jsx190(
|
|
6578
6726
|
Icon,
|
|
6579
6727
|
{
|
|
6580
6728
|
name: "chevron-down",
|
|
6581
6729
|
size: "sm",
|
|
6582
6730
|
"aria-hidden": true,
|
|
6583
|
-
className: [
|
|
6731
|
+
className: [styles63.chevron, open ? styles63.chevronOpen : ""].filter(Boolean).join(" ")
|
|
6584
6732
|
}
|
|
6585
6733
|
)
|
|
6586
6734
|
]
|
|
6587
6735
|
}
|
|
6588
6736
|
),
|
|
6589
|
-
/* @__PURE__ */
|
|
6737
|
+
/* @__PURE__ */ jsx190(
|
|
6590
6738
|
"div",
|
|
6591
6739
|
{
|
|
6592
6740
|
id: contentId,
|
|
6593
|
-
className:
|
|
6741
|
+
className: styles63.contentWrapper,
|
|
6594
6742
|
"data-open": open,
|
|
6595
6743
|
inert: !open || void 0,
|
|
6596
|
-
children: /* @__PURE__ */
|
|
6744
|
+
children: /* @__PURE__ */ jsx190("div", { className: styles63.contentInner, children })
|
|
6597
6745
|
}
|
|
6598
6746
|
)
|
|
6599
6747
|
] });
|
|
6600
6748
|
}
|
|
6601
6749
|
|
|
6602
6750
|
// src/components/Accordion/Accordion.tsx
|
|
6603
|
-
import
|
|
6604
|
-
import { jsx as
|
|
6751
|
+
import styles64 from "./Accordion.module.css";
|
|
6752
|
+
import { jsx as jsx191 } from "react/jsx-runtime";
|
|
6605
6753
|
function Accordion({ items, type, openIds, onOpenIdsChange, className }) {
|
|
6606
6754
|
function handleOpenChange(id, open) {
|
|
6607
6755
|
if (type === "single") {
|
|
@@ -6610,7 +6758,7 @@ function Accordion({ items, type, openIds, onOpenIdsChange, className }) {
|
|
|
6610
6758
|
}
|
|
6611
6759
|
onOpenIdsChange(open ? [...openIds, id] : openIds.filter((openId) => openId !== id));
|
|
6612
6760
|
}
|
|
6613
|
-
return /* @__PURE__ */
|
|
6761
|
+
return /* @__PURE__ */ jsx191("div", { className: [styles64.root, className].filter(Boolean).join(" "), children: items.map((item) => /* @__PURE__ */ jsx191(
|
|
6614
6762
|
Collapsible,
|
|
6615
6763
|
{
|
|
6616
6764
|
id: item.id,
|
|
@@ -6624,13 +6772,13 @@ function Accordion({ items, type, openIds, onOpenIdsChange, className }) {
|
|
|
6624
6772
|
}
|
|
6625
6773
|
|
|
6626
6774
|
// src/components/AspectRatio/AspectRatio.tsx
|
|
6627
|
-
import
|
|
6628
|
-
import { jsx as
|
|
6775
|
+
import styles65 from "./AspectRatio.module.css";
|
|
6776
|
+
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
6629
6777
|
function AspectRatio({ ratio, children, className }) {
|
|
6630
|
-
return /* @__PURE__ */
|
|
6778
|
+
return /* @__PURE__ */ jsx192(
|
|
6631
6779
|
"div",
|
|
6632
6780
|
{
|
|
6633
|
-
className: [
|
|
6781
|
+
className: [styles65.root, className].filter(Boolean).join(" "),
|
|
6634
6782
|
style: { aspectRatio: ratio },
|
|
6635
6783
|
children
|
|
6636
6784
|
}
|
|
@@ -6638,8 +6786,8 @@ function AspectRatio({ ratio, children, className }) {
|
|
|
6638
6786
|
}
|
|
6639
6787
|
|
|
6640
6788
|
// src/components/ButtonLink/ButtonLink.tsx
|
|
6641
|
-
import
|
|
6642
|
-
import { jsx as
|
|
6789
|
+
import styles66 from "./Button.module.css";
|
|
6790
|
+
import { jsx as jsx193 } from "react/jsx-runtime";
|
|
6643
6791
|
function ButtonLink({
|
|
6644
6792
|
variant = "primary",
|
|
6645
6793
|
size = "md",
|
|
@@ -6648,29 +6796,29 @@ function ButtonLink({
|
|
|
6648
6796
|
renderLink,
|
|
6649
6797
|
...rest
|
|
6650
6798
|
}) {
|
|
6651
|
-
const classes = [
|
|
6799
|
+
const classes = [styles66.button, styles66[variant], styles66[size], styles66.link, className].filter(Boolean).join(" ");
|
|
6652
6800
|
const props = { ...rest, className: classes, children };
|
|
6653
|
-
return renderLink ? renderLink(props) : /* @__PURE__ */
|
|
6801
|
+
return renderLink ? renderLink(props) : /* @__PURE__ */ jsx193("a", { ...rest, className: classes, children });
|
|
6654
6802
|
}
|
|
6655
6803
|
|
|
6656
6804
|
// src/components/ButtonGroup/ButtonGroup.tsx
|
|
6657
|
-
import
|
|
6658
|
-
import { jsx as
|
|
6805
|
+
import styles67 from "./ButtonGroup.module.css";
|
|
6806
|
+
import { jsx as jsx194 } from "react/jsx-runtime";
|
|
6659
6807
|
function ButtonGroup({ children, className, "aria-label": ariaLabel }) {
|
|
6660
|
-
return /* @__PURE__ */
|
|
6808
|
+
return /* @__PURE__ */ jsx194(
|
|
6661
6809
|
"div",
|
|
6662
6810
|
{
|
|
6663
6811
|
role: "group",
|
|
6664
6812
|
"aria-label": ariaLabel,
|
|
6665
|
-
className: [
|
|
6813
|
+
className: [styles67.root, className].filter(Boolean).join(" "),
|
|
6666
6814
|
children
|
|
6667
6815
|
}
|
|
6668
6816
|
);
|
|
6669
6817
|
}
|
|
6670
6818
|
|
|
6671
6819
|
// src/components/Item/Item.tsx
|
|
6672
|
-
import
|
|
6673
|
-
import { Fragment as Fragment13, jsx as
|
|
6820
|
+
import styles68 from "./Item.module.css";
|
|
6821
|
+
import { Fragment as Fragment13, jsx as jsx195, jsxs as jsxs153 } from "react/jsx-runtime";
|
|
6674
6822
|
function Item({
|
|
6675
6823
|
leading,
|
|
6676
6824
|
title,
|
|
@@ -6681,29 +6829,29 @@ function Item({
|
|
|
6681
6829
|
className
|
|
6682
6830
|
}) {
|
|
6683
6831
|
const interactive = Boolean(onClick);
|
|
6684
|
-
const classes = [
|
|
6685
|
-
const content = /* @__PURE__ */
|
|
6686
|
-
leading && /* @__PURE__ */
|
|
6687
|
-
/* @__PURE__ */
|
|
6688
|
-
/* @__PURE__ */
|
|
6689
|
-
description && /* @__PURE__ */
|
|
6832
|
+
const classes = [styles68.root, interactive ? styles68.interactive : "", className].filter(Boolean).join(" ");
|
|
6833
|
+
const content = /* @__PURE__ */ jsxs153(Fragment13, { children: [
|
|
6834
|
+
leading && /* @__PURE__ */ jsx195("span", { className: styles68.leading, children: leading }),
|
|
6835
|
+
/* @__PURE__ */ jsxs153("span", { className: styles68.content, children: [
|
|
6836
|
+
/* @__PURE__ */ jsx195("span", { className: styles68.title, children: title }),
|
|
6837
|
+
description && /* @__PURE__ */ jsx195("span", { className: styles68.description, children: description })
|
|
6690
6838
|
] }),
|
|
6691
|
-
trailing && /* @__PURE__ */
|
|
6839
|
+
trailing && /* @__PURE__ */ jsx195("span", { className: styles68.trailing, children: trailing })
|
|
6692
6840
|
] });
|
|
6693
6841
|
if (interactive) {
|
|
6694
|
-
return /* @__PURE__ */
|
|
6842
|
+
return /* @__PURE__ */ jsx195("button", { type: "button", onClick, disabled, className: classes, children: content });
|
|
6695
6843
|
}
|
|
6696
|
-
return /* @__PURE__ */
|
|
6844
|
+
return /* @__PURE__ */ jsx195("div", { className: classes, children: content });
|
|
6697
6845
|
}
|
|
6698
6846
|
|
|
6699
6847
|
// src/components/Label/Label.tsx
|
|
6700
|
-
import
|
|
6701
|
-
import { jsx as
|
|
6848
|
+
import styles69 from "./Label.module.css";
|
|
6849
|
+
import { jsx as jsx196 } from "react/jsx-runtime";
|
|
6702
6850
|
function Label({ disabled, className, children, ...rest }) {
|
|
6703
|
-
return /* @__PURE__ */
|
|
6851
|
+
return /* @__PURE__ */ jsx196(
|
|
6704
6852
|
"label",
|
|
6705
6853
|
{
|
|
6706
|
-
className: [
|
|
6854
|
+
className: [styles69.label, disabled ? styles69.disabled : "", className].filter(Boolean).join(" "),
|
|
6707
6855
|
...rest,
|
|
6708
6856
|
children
|
|
6709
6857
|
}
|
|
@@ -6711,18 +6859,18 @@ function Label({ disabled, className, children, ...rest }) {
|
|
|
6711
6859
|
}
|
|
6712
6860
|
|
|
6713
6861
|
// src/components/ScrollArea/ScrollArea.tsx
|
|
6714
|
-
import
|
|
6715
|
-
import { jsx as
|
|
6862
|
+
import styles70 from "./ScrollArea.module.css";
|
|
6863
|
+
import { jsx as jsx197 } from "react/jsx-runtime";
|
|
6716
6864
|
function ScrollArea({ children, maxHeight, maxWidth, className }) {
|
|
6717
6865
|
const style = {};
|
|
6718
6866
|
if (maxHeight !== void 0) style.maxHeight = maxHeight;
|
|
6719
6867
|
if (maxWidth !== void 0) style.maxWidth = maxWidth;
|
|
6720
|
-
return /* @__PURE__ */
|
|
6868
|
+
return /* @__PURE__ */ jsx197("div", { className: [styles70.root, className].filter(Boolean).join(" "), style, children });
|
|
6721
6869
|
}
|
|
6722
6870
|
|
|
6723
6871
|
// src/components/FloatingActionButton/FloatingActionButton.tsx
|
|
6724
|
-
import
|
|
6725
|
-
import { Fragment as Fragment14, jsx as
|
|
6872
|
+
import styles71 from "./FloatingActionButton.module.css";
|
|
6873
|
+
import { Fragment as Fragment14, jsx as jsx198, jsxs as jsxs154 } from "react/jsx-runtime";
|
|
6726
6874
|
function FloatingActionButton({
|
|
6727
6875
|
label,
|
|
6728
6876
|
icon,
|
|
@@ -6735,13 +6883,13 @@ function FloatingActionButton({
|
|
|
6735
6883
|
target,
|
|
6736
6884
|
...rest
|
|
6737
6885
|
}) {
|
|
6738
|
-
const cls = [
|
|
6739
|
-
const content = /* @__PURE__ */
|
|
6740
|
-
/* @__PURE__ */
|
|
6741
|
-
extended ? /* @__PURE__ */
|
|
6886
|
+
const cls = [styles71.fab, extended ? styles71.extended : "", className].filter(Boolean).join(" ");
|
|
6887
|
+
const content = /* @__PURE__ */ jsxs154(Fragment14, { children: [
|
|
6888
|
+
/* @__PURE__ */ jsx198("span", { className: styles71.icon, "aria-hidden": "true", children: icon }),
|
|
6889
|
+
extended ? /* @__PURE__ */ jsx198("span", { className: styles71.label, children: label }) : null
|
|
6742
6890
|
] });
|
|
6743
6891
|
if (href !== void 0) {
|
|
6744
|
-
return /* @__PURE__ */
|
|
6892
|
+
return /* @__PURE__ */ jsx198(
|
|
6745
6893
|
"a",
|
|
6746
6894
|
{
|
|
6747
6895
|
...rest,
|
|
@@ -6754,18 +6902,18 @@ function FloatingActionButton({
|
|
|
6754
6902
|
}
|
|
6755
6903
|
);
|
|
6756
6904
|
}
|
|
6757
|
-
return /* @__PURE__ */
|
|
6905
|
+
return /* @__PURE__ */ jsx198("button", { ...rest, type, disabled, className: cls, "aria-label": label, children: content });
|
|
6758
6906
|
}
|
|
6759
6907
|
|
|
6760
6908
|
// src/components/PhotoViewer/PhotoGrid.tsx
|
|
6761
|
-
import { useState as
|
|
6909
|
+
import { useState as useState18 } from "react";
|
|
6762
6910
|
|
|
6763
6911
|
// src/components/PhotoViewer/PhotoViewer.tsx
|
|
6764
6912
|
import {
|
|
6765
6913
|
useCallback as useCallback5,
|
|
6766
6914
|
useEffect as useEffect12,
|
|
6767
6915
|
useRef as useRef19,
|
|
6768
|
-
useState as
|
|
6916
|
+
useState as useState17
|
|
6769
6917
|
} from "react";
|
|
6770
6918
|
import { createPortal as createPortal4 } from "react-dom";
|
|
6771
6919
|
|
|
@@ -6823,8 +6971,8 @@ var doubleTapScale = (scale) => scale > MIN_SCALE + 0.01 ? MIN_SCALE : DOUBLE_TA
|
|
|
6823
6971
|
var stepIndex = (index, step, count) => clamp2(index + step, 0, Math.max(0, count - 1));
|
|
6824
6972
|
|
|
6825
6973
|
// src/components/PhotoViewer/PhotoViewer.tsx
|
|
6826
|
-
import
|
|
6827
|
-
import { jsx as
|
|
6974
|
+
import styles72 from "./PhotoViewer.module.css";
|
|
6975
|
+
import { jsx as jsx199, jsxs as jsxs155 } from "react/jsx-runtime";
|
|
6828
6976
|
var TAP_SLOP_PX = 8;
|
|
6829
6977
|
function PhotoViewer({
|
|
6830
6978
|
photos,
|
|
@@ -6849,11 +6997,11 @@ function PhotoViewer({
|
|
|
6849
6997
|
const count = photos.length;
|
|
6850
6998
|
const current = clamp2(index, 0, Math.max(0, count - 1));
|
|
6851
6999
|
const photo = photos[current];
|
|
6852
|
-
const [scale, setScale] =
|
|
6853
|
-
const [pan, setPan] =
|
|
6854
|
-
const [drag, setDrag] =
|
|
6855
|
-
const [dragging, setDragging] =
|
|
6856
|
-
const [failed, setFailed] =
|
|
7000
|
+
const [scale, setScale] = useState17(MIN_SCALE);
|
|
7001
|
+
const [pan, setPan] = useState17({ x: 0, y: 0 });
|
|
7002
|
+
const [drag, setDrag] = useState17({ x: 0, y: 0 });
|
|
7003
|
+
const [dragging, setDragging] = useState17(false);
|
|
7004
|
+
const [failed, setFailed] = useState17(false);
|
|
6857
7005
|
const pointers = useRef19(/* @__PURE__ */ new Map());
|
|
6858
7006
|
const gesture = useRef19({
|
|
6859
7007
|
startScale: 1,
|
|
@@ -7043,12 +7191,12 @@ function PhotoViewer({
|
|
|
7043
7191
|
const fade = clamp2(1 - drag.y / 400, 0.3, 1);
|
|
7044
7192
|
const transform = `translate3d(${pan.x + drag.x}px, ${pan.y + drag.y}px, 0) scale(${scale})`;
|
|
7045
7193
|
return createPortal4(
|
|
7046
|
-
/* @__PURE__ */
|
|
7194
|
+
/* @__PURE__ */ jsx199(
|
|
7047
7195
|
"div",
|
|
7048
7196
|
{
|
|
7049
|
-
className: [
|
|
7197
|
+
className: [styles72.scrim, isOpenPhase ? styles72.scrimOpen : ""].filter(Boolean).join(" "),
|
|
7050
7198
|
style: { ["--photo-fade"]: String(fade) },
|
|
7051
|
-
children: /* @__PURE__ */
|
|
7199
|
+
children: /* @__PURE__ */ jsxs155(
|
|
7052
7200
|
"div",
|
|
7053
7201
|
{
|
|
7054
7202
|
ref: panelRef,
|
|
@@ -7057,35 +7205,35 @@ function PhotoViewer({
|
|
|
7057
7205
|
"aria-label": label,
|
|
7058
7206
|
"aria-roledescription": "photo viewer",
|
|
7059
7207
|
tabIndex: -1,
|
|
7060
|
-
className:
|
|
7208
|
+
className: styles72.panel,
|
|
7061
7209
|
children: [
|
|
7062
|
-
/* @__PURE__ */
|
|
7063
|
-
/* @__PURE__ */
|
|
7210
|
+
/* @__PURE__ */ jsxs155("div", { className: styles72.bar, children: [
|
|
7211
|
+
/* @__PURE__ */ jsxs155("span", { className: styles72.count, "aria-live": "polite", "aria-atomic": "true", children: [
|
|
7064
7212
|
current + 1,
|
|
7065
7213
|
" of ",
|
|
7066
7214
|
count
|
|
7067
7215
|
] }),
|
|
7068
|
-
/* @__PURE__ */
|
|
7216
|
+
/* @__PURE__ */ jsx199("button", { type: "button", className: styles72.control, "aria-label": "Close", onClick: onClose, children: /* @__PURE__ */ jsx199(Icon, { name: "x", size: "md", "aria-hidden": true }) })
|
|
7069
7217
|
] }),
|
|
7070
|
-
/* @__PURE__ */
|
|
7218
|
+
/* @__PURE__ */ jsx199(
|
|
7071
7219
|
"div",
|
|
7072
7220
|
{
|
|
7073
7221
|
ref: stageRef,
|
|
7074
|
-
className:
|
|
7222
|
+
className: styles72.stage,
|
|
7075
7223
|
onPointerDown,
|
|
7076
7224
|
onPointerMove,
|
|
7077
7225
|
onPointerUp,
|
|
7078
7226
|
onPointerCancel,
|
|
7079
7227
|
onWheel,
|
|
7080
7228
|
onKeyDown: onStageKeyDown,
|
|
7081
|
-
children: failed ? /* @__PURE__ */
|
|
7229
|
+
children: failed ? /* @__PURE__ */ jsx199("p", { className: styles72.failed, role: "status", children: "This photo could not be shown." }) : /* @__PURE__ */ jsx199(
|
|
7082
7230
|
"img",
|
|
7083
7231
|
{
|
|
7084
7232
|
ref: imageRef,
|
|
7085
7233
|
src: photo.src,
|
|
7086
7234
|
alt: photo.alt,
|
|
7087
7235
|
draggable: false,
|
|
7088
|
-
className: [
|
|
7236
|
+
className: [styles72.image, dragging ? styles72.dragging : ""].filter(Boolean).join(" "),
|
|
7089
7237
|
style: { transform },
|
|
7090
7238
|
onError: () => setFailed(true)
|
|
7091
7239
|
},
|
|
@@ -7093,27 +7241,27 @@ function PhotoViewer({
|
|
|
7093
7241
|
)
|
|
7094
7242
|
}
|
|
7095
7243
|
),
|
|
7096
|
-
current > 0 ? /* @__PURE__ */
|
|
7244
|
+
current > 0 ? /* @__PURE__ */ jsx199(
|
|
7097
7245
|
"button",
|
|
7098
7246
|
{
|
|
7099
7247
|
type: "button",
|
|
7100
|
-
className: [
|
|
7248
|
+
className: [styles72.control, styles72.previous].join(" "),
|
|
7101
7249
|
"aria-label": "Previous photo",
|
|
7102
7250
|
onClick: () => go(-1),
|
|
7103
|
-
children: /* @__PURE__ */
|
|
7251
|
+
children: /* @__PURE__ */ jsx199(Icon, { name: "chevron-left", size: "md", "aria-hidden": true })
|
|
7104
7252
|
}
|
|
7105
7253
|
) : null,
|
|
7106
|
-
current < count - 1 ? /* @__PURE__ */
|
|
7254
|
+
current < count - 1 ? /* @__PURE__ */ jsx199(
|
|
7107
7255
|
"button",
|
|
7108
7256
|
{
|
|
7109
7257
|
type: "button",
|
|
7110
|
-
className: [
|
|
7258
|
+
className: [styles72.control, styles72.next].join(" "),
|
|
7111
7259
|
"aria-label": "Next photo",
|
|
7112
7260
|
onClick: () => go(1),
|
|
7113
|
-
children: /* @__PURE__ */
|
|
7261
|
+
children: /* @__PURE__ */ jsx199(Icon, { name: "chevron-right", size: "md", "aria-hidden": true })
|
|
7114
7262
|
}
|
|
7115
7263
|
) : null,
|
|
7116
|
-
photo.caption ? /* @__PURE__ */
|
|
7264
|
+
photo.caption ? /* @__PURE__ */ jsx199("div", { className: styles72.caption, children: photo.caption }) : null
|
|
7117
7265
|
]
|
|
7118
7266
|
}
|
|
7119
7267
|
)
|
|
@@ -7124,18 +7272,18 @@ function PhotoViewer({
|
|
|
7124
7272
|
}
|
|
7125
7273
|
|
|
7126
7274
|
// src/components/PhotoViewer/PhotoGrid.tsx
|
|
7127
|
-
import
|
|
7128
|
-
import { Fragment as Fragment15, jsx as
|
|
7275
|
+
import styles73 from "./PhotoGrid.module.css";
|
|
7276
|
+
import { Fragment as Fragment15, jsx as jsx200, jsxs as jsxs156 } from "react/jsx-runtime";
|
|
7129
7277
|
function PhotoGrid({ photos, onOpen, label = "Photos", className }) {
|
|
7130
7278
|
if (photos.length === 0) return null;
|
|
7131
|
-
return /* @__PURE__ */
|
|
7279
|
+
return /* @__PURE__ */ jsx200("ul", { className: [styles73.grid, className].filter(Boolean).join(" "), "aria-label": label, children: photos.map((photo, index) => /* @__PURE__ */ jsx200("li", { className: styles73.cell, children: /* @__PURE__ */ jsx200(
|
|
7132
7280
|
"button",
|
|
7133
7281
|
{
|
|
7134
7282
|
type: "button",
|
|
7135
|
-
className:
|
|
7283
|
+
className: styles73.thumb,
|
|
7136
7284
|
"aria-label": `Photo ${index + 1} of ${photos.length}: ${photo.alt}`,
|
|
7137
7285
|
onClick: () => onOpen(index),
|
|
7138
|
-
children: /* @__PURE__ */
|
|
7286
|
+
children: /* @__PURE__ */ jsx200(
|
|
7139
7287
|
"img",
|
|
7140
7288
|
{
|
|
7141
7289
|
src: photo.thumbSrc ?? photo.src,
|
|
@@ -7143,17 +7291,17 @@ function PhotoGrid({ photos, onOpen, label = "Photos", className }) {
|
|
|
7143
7291
|
loading: "lazy",
|
|
7144
7292
|
decoding: "async",
|
|
7145
7293
|
draggable: false,
|
|
7146
|
-
className:
|
|
7294
|
+
className: styles73.img
|
|
7147
7295
|
}
|
|
7148
7296
|
)
|
|
7149
7297
|
}
|
|
7150
7298
|
) }, photo.id)) });
|
|
7151
7299
|
}
|
|
7152
7300
|
function PhotoGallery({ photos, label, className, onView }) {
|
|
7153
|
-
const [open, setOpen] =
|
|
7154
|
-
const [index, setIndex] =
|
|
7155
|
-
return /* @__PURE__ */
|
|
7156
|
-
/* @__PURE__ */
|
|
7301
|
+
const [open, setOpen] = useState18(false);
|
|
7302
|
+
const [index, setIndex] = useState18(0);
|
|
7303
|
+
return /* @__PURE__ */ jsxs156(Fragment15, { children: [
|
|
7304
|
+
/* @__PURE__ */ jsx200(
|
|
7157
7305
|
PhotoGrid,
|
|
7158
7306
|
{
|
|
7159
7307
|
photos,
|
|
@@ -7166,7 +7314,7 @@ function PhotoGallery({ photos, label, className, onView }) {
|
|
|
7166
7314
|
}
|
|
7167
7315
|
}
|
|
7168
7316
|
),
|
|
7169
|
-
/* @__PURE__ */
|
|
7317
|
+
/* @__PURE__ */ jsx200(
|
|
7170
7318
|
PhotoViewer,
|
|
7171
7319
|
{
|
|
7172
7320
|
photos,
|
|
@@ -7184,39 +7332,39 @@ function PhotoGallery({ photos, label, className, onView }) {
|
|
|
7184
7332
|
}
|
|
7185
7333
|
|
|
7186
7334
|
// src/components/Marker/Marker.tsx
|
|
7187
|
-
import
|
|
7188
|
-
import { jsx as
|
|
7335
|
+
import styles74 from "./Marker.module.css";
|
|
7336
|
+
import { jsx as jsx201 } from "react/jsx-runtime";
|
|
7189
7337
|
function Marker({ index, label, onClick, className }) {
|
|
7190
|
-
const classes = [
|
|
7338
|
+
const classes = [styles74.marker, className].filter(Boolean).join(" ");
|
|
7191
7339
|
if (onClick) {
|
|
7192
|
-
return /* @__PURE__ */
|
|
7340
|
+
return /* @__PURE__ */ jsx201("button", { type: "button", onClick, "aria-label": label, className: classes, children: index });
|
|
7193
7341
|
}
|
|
7194
|
-
return /* @__PURE__ */
|
|
7342
|
+
return /* @__PURE__ */ jsx201("span", { "aria-label": label, className: classes, children: index });
|
|
7195
7343
|
}
|
|
7196
7344
|
|
|
7197
7345
|
// src/components/Message/Message.tsx
|
|
7198
|
-
import
|
|
7199
|
-
import { jsx as
|
|
7346
|
+
import styles75 from "./Message.module.css";
|
|
7347
|
+
import { jsx as jsx202, jsxs as jsxs157 } from "react/jsx-runtime";
|
|
7200
7348
|
function Message({ sender, children, pending, actions, className }) {
|
|
7201
|
-
return /* @__PURE__ */
|
|
7202
|
-
/* @__PURE__ */
|
|
7203
|
-
/* @__PURE__ */
|
|
7204
|
-
/* @__PURE__ */
|
|
7205
|
-
/* @__PURE__ */
|
|
7349
|
+
return /* @__PURE__ */ jsxs157("div", { className: [styles75.row, styles75[sender], className].filter(Boolean).join(" "), children: [
|
|
7350
|
+
/* @__PURE__ */ jsx202("div", { className: styles75.bubble, children: pending ? /* @__PURE__ */ jsxs157("span", { className: styles75.typingDots, "aria-label": "Thinking", children: [
|
|
7351
|
+
/* @__PURE__ */ jsx202("span", { className: styles75.dot }),
|
|
7352
|
+
/* @__PURE__ */ jsx202("span", { className: styles75.dot }),
|
|
7353
|
+
/* @__PURE__ */ jsx202("span", { className: styles75.dot })
|
|
7206
7354
|
] }) : children }),
|
|
7207
|
-
actions && !pending && /* @__PURE__ */
|
|
7355
|
+
actions && !pending && /* @__PURE__ */ jsx202("div", { className: styles75.actions, children: actions })
|
|
7208
7356
|
] });
|
|
7209
7357
|
}
|
|
7210
7358
|
|
|
7211
7359
|
// src/components/MessageScroller/MessageScroller.tsx
|
|
7212
|
-
import { useEffect as useEffect13, useRef as useRef20, useState as
|
|
7213
|
-
import
|
|
7214
|
-
import { jsx as
|
|
7360
|
+
import { useEffect as useEffect13, useRef as useRef20, useState as useState19 } from "react";
|
|
7361
|
+
import styles76 from "./MessageScroller.module.css";
|
|
7362
|
+
import { jsx as jsx203, jsxs as jsxs158 } from "react/jsx-runtime";
|
|
7215
7363
|
var NEAR_BOTTOM_THRESHOLD_PX = 80;
|
|
7216
7364
|
function MessageScroller({ children, className }) {
|
|
7217
7365
|
const containerRef = useRef20(null);
|
|
7218
7366
|
const isNearBottomRef = useRef20(true);
|
|
7219
|
-
const [hasNewMessages, setHasNewMessages] =
|
|
7367
|
+
const [hasNewMessages, setHasNewMessages] = useState19(false);
|
|
7220
7368
|
useEffect13(() => {
|
|
7221
7369
|
const el = containerRef.current;
|
|
7222
7370
|
if (!el) return;
|
|
@@ -7242,23 +7390,23 @@ function MessageScroller({ children, className }) {
|
|
|
7242
7390
|
isNearBottomRef.current = true;
|
|
7243
7391
|
setHasNewMessages(false);
|
|
7244
7392
|
}
|
|
7245
|
-
return /* @__PURE__ */
|
|
7246
|
-
/* @__PURE__ */
|
|
7247
|
-
/* @__PURE__ */
|
|
7393
|
+
return /* @__PURE__ */ jsxs158("div", { className: [styles76.root, className].filter(Boolean).join(" "), children: [
|
|
7394
|
+
/* @__PURE__ */ jsxs158("div", { className: styles76.scrollContainer, ref: containerRef, onScroll: handleScroll, children: [
|
|
7395
|
+
/* @__PURE__ */ jsx203("div", { className: styles76.spacer, "aria-hidden": "true" }),
|
|
7248
7396
|
children
|
|
7249
7397
|
] }),
|
|
7250
|
-
hasNewMessages && /* @__PURE__ */
|
|
7398
|
+
hasNewMessages && /* @__PURE__ */ jsx203("button", { type: "button", className: styles76.jumpButton, onClick: scrollToBottom, children: "New messages \u2193" })
|
|
7251
7399
|
] });
|
|
7252
7400
|
}
|
|
7253
7401
|
|
|
7254
7402
|
// src/components/HoverCard/HoverCard.tsx
|
|
7255
|
-
import { cloneElement, useEffect as useEffect14, useRef as useRef21, useState as
|
|
7256
|
-
import
|
|
7257
|
-
import { jsx as
|
|
7403
|
+
import { cloneElement, useEffect as useEffect14, useRef as useRef21, useState as useState20 } from "react";
|
|
7404
|
+
import styles77 from "./HoverCard.module.css";
|
|
7405
|
+
import { jsx as jsx204 } from "react/jsx-runtime";
|
|
7258
7406
|
var OPEN_DELAY_MS = 400;
|
|
7259
7407
|
var CLOSE_DELAY_MS = 150;
|
|
7260
7408
|
function useHoverCapable() {
|
|
7261
|
-
const [hoverCapable, setHoverCapable] =
|
|
7409
|
+
const [hoverCapable, setHoverCapable] = useState20(true);
|
|
7262
7410
|
useEffect14(() => {
|
|
7263
7411
|
const mql = window.matchMedia("(hover: hover)");
|
|
7264
7412
|
setHoverCapable(mql.matches);
|
|
@@ -7277,7 +7425,7 @@ function HoverCard({
|
|
|
7277
7425
|
width,
|
|
7278
7426
|
"aria-label": ariaLabel
|
|
7279
7427
|
}) {
|
|
7280
|
-
const [open, setOpen] =
|
|
7428
|
+
const [open, setOpen] = useState20(false);
|
|
7281
7429
|
const hoverCapable = useHoverCapable();
|
|
7282
7430
|
const openTimer = useRef21(void 0);
|
|
7283
7431
|
const closeTimer = useRef21(void 0);
|
|
@@ -7299,13 +7447,13 @@ function HoverCard({
|
|
|
7299
7447
|
onBlur: scheduleClose
|
|
7300
7448
|
} : { onClick: () => setOpen((o) => !o) };
|
|
7301
7449
|
const wrappedTrigger = cloneElement(trigger, triggerHandlers);
|
|
7302
|
-
return /* @__PURE__ */
|
|
7450
|
+
return /* @__PURE__ */ jsx204(
|
|
7303
7451
|
"div",
|
|
7304
7452
|
{
|
|
7305
|
-
className:
|
|
7453
|
+
className: styles77.root,
|
|
7306
7454
|
onMouseEnter: hoverCapable ? cancelScheduledClose : void 0,
|
|
7307
7455
|
onMouseLeave: hoverCapable ? scheduleClose : void 0,
|
|
7308
|
-
children: /* @__PURE__ */
|
|
7456
|
+
children: /* @__PURE__ */ jsx204(
|
|
7309
7457
|
Popover,
|
|
7310
7458
|
{
|
|
7311
7459
|
trigger: wrappedTrigger,
|
|
@@ -7322,12 +7470,12 @@ function HoverCard({
|
|
|
7322
7470
|
}
|
|
7323
7471
|
|
|
7324
7472
|
// src/components/ContextMenu/ContextMenu.tsx
|
|
7325
|
-
import { cloneElement as cloneElement2, useState as
|
|
7326
|
-
import { Fragment as Fragment16, jsx as
|
|
7473
|
+
import { cloneElement as cloneElement2, useState as useState21 } from "react";
|
|
7474
|
+
import { Fragment as Fragment16, jsx as jsx205, jsxs as jsxs159 } from "react/jsx-runtime";
|
|
7327
7475
|
function ContextMenu({ children, items, "aria-label": ariaLabel }) {
|
|
7328
7476
|
const isMobile = useIsMobile();
|
|
7329
|
-
const [open, setOpen] =
|
|
7330
|
-
const [point, setPoint] =
|
|
7477
|
+
const [open, setOpen] = useState21(false);
|
|
7478
|
+
const [point, setPoint] = useState21({ x: 0, y: 0 });
|
|
7331
7479
|
const longPressHandlers = useLongPress({
|
|
7332
7480
|
onLongPress: () => setOpen(true),
|
|
7333
7481
|
disabled: !isMobile
|
|
@@ -7341,7 +7489,7 @@ function ContextMenu({ children, items, "aria-label": ariaLabel }) {
|
|
|
7341
7489
|
children,
|
|
7342
7490
|
isMobile ? longPressHandlers : { onContextMenu: handleContextMenu }
|
|
7343
7491
|
);
|
|
7344
|
-
const list = /* @__PURE__ */
|
|
7492
|
+
const list = /* @__PURE__ */ jsx205(
|
|
7345
7493
|
MenuEntries,
|
|
7346
7494
|
{
|
|
7347
7495
|
items,
|
|
@@ -7352,17 +7500,17 @@ function ContextMenu({ children, items, "aria-label": ariaLabel }) {
|
|
|
7352
7500
|
}
|
|
7353
7501
|
);
|
|
7354
7502
|
if (isMobile) {
|
|
7355
|
-
return /* @__PURE__ */
|
|
7503
|
+
return /* @__PURE__ */ jsxs159(Fragment16, { children: [
|
|
7356
7504
|
wrappedChild,
|
|
7357
|
-
/* @__PURE__ */
|
|
7505
|
+
/* @__PURE__ */ jsx205(Drawer, { open, onClose: () => setOpen(false), "aria-label": ariaLabel, children: list })
|
|
7358
7506
|
] });
|
|
7359
7507
|
}
|
|
7360
|
-
return /* @__PURE__ */
|
|
7508
|
+
return /* @__PURE__ */ jsxs159(Fragment16, { children: [
|
|
7361
7509
|
wrappedChild,
|
|
7362
|
-
open && /* @__PURE__ */
|
|
7510
|
+
open && /* @__PURE__ */ jsx205("div", { style: { position: "fixed", left: point.x, top: point.y, width: 0, height: 0 }, children: /* @__PURE__ */ jsx205(
|
|
7363
7511
|
Popover,
|
|
7364
7512
|
{
|
|
7365
|
-
trigger: /* @__PURE__ */
|
|
7513
|
+
trigger: /* @__PURE__ */ jsx205("span", {}),
|
|
7366
7514
|
open,
|
|
7367
7515
|
onClose: () => setOpen(false),
|
|
7368
7516
|
"aria-label": ariaLabel,
|
|
@@ -7373,15 +7521,15 @@ function ContextMenu({ children, items, "aria-label": ariaLabel }) {
|
|
|
7373
7521
|
}
|
|
7374
7522
|
|
|
7375
7523
|
// src/components/NavigationMenu/NavigationMenu.tsx
|
|
7376
|
-
import { useRef as useRef22, useState as
|
|
7377
|
-
import
|
|
7378
|
-
import { jsx as
|
|
7524
|
+
import { useRef as useRef22, useState as useState22 } from "react";
|
|
7525
|
+
import styles78 from "./NavigationMenu.module.css";
|
|
7526
|
+
import { jsx as jsx206 } from "react/jsx-runtime";
|
|
7379
7527
|
function NavigationMenu({
|
|
7380
7528
|
items,
|
|
7381
7529
|
renderLink,
|
|
7382
7530
|
"aria-label": ariaLabel
|
|
7383
7531
|
}) {
|
|
7384
|
-
const [openIndex, setOpenIndex] =
|
|
7532
|
+
const [openIndex, setOpenIndex] = useState22(null);
|
|
7385
7533
|
const triggerRefs = useRef22([]);
|
|
7386
7534
|
function handleKeyDown(e, index) {
|
|
7387
7535
|
if (e.key === "Escape") {
|
|
@@ -7396,26 +7544,26 @@ function NavigationMenu({
|
|
|
7396
7544
|
triggerRefs.current[nextIndex]?.focus();
|
|
7397
7545
|
}
|
|
7398
7546
|
}
|
|
7399
|
-
return /* @__PURE__ */
|
|
7547
|
+
return /* @__PURE__ */ jsx206("nav", { "aria-label": ariaLabel, className: styles78.nav, children: /* @__PURE__ */ jsx206("ul", { className: styles78.list, children: items.map((item, index) => {
|
|
7400
7548
|
if (!item.content) {
|
|
7401
7549
|
const linkChildren = item.label;
|
|
7402
|
-
return /* @__PURE__ */
|
|
7550
|
+
return /* @__PURE__ */ jsx206("li", { children: item.href && renderLink ? renderLink(item.href, linkChildren) : /* @__PURE__ */ jsx206("a", { href: item.href, className: styles78.link, children: linkChildren }) }, item.label);
|
|
7403
7551
|
}
|
|
7404
7552
|
const isOpen = openIndex === index;
|
|
7405
|
-
return /* @__PURE__ */
|
|
7553
|
+
return /* @__PURE__ */ jsx206("li", { children: /* @__PURE__ */ jsx206(
|
|
7406
7554
|
Popover,
|
|
7407
7555
|
{
|
|
7408
7556
|
"aria-label": item.label,
|
|
7409
7557
|
open: isOpen,
|
|
7410
7558
|
onClose: () => setOpenIndex((current) => current === index ? null : current),
|
|
7411
|
-
trigger: /* @__PURE__ */
|
|
7559
|
+
trigger: /* @__PURE__ */ jsx206(
|
|
7412
7560
|
"button",
|
|
7413
7561
|
{
|
|
7414
7562
|
ref: (el) => {
|
|
7415
7563
|
triggerRefs.current[index] = el;
|
|
7416
7564
|
},
|
|
7417
7565
|
type: "button",
|
|
7418
|
-
className: [
|
|
7566
|
+
className: [styles78.trigger, isOpen ? styles78.triggerOpen : ""].filter(Boolean).join(" "),
|
|
7419
7567
|
"aria-expanded": isOpen,
|
|
7420
7568
|
onClick: () => setOpenIndex((current) => current === index ? null : index),
|
|
7421
7569
|
onMouseEnter: () => {
|
|
@@ -7432,15 +7580,15 @@ function NavigationMenu({
|
|
|
7432
7580
|
}
|
|
7433
7581
|
|
|
7434
7582
|
// src/components/Menubar/Menubar.tsx
|
|
7435
|
-
import { jsx as
|
|
7583
|
+
import { jsx as jsx207 } from "react/jsx-runtime";
|
|
7436
7584
|
function Menubar({ menus, "aria-label": ariaLabel = "Menu bar" }) {
|
|
7437
|
-
return /* @__PURE__ */
|
|
7585
|
+
return /* @__PURE__ */ jsx207(
|
|
7438
7586
|
NavigationMenu,
|
|
7439
7587
|
{
|
|
7440
7588
|
"aria-label": ariaLabel,
|
|
7441
7589
|
items: menus.map((menu) => ({
|
|
7442
7590
|
label: menu.label,
|
|
7443
|
-
content: (close) => /* @__PURE__ */
|
|
7591
|
+
content: (close) => /* @__PURE__ */ jsx207(
|
|
7444
7592
|
MenuEntries,
|
|
7445
7593
|
{
|
|
7446
7594
|
items: menu.items,
|
|
@@ -7456,9 +7604,9 @@ function Menubar({ menus, "aria-label": ariaLabel = "Menu bar" }) {
|
|
|
7456
7604
|
}
|
|
7457
7605
|
|
|
7458
7606
|
// src/components/Command/Command.tsx
|
|
7459
|
-
import { useEffect as useEffect15, useId as useId9, useMemo as useMemo3, useRef as useRef23, useState as
|
|
7460
|
-
import
|
|
7461
|
-
import { jsx as
|
|
7607
|
+
import { useEffect as useEffect15, useId as useId9, useMemo as useMemo3, useRef as useRef23, useState as useState23 } from "react";
|
|
7608
|
+
import styles79 from "./Command.module.css";
|
|
7609
|
+
import { jsx as jsx208, jsxs as jsxs160 } from "react/jsx-runtime";
|
|
7462
7610
|
function matches(item, query) {
|
|
7463
7611
|
if (!query) return true;
|
|
7464
7612
|
const haystack = `${item.label} ${item.keywords ?? ""}`.toLowerCase();
|
|
@@ -7471,8 +7619,8 @@ function Command({
|
|
|
7471
7619
|
placeholder = "Type a command\u2026",
|
|
7472
7620
|
"aria-label": ariaLabel = "Command palette"
|
|
7473
7621
|
}) {
|
|
7474
|
-
const [query, setQuery] =
|
|
7475
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
7622
|
+
const [query, setQuery] = useState23("");
|
|
7623
|
+
const [highlightedIndex, setHighlightedIndex] = useState23(0);
|
|
7476
7624
|
const inputRef = useRef23(null);
|
|
7477
7625
|
const listId = useId9();
|
|
7478
7626
|
const filtered = useMemo3(() => items.filter((item) => matches(item, query)), [items, query]);
|
|
@@ -7516,8 +7664,8 @@ function Command({
|
|
|
7516
7664
|
return order.map((group) => ({ group, items: byGroup.get(group) ?? [] }));
|
|
7517
7665
|
}, [filtered]);
|
|
7518
7666
|
const highlightedId = filtered[highlightedIndex] ? `${listId}-${filtered[highlightedIndex].id}` : void 0;
|
|
7519
|
-
return /* @__PURE__ */
|
|
7520
|
-
/* @__PURE__ */
|
|
7667
|
+
return /* @__PURE__ */ jsx208(Dialog, { open, onClose, "aria-label": ariaLabel, size: "sm", children: /* @__PURE__ */ jsxs160("div", { className: styles79.root, children: [
|
|
7668
|
+
/* @__PURE__ */ jsx208(
|
|
7521
7669
|
"input",
|
|
7522
7670
|
{
|
|
7523
7671
|
ref: inputRef,
|
|
@@ -7527,35 +7675,35 @@ function Command({
|
|
|
7527
7675
|
"aria-controls": listId,
|
|
7528
7676
|
"aria-activedescendant": highlightedId,
|
|
7529
7677
|
"aria-autocomplete": "list",
|
|
7530
|
-
className:
|
|
7678
|
+
className: styles79.input,
|
|
7531
7679
|
placeholder,
|
|
7532
7680
|
value: query,
|
|
7533
7681
|
onChange: (e) => setQuery(e.target.value),
|
|
7534
7682
|
onKeyDown: handleKeyDown
|
|
7535
7683
|
}
|
|
7536
7684
|
),
|
|
7537
|
-
/* @__PURE__ */
|
|
7538
|
-
filtered.length === 0 && /* @__PURE__ */
|
|
7539
|
-
groups.map(({ group, items: groupItems }) => /* @__PURE__ */
|
|
7540
|
-
group && /* @__PURE__ */
|
|
7541
|
-
/* @__PURE__ */
|
|
7685
|
+
/* @__PURE__ */ jsxs160("ul", { id: listId, role: "listbox", className: styles79.list, children: [
|
|
7686
|
+
filtered.length === 0 && /* @__PURE__ */ jsx208("li", { className: styles79.empty, children: "No matching commands." }),
|
|
7687
|
+
groups.map(({ group, items: groupItems }) => /* @__PURE__ */ jsxs160("li", { children: [
|
|
7688
|
+
group && /* @__PURE__ */ jsx208("div", { className: styles79.groupLabel, children: group }),
|
|
7689
|
+
/* @__PURE__ */ jsx208("ul", { className: styles79.groupList, children: groupItems.map((item) => {
|
|
7542
7690
|
const index = filtered.indexOf(item);
|
|
7543
7691
|
const isHighlighted = index === highlightedIndex;
|
|
7544
|
-
return /* @__PURE__ */
|
|
7692
|
+
return /* @__PURE__ */ jsx208("li", { children: /* @__PURE__ */ jsxs160(
|
|
7545
7693
|
"button",
|
|
7546
7694
|
{
|
|
7547
7695
|
id: `${listId}-${item.id}`,
|
|
7548
7696
|
type: "button",
|
|
7549
7697
|
role: "option",
|
|
7550
7698
|
"aria-selected": isHighlighted,
|
|
7551
|
-
className: [
|
|
7699
|
+
className: [styles79.item, isHighlighted ? styles79.itemHighlighted : ""].filter(Boolean).join(" "),
|
|
7552
7700
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
7553
7701
|
onClick: () => {
|
|
7554
7702
|
onClose();
|
|
7555
7703
|
item.onSelect();
|
|
7556
7704
|
},
|
|
7557
7705
|
children: [
|
|
7558
|
-
item.icon && /* @__PURE__ */
|
|
7706
|
+
item.icon && /* @__PURE__ */ jsx208(Icon, { name: item.icon, size: "sm", "aria-hidden": true }),
|
|
7559
7707
|
item.label
|
|
7560
7708
|
]
|
|
7561
7709
|
}
|
|
@@ -7567,11 +7715,11 @@ function Command({
|
|
|
7567
7715
|
}
|
|
7568
7716
|
|
|
7569
7717
|
// src/components/Resizable/Resizable.tsx
|
|
7570
|
-
import { Children, isValidElement, useEffect as useEffect16, useRef as useRef24, useState as
|
|
7571
|
-
import
|
|
7572
|
-
import { jsx as
|
|
7718
|
+
import { Children, isValidElement, useEffect as useEffect16, useRef as useRef24, useState as useState24 } from "react";
|
|
7719
|
+
import styles80 from "./Resizable.module.css";
|
|
7720
|
+
import { jsx as jsx209 } from "react/jsx-runtime";
|
|
7573
7721
|
function ResizablePanel({ children, className, style }) {
|
|
7574
|
-
return /* @__PURE__ */
|
|
7722
|
+
return /* @__PURE__ */ jsx209("div", { className: [styles80.panel, className].filter(Boolean).join(" "), style, children });
|
|
7575
7723
|
}
|
|
7576
7724
|
function ResizableHandle({
|
|
7577
7725
|
"aria-label": ariaLabel = "Resize panels",
|
|
@@ -7584,10 +7732,10 @@ function ResizableHandle({
|
|
|
7584
7732
|
}) {
|
|
7585
7733
|
return (
|
|
7586
7734
|
/* 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/). */
|
|
7587
|
-
/* @__PURE__ */
|
|
7735
|
+
/* @__PURE__ */ jsx209(
|
|
7588
7736
|
"div",
|
|
7589
7737
|
{
|
|
7590
|
-
className: [
|
|
7738
|
+
className: [styles80.handle, direction === "vertical" ? styles80.handleVertical : ""].filter(Boolean).join(" "),
|
|
7591
7739
|
role: "separator",
|
|
7592
7740
|
tabIndex: 0,
|
|
7593
7741
|
"aria-orientation": direction === "horizontal" ? "vertical" : "horizontal",
|
|
@@ -7613,7 +7761,7 @@ function ResizablePanelGroup({ direction, children, className }) {
|
|
|
7613
7761
|
maxSize: props.maxSize ?? 90
|
|
7614
7762
|
};
|
|
7615
7763
|
});
|
|
7616
|
-
const [sizes, setSizes] =
|
|
7764
|
+
const [sizes, setSizes] = useState24(() => constraints.map((c) => c.defaultSize));
|
|
7617
7765
|
if (sizes.length !== constraints.length) {
|
|
7618
7766
|
setSizes(constraints.map((c) => c.defaultSize));
|
|
7619
7767
|
}
|
|
@@ -7698,16 +7846,16 @@ function ResizablePanelGroup({ direction, children, className }) {
|
|
|
7698
7846
|
}
|
|
7699
7847
|
let panelIndex = -1;
|
|
7700
7848
|
let handleIndex = -1;
|
|
7701
|
-
return /* @__PURE__ */
|
|
7849
|
+
return /* @__PURE__ */ jsx209(
|
|
7702
7850
|
"div",
|
|
7703
7851
|
{
|
|
7704
7852
|
ref: containerRef,
|
|
7705
|
-
className: [
|
|
7853
|
+
className: [styles80.group, direction === "vertical" ? styles80.groupVertical : "", className].filter(Boolean).join(" "),
|
|
7706
7854
|
children: elements.map((element, key) => {
|
|
7707
7855
|
if (element.type === ResizablePanel) {
|
|
7708
7856
|
panelIndex += 1;
|
|
7709
7857
|
const size = sizes[panelIndex] ?? constraints[panelIndex]?.defaultSize ?? 0;
|
|
7710
|
-
return /* @__PURE__ */
|
|
7858
|
+
return /* @__PURE__ */ jsx209(
|
|
7711
7859
|
ResizablePanelClone,
|
|
7712
7860
|
{
|
|
7713
7861
|
element,
|
|
@@ -7720,7 +7868,7 @@ function ResizablePanelGroup({ direction, children, className }) {
|
|
|
7720
7868
|
handleIndex += 1;
|
|
7721
7869
|
const index = handleIndex;
|
|
7722
7870
|
const constraint = constraints[index];
|
|
7723
|
-
return /* @__PURE__ */
|
|
7871
|
+
return /* @__PURE__ */ jsx209(
|
|
7724
7872
|
ResizableHandleClone,
|
|
7725
7873
|
{
|
|
7726
7874
|
element,
|
|
@@ -7749,19 +7897,19 @@ function ResizablePanelClone({
|
|
|
7749
7897
|
flexGrow: 0,
|
|
7750
7898
|
flexShrink: 0
|
|
7751
7899
|
};
|
|
7752
|
-
return /* @__PURE__ */
|
|
7900
|
+
return /* @__PURE__ */ jsx209(ResizablePanel, { ...element.props, style });
|
|
7753
7901
|
}
|
|
7754
7902
|
function ResizableHandleClone({
|
|
7755
7903
|
element,
|
|
7756
7904
|
...injected
|
|
7757
7905
|
}) {
|
|
7758
|
-
return /* @__PURE__ */
|
|
7906
|
+
return /* @__PURE__ */ jsx209(ResizableHandle, { ...element.props, ...injected });
|
|
7759
7907
|
}
|
|
7760
7908
|
|
|
7761
7909
|
// src/components/DataTable/DataTable.tsx
|
|
7762
|
-
import { useMemo as useMemo4, useState as
|
|
7763
|
-
import
|
|
7764
|
-
import { jsx as
|
|
7910
|
+
import { useMemo as useMemo4, useState as useState25 } from "react";
|
|
7911
|
+
import styles81 from "./DataTable.module.css";
|
|
7912
|
+
import { jsx as jsx210, jsxs as jsxs161 } from "react/jsx-runtime";
|
|
7765
7913
|
function compareValues(a, b) {
|
|
7766
7914
|
if (typeof a === "number" && typeof b === "number") return a - b;
|
|
7767
7915
|
return String(a).localeCompare(String(b));
|
|
@@ -7775,8 +7923,8 @@ function DataTable({
|
|
|
7775
7923
|
emptyMessage = "No results.",
|
|
7776
7924
|
className
|
|
7777
7925
|
}) {
|
|
7778
|
-
const [sortKey, setSortKey] =
|
|
7779
|
-
const [sortDirection, setSortDirection] =
|
|
7926
|
+
const [sortKey, setSortKey] = useState25(defaultSortKey);
|
|
7927
|
+
const [sortDirection, setSortDirection] = useState25(defaultSortDirection);
|
|
7780
7928
|
const sortColumn = columns.find((c) => c.key === sortKey);
|
|
7781
7929
|
const sortedData = useMemo4(() => {
|
|
7782
7930
|
if (!sortColumn) return data;
|
|
@@ -7797,26 +7945,26 @@ function DataTable({
|
|
|
7797
7945
|
}
|
|
7798
7946
|
}
|
|
7799
7947
|
if (data.length === 0) {
|
|
7800
|
-
return /* @__PURE__ */
|
|
7948
|
+
return /* @__PURE__ */ jsx210(EmptyState, { heading: emptyMessage });
|
|
7801
7949
|
}
|
|
7802
|
-
return /* @__PURE__ */
|
|
7803
|
-
/* @__PURE__ */
|
|
7950
|
+
return /* @__PURE__ */ jsxs161(Table, { className, children: [
|
|
7951
|
+
/* @__PURE__ */ jsx210(TableHead, { children: /* @__PURE__ */ jsx210(TableRow, { children: columns.map((column) => {
|
|
7804
7952
|
const isSorted = sortKey === column.key;
|
|
7805
7953
|
const ariaSort = !column.sortable ? void 0 : isSorted ? sortDirection === "asc" ? "ascending" : "descending" : "none";
|
|
7806
|
-
return /* @__PURE__ */
|
|
7954
|
+
return /* @__PURE__ */ jsx210(
|
|
7807
7955
|
TableHeaderCell,
|
|
7808
7956
|
{
|
|
7809
7957
|
"aria-sort": ariaSort,
|
|
7810
7958
|
style: column.align === "end" ? { textAlign: "end" } : void 0,
|
|
7811
|
-
children: column.sortable ? /* @__PURE__ */
|
|
7959
|
+
children: column.sortable ? /* @__PURE__ */ jsxs161(
|
|
7812
7960
|
"button",
|
|
7813
7961
|
{
|
|
7814
7962
|
type: "button",
|
|
7815
|
-
className:
|
|
7963
|
+
className: styles81.sortButton,
|
|
7816
7964
|
onClick: () => handleSort(column),
|
|
7817
7965
|
children: [
|
|
7818
7966
|
column.header,
|
|
7819
|
-
/* @__PURE__ */
|
|
7967
|
+
/* @__PURE__ */ jsx210("span", { className: styles81.sortIcon, children: isSorted && /* @__PURE__ */ jsx210(
|
|
7820
7968
|
Icon,
|
|
7821
7969
|
{
|
|
7822
7970
|
name: sortDirection === "asc" ? "chevron-up" : "chevron-down",
|
|
@@ -7831,7 +7979,7 @@ function DataTable({
|
|
|
7831
7979
|
column.key
|
|
7832
7980
|
);
|
|
7833
7981
|
}) }) }),
|
|
7834
|
-
/* @__PURE__ */
|
|
7982
|
+
/* @__PURE__ */ jsx210(TableBody, { children: sortedData.map((row) => /* @__PURE__ */ jsx210(TableRow, { children: columns.map((column) => /* @__PURE__ */ jsx210(
|
|
7835
7983
|
TableCell,
|
|
7836
7984
|
{
|
|
7837
7985
|
style: column.align === "end" ? { textAlign: "end" } : void 0,
|
|
@@ -7843,9 +7991,9 @@ function DataTable({
|
|
|
7843
7991
|
}
|
|
7844
7992
|
|
|
7845
7993
|
// src/components/Combobox/Combobox.tsx
|
|
7846
|
-
import { useEffect as useEffect17, useId as useId10, useMemo as useMemo5, useRef as useRef25, useState as
|
|
7847
|
-
import
|
|
7848
|
-
import { Fragment as Fragment17, jsx as
|
|
7994
|
+
import { useEffect as useEffect17, useId as useId10, useMemo as useMemo5, useRef as useRef25, useState as useState26 } from "react";
|
|
7995
|
+
import styles82 from "./Combobox.module.css";
|
|
7996
|
+
import { Fragment as Fragment17, jsx as jsx211, jsxs as jsxs162 } from "react/jsx-runtime";
|
|
7849
7997
|
function matches2(option, query) {
|
|
7850
7998
|
if (!query) return true;
|
|
7851
7999
|
return option.label.toLowerCase().includes(query.toLowerCase());
|
|
@@ -7861,9 +8009,9 @@ function Combobox({
|
|
|
7861
8009
|
disabled = false,
|
|
7862
8010
|
className
|
|
7863
8011
|
}) {
|
|
7864
|
-
const [open, setOpen] =
|
|
7865
|
-
const [query, setQuery] =
|
|
7866
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
8012
|
+
const [open, setOpen] = useState26(false);
|
|
8013
|
+
const [query, setQuery] = useState26("");
|
|
8014
|
+
const [highlightedIndex, setHighlightedIndex] = useState26(0);
|
|
7867
8015
|
const isMobile = useIsMobile();
|
|
7868
8016
|
const inputRef = useRef25(null);
|
|
7869
8017
|
const listId = useId10();
|
|
@@ -7899,24 +8047,24 @@ function Combobox({
|
|
|
7899
8047
|
}
|
|
7900
8048
|
}
|
|
7901
8049
|
const highlightedId = filtered[highlightedIndex] ? `${listId}-${filtered[highlightedIndex].value}` : void 0;
|
|
7902
|
-
const trigger = /* @__PURE__ */
|
|
8050
|
+
const trigger = /* @__PURE__ */ jsxs162(
|
|
7903
8051
|
"button",
|
|
7904
8052
|
{
|
|
7905
8053
|
type: "button",
|
|
7906
|
-
className: [
|
|
8054
|
+
className: [styles82.trigger, className].filter(Boolean).join(" "),
|
|
7907
8055
|
disabled,
|
|
7908
8056
|
"aria-label": ariaLabel,
|
|
7909
8057
|
"aria-haspopup": "listbox",
|
|
7910
8058
|
"aria-expanded": open,
|
|
7911
8059
|
onClick: () => setOpen((o) => !o),
|
|
7912
8060
|
children: [
|
|
7913
|
-
/* @__PURE__ */
|
|
7914
|
-
/* @__PURE__ */
|
|
8061
|
+
/* @__PURE__ */ jsx211("span", { className: selected ? styles82.triggerValue : styles82.triggerPlaceholder, children: selected ? selected.label : placeholder }),
|
|
8062
|
+
/* @__PURE__ */ jsx211(Icon, { name: "chevron-down", size: "sm", "aria-hidden": true })
|
|
7915
8063
|
]
|
|
7916
8064
|
}
|
|
7917
8065
|
);
|
|
7918
|
-
const body = /* @__PURE__ */
|
|
7919
|
-
/* @__PURE__ */
|
|
8066
|
+
const body = /* @__PURE__ */ jsxs162("div", { className: styles82.body, children: [
|
|
8067
|
+
/* @__PURE__ */ jsx211(
|
|
7920
8068
|
"input",
|
|
7921
8069
|
{
|
|
7922
8070
|
ref: inputRef,
|
|
@@ -7926,30 +8074,30 @@ function Combobox({
|
|
|
7926
8074
|
"aria-controls": listId,
|
|
7927
8075
|
"aria-activedescendant": highlightedId,
|
|
7928
8076
|
"aria-autocomplete": "list",
|
|
7929
|
-
className:
|
|
8077
|
+
className: styles82.search,
|
|
7930
8078
|
placeholder: searchPlaceholder,
|
|
7931
8079
|
value: query,
|
|
7932
8080
|
onChange: (e) => setQuery(e.target.value),
|
|
7933
8081
|
onKeyDown: handleKeyDown
|
|
7934
8082
|
}
|
|
7935
8083
|
),
|
|
7936
|
-
/* @__PURE__ */
|
|
7937
|
-
filtered.length === 0 && /* @__PURE__ */
|
|
8084
|
+
/* @__PURE__ */ jsxs162("ul", { id: listId, role: "listbox", className: styles82.list, children: [
|
|
8085
|
+
filtered.length === 0 && /* @__PURE__ */ jsx211("li", { className: styles82.empty, children: emptyMessage }),
|
|
7938
8086
|
filtered.map((option, index) => {
|
|
7939
8087
|
const isHighlighted = index === highlightedIndex;
|
|
7940
8088
|
const isSelected = option.value === value;
|
|
7941
|
-
return /* @__PURE__ */
|
|
8089
|
+
return /* @__PURE__ */ jsx211("li", { children: /* @__PURE__ */ jsxs162(
|
|
7942
8090
|
"button",
|
|
7943
8091
|
{
|
|
7944
8092
|
id: `${listId}-${option.value}`,
|
|
7945
8093
|
type: "button",
|
|
7946
8094
|
role: "option",
|
|
7947
8095
|
"aria-selected": isSelected,
|
|
7948
|
-
className: [
|
|
8096
|
+
className: [styles82.option, isHighlighted ? styles82.optionHighlighted : ""].filter(Boolean).join(" "),
|
|
7949
8097
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
7950
8098
|
onClick: () => commit(option),
|
|
7951
8099
|
children: [
|
|
7952
|
-
/* @__PURE__ */
|
|
8100
|
+
/* @__PURE__ */ jsx211("span", { className: styles82.check, children: isSelected && /* @__PURE__ */ jsx211(Icon, { name: "check", size: "sm", "aria-hidden": true }) }),
|
|
7953
8101
|
option.label
|
|
7954
8102
|
]
|
|
7955
8103
|
}
|
|
@@ -7958,12 +8106,12 @@ function Combobox({
|
|
|
7958
8106
|
] })
|
|
7959
8107
|
] });
|
|
7960
8108
|
if (isMobile) {
|
|
7961
|
-
return /* @__PURE__ */
|
|
8109
|
+
return /* @__PURE__ */ jsxs162(Fragment17, { children: [
|
|
7962
8110
|
trigger,
|
|
7963
|
-
/* @__PURE__ */
|
|
8111
|
+
/* @__PURE__ */ jsx211(Drawer, { open, onClose: () => setOpen(false), "aria-label": ariaLabel, children: body })
|
|
7964
8112
|
] });
|
|
7965
8113
|
}
|
|
7966
|
-
return /* @__PURE__ */
|
|
8114
|
+
return /* @__PURE__ */ jsx211(
|
|
7967
8115
|
Popover,
|
|
7968
8116
|
{
|
|
7969
8117
|
trigger,
|
|
@@ -7977,9 +8125,9 @@ function Combobox({
|
|
|
7977
8125
|
}
|
|
7978
8126
|
|
|
7979
8127
|
// src/components/GripIcon/GripIcon.tsx
|
|
7980
|
-
import { jsx as
|
|
8128
|
+
import { jsx as jsx212 } from "react/jsx-runtime";
|
|
7981
8129
|
function GripIcon({ size = 14, className }) {
|
|
7982
|
-
return /* @__PURE__ */
|
|
8130
|
+
return /* @__PURE__ */ jsx212(
|
|
7983
8131
|
"svg",
|
|
7984
8132
|
{
|
|
7985
8133
|
width: size,
|
|
@@ -7989,15 +8137,15 @@ function GripIcon({ size = 14, className }) {
|
|
|
7989
8137
|
"aria-hidden": "true",
|
|
7990
8138
|
className,
|
|
7991
8139
|
children: [3, 7, 11].map(
|
|
7992
|
-
(cy) => [4, 10].map((cx) => /* @__PURE__ */
|
|
8140
|
+
(cy) => [4, 10].map((cx) => /* @__PURE__ */ jsx212("circle", { cx, cy, r: 1.2, fill: "currentColor" }, `${cx}-${cy}`))
|
|
7993
8141
|
)
|
|
7994
8142
|
}
|
|
7995
8143
|
);
|
|
7996
8144
|
}
|
|
7997
8145
|
|
|
7998
8146
|
// src/components/DragHandleRow/DragHandleRow.tsx
|
|
7999
|
-
import
|
|
8000
|
-
import { jsx as
|
|
8147
|
+
import styles83 from "./DragHandleRow.module.css";
|
|
8148
|
+
import { jsx as jsx213, jsxs as jsxs163 } from "react/jsx-runtime";
|
|
8001
8149
|
function DragHandleRow({
|
|
8002
8150
|
children,
|
|
8003
8151
|
handleProps,
|
|
@@ -8005,32 +8153,32 @@ function DragHandleRow({
|
|
|
8005
8153
|
className,
|
|
8006
8154
|
...rest
|
|
8007
8155
|
}) {
|
|
8008
|
-
return /* @__PURE__ */
|
|
8156
|
+
return /* @__PURE__ */ jsxs163(
|
|
8009
8157
|
"div",
|
|
8010
8158
|
{
|
|
8011
8159
|
...rest,
|
|
8012
|
-
className: [
|
|
8160
|
+
className: [styles83.row, isDragging ? styles83.dragging : "", className].filter(Boolean).join(" "),
|
|
8013
8161
|
children: [
|
|
8014
|
-
/* @__PURE__ */
|
|
8162
|
+
/* @__PURE__ */ jsx213(
|
|
8015
8163
|
"button",
|
|
8016
8164
|
{
|
|
8017
8165
|
type: "button",
|
|
8018
8166
|
"aria-label": "Drag to reorder",
|
|
8019
|
-
className:
|
|
8167
|
+
className: styles83.handle,
|
|
8020
8168
|
tabIndex: -1,
|
|
8021
8169
|
...handleProps,
|
|
8022
|
-
children: /* @__PURE__ */
|
|
8170
|
+
children: /* @__PURE__ */ jsx213(GripIcon, { className: styles83.icon })
|
|
8023
8171
|
}
|
|
8024
8172
|
),
|
|
8025
|
-
/* @__PURE__ */
|
|
8173
|
+
/* @__PURE__ */ jsx213("div", { className: styles83.content, children })
|
|
8026
8174
|
]
|
|
8027
8175
|
}
|
|
8028
8176
|
);
|
|
8029
8177
|
}
|
|
8030
8178
|
|
|
8031
8179
|
// src/components/StepStrip/StepStrip.tsx
|
|
8032
|
-
import
|
|
8033
|
-
import { jsx as
|
|
8180
|
+
import styles84 from "./StepStrip.module.css";
|
|
8181
|
+
import { jsx as jsx214, jsxs as jsxs164 } from "react/jsx-runtime";
|
|
8034
8182
|
function StepStrip({
|
|
8035
8183
|
items,
|
|
8036
8184
|
activeId,
|
|
@@ -8040,28 +8188,28 @@ function StepStrip({
|
|
|
8040
8188
|
className,
|
|
8041
8189
|
"aria-label": ariaLabel
|
|
8042
8190
|
}) {
|
|
8043
|
-
return /* @__PURE__ */
|
|
8191
|
+
return /* @__PURE__ */ jsxs164(
|
|
8044
8192
|
"div",
|
|
8045
8193
|
{
|
|
8046
|
-
className: [
|
|
8194
|
+
className: [styles84.strip, className].filter(Boolean).join(" "),
|
|
8047
8195
|
role: "list",
|
|
8048
8196
|
"aria-label": ariaLabel,
|
|
8049
8197
|
children: [
|
|
8050
|
-
items.map((item, index) => /* @__PURE__ */
|
|
8198
|
+
items.map((item, index) => /* @__PURE__ */ jsxs164("div", { className: styles84.step, role: "listitem", children: [
|
|
8051
8199
|
renderItem(item, { isActive: item.id === activeId, index }),
|
|
8052
|
-
(index < items.length - 1 || onAdd) && /* @__PURE__ */
|
|
8200
|
+
(index < items.length - 1 || onAdd) && /* @__PURE__ */ jsx214(
|
|
8053
8201
|
"div",
|
|
8054
8202
|
{
|
|
8055
8203
|
className: [
|
|
8056
|
-
|
|
8057
|
-
index === items.length - 1 ?
|
|
8204
|
+
styles84.connector,
|
|
8205
|
+
index === items.length - 1 ? styles84.connectorDashed : ""
|
|
8058
8206
|
].filter(Boolean).join(" "),
|
|
8059
8207
|
"aria-hidden": "true"
|
|
8060
8208
|
}
|
|
8061
8209
|
)
|
|
8062
8210
|
] }, item.id)),
|
|
8063
|
-
onAdd && /* @__PURE__ */
|
|
8064
|
-
/* @__PURE__ */
|
|
8211
|
+
onAdd && /* @__PURE__ */ jsxs164("button", { type: "button", className: styles84.addChip, onClick: onAdd, children: [
|
|
8212
|
+
/* @__PURE__ */ jsx214(Icon, { name: "plus", size: "sm", "aria-hidden": true }),
|
|
8065
8213
|
addLabel
|
|
8066
8214
|
] })
|
|
8067
8215
|
]
|
|
@@ -8070,9 +8218,9 @@ function StepStrip({
|
|
|
8070
8218
|
}
|
|
8071
8219
|
|
|
8072
8220
|
// src/components/FileDropzone/FileDropzone.tsx
|
|
8073
|
-
import { useRef as useRef26, useState as
|
|
8074
|
-
import
|
|
8075
|
-
import { jsx as
|
|
8221
|
+
import { useRef as useRef26, useState as useState27 } from "react";
|
|
8222
|
+
import styles85 from "./FileDropzone.module.css";
|
|
8223
|
+
import { jsx as jsx215, jsxs as jsxs165 } from "react/jsx-runtime";
|
|
8076
8224
|
function FileDropzone({
|
|
8077
8225
|
name,
|
|
8078
8226
|
accept,
|
|
@@ -8084,15 +8232,15 @@ function FileDropzone({
|
|
|
8084
8232
|
disabled,
|
|
8085
8233
|
className
|
|
8086
8234
|
}) {
|
|
8087
|
-
const [dragging, setDragging] =
|
|
8235
|
+
const [dragging, setDragging] = useState27(false);
|
|
8088
8236
|
const inputRef = useRef26(null);
|
|
8089
|
-
return /* @__PURE__ */
|
|
8237
|
+
return /* @__PURE__ */ jsxs165(
|
|
8090
8238
|
"label",
|
|
8091
8239
|
{
|
|
8092
8240
|
className: [
|
|
8093
|
-
|
|
8094
|
-
dragging ?
|
|
8095
|
-
disabled ?
|
|
8241
|
+
styles85.dropzone,
|
|
8242
|
+
dragging ? styles85.dropzoneActive : "",
|
|
8243
|
+
disabled ? styles85.dropzoneDisabled : "",
|
|
8096
8244
|
className
|
|
8097
8245
|
].filter(Boolean).join(" "),
|
|
8098
8246
|
onDragOver: (event) => {
|
|
@@ -8115,12 +8263,12 @@ function FileDropzone({
|
|
|
8115
8263
|
onFileSelect(dropped);
|
|
8116
8264
|
},
|
|
8117
8265
|
children: [
|
|
8118
|
-
/* @__PURE__ */
|
|
8119
|
-
/* @__PURE__ */
|
|
8120
|
-
/* @__PURE__ */
|
|
8121
|
-
hint && /* @__PURE__ */
|
|
8266
|
+
/* @__PURE__ */ jsx215("span", { className: styles85.icon, "aria-hidden": "true", children: icon ?? /* @__PURE__ */ jsx215(Icon, { name: "file", size: "lg", "aria-hidden": true }) }),
|
|
8267
|
+
/* @__PURE__ */ jsxs165("span", { className: styles85.text, children: [
|
|
8268
|
+
/* @__PURE__ */ jsx215("span", { className: styles85.title, children: label }),
|
|
8269
|
+
hint && /* @__PURE__ */ jsx215("span", { className: styles85.hint, children: hint })
|
|
8122
8270
|
] }),
|
|
8123
|
-
/* @__PURE__ */
|
|
8271
|
+
/* @__PURE__ */ jsx215(
|
|
8124
8272
|
"input",
|
|
8125
8273
|
{
|
|
8126
8274
|
ref: inputRef,
|
|
@@ -8130,7 +8278,7 @@ function FileDropzone({
|
|
|
8130
8278
|
accept,
|
|
8131
8279
|
disabled,
|
|
8132
8280
|
onChange: (event) => onFileSelect(event.target.files?.[0] ?? null),
|
|
8133
|
-
className:
|
|
8281
|
+
className: styles85.hiddenInput
|
|
8134
8282
|
}
|
|
8135
8283
|
)
|
|
8136
8284
|
]
|
|
@@ -8139,7 +8287,7 @@ function FileDropzone({
|
|
|
8139
8287
|
}
|
|
8140
8288
|
|
|
8141
8289
|
// src/components/Calendar/Calendar.tsx
|
|
8142
|
-
import { useRef as useRef27, useState as
|
|
8290
|
+
import { useRef as useRef27, useState as useState28 } from "react";
|
|
8143
8291
|
|
|
8144
8292
|
// src/components/Calendar/dateUtils.ts
|
|
8145
8293
|
function startOfMonth(date) {
|
|
@@ -8205,8 +8353,8 @@ function formatDateLabel(date) {
|
|
|
8205
8353
|
}
|
|
8206
8354
|
|
|
8207
8355
|
// src/components/Calendar/Calendar.tsx
|
|
8208
|
-
import
|
|
8209
|
-
import { jsx as
|
|
8356
|
+
import styles86 from "./Calendar.module.css";
|
|
8357
|
+
import { jsx as jsx216, jsxs as jsxs166 } from "react/jsx-runtime";
|
|
8210
8358
|
var WEEKDAY_LABEL_WEEK = getMonthGrid(new Date(2026, 0, 1))[0] ?? [];
|
|
8211
8359
|
function Calendar({
|
|
8212
8360
|
value,
|
|
@@ -8215,8 +8363,8 @@ function Calendar({
|
|
|
8215
8363
|
maxDate,
|
|
8216
8364
|
"aria-label": ariaLabel
|
|
8217
8365
|
}) {
|
|
8218
|
-
const [displayedMonth, setDisplayedMonth] =
|
|
8219
|
-
const [focusedDate, setFocusedDate] =
|
|
8366
|
+
const [displayedMonth, setDisplayedMonth] = useState28(() => startOfMonth(value ?? /* @__PURE__ */ new Date()));
|
|
8367
|
+
const [focusedDate, setFocusedDate] = useState28(() => value ?? /* @__PURE__ */ new Date());
|
|
8220
8368
|
const gridRef = useRef27(null);
|
|
8221
8369
|
const weeks = getMonthGrid(displayedMonth);
|
|
8222
8370
|
function goToMonth(next) {
|
|
@@ -8276,51 +8424,51 @@ function Calendar({
|
|
|
8276
8424
|
default:
|
|
8277
8425
|
}
|
|
8278
8426
|
}
|
|
8279
|
-
return /* @__PURE__ */
|
|
8280
|
-
/* @__PURE__ */
|
|
8281
|
-
/* @__PURE__ */
|
|
8427
|
+
return /* @__PURE__ */ jsxs166("div", { className: styles86.calendar, "aria-label": ariaLabel, children: [
|
|
8428
|
+
/* @__PURE__ */ jsxs166("div", { className: styles86.header, children: [
|
|
8429
|
+
/* @__PURE__ */ jsx216(
|
|
8282
8430
|
"button",
|
|
8283
8431
|
{
|
|
8284
8432
|
type: "button",
|
|
8285
|
-
className:
|
|
8433
|
+
className: styles86.navButton,
|
|
8286
8434
|
"aria-label": "Previous month",
|
|
8287
8435
|
onClick: () => goToMonth(addMonths(displayedMonth, -1)),
|
|
8288
|
-
children: /* @__PURE__ */
|
|
8436
|
+
children: /* @__PURE__ */ jsx216(Icon, { name: "chevron-left", size: "sm", "aria-hidden": true })
|
|
8289
8437
|
}
|
|
8290
8438
|
),
|
|
8291
|
-
/* @__PURE__ */
|
|
8292
|
-
/* @__PURE__ */
|
|
8439
|
+
/* @__PURE__ */ jsx216("span", { className: styles86.monthLabel, children: formatMonthYear(displayedMonth) }),
|
|
8440
|
+
/* @__PURE__ */ jsx216(
|
|
8293
8441
|
"button",
|
|
8294
8442
|
{
|
|
8295
8443
|
type: "button",
|
|
8296
|
-
className:
|
|
8444
|
+
className: styles86.navButton,
|
|
8297
8445
|
"aria-label": "Next month",
|
|
8298
8446
|
onClick: () => goToMonth(addMonths(displayedMonth, 1)),
|
|
8299
|
-
children: /* @__PURE__ */
|
|
8447
|
+
children: /* @__PURE__ */ jsx216(Icon, { name: "chevron-right", size: "sm", "aria-hidden": true })
|
|
8300
8448
|
}
|
|
8301
8449
|
)
|
|
8302
8450
|
] }),
|
|
8303
|
-
/* @__PURE__ */
|
|
8451
|
+
/* @__PURE__ */ jsxs166(
|
|
8304
8452
|
"div",
|
|
8305
8453
|
{
|
|
8306
8454
|
ref: gridRef,
|
|
8307
8455
|
role: "grid",
|
|
8308
8456
|
"aria-label": formatMonthYear(displayedMonth),
|
|
8309
|
-
className:
|
|
8457
|
+
className: styles86.grid,
|
|
8310
8458
|
onKeyDown: handleKeyDown,
|
|
8311
8459
|
tabIndex: -1,
|
|
8312
8460
|
children: [
|
|
8313
|
-
/* @__PURE__ */
|
|
8461
|
+
/* @__PURE__ */ jsx216("div", { role: "row", className: styles86.weekdayRow, children: WEEKDAY_LABEL_WEEK.map((d) => /* @__PURE__ */ jsx216("span", { role: "columnheader", className: styles86.weekday, "aria-hidden": true, children: formatWeekdayShort(d) }, d.getDay())) }),
|
|
8314
8462
|
weeks.map((week) => {
|
|
8315
8463
|
const firstDayOfWeek = week[0];
|
|
8316
8464
|
if (!firstDayOfWeek) return null;
|
|
8317
|
-
return /* @__PURE__ */
|
|
8465
|
+
return /* @__PURE__ */ jsx216("div", { role: "row", className: styles86.week, children: week.map((date) => {
|
|
8318
8466
|
const isCurrentMonth = isSameMonth(date, displayedMonth);
|
|
8319
8467
|
const isSelected = value !== null && isSameDay(date, value);
|
|
8320
8468
|
const isToday = isSameDay(date, /* @__PURE__ */ new Date());
|
|
8321
8469
|
const isFocusTarget = isSameDay(date, focusedDate);
|
|
8322
8470
|
const disabled = !isWithinRange(date, minDate, maxDate);
|
|
8323
|
-
return /* @__PURE__ */
|
|
8471
|
+
return /* @__PURE__ */ jsx216("div", { role: "gridcell", "aria-selected": isSelected, children: /* @__PURE__ */ jsx216(
|
|
8324
8472
|
"button",
|
|
8325
8473
|
{
|
|
8326
8474
|
type: "button",
|
|
@@ -8329,10 +8477,10 @@ function Calendar({
|
|
|
8329
8477
|
"aria-current": isToday ? "date" : void 0,
|
|
8330
8478
|
"aria-label": formatDateLabel(date),
|
|
8331
8479
|
className: [
|
|
8332
|
-
|
|
8333
|
-
!isCurrentMonth ?
|
|
8334
|
-
isSelected ?
|
|
8335
|
-
isToday && !isSelected ?
|
|
8480
|
+
styles86.day,
|
|
8481
|
+
!isCurrentMonth ? styles86.dayOutside : "",
|
|
8482
|
+
isSelected ? styles86.daySelected : "",
|
|
8483
|
+
isToday && !isSelected ? styles86.dayToday : ""
|
|
8336
8484
|
].filter(Boolean).join(" "),
|
|
8337
8485
|
onClick: () => selectDate(date),
|
|
8338
8486
|
onFocus: () => setFocusedDate(date),
|
|
@@ -8348,9 +8496,9 @@ function Calendar({
|
|
|
8348
8496
|
}
|
|
8349
8497
|
|
|
8350
8498
|
// src/components/DatePicker/DatePicker.tsx
|
|
8351
|
-
import { useState as
|
|
8352
|
-
import
|
|
8353
|
-
import { Fragment as Fragment18, jsx as
|
|
8499
|
+
import { useState as useState29 } from "react";
|
|
8500
|
+
import styles87 from "./DatePicker.module.css";
|
|
8501
|
+
import { Fragment as Fragment18, jsx as jsx217, jsxs as jsxs167 } from "react/jsx-runtime";
|
|
8354
8502
|
var POPOVER_WIDTH = 320;
|
|
8355
8503
|
function DatePicker({
|
|
8356
8504
|
value,
|
|
@@ -8361,29 +8509,29 @@ function DatePicker({
|
|
|
8361
8509
|
"aria-label": ariaLabel,
|
|
8362
8510
|
disabled = false
|
|
8363
8511
|
}) {
|
|
8364
|
-
const [open, setOpen] =
|
|
8512
|
+
const [open, setOpen] = useState29(false);
|
|
8365
8513
|
const isMobile = useIsMobile();
|
|
8366
8514
|
function handleSelect(date) {
|
|
8367
8515
|
onChange(date);
|
|
8368
8516
|
setOpen(false);
|
|
8369
8517
|
}
|
|
8370
|
-
const trigger = /* @__PURE__ */
|
|
8518
|
+
const trigger = /* @__PURE__ */ jsxs167(
|
|
8371
8519
|
"button",
|
|
8372
8520
|
{
|
|
8373
8521
|
type: "button",
|
|
8374
|
-
className:
|
|
8522
|
+
className: styles87.trigger,
|
|
8375
8523
|
disabled,
|
|
8376
8524
|
"aria-label": ariaLabel,
|
|
8377
8525
|
"aria-haspopup": "dialog",
|
|
8378
8526
|
"aria-expanded": open,
|
|
8379
8527
|
onClick: () => setOpen((o) => !o),
|
|
8380
8528
|
children: [
|
|
8381
|
-
/* @__PURE__ */
|
|
8382
|
-
/* @__PURE__ */
|
|
8529
|
+
/* @__PURE__ */ jsx217("span", { className: value ? styles87.triggerValue : styles87.triggerPlaceholder, children: value ? formatDateShort(value) : placeholder }),
|
|
8530
|
+
/* @__PURE__ */ jsx217(Icon, { name: "calendar", size: "sm", "aria-hidden": true })
|
|
8383
8531
|
]
|
|
8384
8532
|
}
|
|
8385
8533
|
);
|
|
8386
|
-
const calendar = /* @__PURE__ */
|
|
8534
|
+
const calendar = /* @__PURE__ */ jsx217(
|
|
8387
8535
|
Calendar,
|
|
8388
8536
|
{
|
|
8389
8537
|
value,
|
|
@@ -8394,12 +8542,12 @@ function DatePicker({
|
|
|
8394
8542
|
}
|
|
8395
8543
|
);
|
|
8396
8544
|
if (isMobile) {
|
|
8397
|
-
return /* @__PURE__ */
|
|
8545
|
+
return /* @__PURE__ */ jsxs167(Fragment18, { children: [
|
|
8398
8546
|
trigger,
|
|
8399
|
-
/* @__PURE__ */
|
|
8547
|
+
/* @__PURE__ */ jsx217(Drawer, { open, onClose: () => setOpen(false), "aria-label": ariaLabel, children: /* @__PURE__ */ jsx217("div", { className: styles87.drawerBody, children: calendar }) })
|
|
8400
8548
|
] });
|
|
8401
8549
|
}
|
|
8402
|
-
return /* @__PURE__ */
|
|
8550
|
+
return /* @__PURE__ */ jsx217(
|
|
8403
8551
|
Popover,
|
|
8404
8552
|
{
|
|
8405
8553
|
trigger,
|
|
@@ -8407,17 +8555,17 @@ function DatePicker({
|
|
|
8407
8555
|
onClose: () => setOpen(false),
|
|
8408
8556
|
"aria-label": ariaLabel,
|
|
8409
8557
|
width: POPOVER_WIDTH,
|
|
8410
|
-
children: /* @__PURE__ */
|
|
8558
|
+
children: /* @__PURE__ */ jsx217("div", { className: styles87.popoverBody, children: calendar })
|
|
8411
8559
|
}
|
|
8412
8560
|
);
|
|
8413
8561
|
}
|
|
8414
8562
|
|
|
8415
8563
|
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
8416
|
-
import { useState as
|
|
8564
|
+
import { useState as useState31 } from "react";
|
|
8417
8565
|
import pickerStyles from "./DatePicker.module.css";
|
|
8418
8566
|
|
|
8419
8567
|
// src/components/DateRangePicker/RangeCalendar.tsx
|
|
8420
|
-
import { useRef as useRef28, useState as
|
|
8568
|
+
import { useRef as useRef28, useState as useState30 } from "react";
|
|
8421
8569
|
import calendarStyles from "./Calendar.module.css";
|
|
8422
8570
|
|
|
8423
8571
|
// src/components/DateRangePicker/rangeUtils.ts
|
|
@@ -8446,8 +8594,8 @@ function rangeOf(first, second) {
|
|
|
8446
8594
|
}
|
|
8447
8595
|
|
|
8448
8596
|
// src/components/DateRangePicker/RangeCalendar.tsx
|
|
8449
|
-
import
|
|
8450
|
-
import { jsx as
|
|
8597
|
+
import styles88 from "./DateRangePicker.module.css";
|
|
8598
|
+
import { jsx as jsx218, jsxs as jsxs168 } from "react/jsx-runtime";
|
|
8451
8599
|
var WEEKDAY_LABEL_WEEK2 = getMonthGrid(new Date(2026, 0, 1))[0] ?? [];
|
|
8452
8600
|
function RangeCalendar({
|
|
8453
8601
|
value,
|
|
@@ -8456,12 +8604,12 @@ function RangeCalendar({
|
|
|
8456
8604
|
maxDate,
|
|
8457
8605
|
"aria-label": ariaLabel
|
|
8458
8606
|
}) {
|
|
8459
|
-
const [displayedMonth, setDisplayedMonth] =
|
|
8607
|
+
const [displayedMonth, setDisplayedMonth] = useState30(
|
|
8460
8608
|
() => startOfMonth(value?.start ?? /* @__PURE__ */ new Date())
|
|
8461
8609
|
);
|
|
8462
|
-
const [focusedDate, setFocusedDate] =
|
|
8463
|
-
const [first, setFirst] =
|
|
8464
|
-
const [hover, setHover] =
|
|
8610
|
+
const [focusedDate, setFocusedDate] = useState30(() => value?.start ?? /* @__PURE__ */ new Date());
|
|
8611
|
+
const [first, setFirst] = useState30(null);
|
|
8612
|
+
const [hover, setHover] = useState30(null);
|
|
8465
8613
|
const gridRef = useRef28(null);
|
|
8466
8614
|
const weeks = getMonthGrid(displayedMonth);
|
|
8467
8615
|
const shown = first ? rangeOf(first, hover ?? first) : value;
|
|
@@ -8529,31 +8677,31 @@ function RangeCalendar({
|
|
|
8529
8677
|
}
|
|
8530
8678
|
}
|
|
8531
8679
|
const nights = shown ? nightsBetween(shown.start, shown.end) : null;
|
|
8532
|
-
return /* @__PURE__ */
|
|
8533
|
-
/* @__PURE__ */
|
|
8534
|
-
/* @__PURE__ */
|
|
8680
|
+
return /* @__PURE__ */ jsxs168("div", { className: calendarStyles.calendar, "aria-label": ariaLabel, children: [
|
|
8681
|
+
/* @__PURE__ */ jsxs168("div", { className: calendarStyles.header, children: [
|
|
8682
|
+
/* @__PURE__ */ jsx218(
|
|
8535
8683
|
"button",
|
|
8536
8684
|
{
|
|
8537
8685
|
type: "button",
|
|
8538
8686
|
className: calendarStyles.navButton,
|
|
8539
8687
|
"aria-label": "Previous month",
|
|
8540
8688
|
onClick: () => goToMonth(addMonths(displayedMonth, -1)),
|
|
8541
|
-
children: /* @__PURE__ */
|
|
8689
|
+
children: /* @__PURE__ */ jsx218(Icon, { name: "chevron-left", size: "sm", "aria-hidden": true })
|
|
8542
8690
|
}
|
|
8543
8691
|
),
|
|
8544
|
-
/* @__PURE__ */
|
|
8545
|
-
/* @__PURE__ */
|
|
8692
|
+
/* @__PURE__ */ jsx218("span", { className: calendarStyles.monthLabel, children: formatMonthYear(displayedMonth) }),
|
|
8693
|
+
/* @__PURE__ */ jsx218(
|
|
8546
8694
|
"button",
|
|
8547
8695
|
{
|
|
8548
8696
|
type: "button",
|
|
8549
8697
|
className: calendarStyles.navButton,
|
|
8550
8698
|
"aria-label": "Next month",
|
|
8551
8699
|
onClick: () => goToMonth(addMonths(displayedMonth, 1)),
|
|
8552
|
-
children: /* @__PURE__ */
|
|
8700
|
+
children: /* @__PURE__ */ jsx218(Icon, { name: "chevron-right", size: "sm", "aria-hidden": true })
|
|
8553
8701
|
}
|
|
8554
8702
|
)
|
|
8555
8703
|
] }),
|
|
8556
|
-
/* @__PURE__ */
|
|
8704
|
+
/* @__PURE__ */ jsxs168(
|
|
8557
8705
|
"div",
|
|
8558
8706
|
{
|
|
8559
8707
|
ref: gridRef,
|
|
@@ -8563,7 +8711,7 @@ function RangeCalendar({
|
|
|
8563
8711
|
onKeyDown: handleKeyDown,
|
|
8564
8712
|
tabIndex: -1,
|
|
8565
8713
|
children: [
|
|
8566
|
-
/* @__PURE__ */
|
|
8714
|
+
/* @__PURE__ */ jsx218("div", { role: "row", className: calendarStyles.weekdayRow, children: WEEKDAY_LABEL_WEEK2.map((d) => /* @__PURE__ */ jsx218(
|
|
8567
8715
|
"span",
|
|
8568
8716
|
{
|
|
8569
8717
|
role: "columnheader",
|
|
@@ -8576,25 +8724,25 @@ function RangeCalendar({
|
|
|
8576
8724
|
weeks.map((week) => {
|
|
8577
8725
|
const firstDayOfWeek = week[0];
|
|
8578
8726
|
if (!firstDayOfWeek) return null;
|
|
8579
|
-
return /* @__PURE__ */
|
|
8727
|
+
return /* @__PURE__ */ jsx218("div", { role: "row", className: calendarStyles.week, children: week.map((date) => {
|
|
8580
8728
|
const isCurrentMonth = isSameMonth(date, displayedMonth);
|
|
8581
8729
|
const isStart = shown !== null && isSameDay(date, shown.start);
|
|
8582
8730
|
const isEnd = shown !== null && isSameDay(date, shown.end);
|
|
8583
8731
|
const inside = shown !== null && nightsBetween(shown.start, date) > 0 && nightsBetween(date, shown.end) > 0;
|
|
8584
8732
|
const isToday = isSameDay(date, /* @__PURE__ */ new Date());
|
|
8585
8733
|
const disabled = !isWithinRange(date, minDate, maxDate);
|
|
8586
|
-
return /* @__PURE__ */
|
|
8734
|
+
return /* @__PURE__ */ jsx218(
|
|
8587
8735
|
"div",
|
|
8588
8736
|
{
|
|
8589
8737
|
role: "gridcell",
|
|
8590
8738
|
"aria-selected": isStart || isEnd || inside,
|
|
8591
8739
|
className: [
|
|
8592
|
-
|
|
8593
|
-
inside ?
|
|
8594
|
-
isStart && !isEnd ?
|
|
8595
|
-
isEnd && !isStart ?
|
|
8740
|
+
styles88.cell,
|
|
8741
|
+
inside ? styles88.cellInside : "",
|
|
8742
|
+
isStart && !isEnd ? styles88.cellStart : "",
|
|
8743
|
+
isEnd && !isStart ? styles88.cellEnd : ""
|
|
8596
8744
|
].filter(Boolean).join(" "),
|
|
8597
|
-
children: /* @__PURE__ */
|
|
8745
|
+
children: /* @__PURE__ */ jsx218(
|
|
8598
8746
|
"button",
|
|
8599
8747
|
{
|
|
8600
8748
|
type: "button",
|
|
@@ -8626,12 +8774,12 @@ function RangeCalendar({
|
|
|
8626
8774
|
]
|
|
8627
8775
|
}
|
|
8628
8776
|
),
|
|
8629
|
-
/* @__PURE__ */
|
|
8777
|
+
/* @__PURE__ */ jsx218("p", { className: styles88.summary, role: "status", children: first ? "Now choose the last day." : nights === null ? "Choose the first day." : nightsLabel(nights) })
|
|
8630
8778
|
] });
|
|
8631
8779
|
}
|
|
8632
8780
|
|
|
8633
8781
|
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
8634
|
-
import { Fragment as Fragment19, jsx as
|
|
8782
|
+
import { Fragment as Fragment19, jsx as jsx219, jsxs as jsxs169 } from "react/jsx-runtime";
|
|
8635
8783
|
var POPOVER_WIDTH2 = 320;
|
|
8636
8784
|
function DateRangePicker({
|
|
8637
8785
|
value,
|
|
@@ -8642,7 +8790,7 @@ function DateRangePicker({
|
|
|
8642
8790
|
"aria-label": ariaLabel,
|
|
8643
8791
|
disabled = false
|
|
8644
8792
|
}) {
|
|
8645
|
-
const [open, setOpen] =
|
|
8793
|
+
const [open, setOpen] = useState31(false);
|
|
8646
8794
|
const isMobile = useIsMobile();
|
|
8647
8795
|
const start = parseIso(value.start);
|
|
8648
8796
|
const end = parseIso(value.end);
|
|
@@ -8651,7 +8799,7 @@ function DateRangePicker({
|
|
|
8651
8799
|
onChange({ start: toIso(next.start), end: toIso(next.end) });
|
|
8652
8800
|
setOpen(false);
|
|
8653
8801
|
}
|
|
8654
|
-
const trigger = /* @__PURE__ */
|
|
8802
|
+
const trigger = /* @__PURE__ */ jsxs169(
|
|
8655
8803
|
"button",
|
|
8656
8804
|
{
|
|
8657
8805
|
type: "button",
|
|
@@ -8662,12 +8810,12 @@ function DateRangePicker({
|
|
|
8662
8810
|
"aria-expanded": open,
|
|
8663
8811
|
onClick: () => setOpen((o) => !o),
|
|
8664
8812
|
children: [
|
|
8665
|
-
/* @__PURE__ */
|
|
8666
|
-
/* @__PURE__ */
|
|
8813
|
+
/* @__PURE__ */ jsx219("span", { className: range ? pickerStyles.triggerValue : pickerStyles.triggerPlaceholder, children: range ? `${formatDateShort(range.start)} \u2013 ${formatDateShort(range.end)} \xB7 ${nightsLabel(nightsBetween(range.start, range.end))}` : placeholder }),
|
|
8814
|
+
/* @__PURE__ */ jsx219(Icon, { name: "calendar", size: "sm", "aria-hidden": true })
|
|
8667
8815
|
]
|
|
8668
8816
|
}
|
|
8669
8817
|
);
|
|
8670
|
-
const calendar = /* @__PURE__ */
|
|
8818
|
+
const calendar = /* @__PURE__ */ jsx219(
|
|
8671
8819
|
RangeCalendar,
|
|
8672
8820
|
{
|
|
8673
8821
|
value: range,
|
|
@@ -8678,12 +8826,12 @@ function DateRangePicker({
|
|
|
8678
8826
|
}
|
|
8679
8827
|
);
|
|
8680
8828
|
if (isMobile) {
|
|
8681
|
-
return /* @__PURE__ */
|
|
8829
|
+
return /* @__PURE__ */ jsxs169(Fragment19, { children: [
|
|
8682
8830
|
trigger,
|
|
8683
|
-
/* @__PURE__ */
|
|
8831
|
+
/* @__PURE__ */ jsx219(Drawer, { open, onClose: () => setOpen(false), "aria-label": ariaLabel, children: /* @__PURE__ */ jsx219("div", { className: pickerStyles.drawerBody, children: calendar }) })
|
|
8684
8832
|
] });
|
|
8685
8833
|
}
|
|
8686
|
-
return /* @__PURE__ */
|
|
8834
|
+
return /* @__PURE__ */ jsx219(
|
|
8687
8835
|
Popover,
|
|
8688
8836
|
{
|
|
8689
8837
|
trigger,
|
|
@@ -8691,15 +8839,15 @@ function DateRangePicker({
|
|
|
8691
8839
|
onClose: () => setOpen(false),
|
|
8692
8840
|
"aria-label": ariaLabel,
|
|
8693
8841
|
width: POPOVER_WIDTH2,
|
|
8694
|
-
children: /* @__PURE__ */
|
|
8842
|
+
children: /* @__PURE__ */ jsx219("div", { className: pickerStyles.popoverBody, children: calendar })
|
|
8695
8843
|
}
|
|
8696
8844
|
);
|
|
8697
8845
|
}
|
|
8698
8846
|
|
|
8699
8847
|
// src/components/SuggestionInput/SuggestionInput.tsx
|
|
8700
|
-
import { useId as useId11, useRef as useRef29, useState as
|
|
8701
|
-
import
|
|
8702
|
-
import { Fragment as Fragment20, jsx as
|
|
8848
|
+
import { useId as useId11, useRef as useRef29, useState as useState32 } from "react";
|
|
8849
|
+
import styles89 from "./SuggestionInput.module.css";
|
|
8850
|
+
import { Fragment as Fragment20, jsx as jsx220, jsxs as jsxs170 } from "react/jsx-runtime";
|
|
8703
8851
|
function SuggestionInput({
|
|
8704
8852
|
value,
|
|
8705
8853
|
onChange,
|
|
@@ -8718,8 +8866,8 @@ function SuggestionInput({
|
|
|
8718
8866
|
const inputId = id ?? generatedId;
|
|
8719
8867
|
const listId = `${inputId}-suggestions`;
|
|
8720
8868
|
const inputRef = useRef29(null);
|
|
8721
|
-
const [focused, setFocused] =
|
|
8722
|
-
const [activeIndex, setActiveIndex] =
|
|
8869
|
+
const [focused, setFocused] = useState32(false);
|
|
8870
|
+
const [activeIndex, setActiveIndex] = useState32(-1);
|
|
8723
8871
|
const showCreateRow = Boolean(onCreate && createLabel && value.trim());
|
|
8724
8872
|
const rowCount = options.length + (showCreateRow ? 1 : 0);
|
|
8725
8873
|
const open = focused && (rowCount > 0 || loading);
|
|
@@ -8756,7 +8904,7 @@ function SuggestionInput({
|
|
|
8756
8904
|
close();
|
|
8757
8905
|
}
|
|
8758
8906
|
}
|
|
8759
|
-
const trigger = /* @__PURE__ */
|
|
8907
|
+
const trigger = /* @__PURE__ */ jsx220(
|
|
8760
8908
|
"input",
|
|
8761
8909
|
{
|
|
8762
8910
|
ref: inputRef,
|
|
@@ -8768,7 +8916,7 @@ function SuggestionInput({
|
|
|
8768
8916
|
"aria-autocomplete": "list",
|
|
8769
8917
|
"aria-activedescendant": activeIndex >= 0 ? `${listId}-option-${activeIndex}` : void 0,
|
|
8770
8918
|
"aria-label": ariaLabel,
|
|
8771
|
-
className: [
|
|
8919
|
+
className: [styles89.input, className].filter(Boolean).join(" "),
|
|
8772
8920
|
value,
|
|
8773
8921
|
placeholder,
|
|
8774
8922
|
disabled,
|
|
@@ -8781,7 +8929,7 @@ function SuggestionInput({
|
|
|
8781
8929
|
onKeyDown: handleKeyDown
|
|
8782
8930
|
}
|
|
8783
8931
|
);
|
|
8784
|
-
return /* @__PURE__ */
|
|
8932
|
+
return /* @__PURE__ */ jsx220(
|
|
8785
8933
|
Popover,
|
|
8786
8934
|
{
|
|
8787
8935
|
trigger,
|
|
@@ -8789,29 +8937,29 @@ function SuggestionInput({
|
|
|
8789
8937
|
onClose: close,
|
|
8790
8938
|
width: "trigger",
|
|
8791
8939
|
"aria-label": `${ariaLabel} suggestions`,
|
|
8792
|
-
children: /* @__PURE__ */
|
|
8793
|
-
options.map((option, index) => /* @__PURE__ */
|
|
8940
|
+
children: /* @__PURE__ */ jsx220("ul", { id: listId, role: "listbox", className: styles89.list, children: loading ? /* @__PURE__ */ jsx220("li", { className: styles89.status, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs170(Fragment20, { children: [
|
|
8941
|
+
options.map((option, index) => /* @__PURE__ */ jsx220("li", { role: "none", children: /* @__PURE__ */ jsxs170(
|
|
8794
8942
|
"button",
|
|
8795
8943
|
{
|
|
8796
8944
|
id: `${listId}-option-${index}`,
|
|
8797
8945
|
role: "option",
|
|
8798
8946
|
"aria-selected": index === activeIndex,
|
|
8799
8947
|
type: "button",
|
|
8800
|
-
className: [
|
|
8948
|
+
className: [styles89.option, index === activeIndex ? styles89.optionActive : ""].filter(Boolean).join(" "),
|
|
8801
8949
|
onMouseDown: (e) => {
|
|
8802
8950
|
e.preventDefault();
|
|
8803
8951
|
commitIndex(index);
|
|
8804
8952
|
},
|
|
8805
8953
|
children: [
|
|
8806
|
-
option.icon && /* @__PURE__ */
|
|
8807
|
-
/* @__PURE__ */
|
|
8808
|
-
option.meta && /* @__PURE__ */
|
|
8954
|
+
option.icon && /* @__PURE__ */ jsx220("span", { className: styles89.optionIcon, children: option.icon }),
|
|
8955
|
+
/* @__PURE__ */ jsx220("span", { className: styles89.optionLabel, children: option.label }),
|
|
8956
|
+
option.meta && /* @__PURE__ */ jsx220("span", { className: styles89.optionMeta, children: option.meta })
|
|
8809
8957
|
]
|
|
8810
8958
|
}
|
|
8811
8959
|
) }, option.id)),
|
|
8812
|
-
showCreateRow && createLabel && /* @__PURE__ */
|
|
8813
|
-
options.length > 0 && /* @__PURE__ */
|
|
8814
|
-
/* @__PURE__ */
|
|
8960
|
+
showCreateRow && createLabel && /* @__PURE__ */ jsxs170("li", { role: "none", children: [
|
|
8961
|
+
options.length > 0 && /* @__PURE__ */ jsx220("div", { className: styles89.divider }),
|
|
8962
|
+
/* @__PURE__ */ jsx220(
|
|
8815
8963
|
"button",
|
|
8816
8964
|
{
|
|
8817
8965
|
id: `${listId}-option-${options.length}`,
|
|
@@ -8819,9 +8967,9 @@ function SuggestionInput({
|
|
|
8819
8967
|
"aria-selected": options.length === activeIndex,
|
|
8820
8968
|
type: "button",
|
|
8821
8969
|
className: [
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
options.length === activeIndex ?
|
|
8970
|
+
styles89.option,
|
|
8971
|
+
styles89.optionCreate,
|
|
8972
|
+
options.length === activeIndex ? styles89.optionActive : ""
|
|
8825
8973
|
].filter(Boolean).join(" "),
|
|
8826
8974
|
onMouseDown: (e) => {
|
|
8827
8975
|
e.preventDefault();
|
|
@@ -8837,9 +8985,9 @@ function SuggestionInput({
|
|
|
8837
8985
|
}
|
|
8838
8986
|
|
|
8839
8987
|
// src/components/IconPicker/IconPicker.tsx
|
|
8840
|
-
import { useState as
|
|
8841
|
-
import
|
|
8842
|
-
import { jsx as
|
|
8988
|
+
import { useState as useState33 } from "react";
|
|
8989
|
+
import styles90 from "./IconPicker.module.css";
|
|
8990
|
+
import { jsx as jsx221, jsxs as jsxs171 } from "react/jsx-runtime";
|
|
8843
8991
|
function IconPicker({
|
|
8844
8992
|
value,
|
|
8845
8993
|
onChange,
|
|
@@ -8849,24 +8997,24 @@ function IconPicker({
|
|
|
8849
8997
|
disabled = false,
|
|
8850
8998
|
className
|
|
8851
8999
|
}) {
|
|
8852
|
-
const [open, setOpen] =
|
|
8853
|
-
const trigger = /* @__PURE__ */
|
|
9000
|
+
const [open, setOpen] = useState33(false);
|
|
9001
|
+
const trigger = /* @__PURE__ */ jsxs171(
|
|
8854
9002
|
"button",
|
|
8855
9003
|
{
|
|
8856
9004
|
type: "button",
|
|
8857
|
-
className: [
|
|
9005
|
+
className: [styles90.trigger, className].filter(Boolean).join(" "),
|
|
8858
9006
|
onClick: () => setOpen((o) => !o),
|
|
8859
9007
|
disabled,
|
|
8860
9008
|
"aria-label": ariaLabel,
|
|
8861
9009
|
"aria-haspopup": "true",
|
|
8862
9010
|
"aria-expanded": open,
|
|
8863
9011
|
children: [
|
|
8864
|
-
value ? /* @__PURE__ */
|
|
8865
|
-
triggerLabel && /* @__PURE__ */
|
|
9012
|
+
value ? /* @__PURE__ */ jsx221(Icon, { name: value, size: "md", "aria-hidden": true }) : /* @__PURE__ */ jsx221("span", { className: styles90.placeholder, "aria-hidden": true, children: "?" }),
|
|
9013
|
+
triggerLabel && /* @__PURE__ */ jsx221("span", { className: styles90.triggerLabel, children: triggerLabel })
|
|
8866
9014
|
]
|
|
8867
9015
|
}
|
|
8868
9016
|
);
|
|
8869
|
-
return /* @__PURE__ */
|
|
9017
|
+
return /* @__PURE__ */ jsx221(
|
|
8870
9018
|
Popover,
|
|
8871
9019
|
{
|
|
8872
9020
|
trigger,
|
|
@@ -8874,18 +9022,18 @@ function IconPicker({
|
|
|
8874
9022
|
onClose: () => setOpen(false),
|
|
8875
9023
|
width: 240,
|
|
8876
9024
|
"aria-label": `${ariaLabel} options`,
|
|
8877
|
-
children: /* @__PURE__ */
|
|
9025
|
+
children: /* @__PURE__ */ jsx221("div", { className: styles90.grid, role: "listbox", "aria-label": ariaLabel, children: options.map((name) => /* @__PURE__ */ jsx221(
|
|
8878
9026
|
"button",
|
|
8879
9027
|
{
|
|
8880
9028
|
type: "button",
|
|
8881
9029
|
role: "option",
|
|
8882
9030
|
"aria-selected": name === value,
|
|
8883
|
-
className: [
|
|
9031
|
+
className: [styles90.option, name === value ? styles90.optionSelected : ""].filter(Boolean).join(" "),
|
|
8884
9032
|
onClick: () => {
|
|
8885
9033
|
onChange(name);
|
|
8886
9034
|
setOpen(false);
|
|
8887
9035
|
},
|
|
8888
|
-
children: /* @__PURE__ */
|
|
9036
|
+
children: /* @__PURE__ */ jsx221(Icon, { name, size: "md", "aria-hidden": true })
|
|
8889
9037
|
},
|
|
8890
9038
|
name
|
|
8891
9039
|
)) })
|
|
@@ -8894,8 +9042,8 @@ function IconPicker({
|
|
|
8894
9042
|
}
|
|
8895
9043
|
|
|
8896
9044
|
// src/components/ColorPicker/ColorPicker.tsx
|
|
8897
|
-
import
|
|
8898
|
-
import { jsx as
|
|
9045
|
+
import styles91 from "./ColorPicker.module.css";
|
|
9046
|
+
import { jsx as jsx222, jsxs as jsxs172 } from "react/jsx-runtime";
|
|
8899
9047
|
function normalize(hex) {
|
|
8900
9048
|
return hex.toLowerCase();
|
|
8901
9049
|
}
|
|
@@ -8915,14 +9063,14 @@ function ColorPicker({
|
|
|
8915
9063
|
const matchedSwatch = swatches.find((s) => normalize(s.value) === normalizedValue);
|
|
8916
9064
|
const isCustomActive = normalizedValue !== null && !matchedSwatch;
|
|
8917
9065
|
const customDialValue = isCustomActive && value ? value : swatches[0]?.value ?? "#000000";
|
|
8918
|
-
return /* @__PURE__ */
|
|
9066
|
+
return /* @__PURE__ */ jsxs172(
|
|
8919
9067
|
"div",
|
|
8920
9068
|
{
|
|
8921
|
-
className: [
|
|
9069
|
+
className: [styles91.row, className].filter(Boolean).join(" "),
|
|
8922
9070
|
role: "group",
|
|
8923
9071
|
"aria-label": ariaLabel,
|
|
8924
9072
|
children: [
|
|
8925
|
-
allowNone && /* @__PURE__ */
|
|
9073
|
+
allowNone && /* @__PURE__ */ jsx222(
|
|
8926
9074
|
"button",
|
|
8927
9075
|
{
|
|
8928
9076
|
type: "button",
|
|
@@ -8931,15 +9079,15 @@ function ColorPicker({
|
|
|
8931
9079
|
"aria-label": noneLabel,
|
|
8932
9080
|
title: noneLabel,
|
|
8933
9081
|
disabled,
|
|
8934
|
-
className: [
|
|
9082
|
+
className: [styles91.swatch, styles91.swatchNone, value === null ? styles91.swatchSelected : ""].filter(Boolean).join(" "),
|
|
8935
9083
|
onClick: () => {
|
|
8936
9084
|
onChange(null);
|
|
8937
9085
|
onSelectionComplete?.();
|
|
8938
9086
|
},
|
|
8939
|
-
children: /* @__PURE__ */
|
|
9087
|
+
children: /* @__PURE__ */ jsx222(Icon, { name: "x", size: "sm", "aria-hidden": true })
|
|
8940
9088
|
}
|
|
8941
9089
|
),
|
|
8942
|
-
swatches.map((s) => /* @__PURE__ */
|
|
9090
|
+
swatches.map((s) => /* @__PURE__ */ jsx222(
|
|
8943
9091
|
"button",
|
|
8944
9092
|
{
|
|
8945
9093
|
type: "button",
|
|
@@ -8949,8 +9097,8 @@ function ColorPicker({
|
|
|
8949
9097
|
title: s.label,
|
|
8950
9098
|
disabled,
|
|
8951
9099
|
className: [
|
|
8952
|
-
|
|
8953
|
-
normalize(s.value) === normalizedValue ?
|
|
9100
|
+
styles91.swatch,
|
|
9101
|
+
normalize(s.value) === normalizedValue ? styles91.swatchSelected : ""
|
|
8954
9102
|
].filter(Boolean).join(" "),
|
|
8955
9103
|
style: { backgroundColor: s.value },
|
|
8956
9104
|
onClick: () => {
|
|
@@ -8960,19 +9108,19 @@ function ColorPicker({
|
|
|
8960
9108
|
},
|
|
8961
9109
|
s.value
|
|
8962
9110
|
)),
|
|
8963
|
-
/* @__PURE__ */
|
|
9111
|
+
/* @__PURE__ */ jsxs172(
|
|
8964
9112
|
"span",
|
|
8965
9113
|
{
|
|
8966
9114
|
className: [
|
|
8967
|
-
|
|
8968
|
-
isCustomActive ?
|
|
9115
|
+
styles91.customWrapper,
|
|
9116
|
+
isCustomActive ? styles91.swatchSelected : styles91.customWrapperEmpty
|
|
8969
9117
|
].filter(Boolean).join(" "),
|
|
8970
9118
|
children: [
|
|
8971
|
-
/* @__PURE__ */
|
|
9119
|
+
/* @__PURE__ */ jsx222(
|
|
8972
9120
|
"input",
|
|
8973
9121
|
{
|
|
8974
9122
|
type: "color",
|
|
8975
|
-
className:
|
|
9123
|
+
className: styles91.customInput,
|
|
8976
9124
|
"aria-label": customLabel,
|
|
8977
9125
|
title: customLabel,
|
|
8978
9126
|
disabled,
|
|
@@ -8980,7 +9128,7 @@ function ColorPicker({
|
|
|
8980
9128
|
onChange: (e) => onChange(e.target.value)
|
|
8981
9129
|
}
|
|
8982
9130
|
),
|
|
8983
|
-
!isCustomActive && /* @__PURE__ */
|
|
9131
|
+
!isCustomActive && /* @__PURE__ */ jsx222(Icon, { name: "plus", size: "sm", "aria-hidden": true, className: styles91.customPlusIcon })
|
|
8984
9132
|
]
|
|
8985
9133
|
}
|
|
8986
9134
|
)
|
|
@@ -8991,8 +9139,8 @@ function ColorPicker({
|
|
|
8991
9139
|
|
|
8992
9140
|
// src/components/QuantityStepper/QuantityStepper.tsx
|
|
8993
9141
|
import { useId as useId12 } from "react";
|
|
8994
|
-
import
|
|
8995
|
-
import { jsx as
|
|
9142
|
+
import styles92 from "./QuantityStepper.module.css";
|
|
9143
|
+
import { jsx as jsx223, jsxs as jsxs173 } from "react/jsx-runtime";
|
|
8996
9144
|
function QuantityStepper({
|
|
8997
9145
|
value,
|
|
8998
9146
|
onChange,
|
|
@@ -9019,24 +9167,24 @@ function QuantityStepper({
|
|
|
9019
9167
|
}
|
|
9020
9168
|
const decrementDisabled = disabled || min !== void 0 && value <= min;
|
|
9021
9169
|
const incrementDisabled = disabled || max !== void 0 && value >= max;
|
|
9022
|
-
return /* @__PURE__ */
|
|
9023
|
-
/* @__PURE__ */
|
|
9170
|
+
return /* @__PURE__ */ jsxs173("div", { className: [styles92.root, className].filter(Boolean).join(" "), children: [
|
|
9171
|
+
/* @__PURE__ */ jsx223(
|
|
9024
9172
|
"button",
|
|
9025
9173
|
{
|
|
9026
9174
|
type: "button",
|
|
9027
|
-
className:
|
|
9175
|
+
className: styles92.button,
|
|
9028
9176
|
onClick: () => onChange(clamp4(value - step)),
|
|
9029
9177
|
disabled: decrementDisabled,
|
|
9030
9178
|
"aria-label": `Decrease ${ariaLabel}`,
|
|
9031
9179
|
children: "\u2212"
|
|
9032
9180
|
}
|
|
9033
9181
|
),
|
|
9034
|
-
/* @__PURE__ */
|
|
9182
|
+
/* @__PURE__ */ jsx223(
|
|
9035
9183
|
"input",
|
|
9036
9184
|
{
|
|
9037
9185
|
id: inputId,
|
|
9038
9186
|
type: "number",
|
|
9039
|
-
className:
|
|
9187
|
+
className: styles92.input,
|
|
9040
9188
|
value,
|
|
9041
9189
|
onChange: handleInputChange,
|
|
9042
9190
|
min,
|
|
@@ -9046,12 +9194,12 @@ function QuantityStepper({
|
|
|
9046
9194
|
"aria-label": ariaLabel
|
|
9047
9195
|
}
|
|
9048
9196
|
),
|
|
9049
|
-
unit && /* @__PURE__ */
|
|
9050
|
-
/* @__PURE__ */
|
|
9197
|
+
unit && /* @__PURE__ */ jsx223("span", { className: styles92.unit, "aria-hidden": true, children: unit }),
|
|
9198
|
+
/* @__PURE__ */ jsx223(
|
|
9051
9199
|
"button",
|
|
9052
9200
|
{
|
|
9053
9201
|
type: "button",
|
|
9054
|
-
className:
|
|
9202
|
+
className: styles92.button,
|
|
9055
9203
|
onClick: () => onChange(clamp4(value + step)),
|
|
9056
9204
|
disabled: incrementDisabled,
|
|
9057
9205
|
"aria-label": `Increase ${ariaLabel}`,
|
|
@@ -9062,8 +9210,8 @@ function QuantityStepper({
|
|
|
9062
9210
|
}
|
|
9063
9211
|
|
|
9064
9212
|
// src/components/CheckableListRow/CheckableListRow.tsx
|
|
9065
|
-
import
|
|
9066
|
-
import { jsx as
|
|
9213
|
+
import styles93 from "./CheckableListRow.module.css";
|
|
9214
|
+
import { jsx as jsx224, jsxs as jsxs174 } from "react/jsx-runtime";
|
|
9067
9215
|
function CheckableListRow({
|
|
9068
9216
|
checked,
|
|
9069
9217
|
onCheckedChange,
|
|
@@ -9082,8 +9230,8 @@ function CheckableListRow({
|
|
|
9082
9230
|
toggle();
|
|
9083
9231
|
}
|
|
9084
9232
|
}
|
|
9085
|
-
return /* @__PURE__ */
|
|
9086
|
-
/* @__PURE__ */
|
|
9233
|
+
return /* @__PURE__ */ jsxs174("div", { className: [styles93.row, className].filter(Boolean).join(" "), children: [
|
|
9234
|
+
/* @__PURE__ */ jsxs174(
|
|
9087
9235
|
"div",
|
|
9088
9236
|
{
|
|
9089
9237
|
role: "checkbox",
|
|
@@ -9091,11 +9239,11 @@ function CheckableListRow({
|
|
|
9091
9239
|
"aria-label": label,
|
|
9092
9240
|
"aria-disabled": disabled || void 0,
|
|
9093
9241
|
tabIndex: disabled ? -1 : 0,
|
|
9094
|
-
className:
|
|
9242
|
+
className: styles93.tapTarget,
|
|
9095
9243
|
onClick: toggle,
|
|
9096
9244
|
onKeyDown: handleKeyDown,
|
|
9097
9245
|
children: [
|
|
9098
|
-
/* @__PURE__ */
|
|
9246
|
+
/* @__PURE__ */ jsx224("span", { className: [styles93.box, checked ? styles93.checked : ""].filter(Boolean).join(" "), children: checked && /* @__PURE__ */ jsx224("svg", { className: styles93.tick, viewBox: "0 0 10 8", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx224(
|
|
9099
9247
|
"path",
|
|
9100
9248
|
{
|
|
9101
9249
|
d: "M1 4l3 3 5-6",
|
|
@@ -9105,18 +9253,18 @@ function CheckableListRow({
|
|
|
9105
9253
|
strokeLinejoin: "round"
|
|
9106
9254
|
}
|
|
9107
9255
|
) }) }),
|
|
9108
|
-
icon && /* @__PURE__ */
|
|
9109
|
-
/* @__PURE__ */
|
|
9256
|
+
icon && /* @__PURE__ */ jsx224("span", { className: styles93.icon, children: icon }),
|
|
9257
|
+
/* @__PURE__ */ jsx224("span", { className: [styles93.label, checked ? styles93.struck : ""].filter(Boolean).join(" "), children: label })
|
|
9110
9258
|
]
|
|
9111
9259
|
}
|
|
9112
9260
|
),
|
|
9113
|
-
trailing && /* @__PURE__ */
|
|
9261
|
+
trailing && /* @__PURE__ */ jsx224("span", { className: styles93.trailing, children: trailing })
|
|
9114
9262
|
] });
|
|
9115
9263
|
}
|
|
9116
9264
|
|
|
9117
9265
|
// src/components/CurrencyInput/CurrencyInput.tsx
|
|
9118
|
-
import { useState as
|
|
9119
|
-
import { jsx as
|
|
9266
|
+
import { useState as useState34 } from "react";
|
|
9267
|
+
import { jsx as jsx225 } from "react/jsx-runtime";
|
|
9120
9268
|
function minorToText(minor, decimals) {
|
|
9121
9269
|
return (minor / 10 ** decimals).toFixed(decimals);
|
|
9122
9270
|
}
|
|
@@ -9133,13 +9281,13 @@ function CurrencyInput({
|
|
|
9133
9281
|
decimals = 2,
|
|
9134
9282
|
...rest
|
|
9135
9283
|
}) {
|
|
9136
|
-
const [text, setText] =
|
|
9284
|
+
const [text, setText] = useState34(
|
|
9137
9285
|
() => valueCents != null ? minorToText(valueCents, decimals) : ""
|
|
9138
9286
|
);
|
|
9139
9287
|
if (textToMinor(text, decimals) !== valueCents) {
|
|
9140
9288
|
setText(valueCents != null ? minorToText(valueCents, decimals) : "");
|
|
9141
9289
|
}
|
|
9142
|
-
return /* @__PURE__ */
|
|
9290
|
+
return /* @__PURE__ */ jsx225(
|
|
9143
9291
|
Input,
|
|
9144
9292
|
{
|
|
9145
9293
|
...rest,
|
|
@@ -9156,19 +9304,19 @@ function CurrencyInput({
|
|
|
9156
9304
|
}
|
|
9157
9305
|
|
|
9158
9306
|
// src/components/BalanceChip/BalanceChip.tsx
|
|
9159
|
-
import
|
|
9160
|
-
import { jsx as
|
|
9307
|
+
import styles94 from "./BalanceChip.module.css";
|
|
9308
|
+
import { jsx as jsx226 } from "react/jsx-runtime";
|
|
9161
9309
|
function formatAbsCents(cents) {
|
|
9162
9310
|
return (Math.abs(cents) / 100).toFixed(2);
|
|
9163
9311
|
}
|
|
9164
9312
|
function BalanceChip({ amountCents, currency, className }) {
|
|
9165
9313
|
const direction = amountCents > 0 ? "owed" : amountCents < 0 ? "owes" : "settled";
|
|
9166
9314
|
const text = direction === "settled" ? "Settled up" : `${direction === "owed" ? "Owed" : "Owes"} ${currency} ${formatAbsCents(amountCents)}`;
|
|
9167
|
-
return /* @__PURE__ */
|
|
9315
|
+
return /* @__PURE__ */ jsx226("span", { className: [styles94.chip, styles94[direction], className].filter(Boolean).join(" "), children: text });
|
|
9168
9316
|
}
|
|
9169
9317
|
|
|
9170
9318
|
// src/components/SplitMethodSelector/SplitMethodSelector.tsx
|
|
9171
|
-
import { jsx as
|
|
9319
|
+
import { jsx as jsx227 } from "react/jsx-runtime";
|
|
9172
9320
|
var OPTIONS = [
|
|
9173
9321
|
{ label: "Equal", value: "equal" },
|
|
9174
9322
|
{ label: "Amount", value: "amount" },
|
|
@@ -9181,7 +9329,7 @@ function SplitMethodSelector({
|
|
|
9181
9329
|
size = "sm",
|
|
9182
9330
|
"aria-label": ariaLabel = "Split method"
|
|
9183
9331
|
}) {
|
|
9184
|
-
return /* @__PURE__ */
|
|
9332
|
+
return /* @__PURE__ */ jsx227(
|
|
9185
9333
|
SegmentedControl,
|
|
9186
9334
|
{
|
|
9187
9335
|
value,
|
|
@@ -9194,8 +9342,8 @@ function SplitMethodSelector({
|
|
|
9194
9342
|
}
|
|
9195
9343
|
|
|
9196
9344
|
// src/components/MemberMultiSelect/MemberMultiSelect.tsx
|
|
9197
|
-
import
|
|
9198
|
-
import { jsx as
|
|
9345
|
+
import styles95 from "./MemberMultiSelect.module.css";
|
|
9346
|
+
import { jsx as jsx228, jsxs as jsxs175 } from "react/jsx-runtime";
|
|
9199
9347
|
function MemberMultiSelect({
|
|
9200
9348
|
options,
|
|
9201
9349
|
selectedIds,
|
|
@@ -9205,12 +9353,12 @@ function MemberMultiSelect({
|
|
|
9205
9353
|
hint,
|
|
9206
9354
|
className
|
|
9207
9355
|
}) {
|
|
9208
|
-
return /* @__PURE__ */
|
|
9209
|
-
label && /* @__PURE__ */
|
|
9356
|
+
return /* @__PURE__ */ jsxs175("div", { className: [styles95.group, className].filter(Boolean).join(" "), children: [
|
|
9357
|
+
label && /* @__PURE__ */ jsx228("span", { className: styles95.label, children: label }),
|
|
9210
9358
|
options.map((option) => {
|
|
9211
9359
|
const checked = selectedIds.has(option.id);
|
|
9212
|
-
return /* @__PURE__ */
|
|
9213
|
-
/* @__PURE__ */
|
|
9360
|
+
return /* @__PURE__ */ jsxs175("div", { className: styles95.row, children: [
|
|
9361
|
+
/* @__PURE__ */ jsx228(
|
|
9214
9362
|
Checkbox,
|
|
9215
9363
|
{
|
|
9216
9364
|
checked,
|
|
@@ -9218,16 +9366,16 @@ function MemberMultiSelect({
|
|
|
9218
9366
|
label: option.label
|
|
9219
9367
|
}
|
|
9220
9368
|
),
|
|
9221
|
-
checked && renderTrailing && /* @__PURE__ */
|
|
9369
|
+
checked && renderTrailing && /* @__PURE__ */ jsx228("span", { className: styles95.trailing, children: renderTrailing(option.id) })
|
|
9222
9370
|
] }, option.id);
|
|
9223
9371
|
}),
|
|
9224
|
-
hint && /* @__PURE__ */
|
|
9372
|
+
hint && /* @__PURE__ */ jsx228("span", { className: styles95.hint, children: hint })
|
|
9225
9373
|
] });
|
|
9226
9374
|
}
|
|
9227
9375
|
|
|
9228
9376
|
// src/components/SwipableMobileCarouselDots/SwipableMobileCarouselDots.tsx
|
|
9229
|
-
import
|
|
9230
|
-
import { jsx as
|
|
9377
|
+
import styles96 from "./SwipableMobileCarouselDots.module.css";
|
|
9378
|
+
import { jsx as jsx229 } from "react/jsx-runtime";
|
|
9231
9379
|
function SwipableMobileCarouselDots({
|
|
9232
9380
|
count,
|
|
9233
9381
|
activeIndex,
|
|
@@ -9237,23 +9385,23 @@ function SwipableMobileCarouselDots({
|
|
|
9237
9385
|
density = "default",
|
|
9238
9386
|
className
|
|
9239
9387
|
}) {
|
|
9240
|
-
return /* @__PURE__ */
|
|
9388
|
+
return /* @__PURE__ */ jsx229(
|
|
9241
9389
|
"div",
|
|
9242
9390
|
{
|
|
9243
9391
|
role: "tablist",
|
|
9244
9392
|
"aria-label": ariaLabel,
|
|
9245
|
-
className: [
|
|
9393
|
+
className: [styles96.dots, density === "compact" ? styles96.dotsCompact : "", className].filter(Boolean).join(" "),
|
|
9246
9394
|
children: Array.from({ length: count }, (_, i) => {
|
|
9247
9395
|
const active = i === activeIndex;
|
|
9248
9396
|
const label = labels?.[i] ?? `Slide ${i + 1} of ${count}`;
|
|
9249
|
-
return /* @__PURE__ */
|
|
9397
|
+
return /* @__PURE__ */ jsx229(
|
|
9250
9398
|
"button",
|
|
9251
9399
|
{
|
|
9252
9400
|
type: "button",
|
|
9253
9401
|
role: "tab",
|
|
9254
9402
|
"aria-selected": active,
|
|
9255
9403
|
"aria-label": label,
|
|
9256
|
-
className: [
|
|
9404
|
+
className: [styles96.dot, active ? styles96.dotActive : ""].filter(Boolean).join(" "),
|
|
9257
9405
|
onClick: () => onJump(i)
|
|
9258
9406
|
},
|
|
9259
9407
|
i
|
|
@@ -9281,16 +9429,16 @@ import { createContext as createContext3 } from "react";
|
|
|
9281
9429
|
var CarouselSlideMountContext = createContext3(null);
|
|
9282
9430
|
|
|
9283
9431
|
// src/components/SwipableMobileCarousel/SwipableMobileCarouselSlide.tsx
|
|
9284
|
-
import { Fragment as Fragment21, jsx as
|
|
9432
|
+
import { Fragment as Fragment21, jsx as jsx230 } from "react/jsx-runtime";
|
|
9285
9433
|
function SwipableMobileCarouselSlide({ children }) {
|
|
9286
9434
|
const ctx = useContext3(CarouselSlideMountContext);
|
|
9287
9435
|
if (!ctx?.isMounted) return null;
|
|
9288
|
-
return /* @__PURE__ */
|
|
9436
|
+
return /* @__PURE__ */ jsx230(Fragment21, { children });
|
|
9289
9437
|
}
|
|
9290
9438
|
|
|
9291
9439
|
// src/components/SwipableMobileCarousel/SwipableMobileCarousel.tsx
|
|
9292
|
-
import
|
|
9293
|
-
import { jsx as
|
|
9440
|
+
import styles97 from "./SwipableMobileCarousel.module.css";
|
|
9441
|
+
import { jsx as jsx231, jsxs as jsxs176 } from "react/jsx-runtime";
|
|
9294
9442
|
function describeChild(child) {
|
|
9295
9443
|
if (isValidElement2(child)) {
|
|
9296
9444
|
const type = child.type;
|
|
@@ -9381,7 +9529,7 @@ function SwipableMobileCarousel({
|
|
|
9381
9529
|
onSettle(index);
|
|
9382
9530
|
}
|
|
9383
9531
|
const labels = slides.map((s) => s.label);
|
|
9384
|
-
const indicator = renderIndicator === null ? null : renderIndicator ? renderIndicator({ count, activeIndex: clampedActiveIndex, labels, onJump: handleJump }) : /* @__PURE__ */
|
|
9532
|
+
const indicator = renderIndicator === null ? null : renderIndicator ? renderIndicator({ count, activeIndex: clampedActiveIndex, labels, onJump: handleJump }) : /* @__PURE__ */ jsx231(
|
|
9385
9533
|
SwipableMobileCarouselDots,
|
|
9386
9534
|
{
|
|
9387
9535
|
count,
|
|
@@ -9391,8 +9539,8 @@ function SwipableMobileCarousel({
|
|
|
9391
9539
|
onJump: handleJump
|
|
9392
9540
|
}
|
|
9393
9541
|
);
|
|
9394
|
-
return /* @__PURE__ */
|
|
9395
|
-
/* @__PURE__ */
|
|
9542
|
+
return /* @__PURE__ */ jsxs176("div", { className: [styles97.wrap, className].filter(Boolean).join(" "), children: [
|
|
9543
|
+
/* @__PURE__ */ jsx231("div", { className: styles97.scroller, ref: scrollRef, role: "region", "aria-label": ariaLabel, children: slides.map((slide, i) => /* @__PURE__ */ jsx231("div", { className: styles97.slide, children: /* @__PURE__ */ jsx231(
|
|
9396
9544
|
CarouselSlideMountContext.Provider,
|
|
9397
9545
|
{
|
|
9398
9546
|
value: {
|
|
@@ -9410,61 +9558,61 @@ function SwipableMobileCarousel({
|
|
|
9410
9558
|
children: slide.element
|
|
9411
9559
|
}
|
|
9412
9560
|
) }, slide.key)) }),
|
|
9413
|
-
indicator && /* @__PURE__ */
|
|
9561
|
+
indicator && /* @__PURE__ */ jsx231("div", { className: styles97.indicatorSlot, children: indicator })
|
|
9414
9562
|
] });
|
|
9415
9563
|
}
|
|
9416
9564
|
|
|
9417
9565
|
// src/components/SwipableMobileCarousel/SwipableMobileCarouselSlideHeader.tsx
|
|
9418
|
-
import
|
|
9419
|
-
import { jsx as
|
|
9566
|
+
import styles98 from "./SwipableMobileCarouselSlideParts.module.css";
|
|
9567
|
+
import { jsx as jsx232 } from "react/jsx-runtime";
|
|
9420
9568
|
function SwipableMobileCarouselSlideHeader({
|
|
9421
9569
|
children,
|
|
9422
9570
|
className
|
|
9423
9571
|
}) {
|
|
9424
|
-
return /* @__PURE__ */
|
|
9572
|
+
return /* @__PURE__ */ jsx232("div", { className: [styles98.header, className].filter(Boolean).join(" "), children });
|
|
9425
9573
|
}
|
|
9426
9574
|
|
|
9427
9575
|
// src/components/SwipableMobileCarousel/SwipableMobileCarouselSlideBody.tsx
|
|
9428
|
-
import
|
|
9429
|
-
import { jsx as
|
|
9430
|
-
var defaultLoadingFallback = /* @__PURE__ */
|
|
9576
|
+
import styles99 from "./SwipableMobileCarouselSlideParts.module.css";
|
|
9577
|
+
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
9578
|
+
var defaultLoadingFallback = /* @__PURE__ */ jsx233("div", { className: styles99.loading, children: "Loading\u2026" });
|
|
9431
9579
|
function SwipableMobileCarouselSlideBody({
|
|
9432
9580
|
children,
|
|
9433
9581
|
loading = false,
|
|
9434
9582
|
loadingFallback,
|
|
9435
9583
|
className
|
|
9436
9584
|
}) {
|
|
9437
|
-
return /* @__PURE__ */
|
|
9585
|
+
return /* @__PURE__ */ jsx233("div", { className: [styles99.body, className].filter(Boolean).join(" "), children: loading ? loadingFallback ?? defaultLoadingFallback : children });
|
|
9438
9586
|
}
|
|
9439
9587
|
|
|
9440
9588
|
// src/components/SwipableMobileCarousel/SwipableMobileCarouselSlideFooter.tsx
|
|
9441
|
-
import
|
|
9442
|
-
import { jsx as
|
|
9589
|
+
import styles100 from "./SwipableMobileCarouselSlideParts.module.css";
|
|
9590
|
+
import { jsx as jsx234 } from "react/jsx-runtime";
|
|
9443
9591
|
function SwipableMobileCarouselSlideFooter({
|
|
9444
9592
|
children,
|
|
9445
9593
|
className
|
|
9446
9594
|
}) {
|
|
9447
|
-
return /* @__PURE__ */
|
|
9595
|
+
return /* @__PURE__ */ jsx234("div", { className: [styles100.footer, className].filter(Boolean).join(" "), children });
|
|
9448
9596
|
}
|
|
9449
9597
|
|
|
9450
9598
|
// src/components/SwipeStack/SwipeStack.tsx
|
|
9451
|
-
import { Children as Children3, isValidElement as isValidElement3, useEffect as useEffect19, useRef as useRef31, useState as
|
|
9599
|
+
import { Children as Children3, isValidElement as isValidElement3, useEffect as useEffect19, useRef as useRef31, useState as useState35 } from "react";
|
|
9452
9600
|
|
|
9453
9601
|
// src/components/SwipeStack/SwipeStackCard.tsx
|
|
9454
|
-
import { Fragment as Fragment22, jsx as
|
|
9602
|
+
import { Fragment as Fragment22, jsx as jsx235 } from "react/jsx-runtime";
|
|
9455
9603
|
function SwipeStackCard({ children }) {
|
|
9456
|
-
return /* @__PURE__ */
|
|
9604
|
+
return /* @__PURE__ */ jsx235(Fragment22, { children });
|
|
9457
9605
|
}
|
|
9458
9606
|
|
|
9459
9607
|
// src/components/SwipeStack/SwipeStack.tsx
|
|
9460
|
-
import
|
|
9461
|
-
import { jsx as
|
|
9608
|
+
import styles101 from "./SwipeStack.module.css";
|
|
9609
|
+
import { jsx as jsx236, jsxs as jsxs177 } from "react/jsx-runtime";
|
|
9462
9610
|
var DIRECTION_KEYS = ["up", "down", "left", "right"];
|
|
9463
9611
|
var STAMP_CLASS = {
|
|
9464
|
-
up:
|
|
9465
|
-
down:
|
|
9466
|
-
left:
|
|
9467
|
-
right:
|
|
9612
|
+
up: styles101.stampUp,
|
|
9613
|
+
down: styles101.stampDown,
|
|
9614
|
+
left: styles101.stampLeft,
|
|
9615
|
+
right: styles101.stampRight
|
|
9468
9616
|
};
|
|
9469
9617
|
function describeChild2(child) {
|
|
9470
9618
|
if (isValidElement3(child)) {
|
|
@@ -9505,8 +9653,8 @@ function SwipeStack({
|
|
|
9505
9653
|
children
|
|
9506
9654
|
}) {
|
|
9507
9655
|
const cards = resolveCards(children);
|
|
9508
|
-
const [dismissed, setDismissed] =
|
|
9509
|
-
const [exiting, setExiting] =
|
|
9656
|
+
const [dismissed, setDismissed] = useState35(() => /* @__PURE__ */ new Set());
|
|
9657
|
+
const [exiting, setExiting] = useState35(null);
|
|
9510
9658
|
const exitTimerRef = useRef31(null);
|
|
9511
9659
|
useEffect19(
|
|
9512
9660
|
() => () => {
|
|
@@ -9535,33 +9683,33 @@ function SwipeStack({
|
|
|
9535
9683
|
onSwipe(direction, committed.key);
|
|
9536
9684
|
}
|
|
9537
9685
|
});
|
|
9538
|
-
return /* @__PURE__ */
|
|
9539
|
-
/* @__PURE__ */
|
|
9540
|
-
peek && /* @__PURE__ */
|
|
9541
|
-
current && /* @__PURE__ */
|
|
9686
|
+
return /* @__PURE__ */ jsxs177("div", { className: [styles101.wrap, className].filter(Boolean).join(" "), children: [
|
|
9687
|
+
/* @__PURE__ */ jsxs177("div", { className: styles101.stack, role: "region", "aria-label": ariaLabel, children: [
|
|
9688
|
+
peek && /* @__PURE__ */ jsx236("div", { className: styles101.peek, "aria-hidden": "true", children: peek.element }, peek.key),
|
|
9689
|
+
current && /* @__PURE__ */ jsxs177("div", { className: styles101.cardSlot, ref: wrapRef, children: [
|
|
9542
9690
|
liveDirections.map((d) => {
|
|
9543
9691
|
const meta = directions[d];
|
|
9544
9692
|
if (!meta) return null;
|
|
9545
|
-
return /* @__PURE__ */
|
|
9693
|
+
return /* @__PURE__ */ jsxs177(
|
|
9546
9694
|
"div",
|
|
9547
9695
|
{
|
|
9548
|
-
className: [
|
|
9696
|
+
className: [styles101.stamp, STAMP_CLASS[d]].join(" "),
|
|
9549
9697
|
"aria-hidden": "true",
|
|
9550
9698
|
children: [
|
|
9551
|
-
meta.icon && /* @__PURE__ */
|
|
9552
|
-
/* @__PURE__ */
|
|
9699
|
+
meta.icon && /* @__PURE__ */ jsx236(Icon, { name: meta.icon, size: "sm", "aria-hidden": true }),
|
|
9700
|
+
/* @__PURE__ */ jsx236("span", { children: meta.label })
|
|
9553
9701
|
]
|
|
9554
9702
|
},
|
|
9555
9703
|
d
|
|
9556
9704
|
);
|
|
9557
9705
|
}),
|
|
9558
|
-
/* @__PURE__ */
|
|
9706
|
+
/* @__PURE__ */ jsx236("div", { className: styles101.card, ref: cardRef, style: { touchAction }, ...handlers, children: current.element })
|
|
9559
9707
|
] }, current.key)
|
|
9560
9708
|
] }),
|
|
9561
|
-
liveDirections.length > 0 && /* @__PURE__ */
|
|
9709
|
+
liveDirections.length > 0 && /* @__PURE__ */ jsx236("div", { className: styles101.actions, role: "group", "aria-label": `${ariaLabel} actions`, children: liveDirections.map((d) => {
|
|
9562
9710
|
const meta = directions[d];
|
|
9563
9711
|
if (!meta) return null;
|
|
9564
|
-
return /* @__PURE__ */
|
|
9712
|
+
return /* @__PURE__ */ jsxs177(
|
|
9565
9713
|
Button,
|
|
9566
9714
|
{
|
|
9567
9715
|
variant: "secondary",
|
|
@@ -9569,7 +9717,7 @@ function SwipeStack({
|
|
|
9569
9717
|
disabled: !current,
|
|
9570
9718
|
onClick: () => triggerCommit(d),
|
|
9571
9719
|
children: [
|
|
9572
|
-
meta.icon && /* @__PURE__ */
|
|
9720
|
+
meta.icon && /* @__PURE__ */ jsx236(Icon, { name: meta.icon, size: "sm", "aria-hidden": true }),
|
|
9573
9721
|
meta.label
|
|
9574
9722
|
]
|
|
9575
9723
|
},
|
|
@@ -9581,8 +9729,8 @@ function SwipeStack({
|
|
|
9581
9729
|
|
|
9582
9730
|
// src/components/ThreeColumnLayout/ThreeColumnLayout.tsx
|
|
9583
9731
|
import { Children as Children4 } from "react";
|
|
9584
|
-
import
|
|
9585
|
-
import { jsx as
|
|
9732
|
+
import styles102 from "./ThreeColumnLayout.module.css";
|
|
9733
|
+
import { jsx as jsx237, jsxs as jsxs178 } from "react/jsx-runtime";
|
|
9586
9734
|
function ThreeColumnLayout({
|
|
9587
9735
|
children,
|
|
9588
9736
|
sidebarWidth = 280,
|
|
@@ -9597,24 +9745,24 @@ function ThreeColumnLayout({
|
|
|
9597
9745
|
);
|
|
9598
9746
|
}
|
|
9599
9747
|
const [sidebar, main, detail] = items;
|
|
9600
|
-
return /* @__PURE__ */
|
|
9601
|
-
/* @__PURE__ */
|
|
9748
|
+
return /* @__PURE__ */ jsxs178("div", { className: [styles102.shell, className].filter(Boolean).join(" "), children: [
|
|
9749
|
+
/* @__PURE__ */ jsx237(
|
|
9602
9750
|
"div",
|
|
9603
9751
|
{
|
|
9604
|
-
className: [
|
|
9752
|
+
className: [styles102.sidebar, sidebarHidden && styles102.sidebarHidden].filter(Boolean).join(" "),
|
|
9605
9753
|
style: sidebarHidden ? void 0 : { width: sidebarWidth },
|
|
9606
9754
|
hidden: sidebarHidden,
|
|
9607
9755
|
children: sidebar
|
|
9608
9756
|
}
|
|
9609
9757
|
),
|
|
9610
|
-
/* @__PURE__ */
|
|
9611
|
-
detail && /* @__PURE__ */
|
|
9758
|
+
/* @__PURE__ */ jsx237("div", { className: styles102.main, children: main }),
|
|
9759
|
+
detail && /* @__PURE__ */ jsx237("div", { className: styles102.detail, style: { width: detailWidth }, children: detail })
|
|
9612
9760
|
] });
|
|
9613
9761
|
}
|
|
9614
9762
|
|
|
9615
9763
|
// src/components/HeaderFooterLayout/HeaderFooterLayout.tsx
|
|
9616
|
-
import
|
|
9617
|
-
import { jsx as
|
|
9764
|
+
import styles103 from "./HeaderFooterLayout.module.css";
|
|
9765
|
+
import { jsx as jsx238, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
9618
9766
|
function HeaderFooterLayout({
|
|
9619
9767
|
children,
|
|
9620
9768
|
header,
|
|
@@ -9623,17 +9771,17 @@ function HeaderFooterLayout({
|
|
|
9623
9771
|
footerHeight = 60,
|
|
9624
9772
|
className
|
|
9625
9773
|
}) {
|
|
9626
|
-
return /* @__PURE__ */
|
|
9627
|
-
header && /* @__PURE__ */
|
|
9628
|
-
/* @__PURE__ */
|
|
9629
|
-
footer && /* @__PURE__ */
|
|
9774
|
+
return /* @__PURE__ */ jsxs179("div", { className: [styles103.shell, className].filter(Boolean).join(" "), children: [
|
|
9775
|
+
header && /* @__PURE__ */ jsx238("div", { className: styles103.header, style: { height: headerHeight }, children: header }),
|
|
9776
|
+
/* @__PURE__ */ jsx238("div", { className: styles103.main, children }),
|
|
9777
|
+
footer && /* @__PURE__ */ jsx238("div", { className: styles103.footer, style: { height: footerHeight }, children: footer })
|
|
9630
9778
|
] });
|
|
9631
9779
|
}
|
|
9632
9780
|
|
|
9633
9781
|
// src/components/RootLayout/RootLayout.tsx
|
|
9634
9782
|
import { Children as Children5 } from "react";
|
|
9635
|
-
import
|
|
9636
|
-
import { Fragment as Fragment23, jsx as
|
|
9783
|
+
import styles104 from "./RootLayout.module.css";
|
|
9784
|
+
import { Fragment as Fragment23, jsx as jsx239, jsxs as jsxs180 } from "react/jsx-runtime";
|
|
9637
9785
|
var EXPECTED_CHILD_COUNT = {
|
|
9638
9786
|
plain: 1,
|
|
9639
9787
|
sidebar: 2,
|
|
@@ -9643,17 +9791,17 @@ var EXPECTED_CHILD_COUNT = {
|
|
|
9643
9791
|
function RootLayoutWeb({ variant, items, sidebarWidth, headerHeight }) {
|
|
9644
9792
|
if (variant === "sidebar") {
|
|
9645
9793
|
const [sidebar, main2] = items;
|
|
9646
|
-
return /* @__PURE__ */
|
|
9794
|
+
return /* @__PURE__ */ jsxs180(ThreeColumnLayout, { sidebarWidth, children: [
|
|
9647
9795
|
sidebar,
|
|
9648
9796
|
main2
|
|
9649
9797
|
] });
|
|
9650
9798
|
}
|
|
9651
9799
|
if (variant === "header") {
|
|
9652
9800
|
const [header, main2] = items;
|
|
9653
|
-
return /* @__PURE__ */
|
|
9801
|
+
return /* @__PURE__ */ jsx239(HeaderFooterLayout, { header, headerHeight, children: main2 });
|
|
9654
9802
|
}
|
|
9655
9803
|
const main = variant === "shell" ? items[1] : items[0];
|
|
9656
|
-
return /* @__PURE__ */
|
|
9804
|
+
return /* @__PURE__ */ jsx239(Fragment23, { children: main });
|
|
9657
9805
|
}
|
|
9658
9806
|
function RootLayoutMobile({
|
|
9659
9807
|
variant,
|
|
@@ -9663,11 +9811,11 @@ function RootLayoutMobile({
|
|
|
9663
9811
|
}) {
|
|
9664
9812
|
if (variant === "header") {
|
|
9665
9813
|
const [header, main2] = items;
|
|
9666
|
-
return /* @__PURE__ */
|
|
9814
|
+
return /* @__PURE__ */ jsx239(HeaderFooterLayout, { header, headerHeight: mobileHeaderHeight, children: main2 });
|
|
9667
9815
|
}
|
|
9668
9816
|
if (variant === "shell") {
|
|
9669
9817
|
const [header, main2, footer] = items;
|
|
9670
|
-
return /* @__PURE__ */
|
|
9818
|
+
return /* @__PURE__ */ jsx239(
|
|
9671
9819
|
HeaderFooterLayout,
|
|
9672
9820
|
{
|
|
9673
9821
|
header,
|
|
@@ -9679,7 +9827,7 @@ function RootLayoutMobile({
|
|
|
9679
9827
|
);
|
|
9680
9828
|
}
|
|
9681
9829
|
const main = variant === "sidebar" ? items[1] : items[0];
|
|
9682
|
-
return /* @__PURE__ */
|
|
9830
|
+
return /* @__PURE__ */ jsx239(Fragment23, { children: main });
|
|
9683
9831
|
}
|
|
9684
9832
|
function RootLayout({
|
|
9685
9833
|
variant = "plain",
|
|
@@ -9696,10 +9844,10 @@ function RootLayout({
|
|
|
9696
9844
|
`[RootLayout] variant="${variant}" expects ${EXPECTED_CHILD_COUNT[variant]} children; received ${items.length}.`
|
|
9697
9845
|
);
|
|
9698
9846
|
}
|
|
9699
|
-
return /* @__PURE__ */
|
|
9847
|
+
return /* @__PURE__ */ jsx239("div", { className: [styles104.root, className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsx239(
|
|
9700
9848
|
ResponsiveSurface,
|
|
9701
9849
|
{
|
|
9702
|
-
web: /* @__PURE__ */
|
|
9850
|
+
web: /* @__PURE__ */ jsx239(
|
|
9703
9851
|
RootLayoutWeb,
|
|
9704
9852
|
{
|
|
9705
9853
|
variant,
|
|
@@ -9708,7 +9856,7 @@ function RootLayout({
|
|
|
9708
9856
|
headerHeight
|
|
9709
9857
|
}
|
|
9710
9858
|
),
|
|
9711
|
-
mobile: /* @__PURE__ */
|
|
9859
|
+
mobile: /* @__PURE__ */ jsx239(
|
|
9712
9860
|
RootLayoutMobile,
|
|
9713
9861
|
{
|
|
9714
9862
|
variant,
|
|
@@ -9722,25 +9870,25 @@ function RootLayout({
|
|
|
9722
9870
|
}
|
|
9723
9871
|
|
|
9724
9872
|
// src/components/PageLayout/PageLayout.tsx
|
|
9725
|
-
import
|
|
9726
|
-
import { jsx as
|
|
9873
|
+
import styles105 from "./PageLayout.module.css";
|
|
9874
|
+
import { jsx as jsx240, jsxs as jsxs181 } from "react/jsx-runtime";
|
|
9727
9875
|
var paddingClass3 = {
|
|
9728
|
-
none:
|
|
9729
|
-
sm:
|
|
9730
|
-
md:
|
|
9731
|
-
lg:
|
|
9876
|
+
none: styles105.padNone,
|
|
9877
|
+
sm: styles105.padSm,
|
|
9878
|
+
md: styles105.padMd,
|
|
9879
|
+
lg: styles105.padLg
|
|
9732
9880
|
};
|
|
9733
9881
|
function PageLayout({ header, padding = "none", children, className }) {
|
|
9734
|
-
return /* @__PURE__ */
|
|
9735
|
-
header && /* @__PURE__ */
|
|
9736
|
-
/* @__PURE__ */
|
|
9882
|
+
return /* @__PURE__ */ jsxs181("div", { className: [styles105.root, className].filter(Boolean).join(" "), children: [
|
|
9883
|
+
header && /* @__PURE__ */ jsx240("div", { className: styles105.header, children: header }),
|
|
9884
|
+
/* @__PURE__ */ jsx240("div", { className: [styles105.content, paddingClass3[padding]].join(" "), children })
|
|
9737
9885
|
] });
|
|
9738
9886
|
}
|
|
9739
9887
|
|
|
9740
9888
|
// src/components/NavList/NavList.tsx
|
|
9741
9889
|
import { Fragment as Fragment24 } from "react";
|
|
9742
|
-
import
|
|
9743
|
-
import { Fragment as Fragment25, jsx as
|
|
9890
|
+
import styles106 from "./NavList.module.css";
|
|
9891
|
+
import { Fragment as Fragment25, jsx as jsx241, jsxs as jsxs182 } from "react/jsx-runtime";
|
|
9744
9892
|
function NavList({
|
|
9745
9893
|
groups,
|
|
9746
9894
|
variant,
|
|
@@ -9749,28 +9897,28 @@ function NavList({
|
|
|
9749
9897
|
className,
|
|
9750
9898
|
renderLink
|
|
9751
9899
|
}) {
|
|
9752
|
-
return /* @__PURE__ */
|
|
9900
|
+
return /* @__PURE__ */ jsx241(
|
|
9753
9901
|
"nav",
|
|
9754
9902
|
{
|
|
9755
|
-
className: [
|
|
9903
|
+
className: [styles106.nav, styles106[variant], density === "compact" && styles106.compact, className].filter(Boolean).join(" "),
|
|
9756
9904
|
"aria-label": ariaLabel,
|
|
9757
|
-
children: groups.map((group) => /* @__PURE__ */
|
|
9758
|
-
group.label && /* @__PURE__ */
|
|
9905
|
+
children: groups.map((group) => /* @__PURE__ */ jsxs182("div", { className: styles106.group, children: [
|
|
9906
|
+
group.label && /* @__PURE__ */ jsx241("div", { className: styles106.groupLabel, children: group.label }),
|
|
9759
9907
|
group.items.map((item) => {
|
|
9760
9908
|
const isActive = variant === "static" && !!item.active;
|
|
9761
|
-
const rowContent = /* @__PURE__ */
|
|
9762
|
-
/* @__PURE__ */
|
|
9763
|
-
/* @__PURE__ */
|
|
9764
|
-
item.badge && /* @__PURE__ */
|
|
9765
|
-
variant === "drilldown" && /* @__PURE__ */
|
|
9909
|
+
const rowContent = /* @__PURE__ */ jsxs182(Fragment25, { children: [
|
|
9910
|
+
/* @__PURE__ */ jsx241(Icon, { name: item.icon, size: "sm", "aria-hidden": true, className: styles106.icon }),
|
|
9911
|
+
/* @__PURE__ */ jsx241("span", { className: styles106.label, children: item.label }),
|
|
9912
|
+
item.badge && /* @__PURE__ */ jsx241("span", { className: styles106.badge, children: item.badge }),
|
|
9913
|
+
variant === "drilldown" && /* @__PURE__ */ jsx241(Icon, { name: "chevron-right", size: "sm", "aria-hidden": true, className: styles106.chevron })
|
|
9766
9914
|
] });
|
|
9767
9915
|
const linkProps = {
|
|
9768
9916
|
href: item.href,
|
|
9769
|
-
className: [
|
|
9917
|
+
className: [styles106.row, isActive && styles106.rowActive].filter(Boolean).join(" "),
|
|
9770
9918
|
"aria-current": isActive ? "page" : void 0,
|
|
9771
9919
|
children: rowContent
|
|
9772
9920
|
};
|
|
9773
|
-
return /* @__PURE__ */
|
|
9921
|
+
return /* @__PURE__ */ jsx241(Fragment24, { children: renderLink ? renderLink(item, linkProps) : /* @__PURE__ */ jsx241(
|
|
9774
9922
|
"a",
|
|
9775
9923
|
{
|
|
9776
9924
|
href: linkProps.href,
|
|
@@ -9828,8 +9976,8 @@ var THEME_PRESETS = {
|
|
|
9828
9976
|
};
|
|
9829
9977
|
|
|
9830
9978
|
// src/components/CopyButton/CopyButton.tsx
|
|
9831
|
-
import { useState as
|
|
9832
|
-
import { jsx as
|
|
9979
|
+
import { useState as useState36 } from "react";
|
|
9980
|
+
import { jsx as jsx242 } from "react/jsx-runtime";
|
|
9833
9981
|
function CopyButton({
|
|
9834
9982
|
text,
|
|
9835
9983
|
label,
|
|
@@ -9838,7 +9986,7 @@ function CopyButton({
|
|
|
9838
9986
|
variant = "secondary",
|
|
9839
9987
|
size = "sm"
|
|
9840
9988
|
}) {
|
|
9841
|
-
const [state, setState] =
|
|
9989
|
+
const [state, setState] = useState36("idle");
|
|
9842
9990
|
async function copy() {
|
|
9843
9991
|
try {
|
|
9844
9992
|
await navigator.clipboard.writeText(text);
|
|
@@ -9847,12 +9995,12 @@ function CopyButton({
|
|
|
9847
9995
|
setState("failed");
|
|
9848
9996
|
}
|
|
9849
9997
|
}
|
|
9850
|
-
return /* @__PURE__ */
|
|
9998
|
+
return /* @__PURE__ */ jsx242(Button, { type: "button", variant, size, onClick: () => void copy(), children: state === "copied" ? copiedLabel : state === "failed" ? failedLabel : label });
|
|
9851
9999
|
}
|
|
9852
10000
|
|
|
9853
10001
|
// src/components/QrCode/QrCode.tsx
|
|
9854
|
-
import
|
|
9855
|
-
import { jsx as
|
|
10002
|
+
import styles107 from "./QrCode.module.css";
|
|
10003
|
+
import { jsx as jsx243 } from "react/jsx-runtime";
|
|
9856
10004
|
var QUIET_ZONE = 2;
|
|
9857
10005
|
function QrCode({ modules, label }) {
|
|
9858
10006
|
const size = modules.length + QUIET_ZONE * 2;
|
|
@@ -9862,7 +10010,7 @@ function QrCode({ modules, label }) {
|
|
|
9862
10010
|
if (dark) path += `M${x + QUIET_ZONE} ${y + QUIET_ZONE}h1v1h-1z`;
|
|
9863
10011
|
});
|
|
9864
10012
|
});
|
|
9865
|
-
return /* @__PURE__ */
|
|
10013
|
+
return /* @__PURE__ */ jsx243("div", { className: styles107.qr, children: /* @__PURE__ */ jsx243(
|
|
9866
10014
|
"svg",
|
|
9867
10015
|
{
|
|
9868
10016
|
viewBox: `0 0 ${size} ${size}`,
|
|
@@ -9870,7 +10018,7 @@ function QrCode({ modules, label }) {
|
|
|
9870
10018
|
"aria-label": label,
|
|
9871
10019
|
shapeRendering: "crispEdges",
|
|
9872
10020
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9873
|
-
children: /* @__PURE__ */
|
|
10021
|
+
children: /* @__PURE__ */ jsx243("path", { d: path })
|
|
9874
10022
|
}
|
|
9875
10023
|
) });
|
|
9876
10024
|
}
|
|
@@ -9940,6 +10088,7 @@ export {
|
|
|
9940
10088
|
Kbd,
|
|
9941
10089
|
Label,
|
|
9942
10090
|
LegalLinks,
|
|
10091
|
+
LockedState,
|
|
9943
10092
|
MOBILE_BREAKPOINT_PX,
|
|
9944
10093
|
Markdown,
|
|
9945
10094
|
Marker,
|
|
@@ -9972,6 +10121,7 @@ export {
|
|
|
9972
10121
|
QuantityStepper,
|
|
9973
10122
|
RadioGroup,
|
|
9974
10123
|
RangeCalendar,
|
|
10124
|
+
RecoveryKit,
|
|
9975
10125
|
ResizableHandle,
|
|
9976
10126
|
ResizablePanel,
|
|
9977
10127
|
ResizablePanelGroup,
|
|
@@ -10015,6 +10165,8 @@ export {
|
|
|
10015
10165
|
Tooltip,
|
|
10016
10166
|
Typography,
|
|
10017
10167
|
UserMenu,
|
|
10168
|
+
recoveryKitFileName,
|
|
10169
|
+
recoveryKitFileText,
|
|
10018
10170
|
shouldHandleDndEvent,
|
|
10019
10171
|
useCarouselRouteSync,
|
|
10020
10172
|
useCommitOnEnterOrBlur,
|