@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.
Files changed (46) hide show
  1. package/README.md +30 -7
  2. package/dist/blocks-charts.cjs +1 -0
  3. package/dist/blocks-charts.cjs.map +1 -1
  4. package/dist/blocks-charts.js +2 -0
  5. package/dist/blocks-charts.js.map +1 -1
  6. package/dist/blocks.cjs +282 -186
  7. package/dist/blocks.cjs.map +1 -1
  8. package/dist/blocks.d.cts +85 -5
  9. package/dist/blocks.d.ts +85 -5
  10. package/dist/blocks.js +280 -169
  11. package/dist/blocks.js.map +1 -1
  12. package/dist/chart.cjs +1 -0
  13. package/dist/chart.cjs.map +1 -1
  14. package/dist/chart.d.ts +1 -1
  15. package/dist/chart.js +2 -1
  16. package/dist/chart.js.map +1 -1
  17. package/dist/{chunk-327NSKZW.js → chunk-6BJ3OMUZ.js} +4 -3
  18. package/dist/{chunk-327NSKZW.js.map → chunk-6BJ3OMUZ.js.map} +1 -1
  19. package/dist/{chunk-GJJWRZ4B.js → chunk-7RXFHQL5.js} +4 -3
  20. package/dist/{chunk-GJJWRZ4B.js.map → chunk-7RXFHQL5.js.map} +1 -1
  21. package/dist/{chunk-2L5XAYNK.js → chunk-MJC4A7I4.js} +3 -1
  22. package/dist/{chunk-2L5XAYNK.js.map → chunk-MJC4A7I4.js.map} +1 -1
  23. package/dist/{chunk-WGCAQEZ4.js → chunk-QYFD7KIK.js} +3 -2
  24. package/dist/{chunk-WGCAQEZ4.js.map → chunk-QYFD7KIK.js.map} +1 -1
  25. package/dist/code-block-highlight.cjs +1 -0
  26. package/dist/code-block-highlight.cjs.map +1 -1
  27. package/dist/code-block-highlight.js +4 -3
  28. package/dist/code-block-highlight.js.map +1 -1
  29. package/dist/{data-table-Dec6t8NO.d.ts → data-table-CcIINjPg.d.ts} +30 -3
  30. package/dist/data-table.cjs +200 -124
  31. package/dist/data-table.cjs.map +1 -1
  32. package/dist/data-table.d.ts +1 -1
  33. package/dist/data-table.js +156 -79
  34. package/dist/data-table.js.map +1 -1
  35. package/dist/index.cjs +10632 -7124
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.ts +204 -8
  38. package/dist/index.js +5933 -2507
  39. package/dist/index.js.map +1 -1
  40. package/dist/map.cjs +1 -0
  41. package/dist/map.cjs.map +1 -1
  42. package/dist/map.d.cts +2 -0
  43. package/dist/map.d.ts +2 -0
  44. package/dist/map.js +6 -0
  45. package/dist/map.js.map +1 -1
  46. package/package.json +2 -7
package/dist/blocks.js CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  // src/blocks/app-shell.tsx
2
4
  import { useMemo, useState as useState2 } from "react";
3
5
  import { ChevronsUpDownIcon, MenuIcon, MoreHorizontalIcon as MoreHorizontalIcon3, SearchIcon } from "lucide-react";
@@ -45,7 +47,12 @@ import {
45
47
  Button,
46
48
  DropdownMenu,
47
49
  DropdownMenuItem,
50
+ DropdownMenuRadioGroup,
51
+ DropdownMenuRadioItem,
48
52
  DropdownMenuSeparator,
53
+ DropdownMenuSub,
54
+ DropdownMenuSubContent,
55
+ DropdownMenuSubTrigger,
49
56
  cn
50
57
  } from "./index.js";
51
58
  import { Fragment as Fragment2, jsx, jsxs } from "react/jsx-runtime";
@@ -73,23 +80,34 @@ function MenuItems({
73
80
  Link = PlainLink,
74
81
  can
75
82
  }) {
76
- const visible = items.filter((item) => !item.permission || !can || can(item.permission));
83
+ const allowed = (item) => !item.permission || !can || can(item.permission);
84
+ const visible = items.filter(
85
+ (item) => allowed(item) && (!item.items || item.items.some(allowed))
86
+ );
77
87
  return /* @__PURE__ */ jsx(Fragment2, { children: visible.map((item, index) => {
78
88
  const content = /* @__PURE__ */ jsxs(Fragment2, { children: [
79
89
  resolveIcon(item.icon, icons),
80
90
  item.label
81
91
  ] });
92
+ const variant = item.destructive ? "destructive" : "default";
93
+ let entry;
94
+ if (item.items) {
95
+ const choices = item.value !== void 0;
96
+ entry = /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [
97
+ /* @__PURE__ */ jsx(DropdownMenuSubTrigger, { children: content }),
98
+ /* @__PURE__ */ jsx(DropdownMenuSubContent, { children: choices ? /* @__PURE__ */ jsx(DropdownMenuRadioGroup, { value: item.value, onValueChange: (value) => item.onValueChange?.(value), children: item.items.filter(allowed).map((choice) => /* @__PURE__ */ jsxs(DropdownMenuRadioItem, { value: choice.value ?? choice.label, children: [
99
+ resolveIcon(choice.icon, icons),
100
+ choice.label
101
+ ] }, choice.value ?? choice.label)) }) : /* @__PURE__ */ jsx(MenuItems, { items: item.items, icons, Link, can }) })
102
+ ] });
103
+ } else if (item.href) {
104
+ entry = /* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, variant, shortcut: item.shortcut, children: /* @__PURE__ */ jsx(Link, { href: item.href, children: content }) });
105
+ } else {
106
+ entry = /* @__PURE__ */ jsx(DropdownMenuItem, { variant, shortcut: item.shortcut, onSelect: () => item.onSelect?.(), children: content });
107
+ }
82
108
  return /* @__PURE__ */ jsxs(Fragment, { children: [
83
109
  item.separator && index > 0 && /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
84
- item.href ? /* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, variant: item.destructive ? "destructive" : "default", shortcut: item.shortcut, children: /* @__PURE__ */ jsx(Link, { href: item.href, children: content }) }) : /* @__PURE__ */ jsx(
85
- DropdownMenuItem,
86
- {
87
- variant: item.destructive ? "destructive" : "default",
88
- shortcut: item.shortcut,
89
- onSelect: () => item.onSelect?.(),
90
- children: content
91
- }
92
- )
110
+ entry
93
111
  ] }, `${item.label}-${index}`);
94
112
  }) });
95
113
  }
@@ -651,6 +669,7 @@ function AppShell({
651
669
  breadcrumbs,
652
670
  actions,
653
671
  search,
672
+ page: pageMode = "padded",
654
673
  defaultCollapsed = false,
655
674
  children,
656
675
  className
@@ -797,7 +816,8 @@ function AppShell({
797
816
  crumbs,
798
817
  /* @__PURE__ */ jsx3("div", { className: "ms-auto flex items-center gap-2", children: /* @__PURE__ */ jsx3(Search, { search }) })
799
818
  ] });
800
- const page = /* @__PURE__ */ jsxs3("div", { className: "flex flex-1 flex-col gap-6 p-4 md:p-6", children: [
819
+ const fill = pageMode === "fill";
820
+ const page = fill ? /* @__PURE__ */ jsx3("div", { "data-slot": "app-shell-page", className: "flex min-h-0 flex-1 flex-col overflow-y-auto", children }) : /* @__PURE__ */ jsxs3("div", { "data-slot": "app-shell-page", className: "flex flex-1 flex-col gap-6 p-4 md:p-6", children: [
801
821
  /* @__PURE__ */ jsx3(PageTitle, { title: pageTitle, description, actions: actionNodes }),
802
822
  children
803
823
  ] });
@@ -826,6 +846,7 @@ function AppShell({
826
846
  user,
827
847
  can,
828
848
  search,
849
+ fill,
829
850
  crumbs,
830
851
  title: pageTitle,
831
852
  description,
@@ -872,7 +893,7 @@ function AppShell({
872
893
  style: variant === "nested" ? { "--sidebar-width": "22rem" } : void 0,
873
894
  children: [
874
895
  side === "left" && sidebarNode,
875
- /* @__PURE__ */ jsxs3(SidebarInset, { children: [
896
+ /* @__PURE__ */ jsxs3(SidebarInset, { className: fill ? "h-svh overflow-hidden" : void 0, children: [
876
897
  header,
877
898
  page
878
899
  ] }),
@@ -891,6 +912,7 @@ function TopNavShell({
891
912
  user,
892
913
  can,
893
914
  search,
915
+ fill,
894
916
  crumbs,
895
917
  title,
896
918
  description,
@@ -921,7 +943,7 @@ function TopNavShell({
921
943
  item.id ?? item.to ?? item.label
922
944
  );
923
945
  };
924
- return /* @__PURE__ */ jsxs3("div", { className: cn3("flex min-h-svh flex-col bg-background", className), children: [
946
+ return /* @__PURE__ */ jsxs3("div", { className: cn3("flex flex-col bg-background", fill ? "h-svh overflow-hidden" : "min-h-svh", className), children: [
925
947
  /* @__PURE__ */ jsxs3("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: [
926
948
  /* @__PURE__ */ jsx3(
927
949
  Drawer,
@@ -954,7 +976,7 @@ function TopNavShell({
954
976
  )
955
977
  ] })
956
978
  ] }),
957
- /* @__PURE__ */ jsxs3("main", { className: "mx-auto flex w-full max-w-7xl flex-1 flex-col gap-6 p-4 md:p-6", children: [
979
+ fill ? /* @__PURE__ */ jsx3("main", { "data-slot": "app-shell-page", className: "flex min-h-0 flex-1 flex-col overflow-y-auto", children }) : /* @__PURE__ */ jsxs3("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: [
958
980
  crumbs,
959
981
  /* @__PURE__ */ jsx3(PageTitle, { title, description, actions }),
960
982
  children
@@ -7456,10 +7478,14 @@ function DetailRow({
7456
7478
  const { span, copy, hint, permission: _permission, ...valueField } = field;
7457
7479
  const label = field.label ?? humanize5(String(field.key));
7458
7480
  const raw = getValueAt6(record, String(field.key));
7459
- const value = /* @__PURE__ */ jsxs20("span", { className: "inline-flex min-w-0 items-center gap-1", children: [
7460
- /* @__PURE__ */ jsx23(Value4, { row: record, field: valueField, className: "break-words" }),
7461
- copy && !isEmptyValue2(raw) && /* @__PURE__ */ jsx23(CopyValue, { value: String(raw), label })
7462
- ] });
7481
+ const value = (
7482
+ // max-w-full and min-w-0: in the rows layout the value is end-aligned, so nothing else stops a long one
7483
+ // (an email, a URL) from running over its label; this way it wraps, or truncates where its type does.
7484
+ /* @__PURE__ */ jsxs20("span", { className: "inline-flex max-w-full min-w-0 items-center gap-1", children: [
7485
+ /* @__PURE__ */ jsx23(Value4, { row: record, field: valueField, className: "min-w-0 break-words" }),
7486
+ copy && !isEmptyValue2(raw) && /* @__PURE__ */ jsx23(CopyValue, { value: String(raw), label })
7487
+ ] })
7488
+ );
7463
7489
  if (layout === "rows") {
7464
7490
  return /* @__PURE__ */ jsxs20("div", { "data-slot": "detail-row", className: "flex items-start justify-between gap-4 py-2.5 first:pt-0 last:pb-0", children: [
7465
7491
  /* @__PURE__ */ jsx23("dt", { className: "shrink-0 text-muted-foreground", children: label }),
@@ -7610,8 +7636,92 @@ function BannerAction({
7610
7636
  );
7611
7637
  }
7612
7638
 
7639
+ // src/blocks/shortcuts-dialog.tsx
7640
+ import { Fragment as Fragment15, useEffect as useEffect10, useState as useState20, useSyncExternalStore } from "react";
7641
+ import {
7642
+ Dialog as Dialog3,
7643
+ DialogContent as DialogContent2,
7644
+ DialogDescription as DialogDescription2,
7645
+ DialogHeader,
7646
+ DialogTitle as DialogTitle2,
7647
+ DialogTrigger as DialogTrigger2,
7648
+ Kbd,
7649
+ KbdGroup,
7650
+ ScrollArea as ScrollArea6
7651
+ } from "./index.js";
7652
+ import { Fragment as Fragment16, jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
7653
+ var APPLE_KEYS = { Mod: "\u2318", Alt: "\u2325", Shift: "\u21E7", Ctrl: "\u2303", Enter: "\u21A9" };
7654
+ var OTHER_KEYS = { Mod: "Ctrl" };
7655
+ var keyName = (key, apple) => key === "Mod" ? apple ? "Command" : "Control" : key === "Alt" && apple ? "Option" : key;
7656
+ var subscribeNever = () => () => {
7657
+ };
7658
+ var isApple = () => /Mac|iPhone|iPad/.test(navigator.userAgent);
7659
+ function isEditable(target) {
7660
+ if (!(target instanceof HTMLElement)) return false;
7661
+ return target.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(target.tagName);
7662
+ }
7663
+ function Combo({ keys, apple }) {
7664
+ const shown = keys.map((key) => (apple ? APPLE_KEYS : OTHER_KEYS)[key] ?? key);
7665
+ return /* @__PURE__ */ jsxs22(Fragment16, { children: [
7666
+ /* @__PURE__ */ jsx25(KbdGroup, { "aria-hidden": true, children: shown.map((key, i) => /* @__PURE__ */ jsx25(Kbd, { children: key }, `${key}-${i}`)) }),
7667
+ /* @__PURE__ */ jsx25("span", { className: "sr-only", children: keys.map((key) => keyName(key, apple)).join(" + ") })
7668
+ ] });
7669
+ }
7670
+ function ShortcutsDialog({
7671
+ groups,
7672
+ title = "Keyboard shortcuts",
7673
+ description,
7674
+ hotkey = "?",
7675
+ open,
7676
+ defaultOpen = false,
7677
+ onOpenChange,
7678
+ trigger,
7679
+ modal
7680
+ }) {
7681
+ const [ownOpen, setOwnOpen] = useState20(defaultOpen);
7682
+ const isOpen = open ?? ownOpen;
7683
+ const setOpen = (next) => {
7684
+ if (open === void 0) setOwnOpen(next);
7685
+ onOpenChange?.(next);
7686
+ };
7687
+ const apple = useSyncExternalStore(subscribeNever, isApple, () => false);
7688
+ useEffect10(() => {
7689
+ if (!hotkey) return;
7690
+ const onKeyDown = (event) => {
7691
+ if (event.key !== hotkey || event.ctrlKey || event.metaKey || event.altKey || isEditable(event.target)) return;
7692
+ event.preventDefault();
7693
+ if (open === void 0) setOwnOpen(true);
7694
+ onOpenChange?.(true);
7695
+ };
7696
+ document.addEventListener("keydown", onKeyDown);
7697
+ return () => document.removeEventListener("keydown", onKeyDown);
7698
+ }, [hotkey, open, onOpenChange]);
7699
+ return /* @__PURE__ */ jsxs22(Dialog3, { open: isOpen, onOpenChange: setOpen, modal, children: [
7700
+ trigger && /* @__PURE__ */ jsx25(DialogTrigger2, { asChild: true, children: trigger }),
7701
+ /* @__PURE__ */ jsxs22(DialogContent2, { "data-slot": "shortcuts-dialog", className: "sm:max-w-lg", children: [
7702
+ /* @__PURE__ */ jsxs22(DialogHeader, { children: [
7703
+ /* @__PURE__ */ jsx25(DialogTitle2, { children: title }),
7704
+ description && /* @__PURE__ */ jsx25(DialogDescription2, { children: description })
7705
+ ] }),
7706
+ /* @__PURE__ */ jsx25(ScrollArea6, { className: "-mx-4 max-h-[60vh] px-4", children: /* @__PURE__ */ jsx25("div", { className: "flex flex-col gap-5", children: groups.map((group) => /* @__PURE__ */ jsxs22("section", { "aria-label": group.title, className: "flex flex-col gap-1", children: [
7707
+ /* @__PURE__ */ jsx25("h3", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide", children: group.title }),
7708
+ /* @__PURE__ */ jsx25("dl", { className: "divide-y", children: group.shortcuts.map((shortcut) => /* @__PURE__ */ jsxs22("div", { className: "flex items-center justify-between gap-4 py-2 text-sm", children: [
7709
+ /* @__PURE__ */ jsx25("dt", { children: shortcut.label }),
7710
+ /* @__PURE__ */ jsxs22("dd", { className: "flex shrink-0 items-center gap-1.5 text-muted-foreground", children: [
7711
+ /* @__PURE__ */ jsx25(Combo, { keys: shortcut.keys, apple }),
7712
+ shortcut.alt && /* @__PURE__ */ jsxs22(Fragment15, { children: [
7713
+ /* @__PURE__ */ jsx25("span", { className: "text-xs", children: "or" }),
7714
+ /* @__PURE__ */ jsx25(Combo, { keys: shortcut.alt, apple })
7715
+ ] })
7716
+ ] })
7717
+ ] }, shortcut.label)) })
7718
+ ] }, group.title)) }) })
7719
+ ] })
7720
+ ] });
7721
+ }
7722
+
7613
7723
  // src/blocks/confirm-dialog.tsx
7614
- import { useEffect as useEffect10, useId as useId3, useRef as useRef11, useState as useState20 } from "react";
7724
+ import { useEffect as useEffect11, useId as useId3, useRef as useRef11, useState as useState21 } from "react";
7615
7725
  import { CircleAlertIcon as CircleAlertIcon2, CircleCheckIcon, CircleIcon, CircleMinusIcon, InfoIcon, TriangleAlertIcon } from "lucide-react";
7616
7726
  import {
7617
7727
  Alert as Alert2,
@@ -7620,37 +7730,37 @@ import {
7620
7730
  AlertDialogMedia,
7621
7731
  Button as Button12,
7622
7732
  Checkbox as Checkbox3,
7623
- Dialog as Dialog3,
7733
+ Dialog as Dialog4,
7624
7734
  DialogClose,
7625
- DialogContent as DialogContent2,
7626
- DialogDescription as DialogDescription2,
7627
- DialogTitle as DialogTitle2,
7628
- DialogTrigger as DialogTrigger2,
7735
+ DialogContent as DialogContent3,
7736
+ DialogDescription as DialogDescription3,
7737
+ DialogTitle as DialogTitle3,
7738
+ DialogTrigger as DialogTrigger3,
7629
7739
  Field as Field3,
7630
7740
  FieldDescription as FieldDescription2,
7631
7741
  FieldError as FieldError3,
7632
7742
  FieldLabel as FieldLabel3,
7633
7743
  FieldLegend as FieldLegend3,
7634
7744
  FieldSet as FieldSet3,
7635
- ScrollArea as ScrollArea6,
7745
+ ScrollArea as ScrollArea7,
7636
7746
  Spinner,
7637
7747
  Textarea as Textarea4,
7638
7748
  cn as cn19
7639
7749
  } from "./index.js";
7640
- import { Fragment as Fragment15, jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
7750
+ import { Fragment as Fragment17, jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
7641
7751
  var TONE_ICON = {
7642
7752
  default: null,
7643
- destructive: /* @__PURE__ */ jsx25(CircleAlertIcon2, {}),
7644
- success: /* @__PURE__ */ jsx25(CircleCheckIcon, {}),
7645
- warning: /* @__PURE__ */ jsx25(TriangleAlertIcon, {}),
7646
- info: /* @__PURE__ */ jsx25(InfoIcon, {})
7753
+ destructive: /* @__PURE__ */ jsx26(CircleAlertIcon2, {}),
7754
+ success: /* @__PURE__ */ jsx26(CircleCheckIcon, {}),
7755
+ warning: /* @__PURE__ */ jsx26(TriangleAlertIcon, {}),
7756
+ info: /* @__PURE__ */ jsx26(InfoIcon, {})
7647
7757
  };
7648
7758
  var SUMMARY_ICON = {
7649
- success: /* @__PURE__ */ jsx25(CircleCheckIcon, { "aria-hidden": true, className: "size-4 text-success" }),
7650
- warning: /* @__PURE__ */ jsx25(TriangleAlertIcon, { "aria-hidden": true, className: "size-4 text-warning" }),
7651
- error: /* @__PURE__ */ jsx25(CircleAlertIcon2, { "aria-hidden": true, className: "size-4 text-destructive" }),
7652
- neutral: /* @__PURE__ */ jsx25(CircleIcon, { "aria-hidden": true, className: "size-4 text-muted-foreground" }),
7653
- skipped: /* @__PURE__ */ jsx25(CircleMinusIcon, { "aria-hidden": true, className: "size-4 text-muted-foreground" })
7759
+ success: /* @__PURE__ */ jsx26(CircleCheckIcon, { "aria-hidden": true, className: "size-4 text-success" }),
7760
+ warning: /* @__PURE__ */ jsx26(TriangleAlertIcon, { "aria-hidden": true, className: "size-4 text-warning" }),
7761
+ error: /* @__PURE__ */ jsx26(CircleAlertIcon2, { "aria-hidden": true, className: "size-4 text-destructive" }),
7762
+ neutral: /* @__PURE__ */ jsx26(CircleIcon, { "aria-hidden": true, className: "size-4 text-muted-foreground" }),
7763
+ skipped: /* @__PURE__ */ jsx26(CircleMinusIcon, { "aria-hidden": true, className: "size-4 text-muted-foreground" })
7654
7764
  };
7655
7765
  var SUMMARY_LABEL = {
7656
7766
  success: "Passed",
@@ -7688,14 +7798,14 @@ function ConfirmDialog({
7688
7798
  modal = true,
7689
7799
  linkComponent: Link = PlainLink
7690
7800
  }) {
7691
- const [innerOpen, setInnerOpen] = useState20(defaultOpen);
7801
+ const [innerOpen, setInnerOpen] = useState21(defaultOpen);
7692
7802
  const open = openProp ?? innerOpen;
7693
- const [note, setNote] = useState20("");
7694
- const [checked, setChecked] = useState20(checklist?.defaultChecked ?? []);
7695
- const [touched, setTouched] = useState20(false);
7696
- const [busy, setBusy] = useState20(false);
7697
- const [error, setError] = useState20();
7698
- const [check, setCheck] = useState20({ state: "idle" });
7803
+ const [note, setNote] = useState21("");
7804
+ const [checked, setChecked] = useState21(checklist?.defaultChecked ?? []);
7805
+ const [touched, setTouched] = useState21(false);
7806
+ const [busy, setBusy] = useState21(false);
7807
+ const [error, setError] = useState21();
7808
+ const [check, setCheck] = useState21({ state: "idle" });
7699
7809
  const blockersRef = useRef11(blockers);
7700
7810
  blockersRef.current = blockers;
7701
7811
  const ids = useId3();
@@ -7705,7 +7815,7 @@ function ConfirmDialog({
7705
7815
  if (openProp === void 0) setInnerOpen(next);
7706
7816
  onOpenChange?.(next);
7707
7817
  };
7708
- useEffect10(() => {
7818
+ useEffect11(() => {
7709
7819
  if (!open) return;
7710
7820
  setNote("");
7711
7821
  setChecked(checklist?.defaultChecked ?? []);
@@ -7764,10 +7874,10 @@ function ConfirmDialog({
7764
7874
  }
7765
7875
  setOpen(false);
7766
7876
  };
7767
- return /* @__PURE__ */ jsxs22(Dialog3, { open, onOpenChange: setOpen, modal, children: [
7768
- trigger && /* @__PURE__ */ jsx25(DialogTrigger2, { asChild: true, children: trigger }),
7769
- /* @__PURE__ */ jsxs22(
7770
- DialogContent2,
7877
+ return /* @__PURE__ */ jsxs23(Dialog4, { open, onOpenChange: setOpen, modal, children: [
7878
+ trigger && /* @__PURE__ */ jsx26(DialogTrigger3, { asChild: true, children: trigger }),
7879
+ /* @__PURE__ */ jsxs23(
7880
+ DialogContent3,
7771
7881
  {
7772
7882
  role: "alertdialog",
7773
7883
  "data-slot": "confirm-dialog",
@@ -7779,52 +7889,52 @@ function ConfirmDialog({
7779
7889
  onPointerDownOutside: (event) => event.preventDefault(),
7780
7890
  onInteractOutside: (event) => event.preventDefault(),
7781
7891
  children: [
7782
- /* @__PURE__ */ jsxs22(AlertDialogHeader, { className: "sm:has-data-[slot=alert-dialog-media]:grid-cols-[auto_1fr]", children: [
7783
- glyph && /* @__PURE__ */ jsx25(AlertDialogMedia, { tone: blocked ? "warning" : tone, children: glyph }),
7784
- /* @__PURE__ */ jsx25(DialogTitle2, { className: "leading-normal sm:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", children: title }),
7785
- description !== void 0 && /* @__PURE__ */ jsx25(DialogDescription2, { className: "text-balance md:text-pretty", children: description })
7892
+ /* @__PURE__ */ jsxs23(AlertDialogHeader, { className: "sm:has-data-[slot=alert-dialog-media]:grid-cols-[auto_1fr]", children: [
7893
+ glyph && /* @__PURE__ */ jsx26(AlertDialogMedia, { tone: blocked ? "warning" : tone, children: glyph }),
7894
+ /* @__PURE__ */ jsx26(DialogTitle3, { className: "leading-normal sm:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", children: title }),
7895
+ description !== void 0 && /* @__PURE__ */ jsx26(DialogDescription3, { className: "text-balance md:text-pretty", children: description })
7786
7896
  ] }),
7787
- checking && /* @__PURE__ */ jsxs22("div", { role: "status", className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
7788
- /* @__PURE__ */ jsx25(Spinner, { className: "size-4" }),
7897
+ checking && /* @__PURE__ */ jsxs23("div", { role: "status", className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
7898
+ /* @__PURE__ */ jsx26(Spinner, { className: "size-4" }),
7789
7899
  checkingLabel
7790
7900
  ] }),
7791
- check.state === "error" && /* @__PURE__ */ jsx25(Alert2, { variant: "destructive", title: "Couldn't check", description: check.message }),
7792
- blocked && /* @__PURE__ */ jsxs22("div", { "data-slot": "confirm-dialog-blockers", className: "flex flex-col gap-2 text-sm", children: [
7793
- /* @__PURE__ */ jsxs22("div", { children: [
7794
- /* @__PURE__ */ jsx25("p", { className: "font-medium", children: blockedTitle }),
7795
- blockedDescription && /* @__PURE__ */ jsx25("p", { className: "text-muted-foreground", children: blockedDescription })
7901
+ check.state === "error" && /* @__PURE__ */ jsx26(Alert2, { variant: "destructive", title: "Couldn't check", description: check.message }),
7902
+ blocked && /* @__PURE__ */ jsxs23("div", { "data-slot": "confirm-dialog-blockers", className: "flex flex-col gap-2 text-sm", children: [
7903
+ /* @__PURE__ */ jsxs23("div", { children: [
7904
+ /* @__PURE__ */ jsx26("p", { className: "font-medium", children: blockedTitle }),
7905
+ blockedDescription && /* @__PURE__ */ jsx26("p", { className: "text-muted-foreground", children: blockedDescription })
7796
7906
  ] }),
7797
- /* @__PURE__ */ jsx25(ScrollArea6, { className: "max-h-48 rounded-lg border", children: /* @__PURE__ */ jsx25("ul", { className: "divide-y", children: check.blockers.map((blocker) => /* @__PURE__ */ jsxs22("li", { className: "flex flex-col gap-0.5 px-3 py-2", children: [
7798
- blocker.href ? /* @__PURE__ */ jsx25(
7907
+ /* @__PURE__ */ jsx26(ScrollArea7, { className: "max-h-48 rounded-lg border", children: /* @__PURE__ */ jsx26("ul", { className: "divide-y", children: check.blockers.map((blocker) => /* @__PURE__ */ jsxs23("li", { className: "flex flex-col gap-0.5 px-3 py-2", children: [
7908
+ blocker.href ? /* @__PURE__ */ jsx26(
7799
7909
  Link,
7800
7910
  {
7801
7911
  href: blocker.href,
7802
7912
  className: "w-fit rounded-sm font-medium underline-offset-4 outline-none hover:underline focus-visible:ring-3 focus-visible:ring-ring/50",
7803
7913
  children: blocker.label
7804
7914
  }
7805
- ) : /* @__PURE__ */ jsx25("span", { className: "font-medium", children: blocker.label }),
7806
- blocker.description && /* @__PURE__ */ jsx25("span", { className: "text-muted-foreground", children: blocker.description })
7915
+ ) : /* @__PURE__ */ jsx26("span", { className: "font-medium", children: blocker.label }),
7916
+ blocker.description && /* @__PURE__ */ jsx26("span", { className: "text-muted-foreground", children: blocker.description })
7807
7917
  ] }, blocker.id ?? blocker.label)) }) })
7808
7918
  ] }),
7809
- !blocked && !checking && check.state !== "error" && /* @__PURE__ */ jsxs22(Fragment15, { children: [
7810
- summary && /* @__PURE__ */ jsxs22("div", { "data-slot": "confirm-dialog-summary", className: "flex flex-col gap-2 text-sm", children: [
7811
- summary.label && /* @__PURE__ */ jsx25("p", { className: "font-medium", children: summary.label }),
7812
- /* @__PURE__ */ jsx25("ul", { className: "flex flex-col divide-y rounded-lg border", children: summary.items.map((item) => {
7919
+ !blocked && !checking && check.state !== "error" && /* @__PURE__ */ jsxs23(Fragment17, { children: [
7920
+ summary && /* @__PURE__ */ jsxs23("div", { "data-slot": "confirm-dialog-summary", className: "flex flex-col gap-2 text-sm", children: [
7921
+ summary.label && /* @__PURE__ */ jsx26("p", { className: "font-medium", children: summary.label }),
7922
+ /* @__PURE__ */ jsx26("ul", { className: "flex flex-col divide-y rounded-lg border", children: summary.items.map((item) => {
7813
7923
  const state = item.state ?? "neutral";
7814
- return /* @__PURE__ */ jsxs22("li", { className: "flex items-center gap-2 px-3 py-2", children: [
7924
+ return /* @__PURE__ */ jsxs23("li", { className: "flex items-center gap-2 px-3 py-2", children: [
7815
7925
  SUMMARY_ICON[state],
7816
- SUMMARY_LABEL[state] && /* @__PURE__ */ jsxs22("span", { className: "sr-only", children: [
7926
+ SUMMARY_LABEL[state] && /* @__PURE__ */ jsxs23("span", { className: "sr-only", children: [
7817
7927
  SUMMARY_LABEL[state],
7818
7928
  ":"
7819
7929
  ] }),
7820
- /* @__PURE__ */ jsx25("span", { className: cn19("min-w-0 flex-1", state === "skipped" && "text-muted-foreground"), children: item.label }),
7821
- item.value !== void 0 && /* @__PURE__ */ jsx25("span", { className: "text-muted-foreground tabular-nums", children: item.value })
7930
+ /* @__PURE__ */ jsx26("span", { className: cn19("min-w-0 flex-1", state === "skipped" && "text-muted-foreground"), children: item.label }),
7931
+ item.value !== void 0 && /* @__PURE__ */ jsx26("span", { className: "text-muted-foreground tabular-nums", children: item.value })
7822
7932
  ] }, item.label);
7823
7933
  }) })
7824
7934
  ] }),
7825
- checklist && /* @__PURE__ */ jsxs22(FieldSet3, { children: [
7826
- /* @__PURE__ */ jsx25(FieldLegend3, { variant: "label", children: checklist.label ?? "Options" }),
7827
- /* @__PURE__ */ jsx25("div", { className: "flex flex-col gap-3", children: options.map((option) => /* @__PURE__ */ jsx25(
7935
+ checklist && /* @__PURE__ */ jsxs23(FieldSet3, { children: [
7936
+ /* @__PURE__ */ jsx26(FieldLegend3, { variant: "label", children: checklist.label ?? "Options" }),
7937
+ /* @__PURE__ */ jsx26("div", { className: "flex flex-col gap-3", children: options.map((option) => /* @__PURE__ */ jsx26(
7828
7938
  Checkbox3,
7829
7939
  {
7830
7940
  label: option.label,
@@ -7836,14 +7946,14 @@ function ConfirmDialog({
7836
7946
  },
7837
7947
  option.value
7838
7948
  )) }),
7839
- touched && checklistError && /* @__PURE__ */ jsx25(FieldError3, { children: checklistError })
7949
+ touched && checklistError && /* @__PURE__ */ jsx26(FieldError3, { children: checklistError })
7840
7950
  ] }),
7841
- reasonConfig && /* @__PURE__ */ jsxs22(Field3, { required: reasonConfig.required, id: `${ids}-reason`, children: [
7842
- /* @__PURE__ */ jsxs22(FieldLabel3, { children: [
7951
+ reasonConfig && /* @__PURE__ */ jsxs23(Field3, { required: reasonConfig.required, id: `${ids}-reason`, children: [
7952
+ /* @__PURE__ */ jsxs23(FieldLabel3, { children: [
7843
7953
  reasonLabel,
7844
- !reasonConfig.required && /* @__PURE__ */ jsx25("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
7954
+ !reasonConfig.required && /* @__PURE__ */ jsx26("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
7845
7955
  ] }),
7846
- /* @__PURE__ */ jsx25(
7956
+ /* @__PURE__ */ jsx26(
7847
7957
  Textarea4,
7848
7958
  {
7849
7959
  value: note,
@@ -7853,15 +7963,15 @@ function ConfirmDialog({
7853
7963
  onChange: (event) => setNote(event.target.value)
7854
7964
  }
7855
7965
  ),
7856
- reasonConfig.description && /* @__PURE__ */ jsx25(FieldDescription2, { children: reasonConfig.description }),
7857
- /* @__PURE__ */ jsx25(FieldError3, { children: touched ? reasonError : void 0 })
7966
+ reasonConfig.description && /* @__PURE__ */ jsx26(FieldDescription2, { children: reasonConfig.description }),
7967
+ /* @__PURE__ */ jsx26(FieldError3, { children: touched ? reasonError : void 0 })
7858
7968
  ] }),
7859
7969
  children,
7860
- error && /* @__PURE__ */ jsx25(Alert2, { variant: "destructive", description: error })
7970
+ error && /* @__PURE__ */ jsx26(Alert2, { variant: "destructive", description: error })
7861
7971
  ] }),
7862
- /* @__PURE__ */ jsxs22(AlertDialogFooter, { children: [
7863
- /* @__PURE__ */ jsx25(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx25(Button12, { ref: cancelRef, variant: "outline", disabled: busy, children: blocked || check.state === "error" ? "Close" : cancelLabel }) }),
7864
- !blocked && check.state !== "error" && /* @__PURE__ */ jsx25(
7972
+ /* @__PURE__ */ jsxs23(AlertDialogFooter, { children: [
7973
+ /* @__PURE__ */ jsx26(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx26(Button12, { ref: cancelRef, variant: "outline", disabled: busy, children: blocked || check.state === "error" ? "Close" : cancelLabel }) }),
7974
+ !blocked && check.state !== "error" && /* @__PURE__ */ jsx26(
7865
7975
  Button12,
7866
7976
  {
7867
7977
  variant,
@@ -7883,16 +7993,16 @@ function ConfirmDialog({
7883
7993
  import { XIcon as XIcon2 } from "lucide-react";
7884
7994
  import {
7885
7995
  Button as Button13,
7886
- Dialog as Dialog4,
7996
+ Dialog as Dialog5,
7887
7997
  DialogClose as DialogClose2,
7888
- DialogContent as DialogContent3,
7889
- DialogDescription as DialogDescription3,
7890
- DialogTitle as DialogTitle3,
7891
- DialogTrigger as DialogTrigger3,
7892
- ScrollArea as ScrollArea7,
7998
+ DialogContent as DialogContent4,
7999
+ DialogDescription as DialogDescription4,
8000
+ DialogTitle as DialogTitle4,
8001
+ DialogTrigger as DialogTrigger4,
8002
+ ScrollArea as ScrollArea8,
7893
8003
  cn as cn20
7894
8004
  } from "./index.js";
7895
- import { jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
8005
+ import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
7896
8006
  var WIDTH = {
7897
8007
  md: "max-w-3xl",
7898
8008
  lg: "max-w-5xl",
@@ -7919,10 +8029,10 @@ function FullscreenDialog({
7919
8029
  can,
7920
8030
  className
7921
8031
  }) {
7922
- return /* @__PURE__ */ jsxs23(Dialog4, { open, defaultOpen, onOpenChange, modal, children: [
7923
- trigger && /* @__PURE__ */ jsx26(DialogTrigger3, { asChild: true, children: trigger }),
7924
- /* @__PURE__ */ jsxs23(
7925
- DialogContent3,
8032
+ return /* @__PURE__ */ jsxs24(Dialog5, { open, defaultOpen, onOpenChange, modal, children: [
8033
+ trigger && /* @__PURE__ */ jsx27(DialogTrigger4, { asChild: true, children: trigger }),
8034
+ /* @__PURE__ */ jsxs24(
8035
+ DialogContent4,
7926
8036
  {
7927
8037
  "data-slot": "fullscreen-dialog",
7928
8038
  showCloseButton: false,
@@ -7932,26 +8042,26 @@ function FullscreenDialog({
7932
8042
  className
7933
8043
  ),
7934
8044
  children: [
7935
- /* @__PURE__ */ jsxs23("div", { "data-slot": "fullscreen-dialog-bar", className: "flex shrink-0 items-center gap-3 border-b px-4 py-3", children: [
7936
- /* @__PURE__ */ jsx26(DialogClose2, { asChild: true, children: /* @__PURE__ */ jsx26(Button13, { variant: "ghost", size: "icon-sm", "aria-label": closeLabel, children: /* @__PURE__ */ jsx26(XIcon2, {}) }) }),
7937
- /* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 flex-1 flex-col", children: [
7938
- /* @__PURE__ */ jsx26(DialogTitle3, { className: "truncate text-base font-medium", children: title }),
7939
- description !== void 0 && /* @__PURE__ */ jsx26(DialogDescription3, { className: "truncate text-sm text-muted-foreground", children: description })
8045
+ /* @__PURE__ */ jsxs24("div", { "data-slot": "fullscreen-dialog-bar", className: "flex shrink-0 items-center gap-3 border-b px-4 py-3", children: [
8046
+ /* @__PURE__ */ jsx27(DialogClose2, { asChild: true, children: /* @__PURE__ */ jsx27(Button13, { variant: "ghost", size: "icon-sm", "aria-label": closeLabel, children: /* @__PURE__ */ jsx27(XIcon2, {}) }) }),
8047
+ /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-1 flex-col", children: [
8048
+ /* @__PURE__ */ jsx27(DialogTitle4, { className: "truncate text-base font-medium", children: title }),
8049
+ description !== void 0 && /* @__PURE__ */ jsx27(DialogDescription4, { className: "truncate text-sm text-muted-foreground", children: description })
7940
8050
  ] }),
7941
- actions && actions.length > 0 && /* @__PURE__ */ jsx26(Actions, { actions, onAction, icons, Link, can })
8051
+ actions && actions.length > 0 && /* @__PURE__ */ jsx27(Actions, { actions, onAction, icons, Link, can })
7942
8052
  ] }),
7943
- /* @__PURE__ */ jsxs23("div", { className: cn20("flex min-h-0 flex-1 flex-col", aside && "lg:flex-row"), children: [
7944
- /* @__PURE__ */ jsx26(ScrollArea7, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsx26("div", { className: cn20("mx-auto w-full p-4 sm:p-6", WIDTH[width]), children }) }),
7945
- aside && /* @__PURE__ */ jsx26(
8053
+ /* @__PURE__ */ jsxs24("div", { className: cn20("flex min-h-0 flex-1 flex-col", aside && "lg:flex-row"), children: [
8054
+ /* @__PURE__ */ jsx27(ScrollArea8, { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsx27("div", { className: cn20("mx-auto w-full p-4 sm:p-6", WIDTH[width]), children }) }),
8055
+ aside && /* @__PURE__ */ jsx27(
7946
8056
  "aside",
7947
8057
  {
7948
8058
  "data-slot": "fullscreen-dialog-aside",
7949
8059
  className: "shrink-0 border-t lg:w-80 lg:border-t-0 lg:border-s",
7950
- children: /* @__PURE__ */ jsx26(ScrollArea7, { className: "h-full max-h-[40dvh] lg:max-h-none", children: /* @__PURE__ */ jsx26("div", { className: "p-4 sm:p-6", children: aside }) })
8060
+ children: /* @__PURE__ */ jsx27(ScrollArea8, { className: "h-full max-h-[40dvh] lg:max-h-none", children: /* @__PURE__ */ jsx27("div", { className: "p-4 sm:p-6", children: aside }) })
7951
8061
  }
7952
8062
  )
7953
8063
  ] }),
7954
- footer !== void 0 && /* @__PURE__ */ jsx26("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 })
8064
+ footer !== void 0 && /* @__PURE__ */ jsx27("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 })
7955
8065
  ]
7956
8066
  }
7957
8067
  )
@@ -7961,7 +8071,7 @@ function FullscreenDialog({
7961
8071
  // src/blocks/person-card.tsx
7962
8072
  import { MailIcon, PhoneIcon } from "lucide-react";
7963
8073
  import { CardDescription as CardDescription4, CardHeader as CardHeader4, CardTitle as CardTitle4, Value as Value5, cn as cn21, humanize as humanize6 } from "./index.js";
7964
- import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
8074
+ import { jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
7965
8075
  var COVER = {
7966
8076
  muted: "bg-muted",
7967
8077
  brand: "bg-gradient-brand-w-e",
@@ -7980,7 +8090,7 @@ function PersonCard({
7980
8090
  can,
7981
8091
  className
7982
8092
  }) {
7983
- const name = person.href ? /* @__PURE__ */ jsx27(
8093
+ const name = person.href ? /* @__PURE__ */ jsx28(
7984
8094
  Link,
7985
8095
  {
7986
8096
  href: person.href,
@@ -7989,71 +8099,71 @@ function PersonCard({
7989
8099
  }
7990
8100
  ) : person.name;
7991
8101
  const visibleFields = fields ?? [];
7992
- const actionBar = actions && actions.length > 0 ? /* @__PURE__ */ jsx27(Actions, { actions, onAction: (id) => onAction?.(id, person), icons, Link, can, menuLabel: `Actions for ${person.name}` }) : null;
8102
+ const actionBar = actions && actions.length > 0 ? /* @__PURE__ */ jsx28(Actions, { actions, onAction: (id) => onAction?.(id, person), icons, Link, can, menuLabel: `Actions for ${person.name}` }) : null;
7993
8103
  if (layout === "compact") {
7994
- return /* @__PURE__ */ jsxs24("div", { "data-slot": "person-card", "data-layout": "compact", className: cn21("flex min-w-0 items-center gap-3", className), children: [
7995
- /* @__PURE__ */ jsx27(PersonAvatar, { name: person.name, image: person.image, presence: person.presence }),
7996
- /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-col text-sm", children: [
7997
- /* @__PURE__ */ jsx27("span", { className: "truncate font-medium", children: name }),
7998
- (person.role || person.email) && /* @__PURE__ */ jsx27("span", { className: "truncate text-muted-foreground", children: person.role ?? person.email })
8104
+ return /* @__PURE__ */ jsxs25("div", { "data-slot": "person-card", "data-layout": "compact", className: cn21("flex min-w-0 items-center gap-3", className), children: [
8105
+ /* @__PURE__ */ jsx28(PersonAvatar, { name: person.name, image: person.image, presence: person.presence }),
8106
+ /* @__PURE__ */ jsxs25("div", { className: "flex min-w-0 flex-col text-sm", children: [
8107
+ /* @__PURE__ */ jsx28("span", { className: "truncate font-medium", children: name }),
8108
+ (person.role || person.email) && /* @__PURE__ */ jsx28("span", { className: "truncate text-muted-foreground", children: person.role ?? person.email })
7999
8109
  ] }),
8000
- actionBar && /* @__PURE__ */ jsx27("div", { className: "ms-auto", children: actionBar })
8110
+ actionBar && /* @__PURE__ */ jsx28("div", { className: "ms-auto", children: actionBar })
8001
8111
  ] });
8002
8112
  }
8003
8113
  if (layout === "row") {
8004
- return /* @__PURE__ */ jsxs24(
8114
+ return /* @__PURE__ */ jsxs25(
8005
8115
  "div",
8006
8116
  {
8007
8117
  "data-slot": "person-card",
8008
8118
  "data-layout": "row",
8009
8119
  className: cn21("flex flex-wrap items-center gap-x-4 gap-y-2 text-sm sm:flex-nowrap", className),
8010
8120
  children: [
8011
- /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
8012
- /* @__PURE__ */ jsx27(PersonAvatar, { name: person.name, image: person.image, presence: person.presence }),
8013
- /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-col", children: [
8014
- /* @__PURE__ */ jsx27("span", { className: "truncate font-medium", children: name }),
8015
- person.email && /* @__PURE__ */ jsx27("span", { className: "truncate text-muted-foreground", children: person.email })
8121
+ /* @__PURE__ */ jsxs25("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
8122
+ /* @__PURE__ */ jsx28(PersonAvatar, { name: person.name, image: person.image, presence: person.presence }),
8123
+ /* @__PURE__ */ jsxs25("div", { className: "flex min-w-0 flex-col", children: [
8124
+ /* @__PURE__ */ jsx28("span", { className: "truncate font-medium", children: name }),
8125
+ person.email && /* @__PURE__ */ jsx28("span", { className: "truncate text-muted-foreground", children: person.email })
8016
8126
  ] })
8017
8127
  ] }),
8018
- person.role && /* @__PURE__ */ jsx27("span", { className: "w-32 shrink-0 truncate text-muted-foreground max-sm:hidden", children: person.role }),
8019
- visibleFields.map((field) => /* @__PURE__ */ jsx27("span", { className: "w-28 shrink-0 truncate max-md:hidden", children: /* @__PURE__ */ jsx27(Value5, { row: person, field }) }, String(field.key))),
8020
- person.status && /* @__PURE__ */ jsx27("span", { className: "shrink-0", children: /* @__PURE__ */ jsx27(BadgeView, { badge: person.status }) }),
8021
- actionBar && /* @__PURE__ */ jsx27("div", { className: "shrink-0", children: actionBar })
8128
+ person.role && /* @__PURE__ */ jsx28("span", { className: "w-32 shrink-0 truncate text-muted-foreground max-sm:hidden", children: person.role }),
8129
+ visibleFields.map((field) => /* @__PURE__ */ jsx28("span", { className: "w-28 shrink-0 truncate max-md:hidden", children: /* @__PURE__ */ jsx28(Value5, { row: person, field }) }, String(field.key))),
8130
+ person.status && /* @__PURE__ */ jsx28("span", { className: "shrink-0", children: /* @__PURE__ */ jsx28(BadgeView, { badge: person.status }) }),
8131
+ actionBar && /* @__PURE__ */ jsx28("div", { className: "shrink-0", children: actionBar })
8022
8132
  ]
8023
8133
  }
8024
8134
  );
8025
8135
  }
8026
- const statList = stats && stats.length > 0 && /* @__PURE__ */ jsx27(
8136
+ const statList = stats && stats.length > 0 && /* @__PURE__ */ jsx28(
8027
8137
  "dl",
8028
8138
  {
8029
8139
  className: "grid divide-x rounded-lg border",
8030
8140
  style: { gridTemplateColumns: `repeat(${stats.length}, minmax(0, 1fr))` },
8031
8141
  children: stats.map((stat) => {
8032
8142
  const label = stat.label ?? ("key" in stat ? humanize6(String(stat.key)) : "");
8033
- return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col-reverse items-center gap-0.5 px-2 py-2.5 text-center", children: [
8034
- /* @__PURE__ */ jsx27("dt", { className: "text-xs text-muted-foreground", children: label }),
8035
- /* @__PURE__ */ jsx27("dd", { className: "text-base font-semibold tabular-nums", children: "key" in stat ? /* @__PURE__ */ jsx27(Value5, { row: person, field: stat }) : stat.value })
8143
+ return /* @__PURE__ */ jsxs25("div", { className: "flex flex-col-reverse items-center gap-0.5 px-2 py-2.5 text-center", children: [
8144
+ /* @__PURE__ */ jsx28("dt", { className: "text-xs text-muted-foreground", children: label }),
8145
+ /* @__PURE__ */ jsx28("dd", { className: "text-base font-semibold tabular-nums", children: "key" in stat ? /* @__PURE__ */ jsx28(Value5, { row: person, field: stat }) : stat.value })
8036
8146
  ] }, label);
8037
8147
  })
8038
8148
  }
8039
8149
  );
8040
- const contact = (person.email || person.phone) && /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1 text-sm text-muted-foreground", children: [
8041
- person.email && /* @__PURE__ */ jsxs24("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: [
8042
- /* @__PURE__ */ jsx27(MailIcon, { "aria-hidden": true, className: "size-4 shrink-0" }),
8043
- /* @__PURE__ */ jsx27("span", { className: "truncate", children: person.email })
8150
+ const contact = (person.email || person.phone) && /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-1 text-sm text-muted-foreground", children: [
8151
+ person.email && /* @__PURE__ */ jsxs25("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: [
8152
+ /* @__PURE__ */ jsx28(MailIcon, { "aria-hidden": true, className: "size-4 shrink-0" }),
8153
+ /* @__PURE__ */ jsx28("span", { className: "truncate", children: person.email })
8044
8154
  ] }),
8045
- person.phone && /* @__PURE__ */ jsxs24("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: [
8046
- /* @__PURE__ */ jsx27(PhoneIcon, { "aria-hidden": true, className: "size-4 shrink-0" }),
8155
+ person.phone && /* @__PURE__ */ jsxs25("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: [
8156
+ /* @__PURE__ */ jsx28(PhoneIcon, { "aria-hidden": true, className: "size-4 shrink-0" }),
8047
8157
  person.phone
8048
8158
  ] })
8049
8159
  ] });
8050
- const fieldList = visibleFields.length > 0 && /* @__PURE__ */ jsx27("dl", { className: "flex flex-col gap-2 text-sm", children: visibleFields.map((field) => /* @__PURE__ */ jsxs24("div", { className: "flex items-center justify-between gap-4", children: [
8051
- /* @__PURE__ */ jsx27("dt", { className: "text-muted-foreground", children: field.label ?? humanize6(String(field.key)) }),
8052
- /* @__PURE__ */ jsx27("dd", { className: "min-w-0 truncate text-end font-medium", children: /* @__PURE__ */ jsx27(Value5, { row: person, field }) })
8160
+ const fieldList = visibleFields.length > 0 && /* @__PURE__ */ jsx28("dl", { className: "flex flex-col gap-2 text-sm", children: visibleFields.map((field) => /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between gap-4", children: [
8161
+ /* @__PURE__ */ jsx28("dt", { className: "text-muted-foreground", children: field.label ?? humanize6(String(field.key)) }),
8162
+ /* @__PURE__ */ jsx28("dd", { className: "min-w-0 truncate text-end font-medium", children: /* @__PURE__ */ jsx28(Value5, { row: person, field }) })
8053
8163
  ] }, String(field.key))) });
8054
8164
  if (layout === "header") {
8055
8165
  const band2 = cover ?? "muted";
8056
- return /* @__PURE__ */ jsxs24(
8166
+ return /* @__PURE__ */ jsxs25(
8057
8167
  "section",
8058
8168
  {
8059
8169
  "data-slot": "person-card",
@@ -8061,10 +8171,10 @@ function PersonCard({
8061
8171
  "aria-label": person.name,
8062
8172
  className: cn21("overflow-hidden rounded-xl bg-card text-card-foreground ring-1 ring-foreground/10", className),
8063
8173
  children: [
8064
- band2 !== "none" && /* @__PURE__ */ jsx27("div", { "aria-hidden": true, className: cn21("h-24 sm:h-32", COVER[band2]) }),
8065
- /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-4 px-4 pb-4 sm:px-6 sm:pb-6", children: [
8066
- /* @__PURE__ */ jsxs24("div", { className: cn21("flex flex-wrap items-end justify-between gap-4", band2 === "none" ? "pt-6" : "-mt-10 sm:-mt-12"), children: [
8067
- /* @__PURE__ */ jsx27(
8174
+ band2 !== "none" && /* @__PURE__ */ jsx28("div", { "aria-hidden": true, className: cn21("h-24 sm:h-32", COVER[band2]) }),
8175
+ /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-4 px-4 pb-4 sm:px-6 sm:pb-6", children: [
8176
+ /* @__PURE__ */ jsxs25("div", { className: cn21("flex flex-wrap items-end justify-between gap-4", band2 === "none" ? "pt-6" : "-mt-10 sm:-mt-12"), children: [
8177
+ /* @__PURE__ */ jsx28(
8068
8178
  PersonAvatar,
8069
8179
  {
8070
8180
  name: person.name,
@@ -8079,18 +8189,18 @@ function PersonCard({
8079
8189
  ),
8080
8190
  actionBar
8081
8191
  ] }),
8082
- /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-col gap-1", children: [
8083
- /* @__PURE__ */ jsxs24("div", { className: "flex flex-wrap items-center gap-2", children: [
8084
- /* @__PURE__ */ jsx27("h1", { className: "text-2xl font-semibold tracking-tight", children: person.name }),
8085
- person.status && /* @__PURE__ */ jsx27(BadgeView, { badge: person.status })
8192
+ /* @__PURE__ */ jsxs25("div", { className: "flex min-w-0 flex-col gap-1", children: [
8193
+ /* @__PURE__ */ jsxs25("div", { className: "flex flex-wrap items-center gap-2", children: [
8194
+ /* @__PURE__ */ jsx28("h1", { className: "text-2xl font-semibold tracking-tight", children: person.name }),
8195
+ person.status && /* @__PURE__ */ jsx28(BadgeView, { badge: person.status })
8086
8196
  ] }),
8087
- person.role && /* @__PURE__ */ jsx27("p", { className: "text-sm text-muted-foreground", children: person.role })
8197
+ person.role && /* @__PURE__ */ jsx28("p", { className: "text-sm text-muted-foreground", children: person.role })
8088
8198
  ] }),
8089
- (contact || fieldList) && /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-4 sm:flex-row sm:gap-10", children: [
8199
+ (contact || fieldList) && /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-4 sm:flex-row sm:gap-10", children: [
8090
8200
  contact,
8091
- visibleFields.length > 0 && /* @__PURE__ */ jsx27("ul", { className: "flex flex-wrap gap-x-6 gap-y-1 text-sm", children: visibleFields.map((field) => /* @__PURE__ */ jsxs24("li", { className: "flex flex-col", children: [
8092
- /* @__PURE__ */ jsx27("span", { className: "text-muted-foreground", children: field.label ?? humanize6(String(field.key)) }),
8093
- /* @__PURE__ */ jsx27("span", { className: "font-medium", children: /* @__PURE__ */ jsx27(Value5, { row: person, field }) })
8201
+ visibleFields.length > 0 && /* @__PURE__ */ jsx28("ul", { className: "flex flex-wrap gap-x-6 gap-y-1 text-sm", children: visibleFields.map((field) => /* @__PURE__ */ jsxs25("li", { className: "flex flex-col", children: [
8202
+ /* @__PURE__ */ jsx28("span", { className: "text-muted-foreground", children: field.label ?? humanize6(String(field.key)) }),
8203
+ /* @__PURE__ */ jsx28("span", { className: "font-medium", children: /* @__PURE__ */ jsx28(Value5, { row: person, field }) })
8094
8204
  ] }, String(field.key))) })
8095
8205
  ] }),
8096
8206
  statList
@@ -8100,7 +8210,7 @@ function PersonCard({
8100
8210
  );
8101
8211
  }
8102
8212
  const band = cover ?? "none";
8103
- return /* @__PURE__ */ jsxs24(
8213
+ return /* @__PURE__ */ jsxs25(
8104
8214
  "section",
8105
8215
  {
8106
8216
  "data-slot": "person-card",
@@ -8108,9 +8218,9 @@ function PersonCard({
8108
8218
  "aria-label": person.name,
8109
8219
  className: cn21("flex flex-col overflow-hidden rounded-xl bg-card text-sm text-card-foreground ring-1 ring-foreground/10", className),
8110
8220
  children: [
8111
- band !== "none" && /* @__PURE__ */ jsx27("div", { "aria-hidden": true, className: cn21("h-16", COVER[band]) }),
8112
- /* @__PURE__ */ jsxs24(CardHeader4, { className: cn21("flex flex-col items-center gap-2 px-4 text-center", band === "none" ? "pt-6" : "-mt-8"), children: [
8113
- /* @__PURE__ */ jsx27(
8221
+ band !== "none" && /* @__PURE__ */ jsx28("div", { "aria-hidden": true, className: cn21("h-16", COVER[band]) }),
8222
+ /* @__PURE__ */ jsxs25(CardHeader4, { className: cn21("flex flex-col items-center gap-2 px-4 text-center", band === "none" ? "pt-6" : "-mt-8"), children: [
8223
+ /* @__PURE__ */ jsx28(
8114
8224
  PersonAvatar,
8115
8225
  {
8116
8226
  name: person.name,
@@ -8120,18 +8230,18 @@ function PersonCard({
8120
8230
  className: cn21("size-16! [&_[data-slot=avatar-fallback]]:text-lg", band !== "none" && "ring-4 ring-card")
8121
8231
  }
8122
8232
  ),
8123
- /* @__PURE__ */ jsxs24("div", { className: "flex flex-col items-center gap-0.5", children: [
8124
- /* @__PURE__ */ jsx27(CardTitle4, { as: "h3", children: name }),
8125
- person.role && /* @__PURE__ */ jsx27(CardDescription4, { children: person.role })
8233
+ /* @__PURE__ */ jsxs25("div", { className: "flex flex-col items-center gap-0.5", children: [
8234
+ /* @__PURE__ */ jsx28(CardTitle4, { as: "h3", children: name }),
8235
+ person.role && /* @__PURE__ */ jsx28(CardDescription4, { children: person.role })
8126
8236
  ] }),
8127
- person.status && /* @__PURE__ */ jsx27(BadgeView, { badge: person.status })
8237
+ person.status && /* @__PURE__ */ jsx28(BadgeView, { badge: person.status })
8128
8238
  ] }),
8129
- /* @__PURE__ */ jsxs24("div", { className: "flex flex-1 flex-col gap-4 p-4", children: [
8239
+ /* @__PURE__ */ jsxs25("div", { className: "flex flex-1 flex-col gap-4 p-4", children: [
8130
8240
  contact,
8131
8241
  fieldList,
8132
8242
  statList
8133
8243
  ] }),
8134
- actionBar && /* @__PURE__ */ jsx27("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 })
8244
+ actionBar && /* @__PURE__ */ jsx28("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 })
8135
8245
  ]
8136
8246
  }
8137
8247
  );
@@ -8155,21 +8265,21 @@ function PersonCards({
8155
8265
  ...view
8156
8266
  }) {
8157
8267
  if (layout === "card") {
8158
- return /* @__PURE__ */ jsx27("div", { "data-slot": "person-cards", className: cn21("grid gap-4", GRID[columns], className), children: people.map((person) => /* @__PURE__ */ jsx27(PersonCard, { person, layout: "card", ...view }, getId(person))) });
8268
+ return /* @__PURE__ */ jsx28("div", { "data-slot": "person-cards", className: cn21("grid gap-4", GRID[columns], className), children: people.map((person) => /* @__PURE__ */ jsx28(PersonCard, { person, layout: "card", ...view }, getId(person))) });
8159
8269
  }
8160
- return /* @__PURE__ */ jsxs24(
8270
+ return /* @__PURE__ */ jsxs25(
8161
8271
  "section",
8162
8272
  {
8163
8273
  "data-slot": "person-cards",
8164
8274
  "aria-label": title,
8165
8275
  className: cn21("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),
8166
8276
  children: [
8167
- (title || description || headerActions?.length) && /* @__PURE__ */ jsxs24(CardHeader4, { children: [
8168
- title && /* @__PURE__ */ jsx27(CardTitle4, { as: "h2", children: title }),
8169
- description && /* @__PURE__ */ jsx27(CardDescription4, { children: description }),
8170
- headerActions && headerActions.length > 0 && /* @__PURE__ */ jsx27("div", { "data-slot": "card-action", className: "col-start-2 row-span-2 row-start-1 self-start justify-self-end", children: /* @__PURE__ */ jsx27(Actions, { actions: headerActions, onAction: onHeaderAction, icons: view.icons, Link: view.linkComponent, can: view.can }) })
8277
+ (title || description || headerActions?.length) && /* @__PURE__ */ jsxs25(CardHeader4, { children: [
8278
+ title && /* @__PURE__ */ jsx28(CardTitle4, { as: "h2", children: title }),
8279
+ description && /* @__PURE__ */ jsx28(CardDescription4, { children: description }),
8280
+ headerActions && headerActions.length > 0 && /* @__PURE__ */ jsx28("div", { "data-slot": "card-action", className: "col-start-2 row-span-2 row-start-1 self-start justify-self-end", children: /* @__PURE__ */ jsx28(Actions, { actions: headerActions, onAction: onHeaderAction, icons: view.icons, Link: view.linkComponent, can: view.can }) })
8171
8281
  ] }),
8172
- people.length === 0 ? /* @__PURE__ */ jsx27("p", { className: "px-4 py-6 text-center text-muted-foreground", children: emptyText }) : /* @__PURE__ */ jsx27("ul", { className: "flex flex-col divide-y border-t", children: people.map((person) => /* @__PURE__ */ jsx27("li", { className: "px-4 py-3", children: /* @__PURE__ */ jsx27(PersonCard, { person, layout, ...view }) }, getId(person))) })
8282
+ people.length === 0 ? /* @__PURE__ */ jsx28("p", { className: "px-4 py-6 text-center text-muted-foreground", children: emptyText }) : /* @__PURE__ */ jsx28("ul", { className: "flex flex-col divide-y border-t", children: people.map((person) => /* @__PURE__ */ jsx28("li", { className: "px-4 py-3", children: /* @__PURE__ */ jsx28(PersonCard, { person, layout, ...view }) }, getId(person))) })
8173
8283
  ]
8174
8284
  }
8175
8285
  );
@@ -8198,6 +8308,7 @@ export {
8198
8308
  RankedList,
8199
8309
  RecordPage,
8200
8310
  SettingsDialog,
8311
+ ShortcutsDialog,
8201
8312
  StatCard,
8202
8313
  StatCards,
8203
8314
  TIER_COLUMNS,