@platned/ui 1.0.0 → 1.1.1
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/README.md +30 -7
- package/dist/blocks-charts.cjs +1 -0
- package/dist/blocks-charts.cjs.map +1 -1
- package/dist/blocks-charts.js +2 -0
- package/dist/blocks-charts.js.map +1 -1
- package/dist/blocks.cjs +282 -186
- package/dist/blocks.cjs.map +1 -1
- package/dist/blocks.d.cts +85 -5
- package/dist/blocks.d.ts +85 -5
- package/dist/blocks.js +280 -169
- package/dist/blocks.js.map +1 -1
- package/dist/chart.cjs +1 -0
- package/dist/chart.cjs.map +1 -1
- package/dist/chart.d.ts +1 -1
- package/dist/chart.js +2 -1
- package/dist/chart.js.map +1 -1
- package/dist/{chunk-327NSKZW.js → chunk-6BJ3OMUZ.js} +4 -3
- package/dist/{chunk-327NSKZW.js.map → chunk-6BJ3OMUZ.js.map} +1 -1
- package/dist/{chunk-GJJWRZ4B.js → chunk-7RXFHQL5.js} +4 -3
- package/dist/{chunk-GJJWRZ4B.js.map → chunk-7RXFHQL5.js.map} +1 -1
- package/dist/{chunk-2L5XAYNK.js → chunk-MJC4A7I4.js} +3 -1
- package/dist/{chunk-2L5XAYNK.js.map → chunk-MJC4A7I4.js.map} +1 -1
- package/dist/{chunk-WGCAQEZ4.js → chunk-QYFD7KIK.js} +3 -2
- package/dist/{chunk-WGCAQEZ4.js.map → chunk-QYFD7KIK.js.map} +1 -1
- package/dist/code-block-highlight.cjs +1 -0
- package/dist/code-block-highlight.cjs.map +1 -1
- package/dist/code-block-highlight.js +4 -3
- package/dist/code-block-highlight.js.map +1 -1
- package/dist/{data-table-Dec6t8NO.d.ts → data-table-CcIINjPg.d.ts} +30 -3
- package/dist/data-table.cjs +200 -124
- package/dist/data-table.cjs.map +1 -1
- package/dist/data-table.d.ts +1 -1
- package/dist/data-table.js +156 -79
- package/dist/data-table.js.map +1 -1
- package/dist/index.cjs +10632 -7124
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +204 -8
- package/dist/index.js +5933 -2507
- package/dist/index.js.map +1 -1
- package/dist/map.cjs +1 -0
- package/dist/map.cjs.map +1 -1
- package/dist/map.d.cts +2 -0
- package/dist/map.d.ts +2 -0
- package/dist/map.js +6 -0
- package/dist/map.js.map +1 -1
- package/package.json +2 -7
package/dist/blocks.cjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
@@ -37,11 +38,11 @@ __export(blocks_exports, {
|
|
|
37
38
|
Dashboard: () => Dashboard,
|
|
38
39
|
DashboardWidgetView: () => DashboardWidgetView,
|
|
39
40
|
DataGrid: () => DataGrid,
|
|
40
|
-
DataTable: () =>
|
|
41
|
-
DataTableFacetedFilter: () =>
|
|
41
|
+
DataTable: () => import__44.DataTable,
|
|
42
|
+
DataTableFacetedFilter: () => import__44.DataTableFacetedFilter,
|
|
42
43
|
DetailSections: () => DetailSections,
|
|
43
44
|
Form: () => Form,
|
|
44
|
-
FormatProvider: () =>
|
|
45
|
+
FormatProvider: () => import__45.FormatProvider,
|
|
45
46
|
FullscreenDialog: () => FullscreenDialog,
|
|
46
47
|
HEIGHT_ROWS: () => HEIGHT_ROWS,
|
|
47
48
|
Heatmap: () => Heatmap,
|
|
@@ -53,25 +54,26 @@ __export(blocks_exports, {
|
|
|
53
54
|
RankedList: () => RankedList,
|
|
54
55
|
RecordPage: () => RecordPage,
|
|
55
56
|
SettingsDialog: () => SettingsDialog,
|
|
57
|
+
ShortcutsDialog: () => ShortcutsDialog,
|
|
56
58
|
StatCard: () => StatCard,
|
|
57
59
|
StatCards: () => StatCards,
|
|
58
60
|
TIER_COLUMNS: () => TIER_COLUMNS,
|
|
59
61
|
TableCard: () => TableCard,
|
|
60
|
-
Value: () =>
|
|
62
|
+
Value: () => import__45.Value,
|
|
61
63
|
chartColor: () => chartColor,
|
|
62
64
|
coerceSize: () => coerceSize,
|
|
63
|
-
formatValue: () =>
|
|
64
|
-
getValueAt: () =>
|
|
65
|
-
humanize: () =>
|
|
66
|
-
isEmptyValue: () =>
|
|
67
|
-
isNumericType: () =>
|
|
65
|
+
formatValue: () => import__45.formatValue,
|
|
66
|
+
getValueAt: () => import__45.getValueAt,
|
|
67
|
+
humanize: () => import__45.humanize,
|
|
68
|
+
isEmptyValue: () => import__45.isEmptyValue,
|
|
69
|
+
isNumericType: () => import__45.isNumericType,
|
|
68
70
|
linkAdapter: () => linkAdapter,
|
|
69
71
|
moveItem: () => moveItem,
|
|
70
|
-
renderValue: () =>
|
|
72
|
+
renderValue: () => import__45.renderValue,
|
|
71
73
|
resolveIcon: () => resolveIcon,
|
|
72
74
|
sizeLabel: () => sizeLabel,
|
|
73
75
|
useDependentOptions: () => useDependentOptions,
|
|
74
|
-
useFormat: () =>
|
|
76
|
+
useFormat: () => import__45.useFormat,
|
|
75
77
|
widgetSizes: () => widgetSizes,
|
|
76
78
|
widgetTitle: () => widgetTitle
|
|
77
79
|
});
|
|
@@ -111,23 +113,34 @@ function MenuItems({
|
|
|
111
113
|
Link = PlainLink,
|
|
112
114
|
can
|
|
113
115
|
}) {
|
|
114
|
-
const
|
|
116
|
+
const allowed = (item) => !item.permission || !can || can(item.permission);
|
|
117
|
+
const visible = items.filter(
|
|
118
|
+
(item) => allowed(item) && (!item.items || item.items.some(allowed))
|
|
119
|
+
);
|
|
115
120
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: visible.map((item, index) => {
|
|
116
121
|
const content = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
117
122
|
resolveIcon(item.icon, icons),
|
|
118
123
|
item.label
|
|
119
124
|
] });
|
|
125
|
+
const variant = item.destructive ? "destructive" : "default";
|
|
126
|
+
let entry;
|
|
127
|
+
if (item.items) {
|
|
128
|
+
const choices = item.value !== void 0;
|
|
129
|
+
entry = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.DropdownMenuSub, { children: [
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DropdownMenuSubTrigger, { children: content }),
|
|
131
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DropdownMenuSubContent, { children: choices ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DropdownMenuRadioGroup, { value: item.value, onValueChange: (value) => item.onValueChange?.(value), children: item.items.filter(allowed).map((choice) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.DropdownMenuRadioItem, { value: choice.value ?? choice.label, children: [
|
|
132
|
+
resolveIcon(choice.icon, icons),
|
|
133
|
+
choice.label
|
|
134
|
+
] }, choice.value ?? choice.label)) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MenuItems, { items: item.items, icons, Link, can }) })
|
|
135
|
+
] });
|
|
136
|
+
} else if (item.href) {
|
|
137
|
+
entry = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DropdownMenuItem, { asChild: true, variant, shortcut: item.shortcut, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { href: item.href, children: content }) });
|
|
138
|
+
} else {
|
|
139
|
+
entry = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DropdownMenuItem, { variant, shortcut: item.shortcut, onSelect: () => item.onSelect?.(), children: content });
|
|
140
|
+
}
|
|
120
141
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [
|
|
121
142
|
item.separator && index > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.DropdownMenuSeparator, {}),
|
|
122
|
-
|
|
123
|
-
import__.DropdownMenuItem,
|
|
124
|
-
{
|
|
125
|
-
variant: item.destructive ? "destructive" : "default",
|
|
126
|
-
shortcut: item.shortcut,
|
|
127
|
-
onSelect: () => item.onSelect?.(),
|
|
128
|
-
children: content
|
|
129
|
-
}
|
|
130
|
-
)
|
|
143
|
+
entry
|
|
131
144
|
] }, `${item.label}-${index}`);
|
|
132
145
|
}) });
|
|
133
146
|
}
|
|
@@ -667,6 +680,7 @@ function AppShell({
|
|
|
667
680
|
breadcrumbs,
|
|
668
681
|
actions,
|
|
669
682
|
search,
|
|
683
|
+
page: pageMode = "padded",
|
|
670
684
|
defaultCollapsed = false,
|
|
671
685
|
children,
|
|
672
686
|
className
|
|
@@ -813,7 +827,8 @@ function AppShell({
|
|
|
813
827
|
crumbs,
|
|
814
828
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "ms-auto flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Search, { search }) })
|
|
815
829
|
] });
|
|
816
|
-
const
|
|
830
|
+
const fill = pageMode === "fill";
|
|
831
|
+
const page = fill ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { "data-slot": "app-shell-page", className: "flex min-h-0 flex-1 flex-col overflow-y-auto", children }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { "data-slot": "app-shell-page", className: "flex flex-1 flex-col gap-6 p-4 md:p-6", children: [
|
|
817
832
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PageTitle, { title: pageTitle, description, actions: actionNodes }),
|
|
818
833
|
children
|
|
819
834
|
] });
|
|
@@ -842,6 +857,7 @@ function AppShell({
|
|
|
842
857
|
user,
|
|
843
858
|
can,
|
|
844
859
|
search,
|
|
860
|
+
fill,
|
|
845
861
|
crumbs,
|
|
846
862
|
title: pageTitle,
|
|
847
863
|
description,
|
|
@@ -888,7 +904,7 @@ function AppShell({
|
|
|
888
904
|
style: variant === "nested" ? { "--sidebar-width": "22rem" } : void 0,
|
|
889
905
|
children: [
|
|
890
906
|
side === "left" && sidebarNode,
|
|
891
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import__3.SidebarInset, { children: [
|
|
907
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import__3.SidebarInset, { className: fill ? "h-svh overflow-hidden" : void 0, children: [
|
|
892
908
|
header,
|
|
893
909
|
page
|
|
894
910
|
] }),
|
|
@@ -907,6 +923,7 @@ function TopNavShell({
|
|
|
907
923
|
user,
|
|
908
924
|
can,
|
|
909
925
|
search,
|
|
926
|
+
fill,
|
|
910
927
|
crumbs,
|
|
911
928
|
title,
|
|
912
929
|
description,
|
|
@@ -937,7 +954,7 @@ function TopNavShell({
|
|
|
937
954
|
item.id ?? item.to ?? item.label
|
|
938
955
|
);
|
|
939
956
|
};
|
|
940
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: (0, import__3.cn)("flex
|
|
957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: (0, import__3.cn)("flex flex-col bg-background", fill ? "h-svh overflow-hidden" : "min-h-svh", className), children: [
|
|
941
958
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "sticky top-0 z-sticky flex h-14 items-center gap-4 border-b bg-background/95 px-4 backdrop-blur md:px-6", children: [
|
|
942
959
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
943
960
|
import__3.Drawer,
|
|
@@ -970,7 +987,7 @@ function TopNavShell({
|
|
|
970
987
|
)
|
|
971
988
|
] })
|
|
972
989
|
] }),
|
|
973
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("main", { className: "mx-auto flex w-full max-w-7xl flex-1 flex-col gap-6 p-4 md:p-6", children: [
|
|
990
|
+
fill ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("main", { "data-slot": "app-shell-page", className: "flex min-h-0 flex-1 flex-col overflow-y-auto", children }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("main", { "data-slot": "app-shell-page", className: "mx-auto flex w-full max-w-7xl flex-1 flex-col gap-6 p-4 md:p-6", children: [
|
|
974
991
|
crumbs,
|
|
975
992
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PageTitle, { title, description, actions }),
|
|
976
993
|
children
|
|
@@ -3592,8 +3609,8 @@ function ListDetail({
|
|
|
3592
3609
|
}
|
|
3593
3610
|
|
|
3594
3611
|
// src/blocks/index.tsx
|
|
3595
|
-
var import__43 = require("./index.cjs");
|
|
3596
3612
|
var import__44 = require("./index.cjs");
|
|
3613
|
+
var import__45 = require("./index.cjs");
|
|
3597
3614
|
|
|
3598
3615
|
// src/blocks/kanban.tsx
|
|
3599
3616
|
var import_react16 = require("react");
|
|
@@ -7272,10 +7289,14 @@ function DetailRow({
|
|
|
7272
7289
|
const { span, copy, hint, permission: _permission, ...valueField } = field;
|
|
7273
7290
|
const label = field.label ?? (0, import__38.humanize)(String(field.key));
|
|
7274
7291
|
const raw = (0, import__38.getValueAt)(record, String(field.key));
|
|
7275
|
-
const value =
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7292
|
+
const value = (
|
|
7293
|
+
// max-w-full and min-w-0: in the rows layout the value is end-aligned, so nothing else stops a long one
|
|
7294
|
+
// (an email, a URL) from running over its label; this way it wraps, or truncates where its type does.
|
|
7295
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "inline-flex max-w-full min-w-0 items-center gap-1", children: [
|
|
7296
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import__38.Value, { row: record, field: valueField, className: "min-w-0 break-words" }),
|
|
7297
|
+
copy && !(0, import__38.isEmptyValue)(raw) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CopyValue, { value: String(raw), label })
|
|
7298
|
+
] })
|
|
7299
|
+
);
|
|
7279
7300
|
if (layout === "rows") {
|
|
7280
7301
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { "data-slot": "detail-row", className: "flex items-start justify-between gap-4 py-2.5 first:pt-0 last:pb-0", children: [
|
|
7281
7302
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("dt", { className: "shrink-0 text-muted-foreground", children: label }),
|
|
@@ -7426,24 +7447,98 @@ function BannerAction({
|
|
|
7426
7447
|
);
|
|
7427
7448
|
}
|
|
7428
7449
|
|
|
7429
|
-
// src/blocks/
|
|
7450
|
+
// src/blocks/shortcuts-dialog.tsx
|
|
7430
7451
|
var import_react24 = require("react");
|
|
7431
|
-
var import_lucide_react18 = require("lucide-react");
|
|
7432
7452
|
var import__40 = require("./index.cjs");
|
|
7433
7453
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
7454
|
+
var APPLE_KEYS = { Mod: "\u2318", Alt: "\u2325", Shift: "\u21E7", Ctrl: "\u2303", Enter: "\u21A9" };
|
|
7455
|
+
var OTHER_KEYS = { Mod: "Ctrl" };
|
|
7456
|
+
var keyName = (key, apple) => key === "Mod" ? apple ? "Command" : "Control" : key === "Alt" && apple ? "Option" : key;
|
|
7457
|
+
var subscribeNever = () => () => {
|
|
7458
|
+
};
|
|
7459
|
+
var isApple = () => /Mac|iPhone|iPad/.test(navigator.userAgent);
|
|
7460
|
+
function isEditable(target) {
|
|
7461
|
+
if (!(target instanceof HTMLElement)) return false;
|
|
7462
|
+
return target.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(target.tagName);
|
|
7463
|
+
}
|
|
7464
|
+
function Combo({ keys, apple }) {
|
|
7465
|
+
const shown = keys.map((key) => (apple ? APPLE_KEYS : OTHER_KEYS)[key] ?? key);
|
|
7466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
7467
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import__40.KbdGroup, { "aria-hidden": true, children: shown.map((key, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import__40.Kbd, { children: key }, `${key}-${i}`)) }),
|
|
7468
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: keys.map((key) => keyName(key, apple)).join(" + ") })
|
|
7469
|
+
] });
|
|
7470
|
+
}
|
|
7471
|
+
function ShortcutsDialog({
|
|
7472
|
+
groups,
|
|
7473
|
+
title = "Keyboard shortcuts",
|
|
7474
|
+
description,
|
|
7475
|
+
hotkey = "?",
|
|
7476
|
+
open,
|
|
7477
|
+
defaultOpen = false,
|
|
7478
|
+
onOpenChange,
|
|
7479
|
+
trigger,
|
|
7480
|
+
modal
|
|
7481
|
+
}) {
|
|
7482
|
+
const [ownOpen, setOwnOpen] = (0, import_react24.useState)(defaultOpen);
|
|
7483
|
+
const isOpen = open ?? ownOpen;
|
|
7484
|
+
const setOpen = (next) => {
|
|
7485
|
+
if (open === void 0) setOwnOpen(next);
|
|
7486
|
+
onOpenChange?.(next);
|
|
7487
|
+
};
|
|
7488
|
+
const apple = (0, import_react24.useSyncExternalStore)(subscribeNever, isApple, () => false);
|
|
7489
|
+
(0, import_react24.useEffect)(() => {
|
|
7490
|
+
if (!hotkey) return;
|
|
7491
|
+
const onKeyDown = (event) => {
|
|
7492
|
+
if (event.key !== hotkey || event.ctrlKey || event.metaKey || event.altKey || isEditable(event.target)) return;
|
|
7493
|
+
event.preventDefault();
|
|
7494
|
+
if (open === void 0) setOwnOpen(true);
|
|
7495
|
+
onOpenChange?.(true);
|
|
7496
|
+
};
|
|
7497
|
+
document.addEventListener("keydown", onKeyDown);
|
|
7498
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
7499
|
+
}, [hotkey, open, onOpenChange]);
|
|
7500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import__40.Dialog, { open: isOpen, onOpenChange: setOpen, modal, children: [
|
|
7501
|
+
trigger && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import__40.DialogTrigger, { asChild: true, children: trigger }),
|
|
7502
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import__40.DialogContent, { "data-slot": "shortcuts-dialog", className: "sm:max-w-lg", children: [
|
|
7503
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import__40.DialogHeader, { children: [
|
|
7504
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import__40.DialogTitle, { children: title }),
|
|
7505
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import__40.DialogDescription, { children: description })
|
|
7506
|
+
] }),
|
|
7507
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import__40.ScrollArea, { className: "-mx-4 max-h-[60vh] px-4", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex flex-col gap-5", children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("section", { "aria-label": group.title, className: "flex flex-col gap-1", children: [
|
|
7508
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h3", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide", children: group.title }),
|
|
7509
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("dl", { className: "divide-y", children: group.shortcuts.map((shortcut) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center justify-between gap-4 py-2 text-sm", children: [
|
|
7510
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("dt", { children: shortcut.label }),
|
|
7511
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("dd", { className: "flex shrink-0 items-center gap-1.5 text-muted-foreground", children: [
|
|
7512
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Combo, { keys: shortcut.keys, apple }),
|
|
7513
|
+
shortcut.alt && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react24.Fragment, { children: [
|
|
7514
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-xs", children: "or" }),
|
|
7515
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Combo, { keys: shortcut.alt, apple })
|
|
7516
|
+
] })
|
|
7517
|
+
] })
|
|
7518
|
+
] }, shortcut.label)) })
|
|
7519
|
+
] }, group.title)) }) })
|
|
7520
|
+
] })
|
|
7521
|
+
] });
|
|
7522
|
+
}
|
|
7523
|
+
|
|
7524
|
+
// src/blocks/confirm-dialog.tsx
|
|
7525
|
+
var import_react25 = require("react");
|
|
7526
|
+
var import_lucide_react18 = require("lucide-react");
|
|
7527
|
+
var import__41 = require("./index.cjs");
|
|
7528
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
7434
7529
|
var TONE_ICON = {
|
|
7435
7530
|
default: null,
|
|
7436
|
-
destructive: /* @__PURE__ */ (0,
|
|
7437
|
-
success: /* @__PURE__ */ (0,
|
|
7438
|
-
warning: /* @__PURE__ */ (0,
|
|
7439
|
-
info: /* @__PURE__ */ (0,
|
|
7531
|
+
destructive: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react18.CircleAlertIcon, {}),
|
|
7532
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react18.CircleCheckIcon, {}),
|
|
7533
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react18.TriangleAlertIcon, {}),
|
|
7534
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react18.InfoIcon, {})
|
|
7440
7535
|
};
|
|
7441
7536
|
var SUMMARY_ICON = {
|
|
7442
|
-
success: /* @__PURE__ */ (0,
|
|
7443
|
-
warning: /* @__PURE__ */ (0,
|
|
7444
|
-
error: /* @__PURE__ */ (0,
|
|
7445
|
-
neutral: /* @__PURE__ */ (0,
|
|
7446
|
-
skipped: /* @__PURE__ */ (0,
|
|
7537
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react18.CircleCheckIcon, { "aria-hidden": true, className: "size-4 text-success" }),
|
|
7538
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react18.TriangleAlertIcon, { "aria-hidden": true, className: "size-4 text-warning" }),
|
|
7539
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react18.CircleAlertIcon, { "aria-hidden": true, className: "size-4 text-destructive" }),
|
|
7540
|
+
neutral: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react18.CircleIcon, { "aria-hidden": true, className: "size-4 text-muted-foreground" }),
|
|
7541
|
+
skipped: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react18.CircleMinusIcon, { "aria-hidden": true, className: "size-4 text-muted-foreground" })
|
|
7447
7542
|
};
|
|
7448
7543
|
var SUMMARY_LABEL = {
|
|
7449
7544
|
success: "Passed",
|
|
@@ -7481,24 +7576,24 @@ function ConfirmDialog({
|
|
|
7481
7576
|
modal = true,
|
|
7482
7577
|
linkComponent: Link = PlainLink
|
|
7483
7578
|
}) {
|
|
7484
|
-
const [innerOpen, setInnerOpen] = (0,
|
|
7579
|
+
const [innerOpen, setInnerOpen] = (0, import_react25.useState)(defaultOpen);
|
|
7485
7580
|
const open = openProp ?? innerOpen;
|
|
7486
|
-
const [note, setNote] = (0,
|
|
7487
|
-
const [checked, setChecked] = (0,
|
|
7488
|
-
const [touched, setTouched] = (0,
|
|
7489
|
-
const [busy, setBusy] = (0,
|
|
7490
|
-
const [error, setError] = (0,
|
|
7491
|
-
const [check, setCheck] = (0,
|
|
7492
|
-
const blockersRef = (0,
|
|
7581
|
+
const [note, setNote] = (0, import_react25.useState)("");
|
|
7582
|
+
const [checked, setChecked] = (0, import_react25.useState)(checklist?.defaultChecked ?? []);
|
|
7583
|
+
const [touched, setTouched] = (0, import_react25.useState)(false);
|
|
7584
|
+
const [busy, setBusy] = (0, import_react25.useState)(false);
|
|
7585
|
+
const [error, setError] = (0, import_react25.useState)();
|
|
7586
|
+
const [check, setCheck] = (0, import_react25.useState)({ state: "idle" });
|
|
7587
|
+
const blockersRef = (0, import_react25.useRef)(blockers);
|
|
7493
7588
|
blockersRef.current = blockers;
|
|
7494
|
-
const ids = (0,
|
|
7495
|
-
const cancelRef = (0,
|
|
7589
|
+
const ids = (0, import_react25.useId)();
|
|
7590
|
+
const cancelRef = (0, import_react25.useRef)(null);
|
|
7496
7591
|
const setOpen = (next) => {
|
|
7497
7592
|
if (!next && busy) return;
|
|
7498
7593
|
if (openProp === void 0) setInnerOpen(next);
|
|
7499
7594
|
onOpenChange?.(next);
|
|
7500
7595
|
};
|
|
7501
|
-
(0,
|
|
7596
|
+
(0, import_react25.useEffect)(() => {
|
|
7502
7597
|
if (!open) return;
|
|
7503
7598
|
setNote("");
|
|
7504
7599
|
setChecked(checklist?.defaultChecked ?? []);
|
|
@@ -7557,68 +7652,68 @@ function ConfirmDialog({
|
|
|
7557
7652
|
}
|
|
7558
7653
|
setOpen(false);
|
|
7559
7654
|
};
|
|
7560
|
-
return /* @__PURE__ */ (0,
|
|
7561
|
-
trigger && /* @__PURE__ */ (0,
|
|
7562
|
-
/* @__PURE__ */ (0,
|
|
7563
|
-
|
|
7655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import__41.Dialog, { open, onOpenChange: setOpen, modal, children: [
|
|
7656
|
+
trigger && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import__41.DialogTrigger, { asChild: true, children: trigger }),
|
|
7657
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
7658
|
+
import__41.DialogContent,
|
|
7564
7659
|
{
|
|
7565
7660
|
role: "alertdialog",
|
|
7566
7661
|
"data-slot": "confirm-dialog",
|
|
7567
7662
|
"data-size": "default",
|
|
7568
7663
|
showCloseButton: false,
|
|
7569
7664
|
initialFocus: cancelRef,
|
|
7570
|
-
className: (0,
|
|
7665
|
+
className: (0, import__41.cn)("group/alert-dialog-content", size === "lg" && "sm:max-w-lg"),
|
|
7571
7666
|
onEscapeKeyDown: (event) => busy && event.preventDefault(),
|
|
7572
7667
|
onPointerDownOutside: (event) => event.preventDefault(),
|
|
7573
7668
|
onInteractOutside: (event) => event.preventDefault(),
|
|
7574
7669
|
children: [
|
|
7575
|
-
/* @__PURE__ */ (0,
|
|
7576
|
-
glyph && /* @__PURE__ */ (0,
|
|
7577
|
-
/* @__PURE__ */ (0,
|
|
7578
|
-
description !== void 0 && /* @__PURE__ */ (0,
|
|
7670
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import__41.AlertDialogHeader, { className: "sm:has-data-[slot=alert-dialog-media]:grid-cols-[auto_1fr]", children: [
|
|
7671
|
+
glyph && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import__41.AlertDialogMedia, { tone: blocked ? "warning" : tone, children: glyph }),
|
|
7672
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import__41.DialogTitle, { className: "leading-normal sm:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", children: title }),
|
|
7673
|
+
description !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import__41.DialogDescription, { className: "text-balance md:text-pretty", children: description })
|
|
7579
7674
|
] }),
|
|
7580
|
-
checking && /* @__PURE__ */ (0,
|
|
7581
|
-
/* @__PURE__ */ (0,
|
|
7675
|
+
checking && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { role: "status", className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
7676
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import__41.Spinner, { className: "size-4" }),
|
|
7582
7677
|
checkingLabel
|
|
7583
7678
|
] }),
|
|
7584
|
-
check.state === "error" && /* @__PURE__ */ (0,
|
|
7585
|
-
blocked && /* @__PURE__ */ (0,
|
|
7586
|
-
/* @__PURE__ */ (0,
|
|
7587
|
-
/* @__PURE__ */ (0,
|
|
7588
|
-
blockedDescription && /* @__PURE__ */ (0,
|
|
7679
|
+
check.state === "error" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import__41.Alert, { variant: "destructive", title: "Couldn't check", description: check.message }),
|
|
7680
|
+
blocked && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { "data-slot": "confirm-dialog-blockers", className: "flex flex-col gap-2 text-sm", children: [
|
|
7681
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
|
|
7682
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "font-medium", children: blockedTitle }),
|
|
7683
|
+
blockedDescription && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-muted-foreground", children: blockedDescription })
|
|
7589
7684
|
] }),
|
|
7590
|
-
/* @__PURE__ */ (0,
|
|
7591
|
-
blocker.href ? /* @__PURE__ */ (0,
|
|
7685
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import__41.ScrollArea, { className: "max-h-48 rounded-lg border", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("ul", { className: "divide-y", children: check.blockers.map((blocker) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("li", { className: "flex flex-col gap-0.5 px-3 py-2", children: [
|
|
7686
|
+
blocker.href ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
7592
7687
|
Link,
|
|
7593
7688
|
{
|
|
7594
7689
|
href: blocker.href,
|
|
7595
7690
|
className: "w-fit rounded-sm font-medium underline-offset-4 outline-none hover:underline focus-visible:ring-3 focus-visible:ring-ring/50",
|
|
7596
7691
|
children: blocker.label
|
|
7597
7692
|
}
|
|
7598
|
-
) : /* @__PURE__ */ (0,
|
|
7599
|
-
blocker.description && /* @__PURE__ */ (0,
|
|
7693
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-medium", children: blocker.label }),
|
|
7694
|
+
blocker.description && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-muted-foreground", children: blocker.description })
|
|
7600
7695
|
] }, blocker.id ?? blocker.label)) }) })
|
|
7601
7696
|
] }),
|
|
7602
|
-
!blocked && !checking && check.state !== "error" && /* @__PURE__ */ (0,
|
|
7603
|
-
summary && /* @__PURE__ */ (0,
|
|
7604
|
-
summary.label && /* @__PURE__ */ (0,
|
|
7605
|
-
/* @__PURE__ */ (0,
|
|
7697
|
+
!blocked && !checking && check.state !== "error" && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
7698
|
+
summary && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { "data-slot": "confirm-dialog-summary", className: "flex flex-col gap-2 text-sm", children: [
|
|
7699
|
+
summary.label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "font-medium", children: summary.label }),
|
|
7700
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("ul", { className: "flex flex-col divide-y rounded-lg border", children: summary.items.map((item) => {
|
|
7606
7701
|
const state = item.state ?? "neutral";
|
|
7607
|
-
return /* @__PURE__ */ (0,
|
|
7702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("li", { className: "flex items-center gap-2 px-3 py-2", children: [
|
|
7608
7703
|
SUMMARY_ICON[state],
|
|
7609
|
-
SUMMARY_LABEL[state] && /* @__PURE__ */ (0,
|
|
7704
|
+
SUMMARY_LABEL[state] && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "sr-only", children: [
|
|
7610
7705
|
SUMMARY_LABEL[state],
|
|
7611
7706
|
":"
|
|
7612
7707
|
] }),
|
|
7613
|
-
/* @__PURE__ */ (0,
|
|
7614
|
-
item.value !== void 0 && /* @__PURE__ */ (0,
|
|
7708
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: (0, import__41.cn)("min-w-0 flex-1", state === "skipped" && "text-muted-foreground"), children: item.label }),
|
|
7709
|
+
item.value !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-muted-foreground tabular-nums", children: item.value })
|
|
7615
7710
|
] }, item.label);
|
|
7616
7711
|
}) })
|
|
7617
7712
|
] }),
|
|
7618
|
-
checklist && /* @__PURE__ */ (0,
|
|
7619
|
-
/* @__PURE__ */ (0,
|
|
7620
|
-
/* @__PURE__ */ (0,
|
|
7621
|
-
|
|
7713
|
+
checklist && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import__41.FieldSet, { children: [
|
|
7714
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import__41.FieldLegend, { variant: "label", children: checklist.label ?? "Options" }),
|
|
7715
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex flex-col gap-3", children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
7716
|
+
import__41.Checkbox,
|
|
7622
7717
|
{
|
|
7623
7718
|
label: option.label,
|
|
7624
7719
|
description: option.description,
|
|
@@ -7629,15 +7724,15 @@ function ConfirmDialog({
|
|
|
7629
7724
|
},
|
|
7630
7725
|
option.value
|
|
7631
7726
|
)) }),
|
|
7632
|
-
touched && checklistError && /* @__PURE__ */ (0,
|
|
7727
|
+
touched && checklistError && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import__41.FieldError, { children: checklistError })
|
|
7633
7728
|
] }),
|
|
7634
|
-
reasonConfig && /* @__PURE__ */ (0,
|
|
7635
|
-
/* @__PURE__ */ (0,
|
|
7729
|
+
reasonConfig && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import__41.Field, { required: reasonConfig.required, id: `${ids}-reason`, children: [
|
|
7730
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import__41.FieldLabel, { children: [
|
|
7636
7731
|
reasonLabel,
|
|
7637
|
-
!reasonConfig.required && /* @__PURE__ */ (0,
|
|
7732
|
+
!reasonConfig.required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
|
|
7638
7733
|
] }),
|
|
7639
|
-
/* @__PURE__ */ (0,
|
|
7640
|
-
|
|
7734
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
7735
|
+
import__41.Textarea,
|
|
7641
7736
|
{
|
|
7642
7737
|
value: note,
|
|
7643
7738
|
placeholder: reasonConfig.placeholder,
|
|
@@ -7646,16 +7741,16 @@ function ConfirmDialog({
|
|
|
7646
7741
|
onChange: (event) => setNote(event.target.value)
|
|
7647
7742
|
}
|
|
7648
7743
|
),
|
|
7649
|
-
reasonConfig.description && /* @__PURE__ */ (0,
|
|
7650
|
-
/* @__PURE__ */ (0,
|
|
7744
|
+
reasonConfig.description && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import__41.FieldDescription, { children: reasonConfig.description }),
|
|
7745
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import__41.FieldError, { children: touched ? reasonError : void 0 })
|
|
7651
7746
|
] }),
|
|
7652
7747
|
children,
|
|
7653
|
-
error && /* @__PURE__ */ (0,
|
|
7748
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import__41.Alert, { variant: "destructive", description: error })
|
|
7654
7749
|
] }),
|
|
7655
|
-
/* @__PURE__ */ (0,
|
|
7656
|
-
/* @__PURE__ */ (0,
|
|
7657
|
-
!blocked && check.state !== "error" && /* @__PURE__ */ (0,
|
|
7658
|
-
|
|
7750
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import__41.AlertDialogFooter, { children: [
|
|
7751
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import__41.DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import__41.Button, { ref: cancelRef, variant: "outline", disabled: busy, children: blocked || check.state === "error" ? "Close" : cancelLabel }) }),
|
|
7752
|
+
!blocked && check.state !== "error" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
7753
|
+
import__41.Button,
|
|
7659
7754
|
{
|
|
7660
7755
|
variant,
|
|
7661
7756
|
disabled: checking,
|
|
@@ -7674,8 +7769,8 @@ function ConfirmDialog({
|
|
|
7674
7769
|
|
|
7675
7770
|
// src/blocks/fullscreen-dialog.tsx
|
|
7676
7771
|
var import_lucide_react19 = require("lucide-react");
|
|
7677
|
-
var
|
|
7678
|
-
var
|
|
7772
|
+
var import__42 = require("./index.cjs");
|
|
7773
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
7679
7774
|
var WIDTH = {
|
|
7680
7775
|
md: "max-w-3xl",
|
|
7681
7776
|
lg: "max-w-5xl",
|
|
@@ -7702,39 +7797,39 @@ function FullscreenDialog({
|
|
|
7702
7797
|
can,
|
|
7703
7798
|
className
|
|
7704
7799
|
}) {
|
|
7705
|
-
return /* @__PURE__ */ (0,
|
|
7706
|
-
trigger && /* @__PURE__ */ (0,
|
|
7707
|
-
/* @__PURE__ */ (0,
|
|
7708
|
-
|
|
7800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import__42.Dialog, { open, defaultOpen, onOpenChange, modal, children: [
|
|
7801
|
+
trigger && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import__42.DialogTrigger, { asChild: true, children: trigger }),
|
|
7802
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
7803
|
+
import__42.DialogContent,
|
|
7709
7804
|
{
|
|
7710
7805
|
"data-slot": "fullscreen-dialog",
|
|
7711
7806
|
showCloseButton: false,
|
|
7712
|
-
className: (0,
|
|
7807
|
+
className: (0, import__42.cn)(
|
|
7713
7808
|
"top-0 left-0 flex h-dvh w-full max-w-none translate-x-0 translate-y-0 flex-col gap-0 rounded-none bg-background p-0 ring-0 sm:max-w-none",
|
|
7714
7809
|
"data-open:zoom-in-100 data-open:slide-in-from-bottom-4 data-closed:zoom-out-100 data-closed:slide-out-to-bottom-4",
|
|
7715
7810
|
className
|
|
7716
7811
|
),
|
|
7717
7812
|
children: [
|
|
7718
|
-
/* @__PURE__ */ (0,
|
|
7719
|
-
/* @__PURE__ */ (0,
|
|
7720
|
-
/* @__PURE__ */ (0,
|
|
7721
|
-
/* @__PURE__ */ (0,
|
|
7722
|
-
description !== void 0 && /* @__PURE__ */ (0,
|
|
7813
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { "data-slot": "fullscreen-dialog-bar", className: "flex shrink-0 items-center gap-3 border-b px-4 py-3", children: [
|
|
7814
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import__42.DialogClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import__42.Button, { variant: "ghost", size: "icon-sm", "aria-label": closeLabel, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react19.XIcon, {}) }) }),
|
|
7815
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
7816
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import__42.DialogTitle, { className: "truncate text-base font-medium", children: title }),
|
|
7817
|
+
description !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import__42.DialogDescription, { className: "truncate text-sm text-muted-foreground", children: description })
|
|
7723
7818
|
] }),
|
|
7724
|
-
actions && actions.length > 0 && /* @__PURE__ */ (0,
|
|
7819
|
+
actions && actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Actions, { actions, onAction, icons, Link, can })
|
|
7725
7820
|
] }),
|
|
7726
|
-
/* @__PURE__ */ (0,
|
|
7727
|
-
/* @__PURE__ */ (0,
|
|
7728
|
-
aside && /* @__PURE__ */ (0,
|
|
7821
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: (0, import__42.cn)("flex min-h-0 flex-1 flex-col", aside && "lg:flex-row"), children: [
|
|
7822
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import__42.ScrollArea, { className: "min-h-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: (0, import__42.cn)("mx-auto w-full p-4 sm:p-6", WIDTH[width]), children }) }),
|
|
7823
|
+
aside && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
7729
7824
|
"aside",
|
|
7730
7825
|
{
|
|
7731
7826
|
"data-slot": "fullscreen-dialog-aside",
|
|
7732
7827
|
className: "shrink-0 border-t lg:w-80 lg:border-t-0 lg:border-s",
|
|
7733
|
-
children: /* @__PURE__ */ (0,
|
|
7828
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import__42.ScrollArea, { className: "h-full max-h-[40dvh] lg:max-h-none", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "p-4 sm:p-6", children: aside }) })
|
|
7734
7829
|
}
|
|
7735
7830
|
)
|
|
7736
7831
|
] }),
|
|
7737
|
-
footer !== void 0 && /* @__PURE__ */ (0,
|
|
7832
|
+
footer !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { "data-slot": "fullscreen-dialog-footer", className: "flex shrink-0 flex-wrap items-center justify-end gap-2 border-t bg-muted/50 px-4 py-3", children: footer })
|
|
7738
7833
|
]
|
|
7739
7834
|
}
|
|
7740
7835
|
)
|
|
@@ -7743,8 +7838,8 @@ function FullscreenDialog({
|
|
|
7743
7838
|
|
|
7744
7839
|
// src/blocks/person-card.tsx
|
|
7745
7840
|
var import_lucide_react20 = require("lucide-react");
|
|
7746
|
-
var
|
|
7747
|
-
var
|
|
7841
|
+
var import__43 = require("./index.cjs");
|
|
7842
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
7748
7843
|
var COVER = {
|
|
7749
7844
|
muted: "bg-muted",
|
|
7750
7845
|
brand: "bg-gradient-brand-w-e",
|
|
@@ -7763,7 +7858,7 @@ function PersonCard({
|
|
|
7763
7858
|
can,
|
|
7764
7859
|
className
|
|
7765
7860
|
}) {
|
|
7766
|
-
const name = person.href ? /* @__PURE__ */ (0,
|
|
7861
|
+
const name = person.href ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
7767
7862
|
Link,
|
|
7768
7863
|
{
|
|
7769
7864
|
href: person.href,
|
|
@@ -7772,89 +7867,89 @@ function PersonCard({
|
|
|
7772
7867
|
}
|
|
7773
7868
|
) : person.name;
|
|
7774
7869
|
const visibleFields = fields ?? [];
|
|
7775
|
-
const actionBar = actions && actions.length > 0 ? /* @__PURE__ */ (0,
|
|
7870
|
+
const actionBar = actions && actions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Actions, { actions, onAction: (id) => onAction?.(id, person), icons, Link, can, menuLabel: `Actions for ${person.name}` }) : null;
|
|
7776
7871
|
if (layout === "compact") {
|
|
7777
|
-
return /* @__PURE__ */ (0,
|
|
7778
|
-
/* @__PURE__ */ (0,
|
|
7779
|
-
/* @__PURE__ */ (0,
|
|
7780
|
-
/* @__PURE__ */ (0,
|
|
7781
|
-
(person.role || person.email) && /* @__PURE__ */ (0,
|
|
7872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { "data-slot": "person-card", "data-layout": "compact", className: (0, import__43.cn)("flex min-w-0 items-center gap-3", className), children: [
|
|
7873
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PersonAvatar, { name: person.name, image: person.image, presence: person.presence }),
|
|
7874
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex min-w-0 flex-col text-sm", children: [
|
|
7875
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "truncate font-medium", children: name }),
|
|
7876
|
+
(person.role || person.email) && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "truncate text-muted-foreground", children: person.role ?? person.email })
|
|
7782
7877
|
] }),
|
|
7783
|
-
actionBar && /* @__PURE__ */ (0,
|
|
7878
|
+
actionBar && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "ms-auto", children: actionBar })
|
|
7784
7879
|
] });
|
|
7785
7880
|
}
|
|
7786
7881
|
if (layout === "row") {
|
|
7787
|
-
return /* @__PURE__ */ (0,
|
|
7882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
7788
7883
|
"div",
|
|
7789
7884
|
{
|
|
7790
7885
|
"data-slot": "person-card",
|
|
7791
7886
|
"data-layout": "row",
|
|
7792
|
-
className: (0,
|
|
7887
|
+
className: (0, import__43.cn)("flex flex-wrap items-center gap-x-4 gap-y-2 text-sm sm:flex-nowrap", className),
|
|
7793
7888
|
children: [
|
|
7794
|
-
/* @__PURE__ */ (0,
|
|
7795
|
-
/* @__PURE__ */ (0,
|
|
7796
|
-
/* @__PURE__ */ (0,
|
|
7797
|
-
/* @__PURE__ */ (0,
|
|
7798
|
-
person.email && /* @__PURE__ */ (0,
|
|
7889
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
7890
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PersonAvatar, { name: person.name, image: person.image, presence: person.presence }),
|
|
7891
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex min-w-0 flex-col", children: [
|
|
7892
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "truncate font-medium", children: name }),
|
|
7893
|
+
person.email && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "truncate text-muted-foreground", children: person.email })
|
|
7799
7894
|
] })
|
|
7800
7895
|
] }),
|
|
7801
|
-
person.role && /* @__PURE__ */ (0,
|
|
7802
|
-
visibleFields.map((field) => /* @__PURE__ */ (0,
|
|
7803
|
-
person.status && /* @__PURE__ */ (0,
|
|
7804
|
-
actionBar && /* @__PURE__ */ (0,
|
|
7896
|
+
person.role && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "w-32 shrink-0 truncate text-muted-foreground max-sm:hidden", children: person.role }),
|
|
7897
|
+
visibleFields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "w-28 shrink-0 truncate max-md:hidden", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import__43.Value, { row: person, field }) }, String(field.key))),
|
|
7898
|
+
person.status && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(BadgeView, { badge: person.status }) }),
|
|
7899
|
+
actionBar && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "shrink-0", children: actionBar })
|
|
7805
7900
|
]
|
|
7806
7901
|
}
|
|
7807
7902
|
);
|
|
7808
7903
|
}
|
|
7809
|
-
const statList = stats && stats.length > 0 && /* @__PURE__ */ (0,
|
|
7904
|
+
const statList = stats && stats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
7810
7905
|
"dl",
|
|
7811
7906
|
{
|
|
7812
7907
|
className: "grid divide-x rounded-lg border",
|
|
7813
7908
|
style: { gridTemplateColumns: `repeat(${stats.length}, minmax(0, 1fr))` },
|
|
7814
7909
|
children: stats.map((stat) => {
|
|
7815
|
-
const label = stat.label ?? ("key" in stat ? (0,
|
|
7816
|
-
return /* @__PURE__ */ (0,
|
|
7817
|
-
/* @__PURE__ */ (0,
|
|
7818
|
-
/* @__PURE__ */ (0,
|
|
7910
|
+
const label = stat.label ?? ("key" in stat ? (0, import__43.humanize)(String(stat.key)) : "");
|
|
7911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col-reverse items-center gap-0.5 px-2 py-2.5 text-center", children: [
|
|
7912
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("dt", { className: "text-xs text-muted-foreground", children: label }),
|
|
7913
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("dd", { className: "text-base font-semibold tabular-nums", children: "key" in stat ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import__43.Value, { row: person, field: stat }) : stat.value })
|
|
7819
7914
|
] }, label);
|
|
7820
7915
|
})
|
|
7821
7916
|
}
|
|
7822
7917
|
);
|
|
7823
|
-
const contact = (person.email || person.phone) && /* @__PURE__ */ (0,
|
|
7824
|
-
person.email && /* @__PURE__ */ (0,
|
|
7825
|
-
/* @__PURE__ */ (0,
|
|
7826
|
-
/* @__PURE__ */ (0,
|
|
7918
|
+
const contact = (person.email || person.phone) && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col gap-1 text-sm text-muted-foreground", children: [
|
|
7919
|
+
person.email && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("a", { href: `mailto:${person.email}`, className: "inline-flex min-w-0 items-center gap-2 rounded-sm outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50", children: [
|
|
7920
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react20.MailIcon, { "aria-hidden": true, className: "size-4 shrink-0" }),
|
|
7921
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "truncate", children: person.email })
|
|
7827
7922
|
] }),
|
|
7828
|
-
person.phone && /* @__PURE__ */ (0,
|
|
7829
|
-
/* @__PURE__ */ (0,
|
|
7923
|
+
person.phone && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("a", { href: `tel:${person.phone}`, className: "inline-flex items-center gap-2 rounded-sm outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50", children: [
|
|
7924
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react20.PhoneIcon, { "aria-hidden": true, className: "size-4 shrink-0" }),
|
|
7830
7925
|
person.phone
|
|
7831
7926
|
] })
|
|
7832
7927
|
] });
|
|
7833
|
-
const fieldList = visibleFields.length > 0 && /* @__PURE__ */ (0,
|
|
7834
|
-
/* @__PURE__ */ (0,
|
|
7835
|
-
/* @__PURE__ */ (0,
|
|
7928
|
+
const fieldList = visibleFields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("dl", { className: "flex flex-col gap-2 text-sm", children: visibleFields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
7929
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("dt", { className: "text-muted-foreground", children: field.label ?? (0, import__43.humanize)(String(field.key)) }),
|
|
7930
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("dd", { className: "min-w-0 truncate text-end font-medium", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import__43.Value, { row: person, field }) })
|
|
7836
7931
|
] }, String(field.key))) });
|
|
7837
7932
|
if (layout === "header") {
|
|
7838
7933
|
const band2 = cover ?? "muted";
|
|
7839
|
-
return /* @__PURE__ */ (0,
|
|
7934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
7840
7935
|
"section",
|
|
7841
7936
|
{
|
|
7842
7937
|
"data-slot": "person-card",
|
|
7843
7938
|
"data-layout": "header",
|
|
7844
7939
|
"aria-label": person.name,
|
|
7845
|
-
className: (0,
|
|
7940
|
+
className: (0, import__43.cn)("overflow-hidden rounded-xl bg-card text-card-foreground ring-1 ring-foreground/10", className),
|
|
7846
7941
|
children: [
|
|
7847
|
-
band2 !== "none" && /* @__PURE__ */ (0,
|
|
7848
|
-
/* @__PURE__ */ (0,
|
|
7849
|
-
/* @__PURE__ */ (0,
|
|
7850
|
-
/* @__PURE__ */ (0,
|
|
7942
|
+
band2 !== "none" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { "aria-hidden": true, className: (0, import__43.cn)("h-24 sm:h-32", COVER[band2]) }),
|
|
7943
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col gap-4 px-4 pb-4 sm:px-6 sm:pb-6", children: [
|
|
7944
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: (0, import__43.cn)("flex flex-wrap items-end justify-between gap-4", band2 === "none" ? "pt-6" : "-mt-10 sm:-mt-12"), children: [
|
|
7945
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
7851
7946
|
PersonAvatar,
|
|
7852
7947
|
{
|
|
7853
7948
|
name: person.name,
|
|
7854
7949
|
image: person.image,
|
|
7855
7950
|
presence: person.presence,
|
|
7856
7951
|
size: "lg",
|
|
7857
|
-
className: (0,
|
|
7952
|
+
className: (0, import__43.cn)(
|
|
7858
7953
|
"size-20! sm:size-24! [&_[data-slot=avatar-badge]]:size-4 [&_[data-slot=avatar-fallback]]:text-2xl",
|
|
7859
7954
|
band2 !== "none" && "ring-4 ring-card"
|
|
7860
7955
|
)
|
|
@@ -7862,18 +7957,18 @@ function PersonCard({
|
|
|
7862
7957
|
),
|
|
7863
7958
|
actionBar
|
|
7864
7959
|
] }),
|
|
7865
|
-
/* @__PURE__ */ (0,
|
|
7866
|
-
/* @__PURE__ */ (0,
|
|
7867
|
-
/* @__PURE__ */ (0,
|
|
7868
|
-
person.status && /* @__PURE__ */ (0,
|
|
7960
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
7961
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
7962
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h1", { className: "text-2xl font-semibold tracking-tight", children: person.name }),
|
|
7963
|
+
person.status && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(BadgeView, { badge: person.status })
|
|
7869
7964
|
] }),
|
|
7870
|
-
person.role && /* @__PURE__ */ (0,
|
|
7965
|
+
person.role && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm text-muted-foreground", children: person.role })
|
|
7871
7966
|
] }),
|
|
7872
|
-
(contact || fieldList) && /* @__PURE__ */ (0,
|
|
7967
|
+
(contact || fieldList) && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col gap-4 sm:flex-row sm:gap-10", children: [
|
|
7873
7968
|
contact,
|
|
7874
|
-
visibleFields.length > 0 && /* @__PURE__ */ (0,
|
|
7875
|
-
/* @__PURE__ */ (0,
|
|
7876
|
-
/* @__PURE__ */ (0,
|
|
7969
|
+
visibleFields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("ul", { className: "flex flex-wrap gap-x-6 gap-y-1 text-sm", children: visibleFields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("li", { className: "flex flex-col", children: [
|
|
7970
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-muted-foreground", children: field.label ?? (0, import__43.humanize)(String(field.key)) }),
|
|
7971
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-medium", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import__43.Value, { row: person, field }) })
|
|
7877
7972
|
] }, String(field.key))) })
|
|
7878
7973
|
] }),
|
|
7879
7974
|
statList
|
|
@@ -7883,38 +7978,38 @@ function PersonCard({
|
|
|
7883
7978
|
);
|
|
7884
7979
|
}
|
|
7885
7980
|
const band = cover ?? "none";
|
|
7886
|
-
return /* @__PURE__ */ (0,
|
|
7981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
7887
7982
|
"section",
|
|
7888
7983
|
{
|
|
7889
7984
|
"data-slot": "person-card",
|
|
7890
7985
|
"data-layout": "card",
|
|
7891
7986
|
"aria-label": person.name,
|
|
7892
|
-
className: (0,
|
|
7987
|
+
className: (0, import__43.cn)("flex flex-col overflow-hidden rounded-xl bg-card text-sm text-card-foreground ring-1 ring-foreground/10", className),
|
|
7893
7988
|
children: [
|
|
7894
|
-
band !== "none" && /* @__PURE__ */ (0,
|
|
7895
|
-
/* @__PURE__ */ (0,
|
|
7896
|
-
/* @__PURE__ */ (0,
|
|
7989
|
+
band !== "none" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { "aria-hidden": true, className: (0, import__43.cn)("h-16", COVER[band]) }),
|
|
7990
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import__43.CardHeader, { className: (0, import__43.cn)("flex flex-col items-center gap-2 px-4 text-center", band === "none" ? "pt-6" : "-mt-8"), children: [
|
|
7991
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
7897
7992
|
PersonAvatar,
|
|
7898
7993
|
{
|
|
7899
7994
|
name: person.name,
|
|
7900
7995
|
image: person.image,
|
|
7901
7996
|
presence: person.presence,
|
|
7902
7997
|
size: "lg",
|
|
7903
|
-
className: (0,
|
|
7998
|
+
className: (0, import__43.cn)("size-16! [&_[data-slot=avatar-fallback]]:text-lg", band !== "none" && "ring-4 ring-card")
|
|
7904
7999
|
}
|
|
7905
8000
|
),
|
|
7906
|
-
/* @__PURE__ */ (0,
|
|
7907
|
-
/* @__PURE__ */ (0,
|
|
7908
|
-
person.role && /* @__PURE__ */ (0,
|
|
8001
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col items-center gap-0.5", children: [
|
|
8002
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import__43.CardTitle, { as: "h3", children: name }),
|
|
8003
|
+
person.role && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import__43.CardDescription, { children: person.role })
|
|
7909
8004
|
] }),
|
|
7910
|
-
person.status && /* @__PURE__ */ (0,
|
|
8005
|
+
person.status && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(BadgeView, { badge: person.status })
|
|
7911
8006
|
] }),
|
|
7912
|
-
/* @__PURE__ */ (0,
|
|
8007
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-1 flex-col gap-4 p-4", children: [
|
|
7913
8008
|
contact,
|
|
7914
8009
|
fieldList,
|
|
7915
8010
|
statList
|
|
7916
8011
|
] }),
|
|
7917
|
-
actionBar && /* @__PURE__ */ (0,
|
|
8012
|
+
actionBar && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mt-auto border-t bg-muted/50 p-3 [&_[data-slot=actions]]:flex-nowrap [&_[data-slot=actions]>button:not([aria-haspopup])]:flex-1 [&_[data-slot=actions]>a]:flex-1", children: actionBar })
|
|
7918
8013
|
]
|
|
7919
8014
|
}
|
|
7920
8015
|
);
|
|
@@ -7938,21 +8033,21 @@ function PersonCards({
|
|
|
7938
8033
|
...view
|
|
7939
8034
|
}) {
|
|
7940
8035
|
if (layout === "card") {
|
|
7941
|
-
return /* @__PURE__ */ (0,
|
|
8036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { "data-slot": "person-cards", className: (0, import__43.cn)("grid gap-4", GRID[columns], className), children: people.map((person) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PersonCard, { person, layout: "card", ...view }, getId(person))) });
|
|
7942
8037
|
}
|
|
7943
|
-
return /* @__PURE__ */ (0,
|
|
8038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
7944
8039
|
"section",
|
|
7945
8040
|
{
|
|
7946
8041
|
"data-slot": "person-cards",
|
|
7947
8042
|
"aria-label": title,
|
|
7948
|
-
className: (0,
|
|
8043
|
+
className: (0, import__43.cn)("flex flex-col gap-4 rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)]", className),
|
|
7949
8044
|
children: [
|
|
7950
|
-
(title || description || headerActions?.length) && /* @__PURE__ */ (0,
|
|
7951
|
-
title && /* @__PURE__ */ (0,
|
|
7952
|
-
description && /* @__PURE__ */ (0,
|
|
7953
|
-
headerActions && headerActions.length > 0 && /* @__PURE__ */ (0,
|
|
8045
|
+
(title || description || headerActions?.length) && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import__43.CardHeader, { children: [
|
|
8046
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import__43.CardTitle, { as: "h2", children: title }),
|
|
8047
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import__43.CardDescription, { children: description }),
|
|
8048
|
+
headerActions && headerActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { "data-slot": "card-action", className: "col-start-2 row-span-2 row-start-1 self-start justify-self-end", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Actions, { actions: headerActions, onAction: onHeaderAction, icons: view.icons, Link: view.linkComponent, can: view.can }) })
|
|
7954
8049
|
] }),
|
|
7955
|
-
people.length === 0 ? /* @__PURE__ */ (0,
|
|
8050
|
+
people.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "px-4 py-6 text-center text-muted-foreground", children: emptyText }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("ul", { className: "flex flex-col divide-y border-t", children: people.map((person) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("li", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PersonCard, { person, layout, ...view }) }, getId(person))) })
|
|
7956
8051
|
]
|
|
7957
8052
|
}
|
|
7958
8053
|
);
|
|
@@ -7982,6 +8077,7 @@ function PersonCards({
|
|
|
7982
8077
|
RankedList,
|
|
7983
8078
|
RecordPage,
|
|
7984
8079
|
SettingsDialog,
|
|
8080
|
+
ShortcutsDialog,
|
|
7985
8081
|
StatCard,
|
|
7986
8082
|
StatCards,
|
|
7987
8083
|
TIER_COLUMNS,
|