@platned/ui 0.10.2 → 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 +329 -279
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +229 -180
- 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
|
),
|
|
@@ -11698,9 +11702,54 @@ function Listbox({
|
|
|
11698
11702
|
);
|
|
11699
11703
|
}
|
|
11700
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
|
+
|
|
11701
11750
|
// src/components/lists/list-row.tsx
|
|
11702
11751
|
var import_clsx83 = __toESM(require("clsx"), 1);
|
|
11703
|
-
var
|
|
11752
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
11704
11753
|
var DENSITY2 = {
|
|
11705
11754
|
default: {
|
|
11706
11755
|
pad: "py-4",
|
|
@@ -11761,24 +11810,24 @@ function ListRow({
|
|
|
11761
11810
|
className
|
|
11762
11811
|
)
|
|
11763
11812
|
};
|
|
11764
|
-
const body = /* @__PURE__ */ (0,
|
|
11765
|
-
/* @__PURE__ */ (0,
|
|
11766
|
-
hasTitleLine && /* @__PURE__ */ (0,
|
|
11767
|
-
/* @__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: [
|
|
11768
11817
|
leading,
|
|
11769
|
-
title != null && /* @__PURE__ */ (0,
|
|
11770
|
-
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 })
|
|
11771
11820
|
] }),
|
|
11772
|
-
meta && /* @__PURE__ */ (0,
|
|
11821
|
+
meta && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "shrink-0", children: meta })
|
|
11773
11822
|
] }),
|
|
11774
|
-
description && /* @__PURE__ */ (0,
|
|
11823
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("p", { className: d.description, children: description }),
|
|
11775
11824
|
footer && // These two wrappers are propagation barriers, not controls — they add no
|
|
11776
11825
|
// behaviour of their own and must not be focusable or take a role.
|
|
11777
11826
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
11778
|
-
/* @__PURE__ */ (0,
|
|
11827
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { onClick: stopIfInteractive, onKeyDown: stopIfInteractive, children: footer })
|
|
11779
11828
|
] }),
|
|
11780
11829
|
trailing && // eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
11781
|
-
/* @__PURE__ */ (0,
|
|
11830
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
11782
11831
|
"div",
|
|
11783
11832
|
{
|
|
11784
11833
|
className: "ml-3 flex shrink-0 items-center self-center",
|
|
@@ -11789,7 +11838,7 @@ function ListRow({
|
|
|
11789
11838
|
)
|
|
11790
11839
|
] });
|
|
11791
11840
|
if (asChild) {
|
|
11792
|
-
return /* @__PURE__ */ (0,
|
|
11841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
11793
11842
|
Slot,
|
|
11794
11843
|
{
|
|
11795
11844
|
...rootProps,
|
|
@@ -11802,7 +11851,7 @@ function ListRow({
|
|
|
11802
11851
|
}
|
|
11803
11852
|
);
|
|
11804
11853
|
}
|
|
11805
|
-
return /* @__PURE__ */ (0,
|
|
11854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
11806
11855
|
Tag,
|
|
11807
11856
|
{
|
|
11808
11857
|
...rootProps,
|
|
@@ -11833,9 +11882,9 @@ function refusePress(event) {
|
|
|
11833
11882
|
// src/components/lists/file-row.tsx
|
|
11834
11883
|
var import_clsx84 = __toESM(require("clsx"), 1);
|
|
11835
11884
|
var import_lucide_react31 = require("lucide-react");
|
|
11836
|
-
var
|
|
11885
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
11837
11886
|
function FileTypeBadge({ type }) {
|
|
11838
|
-
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 });
|
|
11839
11888
|
}
|
|
11840
11889
|
function FileRow({
|
|
11841
11890
|
name,
|
|
@@ -11849,8 +11898,8 @@ function FileRow({
|
|
|
11849
11898
|
actions,
|
|
11850
11899
|
className
|
|
11851
11900
|
}) {
|
|
11852
|
-
const lead = leading ?? (fileType ? /* @__PURE__ */ (0,
|
|
11853
|
-
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)(
|
|
11854
11903
|
"div",
|
|
11855
11904
|
{
|
|
11856
11905
|
className: (0, import_clsx84.default)(
|
|
@@ -11859,14 +11908,14 @@ function FileRow({
|
|
|
11859
11908
|
),
|
|
11860
11909
|
children: [
|
|
11861
11910
|
lead,
|
|
11862
|
-
/* @__PURE__ */ (0,
|
|
11863
|
-
/* @__PURE__ */ (0,
|
|
11864
|
-
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 })
|
|
11865
11914
|
] }),
|
|
11866
|
-
(onDownload || onRemove || actions) && /* @__PURE__ */ (0,
|
|
11867
|
-
onDownload && /* @__PURE__ */ (0,
|
|
11868
|
-
onRemove && /* @__PURE__ */ (0,
|
|
11869
|
-
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 })
|
|
11870
11919
|
] })
|
|
11871
11920
|
]
|
|
11872
11921
|
}
|
|
@@ -11875,7 +11924,7 @@ function FileRow({
|
|
|
11875
11924
|
|
|
11876
11925
|
// src/components/lists/scored-row.tsx
|
|
11877
11926
|
var import_clsx85 = __toESM(require("clsx"), 1);
|
|
11878
|
-
var
|
|
11927
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
11879
11928
|
var GAP5 = {
|
|
11880
11929
|
sm: "gap-2",
|
|
11881
11930
|
md: "gap-3",
|
|
@@ -11902,8 +11951,8 @@ function ScoredRow({
|
|
|
11902
11951
|
align = "center",
|
|
11903
11952
|
className
|
|
11904
11953
|
}) {
|
|
11905
|
-
return /* @__PURE__ */ (0,
|
|
11906
|
-
/* @__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)(
|
|
11907
11956
|
"div",
|
|
11908
11957
|
{
|
|
11909
11958
|
className: (0, import_clsx85.default)(
|
|
@@ -11915,14 +11964,14 @@ function ScoredRow({
|
|
|
11915
11964
|
style: titleWidth ? { width: titleWidth } : void 0,
|
|
11916
11965
|
children: [
|
|
11917
11966
|
leading,
|
|
11918
|
-
/* @__PURE__ */ (0,
|
|
11919
|
-
/* @__PURE__ */ (0,
|
|
11920
|
-
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 })
|
|
11921
11970
|
] })
|
|
11922
11971
|
]
|
|
11923
11972
|
}
|
|
11924
11973
|
),
|
|
11925
|
-
aside && /* @__PURE__ */ (0,
|
|
11974
|
+
aside && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11926
11975
|
"div",
|
|
11927
11976
|
{
|
|
11928
11977
|
className: (0, import_clsx85.default)("min-w-0", asideWidth ? "shrink-0" : "flex-1"),
|
|
@@ -11930,7 +11979,7 @@ function ScoredRow({
|
|
|
11930
11979
|
children: aside
|
|
11931
11980
|
}
|
|
11932
11981
|
),
|
|
11933
|
-
meter && /* @__PURE__ */ (0,
|
|
11982
|
+
meter && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
11934
11983
|
"div",
|
|
11935
11984
|
{
|
|
11936
11985
|
className: (0, import_clsx85.default)("min-w-0", meterWidth ? "shrink-0" : "flex-1"),
|
|
@@ -11938,7 +11987,7 @@ function ScoredRow({
|
|
|
11938
11987
|
children: meter
|
|
11939
11988
|
}
|
|
11940
11989
|
),
|
|
11941
|
-
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 })
|
|
11942
11991
|
] });
|
|
11943
11992
|
}
|
|
11944
11993
|
|
|
@@ -11947,7 +11996,7 @@ var import_clsx86 = __toESM(require("clsx"), 1);
|
|
|
11947
11996
|
|
|
11948
11997
|
// src/components/feedback/progress-bar.tsx
|
|
11949
11998
|
var import_react76 = require("react");
|
|
11950
|
-
var
|
|
11999
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
11951
12000
|
var SIZE18 = {
|
|
11952
12001
|
xs: "h-1",
|
|
11953
12002
|
sm: "h-1.5",
|
|
@@ -11977,7 +12026,7 @@ function ProgressBar({
|
|
|
11977
12026
|
const rounded = radius ? void 0 : "rounded-full";
|
|
11978
12027
|
const labelId = (0, import_react76.useId)();
|
|
11979
12028
|
const filledSegments = segments ? Math.round(clamped / 100 * segments) : 0;
|
|
11980
|
-
const track = segments ? /* @__PURE__ */ (0,
|
|
12029
|
+
const track = segments ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11981
12030
|
"div",
|
|
11982
12031
|
{
|
|
11983
12032
|
role: "progressbar",
|
|
@@ -11989,7 +12038,7 @@ function ProgressBar({
|
|
|
11989
12038
|
"aria-label": label ? void 0 : ariaLabel,
|
|
11990
12039
|
"data-tone": tone,
|
|
11991
12040
|
className: cn("flex w-full gap-1", className),
|
|
11992
|
-
children: Array.from({ length: segments }, (_, index) => /* @__PURE__ */ (0,
|
|
12041
|
+
children: Array.from({ length: segments }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
11993
12042
|
"span",
|
|
11994
12043
|
{
|
|
11995
12044
|
"data-filled": index < filledSegments || void 0,
|
|
@@ -11999,7 +12048,7 @@ function ProgressBar({
|
|
|
11999
12048
|
index
|
|
12000
12049
|
))
|
|
12001
12050
|
}
|
|
12002
|
-
) : /* @__PURE__ */ (0,
|
|
12051
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
12003
12052
|
"div",
|
|
12004
12053
|
{
|
|
12005
12054
|
role: "progressbar",
|
|
@@ -12012,7 +12061,7 @@ function ProgressBar({
|
|
|
12012
12061
|
"aria-label": label ? void 0 : ariaLabel,
|
|
12013
12062
|
className: cn("w-full overflow-hidden bg-default-tertiary", SIZE18[size2], rounded, className),
|
|
12014
12063
|
style: radius ? { borderRadius: radius } : void 0,
|
|
12015
|
-
children: /* @__PURE__ */ (0,
|
|
12064
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
12016
12065
|
"div",
|
|
12017
12066
|
{
|
|
12018
12067
|
className: cn("h-full transition-all motion-reduce:transition-none", rounded, FILL[tone]),
|
|
@@ -12022,10 +12071,10 @@ function ProgressBar({
|
|
|
12022
12071
|
}
|
|
12023
12072
|
);
|
|
12024
12073
|
if (!label && !showValue) return track;
|
|
12025
|
-
return /* @__PURE__ */ (0,
|
|
12026
|
-
/* @__PURE__ */ (0,
|
|
12027
|
-
label && /* @__PURE__ */ (0,
|
|
12028
|
-
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: [
|
|
12029
12078
|
Math.round(clamped),
|
|
12030
12079
|
"%"
|
|
12031
12080
|
] })
|
|
@@ -12035,7 +12084,7 @@ function ProgressBar({
|
|
|
12035
12084
|
}
|
|
12036
12085
|
|
|
12037
12086
|
// src/components/lists/numbered-list.tsx
|
|
12038
|
-
var
|
|
12087
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
12039
12088
|
var GAP6 = {
|
|
12040
12089
|
sm: "gap-2",
|
|
12041
12090
|
md: "gap-3"
|
|
@@ -12049,18 +12098,18 @@ function NumberedList({
|
|
|
12049
12098
|
gap = "md",
|
|
12050
12099
|
className
|
|
12051
12100
|
}) {
|
|
12052
|
-
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) => {
|
|
12053
12102
|
const tone = !item.tone || item.tone === "auto" ? getScoreTone(item.score, { direction }) : item.tone;
|
|
12054
|
-
return /* @__PURE__ */ (0,
|
|
12055
|
-
/* @__PURE__ */ (0,
|
|
12056
|
-
/* @__PURE__ */ (0,
|
|
12057
|
-
/* @__PURE__ */ (0,
|
|
12058
|
-
/* @__PURE__ */ (0,
|
|
12059
|
-
/* @__PURE__ */ (0,
|
|
12060
|
-
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 })
|
|
12061
12110
|
] })
|
|
12062
12111
|
] }),
|
|
12063
|
-
/* @__PURE__ */ (0,
|
|
12112
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
12064
12113
|
ScoreValue,
|
|
12065
12114
|
{
|
|
12066
12115
|
value: item.score,
|
|
@@ -12071,20 +12120,20 @@ function NumberedList({
|
|
|
12071
12120
|
}
|
|
12072
12121
|
)
|
|
12073
12122
|
] }),
|
|
12074
|
-
/* @__PURE__ */ (0,
|
|
12123
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(ProgressBar, { value: item.score, tone, "aria-label": `${item.title} score` })
|
|
12075
12124
|
] }, `${item.title}-${index}`);
|
|
12076
12125
|
}) });
|
|
12077
12126
|
}
|
|
12078
12127
|
|
|
12079
12128
|
// src/components/lists/icon-text-row.tsx
|
|
12080
12129
|
var import_clsx87 = __toESM(require("clsx"), 1);
|
|
12081
|
-
var
|
|
12130
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
12082
12131
|
function IconTextRow({ icon, title, detail, className }) {
|
|
12083
|
-
return /* @__PURE__ */ (0,
|
|
12084
|
-
/* @__PURE__ */ (0,
|
|
12085
|
-
/* @__PURE__ */ (0,
|
|
12086
|
-
/* @__PURE__ */ (0,
|
|
12087
|
-
/* @__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 })
|
|
12088
12137
|
] })
|
|
12089
12138
|
] });
|
|
12090
12139
|
}
|
|
@@ -12092,10 +12141,10 @@ function IconTextRow({ icon, title, detail, className }) {
|
|
|
12092
12141
|
// src/components/lists/checklist-row.tsx
|
|
12093
12142
|
var import_clsx88 = __toESM(require("clsx"), 1);
|
|
12094
12143
|
var import_lucide_react32 = require("lucide-react");
|
|
12095
|
-
var
|
|
12144
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
12096
12145
|
function ChecklistRow({ label, state, className }) {
|
|
12097
|
-
return /* @__PURE__ */ (0,
|
|
12098
|
-
/* @__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)(
|
|
12099
12148
|
"span",
|
|
12100
12149
|
{
|
|
12101
12150
|
className: (0, import_clsx88.default)(
|
|
@@ -12104,7 +12153,7 @@ function ChecklistRow({ label, state, className }) {
|
|
|
12104
12153
|
)
|
|
12105
12154
|
}
|
|
12106
12155
|
) }),
|
|
12107
|
-
/* @__PURE__ */ (0,
|
|
12156
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
12108
12157
|
"span",
|
|
12109
12158
|
{
|
|
12110
12159
|
className: (0, import_clsx88.default)(
|
|
@@ -12119,21 +12168,21 @@ function ChecklistRow({ label, state, className }) {
|
|
|
12119
12168
|
|
|
12120
12169
|
// src/components/lists/steps-list.tsx
|
|
12121
12170
|
var import_clsx89 = __toESM(require("clsx"), 1);
|
|
12122
|
-
var
|
|
12171
|
+
var import_jsx_runtime113 = (
|
|
12123
12172
|
// `text-[12px]` was off the type scale; 12 sits midway between Scale 01 (11) and
|
|
12124
12173
|
// Scale 02 (13), so it rounds up to 13 like every other snap in this pass.
|
|
12125
12174
|
require("react/jsx-runtime")
|
|
12126
12175
|
);
|
|
12127
12176
|
function StepsList({ steps, className }) {
|
|
12128
|
-
return /* @__PURE__ */ (0,
|
|
12129
|
-
/* @__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 }),
|
|
12130
12179
|
step
|
|
12131
12180
|
] }, i)) });
|
|
12132
12181
|
}
|
|
12133
12182
|
|
|
12134
12183
|
// src/components/lists/detail-item.tsx
|
|
12135
12184
|
var import_clsx90 = __toESM(require("clsx"), 1);
|
|
12136
|
-
var
|
|
12185
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
12137
12186
|
var SPAN = {
|
|
12138
12187
|
1: "",
|
|
12139
12188
|
2: "sm:col-span-2",
|
|
@@ -12150,18 +12199,18 @@ function DetailItem({
|
|
|
12150
12199
|
}) {
|
|
12151
12200
|
const shown = value === null || value === void 0 || value === "" ? "\u2014" : value;
|
|
12152
12201
|
if (layout === "inline") {
|
|
12153
|
-
return /* @__PURE__ */ (0,
|
|
12154
|
-
/* @__PURE__ */ (0,
|
|
12155
|
-
/* @__PURE__ */ (0,
|
|
12156
|
-
/* @__PURE__ */ (0,
|
|
12157
|
-
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 })
|
|
12158
12207
|
] })
|
|
12159
12208
|
] });
|
|
12160
12209
|
}
|
|
12161
|
-
return /* @__PURE__ */ (0,
|
|
12162
|
-
/* @__PURE__ */ (0,
|
|
12163
|
-
/* @__PURE__ */ (0,
|
|
12164
|
-
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 })
|
|
12165
12214
|
] });
|
|
12166
12215
|
}
|
|
12167
12216
|
var COLUMNS3 = {
|
|
@@ -12172,24 +12221,24 @@ var COLUMNS3 = {
|
|
|
12172
12221
|
4: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4"
|
|
12173
12222
|
};
|
|
12174
12223
|
function DetailGrid({ children, columns = "auto", className }) {
|
|
12175
|
-
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 });
|
|
12176
12225
|
}
|
|
12177
12226
|
|
|
12178
12227
|
// src/components/lists/description-list.tsx
|
|
12179
12228
|
var import_react77 = require("react");
|
|
12180
12229
|
var import_clsx91 = __toESM(require("clsx"), 1);
|
|
12181
12230
|
var import_lucide_react33 = require("lucide-react");
|
|
12182
|
-
var
|
|
12231
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
12183
12232
|
function DescriptionList({ children, className }) {
|
|
12184
|
-
return /* @__PURE__ */ (0,
|
|
12233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("dl", { className: cn("flex flex-col gap-3", className), children });
|
|
12185
12234
|
}
|
|
12186
12235
|
function DescriptionItem({ label, value, copyValue, className }) {
|
|
12187
12236
|
const shown = value === null || value === void 0 || value === "" ? "\u2014" : value;
|
|
12188
|
-
return /* @__PURE__ */ (0,
|
|
12189
|
-
/* @__PURE__ */ (0,
|
|
12190
|
-
/* @__PURE__ */ (0,
|
|
12191
|
-
/* @__PURE__ */ (0,
|
|
12192
|
-
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()}` })
|
|
12193
12242
|
] })
|
|
12194
12243
|
] });
|
|
12195
12244
|
}
|
|
@@ -12202,8 +12251,8 @@ function CopyButton({ value, label, copiedLabel = "Copied", className }) {
|
|
|
12202
12251
|
}, [copied]);
|
|
12203
12252
|
return (
|
|
12204
12253
|
// relative: keeps the sr-only status (absolutely positioned) inside a scrolling container.
|
|
12205
|
-
/* @__PURE__ */ (0,
|
|
12206
|
-
/* @__PURE__ */ (0,
|
|
12254
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("span", { className: "relative inline-flex", children: [
|
|
12255
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
12207
12256
|
IconButton,
|
|
12208
12257
|
{
|
|
12209
12258
|
variant: "subtle",
|
|
@@ -12217,10 +12266,10 @@ function CopyButton({ value, label, copiedLabel = "Copied", className }) {
|
|
|
12217
12266
|
() => void 0
|
|
12218
12267
|
);
|
|
12219
12268
|
},
|
|
12220
|
-
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 })
|
|
12221
12270
|
}
|
|
12222
12271
|
),
|
|
12223
|
-
/* @__PURE__ */ (0,
|
|
12272
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { role: "status", className: "sr-only", children: copied ? copiedLabel : "" })
|
|
12224
12273
|
] })
|
|
12225
12274
|
);
|
|
12226
12275
|
}
|
|
@@ -12228,16 +12277,16 @@ function EmailText({ email, className }) {
|
|
|
12228
12277
|
const at = email.lastIndexOf("@");
|
|
12229
12278
|
const local = at > 0 ? email.slice(0, at) : email;
|
|
12230
12279
|
const domain = at > 0 ? email.slice(at) : "";
|
|
12231
|
-
return /* @__PURE__ */ (0,
|
|
12232
|
-
/* @__PURE__ */ (0,
|
|
12233
|
-
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 })
|
|
12234
12283
|
] });
|
|
12235
12284
|
}
|
|
12236
12285
|
|
|
12237
12286
|
// src/components/lists/checked-group-list.tsx
|
|
12238
12287
|
var import_clsx92 = __toESM(require("clsx"), 1);
|
|
12239
12288
|
var import_lucide_react34 = require("lucide-react");
|
|
12240
|
-
var
|
|
12289
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
12241
12290
|
var COLUMNS4 = {
|
|
12242
12291
|
1: "columns-1",
|
|
12243
12292
|
2: "columns-2",
|
|
@@ -12251,13 +12300,13 @@ function CheckedGroupList({
|
|
|
12251
12300
|
className
|
|
12252
12301
|
}) {
|
|
12253
12302
|
if (groups.length === 0) {
|
|
12254
|
-
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 });
|
|
12255
12304
|
}
|
|
12256
|
-
const glyph = icon === void 0 ? /* @__PURE__ */ (0,
|
|
12257
|
-
return /* @__PURE__ */ (0,
|
|
12258
|
-
/* @__PURE__ */ (0,
|
|
12259
|
-
/* @__PURE__ */ (0,
|
|
12260
|
-
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 }),
|
|
12261
12310
|
item
|
|
12262
12311
|
] }, item)) })
|
|
12263
12312
|
] }, group.label)) });
|
|
@@ -12267,7 +12316,7 @@ function CheckedGroupList({
|
|
|
12267
12316
|
var import_react78 = require("react");
|
|
12268
12317
|
var import_clsx93 = __toESM(require("clsx"), 1);
|
|
12269
12318
|
var import_lucide_react35 = require("lucide-react");
|
|
12270
|
-
var
|
|
12319
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
12271
12320
|
var ROW = {
|
|
12272
12321
|
sm: "min-h-8 py-1 text-body-xs",
|
|
12273
12322
|
md: "min-h-10 py-2 text-body-sm"
|
|
@@ -12371,7 +12420,7 @@ function TreeView({
|
|
|
12371
12420
|
if (!node) return null;
|
|
12372
12421
|
const children = getChildren?.(item) ?? [];
|
|
12373
12422
|
const isSelected = selected === id;
|
|
12374
|
-
return /* @__PURE__ */ (0,
|
|
12423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
12375
12424
|
"li",
|
|
12376
12425
|
{
|
|
12377
12426
|
role: "treeitem",
|
|
@@ -12393,7 +12442,7 @@ function TreeView({
|
|
|
12393
12442
|
},
|
|
12394
12443
|
className: "outline-none [&:focus-visible>div]:ring-2 [&:focus-visible>div]:ring-inset [&:focus-visible>div]:ring-brand",
|
|
12395
12444
|
children: [
|
|
12396
|
-
/* @__PURE__ */ (0,
|
|
12445
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
12397
12446
|
"div",
|
|
12398
12447
|
{
|
|
12399
12448
|
onClick: () => {
|
|
@@ -12411,7 +12460,7 @@ function TreeView({
|
|
|
12411
12460
|
// Not a button: the treeitem is the one tab stop, and Left/Right already toggle.
|
|
12412
12461
|
// A pointer user still needs a target that toggles without selecting.
|
|
12413
12462
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
12414
|
-
/* @__PURE__ */ (0,
|
|
12463
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
12415
12464
|
"span",
|
|
12416
12465
|
{
|
|
12417
12466
|
"aria-hidden": true,
|
|
@@ -12422,11 +12471,11 @@ function TreeView({
|
|
|
12422
12471
|
focus(id);
|
|
12423
12472
|
},
|
|
12424
12473
|
className: "flex size-5 shrink-0 items-center justify-center rounded text-icon-default-secondary hover:bg-default-tertiary",
|
|
12425
|
-
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") })
|
|
12426
12475
|
}
|
|
12427
12476
|
)
|
|
12428
|
-
) : /* @__PURE__ */ (0,
|
|
12429
|
-
/* @__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, {
|
|
12430
12479
|
level,
|
|
12431
12480
|
hasChildren: node.hasChildren,
|
|
12432
12481
|
expanded: node.expanded,
|
|
@@ -12435,20 +12484,20 @@ function TreeView({
|
|
|
12435
12484
|
]
|
|
12436
12485
|
}
|
|
12437
12486
|
),
|
|
12438
|
-
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) })
|
|
12439
12488
|
]
|
|
12440
12489
|
},
|
|
12441
12490
|
id
|
|
12442
12491
|
);
|
|
12443
12492
|
});
|
|
12444
|
-
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) });
|
|
12445
12494
|
}
|
|
12446
12495
|
|
|
12447
12496
|
// src/components/lists/table.tsx
|
|
12448
12497
|
var import_react79 = require("react");
|
|
12449
12498
|
var import_clsx94 = __toESM(require("clsx"), 1);
|
|
12450
12499
|
var import_lucide_react36 = require("lucide-react");
|
|
12451
|
-
var
|
|
12500
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
12452
12501
|
var Table = (0, import_react79.forwardRef)(function Table2({ label, density = "default", fixed = false, maxHeight, className, children, ...rest }, ref) {
|
|
12453
12502
|
return (
|
|
12454
12503
|
// The scroll container is separate from the table so the header stays inside the
|
|
@@ -12456,7 +12505,7 @@ var Table = (0, import_react79.forwardRef)(function Table2({ label, density = "d
|
|
|
12456
12505
|
// header.
|
|
12457
12506
|
// The scroll wrapper is required for a <table>, which cannot itself scroll, so this
|
|
12458
12507
|
// takes the scrollbar styling rather than ScrollArea.
|
|
12459
|
-
/* @__PURE__ */ (0,
|
|
12508
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12460
12509
|
"div",
|
|
12461
12510
|
{
|
|
12462
12511
|
className: (0, import_clsx94.default)(
|
|
@@ -12466,7 +12515,7 @@ var Table = (0, import_react79.forwardRef)(function Table2({ label, density = "d
|
|
|
12466
12515
|
),
|
|
12467
12516
|
style: maxHeight ? { maxHeight } : void 0,
|
|
12468
12517
|
...maxHeight ? { role: "region", tabIndex: 0, "aria-label": label ? `${label} (scrolls)` : "Table (scrolls)" } : {},
|
|
12469
|
-
children: /* @__PURE__ */ (0,
|
|
12518
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12470
12519
|
"table",
|
|
12471
12520
|
{
|
|
12472
12521
|
ref,
|
|
@@ -12484,7 +12533,7 @@ var Table = (0, import_react79.forwardRef)(function Table2({ label, density = "d
|
|
|
12484
12533
|
});
|
|
12485
12534
|
var TableCaption = (0, import_react79.forwardRef)(
|
|
12486
12535
|
function TableCaption2({ className, ...rest }, ref) {
|
|
12487
|
-
return /* @__PURE__ */ (0,
|
|
12536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12488
12537
|
"caption",
|
|
12489
12538
|
{
|
|
12490
12539
|
ref,
|
|
@@ -12496,17 +12545,17 @@ var TableCaption = (0, import_react79.forwardRef)(
|
|
|
12496
12545
|
);
|
|
12497
12546
|
var TableHeader = (0, import_react79.forwardRef)(
|
|
12498
12547
|
function TableHeader2({ className, ...rest }, ref) {
|
|
12499
|
-
return /* @__PURE__ */ (0,
|
|
12548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("thead", { ref, className: cn("border-b border-default", className), ...rest });
|
|
12500
12549
|
}
|
|
12501
12550
|
);
|
|
12502
12551
|
var TableBody = (0, import_react79.forwardRef)(
|
|
12503
12552
|
function TableBody2({ className, ...rest }, ref) {
|
|
12504
|
-
return /* @__PURE__ */ (0,
|
|
12553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("tbody", { ref, className, ...rest });
|
|
12505
12554
|
}
|
|
12506
12555
|
);
|
|
12507
12556
|
var TableFooter = (0, import_react79.forwardRef)(
|
|
12508
12557
|
function TableFooter2({ className, ...rest }, ref) {
|
|
12509
|
-
return /* @__PURE__ */ (0,
|
|
12558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12510
12559
|
"tfoot",
|
|
12511
12560
|
{
|
|
12512
12561
|
ref,
|
|
@@ -12524,7 +12573,7 @@ var ROW_TONE = (0, import_clsx94.default)(
|
|
|
12524
12573
|
"data-[tone=danger]:bg-danger-tertiary"
|
|
12525
12574
|
);
|
|
12526
12575
|
var TableRow = (0, import_react79.forwardRef)(function TableRow2({ selected, tone = "default", dimmed = false, className, ...rest }, ref) {
|
|
12527
|
-
return /* @__PURE__ */ (0,
|
|
12576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12528
12577
|
"tr",
|
|
12529
12578
|
{
|
|
12530
12579
|
ref,
|
|
@@ -12547,7 +12596,7 @@ var TableRow = (0, import_react79.forwardRef)(function TableRow2({ selected, ton
|
|
|
12547
12596
|
var ALIGN4 = { left: "text-left", center: "text-center", right: "text-right" };
|
|
12548
12597
|
var TableHead = (0, import_react79.forwardRef)(function TableHead2({ sort, onSort, align = "left", sticky = false, className, children, ...rest }, ref) {
|
|
12549
12598
|
const sortable = sort !== void 0 && onSort !== void 0;
|
|
12550
|
-
return /* @__PURE__ */ (0,
|
|
12599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12551
12600
|
"th",
|
|
12552
12601
|
{
|
|
12553
12602
|
ref,
|
|
@@ -12560,7 +12609,7 @@ var TableHead = (0, import_react79.forwardRef)(function TableHead2({ sort, onSor
|
|
|
12560
12609
|
className
|
|
12561
12610
|
),
|
|
12562
12611
|
...rest,
|
|
12563
|
-
children: sortable ? /* @__PURE__ */ (0,
|
|
12612
|
+
children: sortable ? /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
12564
12613
|
"button",
|
|
12565
12614
|
{
|
|
12566
12615
|
type: "button",
|
|
@@ -12571,7 +12620,7 @@ var TableHead = (0, import_react79.forwardRef)(function TableHead2({ sort, onSor
|
|
|
12571
12620
|
),
|
|
12572
12621
|
children: [
|
|
12573
12622
|
children,
|
|
12574
|
-
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" })
|
|
12575
12624
|
]
|
|
12576
12625
|
}
|
|
12577
12626
|
) : children
|
|
@@ -12580,7 +12629,7 @@ var TableHead = (0, import_react79.forwardRef)(function TableHead2({ sort, onSor
|
|
|
12580
12629
|
});
|
|
12581
12630
|
var TableCell = (0, import_react79.forwardRef)(function TableCell2({ align = "left", density = "default", header = false, className, ...rest }, ref) {
|
|
12582
12631
|
const Tag = header ? "th" : "td";
|
|
12583
|
-
return /* @__PURE__ */ (0,
|
|
12632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
12584
12633
|
Tag,
|
|
12585
12634
|
{
|
|
12586
12635
|
ref,
|
|
@@ -12604,7 +12653,7 @@ var import_react_table = require("@tanstack/react-table");
|
|
|
12604
12653
|
|
|
12605
12654
|
// src/components/feedback/empty-state.tsx
|
|
12606
12655
|
var import_clsx95 = __toESM(require("clsx"), 1);
|
|
12607
|
-
var
|
|
12656
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
12608
12657
|
var SIZES = {
|
|
12609
12658
|
sm: "py-8",
|
|
12610
12659
|
md: "py-12",
|
|
@@ -12623,7 +12672,7 @@ function EmptyState({
|
|
|
12623
12672
|
action,
|
|
12624
12673
|
className
|
|
12625
12674
|
}) {
|
|
12626
|
-
return /* @__PURE__ */ (0,
|
|
12675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
12627
12676
|
"div",
|
|
12628
12677
|
{
|
|
12629
12678
|
"data-variant": variant,
|
|
@@ -12635,8 +12684,8 @@ function EmptyState({
|
|
|
12635
12684
|
),
|
|
12636
12685
|
"aria-live": variant === "empty" ? void 0 : "polite",
|
|
12637
12686
|
children: [
|
|
12638
|
-
icon && /* @__PURE__ */ (0,
|
|
12639
|
-
/* @__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 }),
|
|
12640
12689
|
action
|
|
12641
12690
|
]
|
|
12642
12691
|
}
|
|
@@ -12646,7 +12695,7 @@ function EmptyState({
|
|
|
12646
12695
|
// src/components/feedback/skeleton.tsx
|
|
12647
12696
|
var import_react80 = require("react");
|
|
12648
12697
|
var import_clsx96 = __toESM(require("clsx"), 1);
|
|
12649
|
-
var
|
|
12698
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
12650
12699
|
var SHAPE2 = {
|
|
12651
12700
|
line: "h-4 rounded",
|
|
12652
12701
|
block: "h-full w-full rounded-lg",
|
|
@@ -12654,7 +12703,7 @@ var SHAPE2 = {
|
|
|
12654
12703
|
};
|
|
12655
12704
|
var Skeleton = (0, import_react80.forwardRef)(function Skeleton2({ shape = "line", lines = 1, className, ...rest }, ref) {
|
|
12656
12705
|
if (shape === "line" && lines > 1) {
|
|
12657
|
-
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)(
|
|
12658
12707
|
"div",
|
|
12659
12708
|
{
|
|
12660
12709
|
className: (0, import_clsx96.default)(
|
|
@@ -12668,7 +12717,7 @@ var Skeleton = (0, import_react80.forwardRef)(function Skeleton2({ shape = "line
|
|
|
12668
12717
|
index
|
|
12669
12718
|
)) });
|
|
12670
12719
|
}
|
|
12671
|
-
return /* @__PURE__ */ (0,
|
|
12720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
12672
12721
|
"div",
|
|
12673
12722
|
{
|
|
12674
12723
|
ref,
|
|
@@ -12710,7 +12759,7 @@ function cardSlots(columns) {
|
|
|
12710
12759
|
|
|
12711
12760
|
// src/components/lists/data-table-parts.tsx
|
|
12712
12761
|
var import_lucide_react37 = require("lucide-react");
|
|
12713
|
-
var
|
|
12762
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
12714
12763
|
var SELECT_COLUMN_ID = "select";
|
|
12715
12764
|
function columnLabel(column) {
|
|
12716
12765
|
const meta = column.columnDef.meta;
|
|
@@ -12726,11 +12775,11 @@ function DataTableColumnHeader({
|
|
|
12726
12775
|
const text = title ?? columnLabel(column);
|
|
12727
12776
|
const hidden = column.columnDef.meta?.hideHeader;
|
|
12728
12777
|
if (!column.getCanSort()) {
|
|
12729
|
-
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 });
|
|
12730
12779
|
}
|
|
12731
12780
|
const sorted = column.getIsSorted();
|
|
12732
12781
|
const Icon = sorted === "asc" ? import_lucide_react37.ChevronUpIcon : sorted === "desc" ? import_lucide_react37.ChevronDownIcon : import_lucide_react37.ChevronsUpDownIcon;
|
|
12733
|
-
return /* @__PURE__ */ (0,
|
|
12782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
12734
12783
|
"button",
|
|
12735
12784
|
{
|
|
12736
12785
|
type: "button",
|
|
@@ -12744,8 +12793,8 @@ function DataTableColumnHeader({
|
|
|
12744
12793
|
className
|
|
12745
12794
|
),
|
|
12746
12795
|
children: [
|
|
12747
|
-
/* @__PURE__ */ (0,
|
|
12748
|
-
/* @__PURE__ */ (0,
|
|
12796
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: cn(hidden && "sr-only"), children: text }),
|
|
12797
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
12749
12798
|
Icon,
|
|
12750
12799
|
{
|
|
12751
12800
|
"aria-hidden": true,
|
|
@@ -12761,7 +12810,7 @@ function createSelectColumn(options = {}) {
|
|
|
12761
12810
|
const { getRowLabel, selectAllLabel = "Select all rows on this page" } = options;
|
|
12762
12811
|
return {
|
|
12763
12812
|
id: SELECT_COLUMN_ID,
|
|
12764
|
-
header: ({ table }) => /* @__PURE__ */ (0,
|
|
12813
|
+
header: ({ table }) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
12765
12814
|
Checkbox,
|
|
12766
12815
|
{
|
|
12767
12816
|
"aria-label": selectAllLabel,
|
|
@@ -12770,7 +12819,7 @@ function createSelectColumn(options = {}) {
|
|
|
12770
12819
|
onCheckedChange: (checked) => table.toggleAllPageRowsSelected(checked)
|
|
12771
12820
|
}
|
|
12772
12821
|
),
|
|
12773
|
-
cell: ({ row }) => /* @__PURE__ */ (0,
|
|
12822
|
+
cell: ({ row }) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
12774
12823
|
Checkbox,
|
|
12775
12824
|
{
|
|
12776
12825
|
"aria-label": getRowLabel ? getRowLabel(row.original) : "Select row",
|
|
@@ -12788,11 +12837,11 @@ function createSelectColumn(options = {}) {
|
|
|
12788
12837
|
function DataTableViewOptions({ table, label = "Columns" }) {
|
|
12789
12838
|
const columns = table.getAllLeafColumns().filter((column) => column.getCanHide());
|
|
12790
12839
|
if (columns.length === 0) return null;
|
|
12791
|
-
return /* @__PURE__ */ (0,
|
|
12792
|
-
/* @__PURE__ */ (0,
|
|
12793
|
-
/* @__PURE__ */ (0,
|
|
12794
|
-
/* @__PURE__ */ (0,
|
|
12795
|
-
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)(
|
|
12796
12845
|
DropdownMenuCheckboxItem,
|
|
12797
12846
|
{
|
|
12798
12847
|
checked: column.getIsVisible(),
|
|
@@ -12810,7 +12859,7 @@ function DataTablePagination({
|
|
|
12810
12859
|
summary
|
|
12811
12860
|
}) {
|
|
12812
12861
|
const { pageIndex, pageSize } = table.getState().pagination;
|
|
12813
|
-
return /* @__PURE__ */ (0,
|
|
12862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
12814
12863
|
PaginationBar,
|
|
12815
12864
|
{
|
|
12816
12865
|
page: pageIndex + 1,
|
|
@@ -12827,7 +12876,7 @@ function DataTablePagination({
|
|
|
12827
12876
|
|
|
12828
12877
|
// src/components/lists/data-table-cells.tsx
|
|
12829
12878
|
var import_clsx97 = __toESM(require("clsx"), 1);
|
|
12830
|
-
var
|
|
12879
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
12831
12880
|
function textFromNode(node) {
|
|
12832
12881
|
if (typeof node === "string") return node;
|
|
12833
12882
|
if (typeof node === "number") return String(node);
|
|
@@ -12838,8 +12887,8 @@ function textFromNode(node) {
|
|
|
12838
12887
|
return void 0;
|
|
12839
12888
|
}
|
|
12840
12889
|
function TableCellLeadText({ primary, secondary, size: size2 = "md", className }) {
|
|
12841
|
-
return /* @__PURE__ */ (0,
|
|
12842
|
-
/* @__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)(
|
|
12843
12892
|
"span",
|
|
12844
12893
|
{
|
|
12845
12894
|
title: primary,
|
|
@@ -12850,7 +12899,7 @@ function TableCellLeadText({ primary, secondary, size: size2 = "md", className }
|
|
|
12850
12899
|
children: primary
|
|
12851
12900
|
}
|
|
12852
12901
|
),
|
|
12853
|
-
secondary && (typeof secondary === "string" || typeof secondary === "number" ? /* @__PURE__ */ (0,
|
|
12902
|
+
secondary && (typeof secondary === "string" || typeof secondary === "number" ? /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12854
12903
|
"span",
|
|
12855
12904
|
{
|
|
12856
12905
|
title: String(secondary),
|
|
@@ -12863,7 +12912,7 @@ function TableCellLeadText({ primary, secondary, size: size2 = "md", className }
|
|
|
12863
12912
|
) : (
|
|
12864
12913
|
// An element brings its own overflow handling, so it gets no `truncate` here,
|
|
12865
12914
|
// which a card layout's touch un-truncation would otherwise turn into wrapping.
|
|
12866
|
-
/* @__PURE__ */ (0,
|
|
12915
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12867
12916
|
"span",
|
|
12868
12917
|
{
|
|
12869
12918
|
className: (0, import_clsx97.default)(
|
|
@@ -12883,7 +12932,7 @@ function TableCellText({
|
|
|
12883
12932
|
truncate = true,
|
|
12884
12933
|
className
|
|
12885
12934
|
}) {
|
|
12886
|
-
return /* @__PURE__ */ (0,
|
|
12935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12887
12936
|
"span",
|
|
12888
12937
|
{
|
|
12889
12938
|
title: truncate ? textFromNode(children) : void 0,
|
|
@@ -12899,7 +12948,7 @@ function TableCellText({
|
|
|
12899
12948
|
);
|
|
12900
12949
|
}
|
|
12901
12950
|
function TableCellBadge({ label, className }) {
|
|
12902
|
-
return /* @__PURE__ */ (0,
|
|
12951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
12903
12952
|
"span",
|
|
12904
12953
|
{
|
|
12905
12954
|
title: label,
|
|
@@ -12907,7 +12956,7 @@ function TableCellBadge({ label, className }) {
|
|
|
12907
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",
|
|
12908
12957
|
className
|
|
12909
12958
|
),
|
|
12910
|
-
children: /* @__PURE__ */ (0,
|
|
12959
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("span", { className: "truncate", children: label })
|
|
12911
12960
|
}
|
|
12912
12961
|
);
|
|
12913
12962
|
}
|
|
@@ -12919,8 +12968,8 @@ function TableCellProgress({
|
|
|
12919
12968
|
className
|
|
12920
12969
|
}) {
|
|
12921
12970
|
const clamped = Math.round(Math.min(100, Math.max(0, percent)));
|
|
12922
|
-
return /* @__PURE__ */ (0,
|
|
12923
|
-
/* @__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)(
|
|
12924
12973
|
ProgressBar,
|
|
12925
12974
|
{
|
|
12926
12975
|
value: clamped,
|
|
@@ -12930,7 +12979,7 @@ function TableCellProgress({
|
|
|
12930
12979
|
"aria-label": label ?? `${clamped}%`
|
|
12931
12980
|
}
|
|
12932
12981
|
),
|
|
12933
|
-
/* @__PURE__ */ (0,
|
|
12982
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("span", { className: "shrink-0 text-body-tiny leading-none tabular-nums text-default-secondary", children: [
|
|
12934
12983
|
clamped,
|
|
12935
12984
|
"%"
|
|
12936
12985
|
] })
|
|
@@ -12938,7 +12987,7 @@ function TableCellProgress({
|
|
|
12938
12987
|
}
|
|
12939
12988
|
|
|
12940
12989
|
// src/components/lists/data-table.tsx
|
|
12941
|
-
var
|
|
12990
|
+
var import_jsx_runtime123 = (
|
|
12942
12991
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
12943
12992
|
require("react/jsx-runtime")
|
|
12944
12993
|
);
|
|
@@ -12986,7 +13035,7 @@ function useTableState(controlled, initial, onChange) {
|
|
|
12986
13035
|
return [value, set];
|
|
12987
13036
|
}
|
|
12988
13037
|
function CellInteractionGuard({ children }) {
|
|
12989
|
-
return /* @__PURE__ */ (0,
|
|
13038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
12990
13039
|
"div",
|
|
12991
13040
|
{
|
|
12992
13041
|
className: "contents",
|
|
@@ -13059,7 +13108,7 @@ function useScrollEdges() {
|
|
|
13059
13108
|
}
|
|
13060
13109
|
var serverSortedValue = () => void 0;
|
|
13061
13110
|
function defaultRowLink({ children, ...props }) {
|
|
13062
|
-
return /* @__PURE__ */ (0,
|
|
13111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("a", { ...props, children });
|
|
13063
13112
|
}
|
|
13064
13113
|
function DataTable({
|
|
13065
13114
|
columns,
|
|
@@ -13184,16 +13233,16 @@ function DataTable({
|
|
|
13184
13233
|
const filtering = Boolean(globalFilter) || columnFilters.length > 0;
|
|
13185
13234
|
const rows = table.getRowModel().rows;
|
|
13186
13235
|
const isEmpty2 = !loading && !error && rows.length === 0;
|
|
13187
|
-
const placeholder = error ? /* @__PURE__ */ (0,
|
|
13236
|
+
const placeholder = error ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13188
13237
|
EmptyState,
|
|
13189
13238
|
{
|
|
13190
13239
|
message: typeof error === "string" ? error : "Something went wrong loading this data.",
|
|
13191
13240
|
variant: "error",
|
|
13192
13241
|
size: "md",
|
|
13193
|
-
action: onRetry ? /* @__PURE__ */ (0,
|
|
13242
|
+
action: onRetry ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(Button, { variant: "neutral", size: "sm", onClick: onRetry, children: "Retry" }) : void 0,
|
|
13194
13243
|
className: "mx-auto max-w-[520px]"
|
|
13195
13244
|
}
|
|
13196
|
-
) : 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;
|
|
13197
13246
|
const resultCount = manual.filtering ? table.getRowCount() : table.getFilteredRowModel().rows.length;
|
|
13198
13247
|
const showToolbar = Boolean(search || toolbar || showColumnMenu);
|
|
13199
13248
|
const showPager = paginated && !error && table.getRowCount() > 0;
|
|
@@ -13215,9 +13264,9 @@ function DataTable({
|
|
|
13215
13264
|
getRowLabel,
|
|
13216
13265
|
maxHeight
|
|
13217
13266
|
};
|
|
13218
|
-
return /* @__PURE__ */ (0,
|
|
13219
|
-
showToolbar && /* @__PURE__ */ (0,
|
|
13220
|
-
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)(
|
|
13221
13270
|
SearchInput,
|
|
13222
13271
|
{
|
|
13223
13272
|
size: "md",
|
|
@@ -13230,14 +13279,14 @@ function DataTable({
|
|
|
13230
13279
|
}
|
|
13231
13280
|
),
|
|
13232
13281
|
toolbar,
|
|
13233
|
-
showColumnMenu && /* @__PURE__ */ (0,
|
|
13282
|
+
showColumnMenu && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "ml-auto", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(DataTableViewOptions, { table }) })
|
|
13234
13283
|
] }),
|
|
13235
|
-
/* @__PURE__ */ (0,
|
|
13236
|
-
/* @__PURE__ */ (0,
|
|
13237
|
-
mode === "cards" && caption && /* @__PURE__ */ (0,
|
|
13238
|
-
mode === "cards" ? maxHeight ? /* @__PURE__ */ (0,
|
|
13239
|
-
showPager && /* @__PURE__ */ (0,
|
|
13240
|
-
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 })
|
|
13241
13290
|
] })
|
|
13242
13291
|
] });
|
|
13243
13292
|
}
|
|
@@ -13291,8 +13340,8 @@ function TableView({
|
|
|
13291
13340
|
const direction = scroll.overflowing && maxHeight && scroll.overflowingY ? "scrolls" : scroll.overflowing ? "scrolls horizontally" : "scrolls vertically";
|
|
13292
13341
|
const regionLabel = `${label ?? "Table"} (${direction})`;
|
|
13293
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;
|
|
13294
|
-
return /* @__PURE__ */ (0,
|
|
13295
|
-
/* @__PURE__ */ (0,
|
|
13343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "relative", children: [
|
|
13344
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13296
13345
|
"div",
|
|
13297
13346
|
{
|
|
13298
13347
|
ref: scroll.ref,
|
|
@@ -13304,18 +13353,18 @@ function TableView({
|
|
|
13304
13353
|
),
|
|
13305
13354
|
style: maxHeight ? { maxHeight } : void 0,
|
|
13306
13355
|
...scrolls ? { role: "region", tabIndex: 0, "aria-label": regionLabel } : {},
|
|
13307
|
-
children: /* @__PURE__ */ (0,
|
|
13356
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
13308
13357
|
"table",
|
|
13309
13358
|
{
|
|
13310
13359
|
className: "w-full table-fixed border-collapse text-left",
|
|
13311
13360
|
style: showPlaceholder ? void 0 : { minWidth },
|
|
13312
13361
|
"aria-busy": loading || void 0,
|
|
13313
13362
|
children: [
|
|
13314
|
-
caption ? /* @__PURE__ */ (0,
|
|
13315
|
-
/* @__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) => {
|
|
13316
13365
|
const meta = column.columnDef.meta;
|
|
13317
13366
|
const floor = headers.widths[column.id] ?? 0;
|
|
13318
|
-
return /* @__PURE__ */ (0,
|
|
13367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13319
13368
|
"col",
|
|
13320
13369
|
{
|
|
13321
13370
|
style: meta?.grow || !meta?.width ? void 0 : { width: floor > widthToPx(meta.width) ? floor : meta.width }
|
|
@@ -13323,12 +13372,12 @@ function TableView({
|
|
|
13323
13372
|
column.id
|
|
13324
13373
|
);
|
|
13325
13374
|
}) }),
|
|
13326
|
-
/* @__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) => {
|
|
13327
13376
|
const meta = header.column.columnDef.meta;
|
|
13328
13377
|
const sortable = header.column.getCanSort();
|
|
13329
13378
|
const sorted = header.column.getIsSorted();
|
|
13330
13379
|
const definition = header.column.columnDef.header;
|
|
13331
|
-
return /* @__PURE__ */ (0,
|
|
13380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13332
13381
|
"th",
|
|
13333
13382
|
{
|
|
13334
13383
|
scope: "col",
|
|
@@ -13343,12 +13392,12 @@ function TableView({
|
|
|
13343
13392
|
pinnedHeader,
|
|
13344
13393
|
meta?.headerClassName
|
|
13345
13394
|
),
|
|
13346
|
-
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())
|
|
13347
13396
|
},
|
|
13348
13397
|
header.id
|
|
13349
13398
|
);
|
|
13350
13399
|
}) }, group.id)) }),
|
|
13351
|
-
/* @__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)(
|
|
13352
13401
|
BodyRow,
|
|
13353
13402
|
{
|
|
13354
13403
|
row,
|
|
@@ -13371,8 +13420,8 @@ function TableView({
|
|
|
13371
13420
|
)
|
|
13372
13421
|
}
|
|
13373
13422
|
),
|
|
13374
|
-
scroll.overflowing && !scroll.atStart && !stickyStart && /* @__PURE__ */ (0,
|
|
13375
|
-
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" })
|
|
13376
13425
|
] });
|
|
13377
13426
|
}
|
|
13378
13427
|
function BodyRow({
|
|
@@ -13391,7 +13440,7 @@ function BodyRow({
|
|
|
13391
13440
|
}) {
|
|
13392
13441
|
const d = DENSITY3[density];
|
|
13393
13442
|
const href = getRowHref?.(row.original);
|
|
13394
|
-
return /* @__PURE__ */ (0,
|
|
13443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13395
13444
|
TableRow,
|
|
13396
13445
|
{
|
|
13397
13446
|
selected: row.getIsSelected() || void 0,
|
|
@@ -13416,7 +13465,7 @@ function BodyRow({
|
|
|
13416
13465
|
onRowClick(row.original);
|
|
13417
13466
|
}
|
|
13418
13467
|
} : void 0,
|
|
13419
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0,
|
|
13468
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13420
13469
|
BodyCell,
|
|
13421
13470
|
{
|
|
13422
13471
|
cell,
|
|
@@ -13445,7 +13494,7 @@ function BodyCell({
|
|
|
13445
13494
|
children: content
|
|
13446
13495
|
}, cell.row.original);
|
|
13447
13496
|
}
|
|
13448
|
-
return /* @__PURE__ */ (0,
|
|
13497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13449
13498
|
"td",
|
|
13450
13499
|
{
|
|
13451
13500
|
className: cn(
|
|
@@ -13456,13 +13505,13 @@ function BodyCell({
|
|
|
13456
13505
|
!meta?.interactive && "overflow-hidden",
|
|
13457
13506
|
meta?.cellClassName
|
|
13458
13507
|
),
|
|
13459
|
-
children: meta?.interactive ? /* @__PURE__ */ (0,
|
|
13508
|
+
children: meta?.interactive ? /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(CellInteractionGuard, { children: content }) : content
|
|
13460
13509
|
}
|
|
13461
13510
|
);
|
|
13462
13511
|
}
|
|
13463
13512
|
function CardScroll({ label, maxHeight, children }) {
|
|
13464
13513
|
const scroll = useScrollEdges();
|
|
13465
|
-
return /* @__PURE__ */ (0,
|
|
13514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13466
13515
|
"div",
|
|
13467
13516
|
{
|
|
13468
13517
|
ref: scroll.ref,
|
|
@@ -13489,12 +13538,12 @@ function CardList({
|
|
|
13489
13538
|
getRowDimmed,
|
|
13490
13539
|
getRowLabel
|
|
13491
13540
|
}) {
|
|
13492
|
-
if (placeholder) return /* @__PURE__ */ (0,
|
|
13541
|
+
if (placeholder) return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "px-4", children: placeholder });
|
|
13493
13542
|
if (loading) {
|
|
13494
|
-
return /* @__PURE__ */ (0,
|
|
13495
|
-
/* @__PURE__ */ (0,
|
|
13496
|
-
/* @__PURE__ */ (0,
|
|
13497
|
-
/* @__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" })
|
|
13498
13547
|
] }, index)) });
|
|
13499
13548
|
}
|
|
13500
13549
|
const columns = table.getVisibleLeafColumns();
|
|
@@ -13510,7 +13559,7 @@ function CardList({
|
|
|
13510
13559
|
return (
|
|
13511
13560
|
// Card mode un-truncates: on touch there is no hover tooltip, so a clipped value would be
|
|
13512
13561
|
// unreadable. `.truncate` cell renderers wrap here instead.
|
|
13513
|
-
/* @__PURE__ */ (0,
|
|
13562
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
13514
13563
|
"ul",
|
|
13515
13564
|
{
|
|
13516
13565
|
"aria-label": label,
|
|
@@ -13525,7 +13574,7 @@ function CardList({
|
|
|
13525
13574
|
const href = getRowHref?.(row.original);
|
|
13526
13575
|
const titleContent = render(slots.title?.id);
|
|
13527
13576
|
const tone = getRowTone?.(row.original);
|
|
13528
|
-
return /* @__PURE__ */ (0,
|
|
13577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)(
|
|
13529
13578
|
"li",
|
|
13530
13579
|
{
|
|
13531
13580
|
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
@@ -13540,9 +13589,9 @@ function CardList({
|
|
|
13540
13589
|
"data-[state=selected]:bg-brand-tertiary"
|
|
13541
13590
|
),
|
|
13542
13591
|
children: [
|
|
13543
|
-
/* @__PURE__ */ (0,
|
|
13544
|
-
selectable && /* @__PURE__ */ (0,
|
|
13545
|
-
/* @__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)(
|
|
13546
13595
|
"button",
|
|
13547
13596
|
{
|
|
13548
13597
|
type: "button",
|
|
@@ -13554,12 +13603,12 @@ function CardList({
|
|
|
13554
13603
|
) : titleContent }),
|
|
13555
13604
|
slots.status && // A status pill is `nowrap`, so a long label would spill off the card. Let it
|
|
13556
13605
|
// wrap inside the cap instead.
|
|
13557
|
-
/* @__PURE__ */ (0,
|
|
13558
|
-
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) }) })
|
|
13559
13608
|
] }),
|
|
13560
|
-
slots.fields.length > 0 && /* @__PURE__ */ (0,
|
|
13561
|
-
/* @__PURE__ */ (0,
|
|
13562
|
-
/* @__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) })
|
|
13563
13612
|
] }, id)) })
|
|
13564
13613
|
]
|
|
13565
13614
|
},
|
|
@@ -13577,7 +13626,7 @@ var import_react_table2 = require("@tanstack/react-table");
|
|
|
13577
13626
|
// src/components/feedback/inline-alert.tsx
|
|
13578
13627
|
var import_clsx99 = __toESM(require("clsx"), 1);
|
|
13579
13628
|
var import_lucide_react38 = require("lucide-react");
|
|
13580
|
-
var
|
|
13629
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
13581
13630
|
var toneStyles3 = {
|
|
13582
13631
|
info: "border-brand-tertiary bg-brand-tertiary text-brand",
|
|
13583
13632
|
warning: "border-warning-tertiary bg-warning-tertiary text-warning",
|
|
@@ -13586,15 +13635,15 @@ var toneStyles3 = {
|
|
|
13586
13635
|
neutral: "border-default bg-default text-default-secondary"
|
|
13587
13636
|
};
|
|
13588
13637
|
var toneIcons = {
|
|
13589
|
-
info: /* @__PURE__ */ (0,
|
|
13590
|
-
warning: /* @__PURE__ */ (0,
|
|
13591
|
-
danger: /* @__PURE__ */ (0,
|
|
13592
|
-
positive: /* @__PURE__ */ (0,
|
|
13593
|
-
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" })
|
|
13594
13643
|
};
|
|
13595
13644
|
function InlineAlert({ tone, children, icon, role, className }) {
|
|
13596
13645
|
const glyph = icon === void 0 ? toneIcons[tone] : icon;
|
|
13597
|
-
return /* @__PURE__ */ (0,
|
|
13646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
13598
13647
|
"div",
|
|
13599
13648
|
{
|
|
13600
13649
|
"data-tone": tone,
|
|
@@ -13605,8 +13654,8 @@ function InlineAlert({ tone, children, icon, role, className }) {
|
|
|
13605
13654
|
className
|
|
13606
13655
|
),
|
|
13607
13656
|
children: [
|
|
13608
|
-
glyph && /* @__PURE__ */ (0,
|
|
13609
|
-
/* @__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 })
|
|
13610
13659
|
]
|
|
13611
13660
|
}
|
|
13612
13661
|
);
|
|
@@ -13614,7 +13663,7 @@ function InlineAlert({ tone, children, icon, role, className }) {
|
|
|
13614
13663
|
|
|
13615
13664
|
// src/components/feedback/error-boundary.tsx
|
|
13616
13665
|
var import_react82 = require("react");
|
|
13617
|
-
var
|
|
13666
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
13618
13667
|
var ErrorBoundary = class extends import_react82.Component {
|
|
13619
13668
|
constructor() {
|
|
13620
13669
|
super(...arguments);
|
|
@@ -13634,7 +13683,7 @@ var ErrorBoundary = class extends import_react82.Component {
|
|
|
13634
13683
|
}
|
|
13635
13684
|
render() {
|
|
13636
13685
|
if (!this.state.error) return this.props.children;
|
|
13637
|
-
return this.props.fallback ?? /* @__PURE__ */ (0,
|
|
13686
|
+
return this.props.fallback ?? /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
13638
13687
|
"div",
|
|
13639
13688
|
{
|
|
13640
13689
|
role: "status",
|
|
@@ -13650,7 +13699,7 @@ var ErrorBoundary = class extends import_react82.Component {
|
|
|
13650
13699
|
var import_react83 = require("react");
|
|
13651
13700
|
var import_clsx100 = __toESM(require("clsx"), 1);
|
|
13652
13701
|
var import_lucide_react39 = require("lucide-react");
|
|
13653
|
-
var
|
|
13702
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
13654
13703
|
var TONE_STYLES3 = {
|
|
13655
13704
|
info: "border-brand-tertiary bg-brand-tertiary text-default",
|
|
13656
13705
|
positive: "border-positive-tertiary bg-positive-tertiary text-default",
|
|
@@ -13666,11 +13715,11 @@ var TONE_ICON_COLOR = {
|
|
|
13666
13715
|
neutral: "text-icon-default-secondary"
|
|
13667
13716
|
};
|
|
13668
13717
|
var TONE_ICON2 = {
|
|
13669
|
-
info: /* @__PURE__ */ (0,
|
|
13670
|
-
positive: /* @__PURE__ */ (0,
|
|
13671
|
-
warning: /* @__PURE__ */ (0,
|
|
13672
|
-
danger: /* @__PURE__ */ (0,
|
|
13673
|
-
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" })
|
|
13674
13723
|
};
|
|
13675
13724
|
var Banner = (0, import_react83.forwardRef)(function Banner2({
|
|
13676
13725
|
title,
|
|
@@ -13685,7 +13734,7 @@ var Banner = (0, import_react83.forwardRef)(function Banner2({
|
|
|
13685
13734
|
}, ref) {
|
|
13686
13735
|
const titleId = (0, import_react83.useId)();
|
|
13687
13736
|
const glyph = icon === void 0 ? TONE_ICON2[tone] : icon;
|
|
13688
|
-
return /* @__PURE__ */ (0,
|
|
13737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
|
|
13689
13738
|
"div",
|
|
13690
13739
|
{
|
|
13691
13740
|
"data-tone": tone,
|
|
@@ -13701,13 +13750,13 @@ var Banner = (0, import_react83.forwardRef)(function Banner2({
|
|
|
13701
13750
|
),
|
|
13702
13751
|
...rest,
|
|
13703
13752
|
children: [
|
|
13704
|
-
glyph && /* @__PURE__ */ (0,
|
|
13705
|
-
/* @__PURE__ */ (0,
|
|
13706
|
-
/* @__PURE__ */ (0,
|
|
13707
|
-
children && /* @__PURE__ */ (0,
|
|
13708
|
-
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 })
|
|
13709
13758
|
] }),
|
|
13710
|
-
onDismiss && /* @__PURE__ */ (0,
|
|
13759
|
+
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
|
|
13711
13760
|
IconButton,
|
|
13712
13761
|
{
|
|
13713
13762
|
variant: "subtle",
|
|
@@ -13715,7 +13764,7 @@ var Banner = (0, import_react83.forwardRef)(function Banner2({
|
|
|
13715
13764
|
"aria-label": typeof title === "string" ? `Dismiss: ${title}` : "Dismiss",
|
|
13716
13765
|
onClick: onDismiss,
|
|
13717
13766
|
className: "-mr-1 -mt-1 shrink-0",
|
|
13718
|
-
children: /* @__PURE__ */ (0,
|
|
13767
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_lucide_react39.XIcon, { "aria-hidden": true, size: 16 })
|
|
13719
13768
|
}
|
|
13720
13769
|
)
|
|
13721
13770
|
]
|
|
@@ -13727,7 +13776,7 @@ var Banner = (0, import_react83.forwardRef)(function Banner2({
|
|
|
13727
13776
|
var import_react84 = require("react");
|
|
13728
13777
|
var import_clsx101 = __toESM(require("clsx"), 1);
|
|
13729
13778
|
var import_lucide_react40 = require("lucide-react");
|
|
13730
|
-
var
|
|
13779
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
13731
13780
|
var ToastContext = (0, import_react84.createContext)(null);
|
|
13732
13781
|
function useToast() {
|
|
13733
13782
|
const context = (0, import_react84.useContext)(ToastContext);
|
|
@@ -13735,11 +13784,11 @@ function useToast() {
|
|
|
13735
13784
|
return context;
|
|
13736
13785
|
}
|
|
13737
13786
|
var TONE_ICON3 = {
|
|
13738
|
-
info: /* @__PURE__ */ (0,
|
|
13739
|
-
positive: /* @__PURE__ */ (0,
|
|
13740
|
-
warning: /* @__PURE__ */ (0,
|
|
13741
|
-
danger: /* @__PURE__ */ (0,
|
|
13742
|
-
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" })
|
|
13743
13792
|
};
|
|
13744
13793
|
var TONE_ICON_COLOR2 = {
|
|
13745
13794
|
info: "text-icon-brand",
|
|
@@ -13748,7 +13797,7 @@ var TONE_ICON_COLOR2 = {
|
|
|
13748
13797
|
danger: "text-icon-danger",
|
|
13749
13798
|
neutral: "text-icon-default-secondary"
|
|
13750
13799
|
};
|
|
13751
|
-
var
|
|
13800
|
+
var POSITION2 = {
|
|
13752
13801
|
"top-left": "top-[var(--toaster-mobile-offset)] md:top-[var(--toaster-offset)] left-4 items-start",
|
|
13753
13802
|
"top-center": "top-[var(--toaster-mobile-offset)] md:top-[var(--toaster-offset)] left-1/2 -translate-x-1/2 items-center",
|
|
13754
13803
|
"top-right": "top-[var(--toaster-mobile-offset)] md:top-[var(--toaster-offset)] right-4 items-end",
|
|
@@ -13807,9 +13856,9 @@ function Toaster({
|
|
|
13807
13856
|
};
|
|
13808
13857
|
}, []);
|
|
13809
13858
|
const context = (0, import_react84.useMemo)(() => ({ toast, dismiss, dismissAll }), [toast, dismiss, dismissAll]);
|
|
13810
|
-
return /* @__PURE__ */ (0,
|
|
13859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(ToastContext.Provider, { value: context, children: [
|
|
13811
13860
|
children,
|
|
13812
|
-
/* @__PURE__ */ (0,
|
|
13861
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
13813
13862
|
"div",
|
|
13814
13863
|
{
|
|
13815
13864
|
"aria-live": "polite",
|
|
@@ -13817,20 +13866,20 @@ function Toaster({
|
|
|
13817
13866
|
...{ [TOASTER_ATTRIBUTE]: "" },
|
|
13818
13867
|
className: (0, import_clsx101.default)(
|
|
13819
13868
|
"pointer-events-none fixed z-toast flex w-[calc(100%-2rem)] max-w-[380px] flex-col gap-2",
|
|
13820
|
-
|
|
13869
|
+
POSITION2[position]
|
|
13821
13870
|
),
|
|
13822
13871
|
style: {
|
|
13823
13872
|
"--toaster-offset": toLength(offset2),
|
|
13824
13873
|
"--toaster-mobile-offset": toLength(mobileOffset ?? offset2)
|
|
13825
13874
|
},
|
|
13826
|
-
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))
|
|
13827
13876
|
}
|
|
13828
13877
|
) })
|
|
13829
13878
|
] });
|
|
13830
13879
|
}
|
|
13831
13880
|
function ToastItem({ toast, onDismiss }) {
|
|
13832
13881
|
const tone = toast.tone ?? "info";
|
|
13833
|
-
return /* @__PURE__ */ (0,
|
|
13882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
13834
13883
|
"div",
|
|
13835
13884
|
{
|
|
13836
13885
|
role: tone === "danger" ? "alert" : "status",
|
|
@@ -13839,13 +13888,13 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
13839
13888
|
"bg-default p-4 shadow-400"
|
|
13840
13889
|
),
|
|
13841
13890
|
children: [
|
|
13842
|
-
/* @__PURE__ */ (0,
|
|
13843
|
-
/* @__PURE__ */ (0,
|
|
13844
|
-
/* @__PURE__ */ (0,
|
|
13845
|
-
toast.description && /* @__PURE__ */ (0,
|
|
13846
|
-
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 })
|
|
13847
13896
|
] }),
|
|
13848
|
-
/* @__PURE__ */ (0,
|
|
13897
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
13849
13898
|
IconButton,
|
|
13850
13899
|
{
|
|
13851
13900
|
variant: "subtle",
|
|
@@ -13853,7 +13902,7 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
13853
13902
|
"aria-label": typeof toast.title === "string" ? `Dismiss: ${toast.title}` : "Dismiss",
|
|
13854
13903
|
onClick: onDismiss,
|
|
13855
13904
|
className: "-mr-1 -mt-1 shrink-0",
|
|
13856
|
-
children: /* @__PURE__ */ (0,
|
|
13905
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react40.XIcon, { "aria-hidden": true, size: 14 })
|
|
13857
13906
|
}
|
|
13858
13907
|
)
|
|
13859
13908
|
]
|
|
@@ -13864,23 +13913,23 @@ function ToastItem({ toast, onDismiss }) {
|
|
|
13864
13913
|
// src/components/forms/password-input.tsx
|
|
13865
13914
|
var import_react85 = require("react");
|
|
13866
13915
|
var import_lucide_react41 = require("lucide-react");
|
|
13867
|
-
var
|
|
13916
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
13868
13917
|
var PasswordInput = (0, import_react85.forwardRef)(function PasswordInput2(props, ref) {
|
|
13869
13918
|
const [visible, setVisible] = (0, import_react85.useState)(false);
|
|
13870
|
-
return /* @__PURE__ */ (0,
|
|
13919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
13871
13920
|
Input,
|
|
13872
13921
|
{
|
|
13873
13922
|
ref,
|
|
13874
13923
|
...props,
|
|
13875
13924
|
type: visible ? "text" : "password",
|
|
13876
|
-
trailingAction: /* @__PURE__ */ (0,
|
|
13925
|
+
trailingAction: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
13877
13926
|
"button",
|
|
13878
13927
|
{
|
|
13879
13928
|
type: "button",
|
|
13880
13929
|
"aria-label": visible ? "Hide password" : "Show password",
|
|
13881
13930
|
onClick: () => setVisible((v) => !v),
|
|
13882
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",
|
|
13883
|
-
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" })
|
|
13884
13933
|
}
|
|
13885
13934
|
)
|
|
13886
13935
|
}
|
|
@@ -13890,12 +13939,12 @@ var PasswordInput = (0, import_react85.forwardRef)(function PasswordInput2(props
|
|
|
13890
13939
|
// src/components/ai/ai-chat-bar.tsx
|
|
13891
13940
|
var import_clsx102 = __toESM(require("clsx"), 1);
|
|
13892
13941
|
var import_lucide_react42 = require("lucide-react");
|
|
13893
|
-
var
|
|
13942
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
13894
13943
|
function AIChatBar({
|
|
13895
13944
|
placeholder = "Ask Intelligence about any entity, supplier, or risk\u2026",
|
|
13896
13945
|
className
|
|
13897
13946
|
}) {
|
|
13898
|
-
return /* @__PURE__ */ (0,
|
|
13947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(
|
|
13899
13948
|
"div",
|
|
13900
13949
|
{
|
|
13901
13950
|
className: (0, import_clsx102.default)(
|
|
@@ -13903,16 +13952,16 @@ function AIChatBar({
|
|
|
13903
13952
|
className
|
|
13904
13953
|
),
|
|
13905
13954
|
children: [
|
|
13906
|
-
/* @__PURE__ */ (0,
|
|
13907
|
-
/* @__PURE__ */ (0,
|
|
13908
|
-
/* @__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)(
|
|
13909
13958
|
"button",
|
|
13910
13959
|
{
|
|
13911
13960
|
type: "button",
|
|
13912
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",
|
|
13913
13962
|
children: [
|
|
13914
13963
|
"Ask",
|
|
13915
|
-
/* @__PURE__ */ (0,
|
|
13964
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react42.ArrowRightIcon, { "aria-hidden": true, className: "size-4" })
|
|
13916
13965
|
]
|
|
13917
13966
|
}
|
|
13918
13967
|
)
|
|
@@ -13924,9 +13973,9 @@ function AIChatBar({
|
|
|
13924
13973
|
// src/components/ai/ai-suggestion-chip.tsx
|
|
13925
13974
|
var import_clsx103 = __toESM(require("clsx"), 1);
|
|
13926
13975
|
var import_lucide_react43 = require("lucide-react");
|
|
13927
|
-
var
|
|
13976
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
13928
13977
|
function AISuggestionChip({ prompt, onClick, className }) {
|
|
13929
|
-
return /* @__PURE__ */ (0,
|
|
13978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
13930
13979
|
"button",
|
|
13931
13980
|
{
|
|
13932
13981
|
type: "button",
|
|
@@ -13936,9 +13985,9 @@ function AISuggestionChip({ prompt, onClick, className }) {
|
|
|
13936
13985
|
className
|
|
13937
13986
|
),
|
|
13938
13987
|
children: [
|
|
13939
|
-
/* @__PURE__ */ (0,
|
|
13940
|
-
/* @__PURE__ */ (0,
|
|
13941
|
-
/* @__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 }) })
|
|
13942
13991
|
]
|
|
13943
13992
|
}
|
|
13944
13993
|
);
|
|
@@ -13946,18 +13995,18 @@ function AISuggestionChip({ prompt, onClick, className }) {
|
|
|
13946
13995
|
|
|
13947
13996
|
// src/components/ai/quick-actions-bar.tsx
|
|
13948
13997
|
var import_clsx104 = __toESM(require("clsx"), 1);
|
|
13949
|
-
var
|
|
13998
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
13950
13999
|
function QuickActionsBar({ actions, active, onSelect, className }) {
|
|
13951
|
-
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) => {
|
|
13952
14001
|
const isActive = active === action.value;
|
|
13953
|
-
return /* @__PURE__ */ (0,
|
|
14002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
13954
14003
|
"button",
|
|
13955
14004
|
{
|
|
13956
14005
|
type: "button",
|
|
13957
14006
|
"aria-pressed": isActive,
|
|
13958
14007
|
onClick: () => onSelect?.(action.value),
|
|
13959
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",
|
|
13960
|
-
children: /* @__PURE__ */ (0,
|
|
14009
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(TagPill, { label: action.label, tone: isActive ? "brand" : "default" })
|
|
13961
14010
|
},
|
|
13962
14011
|
action.value
|
|
13963
14012
|
);
|
|
@@ -13967,23 +14016,23 @@ function QuickActionsBar({ actions, active, onSelect, className }) {
|
|
|
13967
14016
|
// src/components/ai/chat.tsx
|
|
13968
14017
|
var import_clsx105 = __toESM(require("clsx"), 1);
|
|
13969
14018
|
var import_lucide_react44 = require("lucide-react");
|
|
13970
|
-
var
|
|
14019
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
13971
14020
|
function AiAvatar({ className, icon }) {
|
|
13972
|
-
return /* @__PURE__ */ (0,
|
|
14021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
13973
14022
|
"span",
|
|
13974
14023
|
{
|
|
13975
14024
|
"aria-hidden": true,
|
|
13976
14025
|
className: cn("flex size-8 shrink-0 items-center justify-center rounded-full bg-brand text-icon-brand-on-brand", className),
|
|
13977
|
-
children: icon ?? /* @__PURE__ */ (0,
|
|
14026
|
+
children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_lucide_react44.CpuIcon, { className: "size-3.5" })
|
|
13978
14027
|
}
|
|
13979
14028
|
);
|
|
13980
14029
|
}
|
|
13981
14030
|
function TypingIndicator({ label = "Assistant is typing", className }) {
|
|
13982
|
-
return /* @__PURE__ */ (0,
|
|
13983
|
-
/* @__PURE__ */ (0,
|
|
13984
|
-
/* @__PURE__ */ (0,
|
|
13985
|
-
/* @__PURE__ */ (0,
|
|
13986
|
-
/* @__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)(
|
|
13987
14036
|
"span",
|
|
13988
14037
|
{
|
|
13989
14038
|
className: "inline-block size-1.5 rounded-full bg-default-tertiary motion-safe:animate-bounce",
|
|
@@ -13996,9 +14045,9 @@ function TypingIndicator({ label = "Assistant is typing", className }) {
|
|
|
13996
14045
|
}
|
|
13997
14046
|
function ChatBubble({ sender, children, failed = false, className }) {
|
|
13998
14047
|
if (sender === "user") {
|
|
13999
|
-
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 }) });
|
|
14000
14049
|
}
|
|
14001
|
-
return /* @__PURE__ */ (0,
|
|
14050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
14002
14051
|
"div",
|
|
14003
14052
|
{
|
|
14004
14053
|
"data-sender": "assistant",
|
|
@@ -14017,17 +14066,17 @@ function ChatBubble({ sender, children, failed = false, className }) {
|
|
|
14017
14066
|
}
|
|
14018
14067
|
|
|
14019
14068
|
// src/components/decorative/aurora-backdrop.tsx
|
|
14020
|
-
var
|
|
14069
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
14021
14070
|
function blob(primitive, alpha) {
|
|
14022
14071
|
return `radial-gradient(ellipse, color-mix(in srgb, var(${primitive}) ${alpha}%, transparent) 0%, transparent 70%)`;
|
|
14023
14072
|
}
|
|
14024
14073
|
function AuroraBackdrop() {
|
|
14025
|
-
return /* @__PURE__ */ (0,
|
|
14026
|
-
/* @__PURE__ */ (0,
|
|
14027
|
-
/* @__PURE__ */ (0,
|
|
14028
|
-
/* @__PURE__ */ (0,
|
|
14029
|
-
/* @__PURE__ */ (0,
|
|
14030
|
-
/* @__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) } })
|
|
14031
14080
|
] });
|
|
14032
14081
|
}
|
|
14033
14082
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -14262,6 +14311,7 @@ function AuroraBackdrop() {
|
|
|
14262
14311
|
SegmentedControl,
|
|
14263
14312
|
Select,
|
|
14264
14313
|
SelectControl,
|
|
14314
|
+
SelectionBar,
|
|
14265
14315
|
Separator,
|
|
14266
14316
|
Sidebar,
|
|
14267
14317
|
SidebarProvider,
|