@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.cjs
CHANGED
|
@@ -260,6 +260,7 @@ __export(src_exports, {
|
|
|
260
260
|
SegmentedControl: () => SegmentedControl,
|
|
261
261
|
Select: () => Select,
|
|
262
262
|
SelectControl: () => SelectControl,
|
|
263
|
+
SelectionBar: () => SelectionBar,
|
|
263
264
|
Separator: () => Separator,
|
|
264
265
|
Sidebar: () => Sidebar,
|
|
265
266
|
SidebarProvider: () => SidebarProvider,
|
|
@@ -6539,7 +6540,10 @@ var ModalShell = (0, import_react42.forwardRef)(
|
|
|
6539
6540
|
className: cn(
|
|
6540
6541
|
// The overlay wraps the content (a Radix-supported layout), so it also does the
|
|
6541
6542
|
// positioning: bottom sheet below `sm`, a card centred or top-anchored above it.
|
|
6542
|
-
|
|
6543
|
+
// `max-sm:items-end`, not a base `items-end` that `sm:` overrides: an app that layers this
|
|
6544
|
+
// stylesheet under its own utilities (Cleo) and uses `items-end` itself would otherwise win
|
|
6545
|
+
// at every width, and every dialog sat at the bottom on desktop. Fixed in 0.10.3.
|
|
6546
|
+
"fixed inset-0 z-modal flex justify-center max-sm:items-end",
|
|
6543
6547
|
OVERLAY_ALIGN[align],
|
|
6544
6548
|
OVERLAY_SCRIM
|
|
6545
6549
|
),
|
|
@@ -11043,6 +11047,7 @@ function BarChart({
|
|
|
11043
11047
|
length = 240,
|
|
11044
11048
|
showLabels = true,
|
|
11045
11049
|
showValues = false,
|
|
11050
|
+
reference,
|
|
11046
11051
|
radius = 3,
|
|
11047
11052
|
label,
|
|
11048
11053
|
className
|
|
@@ -11053,73 +11058,111 @@ function BarChart({
|
|
|
11053
11058
|
const categoryTotals = categories.map(
|
|
11054
11059
|
(_, 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)))
|
|
11055
11060
|
);
|
|
11056
|
-
const
|
|
11061
|
+
const referenceValue = reference ? Math.max(0, reference.value) : 0;
|
|
11062
|
+
const max = Math.max(...categoryTotals, referenceValue, 1);
|
|
11057
11063
|
const horizontal = orientation === "horizontal";
|
|
11058
|
-
|
|
11064
|
+
const referenceColor = reference ? resolveChartColor(reference.color, reference.tone ?? "warning") : void 0;
|
|
11065
|
+
const referenceAt = `${referenceValue / max * 100}%`;
|
|
11066
|
+
const accessibleName = label && reference?.label ? `${label}. ${reference.label}` : label;
|
|
11067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
11059
11068
|
"div",
|
|
11060
11069
|
{
|
|
11061
|
-
className: (0, import_clsx74.default)(
|
|
11070
|
+
className: (0, import_clsx74.default)(
|
|
11071
|
+
"flex w-full min-w-0",
|
|
11072
|
+
horizontal ? "flex-col gap-2" : "flex-row items-end gap-3",
|
|
11073
|
+
reference && "relative",
|
|
11074
|
+
className
|
|
11075
|
+
),
|
|
11062
11076
|
role: label ? "img" : void 0,
|
|
11063
|
-
"aria-label":
|
|
11077
|
+
"aria-label": accessibleName,
|
|
11064
11078
|
"aria-hidden": label ? void 0 : true,
|
|
11065
|
-
children:
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
|
|
11079
|
+
children: [
|
|
11080
|
+
categories.map((category, ci) => {
|
|
11081
|
+
const bars = series.map((s, si) => ({
|
|
11082
|
+
key: s.label,
|
|
11083
|
+
value: Math.max(0, s.values[ci] ?? 0),
|
|
11084
|
+
color: resolveChartColor(s.color, s.tone, si)
|
|
11085
|
+
}));
|
|
11086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
11087
|
+
"div",
|
|
11088
|
+
{
|
|
11089
|
+
className: (0, import_clsx74.default)("flex min-w-0", horizontal ? "flex-col gap-1" : "h-full flex-col justify-end gap-1.5"),
|
|
11090
|
+
style: horizontal ? void 0 : { width: perCategory },
|
|
11091
|
+
children: [
|
|
11092
|
+
showLabels && horizontal && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: (0, import_clsx74.default)("truncate text-default-secondary", labelClass2), children: category }),
|
|
11093
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
11094
|
+
"div",
|
|
11095
|
+
{
|
|
11096
|
+
className: (0, import_clsx74.default)("flex", horizontal ? "items-center gap-2" : "w-full flex-1 items-end justify-center"),
|
|
11097
|
+
style: horizontal ? void 0 : { height: length },
|
|
11098
|
+
children: [
|
|
11099
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
11100
|
+
"div",
|
|
11101
|
+
{
|
|
11102
|
+
className: (0, import_clsx74.default)("flex min-w-0", stacked ? "gap-0" : ""),
|
|
11103
|
+
style: horizontal ? { width: length, flexDirection: stacked ? "row" : "column", gap: stacked ? 0 : gap } : {
|
|
11104
|
+
height: "100%",
|
|
11105
|
+
width: perCategory,
|
|
11106
|
+
flexDirection: stacked ? "column-reverse" : "row",
|
|
11107
|
+
alignItems: "flex-end",
|
|
11108
|
+
gap: stacked ? 0 : gap
|
|
11109
|
+
},
|
|
11110
|
+
children: bars.map((bar) => {
|
|
11111
|
+
const extent = `${bar.value / max * 100}%`;
|
|
11112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
11113
|
+
"div",
|
|
11114
|
+
{
|
|
11115
|
+
title: `${category} \xB7 ${bar.key}: ${bar.value}`,
|
|
11116
|
+
className: "transition-all motion-reduce:transition-none",
|
|
11117
|
+
style: {
|
|
11118
|
+
backgroundColor: bar.color,
|
|
11119
|
+
borderRadius: radius,
|
|
11120
|
+
...horizontal ? { width: extent, height: stacked ? band : band } : { height: extent, width: stacked ? perCategory : band }
|
|
11121
|
+
}
|
|
11122
|
+
},
|
|
11123
|
+
bar.key
|
|
11124
|
+
);
|
|
11125
|
+
})
|
|
11126
|
+
}
|
|
11127
|
+
),
|
|
11128
|
+
showValues && horizontal && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: (0, import_clsx74.default)("shrink-0 tabular-nums text-default-secondary", labelClass2), children: categoryTotals[ci] })
|
|
11129
|
+
]
|
|
11130
|
+
}
|
|
11131
|
+
),
|
|
11132
|
+
showLabels && !horizontal && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: (0, import_clsx74.default)("truncate text-center text-default-secondary", labelClass2), children: category })
|
|
11133
|
+
]
|
|
11134
|
+
},
|
|
11135
|
+
category
|
|
11136
|
+
);
|
|
11137
|
+
}),
|
|
11138
|
+
reference && // Laid over the bar area only. Vertical bars all start at the top of their column
|
|
11139
|
+
// (the labels sit below), so the band is the top `length` px; horizontal tracks all
|
|
11140
|
+
// start at the left edge, so the line sits `referenceAt` of `length` from it.
|
|
11141
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
11072
11142
|
"div",
|
|
11073
11143
|
{
|
|
11074
|
-
|
|
11075
|
-
|
|
11076
|
-
|
|
11077
|
-
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
|
|
11081
|
-
|
|
11082
|
-
|
|
11083
|
-
|
|
11084
|
-
|
|
11085
|
-
|
|
11086
|
-
|
|
11087
|
-
|
|
11088
|
-
|
|
11089
|
-
|
|
11090
|
-
|
|
11091
|
-
|
|
11092
|
-
|
|
11093
|
-
|
|
11094
|
-
|
|
11095
|
-
|
|
11096
|
-
const extent = `${bar.value / max * 100}%`;
|
|
11097
|
-
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
11098
|
-
"div",
|
|
11099
|
-
{
|
|
11100
|
-
title: `${category} \xB7 ${bar.key}: ${bar.value}`,
|
|
11101
|
-
className: "transition-all motion-reduce:transition-none",
|
|
11102
|
-
style: {
|
|
11103
|
-
backgroundColor: bar.color,
|
|
11104
|
-
borderRadius: radius,
|
|
11105
|
-
...horizontal ? { width: extent, height: stacked ? band : band } : { height: extent, width: stacked ? perCategory : band }
|
|
11106
|
-
}
|
|
11107
|
-
},
|
|
11108
|
-
bar.key
|
|
11109
|
-
);
|
|
11110
|
-
})
|
|
11111
|
-
}
|
|
11112
|
-
),
|
|
11113
|
-
showValues && horizontal && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: (0, import_clsx74.default)("shrink-0 tabular-nums text-default-secondary", labelClass2), children: categoryTotals[ci] })
|
|
11114
|
-
]
|
|
11115
|
-
}
|
|
11116
|
-
),
|
|
11117
|
-
showLabels && !horizontal && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: (0, import_clsx74.default)("truncate text-center text-default-secondary", labelClass2), children: category })
|
|
11118
|
-
]
|
|
11119
|
-
},
|
|
11120
|
-
category
|
|
11121
|
-
);
|
|
11122
|
-
})
|
|
11144
|
+
"data-chart-reference": "",
|
|
11145
|
+
"aria-hidden": true,
|
|
11146
|
+
className: "pointer-events-none absolute",
|
|
11147
|
+
style: horizontal ? { top: 0, bottom: 0, left: 0, width: length } : { top: 0, left: 0, right: 0, height: length },
|
|
11148
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
11149
|
+
"div",
|
|
11150
|
+
{
|
|
11151
|
+
className: "absolute",
|
|
11152
|
+
style: horizontal ? { top: 0, bottom: 0, left: referenceAt, borderLeft: `2px dashed ${referenceColor}` } : { left: 0, right: 0, bottom: referenceAt, borderTop: `2px dashed ${referenceColor}` },
|
|
11153
|
+
children: reference.label && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
11154
|
+
"span",
|
|
11155
|
+
{
|
|
11156
|
+
className: (0, import_clsx74.default)("absolute whitespace-nowrap", labelClass2),
|
|
11157
|
+
style: horizontal ? { top: 0, left: 4, color: referenceColor } : { right: 0, bottom: 2, color: referenceColor },
|
|
11158
|
+
children: reference.label
|
|
11159
|
+
}
|
|
11160
|
+
)
|
|
11161
|
+
}
|
|
11162
|
+
)
|
|
11163
|
+
}
|
|
11164
|
+
)
|
|
11165
|
+
]
|
|
11123
11166
|
}
|
|
11124
11167
|
);
|
|
11125
11168
|
}
|
|
@@ -11659,9 +11702,54 @@ function Listbox({
|
|
|
11659
11702
|
);
|
|
11660
11703
|
}
|
|
11661
11704
|
|
|
11705
|
+
// src/components/lists/selection-bar.tsx
|
|
11706
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
11707
|
+
var POSITION = {
|
|
11708
|
+
sticky: "sticky bottom-6 z-sticky",
|
|
11709
|
+
static: ""
|
|
11710
|
+
};
|
|
11711
|
+
function SelectionBar({
|
|
11712
|
+
label,
|
|
11713
|
+
description,
|
|
11714
|
+
children,
|
|
11715
|
+
onClear,
|
|
11716
|
+
clearLabel = "Clear",
|
|
11717
|
+
"aria-label": ariaLabel = "Selection actions",
|
|
11718
|
+
position = "sticky",
|
|
11719
|
+
className
|
|
11720
|
+
}) {
|
|
11721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
|
|
11722
|
+
"div",
|
|
11723
|
+
{
|
|
11724
|
+
role: "region",
|
|
11725
|
+
"aria-label": ariaLabel,
|
|
11726
|
+
"data-slot": "selection-bar",
|
|
11727
|
+
"data-position": position,
|
|
11728
|
+
className: cn(
|
|
11729
|
+
"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",
|
|
11730
|
+
POSITION[position],
|
|
11731
|
+
className
|
|
11732
|
+
),
|
|
11733
|
+
children: [
|
|
11734
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex min-w-0 flex-1 basis-60 flex-col gap-0.5", children: [
|
|
11735
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "text-body font-medium", children: label }),
|
|
11736
|
+
description !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "truncate text-body-xs text-default-secondary", children: description })
|
|
11737
|
+
] }),
|
|
11738
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
11739
|
+
onClear && /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_jsx_runtime105.Fragment, { children: [
|
|
11740
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Button, { variant: "subtle", onClick: onClear, children: clearLabel }),
|
|
11741
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { "aria-hidden": true, className: "h-6 border-l border-default" })
|
|
11742
|
+
] }),
|
|
11743
|
+
children
|
|
11744
|
+
] })
|
|
11745
|
+
]
|
|
11746
|
+
}
|
|
11747
|
+
);
|
|
11748
|
+
}
|
|
11749
|
+
|
|
11662
11750
|
// src/components/lists/list-row.tsx
|
|
11663
11751
|
var import_clsx83 = __toESM(require("clsx"), 1);
|
|
11664
|
-
var
|
|
11752
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
11665
11753
|
var DENSITY2 = {
|
|
11666
11754
|
default: {
|
|
11667
11755
|
pad: "py-4",
|
|
@@ -11722,24 +11810,24 @@ function ListRow({
|
|
|
11722
11810
|
className
|
|
11723
11811
|
)
|
|
11724
11812
|
};
|
|
11725
|
-
const body = /* @__PURE__ */ (0,
|
|
11726
|
-
/* @__PURE__ */ (0,
|
|
11727
|
-
hasTitleLine && /* @__PURE__ */ (0,
|
|
11728
|
-
/* @__PURE__ */ (0,
|
|
11813
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_jsx_runtime106.Fragment, { children: [
|
|
11814
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: (0, import_clsx83.default)("flex min-w-0 flex-1 flex-col", d.gap), children: [
|
|
11815
|
+
hasTitleLine && /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
11816
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
11729
11817
|
leading,
|
|
11730
|
-
title != null && /* @__PURE__ */ (0,
|
|
11731
|
-
titleMeta && /* @__PURE__ */ (0,
|
|
11818
|
+
title != null && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: (0, import_clsx83.default)("truncate", d.title), children: title }),
|
|
11819
|
+
titleMeta && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "shrink-0", children: titleMeta })
|
|
11732
11820
|
] }),
|
|
11733
|
-
meta && /* @__PURE__ */ (0,
|
|
11821
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "shrink-0", children: meta })
|
|
11734
11822
|
] }),
|
|
11735
|
-
description && /* @__PURE__ */ (0,
|
|
11823
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("p", { className: d.description, children: description }),
|
|
11736
11824
|
footer && // These two wrappers are propagation barriers, not controls — they add no
|
|
11737
11825
|
// behaviour of their own and must not be focusable or take a role.
|
|
11738
11826
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
11739
|
-
/* @__PURE__ */ (0,
|
|
11827
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { onClick: stopIfInteractive, onKeyDown: stopIfInteractive, children: footer })
|
|
11740
11828
|
] }),
|
|
11741
11829
|
trailing && // eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
11742
|
-
/* @__PURE__ */ (0,
|
|
11830
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
11743
11831
|
"div",
|
|
11744
11832
|
{
|
|
11745
11833
|
className: "ml-3 flex shrink-0 items-center self-center",
|
|
@@ -11750,7 +11838,7 @@ function ListRow({
|
|
|
11750
11838
|
)
|
|
11751
11839
|
] });
|
|
11752
11840
|
if (asChild) {
|
|
11753
|
-
return /* @__PURE__ */ (0,
|
|
11841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
11754
11842
|
Slot,
|
|
11755
11843
|
{
|
|
11756
11844
|
...rootProps,
|
|
@@ -11763,7 +11851,7 @@ function ListRow({
|
|
|
11763
11851
|
}
|
|
11764
11852
|
);
|
|
11765
11853
|
}
|
|
11766
|
-
return /* @__PURE__ */ (0,
|
|
11854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
11767
11855
|
Tag,
|
|
11768
11856
|
{
|
|
11769
11857
|
...rootProps,
|
|
@@ -11794,9 +11882,9 @@ function refusePress(event) {
|
|
|
11794
11882
|
// src/components/lists/file-row.tsx
|
|
11795
11883
|
var import_clsx84 = __toESM(require("clsx"), 1);
|
|
11796
11884
|
var import_lucide_react31 = require("lucide-react");
|
|
11797
|
-
var
|
|
11885
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
11798
11886
|
function FileTypeBadge({ type }) {
|
|
11799
|
-
return /* @__PURE__ */ (0,
|
|
11887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("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 });
|
|
11800
11888
|
}
|
|
11801
11889
|
function FileRow({
|
|
11802
11890
|
name,
|
|
@@ -11810,8 +11898,8 @@ function FileRow({
|
|
|
11810
11898
|
actions,
|
|
11811
11899
|
className
|
|
11812
11900
|
}) {
|
|
11813
|
-
const lead = leading ?? (fileType ? /* @__PURE__ */ (0,
|
|
11814
|
-
return /* @__PURE__ */ (0,
|
|
11901
|
+
const lead = leading ?? (fileType ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(FileTypeBadge, { type: fileType }) : null);
|
|
11902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
11815
11903
|
"div",
|
|
11816
11904
|
{
|
|
11817
11905
|
className: (0, import_clsx84.default)(
|
|
@@ -11820,14 +11908,14 @@ function FileRow({
|
|
|
11820
11908
|
),
|
|
11821
11909
|
children: [
|
|
11822
11910
|
lead,
|
|
11823
|
-
/* @__PURE__ */ (0,
|
|
11824
|
-
/* @__PURE__ */ (0,
|
|
11825
|
-
detail && /* @__PURE__ */ (0,
|
|
11911
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
11912
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "truncate text-body-sm font-medium text-default", children: name }),
|
|
11913
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "text-body-xs text-default-secondary", children: detail })
|
|
11826
11914
|
] }),
|
|
11827
|
-
(onDownload || onRemove || actions) && /* @__PURE__ */ (0,
|
|
11828
|
-
onDownload && /* @__PURE__ */ (0,
|
|
11829
|
-
onRemove && /* @__PURE__ */ (0,
|
|
11830
|
-
actions && /* @__PURE__ */ (0,
|
|
11915
|
+
(onDownload || onRemove || actions) && /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
11916
|
+
onDownload && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Tooltip, { title: downloadLabel, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(IconButton, { variant: "subtle", size: "sm", "aria-label": `${downloadLabel} ${name}`, onClick: onDownload, className: "touch-hit", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react31.DownloadIcon, { "aria-hidden": true }) }) }),
|
|
11917
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Tooltip, { title: removeLabel, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(IconButton, { variant: "subtle", size: "sm", "aria-label": `${removeLabel} ${name}`, onClick: onRemove, className: "touch-hit", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react31.Trash2Icon, { "aria-hidden": true }) }) }),
|
|
11918
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "ml-2 flex items-center gap-2", children: actions })
|
|
11831
11919
|
] })
|
|
11832
11920
|
]
|
|
11833
11921
|
}
|
|
@@ -11836,7 +11924,7 @@ function FileRow({
|
|
|
11836
11924
|
|
|
11837
11925
|
// src/components/lists/scored-row.tsx
|
|
11838
11926
|
var import_clsx85 = __toESM(require("clsx"), 1);
|
|
11839
|
-
var
|
|
11927
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
11840
11928
|
var GAP5 = {
|
|
11841
11929
|
sm: "gap-2",
|
|
11842
11930
|
md: "gap-3",
|
|
@@ -11863,8 +11951,8 @@ function ScoredRow({
|
|
|
11863
11951
|
align = "center",
|
|
11864
11952
|
className
|
|
11865
11953
|
}) {
|
|
11866
|
-
return /* @__PURE__ */ (0,
|
|
11867
|
-
/* @__PURE__ */ (0,
|
|
11954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: (0, import_clsx85.default)("flex w-full", ALIGN3[align], GAP5[gap], className), children: [
|
|
11955
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
11868
11956
|
"div",
|
|
11869
11957
|
{
|
|
11870
11958
|
className: (0, import_clsx85.default)(
|
|
@@ -11876,14 +11964,14 @@ function ScoredRow({
|
|
|
11876
11964
|
style: titleWidth ? { width: titleWidth } : void 0,
|
|
11877
11965
|
children: [
|
|
11878
11966
|
leading,
|
|
11879
|
-
/* @__PURE__ */ (0,
|
|
11880
|
-
/* @__PURE__ */ (0,
|
|
11881
|
-
subtitle && /* @__PURE__ */ (0,
|
|
11967
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
11968
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("p", { className: "truncate text-body-sm font-medium leading-none text-default", children: title }),
|
|
11969
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("p", { className: "mt-0.5 truncate text-body-xs text-default-secondary", children: subtitle })
|
|
11882
11970
|
] })
|
|
11883
11971
|
]
|
|
11884
11972
|
}
|
|
11885
11973
|
),
|
|
11886
|
-
aside && /* @__PURE__ */ (0,
|
|
11974
|
+
aside && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11887
11975
|
"div",
|
|
11888
11976
|
{
|
|
11889
11977
|
className: (0, import_clsx85.default)("min-w-0", asideWidth ? "shrink-0" : "flex-1"),
|
|
@@ -11891,7 +11979,7 @@ function ScoredRow({
|
|
|
11891
11979
|
children: aside
|
|
11892
11980
|
}
|
|
11893
11981
|
),
|
|
11894
|
-
meter && /* @__PURE__ */ (0,
|
|
11982
|
+
meter && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11895
11983
|
"div",
|
|
11896
11984
|
{
|
|
11897
11985
|
className: (0, import_clsx85.default)("min-w-0", meterWidth ? "shrink-0" : "flex-1"),
|
|
@@ -11899,7 +11987,7 @@ function ScoredRow({
|
|
|
11899
11987
|
children: meter
|
|
11900
11988
|
}
|
|
11901
11989
|
),
|
|
11902
|
-
trailing && /* @__PURE__ */ (0,
|
|
11990
|
+
trailing && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "shrink-0 text-right", style: trailingWidth ? { width: trailingWidth } : void 0, children: trailing })
|
|
11903
11991
|
] });
|
|
11904
11992
|
}
|
|
11905
11993
|
|
|
@@ -11908,7 +11996,7 @@ var import_clsx86 = __toESM(require("clsx"), 1);
|
|
|
11908
11996
|
|
|
11909
11997
|
// src/components/feedback/progress-bar.tsx
|
|
11910
11998
|
var import_react76 = require("react");
|
|
11911
|
-
var
|
|
11999
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
11912
12000
|
var SIZE18 = {
|
|
11913
12001
|
xs: "h-1",
|
|
11914
12002
|
sm: "h-1.5",
|
|
@@ -11938,7 +12026,7 @@ function ProgressBar({
|
|
|
11938
12026
|
const rounded = radius ? void 0 : "rounded-full";
|
|
11939
12027
|
const labelId = (0, import_react76.useId)();
|
|
11940
12028
|
const filledSegments = segments ? Math.round(clamped / 100 * segments) : 0;
|
|
11941
|
-
const track = segments ? /* @__PURE__ */ (0,
|
|
12029
|
+
const track = segments ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11942
12030
|
"div",
|
|
11943
12031
|
{
|
|
11944
12032
|
role: "progressbar",
|
|
@@ -11950,7 +12038,7 @@ function ProgressBar({
|
|
|
11950
12038
|
"aria-label": label ? void 0 : ariaLabel,
|
|
11951
12039
|
"data-tone": tone,
|
|
11952
12040
|
className: cn("flex w-full gap-1", className),
|
|
11953
|
-
children: Array.from({ length: segments }, (_, index) => /* @__PURE__ */ (0,
|
|
12041
|
+
children: Array.from({ length: segments }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11954
12042
|
"span",
|
|
11955
12043
|
{
|
|
11956
12044
|
"data-filled": index < filledSegments || void 0,
|
|
@@ -11960,7 +12048,7 @@ function ProgressBar({
|
|
|
11960
12048
|
index
|
|
11961
12049
|
))
|
|
11962
12050
|
}
|
|
11963
|
-
) : /* @__PURE__ */ (0,
|
|
12051
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11964
12052
|
"div",
|
|
11965
12053
|
{
|
|
11966
12054
|
role: "progressbar",
|
|
@@ -11973,7 +12061,7 @@ function ProgressBar({
|
|
|
11973
12061
|
"aria-label": label ? void 0 : ariaLabel,
|
|
11974
12062
|
className: cn("w-full overflow-hidden bg-default-tertiary", SIZE18[size2], rounded, className),
|
|
11975
12063
|
style: radius ? { borderRadius: radius } : void 0,
|
|
11976
|
-
children: /* @__PURE__ */ (0,
|
|
12064
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11977
12065
|
"div",
|
|
11978
12066
|
{
|
|
11979
12067
|
className: cn("h-full transition-all motion-reduce:transition-none", rounded, FILL[tone]),
|
|
@@ -11983,10 +12071,10 @@ function ProgressBar({
|
|
|
11983
12071
|
}
|
|
11984
12072
|
);
|
|
11985
12073
|
if (!label && !showValue) return track;
|
|
11986
|
-
return /* @__PURE__ */ (0,
|
|
11987
|
-
/* @__PURE__ */ (0,
|
|
11988
|
-
label && /* @__PURE__ */ (0,
|
|
11989
|
-
showValue && /* @__PURE__ */ (0,
|
|
12074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { children: [
|
|
12075
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: "mb-1.5 flex items-center justify-between gap-2", children: [
|
|
12076
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { id: labelId, className: "text-body-xs text-default-secondary", children: label }),
|
|
12077
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("span", { className: "ml-auto text-body-xs font-medium tabular-nums text-default", children: [
|
|
11990
12078
|
Math.round(clamped),
|
|
11991
12079
|
"%"
|
|
11992
12080
|
] })
|
|
@@ -11996,7 +12084,7 @@ function ProgressBar({
|
|
|
11996
12084
|
}
|
|
11997
12085
|
|
|
11998
12086
|
// src/components/lists/numbered-list.tsx
|
|
11999
|
-
var
|
|
12087
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
12000
12088
|
var GAP6 = {
|
|
12001
12089
|
sm: "gap-2",
|
|
12002
12090
|
md: "gap-3"
|
|
@@ -12010,18 +12098,18 @@ function NumberedList({
|
|
|
12010
12098
|
gap = "md",
|
|
12011
12099
|
className
|
|
12012
12100
|
}) {
|
|
12013
|
-
return /* @__PURE__ */ (0,
|
|
12101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("ol", { className: (0, import_clsx86.default)("flex list-none flex-col p-0", GAP6[gap], className), children: items.map((item, index) => {
|
|
12014
12102
|
const tone = !item.tone || item.tone === "auto" ? getScoreTone(item.score, { direction }) : item.tone;
|
|
12015
|
-
return /* @__PURE__ */ (0,
|
|
12016
|
-
/* @__PURE__ */ (0,
|
|
12017
|
-
/* @__PURE__ */ (0,
|
|
12018
|
-
/* @__PURE__ */ (0,
|
|
12019
|
-
/* @__PURE__ */ (0,
|
|
12020
|
-
/* @__PURE__ */ (0,
|
|
12021
|
-
item.subtitle && /* @__PURE__ */ (0,
|
|
12103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("li", { className: "flex w-full shrink-0 flex-col gap-1.5", children: [
|
|
12104
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
|
|
12105
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "flex min-w-0 items-center gap-2.5", children: [
|
|
12106
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "w-[14px] shrink-0 text-body-xs font-bold text-default-secondary", children: startAt + index }),
|
|
12107
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "flex min-w-0 flex-col gap-px", children: [
|
|
12108
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "truncate text-body-sm font-medium leading-none text-default", children: item.title }),
|
|
12109
|
+
item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "text-body-tiny text-default-tertiary", children: item.subtitle })
|
|
12022
12110
|
] })
|
|
12023
12111
|
] }),
|
|
12024
|
-
/* @__PURE__ */ (0,
|
|
12112
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
12025
12113
|
ScoreValue,
|
|
12026
12114
|
{
|
|
12027
12115
|
value: item.score,
|
|
@@ -12032,20 +12120,20 @@ function NumberedList({
|
|
|
12032
12120
|
}
|
|
12033
12121
|
)
|
|
12034
12122
|
] }),
|
|
12035
|
-
/* @__PURE__ */ (0,
|
|
12123
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(ProgressBar, { value: item.score, tone, "aria-label": `${item.title} score` })
|
|
12036
12124
|
] }, `${item.title}-${index}`);
|
|
12037
12125
|
}) });
|
|
12038
12126
|
}
|
|
12039
12127
|
|
|
12040
12128
|
// src/components/lists/icon-text-row.tsx
|
|
12041
12129
|
var import_clsx87 = __toESM(require("clsx"), 1);
|
|
12042
|
-
var
|
|
12130
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
12043
12131
|
function IconTextRow({ icon, title, detail, className }) {
|
|
12044
|
-
return /* @__PURE__ */ (0,
|
|
12045
|
-
/* @__PURE__ */ (0,
|
|
12046
|
-
/* @__PURE__ */ (0,
|
|
12047
|
-
/* @__PURE__ */ (0,
|
|
12048
|
-
/* @__PURE__ */ (0,
|
|
12132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: (0, import_clsx87.default)("flex items-start gap-3", className), children: [
|
|
12133
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { className: "flex size-9 shrink-0 items-center justify-center rounded-full bg-brand-tertiary text-brand", children: icon }),
|
|
12134
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: "min-w-0", children: [
|
|
12135
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { className: "text-body-sm font-semibold text-default", children: title }),
|
|
12136
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: detail })
|
|
12049
12137
|
] })
|
|
12050
12138
|
] });
|
|
12051
12139
|
}
|
|
@@ -12053,10 +12141,10 @@ function IconTextRow({ icon, title, detail, className }) {
|
|
|
12053
12141
|
// src/components/lists/checklist-row.tsx
|
|
12054
12142
|
var import_clsx88 = __toESM(require("clsx"), 1);
|
|
12055
12143
|
var import_lucide_react32 = require("lucide-react");
|
|
12056
|
-
var
|
|
12144
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
12057
12145
|
function ChecklistRow({ label, state, className }) {
|
|
12058
|
-
return /* @__PURE__ */ (0,
|
|
12059
|
-
/* @__PURE__ */ (0,
|
|
12146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("li", { "data-state": state, className: (0, import_clsx88.default)("flex items-center gap-3", className), children: [
|
|
12147
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { className: "flex size-5 shrink-0 items-center justify-center", children: state === "done" ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_lucide_react32.CheckIcon, { className: "size-4 text-positive", strokeWidth: 2.5, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
12060
12148
|
"span",
|
|
12061
12149
|
{
|
|
12062
12150
|
className: (0, import_clsx88.default)(
|
|
@@ -12065,7 +12153,7 @@ function ChecklistRow({ label, state, className }) {
|
|
|
12065
12153
|
)
|
|
12066
12154
|
}
|
|
12067
12155
|
) }),
|
|
12068
|
-
/* @__PURE__ */ (0,
|
|
12156
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
12069
12157
|
"span",
|
|
12070
12158
|
{
|
|
12071
12159
|
className: (0, import_clsx88.default)(
|
|
@@ -12080,21 +12168,21 @@ function ChecklistRow({ label, state, className }) {
|
|
|
12080
12168
|
|
|
12081
12169
|
// src/components/lists/steps-list.tsx
|
|
12082
12170
|
var import_clsx89 = __toESM(require("clsx"), 1);
|
|
12083
|
-
var
|
|
12171
|
+
var import_jsx_runtime113 = (
|
|
12084
12172
|
// `text-[12px]` was off the type scale; 12 sits midway between Scale 01 (11) and
|
|
12085
12173
|
// Scale 02 (13), so it rounds up to 13 like every other snap in this pass.
|
|
12086
12174
|
require("react/jsx-runtime")
|
|
12087
12175
|
);
|
|
12088
12176
|
function StepsList({ steps, className }) {
|
|
12089
|
-
return /* @__PURE__ */ (0,
|
|
12090
|
-
/* @__PURE__ */ (0,
|
|
12177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("ol", { className: (0, import_clsx89.default)("flex flex-col gap-1.5", className), children: steps.map((step, i) => /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("li", { className: "flex items-start gap-2 text-body-xs text-default", children: [
|
|
12178
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("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 }),
|
|
12091
12179
|
step
|
|
12092
12180
|
] }, i)) });
|
|
12093
12181
|
}
|
|
12094
12182
|
|
|
12095
12183
|
// src/components/lists/detail-item.tsx
|
|
12096
12184
|
var import_clsx90 = __toESM(require("clsx"), 1);
|
|
12097
|
-
var
|
|
12185
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
12098
12186
|
var SPAN = {
|
|
12099
12187
|
1: "",
|
|
12100
12188
|
2: "sm:col-span-2",
|
|
@@ -12111,18 +12199,18 @@ function DetailItem({
|
|
|
12111
12199
|
}) {
|
|
12112
12200
|
const shown = value === null || value === void 0 || value === "" ? "\u2014" : value;
|
|
12113
12201
|
if (layout === "inline") {
|
|
12114
|
-
return /* @__PURE__ */ (0,
|
|
12115
|
-
/* @__PURE__ */ (0,
|
|
12116
|
-
/* @__PURE__ */ (0,
|
|
12117
|
-
/* @__PURE__ */ (0,
|
|
12118
|
-
detail && /* @__PURE__ */ (0,
|
|
12202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { className: (0, import_clsx90.default)("flex gap-3 text-body-xs", SPAN[span], className), children: [
|
|
12203
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { className: (0, import_clsx90.default)("shrink-0 text-default-secondary", labelWidth), children: label }),
|
|
12204
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5 [overflow-wrap:anywhere]", children: [
|
|
12205
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { className: "text-default", children: shown }),
|
|
12206
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { className: "text-default-secondary", children: detail })
|
|
12119
12207
|
] })
|
|
12120
12208
|
] });
|
|
12121
12209
|
}
|
|
12122
|
-
return /* @__PURE__ */ (0,
|
|
12123
|
-
/* @__PURE__ */ (0,
|
|
12124
|
-
/* @__PURE__ */ (0,
|
|
12125
|
-
detail && /* @__PURE__ */ (0,
|
|
12210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { className: (0, import_clsx90.default)("flex min-w-0 flex-col gap-0.5", SPAN[span], className), children: [
|
|
12211
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("p", { className: "text-body-tiny font-medium text-default-secondary", children: label }),
|
|
12212
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("p", { className: "text-body-sm font-medium text-default [overflow-wrap:anywhere]", children: shown }),
|
|
12213
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("p", { className: "text-body-xs text-default-secondary [overflow-wrap:anywhere]", children: detail })
|
|
12126
12214
|
] });
|
|
12127
12215
|
}
|
|
12128
12216
|
var COLUMNS3 = {
|
|
@@ -12133,24 +12221,24 @@ var COLUMNS3 = {
|
|
|
12133
12221
|
4: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4"
|
|
12134
12222
|
};
|
|
12135
12223
|
function DetailGrid({ children, columns = "auto", className }) {
|
|
12136
|
-
return /* @__PURE__ */ (0,
|
|
12224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: (0, import_clsx90.default)("grid gap-x-4 gap-y-4", COLUMNS3[columns], className), children });
|
|
12137
12225
|
}
|
|
12138
12226
|
|
|
12139
12227
|
// src/components/lists/description-list.tsx
|
|
12140
12228
|
var import_react77 = require("react");
|
|
12141
12229
|
var import_clsx91 = __toESM(require("clsx"), 1);
|
|
12142
12230
|
var import_lucide_react33 = require("lucide-react");
|
|
12143
|
-
var
|
|
12231
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
12144
12232
|
function DescriptionList({ children, className }) {
|
|
12145
|
-
return /* @__PURE__ */ (0,
|
|
12233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("dl", { className: cn("flex flex-col gap-3", className), children });
|
|
12146
12234
|
}
|
|
12147
12235
|
function DescriptionItem({ label, value, copyValue, className }) {
|
|
12148
12236
|
const shown = value === null || value === void 0 || value === "" ? "\u2014" : value;
|
|
12149
|
-
return /* @__PURE__ */ (0,
|
|
12150
|
-
/* @__PURE__ */ (0,
|
|
12151
|
-
/* @__PURE__ */ (0,
|
|
12152
|
-
/* @__PURE__ */ (0,
|
|
12153
|
-
copyValue && /* @__PURE__ */ (0,
|
|
12237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: cn("flex flex-wrap items-start gap-x-4 gap-y-0.5 text-body-xs", className), children: [
|
|
12238
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("dt", { className: "shrink-0 grow-0 basis-28 text-default-secondary", children: label }),
|
|
12239
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("dd", { className: "flex min-w-0 flex-[1_1_10rem] items-start gap-1.5 text-default", children: [
|
|
12240
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { className: "min-w-0 [overflow-wrap:anywhere]", children: shown }),
|
|
12241
|
+
copyValue && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(CopyButton, { value: copyValue, label: `Copy ${label.toLowerCase()}` })
|
|
12154
12242
|
] })
|
|
12155
12243
|
] });
|
|
12156
12244
|
}
|
|
@@ -12163,8 +12251,8 @@ function CopyButton({ value, label, copiedLabel = "Copied", className }) {
|
|
|
12163
12251
|
}, [copied]);
|
|
12164
12252
|
return (
|
|
12165
12253
|
// relative: keeps the sr-only status (absolutely positioned) inside a scrolling container.
|
|
12166
|
-
/* @__PURE__ */ (0,
|
|
12167
|
-
/* @__PURE__ */ (0,
|
|
12254
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("span", { className: "relative inline-flex", children: [
|
|
12255
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
12168
12256
|
IconButton,
|
|
12169
12257
|
{
|
|
12170
12258
|
variant: "subtle",
|
|
@@ -12178,10 +12266,10 @@ function CopyButton({ value, label, copiedLabel = "Copied", className }) {
|
|
|
12178
12266
|
() => void 0
|
|
12179
12267
|
);
|
|
12180
12268
|
},
|
|
12181
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
12269
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_lucide_react33.CheckIcon, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_lucide_react33.CopyIcon, { "aria-hidden": true })
|
|
12182
12270
|
}
|
|
12183
12271
|
),
|
|
12184
|
-
/* @__PURE__ */ (0,
|
|
12272
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { role: "status", className: "sr-only", children: copied ? copiedLabel : "" })
|
|
12185
12273
|
] })
|
|
12186
12274
|
);
|
|
12187
12275
|
}
|
|
@@ -12189,16 +12277,16 @@ function EmailText({ email, className }) {
|
|
|
12189
12277
|
const at = email.lastIndexOf("@");
|
|
12190
12278
|
const local = at > 0 ? email.slice(0, at) : email;
|
|
12191
12279
|
const domain = at > 0 ? email.slice(at) : "";
|
|
12192
|
-
return /* @__PURE__ */ (0,
|
|
12193
|
-
/* @__PURE__ */ (0,
|
|
12194
|
-
domain && /* @__PURE__ */ (0,
|
|
12280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("span", { title: email, "data-slot": "email-text", className: (0, import_clsx91.default)("flex min-w-0 max-w-full", className), children: [
|
|
12281
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap", children: local }),
|
|
12282
|
+
domain && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { className: "min-w-0 overflow-hidden text-ellipsis whitespace-nowrap [flex-shrink:0.001]", children: domain })
|
|
12195
12283
|
] });
|
|
12196
12284
|
}
|
|
12197
12285
|
|
|
12198
12286
|
// src/components/lists/checked-group-list.tsx
|
|
12199
12287
|
var import_clsx92 = __toESM(require("clsx"), 1);
|
|
12200
12288
|
var import_lucide_react34 = require("lucide-react");
|
|
12201
|
-
var
|
|
12289
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
12202
12290
|
var COLUMNS4 = {
|
|
12203
12291
|
1: "columns-1",
|
|
12204
12292
|
2: "columns-2",
|
|
@@ -12212,13 +12300,13 @@ function CheckedGroupList({
|
|
|
12212
12300
|
className
|
|
12213
12301
|
}) {
|
|
12214
12302
|
if (groups.length === 0) {
|
|
12215
|
-
return /* @__PURE__ */ (0,
|
|
12303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("p", { className: (0, import_clsx92.default)("text-body-xs text-default-secondary", className), children: emptyLabel });
|
|
12216
12304
|
}
|
|
12217
|
-
const glyph = icon === void 0 ? /* @__PURE__ */ (0,
|
|
12218
|
-
return /* @__PURE__ */ (0,
|
|
12219
|
-
/* @__PURE__ */ (0,
|
|
12220
|
-
/* @__PURE__ */ (0,
|
|
12221
|
-
glyph && /* @__PURE__ */ (0,
|
|
12305
|
+
const glyph = icon === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react34.CheckIcon, { className: "size-3.5", strokeWidth: 2.5, "aria-hidden": true }) : icon;
|
|
12306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: (0, import_clsx92.default)(COLUMNS4[columns], "gap-x-6", className), children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "mb-5 break-inside-avoid last:mb-0", children: [
|
|
12307
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("p", { className: "mb-2 text-body-tiny font-semibold uppercase tracking-wide text-default-secondary", children: group.label }),
|
|
12308
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("ul", { className: "space-y-1.5", children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("li", { className: "flex items-center gap-2 text-body-xs text-default", children: [
|
|
12309
|
+
glyph && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "shrink-0", children: glyph }),
|
|
12222
12310
|
item
|
|
12223
12311
|
] }, item)) })
|
|
12224
12312
|
] }, group.label)) });
|
|
@@ -12228,7 +12316,7 @@ function CheckedGroupList({
|
|
|
12228
12316
|
var import_react78 = require("react");
|
|
12229
12317
|
var import_clsx93 = __toESM(require("clsx"), 1);
|
|
12230
12318
|
var import_lucide_react35 = require("lucide-react");
|
|
12231
|
-
var
|
|
12319
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
12232
12320
|
var ROW = {
|
|
12233
12321
|
sm: "min-h-8 py-1 text-body-xs",
|
|
12234
12322
|
md: "min-h-10 py-2 text-body-sm"
|
|
@@ -12332,7 +12420,7 @@ function TreeView({
|
|
|
12332
12420
|
if (!node) return null;
|
|
12333
12421
|
const children = getChildren?.(item) ?? [];
|
|
12334
12422
|
const isSelected = selected === id;
|
|
12335
|
-
return /* @__PURE__ */ (0,
|
|
12423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
12336
12424
|
"li",
|
|
12337
12425
|
{
|
|
12338
12426
|
role: "treeitem",
|
|
@@ -12354,7 +12442,7 @@ function TreeView({
|
|
|
12354
12442
|
},
|
|
12355
12443
|
className: "outline-none [&:focus-visible>div]:ring-2 [&:focus-visible>div]:ring-inset [&:focus-visible>div]:ring-brand",
|
|
12356
12444
|
children: [
|
|
12357
|
-
/* @__PURE__ */ (0,
|
|
12445
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
12358
12446
|
"div",
|
|
12359
12447
|
{
|
|
12360
12448
|
onClick: () => {
|
|
@@ -12372,7 +12460,7 @@ function TreeView({
|
|
|
12372
12460
|
// Not a button: the treeitem is the one tab stop, and Left/Right already toggle.
|
|
12373
12461
|
// A pointer user still needs a target that toggles without selecting.
|
|
12374
12462
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
12375
|
-
/* @__PURE__ */ (0,
|
|
12463
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
12376
12464
|
"span",
|
|
12377
12465
|
{
|
|
12378
12466
|
"aria-hidden": true,
|
|
@@ -12383,11 +12471,11 @@ function TreeView({
|
|
|
12383
12471
|
focus(id);
|
|
12384
12472
|
},
|
|
12385
12473
|
className: "flex size-5 shrink-0 items-center justify-center rounded text-icon-default-secondary hover:bg-default-tertiary",
|
|
12386
|
-
children: /* @__PURE__ */ (0,
|
|
12474
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_lucide_react35.ChevronRightIcon, { className: (0, import_clsx93.default)("size-3.5 transition-transform motion-reduce:transition-none", node.expanded && "rotate-90") })
|
|
12387
12475
|
}
|
|
12388
12476
|
)
|
|
12389
|
-
) : /* @__PURE__ */ (0,
|
|
12390
|
-
/* @__PURE__ */ (0,
|
|
12477
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("span", { "aria-hidden": true, className: "size-5 shrink-0" }),
|
|
12478
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "min-w-0 flex-1", children: renderItem(item, {
|
|
12391
12479
|
level,
|
|
12392
12480
|
hasChildren: node.hasChildren,
|
|
12393
12481
|
expanded: node.expanded,
|
|
@@ -12396,20 +12484,20 @@ function TreeView({
|
|
|
12396
12484
|
]
|
|
12397
12485
|
}
|
|
12398
12486
|
),
|
|
12399
|
-
node.expanded && /* @__PURE__ */ (0,
|
|
12487
|
+
node.expanded && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("ul", { role: "group", className: "m-0 list-none p-0", children: renderLevel(children, level + 1) })
|
|
12400
12488
|
]
|
|
12401
12489
|
},
|
|
12402
12490
|
id
|
|
12403
12491
|
);
|
|
12404
12492
|
});
|
|
12405
|
-
return /* @__PURE__ */ (0,
|
|
12493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("ul", { role: "tree", "aria-label": label, className: (0, import_clsx93.default)("m-0 flex list-none flex-col p-0", className), children: renderLevel(items, 1) });
|
|
12406
12494
|
}
|
|
12407
12495
|
|
|
12408
12496
|
// src/components/lists/table.tsx
|
|
12409
12497
|
var import_react79 = require("react");
|
|
12410
12498
|
var import_clsx94 = __toESM(require("clsx"), 1);
|
|
12411
12499
|
var import_lucide_react36 = require("lucide-react");
|
|
12412
|
-
var
|
|
12500
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
12413
12501
|
var Table = (0, import_react79.forwardRef)(function Table2({ label, density = "default", fixed = false, maxHeight, className, children, ...rest }, ref) {
|
|
12414
12502
|
return (
|
|
12415
12503
|
// The scroll container is separate from the table so the header stays inside the
|
|
@@ -12417,7 +12505,7 @@ var Table = (0, import_react79.forwardRef)(function Table2({ label, density = "d
|
|
|
12417
12505
|
// header.
|
|
12418
12506
|
// The scroll wrapper is required for a <table>, which cannot itself scroll, so this
|
|
12419
12507
|
// takes the scrollbar styling rather than ScrollArea.
|
|
12420
|
-
/* @__PURE__ */ (0,
|
|
12508
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12421
12509
|
"div",
|
|
12422
12510
|
{
|
|
12423
12511
|
className: (0, import_clsx94.default)(
|
|
@@ -12427,7 +12515,7 @@ var Table = (0, import_react79.forwardRef)(function Table2({ label, density = "d
|
|
|
12427
12515
|
),
|
|
12428
12516
|
style: maxHeight ? { maxHeight } : void 0,
|
|
12429
12517
|
...maxHeight ? { role: "region", tabIndex: 0, "aria-label": label ? `${label} (scrolls)` : "Table (scrolls)" } : {},
|
|
12430
|
-
children: /* @__PURE__ */ (0,
|
|
12518
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12431
12519
|
"table",
|
|
12432
12520
|
{
|
|
12433
12521
|
ref,
|
|
@@ -12445,7 +12533,7 @@ var Table = (0, import_react79.forwardRef)(function Table2({ label, density = "d
|
|
|
12445
12533
|
});
|
|
12446
12534
|
var TableCaption = (0, import_react79.forwardRef)(
|
|
12447
12535
|
function TableCaption2({ className, ...rest }, ref) {
|
|
12448
|
-
return /* @__PURE__ */ (0,
|
|
12536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12449
12537
|
"caption",
|
|
12450
12538
|
{
|
|
12451
12539
|
ref,
|
|
@@ -12457,17 +12545,17 @@ var TableCaption = (0, import_react79.forwardRef)(
|
|
|
12457
12545
|
);
|
|
12458
12546
|
var TableHeader = (0, import_react79.forwardRef)(
|
|
12459
12547
|
function TableHeader2({ className, ...rest }, ref) {
|
|
12460
|
-
return /* @__PURE__ */ (0,
|
|
12548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("thead", { ref, className: cn("border-b border-default", className), ...rest });
|
|
12461
12549
|
}
|
|
12462
12550
|
);
|
|
12463
12551
|
var TableBody = (0, import_react79.forwardRef)(
|
|
12464
12552
|
function TableBody2({ className, ...rest }, ref) {
|
|
12465
|
-
return /* @__PURE__ */ (0,
|
|
12553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("tbody", { ref, className, ...rest });
|
|
12466
12554
|
}
|
|
12467
12555
|
);
|
|
12468
12556
|
var TableFooter = (0, import_react79.forwardRef)(
|
|
12469
12557
|
function TableFooter2({ className, ...rest }, ref) {
|
|
12470
|
-
return /* @__PURE__ */ (0,
|
|
12558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12471
12559
|
"tfoot",
|
|
12472
12560
|
{
|
|
12473
12561
|
ref,
|
|
@@ -12485,7 +12573,7 @@ var ROW_TONE = (0, import_clsx94.default)(
|
|
|
12485
12573
|
"data-[tone=danger]:bg-danger-tertiary"
|
|
12486
12574
|
);
|
|
12487
12575
|
var TableRow = (0, import_react79.forwardRef)(function TableRow2({ selected, tone = "default", dimmed = false, className, ...rest }, ref) {
|
|
12488
|
-
return /* @__PURE__ */ (0,
|
|
12576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12489
12577
|
"tr",
|
|
12490
12578
|
{
|
|
12491
12579
|
ref,
|
|
@@ -12508,7 +12596,7 @@ var TableRow = (0, import_react79.forwardRef)(function TableRow2({ selected, ton
|
|
|
12508
12596
|
var ALIGN4 = { left: "text-left", center: "text-center", right: "text-right" };
|
|
12509
12597
|
var TableHead = (0, import_react79.forwardRef)(function TableHead2({ sort, onSort, align = "left", sticky = false, className, children, ...rest }, ref) {
|
|
12510
12598
|
const sortable = sort !== void 0 && onSort !== void 0;
|
|
12511
|
-
return /* @__PURE__ */ (0,
|
|
12599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12512
12600
|
"th",
|
|
12513
12601
|
{
|
|
12514
12602
|
ref,
|
|
@@ -12521,7 +12609,7 @@ var TableHead = (0, import_react79.forwardRef)(function TableHead2({ sort, onSor
|
|
|
12521
12609
|
className
|
|
12522
12610
|
),
|
|
12523
12611
|
...rest,
|
|
12524
|
-
children: sortable ? /* @__PURE__ */ (0,
|
|
12612
|
+
children: sortable ? /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
12525
12613
|
"button",
|
|
12526
12614
|
{
|
|
12527
12615
|
type: "button",
|
|
@@ -12532,7 +12620,7 @@ var TableHead = (0, import_react79.forwardRef)(function TableHead2({ sort, onSor
|
|
|
12532
12620
|
),
|
|
12533
12621
|
children: [
|
|
12534
12622
|
children,
|
|
12535
|
-
sort === false ? /* @__PURE__ */ (0,
|
|
12623
|
+
sort === false ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_lucide_react36.ChevronsUpDownIcon, { "aria-hidden": true, className: "size-3.5 opacity-50" }) : sort === "ascending" ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_lucide_react36.ChevronUpIcon, { "aria-hidden": true, className: "size-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_lucide_react36.ChevronDownIcon, { "aria-hidden": true, className: "size-3.5" })
|
|
12536
12624
|
]
|
|
12537
12625
|
}
|
|
12538
12626
|
) : children
|
|
@@ -12541,7 +12629,7 @@ var TableHead = (0, import_react79.forwardRef)(function TableHead2({ sort, onSor
|
|
|
12541
12629
|
});
|
|
12542
12630
|
var TableCell = (0, import_react79.forwardRef)(function TableCell2({ align = "left", density = "default", header = false, className, ...rest }, ref) {
|
|
12543
12631
|
const Tag = header ? "th" : "td";
|
|
12544
|
-
return /* @__PURE__ */ (0,
|
|
12632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12545
12633
|
Tag,
|
|
12546
12634
|
{
|
|
12547
12635
|
ref,
|
|
@@ -12565,7 +12653,7 @@ var import_react_table = require("@tanstack/react-table");
|
|
|
12565
12653
|
|
|
12566
12654
|
// src/components/feedback/empty-state.tsx
|
|
12567
12655
|
var import_clsx95 = __toESM(require("clsx"), 1);
|
|
12568
|
-
var
|
|
12656
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
12569
12657
|
var SIZES = {
|
|
12570
12658
|
sm: "py-8",
|
|
12571
12659
|
md: "py-12",
|
|
@@ -12584,7 +12672,7 @@ function EmptyState({
|
|
|
12584
12672
|
action,
|
|
12585
12673
|
className
|
|
12586
12674
|
}) {
|
|
12587
|
-
return /* @__PURE__ */ (0,
|
|
12675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
12588
12676
|
"div",
|
|
12589
12677
|
{
|
|
12590
12678
|
"data-variant": variant,
|
|
@@ -12596,8 +12684,8 @@ function EmptyState({
|
|
|
12596
12684
|
),
|
|
12597
12685
|
"aria-live": variant === "empty" ? void 0 : "polite",
|
|
12598
12686
|
children: [
|
|
12599
|
-
icon && /* @__PURE__ */ (0,
|
|
12600
|
-
/* @__PURE__ */ (0,
|
|
12687
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { className: "text-default-tertiary", children: icon }),
|
|
12688
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("p", { children: message }),
|
|
12601
12689
|
action
|
|
12602
12690
|
]
|
|
12603
12691
|
}
|
|
@@ -12607,7 +12695,7 @@ function EmptyState({
|
|
|
12607
12695
|
// src/components/feedback/skeleton.tsx
|
|
12608
12696
|
var import_react80 = require("react");
|
|
12609
12697
|
var import_clsx96 = __toESM(require("clsx"), 1);
|
|
12610
|
-
var
|
|
12698
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
12611
12699
|
var SHAPE2 = {
|
|
12612
12700
|
line: "h-4 rounded",
|
|
12613
12701
|
block: "h-full w-full rounded-lg",
|
|
@@ -12615,7 +12703,7 @@ var SHAPE2 = {
|
|
|
12615
12703
|
};
|
|
12616
12704
|
var Skeleton = (0, import_react80.forwardRef)(function Skeleton2({ shape = "line", lines = 1, className, ...rest }, ref) {
|
|
12617
12705
|
if (shape === "line" && lines > 1) {
|
|
12618
|
-
return /* @__PURE__ */ (0,
|
|
12706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { ref, "aria-hidden": true, "data-slot": "skeleton-group", className: "flex flex-col gap-2", ...rest, children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
12619
12707
|
"div",
|
|
12620
12708
|
{
|
|
12621
12709
|
className: (0, import_clsx96.default)(
|
|
@@ -12629,7 +12717,7 @@ var Skeleton = (0, import_react80.forwardRef)(function Skeleton2({ shape = "line
|
|
|
12629
12717
|
index
|
|
12630
12718
|
)) });
|
|
12631
12719
|
}
|
|
12632
|
-
return /* @__PURE__ */ (0,
|
|
12720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
12633
12721
|
"div",
|
|
12634
12722
|
{
|
|
12635
12723
|
ref,
|
|
@@ -12671,7 +12759,7 @@ function cardSlots(columns) {
|
|
|
12671
12759
|
|
|
12672
12760
|
// src/components/lists/data-table-parts.tsx
|
|
12673
12761
|
var import_lucide_react37 = require("lucide-react");
|
|
12674
|
-
var
|
|
12762
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
12675
12763
|
var SELECT_COLUMN_ID = "select";
|
|
12676
12764
|
function columnLabel(column) {
|
|
12677
12765
|
const meta = column.columnDef.meta;
|
|
@@ -12687,11 +12775,11 @@ function DataTableColumnHeader({
|
|
|
12687
12775
|
const text = title ?? columnLabel(column);
|
|
12688
12776
|
const hidden = column.columnDef.meta?.hideHeader;
|
|
12689
12777
|
if (!column.getCanSort()) {
|
|
12690
|
-
return /* @__PURE__ */ (0,
|
|
12778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: cn(hidden ? "sr-only" : "inline-block w-max whitespace-nowrap", className), children: text });
|
|
12691
12779
|
}
|
|
12692
12780
|
const sorted = column.getIsSorted();
|
|
12693
12781
|
const Icon = sorted === "asc" ? import_lucide_react37.ChevronUpIcon : sorted === "desc" ? import_lucide_react37.ChevronDownIcon : import_lucide_react37.ChevronsUpDownIcon;
|
|
12694
|
-
return /* @__PURE__ */ (0,
|
|
12782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
12695
12783
|
"button",
|
|
12696
12784
|
{
|
|
12697
12785
|
type: "button",
|
|
@@ -12705,8 +12793,8 @@ function DataTableColumnHeader({
|
|
|
12705
12793
|
className
|
|
12706
12794
|
),
|
|
12707
12795
|
children: [
|
|
12708
|
-
/* @__PURE__ */ (0,
|
|
12709
|
-
/* @__PURE__ */ (0,
|
|
12796
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: cn(hidden && "sr-only"), children: text }),
|
|
12797
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
12710
12798
|
Icon,
|
|
12711
12799
|
{
|
|
12712
12800
|
"aria-hidden": true,
|
|
@@ -12722,7 +12810,7 @@ function createSelectColumn(options = {}) {
|
|
|
12722
12810
|
const { getRowLabel, selectAllLabel = "Select all rows on this page" } = options;
|
|
12723
12811
|
return {
|
|
12724
12812
|
id: SELECT_COLUMN_ID,
|
|
12725
|
-
header: ({ table }) => /* @__PURE__ */ (0,
|
|
12813
|
+
header: ({ table }) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
12726
12814
|
Checkbox,
|
|
12727
12815
|
{
|
|
12728
12816
|
"aria-label": selectAllLabel,
|
|
@@ -12731,7 +12819,7 @@ function createSelectColumn(options = {}) {
|
|
|
12731
12819
|
onCheckedChange: (checked) => table.toggleAllPageRowsSelected(checked)
|
|
12732
12820
|
}
|
|
12733
12821
|
),
|
|
12734
|
-
cell: ({ row }) => /* @__PURE__ */ (0,
|
|
12822
|
+
cell: ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
12735
12823
|
Checkbox,
|
|
12736
12824
|
{
|
|
12737
12825
|
"aria-label": getRowLabel ? getRowLabel(row.original) : "Select row",
|
|
@@ -12749,11 +12837,11 @@ function createSelectColumn(options = {}) {
|
|
|
12749
12837
|
function DataTableViewOptions({ table, label = "Columns" }) {
|
|
12750
12838
|
const columns = table.getAllLeafColumns().filter((column) => column.getCanHide());
|
|
12751
12839
|
if (columns.length === 0) return null;
|
|
12752
|
-
return /* @__PURE__ */ (0,
|
|
12753
|
-
/* @__PURE__ */ (0,
|
|
12754
|
-
/* @__PURE__ */ (0,
|
|
12755
|
-
/* @__PURE__ */ (0,
|
|
12756
|
-
columns.map((column) => /* @__PURE__ */ (0,
|
|
12840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(DropdownMenu, { children: [
|
|
12841
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Button, { variant: "neutral", size: "md", leadingIcon: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react37.Columns3Icon, { "aria-hidden": true }), children: label }) }),
|
|
12842
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(DropdownMenuContent, { align: "end", children: [
|
|
12843
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(DropdownMenuLabel, { children: "Show columns" }),
|
|
12844
|
+
columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
12757
12845
|
DropdownMenuCheckboxItem,
|
|
12758
12846
|
{
|
|
12759
12847
|
checked: column.getIsVisible(),
|
|
@@ -12771,7 +12859,7 @@ function DataTablePagination({
|
|
|
12771
12859
|
summary
|
|
12772
12860
|
}) {
|
|
12773
12861
|
const { pageIndex, pageSize } = table.getState().pagination;
|
|
12774
|
-
return /* @__PURE__ */ (0,
|
|
12862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
12775
12863
|
PaginationBar,
|
|
12776
12864
|
{
|
|
12777
12865
|
page: pageIndex + 1,
|
|
@@ -12788,7 +12876,7 @@ function DataTablePagination({
|
|
|
12788
12876
|
|
|
12789
12877
|
// src/components/lists/data-table-cells.tsx
|
|
12790
12878
|
var import_clsx97 = __toESM(require("clsx"), 1);
|
|
12791
|
-
var
|
|
12879
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
12792
12880
|
function textFromNode(node) {
|
|
12793
12881
|
if (typeof node === "string") return node;
|
|
12794
12882
|
if (typeof node === "number") return String(node);
|
|
@@ -12799,8 +12887,8 @@ function textFromNode(node) {
|
|
|
12799
12887
|
return void 0;
|
|
12800
12888
|
}
|
|
12801
12889
|
function TableCellLeadText({ primary, secondary, size: size2 = "md", className }) {
|
|
12802
|
-
return /* @__PURE__ */ (0,
|
|
12803
|
-
/* @__PURE__ */ (0,
|
|
12890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { className: (0, import_clsx97.default)("flex min-w-0 flex-col gap-0.5", className), children: [
|
|
12891
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12804
12892
|
"span",
|
|
12805
12893
|
{
|
|
12806
12894
|
title: primary,
|
|
@@ -12811,7 +12899,7 @@ function TableCellLeadText({ primary, secondary, size: size2 = "md", className }
|
|
|
12811
12899
|
children: primary
|
|
12812
12900
|
}
|
|
12813
12901
|
),
|
|
12814
|
-
secondary && (typeof secondary === "string" || typeof secondary === "number" ? /* @__PURE__ */ (0,
|
|
12902
|
+
secondary && (typeof secondary === "string" || typeof secondary === "number" ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12815
12903
|
"span",
|
|
12816
12904
|
{
|
|
12817
12905
|
title: String(secondary),
|
|
@@ -12824,7 +12912,7 @@ function TableCellLeadText({ primary, secondary, size: size2 = "md", className }
|
|
|
12824
12912
|
) : (
|
|
12825
12913
|
// An element brings its own overflow handling, so it gets no `truncate` here,
|
|
12826
12914
|
// which a card layout's touch un-truncation would otherwise turn into wrapping.
|
|
12827
|
-
/* @__PURE__ */ (0,
|
|
12915
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12828
12916
|
"span",
|
|
12829
12917
|
{
|
|
12830
12918
|
className: (0, import_clsx97.default)(
|
|
@@ -12844,7 +12932,7 @@ function TableCellText({
|
|
|
12844
12932
|
truncate = true,
|
|
12845
12933
|
className
|
|
12846
12934
|
}) {
|
|
12847
|
-
return /* @__PURE__ */ (0,
|
|
12935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12848
12936
|
"span",
|
|
12849
12937
|
{
|
|
12850
12938
|
title: truncate ? textFromNode(children) : void 0,
|
|
@@ -12860,7 +12948,7 @@ function TableCellText({
|
|
|
12860
12948
|
);
|
|
12861
12949
|
}
|
|
12862
12950
|
function TableCellBadge({ label, className }) {
|
|
12863
|
-
return /* @__PURE__ */ (0,
|
|
12951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12864
12952
|
"span",
|
|
12865
12953
|
{
|
|
12866
12954
|
title: label,
|
|
@@ -12868,7 +12956,7 @@ function TableCellBadge({ label, className }) {
|
|
|
12868
12956
|
"inline-flex max-w-full items-center rounded-md border border-default bg-default-secondary px-2 py-0.5 text-body-tiny font-medium text-default-secondary",
|
|
12869
12957
|
className
|
|
12870
12958
|
),
|
|
12871
|
-
children: /* @__PURE__ */ (0,
|
|
12959
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("span", { className: "truncate", children: label })
|
|
12872
12960
|
}
|
|
12873
12961
|
);
|
|
12874
12962
|
}
|
|
@@ -12880,8 +12968,8 @@ function TableCellProgress({
|
|
|
12880
12968
|
className
|
|
12881
12969
|
}) {
|
|
12882
12970
|
const clamped = Math.round(Math.min(100, Math.max(0, percent)));
|
|
12883
|
-
return /* @__PURE__ */ (0,
|
|
12884
|
-
/* @__PURE__ */ (0,
|
|
12971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { className: (0, import_clsx97.default)("flex w-full min-w-0 items-center gap-2", className), children: [
|
|
12972
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12885
12973
|
ProgressBar,
|
|
12886
12974
|
{
|
|
12887
12975
|
value: clamped,
|
|
@@ -12891,7 +12979,7 @@ function TableCellProgress({
|
|
|
12891
12979
|
"aria-label": label ?? `${clamped}%`
|
|
12892
12980
|
}
|
|
12893
12981
|
),
|
|
12894
|
-
/* @__PURE__ */ (0,
|
|
12982
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("span", { className: "shrink-0 text-body-tiny leading-none tabular-nums text-default-secondary", children: [
|
|
12895
12983
|
clamped,
|
|
12896
12984
|
"%"
|
|
12897
12985
|
] })
|
|
@@ -12899,7 +12987,7 @@ function TableCellProgress({
|
|
|
12899
12987
|
}
|
|
12900
12988
|
|
|
12901
12989
|
// src/components/lists/data-table.tsx
|
|
12902
|
-
var
|
|
12990
|
+
var import_jsx_runtime123 = (
|
|
12903
12991
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
12904
12992
|
require("react/jsx-runtime")
|
|
12905
12993
|
);
|
|
@@ -12947,7 +13035,7 @@ function useTableState(controlled, initial, onChange) {
|
|
|
12947
13035
|
return [value, set];
|
|
12948
13036
|
}
|
|
12949
13037
|
function CellInteractionGuard({ children }) {
|
|
12950
|
-
return /* @__PURE__ */ (0,
|
|
13038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
12951
13039
|
"div",
|
|
12952
13040
|
{
|
|
12953
13041
|
className: "contents",
|
|
@@ -13020,7 +13108,7 @@ function useScrollEdges() {
|
|
|
13020
13108
|
}
|
|
13021
13109
|
var serverSortedValue = () => void 0;
|
|
13022
13110
|
function defaultRowLink({ children, ...props }) {
|
|
13023
|
-
return /* @__PURE__ */ (0,
|
|
13111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("a", { ...props, children });
|
|
13024
13112
|
}
|
|
13025
13113
|
function DataTable({
|
|
13026
13114
|
columns,
|
|
@@ -13145,16 +13233,16 @@ function DataTable({
|
|
|
13145
13233
|
const filtering = Boolean(globalFilter) || columnFilters.length > 0;
|
|
13146
13234
|
const rows = table.getRowModel().rows;
|
|
13147
13235
|
const isEmpty2 = !loading && !error && rows.length === 0;
|
|
13148
|
-
const placeholder = error ? /* @__PURE__ */ (0,
|
|
13236
|
+
const placeholder = error ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13149
13237
|
EmptyState,
|
|
13150
13238
|
{
|
|
13151
13239
|
message: typeof error === "string" ? error : "Something went wrong loading this data.",
|
|
13152
13240
|
variant: "error",
|
|
13153
13241
|
size: "md",
|
|
13154
|
-
action: onRetry ? /* @__PURE__ */ (0,
|
|
13242
|
+
action: onRetry ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Button, { variant: "neutral", size: "sm", onClick: onRetry, children: "Retry" }) : void 0,
|
|
13155
13243
|
className: "mx-auto max-w-[520px]"
|
|
13156
13244
|
}
|
|
13157
|
-
) : isEmpty2 ? typeof empty === "string" ? /* @__PURE__ */ (0,
|
|
13245
|
+
) : isEmpty2 ? typeof empty === "string" ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(EmptyState, { message: empty, size: "md", className: "mx-auto max-w-[520px]" }) : empty : null;
|
|
13158
13246
|
const resultCount = manual.filtering ? table.getRowCount() : table.getFilteredRowModel().rows.length;
|
|
13159
13247
|
const showToolbar = Boolean(search || toolbar || showColumnMenu);
|
|
13160
13248
|
const showPager = paginated && !error && table.getRowCount() > 0;
|
|
@@ -13176,9 +13264,9 @@ function DataTable({
|
|
|
13176
13264
|
getRowLabel,
|
|
13177
13265
|
maxHeight
|
|
13178
13266
|
};
|
|
13179
|
-
return /* @__PURE__ */ (0,
|
|
13180
|
-
showToolbar && /* @__PURE__ */ (0,
|
|
13181
|
-
search && /* @__PURE__ */ (0,
|
|
13267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { "data-slot": "data-table", className: cn("relative flex flex-col gap-3", className), children: [
|
|
13268
|
+
showToolbar && /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: cn("flex flex-wrap items-center gap-2", !bordered && "px-4 pt-3"), children: [
|
|
13269
|
+
search && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13182
13270
|
SearchInput,
|
|
13183
13271
|
{
|
|
13184
13272
|
size: "md",
|
|
@@ -13191,14 +13279,14 @@ function DataTable({
|
|
|
13191
13279
|
}
|
|
13192
13280
|
),
|
|
13193
13281
|
toolbar,
|
|
13194
|
-
showColumnMenu && /* @__PURE__ */ (0,
|
|
13282
|
+
showColumnMenu && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "ml-auto", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DataTableViewOptions, { table }) })
|
|
13195
13283
|
] }),
|
|
13196
|
-
/* @__PURE__ */ (0,
|
|
13197
|
-
/* @__PURE__ */ (0,
|
|
13198
|
-
mode === "cards" && caption && /* @__PURE__ */ (0,
|
|
13199
|
-
mode === "cards" ? maxHeight ? /* @__PURE__ */ (0,
|
|
13200
|
-
showPager && /* @__PURE__ */ (0,
|
|
13201
|
-
footer && /* @__PURE__ */ (0,
|
|
13284
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("p", { role: "status", "aria-live": "polite", className: "sr-only", children: filtering && !loading ? `${resultCount} ${resultCount === 1 ? "result" : "results"}` : "" }),
|
|
13285
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { ref: wrapRef, className: cn("overflow-hidden bg-default", bordered && "rounded-xl border border-default"), children: [
|
|
13286
|
+
mode === "cards" && caption && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { id: captionId, className: "px-4 pt-3 text-left text-body-sm text-default-secondary", children: caption }),
|
|
13287
|
+
mode === "cards" ? maxHeight ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(CardScroll, { label, maxHeight, children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(CardList, { ...view }) }) : /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(CardList, { ...view }) : /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(TableView, { ...view }),
|
|
13288
|
+
showPager && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "border-t border-default px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DataTablePagination, { table, pageSizeOptions }) }),
|
|
13289
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "border-t border-default px-4 py-3", children: footer })
|
|
13202
13290
|
] })
|
|
13203
13291
|
] });
|
|
13204
13292
|
}
|
|
@@ -13252,8 +13340,8 @@ function TableView({
|
|
|
13252
13340
|
const direction = scroll.overflowing && maxHeight && scroll.overflowingY ? "scrolls" : scroll.overflowing ? "scrolls horizontally" : "scrolls vertically";
|
|
13253
13341
|
const regionLabel = `${label ?? "Table"} (${direction})`;
|
|
13254
13342
|
const pinnedHeader = maxHeight ? (0, import_clsx98.default)("sticky top-0 z-sticky bg-default-secondary", !scroll.atTop && "shadow-[inset_0_-1px_0_var(--color-border-default-default)]") : void 0;
|
|
13255
|
-
return /* @__PURE__ */ (0,
|
|
13256
|
-
/* @__PURE__ */ (0,
|
|
13343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "relative", children: [
|
|
13344
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13257
13345
|
"div",
|
|
13258
13346
|
{
|
|
13259
13347
|
ref: scroll.ref,
|
|
@@ -13265,18 +13353,18 @@ function TableView({
|
|
|
13265
13353
|
),
|
|
13266
13354
|
style: maxHeight ? { maxHeight } : void 0,
|
|
13267
13355
|
...scrolls ? { role: "region", tabIndex: 0, "aria-label": regionLabel } : {},
|
|
13268
|
-
children: /* @__PURE__ */ (0,
|
|
13356
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
13269
13357
|
"table",
|
|
13270
13358
|
{
|
|
13271
13359
|
className: "w-full table-fixed border-collapse text-left",
|
|
13272
13360
|
style: showPlaceholder ? void 0 : { minWidth },
|
|
13273
13361
|
"aria-busy": loading || void 0,
|
|
13274
13362
|
children: [
|
|
13275
|
-
caption ? /* @__PURE__ */ (0,
|
|
13276
|
-
/* @__PURE__ */ (0,
|
|
13363
|
+
caption ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("caption", { className: "px-4 pt-3 text-left text-body-sm text-default-secondary", children: caption }) : label && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("caption", { className: "sr-only", children: label }),
|
|
13364
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("colgroup", { children: columns.map((column) => {
|
|
13277
13365
|
const meta = column.columnDef.meta;
|
|
13278
13366
|
const floor = headers.widths[column.id] ?? 0;
|
|
13279
|
-
return /* @__PURE__ */ (0,
|
|
13367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13280
13368
|
"col",
|
|
13281
13369
|
{
|
|
13282
13370
|
style: meta?.grow || !meta?.width ? void 0 : { width: floor > widthToPx(meta.width) ? floor : meta.width }
|
|
@@ -13284,12 +13372,12 @@ function TableView({
|
|
|
13284
13372
|
column.id
|
|
13285
13373
|
);
|
|
13286
13374
|
}) }),
|
|
13287
|
-
/* @__PURE__ */ (0,
|
|
13375
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("thead", { children: table.getHeaderGroups().map((group) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("tr", { className: "bg-default-secondary", children: group.headers.map((header) => {
|
|
13288
13376
|
const meta = header.column.columnDef.meta;
|
|
13289
13377
|
const sortable = header.column.getCanSort();
|
|
13290
13378
|
const sorted = header.column.getIsSorted();
|
|
13291
13379
|
const definition = header.column.columnDef.header;
|
|
13292
|
-
return /* @__PURE__ */ (0,
|
|
13380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13293
13381
|
"th",
|
|
13294
13382
|
{
|
|
13295
13383
|
scope: "col",
|
|
@@ -13304,12 +13392,12 @@ function TableView({
|
|
|
13304
13392
|
pinnedHeader,
|
|
13305
13393
|
meta?.headerClassName
|
|
13306
13394
|
),
|
|
13307
|
-
children: header.isPlaceholder ? null : typeof definition === "string" || definition === void 0 ? /* @__PURE__ */ (0,
|
|
13395
|
+
children: header.isPlaceholder ? null : typeof definition === "string" || definition === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { ref: meta?.hideHeader ? void 0 : headers.register(header.column.id), className: "inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DataTableColumnHeader, { column: header.column }) }) : (0, import_react_table.flexRender)(definition, header.getContext())
|
|
13308
13396
|
},
|
|
13309
13397
|
header.id
|
|
13310
13398
|
);
|
|
13311
13399
|
}) }, group.id)) }),
|
|
13312
|
-
/* @__PURE__ */ (0,
|
|
13400
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("tbody", { children: loading && !placeholder ? Array.from({ length: loadingRows }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("tr", { className: (0, import_clsx98.default)(index > 0 && "border-t border-default"), children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("td", { className: (0, import_clsx98.default)(d.bodyCell, "align-middle"), children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Skeleton, { className: column.columnDef.meta?.grow ? "w-[70%]" : "w-[55%]" }) }, column.id)) }, `skeleton-${index}`)) : placeholder ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("td", { colSpan: columns.length, className: "px-4", children: placeholder }) }) : table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13313
13401
|
BodyRow,
|
|
13314
13402
|
{
|
|
13315
13403
|
row,
|
|
@@ -13332,8 +13420,8 @@ function TableView({
|
|
|
13332
13420
|
)
|
|
13333
13421
|
}
|
|
13334
13422
|
),
|
|
13335
|
-
scroll.overflowing && !scroll.atStart && !stickyStart && /* @__PURE__ */ (0,
|
|
13336
|
-
scroll.overflowing && !scroll.atEnd && !stickyEnd && /* @__PURE__ */ (0,
|
|
13423
|
+
scroll.overflowing && !scroll.atStart && !stickyStart && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { "aria-hidden": true, className: "pointer-events-none absolute inset-y-0 left-0 w-6 bg-gradient-to-r from-default-secondary to-transparent" }),
|
|
13424
|
+
scroll.overflowing && !scroll.atEnd && !stickyEnd && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("span", { "aria-hidden": true, className: "pointer-events-none absolute inset-y-0 right-0 w-6 bg-gradient-to-l from-default-secondary to-transparent" })
|
|
13337
13425
|
] });
|
|
13338
13426
|
}
|
|
13339
13427
|
function BodyRow({
|
|
@@ -13352,7 +13440,7 @@ function BodyRow({
|
|
|
13352
13440
|
}) {
|
|
13353
13441
|
const d = DENSITY3[density];
|
|
13354
13442
|
const href = getRowHref?.(row.original);
|
|
13355
|
-
return /* @__PURE__ */ (0,
|
|
13443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13356
13444
|
TableRow,
|
|
13357
13445
|
{
|
|
13358
13446
|
selected: row.getIsSelected() || void 0,
|
|
@@ -13377,7 +13465,7 @@ function BodyRow({
|
|
|
13377
13465
|
onRowClick(row.original);
|
|
13378
13466
|
}
|
|
13379
13467
|
} : void 0,
|
|
13380
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0,
|
|
13468
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13381
13469
|
BodyCell,
|
|
13382
13470
|
{
|
|
13383
13471
|
cell,
|
|
@@ -13406,7 +13494,7 @@ function BodyCell({
|
|
|
13406
13494
|
children: content
|
|
13407
13495
|
}, cell.row.original);
|
|
13408
13496
|
}
|
|
13409
|
-
return /* @__PURE__ */ (0,
|
|
13497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13410
13498
|
"td",
|
|
13411
13499
|
{
|
|
13412
13500
|
className: cn(
|
|
@@ -13417,13 +13505,13 @@ function BodyCell({
|
|
|
13417
13505
|
!meta?.interactive && "overflow-hidden",
|
|
13418
13506
|
meta?.cellClassName
|
|
13419
13507
|
),
|
|
13420
|
-
children: meta?.interactive ? /* @__PURE__ */ (0,
|
|
13508
|
+
children: meta?.interactive ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(CellInteractionGuard, { children: content }) : content
|
|
13421
13509
|
}
|
|
13422
13510
|
);
|
|
13423
13511
|
}
|
|
13424
13512
|
function CardScroll({ label, maxHeight, children }) {
|
|
13425
13513
|
const scroll = useScrollEdges();
|
|
13426
|
-
return /* @__PURE__ */ (0,
|
|
13514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13427
13515
|
"div",
|
|
13428
13516
|
{
|
|
13429
13517
|
ref: scroll.ref,
|
|
@@ -13450,12 +13538,12 @@ function CardList({
|
|
|
13450
13538
|
getRowDimmed,
|
|
13451
13539
|
getRowLabel
|
|
13452
13540
|
}) {
|
|
13453
|
-
if (placeholder) return /* @__PURE__ */ (0,
|
|
13541
|
+
if (placeholder) return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "px-4", children: placeholder });
|
|
13454
13542
|
if (loading) {
|
|
13455
|
-
return /* @__PURE__ */ (0,
|
|
13456
|
-
/* @__PURE__ */ (0,
|
|
13457
|
-
/* @__PURE__ */ (0,
|
|
13458
|
-
/* @__PURE__ */ (0,
|
|
13543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("ul", { "aria-label": label, "aria-labelledby": !label && caption ? captionId : void 0, "aria-busy": "true", className: "divide-y divide-default", children: Array.from({ length: loadingRows }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("li", { className: "flex flex-col gap-3 p-4", children: [
|
|
13544
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Skeleton, { className: "w-2/3" }),
|
|
13545
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Skeleton, { className: "w-1/2" }),
|
|
13546
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Skeleton, { className: "w-5/6" })
|
|
13459
13547
|
] }, index)) });
|
|
13460
13548
|
}
|
|
13461
13549
|
const columns = table.getVisibleLeafColumns();
|
|
@@ -13471,7 +13559,7 @@ function CardList({
|
|
|
13471
13559
|
return (
|
|
13472
13560
|
// Card mode un-truncates: on touch there is no hover tooltip, so a clipped value would be
|
|
13473
13561
|
// unreadable. `.truncate` cell renderers wrap here instead.
|
|
13474
|
-
/* @__PURE__ */ (0,
|
|
13562
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13475
13563
|
"ul",
|
|
13476
13564
|
{
|
|
13477
13565
|
"aria-label": label,
|
|
@@ -13486,7 +13574,7 @@ function CardList({
|
|
|
13486
13574
|
const href = getRowHref?.(row.original);
|
|
13487
13575
|
const titleContent = render(slots.title?.id);
|
|
13488
13576
|
const tone = getRowTone?.(row.original);
|
|
13489
|
-
return /* @__PURE__ */ (0,
|
|
13577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
13490
13578
|
"li",
|
|
13491
13579
|
{
|
|
13492
13580
|
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
@@ -13501,9 +13589,9 @@ function CardList({
|
|
|
13501
13589
|
"data-[state=selected]:bg-brand-tertiary"
|
|
13502
13590
|
),
|
|
13503
13591
|
children: [
|
|
13504
|
-
/* @__PURE__ */ (0,
|
|
13505
|
-
selectable && /* @__PURE__ */ (0,
|
|
13506
|
-
/* @__PURE__ */ (0,
|
|
13592
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
13593
|
+
selectable && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "relative z-raised shrink-0 pt-0.5", children: render(SELECT_COLUMN_ID) }),
|
|
13594
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "min-w-0 flex-1", children: href ? renderRowLink({ href, [ROW_LINK_ATTR]: "", className: trigger, children: titleContent }, row.original) : onRowClick ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13507
13595
|
"button",
|
|
13508
13596
|
{
|
|
13509
13597
|
type: "button",
|
|
@@ -13515,12 +13603,12 @@ function CardList({
|
|
|
13515
13603
|
) : titleContent }),
|
|
13516
13604
|
slots.status && // A status pill is `nowrap`, so a long label would spill off the card. Let it
|
|
13517
13605
|
// wrap inside the cap instead.
|
|
13518
|
-
/* @__PURE__ */ (0,
|
|
13519
|
-
slots.actions && /* @__PURE__ */ (0,
|
|
13606
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "flex max-w-[45%] shrink-0 justify-end [&_.whitespace-nowrap]:whitespace-normal", children: render(slots.status.id) }),
|
|
13607
|
+
slots.actions && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "relative z-raised shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(CellInteractionGuard, { children: render(slots.actions.id) }) })
|
|
13520
13608
|
] }),
|
|
13521
|
-
slots.fields.length > 0 && /* @__PURE__ */ (0,
|
|
13522
|
-
/* @__PURE__ */ (0,
|
|
13523
|
-
/* @__PURE__ */ (0,
|
|
13609
|
+
slots.fields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("dl", { className: "grid grid-cols-[repeat(auto-fit,minmax(min(100%,8.5rem),1fr))] gap-x-4 gap-y-2.5", children: slots.fields.map(({ id, column }) => /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: (0, import_clsx98.default)("min-w-0", column.columnDef.meta?.interactive && "relative z-raised"), children: [
|
|
13610
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("dt", { className: "text-body-tiny text-default-secondary", children: columnLabel(column) }),
|
|
13611
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)("dd", { className: "mt-0.5 min-w-0 text-body-xs text-default", children: column.columnDef.meta?.interactive ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(CellInteractionGuard, { children: render(id) }) : render(id) })
|
|
13524
13612
|
] }, id)) })
|
|
13525
13613
|
]
|
|
13526
13614
|
},
|
|
@@ -13538,7 +13626,7 @@ var import_react_table2 = require("@tanstack/react-table");
|
|
|
13538
13626
|
// src/components/feedback/inline-alert.tsx
|
|
13539
13627
|
var import_clsx99 = __toESM(require("clsx"), 1);
|
|
13540
13628
|
var import_lucide_react38 = require("lucide-react");
|
|
13541
|
-
var
|
|
13629
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
13542
13630
|
var toneStyles3 = {
|
|
13543
13631
|
info: "border-brand-tertiary bg-brand-tertiary text-brand",
|
|
13544
13632
|
warning: "border-warning-tertiary bg-warning-tertiary text-warning",
|
|
@@ -13547,15 +13635,15 @@ var toneStyles3 = {
|
|
|
13547
13635
|
neutral: "border-default bg-default text-default-secondary"
|
|
13548
13636
|
};
|
|
13549
13637
|
var toneIcons = {
|
|
13550
|
-
info: /* @__PURE__ */ (0,
|
|
13551
|
-
warning: /* @__PURE__ */ (0,
|
|
13552
|
-
danger: /* @__PURE__ */ (0,
|
|
13553
|
-
positive: /* @__PURE__ */ (0,
|
|
13554
|
-
neutral: /* @__PURE__ */ (0,
|
|
13638
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react38.InfoIcon, { className: "size-4" }),
|
|
13639
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react38.TriangleAlertIcon, { className: "size-4" }),
|
|
13640
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react38.TriangleAlertIcon, { className: "size-4" }),
|
|
13641
|
+
positive: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react38.CircleCheckBigIcon, { className: "size-4" }),
|
|
13642
|
+
neutral: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_lucide_react38.InfoIcon, { className: "size-4 text-icon-default-secondary" })
|
|
13555
13643
|
};
|
|
13556
13644
|
function InlineAlert({ tone, children, icon, role, className }) {
|
|
13557
13645
|
const glyph = icon === void 0 ? toneIcons[tone] : icon;
|
|
13558
|
-
return /* @__PURE__ */ (0,
|
|
13646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
13559
13647
|
"div",
|
|
13560
13648
|
{
|
|
13561
13649
|
"data-tone": tone,
|
|
@@ -13566,8 +13654,8 @@ function InlineAlert({ tone, children, icon, role, className }) {
|
|
|
13566
13654
|
className
|
|
13567
13655
|
),
|
|
13568
13656
|
children: [
|
|
13569
|
-
glyph && /* @__PURE__ */ (0,
|
|
13570
|
-
/* @__PURE__ */ (0,
|
|
13657
|
+
glyph && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { "aria-hidden": true, className: "mt-px shrink-0", children: glyph }),
|
|
13658
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "min-w-0", children })
|
|
13571
13659
|
]
|
|
13572
13660
|
}
|
|
13573
13661
|
);
|
|
@@ -13575,7 +13663,7 @@ function InlineAlert({ tone, children, icon, role, className }) {
|
|
|
13575
13663
|
|
|
13576
13664
|
// src/components/feedback/error-boundary.tsx
|
|
13577
13665
|
var import_react82 = require("react");
|
|
13578
|
-
var
|
|
13666
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
13579
13667
|
var ErrorBoundary = class extends import_react82.Component {
|
|
13580
13668
|
constructor() {
|
|
13581
13669
|
super(...arguments);
|
|
@@ -13595,7 +13683,7 @@ var ErrorBoundary = class extends import_react82.Component {
|
|
|
13595
13683
|
}
|
|
13596
13684
|
render() {
|
|
13597
13685
|
if (!this.state.error) return this.props.children;
|
|
13598
|
-
return this.props.fallback ?? /* @__PURE__ */ (0,
|
|
13686
|
+
return this.props.fallback ?? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
13599
13687
|
"div",
|
|
13600
13688
|
{
|
|
13601
13689
|
role: "status",
|
|
@@ -13611,7 +13699,7 @@ var ErrorBoundary = class extends import_react82.Component {
|
|
|
13611
13699
|
var import_react83 = require("react");
|
|
13612
13700
|
var import_clsx100 = __toESM(require("clsx"), 1);
|
|
13613
13701
|
var import_lucide_react39 = require("lucide-react");
|
|
13614
|
-
var
|
|
13702
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
13615
13703
|
var TONE_STYLES3 = {
|
|
13616
13704
|
info: "border-brand-tertiary bg-brand-tertiary text-default",
|
|
13617
13705
|
positive: "border-positive-tertiary bg-positive-tertiary text-default",
|
|
@@ -13627,11 +13715,11 @@ var TONE_ICON_COLOR = {
|
|
|
13627
13715
|
neutral: "text-icon-default-secondary"
|
|
13628
13716
|
};
|
|
13629
13717
|
var TONE_ICON2 = {
|
|
13630
|
-
info: /* @__PURE__ */ (0,
|
|
13631
|
-
positive: /* @__PURE__ */ (0,
|
|
13632
|
-
warning: /* @__PURE__ */ (0,
|
|
13633
|
-
danger: /* @__PURE__ */ (0,
|
|
13634
|
-
neutral: /* @__PURE__ */ (0,
|
|
13718
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_lucide_react39.InfoIcon, { "aria-hidden": true, className: "size-5" }),
|
|
13719
|
+
positive: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_lucide_react39.CircleCheckBigIcon, { "aria-hidden": true, className: "size-5" }),
|
|
13720
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_lucide_react39.TriangleAlertIcon, { "aria-hidden": true, className: "size-5" }),
|
|
13721
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_lucide_react39.TriangleAlertIcon, { "aria-hidden": true, className: "size-5" }),
|
|
13722
|
+
neutral: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_lucide_react39.InfoIcon, { "aria-hidden": true, className: "size-5" })
|
|
13635
13723
|
};
|
|
13636
13724
|
var Banner = (0, import_react83.forwardRef)(function Banner2({
|
|
13637
13725
|
title,
|
|
@@ -13646,7 +13734,7 @@ var Banner = (0, import_react83.forwardRef)(function Banner2({
|
|
|
13646
13734
|
}, ref) {
|
|
13647
13735
|
const titleId = (0, import_react83.useId)();
|
|
13648
13736
|
const glyph = icon === void 0 ? TONE_ICON2[tone] : icon;
|
|
13649
|
-
return /* @__PURE__ */ (0,
|
|
13737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
13650
13738
|
"div",
|
|
13651
13739
|
{
|
|
13652
13740
|
"data-tone": tone,
|
|
@@ -13662,13 +13750,13 @@ var Banner = (0, import_react83.forwardRef)(function Banner2({
|
|
|
13662
13750
|
),
|
|
13663
13751
|
...rest,
|
|
13664
13752
|
children: [
|
|
13665
|
-
glyph && /* @__PURE__ */ (0,
|
|
13666
|
-
/* @__PURE__ */ (0,
|
|
13667
|
-
/* @__PURE__ */ (0,
|
|
13668
|
-
children && /* @__PURE__ */ (0,
|
|
13669
|
-
action && /* @__PURE__ */ (0,
|
|
13753
|
+
glyph && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { "aria-hidden": true, className: (0, import_clsx100.default)("mt-px shrink-0", TONE_ICON_COLOR[tone]), children: glyph }),
|
|
13754
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
13755
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)("p", { id: titleId, className: "text-body-sm font-semibold text-default", children: title }),
|
|
13756
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "mt-1 text-body-xs text-default-secondary", children }),
|
|
13757
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("div", { className: "mt-3 flex items-center gap-2", children: action })
|
|
13670
13758
|
] }),
|
|
13671
|
-
onDismiss && /* @__PURE__ */ (0,
|
|
13759
|
+
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
13672
13760
|
IconButton,
|
|
13673
13761
|
{
|
|
13674
13762
|
variant: "subtle",
|
|
@@ -13676,7 +13764,7 @@ var Banner = (0, import_react83.forwardRef)(function Banner2({
|
|
|
13676
13764
|
"aria-label": typeof title === "string" ? `Dismiss: ${title}` : "Dismiss",
|
|
13677
13765
|
onClick: onDismiss,
|
|
13678
13766
|
className: "-mr-1 -mt-1 shrink-0",
|
|
13679
|
-
children: /* @__PURE__ */ (0,
|
|
13767
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_lucide_react39.XIcon, { "aria-hidden": true, size: 16 })
|
|
13680
13768
|
}
|
|
13681
13769
|
)
|
|
13682
13770
|
]
|
|
@@ -13688,7 +13776,7 @@ var Banner = (0, import_react83.forwardRef)(function Banner2({
|
|
|
13688
13776
|
var import_react84 = require("react");
|
|
13689
13777
|
var import_clsx101 = __toESM(require("clsx"), 1);
|
|
13690
13778
|
var import_lucide_react40 = require("lucide-react");
|
|
13691
|
-
var
|
|
13779
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
13692
13780
|
var ToastContext = (0, import_react84.createContext)(null);
|
|
13693
13781
|
function useToast() {
|
|
13694
13782
|
const context = (0, import_react84.useContext)(ToastContext);
|
|
@@ -13696,11 +13784,11 @@ function useToast() {
|
|
|
13696
13784
|
return context;
|
|
13697
13785
|
}
|
|
13698
13786
|
var TONE_ICON3 = {
|
|
13699
|
-
info: /* @__PURE__ */ (0,
|
|
13700
|
-
positive: /* @__PURE__ */ (0,
|
|
13701
|
-
warning: /* @__PURE__ */ (0,
|
|
13702
|
-
danger: /* @__PURE__ */ (0,
|
|
13703
|
-
neutral: /* @__PURE__ */ (0,
|
|
13787
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react40.InfoIcon, { "aria-hidden": true, className: "size-4" }),
|
|
13788
|
+
positive: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react40.CircleCheckBigIcon, { "aria-hidden": true, className: "size-4" }),
|
|
13789
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react40.TriangleAlertIcon, { "aria-hidden": true, className: "size-4" }),
|
|
13790
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react40.TriangleAlertIcon, { "aria-hidden": true, className: "size-4" }),
|
|
13791
|
+
neutral: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react40.InfoIcon, { "aria-hidden": true, className: "size-4" })
|
|
13704
13792
|
};
|
|
13705
13793
|
var TONE_ICON_COLOR2 = {
|
|
13706
13794
|
info: "text-icon-brand",
|
|
@@ -13709,7 +13797,7 @@ var TONE_ICON_COLOR2 = {
|
|
|
13709
13797
|
danger: "text-icon-danger",
|
|
13710
13798
|
neutral: "text-icon-default-secondary"
|
|
13711
13799
|
};
|
|
13712
|
-
var
|
|
13800
|
+
var POSITION2 = {
|
|
13713
13801
|
"top-left": "top-[var(--toaster-mobile-offset)] md:top-[var(--toaster-offset)] left-4 items-start",
|
|
13714
13802
|
"top-center": "top-[var(--toaster-mobile-offset)] md:top-[var(--toaster-offset)] left-1/2 -translate-x-1/2 items-center",
|
|
13715
13803
|
"top-right": "top-[var(--toaster-mobile-offset)] md:top-[var(--toaster-offset)] right-4 items-end",
|
|
@@ -13768,9 +13856,9 @@ function Toaster({
|
|
|
13768
13856
|
};
|
|
13769
13857
|
}, []);
|
|
13770
13858
|
const context = (0, import_react84.useMemo)(() => ({ toast, dismiss, dismissAll }), [toast, dismiss, dismissAll]);
|
|
13771
|
-
return /* @__PURE__ */ (0,
|
|
13859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(ToastContext.Provider, { value: context, children: [
|
|
13772
13860
|
children,
|
|
13773
|
-
/* @__PURE__ */ (0,
|
|
13861
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
13774
13862
|
"div",
|
|
13775
13863
|
{
|
|
13776
13864
|
"aria-live": "polite",
|
|
@@ -13778,20 +13866,20 @@ function Toaster({
|
|
|
13778
13866
|
...{ [TOASTER_ATTRIBUTE]: "" },
|
|
13779
13867
|
className: (0, import_clsx101.default)(
|
|
13780
13868
|
"pointer-events-none fixed z-toast flex w-[calc(100%-2rem)] max-w-[380px] flex-col gap-2",
|
|
13781
|
-
|
|
13869
|
+
POSITION2[position]
|
|
13782
13870
|
),
|
|
13783
13871
|
style: {
|
|
13784
13872
|
"--toaster-offset": toLength(offset2),
|
|
13785
13873
|
"--toaster-mobile-offset": toLength(mobileOffset ?? offset2)
|
|
13786
13874
|
},
|
|
13787
|
-
children: toasts.map((entry) => /* @__PURE__ */ (0,
|
|
13875
|
+
children: toasts.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ToastItem, { toast: entry, onDismiss: () => dismiss(entry.id) }, entry.id))
|
|
13788
13876
|
}
|
|
13789
13877
|
) })
|
|
13790
13878
|
] });
|
|
13791
13879
|
}
|
|
13792
13880
|
function ToastItem({ toast, onDismiss }) {
|
|
13793
13881
|
const tone = toast.tone ?? "info";
|
|
13794
|
-
return /* @__PURE__ */ (0,
|
|
13882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
13795
13883
|
"div",
|
|
13796
13884
|
{
|
|
13797
13885
|
role: tone === "danger" ? "alert" : "status",
|
|
@@ -13800,13 +13888,13 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
13800
13888
|
"bg-default p-4 shadow-400"
|
|
13801
13889
|
),
|
|
13802
13890
|
children: [
|
|
13803
|
-
/* @__PURE__ */ (0,
|
|
13804
|
-
/* @__PURE__ */ (0,
|
|
13805
|
-
/* @__PURE__ */ (0,
|
|
13806
|
-
toast.description && /* @__PURE__ */ (0,
|
|
13807
|
-
toast.action && /* @__PURE__ */ (0,
|
|
13891
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { "aria-hidden": true, className: (0, import_clsx101.default)("mt-px shrink-0", TONE_ICON_COLOR2[tone]), children: TONE_ICON3[tone] }),
|
|
13892
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
13893
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("p", { className: "text-body-sm font-semibold text-default", children: toast.title }),
|
|
13894
|
+
toast.description && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("p", { className: "mt-0.5 text-body-xs text-default-secondary", children: toast.description }),
|
|
13895
|
+
toast.action && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { className: "mt-2 flex items-center gap-2", children: toast.action })
|
|
13808
13896
|
] }),
|
|
13809
|
-
/* @__PURE__ */ (0,
|
|
13897
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
13810
13898
|
IconButton,
|
|
13811
13899
|
{
|
|
13812
13900
|
variant: "subtle",
|
|
@@ -13814,7 +13902,7 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
13814
13902
|
"aria-label": typeof toast.title === "string" ? `Dismiss: ${toast.title}` : "Dismiss",
|
|
13815
13903
|
onClick: onDismiss,
|
|
13816
13904
|
className: "-mr-1 -mt-1 shrink-0",
|
|
13817
|
-
children: /* @__PURE__ */ (0,
|
|
13905
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react40.XIcon, { "aria-hidden": true, size: 14 })
|
|
13818
13906
|
}
|
|
13819
13907
|
)
|
|
13820
13908
|
]
|
|
@@ -13825,23 +13913,23 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
13825
13913
|
// src/components/forms/password-input.tsx
|
|
13826
13914
|
var import_react85 = require("react");
|
|
13827
13915
|
var import_lucide_react41 = require("lucide-react");
|
|
13828
|
-
var
|
|
13916
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
13829
13917
|
var PasswordInput = (0, import_react85.forwardRef)(function PasswordInput2(props, ref) {
|
|
13830
13918
|
const [visible, setVisible] = (0, import_react85.useState)(false);
|
|
13831
|
-
return /* @__PURE__ */ (0,
|
|
13919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
13832
13920
|
Input,
|
|
13833
13921
|
{
|
|
13834
13922
|
ref,
|
|
13835
13923
|
...props,
|
|
13836
13924
|
type: visible ? "text" : "password",
|
|
13837
|
-
trailingAction: /* @__PURE__ */ (0,
|
|
13925
|
+
trailingAction: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
13838
13926
|
"button",
|
|
13839
13927
|
{
|
|
13840
13928
|
type: "button",
|
|
13841
13929
|
"aria-label": visible ? "Hide password" : "Show password",
|
|
13842
13930
|
onClick: () => setVisible((v) => !v),
|
|
13843
13931
|
className: "flex items-center justify-center rounded transition-colors hover:text-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand",
|
|
13844
|
-
children: visible ? /* @__PURE__ */ (0,
|
|
13932
|
+
children: visible ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_lucide_react41.EyeOffIcon, { "aria-hidden": true, className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_lucide_react41.EyeIcon, { "aria-hidden": true, className: "size-4" })
|
|
13845
13933
|
}
|
|
13846
13934
|
)
|
|
13847
13935
|
}
|
|
@@ -13851,12 +13939,12 @@ var PasswordInput = (0, import_react85.forwardRef)(function PasswordInput2(props
|
|
|
13851
13939
|
// src/components/ai/ai-chat-bar.tsx
|
|
13852
13940
|
var import_clsx102 = __toESM(require("clsx"), 1);
|
|
13853
13941
|
var import_lucide_react42 = require("lucide-react");
|
|
13854
|
-
var
|
|
13942
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
13855
13943
|
function AIChatBar({
|
|
13856
13944
|
placeholder = "Ask Intelligence about any entity, supplier, or risk\u2026",
|
|
13857
13945
|
className
|
|
13858
13946
|
}) {
|
|
13859
|
-
return /* @__PURE__ */ (0,
|
|
13947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
13860
13948
|
"div",
|
|
13861
13949
|
{
|
|
13862
13950
|
className: (0, import_clsx102.default)(
|
|
@@ -13864,16 +13952,16 @@ function AIChatBar({
|
|
|
13864
13952
|
className
|
|
13865
13953
|
),
|
|
13866
13954
|
children: [
|
|
13867
|
-
/* @__PURE__ */ (0,
|
|
13868
|
-
/* @__PURE__ */ (0,
|
|
13869
|
-
/* @__PURE__ */ (0,
|
|
13955
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("span", { "aria-hidden": true, className: "shrink-0 text-icon-default-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react42.SearchIcon, { className: "size-4" }) }),
|
|
13956
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("p", { className: "flex-1 text-body-sm text-default-tertiary truncate", children: placeholder }),
|
|
13957
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
13870
13958
|
"button",
|
|
13871
13959
|
{
|
|
13872
13960
|
type: "button",
|
|
13873
13961
|
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",
|
|
13874
13962
|
children: [
|
|
13875
13963
|
"Ask",
|
|
13876
|
-
/* @__PURE__ */ (0,
|
|
13964
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react42.ArrowRightIcon, { "aria-hidden": true, className: "size-4" })
|
|
13877
13965
|
]
|
|
13878
13966
|
}
|
|
13879
13967
|
)
|
|
@@ -13885,9 +13973,9 @@ function AIChatBar({
|
|
|
13885
13973
|
// src/components/ai/ai-suggestion-chip.tsx
|
|
13886
13974
|
var import_clsx103 = __toESM(require("clsx"), 1);
|
|
13887
13975
|
var import_lucide_react43 = require("lucide-react");
|
|
13888
|
-
var
|
|
13976
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
13889
13977
|
function AISuggestionChip({ prompt, onClick, className }) {
|
|
13890
|
-
return /* @__PURE__ */ (0,
|
|
13978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
13891
13979
|
"button",
|
|
13892
13980
|
{
|
|
13893
13981
|
type: "button",
|
|
@@ -13897,9 +13985,9 @@ function AISuggestionChip({ prompt, onClick, className }) {
|
|
|
13897
13985
|
className
|
|
13898
13986
|
),
|
|
13899
13987
|
children: [
|
|
13900
|
-
/* @__PURE__ */ (0,
|
|
13901
|
-
/* @__PURE__ */ (0,
|
|
13902
|
-
/* @__PURE__ */ (0,
|
|
13988
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { "aria-hidden": true, className: "shrink-0 text-icon-brand", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_lucide_react43.CpuIcon, { className: "size-4" }) }),
|
|
13989
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "flex-1 text-body-sm text-default truncate", children: prompt }),
|
|
13990
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { "aria-hidden": true, className: "shrink-0 text-icon-default-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_lucide_react43.ArrowRightIcon, { className: "size-3.5", strokeWidth: 2.5 }) })
|
|
13903
13991
|
]
|
|
13904
13992
|
}
|
|
13905
13993
|
);
|
|
@@ -13907,18 +13995,18 @@ function AISuggestionChip({ prompt, onClick, className }) {
|
|
|
13907
13995
|
|
|
13908
13996
|
// src/components/ai/quick-actions-bar.tsx
|
|
13909
13997
|
var import_clsx104 = __toESM(require("clsx"), 1);
|
|
13910
|
-
var
|
|
13998
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
13911
13999
|
function QuickActionsBar({ actions, active, onSelect, className }) {
|
|
13912
|
-
return /* @__PURE__ */ (0,
|
|
14000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { className: (0, import_clsx104.default)("flex flex-wrap items-center gap-3", className), children: actions.map((action) => {
|
|
13913
14001
|
const isActive = active === action.value;
|
|
13914
|
-
return /* @__PURE__ */ (0,
|
|
14002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
13915
14003
|
"button",
|
|
13916
14004
|
{
|
|
13917
14005
|
type: "button",
|
|
13918
14006
|
"aria-pressed": isActive,
|
|
13919
14007
|
onClick: () => onSelect?.(action.value),
|
|
13920
14008
|
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",
|
|
13921
|
-
children: /* @__PURE__ */ (0,
|
|
14009
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TagPill, { label: action.label, tone: isActive ? "brand" : "default" })
|
|
13922
14010
|
},
|
|
13923
14011
|
action.value
|
|
13924
14012
|
);
|
|
@@ -13928,23 +14016,23 @@ function QuickActionsBar({ actions, active, onSelect, className }) {
|
|
|
13928
14016
|
// src/components/ai/chat.tsx
|
|
13929
14017
|
var import_clsx105 = __toESM(require("clsx"), 1);
|
|
13930
14018
|
var import_lucide_react44 = require("lucide-react");
|
|
13931
|
-
var
|
|
14019
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
13932
14020
|
function AiAvatar({ className, icon }) {
|
|
13933
|
-
return /* @__PURE__ */ (0,
|
|
14021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
13934
14022
|
"span",
|
|
13935
14023
|
{
|
|
13936
14024
|
"aria-hidden": true,
|
|
13937
14025
|
className: cn("flex size-8 shrink-0 items-center justify-center rounded-full bg-brand text-icon-brand-on-brand", className),
|
|
13938
|
-
children: icon ?? /* @__PURE__ */ (0,
|
|
14026
|
+
children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_lucide_react44.CpuIcon, { className: "size-3.5" })
|
|
13939
14027
|
}
|
|
13940
14028
|
);
|
|
13941
14029
|
}
|
|
13942
14030
|
function TypingIndicator({ label = "Assistant is typing", className }) {
|
|
13943
|
-
return /* @__PURE__ */ (0,
|
|
13944
|
-
/* @__PURE__ */ (0,
|
|
13945
|
-
/* @__PURE__ */ (0,
|
|
13946
|
-
/* @__PURE__ */ (0,
|
|
13947
|
-
/* @__PURE__ */ (0,
|
|
14031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { role: "status", "aria-live": "polite", className: cn("flex items-center gap-3", className), children: [
|
|
14032
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(AiAvatar, {}),
|
|
14033
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex items-center gap-2 rounded-2xl rounded-tl-sm border border-default bg-default-secondary px-5 py-3", children: [
|
|
14034
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "text-body-xs text-default-secondary", children: label }),
|
|
14035
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { "aria-hidden": true, className: "flex gap-1", children: [0, 1, 2].map((index) => /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
13948
14036
|
"span",
|
|
13949
14037
|
{
|
|
13950
14038
|
className: "inline-block size-1.5 rounded-full bg-default-tertiary motion-safe:animate-bounce",
|
|
@@ -13957,9 +14045,9 @@ function TypingIndicator({ label = "Assistant is typing", className }) {
|
|
|
13957
14045
|
}
|
|
13958
14046
|
function ChatBubble({ sender, children, failed = false, className }) {
|
|
13959
14047
|
if (sender === "user") {
|
|
13960
|
-
return /* @__PURE__ */ (0,
|
|
14048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { "data-sender": "user", className: cn("flex justify-end", className), children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("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 }) });
|
|
13961
14049
|
}
|
|
13962
|
-
return /* @__PURE__ */ (0,
|
|
14050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
13963
14051
|
"div",
|
|
13964
14052
|
{
|
|
13965
14053
|
"data-sender": "assistant",
|
|
@@ -13978,17 +14066,17 @@ function ChatBubble({ sender, children, failed = false, className }) {
|
|
|
13978
14066
|
}
|
|
13979
14067
|
|
|
13980
14068
|
// src/components/decorative/aurora-backdrop.tsx
|
|
13981
|
-
var
|
|
14069
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
13982
14070
|
function blob(primitive, alpha) {
|
|
13983
14071
|
return `radial-gradient(ellipse, color-mix(in srgb, var(${primitive}) ${alpha}%, transparent) 0%, transparent 70%)`;
|
|
13984
14072
|
}
|
|
13985
14073
|
function AuroraBackdrop() {
|
|
13986
|
-
return /* @__PURE__ */ (0,
|
|
13987
|
-
/* @__PURE__ */ (0,
|
|
13988
|
-
/* @__PURE__ */ (0,
|
|
13989
|
-
/* @__PURE__ */ (0,
|
|
13990
|
-
/* @__PURE__ */ (0,
|
|
13991
|
-
/* @__PURE__ */ (0,
|
|
14074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "pointer-events-none absolute inset-0", "aria-hidden": true, children: [
|
|
14075
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "absolute -left-24 -top-28", style: { width: 380, height: 380, background: blob("--prim-red-400", 45) } }),
|
|
14076
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "absolute -top-24 right-[-4%]", style: { width: 320, height: 320, background: blob("--prim-red-300", 40) } }),
|
|
14077
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "absolute bottom-[-10%] right-[14%]", style: { width: 420, height: 420, background: blob("--prim-violet-400", 30) } }),
|
|
14078
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "absolute bottom-[-6%] left-[4%]", style: { width: 280, height: 280, background: blob("--prim-blue-400", 25) } }),
|
|
14079
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "absolute left-[20%] top-[30%]", style: { width: 240, height: 240, background: blob("--prim-blue-300", 18) } })
|
|
13992
14080
|
] });
|
|
13993
14081
|
}
|
|
13994
14082
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -14223,6 +14311,7 @@ function AuroraBackdrop() {
|
|
|
14223
14311
|
SegmentedControl,
|
|
14224
14312
|
Select,
|
|
14225
14313
|
SelectControl,
|
|
14314
|
+
SelectionBar,
|
|
14226
14315
|
Separator,
|
|
14227
14316
|
Sidebar,
|
|
14228
14317
|
SidebarProvider,
|