@platned/ui 0.10.1 → 0.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +428 -339
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +46 -2
- package/dist/index.js +328 -240
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4648,7 +4648,10 @@ var ModalShell = forwardRef15(
|
|
|
4648
4648
|
className: cn(
|
|
4649
4649
|
// The overlay wraps the content (a Radix-supported layout), so it also does the
|
|
4650
4650
|
// positioning: bottom sheet below `sm`, a card centred or top-anchored above it.
|
|
4651
|
-
|
|
4651
|
+
// `max-sm:items-end`, not a base `items-end` that `sm:` overrides: an app that layers this
|
|
4652
|
+
// stylesheet under its own utilities (Cleo) and uses `items-end` itself would otherwise win
|
|
4653
|
+
// at every width, and every dialog sat at the bottom on desktop. Fixed in 0.10.3.
|
|
4654
|
+
"fixed inset-0 z-modal flex justify-center max-sm:items-end",
|
|
4652
4655
|
OVERLAY_ALIGN[align],
|
|
4653
4656
|
OVERLAY_SCRIM
|
|
4654
4657
|
),
|
|
@@ -8648,6 +8651,7 @@ function BarChart({
|
|
|
8648
8651
|
length = 240,
|
|
8649
8652
|
showLabels = true,
|
|
8650
8653
|
showValues = false,
|
|
8654
|
+
reference,
|
|
8651
8655
|
radius = 3,
|
|
8652
8656
|
label,
|
|
8653
8657
|
className
|
|
@@ -8658,73 +8662,111 @@ function BarChart({
|
|
|
8658
8662
|
const categoryTotals = categories.map(
|
|
8659
8663
|
(_, ci) => stacked ? series.reduce((sum, s) => sum + Math.max(0, s.values[ci] ?? 0), 0) : Math.max(...series.map((s) => Math.max(0, s.values[ci] ?? 0)))
|
|
8660
8664
|
);
|
|
8661
|
-
const
|
|
8665
|
+
const referenceValue = reference ? Math.max(0, reference.value) : 0;
|
|
8666
|
+
const max = Math.max(...categoryTotals, referenceValue, 1);
|
|
8662
8667
|
const horizontal = orientation === "horizontal";
|
|
8663
|
-
|
|
8668
|
+
const referenceColor = reference ? resolveChartColor(reference.color, reference.tone ?? "warning") : void 0;
|
|
8669
|
+
const referenceAt = `${referenceValue / max * 100}%`;
|
|
8670
|
+
const accessibleName = label && reference?.label ? `${label}. ${reference.label}` : label;
|
|
8671
|
+
return /* @__PURE__ */ jsxs55(
|
|
8664
8672
|
"div",
|
|
8665
8673
|
{
|
|
8666
|
-
className: clsx61(
|
|
8674
|
+
className: clsx61(
|
|
8675
|
+
"flex w-full min-w-0",
|
|
8676
|
+
horizontal ? "flex-col gap-2" : "flex-row items-end gap-3",
|
|
8677
|
+
reference && "relative",
|
|
8678
|
+
className
|
|
8679
|
+
),
|
|
8667
8680
|
role: label ? "img" : void 0,
|
|
8668
|
-
"aria-label":
|
|
8681
|
+
"aria-label": accessibleName,
|
|
8669
8682
|
"aria-hidden": label ? void 0 : true,
|
|
8670
|
-
children:
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8683
|
+
children: [
|
|
8684
|
+
categories.map((category, ci) => {
|
|
8685
|
+
const bars = series.map((s, si) => ({
|
|
8686
|
+
key: s.label,
|
|
8687
|
+
value: Math.max(0, s.values[ci] ?? 0),
|
|
8688
|
+
color: resolveChartColor(s.color, s.tone, si)
|
|
8689
|
+
}));
|
|
8690
|
+
return /* @__PURE__ */ jsxs55(
|
|
8691
|
+
"div",
|
|
8692
|
+
{
|
|
8693
|
+
className: clsx61("flex min-w-0", horizontal ? "flex-col gap-1" : "h-full flex-col justify-end gap-1.5"),
|
|
8694
|
+
style: horizontal ? void 0 : { width: perCategory },
|
|
8695
|
+
children: [
|
|
8696
|
+
showLabels && horizontal && /* @__PURE__ */ jsx82("span", { className: clsx61("truncate text-default-secondary", labelClass2), children: category }),
|
|
8697
|
+
/* @__PURE__ */ jsxs55(
|
|
8698
|
+
"div",
|
|
8699
|
+
{
|
|
8700
|
+
className: clsx61("flex", horizontal ? "items-center gap-2" : "w-full flex-1 items-end justify-center"),
|
|
8701
|
+
style: horizontal ? void 0 : { height: length },
|
|
8702
|
+
children: [
|
|
8703
|
+
/* @__PURE__ */ jsx82(
|
|
8704
|
+
"div",
|
|
8705
|
+
{
|
|
8706
|
+
className: clsx61("flex min-w-0", stacked ? "gap-0" : ""),
|
|
8707
|
+
style: horizontal ? { width: length, flexDirection: stacked ? "row" : "column", gap: stacked ? 0 : gap } : {
|
|
8708
|
+
height: "100%",
|
|
8709
|
+
width: perCategory,
|
|
8710
|
+
flexDirection: stacked ? "column-reverse" : "row",
|
|
8711
|
+
alignItems: "flex-end",
|
|
8712
|
+
gap: stacked ? 0 : gap
|
|
8713
|
+
},
|
|
8714
|
+
children: bars.map((bar) => {
|
|
8715
|
+
const extent = `${bar.value / max * 100}%`;
|
|
8716
|
+
return /* @__PURE__ */ jsx82(
|
|
8717
|
+
"div",
|
|
8718
|
+
{
|
|
8719
|
+
title: `${category} \xB7 ${bar.key}: ${bar.value}`,
|
|
8720
|
+
className: "transition-all motion-reduce:transition-none",
|
|
8721
|
+
style: {
|
|
8722
|
+
backgroundColor: bar.color,
|
|
8723
|
+
borderRadius: radius,
|
|
8724
|
+
...horizontal ? { width: extent, height: stacked ? band : band } : { height: extent, width: stacked ? perCategory : band }
|
|
8725
|
+
}
|
|
8726
|
+
},
|
|
8727
|
+
bar.key
|
|
8728
|
+
);
|
|
8729
|
+
})
|
|
8730
|
+
}
|
|
8731
|
+
),
|
|
8732
|
+
showValues && horizontal && /* @__PURE__ */ jsx82("span", { className: clsx61("shrink-0 tabular-nums text-default-secondary", labelClass2), children: categoryTotals[ci] })
|
|
8733
|
+
]
|
|
8734
|
+
}
|
|
8735
|
+
),
|
|
8736
|
+
showLabels && !horizontal && /* @__PURE__ */ jsx82("span", { className: clsx61("truncate text-center text-default-secondary", labelClass2), children: category })
|
|
8737
|
+
]
|
|
8738
|
+
},
|
|
8739
|
+
category
|
|
8740
|
+
);
|
|
8741
|
+
}),
|
|
8742
|
+
reference && // Laid over the bar area only. Vertical bars all start at the top of their column
|
|
8743
|
+
// (the labels sit below), so the band is the top `length` px; horizontal tracks all
|
|
8744
|
+
// start at the left edge, so the line sits `referenceAt` of `length` from it.
|
|
8745
|
+
/* @__PURE__ */ jsx82(
|
|
8677
8746
|
"div",
|
|
8678
8747
|
{
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
const extent = `${bar.value / max * 100}%`;
|
|
8702
|
-
return /* @__PURE__ */ jsx82(
|
|
8703
|
-
"div",
|
|
8704
|
-
{
|
|
8705
|
-
title: `${category} \xB7 ${bar.key}: ${bar.value}`,
|
|
8706
|
-
className: "transition-all motion-reduce:transition-none",
|
|
8707
|
-
style: {
|
|
8708
|
-
backgroundColor: bar.color,
|
|
8709
|
-
borderRadius: radius,
|
|
8710
|
-
...horizontal ? { width: extent, height: stacked ? band : band } : { height: extent, width: stacked ? perCategory : band }
|
|
8711
|
-
}
|
|
8712
|
-
},
|
|
8713
|
-
bar.key
|
|
8714
|
-
);
|
|
8715
|
-
})
|
|
8716
|
-
}
|
|
8717
|
-
),
|
|
8718
|
-
showValues && horizontal && /* @__PURE__ */ jsx82("span", { className: clsx61("shrink-0 tabular-nums text-default-secondary", labelClass2), children: categoryTotals[ci] })
|
|
8719
|
-
]
|
|
8720
|
-
}
|
|
8721
|
-
),
|
|
8722
|
-
showLabels && !horizontal && /* @__PURE__ */ jsx82("span", { className: clsx61("truncate text-center text-default-secondary", labelClass2), children: category })
|
|
8723
|
-
]
|
|
8724
|
-
},
|
|
8725
|
-
category
|
|
8726
|
-
);
|
|
8727
|
-
})
|
|
8748
|
+
"data-chart-reference": "",
|
|
8749
|
+
"aria-hidden": true,
|
|
8750
|
+
className: "pointer-events-none absolute",
|
|
8751
|
+
style: horizontal ? { top: 0, bottom: 0, left: 0, width: length } : { top: 0, left: 0, right: 0, height: length },
|
|
8752
|
+
children: /* @__PURE__ */ jsx82(
|
|
8753
|
+
"div",
|
|
8754
|
+
{
|
|
8755
|
+
className: "absolute",
|
|
8756
|
+
style: horizontal ? { top: 0, bottom: 0, left: referenceAt, borderLeft: `2px dashed ${referenceColor}` } : { left: 0, right: 0, bottom: referenceAt, borderTop: `2px dashed ${referenceColor}` },
|
|
8757
|
+
children: reference.label && /* @__PURE__ */ jsx82(
|
|
8758
|
+
"span",
|
|
8759
|
+
{
|
|
8760
|
+
className: clsx61("absolute whitespace-nowrap", labelClass2),
|
|
8761
|
+
style: horizontal ? { top: 0, left: 4, color: referenceColor } : { right: 0, bottom: 2, color: referenceColor },
|
|
8762
|
+
children: reference.label
|
|
8763
|
+
}
|
|
8764
|
+
)
|
|
8765
|
+
}
|
|
8766
|
+
)
|
|
8767
|
+
}
|
|
8768
|
+
)
|
|
8769
|
+
]
|
|
8728
8770
|
}
|
|
8729
8771
|
);
|
|
8730
8772
|
}
|
|
@@ -9264,9 +9306,54 @@ function Listbox({
|
|
|
9264
9306
|
);
|
|
9265
9307
|
}
|
|
9266
9308
|
|
|
9309
|
+
// src/components/lists/selection-bar.tsx
|
|
9310
|
+
import { Fragment as Fragment16, jsx as jsx91, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
9311
|
+
var POSITION = {
|
|
9312
|
+
sticky: "sticky bottom-6 z-sticky",
|
|
9313
|
+
static: ""
|
|
9314
|
+
};
|
|
9315
|
+
function SelectionBar({
|
|
9316
|
+
label,
|
|
9317
|
+
description,
|
|
9318
|
+
children,
|
|
9319
|
+
onClear,
|
|
9320
|
+
clearLabel = "Clear",
|
|
9321
|
+
"aria-label": ariaLabel = "Selection actions",
|
|
9322
|
+
position = "sticky",
|
|
9323
|
+
className
|
|
9324
|
+
}) {
|
|
9325
|
+
return /* @__PURE__ */ jsxs62(
|
|
9326
|
+
"div",
|
|
9327
|
+
{
|
|
9328
|
+
role: "region",
|
|
9329
|
+
"aria-label": ariaLabel,
|
|
9330
|
+
"data-slot": "selection-bar",
|
|
9331
|
+
"data-position": position,
|
|
9332
|
+
className: cn(
|
|
9333
|
+
"mx-auto flex w-full max-w-[880px] flex-wrap items-center gap-4 rounded-xl border border-default bg-default py-3 pl-5 pr-3 text-default shadow-400",
|
|
9334
|
+
POSITION[position],
|
|
9335
|
+
className
|
|
9336
|
+
),
|
|
9337
|
+
children: [
|
|
9338
|
+
/* @__PURE__ */ jsxs62("div", { className: "flex min-w-0 flex-1 basis-60 flex-col gap-0.5", children: [
|
|
9339
|
+
/* @__PURE__ */ jsx91("span", { className: "text-body font-medium", children: label }),
|
|
9340
|
+
description !== void 0 && /* @__PURE__ */ jsx91("span", { className: "truncate text-body-xs text-default-secondary", children: description })
|
|
9341
|
+
] }),
|
|
9342
|
+
/* @__PURE__ */ jsxs62("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
9343
|
+
onClear && /* @__PURE__ */ jsxs62(Fragment16, { children: [
|
|
9344
|
+
/* @__PURE__ */ jsx91(Button, { variant: "subtle", onClick: onClear, children: clearLabel }),
|
|
9345
|
+
/* @__PURE__ */ jsx91("span", { "aria-hidden": true, className: "h-6 border-l border-default" })
|
|
9346
|
+
] }),
|
|
9347
|
+
children
|
|
9348
|
+
] })
|
|
9349
|
+
]
|
|
9350
|
+
}
|
|
9351
|
+
);
|
|
9352
|
+
}
|
|
9353
|
+
|
|
9267
9354
|
// src/components/lists/list-row.tsx
|
|
9268
9355
|
import clsx70 from "clsx";
|
|
9269
|
-
import { Fragment as
|
|
9356
|
+
import { Fragment as Fragment17, jsx as jsx92, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
9270
9357
|
var DENSITY2 = {
|
|
9271
9358
|
default: {
|
|
9272
9359
|
pad: "py-4",
|
|
@@ -9327,24 +9414,24 @@ function ListRow({
|
|
|
9327
9414
|
className
|
|
9328
9415
|
)
|
|
9329
9416
|
};
|
|
9330
|
-
const body = /* @__PURE__ */
|
|
9331
|
-
/* @__PURE__ */
|
|
9332
|
-
hasTitleLine && /* @__PURE__ */
|
|
9333
|
-
/* @__PURE__ */
|
|
9417
|
+
const body = /* @__PURE__ */ jsxs63(Fragment17, { children: [
|
|
9418
|
+
/* @__PURE__ */ jsxs63("div", { className: clsx70("flex min-w-0 flex-1 flex-col", d.gap), children: [
|
|
9419
|
+
hasTitleLine && /* @__PURE__ */ jsxs63("div", { className: "flex items-center justify-between gap-2", children: [
|
|
9420
|
+
/* @__PURE__ */ jsxs63("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
9334
9421
|
leading,
|
|
9335
|
-
title != null && /* @__PURE__ */
|
|
9336
|
-
titleMeta && /* @__PURE__ */
|
|
9422
|
+
title != null && /* @__PURE__ */ jsx92("span", { className: clsx70("truncate", d.title), children: title }),
|
|
9423
|
+
titleMeta && /* @__PURE__ */ jsx92("span", { className: "shrink-0", children: titleMeta })
|
|
9337
9424
|
] }),
|
|
9338
|
-
meta && /* @__PURE__ */
|
|
9425
|
+
meta && /* @__PURE__ */ jsx92("span", { className: "shrink-0", children: meta })
|
|
9339
9426
|
] }),
|
|
9340
|
-
description && /* @__PURE__ */
|
|
9427
|
+
description && /* @__PURE__ */ jsx92("p", { className: d.description, children: description }),
|
|
9341
9428
|
footer && // These two wrappers are propagation barriers, not controls — they add no
|
|
9342
9429
|
// behaviour of their own and must not be focusable or take a role.
|
|
9343
9430
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
9344
|
-
/* @__PURE__ */
|
|
9431
|
+
/* @__PURE__ */ jsx92("div", { onClick: stopIfInteractive, onKeyDown: stopIfInteractive, children: footer })
|
|
9345
9432
|
] }),
|
|
9346
9433
|
trailing && // eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
9347
|
-
/* @__PURE__ */
|
|
9434
|
+
/* @__PURE__ */ jsx92(
|
|
9348
9435
|
"div",
|
|
9349
9436
|
{
|
|
9350
9437
|
className: "ml-3 flex shrink-0 items-center self-center",
|
|
@@ -9355,7 +9442,7 @@ function ListRow({
|
|
|
9355
9442
|
)
|
|
9356
9443
|
] });
|
|
9357
9444
|
if (asChild) {
|
|
9358
|
-
return /* @__PURE__ */
|
|
9445
|
+
return /* @__PURE__ */ jsx92(
|
|
9359
9446
|
Slot,
|
|
9360
9447
|
{
|
|
9361
9448
|
...rootProps,
|
|
@@ -9368,7 +9455,7 @@ function ListRow({
|
|
|
9368
9455
|
}
|
|
9369
9456
|
);
|
|
9370
9457
|
}
|
|
9371
|
-
return /* @__PURE__ */
|
|
9458
|
+
return /* @__PURE__ */ jsx92(
|
|
9372
9459
|
Tag,
|
|
9373
9460
|
{
|
|
9374
9461
|
...rootProps,
|
|
@@ -9399,9 +9486,9 @@ function refusePress(event) {
|
|
|
9399
9486
|
// src/components/lists/file-row.tsx
|
|
9400
9487
|
import clsx71 from "clsx";
|
|
9401
9488
|
import { DownloadIcon, Trash2Icon } from "lucide-react";
|
|
9402
|
-
import { jsx as
|
|
9489
|
+
import { jsx as jsx93, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
9403
9490
|
function FileTypeBadge({ type }) {
|
|
9404
|
-
return /* @__PURE__ */
|
|
9491
|
+
return /* @__PURE__ */ jsx93("span", { className: "flex size-[34px] shrink-0 items-center justify-center rounded-md bg-brand-tertiary text-body-tiny font-semibold text-brand", children: type });
|
|
9405
9492
|
}
|
|
9406
9493
|
function FileRow({
|
|
9407
9494
|
name,
|
|
@@ -9415,8 +9502,8 @@ function FileRow({
|
|
|
9415
9502
|
actions,
|
|
9416
9503
|
className
|
|
9417
9504
|
}) {
|
|
9418
|
-
const lead = leading ?? (fileType ? /* @__PURE__ */
|
|
9419
|
-
return /* @__PURE__ */
|
|
9505
|
+
const lead = leading ?? (fileType ? /* @__PURE__ */ jsx93(FileTypeBadge, { type: fileType }) : null);
|
|
9506
|
+
return /* @__PURE__ */ jsxs64(
|
|
9420
9507
|
"div",
|
|
9421
9508
|
{
|
|
9422
9509
|
className: clsx71(
|
|
@@ -9425,14 +9512,14 @@ function FileRow({
|
|
|
9425
9512
|
),
|
|
9426
9513
|
children: [
|
|
9427
9514
|
lead,
|
|
9428
|
-
/* @__PURE__ */
|
|
9429
|
-
/* @__PURE__ */
|
|
9430
|
-
detail && /* @__PURE__ */
|
|
9515
|
+
/* @__PURE__ */ jsxs64("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
9516
|
+
/* @__PURE__ */ jsx93("span", { className: "truncate text-body-sm font-medium text-default", children: name }),
|
|
9517
|
+
detail && /* @__PURE__ */ jsx93("span", { className: "text-body-xs text-default-secondary", children: detail })
|
|
9431
9518
|
] }),
|
|
9432
|
-
(onDownload || onRemove || actions) && /* @__PURE__ */
|
|
9433
|
-
onDownload && /* @__PURE__ */
|
|
9434
|
-
onRemove && /* @__PURE__ */
|
|
9435
|
-
actions && /* @__PURE__ */
|
|
9519
|
+
(onDownload || onRemove || actions) && /* @__PURE__ */ jsxs64("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
9520
|
+
onDownload && /* @__PURE__ */ jsx93(Tooltip, { title: downloadLabel, children: /* @__PURE__ */ jsx93(IconButton, { variant: "subtle", size: "sm", "aria-label": `${downloadLabel} ${name}`, onClick: onDownload, className: "touch-hit", children: /* @__PURE__ */ jsx93(DownloadIcon, { "aria-hidden": true }) }) }),
|
|
9521
|
+
onRemove && /* @__PURE__ */ jsx93(Tooltip, { title: removeLabel, children: /* @__PURE__ */ jsx93(IconButton, { variant: "subtle", size: "sm", "aria-label": `${removeLabel} ${name}`, onClick: onRemove, className: "touch-hit", children: /* @__PURE__ */ jsx93(Trash2Icon, { "aria-hidden": true }) }) }),
|
|
9522
|
+
actions && /* @__PURE__ */ jsx93("div", { className: "ml-2 flex items-center gap-2", children: actions })
|
|
9436
9523
|
] })
|
|
9437
9524
|
]
|
|
9438
9525
|
}
|
|
@@ -9441,7 +9528,7 @@ function FileRow({
|
|
|
9441
9528
|
|
|
9442
9529
|
// src/components/lists/scored-row.tsx
|
|
9443
9530
|
import clsx72 from "clsx";
|
|
9444
|
-
import { jsx as
|
|
9531
|
+
import { jsx as jsx94, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
9445
9532
|
var GAP3 = {
|
|
9446
9533
|
sm: "gap-2",
|
|
9447
9534
|
md: "gap-3",
|
|
@@ -9468,8 +9555,8 @@ function ScoredRow({
|
|
|
9468
9555
|
align = "center",
|
|
9469
9556
|
className
|
|
9470
9557
|
}) {
|
|
9471
|
-
return /* @__PURE__ */
|
|
9472
|
-
/* @__PURE__ */
|
|
9558
|
+
return /* @__PURE__ */ jsxs65("div", { className: clsx72("flex w-full", ALIGN3[align], GAP3[gap], className), children: [
|
|
9559
|
+
/* @__PURE__ */ jsxs65(
|
|
9473
9560
|
"div",
|
|
9474
9561
|
{
|
|
9475
9562
|
className: clsx72(
|
|
@@ -9481,14 +9568,14 @@ function ScoredRow({
|
|
|
9481
9568
|
style: titleWidth ? { width: titleWidth } : void 0,
|
|
9482
9569
|
children: [
|
|
9483
9570
|
leading,
|
|
9484
|
-
/* @__PURE__ */
|
|
9485
|
-
/* @__PURE__ */
|
|
9486
|
-
subtitle && /* @__PURE__ */
|
|
9571
|
+
/* @__PURE__ */ jsxs65("div", { className: "min-w-0 flex-1", children: [
|
|
9572
|
+
/* @__PURE__ */ jsx94("p", { className: "truncate text-body-sm font-medium leading-none text-default", children: title }),
|
|
9573
|
+
subtitle && /* @__PURE__ */ jsx94("p", { className: "mt-0.5 truncate text-body-xs text-default-secondary", children: subtitle })
|
|
9487
9574
|
] })
|
|
9488
9575
|
]
|
|
9489
9576
|
}
|
|
9490
9577
|
),
|
|
9491
|
-
aside && /* @__PURE__ */
|
|
9578
|
+
aside && /* @__PURE__ */ jsx94(
|
|
9492
9579
|
"div",
|
|
9493
9580
|
{
|
|
9494
9581
|
className: clsx72("min-w-0", asideWidth ? "shrink-0" : "flex-1"),
|
|
@@ -9496,7 +9583,7 @@ function ScoredRow({
|
|
|
9496
9583
|
children: aside
|
|
9497
9584
|
}
|
|
9498
9585
|
),
|
|
9499
|
-
meter && /* @__PURE__ */
|
|
9586
|
+
meter && /* @__PURE__ */ jsx94(
|
|
9500
9587
|
"div",
|
|
9501
9588
|
{
|
|
9502
9589
|
className: clsx72("min-w-0", meterWidth ? "shrink-0" : "flex-1"),
|
|
@@ -9504,13 +9591,13 @@ function ScoredRow({
|
|
|
9504
9591
|
children: meter
|
|
9505
9592
|
}
|
|
9506
9593
|
),
|
|
9507
|
-
trailing && /* @__PURE__ */
|
|
9594
|
+
trailing && /* @__PURE__ */ jsx94("div", { className: "shrink-0 text-right", style: trailingWidth ? { width: trailingWidth } : void 0, children: trailing })
|
|
9508
9595
|
] });
|
|
9509
9596
|
}
|
|
9510
9597
|
|
|
9511
9598
|
// src/components/lists/numbered-list.tsx
|
|
9512
9599
|
import clsx73 from "clsx";
|
|
9513
|
-
import { jsx as
|
|
9600
|
+
import { jsx as jsx95, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
9514
9601
|
var GAP4 = {
|
|
9515
9602
|
sm: "gap-2",
|
|
9516
9603
|
md: "gap-3"
|
|
@@ -9524,18 +9611,18 @@ function NumberedList({
|
|
|
9524
9611
|
gap = "md",
|
|
9525
9612
|
className
|
|
9526
9613
|
}) {
|
|
9527
|
-
return /* @__PURE__ */
|
|
9614
|
+
return /* @__PURE__ */ jsx95("ol", { className: clsx73("flex list-none flex-col p-0", GAP4[gap], className), children: items.map((item, index) => {
|
|
9528
9615
|
const tone = !item.tone || item.tone === "auto" ? getScoreTone(item.score, { direction }) : item.tone;
|
|
9529
|
-
return /* @__PURE__ */
|
|
9530
|
-
/* @__PURE__ */
|
|
9531
|
-
/* @__PURE__ */
|
|
9532
|
-
/* @__PURE__ */
|
|
9533
|
-
/* @__PURE__ */
|
|
9534
|
-
/* @__PURE__ */
|
|
9535
|
-
item.subtitle && /* @__PURE__ */
|
|
9616
|
+
return /* @__PURE__ */ jsxs66("li", { className: "flex w-full shrink-0 flex-col gap-1.5", children: [
|
|
9617
|
+
/* @__PURE__ */ jsxs66("div", { className: "flex w-full items-center justify-between", children: [
|
|
9618
|
+
/* @__PURE__ */ jsxs66("div", { className: "flex min-w-0 items-center gap-2.5", children: [
|
|
9619
|
+
/* @__PURE__ */ jsx95("span", { className: "w-[14px] shrink-0 text-body-xs font-bold text-default-secondary", children: startAt + index }),
|
|
9620
|
+
/* @__PURE__ */ jsxs66("div", { className: "flex min-w-0 flex-col gap-px", children: [
|
|
9621
|
+
/* @__PURE__ */ jsx95("span", { className: "truncate text-body-sm font-medium leading-none text-default", children: item.title }),
|
|
9622
|
+
item.subtitle && /* @__PURE__ */ jsx95("span", { className: "text-body-tiny text-default-tertiary", children: item.subtitle })
|
|
9536
9623
|
] })
|
|
9537
9624
|
] }),
|
|
9538
|
-
/* @__PURE__ */
|
|
9625
|
+
/* @__PURE__ */ jsx95(
|
|
9539
9626
|
ScoreValue,
|
|
9540
9627
|
{
|
|
9541
9628
|
value: item.score,
|
|
@@ -9546,20 +9633,20 @@ function NumberedList({
|
|
|
9546
9633
|
}
|
|
9547
9634
|
)
|
|
9548
9635
|
] }),
|
|
9549
|
-
/* @__PURE__ */
|
|
9636
|
+
/* @__PURE__ */ jsx95(ProgressBar, { value: item.score, tone, "aria-label": `${item.title} score` })
|
|
9550
9637
|
] }, `${item.title}-${index}`);
|
|
9551
9638
|
}) });
|
|
9552
9639
|
}
|
|
9553
9640
|
|
|
9554
9641
|
// src/components/lists/icon-text-row.tsx
|
|
9555
9642
|
import clsx74 from "clsx";
|
|
9556
|
-
import { jsx as
|
|
9643
|
+
import { jsx as jsx96, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
9557
9644
|
function IconTextRow({ icon, title, detail, className }) {
|
|
9558
|
-
return /* @__PURE__ */
|
|
9559
|
-
/* @__PURE__ */
|
|
9560
|
-
/* @__PURE__ */
|
|
9561
|
-
/* @__PURE__ */
|
|
9562
|
-
/* @__PURE__ */
|
|
9645
|
+
return /* @__PURE__ */ jsxs67("div", { className: clsx74("flex items-start gap-3", className), children: [
|
|
9646
|
+
/* @__PURE__ */ jsx96("span", { className: "flex size-9 shrink-0 items-center justify-center rounded-full bg-brand-tertiary text-brand", children: icon }),
|
|
9647
|
+
/* @__PURE__ */ jsxs67("div", { className: "min-w-0", children: [
|
|
9648
|
+
/* @__PURE__ */ jsx96("p", { className: "text-body-sm font-semibold text-default", children: title }),
|
|
9649
|
+
/* @__PURE__ */ jsx96("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: detail })
|
|
9563
9650
|
] })
|
|
9564
9651
|
] });
|
|
9565
9652
|
}
|
|
@@ -9567,10 +9654,10 @@ function IconTextRow({ icon, title, detail, className }) {
|
|
|
9567
9654
|
// src/components/lists/checklist-row.tsx
|
|
9568
9655
|
import clsx75 from "clsx";
|
|
9569
9656
|
import { CheckIcon as CheckIcon5 } from "lucide-react";
|
|
9570
|
-
import { jsx as
|
|
9657
|
+
import { jsx as jsx97, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
9571
9658
|
function ChecklistRow({ label, state, className }) {
|
|
9572
|
-
return /* @__PURE__ */
|
|
9573
|
-
/* @__PURE__ */
|
|
9659
|
+
return /* @__PURE__ */ jsxs68("li", { "data-state": state, className: clsx75("flex items-center gap-3", className), children: [
|
|
9660
|
+
/* @__PURE__ */ jsx97("span", { className: "flex size-5 shrink-0 items-center justify-center", children: state === "done" ? /* @__PURE__ */ jsx97(CheckIcon5, { className: "size-4 text-positive", strokeWidth: 2.5, "aria-hidden": true }) : /* @__PURE__ */ jsx97(
|
|
9574
9661
|
"span",
|
|
9575
9662
|
{
|
|
9576
9663
|
className: clsx75(
|
|
@@ -9579,7 +9666,7 @@ function ChecklistRow({ label, state, className }) {
|
|
|
9579
9666
|
)
|
|
9580
9667
|
}
|
|
9581
9668
|
) }),
|
|
9582
|
-
/* @__PURE__ */
|
|
9669
|
+
/* @__PURE__ */ jsx97(
|
|
9583
9670
|
"span",
|
|
9584
9671
|
{
|
|
9585
9672
|
className: clsx75(
|
|
@@ -9594,13 +9681,13 @@ function ChecklistRow({ label, state, className }) {
|
|
|
9594
9681
|
|
|
9595
9682
|
// src/components/lists/steps-list.tsx
|
|
9596
9683
|
import clsx76 from "clsx";
|
|
9597
|
-
import { jsx as
|
|
9684
|
+
import { jsx as jsx98, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
9598
9685
|
function StepsList({ steps, className }) {
|
|
9599
|
-
return /* @__PURE__ */
|
|
9686
|
+
return /* @__PURE__ */ jsx98("ol", { className: clsx76("flex flex-col gap-1.5", className), children: steps.map((step, i) => (
|
|
9600
9687
|
// `text-[12px]` was off the type scale; 12 sits midway between Scale 01 (11) and
|
|
9601
9688
|
// Scale 02 (13), so it rounds up to 13 like every other snap in this pass.
|
|
9602
|
-
/* @__PURE__ */
|
|
9603
|
-
/* @__PURE__ */
|
|
9689
|
+
/* @__PURE__ */ jsxs69("li", { className: "flex items-start gap-2 text-body-xs text-default", children: [
|
|
9690
|
+
/* @__PURE__ */ jsx98("span", { className: "mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full bg-brand-tertiary text-[9px] font-bold text-brand", children: i + 1 }),
|
|
9604
9691
|
step
|
|
9605
9692
|
] }, i)
|
|
9606
9693
|
)) });
|
|
@@ -9608,7 +9695,7 @@ function StepsList({ steps, className }) {
|
|
|
9608
9695
|
|
|
9609
9696
|
// src/components/lists/detail-item.tsx
|
|
9610
9697
|
import clsx77 from "clsx";
|
|
9611
|
-
import { jsx as
|
|
9698
|
+
import { jsx as jsx99, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
9612
9699
|
var SPAN = {
|
|
9613
9700
|
1: "",
|
|
9614
9701
|
2: "sm:col-span-2",
|
|
@@ -9625,18 +9712,18 @@ function DetailItem({
|
|
|
9625
9712
|
}) {
|
|
9626
9713
|
const shown = value === null || value === void 0 || value === "" ? "\u2014" : value;
|
|
9627
9714
|
if (layout === "inline") {
|
|
9628
|
-
return /* @__PURE__ */
|
|
9629
|
-
/* @__PURE__ */
|
|
9630
|
-
/* @__PURE__ */
|
|
9631
|
-
/* @__PURE__ */
|
|
9632
|
-
detail && /* @__PURE__ */
|
|
9715
|
+
return /* @__PURE__ */ jsxs70("div", { className: clsx77("flex gap-3 text-body-xs", SPAN[span], className), children: [
|
|
9716
|
+
/* @__PURE__ */ jsx99("span", { className: clsx77("shrink-0 text-default-secondary", labelWidth), children: label }),
|
|
9717
|
+
/* @__PURE__ */ jsxs70("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5 [overflow-wrap:anywhere]", children: [
|
|
9718
|
+
/* @__PURE__ */ jsx99("span", { className: "text-default", children: shown }),
|
|
9719
|
+
detail && /* @__PURE__ */ jsx99("span", { className: "text-default-secondary", children: detail })
|
|
9633
9720
|
] })
|
|
9634
9721
|
] });
|
|
9635
9722
|
}
|
|
9636
|
-
return /* @__PURE__ */
|
|
9637
|
-
/* @__PURE__ */
|
|
9638
|
-
/* @__PURE__ */
|
|
9639
|
-
detail && /* @__PURE__ */
|
|
9723
|
+
return /* @__PURE__ */ jsxs70("div", { className: clsx77("flex min-w-0 flex-col gap-0.5", SPAN[span], className), children: [
|
|
9724
|
+
/* @__PURE__ */ jsx99("p", { className: "text-body-tiny font-medium text-default-secondary", children: label }),
|
|
9725
|
+
/* @__PURE__ */ jsx99("p", { className: "text-body-sm font-medium text-default [overflow-wrap:anywhere]", children: shown }),
|
|
9726
|
+
detail && /* @__PURE__ */ jsx99("p", { className: "text-body-xs text-default-secondary [overflow-wrap:anywhere]", children: detail })
|
|
9640
9727
|
] });
|
|
9641
9728
|
}
|
|
9642
9729
|
var COLUMNS3 = {
|
|
@@ -9647,24 +9734,24 @@ var COLUMNS3 = {
|
|
|
9647
9734
|
4: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4"
|
|
9648
9735
|
};
|
|
9649
9736
|
function DetailGrid({ children, columns = "auto", className }) {
|
|
9650
|
-
return /* @__PURE__ */
|
|
9737
|
+
return /* @__PURE__ */ jsx99("div", { className: clsx77("grid gap-x-4 gap-y-4", COLUMNS3[columns], className), children });
|
|
9651
9738
|
}
|
|
9652
9739
|
|
|
9653
9740
|
// src/components/lists/description-list.tsx
|
|
9654
9741
|
import { useEffect as useEffect15, useState as useState25 } from "react";
|
|
9655
9742
|
import clsx78 from "clsx";
|
|
9656
9743
|
import { CheckIcon as CheckIcon6, CopyIcon } from "lucide-react";
|
|
9657
|
-
import { jsx as
|
|
9744
|
+
import { jsx as jsx100, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
9658
9745
|
function DescriptionList({ children, className }) {
|
|
9659
|
-
return /* @__PURE__ */
|
|
9746
|
+
return /* @__PURE__ */ jsx100("dl", { className: cn("flex flex-col gap-3", className), children });
|
|
9660
9747
|
}
|
|
9661
9748
|
function DescriptionItem({ label, value, copyValue, className }) {
|
|
9662
9749
|
const shown = value === null || value === void 0 || value === "" ? "\u2014" : value;
|
|
9663
|
-
return /* @__PURE__ */
|
|
9664
|
-
/* @__PURE__ */
|
|
9665
|
-
/* @__PURE__ */
|
|
9666
|
-
/* @__PURE__ */
|
|
9667
|
-
copyValue && /* @__PURE__ */
|
|
9750
|
+
return /* @__PURE__ */ jsxs71("div", { className: cn("flex flex-wrap items-start gap-x-4 gap-y-0.5 text-body-xs", className), children: [
|
|
9751
|
+
/* @__PURE__ */ jsx100("dt", { className: "shrink-0 grow-0 basis-28 text-default-secondary", children: label }),
|
|
9752
|
+
/* @__PURE__ */ jsxs71("dd", { className: "flex min-w-0 flex-[1_1_10rem] items-start gap-1.5 text-default", children: [
|
|
9753
|
+
/* @__PURE__ */ jsx100("span", { className: "min-w-0 [overflow-wrap:anywhere]", children: shown }),
|
|
9754
|
+
copyValue && /* @__PURE__ */ jsx100(CopyButton, { value: copyValue, label: `Copy ${label.toLowerCase()}` })
|
|
9668
9755
|
] })
|
|
9669
9756
|
] });
|
|
9670
9757
|
}
|
|
@@ -9677,8 +9764,8 @@ function CopyButton({ value, label, copiedLabel = "Copied", className }) {
|
|
|
9677
9764
|
}, [copied]);
|
|
9678
9765
|
return (
|
|
9679
9766
|
// relative: keeps the sr-only status (absolutely positioned) inside a scrolling container.
|
|
9680
|
-
/* @__PURE__ */
|
|
9681
|
-
/* @__PURE__ */
|
|
9767
|
+
/* @__PURE__ */ jsxs71("span", { className: "relative inline-flex", children: [
|
|
9768
|
+
/* @__PURE__ */ jsx100(
|
|
9682
9769
|
IconButton,
|
|
9683
9770
|
{
|
|
9684
9771
|
variant: "subtle",
|
|
@@ -9692,10 +9779,10 @@ function CopyButton({ value, label, copiedLabel = "Copied", className }) {
|
|
|
9692
9779
|
() => void 0
|
|
9693
9780
|
);
|
|
9694
9781
|
},
|
|
9695
|
-
children: copied ? /* @__PURE__ */
|
|
9782
|
+
children: copied ? /* @__PURE__ */ jsx100(CheckIcon6, { "aria-hidden": true }) : /* @__PURE__ */ jsx100(CopyIcon, { "aria-hidden": true })
|
|
9696
9783
|
}
|
|
9697
9784
|
),
|
|
9698
|
-
/* @__PURE__ */
|
|
9785
|
+
/* @__PURE__ */ jsx100("span", { role: "status", className: "sr-only", children: copied ? copiedLabel : "" })
|
|
9699
9786
|
] })
|
|
9700
9787
|
);
|
|
9701
9788
|
}
|
|
@@ -9703,16 +9790,16 @@ function EmailText({ email, className }) {
|
|
|
9703
9790
|
const at = email.lastIndexOf("@");
|
|
9704
9791
|
const local = at > 0 ? email.slice(0, at) : email;
|
|
9705
9792
|
const domain = at > 0 ? email.slice(at) : "";
|
|
9706
|
-
return /* @__PURE__ */
|
|
9707
|
-
/* @__PURE__ */
|
|
9708
|
-
domain && /* @__PURE__ */
|
|
9793
|
+
return /* @__PURE__ */ jsxs71("span", { title: email, "data-slot": "email-text", className: clsx78("flex min-w-0 max-w-full", className), children: [
|
|
9794
|
+
/* @__PURE__ */ jsx100("span", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap", children: local }),
|
|
9795
|
+
domain && /* @__PURE__ */ jsx100("span", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap [flex-shrink:0.001]", children: domain })
|
|
9709
9796
|
] });
|
|
9710
9797
|
}
|
|
9711
9798
|
|
|
9712
9799
|
// src/components/lists/checked-group-list.tsx
|
|
9713
9800
|
import clsx79 from "clsx";
|
|
9714
9801
|
import { CheckIcon as CheckIcon7 } from "lucide-react";
|
|
9715
|
-
import { jsx as
|
|
9802
|
+
import { jsx as jsx101, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
9716
9803
|
var COLUMNS4 = {
|
|
9717
9804
|
1: "columns-1",
|
|
9718
9805
|
2: "columns-2",
|
|
@@ -9726,13 +9813,13 @@ function CheckedGroupList({
|
|
|
9726
9813
|
className
|
|
9727
9814
|
}) {
|
|
9728
9815
|
if (groups.length === 0) {
|
|
9729
|
-
return /* @__PURE__ */
|
|
9816
|
+
return /* @__PURE__ */ jsx101("p", { className: clsx79("text-body-xs text-default-secondary", className), children: emptyLabel });
|
|
9730
9817
|
}
|
|
9731
|
-
const glyph = icon === void 0 ? /* @__PURE__ */
|
|
9732
|
-
return /* @__PURE__ */
|
|
9733
|
-
/* @__PURE__ */
|
|
9734
|
-
/* @__PURE__ */
|
|
9735
|
-
glyph && /* @__PURE__ */
|
|
9818
|
+
const glyph = icon === void 0 ? /* @__PURE__ */ jsx101(CheckIcon7, { className: "size-3.5", strokeWidth: 2.5, "aria-hidden": true }) : icon;
|
|
9819
|
+
return /* @__PURE__ */ jsx101("div", { className: clsx79(COLUMNS4[columns], "gap-x-6", className), children: groups.map((group) => /* @__PURE__ */ jsxs72("div", { className: "mb-5 break-inside-avoid last:mb-0", children: [
|
|
9820
|
+
/* @__PURE__ */ jsx101("p", { className: "mb-2 text-body-tiny font-semibold uppercase tracking-wide text-default-secondary", children: group.label }),
|
|
9821
|
+
/* @__PURE__ */ jsx101("ul", { className: "space-y-1.5", children: group.items.map((item) => /* @__PURE__ */ jsxs72("li", { className: "flex items-center gap-2 text-body-xs text-default", children: [
|
|
9822
|
+
glyph && /* @__PURE__ */ jsx101("span", { className: "shrink-0", children: glyph }),
|
|
9736
9823
|
item
|
|
9737
9824
|
] }, item)) })
|
|
9738
9825
|
] }, group.label)) });
|
|
@@ -9742,7 +9829,7 @@ function CheckedGroupList({
|
|
|
9742
9829
|
import { useMemo as useMemo14, useRef as useRef17, useState as useState26 } from "react";
|
|
9743
9830
|
import clsx80 from "clsx";
|
|
9744
9831
|
import { ChevronRightIcon as ChevronRightIcon7 } from "lucide-react";
|
|
9745
|
-
import { jsx as
|
|
9832
|
+
import { jsx as jsx102, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
9746
9833
|
var ROW = {
|
|
9747
9834
|
sm: "min-h-8 py-1 text-body-xs",
|
|
9748
9835
|
md: "min-h-10 py-2 text-body-sm"
|
|
@@ -9846,7 +9933,7 @@ function TreeView({
|
|
|
9846
9933
|
if (!node) return null;
|
|
9847
9934
|
const children = getChildren?.(item) ?? [];
|
|
9848
9935
|
const isSelected = selected === id;
|
|
9849
|
-
return /* @__PURE__ */
|
|
9936
|
+
return /* @__PURE__ */ jsxs73(
|
|
9850
9937
|
"li",
|
|
9851
9938
|
{
|
|
9852
9939
|
role: "treeitem",
|
|
@@ -9868,7 +9955,7 @@ function TreeView({
|
|
|
9868
9955
|
},
|
|
9869
9956
|
className: "outline-none [&:focus-visible>div]:ring-2 [&:focus-visible>div]:ring-inset [&:focus-visible>div]:ring-brand",
|
|
9870
9957
|
children: [
|
|
9871
|
-
/* @__PURE__ */
|
|
9958
|
+
/* @__PURE__ */ jsxs73(
|
|
9872
9959
|
"div",
|
|
9873
9960
|
{
|
|
9874
9961
|
onClick: () => {
|
|
@@ -9886,7 +9973,7 @@ function TreeView({
|
|
|
9886
9973
|
// Not a button: the treeitem is the one tab stop, and Left/Right already toggle.
|
|
9887
9974
|
// A pointer user still needs a target that toggles without selecting.
|
|
9888
9975
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
9889
|
-
/* @__PURE__ */
|
|
9976
|
+
/* @__PURE__ */ jsx102(
|
|
9890
9977
|
"span",
|
|
9891
9978
|
{
|
|
9892
9979
|
"aria-hidden": true,
|
|
@@ -9897,11 +9984,11 @@ function TreeView({
|
|
|
9897
9984
|
focus(id);
|
|
9898
9985
|
},
|
|
9899
9986
|
className: "flex size-5 shrink-0 items-center justify-center rounded text-icon-default-secondary hover:bg-default-tertiary",
|
|
9900
|
-
children: /* @__PURE__ */
|
|
9987
|
+
children: /* @__PURE__ */ jsx102(ChevronRightIcon7, { className: clsx80("size-3.5 transition-transform motion-reduce:transition-none", node.expanded && "rotate-90") })
|
|
9901
9988
|
}
|
|
9902
9989
|
)
|
|
9903
|
-
) : /* @__PURE__ */
|
|
9904
|
-
/* @__PURE__ */
|
|
9990
|
+
) : /* @__PURE__ */ jsx102("span", { "aria-hidden": true, className: "size-5 shrink-0" }),
|
|
9991
|
+
/* @__PURE__ */ jsx102("div", { className: "min-w-0 flex-1", children: renderItem(item, {
|
|
9905
9992
|
level,
|
|
9906
9993
|
hasChildren: node.hasChildren,
|
|
9907
9994
|
expanded: node.expanded,
|
|
@@ -9910,13 +9997,13 @@ function TreeView({
|
|
|
9910
9997
|
]
|
|
9911
9998
|
}
|
|
9912
9999
|
),
|
|
9913
|
-
node.expanded && /* @__PURE__ */
|
|
10000
|
+
node.expanded && /* @__PURE__ */ jsx102("ul", { role: "group", className: "m-0 list-none p-0", children: renderLevel(children, level + 1) })
|
|
9914
10001
|
]
|
|
9915
10002
|
},
|
|
9916
10003
|
id
|
|
9917
10004
|
);
|
|
9918
10005
|
});
|
|
9919
|
-
return /* @__PURE__ */
|
|
10006
|
+
return /* @__PURE__ */ jsx102("ul", { role: "tree", "aria-label": label, className: clsx80("m-0 flex list-none flex-col p-0", className), children: renderLevel(items, 1) });
|
|
9920
10007
|
}
|
|
9921
10008
|
|
|
9922
10009
|
// src/index.tsx
|
|
@@ -9925,7 +10012,7 @@ export * from "./data-table.js";
|
|
|
9925
10012
|
// src/components/feedback/inline-alert.tsx
|
|
9926
10013
|
import clsx81 from "clsx";
|
|
9927
10014
|
import { CircleCheckBigIcon as CircleCheckBigIcon2, InfoIcon as InfoIcon2, TriangleAlertIcon as TriangleAlertIcon2 } from "lucide-react";
|
|
9928
|
-
import { jsx as
|
|
10015
|
+
import { jsx as jsx103, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
9929
10016
|
var toneStyles3 = {
|
|
9930
10017
|
info: "border-brand-tertiary bg-brand-tertiary text-brand",
|
|
9931
10018
|
warning: "border-warning-tertiary bg-warning-tertiary text-warning",
|
|
@@ -9934,15 +10021,15 @@ var toneStyles3 = {
|
|
|
9934
10021
|
neutral: "border-default bg-default text-default-secondary"
|
|
9935
10022
|
};
|
|
9936
10023
|
var toneIcons = {
|
|
9937
|
-
info: /* @__PURE__ */
|
|
9938
|
-
warning: /* @__PURE__ */
|
|
9939
|
-
danger: /* @__PURE__ */
|
|
9940
|
-
positive: /* @__PURE__ */
|
|
9941
|
-
neutral: /* @__PURE__ */
|
|
10024
|
+
info: /* @__PURE__ */ jsx103(InfoIcon2, { className: "size-4" }),
|
|
10025
|
+
warning: /* @__PURE__ */ jsx103(TriangleAlertIcon2, { className: "size-4" }),
|
|
10026
|
+
danger: /* @__PURE__ */ jsx103(TriangleAlertIcon2, { className: "size-4" }),
|
|
10027
|
+
positive: /* @__PURE__ */ jsx103(CircleCheckBigIcon2, { className: "size-4" }),
|
|
10028
|
+
neutral: /* @__PURE__ */ jsx103(InfoIcon2, { className: "size-4 text-icon-default-secondary" })
|
|
9942
10029
|
};
|
|
9943
10030
|
function InlineAlert({ tone, children, icon, role, className }) {
|
|
9944
10031
|
const glyph = icon === void 0 ? toneIcons[tone] : icon;
|
|
9945
|
-
return /* @__PURE__ */
|
|
10032
|
+
return /* @__PURE__ */ jsxs74(
|
|
9946
10033
|
"div",
|
|
9947
10034
|
{
|
|
9948
10035
|
"data-tone": tone,
|
|
@@ -9953,8 +10040,8 @@ function InlineAlert({ tone, children, icon, role, className }) {
|
|
|
9953
10040
|
className
|
|
9954
10041
|
),
|
|
9955
10042
|
children: [
|
|
9956
|
-
glyph && /* @__PURE__ */
|
|
9957
|
-
/* @__PURE__ */
|
|
10043
|
+
glyph && /* @__PURE__ */ jsx103("span", { "aria-hidden": true, className: "mt-px shrink-0", children: glyph }),
|
|
10044
|
+
/* @__PURE__ */ jsx103("div", { className: "min-w-0", children })
|
|
9958
10045
|
]
|
|
9959
10046
|
}
|
|
9960
10047
|
);
|
|
@@ -9962,7 +10049,7 @@ function InlineAlert({ tone, children, icon, role, className }) {
|
|
|
9962
10049
|
|
|
9963
10050
|
// src/components/feedback/error-boundary.tsx
|
|
9964
10051
|
import { Component } from "react";
|
|
9965
|
-
import { jsx as
|
|
10052
|
+
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
9966
10053
|
var ErrorBoundary = class extends Component {
|
|
9967
10054
|
constructor() {
|
|
9968
10055
|
super(...arguments);
|
|
@@ -9982,7 +10069,7 @@ var ErrorBoundary = class extends Component {
|
|
|
9982
10069
|
}
|
|
9983
10070
|
render() {
|
|
9984
10071
|
if (!this.state.error) return this.props.children;
|
|
9985
|
-
return this.props.fallback ?? /* @__PURE__ */
|
|
10072
|
+
return this.props.fallback ?? /* @__PURE__ */ jsx104(
|
|
9986
10073
|
"div",
|
|
9987
10074
|
{
|
|
9988
10075
|
role: "status",
|
|
@@ -9998,7 +10085,7 @@ var ErrorBoundary = class extends Component {
|
|
|
9998
10085
|
import { forwardRef as forwardRef33, useId as useId21 } from "react";
|
|
9999
10086
|
import clsx82 from "clsx";
|
|
10000
10087
|
import { CircleCheckBigIcon as CircleCheckBigIcon3, InfoIcon as InfoIcon3, TriangleAlertIcon as TriangleAlertIcon3, XIcon as XIcon8 } from "lucide-react";
|
|
10001
|
-
import { jsx as
|
|
10088
|
+
import { jsx as jsx105, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
10002
10089
|
var TONE_STYLES3 = {
|
|
10003
10090
|
info: "border-brand-tertiary bg-brand-tertiary text-default",
|
|
10004
10091
|
positive: "border-positive-tertiary bg-positive-tertiary text-default",
|
|
@@ -10014,11 +10101,11 @@ var TONE_ICON_COLOR = {
|
|
|
10014
10101
|
neutral: "text-icon-default-secondary"
|
|
10015
10102
|
};
|
|
10016
10103
|
var TONE_ICON2 = {
|
|
10017
|
-
info: /* @__PURE__ */
|
|
10018
|
-
positive: /* @__PURE__ */
|
|
10019
|
-
warning: /* @__PURE__ */
|
|
10020
|
-
danger: /* @__PURE__ */
|
|
10021
|
-
neutral: /* @__PURE__ */
|
|
10104
|
+
info: /* @__PURE__ */ jsx105(InfoIcon3, { "aria-hidden": true, className: "size-5" }),
|
|
10105
|
+
positive: /* @__PURE__ */ jsx105(CircleCheckBigIcon3, { "aria-hidden": true, className: "size-5" }),
|
|
10106
|
+
warning: /* @__PURE__ */ jsx105(TriangleAlertIcon3, { "aria-hidden": true, className: "size-5" }),
|
|
10107
|
+
danger: /* @__PURE__ */ jsx105(TriangleAlertIcon3, { "aria-hidden": true, className: "size-5" }),
|
|
10108
|
+
neutral: /* @__PURE__ */ jsx105(InfoIcon3, { "aria-hidden": true, className: "size-5" })
|
|
10022
10109
|
};
|
|
10023
10110
|
var Banner = forwardRef33(function Banner2({
|
|
10024
10111
|
title,
|
|
@@ -10033,7 +10120,7 @@ var Banner = forwardRef33(function Banner2({
|
|
|
10033
10120
|
}, ref) {
|
|
10034
10121
|
const titleId = useId21();
|
|
10035
10122
|
const glyph = icon === void 0 ? TONE_ICON2[tone] : icon;
|
|
10036
|
-
return /* @__PURE__ */
|
|
10123
|
+
return /* @__PURE__ */ jsxs75(
|
|
10037
10124
|
"div",
|
|
10038
10125
|
{
|
|
10039
10126
|
"data-tone": tone,
|
|
@@ -10049,13 +10136,13 @@ var Banner = forwardRef33(function Banner2({
|
|
|
10049
10136
|
),
|
|
10050
10137
|
...rest,
|
|
10051
10138
|
children: [
|
|
10052
|
-
glyph && /* @__PURE__ */
|
|
10053
|
-
/* @__PURE__ */
|
|
10054
|
-
/* @__PURE__ */
|
|
10055
|
-
children && /* @__PURE__ */
|
|
10056
|
-
action && /* @__PURE__ */
|
|
10139
|
+
glyph && /* @__PURE__ */ jsx105("span", { "aria-hidden": true, className: clsx82("mt-px shrink-0", TONE_ICON_COLOR[tone]), children: glyph }),
|
|
10140
|
+
/* @__PURE__ */ jsxs75("div", { className: "min-w-0 flex-1", children: [
|
|
10141
|
+
/* @__PURE__ */ jsx105("p", { id: titleId, className: "text-body-sm font-semibold text-default", children: title }),
|
|
10142
|
+
children && /* @__PURE__ */ jsx105("div", { className: "mt-1 text-body-xs text-default-secondary", children }),
|
|
10143
|
+
action && /* @__PURE__ */ jsx105("div", { className: "mt-3 flex items-center gap-2", children: action })
|
|
10057
10144
|
] }),
|
|
10058
|
-
onDismiss && /* @__PURE__ */
|
|
10145
|
+
onDismiss && /* @__PURE__ */ jsx105(
|
|
10059
10146
|
IconButton,
|
|
10060
10147
|
{
|
|
10061
10148
|
variant: "subtle",
|
|
@@ -10063,7 +10150,7 @@ var Banner = forwardRef33(function Banner2({
|
|
|
10063
10150
|
"aria-label": typeof title === "string" ? `Dismiss: ${title}` : "Dismiss",
|
|
10064
10151
|
onClick: onDismiss,
|
|
10065
10152
|
className: "-mr-1 -mt-1 shrink-0",
|
|
10066
|
-
children: /* @__PURE__ */
|
|
10153
|
+
children: /* @__PURE__ */ jsx105(XIcon8, { "aria-hidden": true, size: 16 })
|
|
10067
10154
|
}
|
|
10068
10155
|
)
|
|
10069
10156
|
]
|
|
@@ -10083,7 +10170,7 @@ import {
|
|
|
10083
10170
|
} from "react";
|
|
10084
10171
|
import clsx83 from "clsx";
|
|
10085
10172
|
import { CircleCheckBigIcon as CircleCheckBigIcon4, InfoIcon as InfoIcon4, TriangleAlertIcon as TriangleAlertIcon4, XIcon as XIcon9 } from "lucide-react";
|
|
10086
|
-
import { jsx as
|
|
10173
|
+
import { jsx as jsx106, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
10087
10174
|
var ToastContext = createContext16(null);
|
|
10088
10175
|
function useToast() {
|
|
10089
10176
|
const context = useContext16(ToastContext);
|
|
@@ -10091,11 +10178,11 @@ function useToast() {
|
|
|
10091
10178
|
return context;
|
|
10092
10179
|
}
|
|
10093
10180
|
var TONE_ICON3 = {
|
|
10094
|
-
info: /* @__PURE__ */
|
|
10095
|
-
positive: /* @__PURE__ */
|
|
10096
|
-
warning: /* @__PURE__ */
|
|
10097
|
-
danger: /* @__PURE__ */
|
|
10098
|
-
neutral: /* @__PURE__ */
|
|
10181
|
+
info: /* @__PURE__ */ jsx106(InfoIcon4, { "aria-hidden": true, className: "size-4" }),
|
|
10182
|
+
positive: /* @__PURE__ */ jsx106(CircleCheckBigIcon4, { "aria-hidden": true, className: "size-4" }),
|
|
10183
|
+
warning: /* @__PURE__ */ jsx106(TriangleAlertIcon4, { "aria-hidden": true, className: "size-4" }),
|
|
10184
|
+
danger: /* @__PURE__ */ jsx106(TriangleAlertIcon4, { "aria-hidden": true, className: "size-4" }),
|
|
10185
|
+
neutral: /* @__PURE__ */ jsx106(InfoIcon4, { "aria-hidden": true, className: "size-4" })
|
|
10099
10186
|
};
|
|
10100
10187
|
var TONE_ICON_COLOR2 = {
|
|
10101
10188
|
info: "text-icon-brand",
|
|
@@ -10104,7 +10191,7 @@ var TONE_ICON_COLOR2 = {
|
|
|
10104
10191
|
danger: "text-icon-danger",
|
|
10105
10192
|
neutral: "text-icon-default-secondary"
|
|
10106
10193
|
};
|
|
10107
|
-
var
|
|
10194
|
+
var POSITION2 = {
|
|
10108
10195
|
"top-left": "top-[var(--toaster-mobile-offset)] md:top-[var(--toaster-offset)] left-4 items-start",
|
|
10109
10196
|
"top-center": "top-[var(--toaster-mobile-offset)] md:top-[var(--toaster-offset)] left-1/2 -translate-x-1/2 items-center",
|
|
10110
10197
|
"top-right": "top-[var(--toaster-mobile-offset)] md:top-[var(--toaster-offset)] right-4 items-end",
|
|
@@ -10163,9 +10250,9 @@ function Toaster({
|
|
|
10163
10250
|
};
|
|
10164
10251
|
}, []);
|
|
10165
10252
|
const context = useMemo15(() => ({ toast, dismiss, dismissAll }), [toast, dismiss, dismissAll]);
|
|
10166
|
-
return /* @__PURE__ */
|
|
10253
|
+
return /* @__PURE__ */ jsxs76(ToastContext.Provider, { value: context, children: [
|
|
10167
10254
|
children,
|
|
10168
|
-
/* @__PURE__ */
|
|
10255
|
+
/* @__PURE__ */ jsx106(Portal, { children: /* @__PURE__ */ jsx106(
|
|
10169
10256
|
"div",
|
|
10170
10257
|
{
|
|
10171
10258
|
"aria-live": "polite",
|
|
@@ -10173,20 +10260,20 @@ function Toaster({
|
|
|
10173
10260
|
...{ [TOASTER_ATTRIBUTE]: "" },
|
|
10174
10261
|
className: clsx83(
|
|
10175
10262
|
"pointer-events-none fixed z-toast flex w-[calc(100%-2rem)] max-w-[380px] flex-col gap-2",
|
|
10176
|
-
|
|
10263
|
+
POSITION2[position]
|
|
10177
10264
|
),
|
|
10178
10265
|
style: {
|
|
10179
10266
|
"--toaster-offset": toLength(offset),
|
|
10180
10267
|
"--toaster-mobile-offset": toLength(mobileOffset ?? offset)
|
|
10181
10268
|
},
|
|
10182
|
-
children: toasts.map((entry) => /* @__PURE__ */
|
|
10269
|
+
children: toasts.map((entry) => /* @__PURE__ */ jsx106(ToastItem, { toast: entry, onDismiss: () => dismiss(entry.id) }, entry.id))
|
|
10183
10270
|
}
|
|
10184
10271
|
) })
|
|
10185
10272
|
] });
|
|
10186
10273
|
}
|
|
10187
10274
|
function ToastItem({ toast, onDismiss }) {
|
|
10188
10275
|
const tone = toast.tone ?? "info";
|
|
10189
|
-
return /* @__PURE__ */
|
|
10276
|
+
return /* @__PURE__ */ jsxs76(
|
|
10190
10277
|
"div",
|
|
10191
10278
|
{
|
|
10192
10279
|
role: tone === "danger" ? "alert" : "status",
|
|
@@ -10195,13 +10282,13 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
10195
10282
|
"bg-default p-4 shadow-400"
|
|
10196
10283
|
),
|
|
10197
10284
|
children: [
|
|
10198
|
-
/* @__PURE__ */
|
|
10199
|
-
/* @__PURE__ */
|
|
10200
|
-
/* @__PURE__ */
|
|
10201
|
-
toast.description && /* @__PURE__ */
|
|
10202
|
-
toast.action && /* @__PURE__ */
|
|
10285
|
+
/* @__PURE__ */ jsx106("span", { "aria-hidden": true, className: clsx83("mt-px shrink-0", TONE_ICON_COLOR2[tone]), children: TONE_ICON3[tone] }),
|
|
10286
|
+
/* @__PURE__ */ jsxs76("div", { className: "min-w-0 flex-1", children: [
|
|
10287
|
+
/* @__PURE__ */ jsx106("p", { className: "text-body-sm font-semibold text-default", children: toast.title }),
|
|
10288
|
+
toast.description && /* @__PURE__ */ jsx106("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: toast.description }),
|
|
10289
|
+
toast.action && /* @__PURE__ */ jsx106("div", { className: "mt-2 flex items-center gap-2", children: toast.action })
|
|
10203
10290
|
] }),
|
|
10204
|
-
/* @__PURE__ */
|
|
10291
|
+
/* @__PURE__ */ jsx106(
|
|
10205
10292
|
IconButton,
|
|
10206
10293
|
{
|
|
10207
10294
|
variant: "subtle",
|
|
@@ -10209,7 +10296,7 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
10209
10296
|
"aria-label": typeof toast.title === "string" ? `Dismiss: ${toast.title}` : "Dismiss",
|
|
10210
10297
|
onClick: onDismiss,
|
|
10211
10298
|
className: "-mr-1 -mt-1 shrink-0",
|
|
10212
|
-
children: /* @__PURE__ */
|
|
10299
|
+
children: /* @__PURE__ */ jsx106(XIcon9, { "aria-hidden": true, size: 14 })
|
|
10213
10300
|
}
|
|
10214
10301
|
)
|
|
10215
10302
|
]
|
|
@@ -10220,23 +10307,23 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
10220
10307
|
// src/components/forms/password-input.tsx
|
|
10221
10308
|
import { forwardRef as forwardRef34, useState as useState28 } from "react";
|
|
10222
10309
|
import { EyeIcon as EyeIcon2, EyeOffIcon as EyeOffIcon2 } from "lucide-react";
|
|
10223
|
-
import { jsx as
|
|
10310
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
10224
10311
|
var PasswordInput = forwardRef34(function PasswordInput2(props, ref) {
|
|
10225
10312
|
const [visible, setVisible] = useState28(false);
|
|
10226
|
-
return /* @__PURE__ */
|
|
10313
|
+
return /* @__PURE__ */ jsx107(
|
|
10227
10314
|
Input,
|
|
10228
10315
|
{
|
|
10229
10316
|
ref,
|
|
10230
10317
|
...props,
|
|
10231
10318
|
type: visible ? "text" : "password",
|
|
10232
|
-
trailingAction: /* @__PURE__ */
|
|
10319
|
+
trailingAction: /* @__PURE__ */ jsx107(
|
|
10233
10320
|
"button",
|
|
10234
10321
|
{
|
|
10235
10322
|
type: "button",
|
|
10236
10323
|
"aria-label": visible ? "Hide password" : "Show password",
|
|
10237
10324
|
onClick: () => setVisible((v) => !v),
|
|
10238
10325
|
className: "flex items-center justify-center rounded transition-colors hover:text-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",
|
|
10239
|
-
children: visible ? /* @__PURE__ */
|
|
10326
|
+
children: visible ? /* @__PURE__ */ jsx107(EyeOffIcon2, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ jsx107(EyeIcon2, { "aria-hidden": true, className: "size-4" })
|
|
10240
10327
|
}
|
|
10241
10328
|
)
|
|
10242
10329
|
}
|
|
@@ -10246,12 +10333,12 @@ var PasswordInput = forwardRef34(function PasswordInput2(props, ref) {
|
|
|
10246
10333
|
// src/components/ai/ai-chat-bar.tsx
|
|
10247
10334
|
import clsx84 from "clsx";
|
|
10248
10335
|
import { ArrowRightIcon as ArrowRightIcon2, SearchIcon as SearchIcon2 } from "lucide-react";
|
|
10249
|
-
import { jsx as
|
|
10336
|
+
import { jsx as jsx108, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
10250
10337
|
function AIChatBar({
|
|
10251
10338
|
placeholder = "Ask Intelligence about any entity, supplier, or risk\u2026",
|
|
10252
10339
|
className
|
|
10253
10340
|
}) {
|
|
10254
|
-
return /* @__PURE__ */
|
|
10341
|
+
return /* @__PURE__ */ jsxs77(
|
|
10255
10342
|
"div",
|
|
10256
10343
|
{
|
|
10257
10344
|
className: clsx84(
|
|
@@ -10259,16 +10346,16 @@ function AIChatBar({
|
|
|
10259
10346
|
className
|
|
10260
10347
|
),
|
|
10261
10348
|
children: [
|
|
10262
|
-
/* @__PURE__ */
|
|
10263
|
-
/* @__PURE__ */
|
|
10264
|
-
/* @__PURE__ */
|
|
10349
|
+
/* @__PURE__ */ jsx108("span", { "aria-hidden": true, className: "shrink-0 text-icon-default-secondary", children: /* @__PURE__ */ jsx108(SearchIcon2, { className: "size-4" }) }),
|
|
10350
|
+
/* @__PURE__ */ jsx108("p", { className: "flex-1 text-body-sm text-default-tertiary truncate", children: placeholder }),
|
|
10351
|
+
/* @__PURE__ */ jsxs77(
|
|
10265
10352
|
"button",
|
|
10266
10353
|
{
|
|
10267
10354
|
type: "button",
|
|
10268
10355
|
className: "inline-flex shrink-0 items-center gap-2 rounded-xl bg-brand px-4 py-3 text-body-sm font-semibold text-brand-on-brand hover:bg-brand-hover transition-colors",
|
|
10269
10356
|
children: [
|
|
10270
10357
|
"Ask",
|
|
10271
|
-
/* @__PURE__ */
|
|
10358
|
+
/* @__PURE__ */ jsx108(ArrowRightIcon2, { "aria-hidden": true, className: "size-4" })
|
|
10272
10359
|
]
|
|
10273
10360
|
}
|
|
10274
10361
|
)
|
|
@@ -10280,9 +10367,9 @@ function AIChatBar({
|
|
|
10280
10367
|
// src/components/ai/ai-suggestion-chip.tsx
|
|
10281
10368
|
import clsx85 from "clsx";
|
|
10282
10369
|
import { ArrowRightIcon as ArrowRightIcon3, CpuIcon } from "lucide-react";
|
|
10283
|
-
import { jsx as
|
|
10370
|
+
import { jsx as jsx109, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
10284
10371
|
function AISuggestionChip({ prompt, onClick, className }) {
|
|
10285
|
-
return /* @__PURE__ */
|
|
10372
|
+
return /* @__PURE__ */ jsxs78(
|
|
10286
10373
|
"button",
|
|
10287
10374
|
{
|
|
10288
10375
|
type: "button",
|
|
@@ -10292,9 +10379,9 @@ function AISuggestionChip({ prompt, onClick, className }) {
|
|
|
10292
10379
|
className
|
|
10293
10380
|
),
|
|
10294
10381
|
children: [
|
|
10295
|
-
/* @__PURE__ */
|
|
10296
|
-
/* @__PURE__ */
|
|
10297
|
-
/* @__PURE__ */
|
|
10382
|
+
/* @__PURE__ */ jsx109("span", { "aria-hidden": true, className: "shrink-0 text-icon-brand", children: /* @__PURE__ */ jsx109(CpuIcon, { className: "size-4" }) }),
|
|
10383
|
+
/* @__PURE__ */ jsx109("span", { className: "flex-1 text-body-sm text-default truncate", children: prompt }),
|
|
10384
|
+
/* @__PURE__ */ jsx109("span", { "aria-hidden": true, className: "shrink-0 text-icon-default-secondary", children: /* @__PURE__ */ jsx109(ArrowRightIcon3, { className: "size-3.5", strokeWidth: 2.5 }) })
|
|
10298
10385
|
]
|
|
10299
10386
|
}
|
|
10300
10387
|
);
|
|
@@ -10302,18 +10389,18 @@ function AISuggestionChip({ prompt, onClick, className }) {
|
|
|
10302
10389
|
|
|
10303
10390
|
// src/components/ai/quick-actions-bar.tsx
|
|
10304
10391
|
import clsx86 from "clsx";
|
|
10305
|
-
import { jsx as
|
|
10392
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
10306
10393
|
function QuickActionsBar({ actions, active, onSelect, className }) {
|
|
10307
|
-
return /* @__PURE__ */
|
|
10394
|
+
return /* @__PURE__ */ jsx110("div", { className: clsx86("flex flex-wrap items-center gap-3", className), children: actions.map((action) => {
|
|
10308
10395
|
const isActive = active === action.value;
|
|
10309
|
-
return /* @__PURE__ */
|
|
10396
|
+
return /* @__PURE__ */ jsx110(
|
|
10310
10397
|
"button",
|
|
10311
10398
|
{
|
|
10312
10399
|
type: "button",
|
|
10313
10400
|
"aria-pressed": isActive,
|
|
10314
10401
|
onClick: () => onSelect?.(action.value),
|
|
10315
10402
|
className: "rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-1 focus-visible:ring-offset-default",
|
|
10316
|
-
children: /* @__PURE__ */
|
|
10403
|
+
children: /* @__PURE__ */ jsx110(TagPill, { label: action.label, tone: isActive ? "brand" : "default" })
|
|
10317
10404
|
},
|
|
10318
10405
|
action.value
|
|
10319
10406
|
);
|
|
@@ -10323,23 +10410,23 @@ function QuickActionsBar({ actions, active, onSelect, className }) {
|
|
|
10323
10410
|
// src/components/ai/chat.tsx
|
|
10324
10411
|
import clsx87 from "clsx";
|
|
10325
10412
|
import { CpuIcon as CpuIcon2 } from "lucide-react";
|
|
10326
|
-
import { jsx as
|
|
10413
|
+
import { jsx as jsx111, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
10327
10414
|
function AiAvatar({ className, icon }) {
|
|
10328
|
-
return /* @__PURE__ */
|
|
10415
|
+
return /* @__PURE__ */ jsx111(
|
|
10329
10416
|
"span",
|
|
10330
10417
|
{
|
|
10331
10418
|
"aria-hidden": true,
|
|
10332
10419
|
className: cn("flex size-8 shrink-0 items-center justify-center rounded-full bg-brand text-icon-brand-on-brand", className),
|
|
10333
|
-
children: icon ?? /* @__PURE__ */
|
|
10420
|
+
children: icon ?? /* @__PURE__ */ jsx111(CpuIcon2, { className: "size-3.5" })
|
|
10334
10421
|
}
|
|
10335
10422
|
);
|
|
10336
10423
|
}
|
|
10337
10424
|
function TypingIndicator({ label = "Assistant is typing", className }) {
|
|
10338
|
-
return /* @__PURE__ */
|
|
10339
|
-
/* @__PURE__ */
|
|
10340
|
-
/* @__PURE__ */
|
|
10341
|
-
/* @__PURE__ */
|
|
10342
|
-
/* @__PURE__ */
|
|
10425
|
+
return /* @__PURE__ */ jsxs79("div", { role: "status", "aria-live": "polite", className: cn("flex items-center gap-3", className), children: [
|
|
10426
|
+
/* @__PURE__ */ jsx111(AiAvatar, {}),
|
|
10427
|
+
/* @__PURE__ */ jsxs79("div", { className: "flex items-center gap-2 rounded-2xl rounded-tl-sm border border-default bg-default-secondary px-5 py-3", children: [
|
|
10428
|
+
/* @__PURE__ */ jsx111("span", { className: "text-body-xs text-default-secondary", children: label }),
|
|
10429
|
+
/* @__PURE__ */ jsx111("span", { "aria-hidden": true, className: "flex gap-1", children: [0, 1, 2].map((index) => /* @__PURE__ */ jsx111(
|
|
10343
10430
|
"span",
|
|
10344
10431
|
{
|
|
10345
10432
|
className: "inline-block size-1.5 rounded-full bg-default-tertiary motion-safe:animate-bounce",
|
|
@@ -10352,9 +10439,9 @@ function TypingIndicator({ label = "Assistant is typing", className }) {
|
|
|
10352
10439
|
}
|
|
10353
10440
|
function ChatBubble({ sender, children, failed = false, className }) {
|
|
10354
10441
|
if (sender === "user") {
|
|
10355
|
-
return /* @__PURE__ */
|
|
10442
|
+
return /* @__PURE__ */ jsx111("div", { "data-sender": "user", className: cn("flex justify-end", className), children: /* @__PURE__ */ jsx111("div", { className: "max-w-[85%] rounded-[18px] rounded-tr-sm bg-neutral px-5 py-3.5 text-body-sm leading-relaxed text-neutral-on-neutral md:max-w-[441px] md:px-7 md:py-4", children }) });
|
|
10356
10443
|
}
|
|
10357
|
-
return /* @__PURE__ */
|
|
10444
|
+
return /* @__PURE__ */ jsx111(
|
|
10358
10445
|
"div",
|
|
10359
10446
|
{
|
|
10360
10447
|
"data-sender": "assistant",
|
|
@@ -10373,17 +10460,17 @@ function ChatBubble({ sender, children, failed = false, className }) {
|
|
|
10373
10460
|
}
|
|
10374
10461
|
|
|
10375
10462
|
// src/components/decorative/aurora-backdrop.tsx
|
|
10376
|
-
import { jsx as
|
|
10463
|
+
import { jsx as jsx112, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
10377
10464
|
function blob(primitive, alpha) {
|
|
10378
10465
|
return `radial-gradient(ellipse, color-mix(in srgb, var(${primitive}) ${alpha}%, transparent) 0%, transparent 70%)`;
|
|
10379
10466
|
}
|
|
10380
10467
|
function AuroraBackdrop() {
|
|
10381
|
-
return /* @__PURE__ */
|
|
10382
|
-
/* @__PURE__ */
|
|
10383
|
-
/* @__PURE__ */
|
|
10384
|
-
/* @__PURE__ */
|
|
10385
|
-
/* @__PURE__ */
|
|
10386
|
-
/* @__PURE__ */
|
|
10468
|
+
return /* @__PURE__ */ jsxs80("div", { className: "pointer-events-none absolute inset-0", "aria-hidden": true, children: [
|
|
10469
|
+
/* @__PURE__ */ jsx112("div", { className: "absolute -left-24 -top-28", style: { width: 380, height: 380, background: blob("--prim-red-400", 45) } }),
|
|
10470
|
+
/* @__PURE__ */ jsx112("div", { className: "absolute -top-24 right-[-4%]", style: { width: 320, height: 320, background: blob("--prim-red-300", 40) } }),
|
|
10471
|
+
/* @__PURE__ */ jsx112("div", { className: "absolute bottom-[-10%] right-[14%]", style: { width: 420, height: 420, background: blob("--prim-violet-400", 30) } }),
|
|
10472
|
+
/* @__PURE__ */ jsx112("div", { className: "absolute bottom-[-6%] left-[4%]", style: { width: 280, height: 280, background: blob("--prim-blue-400", 25) } }),
|
|
10473
|
+
/* @__PURE__ */ jsx112("div", { className: "absolute left-[20%] top-[30%]", style: { width: 240, height: 240, background: blob("--prim-blue-300", 18) } })
|
|
10387
10474
|
] });
|
|
10388
10475
|
}
|
|
10389
10476
|
export {
|
|
@@ -10612,6 +10699,7 @@ export {
|
|
|
10612
10699
|
SegmentedControl,
|
|
10613
10700
|
Select,
|
|
10614
10701
|
SelectControl,
|
|
10702
|
+
SelectionBar,
|
|
10615
10703
|
Separator,
|
|
10616
10704
|
Sidebar,
|
|
10617
10705
|
SidebarProvider,
|