@discuss-ds/ui 0.40.1 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -35,6 +35,7 @@ __export(index_exports, {
35
35
  ActivityStructure: () => ActivityStructure,
36
36
  AskAiInput: () => AskAiInput,
37
37
  AskAiToggle: () => AskAiToggle,
38
+ Avatar: () => Avatar,
38
39
  Badge: () => Badge,
39
40
  Button: () => Button,
40
41
  Calendar: () => Calendar,
@@ -91,9 +92,11 @@ __export(index_exports, {
91
92
  NavRailItem: () => NavRailItem,
92
93
  NumberInput: () => NumberInput,
93
94
  OpenEndAnswer: () => OpenEndAnswer,
95
+ OrgMonogram: () => OrgMonogram,
94
96
  Pagination: () => Pagination,
95
97
  Progress: () => Progress,
96
98
  ProjectSelector: () => ProjectSelector,
99
+ ProjectSidebar: () => ProjectSidebar,
97
100
  QuestionCard: () => QuestionCard,
98
101
  QuestionEditorCard: () => QuestionEditorCard,
99
102
  QuestionHeader: () => QuestionHeader,
@@ -115,6 +118,7 @@ __export(index_exports, {
115
118
  SelectItem: () => SelectItem,
116
119
  SelectTrigger: () => SelectTrigger,
117
120
  SelectValue: () => SelectValue,
121
+ SidebarNavItem: () => SidebarNavItem,
118
122
  Slider: () => Slider,
119
123
  StatCard: () => StatCard,
120
124
  StatusTag: () => StatusTag,
@@ -2516,63 +2520,117 @@ Stepper.displayName = "Stepper";
2516
2520
  // src/components/Navigation/NavRail.tsx
2517
2521
  var React34 = __toESM(require("react"), 1);
2518
2522
  var import_jsx_runtime35 = require("react/jsx-runtime");
2519
- var NavRail = React34.forwardRef(({ className, children, footer, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("nav", { ref, className: cn("flex h-full w-16 shrink-0 flex-col border-r border-border", className), ...props, children: [
2523
+ var NavRailContext = React34.createContext("secondary");
2524
+ var NavRail = React34.forwardRef(({ className, children, footer, header, hierarchy = "secondary", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(NavRailContext.Provider, { value: hierarchy, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("nav", { ref, className: cn("flex h-full shrink-0 flex-col border-r border-border", hierarchy === "primary" ? "w-18" : "w-16", className), ...props, children: [
2525
+ header && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex h-16 shrink-0 items-center justify-center border-b border-border", children: header }),
2520
2526
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("ul", { className: "flex flex-col items-center gap-2 px-2 pt-3", children }),
2521
- footer && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mt-auto flex flex-col items-center px-2 pb-3", children: footer })
2522
- ] }));
2527
+ footer && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("mt-auto flex flex-col items-center px-2", hierarchy === "primary" ? "gap-3 py-4" : "pb-3"), children: footer })
2528
+ ] }) }));
2523
2529
  NavRail.displayName = "NavRail";
2524
- var NavRailItem = React34.forwardRef(({ className, icon, label, selected = false, type = "button", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("li", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2525
- "button",
2526
- {
2527
- ref,
2528
- type,
2529
- "aria-current": selected ? "page" : void 0,
2530
- className: cn(
2531
- "group flex w-full cursor-pointer flex-col items-center gap-1 rounded-md text-body-xxs outline-offset-2 disabled:pointer-events-none disabled:opacity-50",
2532
- // Hover (selected or not, Figma "Primary menu items" Hover=Yes): the caption and icon in accent-soft-foreground.
2533
- selected ? "text-surface-foreground" : "text-secondary-muted-foreground",
2534
- "hover:text-accent-soft-foreground",
2535
- className
2536
- ),
2537
- ...props,
2538
- children: [
2539
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2540
- "span",
2541
- {
2542
- "aria-hidden": "true",
2543
- className: cn(
2544
- "flex size-9 items-center justify-center rounded-md transition-colors [&>svg]:size-4",
2545
- // Hover fills the square with accent-soft, over the selected fill too.
2546
- selected ? "bg-secondary" : "",
2547
- "group-hover:bg-accent-soft"
2548
- ),
2549
- children: icon
2550
- }
2530
+ var NavRailItem = React34.forwardRef(({ className, icon, label, selected = false, type = "button", ...props }, ref) => {
2531
+ const primary = React34.useContext(NavRailContext) === "primary";
2532
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("li", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2533
+ "button",
2534
+ {
2535
+ ref,
2536
+ type,
2537
+ "aria-current": selected ? "page" : void 0,
2538
+ className: cn(
2539
+ "group flex w-full cursor-pointer flex-col items-center rounded-md text-body-xxs outline-offset-2 disabled:pointer-events-none disabled:opacity-50",
2540
+ primary ? "gap-2 font-medium" : "gap-1",
2541
+ // Hover (selected or not, Figma "Primary menu items" Hover=Yes): the caption and icon in accent-soft-foreground.
2542
+ selected ? primary ? "text-primary" : "text-surface-foreground" : "text-secondary-muted-foreground",
2543
+ "hover:text-accent-soft-foreground",
2544
+ className
2551
2545
  ),
2552
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: label })
2553
- ]
2554
- }
2555
- ) }));
2546
+ ...props,
2547
+ children: [
2548
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2549
+ "span",
2550
+ {
2551
+ "aria-hidden": "true",
2552
+ className: cn(
2553
+ "flex items-center justify-center rounded-md transition-colors",
2554
+ primary ? "size-10 [&>svg]:size-6" : "size-9 [&>svg]:size-4",
2555
+ // Selected: secondary fill, or primary with the label colour on a primary rail. Hover fills the square with accent-soft, over the selected fill too.
2556
+ selected ? primary ? "bg-primary text-primary-foreground" : "bg-secondary" : "",
2557
+ "group-hover:bg-accent-soft group-hover:text-accent-soft-foreground"
2558
+ ),
2559
+ children: icon
2560
+ }
2561
+ ),
2562
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: label })
2563
+ ]
2564
+ }
2565
+ ) });
2566
+ });
2556
2567
  NavRailItem.displayName = "NavRailItem";
2557
2568
 
2558
- // src/components/Overlays & Feedback/Dialog.tsx
2569
+ // src/components/Navigation/ProjectSidebar.tsx
2559
2570
  var React35 = __toESM(require("react"), 1);
2571
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2572
+ var ProjectSidebar = React35.forwardRef(({ className, children, project, action, label, ...props }, ref) => {
2573
+ const labelId = React35.useId();
2574
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("nav", { ref, className: cn("flex h-full w-60 shrink-0 flex-col border-r border-border bg-surface", className), ...props, children: [
2575
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex h-16 shrink-0 items-center gap-2 border-b border-border px-3", children: [
2576
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "min-w-0 flex-1 truncate text-ui-label text-surface-foreground", children: project }),
2577
+ action
2578
+ ] }),
2579
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex min-h-0 flex-col gap-2 overflow-y-auto p-3", children: [
2580
+ label && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { id: labelId, className: "px-2 pt-1 text-ui-caption text-secondary-muted-foreground", children: label }),
2581
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ul", { className: "flex flex-col gap-2", "aria-labelledby": label ? labelId : void 0, children })
2582
+ ] })
2583
+ ] });
2584
+ });
2585
+ ProjectSidebar.displayName = "ProjectSidebar";
2586
+
2587
+ // src/components/Navigation/SidebarNavItem.tsx
2588
+ var React36 = __toESM(require("react"), 1);
2560
2589
  var import_react17 = require("@phosphor-icons/react");
2590
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2591
+ var SidebarNavItem = React36.forwardRef(
2592
+ ({ className, icon, label, selected = false, expandable = false, expanded = false, type = "button", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2593
+ "button",
2594
+ {
2595
+ ref,
2596
+ type,
2597
+ "aria-current": selected ? "page" : void 0,
2598
+ "aria-expanded": expandable ? expanded : void 0,
2599
+ className: cn(
2600
+ "flex h-8 w-full cursor-pointer items-center gap-2 rounded-md px-2 text-left text-body-small text-surface-foreground outline-offset-2 transition-colors disabled:pointer-events-none disabled:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
2601
+ // Selected (Figma): the secondary fill with overlay-dark-5 over it.
2602
+ selected ? "bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5" : "hover:bg-accent-soft hover:text-accent-soft-foreground",
2603
+ className
2604
+ ),
2605
+ ...props,
2606
+ children: [
2607
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { "aria-hidden": "true", className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4", children: icon }),
2608
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "min-w-0 flex-1 truncate", children: label }),
2609
+ expandable && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react17.CaretDown, { "aria-hidden": "true", className: cn("transition-transform", expanded && "rotate-180") })
2610
+ ]
2611
+ }
2612
+ ) })
2613
+ );
2614
+ SidebarNavItem.displayName = "SidebarNavItem";
2615
+
2616
+ // src/components/Overlays & Feedback/Dialog.tsx
2617
+ var React37 = __toESM(require("react"), 1);
2618
+ var import_react18 = require("@phosphor-icons/react");
2561
2619
  var import_radix_ui17 = require("radix-ui");
2562
- var import_jsx_runtime36 = require("react/jsx-runtime");
2620
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2563
2621
  var Dialog = import_radix_ui17.Dialog.Root;
2564
2622
  var DialogTrigger = import_radix_ui17.Dialog.Trigger;
2565
2623
  var DialogClose = import_radix_ui17.Dialog.Close;
2566
- var DialogContent = React35.forwardRef(
2567
- ({ className, children, closeLabel = "Close", hideClose, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_radix_ui17.Dialog.Portal, { children: [
2568
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2624
+ var DialogContent = React37.forwardRef(
2625
+ ({ className, children, closeLabel = "Close", hideClose, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_radix_ui17.Dialog.Portal, { children: [
2626
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2569
2627
  import_radix_ui17.Dialog.Overlay,
2570
2628
  {
2571
2629
  style: { zIndex: "var(--sys-z-30)" },
2572
2630
  className: "fixed inset-0 bg-primary/30"
2573
2631
  }
2574
2632
  ),
2575
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2633
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2576
2634
  import_radix_ui17.Dialog.Content,
2577
2635
  {
2578
2636
  ref,
@@ -2584,15 +2642,15 @@ var DialogContent = React35.forwardRef(
2584
2642
  ...props,
2585
2643
  children: [
2586
2644
  children,
2587
- !hideClose && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_radix_ui17.Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { variant: "ghost", size: "icon-sm", "aria-label": closeLabel, className: "absolute top-4 right-6", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react17.X, { size: 16, "aria-hidden": true }) }) })
2645
+ !hideClose && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_radix_ui17.Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Button, { variant: "ghost", size: "icon-sm", "aria-label": closeLabel, className: "absolute top-4 right-6", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react18.X, { size: 16, "aria-hidden": true }) }) })
2588
2646
  ]
2589
2647
  }
2590
2648
  )
2591
2649
  ] })
2592
2650
  );
2593
2651
  DialogContent.displayName = "DialogContent";
2594
- var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn("flex flex-col gap-1.5 border-b border-border px-6 py-4 pr-16", className), ...props });
2595
- var DialogTitle = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2652
+ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: cn("flex flex-col gap-1.5 border-b border-border px-6 py-4 pr-16", className), ...props });
2653
+ var DialogTitle = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2596
2654
  import_radix_ui17.Dialog.Title,
2597
2655
  {
2598
2656
  ref,
@@ -2601,7 +2659,7 @@ var DialogTitle = React35.forwardRef(({ className, ...props }, ref) => /* @__PUR
2601
2659
  }
2602
2660
  ));
2603
2661
  DialogTitle.displayName = "DialogTitle";
2604
- var DialogDescription = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2662
+ var DialogDescription = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2605
2663
  import_radix_ui17.Dialog.Description,
2606
2664
  {
2607
2665
  ref,
@@ -2610,15 +2668,15 @@ var DialogDescription = React35.forwardRef(({ className, ...props }, ref) => /*
2610
2668
  }
2611
2669
  ));
2612
2670
  DialogDescription.displayName = "DialogDescription";
2613
- var DialogBody = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn("flex flex-col gap-4 p-6", className), ...props });
2614
- var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn("flex items-center justify-end gap-3 border-t border-border px-6 py-4", className), ...props });
2671
+ var DialogBody = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: cn("flex flex-col gap-4 p-6", className), ...props });
2672
+ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: cn("flex items-center justify-end gap-3 border-t border-border px-6 py-4", className), ...props });
2615
2673
 
2616
2674
  // src/components/Overlays & Feedback/Toast.tsx
2617
- var React36 = __toESM(require("react"), 1);
2618
- var import_react18 = require("@phosphor-icons/react");
2675
+ var React38 = __toESM(require("react"), 1);
2676
+ var import_react19 = require("@phosphor-icons/react");
2619
2677
  var import_class_variance_authority4 = require("class-variance-authority");
2620
2678
  var import_radix_ui18 = require("radix-ui");
2621
- var import_jsx_runtime37 = require("react/jsx-runtime");
2679
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2622
2680
  var toastVariants = (0, import_class_variance_authority4.cva)("border", {
2623
2681
  variants: {
2624
2682
  variant: {
@@ -2656,13 +2714,13 @@ var titleColour = {
2656
2714
  };
2657
2715
  function VariantIcon({ variant, size }) {
2658
2716
  const props = { size, "aria-hidden": true, className: cn("shrink-0", iconColour[variant]) };
2659
- if (variant === "success") return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react18.CheckCircle, { ...props });
2660
- if (variant === "warning") return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react18.Warning, { ...props });
2661
- if (variant === "destructive") return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react18.WarningCircle, { ...props });
2662
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react18.Info, { ...props });
2717
+ if (variant === "success") return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.CheckCircle, { ...props });
2718
+ if (variant === "warning") return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.Warning, { ...props });
2719
+ if (variant === "destructive") return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.WarningCircle, { ...props });
2720
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.Info, { ...props });
2663
2721
  }
2664
2722
  var ToastProvider = import_radix_ui18.Toast.Provider;
2665
- var ToastViewport = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2723
+ var ToastViewport = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2666
2724
  import_radix_ui18.Toast.Viewport,
2667
2725
  {
2668
2726
  ref,
@@ -2672,10 +2730,10 @@ var ToastViewport = React36.forwardRef(({ className, ...props }, ref) => /* @__P
2672
2730
  }
2673
2731
  ));
2674
2732
  ToastViewport.displayName = "ToastViewport";
2675
- var Toast = React36.forwardRef(
2733
+ var Toast = React38.forwardRef(
2676
2734
  ({ className, variant = "info", title, description, action, closeLabel = "Close", children, ...props }, ref) => {
2677
2735
  const v = variant ?? "info";
2678
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2736
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
2679
2737
  import_radix_ui18.Toast.Root,
2680
2738
  {
2681
2739
  ref,
@@ -2683,19 +2741,19 @@ var Toast = React36.forwardRef(
2683
2741
  className: cn("flex items-start gap-3 rounded-lg p-4 shadow-lg", toastVariants({ variant: v }), className),
2684
2742
  ...props,
2685
2743
  children: [
2686
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(VariantIcon, { variant: v, size: 20 }),
2687
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1 text-body-small", children: [
2688
- title != null && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_radix_ui18.Toast.Title, { className: cn("font-semibold", titleColour[v]), children: title }),
2689
- description != null && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_radix_ui18.Toast.Description, { className: "text-secondary-muted-foreground", children: description }),
2744
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(VariantIcon, { variant: v, size: 20 }),
2745
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1 text-body-small", children: [
2746
+ title != null && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_radix_ui18.Toast.Title, { className: cn("font-semibold", titleColour[v]), children: title }),
2747
+ description != null && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_radix_ui18.Toast.Description, { className: "text-secondary-muted-foreground", children: description }),
2690
2748
  children,
2691
2749
  action
2692
2750
  ] }),
2693
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2751
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2694
2752
  import_radix_ui18.Toast.Close,
2695
2753
  {
2696
2754
  "aria-label": closeLabel,
2697
2755
  className: "inline-flex size-4 shrink-0 items-center justify-center rounded-xs text-surface-foreground",
2698
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react18.X, { size: 16, "aria-hidden": true })
2756
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.X, { size: 16, "aria-hidden": true })
2699
2757
  }
2700
2758
  )
2701
2759
  ]
@@ -2705,11 +2763,11 @@ var Toast = React36.forwardRef(
2705
2763
  );
2706
2764
  Toast.displayName = "Toast";
2707
2765
  var ToastAction = import_radix_ui18.Toast.Action;
2708
- var ToastInline = React36.forwardRef(
2766
+ var ToastInline = React38.forwardRef(
2709
2767
  ({ className, variant = "info", actions, actionsPlacement = "end", onClose, closeLabel = "Close", children, ...props }, ref) => {
2710
2768
  const v = variant ?? "info";
2711
2769
  const below = actionsPlacement === "bottom" && !!actions;
2712
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2770
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
2713
2771
  "div",
2714
2772
  {
2715
2773
  ref,
@@ -2717,15 +2775,15 @@ var ToastInline = React36.forwardRef(
2717
2775
  className: cn("flex gap-2 rounded-sm px-2 py-1.5", below ? "items-start" : "items-center", inlineVariants({ variant: v }), className),
2718
2776
  ...props,
2719
2777
  children: [
2720
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: cn("inline-flex shrink-0", below && "mt-0.5"), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(VariantIcon, { variant: v === "neutral" ? "info" : v, size: 16 }) }),
2721
- below ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2722
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "text-body-small text-secondary-muted-foreground", children }),
2723
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex items-center gap-2", children: actions })
2724
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
2725
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "min-w-0 flex-1 text-body-small text-secondary-muted-foreground", children }),
2726
- actions && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex shrink-0 items-center gap-2", children: actions })
2778
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn("inline-flex shrink-0", below && "mt-0.5"), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(VariantIcon, { variant: v === "neutral" ? "info" : v, size: 16 }) }),
2779
+ below ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2780
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-body-small text-secondary-muted-foreground", children }),
2781
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex items-center gap-2", children: actions })
2782
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
2783
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "min-w-0 flex-1 text-body-small text-secondary-muted-foreground", children }),
2784
+ actions && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex shrink-0 items-center gap-2", children: actions })
2727
2785
  ] }),
2728
- onClose && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react18.X, { size: 16, "aria-hidden": true }) })
2786
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.X, { size: 16, "aria-hidden": true }) })
2729
2787
  ]
2730
2788
  }
2731
2789
  );
@@ -2734,16 +2792,16 @@ var ToastInline = React36.forwardRef(
2734
2792
  ToastInline.displayName = "ToastInline";
2735
2793
 
2736
2794
  // src/components/Overlays & Feedback/Tooltip.tsx
2737
- var React37 = __toESM(require("react"), 1);
2795
+ var React39 = __toESM(require("react"), 1);
2738
2796
  var import_radix_ui19 = require("radix-ui");
2739
- var import_jsx_runtime38 = require("react/jsx-runtime");
2797
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2740
2798
  var TooltipProvider = import_radix_ui19.Tooltip.Provider;
2741
2799
  var Tooltip = import_radix_ui19.Tooltip.Root;
2742
2800
  var TooltipTrigger = import_radix_ui19.Tooltip.Trigger;
2743
- var TooltipContent = React37.forwardRef(
2801
+ var TooltipContent = React39.forwardRef(
2744
2802
  ({ className, sideOffset = 4, title, description, action, arrow = true, children, ...props }, ref) => {
2745
2803
  const detailed = title != null || description != null;
2746
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_radix_ui19.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2804
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_radix_ui19.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2747
2805
  import_radix_ui19.Tooltip.Content,
2748
2806
  {
2749
2807
  ref,
@@ -2757,12 +2815,12 @@ var TooltipContent = React37.forwardRef(
2757
2815
  ),
2758
2816
  ...props,
2759
2817
  children: [
2760
- detailed ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
2761
- title != null && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-xs leading-4 font-semibold text-label", children: title }),
2762
- description != null && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-xs leading-4.5 text-plum-200", children: description }),
2763
- action != null && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "mt-1 text-ui-caption text-plum-300 underline *:underline", children: action })
2818
+ detailed ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
2819
+ title != null && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-xs leading-4 font-semibold text-label", children: title }),
2820
+ description != null && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "text-xs leading-4.5 text-plum-200", children: description }),
2821
+ action != null && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mt-1 text-ui-caption text-plum-300 underline *:underline", children: action })
2764
2822
  ] }) : children,
2765
- arrow && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_radix_ui19.Tooltip.Arrow, { width: 12, height: 8, className: "fill-primary-soft-foreground" })
2823
+ arrow && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_radix_ui19.Tooltip.Arrow, { width: 12, height: 8, className: "fill-primary-soft-foreground" })
2766
2824
  ]
2767
2825
  }
2768
2826
  ) });
@@ -2771,14 +2829,14 @@ var TooltipContent = React37.forwardRef(
2771
2829
  TooltipContent.displayName = "TooltipContent";
2772
2830
 
2773
2831
  // src/components/Question Types/FileUpload.tsx
2774
- var React39 = __toESM(require("react"), 1);
2775
- var import_react19 = require("@phosphor-icons/react");
2832
+ var React41 = __toESM(require("react"), 1);
2833
+ var import_react20 = require("@phosphor-icons/react");
2776
2834
  var import_radix_ui20 = require("radix-ui");
2777
2835
 
2778
2836
  // src/components/Tags & Badges/Tag.tsx
2779
- var React38 = __toESM(require("react"), 1);
2837
+ var React40 = __toESM(require("react"), 1);
2780
2838
  var import_class_variance_authority5 = require("class-variance-authority");
2781
- var import_jsx_runtime39 = require("react/jsx-runtime");
2839
+ var import_jsx_runtime41 = require("react/jsx-runtime");
2782
2840
  var tagVariants = (0, import_class_variance_authority5.cva)(
2783
2841
  "inline-flex items-center gap-1.5 whitespace-nowrap rounded-sm border px-2.5 py-1 text-ui-caption",
2784
2842
  {
@@ -2794,7 +2852,7 @@ var tagVariants = (0, import_class_variance_authority5.cva)(
2794
2852
  defaultVariants: { variant: "neutral" }
2795
2853
  }
2796
2854
  );
2797
- var Tag = React38.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { ref, className: cn(tagVariants({ variant }), className), ...props }));
2855
+ var Tag = React40.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { ref, className: cn(tagVariants({ variant }), className), ...props }));
2798
2856
  Tag.displayName = "Tag";
2799
2857
  var statusDotVariants = (0, import_class_variance_authority5.cva)("size-1.5 shrink-0 rounded-full", {
2800
2858
  variants: {
@@ -2807,20 +2865,20 @@ var statusDotVariants = (0, import_class_variance_authority5.cva)("size-1.5 shri
2807
2865
  },
2808
2866
  defaultVariants: { status: "active" }
2809
2867
  });
2810
- var StatusTag = React38.forwardRef(
2811
- ({ className, status, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { ref, className: cn(tagVariants({ variant: "default" }), className), ...props, children: [
2812
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: statusDotVariants({ status }), "aria-hidden": "true" }),
2868
+ var StatusTag = React40.forwardRef(
2869
+ ({ className, status, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { ref, className: cn(tagVariants({ variant: "default" }), className), ...props, children: [
2870
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: statusDotVariants({ status }), "aria-hidden": "true" }),
2813
2871
  children
2814
2872
  ] })
2815
2873
  );
2816
2874
  StatusTag.displayName = "StatusTag";
2817
2875
 
2818
2876
  // src/components/Question Types/FileUpload.tsx
2819
- var import_jsx_runtime40 = require("react/jsx-runtime");
2820
- var FileUploadZone = React39.forwardRef(
2877
+ var import_jsx_runtime42 = require("react/jsx-runtime");
2878
+ var FileUploadZone = React41.forwardRef(
2821
2879
  ({ className, title = "Upload document", hint, icon, onFiles, ...props }, ref) => {
2822
- const [over, setOver] = React39.useState(false);
2823
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2880
+ const [over, setOver] = React41.useState(false);
2881
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
2824
2882
  "label",
2825
2883
  {
2826
2884
  className: cn(
@@ -2840,12 +2898,12 @@ var FileUploadZone = React39.forwardRef(
2840
2898
  onFiles?.(Array.from(event.dataTransfer.files));
2841
2899
  },
2842
2900
  children: [
2843
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "flex size-10 items-center justify-center rounded-full bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground", children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react19.FileText, { size: 24, "aria-hidden": true }) }),
2844
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "flex flex-col gap-1", children: [
2845
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-body-small text-surface-foreground", children: title }),
2846
- hint && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-ui-caption text-secondary-muted-foreground", children: hint })
2901
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "flex size-10 items-center justify-center rounded-full bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground", children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.FileText, { size: 24, "aria-hidden": true }) }),
2902
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex flex-col gap-1", children: [
2903
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-body-small text-surface-foreground", children: title }),
2904
+ hint && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-ui-caption text-secondary-muted-foreground", children: hint })
2847
2905
  ] }),
2848
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2906
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2849
2907
  "input",
2850
2908
  {
2851
2909
  ref,
@@ -2861,47 +2919,47 @@ var FileUploadZone = React39.forwardRef(
2861
2919
  }
2862
2920
  );
2863
2921
  FileUploadZone.displayName = "FileUploadZone";
2864
- var FileUploadItem = React39.forwardRef(
2922
+ var FileUploadItem = React41.forwardRef(
2865
2923
  ({ className, name, size, status = "uploading", progress = 0, timeLeft, icon, onRemove, removeLabel, ...props }, ref) => {
2866
2924
  const uploading = status === "uploading";
2867
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2925
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
2868
2926
  "div",
2869
2927
  {
2870
2928
  ref,
2871
2929
  className: cn("flex w-full flex-col justify-center gap-2 overflow-hidden rounded-sm border border-border p-2", className),
2872
2930
  ...props,
2873
2931
  children: [
2874
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-2", children: [
2875
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-full bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground", children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react19.FileText, { size: 24, "aria-hidden": true }) }),
2876
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
2877
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
2878
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "min-w-0 truncate text-ui-label text-surface-foreground", children: name }),
2879
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": removeLabel ?? `Remove ${name}`, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react19.X, { size: 16, "aria-hidden": true }) })
2932
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-2", children: [
2933
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-full bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground", children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.FileText, { size: 24, "aria-hidden": true }) }),
2934
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
2935
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
2936
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "min-w-0 truncate text-ui-label text-surface-foreground", children: name }),
2937
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": removeLabel ?? `Remove ${name}`, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react20.X, { size: 16, "aria-hidden": true }) })
2880
2938
  ] }),
2881
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center justify-between text-ui-caption text-secondary-muted-foreground", children: [
2882
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "flex items-center gap-2", children: [
2939
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center justify-between text-ui-caption text-secondary-muted-foreground", children: [
2940
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex items-center gap-2", children: [
2883
2941
  size,
2884
- status === "complete" && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Tag, { variant: "success", children: "Complete" }),
2885
- status === "error" && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Tag, { variant: "destructive", children: "Error" }),
2886
- uploading && timeLeft && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
2887
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { "aria-hidden": "true", className: "size-0.5 rounded-full bg-secondary-muted-foreground" }),
2942
+ status === "complete" && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Tag, { variant: "success", children: "Complete" }),
2943
+ status === "error" && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Tag, { variant: "destructive", children: "Error" }),
2944
+ uploading && timeLeft && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
2945
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { "aria-hidden": "true", className: "size-0.5 rounded-full bg-secondary-muted-foreground" }),
2888
2946
  timeLeft
2889
2947
  ] })
2890
2948
  ] }),
2891
- uploading && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "text-body-xxs font-normal", children: [
2949
+ uploading && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "text-body-xxs font-normal", children: [
2892
2950
  Math.round(progress),
2893
2951
  "%"
2894
2952
  ] })
2895
2953
  ] })
2896
2954
  ] })
2897
2955
  ] }),
2898
- uploading && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2956
+ uploading && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2899
2957
  import_radix_ui20.Progress.Root,
2900
2958
  {
2901
2959
  value: progress,
2902
2960
  "aria-label": `Uploading ${name}`,
2903
2961
  className: "h-0.75 w-full overflow-hidden rounded-sm bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5",
2904
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_radix_ui20.Progress.Indicator, { className: "h-full bg-accent transition-[width]", style: { width: `${progress}%` } })
2962
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_radix_ui20.Progress.Indicator, { className: "h-full bg-accent transition-[width]", style: { width: `${progress}%` } })
2905
2963
  }
2906
2964
  )
2907
2965
  ]
@@ -2912,25 +2970,28 @@ var FileUploadItem = React39.forwardRef(
2912
2970
  FileUploadItem.displayName = "FileUploadItem";
2913
2971
 
2914
2972
  // src/components/Question Types/Media.tsx
2915
- var React40 = __toESM(require("react"), 1);
2916
- var import_react20 = require("@phosphor-icons/react");
2973
+ var React42 = __toESM(require("react"), 1);
2974
+ var import_react21 = require("@phosphor-icons/react");
2917
2975
  var import_radix_ui21 = require("radix-ui");
2918
- var import_jsx_runtime41 = require("react/jsx-runtime");
2919
- function MediaInfo({ name, details, onRemove, removeLabel, large, className, ...props }) {
2920
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: cn("flex items-center justify-between border-t border-border bg-surface px-6 py-4", className), ...props, children: [
2921
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2922
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: cn("truncate text-surface-foreground", large ? "text-body-section" : "text-ui-label"), children: name }),
2923
- details && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: cn("flex items-center gap-2 text-secondary-muted-foreground", large ? "text-body-small" : "text-ui-caption"), children: details.map((part, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(React40.Fragment, { children: [
2924
- index > 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { "aria-hidden": "true", className: "size-0.5 rounded-full bg-secondary-muted-foreground" }),
2976
+ var import_jsx_runtime43 = require("react/jsx-runtime");
2977
+ function MediaInfo({ name, details, onRemove, removeLabel, large, actions, className, ...props }) {
2978
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn("flex items-center justify-between border-t border-border bg-surface px-6 py-4", className), ...props, children: [
2979
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2980
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
2981
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: cn("min-w-0 flex-1 truncate text-surface-foreground", large ? "text-body-section" : "text-ui-label"), children: name }),
2982
+ actions
2983
+ ] }),
2984
+ details && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: cn("flex items-center gap-2 text-secondary-muted-foreground", large ? "text-body-small" : "text-ui-caption"), children: details.map((part, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(React42.Fragment, { children: [
2985
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { "aria-hidden": "true", className: "size-0.5 rounded-full bg-secondary-muted-foreground" }),
2925
2986
  part
2926
2987
  ] }, part)) })
2927
2988
  ] }),
2928
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Button, { type: "button", variant: "destructive", size: "icon", "aria-label": removeLabel ?? `Remove ${name}`, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react20.Trash, { size: 16, "aria-hidden": true }) })
2989
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Button, { type: "button", variant: "destructive", size: "icon", "aria-label": removeLabel ?? `Remove ${name}`, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react21.Trash, { size: 16, "aria-hidden": true }) })
2929
2990
  ] });
2930
2991
  }
2931
- var ImagePreview = React40.forwardRef(
2932
- ({ className, children, name, details, onRemove, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border", className), ...props, children: [
2933
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2992
+ var ImagePreview = React42.forwardRef(
2993
+ ({ className, children, name, details, onRemove, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border", className), ...props, children: [
2994
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2934
2995
  "div",
2935
2996
  {
2936
2997
  className: cn(
@@ -2941,12 +3002,12 @@ var ImagePreview = React40.forwardRef(
2941
3002
  children
2942
3003
  }
2943
3004
  ),
2944
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(MediaInfo, { name, details, onRemove, large: true })
3005
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MediaInfo, { name, details, onRemove, large: true })
2945
3006
  ] })
2946
3007
  );
2947
3008
  ImagePreview.displayName = "ImagePreview";
2948
- var ImageThumbnails = React40.forwardRef(
2949
- ({ className, max, images, value, onValueChange, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3009
+ var ImageThumbnails = React42.forwardRef(
3010
+ ({ className, max, images, value, onValueChange, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2950
3011
  import_radix_ui21.ToggleGroup.Root,
2951
3012
  {
2952
3013
  ref,
@@ -2958,17 +3019,17 @@ var ImageThumbnails = React40.forwardRef(
2958
3019
  children: Array.from({ length: max }, (_, index) => {
2959
3020
  const image = images[index];
2960
3021
  if (!image) {
2961
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3022
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2962
3023
  "span",
2963
3024
  {
2964
3025
  "aria-hidden": "true",
2965
3026
  className: "flex h-20 min-w-0 flex-1 items-center justify-center rounded-sm border border-dashed border-border text-accent-foreground",
2966
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react20.Image, { size: 24 })
3027
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react21.Image, { size: 24 })
2967
3028
  },
2968
3029
  `empty-${index}`
2969
3030
  );
2970
3031
  }
2971
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3032
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2972
3033
  import_radix_ui21.ToggleGroup.Item,
2973
3034
  {
2974
3035
  value: image.id,
@@ -2978,7 +3039,7 @@ var ImageThumbnails = React40.forwardRef(
2978
3039
  "hover:bg-accent-soft hover:bg-none",
2979
3040
  "data-[state=on]:border-accent-foreground data-[state=on]:bg-accent-soft data-[state=on]:bg-none data-[state=on]:text-accent-foreground"
2980
3041
  ),
2981
- children: image.src ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("img", { src: image.src, alt: "", className: "size-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react20.Image, { size: 24, "aria-hidden": true })
3042
+ children: image.src ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("img", { src: image.src, alt: "", className: "size-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react21.Image, { size: 24, "aria-hidden": true })
2982
3043
  },
2983
3044
  image.id
2984
3045
  );
@@ -2991,13 +3052,13 @@ var formatTime = (seconds) => {
2991
3052
  const total = Math.max(0, Math.floor(Number.isFinite(seconds) ? seconds : 0));
2992
3053
  return `${Math.floor(total / 60)}:${String(total % 60).padStart(2, "0")}`;
2993
3054
  };
2994
- var VideoPlayer = React40.forwardRef(
2995
- ({ className, src, name, details, onRemove, onMore, initialTime = 0, initialDuration = 0, ...props }, ref) => {
2996
- const video = React40.useRef(null);
2997
- const [playing, setPlaying] = React40.useState(false);
2998
- const [time, setTime] = React40.useState(initialTime);
2999
- const [duration, setDuration] = React40.useState(initialDuration);
3000
- const [volume, setVolume] = React40.useState(1);
3055
+ var VideoPlayer = React42.forwardRef(
3056
+ ({ className, src, name, details, onRemove, onMore, initialTime = 0, initialDuration = 0, controls = "always", moreIn = "controls", badge, ...props }, ref) => {
3057
+ const video = React42.useRef(null);
3058
+ const [playing, setPlaying] = React42.useState(false);
3059
+ const [time, setTime] = React42.useState(initialTime);
3060
+ const [duration, setDuration] = React42.useState(initialDuration);
3061
+ const [volume, setVolume] = React42.useState(1);
3001
3062
  const muted = volume === 0;
3002
3063
  const toggle2 = () => {
3003
3064
  const el = video.current;
@@ -3005,9 +3066,9 @@ var VideoPlayer = React40.forwardRef(
3005
3066
  if (el.paused) void el.play();
3006
3067
  else el.pause();
3007
3068
  };
3008
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border bg-surface", className), ...props, children: [
3009
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "relative flex h-60.5 w-full items-end bg-accent-soft", children: [
3010
- src && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3069
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border bg-surface", className), ...props, children: [
3070
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "group/player relative flex h-60.5 w-full items-end bg-accent-soft", children: [
3071
+ src && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3011
3072
  "video",
3012
3073
  {
3013
3074
  ref: video,
@@ -3020,93 +3081,111 @@ var VideoPlayer = React40.forwardRef(
3020
3081
  onVolumeChange: (event) => setVolume(event.currentTarget.muted ? 0 : event.currentTarget.volume)
3021
3082
  }
3022
3083
  ),
3023
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "relative flex w-full flex-col gap-2 bg-surface-foreground bg-linear-to-r from-primary/30 to-primary/30 px-4 pt-3 pb-4 text-surface", children: [
3024
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
3025
- import_radix_ui21.Slider.Root,
3026
- {
3027
- min: 0,
3028
- max: duration || 1,
3029
- step: 0.1,
3030
- value: [Math.min(time, duration || 1)],
3031
- onValueChange: ([next]) => {
3032
- if (next === void 0) return;
3033
- setTime(next);
3034
- if (video.current) video.current.currentTime = next;
3035
- },
3036
- className: "relative flex h-4 w-full touch-none items-center select-none",
3037
- children: [
3038
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_radix_ui21.Slider.Track, { className: "relative h-1 w-full grow overflow-hidden rounded-xxs bg-surface/20", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_radix_ui21.Slider.Range, { className: "absolute h-full bg-accent-foreground" }) }),
3039
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_radix_ui21.Slider.Thumb, { "aria-label": "Seek", className: "block size-3 rounded-full border-2 border-surface bg-surface shadow-sm" })
3040
- ]
3041
- }
3042
- ),
3043
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center justify-between", children: [
3044
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-4", children: [
3045
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3046
- "button",
3084
+ badge && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "absolute top-3 left-3", children: badge }),
3085
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
3086
+ "div",
3087
+ {
3088
+ className: cn(
3089
+ "relative flex w-full flex-col gap-2 bg-surface-foreground bg-linear-to-r from-primary/30 to-primary/30 px-4 pt-3 pb-4 text-surface",
3090
+ controls === "hover" && "opacity-0 transition-opacity group-focus-within/player:opacity-100 group-hover/player:opacity-100"
3091
+ ),
3092
+ children: [
3093
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
3094
+ import_radix_ui21.Slider.Root,
3047
3095
  {
3048
- type: "button",
3049
- "aria-label": playing ? "Pause" : "Play",
3050
- onClick: toggle2,
3051
- className: "inline-flex size-10 items-center justify-center rounded-full bg-surface/12 text-surface transition-colors hover:bg-surface/20",
3052
- children: playing ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react20.Pause, { size: 16, weight: "fill", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react20.Play, { size: 16, weight: "fill", "aria-hidden": true })
3096
+ min: 0,
3097
+ max: duration || 1,
3098
+ step: 0.1,
3099
+ value: [Math.min(time, duration || 1)],
3100
+ onValueChange: ([next]) => {
3101
+ if (next === void 0) return;
3102
+ setTime(next);
3103
+ if (video.current) video.current.currentTime = next;
3104
+ },
3105
+ className: "relative flex h-4 w-full touch-none items-center select-none",
3106
+ children: [
3107
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui21.Slider.Track, { className: "relative h-1 w-full grow overflow-hidden rounded-xxs bg-surface/20", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui21.Slider.Range, { className: "absolute h-full bg-accent-foreground" }) }),
3108
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui21.Slider.Thumb, { "aria-label": "Seek", className: "block size-3 rounded-full border-2 border-surface bg-surface shadow-sm" })
3109
+ ]
3053
3110
  }
3054
3111
  ),
3055
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "text-ui-label whitespace-nowrap text-surface/80", children: [
3056
- formatTime(time),
3057
- " / ",
3058
- formatTime(duration)
3059
- ] })
3060
- ] }),
3061
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-2", children: [
3062
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3063
- VolumeControl,
3064
- {
3065
- volume,
3066
- onVolumeChange: (next) => {
3067
- setVolume(next);
3068
- if (video.current) {
3069
- video.current.volume = next;
3070
- video.current.muted = next === 0;
3112
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center justify-between", children: [
3113
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-4", children: [
3114
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3115
+ "button",
3116
+ {
3117
+ type: "button",
3118
+ "aria-label": playing ? "Pause" : "Play",
3119
+ onClick: toggle2,
3120
+ className: "inline-flex size-10 items-center justify-center rounded-full bg-surface/12 text-surface transition-colors hover:bg-surface/20",
3121
+ children: playing ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react21.Pause, { size: 16, weight: "fill", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react21.Play, { size: 16, weight: "fill", "aria-hidden": true })
3071
3122
  }
3072
- }
3073
- }
3074
- ),
3075
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3076
- "button",
3077
- {
3078
- type: "button",
3079
- "aria-label": "Full screen",
3080
- onClick: () => void video.current?.requestFullscreen?.(),
3081
- className: "inline-flex size-10 items-center justify-center rounded-md text-surface transition-colors hover:bg-surface/12",
3082
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react20.CornersOut, { size: 16, "aria-hidden": true })
3083
- }
3084
- ),
3085
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3086
- "button",
3087
- {
3088
- type: "button",
3089
- "aria-label": "More",
3090
- onClick: onMore,
3091
- className: "inline-flex size-10 items-center justify-center rounded-md text-surface transition-colors hover:bg-surface/12",
3092
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react20.DotsThree, { size: 16, "aria-hidden": true })
3093
- }
3094
- )
3095
- ] })
3096
- ] })
3097
- ] })
3123
+ ),
3124
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "text-ui-label whitespace-nowrap text-surface/80", children: [
3125
+ formatTime(time),
3126
+ " / ",
3127
+ formatTime(duration)
3128
+ ] })
3129
+ ] }),
3130
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-2", children: [
3131
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3132
+ VolumeControl,
3133
+ {
3134
+ volume,
3135
+ onVolumeChange: (next) => {
3136
+ setVolume(next);
3137
+ if (video.current) {
3138
+ video.current.volume = next;
3139
+ video.current.muted = next === 0;
3140
+ }
3141
+ }
3142
+ }
3143
+ ),
3144
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3145
+ "button",
3146
+ {
3147
+ type: "button",
3148
+ "aria-label": "Full screen",
3149
+ onClick: () => void video.current?.requestFullscreen?.(),
3150
+ className: "inline-flex size-10 items-center justify-center rounded-md text-surface transition-colors hover:bg-surface/12",
3151
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react21.CornersOut, { size: 16, "aria-hidden": true })
3152
+ }
3153
+ ),
3154
+ moreIn === "controls" && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3155
+ "button",
3156
+ {
3157
+ type: "button",
3158
+ "aria-label": "More",
3159
+ onClick: onMore,
3160
+ className: "inline-flex size-10 items-center justify-center rounded-md text-surface transition-colors hover:bg-surface/12",
3161
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react21.DotsThree, { size: 16, "aria-hidden": true })
3162
+ }
3163
+ )
3164
+ ] })
3165
+ ] })
3166
+ ]
3167
+ }
3168
+ )
3098
3169
  ] }),
3099
- name && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(MediaInfo, { name, details, onRemove }),
3100
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "sr-only", "aria-live": "polite", children: muted ? "Muted" : "" })
3170
+ name && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3171
+ MediaInfo,
3172
+ {
3173
+ name,
3174
+ details,
3175
+ onRemove,
3176
+ actions: moreIn === "info" && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": "More", onClick: onMore, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react21.DotsThreeVertical, { size: 16, "aria-hidden": true }) })
3177
+ }
3178
+ ),
3179
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "sr-only", "aria-live": "polite", children: muted ? "Muted" : "" })
3101
3180
  ] });
3102
3181
  }
3103
3182
  );
3104
3183
  VideoPlayer.displayName = "VideoPlayer";
3105
3184
  function VolumeControl({ volume, onVolumeChange, className }) {
3106
- const last = React40.useRef(volume || 1);
3185
+ const last = React42.useRef(volume || 1);
3107
3186
  if (volume > 0) last.current = volume;
3108
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: cn("group/volume flex items-center", className), children: [
3109
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-0 overflow-hidden opacity-0 transition-all group-focus-within/volume:w-16 group-focus-within/volume:opacity-100 group-hover/volume:w-16 group-hover/volume:opacity-100", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
3187
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn("group/volume flex items-center", className), children: [
3188
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "w-0 overflow-hidden opacity-0 transition-all group-focus-within/volume:w-16 group-focus-within/volume:opacity-100 group-hover/volume:w-16 group-hover/volume:opacity-100", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
3110
3189
  import_radix_ui21.Slider.Root,
3111
3190
  {
3112
3191
  min: 0,
@@ -3116,32 +3195,32 @@ function VolumeControl({ volume, onVolumeChange, className }) {
3116
3195
  onValueChange: ([next]) => next !== void 0 && onVolumeChange(next),
3117
3196
  className: "relative flex h-4 w-14 touch-none items-center select-none",
3118
3197
  children: [
3119
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_radix_ui21.Slider.Track, { className: "relative h-1 w-full grow overflow-hidden rounded-xxs bg-surface/20", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_radix_ui21.Slider.Range, { className: "absolute h-full bg-surface" }) }),
3120
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_radix_ui21.Slider.Thumb, { "aria-label": "Volume", className: "block size-3 rounded-full bg-surface shadow-sm" })
3198
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui21.Slider.Track, { className: "relative h-1 w-full grow overflow-hidden rounded-xxs bg-surface/20", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui21.Slider.Range, { className: "absolute h-full bg-surface" }) }),
3199
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui21.Slider.Thumb, { "aria-label": "Volume", className: "block size-3 rounded-full bg-surface shadow-sm" })
3121
3200
  ]
3122
3201
  }
3123
3202
  ) }),
3124
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3203
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3125
3204
  "button",
3126
3205
  {
3127
3206
  type: "button",
3128
3207
  "aria-label": volume === 0 ? "Unmute" : "Mute",
3129
3208
  onClick: () => onVolumeChange(volume === 0 ? last.current : 0),
3130
3209
  className: "inline-flex size-10 items-center justify-center rounded-md text-surface transition-colors hover:bg-surface/12",
3131
- children: volume === 0 ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react20.SpeakerSimpleX, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react20.SpeakerSimpleHigh, { size: 16, "aria-hidden": true })
3210
+ children: volume === 0 ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react21.SpeakerSimpleX, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react21.SpeakerSimpleHigh, { size: 16, "aria-hidden": true })
3132
3211
  }
3133
3212
  )
3134
3213
  ] });
3135
3214
  }
3136
3215
 
3137
3216
  // src/components/Question Types/OpenEndAnswer.tsx
3138
- var React41 = __toESM(require("react"), 1);
3139
- var import_jsx_runtime42 = require("react/jsx-runtime");
3140
- var OpenEndAnswer = React41.forwardRef(
3217
+ var React43 = __toESM(require("react"), 1);
3218
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3219
+ var OpenEndAnswer = React43.forwardRef(
3141
3220
  ({ value, defaultValue, onChange, maxLength = 1e3, placeholder = "Write your answer", ...props }, ref) => {
3142
- const [internal, setInternal] = React41.useState(String(defaultValue ?? ""));
3221
+ const [internal, setInternal] = React43.useState(String(defaultValue ?? ""));
3143
3222
  const text = value !== void 0 ? String(value) : internal;
3144
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3223
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3145
3224
  Textarea,
3146
3225
  {
3147
3226
  ref,
@@ -3161,10 +3240,10 @@ var OpenEndAnswer = React41.forwardRef(
3161
3240
  OpenEndAnswer.displayName = "OpenEndAnswer";
3162
3241
 
3163
3242
  // src/components/Question Types/QuestionCard.tsx
3164
- var React42 = __toESM(require("react"), 1);
3165
- var import_jsx_runtime43 = require("react/jsx-runtime");
3166
- var QuestionCard = React42.forwardRef(
3167
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3243
+ var React44 = __toESM(require("react"), 1);
3244
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3245
+ var QuestionCard = React44.forwardRef(
3246
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3168
3247
  "div",
3169
3248
  {
3170
3249
  ref,
@@ -3176,8 +3255,8 @@ var QuestionCard = React42.forwardRef(
3176
3255
  QuestionCard.displayName = "QuestionCard";
3177
3256
 
3178
3257
  // src/components/Question Types/QuestionEditorCard.tsx
3179
- var React46 = __toESM(require("react"), 1);
3180
- var import_react23 = require("@phosphor-icons/react");
3258
+ var React48 = __toESM(require("react"), 1);
3259
+ var import_react24 = require("@phosphor-icons/react");
3181
3260
 
3182
3261
  // src/lib/keepEditingFocus.ts
3183
3262
  function keepEditingFocus(event) {
@@ -3188,37 +3267,37 @@ function keepEditingFocus(event) {
3188
3267
  }
3189
3268
 
3190
3269
  // src/components/Question Types/QuestionHeader.tsx
3191
- var React45 = __toESM(require("react"), 1);
3270
+ var React47 = __toESM(require("react"), 1);
3192
3271
 
3193
3272
  // src/components/Question Types/QuestionNumberTag.tsx
3194
- var React44 = __toESM(require("react"), 1);
3195
- var import_react22 = require("@phosphor-icons/react");
3273
+ var React46 = __toESM(require("react"), 1);
3274
+ var import_react23 = require("@phosphor-icons/react");
3196
3275
 
3197
3276
  // src/components/Question Types/QuestionTypeIcon.tsx
3198
- var React43 = require("react");
3199
- var import_react21 = require("@phosphor-icons/react");
3200
- var import_jsx_runtime44 = require("react/jsx-runtime");
3277
+ var React45 = require("react");
3278
+ var import_react22 = require("@phosphor-icons/react");
3279
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3201
3280
  var icons = {
3202
- "select-one": import_react21.RadioButton,
3203
- "select-multiple": import_react21.CheckSquare,
3204
- ranking: import_react21.ListNumbers,
3205
- upload: import_react21.FileArrowUp,
3206
- "upload-video": import_react21.VideoCamera,
3207
- "upload-photo": import_react21.Image,
3208
- "upload-document": import_react21.FileText,
3209
- rating: import_react21.StarHalf,
3210
- "open-end": import_react21.ChatsCircle,
3211
- "screen-recording": import_react21.VideoCamera
3281
+ "select-one": import_react22.RadioButton,
3282
+ "select-multiple": import_react22.CheckSquare,
3283
+ ranking: import_react22.ListNumbers,
3284
+ upload: import_react22.FileArrowUp,
3285
+ "upload-video": import_react22.VideoCamera,
3286
+ "upload-photo": import_react22.Image,
3287
+ "upload-document": import_react22.FileText,
3288
+ rating: import_react22.StarHalf,
3289
+ "open-end": import_react22.ChatsCircle,
3290
+ "screen-recording": import_react22.VideoCamera
3212
3291
  };
3213
3292
  function QuestionTypeIcon({ type, size = 22.5, className, ...props }) {
3214
3293
  const Icon = icons[type];
3215
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon, { size, weight: "duotone", "aria-hidden": true, className: className ?? "text-accent-foreground", ...props });
3294
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Icon, { size, weight: "duotone", "aria-hidden": true, className: className ?? "text-accent-foreground", ...props });
3216
3295
  }
3217
3296
 
3218
3297
  // src/components/Question Types/QuestionNumberTag.tsx
3219
- var import_jsx_runtime45 = require("react/jsx-runtime");
3220
- var QuestionNumberTag = React44.forwardRef(
3221
- ({ number, active, questionType, showDragHandle = true, dragHandleProps, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
3298
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3299
+ var QuestionNumberTag = React46.forwardRef(
3300
+ ({ number, active, questionType, showDragHandle = true, dragHandleProps, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
3222
3301
  "span",
3223
3302
  {
3224
3303
  ref,
@@ -3237,7 +3316,7 @@ var QuestionNumberTag = React44.forwardRef(
3237
3316
  dragHandleProps?.className
3238
3317
  ),
3239
3318
  children: [
3240
- questionType && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3319
+ questionType && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3241
3320
  QuestionTypeIcon,
3242
3321
  {
3243
3322
  type: questionType,
@@ -3245,8 +3324,8 @@ var QuestionNumberTag = React44.forwardRef(
3245
3324
  className: cn("shrink-0", showDragHandle && "group-hover/editor:hidden group-data-[hovered]/editor:hidden group-hover/handle:hidden group-focus-visible/handle:hidden")
3246
3325
  }
3247
3326
  ),
3248
- showDragHandle && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3249
- import_react22.DotsSixVertical,
3327
+ showDragHandle && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3328
+ import_react23.DotsSixVertical,
3250
3329
  {
3251
3330
  size: 16,
3252
3331
  "aria-hidden": true,
@@ -3262,30 +3341,30 @@ var QuestionNumberTag = React44.forwardRef(
3262
3341
  QuestionNumberTag.displayName = "QuestionNumberTag";
3263
3342
 
3264
3343
  // src/components/Question Types/QuestionHeader.tsx
3265
- var import_jsx_runtime46 = require("react/jsx-runtime");
3344
+ var import_jsx_runtime48 = require("react/jsx-runtime");
3266
3345
  var eyebrow = "text-ui-caption uppercase text-secondary-muted-foreground";
3267
- var QuestionHeader = React45.forwardRef(
3346
+ var QuestionHeader = React47.forwardRef(
3268
3347
  ({ className, number, title, required, error, onDismissError, editor, onTitleChange, titlePlaceholder = "Click to write the question text", titlePlaceholderTone, titleMinLength, titleRecommendedMax, titleRecommendedNote, actions, meta, maxLength = 2e3, active, showCounter = true, dragHandleProps, showDragHandle = true, questionType, titleMarks, onTitleMarkApply, onTitleMarkDismiss, titleEditing, ...props }, ref) => {
3269
- const [draft, setDraft] = React45.useState(null);
3348
+ const [draft, setDraft] = React47.useState(null);
3270
3349
  const label = String(number).padStart(2, "0");
3271
3350
  const showError = error !== void 0 && error !== false;
3272
3351
  if (editor) {
3273
3352
  const text = typeof title === "string" ? title : "";
3274
3353
  const count = (draft ?? text).length;
3275
3354
  const long = titleRecommendedMax !== void 0 && count > titleRecommendedMax;
3276
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { ref, className: cn("group/header flex w-full flex-col gap-2", className), ...props, children: [
3277
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between", children: [
3278
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-2", children: [
3279
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(QuestionNumberTag, { number, active, questionType, showDragHandle, dragHandleProps }),
3355
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { ref, className: cn("group/header flex w-full flex-col gap-2", className), ...props, children: [
3356
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center justify-between", children: [
3357
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2", children: [
3358
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(QuestionNumberTag, { number, active, questionType, showDragHandle, dragHandleProps }),
3280
3359
  meta
3281
3360
  ] }),
3282
- actions && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: cn(
3361
+ actions && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: cn(
3283
3362
  "flex items-center gap-2 opacity-0 transition-opacity group-focus-within/header:opacity-100 group-hover/header:opacity-100",
3284
3363
  // Inside a QuestionEditorCard, hovering or focusing anywhere on the card reveals them too.
3285
3364
  "group-focus-within/editor:opacity-100 group-hover/editor:opacity-100 group-data-[hovered]/editor:opacity-100"
3286
3365
  ), children: actions })
3287
3366
  ] }),
3288
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3367
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3289
3368
  InlineEdit,
3290
3369
  {
3291
3370
  variant: "question",
@@ -3311,8 +3390,8 @@ var QuestionHeader = React45.forwardRef(
3311
3390
  textClassName: long ? "text-body-base" : "text-heading-h4"
3312
3391
  }
3313
3392
  ),
3314
- long && titleRecommendedNote != null && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: titleRecommendedNote }),
3315
- showCounter && titleMinLength === void 0 && maxLength !== void 0 && count > maxLength && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: [
3393
+ long && titleRecommendedNote != null && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: titleRecommendedNote }),
3394
+ showCounter && titleMinLength === void 0 && maxLength !== void 0 && count > maxLength && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: [
3316
3395
  count,
3317
3396
  "/",
3318
3397
  maxLength,
@@ -3320,16 +3399,16 @@ var QuestionHeader = React45.forwardRef(
3320
3399
  ] })
3321
3400
  ] });
3322
3401
  }
3323
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { ref, className: cn("flex w-full flex-col gap-2", className), ...props, children: [
3324
- showError && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ToastInline, { variant: "destructive", onClose: onDismissError, className: "min-h-10", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-ui-label text-destructive", children: error === true ? "This question is mandatory." : error }) }),
3325
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("p", { className: eyebrow, children: [
3402
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { ref, className: cn("flex w-full flex-col gap-2", className), ...props, children: [
3403
+ showError && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ToastInline, { variant: "destructive", onClose: onDismissError, className: "min-h-10", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-ui-label text-destructive", children: error === true ? "This question is mandatory." : error }) }),
3404
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("p", { className: eyebrow, children: [
3326
3405
  "Question ",
3327
3406
  label
3328
3407
  ] }),
3329
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("h3", { className: "text-heading-h4 text-surface-foreground", children: [
3408
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("h3", { className: "text-heading-h4 text-surface-foreground", children: [
3330
3409
  title,
3331
- required && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { "aria-hidden": "true", className: "text-destructive", children: "*" }),
3332
- required && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "sr-only", children: " (required)" })
3410
+ required && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { "aria-hidden": "true", className: "text-destructive", children: "*" }),
3411
+ required && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "sr-only", children: " (required)" })
3333
3412
  ] })
3334
3413
  ] });
3335
3414
  }
@@ -3337,8 +3416,8 @@ var QuestionHeader = React45.forwardRef(
3337
3416
  QuestionHeader.displayName = "QuestionHeader";
3338
3417
 
3339
3418
  // src/components/Question Types/QuestionEditorCard.tsx
3340
- var import_jsx_runtime47 = require("react/jsx-runtime");
3341
- var QuestionEditorCard = React46.forwardRef(
3419
+ var import_jsx_runtime49 = require("react/jsx-runtime");
3420
+ var QuestionEditorCard = React48.forwardRef(
3342
3421
  ({
3343
3422
  className,
3344
3423
  number,
@@ -3374,7 +3453,7 @@ var QuestionEditorCard = React46.forwardRef(
3374
3453
  ...props
3375
3454
  }, ref) => {
3376
3455
  const footer = active && (countLabel != null || onAdd || onPaste);
3377
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
3456
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
3378
3457
  "div",
3379
3458
  {
3380
3459
  ref,
@@ -3386,7 +3465,7 @@ var QuestionEditorCard = React46.forwardRef(
3386
3465
  props.onMouseDown?.(event);
3387
3466
  },
3388
3467
  children: [
3389
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
3468
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
3390
3469
  "div",
3391
3470
  {
3392
3471
  className: cn(
@@ -3394,9 +3473,9 @@ var QuestionEditorCard = React46.forwardRef(
3394
3473
  active ? "border-accent" : "border-border"
3395
3474
  ),
3396
3475
  children: [
3397
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: cn("flex flex-col p-6", footer ? "gap-5" : "gap-4"), children: [
3398
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col gap-4", children: [
3399
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3476
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: cn("flex flex-col p-6", footer ? "gap-5" : "gap-4"), children: [
3477
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-4", children: [
3478
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3400
3479
  QuestionHeader,
3401
3480
  {
3402
3481
  editor: true,
@@ -3419,8 +3498,8 @@ var QuestionEditorCard = React46.forwardRef(
3419
3498
  titleEditing,
3420
3499
  meta,
3421
3500
  maxLength,
3422
- actions: actions ?? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
3423
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3501
+ actions: actions ?? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
3502
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3424
3503
  Button,
3425
3504
  {
3426
3505
  type: "button",
@@ -3428,10 +3507,10 @@ var QuestionEditorCard = React46.forwardRef(
3428
3507
  size: "icon-sm",
3429
3508
  "aria-label": "Duplicate question",
3430
3509
  onClick: onDuplicate,
3431
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react23.Copy, { size: 16, "aria-hidden": true })
3510
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react24.Copy, { size: 16, "aria-hidden": true })
3432
3511
  }
3433
3512
  ),
3434
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3513
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3435
3514
  Button,
3436
3515
  {
3437
3516
  type: "button",
@@ -3439,10 +3518,10 @@ var QuestionEditorCard = React46.forwardRef(
3439
3518
  size: "icon-sm",
3440
3519
  "aria-label": "Delete question",
3441
3520
  onClick: onDelete,
3442
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react23.Trash, { size: 16, "aria-hidden": true })
3521
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react24.Trash, { size: 16, "aria-hidden": true })
3443
3522
  }
3444
3523
  ),
3445
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3524
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3446
3525
  Button,
3447
3526
  {
3448
3527
  type: "button",
@@ -3450,7 +3529,7 @@ var QuestionEditorCard = React46.forwardRef(
3450
3529
  size: "icon-sm",
3451
3530
  "aria-label": "Preview question",
3452
3531
  onClick: onPreview,
3453
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react23.Eye, { size: 16, "aria-hidden": true })
3532
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react24.Eye, { size: 16, "aria-hidden": true })
3454
3533
  }
3455
3534
  )
3456
3535
  ] })
@@ -3458,18 +3537,18 @@ var QuestionEditorCard = React46.forwardRef(
3458
3537
  ),
3459
3538
  children
3460
3539
  ] }),
3461
- error && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("p", { className: "flex items-center gap-1 text-ui-caption text-destructive-foreground", children: [
3462
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react23.Warning, { size: 16, "aria-hidden": true, className: "shrink-0" }),
3540
+ error && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("p", { className: "flex items-center gap-1 text-ui-caption text-destructive-foreground", children: [
3541
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react24.Warning, { size: 16, "aria-hidden": true, className: "shrink-0" }),
3463
3542
  error
3464
3543
  ] }),
3465
- footer && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center justify-between", children: [
3466
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: countLabel }),
3467
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-2", children: [
3468
- onAdd && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Button, { type: "button", variant: "outline", onClick: onAdd, children: [
3469
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react23.Plus, { size: 16, "aria-hidden": true }),
3544
+ footer && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center justify-between", children: [
3545
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: countLabel }),
3546
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2", children: [
3547
+ onAdd && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Button, { type: "button", variant: "outline", onClick: onAdd, children: [
3548
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react24.Plus, { size: 16, "aria-hidden": true }),
3470
3549
  "Add choice"
3471
3550
  ] }),
3472
- onPaste && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3551
+ onPaste && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3473
3552
  Button,
3474
3553
  {
3475
3554
  type: "button",
@@ -3477,17 +3556,17 @@ var QuestionEditorCard = React46.forwardRef(
3477
3556
  size: "icon",
3478
3557
  "aria-label": "Paste choices",
3479
3558
  onClick: onPaste,
3480
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react23.Clipboard, { size: 16, "aria-hidden": true })
3559
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react24.Clipboard, { size: 16, "aria-hidden": true })
3481
3560
  }
3482
3561
  )
3483
3562
  ] })
3484
3563
  ] })
3485
3564
  ] }),
3486
- note && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "border-t border-border px-2 py-2 text-body-small text-surface-foreground", children: note })
3565
+ note && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "border-t border-border px-2 py-2 text-body-small text-surface-foreground", children: note })
3487
3566
  ]
3488
3567
  }
3489
3568
  ),
3490
- onAskAi && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3569
+ onAskAi && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3491
3570
  Button,
3492
3571
  {
3493
3572
  type: "button",
@@ -3496,7 +3575,7 @@ var QuestionEditorCard = React46.forwardRef(
3496
3575
  "aria-label": "Ask AI",
3497
3576
  onClick: onAskAi,
3498
3577
  className: "shrink-0 opacity-0 transition-opacity group-hover/editor:opacity-100 group-focus-within/editor:opacity-100 group-data-[hovered]/editor:opacity-100 focus-visible:opacity-100",
3499
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react23.Sparkle, { size: 16, "aria-hidden": true })
3578
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react24.Sparkle, { size: 16, "aria-hidden": true })
3500
3579
  }
3501
3580
  )
3502
3581
  ]
@@ -3507,15 +3586,15 @@ var QuestionEditorCard = React46.forwardRef(
3507
3586
  QuestionEditorCard.displayName = "QuestionEditorCard";
3508
3587
 
3509
3588
  // src/components/Question Types/QuestionNavItem.tsx
3510
- var React47 = __toESM(require("react"), 1);
3511
- var import_react24 = require("@phosphor-icons/react");
3589
+ var React49 = __toESM(require("react"), 1);
3590
+ var import_react25 = require("@phosphor-icons/react");
3512
3591
  var import_radix_ui22 = require("radix-ui");
3513
- var import_jsx_runtime48 = require("react/jsx-runtime");
3514
- var QuestionNavItem = React47.forwardRef(
3592
+ var import_jsx_runtime50 = require("react/jsx-runtime");
3593
+ var QuestionNavItem = React49.forwardRef(
3515
3594
  ({ className, questionType = "select-one", selected, error, warning, asChild, showDragHandle = true, hovered, children, ...props }, ref) => {
3516
3595
  const Comp = asChild ? import_radix_ui22.Slot.Root : "button";
3517
3596
  const warn = !error && !!warning;
3518
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
3597
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
3519
3598
  Comp,
3520
3599
  {
3521
3600
  ref,
@@ -3534,9 +3613,9 @@ var QuestionNavItem = React47.forwardRef(
3534
3613
  ),
3535
3614
  ...props,
3536
3615
  children: [
3537
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { "aria-hidden": "true", className: "relative flex size-4 shrink-0 items-center justify-center", children: [
3538
- showDragHandle && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react24.DotsSixVertical, { size: 16, className: "hidden group-hover/nav:block group-data-[hovered]/nav:block" }),
3539
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: showDragHandle ? "group-hover/nav:hidden group-data-[hovered]/nav:hidden" : void 0, children: error ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react24.WarningCircle, { size: 16, className: "text-destructive-foreground" }) : warn ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react24.Warning, { size: 16, className: "text-warning-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3616
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { "aria-hidden": "true", className: "relative flex size-4 shrink-0 items-center justify-center", children: [
3617
+ showDragHandle && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react25.DotsSixVertical, { size: 16, className: "hidden group-hover/nav:block group-data-[hovered]/nav:block" }),
3618
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: showDragHandle ? "group-hover/nav:hidden group-data-[hovered]/nav:hidden" : void 0, children: error ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react25.WarningCircle, { size: 16, className: "text-destructive-foreground" }) : warn ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react25.Warning, { size: 16, className: "text-warning-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3540
3619
  QuestionTypeIcon,
3541
3620
  {
3542
3621
  type: questionType,
@@ -3545,9 +3624,9 @@ var QuestionNavItem = React47.forwardRef(
3545
3624
  }
3546
3625
  ) })
3547
3626
  ] }),
3548
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "min-w-0 flex-1 truncate", children }),
3549
- error && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "sr-only", children: ", has errors" }),
3550
- warn && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "sr-only", children: ", has warnings" })
3627
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "min-w-0 flex-1 truncate", children }),
3628
+ error && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "sr-only", children: ", has errors" }),
3629
+ warn && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "sr-only", children: ", has warnings" })
3551
3630
  ]
3552
3631
  }
3553
3632
  );
@@ -3556,14 +3635,14 @@ var QuestionNavItem = React47.forwardRef(
3556
3635
  QuestionNavItem.displayName = "QuestionNavItem";
3557
3636
 
3558
3637
  // src/components/Question Types/QuestionOption.tsx
3559
- var React48 = __toESM(require("react"), 1);
3560
- var import_react25 = require("@phosphor-icons/react");
3561
- var import_jsx_runtime49 = require("react/jsx-runtime");
3638
+ var React50 = __toESM(require("react"), 1);
3639
+ var import_react26 = require("@phosphor-icons/react");
3640
+ var import_jsx_runtime51 = require("react/jsx-runtime");
3562
3641
  var optionClasses = "flex w-full max-w-150 cursor-pointer items-center gap-2 rounded-md border border-border bg-surface px-4 py-2 text-body-base text-surface-foreground transition-colors hover:bg-accent-soft hover:shadow-md has-[[data-state=checked]]:border-accent-foreground has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50";
3563
3642
  function QuestionOption(props) {
3564
- const id = React48.useId();
3565
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("label", { htmlFor: id, className: cn(optionClasses, props.className), children: [
3566
- props.kind === "checkbox" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3643
+ const id = React50.useId();
3644
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("label", { htmlFor: id, className: cn(optionClasses, props.className), children: [
3645
+ props.kind === "checkbox" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3567
3646
  Checkbox,
3568
3647
  {
3569
3648
  id,
@@ -3572,16 +3651,16 @@ function QuestionOption(props) {
3572
3651
  onCheckedChange: (next) => props.onCheckedChange?.(next === true),
3573
3652
  disabled: props.disabled
3574
3653
  }
3575
- ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RadioGroupItem, { id, value: props.value, disabled: props.disabled }),
3576
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "min-w-0 flex-1", children: props.label })
3654
+ ) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RadioGroupItem, { id, value: props.value, disabled: props.disabled }),
3655
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "min-w-0 flex-1", children: props.label })
3577
3656
  ] });
3578
3657
  }
3579
- var QuestionOtherOption = React48.forwardRef(
3658
+ var QuestionOtherOption = React50.forwardRef(
3580
3659
  ({ className, onSubmit, confirmLabel = "Confirm answer", placeholder = "Type your answer", ...props }, ref) => {
3581
- const inner = React48.useRef(null);
3582
- React48.useImperativeHandle(ref, () => inner.current);
3660
+ const inner = React50.useRef(null);
3661
+ React50.useImperativeHandle(ref, () => inner.current);
3583
3662
  const submit = () => onSubmit?.(inner.current?.value ?? "");
3584
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
3663
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
3585
3664
  "div",
3586
3665
  {
3587
3666
  className: cn(
@@ -3589,7 +3668,7 @@ var QuestionOtherOption = React48.forwardRef(
3589
3668
  className
3590
3669
  ),
3591
3670
  children: [
3592
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3671
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3593
3672
  "input",
3594
3673
  {
3595
3674
  ref: inner,
@@ -3605,7 +3684,7 @@ var QuestionOtherOption = React48.forwardRef(
3605
3684
  ...props
3606
3685
  }
3607
3686
  ),
3608
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, { type: "button", variant: "subtle", size: "icon-sm", "aria-label": confirmLabel, onClick: submit, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react25.Check, { size: 16, "aria-hidden": true }) })
3687
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, { type: "button", variant: "subtle", size: "icon-sm", "aria-label": confirmLabel, onClick: submit, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react26.Check, { size: 16, "aria-hidden": true }) })
3609
3688
  ]
3610
3689
  }
3611
3690
  );
@@ -3620,16 +3699,16 @@ function limitsText2(min, max) {
3620
3699
  function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTone = "muted", minLength, maxLength, onRemove, onAdd, removeDisabled, addDisabled, className, kind, rank, dragHandleProps, lifted, locked, marks, onMarkApply, onMarkDismiss }) {
3621
3700
  const reveal = kind !== void 0;
3622
3701
  const guarded = minLength !== void 0 || maxLength !== void 0;
3623
- const [draft, setDraft] = React48.useState(null);
3624
- const [error, setError] = React48.useState(null);
3625
- const helperId = React48.useId();
3626
- const [focused, setFocused] = React48.useState(false);
3702
+ const [draft, setDraft] = React50.useState(null);
3703
+ const [error, setError] = React50.useState(null);
3704
+ const helperId = React50.useId();
3705
+ const [focused, setFocused] = React50.useState(false);
3627
3706
  const showMarks = !!marks?.length && !focused && draft === null;
3628
- const fieldRef = React48.useRef(null);
3629
- const [editMarks, setEditMarks] = React48.useState([]);
3630
- const [scroll, setScroll] = React48.useState(0);
3707
+ const fieldRef = React50.useRef(null);
3708
+ const [editMarks, setEditMarks] = React50.useState([]);
3709
+ const [scroll, setScroll] = React50.useState(0);
3631
3710
  const typed = guarded ? draft ?? label : label;
3632
- const skipBlur = React48.useRef(false);
3711
+ const skipBlur = React50.useRef(false);
3633
3712
  const problemWith = (text) => minLength !== void 0 && text.trim().length < minLength ? `Enter at least ${minLength} ${minLength === 1 ? "character" : "characters"}.` : null;
3634
3713
  const save = () => {
3635
3714
  if (draft === null) return true;
@@ -3650,9 +3729,9 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3650
3729
  ...dragHandleProps,
3651
3730
  className: cn("cursor-grab touch-none select-none", dragHandleProps.className)
3652
3731
  } : { "aria-hidden": true };
3653
- const grip = dragHandleProps ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { ...gripProps, className: cn("shrink-0", gripProps.className), children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react25.DotsSixVertical, { size: 20, "aria-hidden": true, className: "text-surface-foreground" }) }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react25.DotsSixVertical, { size: 20, "aria-hidden": true, className: "shrink-0 text-surface-foreground" });
3654
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: cn("group/option flex w-full items-center gap-2", className), children: [
3655
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3732
+ const grip = dragHandleProps ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { ...gripProps, className: cn("shrink-0", gripProps.className), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react26.DotsSixVertical, { size: 20, "aria-hidden": true, className: "text-surface-foreground" }) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react26.DotsSixVertical, { size: 20, "aria-hidden": true, className: "shrink-0 text-surface-foreground" });
3733
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("group/option flex w-full items-center gap-2", className), children: [
3734
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3656
3735
  "div",
3657
3736
  {
3658
3737
  className: cn(
@@ -3662,10 +3741,10 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3662
3741
  cn("border-border group-hover/option:shadow-md group-focus-within/option:shadow-md", lifted && "shadow-md")
3663
3742
  ) : "border-border hover:border-input-muted hover:shadow-md"
3664
3743
  ),
3665
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex min-w-0 items-start gap-2", children: [
3666
- (kind !== void 0 || !locked) && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex h-7 shrink-0 items-center gap-2", children: kind === "rank" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
3744
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex min-w-0 items-start gap-2", children: [
3745
+ (kind !== void 0 || !locked) && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex h-7 shrink-0 items-center gap-2", children: kind === "rank" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
3667
3746
  !locked && grip,
3668
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3747
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3669
3748
  "span",
3670
3749
  {
3671
3750
  "aria-hidden": "true",
@@ -3673,8 +3752,8 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3673
3752
  children: rank
3674
3753
  }
3675
3754
  )
3676
- ] }) : reveal && locked ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { "aria-hidden": "true", className: "relative flex size-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: cn("inline-flex size-4 border-2 border-input bg-surface", kind === "radio" ? "rounded-full" : "rounded-xxs") }) }) : reveal ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { ...gripProps, className: cn("relative flex size-5 shrink-0 items-center justify-center", gripProps.className), children: [
3677
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3755
+ ] }) : reveal && locked ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { "aria-hidden": "true", className: "relative flex size-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: cn("inline-flex size-4 border-2 border-input bg-surface", kind === "radio" ? "rounded-full" : "rounded-xxs") }) }) : reveal ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { ...gripProps, className: cn("relative flex size-5 shrink-0 items-center justify-center", gripProps.className), children: [
3756
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3678
3757
  "span",
3679
3758
  {
3680
3759
  "aria-hidden": "true",
@@ -3685,8 +3764,8 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3685
3764
  )
3686
3765
  }
3687
3766
  ),
3688
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3689
- import_react25.DotsSixVertical,
3767
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3768
+ import_react26.DotsSixVertical,
3690
3769
  {
3691
3770
  size: 20,
3692
3771
  "aria-hidden": true,
@@ -3697,10 +3776,10 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3697
3776
  }
3698
3777
  )
3699
3778
  ] }) : locked ? null : grip }),
3700
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
3701
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "relative min-w-0", children: [
3702
- focused && editMarks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DraftMarks, { layer: "behind", singleLine: true, text: typed, marks: editMarks, scrollLeft: scroll, className: "flex items-center whitespace-pre text-body-base" }),
3703
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3779
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
3780
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "relative min-w-0", children: [
3781
+ focused && editMarks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DraftMarks, { layer: "behind", singleLine: true, text: typed, marks: editMarks, scrollLeft: scroll, className: "flex items-center whitespace-pre text-body-base" }),
3782
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3704
3783
  "input",
3705
3784
  {
3706
3785
  ref: fieldRef,
@@ -3755,24 +3834,24 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3755
3834
  )
3756
3835
  }
3757
3836
  ),
3758
- focused && editMarks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DraftMarks, { layer: "over", singleLine: true, text: typed, marks: editMarks, scrollLeft: scroll, className: "flex items-center whitespace-pre text-body-base" }),
3759
- showMarks && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-0 flex items-center overflow-hidden whitespace-pre text-body-base text-surface-foreground [&_[data-mark]]:pointer-events-auto", children: splitMarks(label, marks).map(
3760
- (piece, i) => piece.mark ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MarkedText, { mark: piece.mark, text: piece.text, onApply: onMarkApply, onDismiss: onMarkDismiss }, `${piece.mark.start}:${piece.text}`) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: piece.text }, i)
3837
+ focused && editMarks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DraftMarks, { layer: "over", singleLine: true, text: typed, marks: editMarks, scrollLeft: scroll, className: "flex items-center whitespace-pre text-body-base" }),
3838
+ showMarks && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-0 flex items-center overflow-hidden whitespace-pre text-body-base text-surface-foreground [&_[data-mark]]:pointer-events-auto", children: splitMarks(label, marks).map(
3839
+ (piece, i) => piece.mark ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(MarkedText, { mark: piece.mark, text: piece.text, onApply: onMarkApply, onDismiss: onMarkDismiss }, `${piece.mark.start}:${piece.text}`) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: piece.text }, i)
3761
3840
  ) })
3762
3841
  ] }),
3763
- guarded && draft !== null && (error || lengthOutOfRange(draft, minLength, maxLength)) && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
3842
+ guarded && draft !== null && (error || lengthOutOfRange(draft, minLength, maxLength)) && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
3764
3843
  "p",
3765
3844
  {
3766
3845
  id: helperId,
3767
3846
  role: error ? "alert" : void 0,
3768
3847
  className: cn("flex items-start justify-between gap-2 text-ui-caption", error ? "text-destructive" : "text-secondary-muted-foreground"),
3769
3848
  children: [
3770
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "flex items-start gap-2", children: [
3771
- error && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react25.WarningCircle, { size: 16, "aria-hidden": true, className: "shrink-0" }),
3849
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex items-start gap-2", children: [
3850
+ error && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react26.WarningCircle, { size: 16, "aria-hidden": true, className: "shrink-0" }),
3772
3851
  limitsText2(minLength, maxLength),
3773
- error && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "sr-only", children: error })
3852
+ error && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "sr-only", children: error })
3774
3853
  ] }),
3775
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { "aria-hidden": true, className: "shrink-0 tabular-nums", children: [
3854
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { "aria-hidden": true, className: "shrink-0 tabular-nums", children: [
3776
3855
  draft.length,
3777
3856
  maxLength !== void 0 && `/${maxLength}`
3778
3857
  ] })
@@ -3783,7 +3862,7 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3783
3862
  ] })
3784
3863
  }
3785
3864
  ),
3786
- !locked && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
3865
+ !locked && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
3787
3866
  "div",
3788
3867
  {
3789
3868
  className: cn(
@@ -3791,8 +3870,8 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3791
3870
  reveal && "opacity-0 transition-opacity group-hover/option:opacity-100 group-focus-within/option:opacity-100"
3792
3871
  ),
3793
3872
  children: [
3794
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, { type: "button", variant: "destructive", size: "icon-sm", "aria-label": "Remove option", disabled: removeDisabled, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react25.Trash, { size: 16, "aria-hidden": true }) }),
3795
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": "Add option", disabled: addDisabled, onClick: onAdd, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react25.Plus, { size: 16, "aria-hidden": true }) })
3873
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, { type: "button", variant: "destructive", size: "icon-sm", "aria-label": "Remove option", disabled: removeDisabled, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react26.Trash, { size: 16, "aria-hidden": true }) }),
3874
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": "Add option", disabled: addDisabled, onClick: onAdd, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react26.Plus, { size: 16, "aria-hidden": true }) })
3796
3875
  ]
3797
3876
  }
3798
3877
  )
@@ -3800,9 +3879,9 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3800
3879
  }
3801
3880
 
3802
3881
  // src/components/Question Types/RankList.tsx
3803
- var React49 = __toESM(require("react"), 1);
3804
- var import_react26 = require("@phosphor-icons/react");
3805
- var import_jsx_runtime50 = require("react/jsx-runtime");
3882
+ var React51 = __toESM(require("react"), 1);
3883
+ var import_react27 = require("@phosphor-icons/react");
3884
+ var import_jsx_runtime52 = require("react/jsx-runtime");
3806
3885
  function move(list, from, to) {
3807
3886
  if (from === to || to < 0 || to >= list.length) return list;
3808
3887
  const next = list.slice();
@@ -3810,13 +3889,13 @@ function move(list, from, to) {
3810
3889
  next.splice(to, 0, item);
3811
3890
  return next;
3812
3891
  }
3813
- var RankList = React49.forwardRef(
3892
+ var RankList = React51.forwardRef(
3814
3893
  ({ className, items, onItemsChange, ...props }, ref) => {
3815
- const [dragIndex, setDragIndex] = React49.useState(null);
3816
- const [announcement, setAnnouncement] = React49.useState("");
3817
- const handles = React49.useRef(/* @__PURE__ */ new Map());
3818
- const refocus = React49.useRef(null);
3819
- React49.useEffect(() => {
3894
+ const [dragIndex, setDragIndex] = React51.useState(null);
3895
+ const [announcement, setAnnouncement] = React51.useState("");
3896
+ const handles = React51.useRef(/* @__PURE__ */ new Map());
3897
+ const refocus = React51.useRef(null);
3898
+ React51.useEffect(() => {
3820
3899
  if (refocus.current) {
3821
3900
  handles.current.get(refocus.current)?.focus();
3822
3901
  refocus.current = null;
@@ -3829,8 +3908,8 @@ var RankList = React49.forwardRef(
3829
3908
  setAnnouncement(`Moved to position ${to + 1} of ${items.length}`);
3830
3909
  onItemsChange(next);
3831
3910
  };
3832
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
3833
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("ol", { ref, className: cn("flex w-full max-w-150 flex-col gap-4", className), ...props, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
3911
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
3912
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("ol", { ref, className: cn("flex w-full max-w-150 flex-col gap-4", className), ...props, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
3834
3913
  "li",
3835
3914
  {
3836
3915
  draggable: true,
@@ -3847,7 +3926,7 @@ var RankList = React49.forwardRef(
3847
3926
  dragIndex === index && "opacity-50"
3848
3927
  ),
3849
3928
  children: [
3850
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3929
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3851
3930
  "button",
3852
3931
  {
3853
3932
  type: "button",
@@ -3866,10 +3945,10 @@ var RankList = React49.forwardRef(
3866
3945
  }
3867
3946
  },
3868
3947
  className: "inline-flex shrink-0 cursor-grab rounded-xs text-surface-foreground",
3869
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react26.DotsSixVertical, { size: 16, "aria-hidden": true })
3948
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react27.DotsSixVertical, { size: 16, "aria-hidden": true })
3870
3949
  }
3871
3950
  ),
3872
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3951
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3873
3952
  "span",
3874
3953
  {
3875
3954
  "aria-hidden": "true",
@@ -3877,27 +3956,27 @@ var RankList = React49.forwardRef(
3877
3956
  children: index + 1
3878
3957
  }
3879
3958
  ),
3880
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "min-w-0 flex-1", children: item.label })
3959
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "min-w-0 flex-1", children: item.label })
3881
3960
  ]
3882
3961
  },
3883
3962
  item.id
3884
3963
  )) }),
3885
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { role: "status", "aria-live": "polite", className: "sr-only", children: announcement })
3964
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { role: "status", "aria-live": "polite", className: "sr-only", children: announcement })
3886
3965
  ] });
3887
3966
  }
3888
3967
  );
3889
3968
  RankList.displayName = "RankList";
3890
3969
 
3891
3970
  // src/components/Question Types/RatingScale.tsx
3892
- var React50 = __toESM(require("react"), 1);
3971
+ var React52 = __toESM(require("react"), 1);
3893
3972
  var import_radix_ui23 = require("radix-ui");
3894
- var import_jsx_runtime51 = require("react/jsx-runtime");
3895
- var RatingScale = React50.forwardRef(
3973
+ var import_jsx_runtime53 = require("react/jsx-runtime");
3974
+ var RatingScale = React52.forwardRef(
3896
3975
  ({ className, max = 5, value, defaultValue, onValueChange, lowLabel, highLabel, ...props }, ref) => {
3897
- const [internal, setInternal] = React50.useState(defaultValue);
3976
+ const [internal, setInternal] = React52.useState(defaultValue);
3898
3977
  const current = value !== void 0 ? value : internal;
3899
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("flex w-full max-w-150 flex-col gap-2", className), children: [
3900
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3978
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("flex w-full max-w-150 flex-col gap-2", className), children: [
3979
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3901
3980
  import_radix_ui23.ToggleGroup.Root,
3902
3981
  {
3903
3982
  ref,
@@ -3910,7 +3989,7 @@ var RatingScale = React50.forwardRef(
3910
3989
  },
3911
3990
  className: "flex gap-2",
3912
3991
  ...props,
3913
- children: Array.from({ length: max }, (_, i) => i + 1).map((n) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3992
+ children: Array.from({ length: max }, (_, i) => i + 1).map((n) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3914
3993
  import_radix_ui23.ToggleGroup.Item,
3915
3994
  {
3916
3995
  value: String(n),
@@ -3926,9 +4005,9 @@ var RatingScale = React50.forwardRef(
3926
4005
  ))
3927
4006
  }
3928
4007
  ),
3929
- (lowLabel != null || highLabel != null) && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex justify-between text-ui-caption text-secondary-muted-foreground", "aria-hidden": "true", children: [
3930
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: lowLabel }),
3931
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: highLabel })
4008
+ (lowLabel != null || highLabel != null) && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex justify-between text-ui-caption text-secondary-muted-foreground", "aria-hidden": "true", children: [
4009
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: lowLabel }),
4010
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: highLabel })
3932
4011
  ] })
3933
4012
  ] });
3934
4013
  }
@@ -3936,15 +4015,15 @@ var RatingScale = React50.forwardRef(
3936
4015
  RatingScale.displayName = "RatingScale";
3937
4016
 
3938
4017
  // src/components/Question Types/StimulusCard.tsx
3939
- var React51 = __toESM(require("react"), 1);
3940
- var import_react27 = require("@phosphor-icons/react");
3941
- var import_jsx_runtime52 = (
4018
+ var React53 = __toESM(require("react"), 1);
4019
+ var import_react28 = require("@phosphor-icons/react");
4020
+ var import_jsx_runtime54 = (
3942
4021
  // Out of flow, so the image's own size never sets the thumbnail's size.
3943
4022
  require("react/jsx-runtime")
3944
4023
  );
3945
4024
  var MIN_THUMBNAIL = 92;
3946
4025
  var MAX_THUMBNAIL = 240;
3947
- var StimulusCard = React51.forwardRef(
4026
+ var StimulusCard = React53.forwardRef(
3948
4027
  ({
3949
4028
  className,
3950
4029
  thumbnail,
@@ -3961,14 +4040,14 @@ var StimulusCard = React51.forwardRef(
3961
4040
  removeLabel = "Remove stimulus",
3962
4041
  ...props
3963
4042
  }, ref) => {
3964
- const [failedSrc, setFailedSrc] = React51.useState();
4043
+ const [failedSrc, setFailedSrc] = React53.useState();
3965
4044
  const error = status === "error" || thumbnail !== void 0 && failedSrc === thumbnail;
3966
4045
  const showImage = thumbnail !== void 0 && !error;
3967
- const [draft, setDraft] = React51.useState(null);
4046
+ const [draft, setDraft] = React53.useState(null);
3968
4047
  const count = (draft ?? caption ?? "").length;
3969
- const textRef = React51.useRef(null);
3970
- const [thumbnailSize, setThumbnailSize] = React51.useState(MIN_THUMBNAIL);
3971
- React51.useEffect(() => {
4048
+ const textRef = React53.useRef(null);
4049
+ const [thumbnailSize, setThumbnailSize] = React53.useState(MIN_THUMBNAIL);
4050
+ React53.useEffect(() => {
3972
4051
  const el = textRef.current;
3973
4052
  if (!el || typeof ResizeObserver === "undefined") return;
3974
4053
  const observer = new ResizeObserver(() => {
@@ -3977,7 +4056,7 @@ var StimulusCard = React51.forwardRef(
3977
4056
  observer.observe(el);
3978
4057
  return () => observer.disconnect();
3979
4058
  }, []);
3980
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
4059
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
3981
4060
  "div",
3982
4061
  {
3983
4062
  ref,
@@ -3985,8 +4064,8 @@ var StimulusCard = React51.forwardRef(
3985
4064
  className: cn("flex min-h-24.5 w-full items-center gap-4 rounded-md border border-border p-0.5 pr-4", className),
3986
4065
  ...props,
3987
4066
  children: [
3988
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
3989
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4067
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
4068
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3990
4069
  "span",
3991
4070
  {
3992
4071
  style: { width: thumbnailSize, height: thumbnailSize },
@@ -3995,12 +4074,12 @@ var StimulusCard = React51.forwardRef(
3995
4074
  error ? "border-destructive-soft-border bg-destructive-soft bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-destructive" : "border-border bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground",
3996
4075
  showImage && "bg-none"
3997
4076
  ),
3998
- children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("img", { src: thumbnail, alt: thumbnailAlt, className: "absolute inset-0 size-full object-cover", onError: () => setFailedSrc(thumbnail) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react27.ImageBroken, { size: 24, "aria-hidden": true }) : icon ?? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react27.Image, { size: 24, "aria-hidden": true })
4077
+ children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("img", { src: thumbnail, alt: thumbnailAlt, className: "absolute inset-0 size-full object-cover", onError: () => setFailedSrc(thumbnail) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react28.ImageBroken, { size: 24, "aria-hidden": true }) : icon ?? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react28.Image, { size: 24, "aria-hidden": true })
3999
4078
  }
4000
4079
  ),
4001
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { ref: textRef, className: "flex min-w-0 flex-1 flex-col justify-center gap-2 py-2 text-surface-foreground", children: [
4002
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "w-full text-ui-label", children: label }),
4003
- onCaptionChange ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4080
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { ref: textRef, className: "flex min-w-0 flex-1 flex-col justify-center gap-2 py-2 text-surface-foreground", children: [
4081
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "w-full text-ui-label", children: label }),
4082
+ onCaptionChange ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4004
4083
  InlineEdit,
4005
4084
  {
4006
4085
  variant: "question",
@@ -4017,8 +4096,8 @@ var StimulusCard = React51.forwardRef(
4017
4096
  },
4018
4097
  textClassName: "text-body-base"
4019
4098
  }
4020
- ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "w-full text-body-base [word-break:break-word]", children: caption }),
4021
- onCaptionChange && showCounter && maxLength !== void 0 && count > maxLength && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: [
4099
+ ) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "w-full text-body-base [word-break:break-word]", children: caption }),
4100
+ onCaptionChange && showCounter && maxLength !== void 0 && count > maxLength && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: [
4022
4101
  count,
4023
4102
  "/",
4024
4103
  maxLength,
@@ -4026,7 +4105,7 @@ var StimulusCard = React51.forwardRef(
4026
4105
  ] })
4027
4106
  ] })
4028
4107
  ] }),
4029
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { type: "button", variant: "destructive", size: "icon-sm", "aria-label": removeLabel, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react27.Trash, { size: 16, "aria-hidden": true }) })
4108
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Button, { type: "button", variant: "destructive", size: "icon-sm", "aria-label": removeLabel, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react28.Trash, { size: 16, "aria-hidden": true }) })
4030
4109
  ]
4031
4110
  }
4032
4111
  );
@@ -4035,27 +4114,27 @@ var StimulusCard = React51.forwardRef(
4035
4114
  StimulusCard.displayName = "StimulusCard";
4036
4115
 
4037
4116
  // src/components/Data Display/Progress.tsx
4038
- var React52 = __toESM(require("react"), 1);
4117
+ var React54 = __toESM(require("react"), 1);
4039
4118
  var import_radix_ui24 = require("radix-ui");
4040
- var import_jsx_runtime53 = require("react/jsx-runtime");
4041
- var Progress = React52.forwardRef(
4119
+ var import_jsx_runtime55 = require("react/jsx-runtime");
4120
+ var Progress = React54.forwardRef(
4042
4121
  ({ className, value = 0, label, valueLabel, detailsStart, detailsEnd, ...props }, ref) => {
4043
4122
  const hasHeader = label != null || valueLabel != null;
4044
4123
  const hasDetails = detailsStart != null || detailsEnd != null;
4045
4124
  const clamped = Math.min(100, Math.max(0, value ?? 0));
4046
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("flex w-full flex-col gap-2", className), children: [
4047
- hasHeader && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center justify-between text-ui-label text-surface-foreground", children: [
4048
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: label }),
4049
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: valueLabel === true ? `${Math.round(clamped)}%` : valueLabel })
4125
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: cn("flex w-full flex-col gap-2", className), children: [
4126
+ hasHeader && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center justify-between text-ui-label text-surface-foreground", children: [
4127
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: label }),
4128
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: valueLabel === true ? `${Math.round(clamped)}%` : valueLabel })
4050
4129
  ] }),
4051
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4130
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4052
4131
  import_radix_ui24.Progress.Root,
4053
4132
  {
4054
4133
  ref,
4055
4134
  value: clamped,
4056
4135
  className: "relative h-2 w-full overflow-hidden rounded-full bg-secondary",
4057
4136
  ...props,
4058
- children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4137
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4059
4138
  import_radix_ui24.Progress.Indicator,
4060
4139
  {
4061
4140
  className: "h-full rounded-full bg-accent transition-[width]",
@@ -4064,9 +4143,9 @@ var Progress = React52.forwardRef(
4064
4143
  )
4065
4144
  }
4066
4145
  ),
4067
- hasDetails && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-start justify-between text-ui-label leading-5 text-secondary-muted-foreground", children: [
4068
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: detailsStart }),
4069
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: detailsEnd })
4146
+ hasDetails && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-start justify-between text-ui-label leading-5 text-secondary-muted-foreground", children: [
4147
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: detailsStart }),
4148
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: detailsEnd })
4070
4149
  ] })
4071
4150
  ] });
4072
4151
  }
@@ -4074,11 +4153,11 @@ var Progress = React52.forwardRef(
4074
4153
  Progress.displayName = "Progress";
4075
4154
 
4076
4155
  // src/components/Data Display/Table.tsx
4077
- var React53 = __toESM(require("react"), 1);
4078
- var import_react28 = require("@phosphor-icons/react");
4079
- var import_jsx_runtime54 = require("react/jsx-runtime");
4080
- var Table = React53.forwardRef(
4081
- ({ className, containerClassName, containerRef, striped, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { ref: containerRef, className: cn("relative w-full overflow-auto rounded-lg border border-border bg-surface", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4156
+ var React55 = __toESM(require("react"), 1);
4157
+ var import_react29 = require("@phosphor-icons/react");
4158
+ var import_jsx_runtime56 = require("react/jsx-runtime");
4159
+ var Table = React55.forwardRef(
4160
+ ({ className, containerClassName, containerRef, striped, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { ref: containerRef, className: cn("relative w-full overflow-auto rounded-lg border border-border bg-surface", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4082
4161
  "table",
4083
4162
  {
4084
4163
  ref,
@@ -4089,20 +4168,20 @@ var Table = React53.forwardRef(
4089
4168
  ) })
4090
4169
  );
4091
4170
  Table.displayName = "Table";
4092
- var TableHeader = React53.forwardRef(
4093
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("thead", { ref, className, ...props })
4171
+ var TableHeader = React55.forwardRef(
4172
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("thead", { ref, className, ...props })
4094
4173
  );
4095
4174
  TableHeader.displayName = "TableHeader";
4096
- var TableFooter = React53.forwardRef(
4097
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("tfoot", { ref, className: cn("border-t border-border bg-background text-ui-label", className), ...props })
4175
+ var TableFooter = React55.forwardRef(
4176
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("tfoot", { ref, className: cn("border-t border-border bg-background text-ui-label", className), ...props })
4098
4177
  );
4099
4178
  TableFooter.displayName = "TableFooter";
4100
- var TableBody = React53.forwardRef(
4101
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("tbody", { ref, className, ...props })
4179
+ var TableBody = React55.forwardRef(
4180
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("tbody", { ref, className, ...props })
4102
4181
  );
4103
4182
  TableBody.displayName = "TableBody";
4104
- var TableRow = React53.forwardRef(
4105
- ({ className, selected, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4183
+ var TableRow = React55.forwardRef(
4184
+ ({ className, selected, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4106
4185
  "tr",
4107
4186
  {
4108
4187
  ref,
@@ -4119,10 +4198,10 @@ var TableRow = React53.forwardRef(
4119
4198
  );
4120
4199
  TableRow.displayName = "TableRow";
4121
4200
  var ariaSort = { none: "none", asc: "ascending", desc: "descending" };
4122
- var TableHead = React53.forwardRef(
4201
+ var TableHead = React55.forwardRef(
4123
4202
  ({ className, align = "left", sortable, sort = "none", onSort, checkbox, resizer, children, ...props }, ref) => {
4124
- const caret = sort === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react28.CaretUp, { size: 16, "aria-hidden": true, className: "shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react28.CaretDown, { size: 16, "aria-hidden": true, className: "shrink-0" });
4125
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
4203
+ const caret = sort === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react29.CaretUp, { size: 16, "aria-hidden": true, className: "shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react29.CaretDown, { size: 16, "aria-hidden": true, className: "shrink-0" });
4204
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
4126
4205
  "th",
4127
4206
  {
4128
4207
  ref,
@@ -4137,7 +4216,7 @@ var TableHead = React53.forwardRef(
4137
4216
  ),
4138
4217
  ...props,
4139
4218
  children: [
4140
- sortable ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
4219
+ sortable ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
4141
4220
  "button",
4142
4221
  {
4143
4222
  type: "button",
@@ -4148,7 +4227,7 @@ var TableHead = React53.forwardRef(
4148
4227
  caret
4149
4228
  ]
4150
4229
  }
4151
- ) : checkbox ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex items-center justify-center", children }) : children,
4230
+ ) : checkbox ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex items-center justify-center", children }) : children,
4152
4231
  resizer
4153
4232
  ]
4154
4233
  }
@@ -4156,8 +4235,8 @@ var TableHead = React53.forwardRef(
4156
4235
  }
4157
4236
  );
4158
4237
  TableHead.displayName = "TableHead";
4159
- var TableCell = React53.forwardRef(
4160
- ({ className, align = "left", muted, checkbox, actions, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4238
+ var TableCell = React55.forwardRef(
4239
+ ({ className, align = "left", muted, checkbox, actions, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4161
4240
  "td",
4162
4241
  {
4163
4242
  ref,
@@ -4170,31 +4249,31 @@ var TableCell = React53.forwardRef(
4170
4249
  className
4171
4250
  ),
4172
4251
  ...props,
4173
- children: checkbox ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex items-center justify-center", children }) : actions ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex items-start justify-end gap-1", children }) : children
4252
+ children: checkbox ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex items-center justify-center", children }) : actions ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex items-start justify-end gap-1", children }) : children
4174
4253
  }
4175
4254
  )
4176
4255
  );
4177
4256
  TableCell.displayName = "TableCell";
4178
4257
  function TableCellTwoLines({ primary, secondary, avatar, className, ...props }) {
4179
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cn("flex items-center gap-2", className), ...props, children: [
4258
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cn("flex items-center gap-2", className), ...props, children: [
4180
4259
  avatar,
4181
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex flex-col gap-0.5 whitespace-nowrap", children: [
4182
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-ui-label text-surface-foreground", children: primary }),
4183
- secondary && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-ui-caption text-secondary-muted-foreground", children: secondary })
4260
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col gap-0.5 whitespace-nowrap", children: [
4261
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-ui-label text-surface-foreground", children: primary }),
4262
+ secondary && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-ui-caption text-secondary-muted-foreground", children: secondary })
4184
4263
  ] })
4185
4264
  ] });
4186
4265
  }
4187
4266
 
4188
4267
  // src/components/Data Display/DataTable.tsx
4189
- var React55 = __toESM(require("react"), 1);
4190
- var import_react30 = require("@phosphor-icons/react");
4268
+ var React57 = __toESM(require("react"), 1);
4269
+ var import_react31 = require("@phosphor-icons/react");
4191
4270
  var import_react_table = require("@tanstack/react-table");
4192
4271
  var import_react_virtual = require("@tanstack/react-virtual");
4193
4272
 
4194
4273
  // src/components/Utility/Pagination.tsx
4195
- var React54 = __toESM(require("react"), 1);
4196
- var import_react29 = require("@phosphor-icons/react");
4197
- var import_jsx_runtime55 = require("react/jsx-runtime");
4274
+ var React56 = __toESM(require("react"), 1);
4275
+ var import_react30 = require("@phosphor-icons/react");
4276
+ var import_jsx_runtime57 = require("react/jsx-runtime");
4198
4277
  function getPaginationItems(page, pageCount, siblings = 1) {
4199
4278
  const keep = /* @__PURE__ */ new Set([1, pageCount]);
4200
4279
  for (let p = page - siblings; p <= page + siblings; p++) if (p >= 1 && p <= pageCount) keep.add(p);
@@ -4208,10 +4287,10 @@ function getPaginationItems(page, pageCount, siblings = 1) {
4208
4287
  });
4209
4288
  return items;
4210
4289
  }
4211
- var Pagination = React54.forwardRef(
4290
+ var Pagination = React56.forwardRef(
4212
4291
  ({ className, page, pageCount, onPageChange, variant = "full", siblings = 1, ...props }, ref) => {
4213
4292
  const go = (next2) => onPageChange(Math.min(pageCount, Math.max(1, next2)));
4214
- const previous = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4293
+ const previous = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4215
4294
  Button,
4216
4295
  {
4217
4296
  type: "button",
@@ -4220,10 +4299,10 @@ var Pagination = React54.forwardRef(
4220
4299
  "aria-label": "Previous page",
4221
4300
  disabled: page <= 1,
4222
4301
  onClick: () => go(page - 1),
4223
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react29.ArrowLeft, { size: 16, "aria-hidden": true })
4302
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react30.ArrowLeft, { size: 16, "aria-hidden": true })
4224
4303
  }
4225
4304
  );
4226
- const next = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4305
+ const next = /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4227
4306
  Button,
4228
4307
  {
4229
4308
  type: "button",
@@ -4232,10 +4311,10 @@ var Pagination = React54.forwardRef(
4232
4311
  "aria-label": "Next page",
4233
4312
  disabled: page >= pageCount,
4234
4313
  onClick: () => go(page + 1),
4235
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react29.ArrowRight, { size: 16, "aria-hidden": true })
4314
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react30.ArrowRight, { size: 16, "aria-hidden": true })
4236
4315
  }
4237
4316
  );
4238
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
4317
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
4239
4318
  "nav",
4240
4319
  {
4241
4320
  ref,
@@ -4244,14 +4323,14 @@ var Pagination = React54.forwardRef(
4244
4323
  ...props,
4245
4324
  children: [
4246
4325
  previous,
4247
- variant === "compact" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "text-body-small text-surface-foreground", "aria-live": "polite", children: [
4326
+ variant === "compact" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "text-body-small text-surface-foreground", "aria-live": "polite", children: [
4248
4327
  page,
4249
4328
  "/",
4250
4329
  pageCount
4251
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("ul", { className: "flex items-center gap-2", children: getPaginationItems(page, pageCount, siblings).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("li", { children: item === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "inline-flex size-8 items-center justify-center rounded-sm border border-border bg-surface text-surface-foreground", children: [
4252
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react29.DotsThree, { size: 16, "aria-hidden": true }),
4253
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "sr-only", children: "More pages" })
4254
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4330
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ul", { className: "flex items-center gap-2", children: getPaginationItems(page, pageCount, siblings).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { children: item === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "inline-flex size-8 items-center justify-center rounded-sm border border-border bg-surface text-surface-foreground", children: [
4331
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react30.DotsThree, { size: 16, "aria-hidden": true }),
4332
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "sr-only", children: "More pages" })
4333
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4255
4334
  Button,
4256
4335
  {
4257
4336
  type: "button",
@@ -4272,7 +4351,7 @@ var Pagination = React54.forwardRef(
4272
4351
  Pagination.displayName = "Pagination";
4273
4352
 
4274
4353
  // src/components/Data Display/DataTable.tsx
4275
- var import_jsx_runtime56 = require("react/jsx-runtime");
4354
+ var import_jsx_runtime58 = require("react/jsx-runtime");
4276
4355
  var features = (0, import_react_table.tableFeatures)({
4277
4356
  rowSortingFeature: import_react_table.rowSortingFeature,
4278
4357
  rowPaginationFeature: import_react_table.rowPaginationFeature,
@@ -4327,9 +4406,9 @@ var features = (0, import_react_table.tableFeatures)({
4327
4406
  });
4328
4407
  var getMeta = (meta) => meta ?? {};
4329
4408
  function useControllable(value, initial, onChange) {
4330
- const [internal, setInternal] = React55.useState(initial);
4409
+ const [internal, setInternal] = React57.useState(initial);
4331
4410
  const current = value ?? internal;
4332
- const update = React55.useCallback(
4411
+ const update = React57.useCallback(
4333
4412
  (updater) => {
4334
4413
  const next = typeof updater === "function" ? updater(current) : updater;
4335
4414
  if (value === void 0) setInternal(next);
@@ -4368,16 +4447,16 @@ function ColumnFilter({ column }) {
4368
4447
  const value = column.getFilterValue();
4369
4448
  if (variant === "select") {
4370
4449
  const options = [...column.getFacetedUniqueValues().entries()].sort((a, b) => String(a[0]).localeCompare(String(b[0])));
4371
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
4450
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
4372
4451
  Select,
4373
4452
  {
4374
4453
  value: typeof value === "string" ? value : ALL,
4375
4454
  onValueChange: (next) => column.setFilterValue(next === ALL ? void 0 : next),
4376
4455
  children: [
4377
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectTrigger, { "aria-label": `Filter ${label}`, className: "h-8 text-body-small", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectValue, {}) }),
4378
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(SelectContent, { children: [
4379
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectItem, { value: ALL, children: "All" }),
4380
- options.map(([option, count]) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(SelectItem, { value: String(option), children: [
4456
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectTrigger, { "aria-label": `Filter ${label}`, className: "h-8 text-body-small", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectValue, {}) }),
4457
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(SelectContent, { children: [
4458
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectItem, { value: ALL, children: "All" }),
4459
+ options.map(([option, count]) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(SelectItem, { value: String(option), children: [
4381
4460
  String(option),
4382
4461
  " (",
4383
4462
  count,
@@ -4396,8 +4475,8 @@ function ColumnFilter({ column }) {
4396
4475
  next[index] = raw === "" ? void 0 : Number(raw);
4397
4476
  column.setFilterValue(next[0] === void 0 && next[1] === void 0 ? void 0 : next);
4398
4477
  };
4399
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex gap-1", children: [
4400
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4478
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex gap-1", children: [
4479
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4401
4480
  Input,
4402
4481
  {
4403
4482
  type: "number",
@@ -4408,7 +4487,7 @@ function ColumnFilter({ column }) {
4408
4487
  className: "h-8 text-body-small"
4409
4488
  }
4410
4489
  ),
4411
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4490
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4412
4491
  Input,
4413
4492
  {
4414
4493
  type: "number",
@@ -4421,7 +4500,7 @@ function ColumnFilter({ column }) {
4421
4500
  )
4422
4501
  ] });
4423
4502
  }
4424
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4503
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4425
4504
  Input,
4426
4505
  {
4427
4506
  "aria-label": `Filter ${label}`,
@@ -4434,9 +4513,9 @@ function ColumnFilter({ column }) {
4434
4513
  }
4435
4514
  function EditableCell({ value, label, type, onCommit }) {
4436
4515
  const initial = value == null ? "" : String(value);
4437
- const [draft, setDraft] = React55.useState(null);
4438
- const cancelled = React55.useRef(false);
4439
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4516
+ const [draft, setDraft] = React57.useState(null);
4517
+ const cancelled = React57.useRef(false);
4518
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4440
4519
  Input,
4441
4520
  {
4442
4521
  type,
@@ -4574,7 +4653,7 @@ function DataTableInner({
4574
4653
  onPaginationChange
4575
4654
  );
4576
4655
  const [density, setDensity] = useControllable(densityProp, "default", onDensityChange);
4577
- const [cellSelection, setCellSelection] = React55.useState([]);
4656
+ const [cellSelection, setCellSelection] = React57.useState([]);
4578
4657
  const infinite = Boolean(onLoadMore);
4579
4658
  const paginate = !virtualized && !infinite;
4580
4659
  const compact = density === "compact";
@@ -4647,12 +4726,12 @@ function DataTableInner({
4647
4726
  const cellDensity = compact ? "h-8 py-1.5" : void 0;
4648
4727
  const allSelected = table.getIsAllPageRowsSelected();
4649
4728
  const someSelected = table.getIsSomePageRowsSelected();
4650
- const dragged = React55.useRef(null);
4729
+ const dragged = React57.useRef(null);
4651
4730
  const topRows = enableRowPinning ? table.getTopRows() : [];
4652
4731
  const bottomRows = enableRowPinning ? table.getBottomRows() : [];
4653
4732
  const bodyRows = enableRowPinning ? table.getCenterRows() : table.getRowModel().rows;
4654
- const scrollRef = React55.useRef(null);
4655
- const setScrollRef = React55.useCallback(
4733
+ const scrollRef = React57.useRef(null);
4734
+ const setScrollRef = React57.useCallback(
4656
4735
  (node) => {
4657
4736
  scrollRef.current = node;
4658
4737
  if (typeof containerRef === "function") containerRef(node);
@@ -4671,8 +4750,8 @@ function DataTableInner({
4671
4750
  const virtualItems = virtualized ? virtualizer.getVirtualItems() : [];
4672
4751
  const paddingTop = virtualItems.length > 0 ? virtualItems[0]?.start ?? 0 : 0;
4673
4752
  const paddingBottom = virtualItems.length > 0 ? virtualizer.getTotalSize() - (virtualItems.at(-1)?.end ?? 0) : 0;
4674
- const sentinelRef = React55.useRef(null);
4675
- React55.useEffect(() => {
4753
+ const sentinelRef = React57.useRef(null);
4754
+ React57.useEffect(() => {
4676
4755
  const node = sentinelRef.current;
4677
4756
  if (!node || !onLoadMore || !hasMore || loadingMore || typeof IntersectionObserver === "undefined") return;
4678
4757
  const container = scrollRef.current;
@@ -4713,15 +4792,15 @@ function DataTableInner({
4713
4792
  table.resetCellSelection(true);
4714
4793
  }
4715
4794
  };
4716
- const skeletonRow = (rowKey) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnSpan }, (_, cell) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableCell, { checkbox: enableRowSelection && cell === 0, className: cellDensity, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { "aria-hidden": true, className: "block h-4 w-3/4 animate-pulse rounded-xs bg-border" }) }, cell)) }, rowKey);
4795
+ const skeletonRow = (rowKey) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnSpan }, (_, cell) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableCell, { checkbox: enableRowSelection && cell === 0, className: cellDensity, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { "aria-hidden": true, className: "block h-4 w-3/4 animate-pulse rounded-xs bg-border" }) }, cell)) }, rowKey);
4717
4796
  const renderRow = (row, options = {}) => {
4718
4797
  const { pinned, pinnedIndex = 0, pinnedCount = 1, virtualIndex } = options;
4719
4798
  const grouped = row.getIsGrouped();
4720
4799
  const rowUnits = compact ? 8 : 10;
4721
4800
  const pinStyle = pinned ? pinned === "top" ? { position: "sticky", top: `calc(var(--spacing) * ${rowUnits * (pinnedIndex + 1)})` } : { position: "sticky", bottom: `calc(var(--spacing) * ${rowUnits * (pinnedCount - 1 - pinnedIndex)})` } : void 0;
4722
4801
  const cells = row.getVisibleCells();
4723
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(React55.Fragment, { children: [
4724
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
4802
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(React57.Fragment, { children: [
4803
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
4725
4804
  TableRow,
4726
4805
  {
4727
4806
  ref: virtualized && virtualIndex !== void 0 ? virtualizer.measureElement : void 0,
@@ -4731,7 +4810,7 @@ function DataTableInner({
4731
4810
  onClick: onRowClick && !grouped ? () => onRowClick(row.original) : void 0,
4732
4811
  className: cn(pinned && "z-20 bg-surface", grouped && "bg-background", onRowClick && !grouped && "cursor-pointer"),
4733
4812
  children: [
4734
- enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableCell, { checkbox: true, className: cellDensity, onClick: (event) => event.stopPropagation(), children: !grouped && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4813
+ enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableCell, { checkbox: true, className: cellDensity, onClick: (event) => event.stopPropagation(), children: !grouped && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4735
4814
  Checkbox,
4736
4815
  {
4737
4816
  "aria-label": "Select row",
@@ -4740,7 +4819,7 @@ function DataTableInner({
4740
4819
  onCheckedChange: (checked) => row.toggleSelected(Boolean(checked))
4741
4820
  }
4742
4821
  ) }),
4743
- hasExpander && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableCell, { checkbox: true, className: cellDensity, onClick: (event) => event.stopPropagation(), children: !grouped && row.getCanExpand() && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4822
+ hasExpander && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableCell, { checkbox: true, className: cellDensity, onClick: (event) => event.stopPropagation(), children: !grouped && row.getCanExpand() && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4744
4823
  Button,
4745
4824
  {
4746
4825
  type: "button",
@@ -4749,10 +4828,10 @@ function DataTableInner({
4749
4828
  "aria-label": row.getIsExpanded() ? "Collapse row" : "Expand row",
4750
4829
  "aria-expanded": row.getIsExpanded(),
4751
4830
  onClick: () => row.toggleExpanded(),
4752
- children: row.getIsExpanded() ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react30.CaretDown, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react30.CaretRight, { size: 16, "aria-hidden": true })
4831
+ children: row.getIsExpanded() ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react31.CaretDown, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react31.CaretRight, { size: 16, "aria-hidden": true })
4753
4832
  }
4754
4833
  ) }),
4755
- enableRowPinning && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableCell, { checkbox: true, className: cellDensity, onClick: (event) => event.stopPropagation(), children: !grouped && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4834
+ enableRowPinning && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableCell, { checkbox: true, className: cellDensity, onClick: (event) => event.stopPropagation(), children: !grouped && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4756
4835
  Button,
4757
4836
  {
4758
4837
  type: "button",
@@ -4761,7 +4840,7 @@ function DataTableInner({
4761
4840
  "aria-label": row.getIsPinned() ? "Unpin row" : "Pin row to top",
4762
4841
  "aria-pressed": Boolean(row.getIsPinned()),
4763
4842
  onClick: () => row.pin(row.getIsPinned() ? false : "top"),
4764
- children: row.getIsPinned() ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react30.PushPinSlash, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react30.PushPin, { size: 16, "aria-hidden": true })
4843
+ children: row.getIsPinned() ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react31.PushPinSlash, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react31.PushPin, { size: 16, "aria-hidden": true })
4765
4844
  }
4766
4845
  ) }),
4767
4846
  cells.map((cell, index) => {
@@ -4774,7 +4853,7 @@ function DataTableInner({
4774
4853
  const indent = index === 0 && hasExpander && row.depth > 0 ? row.depth * 4 : 0;
4775
4854
  let content;
4776
4855
  if (cell.getIsGrouped()) {
4777
- content = /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
4856
+ content = /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
4778
4857
  "button",
4779
4858
  {
4780
4859
  type: "button",
@@ -4782,9 +4861,9 @@ function DataTableInner({
4782
4861
  "aria-expanded": row.getIsExpanded(),
4783
4862
  onClick: row.getToggleExpandedHandler(),
4784
4863
  children: [
4785
- row.getIsExpanded() ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react30.CaretDown, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react30.CaretRight, { size: 16, "aria-hidden": true }),
4864
+ row.getIsExpanded() ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react31.CaretDown, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react31.CaretRight, { size: 16, "aria-hidden": true }),
4786
4865
  (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()),
4787
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "text-secondary-muted-foreground", children: [
4866
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "text-secondary-muted-foreground", children: [
4788
4867
  "(",
4789
4868
  row.subRows.length,
4790
4869
  ")"
@@ -4797,7 +4876,7 @@ function DataTableInner({
4797
4876
  } else if (cell.getIsPlaceholder()) {
4798
4877
  content = null;
4799
4878
  } else if (meta.editable) {
4800
- content = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4879
+ content = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4801
4880
  EditableCell,
4802
4881
  {
4803
4882
  value: cell.getValue(),
@@ -4809,7 +4888,7 @@ function DataTableInner({
4809
4888
  } else {
4810
4889
  content = (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext());
4811
4890
  }
4812
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4891
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4813
4892
  TableCell,
4814
4893
  {
4815
4894
  align: meta.align,
@@ -4842,7 +4921,7 @@ function DataTableInner({
4842
4921
  ]
4843
4922
  }
4844
4923
  ),
4845
- renderSubComponent && !grouped && row.getIsExpanded() && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableRow, { className: "bg-background hover:bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableCell, { colSpan: columnSpan, children: renderSubComponent(row.original) }) })
4924
+ renderSubComponent && !grouped && row.getIsExpanded() && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableRow, { className: "bg-background hover:bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableCell, { colSpan: columnSpan, children: renderSubComponent(row.original) }) })
4846
4925
  ] }, row.id);
4847
4926
  };
4848
4927
  const renderHeaderCell = (header) => {
@@ -4853,7 +4932,7 @@ function DataTableInner({
4853
4932
  const pin = pinning(column, sized, true);
4854
4933
  const reorderable = enableColumnOrdering && leaf && !column.getIsPinned();
4855
4934
  const label = labelOf(column);
4856
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4935
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4857
4936
  TableHead,
4858
4937
  {
4859
4938
  colSpan: header.colSpan > 1 ? header.colSpan : void 0,
@@ -4889,7 +4968,7 @@ function DataTableInner({
4889
4968
  reorderable && "cursor-grab",
4890
4969
  !leaf && "text-center"
4891
4970
  ),
4892
- resizer: enableColumnResizing && column.getCanResize() ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4971
+ resizer: enableColumnResizing && column.getCanResize() ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4893
4972
  "div",
4894
4973
  {
4895
4974
  role: "separator",
@@ -4904,14 +4983,14 @@ function DataTableInner({
4904
4983
  )
4905
4984
  }
4906
4985
  ) : void 0,
4907
- children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(table.FlexRender, { header })
4986
+ children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(table.FlexRender, { header })
4908
4987
  },
4909
4988
  header.id
4910
4989
  );
4911
4990
  };
4912
4991
  const stickyLeading = cn(cellDensity, sticky && "sticky top-0 z-20 bg-surface");
4913
- const leadingHeaderCells = (rowSpan) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
4914
- enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableHead, { checkbox: true, rowSpan, className: stickyLeading, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4992
+ const leadingHeaderCells = (rowSpan) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
4993
+ enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableHead, { checkbox: true, rowSpan, className: stickyLeading, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4915
4994
  Checkbox,
4916
4995
  {
4917
4996
  "aria-label": "Select all rows",
@@ -4920,15 +4999,15 @@ function DataTableInner({
4920
4999
  onCheckedChange: (checked) => table.toggleAllPageRowsSelected(Boolean(checked))
4921
5000
  }
4922
5001
  ) }),
4923
- hasExpander && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableHead, { checkbox: true, rowSpan, className: stickyLeading, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "sr-only", children: "Expand" }) }),
4924
- enableRowPinning && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableHead, { checkbox: true, rowSpan, className: stickyLeading, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "sr-only", children: "Pin" }) })
5002
+ hasExpander && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableHead, { checkbox: true, rowSpan, className: stickyLeading, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "sr-only", children: "Expand" }) }),
5003
+ enableRowPinning && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableHead, { checkbox: true, rowSpan, className: stickyLeading, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "sr-only", children: "Pin" }) })
4925
5004
  ] });
4926
5005
  const rowsToRender = virtualized ? virtualItems.map((item) => ({ row: bodyRows[item.index], index: item.index })) : null;
4927
5006
  const totalRows = topRows.length + bodyRows.length + bottomRows.length;
4928
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cn("flex w-full flex-col gap-2", wrapperClassName), children: [
4929
- showToolbar && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
4930
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-center gap-2", children: [
4931
- enableGlobalFilter && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5007
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: cn("flex w-full flex-col gap-2", wrapperClassName), children: [
5008
+ showToolbar && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
5009
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center gap-2", children: [
5010
+ enableGlobalFilter && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4932
5011
  SearchBar,
4933
5012
  {
4934
5013
  "aria-label": "Search table",
@@ -4941,8 +5020,8 @@ function DataTableInner({
4941
5020
  ),
4942
5021
  toolbar
4943
5022
  ] }),
4944
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-center gap-2", children: [
4945
- enableDensityToggle && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
5023
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center gap-2", children: [
5024
+ enableDensityToggle && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
4946
5025
  Button,
4947
5026
  {
4948
5027
  type: "button",
@@ -4951,20 +5030,20 @@ function DataTableInner({
4951
5030
  "aria-pressed": compact,
4952
5031
  onClick: () => setDensity(compact ? "default" : "compact"),
4953
5032
  children: [
4954
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react30.Rows, { size: 16, "aria-hidden": true }),
5033
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react31.Rows, { size: 16, "aria-hidden": true }),
4955
5034
  "Compact"
4956
5035
  ]
4957
5036
  }
4958
5037
  ),
4959
- enableGrouping && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DropdownMenu, { children: [
4960
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Button, { type: "button", variant: "outline", size: "sm", children: [
4961
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react30.Stack, { size: 16, "aria-hidden": true }),
5038
+ enableGrouping && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenu, { children: [
5039
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Button, { type: "button", variant: "outline", size: "sm", children: [
5040
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react31.Stack, { size: 16, "aria-hidden": true }),
4962
5041
  "Group by"
4963
5042
  ] }) }),
4964
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DropdownMenuContent, { align: "end", children: [
4965
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuLabel, { children: "Group rows by" }),
4966
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuSeparator, {}),
4967
- groupableColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5043
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenuContent, { align: "end", children: [
5044
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuLabel, { children: "Group rows by" }),
5045
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuSeparator, {}),
5046
+ groupableColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4968
5047
  DropdownMenuCheckboxItem,
4969
5048
  {
4970
5049
  checked: column.getIsGrouped(),
@@ -4975,15 +5054,15 @@ function DataTableInner({
4975
5054
  ))
4976
5055
  ] })
4977
5056
  ] }),
4978
- enableColumnVisibility && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DropdownMenu, { children: [
4979
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Button, { type: "button", variant: "outline", size: "sm", children: [
4980
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react30.Sliders, { size: 16, "aria-hidden": true }),
5057
+ enableColumnVisibility && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenu, { children: [
5058
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Button, { type: "button", variant: "outline", size: "sm", children: [
5059
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react31.Sliders, { size: 16, "aria-hidden": true }),
4981
5060
  "Columns"
4982
5061
  ] }) }),
4983
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DropdownMenuContent, { align: "end", children: [
4984
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuLabel, { children: "Toggle columns" }),
4985
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuSeparator, {}),
4986
- hideableColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5062
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenuContent, { align: "end", children: [
5063
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuLabel, { children: "Toggle columns" }),
5064
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuSeparator, {}),
5065
+ hideableColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4987
5066
  DropdownMenuCheckboxItem,
4988
5067
  {
4989
5068
  checked: column.getIsVisible(),
@@ -4996,7 +5075,7 @@ function DataTableInner({
4996
5075
  ] })
4997
5076
  ] })
4998
5077
  ] }),
4999
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
5078
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
5000
5079
  Table,
5001
5080
  {
5002
5081
  ref,
@@ -5009,52 +5088,52 @@ function DataTableInner({
5009
5088
  tabIndex: enableCellSelection ? 0 : void 0,
5010
5089
  ...tableProps,
5011
5090
  children: [
5012
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(TableHeader, { children: [
5013
- headerGroups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(TableRow, { className: "hover:bg-transparent", children: [
5091
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(TableHeader, { children: [
5092
+ headerGroups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(TableRow, { className: "hover:bg-transparent", children: [
5014
5093
  groupIndex === 0 && leadingHeaderCells(headerGroups.length + (enableColumnFilters ? 1 : 0)),
5015
5094
  group.headers.map(renderHeaderCell)
5016
5095
  ] }, group.id)),
5017
- enableColumnFilters && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableRow, { className: "hover:bg-transparent", children: leafColumns.map((column) => {
5096
+ enableColumnFilters && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableRow, { className: "hover:bg-transparent", children: leafColumns.map((column) => {
5018
5097
  const pin = pinning(column, sized, true);
5019
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5098
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5020
5099
  TableHead,
5021
5100
  {
5022
5101
  style: pin.style,
5023
5102
  className: cn("h-auto py-2 font-normal", pin.className, sticky && !column.getIsPinned() && "bg-surface"),
5024
- children: column.getCanFilter() ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ColumnFilter, { column }) : null
5103
+ children: column.getCanFilter() ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ColumnFilter, { column }) : null
5025
5104
  },
5026
5105
  column.id
5027
5106
  );
5028
5107
  }) })
5029
5108
  ] }),
5030
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(TableBody, { children: [
5031
- loading ? Array.from({ length: pageSize }, (_, index) => skeletonRow(`loading-${index}`)) : totalRows === 0 ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableCell, { colSpan: columnSpan, muted: true, className: "h-24 text-center", children: emptyState ?? "No results." }) }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
5109
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(TableBody, { children: [
5110
+ loading ? Array.from({ length: pageSize }, (_, index) => skeletonRow(`loading-${index}`)) : totalRows === 0 ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableCell, { colSpan: columnSpan, muted: true, className: "h-24 text-center", children: emptyState ?? "No results." }) }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
5032
5111
  topRows.map((row, index) => renderRow(row, { pinned: "top", pinnedIndex: index, pinnedCount: topRows.length })),
5033
- virtualized && paddingTop > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("tr", { "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("td", { colSpan: columnSpan, style: { height: paddingTop } }) }),
5112
+ virtualized && paddingTop > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("tr", { "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("td", { colSpan: columnSpan, style: { height: paddingTop } }) }),
5034
5113
  rowsToRender ? rowsToRender.map(({ row, index }) => renderRow(row, { virtualIndex: index })) : bodyRows.map((row) => renderRow(row)),
5035
- virtualized && paddingBottom > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("tr", { "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("td", { colSpan: columnSpan, style: { height: paddingBottom } }) }),
5114
+ virtualized && paddingBottom > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("tr", { "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("td", { colSpan: columnSpan, style: { height: paddingBottom } }) }),
5036
5115
  bottomRows.map(
5037
5116
  (row, index) => renderRow(row, { pinned: "bottom", pinnedIndex: index, pinnedCount: bottomRows.length })
5038
5117
  )
5039
5118
  ] }),
5040
- infinite && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
5119
+ infinite && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
5041
5120
  loadingMore && Array.from({ length: 3 }, (_, index) => skeletonRow(`more-${index}`)),
5042
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("tr", { ref: sentinelRef, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("td", { colSpan: columnSpan, className: "h-px p-0" }) })
5121
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("tr", { ref: sentinelRef, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("td", { colSpan: columnSpan, className: "h-px p-0" }) })
5043
5122
  ] })
5044
5123
  ] }),
5045
- showFooter && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableFooter, { children: table.getFooterGroups().map((group) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(TableRow, { className: "hover:bg-transparent", children: [
5046
- leadingCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableCell, { colSpan: leadingCount, className: cellDensity }),
5124
+ showFooter && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableFooter, { children: table.getFooterGroups().map((group) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(TableRow, { className: "hover:bg-transparent", children: [
5125
+ leadingCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableCell, { colSpan: leadingCount, className: cellDensity }),
5047
5126
  group.headers.map((header) => {
5048
5127
  const { align } = getMeta(header.column.columnDef.meta);
5049
5128
  const pin = pinning(header.column, sized);
5050
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5129
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5051
5130
  TableCell,
5052
5131
  {
5053
5132
  align,
5054
5133
  colSpan: header.colSpan > 1 ? header.colSpan : void 0,
5055
5134
  style: pin.style,
5056
5135
  className: cn("text-ui-label", pin.className, cellDensity),
5057
- children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(table.FlexRender, { footer: header })
5136
+ children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(table.FlexRender, { footer: header })
5058
5137
  },
5059
5138
  header.id
5060
5139
  );
@@ -5063,9 +5142,9 @@ function DataTableInner({
5063
5142
  ]
5064
5143
  }
5065
5144
  ),
5066
- (enableRowSelection || paginate && pageCount > 1) && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
5067
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-body-small text-secondary-muted-foreground", "aria-live": "polite", children: enableRowSelection ? `${selectedCount} of ${table.getCoreRowModel().rows.length} row(s) selected` : null }),
5068
- paginate && pageCount > 1 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5145
+ (enableRowSelection || paginate && pageCount > 1) && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
5146
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-body-small text-secondary-muted-foreground", "aria-live": "polite", children: enableRowSelection ? `${selectedCount} of ${table.getCoreRowModel().rows.length} row(s) selected` : null }),
5147
+ paginate && pageCount > 1 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5069
5148
  Pagination,
5070
5149
  {
5071
5150
  page: pagination.pageIndex + 1,
@@ -5076,13 +5155,13 @@ function DataTableInner({
5076
5155
  ] })
5077
5156
  ] });
5078
5157
  }
5079
- var DataTable = React55.forwardRef(DataTableInner);
5158
+ var DataTable = React57.forwardRef(DataTableInner);
5080
5159
  DataTable.displayName = "DataTable";
5081
5160
 
5082
5161
  // src/components/Data Display/StatCard.tsx
5083
- var React56 = __toESM(require("react"), 1);
5162
+ var React58 = __toESM(require("react"), 1);
5084
5163
  var import_class_variance_authority6 = require("class-variance-authority");
5085
- var import_jsx_runtime57 = require("react/jsx-runtime");
5164
+ var import_jsx_runtime59 = require("react/jsx-runtime");
5086
5165
  var statCardVariants = (0, import_class_variance_authority6.cva)("flex min-w-0 flex-col gap-2 rounded-md border p-3", {
5087
5166
  variants: {
5088
5167
  variant: {
@@ -5096,26 +5175,26 @@ var statCardVariants = (0, import_class_variance_authority6.cva)("flex min-w-0 f
5096
5175
  },
5097
5176
  defaultVariants: { variant: "default" }
5098
5177
  });
5099
- var StatCard = React56.forwardRef(
5100
- ({ className, variant, label, value, icon, caption, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { ref, className: cn(statCardVariants({ variant }), className), ...props, children: [
5101
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "truncate text-ui-caption text-secondary-muted-foreground", children: label }),
5102
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("p", { className: "flex items-center gap-2 text-body-base text-surface-foreground", children: [
5103
- icon && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { "aria-hidden": "true", className: "inline-flex size-6 shrink-0 items-center justify-center", children: icon }),
5178
+ var StatCard = React58.forwardRef(
5179
+ ({ className, variant, label, value, icon, caption, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { ref, className: cn(statCardVariants({ variant }), className), ...props, children: [
5180
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "truncate text-ui-caption text-secondary-muted-foreground", children: label }),
5181
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("p", { className: "flex items-center gap-2 text-body-base text-surface-foreground", children: [
5182
+ icon && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { "aria-hidden": "true", className: "inline-flex size-6 shrink-0 items-center justify-center", children: icon }),
5104
5183
  value
5105
5184
  ] }),
5106
- caption && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: caption })
5185
+ caption && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: caption })
5107
5186
  ] })
5108
5187
  );
5109
5188
  StatCard.displayName = "StatCard";
5110
5189
 
5111
5190
  // src/components/Research-Specific/ActivityStructure.tsx
5112
- var React58 = __toESM(require("react"), 1);
5191
+ var React60 = __toESM(require("react"), 1);
5113
5192
 
5114
5193
  // src/components/Tags & Badges/EditableTag.tsx
5115
- var React57 = __toESM(require("react"), 1);
5116
- var import_react31 = require("@phosphor-icons/react");
5194
+ var React59 = __toESM(require("react"), 1);
5195
+ var import_react32 = require("@phosphor-icons/react");
5117
5196
  var import_class_variance_authority7 = require("class-variance-authority");
5118
- var import_jsx_runtime58 = require("react/jsx-runtime");
5197
+ var import_jsx_runtime60 = require("react/jsx-runtime");
5119
5198
  var editableTagVariants = (0, import_class_variance_authority7.cva)(
5120
5199
  "inline-flex h-6.5 items-center whitespace-nowrap rounded-sm py-1 text-ui-caption transition-colors",
5121
5200
  {
@@ -5130,27 +5209,27 @@ var editableTagVariants = (0, import_class_variance_authority7.cva)(
5130
5209
  defaultVariants: { type: "default" }
5131
5210
  }
5132
5211
  );
5133
- var EditableTag = React57.forwardRef(
5212
+ var EditableTag = React59.forwardRef(
5134
5213
  ({ className, type = "default", icon, onRemove, onClick, children, ...props }, ref) => {
5135
5214
  const classes = cn(editableTagVariants({ type }), className);
5136
- const leading = type === "add" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react31.Plus, { size: 12, "aria-hidden": true }) : icon !== void 0 ? icon : type === "default" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react31.Crown, { size: 12, weight: "fill", "aria-hidden": true }) : null;
5215
+ const leading = type === "add" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react32.Plus, { size: 12, "aria-hidden": true }) : icon !== void 0 ? icon : type === "default" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react32.Crown, { size: 12, weight: "fill", "aria-hidden": true }) : null;
5137
5216
  if (type === "add" || type === "multiple" && onClick) {
5138
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("button", { ref, type: "button", className: classes, onClick, ...props, children: [
5217
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("button", { ref, type: "button", className: classes, onClick, ...props, children: [
5139
5218
  leading,
5140
5219
  children
5141
5220
  ] });
5142
5221
  }
5143
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { ref, className: classes, ...props, children: [
5222
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { ref, className: classes, ...props, children: [
5144
5223
  leading,
5145
5224
  children,
5146
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5225
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5147
5226
  "button",
5148
5227
  {
5149
5228
  type: "button",
5150
5229
  "aria-label": typeof children === "string" ? `Remove ${children}` : "Remove",
5151
5230
  onClick: onRemove,
5152
5231
  className: "inline-flex size-3 items-center justify-center rounded-xs",
5153
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react31.X, { size: 12, "aria-hidden": true })
5232
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react32.X, { size: 12, "aria-hidden": true })
5154
5233
  }
5155
5234
  )
5156
5235
  ] });
@@ -5159,26 +5238,26 @@ var EditableTag = React57.forwardRef(
5159
5238
  EditableTag.displayName = "EditableTag";
5160
5239
 
5161
5240
  // src/components/Research-Specific/ActivityStructure.tsx
5162
- var import_jsx_runtime59 = require("react/jsx-runtime");
5163
- var ActivityStructure = React58.forwardRef(
5164
- ({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", action, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
5241
+ var import_jsx_runtime61 = require("react/jsx-runtime");
5242
+ var ActivityStructure = React60.forwardRef(
5243
+ ({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", action, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
5165
5244
  "section",
5166
5245
  {
5167
5246
  ref,
5168
5247
  className: cn("flex w-full max-w-96.5 flex-col gap-4 rounded-xl bg-surface p-4", className),
5169
5248
  ...props,
5170
5249
  children: [
5171
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
5172
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h3", { className: "text-body-section text-surface-foreground", children: title }),
5250
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
5251
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("h3", { className: "text-body-section text-surface-foreground", children: title }),
5173
5252
  action
5174
5253
  ] }),
5175
- stats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "grid grid-cols-2 gap-3", children: stats.map(({ id, ...stat }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(StatCard, { ...stat }, id)) }),
5176
- sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex flex-col gap-2", children: [
5177
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h4", { className: "text-heading-h4 text-surface-foreground", children: heading }),
5178
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "text-body-base text-surface-foreground", children: body }),
5179
- (tags?.length || onAddTag) && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
5180
- tags?.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(EditableTag, { type: "editable", onRemove: onRemoveTag && (() => onRemoveTag(id, tag)), children: tag }, tag)),
5181
- onAddTag && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(EditableTag, { type: "add", onClick: () => onAddTag(id), children: addTagLabel })
5254
+ stats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "grid grid-cols-2 gap-3", children: stats.map(({ id, ...stat }) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(StatCard, { ...stat }, id)) }),
5255
+ sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex flex-col gap-2", children: [
5256
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("h4", { className: "text-heading-h4 text-surface-foreground", children: heading }),
5257
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "text-body-base text-surface-foreground", children: body }),
5258
+ (tags?.length || onAddTag) && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
5259
+ tags?.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(EditableTag, { type: "editable", onRemove: onRemoveTag && (() => onRemoveTag(id, tag)), children: tag }, tag)),
5260
+ onAddTag && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(EditableTag, { type: "add", onClick: () => onAddTag(id), children: addTagLabel })
5182
5261
  ] })
5183
5262
  ] }, id)),
5184
5263
  children
@@ -5189,10 +5268,10 @@ var ActivityStructure = React58.forwardRef(
5189
5268
  ActivityStructure.displayName = "ActivityStructure";
5190
5269
 
5191
5270
  // src/components/Tags & Badges/Badge.tsx
5192
- var React59 = __toESM(require("react"), 1);
5193
- var import_react32 = require("@phosphor-icons/react");
5271
+ var React61 = __toESM(require("react"), 1);
5272
+ var import_react33 = require("@phosphor-icons/react");
5194
5273
  var import_class_variance_authority8 = require("class-variance-authority");
5195
- var import_jsx_runtime60 = require("react/jsx-runtime");
5274
+ var import_jsx_runtime62 = require("react/jsx-runtime");
5196
5275
  var roleTagVariants = (0, import_class_variance_authority8.cva)(
5197
5276
  "group inline-flex h-6 items-center whitespace-nowrap rounded-sm py-1 text-ui-caption transition-colors",
5198
5277
  {
@@ -5218,11 +5297,11 @@ var roleTagVariants = (0, import_class_variance_authority8.cva)(
5218
5297
  defaultVariants: { type: "primary", selected: false }
5219
5298
  }
5220
5299
  );
5221
- var Badge = React59.forwardRef(
5300
+ var Badge = React61.forwardRef(
5222
5301
  ({ className, type = "primary", selected = false, onClick, children, ...props }, ref) => {
5223
5302
  const classes = cn(roleTagVariants({ type, selected: type === "interactable" ? selected : false }), className);
5224
5303
  if (type === "interactable") {
5225
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
5304
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
5226
5305
  "button",
5227
5306
  {
5228
5307
  ref,
@@ -5232,20 +5311,48 @@ var Badge = React59.forwardRef(
5232
5311
  onClick,
5233
5312
  ...props,
5234
5313
  children: [
5235
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react32.DotsSixVertical, { size: 16, "aria-hidden": true, className: "hidden shrink-0 group-hover:block" }),
5314
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react33.DotsSixVertical, { size: 16, "aria-hidden": true, className: "hidden shrink-0 group-hover:block" }),
5236
5315
  children
5237
5316
  ]
5238
5317
  }
5239
5318
  );
5240
5319
  }
5241
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { ref, className: classes, ...props, children: [
5242
- type === "question" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react32.RadioButton, { size: 16, weight: "fill", "aria-hidden": true }),
5243
- type === "id" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "text-secondary-muted-foreground", children: "ID" }),
5320
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("span", { ref, className: classes, ...props, children: [
5321
+ type === "question" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react33.RadioButton, { size: 16, weight: "fill", "aria-hidden": true }),
5322
+ type === "id" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "text-secondary-muted-foreground", children: "ID" }),
5244
5323
  children
5245
5324
  ] });
5246
5325
  }
5247
5326
  );
5248
5327
  Badge.displayName = "Badge";
5328
+
5329
+ // src/components/Identity & People/Avatar.tsx
5330
+ var React62 = __toESM(require("react"), 1);
5331
+ var import_jsx_runtime63 = require("react/jsx-runtime");
5332
+ var initials = (name) => name.split(/\s+/).filter(Boolean).slice(0, 2).map((w) => w[0].toUpperCase()).join("");
5333
+ var Avatar = React62.forwardRef(({ className, src, name, fallback, ...props }, ref) => {
5334
+ const [failed, setFailed] = React62.useState(false);
5335
+ React62.useEffect(() => setFailed(false), [src]);
5336
+ const showImage = Boolean(src) && !failed;
5337
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5338
+ "span",
5339
+ {
5340
+ ref,
5341
+ role: showImage ? void 0 : "img",
5342
+ "aria-label": showImage ? void 0 : name,
5343
+ className: cn("flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-md bg-orchid-200 text-ui-label text-surface-foreground", className),
5344
+ ...props,
5345
+ children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("img", { src, alt: name, className: "size-full object-cover", onError: () => setFailed(true) }) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { "aria-hidden": "true", children: fallback ?? initials(name) })
5346
+ }
5347
+ );
5348
+ });
5349
+ Avatar.displayName = "Avatar";
5350
+
5351
+ // src/components/Identity & People/OrgMonogram.tsx
5352
+ var React63 = __toESM(require("react"), 1);
5353
+ var import_jsx_runtime64 = require("react/jsx-runtime");
5354
+ var OrgMonogram = React63.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { ref, className: cn("flex size-10 shrink-0 items-center justify-center rounded-md bg-coral-500 text-ui-label font-semibold text-surface", className), ...props }));
5355
+ OrgMonogram.displayName = "OrgMonogram";
5249
5356
  // Annotate the CommonJS export names for ESM import in node:
5250
5357
  0 && (module.exports = {
5251
5358
  AIMiniAvatar,
@@ -5253,6 +5360,7 @@ Badge.displayName = "Badge";
5253
5360
  ActivityStructure,
5254
5361
  AskAiInput,
5255
5362
  AskAiToggle,
5363
+ Avatar,
5256
5364
  Badge,
5257
5365
  Button,
5258
5366
  Calendar,
@@ -5309,9 +5417,11 @@ Badge.displayName = "Badge";
5309
5417
  NavRailItem,
5310
5418
  NumberInput,
5311
5419
  OpenEndAnswer,
5420
+ OrgMonogram,
5312
5421
  Pagination,
5313
5422
  Progress,
5314
5423
  ProjectSelector,
5424
+ ProjectSidebar,
5315
5425
  QuestionCard,
5316
5426
  QuestionEditorCard,
5317
5427
  QuestionHeader,
@@ -5333,6 +5443,7 @@ Badge.displayName = "Badge";
5333
5443
  SelectItem,
5334
5444
  SelectTrigger,
5335
5445
  SelectValue,
5446
+ SidebarNavItem,
5336
5447
  Slider,
5337
5448
  StatCard,
5338
5449
  StatusTag,